-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add context-engineering collection #675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add context-engineering collection #675
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds a new Context Engineering collection to the repository, bundling Copilot prompts, an agent, and instructions aimed at improving context management for better Copilot outcomes.
Changes:
- Added three new prompt templates: Context Map, Refactor Plan, and What Context Do You Need?
- Added a new instruction file (Context Engineering) and a new agent (Context Architect)
- Added a new collection (Markdown + YAML manifest) and updated the generated docs indexes for prompts/instructions/agents/collections
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| prompts/what-context-needed.prompt.md | New prompt to ask which files Copilot needs before answering |
| prompts/refactor-plan.prompt.md | New prompt for phased multi-file refactor planning |
| prompts/context-map.prompt.md | New prompt to map relevant files/dependencies/tests before changes |
| instructions/context-engineering.instructions.md | New instruction set for structuring projects/code to improve Copilot context |
| agents/context-architect.agent.md | New agent for mapping dependencies and sequencing multi-file changes |
| collections/context-engineering.md | New collection landing page describing items + usage guidance |
| collections/context-engineering.collection.yml | New collection manifest defining included items and display metadata |
| docs/README.prompts.md | Adds the new prompts to the prompts index table |
| docs/README.instructions.md | Adds the new instruction file to the instructions index table |
| docs/README.collections.md | Adds the new collection to the collections index table |
| docs/README.agents.md | Adds the new agent to the agents index table |
aaronpowell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you ensure you're sync'ed with main and run npm run plugin:migrate to generate a plugin definition (if you want it available as a plugin)
|
updated |
Add tools for maximizing GitHub Copilot effectiveness through better context management: - Instructions: Guidelines for structuring code so Copilot understands it - Agent: Context Architect - plans multi-file changes by mapping dependencies - Prompts: - context-map: Map all affected files before changes - what-context-needed: Ask Copilot what files it needs - refactor-plan: Create phased refactor plans with rollback steps Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ugin - Fix prompt frontmatter: mode: 'agent' → agent: 'agent' (repo convention) - Add applyTo: '**' to instructions file - Remove trailing Claude credit from instructions - Generate plugin via npm run plugin:migrate - Rebase onto latest upstream/main
6289e2b to
2a32411
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 7 comments.
| --- | ||
| agent: 'agent' | ||
| tools: ['codebase'] | ||
| description: 'Generate a map of all files relevant to a task before making changes' | ||
| --- |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the repository's prompt file guidelines (instructions/prompt.instructions.md), the model field is strongly recommended in the frontmatter. This field specifies which AI model the prompt is optimized for, helping ensure consistent behavior. Consider adding a model field such as model: 'Claude Sonnet 4.5' or model: 'gpt-4.1' based on which model this prompt works best with. Additionally, consider adding a name field to provide a user-friendly display name for the prompt.
| @@ -0,0 +1 @@ | |||
| ../../../prompts/what-context-needed.prompt.md No newline at end of file | |||
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command file only contains a path reference to ../../../prompts/what-context-needed.prompt.md. Based on the repository conventions seen in other plugins (e.g., plugins/database-data-management/commands/, plugins/structured-autonomy/commands/), plugin command files should contain the full prompt content with YAML frontmatter, not just a path reference. Either copy the full content from the referenced prompt file into this command file, or reconsider the plugin structure if the intention is to simply reference existing prompts.
| @@ -0,0 +1 @@ | |||
| ../../../prompts/refactor-plan.prompt.md No newline at end of file | |||
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command file only contains a path reference to ../../../prompts/refactor-plan.prompt.md. Based on the repository conventions seen in other plugins (e.g., plugins/database-data-management/commands/, plugins/structured-autonomy/commands/), plugin command files should contain the full prompt content with YAML frontmatter, not just a path reference. Either copy the full content from the referenced prompt file into this command file, or reconsider the plugin structure if the intention is to simply reference existing prompts.
| @@ -0,0 +1 @@ | |||
| ../../../prompts/context-map.prompt.md No newline at end of file | |||
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command file only contains a path reference to ../../../prompts/context-map.prompt.md. Based on the repository conventions seen in other plugins (e.g., plugins/database-data-management/commands/, plugins/structured-autonomy/commands/), plugin command files should contain the full prompt content with YAML frontmatter, not just a path reference. Either copy the full content from the referenced prompt file into this command file, or reconsider the plugin structure if the intention is to simply reference existing prompts.
| @@ -0,0 +1 @@ | |||
| ../../../agents/context-architect.agent.md No newline at end of file | |||
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This agent file only contains a path reference to ../../../agents/context-architect.agent.md. Based on the repository conventions seen in other plugins (e.g., plugins/clojure-interactive-programming/agents/), plugin agent files should contain the full agent content with YAML frontmatter, not just a path reference. Either copy the full content from the referenced agent file into this plugin agent file, or reconsider the plugin structure if the intention is to simply reference existing agents.
| --- | ||
| agent: 'agent' | ||
| tools: ['codebase'] | ||
| description: 'Ask Copilot what files it needs to see before answering a question' | ||
| --- |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the repository's prompt file guidelines (instructions/prompt.instructions.md), the model field is strongly recommended in the frontmatter. This field specifies which AI model the prompt is optimized for, helping ensure consistent behavior. Consider adding a model field such as model: 'Claude Sonnet 4.5' or model: 'gpt-4.1' based on which model this prompt works best with. Additionally, consider adding a name field to provide a user-friendly display name for the prompt.
| --- | ||
| agent: 'agent' | ||
| tools: ['codebase', 'terminalCommand'] | ||
| description: 'Plan a multi-file refactor with proper sequencing and rollback steps' | ||
| --- |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the repository's prompt file guidelines (instructions/prompt.instructions.md), the model field is strongly recommended in the frontmatter. This field specifies which AI model the prompt is optimized for, helping ensure consistent behavior. Consider adding a model field such as model: 'Claude Sonnet 4.5' or model: 'gpt-4.1' based on which model this prompt works best with. Additionally, consider adding a name field to provide a user-friendly display name for the prompt.
Summary
This PR adds a Context Engineering collection - tools for maximizing GitHub Copilot effectiveness through better context management.
Components
context-engineering.instructions.mdcontext-architect.agent.mdcontext-map.prompt.mdwhat-context-needed.prompt.mdrefactor-plan.prompt.mdWhy This Matters
Copilot's suggestions are only as good as the context it has. Most "bad" suggestions come from:
This collection addresses each problem with actionable tools.
Usage Examples
Using the Context Architect Agent:
Before a big change:
When Copilot gives a generic answer:
Test plan
npm start- README tables updated correctly🤖 Generated with Claude Code