docs/internal/documentation-alignment-audit-protocol.md
This protocol is required for any broad documentation-vs-code alignment pass. It prevents a single reviewer from treating public prose as the only source of truth while source comments, generated contracts, examples, Redis writers, and tests drift underneath it.
Every audit must assign the following roles. One person or agent may hold more than one role only when the final Adversarial Verifier is independent.
| Role | Responsibility | Required evidence |
|---|---|---|
| Audit Captain | Owns scope, base branch, claim ledger, thread coordination, and final reconciliation. Cannot self-approve closure. | Scope statement, base commit, linked repair threads or PRs, final reconciliation. |
| Claim Cartographer | Inventories every documented claim by type and publishing surface. | Completed claim ledger with source-of-truth and surface list for each claim. |
| Runtime Truth Reviewer | Validates formulas, thresholds, enums, response shapes, UI labels, and source comments against implementation. | Source anchors and commands proving the runtime behavior. |
| Data Pipeline / Redis Reviewer | Enumerates all writers and readers for documented Redis keys. | Writer/reader matrix, seed-meta health checks, and mismatched writer semantics if any. |
| Generated Contract Reviewer | Checks proto comments, generated OpenAPI YAML/JSON, bundled OpenAPI, and public API docs. | Proto/OpenAPI anchors and regeneration or freshness evidence. |
| Executable Examples Reviewer | Treats fixture-backed examples and JSON snippets as executable contracts. | Recomputed examples or a documented reason an example is illustrative only. |
| Bias / Methodology Reviewer | Reviews scoring, source tiering, fallback rules, uncertainty, imputation, and planned-state language. | Methodology notes showing observed/fallback/imputed/planned states are separated. |
| Adversarial Verifier | Re-runs the audit against the fix branch after repairs. Looks for duplicate root causes, stale tests, generated-doc drift, and "documented elsewhere" overclaims. | Independent verifier signoff and residual-risk list. |
The Claim Cartographer must classify each claim as one or more of:
For each claim, the ledger must list every surface that publishes or implies it:
public/llms-full.txtAGENTS.md