Rule 2 — Inline docstrings and generated documentation¶
Requirement¶
All source MUST carry complete API documentation inline:
- Rust:
///doc comments on every public item, with# Errorsand# Panicssections where applicable.cargo docMUST build with zero warnings. - TypeScript: TSDoc on every exported symbol.
- Python (automation): Google-style docstrings (
Args:,Returns:,Raises:) with PEP 484 type annotations.
Documentation MUST be generated from source and hand-written architecture notes. No static
per-module markdown mirror and no manually maintained documentation index are stored in the
repository. All documentation builds MUST use the command declared by the repository environment
and succeed with zero warnings and zero errors. DarkFactory declares
bun run scripts/build-docs.ts, which stages its repository sources, invokes ProperDocs in strict
mode, and deploys the result automatically to GitHub Pages.
Rationale¶
A committed documentation mirror creates two sources of truth that drift. Generating the site from the canonical files means the published pages and the repository content cannot disagree.
Enforcement¶
.github/scripts/docs_hooks.pymaps canonical files to virtual pages at build time; the docs build is a required status check inci.yml.properdocs.ymlconfigures the strict build.
Exceptions¶
None.
Change control¶
Docs-site owns generated presentation, selection of the installed sites, and the mandatory-rule
projection. The Python hooks are port-source, not an extension target, per cli-release and PRD
section 10.