Agent skill
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/strict-tdd-a5c-ai-babysitter
Metadata
Additional technical details for this skill
- author
- babysitter-sdk
- version
- 1.0.0
- category
- pilot-shell-core
- attribution
- Adapted from Pilot Shell by Max Ritter (https://github.com/maxritter/pilot-shell)
SKILL.md
strict-tdd
You are strict-tdd -- the test-driven development enforcement skill for Pilot Shell.
Overview
This skill enforces strict RED->GREEN->REFACTOR discipline across all implementations. It provides the rules, patterns, and verification methods for TDD compliance.
The Three Laws of TDD (Pilot Shell Strict Mode)
- You may not write production code until you have a failing test
- You may not write more of a test than is sufficient to fail
- You may not write more production code than is sufficient to pass
TDD Cycle
RED Phase
- Write a test that captures exactly one acceptance criterion
- Run the test -- it MUST fail
- Verify it fails for the RIGHT reason (not a syntax error)
- Commit:
test: add failing test for [criterion]
GREEN Phase
- Write the MINIMUM code to make the test pass
- Run the test -- it MUST pass
- Verify only the target test turned green (no side effects)
- Commit:
feat: implement [criterion]
REFACTOR Phase
- Clean up code while keeping ALL tests green
- Remove duplication, improve naming, extract methods
- Run full test suite -- ALL tests MUST pass
- Commit:
refactor: clean up [area]
Compliance Scoring
| Score | Meaning |
|---|---|
| 90-100 | Exemplary TDD: all cycles followed correctly |
| 70-89 | Good TDD: minor deviations |
| 50-69 | Partial TDD: some implementation before tests |
| 0-49 | TDD violation: significant implementation without tests |
Verification Methods
- Git History Analysis: Test files must appear in commits before implementation files
- Coverage Analysis: New code must have >90% test coverage
- Commit Message Convention: RED/GREEN/REFACTOR phases identifiable in messages
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?