Tdd

From stevesolun/ctx · View interactive version

Tdd is an AI agent skill from the GitHub repository stevesolun/ctx. Apply test-driven development with small, behavior-focused feedback loops. Use when the user asks to build or fix something test-first, mentions red-green-refactor, or wants integration tests.

How to use this skill

Skill file

Test-Driven Development

Use small red → green → refactor cycles when a test-first feedback loop is

practical. Treat repository conventions, existing tests, and the requested

behavior as authoritative.

Loop

  1. Identify one observable behavior and the seam through which callers see it.
  2. Write the smallest meaningful test and confirm that it fails for the expected

reason.

  1. Add only enough implementation to make the test pass.
  2. Refactor when doing so improves clarity or design; keep the suite green.
  3. Repeat with the next vertical slice.

Infer seams from public interfaces and nearby tests. Ask the user only when

choosing a seam would materially change the product contract, cost, or scope.

Judgment

independent source rather than duplicating the implementation.

repository patterns where they provide an adequate feedback loop.

related mechanical cases when that is clearer and faster.

usable seam—state the limitation and establish the nearest reliable

characterization or integration test.

Read tests.md for examples and mocking.md when deciding

whether and where to use test doubles.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.