From 28f435ea69a78531ec00779c7f3b78c64ce95896 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Sun, 27 Sep 2026 00:56:34 +0200 Subject: [PATCH] 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 --- skills/code-review-and-quality/SKILL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/skills/code-review-and-quality/SKILL.md b/skills/code-review-and-quality/SKILL.md index f594590a..08209ff2 100644 --- a/skills/code-review-and-quality/SKILL.md +++ b/skills/code-review-and-quality/SKILL.md @@ -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: