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}.md from assets/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 refactor skill 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.

Decision Gates

Installs
13
GitHub Stars
2
First Seen
Oct 3, 2026