Tdd

From ahonn/dotfiles · View interactive version

Tdd is an AI agent skill from the GitHub repository ahonn/dotfiles. Use red-green-refactor when the user requests test-first development or the applicable testing policy selects TDD.

How to use this skill

Skill file

Test-Driven Development

Use this workflow only for test mode tdd or an explicit test-first request. The applicable AGENTS.md testing policy owns mode selection; this skill does not turn skip, verify-only, or add-tests into TDD.

Establish the boundary

Inspect the implementation, nearby tests, and the relevant interface before the first test. Read domain documentation only when it resolves uncertainty about the behavior or vocabulary under test.

Work in vertical slices

  1. Select one observable behavior from the requirement or reproduced bug.
  2. Write a focused test and run it. Confirm it fails for the missing behavior, not a broken fixture, import, or environment.
  3. Add the implementation needed for that behavior and run the relevant test again.
  4. Refactor when it improves the changed code, keeping the relevant tests green. A separate review skill is not a prerequisite.
  5. Repeat for the next meaningful behavior. Finish with the checks appropriate to the changed surface and report only checks actually run.

Do not write a batch of speculative tests before implementing any behavior. Let each completed slice inform the next one.

Keep tests worth maintaining

Read tests.md when choosing assertions or reviewing test quality. Read mocking.md when external dependencies need isolation. Load only the guidance relevant to the current slice.

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.