Context Curation
Decide whether staged changes have made a repository's agent context files wrong
or incomplete, and say exactly what to add or remove.
Run after staging and before committing — most usefully when a change
introduces a convention, alters a public interface, or deletes something the
context files still describe.
Context Files
Scan every location a project might be using, not just the one you expect:
| Platform |
Locations |
| Claude Code |
.claude/, CLAUDE.md |
| Codex |
.codex/, codex.md |
| Cursor |
.cursor/, .cursorrules |
| Aider |
.aider/, .aider.conf.yml |
| GitHub Copilot |
COPILOT.md, .github/copilot-instructions.md |
| Generic |
AGENTS.md, AI.md, CONTEXT.md |
| Project docs |
docs/, architecture sections of README.md |
Workflow
Read the change. git diff --staged --stat for the shape, then
git diff --staged for the substance: new files and their purpose, modified
functions and interfaces, deleted code, changed contracts.
Read the context. Open every file found above and extract what it
currently claims — documented patterns, architecture decisions and their
rationale, API examples, project rules.
Cross-reference. Four things make a context file wrong:
- New pattern — the change establishes a convention nothing documents.
- API change — a public interface moved, grew, or changed meaning.
- Deprecated code — something was removed that context still instructs on.
- Stale reference — context names a file, function, or pattern that no
longer exists.
Recommend, in the format given by
references/output-format.md. Each
recommendation cites the staged change that motivates it.
Suggest; do not edit. The user decides what lands, and a diff they did not ask
for is harder to review than a list they did.
1---2name: context-curation3description: Checks whether staged changes should update CLAUDE.md or other agent context files. Use before committing.4---56# Context Curation78Decide whether staged changes have made a repository's agent context files wrong9or incomplete, and say exactly what to add or remove.1011Run after staging and before committing — most usefully when a change12introduces a convention, alters a public interface, or deletes something the13context files still describe.1415## Context Files1617Scan every location a project might be using, not just the one you expect:1819| Platform | Locations |20|---|---|21| Claude Code | `.claude/`, `CLAUDE.md` |22| Codex | `.codex/`, `codex.md` |23| Cursor | `.cursor/`, `.cursorrules` |24| Aider | `.aider/`, `.aider.conf.yml` |25| GitHub Copilot | `COPILOT.md`, `.github/copilot-instructions.md` |26| Generic | `AGENTS.md`, `AI.md`, `CONTEXT.md` |27| Project docs | `docs/`, architecture sections of `README.md` |2829## Workflow30311. **Read the change.** `git diff --staged --stat` for the shape, then32 `git diff --staged` for the substance: new files and their purpose, modified33 functions and interfaces, deleted code, changed contracts.34352. **Read the context.** Open every file found above and extract what it36 currently claims — documented patterns, architecture decisions and their37 rationale, API examples, project rules.38393. **Cross-reference.** Four things make a context file wrong:4041 - **New pattern** — the change establishes a convention nothing documents.42 - **API change** — a public interface moved, grew, or changed meaning.43 - **Deprecated code** — something was removed that context still instructs on.44 - **Stale reference** — context names a file, function, or pattern that no45 longer exists.46474. **Recommend**, in the format given by48 [references/output-format.md](references/output-format.md). Each49 recommendation cites the staged change that motivates it.5051Suggest; do not edit. The user decides what lands, and a diff they did not ask52for is harder to review than a list they did.