| name | flywheel-drift-check |
| description | Check if the codebase has drifted from the implementation plan. |
Run a strategic drift check. $ARGUMENTS
-
Read the plan document path from .pi-flywheel/checkpoint.json (planDocument field). If not found, scan docs/plans/ for the most recent plan file.
-
Read the current bead statuses: br list --json via Bash.
-
Run bv --json via Bash for graph analysis (cycles, orphans, bottlenecks).
-
Use Agent(Explore) to compare current code state against the plan:
- Which planned changes have been implemented?
- Which are no longer relevant given code changes since the plan was written?
- Have any new requirements emerged that the plan doesn't cover?
-
Display a drift report:
✅ On track: N beads
⚠️ Potentially stale: N beads
❌ Blocked: N beads (dependency issues)
🔄 New opportunities: (not in original plan)
-
Ask: "Would you like to update the plan to address the drift? (This will trigger a polish loop)"
-
If yes, call flywheel_approve_beads with action: "polish" via the agent-flywheel MCP server.