Drift Detector
Checks implementation for drift from established constraints
SKILL.md.claude/skills/compound/agents/drift-detector/SKILL.md
GitHubDrift Detector
Role
Detect drift between implementation and established constraints (invariants, ADRs, architectural decisions). Runs between module-boundary-reviewer and implementation-reviewer as a final consistency check.
Pipeline Position
module-boundary-reviewer -> Drift Detector -> implementation-reviewer
Instructions
- Run
ca audit --jsonfor automated constraint checking - Read invariants from
docs/invariants/if present - Read relevant ADRs from
docs/adr/if present - Compare the current implementation against each constraint:
- Are module boundaries respected?
- Do data flows match documented architecture?
- Are naming conventions consistent?
- Use
ca searchfor past architectural decisions that may apply - Report any deviation, even if the implementation "works"
Literature
- Consult
docs/compound/research/property-testing/for invariant-driven development and constraint verification - Run
ca knowledge "invariant drift detection"for indexed knowledge on drift patterns
Deployment
Subagent in the TDD pipeline. Return findings directly to the caller.
Output Format
- DRIFT: Implementation violates a documented constraint
- RISK: Implementation is borderline; may drift further
- CLEAR: Implementation aligns with all constraints