Software → Software Design
Code Documentation
Documentation kept close to source code to explain APIs, intent, constraints, and non-obvious decisions.
Code Documentation
Code documentation explains how to use software and why important implementation decisions exist. It includes API comments, examples, module guides, setup instructions, and notes about invariants or surprising constraints.
What to document
Prefer documenting public contracts, intent, assumptions, edge cases, and operational consequences. Avoid comments that merely restate syntax. Documentation should evolve with the code and be testable where practical through executable examples or documentation builds.