Skip to content

Conversation

@vfaraji89
Copy link

Summary

This PR adds a Context Engineering collection - tools for maximizing GitHub Copilot effectiveness through better context management.

Components

Type File Purpose
Instructions context-engineering.instructions.md Guidelines for structuring code so Copilot understands it better
Agent context-architect.agent.md Plans multi-file changes by mapping dependencies first
Prompt context-map.prompt.md Generates a map of affected files before changes
Prompt what-context-needed.prompt.md Asks Copilot what files it needs to answer well
Prompt refactor-plan.prompt.md Creates phased refactor plans with verification steps

Why This Matters

Copilot's suggestions are only as good as the context it has. Most "bad" suggestions come from:

  • Relevant files not being open in tabs
  • Poor project structure that obscures intent
  • Asking for multi-file changes without providing the full picture

This collection addresses each problem with actionable tools.

Usage Examples

Using the Context Architect Agent:

@context-architect I need to add authentication to the API. What files are involved?

Before a big change:

/context-map Add caching to all database queries

When Copilot gives a generic answer:

/what-context-needed How does the payment flow work?

Test plan

  • Ran npm start - README tables updated correctly
  • Collection manifest validates
  • All referenced files exist in correct directories

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 6, 2026 20:07
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

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

Copy link
Contributor

@aaronpowell aaronpowell left a 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)

@vfaraji89
Copy link
Author

vfaraji89 commented Feb 10, 2026

updated

vfaraji89 and others added 3 commits February 10, 2026 22:42
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
@vfaraji89 vfaraji89 force-pushed the add-context-engineering-collection branch from 6289e2b to 2a32411 Compare February 10, 2026 19:43
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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 7 comments.

Comment on lines +1 to +5
---
agent: 'agent'
tools: ['codebase']
description: 'Generate a map of all files relevant to a task before making changes'
---
Copy link

Copilot AI Feb 10, 2026

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.

Copilot generated this review using guidance from repository custom instructions.
@@ -0,0 +1 @@
../../../prompts/what-context-needed.prompt.md No newline at end of file
Copy link

Copilot AI Feb 10, 2026

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.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../../prompts/refactor-plan.prompt.md No newline at end of file
Copy link

Copilot AI Feb 10, 2026

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.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../../prompts/context-map.prompt.md No newline at end of file
Copy link

Copilot AI Feb 10, 2026

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.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../../agents/context-architect.agent.md No newline at end of file
Copy link

Copilot AI Feb 10, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
---
agent: 'agent'
tools: ['codebase']
description: 'Ask Copilot what files it needs to see before answering a question'
---
Copy link

Copilot AI Feb 10, 2026

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.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +1 to +5
---
agent: 'agent'
tools: ['codebase', 'terminalCommand']
description: 'Plan a multi-file refactor with proper sequencing and rollback steps'
---
Copy link

Copilot AI Feb 10, 2026

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.

Copilot generated this review using guidance from repository custom instructions.
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.

2 participants