tdd-loop

Implements features via autonomous red-green-refactor TDD loops with test-first commits and PR creation.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/shawn-sandy/agentics-kit --skill tdd-loop-shawn-sandy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-loop
Source: https://github.com/shawn-sandy/agentics-kit/tree/main/kit/plugins/code-testing-agent/skills/tdd-loop
Command: npx skills add https://github.com/shawn-sandy/agentics-kit --skill tdd-loop-shawn-sandy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Manually running test-driven development cycles is repetitive and error-prone: writing failing tests, iterating on production code, running typecheck and lint gates, and structuring commits and PRs. This Skill automates the entire TDD workflow from failing test suite to merged-ready pull request. ## Core Features & Use Cases - Autonomous Red-Green-Refactor Loop: Writes a failing test suite from acceptance criteria, commits it, then iterates up to 20 times — running tests, forming hypotheses, and editing production code until all tests pass. - Quality Gates and Guardrails: Runs typecheck, lint, and a full regression suite with up to 5 fix iterations, enforces forbidden edits (no deleting tests, no mocking the unit under test), and stops cleanly on hard caps. - Structured Commits and PRs: Produces exactly two conventional commits (test: then feat:) and opens a PR embedding the full TDD iteration log for reviewer transparency. - Use Case: Ask the agent to TDD a new accessible Tabs component with a numbered list of acceptance criteria; it writes the failing Vitest suite, iterates on the implementation, passes gates, and opens a PR with the iteration log. ## Quick Start Ask the agent to TDD a new feature by providing a feature description with a numbered list of acceptance criteria on a clean feature branch.

Frequently Asked Questions about tdd-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an autonomous TDD workflow for a new feature?▼

Invoke tdd-loop with a feature description and a numbered list of acceptance criteria on a clean feature branch. It writes a failing test suite, commits it, then iterates up to 20 times editing production code until all tests pass, runs quality gates, and opens a PR.

What test frameworks does tdd-loop support?▼

It detects frameworks by inspecting package.json, vitest.config, pytest.ini, pyproject.toml, go.mod, and Cargo.toml. If no framework is detected, it asks once whether to use a zero-dependency Bash fixture pattern or abort.

What happens if tests are still failing after 20 iterations?▼

The loop stops, prints the full iteration log, and makes no implementation commit or PR. The test commit stays on the branch and partial code changes remain uncommitted on disk for manual inspection or continuation.

Can tdd-loop modify or delete tests during the implementation loop?▼

No. Deleting tests, skipping tests, mocking the unit under test, and weakening assertions are forbidden. A single test edit is allowed per run only for genuine test defects, and it counts as two iterations against the 20-iteration cap.

When should I not use tdd-loop?▼

Do not use it to fix existing bugs — use tdd-fix instead — or to suggest tests without implementing them, which is the code-testing-agent's role. It also requires a clean working tree, a non-main branch, and explicit acceptance criteria.