Docs-as-code updates with agents after every feature
Docs drift when features ship without a docs step. Agents can update README, changelog, and ADRs in the same PR, but only if prompts demand truth against the.
Docs drift when features ship without a docs step. Agents can update README, changelog, and ADRs in the same PR, but only if prompts demand truth against the diff. Aspirational marketing in the docs is worse than a missing section.
The trap is inventing flags and APIs that “should” exist. Future agents will trust that README as truth and build on fiction.
Docs in the same PR, claims tied to code

Workflow
- Put docs in the definition of done. User-facing README or changelog for behavior changes; ADR when a non-obvious decision is new.
- List claims in the docs diff. Every new sentence that asserts behavior needs a pointer to code or a command.
- Run link and doc checks. Fix broken anchors in the same PR.
- Review for honesty. Do not document future work as shipped. Match tense to reality.
- Delete stale docs with removals. Orphan docs become prompt injection for the next agent.
- Spot-check one claim in review. That single habit catches most hallucinations.
Stop gates: when docs are lying

Stop gates before you ship
- Follow-up that never comes. Docs must land with the feature PR or the feature is not done.
- Intent as behavior. “Will support X” written as “supports X.” Rewrite or cut.
- Contradictory sources. README and wiki disagree. Pick one source of truth in-repo.
- Invented flags. Agent wrote CLI options from memory. Verify against code or delete.
Checklist before you call docs done

Ship checklist
Practical defaults:
- ADRs live in-repo, versioned, linked from the PR. Avoid slide decks as the only record.
- Prefer changelog bullets that name user impact.
- Periodic stale-doc sweeps are fine; humans confirm deletions.
Bottom line
Docs-as-code with agents works when every claim has evidence and removals delete their docs in the same PR. Keep the README boring and true. For measuring whether agents actually keep that bar, use a fixed eval task pack that includes a docs-only task.
Share