SpecWeaver: Spec-Driven Development CLI for Coding Agents
A spec-first CLI for driving coding agents: machine-checkable acceptance criteria, spec/code drift detection, CI merge gate. Works with any agent. $37 one-time.
Price: $37 one-time.
Features
Spec Validation
validate checks the spec against the schema and the structural rules: required fields, resolved references, well-formed acceptance criteria. Add --completeness to score how much of the spec is actually pinned down.
Executable Acceptance Criteria
A done_when entry can be {id, statement, check}, where check is a shell command and its exit code is the verdict. Plain-string criteria still work. Mixing both in one spec is intended.
Spec/Code Drift Detection
diff reads the file paths and symbol names the spec declares and compares them against the code on disk. The spec and the codebase stop agreeing silently.
Requirement Traceability
Tasks reference done_when ids. Validation enforces that every id resolves, so a requirement cannot quietly end up with nobody building it.
CI Merge Gate
gate runs schema validation, drift detection, done_when coverage, requirement coverage, and an optional completeness threshold in one command with one exit code. --format github annotates the pull request inline. Lenient by default, so it will not break a pipeline you already have.
Execution Graph
graph compiles a spec into its execution topology (components, tasks, dependencies) as mermaid, json, or a langgraph scaffold. Gates sit on the execution path, not in a checklist beside it.
Clean-Context Review
verify emits a review prompt built from the spec slice and the diff. Never the builder's transcript. The reviewing agent judges the code against the spec, not against the reasoning that produced it.
Works Standalone
Use SpecWeaver with any agent system that accepts structured specs. Not locked to Dark Factory or any specific framework.
Zero Infrastructure
A CLI tool. Install it, run it, use it. No accounts, no API keys, no subscriptions. One-time purchase, runs on your machine.
Frequently asked questions
- Is there a guarantee?
- 30-day guarantee. If you haven't downloaded the SpecWeaver files yet, email support@darkfactory.education for a full refund. Downloading the files makes the purchase final. The files are the product. Purchase mistake or double billing? Email us; we're reasonable. Full policy: /refund.
- How do I install it?
- The CLI ships as source inside the zip, under code/. Run 'cd specweaver-toolkit/code' then 'pip install .' and you have the specweaver command. That is the only install path. There is no PyPI package. Python 3.10 or newer, three dependencies (typer, mistune, jsonschema).
- Do I need Level 2 to use SpecWeaver?
- No. SpecWeaver is a standalone tool that works with any agent system that accepts structured specs. If you already have an agent workflow, SpecWeaver adds the quality gate it is missing. Level 2 teaches the full Dark Factory system, which SpecWeaver integrates with, but neither requires the other.
- What spec format does SpecWeaver use?
- A JSON project file with exactly three top-level keys: project, spec, and tasks. spec holds overview, tech_stack, architecture, data_models, functions, apis, scenarios, critical_rules, and non_functional, each section carrying its own done_when acceptance criteria. The schema ships with the toolkit as project-schema.json, and the format reference walks through every field. specweaver new scaffolds a spec from a template so you are not starting at an empty file.
- What makes an acceptance criterion executable?
- A done_when entry can be a plain string, or an object: {id, statement, check}. check is a shell command and its exit code is the verdict, a pytest node id, a build command, a curl piped into a grep. Nothing has to interpret the criterion, so nothing can interpret it generously. The worked example ships 22 done_when entries, 20 of them carrying a check.
- Does it require a license key?
- No. One-time purchase, no license key, no activation, no accounts to manage. Your copy stays keyless forever, even if a future version adds licensing.
- What can I use it on?
- Your own projects and client work, commercial included. Single-user license, as many specs and projects as you want. What you can't do: redistribute, resell, or republish the toolkit files themselves. The files are the product.
- What's the difference between validate and compose?
- They solve different problems. validate is the quality check: it reads a spec and reports schema errors, unresolved references, and missing acceptance criteria. compose is a file-assembly step for markdown specs, it inlines !include directives recursively, so a spec split across many files becomes one self-contained document. If what you want is the command that decides whether work is allowed to merge, that is gate, not compose.
- What does gate do that validate doesn't?
- validate answers one question: is this spec well-formed. gate answers the question CI actually asks: should this merge. It runs schema validation, spec/code drift detection, done_when coverage, requirement coverage, and an optional completeness threshold, then exits with a single code. Run it with --format github and failures land as inline annotations on the pull request. It is lenient by default, so dropping it into a pipeline you already have will not start breaking builds on day one.
- How does SpecWeaver integrate with Level 2?
- Module 6 of Level 2 covers the spec workflow end to end: writing a spec agents can act on, validating it before any work starts, and handing the result to the orchestrator to decompose into agent tasks. SpecWeaver is the tool. Level 2 is the training. The module can be followed without the toolkit; the CLI toolkit is a separate $37 product, not bundled into the $129 course. The Architect Bundle gets you both for less than buying them separately.