/tdd-bdd-harness:tdd-bdd-harnessfrom tdd-bdd-harness
Use when the user wants to adopt or bootstrap a TDD+BDD spec harness ("adopt TDD/BDD", "scenario catalogue", "spec harness", "port this test discipline"); to audit whether a test suite is honest ("audit my tests", "are these tests honest", "adversarial test audit"); to add the Gherkin scenario and cited test for a behaviour change in a repo that has TDD.md, BDD.md and features/; or to add a formal rule (TLA+ model or Lean proof, "formal verification", "proof-driven") beside a scenario's test.
Ships in tdd-bdd-harness. 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.
Read when SKILL.md points to them.
Every observable behaviour is a Gherkin scenario, bound to a real test by a citation that a machine checks. The result is a promise ledger that CI keeps from drifting.
reference/bootstrap.md and work its phases in
order. Also open that file to redo or extend one phase, to add a @loop
live check (Phase 6), or to run with an implementer and reviewer model pair
(its Reviewer gate section).reference/audit.md. It works on its own, with or
without the harness installed.reference/bootstrap.md Phase 4 only for a parallel
gap-fill across several domains.reference/formal.md; the
install is bootstrap Phase 7.One catalogue: features/*.feature, one Gherkin file per domain. A
generated Scenarios.md and docs/scenarios/coverage-matrix.md index it.
Citations: every scenario carries # Backed by: <ref>, naming its
executable proof. The ref takes one of three forms, and a machine resolves
each one:
tests/test_x.py::test_fn (file and function
are checked);web/src/x.test.ts > does the thing (the file is
checked);scripts/quality/checks.py::check_fn.A @formal scenario adds # Model-checked by: specs/X.tla::Rule or
# Proved by: proofs/X.lean::theorem beside its test citation, never
instead of it (reference/formal.md).
The ratchet: a scenario with no proof yet is tagged @gap @wip, and a
bare @gap fails CI. Once bare gaps reach 0 they stay at 0. Every
@gap @wip clears before its feature ships.
The meta-guard: a test file that fails CI on any of four things: unparseable Gherkin, unbacked scenarios, ghost or renamed citations, and stale matrix totals. Its checkers are pure and have red-path proofs (synthetic bad inputs), so the guard is itself tested.
Same-commit rule: the behaviour, its scenario, its test and the regenerated matrix land in one commit.
The red-proof: each new test survives a mutation before it earns its citation. See Hard rules.
Installing writes about a dozen files: TDD.md, BDD.md, a feature catalogue, two scripts, a meta-guard test and CI wiring. So adoption always waits for an explicit yes from the user. Whether the project is greenfield or established changes what the offer says; the question is asked either way.
Per-project state lives in .tdd-bdd-harness/state.local.json at the repo root.
It is machine-local, so .tdd-bdd-harness/ goes in the project's .gitignore.
{ "status": "adopted" | "declined", "decidedAt": "<ISO date>" }
adopted: the harness lives here. Skip the gate and work the
Maintenance loop.declined: the project said no on purpose. Leave the topic closed, and
answer only if the user asks about it directly.SessionStart hook flags a repo that qualifies (one with a real
test runner, or a codebase big enough to be worth a catalogue). Offer only
when it has flagged the repo. The hook only injects context; it never asks
anything itself.Shape the offer to the project, then ask with the question tool:
@gap @wip as a backlog. The existing code stays as it is.Handle exactly these three answers:
reference/bootstrap.md from Phase 0. Phase 3 records
adopted.{"status": "declined", "decidedAt": "<today>"}.Bootstrap Phase 3 copies these into the target repo's CLAUDE.md, adapted to
its real commands and paths.
@gap @wip, and only
while it is actively being developed. A bare @gap fails CI.tsc --noEmit can be a no-op under
project references.@loop live
check, red-proof its pure-core unit pin instead, because inverting the live
check would trigger the real call it exists to test.Follow these steps for every new or changed behaviour in a harnessed repo:
TDD.md and BDD.md for this repo's real commands, seams and domain
terms.features/ that covers the behaviour, and update it. If
none covers it, add one tagged @gap @wip. When the change touches parallel
ordering, a state machine, a bounded counter (points, hearts, money) or a
rule for any size, offer a formal rule once with the question tool
(reference/formal.md); add one only after a yes.# Backed by: replaces @gap @wip. Use
scripts/quality/apply_backed_by.py for a batch, or edit by hand for a
single one.scripts/quality/build_coverage_matrix.py.Done when all of these hold:
The meta-guard checks scenario→test only, so step 2 depends on you. Code shipped with no scenario keeps CI green.
reference/audit.md (opens in a new tab)reference/bootstrap.md (opens in a new tab)reference/formal.md (opens in a new tab)templates/apply_backed_by.py (opens in a new tab)templates/build_coverage_matrix.py (opens in a new tab)templates/formal_stamp.py (opens in a new tab)templates/live_checks_skeleton.py (opens in a new tab)templates/test_catalogue_integrity.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub furkanzt/claude-tdd-bdd-harness --plugin tdd-bdd-harness