detect-driftlisted
Install: claude install-skill adnanmokhtar/refract
# Skill: detect-drift
## Purpose
Detect deviations between the codebase's current state and its intended state (the gold-standard inventory in `_extracted-idioms.md` + `ai/conventions.md` + `ai/architecture.md`). Emit one finding per detected fingerprint, with `<path:line>` evidence. The finding is then routed by `/align-plan` into a phase and fixed by the per-finding loop.
This skill is the **detector** half of alignment. The fix half is `find-and-align`.
## When to use
- Dispatched by `/align-scan` for the initial sweep.
- Dispatched by `/align-phase` at DETECT step (re-verify a finding's fingerprint is still present before fixing).
- Dispatched by `/align-final --re-scan` to surface new drift since the last scan.
- Dispatched by `/align-fast` for both initial scan + per-row re-detect.
## Inputs (precise contract)
| Input | Source | Required |
|---|---|---|
| Codebase root | Orchestrator | YES |
| `PROJECT_KIND` | `_extracted-codebase.md § Gold standards` | YES |
| `_extracted-idioms.md` summary (≤ 5K tokens) | Built by orchestrator; passed by reference | YES |
| `ai/conventions.md` | Project | NO (drift class skipped if missing) |
| `ai/architecture.md` | Project | NO (drift class skipped if missing) |
| Per-class detector tool name | `_extracted-codebase.md § Gold standards` | YES (per class) |
| Class filter (optional) | Caller flag | NO (default: all 11 universal + stack-conditional) |
| Scope filter (optional) | Caller flag | NO (default: full repo) |
| Max-find