From specpowers-flow
Use when running an end-to-end spec-driven change from idea to archive — orchestrates the full OpenSpec + Superpowers-style workflow with explicit stages and gates. Triggers - "run the full specpowers flow", "start a complete spec-driven change", "go from brainstorm to archive", "use specpowers for this feature".
How this skill is triggered — by the user, by Claude, or both
Slash command
/specpowers-flow:specpowers-flowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Invoke this skill when the user wants to drive a change through the full 8-stage lifecycle. Determine whether this is a **new change** or a **resume**:
Invoke this skill when the user wants to drive a change through the full 8-stage lifecycle. Determine whether this is a new change or a resume:
openspec/changes/<change>/ directory exists yet, or the user explicitly requests a fresh start. Proceed from stage 1 (brainstorm).If the change name is ambiguous or multiple active changes exist, ask the user to confirm before proceeding.
To determine current stage:
openspec/changes/<change>/ for artifacts: presence of proposal.md, design.md, tasks.md, specs/, and coverage/compliance markers..specpowers/gates/ inside the change directory for per-stage gate evidence files (see references/stage-protocol.md for the evidence record shape: stage, passed_at, artifacts[{path, sha256}], result)..specpowers-state.yaml is a hint cache only — never treat it as authoritative. Always derive stage from on-disk artifacts and gate evidence.Full stage definitions, evidence record format, and invalidation rules are in references/stage-protocol.md. Read that file when resuming a change or debugging a stale gate.
Before advancing past brainstorm, select a tier — quick, standard, or full — using the rules in references/tiering-rules.md. The orchestrator estimates size (files likely touched, reversibility, blast radius) and suggests a default; the user may override downward only within the limits defined there.
Non-overridable escalation: any change touching authentication/authorization/permissions, data migration or schema changes, destructive or irreversible state, tenant/security boundaries, or money/billing is forced to standard or full regardless of size or user preference. This cannot be bypassed. Such changes also require a real spec delta before coverage/compliance can pass.
Behavioral-change delta rule: any change that alters system behavior requires a real spec delta in every tier, including quick. Without a delta the coverage and compliance gates have no contract to verify against. The no-spec-delta exception applies only to genuinely non-behavioral changes (docs/formatting/comments). Read references/tiering-rules.md at tier selection time and again when coverage or compliance gates are evaluated.
Each stage has a mandatory completion gate. No stage may be marked complete until its gate passes. The phase skill responsible for each stage is listed below; route to it and hand back control to the orchestrator when it completes or fails.
| Stage | Gate (summary) | Phase skill |
|---|---|---|
1. brainstorm | Direction approved; requirement specific enough to generate a change | specpowers-brainstorm |
2. generate-spec | Change dir exists; proposal.md, design.md, tasks.md, and spec deltas present | specpowers-spec |
3. harden-spec | Validation passes; no unresolved blocker; findings synced back into artifacts | specpowers-spec |
4. plan-from-spec | Plan exists in tasks.md; explicitly based on the hardened spec | specpowers-plan |
5. check-coverage | Every requirement has ≥1 plan step and ≥1 verification path; coverage matrix complete | specpowers-plan |
6. execute-plan | Implementation complete; tests run (test-first sub-gate satisfied); evidence preserved | specpowers-build |
7. verify-compliance | Compliance passes; tests pass; no unresolved blocker | specpowers-build |
8. archive | All 7 prior gates passed (evidence digests still match disk); user confirmation when required by tier | specpowers-archive |
Full input/output/failure-handling details for every stage are in references/stage-protocol.md.
Never advance past a stage whose gate has not passed. When a gate fails, route back to the stage indicated by the failure-routing table in references/stage-protocol.md. Common cases:
generate-specharden-specplan-from-specexecute-plan or verify-compliance as appropriateDo not proceed to the next stage until the user has been informed of the failure and the affected stage is resolved.
| Reference | Read when |
|---|---|
references/stage-protocol.md | On every invoke: stage detection, gate evaluation, failure routing, evidence record format |
references/tiering-rules.md | At tier selection; again when evaluating coverage or compliance gates |
references/openspec-artifact-format.md | When creating or validating the change directory and its artifacts |
references/adversarial-spec-review.md | When running the harden-spec adversarial review |
references/independent-review.md | When dispatching any adversarial subagent (harden-spec, verify-compliance) |
references/subagent-execution.md | Before executing the plan in execute-plan |
references/test-driven-development.md | Before each execute-plan task and when evaluating the test-first sub-gate |
references/plan-coverage-matrix.md | At check-coverage and when verifying the compliance inputs |
references/compliance-verification.md | At verify-compliance stage |
references/archive-checklist.md | At archive stage; includes conservative fallback archive procedure |
At startup, probe for the presence of real tools:
openspec CLI present (openspec --version succeeds): use openspec validate for artifact validation and openspec archive for the archive merge. The format contract remains references/openspec-artifact-format.md.subagent-driven-development or executing-plans rather than the self-contained protocol in references/subagent-execution.md. Similarly, hand off brainstorm to Superpowers brainstorming and test-first execution to Superpowers test-driven-development when present.The skill runs correctly in all three configurations. The self-contained fallback paths in references/subagent-execution.md, references/test-driven-development.md, and references/archive-checklist.md are authoritative when real tools are absent.
Guides 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 ujffdi/specpowers-flow --plugin specpowers-flow