Skip to content

feat: replace "id" by "urn"#205

Merged
alexec merged 5 commits intomainfrom
urns
Feb 18, 2026
Merged

feat: replace "id" by "urn"#205
alexec merged 5 commits intomainfrom
urns

Conversation

@alexec
Copy link
Contributor

@alexec alexec commented Feb 15, 2026

URNs are more formal way to create resource names.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request replaces the "id" field with "urn" field throughout the codebase and migrates from github.com/goccy/go-yaml to the standard gopkg.in/yaml.v3 library. The change introduces a URN (Uniform Resource Name) format for identifying tasks, rules, and commands using the pattern urn:agents:<type>:<name>.

Changes:

  • Refactored frontmatter structure by consolidating ID, Name, and Description fields into BaseFrontMatter, which is now embedded in all frontmatter types
  • Replaced all references from ID field to URN field, with YAML serialization still using the "id" tag name
  • Migrated YAML parsing library from github.com/goccy/go-yaml to gopkg.in/yaml.v3
  • Removed auto-generation logic (generateIDFromPath() function and its callers) that previously set IDs from filenames
  • Updated all test cases to use explicit URN values in frontmatter with proper URN format

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pkg/codingcontext/markdown/frontmatter.go Restructured frontmatter types by moving ID/Name/Description to BaseFrontMatter; renamed ID field to URN
pkg/codingcontext/result.go Updated MCPServers() to use URN instead of ID as map keys
pkg/codingcontext/context.go Removed generateIDFromPath() function and all auto-ID-generation logic
pkg/codingcontext/result_test.go Updated test data to use URN format; removed test case for auto-generated IDs
pkg/codingcontext/context_test.go Updated tests to verify explicit URN handling; removed auto-generation test cases
pkg/codingcontext/markdown/frontmatter_task_test.go Updated all test cases to use URN field with proper format
pkg/codingcontext/markdown/frontmatter_rule_test.go Updated all test cases to use URN field with proper format
pkg/codingcontext/markdown/frontmatter_command_test.go Updated all test cases to use URN field with proper format
pkg/codingcontext/markdown/markdown.go Updated import to use gopkg.in/yaml.v3
pkg/codingcontext/mcp/mcp_test.go Updated import to use gopkg.in/yaml.v3
go.mod Removed goccy/go-yaml dependency; moved gopkg.in/yaml.v3 from indirect to direct
go.sum Removed goccy/go-yaml checksums

Copy link
Contributor

Copilot AI commented Feb 16, 2026

@alexec I've opened a new pull request, #206, to work on those changes. Once the pull request is ready, I'll request review from you.

@alexec alexec merged commit 370ad9f into main Feb 18, 2026
1 check passed
@alexec alexec deleted the urns branch February 18, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants