Maintain the documentation
Purpose
Create or update accurate pages without duplicating volatile facts, exposing secrets, breaking navigation, or confusing historical and current systems.
Prerequisites and impact
Read the evidence model, current inventory, affected service page, workflow, and relevant scripts. Documentation edits do not authorize live infrastructure changes. Preserve unrelated work.
Choose the content type
| Need | Type | Location |
|---|---|---|
| Learn by doing | Tutorial | docs/tutorials/ |
| Complete a task | How-to/runbook | docs/operations/ |
| Look up exact facts | Reference | docs/current/, docs/reference/, service pages |
| Understand architecture | Explanation | docs/current/index.md and focused explanations |
| Preserve rationale | ADR | docs/decisions/ |
| Preserve superseded state | History | docs/history/ or a clearly marked compatibility page |
Add or update a service page
- Confirm the service in the service catalog.
- Record lifecycle, owner, criticality, recovery priority, verification date, version/image, host/runtime user, network, dependencies, listeners, paths, data, logs, and secret locations.
- Document clean reconstruction, configuration, start/stop/status/logs, upgrade, backup, restore, validation, rollback, security, monitoring, and symptom-based troubleshooting.
- Use commands observed in scripts or read-only live checks. Include expected results.
- Link volatile inventory facts rather than copying them.
- Link primary upstream documentation.
For a Podman/Quadlet service, also record:
/home/podsvc/.config/containers/systemd/<name>.container;/opt/podman/config/<name>/;/opt/podman/env/<name>.envwithout values;/opt/podman/volumes/<name>/;- networks, container UID/GID ownership, high ports, Caddy route, and backup.
Add or update a VM or LXC
- Run
qm config <VMID>orpct config <CTID>throughssh pvessh. - Record ID, name, lifecycle, resources, disks, bridge/VLAN, startup, guest type, ownership, criticality, recovery priority, and evidence date.
- Add the canonical row to current inventory.
- Create a separate page only when the guest has enough operational detail to justify it; otherwise link to its service page.
- Update dependencies, network, backup, and service catalog when affected.
Add network, DNS, ingress, storage, or hardware facts
- Validate from the authoritative system.
- Update the single canonical table: network, inventory, or hardware.
- State confidence and date.
- Add a runbook or ADR when change procedure or rationale matters.
- Never infer a current value from a historical export.
Document a change without secrets
- State the purpose, approved window, impact, and rollback.
- Record names and paths, never values.
- Redact exports using configuration redaction.
- Capture commands and expected results without unrestricted
env,inspect, database dumps, or private configuration. - Record the result as an observation, not conversational narration.
Diagrams and screenshots
- Update the editable source when available.
- Verify every label against the canonical inventory.
- Remove credentials, tokens, cookies, account names, public IPs when unnecessary, and metadata.
- Use SVG for diagrams and WebP/PNG for screenshots.
- Add useful alt text; do not rely on color alone.
- Prefer first-party documentation images or locally captured, redacted screenshots. Record source URL, retrieval date, license, and modifications in the image source register.
- Caption generic or older UI examples so readers do not mistake their values for current KH3 configuration.
- Keep old diagrams only under clearly historical context.
Update navigation
- Add the source path once in
mkdocs.yml. - Use visible lifecycle labels such as “Historical”.
- Update inbound links before renaming a page.
- Prefer a compatibility page when an established URL changes.
- Run QA to detect missing, duplicate, or unintentionally omitted pages.
Build and review
python3 scripts/docs_qa.py
mkdocs build --strict
git diff --check
git status --short --branch
Inspect site/index.html, current architecture, inventory, the changed
runbook/service, history, and navigation. Never stage site/.
Rollback and troubleshooting
Use git restore <path> only for a file whose changes are known to be
disposable. Do not use a broad reset in a dirty worktree.
| Symptom | Remedy |
|---|---|
| Broken relative link | Correct it relative to the source page and rerun QA |
| Duplicate H1/nav entry | Keep one canonical title/entry and link to it |
| Omitted page | Add it to nav or the explicit historical exclusion policy |
| Conversational agent prose | Convert it to fact, procedure, warning, incident, ADR, or unverified item |
| Strict build warning | Treat it as failure; fix the source or navigation |