Specflow
Capability does not create authority. Specflow is a trust harness for coding agents: agents produce changes; declared contracts, independent verification and mechanical gates decide whether the evidence supports acceptance.
The problem
An agent can build a plausible interface, pass tests over substituted data and call the feature complete. A stronger model can produce more work without making that completion claim reliable. Reviewers need to see what actually ran, against which inputs, and what remains unresolved.
The product
Specflow carries a selected change from intent to evidence. It keeps the accepted scope, required checks, findings and run history outside the builder's conversation. The builder can be replaced without treating its confidence or remembered summary as proof.
Use the lightest workflow that covers the risk. A copy tweak may need tests and a screenshot; a bounded bug needs a failing regression and relevant contracts. New behavior needs simulation of divergent routes. Database/RPC changes require their replay, rollback, pgTAP and migration-replay checks. Multi-slice work also needs integrated journey acceptance. Work routing chooses the parts; it does not waive existing requirements.
| Part | Purpose |
|---|
| Contracts and journeys | Define observable acceptance and preserve existing behavior |
spec-build | Strengthen intent and deepen only the next justified slice |
feature-build | Implement a ready slice while preserving its required checks |
| Independent verifier | Exercise the built behavior and compare it with the accepted reference |
| Gates C and D | Consume current slice and integrated outcome evidence |
| Run contract, ledger and trace | Explain decisions, attempts, failures, exceptions and gaps |
A review model is not the mechanical verifier. Fresh same-host advisory review, explicit cross-family Duo review, native execution and customer validation are different claims.
Install and use
These examples use a checked-out source kit. Source capability and a published npm or marketplace release have separate qualification; do not infer the installed version's behavior from current main.
git clone https://github.com/Hulupeep/Specflow.git specflow-kit
node specflow-kit/bin/specflow.js init /absolute/path/to/your-project --runtime codex
# Or select --runtime claude-code
Fill only missing project context: repository, board/CLI, stack and selected work. Open a new agent session to load the installed instructions. Onboarding covers host selection, diagnostics, retained runs and updates. Installation checks do not establish product readiness.
Give the agent a target and let the installed loop selector assess its risk and existing evidence. Formal specification work follows the progressive specification procedure: future work stays thin; only the selected slice becomes build-ready. A label or an old passing audit is insufficient.
For explicit independent Duo review, authenticate both provider CLIs and gh where GitHub reads are needed. In the agent conversation:
| Host | Start | Resume |
|---|
| Claude Code | /duo-build #123 | /duo-build resume <run-id> |
| Codex | $duo-build #123 | $duo-build resume <run-id> |
The interactive builder continues authorized repairs and asks the peer to inspect frozen artifacts. Ordinary subscription work has no invented repair count or dollar ceiling; repeated non-progress requires diagnosis. Explicit limits and expensive billable-route brakes remain. Duo details explain ownership, evidence and recovery. TypeSafe is optional advice, not an approval path.
For direct runner use, start in the target project with its installed routing and accepted inputs:
node /absolute/path/to/specflow-kit/bin/specflow.js run spec-build \
--slug example --goal "Select the next useful slice" --input docs/intent.md
node /absolute/path/to/specflow-kit/bin/specflow.js run trace \
--run-dir .specflow/runs/example
These commands inspect or advance the declared run; they do not manufacture acceptance, required backend access or permission. How it works and the command reference explain the verifier lifecycle.
Use as a Claude Code plugin
The full plugin is specflow; the separate specflow-improve entry is the thin
caller for a configured Improve service. The full plugin uses the same versioned
npm payload as the source kit, including the canonical scripts, agents, skills,
commands and hooks.