Repository navigation
Description
Summary
Three real bugs shipped through /qa in PR #547 (issue #529, manual-test AC enforcement) before user-driven adversarial review surfaced them. The structured /qa pipeline marked all 6 ACs MET and verdict READY_FOR_MERGE on its first two passes — and would have stuck at that verdict without "any gaps?" prompting:
- The jq filter
select(contains("SEQUANT_PHASE") and contains("spec"))matched 5 unrelated comments on the issue itself;.lastreturned a QA comment instead of the spec plan - The awk header regex
/^### AC-[0-9]+/only matched 3-hash headers, missing#### AC-Nand**AC-N:**styles (~45% of sampled past specs) - The grep regex didn't include
**Verify:**as a prefix — even though the issue body's verbatim motivating example used that exact prefix
Each bug was a 30-second diagnostic once the patterns were piped through real corpus. None showed up in static review of the diff against AC text because every pattern was syntactically valid and matched the AC description in the abstract.
Motivation
Prompt-only skill changes (regex / grep / awk / jq inside SKILL.md) have no automated test coverage. The only way to verify they actually work is to run them against real input. Today's /qa Section 6a (Skill Command Verification) covers gh CLI commands but not detection patterns — it checks whether gh pr checks --json conclusion is valid syntax, not whether awk '/^### AC-[0-9]+/' actually matches real spec headers.
Captured as feedback memories: feedback_dogfood_detection_patterns.md and feedback_motivating_example_regression.md.
Acceptance Criteria
- AC-1: New
/qasection "Detection Pattern Verification" triggers when diff contains new or modifiedgrep,awk,jq,sed, or regex literals inside.claude/skills/**/*.md,skills/**/*.md, ortemplates/skills/**/*.md - AC-2: For each detected pattern, QA must (a) identify the intended corpus, (b) sample ≥5 real instances, (c) execute the pattern against each, (d) record match/no-match counts in the QA output table
- AC-3: Snippets quoted in the issue body as motivating examples or AC verification targets (verbatim spec excerpts, blockquoted user inputs,
**bold:**-prefixed examples) are treated as mandatory test fixtures — the new pattern must produce the AC-claimed result on each. Unrelated code blocks (e.g., setup commands) are excluded. - AC-4: Verdict gate: if any pattern produces 0 matches against input the AC says should match, →
AC_NOT_MET(cannot beREADY_FOR_MERGE). If verification status = "Failed", maximum verdict isAC_NOT_MET. - AC-5: Add adversarial re-read checkbox to
/qaOutput Verification:[ ] Adversarial re-read of core logic — list anything the structured pipeline didn't surface - AC-6: Update SKILL.md across all three skill directories (
.claude/skills/,templates/skills/,skills/) - AC-7: Update
CHANGELOG.mdunder [Unreleased]
Additional context
- Found via
/reflectafter PR feat(#529): enforce manual-test AC gate in QA skill #547 merge. See merge commitsbc3bb931(feat(docs-skill): classify infra/scaffold paths into developer-tool template #531) and6a36f06a(feat(qa): enforce 'Manual Test' ACs are executed or marked PENDING, never MET from code review #529). - Section 6a (Skill Command Verification) is the closest existing analog — covers shell command syntax but not pattern matching against real input. Position the new section as 2j or 6c depending on placement preference.
- The three bugs would all have been caught by AC-2 (corpus sampling) alone. AC-3 (motivating-example fixture) is belt-and-suspenders.
- High-priority correctness gap — silent detection failures are the worst kind because the pipeline reports success.
Complexity
complex (quality loop) — skill logic + 3-dir sync + design of corpus-sampling protocol
Activity
admarble commentedon Apr 26, 2026
→ PROCEED — QA detection-pattern verification (regex/grep/awk against real corpus), 7 ACs
Workflow:
spec → exec → qawith-q-qfromcomplexlabel modifier. Skill logic + 3-dir sync + design of corpus-sampling protocol.⚠ #552 also modifies
qa/SKILL.md; land sequentially to avoid 3-dir-sync merge conflicts.admarble commentedon May 3, 2026
Supersedes prior assess from 2026-04-26 (PROCEED) — re-affirmed.
→ PROCEED — QA detection-pattern verification (regex/grep/awk against real corpus), 7 ACs
Workflow:
spec → exec → qawith-qCan run in parallel with #559 (no file overlap — #551 touches
qa/SKILL.md, #559 touchesassess/SKILL.mdandbin/cli.ts). Also no collision with active worktrees #562 (fullsolve) or #564 (pre-tool.sh hook).admarble commentedon May 3, 2026
Spec Plan — Issue #551
Complexity: Complex (7 ACs, 3-dir skill sync)
Acceptance Criteria with Verification Methods
/qatriggers "Detection Pattern Verification" when diff modifiesgrep/awk/jq/sed/regex literals inside.claude/skills/**/*.md,skills/**/*.md,templates/skills/**/*.mdVerification: Integration Test — diff fixture with new
grep -Eline → QA output contains the section.Verification: Integration Test — verify table has corpus / samples / expected / actual / status columns.
**bold:**lines) treated as mandatory test fixtures; unrelated code blocks (Setup, Install) excludedVerification: Integration Test — issue body with
> **Verify:** ...→ pattern run against verbatim text → status reported.AC_NOT_MET(stricter than Section 6a'sAC_MET_BUT_NOT_A_PLUScap)Verification: Integration Test — failing pattern fixture downgrades verdict.
/qaOutput Verification (both Simple Fix and Standard QA)Verification: Manual Test — inspect both checklists for verbatim line.
.claude/skills/,templates/skills/,skills/Verification: Integration Test —
scripts/check-skill-sync.ts(or diff check) reports byte-match.[Unreleased]entry under### AddedVerification: Manual Test — inspect
CHANGELOG.md.Implementation Plan
Phase 1: Section 6c authoring (
.claude/skills/qa/SKILL.md, after Section 6b)git diff origin/main...HEADfiltered to skill markdown, grep added lines forgrep/awk/jq/sed/regex-in-fences/speccomments; assess →/assesscomments; qa → past QA reviews; issue/PR-body → referenced issues; generic markdown → repo fixtures**bold:**lines including**Verify:**/**Verbatim:**/**Example:**)Phase 2: Verdict gating (AC-4) — gate matrix with
Failed → AC_NOT_MET; cross-reference Section 7 (A+ verdict) to sourcedetection_pattern_statusfrom 6c.Phase 3: Adversarial re-read checkbox (AC-5) — insert verbatim line above
**Verdict**in both Simple Fix Mode and Standard QA checklists.Phase 4: 3-dir sync + CHANGELOG — Read each of 3 files independently before edits; verify line counts match. CHANGELOG
[Unreleased]/### Addedentry referencing #551.Phase 5: Self-dogfood — Run new Section 6c procedure on this PR's own diff before requesting QA. If trigger detection misses the new patterns, the section has a self-referential bug.
Key Decisions
Failed → AC_NOT_MET(vs 6a'sAC_MET_BUT_NOT_A_PLUS). Rationale: silent detection failures are worse than wrong CLI flags.ghis offline/unauth, markSkippedwith justification (NOTPassed).Open Questions
**bold:**prefixes count as fixtures? — Recommendation: enumerate**Verify:**,**Verbatim:**,**Example:**,**AC verification:**.Conflict Risk
qa/SKILL.md(behavior-rule touchpoint detection). Land #551 first; #552 will need a small rebase. No worktree overlap with #559/#562/#564.Recommended Workflow
spec → exec → qawith-q(quality loop auto-enabled bycomplexlabel). Skiptestgen,test,security-review— no code-level unit/integration tests, no UI, no auth/data flow.admarble commentedon May 3, 2026
Exec Phase Complete — PR #572
AC Coverage Summary
.claude/skills/qa/SKILL.mdSection 6c Step 1Failed → AC_NOT_MET(stricter than 6a)check-skill-sync.ts: synced qa/SKILL.md — 3/3 match[Unreleased]entry### Addedreferencing #551Coverage: 7/7 ACs met
Files Changed
.claude/skills/qa/SKILL.md(+193)templates/skills/qa/SKILL.md(+193, byte-identical)skills/qa/SKILL.md(+193, byte-identical)CHANGELOG.md(+1 entry)Total: 4 files, 580 insertions, 0 deletions.
Quality Plan Alignment
N/A — Issue spec plan was prose-only (no automated tests apply per the issue's Motivation).
Self-Dogfood (spec Phase 5) — Verified
Ran new Section 6c procedure against this PR's own diff:
**Verify:**)Both produce AC-claimed results.
Checks Run
npm run buildnpm run lintnpx tsx scripts/check-skill-sync.tsqa/SKILL.md — 3/3 matchnpx vitest run __tests__/settings-schema.test.tsPre-PR Confidence Check
grep -E '(\bgrep -[A-Za-z]+|\bawk [\x27"]|...)') cannot catch every pattern shape — multi-lineawkblocks, complexsedprograms, and regex literals embedded in JSON examples may slip through. The skill text now documents this with an explicit "Manual review fallback" callout that tells QA reviewers to scan the diff manually if pattern-related keywords appear./qagoing forward.PR
✅ Created: #572
Next Steps
/qa 551to validate AC coverage and exercise the new Section 6c gate against this very PR's diff (the dogfood loop closes here)READY_FOR_MERGE, merge — note conflict warning from spec: feat(spec,qa): detect behavior-rule implementations across skill+runtime touchpoints #552 also modifiesqa/SKILL.md; this should land firstadmarble commentedon May 3, 2026
/qa Review — PR #572
Verdict:
READY_FOR_MERGEAC Coverage (7/7 met)
.claude/skills/**,templates/skills/**,skills/**) AND restricts to grep/awk/jq/sed/regex literals≥5threshold, output table with Pattern/Corpus/Samples/Expected/Actual/Status columns**Verify:**/**Verbatim:**/**Example:**/**AC verification:**) and excludes Setup/Install/Prerequisites/How-to-installAC_NOT_METELSE IF detection_pattern_status == "Failed": → AC_NOT_MET(placed BEFORE skill_verification clause) + CRITICAL note in Section 7[ ] Adversarial re-read of core logic — list anything the structured pipeline didn't surfaceadded to BOTH Simple Fix Mode and Standard QA checklistsfcb32cc581…044891(byte-identical)[Unreleased]entry[Unreleased] / Addedwith(#551)reference and full feature descriptionQuality Checks
.claude/skills/qa/SKILL.md,templates/skills/qa/SKILL.md,skills/qa/SKILL.mddetection_pattern Failedevaluated BEFOREskill_verification Failed— stricter gate honored as AC-4 requiresDetection Pattern Verification (dogfooded — Section 6c applied to this PR)
The PR adds patterns inside skill markdown, so Section 6c self-applies. I ran the new patterns against real corpora:
(\bgrep -[A-Za-z]+|\bawk [\x27\"]|\bjq [\x27\"]|\bsed [\x27\"]|/\^[^/]+/|\(\?[:=!]|\\b[A-Za-z]+\\b)grep -E '^>'grep -E '\*\*(Verify|Verbatim|Example|AC verification):\*\*'**Verify:**All Step 4 example patterns produce expected results on the issue body. The Step 1 detection regex correctly identifies the patterns added in this very PR.
detection_pattern_status: Passed
Adversarial Re-Read
Items the structured pipeline did NOT initially surface, then verified clean on second look:
Failed → AC_NOT_METis stricter than the existingskill_verification Failed → AC_MET_BUT_NOT_A_PLUSclause. Verified the new branch is inserted above the skill_verification clause in the verdict cascade. ✅## Setup→## OtherSectiontransition: skip flips correctly without printing the heading line itself. ✅Iteration Tracking
qalabel, prompt-only)Next Steps
Ready to merge. Suggested command:
fix(#551): /qa Section 6c calibration — unified detection regex, Insu…
feat(#551): /qa Section 6c — detection-pattern verification for skill…
admarble commentedon May 4, 2026
/fullsolve Complete
Status: MERGED
Merge commit: cb77c8e
PR: #572
Final state
Calibration fixes shipped (in addition to original 7 ACs)
\b(grep|awk|jq|sed) [-\x27"]now catchesjq -r,sed -n,awk -v(the most common modifier-flag forms in this codebase). Verified self-application: catches 42 pattern-shaped additions in this PR's own diff while rejectingawkwardandmy_grep_callsubstrings.Insufficient Samplesstatus rung — closes the gap where a reviewer with 3 matching samples could silently default toPasseddespite AC-2's ≥5 requirement. Wired into Step 5 status table, Section 6c verdict gating, Section 7 algorithm, value list, Step 3 warning, and output template.gh apicorpus recipes — replacesgh search issues "SEQUANT_PHASE spec"withgh api '...issues/comments' --paginate -q jqbecause GitHub's full-text index does not reliably cover HTML-comment markers, and:-bearing query strings (assess:action) parse as search qualifiers.3-dir sync verified by SHA-256 (
94c7cc4c…) before push.Final verdict
READY_FOR_MERGE → MERGED
All 7 original ACs met, plus 3 calibration refinements that close near-miss gaps the structured pipeline would otherwise have shipped.
fix(#556): normalize skill-mirror paths to canonical bare form
feat(#556): predict file-collision between PROCEED issues from body c…
fix(#769): section-aware path extraction; drop background-only citati…
feat(#922): Phase A — citation grounding checker and measured verdict…
fix(#769): section-aware path extraction; drop background-only citations