원클릭으로
fix-first-then-test
Land every code fix before running the test harness. Use grep + read to debug; the harness is a verifier, not a debugger.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Land every code fix before running the test harness. Use grep + read to debug; the harness is a verifier, not a debugger.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Pass model explicitly when dispatching sub-agents. Parent-default inheritance bypasses cost considerations; reserve stronger models for tasks that genuinely need them.
When a commit changes a component's public API, the same commit must update every test asserting the removed surface — split commits leave CI broken even when each commit is internally consistent.
When a class of bug keeps slipping through tests, run a coverage-matrix audit first, then fan out fix agents per gap — don't whack-a-mole individual failures.
Before pushing to CI, validate that your local test run is representative — three predictable axes diverge (gitignored fixtures, dev-only ports, dev-only env vars) and each has a deterministic fix.
Tests that mock the layer where the bug lives cannot catch bugs at that layer. Write tests that drive the same code path the user drives, ending at something the user can see.
When verifying or fixing a multi-layer change, dispatch each test layer and each independent fix as a parallel sub-agent rather than running serially in the main context.
| name | fix-first-then-test |
| description | Land every code fix before running the test harness. Use grep + read to debug; the harness is a verifier, not a debugger. |
| metadata | {"tags":["process","testing","debugging","discipline"]} |
Reproduce in your head from the code. Read the relevant files. Use grep to trace the call path. Identify the exact line(s) responsible. Do NOT start the harness before completing this step.
Fix all known bugs for a logical unit. If three bugs share a root cause, fix all three together. If three bugs are independent, dispatch three fix agents in parallel (see [[parallel-fanout-verification]]). Each fix gets one atomic commit with a why-first message.
Run the harness after all in-flight fixes are committed. Fan out: pytest + vitest + Playwright + live integration, all in parallel sub-agents. Never run them one-by-one.
Act on harness reports. A new failure = GOTO step 1, not "let's see if another run clears it."
| Goal | Tool |
|---|---|
| Find where a variable is set | grep -r "varname" src/ |
| Trace a call path | Read the call site, then the callee, then its deps |
| Confirm a hypothesis about state | Read the relevant state store / hook |
| Understand a component's render conditions | Read the component's return, not the test |
When a harness run reports failures:
The test harness is optimized for breadth: it runs every case, produces complete output, and terminates. It is not optimized for locality: the failure message points at what broke, not why. Using the harness as the first step of debugging forces you to read failure output, form a hypothesis, and THEN read the code — which is the same work you would have done by reading the code first, but with thousands of lines of noise in between. Reading the code first is faster and preserves context.