Skip to content

Add context-engineering collection#675

Open
vfaraji89 wants to merge 2 commits intogithub:mainfrom
vfaraji89:add-context-engineering-collection
Open

Add context-engineering collection#675
vfaraji89 wants to merge 2 commits intogithub:mainfrom
vfaraji89:add-context-engineering-collection

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

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>
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

Comment on lines +2 to +4
mode: 'agent'
tools: ['codebase']
description: 'Ask Copilot what files it needs to see before answering a question'
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The frontmatter uses mode: 'agent', but this repo’s prompt-file convention uses the agent: field (see instructions/prompt.instructions.md Frontmatter Requirements). Using mode may be ignored by tooling and cause the prompt to run under the wrong agent/mode. Replace mode with agent: 'agent' (and keep tools/description as-is).

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +4
mode: 'agent'
tools: ['codebase', 'terminalCommand']
description: 'Plan a multi-file refactor with proper sequencing and rollback steps'
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The frontmatter uses mode: 'agent', but this repo’s prompt-file convention uses the agent: field (documented in instructions/prompt.instructions.md). If mode isn’t recognized, the prompt may not run with the intended agent/tooling. Use agent: 'agent' instead of mode.

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +4
mode: 'agent'
tools: ['codebase']
description: 'Generate a map of all files relevant to a task before making changes'
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The prompt frontmatter uses mode: 'agent', but the repository conventions for .prompt.md use the agent: field (see instructions/prompt.instructions.md). To ensure consistent behavior across prompts and tooling, replace mode with agent: 'agent'.

Copilot uses AI. Check for mistakes.
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.

1 participant