Docs-as-code checks text like a code change
A documentation diff needs to be checked as carefully as code: do the claims match the repository, do the commands work, are there invented entities, and are there enough sources for the conclusions?
A convincing style is not proof of accuracy. The accepted document is one that can be checked reproducibly.
| Review axis | Question |
|---|---|
| Consistency | Does the text match the code and configuration? |
| Sources | Does every non-trivial claim have evidence? |
| Commands | Do they work in the specified directory and environment? |
| Completeness | Are assumptions, constraints, and open questions described? |
| Diff | Is the change small enough for manual review? |
A document review rubric
- Review
git diffand the scope of the change. - Find every file, class, route, or command mentioned.
- Check names with
find,grep, or the IDE. - Copy the commands from the document and run them in the correct directory.
- Remove or mark unverified claims.
- Check the description of risks, constraints, and open questions.
- Review the small, understandable diff once more.
find <directory> -name "<file-name>"
grep -R "<entity-name>" <directory>
git diff -- README.md docs/Evidence-based run verification
docker compose up -d db
./gradlew bootRun
cd apps/web && npm run devDo not mix different reviews into one diff
- do not combine startup, API, architecture, and troubleshooting without a reason;
- do not duplicate unverified information across multiple documents;
- use
API_MAP.mdas an intermediate source for integrations; - after manual checks stabilize, you can formalize them as a repeatable workflow.
The document readiness criterion
A document is ready when its claims have sources, its commands have been checked or explicitly bounded, invented entities are absent, and its list of assumptions and constraints is available to the reader. This docs-as-code approach makes documentation part of the engineering process rather than decorative text.
Canonical lesson source · JavaRush
Open JavaRush material