tdd
Installation
SKILL.md
Activation Contract
Use this skill for any request to implement or change behavior in code. Skip only for docs-only, config-only, or mechanical edits with no behavior change (say so; apply refactor only if code shape changes). Not for latent-bug scans (bug-scan) or module redesign (module-design).
Hard Rules
- ALWAYS write the pre-implementation doc first to
docs/implementations/{YYYY-MM-DD}-{slug}.mdfromassets/implementation-doc.md(sections: Goal & problem, Acceptance criteria, Test plan); never overwrite an existing doc (suffix-2,-3). - NEVER write production code before a failing test: red, then green, then refactor, one behavior per cycle.
- The test plan covers happy, edge, and error cases; every acceptance criterion maps to a test. If a test must change to pass, the doc is wrong: fix the doc, never weaken the test.
- After green, load the
refactorskill for the refactor phase before the next cycle. - Detect language, test framework, and run command from the repo; ask if ambiguous. Stack-agnostic.
- Run the full relevant suite plus lint and typecheck before claiming done.