backtracking
Generate a structured backtracking scaffold to correct errors by rewinding to the last stable state, exploring alternative steps, and proposing a patched plan based on the failed step and constraints.
Instructions
Produce a recursive backtracking scaffold for error correction.
Args:
objective: Overall goal to satisfy.
failed_step: The step or subgoal that failed.
trace: Optional reasoning trace leading to the failure.
constraints: Guardrails or requirements to respect.
Returns:
Structured prompt that rewinds to last stable state, explores
alternatives, and proposes a patched plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| objective | Yes | ||
| failed_step | Yes | ||
| trace | No | ||
| constraints | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |