J Tdd

Autonomous TDD implementation loop — write tests first, run to confirm failure, implement until green, lint, commit. Use when add…

jlaws 2 updated 1mo ago
Claude CodeGeneric
View source ↗
---
name: j-tdd
description: "Autonomous TDD implementation loop — write tests first, run to confirm failure, implement until green, lint, commit. Use when adding a feature or fixing a bug with test-driven development. Do NOT use for debugging existing failures (use /j-debug)."
argument-hint: "<feature or bug description>"
---

Feature/bug: $ARGUMENTS

If no arguments provided, ask what the user wants to implement.

Invoke the `test-driven-development` skill via the Skill tool before coding. Then follow this execution loop in order — do not skip or reorder steps:

1. **Explore** — Read existing code around the feature area. Identify edge cases, existing patterns, and test infrastructure (test runner, fixtures, helpers).
2. **Write tests** — Cover happy path, error cases, and edge cases. Tests MUST fail initially.
3. **Verify RED** — Run the full test suite. Confirm every new test fails for the expected reason (feature missing, not typos or import errors). Paste output.
4. **Implement** — Make each test pass one-by-one. After each change, run the full test suite. Write minimal code.
5. **Lint** — Run the project's formatter and linter (check Makefile, package.json scripts, or pyproject.toml for commands). Fix all issues.
6. **Final verification** — Run the full test suite. Paste output confirming all tests pass and output is clean.
7. **Commit** — Create a commit summarizing what was implemented and test coverage achieved.

Do not move to step 4 until ALL tests from step 2 are written. Do not skip running tests between implementations in step 4.

Maintain J Tdd?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[J Tdd on getagentictools](https://getagentictools.com/loops/jlaws-j-tdd?ref=badge)