You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(qa): short-circuit re-run when prior qa:completed SHA matches HEAD #530
QA emits commitSHA in every qa:completed phase marker (.claude/skills/qa/SKILL.md:102-118). Phase 0 detects "implementation exists vs not" but does not compare the recorded SHA against current HEAD to skip a redundant full re-run.
Motivation
Re-running /qa 27 28 on two already-QA'd issues after merge fired the full 2410-line skill pipeline (sub-agents, quality checks, CI lookup) despite the previous run's verdict still being valid against the same commit. Token and wall-clock waste.
Acceptance Criteria
AC-1: In Phase 0, parse the latest qa:completed phase marker from issue comments and extract commitSHA
AC-2: If commitSHA matches current git rev-parse HEAD and the marker status is completed, skip sub-agent spawning and output a short "QA already completed at SHA X — no changes since" summary with the prior verdict
AC-3: --force CLI flag bypasses the short-circuit
AC-4: --no-cache also bypasses (consistency with existing flag at line 170)
AC-5: When marker status is failed (AC_NOT_MET), do NOT short-circuit — user likely wants to re-run after a fix
AC-6: Update SKILL.md across all three skill directories
Additional context
Related: per-check caching at lines 164-190 caches individual quality checks but not the overall phase
AC-1: Parse latest qa:completed phase marker and extract commitSHA
Verification: Integration Test — Given issue has prior qa:completed with commitSHA → When /qa <N> Phase 0 runs → Then SHA extracted from latest marker
AC-2: Short-circuit when SHA matches HEAD and status is completed
Verification: Integration Test — Given commitSHA == git rev-parse HEAD AND status completed → When /qa <N> → Then sub-agents NOT spawned, summary output with prior verdict
AC-3:--force CLI flag bypasses short-circuit
Verification: Integration Test — Given SHA match → When /qa <N> --force → Then full pipeline runs
AC-4:--no-cache also bypasses (consistency with line 170)
Verification: Integration Test — Given SHA match → When /qa <N> --no-cache → Then full pipeline runs
AC-5:failed (AC_NOT_MET) does NOT short-circuit
Verification: Integration Test — Given latest marker status: "failed" even if SHA matches → Then full pipeline runs
AC-6: Update SKILL.md across all three skill directories
Verification: Unit Test — cmp confirms .claude/skills/qa/SKILL.md, templates/skills/qa/SKILL.md, skills/qa/SKILL.md are byte-identical
Implementation Plan
Phase 1: Add SHA short-circuit to Phase 0 in SKILL.md
Insert "Phase 0a: Prior QA SHA Check" as a new subsection before existing Phase 0 Implementation Status Check (line ~396)
SHA extraction: parse latest qa:completed/qa:failed marker from issue comments via gh issue view --json comments
Decision matrix:
completed + SHA match + no --force/--no-cache → short-circuit with summary
Short-circuit when SHA matches HEAD + status=completed, skip sub-agents, output summary with prior verdict
MET
Decision matrix at :533-540 — completed + SHA match → Short-circuit; actions list at :542-547 (skip sub-agents, skip review, output template); short-circuit template at :551-566
AC-3
Original
--force CLI flag bypasses
MET
Invocation docs at :129; skip check at :509
AC-4
Original
--no-cache bypasses (consistency with existing flag at line 170)
MET
Skip check at :510; existing --no-cache flag preserved at :172
AC-5
Original
failed status must NOT short-circuit
MET
Decision matrix: failed | Yes or No | Proceed with full QA (user likely wants re-run after fix)
AC-6
Original
Mirror across three skill directories
MET
All three files received identical 69-line diff; npx tsx scripts/check-skill-sync.ts reports synced qa/SKILL.md — 3/3 match
Coverage: 6/6 AC items fully met
CI Status
No PR yet (created after QA). CI will be validated post-push.
Quality Metrics
Metric
Value
Status
Type issues (any)
0
OK (no TS changes)
Deleted tests
0
OK
Files changed
4
OK
Lines added
+211
OK (docs-only)
Lines deleted
0
-
Test Coverage Analysis
All changes are prose in SKILL.md + CHANGELOG.md. No runtime code, no tests apply. Full suite (528 tests) passed in /exec phase verifying no regression.
Code Review
Strengths:
Pattern {[^}]*"phase":"qa"[^}]*} correctly matches both qa:completed and qa:failed markers; status field discriminates in the decision matrix, satisfying AC-1 + AC-5 together
tail -1 selects the most-recent marker (matches "latest" in AC-1)
Bypass flags are OR'd cleanly, with --no-cache piggybacking on the existing flag semantics
Three-dir mirror is byte-identical (verified via diff -q and sync script)
Commands use well-established tools (gh, jq, grep, git rev-parse) — no exotic dependencies
Issues:
Minor: short-circuit template has a Prior Verdict: field but the phase marker only stores status and commitSHA, not the full verdict (READY_FOR_MERGE / AC_MET_BUT_NOT_A_PLUS / etc.). The skill acknowledges this and falls back to "the prior QA comment on the issue contains the full details." Non-blocking since AC-2 is satisfied by pointing to the prior comment.
npx tsx scripts/check-skill-sync.ts → synced qa/SKILL.md — 3/3 match ✅
CHANGELOG Verification
Check
Status
CHANGELOG.md exists
✅
User-facing change
✅ Yes (feat)
[Unreleased] entry
✅ Present
Entry format
✅ Includes (#530) issue ref
Risk Assessment
Likely failure mode: A phase-marker JSON containing the substring "phase":"qa" inside a nested field (e.g., within an error message) could theoretically be mis-extracted by the {[^}]*} pattern. In practice markers are flat and emitted by a known writer, so this is very low risk.
Not tested: SKILL.md is prose, not executable. Real verification happens next time /qa runs on an already-reviewed issue. Behavior is straightforward shell composition; no hidden runtime paths.
Verdict: READY_FOR_MERGE
All 6 ACs literally met. Implementation is pure skill-prose with standard tooling, mirrored cleanly across three directories, CHANGELOG updated. The Prior Verdict template gap is minor and explicitly handled by falling back to the prior comment.
AC-2: Short-circuit on SHA match + status=completed, skip sub-agents ✅
AC-3: --force bypasses ✅
AC-4: --no-cache bypasses ✅
AC-5: status=failed never short-circuits ✅
AC-6: Mirrored across .claude/skills/, skills/, templates/skills/ (3/3 synced) ✅
Quality Metrics
Build: ✅ passed
Lint: ✅ passed
Tests: ✅ 528/528 passed
Three-dir sync: ✅ qa/SKILL.md synced
CHANGELOG: ✅ [Unreleased] entry added
Risk Assessment
Likely failure mode: JSON containing "phase":"qa" as a substring in a nested field could be mis-extracted — very low likelihood since markers are flat and writer-controlled.
Not tested: SKILL.md is prose; no unit tests apply. Real verification occurs on next /qa invocation against an already-QA'd issue.
Activity
admarble commentedon Apr 17, 2026
→ PROCEED — Short-circuit QA when prior
qa:completedSHA matches HEADWorkflow:
spec → exec → qa· 6 ACs⚠ Run sequentially with #529 (both edit
qa/SKILL.mdacross 3 mirrors)⚠ SKILL.md sync across 3 dirs — known pitfall
admarble commentedon Apr 17, 2026
Spec Review — Issue #530
Complexity: Simple (6 ACs, 1 directory × 3 mirrors)
AC Quality Check
All 6 ACs passed lint — no vague, unmeasurable, or open-ended criteria detected.
Scope Assessment
Verdict: ✅ SCOPE_OK (1 feature, 6 ACs, 1 directory × 3 mirrors)
Acceptance Criteria with Verification
qa:completedphase marker and extractcommitSHAqa:completedwithcommitSHA→ When/qa <N>Phase 0 runs → Then SHA extracted from latest markercompletedcommitSHA == git rev-parse HEADAND statuscompleted→ When/qa <N>→ Then sub-agents NOT spawned, summary output with prior verdict--forceCLI flag bypasses short-circuit/qa <N> --force→ Then full pipeline runs--no-cachealso bypasses (consistency with line 170)/qa <N> --no-cache→ Then full pipeline runsfailed(AC_NOT_MET) does NOT short-circuitstatus: "failed"even if SHA matches → Then full pipeline runscmpconfirms.claude/skills/qa/SKILL.md,templates/skills/qa/SKILL.md,skills/qa/SKILL.mdare byte-identicalImplementation Plan
Phase 1: Add SHA short-circuit to Phase 0 in SKILL.md
qa:completed/qa:failedmarker from issue comments viagh issue view --json commentscompleted+ SHA match + no--force/--no-cache→ short-circuit with summaryfailed→ always proceed (AC-5)Phase 2: Sync all 3 directories
templates/skills/qa/SKILL.mdandskills/qa/SKILL.mdcmpDesign Decisions
grep || true: All grep commands must use|| true(known pitfall)Conflict Risk
qa/SKILL.md× 3 mirrors. Run sequentially — complete one before the other.Recommended Workflow
Phases:
spec → exec → qa· Quality loop enabledadmarble commentedon Apr 17, 2026
QA Review for Issue #530
Implementation Status: NOT FOUND
No implementation detected for this issue:
Verdict: AC_NOT_MET
No code changes found to review. The acceptance criteria cannot be evaluated without an implementation.
Next Steps
/exec 530to implement the feature/qa 530after implementation is completeQA skipped: No implementation to review
admarble commentedon Apr 17, 2026
QA Review for Issue #530
Implementation Status: NOT FOUND
No implementation detected for this issue:
Verdict: AC_NOT_MET
No code changes found to review. The acceptance criteria cannot be evaluated without an implementation.
Next Steps
/exec 530to implement the feature/qa 530after implementation is completeQA skipped: No implementation to review
feat(#530): short-circuit /qa when prior qa:completed SHA matches HEAD
admarble commentedon Apr 19, 2026
QA Review for Issue #530
AC Coverage
qa:completedphase marker and extractcommitSHA.claude/skills/qa/SKILL.md:515-531— greps{[^}]*"phase":"qa"[^}]*},tail -1, extractsstatus,commitSHA,timestampvia jq:533-540—completed+ SHA match → Short-circuit; actions list at:542-547(skip sub-agents, skip review, output template); short-circuit template at:551-566--forceCLI flag bypasses:129; skip check at:509--no-cachebypasses (consistency with existing flag at line 170):510; existing--no-cacheflag preserved at:172failedstatus must NOT short-circuitfailed | Yes or No | Proceed with full QA (user likely wants re-run after fix)npx tsx scripts/check-skill-sync.tsreportssynced qa/SKILL.md — 3/3 matchCoverage: 6/6 AC items fully met
CI Status
No PR yet (created after QA). CI will be validated post-push.
Quality Metrics
any)Test Coverage Analysis
All changes are prose in SKILL.md + CHANGELOG.md. No runtime code, no tests apply. Full suite (528 tests) passed in /exec phase verifying no regression.
Code Review
Strengths:
{[^}]*"phase":"qa"[^}]*}correctly matches bothqa:completedandqa:failedmarkers; status field discriminates in the decision matrix, satisfying AC-1 + AC-5 togethertail -1selects the most-recent marker (matches "latest" in AC-1)--no-cachepiggybacking on the existing flag semanticsdiff -qand sync script)gh,jq,grep,git rev-parse) — no exotic dependenciesIssues:
Prior Verdict:field but the phase marker only storesstatusandcommitSHA, not the full verdict (READY_FOR_MERGE / AC_MET_BUT_NOT_A_PLUS / etc.). The skill acknowledges this and falls back to "the prior QA comment on the issue contains the full details." Non-blocking since AC-2 is satisfied by pointing to the prior comment.Suggestions:
"verdict":"READY_FOR_MERGE") so the short-circuit summary can surface it without re-reading comment bodies. Out of scope for feat(qa): short-circuit re-run when prior qa:completed SHA matches HEAD #530.Skill Command Verification
gh issue view <N> --json comments --jq '[.comments[].body]'grep -o '<!-- SEQUANT_PHASE: {[^}]*"phase":"qa"[^}]*} -->'jq -r '.status // empty',jq -r '.commitSHA // empty'git rev-parse HEADPlaceholders (
<issue-number>) require manual substitution at runtime — skill context.Verification Status: Passed
Skill Change Review
commitSHAfield exists in emit format at line 110gh+jq+grep+git(all already skill-wide dependencies)Three-Directory Sync
npx tsx scripts/check-skill-sync.ts→synced qa/SKILL.md — 3/3 match✅CHANGELOG Verification
(#530)issue refRisk Assessment
"phase":"qa"inside a nested field (e.g., within an error message) could theoretically be mis-extracted by the{[^}]*}pattern. In practice markers are flat and emitted by a known writer, so this is very low risk./qaruns on an already-reviewed issue. Behavior is straightforward shell composition; no hidden runtime paths.Verdict: READY_FOR_MERGE
All 6 ACs literally met. Implementation is pure skill-prose with standard tooling, mirrored cleanly across three directories, CHANGELOG updated. The
Prior Verdicttemplate gap is minor and explicitly handled by falling back to the prior comment.Documentation
## [Unreleased]>### Added)Next Steps
admarble commentedon Apr 19, 2026
/fullsolve Complete
Issue: #530
Status: READY_FOR_MERGE
PR: #541
Summary
dd028cbui/frontend/adminlabel)AC Coverage
6/6 literally met:
commitSHA✅status=completed, skip sub-agents ✅--forcebypasses ✅--no-cachebypasses ✅status=failednever short-circuits ✅.claude/skills/,skills/,templates/skills/(3/3 synced) ✅Quality Metrics
qa/SKILL.mdsynced[Unreleased]entry addedRisk Assessment
"phase":"qa"as a substring in a nested field could be mis-extracted — very low likelihood since markers are flat and writer-controlled./qainvocation against an already-QA'd issue.Notes
qa/SKILL.md; no PR yet. When feat(qa): enforce 'Manual Test' ACs are executed or marked PENDING, never MET from code review #529 lands, verify feat(qa): short-circuit re-run when prior qa:completed SHA matches HEAD #530 hasn't conflicted.verdictin the completed phase marker so short-circuit summary can surface it without re-reading prior comment.Ready for human review and merge.
feat(#530): record verdict in qa:completed phase marker
fix(#530): drop jq array wrap so Phase 0a grep actually matches markers
feat(#530): short-circuit /qa when prior qa:completed SHA matches HEAD (