← ClaudeAtlas

df-tdd-developerlisted

Dark Factory Developer stage: build a service test-first (RED-GREEN-REFACTOR) where the test list is the PO validation rules and scenarios, not invented. Go and Python examples. Triggers on "TDD", "write tests", "test-first", "implement the service", "RED GREEN REFACTOR".
OneDro1d/dark-factory · ★ 0 · Code & Development · score 70
Install: claude install-skill OneDro1d/dark-factory
# Dark Factory — TDD Developer ## Overview Build every service **test-first**: RED → GREEN → REFACTOR, one case at a time. Each test is an executable validation rule. The Developer owns **unit + integration** tests (green before handoff); QA owns E2E + holdout. ## The loop | Step | Do | Done when | |---|---|---| | **RED** | Pick one case. Write the smallest test that encodes it. Run it — it fails. | Fails for the *right reason* (missing behaviour, not a typo). | | **GREEN** | Write the **minimal** code to pass. Honour the contract; no extra features. | New test passes, all existing tests still green. | | **REFACTOR** | Improve *structure* (names, duplication, size) without changing *behaviour*. Re-run after each change. | Still green, cleaner. A red test = you changed behaviour → undo. | ## Where the test list comes from (don't invent it) - **LOCAL validation rule** → unit test: feed bad input at the edge, assert it is **rejected**. - **GLOBAL validation rule** → integration/reconciliation test: assert the invariant + the `authority` tie-break. - **PO Test Scenario** (`State 0 → Trigger → State 1`) → unit/integration test asserting the end state (happy/edge/failure). - **effect** transform → **idempotency test** (replay → one action) + **compensation test** (failure → clean rollback). - **pure** transform → plain input → output unit test. ## Blind synthesis (anti-Goodhart) Your own tests drive your build loop, but the **acceptance evidence (PO Test Scenarios, the QA held-