chore: Update Copilot instructions to GitHub documentation standards #21
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.
GitHub Copilot requires YAML frontmatter with
applyToglob patterns for path-specific instructions, setup workflows for Coding Agent, and custom agents for specialized tasks. Our instruction files used markdown headers instead of proper frontmatter, had no environment setup, and lacked custom agents.Changes
YAML Frontmatter Migration
All instruction files in
.github/instructions/now use proper frontmatter:Multi-path format for test files:
Files updated:
parser.instructions.md,types.instructions.md,python-bindings.instructions.md,node-bindings.instructions.md,tests.instructions.mdCoding Agent Setup Workflow
Created
.github/copilot-setup-steps.ymlwith:Custom Agents
Created
.github/agents/with two specialized agents:rust-developer.agent.md- Core parser developmentFocus: Tolerant parsing, performance optimization, RSS/Atom/JSON Feed specs
code-reviewer.agent.md- Security and quality reviewFocus: SSRF/XSS/DoS protection, API compatibility, bozo pattern validation
References
Original prompt
This section details on the original issue you should resolve
<issue_title>chore: Update Copilot instructions to match GitHub documentation</issue_title>
<issue_description>## Summary
Current Copilot instructions need to be updated to follow GitHub's official documentation for maximum compatibility with GitHub Copilot Coding Agent and Code Review features.
Current Issues
1. Path-specific instructions missing YAML frontmatter
Documentation requirement: Files in
.github/instructions/must have YAML frontmatter withapplyToglob patterns.Current state: Our instruction files use markdown headers like
**Applies to:** ...instead of proper frontmatter.Files affected:
parser.instructions.md- Missing frontmattertypes.instructions.md- Missing frontmatterpython-bindings.instructions.md- Missing frontmatternode-bindings.instructions.md- Missing frontmattertests.instructions.md- Missing frontmatterRequired fix:
2. No custom agents configured
Documentation: Create custom agents
Current state: No
.github/agents/directory exists.Recommended agents to create:
rust-parser.agent.mdread,search,edit,terminalpython-bindings.agent.mdread,search,edit,terminalcode-review.agent.mdread,search3. Missing
copilot-setup-steps.ymlfor Coding AgentDocumentation: Coding Agent needs environment setup for running tests/builds.
Required file:
.github/copilot-setup-steps.yml4. Instructions too verbose
Best practice: "Keep instructions concise (ideally under two pages)"
Current state:
types.instructions.md- 14,737 bytes (~400 lines)python-bindings.instructions.md- 13,908 bytestests.instructions.md- 12,927 bytesRecommendation: Condense to essential patterns and link to detailed docs.
5. Missing
excludeAgentfor targeted instructionsSome instructions should only apply to code review, not coding agent:
Tasks
Phase 1: Fix frontmatter (Critical)
applyToto all.github/instructions/*.mdfilesPhase 2: Add Coding Agent support
.github/copilot-setup-steps.ymlPhase 3: Create custom agents
.github/agents/directoryrust-developer.agent.mdcode-reviewer.agent.mdPhase 4: Optimize instructions
excludeAgentwhere appropriateReferences
Expected Frontmatter Format
parser.instructions.md
types.instructions.md
python-bindings.instructions.md
node-bindings.instructions.md
tests.instructions.md