Test driven development
BDK — Broneq Dev Kit. Reusable Claude Code workflows: skills, agents, and hooks for TDD, planning, code review, and architecture documentation.
npx -y skills add broneq/bdk --skill test-driven-developmentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Rigid TDD process for writing and verifying tests before implementation. Use when implementing any feature or bugfix. Receives test case bullet points from the plan and enforces red-green cycle.
SKILL.md
4.4 KB, as published. Nobody here has run it
Test-Driven Development
Relies on BDK foundation (STARTUP_INSTRUCTIONS.md) for project context and MCP tool preference.
Rigid, gated process. Follow every gate in order. No skipping.
digraph tdd {
rankdir=TB
node [shape=box, style="rounded,filled", fillcolor="#f0f0f0"]
start [label="Receive test cases\n+ implementation spec", shape=ellipse, fillcolor="#d4edda"]
g0 [label="GATE 0\nLoad project context\nFind test conventions", fillcolor="#cce5ff"]
g1 [label="GATE 1\nWrite tests from ✅ bullets\nGap scan for edge cases", fillcolor="#cce5ff"]
g2 [label="GATE 2\nDelegate to test-runner\nExpect: ALL FAIL", fillcolor="#cce5ff"]
tests_pass [label="Tests\nPASS?", shape=diamond, fillcolor="#fff3cd"]
stop_investigate [label="STOP\nImplementation exists\nor test is wrong.", shape=ellipse, fillcolor="#f8d7da"]
g3 [label="GATE 3\nImplement as described in plan", fillcolor="#cce5ff"]
g4 [label="GATE 4\nDelegate to test-runner\nExpect: ALL PASS", fillcolor="#cce5ff"]
green_pass [label="Tests\nPASS?", shape=diamond, fillcolor="#fff3cd"]
fix_attempt [label="Fix implementation\n(attempt N/3)", fillcolor="#fff3cd"]
too_many [label="STOP\nAsk user", shape=ellipse, fillcolor="#f8d7da"]
attempts_left [label="Attempts\n< 3?", shape=diamond, fillcolor="#fff3cd"]
done [label="Task done ✓", shape=ellipse, fillcolor="#d4edda"]
start -> g0
g0 -> g1
g1 -> g2
g2 -> tests_pass
tests_pass -> stop_investigate [label="YES (unexpected)"]
tests_pass -> g3 [label="NO (expected)"]
g3 -> g4
g4 -> green_pass
green_pass -> done [label="YES"]
green_pass -> attempts_left [label="NO"]
attempts_left -> fix_attempt [label="YES"]
attempts_left -> too_many [label="NO"]
fix_attempt -> g4
}
Input
Plan task provides:
**Test cases:**
- ✅ Positive: given [input], expects [output]
- ❌ Negative: given [invalid input], raises [error]
**Implementation:** [what to build — file path, class, method]
GATE 0: Load Context
Read project context:
- Test file conventions (location, naming)
- Test framework
- Existing patterns (fixtures, factories, assertions)
Tool-assisted discovery:
!python3 ${CLAUDE_PLUGIN_ROOT}/scripts/inject.py --chain ${CLAUDE_PLUGIN_ROOT}/fragments/tool-tiers/search.chain.json
Using the search tools above: find existing tests to avoid duplication, understand blast radius to prioritize edge cases.
Identify test file path per project conventions.
Cannot proceed without understanding project test conventions.
GATE 1: Write Tests
Write test per ✅ bullet. Follow conventions from GATE 0.
Before writing, scan spec for:
- Boundary conditions (empty list, zero, first/last element)
- Invalid types or missing required fields
- Unexpected None or absent optional data
Add tests for meaningful gaps. No padding.
Negative tests (❌ bullets): Write when real value exists. Skip if no meaningful failure modes.
Cannot proceed until every ✅ bullet has corresponding test.
GATE 2: Verify RED
Inject test command: !python3 ${CLAUDE_PLUGIN_ROOT}/scripts/get_settings.py test-tools
Delegate to /bdk:test-runner agent using injected command above (fall back to detecting from project context if unavailable):
Run the project's test suite against: {test_file_path}
Expected: ALL written tests FAIL
Tests PASS: Stop. Implementation already exists or test wrong.
Tests FAIL as expected: Proceed to GATE 3. ✓
GATE 3: Implement
Implement per plan task. Focused on passing tests — no extra features.
GATE 4: Verify GREEN
Delegate to /bdk:test-runner agent using injected command from GATE 2:
Run the project's test suite against: {test_file_path}
Expected: ALL tests PASS
Tests FAIL: Fix implementation. Max 3 attempts. After 3, stop and ask user.
Tests PASS: Proceed. ✓
Anti-Patterns
- ❌ Skipping GATE 2 ("I know it will fail")
- ❌ Writing implementation before tests exist
- ❌ Forcing negative test when no real failure mode exists
- ❌ Hardcoding test commands — always detect project's test runner
Gives 0 of the 12 instructions most tdd skills give
Counted across 439 of the 443 authors here whose files we hold, read 2026-08-06
- write minimal code to pass the testin 302 of 439, across 218 files
- write a failing test firstin 176 of 439, across 112 files
- refactor code only after tests passin 171 of 439, across 101 files
- watch the test fail before writing codein 142 of 439, across 93 files
- test one behavior per testin 106 of 439, across 44 files
- refactor code while keeping tests greenin 99 of 439, across 86 files
- delete code written before testsin 98 of 439, across 54 files
- run tests after each refactor stepin 85 of 439, across 54 files
- Use real code instead of mocks unless unavoidablein 64 of 439, across 21 files
- confirm the test fails for the right reasonin 64 of 439, across 60 files
- reproduce bugs with a test before fixingin 53 of 439, across 36 files
- write tests before implementationin 48 of 439, across 39 files
Said here and by no other author read
- follow every gate in order without skipping
- discover project test conventions before proceeding
- write tests for every positive test case bullet
- scan specifications for boundary conditions before writing tests
- add tests for meaningful gaps without padding
- skip negative tests if no real failure mode exists
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.