Skip to content

feat(#587): /qa §4 Q5 intra-file sibling-site audit + cross-file §5 reframe - #589

Merged
admarble merged 2 commits into
mainfrom
feature/587-feat-qa-add-4-prompt-for-intra-file-bug-class-gene
May 7, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/587-feat-qa-add-4-prompt-for-intra-file-bug-class-gene

Conversation

@admarble

@admarble admarble commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a fifth question to /qa §4 (Failure Path & Edge Case Testing) prompting reviewers to audit other call sites in the same file/function that share the bug's root-cause pattern. Catches the class of bug PR fix(#575): cleanup-worktree.sh stays on main worktree before destructive remove #579 round-1 missed.
  • Reframes §5 Sibling-site Scan as the cross-file complement (was intra-file-leaning) so §4 and §5 cover the full sibling-site vulnerability class without overlap.
  • Adds a **Sibling-line audit:** bullet to all three Risk Assessment output templates so skipping the audit is visibly absent from the verdict.

AC Coverage

AC Status Evidence
AC-1: §4 fifth question, language-neutral example ✅ templates/skills/qa/SKILL.md:1462
AC-2: Distinguishes §4 (intra-file) from §5 (cross-file) ✅ §4 Q5 cross-ref + §5 prose reframed (templates/skills/qa/SKILL.md:1485,1487)
AC-3: Mirrored across all three qa/SKILL.md ✅ diff -q between all three pairs is clean
AC-4: **Sibling-line audit:** bullet in 3 Risk Assessment instances ✅ grep returns 3 hits per file (9 total)

Notes

  • §4-vs-§5 framing: Implemented spec's recommended Option A — reframed §5 prose ("same file/module" → "other files in the codebase") so §4 Q5 owns intra-file. Existing "Sibling sites considered:" bullet description updated for internal consistency.
  • Not a verdict-blocker: Visible-absence in the template is the lever, matching §5 Scan's stance. Verdict algorithm unchanged.
  • Cost: ~30s additional review time per PR. Worth it for the bug class it catches.

Test plan

Closes #587

…eframe

Add a fifth question to /qa Section 4 (Failure Path & Edge Case Testing)
prompting reviewers to audit other call sites in the SAME file/function
that share the root-cause pattern. The literal repro from the issue body
is necessary but not sufficient when destructive operations / wrong null
checks repeat at adjacent lines.

Reframes Section 5's Sibling-site Scan as the cross-file complement so the
two scans cover the full sibling-site vulnerability class without overlap.
Adds a "Sibling-line audit:" bullet to all three Risk Assessment output
templates so skipping the audit is visibly absent from the verdict.

Mirrored across all three qa/SKILL.md files (templates, .claude, skills).

Closes #587
Self-dogfood of the new §4 Q5 prompt against this PR surfaced 3 stale
references to §5 in §6d (Adversarial Re-Read) that the §5 reframe missed:

- Line 1927 (sub-prompt definition): cited "single-pattern file" and
  framed §5 as the sole sibling-site mechanism.
- Lines 1956 + 2887 (output-format templates, two duplicates per file):
  "Reference Section 5's scan, OR justify N/A" — no acknowledgement of
  §4 Q5's intra-file complement.

All three rewritten to reference both §5 (cross-file) and §4 Q5 (intra-file)
explicitly, mirrored across all three qa/SKILL.md locations (9 edits total,
3 lines × 3 mirrors).

Validates §4 Q5's design: structured QA caught 1/3 of these residues
(line 1927 flagged as follow-up); the new prompt applied to the PR itself
caught the other two sibling lines with the same root-cause framing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(qa): add §4 prompt for intra-file bug-class generalization (sibling lines, same root cause)

1 participant