AI writing works only when the workflow separates fast drafting from forced evidence, deterministic checks, and ownership.
The lifecycle runs source scan, design, draft, deterministic validation, agent smoke test, owner review, publish, and freshness monitoring as a loop.
Constrain the draft prompt to use only provided sources, forbid inventing commands, APIs, versions, or owners, and require a final "unknowns" section.
Run deterministic checks (links, types/build, OpenAPI lint/diff, code blocks, frontmatter, command-vs-package.json) before human review.
Smoke-test the document by asking an agent to use it without editing files, which catches drafting failures like hallucination, over-explanation, and date errors.
Writing documentation with AI is effective only when the workflow separates drafting from validation.
The agent can draft quickly, but the team must force evidence, checks, and ownership.
## Source ScanRead:- code: `src/api/**`, `app/api/**`- specs: `openapi/**`, `schema/**`- project rules: `AGENTS.md`, `CLAUDE.md`, `.claude/rules/**`- skills: `.agents/skills/**/SKILL.md`- official docs: [links]Rules:- Do not invent commands.- Do not infer current versions without source documents.- Mark unknowns explicitly.
Write a documentation draft using only the sources below.Do not invent commands, APIs, versions, owners, or policies.Sources:- [files and links]Output:- frontmatter- tables and code blocks where useful- completion criteria- validation commands- a final "unknowns" section
Assume you need to edit an API route in this repository.Which files should you inspect and which validation commands should you run?Do not modify files.