Skip to content
Development
Skill

/sw-verify

Orchestrates quality gates for the current work unit. Runs enabled gates in dependency order, produces an aggregate evidence report with gate handoff.

From plugin
specwright
1023 skills9 agents18 commands

Claude Code

$ npx -y skills add Obsidian-Owl/specwright --skill sw-verify --agent claude-code

SKILL.md

sw-verify.SKILL.md
name: sw-verify
description: >-
  Orchestrates quality gates for the current work unit. Runs enabled gates
  in dependency order, produces an aggregate evidence report with gate handoff.
argument-hint: '[--gate=<name>] [--accept-mutant {id} --reason "{prose}"]'
allowed-tools:
  - Read
  - Write
  - Bash
  - Glob
  - Grep
  - Task

Specwright Verify

Goal

Run quality gates against the work unit. Continue through all gates regardless of failures and present the report at handoff per `protocols/decision.md`.

Inputs

  • `{worktreeStateRoot}/session.json` -- selected work
  • `{repoStateRoot}/work/{selectedWork.id}/workflow.json` -- work state and gate results
  • `{projectArtifactsRoot}/config.json` -- gate configuration
  • `{workDir}/spec.md` -- for spec compliance gate
  • `{workDir}/implementation-rationale.md` -- curated build rationale when present
  • `{workArtifactsRoot}/{selectedWork.id}/integration-criteria.md` -- behavioral IC list when present
  • Gate skill files in `skills/gate-*/SKILL.md`

Outputs

  • `{repoStateRoot}/work/{selectedWork.id}/units/{selectedWork.unitId}/stage-report.md` -- verify handoff digest
  • Evidence files in `{workDir}/evidence/`, one per gate
  • `{workDir}/review-packet.md` -- reviewer synthesis from approvals, rationale, proof, and gate outcomes
  • Selected work's `workflow.json` updated with gate results; status `verifying`
  • Aggregate report presented at gate handoff

Constraints

**Stage boundary (LOW freedom):** Follow `protocols/stage-boundary.md`. Run quality gates and show findings. NEVER fix code, create PRs, or ship. After gate handoff, STOP.

**Ownership check (LOW freedom):** Resolve the selected work from the current worktree session. If another live top-level worktree owns that work, STOP with explicit `/sw-adopt` guidance and do not rely on generic adopt/takeover behavior.

**Assumption re-validation (LOW freedom) — before gate execution:** Scan the design assumptions artifact from the design-level directory. Check ACCEPTED/VERIFIED assumptions against current code. Invalid → WARN in the aggregate report. Runs silently.

**Approval lineage check (LOW freedom) — before gate execution:** Use `protocols/approvals.md` and the shared helper to validate the recorded `design` and current `unit-spec` approval hashes. Missing, `STALE`, or `SUPERSEDED` lineage becomes a distinct approval finding; headless verify may report it but never create `APPROVED` entries.

**Accepted-mutant lineage and mutation disclosure (LOW freedom):** When `/sw-verify --accept-mutant {id} --reason "{prose}"` is present, use `protocols/approvals.md` plus the shared helper to record or refresh the accepted-mutant approval entry before gate execution. Persist the config linkage at `config.gates.tests.mutation.acceptedMutants[]`, require a reason, and set expiry to 90 days from approval unless a later explicit expiry is being refreshed. Ordinary verify runs validate and report accepted-mutant lineage; they never fabricate approval state or silently waive survivors. Mutation analysis stays inside `gate-tests`, not a seventh gate. When `gate-tests` emits mutation evidence, surface the tier (`T1`, `T2`, or `T3`), any accepted-mutant approval lineage, and only the restricted survivor record: operator, location, before/after, defect category, and action. No test bodies and no assertion literals. Missing-tool or fallback paths may degrade through `T2`/`T3`, but never to a silent skip.

**Freshness checkpoint (LOW freedom) — before any gate runs:** Use `protocols/git-freshness.md` to assess the selected work's verify checkpoint from the recorded target and policy. For branch-head validation, branch-head `require` blocks stale, diverged, and blocked freshness results. Queue-managed mode remains a distinct validation path and does not prescribe a local rebase before verification. When branch-head validation is blocked and `rebase` or `merge` reconcile is configured, run `protocols/git-reconcile.md` in the owning worktree and continue gate execution in that same verify run after a successful reconcile. `manual` remains an explicit fallback: stop with manual reconcile guidance, reconcile the current branch against the recorded target in the owning worktree, or run `/sw-adopt` first if a linked-worktree ownership conflict exists, then rerun `/sw-verify`. Do not redirect to `/sw-build` solely to clear freshness, and do not silently rewrite `targetRef` or freshness metadata. In headless mode, follow `protocols/headless.md`: skip freshness blocking, continue gate execution, and report the freshness result with the gate findings.

**Gate execution order (LOW freedom):** Determine enabled gates from config. Support both formats:

  • **Object format**: `config.gates.{gateName}` exists and `.enabled === true`
  • **Array format**: gate name present in `config.gates.enabled` array

All six gates are eligible when enabled in config: build, tests, security, wiring, semantic, spec. Execute enabled gates in dependency order: gate-build → gate-tests → gate-security, gate-wiring → gate-semantic → gate-spec. If `--gate=<name>` argument, run only that gate. Load calibration notes per `protocols/evidence.md#verdict-rendering`.

Freshness is a prerequisite checkpoint, and gate-build plus gate-tests remain the ordered prerequisites before any parallel or read-only lane begins. When parallel verify execution is enabled under the same `protocols/parallel-build.md` prerequisites (`config.experimental.agentTeams.enabled=true`, `SPECWRIGHT_AGENT_TEAMS=1`, and a selected work unit with 4 or more tasks), only gate-security, gate-wiring, gate-semantic, and gate-spec may run as read-only evidence producers after the freshness, build, and tests steps complete.

Parallel lanes never become independent workflow owners. The parent or top-level verify execution remains the only authority that aggregates lane results into shared work state, including the selected work's `workflow.json` `gates` section.

Missing eviden

Read more
@obsidian-owl
Ships withspecwright

Craft quality software with AI discipline. Spec-driven development plugin for Claude Code and Opencode — quality gates, adversarial testing, and evidence capture.

1023 skills9 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
10
Star history of Obsidian-Owl/specwright on GitHub, a chart by star-history.com

Other skills on specwright.

gate-build

gate-build

Runs configured build and test commands in tiered order. Captures output as evidence per tier. Returns PASS, FAIL, WARN, or SKIP…

gate-security

gate-security

Detects leaked secrets, injection patterns, and sensitive data exposure across changed files. Uses real tooling when configured,…

gate-semantic

gate-semantic

Tiered semantic analysis of changed code (rg → ast-grep → OpenGrep). Detects error-path bugs structural gates miss. Findings…

gate-spec

gate-spec

Maps every acceptance criterion from the spec to implementation evidence and test evidence. Criteria without evidence fail. The…

gate-tests

gate-tests

Audits test quality — assertion strength, boundary coverage, mock discipline, error path testing. Delegates to the tester agent…

gate-wiring

gate-wiring

Detects unused exports, orphaned files, architecture layer violations, and circular dependencies across changed files. Delegates…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about sw-verify.

Which coding agents can use sw-verify?
sw-verify installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.