/fff:tdd-loopfrom fff
Reference rulebook for the red/green/refactor TDD discipline, loaded by work-issue and characterize workflows. Covers unit, integration, acceptance, and mutation testing levels with artifact scaling.
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.
The execution discipline shared by every FFFlow workflow that writes code. Not a standalone skill — it's a reference rulebook loaded by work-issue and by characterize's test-backfill tasks.
Same loop at every level. The artifacts scale.
The discipline is the same; what counts as a "test" varies.
@property-based Scenarios..feature file. Scenarios written before the test runner can pass them.@RID-* tags.quality-gates (which reads from the stack's dimensions:)..feature files with full RID traceability, plus property-based scenarios where @property-based is tagged.quality-gates maintainability thresholds.typescript-ui)For presentational UI, the loop is story-driven (see component-driven-ui). The "red" is the story + component test:
play() interaction test + a component unit test.The component is proven in isolation this way before any container imports it. Composes with the level above: at L2+ the story's interaction test is the acceptance layer for the component; unit tests pin inner correctness.
If your test passes the first time:
A passing first-run test is a smell, not a win. Investigate before declaring green.
When making the test pass:
Example:
auth: reject passwords < 8 chars (@RID-PWD-001)
Red-then-green is the default and covers the overwhelming majority of work. A few edges genuinely resist it:
defect-driven-specification is for. When you truly can't, pin what you can observe and say what remains unpinned.Name the exception; don't take it silently. When the loop is abridged, note it in the PR body — which edge applied, and what you did instead. If the gap is durable (a seam that still doesn't exist, a defect still unreproduced), it belongs in the spec entry too, not just the PR.
The discipline doesn't erode because someone skipped red once with a good reason. It erodes when skipping stops being remarkable.
"Hard to test" is not on this list. A test that's difficult to write is usually reporting something true about the design — coupling, a missing seam, a function doing three jobs. That signal is most of TDD's value, and reaching for the exception throws it away. Inconvenient is not impractical.
work-issue uses this skillwork-issue loads tdd-loop as reference context at Phase 2 and walks the loop per chunk of acceptance. It doesn't invoke tdd-loop as a tool call — there's nothing to invoke. The skill is the prose discipline; the implementation lives inside work-issue.
characterize uses this skillCharacterize-generated tasks for the test backfill are tagged "characterization." Their TDD loop runs in reverse: the behavior already exists; the test is written to pin it. Red is replaced by "confirms the existing behavior, then confirm what would break if the behavior changed." Same discipline, characterized variant.
What SKILL.md sets; muted values are Claude Code's defaults
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.