maintaining-agent-context
Maintaining Agent Context
Audit, improve, and maintain the whole context architecture a repository presents to coding agents: every instruction file, every conditional rule, every linked doc, and the pointers that connect them. The unit of analysis is the architecture, not a single CLAUDE.md - most real problems (duplication, contradiction, wasted always-loaded tokens) live between files, not inside one.
The audit is read-only until the user approves changes: Phases 1-4 read files and
may use local read-only shell tools to inspect files and metadata. They never execute
project commands or other repository-controlled commands - no builds, deploys,
migrations, cleanups, tests, linters, hooks, or even --help invocations, since any of
those can run repository-controlled code. Configuration, package scripts, and CI
definitions are the source of truth for what commands exist, and reading them is always
safe.