Documentation Maintenance Contract
This document keeps docs updates consistent across humans and AI agents. Use it whenever runtime/compiler/grammar semantics change.
Documentation Maintenance Contract
This document keeps docs updates consistent across humans and AI agents. Use it whenever runtime/compiler/grammar semantics change.
Source-Of-Truth Priority
When conflicts exist, update in this order:
AINL_SPEC.md(normative language + execution model)RUNTIME_COMPILER_CONTRACT.md(runtime/compiler ownership and behavior contract)CONFORMANCE.md(what is shipped now)CHANGELOG.md(what changed and why)
Then update supporting docs (README.md, schemas, profiles, guides).
Required Update Set (Behavioral Changes)
For any semantic/runtime/compiler behavior change, update all applicable:
RUNTIME_COMPILER_CONTRACT.mdCONFORMANCE.mdCHANGELOG.mdREADME.md(entrypoint summary)
If IR/graph shapes change, also update:
reference/IR_SCHEMA.mdreference/GRAPH_SCHEMA.mdAINL_SPEC.md(if normative language changes)
If strict-mode behavior changes, also update:
AINL_SPEC.mdstrict guaranteeslanguage/grammar.mdquick-reference rules- profile docs (
reference/AINL_V0_9_PROFILE.md) when affected
Deep-Linking Standard
Prefer deep links for cross-doc navigation:
- Use section anchors when pointing to specific policy/contract clauses.
- Keep anchor text stable (avoid frequent heading rename churn).
- Ensure links are relative within
docs/(nodocs/...prefix from docs-internal links).
Compatibility Wording Standard
Use consistent terms:
- Canonical runtime:
RuntimeEngineinruntime/engine.py - Compatibility API:
ExecutionEngineinruntime/compat.py(re-exported byruntime.py) - Canonical semantics: graph nodes/edges
- Compatibility serialization:
legacy.steps
Avoid stale transitional phrasing when behavior is already shipped.
AI-Agent Handoff Checklist
Before ending a docs-heavy session:
- Agent implementation entrypoints:
BOT_ONBOARDING.md,OPENCLAW_IMPLEMENTATION_PREFLIGHT.md,tooling/bot_bootstrap.json— ensure any new agent-facing doc links these where applicable. - Verify cross-links from
DOCS_INDEX.md,README.md, and contract docs. - Confirm strict-mode wording is consistent across spec/contract/conformance.
- Add changelog entry for meaningful behavior/contract changes.
- Run lints/diagnostics for touched docs.
Automation commands:
- Full docs contract check (local/CI parity):
ainl-check-docs - Python entrypoint equivalent:
python scripts/check_docs_contracts.py --scope all - PR diff-aware mode (CI):
python scripts/check_docs_contracts.py --scope changed --base-ref origin/main - Local pre-commit install:
pre-commit install(runs docs contract checks before commit)
Scope Discipline
Not every code change needs every doc changed. Use this heuristic:
- Semantics changed? Update contract + conformance + changelog.
- Only implementation/internal refactor? Update changelog, and contract only if externally observable behavior/policy changed.
- No user-visible impact? Changelog optional unless release tracking requires it.
