Documentation Standards¶
How to write, format, and maintain documentation in the AutonomyOps ADK.
Canonical Source¶
This repository root (/) is the canonical source for AutonomyOps product and technical truth:
what the software does, how it is configured, what it ships, what guarantees it
makes. All other AutonomyOps surfaces are derivative — they position, summarize,
and link, but they do not restate canonical content.
Surface |
Role |
Authoring rule |
|---|---|---|
This docs repo root ( |
Canonical product / technical docs |
Author here when the content states what the software does, how to configure it, what it ships, or what it guarantees. CLI reference, quickstart, architecture, runbooks, release notes. |
|
Engineering-internal source material |
Author here when the content is engineering context not ready for customer sharing (Go symbol details, threat-model internals, in-flight commercial materials). Not built into the public site. Migration mechanics: |
|
Lighter public messaging |
Position the product, summarize the value proposition, and link to canonical docs. Do not restate technical claims independently. Source repo for companion PRs: |
Drift policy¶
Drift between the website (autonomyops.ai) and
canonical docs is a website bug, not a canonical docs bug. When a change
in this docs repo invalidates website copy, the canonical change lands here
first; a companion PR in the website source repo
autonomyops/autonomyops.github.io
follows in the same review cycle and is referenced from the docs PR description.
Required website-companion PR¶
If your docs-repo change updates a claim that the marketing website (autonomyops.ai) also makes, the PR description must:
Name the affected website page(s).
Link the companion PR in the website source repo
autonomyops/autonomyops.github.io(or explicitly state that the companion PR is already merged / not yet required because the website has not yet stated the claim).
A reviewer who finds a docs-repo PR that changes user-visible claims without a linked companion PR or an explicit not-required note must block on this rule.
Page Structure¶
Every documentation page must have YAML front matter:
---
title: "Page Title"
owner: "<team or person responsible for keeping this page current>"
last_verified: "YYYY-MM-DD"
source: "<relative path(s) in the repo where content originates>"
---
Required sections (adapt headings to page type):
Section |
Purpose |
|---|---|
Opening paragraph or |
One paragraph: what this page covers and why it exists |
Core content |
Interfaces, invariants, config keys, walkthrough steps, etc. |
|
Anti-patterns — explicit list of what NOT to do, and why |
|
Cross-links to related pages (bidirectional where applicable) |
Front Matter Fields¶
Field |
Required |
Notes |
|---|---|---|
|
Yes |
Shown in nav and browser tab |
|
Recommended |
Team or person responsible for keeping the page current |
|
Recommended |
ISO date when the content was last verified against code |
|
Recommended |
Relative repo path(s) where content originates |
|
Optional |
Used for |
File Naming¶
Rule |
Example |
|---|---|
Lowercase, hyphens only |
|
Match the nav slug |
Nav entry |
No spaces or underscores in new files |
|
Code Blocks¶
Always specify a language identifier:
```go
func Put(ctx context.Context, key string, val []byte) error { ... }
```
```bash
make build
```
```toml
[storage]
disk_ceiling_bytes = 10737418240
```
Fenced code blocks only — indented code blocks are forbidden (enforced by
MD046: style: fenced in .markdownlint.yml).
Smoke-Test Markers¶
The <!-- smoke-test --> HTML comment enables CI validation of documented shell commands.
A bash fenced block immediately following this marker (with at most blank lines between)
is extracted by scripts/ci/extract-smoke-commands.sh and executed during the tagged-release
command-smoke-test CI job (golang:1.22 container, no Docker, no external services).
Only mark commands that:
Are safe to run in a fresh Go container (
makeandgoare available)Do not require Docker, a running registry, or external services
Produce deterministic, non-destructive results
<!-- smoke-test -->
```bash
make build
**Do NOT mark commands that:**
- Start daemons or long-running processes
- Require Docker, a container registry, or network services
- Have side effects on shared infrastructure
- Depend on demo keys or pre-existing artifacts
If no annotated blocks are found across all docs, the smoke-test job passes with a
warning (soft pass). The first failed command in any annotated block is a release blocker.
## Admonitions
Use MkDocs Material admonitions for callouts. Available types:
```markdown
!!! warning "Title"
Warning text here — use for non-obvious gotchas.
!!! info "Title"
Informational note — use for tips and clarifications.
!!! danger "Title"
Danger / non-negotiable constraint — use for invariant violations and
security non-negotiables.
Use !!! danger for statements like “never bypass X” or “always require Y” that trace
to a named invariant.
Internal Links¶
Always use relative paths:
[Invariants](../architecture/invariants.md) ✓ relative path
[Invariants](invariants.md) ✓ same directory
[Invariants](/architecture/invariants/) ✗ absolute — breaks offline
[Invariants](https://example.com/architecture/) ✗ external URL for internal page
Bidirectional cross-links are required where pages reference each other
(e.g., if disk-ceiling.md links to invariants.md#inv-04, then invariants.md
should link to disk-ceiling.md).
Tables¶
Prefer Markdown tables over HTML. Table cells and heading lines are exempt from the
200-character line length limit (configured in .markdownlint.yml).
| Symbol | Signature | Description |
|---|---|---|
| `Put` | `func Put(ctx, key, value) error` | Stores a value under the disk ceiling. |
Generated vs Hand-Edited Content¶
Location |
Status |
Rule |
|---|---|---|
|
Auto-generated |
Never hand-edit — regenerate with |
|
Hand-edited |
Always PR-reviewed; use |
All other |
Hand-edited |
May link to generated content; never embed it inline |
Adding a New Page¶
Create
docs/<section>/<page>.mdwith required front matter.Add the filename (without
.md) to the{toctree}indocs/<section>/index.md.If the page documents a Go package, add an entry to
docs/_meta/pkg-to-page.yaml.Run
make docsto verify the build succeeds, thenmake docs-freshnessandmake docs-coverage-gate.
Mermaid Diagrams¶
Pages containing Mermaid diagrams must include the air-gap warning admonition:
!!! warning "Mermaid diagrams require JavaScript"
Diagrams on this page use [Mermaid](https://mermaid.js.org/) rendered via
`sphinxcontrib-mermaid`. They require JavaScript to be enabled and, in
non-air-gapped environments, an outbound connection to `cdn.jsdelivr.net`
(pinned to mermaid.js 10.2.0 via `mermaid_version` in `docs/conf.py`).
In air-gapped deployments, host `mermaid.min.js` locally and update
`mermaid_version` to point to the local path.
Use the default Mermaid theme. Custom hex colours are reserved for trust-boundary
diagrams (e.g., style A fill:#e8f5e9).
Parameterization¶
This documentation was structured from the Edge Capability Workplan (v0.6). When adapting for a different capability, substitute these placeholders:
Placeholder (in docs) |
Replace with |
|---|---|
|
Your daemon binary name |
|
Your control CLI name |
|
Your capability slug |
|
|
|
|
|
Your capability name |
|
Your invariant set |
Linting Locally¶
# Markdown style check
npx markdownlint-cli2 --config .markdownlint.yml "docs/**/*.md"
# Full docs build (strict — promotes all warnings to errors)
make docs-lint
# Verify all mapped pages exist on disk
make docs-freshness
# Verify all packages are mapped
make docs-coverage-gate
Review Checklist for Doc PRs¶
Front matter complete:
title,owner,last_verified,sourceNo broken internal links (
make docs-lintpasses htmltest)If a new package was added:
pkg-to-page.yamlentry presentIf a new page was added:
{toctree}entry indocs/<section>/index.md<!-- smoke-test -->markers used only on safe, generic commands!!! dangerused for invariant violations and security non-negotiablesdocs/_generated/files not hand-editedCanonical-source rule: if the PR changes a user-visible claim the website also makes, PR description links the companion PR in the website source repo (or states none required).
Do Not Do¶
❌ Do NOT hand-edit
docs/_generated/— these files are regenerated bymake docs-gen❌ Do NOT use absolute URLs for internal links — they break offline and staged deployments
❌ Do NOT add indented code blocks — use fenced blocks (
MD046: style: fenced)❌ Do NOT put
<!-- smoke-test -->on commands that require Docker, a running service, or network access❌ Do NOT omit the Mermaid air-gap warning admonition on pages with Mermaid diagrams
❌ Do NOT restate canonical product/technical claims on marketing surfaces — link to the canonical docs-repo page instead
See Also¶
.markdownlint.yml— markdown linting configuration.htmltest.yml— link-checking configuration