Implement code following TDD/RGRC cycle with real-time test feedback. Use when user mentions 実装して, コード書いて, implement, coding. Do NOT use for small bug fixes or error resolution (use /fix instead).
From shipnpx claudepluginhub thkt/dotclaude --plugin toolkitThis skill is limited to using the following tools:
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Calculates TAM/SAM/SOM using top-down, bottom-up, and value theory methodologies for market sizing, revenue estimation, and startup validation.
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.
Violation → delete the code, write the test, then rewrite.
Before writing any code, declare:
Starting TDD RGRC cycle. Every code change begins with a failing test.
| Excuse | Counter |
|---|---|
| "This is too simple for TDD" | Simple changes hide regressions. One test line prevents hours of debug |
| "I'll add tests later" | "Later" never comes. Test debt compounds with interest |
| "This is just a refactor" | Refactors without tests are the #1 cause of silent regressions |
| "Existing tests already cover" | If they do, Red phase will confirm it. Run it |
| "Testing this would be too slow" | A slow test is faster than a production bug |
Implementation description: $1 (required, prompt if empty) Flags:
--frontend, --principles, --storybook
| Flag | Loads |
|---|---|
--frontend | applying-frontend-patterns |
--principles | applying-code-principles |
--storybook | integrating-storybook |
[@../skills/lib/sow-resolution.md]
After reading SOW, check Phase file counts. If any Phase has Files ≥ 5, stop and
ask user to split via /think before proceeding. If no SOW exists and $1
implies ≥ 5 files, suggest running /think first.
test-gen as standalone background agent
(subagent_type: test-generator, run_in_background: true)TaskOutputralph-loop --max-iterations 10 auto-iterationcode-quality-reviewer (skip for /fix)During implementation, new requirements may be discovered (edge cases, error handling, integration concerns). When this happens:
This keeps the Spec as the single source of truth. The test-quality-evaluator
agent uses T-NNN mappings to compute coverage scores.
After Review Gate, before Quality Gates. Skip entirely if any condition fails.
| # | Check | How | On fail |
|---|---|---|---|
| 1 | Spec has Type: e2e scenarios | Grep Spec Test Scenarios table | skip (silent) |
| 2 | agent-browser installed | which agent-browser | skip + advisory |
| 3 | Dev server detected in package.json | Match dev, start:dev, start scripts | skip + advisory |
| 4 | Dev server running (user confirms) | AskUserQuestion: "Dev server at {url}?" | skip + advisory |
From package.json scripts (same pattern as /feature Phase 4.5):
| Priority | Script name pattern | Default URL |
|---|---|---|
| 1 | dev, start:dev | http://localhost:5173 |
| 2 | start | http://localhost:3000 |
| 3 | storybook, storybook:dev | http://localhost:6006 |
Extract port from script value if specified (--port, -p, PORT=).
Agent(subagent_type: "e2e-test-generator",
prompt: "spec_path: <path>\ndev_server_url: <url>",
run_in_background: true)
Results: generated tests run and pass → proceed. Failures → advisory (do not block Quality Gates).
After RGRC cycle, verify each AC is met (implemented + tested). Skip if no SOW.
If Spec exists, run via Agent(subagent_type: "test-quality-evaluator") in
background. Score ≥70 required. See orchestrating-workflows for gate details.
| Error | Action |
|---|---|
| test-gen background timeout | Leader generates tests directly |
| test-gen produces 0 tests | Verify spec exists, ask user |
| Ralph-loop stalls | Stop loop, fix manually |
| Quality gates fail | Fix issues before commit |
| Evaluator score <70 | Fix uncovered/excess/intent issues |
| Evaluator timeout | Skip gate, log warning |
| Spec not found | Create spec.md or ask user |
| agent-browser crash | Skip E2E, advisory, continue |
| Dev server unreachable | Skip E2E, advisory, continue |
| E2E tests fail | Advisory (do not block) |