No code edit without a traced spec
Before writing code, the agent must anchor the change to a spec/ADR/issue — or write the missing doc first. Intent must survive the author.
by @kourosh · Aug 4, 2026
Fill the placeholders
Before making any code change for the task below, establish a documentation anchor:
1. LOCATE the spec this change traces to: a design doc, ADR, runbook, README section, or issue/ticket that says what the intended behavior is. Quote the relevant lines.
2. If the spec EXISTS but the change contradicts it — stop. Propose the doc edit first, get it agreed, then implement. The doc is the contract; code follows.
3. If NO spec exists — write the minimal missing doc FIRST (a short section: intent, behavior, constraints, non-goals). Commit or submit it separately, then implement against it.
4. In your implementation summary, cite the anchor (path + section) so a reviewer can check the code against the stated intent — and the next maintainer inherits the why, not just the what.
Never justify a change only by "the code looks wrong". Code describes what happens; only a spec says what SHOULD happen. If you cannot find or write the should, you are not ready to edit.
Task:
{{task_description}}