Repository navigation
feat(#551): /qa Section 6c — detection-pattern verification for skill regex/grep/awk changes - #572
Merged
admarble merged 3 commits intoMay 4, 2026
Conversation
…ex/grep/awk/jq/sed changes (#551) Adds a new /qa Section 6c "Detection Pattern Verification" that triggers when a PR adds or modifies grep/awk/jq/sed commands or regex literals inside skill markdown (.claude/skills/, templates/skills/, skills/). For each detected pattern, QA must: 1. Identify the intended corpus from surrounding skill prose 2. Sample ≥5 real instances from that corpus 3. Execute the pattern against each 4. Record match/no-match counts in an output table Snippets quoted in the issue body as motivating examples (blockquotes, fenced code blocks under non-Setup headings, **Verify:**/**Verbatim:**/**Example:**/ **AC verification:** prefixed lines) are treated as mandatory test fixtures. Verdict gate is stricter than Section 6a: Failed → AC_NOT_MET (silent detection failures are worse than wrong CLI flags because the pipeline reports success). The verdict algorithm and CRITICAL notes in Section 7 are updated accordingly. Adds the verbatim "Adversarial re-read of core logic — list anything the structured pipeline didn't surface" checkbox to both Simple Fix Mode and Standard QA Output Verification checklists. Synced byte-identically across all 3 skill directories. Closes the gap exposed by PR #547 / issue #529, where 3 silent regex/awk/jq detection bugs shipped through /qa because Section 6a only verified command syntax, not whether patterns matched their intended corpus.
7 tasks
…fficient Samples rung, gh api recipes Three calibration fixes surfaced by adversarial review of PR #572 before merge: 1. Unify Step 1 detection regex Old: \bgrep -[A-Za-z]+ | \bawk [\x27"] | \bjq [\x27"] | \bsed [\x27"] New: \b(grep|awk|jq|sed) [-\x27"] Old form required a flag after grep but a quote after awk/jq/sed, so it missed jq -r ".field", sed -n "...", awk -v VAR=val "..." — the most common modifier-flag forms in this codebase. Unified rule covers both shapes in one expression. Manual-review fallback prose updated to list the long-tail shapes (bare grep "x", non-anchored character classes). 2. Add Insufficient Samples status rung AC-2 mandates >=5 samples per pattern. Old status table had only Passed / Failed / Skipped / Not Required, so a reviewer with 3 matching samples would default to Passed and silently violate the threshold. New rung: - Step 5 status table + SPARSE-CORPUS RULE - Section 6c verdict gating table -> AC_MET_BUT_NOT_A_PLUS - Section 7 algorithm: ELSE IF detection_pattern_status == "Insufficient Samples" -> AC_MET_BUT_NOT_A_PLUS - detection_pattern_status value list updated - Step 3 warning escalated from advisory to actionable - Output template Verification Status enum updated 3. Replace gh search recipes with gh api gh search issues "SEQUANT_PHASE spec" relied on GitHub's full-text index covering HTML-comment markers, which is not reliable. gh search issues "assess:action" parsed ":" as a search qualifier and returned empty. Step 2 corpus table and Step 3 example now use: gh api "repos/{owner}/{repo}/issues/comments?per_page=100" --paginate -q '.[] | select(.body | contains("...")) | .body' which returns raw JSON regardless of search index coverage. Added a "Why gh api over gh search issues" rationale block. 3-dir sync verified by SHA-256 (94c7cc4cc19c0af89d1c3686cb9301f99fdf224adee2c6d7e43d7b6dcd8851c1). Self-application: new regex catches 42 pattern additions in this PR's diff and correctly rejects substring false positives (awkward, my_grep_call).
…equire-detection-pattern-verification-for # Conflicts: # CHANGELOG.md
admarble
deleted the
feature/551-feat-qa-require-detection-pattern-verification-for
branch
May 4, 2026 02:15
5 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
/qaSection 6c "Detection Pattern Verification" — a new gate that triggers when a PR adds or modifiesgrep/awk/jq/sedcommands or regex literals inside skill markdown (.claude/skills/,templates/skills/,skills/). Closes the gap exposed by PR #547, where 3 silent regex/awk/jq detection bugs shipped through/qabecause Section 6a only verified command syntax, not whether patterns matched their intended corpus.For each detected pattern, QA must (a) identify the intended corpus from surrounding skill prose, (b) sample ≥5 real instances, (c) execute the pattern against each, and (d) record match/no-match counts in a Pattern / Corpus / Samples / Expected / Actual / Status table. Snippets quoted in the issue body as motivating examples — blockquotes, fenced blocks under non-Setup headings, and
**Verify:**/**Verbatim:**/**Example:**/**AC verification:**-prefixed lines — are treated as mandatory test fixtures.Verdict gate is stricter than Section 6a:
Failed → AC_NOT_MET(silent detection failures are worse than wrong CLI flags because the pipeline reports success). The verbatimAdversarial re-read of core logic — list anything the structured pipeline didn't surfacecheckbox is added to both Simple Fix Mode and Standard QA Output Verification checklists.Pre-PR AC Verification
.claude/skills/qa/SKILL.mdSection 6c Step 1 (lines 1735–1763); detector matches.claude/skills/**/*.md,templates/skills/**/*.md,skills/**/*.md**Verify:**/**Verbatim:**/**Example:**/**AC verification:**prefixesFailed → AC_NOT_METIF detection_pattern_status == "Failed": → AC_NOT_METbranch; CRITICAL note added; gate is stricter than Section 6a'sAC_MET_BUT_NOT_A_PLUS[ ] Adversarial re-read of core logic — list anything the structured pipeline didn't surfaceadded to Simple Fix Mode (line 2356) and Standard QA (line 2383)npx tsx scripts/check-skill-sync.tsreportssynced qa/SKILL.md — 3/3 match; md5 byte-identical across.claude/skills/,templates/skills/,skills/[Unreleased]entryCHANGELOG.md[Unreleased]/### Addedentry referencing #551 with full description of the gate and stricter verdictSelf-Dogfood (Phase 5 of spec plan)
Ran the new Section 6c procedure against this PR's own diff before requesting QA:
grep -E '\*\*(Verify|Verbatim|Example|AC verification):\*\*'matched the verbatim motivating example in issue feat(qa): require detection-pattern verification for skill regex/grep/awk changes #551 body (count = 1, the bullet "The grep regex didn't include\*\*Verify:\*\*as a prefix")Detector and fixture extraction both produce the AC-claimed result on this PR's own input.
Quality Plan Alignment
N/A — Issue #551 spec plan was prose-only (no automated tests apply per the issue's Motivation: "Prompt-only skill changes (regex/grep/awk/jq inside SKILL.md) have no automated test coverage").
Test plan
npm run build— TypeScript compilesnpm run lint— ESLint clean (0 warnings)npx tsx scripts/check-skill-sync.ts—qa/SKILL.md — 3/3 matchnpx vitest run __tests__/settings-schema.test.ts— sanity test passes (30/30)Failed → AC_NOT_MET) is stricter thanskill_verification == "Failed" → AC_MET_BUT_NOT_A_PLUSCloses #551