gate-build
Runs configured build and test commands in tiered order. Captures output as evidence per tier. Returns PASS, FAIL, WARN, or SKIP based on per-tier verdicts.…
Breaks a design into work units with testable specs. Reads design artifacts from sw-design and produces implementation-ready plans.
$ npx -y skills add Obsidian-Owl/specwright --skill sw-plan --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sw-planContext preview
The summary Claude sees to decide when to auto-load this skill.
Breaks a design into work units with testable specs. Reads design artifacts from sw-design and produces implementation-ready plans.
name: sw-plan description: >- Breaks a design into work units with testable specs. Reads design artifacts from sw-design and produces implementation-ready plans. argument-hint: "" allowed-tools: - Read - Write - Edit - Bash - Glob - Grep - Task
Turn the approved design into implementation-ready specs with testable acceptance criteria. Decompose into ordered work units if large. Operates autonomously, applying `protocols/decision.md` for all decisions. Gate handoff at the end.
**Single-unit work**: `spec.md` + `plan.md` in `{workArtifactsRoot}/{selectedWork.id}/` (flat layout).
**Multi-unit work**: For each unit in `{workArtifactsRoot}/{selectedWork.id}/units/{unit-id}/`: `spec.md` + `plan.md` + `context.md`. `workUnits` array in workflow.json. Also: `integration-criteria.md` in the design-level directory (`{workArtifactsRoot}/{selectedWork.id}/`).
Also: `{repoStateRoot}/work/{selectedWork.id}/stage-report.md` for the planning handoff.
Also: `decisions.md` updated with planning-phase autonomous decisions.
**Stage boundary (LOW freedom):** Follow `protocols/stage-boundary.md`. Produce specs and plans. NEVER implement, branch, test, or commit. After gate handoff, STOP.
**Pre-condition check (LOW freedom):** Resolve the selected work from the current worktree session. Check that `selectedWork.status` is `designing` or `planning` and `design.md` exists. `sw-plan` operates on the current worktree's attached work only. If another live top-level worktree owns that selected work, STOP and require explicit `/sw-adopt` guidance before mutating specs or plans here. Matching the recorded branch alone must not imply takeover.
**Design approval capture (LOW freedom) — on entry:** Use `protocols/approvals.md` and the shared helper to record the current design artifact set in `{workArtifactsRoot}/{selectedWork.id}/approvals.md`. Interactive `/sw-plan` runs may write an `APPROVED` `design` entry with source classification `command`; headless runs must validate existing human approval instead of fabricating one.
**Decompose (MEDIUM freedom, only if large):**
design blast radius to determine boundaries. High-blast-radius (systemic) components get their own unit.
on one active workflow, split the effort into separate works and define integration criteria between them instead of sharing one mutable workflow.
regenerate only the affected remaining-unit artifact set. Overwrite each affected remaining unit's `spec.md`, `plan.md`, and `context.md`, but keep shipped units as immutable baseline scope rather than rewriting their artifacts or acceptance history.
**Integration criteria (MEDIUM freedom, multi-unit only):**
the design-level directory (`{workArtifactsRoot}/{selectedWork.id}/`). Not generated for single-unit work.
(IC-B{n}). Both types go to the same file.
reference specific module paths, export names, or import relationships. Example (valid): "Module `src/routes/index.ts` imports handler from `src/handlers/payment.ts`". Example (invalid): "The payment feature works end-to-end" (too abstract — use a spec AC instead). Format: `- [ ] IC-{n}: {assertion with file paths or export names}`.
changes, or emitted events — that are only verifiable when multiple units interact. Example (valid): `- [ ] IC-B1: calling checkout() returns an order ID after the payment and inventory units are both active`. Format: `- [ ] IC-B{n}: {assertion referencing observable outputs}`. spec-review validates IC-B quality: each behavioral IC must name a concrete observable, not restate implementation intent.
"After all units are built, what structural connections must exist, and what observable behaviors must hold?"
for the affected remaining units only. This uses the same overwrite behavior as regenerated unit `spec.md` / `plan.md` / `context.md` artifacts while preserving shipped units as immutable baseline scope. If replanning reduces the remaining work to single-unit, delete `integration-criteria.md` if it exists.
stale. sw-pivot should regenerate ICs when unit boundaries change. If it does not, gate-wiring will WARN on un
Craft quality software with AI discipline. Spec-driven development plugin for Claude Code and Opencode — quality gates, adversarial testing, and evidence capture.
Repo: Obsidian-Owl/specwright
Runs configured build and test commands in tiered order. Captures output as evidence per tier. Returns PASS, FAIL, WARN, or SKIP based on per-tier verdicts.…
Detects leaked secrets, injection patterns, and sensitive data exposure across changed files. Uses real tooling when configured, LLM judgment for analysis.…
Tiered semantic analysis of changed code (rg → ast-grep → OpenGrep). Detects error-path bugs structural gates miss. Findings default to WARN. Internal —…
Maps every acceptance criterion from the spec to implementation evidence and test evidence. Criteria without evidence fail. The ultimate quality gate. Internal…
Audits test quality — assertion strength, boundary coverage, mock discipline, error path testing. Delegates to the tester agent for adversarial analysis.…
Detects unused exports, orphaned files, architecture layer violations, and circular dependencies across changed files. Delegates to architect agent for…