Speckit.Solution

Solution phase. Decompose approved plan.md design slices into tasking artifacts and produce the solution_approved payload.

aborczuk updated 2mo ago
Claude CodeGeneric
View source ↗
---
description: Solution phase. Decompose approved plan.md design slices into tasking artifacts and produce the solution_approved payload.
model: opus
handoffs:
  - label: Begin Implementation
    agent: speckit.implement
    prompt: Solution phase complete. Begin implementation.
    send: false
---

## User Input

```text
$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Contract

Use scripts/speckit_solution_step.py only as a local scaffold and validation helper.

  1. Run the scaffold helper:
uv run python scripts/speckit_solution_step.py prepare-tasking --feature-id "$FEATURE_ID"
  1. Open tasks.md.

    • Treat plan.md and its ## Design Slices section as the authoritative source of solutioning.
    • Solve each design slice before writing tasks. Do not only restate the slice title or directive.
    • Decompose the plan slices directly into tasks.md.
  2. Fill tasks.md directly.

    • For each design slice, write the actual proposed solution first, then split that solution into the required tasks.
    • Anchor every non-human task to a concrete file or symbol seam from the plan.
    • Carry the solved slice, concrete symbols, and relevant constitution domains forward into the corresponding HUDs.
    • Preserve slice ordering and dependencies from plan.md.
    • Produce the actual number of tasks required by the plan; do not leave template placeholder content behind.
  3. Scaffold HUDs deterministically, then complete them generatively:

uv run python scripts/speckit_remake_huds.py prepare --feature-dir "$FEATURE_DIR" --rewrite-existing
  1. Fill every non-[H] huds/TXXX.md directly.

    • Load spec.json first; it contains the machine-readable key details of the approved plan/spec contract.
    • Treat the scaffold as deterministic seed data only.
    • For each task, write the slice-local proposed solution that this task will implement.
    • Attach each matched design slice to the task by translating the slice directive into task-specific obligations.
    • Name the exact file:symbol seams, touched symbols, relevant domains, constraints, and tests needed for that solution.
    • Write explicit task-local acceptance criteria into the HUD.
    • Replace every [FILL: ...] marker with repo-grounded, seam-specific implementation detail.
    • The final HUD must be concrete enough that a smaller implement model can execute the task without re-inventing design.
    • Assume /speckit.implement will read only this HUD for the task. If information is missing from the HUD, it does not exist for implement.
  2. Run the estimate/breakdown loop through spawned subagents until the existing stabilization script reports the task graph is settled.

    • Spawn an estimate subagent on gpt-5.4-mini.
    • Use spawn_agent.
    • Do not use fork_context: true.
    • Pass a focused prompt and the specific file references the subagent needs.
    • Set model: gpt-5.4-mini.
    • Use the speckit.estimate command contract and its manifest-declared estimate artifact/template; do not invent an ad hoc estimates.md shape during solution.
    • Instruct it to execute /speckit.estimate for this feature and report whether any tasks remain at 8 or 13.
    • If any high-point tasks remain, spawn a breakdown subagent on gpt-5.4-mini.
    • Use spawn_agent.
    • Do not use fork_context: true.
    • Pass a focused prompt and the specific file references the subagent needs.
    • Set model: gpt-5.4-mini.
    • Instruct it to execute /speckit.breakdown for this feature, then loop back to a fresh estimate subagent.
    • After each pass, validate the settled state with:
uv run --no-sync python scripts/speckit_tasking_chain.py --feature-dir "$FEATURE_DIR" --json
  • Continue the loop until that command returns "ok": true.
  • Do not call scripts/speckit_tasking_codex_runner.py from solution.
  1. Run finalize and return the exact JSON it prints:
uv run python scripts/speckit_solution_step.py finalize --feature-id "$FEATURE_ID" --phase solution --correlation-id "$CORRELATION_ID"

Guidance

1. Setup

The helper script resolves the feature workspace, validates that plan.md exists, requires ## Design Slices, and scaffolds tasks.md from the documented tasks template. It also expects spec.json from /speckit.plan to be present as the stable machine-readable summary of the approved plan/spec details.

2. Hard-block gate

  • Read plan.md.
  • If ## Design Slices is missing, stop and route back to /speckit.plan.
  • If any slice lacks an implementation directive, stop and route back to /speckit.plan.

3. Direct Task Generation

  • Decompose approved plan.md design slices into tasks.md directly in this command.
  • Solve each slice before turning it into tasks. A task list without the solved implementation approach is incomplete.
  • Write tasks from the solved slice, not from a restated headline.
  • Anchor every non-human task to a concrete file/symbol seam from the design slice.
  • Keep solutioning local to the slice: proposed behavior, symbols, branches, and checks must land in the tasks/HUDs that implement that slice.
  • Preserve slice ordering and dependencies from the plan.

4. Estimate / Breakdown Loop

  • Now that there are clear tasks from the plan, what is needed is that the tasks are small enough to be done as a unit of work. So they need Estimates and if they are too large, they need to be broken down.

To do that:

  • Create a spawned subagent on gpt-5.4-mini with the command instructions from /speckit.estimate
  • Use spawn_agent.
  • Do not use fork_context: true.
  • Pass a focused prompt and the specific file references the subagent needs.
  • Set model: gpt-5.4-mini.
  • If the estimate is above 8/13 for any task, create another spawned sub agent for /speckit.breakdown to break it down
  • Use `spawn_agent

Maintain Speckit.Solution?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[Speckit.Solution on getagentictools](https://getagentictools.com/loops/aborczuk-speckit-solution?ref=badge)
npx agentictools info loops/aborczuk-speckit-solution

The second line is the CLI lookup for this page — handy in READMEs and docs.