- Document intent, decisions, and contracts.
- Do not document what is obvious from code.
- Optimize for future maintainers.
- Architecture decisions
- Module boundaries
- Public APIs & contracts
- Business rules
- Non-obvious flows
- Trivial functions
- Framework behavior
- Generated code
- Low-level implementation details
-
Explain:
- what the system does
- how it is structured
- how to run
- how to test
- Update docs together with code changes.
- Prefer concise, intent-driven docs.
- If intent is unclear, ask for clarification.