spec-workflow
Spec-driven development plugin for Claude Code
Large changes, kept controllable and reversible. The pipeline — research → clarify → propose → HARD GATE → implement → verify → archive — is re-entrant at every step, enforced by hooks, and runs its agents in parallel.

English | 中文
Why
Two paradigms already dominate AI-assisted spec-driven development:
- Fast lane — start coding right away and let hooks catch the mistakes (hookify, or a stripped-down superpowers brainstorm).
- Heavy lane — spec everything up front, but down a rigid track (OpenSpec's 4 commands, superpowers brainstorm's 9 steps).
spec-workflow takes a third path. It keeps the discipline of thinking before acting, but breaks the process into 18 independent slash commands — each stage re-entrant, interruptible, and re-runnable on its own. Three hard gate hooks make sure the workflow stops where it has to; a Stop-event reminder makes sure implementation ends with a verification; a Stop-event driver turns /spec:loop's autonomous rounds into a hard mechanism.
Comparison
| Dimension | spec-workflow | OpenSpec | superpowers |
|---|
| Stage gating | explicit HARD GATE + hook enforcement | loose, advisory warnings | rigid 9-step track |
Open questions [TBD] | allowed, but a hook forces them closed | Open Questions can linger | banned — resolve on the spot |
| Command granularity | 18 independent commands | 4 commands, all-in-one | one skill-based flow |
| Mid-flow re-entry | call any stage on its own | /opsx:continue to advance | start over |
| Anti-cheating | two layers (command + agent) + opt-in flags | none | implicit |
Built for one person making large changes, with guardrails — stricter than OpenSpec, looser than superpowers.
Quick Start
Install
# Configure a GitHub token (required for a private repo)
$env:GITHUB_TOKEN = "ghp_xxxxxxxxxxxx"
# Register the marketplace and install the plugin
claude plugin marketplace add kamioj/spec-workflow
claude plugin install spec@spec-workflow
Using OpenAI Codex CLI instead? The same workflow ships as a Codex plugin from this
repo — same gates, same artifacts, $spec-* skills instead of /spec:* commands:
codex plugin marketplace add kamioj/spec-workflow
codex plugin add spec@spec-workflow
Full Codex install steps (agent bootstrap via $spec-setup, one-time hook trust) and the
known differences live in codex/README.md.
Optional dependencies (not auto-installed — the plugin degrades gracefully without them)
A Claude Code plugin only ships files (commands / hooks / agents / rules); it never installs software on your machine. Two external tools unlock extra layers, both opt-in:
| Tool | Powers | Install | Without it |
|---|
| ast-grep | charter-audit machine pass over rules/dirty-data/ (AST-level detection of swallowed exceptions / default-return fallbacks) | scoop install main/ast-grep or npm i -g @ast-grep/cli | the verifier falls back to manual pattern review and declares not run: ast-grep not installed in Evidence |
| Codex CLI | the --codex heterogeneous peer review in /spec:propose and /spec:verify | npm i -g @openai/codex, then run codex once — the first run walks you through login | --codex flags unavailable; the default independent review is unaffected |
Try it
Once claude is running:
/spec:status # should print "no active SDD change"
/spec:research "Caffeine vs Redis" # kick off a research run
Within a few minutes, research.md lands in spec/changes/caffeine-vs-redis/.
From there, walk the flow: /spec:ask settles the open [TBD] decisions with you → /spec:propose writes the proposal and stops at the HARD GATE for your approval → /spec:apply implements → /spec:verify audits independently → say "archive" when you're done. Lost? /spec:status tells you exactly where you are and what to run next.