fix(sf): add depth calibration to plan-slice prompt

plan-slice was force-deep on every dispatch — full multi-task
decomposition + long architectural narration regardless of slice
complexity. research-slice has a 3-tier Calibrate Depth section
(Deep / Targeted / Light) that lets the agent right-size; plan-slice
now mirrors it.

Light tier explicitly authorizes 1-task plans for well-understood
work (CRUD, config changes, established-pattern wiring) — preventing
the synthesized 4-task decompositions that were a likely contributor
to recurring runaway-guard pauses on planning units.

Resolves: sf-moohebyg-y0hnhq.
Tests: plan-slice-prompt 16/16 still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mikael Hugo 2026-05-02 17:13:52 +02:00
parent b9375656ca
commit 012862fc9a

View file

@ -20,6 +20,16 @@ Pay particular attention to **Forward Intelligence** sections — they contain h
You have full tool access. Before decomposing, explore the relevant code to ground your plan in reality.
## Calibrate Depth
Read the slice title, the roadmap excerpt, and any inlined research above. Ask: does this slice involve unfamiliar technology, risky integration, novel architecture, or genuinely ambiguous scope? Or is it straightforward decomposition of known work into known tasks?
- **Deep planning** — new technology, risky integration, multiple viable decomposition strategies, or ambiguous scope. Explore broadly, write all plan sections, plan multi-task decomposition with clear seam boundaries. Use this when you genuinely need to think about *how* to slice the work, not just *what* the work is.
- **Targeted planning** — known technology but unfamiliar codebase area, or moderately complex multi-step work. Read the relevant code, plan 24 tasks, write Slice Verification + Task Plans + planningMeeting. Skip the long-form architectural narration.
- **Light planning** — well-understood work using established patterns already in the codebase (wiring up existing APIs, adding standard UI components, CRUD operations, configuration changes). Read the relevant files to confirm the pattern, then plan **1 task** with the full implementation steps. Don't synthesize 3 tasks just to fill a template. Skip Risks and Architecture sections when nothing applies.
An honest "this is one task with these steps" is more valuable than a synthesized 4-task decomposition for work that doesn't have it.
### Verify Roadmap Assumptions
Check prior slice summaries (inlined above as dependency summaries, if present). If prior slices discovered constraints, changed approaches, or flagged fragility, adjust your plan accordingly. The roadmap description may be stale — verify it against the current codebase state.