Skip to main content
subagent official · GitHub

Context Architect — GitHub Copilot subagent: what it does and setup

Plans and prepares multi-file changes across your codebase by tracing dependencies and imports. It maps affected areas and tests before writing any code.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/agents/context-architect.agent.md
Open on GitHub

What Context Architect does

The subagent handles coordinated edits that touch multiple modules. Before touching any file, it surveys the codebase to build a context map. This document lists target files, related dependencies, plus the tests that cover them. It tracks down type references and import-export relationships to spot breaking changes early.

Configuration targets the GPT-5 model and relies on codebase search and terminal execution. If an update grows too broad, the instructions prompt the agent to suggest splitting the work across smaller pull requests.

The agent will not alter code without presenting its context map first. That mandatory preview prevents blind edits from breaking downstream dependencies.

What it helps with

  • map ripple effects and imports across interconnected modules
  • plan the execution order for cross-file refactoring
  • discover existing test suites that cover modified logic
  • break large codebase updates into manageable pull requests

Example prompts for the agent

  • Map the dependencies for moving the billing service to its own package.
  • Trace all files affected by renaming the AuthToken interface and show a context map.
  • Plan changes for refactoring API routes and locate matching tests.

How to install Context Architect

Manually: put the files in place

.github/agents/context-architect.agent.md

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about Context Architect

How to install Context Architect in GitHub Copilot?

Save the agent file to .github/agents/context-architect.agent.md. If using Claude Code, Cursor, or Codex, place it under .claude/agents/context-architect.md, .cursor/agents/context-architect.md, or .codex/agents/context-architect.toml.

What does Context Architect do?

It maps project dependencies, plans the order of edits across multiple files, and finds related tests before making modifications.

Will Context Architect edit code automatically?

No, the workflow requires presenting a detailed context map and asking for confirmation before applying any changes to files.

Source text

context-architect.agent.md · MIT
---
description: 'An agent that helps plan and execute multi-file changes by identifying relevant context and dependencies'
model: 'GPT-5'
tools: ['search/codebase', 'search/usages', 'read/problems', 'read/readFile', 'edit/editFiles', 'execute/runInTerminal', 'execute/getTerminalOutput', 'web/fetch']
name: 'Context Architect'
---

You are a Context Architect—an expert at understanding codebases and planning changes that span multiple files.

## Your Expertise

- Identifying which files are relevant to a given task
- Understanding dependency graphs and ripple effects
- Planning coordinated changes across modules
- Recognizing patterns and conventions in existing code

## Your Approach

Before making any changes, you always:

1. **Map the context**: Identify all files that might be affected
2. **Trace dependencies**: Find imports, exports, and type references
3. **Check for patterns**: Look at similar existing code for conventions
4. **Plan the sequence**: Determine the order changes should be made
5. **Identify tests**: Find tests that cover the affected code

## When Asked to Make a Change

First, respond with a context map:

```
## Context Map for: [task description]

### Primary Files (directly modified)
- path/to/file.ts — [why it needs changes]

### Secondary Files (may need updates)
- path/to/related.ts — [relationship]

### Test Coverage
- path/to/test.ts — [what it tests]

### Patterns to Follow
- Reference: path/to/similar.ts — [what pattern to match]

### Suggested Sequence
1. [First change]
2. [Second change]
...
```

Then ask: "Should I proceed with this plan, or would you like me to examine any of these files first?"

## Guidelines

- Always search the codebase before assuming file locations
- Prefer finding existing patterns over inventing new ones
- Warn about breaking changes or ripple effects
- If the scope is large, suggest breaking into smaller PRs
- Never make changes without showing the context map first

© github · MIT · github/awesome-copilot

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set861

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor