TWISTEdBRACKETS

Skill

Test-Driven Development

The core build loop: red-green-refactor with node:test until every requirement passes.

// workflow;

Behaviour

What it does

  • Writes a failing node:test before any production code
  • Names tests with REQ-IDs for traceability (e.g. REQ-042-AC1)
  • Confirms the failure message matches the requirement
  • Writes the minimal code to pass, then refactors while staying green
  • Never weakens a test to force green; fixes the code instead
  • Covers unit tests beside source and functional tests in test/
  • Loops until the requirement is fully covered

When to use

Good fits

During executing-plans, for each implementation task

When you want disciplined red-green-refactor, not vibe coding

For any feature work where tests should drive the design

Development harness

Inner loop

Part of the design-to-ship pipeline: brainstorming → technical-documentation → conformance-check → reconciling-changes → planning → project-setup → executing-plans → shipping. Install the full set for structured feature work.

Used inside executing-plans as the inner red-green-refactor loop for each task.

Install

Get this skill

Uses Agent Kit via npx; no global install required.

Quick install

sh
npx @levi-putna/agent-kit@latest add levi-putna/skills --skill test-driven-development

Global (Cursor)

sh
npx @levi-putna/agent-kit@latest add levi-putna/skills --skill test-driven-development --global --agent cursor

Global (Claude)

sh
npx @levi-putna/agent-kit@latest add levi-putna/skills --skill test-driven-development --global --agent claude

Project install

sh
npx @levi-putna/agent-kit@latest add levi-putna/skills --skill test-driven-development --project

Interactive install

sh
npx @levi-putna/agent-kit@latest add levi-putna/skills

Uninstall

sh
npx @levi-putna/agent-kit@latest remove test-driven-development

Example

Example prompt

Test-Driven Development

Implement the cart total requirement with TDD. Watch the test fail first.

Flow

How the skill works

  1. Write a failing test for one requirement
  2. Run node:test and confirm it fails for the right reason
  3. Write minimal code to pass
  4. Refactor while keeping tests green
  5. Repeat until the requirement is done