Your coding agent is following rules that are no longer true. Here is the fix.
Description and use
AGENTS.md can become stale, causing agents to run outdated commands. Adding a covers: line, a drift check in CI, and a verification checklist turns the file into a living document that automatically detects staleness and prevents false successes.
Problem
An instruction file (AGENTS.md) can become stale, causing an agent to run outdated commands and report success without actually executing the intended tests.
Outcome
Implementing a drift check and verification checklist turns a stale, silent instruction file into a living, verifiable document, preventing agents from executing outdated commands and ensuring accurate reporting.
Workflow
- Add a
covers:line to each agent-visible file listing the paths it describes. - Create a CI job (
scripts/check_doc_drift.sh) that compares the last commit time of each doc against the last commit time of the paths it covers, failing if the doc is older than a threshold. - Ensure CI uses
fetch-depth: 0to get full commit history. - When adding or modifying a rule, discard the current artifact or stash it, start a fresh session with the updated rules, re-run the task, and confirm the issue does not recur.
- Include a verification checklist in the instruction file to force manual confirmation of command, path, and test references.
Evidence
Your AGENTS.md says the tests run with npm test. Last month a teammate moved them behind a build step.
Give each agent-visible file a covers: line that lists the paths it describes. Then add a CI job that compares the last commit time of each doc against the last commit time of the paths it covers.
If you keep the existing artifact and continue, you are still operating in context polluted by the old system. The model may try to reconcile the new rule with the old work instead of applying it cleanly.
Add a verification checklist to the file
- Record date: 2026-10-09T01:56:01.629Z