From sbtdd
Drive or resume the SBTDD (Spec + Behavior + Test-Driven Development) multi-agent workflow. Use when running /sbtdd, starting an SBTDD feature, continuing an in-progress TDD plan, or when the user mentions SBTDD, spec-behavior, or the claude-plan-tdd flow. Inspects project artifacts and .claude/session-state.json, then executes the next phase.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sbtdd:sbtddThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill drives the full SBTDD lifecycle. It routes to the correct phase,
This skill drives the full SBTDD lifecycle. It routes to the correct phase,
delegates to the appropriate superpowers skills, and enforces human gates.
Per-phase detail lives in the references/ directory; this file holds only
the routing skeleton and the delegation table.
Verify that CLAUDE.local.md, sbtdd/, and planning/ exist in the project
root. If any are missing, stop immediately and tell the user:
"Required SBTDD artifacts are missing. Run
/sbtdd-initto initialize the project. For a full integrity check, run/sbtdd-check."
Do not proceed past Preflight until the project is initialized.
Read references/routing.md. Detect the current phase by inspecting the
artifacts that are actually present on disk (use Glob/LS/Read — file existence
is the deterministic ground truth). On state drift or ambiguity, abort and
escalate to the user. Announce the detected phase and the evidence found,
and confirm with the user before acting when the phase is ambiguous.
Read the reference file for the detected phase (see delegation table below)
and invoke the listed skill(s) using their fully qualified names
(superpowers:…, magi:magi).
| Detected phase | Reference to read | superpowers skill(s) |
|---|---|---|
| Spec refinement | routing.md | superpowers:brainstorming |
| Planning | routing.md | superpowers:writing-plans |
| Plan gate | review-gates.md | manual review (Checkpoint 1) → magi:magi (Checkpoint 2, interactive-only — see review-gates.md §7) |
| Execution | tdd-cycle.md | superpowers:test-driven-development, superpowers:verification-before-completion, superpowers:systematic-debugging; mode superpowers:subagent-driven-development or superpowers:executing-plans; optional superpowers:using-git-worktrees, superpowers:dispatching-parallel-agents |
| Pre-merge review | review-gates.md | superpowers:requesting-code-review → superpowers:receiving-code-review → magi:magi (interactive-only — see review-gates.md §7) |
| Finalization | finalization.md | superpowers:finishing-a-development-branch |
Execution default: serial
superpowers:subagent-driven-developmentwith TDD-Guard ON is the preferred mode. Suggest parallel agents (superpowers:dispatching-parallel-agents+superpowers:using-git-worktrees, TDD-Guard OFF, then merge each worktree to the parent branch) only for a perceptible gain on mutually independent tasks. Seereferences/tdd-cycle.md§4.
TDD-Guard toggle: TDD-Guard enforcement is only meaningful during the Execution phase. Toggle
tdd-guard offbefore non-Execution phases (Spec, Planning, Plan gate, Pre-merge review, Finalization) so legitimate markdown/spec/plan/TodoWrite writes are not blocked; toggletdd-guard onwhen returning to Execution. Seereferences/tdd-cycle.md§6 for details.
MAGI backend: the orchestrator resolves the MAGI backend per
review-gates.md §8— if./.claude/magi-ollama.tomlexists, everymagi:magiinvocation (Plan gate, Pre-merge review) is threaded with--ollama;/sbtdd --ollamais the explicit fail-closed form. Enable it with/sbtdd-init --ollama-init.
Human stops are mandatory and ordered at the plan gate: Checkpoint 1 (manual
review of claude-plan-tdd-org.md) precedes Checkpoint 2 (the magi:magi
verdict); never run MAGI before Checkpoint 1 is approved. Never auto-approve any
gate. Wait for explicit human confirmation before advancing to the next phase.
Invocation contract:
magi:magiis interactive-only — seereferences/review-gates.md§7 for the forbidden transports and the supported alternatives. Headless runtimes/dispatchers MUST NOT invoke it viaclaude -psubprocess.
After a phase closes, re-route (return to step 2). Under an approved plan, the
orchestrator may continue autonomously according to the rules in
CLAUDE.local.md §5 without prompting between sub-steps.
references/routing.md — phase detection rules and artifact mapreferences/tdd-cycle.md — execution phase TDD procedurereferences/review-gates.md — gate criteria and MAGI integrationreferences/finalization.md — branch completion and cleanupGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub bolivartech/sbtdd --plugin sbtdd