Skip to content

feat(qa): broaden §10a user_facing regex to match scoped conventional commits #612

Closed as not planned

Description

@admarble

Summary

/qa §10a's user_facing detection regex (line 2328 in all three mirrored SKILL.md files) requires a colon immediately after the conventional-commit type:

grep -iE '^[a-f0-9]+ (feat|fix|perf|refactor|docs):'

This misses sequant's actual commit format (feat(#NNN):, fix(area)!:), so the §7 verdict gate wired by #585 silently no-ops on sequant's own dogfood — the very /fullsolve 575 regression case that motivated #585.

Evidence

QA review of PR #601 audited 30 recent sequant commits:

  • 26/30 use scoped form: feat(#597):, fix(#592):, docs(#574):, etc.
  • 0/30 use unscoped form.

Demonstration on this repo:

# OLD regex (currently on main, line 2328):
$ git log origin/main~5..origin/main --oneline | grep -iE '^[a-f0-9]+ (feat|fix|perf|refactor|docs):'
(no matches)

# Proposed NEW regex:
$ git log origin/main~5..origin/main --oneline | grep -iE '^[a-f0-9]+ (feat|fix|perf|refactor|docs)(\([^)]*\))?!?:'
dd6027b feat(#585): wire CHANGELOG gate into /qa §7 verdict algorithm (#601)
... (and every other recent sequant commit)

The §7 wiring shipped in #585 / merge dd6027b is correct, but §10a's upstream detection regex prevents it from firing on the very repo that defined the orphan-rule gap. Even this PR's own commit (feat(#585):) goes undetected.

Acceptance Criteria

  • AC-1: §10a user_facing regex updated to ^[a-f0-9]+ (feat|fix|perf|refactor|docs)(\([^)]*\))?!?: — accepts unscoped (feat:), scoped (feat(#585):), breaking (feat!:), and scoped-breaking (feat(scope)!:) forms. Verification: Manual Test (shell) — see Verification section below.
  • AC-2: Regex still rejects non-user-facing prefixes (chore:, test:, ci:, build:, style:, wip:). Verification: Manual Test (shell).
  • AC-3: §10a "Caveat — conventional-commit dependency" paragraph (currently at line 2312 of the post-feat(qa): wire CHANGELOG gate into §7 verdict algorithm so it actually blocks READY_FOR_MERGE #585 SKILL.md) updated to reflect actual coverage. Current wording — "projects without conventional commits silently skip" — overstates the dependency since scoped conventional commits ALSO silently skip with the old regex. New wording should clarify the prefix list and scope/breaking optionals. Verification: Inline diff review.
  • AC-4: Mirrored across all three qa/SKILL.md copies (.claude/skills/qa/, skills/qa/, templates/skills/qa/) — diff between any two returns zero output. Verification: diff exit code 0 on each pair.
  • AC-5: Regression — original unscoped form (feat:) still matches; running the new regex against the merged feat(#585): commit (dd6027b) detects exactly 1 user-facing change vs 0 with the old regex. Verification: Manual Test (shell) — see dogfood command below.

Verification

Verification method: Manual Test (shell). Markdown-only diff, no executable code path — skill prompt is LLM-interpreted at runtime.

Test commands (run from project root after applying edits):

REGEX='^[a-f0-9]+ (feat|fix|perf|refactor|docs)(\([^)]*\))?!?:'

# Positive cases (must ALL match)
for s in "feat(#585): x" "fix(area)!: x" "feat: x" "docs(#574): x" \
         "perf(api)!: x" "refactor: x" "docs!: x" "fix(#592): x"; do
  echo "abc1234 $s" | grep -qiE "$REGEX" \
    && echo "✓ $s" || echo "✗ $s"
done

# Negative cases (must ALL be rejected)
for s in "chore: x" "test: x" "ci: x" "build(deps): x" "style: x" "wip: x"; do
  echo "abc1234 $s" | grep -qiE "$REGEX" \
    && echo "✗ leaked: $s" || echo "✓ rejected: $s"
done

# Dogfood: must detect the merged #585 commit
git log origin/main~5..origin/main --oneline | grep -iE "$REGEX"
# expected: contains "dd6027b feat(#585): wire CHANGELOG gate..."

# Mirror sync check
diff .claude/skills/qa/SKILL.md skills/qa/SKILL.md \
  && diff .claude/skills/qa/SKILL.md templates/skills/qa/SKILL.md \
  && echo "All 3 mirrors byte-identical"

Scope

  • 3 files modified (the three qa/SKILL.md mirrors at line 2312 caveat + line 2328 regex).
  • 1 CHANGELOG entry under [Unreleased] / Changed.
  • No code changes (skill prompt is LLM-interpreted).
  • No test files (no executable path to unit-test).

Out of Scope

  • Changing the type list (feat|fix|perf|refactor|docs stays as-is).
  • Adding chore: / test: / ci: / build: to the user-facing list.
  • Refactoring §10a's verification flow — only broadening detection.

Why Now

QA on PR #601 explicitly recommended this follow-up:

File a follow-up issue: "Broaden §10a user_facing regex to match scoped conventional-commits (feat(#NNN):, fix(area)!:)" — required for the gate to actually fire on sequant's own commits.

QA verdict was AC_MET_BUT_NOT_A_PLUS with this gap as the primary non-blocking concern. See QA review thread on #585.

References

Activity

  1. added
    enhancement
    cli
    needs-improvement
    on May 9, 2026
  2. admarble commented on May 9, 2026

    @admarble
    ContributorAuthor

    Plan for #612 — Broaden §10a user_facing regex

    Acceptance Criteria

    • AC-1: §10a regex updated to ^[a-f0-9]+ (feat|fix|perf|refactor|docs)(\([^)]*\))?!?: — accepts unscoped, scoped, breaking, and scoped-breaking forms. Verification: Manual Test (shell) — 8 positive cases.
    • AC-2: Regex still rejects chore:, test:, ci:, build(deps):, style:, wip:. Verification: Manual Test (shell) — 6 negative cases.
    • AC-3: §10a "Caveat — conventional-commit dependency" paragraph rewritten to enumerate prefix list + optional scope + ! marker. Verification: Inline diff review.
    • AC-4: All three qa/SKILL.md mirrors byte-identical after edits. Verification: diff exit code 0 on each pair.
    • AC-5: Regression — unscoped feat: still matches; merged dd6027b feat(#585): now detected (vs 0 hits with old regex). Verification: Manual Test (shell) — dogfood against origin/main.

    Implementation Plan

    Phase 1 — Edit (3 mirrored SKILL.md files):

    1. templates/skills/qa/SKILL.md — line 2328 regex + line 2312 caveat
    2. .claude/skills/qa/SKILL.md — same two edits
    3. skills/qa/SKILL.md — same two edits

    Phase 2 — CHANGELOG:
    4. Append bullet under [Unreleased] / ### Changed documenting the regex broadening and dogfood gap closure.

    Phase 3 — Verification + ship:
    5. Mirror sync: diff all 3 pairs → expect empty.
    6. Shell verification (verbatim from issue body): 8 positive, 6 negative, dogfood against origin/main.
    7. Commit + push + open PR.

    Sibling-site Scan

    Pattern (feat|fix|perf|refactor|docs): appears in 3 sites only — all line 2328 of the three qa/SKILL.md mirrors. user_facing symbol same 3 sites. No other detection logic to broaden.

    In-Flight Conflict Check

    Open worktrees (552, 568) — neither modifies qa/SKILL.md. No conflict.

    Design Review

    1. Where: §10a detection block in qa/SKILL.md, in place. No layer change.
    2. Simplest: Append (\([^)]*\))?!? to the type group; rewrite one caveat paragraph. ~14 lines total.
    3. Pattern: Three-mirror sync (templates/, .claude/, skills/) — standard sequant skill-mirroring.
    4. Reviewer challenge: "Why not include chore:?" — out of scope; conventional-commit semantics class chore: as non-user-facing. AC-5 backward-compat requires unscoped feat: to still match.

    Open Questions

    1. CHANGELOG section: Changed vs Fixed? — Recommend Changed (broadens existing gate behavior; not repairing a defect). Both acceptable per Keep-a-Changelog.

    Recommended Workflow

    Phases: spec → exec → qa
    Quality Loop: disabled
    Reasoning: Markdown-only diff, no UI surface, no executable test path. Simple Fix Mode in QA. No --testgen (no test files to generate). No quality loop (small surface, no complex/refactor/breaking labels).

    Label Recommendation

    Add simple-fix to enable QA's Simple Fix Mode:

    gh issue edit 612 --add-label simple-fix,planned
    
  3. added
    planned
    on May 9, 2026
  4. admarble commented on May 9, 2026

    @admarble
    ContributorAuthor

    Closing as duplicate of #610 — same fix (broaden §10a user_facing regex to scoped conventional commits). #610 was filed earlier (15:49Z vs 15:55Z). Transferring the 5-AC spec + shell verification commands to #610 and continuing implementation there.

    The detailed verification block stays useful for whoever picks up #610:

    • 8 positive cases: feat(#585):, fix(area)!:, feat:, docs(#574):, perf(api)!:, refactor:, docs!:, fix(#592):
    • 6 negative cases: chore:, test:, ci:, build(deps):, style:, wip:
    • Dogfood: must detect dd6027b feat(#585): when running git log origin/main~5..origin/main --oneline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementneeds-improvementplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions