Why this rule
An agent that reads a context file describing the wrong stack makes confident mistakes — wrong build commands, wrong test paths, wrong edit scope. Drift is uniquely corrosive: the file still reads as authoritative, so the agent trusts a stack, command, or boundary that no longer matches the repo and acts on it without hesitation.What triggers it
Charter compares the context file’s stated tech stack and commands against manifest files it can observe in the repo. The finding fires when:- The stated stack names a language or framework but no corresponding manifest exists (
package.json,go.mod,Gemfile,pyproject.toml,Cargo.toml, etc.) - The stated verification command does not appear in any task runner config Charter can find (
moon.yml,Makefile,package.jsonscripts,Justfile) - Declared off-limits paths reference directories that do not exist in the repo
Examples
- Failing
- Passing
AGENTS.md
AGENTS.md
How to fix
Review each mismatch listed in the finding evidence and update the context file to reflect repo reality.1
Fix a stack mismatch
Update the stack declaration to match what manifests are actually present. If you removed a language, remove it from the context file; if you added one, add it. Charter looks for
go.mod, package.json, pyproject.toml, Gemfile, Cargo.toml, and similar.2
Fix a verification command mismatch
Confirm the stated command runs successfully from the repo root. Update it to match the actual task runner entry — or add the task to your runner config if it is genuinely missing.
3
Fix an off-limits path mismatch
Remove references to paths that no longer exist, or create the directory if the boundary is still intended. Phantom off-limits declarations confuse agents rather than protecting anything.
4
Confirm the finding clears
Run
charter explain with AE-CTX-002 (or charter doctor) after any update to verify the mismatch no longer appears.Score impact
Medium (−4 per finding). No hard cap — caps are reserved for raw-secret and Blocker findings. See Scoring and caps.
Edge cases
An old date alone never fires this rule. AE-CTX-002 fires on factual mismatches — stack claims with no manifest evidence, commands absent from any task runner config, off-limits paths that map to no real directory — not on timestamp staleness.Related rules
AE-CTX-001
Context file must exist and be within budget.
AE-AUTO-001
Verification command must be discoverable.
AE-CTX-006
Emphatic directive density degrades adherence.