Repository navigation
Description
Summary
#573 added a sibling-site scan prompt to /qa (PR #576) that fires before the verdict on focused-AC PRs touching multi-pattern files. The issue body's Risks section explicitly flagged that the same prompt belongs in /spec too — earlier in the workflow — but deferred it as out-of-scope for #573. This issue closes the loop.
From #573 / Risks: "Worth doing in /spec instead of /qa? /spec already has Open Questions and could surface sibling sites earlier (and #564's /spec actually did — Open Question 1 broadened from L260 to all 4 git-commit sites). But /qa is the safety net — even if /spec misses, /qa should catch. Probably do both eventually; this issue covers /qa."
Rationale
Catching sibling sites at /spec time is strictly cheaper than catching them at /qa time:
- Pre-implementation: scope can still be widened in the same PR with no merge cost.
- Pre-implementation: the planner can ask the user up front whether to expand scope.
- Post-implementation: any expansion either pads the PR (already implemented) or becomes a follow-up issue (process tax).
The /qa prompt is the safety net — /spec should be the front line.
Proposal
Add a single bullet to .claude/skills/spec/SKILL.md in the Open Questions / planning section that prompts a sibling-site scan during plan generation:
Sibling-site scan (Conditional): When the AC is focused and the fix is localized to a multi-pattern file (≥3 instances of the affected pattern in the same file — e.g. the regex blocks in `pre-tool.sh`), scan the same file/module for sibling code matching the bug's root cause. Surface findings as either (a) an Open Question proposing scope expansion (if trivial), or (b) a recommended follow-up issue. Don't silently widen scope; the user decides.
Mirror across all three spec/SKILL.md directories.
Acceptance Criteria
- AC-1:
.claude/skills/spec/SKILL.mdincludes a "Sibling-site Scan" bullet in the planning / Open Questions section, with the same trigger definition as the/qamirror (≥3 instances of the affected pattern + concrete example). - AC-2: Mirrored to
templates/skills/spec/SKILL.mdandskills/spec/SKILL.md;npx tsx scripts/check-skill-sync.tsreportssynced spec/SKILL.md — 3/3 match. - AC-3: Bullet output options are scoped to planning-stage choices: Open Question proposing scope expansion, OR recommended follow-up issue. (Unlike
/qa, noNEEDS_VERIFICATIONoption — that verdict bucket doesn't apply at spec time.) - AC-4: Pointer to
feedback_qa_second_look.mdincluded for the underlying principle. - AC-5: CHANGELOG entry under
[Unreleased] / ### Changedreferencing this issue, ≤4 lines (matching neighbor entries).
Non-Goals
- Not automating the scan via grep or sub-agent. Pure prose prompt, like
/qa. - Not mandating scope expansion. The bullet's purpose is to surface, not to widen.
- Not updating
/qa—#573/#576covers that side.
Risks / Open Questions
- Could expand
/specplans on tight-AC issues. Mitigation: AC-3 explicitly says the planner offers the choice rather than silently broadening — the user decides. - Where exactly in
spec/SKILL.md? Likely near the Open Questions / Conflict Risk section so it integrates with existing user-facing planning prompts. Investigate during/spec.
Complexity
simple-fix — one bullet added to one section of one skill, mirrored across 3 dirs. No tests required (skill files are docs).
Self-assessed workflow
spec → exec → qa (skip testgen — docs change).
Related
#573/ PR#576—/qamirror; this issue is the deferred/specfollow-upfeedback_qa_second_look.md— underlying principle#570— original gap from/fullsolve 564
Activity
admarble commentedon May 7, 2026
Complexity: Standard (5 ACs, 4 directories)
AC Quality Check
All 5 ACs are concrete and measurable — file/string presence, CLI exit-state (
3/3 match), and CHANGELOG line-count cap. No vague/unmeasurable language. Pass.Scope Assessment
Non-Goals: Provided. (1) No grep/sub-agent automation — pure prose prompt; (2) no mandatory scope expansion — surface only; (3) no
/qachanges — already done in #573 / #576..claude/skills/spec/,templates/skills/spec/,skills/spec/, root forCHANGELOG.md)Verdict: ✅ SCOPE_OK — focused docs mirror with a known exemplar (PR #576).
Conflict Risk Analysis
.claude/skills/spec/SKILL.md,templates/skills/spec/SKILL.md,skills/spec/SKILL.md, andCHANGELOG.md.[Unreleased].Acceptance Criteria
AC-1:
.claude/skills/spec/SKILL.mdincludes a "Sibling-site Scan" bullet with same trigger definition as/qamirrorVerification: Manual Test
Scenario: Given
.claude/skills/spec/SKILL.mdafter the change → When grepping forSibling-site Scan,≥3, andpre-tool.sh→ Then all three strings appear in the same subsectionAssumptions: Subsection placed under
## Context Gathering(after "Feature Branch Context", before "Verification Method Decision Framework"); trigger phrasing mirrors/qaSKILL.md L1545–1549AC-2: Mirrored to all three skill dirs;
check-skill-sync.tsreportssynced spec/SKILL.md — 3/3 matchVerification: Integration Test
Scenario: Given the change applied to all three mirrors → When running
npx tsx scripts/check-skill-sync.ts→ Then stdout contains the literal linesynced spec/SKILL.md — 3/3 matchAssumptions:
scripts/check-skill-sync.tsexists and currently reportsspec/SKILL.md — 3/3 matchonmain(verified — see baseline run); script may exit 1 due to pre-existing drift in unrelated files, which is acceptable per PR #576 precedentAC-3: Bullet output options scoped to planning-stage only (Open Question OR follow-up issue; no
NEEDS_VERIFICATION)Verification: Manual Test
Scenario: Given the new subsection text → When read end-to-end → Then exactly two output options are listed (scope-expansion via Open Question, or follow-up issue) and the string
NEEDS_VERIFICATIONdoes not appear in the new contentAssumptions:
NEEDS_VERIFICATIONis a/qa-only verdict bucket that does not exist at planning timeAC-4: Pointer to
feedback_qa_second_look.mdincludedVerification: Manual Test
Scenario: Given the new subsection → When grepping for
feedback_qa_second_look.md→ Then the filename appears at least once with explanatory framing (matching the precedent in/qaSKILL.md L1553)AC-5: CHANGELOG entry under
[Unreleased] / ### Changed, ≤4 lines, references #580Verification: Manual Test
Scenario: Given
CHANGELOG.mdafter the change → When inspecting the[Unreleased] / ### Changedblock → Then a new bullet appears, line count ≤4, ending with(#580)Assumptions: Format matches the existing #573 entry directly above (one-bullet, prose-style, trailing
(#NNN))Implementation Plan
Phase 1: Mirror the prompt
.claude/skills/qa/SKILL.mdL1545–1553 to anchor the exact phrasing pattern (already confirmed — see context)..claude/skills/spec/SKILL.md: end of## Context Gatheringsection, after### Feature Branch Context(line ~143), before## Verification Method Decision Framework(line ~145). Rationale: this is where the planner finishes gathering context and moves toward verdict synthesis — symmetric to/qa's placement under §5 Risk Assessment.### Sibling-site Scan (Conditional)subsection. Proposed text (3 short paragraphs):pre-tool.shregex blocks as concrete example)./qa's safety net. Pointer tofeedback_qa_second_look.md./qa-specific clauses: noNEEDS_VERIFICATIONoption (AC-3); no orchestrator-vs-sub-agent split (spec planner is orchestrator end-to-end).Phase 2: 3-dir sync + CHANGELOG
feedback_read_each_mirrored_file.md):.claude/skills/spec/SKILL.md→templates/skills/spec/SKILL.md→skills/spec/SKILL.md. Verify withdiff -qbetween any two pairs after each edit.npx tsx scripts/check-skill-sync.ts | grep "spec/SKILL.md"— expectsynced spec/SKILL.md — 3/3 match.[Unreleased] / ### Changed, ≤4 lines, ending(#580). Mirror the structure of the existing feat(qa): add sibling-site scan prompt to first-pass /qa verdict checklist #573 entry (/qa Sibling-site Scan prompt) directly above.Design Review
spec/SKILL.mdContext Gathering section. No code surface./qa§5 subsection, scope-trimmed to planning-stage options (dropNEEDS_VERIFICATION, drop orchestrator/sub-agent split). Rejected: extracting a shared_shared/references/sibling-site-scan.md— premature abstraction for one duplication, and the spec/qa variants diverge on output options anyway./qamirror, +14/-1 per skill file, ~+1 CHANGELOG line, identical 3-dir mirror pattern). Same template, same scope./qa, where Sibling-site Scan is a reviewer behavior that populates theSibling sites considered:Risk Assessment template slot.Feature Quality Planning
All standard checks pass. Notable items:
check-skill-sync.tsis the only programmatic verification.feedback_qa_second_look.mdand feat(qa): add sibling-site scan prompt to first-pass /qa verdict checklist #573. Worth a manual second read of the new subsection during/qato confirm the planning-stage scoping reads cleanly without theNEEDS_VERIFICATIONclause it inherits from/qa.Open Questions
Subsection placement — Recommendation: end of
## Context Gathering, after### Feature Branch Context. Impact if wrong: a placement under "Open Questions" output template would conflate planner behavior with output structure; placement near "Verification Method Decision Framework" would confuse the reader (this is plan-time scope, not verification choice).Should the prompt explicitly call out CLI flags
--skip-ac-lint/--skip-scope-checkas siblings? — Recommendation: No. Those flags govern planner checks, not sibling-site scope. Keep the new subsection narrowly about pattern siblings. Impact: if added, dilutes the focused mirror.CHANGELOG section choice —
### Changedor### Added? — Recommendation:### Changed(matches feat(qa): add sibling-site scan prompt to first-pass /qa verdict checklist #573 entry precedent for the symmetric/qachange). Impact: minor cosmetic if reversed.Recommended Workflow
Phases: spec → exec → qa
Quality Loop: disabled (default)
Reasoning: Pure docs mirror; no Unit Test ACs, AC-2's Integration Test is a single one-line CLI assertion against an existing script (no new tests to stub); skip testgen per issue self-assessment. UI/security/breaking labels absent. Standard tier with all-Manual + 1 Integration verification =
spec → exec → qais sufficient.Label Review
Current:
enhancementRecommended:
enhancement,simple-fix,docs-onlyReason: Issue body self-classifies as
simple-fixand the change is genuinely a 3-dir-mirrored prose addition with one CHANGELOG line. Addingsimple-fix+docs-onlywould unlock Simple-tier output for any future/specre-run and signal scope to reviewers.Quality Loop: Will not auto-enable (no
complex/refactor/breakinglabel).→
gh issue edit 580 --add-label simple-fix --add-label docs-only--- DRAFT GITHUB ISSUE COMMENT (PLAN) ---
Plan
Mirror the
/qa§5 Sibling-site Scan prompt into/specas a new### Sibling-site Scan (Conditional)subsection at the end of## Context Gathering, scope-trimmed to planning-stage output options.Acceptance Criteria (verification methods):
≥3trigger +pre-tool.shexample (Manual)npx tsx scripts/check-skill-sync.ts→synced spec/SKILL.md — 3/3 match(Integration)NEEDS_VERIFICATION(Manual)feedback_qa_second_look.mdincluded (Manual)[Unreleased] / ### Changed, ≤4 lines, ends(#580)(Manual)Phases:
spec → exec → qa(no testgen — docs change with single CLI verification).Conflict watch: PR #586 (issue #571) is open against the same four files but spatially non-overlapping (different sections in
spec/SKILL.md; different[Unreleased]entries inCHANGELOG.md). Coordinate at merge time.Open Questions to resolve at exec time:
## Context Gathering, after### Feature Branch Context.### Changed(matches feat(qa): add sibling-site scan prompt to first-pass /qa verdict checklist #573 precedent).admarble commentedon May 7, 2026
/fullsolve Complete
Issue: #580
Status: READY_FOR_MERGE
PR: #594 — #594
AC Coverage
### Sibling-site Scan (Conditional)subsection at.claude/skills/spec/SKILL.md:145;≥3 instances of the affected pattern in the same file,pre-tool.shexample presentnpx tsx scripts/check-skill-sync.ts→synced spec/SKILL.md — 3/3 matchNEEDS_VERIFICATIONabsent in new contentfeedback_qa_second_look.mdpointer with explanatory framing[Unreleased] / ### Changed, 1 source line, ends(#580), mirrors #573 entry styleIterations
/specmarker detected, resumed from exec)/loopneeded)Quality Metrics
spec/SKILL.mdmirrors + CHANGELOG).claude/skills/,templates/skills/,skills/synced spec/SKILL.md — 3/3 matchRisk Assessment (from QA)
check-skill-sync.ts) is the lone programmatic check, which passes.Adversarial Re-Read Status
Clean. All 3 Non-Goals from the issue body honored (no grep automation, no mandatory scope expansion, no
/qamodifications). One minor wording polish noted (example phrasing slightly looser than issue body's "regex blocks inpre-tool.sh") but does not affect AC literal compliance —≥3 instances+pre-tool.share both present, which is what AC-1 requires.Ready for human review and merge.
chore(#580): tighten /spec sibling-site scan wording — adversarial re…
admarble commentedon May 7, 2026
Adversarial Re-Read Round 2 — Gap Fixes Applied
Second-pass review surfaced 7 gaps in the first-pass implementation. 5 fixed, 2 won't-fix-with-rationale. PR #594 updated.
Fixed (commit
f167d7a)regex blocks repeated across hook scripts like \pre-tool.sh`` (read as cross-file)the regex blocks in \pre-tool.sh`` (intra-file, matches binding)**During plan generation**(semantically off under Context Gathering)**During planning**(in \## Open Questions`)and(in `## Implementation Plan` or as a separate plan step)`Won't Fix (defensible as-is)
/qaprecedent uses subsection too; AC text is colloquial.Diff Impact
synced spec/SKILL.md — 3/3 matchCommits on PR #594
feat(#580): mirror /qa sibling-site scan prompt into /spec planning
chore(#580): tighten /spec sibling-site scan wording — adversarial re…