| name | ctx-drift |
| description | Detect and fix context drift. Use to find stale paths, broken references, and constitution violations in context files. |
Detect context drift at two layers: structural (stale paths,
missing files, constitution violations) via ctx drift, and
semantic (outdated conventions, superseded decisions,
irrelevant learnings) via agent analysis. The semantic layer is
where the real value is: the CLI cannot do it.
When to Use
- At session start to verify context health before working
- After refactors, renames, or major structural changes
- When the user asks "is our context clean?", "anything
stale?", or "check for drift"
- Proactively when you notice a path in ARCHITECTURE.md or
CONVENTIONS.md that does not match the actual file tree
- Before a release or milestone to ensure context is accurate
When NOT to Use
- When you just ran
/ctx-status and everything looked fine
(status already shows drift warnings)
- Repeatedly in the same session without changes in between
- When the user is mid-flow on a task; do not interrupt with
unsolicited maintenance
Usage Examples
/ctx-drift
/ctx-drift (after the refactor)
Execution
Drift detection has two layers: structural (programmatic) and
semantic (agent-driven). Always do both.
Layer 1: Structural Checks
Run the CLI tool for fast, programmatic checks:
ctx drift
This catches dead paths, missing files, staleness indicators,
and constitution violations. These are necessary but insufficient:
they only detect structural problems.
Layer 2: Semantic Analysis
After the structural check, read the context files yourself and
compare them to what you know about the codebase. This is where
you add real value: the CLI tool cannot do this.