/fff:spec-first-developmentfrom fff
Implements a spec-first development loop where Gherkin feature file changes drive implementation, producing step definitions and unit tests. Useful for BDD workflows with audit enforcement.
Ships in fff. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Reference rulebook (L2+). Loaded as context by work-issue and plan-chat when the project is at L2 or higher. Describes the spec → red → green → audit loop with explicit spec changes.
1. Spec change — edit .feature files
2. Audit fails — reality no longer matches specification
3. Implementation — step definitions + unit tests + production code
4. Audit passes — reality matches specification again
The spec diff IS the change request. A non-technical stakeholder reads the Gherkin diff and sees exactly what changes. No tickets required. No ambiguity.
Step 3 produces two kinds of tests. Step definitions bind Gherkin scenarios to code. Unit tests verify internal logic, edge cases, and implementation correctness. Both suites must pass. Both coverage thresholds must be met.
This inverts the traditional flow. Traditional: code changes, documentation catches up or doesn't. Spec-driven: documentation changes first, code catches up, audit enforces that it does.
New feature. Add scenarios describing desired behavior. No step definitions exist yet. Audit fails. Write step definitions and code. Audit passes.
Bug fix. The scenario already exists, tagged @known-defect. Change it to describe correct behavior. Remove the tag. Audit fails because code still does the wrong thing. Fix the code. Audit passes. (See defect-driven-specification.)
Behavioral change. Modify existing scenarios. The diff shows before and after in business language.
Removing functionality. Deprecate with @deprecated tag and comment, or delete outright. The RID is retired and never reused (L3).
Resolving @unverified-intent. After stakeholder review, reclassify to @accepted-risk or remove the annotation. No code changes needed.
A spec change to add password length validation results in:
The spec says "passwords below 12 characters are rejected." The unit tests verify the exact boundary at 11 and 12, empty strings, maximum length, Unicode handling. Different concerns. Both essential.
A traditional change request is prose in a ticket. A spec diff is structured natural language, diffable in standard tools, more precise than prose.
The spec diff shows exact boundary values, exact error messages, and explicit edge cases. The prose ticket mentions acceptance criteria. The spec diff specifies them with examples.
Sometimes implementation reveals the spec was incomplete. This is normal.
Spec change → Implementation begins → New case discovered →
→ Spec amended → Implementation continues → Audit passes
Rules for mid-implementation spec changes:
The FFFlow default (per work-issue and architecture §2.2): spec and code ship in the same PR.
The PR body cites:
This default beats the older two-PR pattern (spec PR then implementation PR) because:
work-issue's local-validation gate has both pieces available.The older two-PR option remains for very large spec changes where the spec itself needs cross-stakeholder review before implementation. Use rarely.
Commit prefixes tell the story:
spec: increase minimum password length to 12 characters
feat: implement 12-character minimum password length
spec: add edge case for passwords at exactly 12 characters
feat: handle 12-character boundary in password validation
spec: commits are behavioral decisions. feat: commits are implementation. The history reads as a narrative: decision, execution, discovery, more execution.
Some features span multiple bounded contexts. Each context gets its own spec changes. The audit checks each context independently, so partial implementation is visible.
Don't write scenarios spanning multiple contexts. Each scenario is testable within its context. Integration between contexts is verified at the acceptance level or through contract testing (see contract-enforcement).
CI runs /audit --ci on every PR. Every spec change has step definitions and passing tests. Every code change maintains existing spec compliance. Coverage thresholds are met. No structural violations.
A PR that changes specs without implementing them fails. A PR that breaks existing specs fails. The audit is the automated enforcer.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
bdd, gherkin, spec-driven, test-driven-development, cucumber
npx claudepluginhub zerotechdebt/ffflow --plugin fff38 skills in this plugin
/adopt-ffflowEnd-to-end onboarding for a new FFFlow project. Runs init-ffflow, stack-init, then hands off to plan-roadmap to phase out the work (greenfield or brownfield — roadmap figures out the right per-phase entry point). Use `--ui` to adopt FFFlow's view-layer-purity structure (the frontend sibling of hexagonal) on an already-adopted project./auditRun the FFFlow keep-honest auditors against this project. Coordinator with per-type cartridges (CLAUDE.md freshness, spec drift, characterization tests, architecture conformance, complexity/refactor signals, and L3 RID traceability). Use --type to target one; --plan to convert findings into work./autopilotMeta-skill that wraps any interactive skill for unattended execution. Reads project context to stand in for the user on routine decisions, with a decision log.