yf-drift-check
Verifies CONTENT AGREEMENT across a repository's declared source-of-truth edges (implementation ↔ docs ↔ spec); never au
Verifies CONTENT AGREEMENT across a repository's declared source-of-truth edges (implementation ↔ docs ↔ spec); never authors, optimizes, restructures, or auto-fixes. On edit of a file matching the repo's DRIFT-CHECK.md manifest globs, dispatches an isolated, report-only sub-agent that checks each scoped edge under a strict evidence standard and returns PASS / FAIL / INCONCLUSIVE / CONFLICT.
At a glance
- Category:
utility - Invocation: auto (fires from its description conditions when relevant work appears)
- Requires tools: none (self-contained)
- Source:
SKILL.md·README.md
When it fires
a file covered by an approved DRIFT-CHECK.md manifest is created or modified; or the operator asks to check drift / verify the manifest is in sync; or a manifest is being bootstrapped on first install.
When to skip it
repos with no approved DRIFT-CHECK.md (silent no-op — no nag, no bootstrap on every edit); authoring or optimizing instruction files — skill-dir instruction files route to yf-skill-authoring (authoring conventions, a different axis from cross-edge agreement) and project-root CLAUDE.md / AGENTS.md route to yf-optimal-instructions (the project-root axis); any request to FIX rather than report drift. Distinguishing axis: yf-drift-check verifies that already-written artifacts AGREE across declared edges; yf-skill-authoring and yf-optimal-instructions WRITE and optimize instruction files. yf-drift-check never lists CLAUDE.md / AGENTS.md as nodes, so it is structurally silent on the project-root axis.
Prerequisites
- Claude Code (the skill loads as part of this repo's skill set).
- No CLI tools beyond what Claude Code provides (
depends-on-tool: []); no in-repo skill dependency (depends-on-skill: []). The verifier sub-agent uses only Read / Grep / Bash. - A repo opts in by authoring (or bootstrapping) an approved
DRIFT-CHECK.mdmanifest at its repo root. With no approved manifest the engine is a silent no-op.
Usage
Not user-invocable (user-invocable: false). It fires from the always-loaded companion rule
(protocols/DRIFT-CHECK-TRIGGER.md) when a file matching the active manifest's Trigger Scope
globs is created or modified. There are no subcommands. The operator may also invoke it
explicitly to bootstrap a manifest or run an on-demand check.
Scope boundary: drift-check verifies that already-written artifacts agree across declared
edges. Authoring/optimizing skill-dir instruction files belongs to skill-authoring;
project-root CLAUDE.md / AGENTS.md belong to optimal-instructions. drift-check never
lists those project-root files as nodes, so it is structurally silent on the project-root axis.
Behavior model
changed file
│
▼
read approved DRIFT-CHECK.md ──(none)──▶ silent no-op
│
▼
match changed path against Trigger Scope globs ──(no match)──▶ no-op
│
▼
dispatch drift-verifier sub-agent over the scoped edges (report-only, evidence standard)
│
├─ PASS ──▶ continue
├─ FAIL ──▶ main session resolves in the same pass
├─ INCONCLUSIVE ──▶ report to operator (never assume pass/fail)
└─ CONFLICT ──▶ a fixed authority is itself stale: halt, report to operator (never rewrite either side)
- Four manifest-driven check categories: cross-references, contracts, behavioral alignment, orphaned components. A fixed-authority (spec) node halts on conflict.
- No auto-fix. The verifier reports; the main session acts.
- Idempotent and side-effect-free as a verification pass.
Layout
skills/drift-check/
├── SKILL.md # engine: carved description, manifest detection, dispatch, check engines
├── README.md # this file
├── agents/
│ └── drift-verifier.md # isolated report-only verifier: scoped edges, evidence standard, PASS/FAIL/INCONCLUSIVE/CONFLICT
├── protocols/
│ └── DRIFT-CHECK-TRIGGER.md # always-loaded companion rule (installed to rules surface): the firing surface
├── spec/
│ ├── schema.md # the 7-section manifest schema + 6-term contract vocabulary (REQ-SCHEMA-*)
│ ├── checks.md # the 4 check-category semantics + evidence standard (REQ-CHECK-*)
│ └── engine.md # bootstrap contract, no-manifest=silent-no-op, dispatch boundary (REQ-ENGINE-*)
└── templates/
└── manifest.md # blank 7-section DRIFT-CHECK.md a repo fills in