adr
Architecture decision records: durable decisions with their date, context, and consequences — supersede, never rewrite.
Test-driven development with tests that actually catch breaks: red before green, name the break each test catches, and the mutation check before done.
> /plugin marketplace add azrtydxb/procoder > /plugin install procoder@procoder
How it fires
How this command gets triggered: by you, by Claude, or both.
/tddContext preview
What this command does when you run it.
Test-driven development with tests that actually catch breaks: red before green, name the break each test catches, and the mutation check before done.
description: "Test-driven development with tests that actually catch breaks: red before green, name the break each test catches, and the mutation check before done."
The user invoked /procoder:tdd with arguments:
The launcher is: "${CLAUDE_PLUGIN_ROOT}/hooks/launcher.sh"
The iron law: **no production code without a failing test first.** Wrote code before the test? Delete it and start over — don't keep it "as reference". Violating the letter of this rule is violating its spirit. The arguments (if any) name the feature or fix to drive; apply the cycle to it.
The cycle, every behaviour:
1. **RED** — write one minimal test for one behaviour, then RUN it and watch it fail. This step is mandatory evidence, not ceremony: a test that passes immediately is testing existing behaviour (fix the test); a test that errors isn't failing for the right reason (fix it until it fails on the assertion you meant). 2. **GREEN** — the simplest code that passes. No options, no flags, no flexibility nobody asked for. Run the test (pass), run the suite (pass), output pristine — a new warning is a finding. 3. **REFACTOR** — only on green, no new behaviour, suite green after.
Writing tests that earn their keep:
change makes this test fail — and is that change a bug?" No answer → redesign the test around observable behaviour. Asserting a constant equals itself, or that source text contains a line, catches decisions, not bugs.
values computed by the same code path being tested — mirror assertions always pass.
trivial forwarding earn tests only when they validate, normalise, default, or cause side effects.
depends on real; a mock mirrors the real data completely (a partial mock passes the test and fails the integration); mock setup outgrowing the test logic means you want an integration test.
the production code — wrong constant, flipped branch, missing side effect, empty return, dropped validation. At least one test must fail for each realistic mutation; a mutation nothing catches marks that behaviour as unprotected.
Exceptions (throwaway spikes, generated code) exist — but ask the user first; "skip TDD just this once" arriving mid-task is rationalisation, not an exception. When stuck: hard to test = hard to use; a test needing heavy mocking is telling you the design is too coupled.
Evidence discipline: the RED command + failing output and the GREEN command + passing output go into the task's `## Evidence` section — that is exactly what `launcher.sh todo close` will ask you for.
Senior-developer discipline for AI coding agents. A commit gate that counts unchecked as failing, quality controllers that refuse to call unfinished work done, and a lessons loop that closes each escaped bug's class. One Go binary, no runtime deps, works with 20+ agents.
Architecture decision records: durable decisions with their date, context, and consequences — supersede, never rewrite.
Onboard an existing codebase: every domain's checks over the whole tree, then a triaged plan to bring it in line.
The project layer: milestones, epics, and user stories with refusing controllers — spec-seeded, sprint-ready.
Run the formatting gate over the changed files, as a commit or CI would.
CI/CD hygiene and run health: pinned actions, timeouts, concurrency, tests — plus the latest runs via gh.
Copilot's auto-review escapes: find them since the last look, sanitise them, and turn each one into a lesson.