feat: add node repair operator for autonomous task failure recovery (#1016)
When a task fails verification, the executor now attempts structured repair before interrupting the user: - RETRY: adjusts approach and re-attempts - DECOMPOSE: splits the task into smaller verifiable sub-tasks - PRUNE: skips with justification when infeasible Only escalates to the user when the repair budget is exhausted or an architectural decision is required (Rule 4). Configurable via workflow.node_repair (bool) and workflow.node_repair_budget (int). Defaults to enabled with budget=2. Inspired by the NODE_REPAIR operator in STRUCTUREDAGENT (arXiv:2603.05294). Co-authored-by: buftar <buftar@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -287,7 +287,22 @@ Orchestrator parses → presents to user → spawns fresh continuation with your
|
||||
</step>
|
||||
|
||||
<step name="verification_failure_gate">
|
||||
If verification fails: STOP. Present: "Verification failed for Task [X]: [name]. Expected: [criteria]. Actual: [result]." Options: Retry | Skip (mark incomplete) | Stop (investigate). If skipped → SUMMARY "Issues Encountered".
|
||||
If verification fails:
|
||||
|
||||
**Check if node repair is enabled** (default: on):
|
||||
```bash
|
||||
NODE_REPAIR=$(node "./.claude/get-shit-done/bin/gsd-tools.cjs" config-get workflow.node_repair 2>/dev/null || echo "true")
|
||||
```
|
||||
|
||||
If `NODE_REPAIR` is `true`: invoke `@./.claude/get-shit-done/workflows/node-repair.md` with:
|
||||
- FAILED_TASK: task number, name, done-criteria
|
||||
- ERROR: expected vs actual result
|
||||
- PLAN_CONTEXT: adjacent task names + phase goal
|
||||
- REPAIR_BUDGET: `workflow.node_repair_budget` from config (default: 2)
|
||||
|
||||
Node repair will attempt RETRY, DECOMPOSE, or PRUNE autonomously. Only reaches this gate again if repair budget is exhausted (ESCALATE).
|
||||
|
||||
If `NODE_REPAIR` is `false` OR repair returns ESCALATE: STOP. Present: "Verification failed for Task [X]: [name]. Expected: [criteria]. Actual: [result]. Repair attempted: [summary of what was tried]." Options: Retry | Skip (mark incomplete) | Stop (investigate). If skipped → SUMMARY "Issues Encountered".
|
||||
</step>
|
||||
|
||||
<step name="record_completion_time">
|
||||
|
||||
Reference in New Issue
Block a user