Canonicalization Engine
Declare one SoT per concept in .ags/canonical.yml; detect and plan fixes for mirror drift.
What you will learn
- Author concepts
- canon_enforce
- canon_plan_fix
Prerequisites
Surface
| MCP | canon_get · canon_validate · canon_enforce · canon_drift · canon_plan_fix |
|---|---|
| Config | .ags/canonical.yml |
What this feature does
Each concept has one canonicalPath. Mirrors (docs) may reference it but must not diverge silently. canon_drift lists mismatches; canon_plan_fix proposes repairs.
Configuration
Wire these surfaces first: .ags/canonical.yml.. Treat them as the contract agents must not invent around.
schemaVersion: 1
concepts:
- id: versioning-config
label: Versioning policy
canonicalPath: .ags/versioning.yml
kind: config
mirrors:
- docs/AGENT_VERSIONING_PROTOCOL.md
graphArtifact: docs/canonical-map/latest.jsonHow to call it
Call these MCP tools through your AGS / tower-gov host — canon_get, canon_validate, canon_enforce, canon_drift, canon_plan_fix.. Prefer scan/get before validate/diff, and enforce only when the change set is ready.
- Add concept to .ags/canonical.yml
- canon_validate
- canon_drift
- canon_enforce
{
/* Example MCP call — fill args from schema_get / docs */
"tool": "canon_get",
"arguments": {}
}Plan a fix
When drift is real, plan before editing mirrors.
{ "conceptId": "versioning-config" }What success looks like
canon_enforce ok
canon_drift empty or accepted
Common failure modes
Two SoTs for one concept
Docs rewritten as authority
Missing graphArtifact update