Conversation
Contributor
There was a problem hiding this comment.
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
IDfield toURNfield, with YAML serialization still using the "id" tag name - Migrated YAML parsing library from
github.com/goccy/go-yamltogopkg.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 |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
URNs are more formal way to create resource names.