mcpField
D
ds-tdd

ds-tdd

github.com/aicodekingTesting & quality150272 installsUpdated 6d ago
Repository

About ds-tdd

ds-tdd is a skill that guides coding agents through test-driven bug fixes, from reproducing a defect to checking the fix and nearby tests.

Key features

  1. 01Pin down and reproduce bugs
  2. 02Follow existing test conventions
  3. 03Run tests before fixing to confirm failure
  4. 04Check the fix and surrounding suite
  5. 05Use runnable checks when tests are impractical

Use cases

  1. 01Write regression tests for reported bugs
  2. 02Verify failures come from the bug, not test errors
  3. 03Validate small production-code changes
  4. 04Check a repro script or logs when tests do not fit

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aicodeking/deepseek-stack --skill ds-tdd

After installing, type/ds-tddin Claude Code to confirm it loaded.

Details

From the project README

ds-tdd

Make the bug executable before touching production code, so the fix is proven, not claimed.

Steps

  1. Pin down the bug: expected behavior, actual behavior, the code path, and the smallest way to reproduce it.
  2. Find the nearest existing test style for that code path. Use it. Do not build a new harness just for this.
  3. Write the smallest test that would have caught the bug. It checks intended behavior, not the current implementation.
  4. Run it. Show the output. It must fail, and fail for the bug, not for a typo or missing import. If not, fix the test first.
  5. Make the smallest production change that gives the intended behavior without breaking nearby contracts.
  6. Run the new test and the surrounding suite. Show the output.
  7. If a clean test is impractical (heavy setup, brittle mocks, production-only state), use the closest runnable check instead: a script, a repro command or a log check. Say why you skipped the test.

Stop when

  • The new test failed before the fix and passes after it, both shown with output, and the surrounding suite passes.
  • Or after three fix attempts the test still fails. Stop, report what you learned and run /ds-unstick.

Rules

  • Never edit a test to match a wrong implementation.
  • Do not weaken existing assertions without a clear, stated reason.
  • No test beats a bad test: one that mostly tests mocks, depends on timing, or would be deleted right after.

Comments

Markdown supported