Maintaining Docs as Code
Quick start
Collect or infer:
- •Documentation format (Markdown, AsciiDoc, RST)
- •Repository structure and branching strategy
- •Build tooling (static site generator, linter)
- •Review and approval workflow
- •Deployment target (static hosting, docs platform)
Then produce output using TEMPLATES.md. Validate with RUBRIC.md.
Workflow
- •Define documentation file structure and naming conventions.
- •Configure linting and validation in CI.
- •Set up build pipeline for documentation site.
- •Establish review workflow (PR requirements, reviewers).
- •Configure deployment automation.
- •Document the contribution process.
- •Run the rubric check. Revise until it passes.
Degrees of freedom
- •Medium: Tooling choices can vary based on ecosystem.
- •Allowed variation: Static site generator, hosting platform, and CI system may vary as long as rubric passes.
State awareness
- •If documentation is in a monorepo, configure selective builds.
- •If multiple contributors, establish style enforcement.
- •If translations exist, handle localization workflow.
- •If versioned docs needed, configure version branches or directories.
Failure modes to avoid
- •No automated validation (broken links, invalid syntax)
- •Missing contribution guidelines
- •Build failures not blocking merge
- •No preview environment for review
- •Documentation and code changes in separate PRs without linking
References
- •Templates: TEMPLATES.md
- •Rubric: RUBRIC.md
- •Examples: EXAMPLES.md
- •Tooling patterns: reference/docs-tooling.md