From srnnkls-tropos
Enforce test-driven development (RED-GREEN-REFACTOR). Use when implementing features, fixing bugs, or changing behavior - write failing test first, then minimal code to pass.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-2 --plugin srnnkls-troposThis skill uses the workspace's default tool permissions.
Write the test first. Watch it fail. Write minimal code to pass.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Write the test first. Watch it fail. Write minimal code to pass.
Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.
Always use for:
Exceptions (confirm with user):
Workflow Integration:
task-dispatch skill (it enforces TDD per task with quality gates)NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Wrote code before the test? Delete it. Start over. No exceptions.
Write one minimal test showing what should happen.
Requirements:
MANDATORY. Never skip.
Run the test. Confirm:
Test passes immediately? You're testing existing behavior. Fix the test.
Write the simplest code to pass the test.
DO: Just enough to pass, simple implementation DON'T: Add features, refactor other code, add configurability
MANDATORY.
Run the test. Confirm:
Only after green:
Keep tests green. Don't add behavior.
Next failing test for next behavior.
| Excuse | Reality |
|---|---|
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
| "I'll test after" | Tests passing immediately prove nothing. |
| "Already manually tested" | Ad-hoc is not systematic. No record, can't re-run. |
| "Deleting X hours is wasteful" | Sunk cost fallacy. Unverified code is debt. |
| "Need to explore first" | Fine. Throw away exploration, then TDD. |
| "Test hard to write" | Hard to test = hard to use. Simplify design. |
All of these mean: Delete code. Start with TDD.
Before marking work complete:
When implementing as a subagent, you MUST output this evidence block:
tdd_evidence:
tests_written:
- name: "test_feature_x"
file: "tests/test_x.py"
red_output: "FAILED - [actual failure message]"
green_output: "PASSED - 1 passed in 0.05s"
implementation_files:
- path: "src/feature.py"
all_tests_pass: true
test_command: "pytest tests/test_x.py -v"
final_output: "[full test output]"
This is REQUIRED for SubagentStop hook verification.
Use with:
code-debug - Write failing test to reproduce bug before fixingtask-dispatch - Subagents follow TDD for each taskcompletion-verify - Run tests before claiming completion