| name | ship:deviation-rules |
| description | Use when plan diverges from reality during build execution โ provides 3 escalation levels for handling failures |
| effort | medium |
| user-invocable | false |
Deviation Rules
During build execution, follow these rules when the plan does not match reality.
Rule 1 โ Fix and Continue
Trigger: A file path, function name, minor implementation detail, or missing dependency in the plan is wrong or outdated.
Action: Make the correct change (fix the path, install the dependency, adjust the detail). Continue executing the next task.
Examples:
- Plan says
src/auth/login.ts but the file is src/auth/auth.ts โ fix it, move on.
- Plan calls
import bcrypt but bcrypt isn't installed โ install it, move on.
Rule 2 โ Fix with Limits
Trigger: The <verify> command for a task fails after implementation.
Action: Debug systematically, then fix and re-verify. Maximum 3 attempts. Track each attempt.
Debugging protocol (before each fix attempt):
- Read the error โ full output, stack trace, exit code. The error message often contains the answer.
- Trace the cause โ where does the bad value originate? Follow it backward, not forward.
- One fix at a time โ change one thing, re-verify. Never batch multiple fixes.
If verify still fails after the third attempt, escalate to Rule 3.
If each fix reveals a new problem in a different place: This is not a single bug โ it's an architectural mismatch. Skip directly to Rule 3.
Do not: Skip the verify step. Do not proceed to the next task with a broken current task. Do not guess โ read the error first.
Rule 3 โ Stop and Report
Trigger: An architectural conflict, persistent verification failure (3 attempts exhausted), or any issue that requires fundamentally rethinking the approach.
Action:
- Stop execution immediately
- Leave the feature status as
building in CONTEXT.md
- Output
## CHECKPOINT REACHED with a clear explanation and recommendation
Signals:
- Plan assumes REST API but codebase uses GraphQL โ replanning needed, not improvisation
- Each fix attempt reveals a new problem in a different place โ architectural mismatch
- Fix requires "massive refactoring" to implement โ wrong approach, not wrong code