mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-10-26 15:05:04 +00:00
docs(code-review): answer the regression question with a mutation
Step 2 asks "Would the tests catch a regression if the code changed?" but gives no way to answer it. Reading the tests answers it badly: a check tested in only one direction looks covered. Inverting one condition of the change and running the suite answers it in one run, and a surviving mutation names the missing test case. Assisted-by: claude-code:claude-opus-5-5 Agent-Session: https://claude.ai/code/session_01282cSgXhjM3B6sZA1ZRCSF Agent-Host: 0493f0 Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
This commit is contained in:
1 file changed
+2
@@ -161,6 +161,8 @@ Tests reveal intent and coverage:
|
||||
- Would the tests catch a regression if the code changed?
|
||||
```
|
||||
|
||||
Answer the last question by experiment, not by reading. Invert one condition the change adds (drop a negation, swap `&&` for `||`), run the suite, then restore the file from a copy. A mutation that stays green is a finding: name the test case that is missing. For a project-wide mutation score, see `constraint-driven-development`.
|
||||
|
||||
### Step 3: Review the Implementation
|
||||
|
||||
Walk through the code with the five axes in mind:
|
||||
|
||||
Reference in new issue
Block a user