SSOT consolidate
One fact gets one home, and every other place references it. References do not drift; copies do. This edits artifacts, so it starts read-only and changes nothing until the user approves the plan.
Scope
A fact whose copies span mixed surfaces (code constants, config, CI, scripts and docs together), or only code and config. When every copy lives in docs, that is docs-audit's job: it already finds duplication across docs and keeps one canonical owner.
Not for
- Duplication confined to docs, and checking docs against the code they describe: use
docs-audit.
- Agent instruction files: use
agent-instructions.
- Ongoing upkeep. This is a one-time repair of a scattered state; once the fact has one home, leave it.
Workflow
- Name the one fact in scope: the specific value, spec, decision or definition, not the whole document.
- Audit read-only. Enumerate every occurrence across the given files and platforms.
- Search again by a second method (a different term, a synonym, another tool) and confirm it finds nothing the first pass missed.
- Classify each hit as exact copy, paraphrase, partial, stale or contradictory.
- Pick the canonical home: the most authoritative and most maintained location, closest to where the fact changes. Do not promote a weak copy for convenience; if none qualifies, propose extracting a new home. Justify the choice in one line.
- Choose an action per non-canonical hit: dedupe (redundant), reference (docs link to the home, code imports it, config reads it) or reconcile (it disagrees and needs a human call).
- Report before editing: a table of location, kind and action; the canonical home; unique details that must be folded into it; contradictions needing a decision; the exact edit plan.
- Ask for explicit approval. Without it, stop at the report.
- After approval, make the canonical home complete and current, folding in any detail that lived only in a copy.
- Reconcile contradictions in the canonical home first. When the right value is unclear, confirm it before replacing anything.
- Replace each copy with a live reference: a link or "see " in docs (a transclude where the platform has one), an import or include in code, a shared read in config.
- Remove the redundant text. Where removal would strand a reader, leave a one-line pointer.
Rules
- No scatter found means no change. An empty result is valid; never invent drift to justify an edit.
- The audit is read-only. Do not edit, move or delete before approval.
- Never decide a contradiction silently. Report conflicting values as a separate list from plain duplicates.
- A detail present only in a non-canonical copy moves into the home before that copy is cut. Nothing is lost.
- Do not consolidate across a trust or permission boundary (private to public, customer-facing to internal) without explicit confirmation.
- Edit per occurrence, never a blanket replace. Confirm each target exists first and report a MISS when it does not, never a silent no-op.
- Move code structurally with language-aware tools or the editor's refactor, not text rewrites.
- Where a platform cannot link back, prefer a reference over deletion.
Before finishing
- The audit was reported and approved before any edit, unless the run stayed read-only.
- The canonical home holds the complete, current fact alone.
- Every former copy references it and each reference resolves.
- Report what was consolidated, where the home is, what was only audited, and what still needs a human decision.