Skip to content

feat(qa): promote Adversarial Re-Read from checklist item to required structured output section #582

Closed

Description

@admarble

Summary

Promote the existing "Adversarial re-read of core logic" item from a final-pass checklist box to a required structured output section in the /qa skill, mirrored across .claude/skills/qa/SKILL.md, templates/skills/qa/SKILL.md, and skills/qa/SKILL.md.

Motivation

Surfaced during /fullsolve 570's reflection (2026-05-06):

  • First-pass /qa produced a clean READY_FOR_MERGE verdict.
  • A user prompt of literally "any gaps?" triggered an adversarial re-read that surfaced 3 real gaps:
    1. Verbatim issue-body fixtures ("WARNING: never run \rm -rf /`...", etc.) were not run against the new code, despite feedback_motivating_example_regression.md` requiring it
    2. The QA "self-dogfood" claim conflated pre-fix bug reproductions with post-fix validations
    3. A meta-workflow gap (3 wasted same-SHA QA cycles → filed as bug(fullsolve): QA loop re-runs /qa with no state change instead of escalating same-SHA same-verdict cycles #581)

The /qa SKILL.md already lists "Adversarial re-read of core logic — list anything the structured pipeline didn't surface" as a checkbox under the "Output Verification" section. In practice it's underweighted because:

  • It's a single line at the bottom of a long checklist
  • It has no dedicated output template section forcing concrete content
  • "no gaps found" passes the checkbox without any evidence that a re-read happened

The structured pipeline (Sections 1–6c) is good at catching known failure modes. The Adversarial Re-Read pass is specifically for catching what the structured pipeline doesn't gate on. Making it a required output section forces the second look on every QA, not just when the user prompts.

Proposal

Insert a new section between "Risk Assessment" (Section 5) and "Verdict" (Section 7) named ### Adversarial Re-Read. Add it to the standard QA output template (not the Simple Fix template — re-read is overkill for trivial diffs). Make it a required item in the standard-mode Output Verification checklist with concrete pass criteria.

Section content (sketch)

### Adversarial Re-Read

A pass over the implementation looking for what the structured pipeline above did NOT gate on. Required for non-Simple-Fix verdicts before READY_FOR_MERGE.

**Sub-prompts (answer each, briefly):**

| Question | Finding |
|----------|---------|
| **Verbatim fixtures:** Did you run the implementation against every verbatim motivating-example string from the issue body (code blocks, `**Verify:**` snippets, blockquotes, `## Repro pattern` sections)? | [Yes — list fixtures] / [No — flag as gap] |
| **Evidence framing:** Are any "evidence" claims actually pre-fix bug reproductions vs. post-fix validations? | [No conflation] / [Yes — list which] |
| **Process state:** Is there uncommitted work, divergent branches, or other process state the structured pipeline normalizes away? | [Clean] / [Issues found] |
| **Sibling sites:** Are there nearby sites in the codebase that share the same root cause but weren't scoped into this fix? | [None] / [List with rationale why deferred or fix now] |
| **Out-of-scope but adjacent:** What does the issue body call out as Non-Goals or "left out"? Does any of it actually need to be in scope? | [None] / [List] |

**Findings:** [Concrete enumeration of any gaps surfaced, OR "No gaps found because: <specific reason>"]

A bare "No gaps" without specific reasoning fails output verification.

Acceptance Criteria

  • AC-1: A new section ### Adversarial Re-Read is added to .claude/skills/qa/SKILL.md's Output Template (Standard Template only, not Simple Fix Template), positioned between "Risk Assessment" and "Verdict"
  • AC-2: The section includes the 5 sub-prompts (verbatim fixtures, evidence framing, process state, sibling sites, out-of-scope/Non-Goals) as a structured table with finding columns
  • AC-3: A "Findings:" line is required after the table, and the SKILL.md text explicitly states that bare "No gaps" without specific reasoning fails output verification
  • AC-4: The Standard QA "Output Verification" checklist gains an item: "Adversarial Re-Read - 5 sub-prompts answered, Findings line concrete"
  • AC-5: The Verdict Determination Algorithm gains an entry: if Adversarial Re-Read findings include a gap that maps to a missing AC fixture or unverified claim, downgrade verdict to AC_MET_BUT_NOT_A_PLUS (or AC_NOT_MET if the gap is severe — e.g. verbatim fixture not run)
  • AC-6: Changes mirrored verbatim across all 3 skill copies: .claude/skills/qa/SKILL.md, templates/skills/qa/SKILL.md, skills/qa/SKILL.md (use npx tsx scripts/check-skill-sync.ts to verify)
  • AC-7: CHANGELOG entry under [Unreleased] / ### Changed referencing this issue and noting that QA outputs gain an Adversarial Re-Read section before READY_FOR_MERGE

Non-Goals

  • Not modifying the Simple Fix output template — adversarial re-read is overkill for trivial diffs and would just be ceremony
  • Not adding an automated detector for "did re-read happen?" — the structured section IS the gate; if Claude omits it, output verification fails
  • Not removing the existing "Adversarial re-read of core logic" checkbox — it can stay as a redundant safety net under Output Verification, and the new section provides the actual structure

Risks / Open Questions

  • Performative-checkbox failure mode: The section becomes another box that gets filled with "No gaps found" without real content. Mitigated by AC-3 (bare "No gaps" without reasoning fails verification) and AC-5 (verdict downgrade if a missed gap maps to a fixture/claim issue), but the strongest mitigation is the prompt structure itself — concrete sub-prompts are harder to hand-wave than "do an adversarial re-read."
  • Token cost: Adds ~30-50 lines to standard QA output. Cheap relative to surfacing real gaps — but worth flagging in case the team is on a token diet.
  • Overlap with existing sections: Some sub-prompts touch material already covered (e.g., "verbatim fixtures" overlaps with Section 6c's "Motivating-Example Fixture Verification" for skill markdown). The Adversarial Re-Read prompt explicitly extends 6c's verbatim-fixture rule to all change types (per the related memory broadening on feedback_motivating_example_regression.md), so it's complementary, not duplicative — 6c gates on skill-markdown changes specifically; this section catches the same class of gap for hook regex fixes, CLI changes, schema validators, etc.

Complexity

simple-fix — text-only changes to 3 mirrored SKILL.md files + 1 CHANGELOG line. No code, no tests beyond skill-sync verification.

Self-assessed workflow

spec → exec → qa (no testgen — skill-sync check is the only verification, and it's a one-line script). Standard sequant pattern for skill content changes.

Related

Activity

  1. added
    enhancement
    planned
    on May 6, 2026
  2. admarble commented on May 6, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #582

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original New section in Standard Output Template only, between Risk Assessment and Verdict MET Section 6d added at line 1910→1912 boundary; output template insertion at line 2810→2818 boundary; Simple Fix template untouched (verified ### Adversarial Re-Read appears once in standard template path, not in simple-fix template path)
    AC-2 Original 5 sub-prompts as a structured table MET Verbatim fixtures, Evidence framing, Process state, Sibling sites, Out-of-scope/Non-Goals — table format with What-to-check column
    AC-3 Original "Findings:" line required; bare "No gaps" without specific reasoning fails verification MET Stated literally in Section 6d's "How to perform" paragraph and again under Output Verification checklist: "bare 'No gaps' without specific reasoning fails verification"
    AC-4 Original Standard QA Output Verification checklist gains structured Adversarial Re-Read item MET Trailing single-line checkbox at line 2404 promoted to structured item between CHANGELOG Verification and Documentation Check; cites Section 6d
    AC-5 Original Verdict Determination Algorithm gains Severe Gap → AC_NOT_MET / Gaps Found → AC_MET_BUT_NOT_A_PLUS MET adversarial_reread_status added to step 2 verification gates; step 4 gains Severe Gap → AC_NOT_MET (positioned after detection_pattern Failed, before skill_verification Failed — preserves the strictness ladder) and Gaps Found → AC_MET_BUT_NOT_A_PLUS (positioned before improvement_suggestions branch)
    AC-6 Original Mirrored across 3 qa/SKILL.md copies MET npx tsx scripts/check-skill-sync.ts | grep qa/SKILL.md returns qa/SKILL.md: synced; all 3 files report 2907 lines, byte-identical via diff -q
    AC-7 Original CHANGELOG entry under [Unreleased] / Changed referencing #582 MET Single entry added at the top of the Changed section, references #582, summarizes the 5 sub-prompts and the verdict gating

    Coverage: 7/7 fully met.


    Quality Plan Verification

    N/A — no Feature Quality Planning section in issue #582 (issue body has standard ACs/Non-Goals/Risks structure; no separate quality plan was requested).


    CI Status

    Check State Bucket Impact
    Hooks Validation IN_PROGRESS pending ⏳ PENDING
    build (20.x) IN_PROGRESS pending ⏳ PENDING
    build (22.x) IN_PROGRESS pending ⏳ PENDING
    validate-skills IN_PROGRESS pending ⏳ PENDING
    typecheck IN_PROGRESS pending ⏳ PENDING
    Plugin Structure Validation QUEUED pending ⏳ PENDING
    Setup Directory Creation QUEUED pending ⏳ PENDING
    validate-plugin QUEUED pending ⏳ PENDING

    CI Summary: 0 passed, 8 pending, 0 failed. Verdict downgrades to NEEDS_VERIFICATION per the gate (cannot give READY_FOR_MERGE while CI pending).


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 (no .ts source changed) OK
    Deleted tests 0 OK
    Files changed 4 OK
    Lines added +226 -
    Lines deleted -3 -
    Build ✅ Clean (worktree symlinked node_modules; tsc exit 0) OK

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    .claude/skills/qa/SKILL.md Standard (skill prompt) n/a Skill-sync check (scripts/check-skill-sync.ts) is the sole verification
    templates/skills/qa/SKILL.md Standard (mirror) n/a same
    skills/qa/SKILL.md Standard (mirror) n/a same
    CHANGELOG.md Docs n/a -

    Coverage: Doc-only diff; no runtime test surface. The CI validate-skills check is the relevant gate — pending.


    Code Review

    Strengths:

    • Section 6d is positioned correctly: after 6c (which gates on skill markdown), before Section 7 (verdict). The structured pipeline runs its known checks first, then the adversarial pass catches what the pipeline didn't.
    • Verdict-algorithm placement is precise: Severe Gap → AC_NOT_MET is inserted after detection_pattern_status == "Failed" and before skill_verification == "Failed". This preserves the strictness ladder — silent detection pattern failures and adversarial Severe Gaps both block at AC_NOT_MET, while skill-command verification failures are softer at AC_MET_BUT_NOT_A_PLUS.
    • The Gaps Found → AC_MET_BUT_NOT_A_PLUS branch is positioned just before improvement_suggestions.length > 0, which is the correct neighborhood — both are "merge-with-notes" outcomes from non-blocking findings.
    • Sub-prompt Doctor: Add GitHub CLI and auth checks #4 (sibling sites) defers to Section 5's existing Sibling-site Scan rather than duplicating it. Cross-reference is explicit.
    • Sub-prompt feat: Complete remaining v1.0 features (AC-10, AC-13, AC-14) #1 (verbatim fixtures) explicitly broadens feedback_motivating_example_regression.md from the skill-markdown-only Section 6c gate to "any change with motivating-example payload" — closes the exact gap I missed on /fullsolve 570 first-pass.
    • Output template has placeholder content with concrete examples (e.g. "List fixtures run, OR 'No motivating-example payload in issue body' with citation"), not abstract instructions.

    Issues:

    • None blocking.

    Suggestions:

    • None — the change is the minimal structural promotion the issue called for.

    Anti-Pattern Detection

    Code Patterns

    File:Line Category Pattern Suggestion
    (none) - - -

    Doc-only diff, no executable code to scan.


    Detection Pattern Verification

    N/A. No grep/awk/jq/sed commands or regex literals added/modified in this diff. All changes are prose markdown + table structure.


    Skill Command Verification

    N/A. No CLI commands added inside the modified skill markdown. The Section 6d prose references feedback_qa_second_look.md and feedback_motivating_example_regression.md as memory citations, but those are not executable commands.


    Execution Evidence

    N/A. No scripts/ or CLI files modified. The skill-sync verification (npx tsx scripts/check-skill-sync.ts) was executed inline:

    qa/SKILL.md: synced
    

    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅
    User-facing changes ✅ (feat:)
    [Unreleased] entry ✅ Present (Section: Changed)
    Entry format ✅ References #582; describes 5 sub-prompts, verdict gating, scope

    Risk Assessment

    • Likely failure mode: Performative-checkbox failure mode — the Adversarial Re-Read section becomes 5 lines of "No gaps" hand-waves with no concrete content. Mitigation in the SKILL.md text: "bare 'No gaps' without specific reasoning fails verification." But this is a soft mitigation enforced at the Output Verification step rather than a hard parser gate. If a future QA writes 5 vague answers, the structure exists but the substance doesn't — the gate only fires when reviewers actively read for concreteness. A harder mitigation would be a downstream lint that pattern-matches "No gaps" / "No issues" / empty-answer shapes against the Findings line, but that's out of scope here.
    • Not tested: No automated test for the new gating logic — there's no fixture that simulates "QA output with bare 'No gaps' Findings" and asserts the verdict downgrades. The change is doc-only and the QA skill is interpreted by Claude at runtime, so a unit-style test would require a harness that invokes the skill on a fixture diff and parses the output. Probably not worth building for this size of change.
    • Sibling sites considered: N/A — this is a content addition to a single conceptual area (the QA skill's verdict pipeline). No sibling files have the same "checklist-promoted-to-structured" pattern that needs the same treatment. The other skills (/spec, /exec, /loop) have their own output-verification checklists, but they're scoped to phase-specific concerns (plan completeness, AC coverage, etc.) and don't have an equivalent "adversarial re-read" item that's currently checkbox-only.

    Adversarial Re-Read

    (Dogfooding the new Section 6d on the PR that introduces it.)

    # Sub-prompt Finding
    1 Verbatim fixtures Issue #582 body contains a "Section content (sketch)" fenced markdown block with the proposed Section 6d table. Verbatim verification: the implemented Section 6d table in .claude/skills/qa/SKILL.md matches the sketch's column structure (#, Sub-prompt, What to check) — 5 rows, same 5 sub-prompt names. The implementation expanded the "What to check" cell content beyond the issue's sketch (e.g., the issue listed "Verbatim fixtures" as a single line; the implementation added the explicit feedback_motivating_example_regression.md citation and the broadening rationale). That's an additive expansion, not a divergence.
    2 Evidence framing The QA's "Execution Evidence" section says "skill-sync verification was executed inline" with the actual output qa/SKILL.md: synced. That's a post-implementation validation (skill-sync ran on the new state and reported clean). Not conflated with a bug reproduction — there's no prior failing state to reproduce on a doc-only PR.
    3 Process state Worktree at /Users/tony/Projects/worktrees/feature/582-qa-adversarial-reread, branch feature/582-qa-adversarial-reread, HEAD c2be91b, pushed to origin. Working tree clean except for the gitignored node_modules symlink (expected). No stash. Fast-forward of 60dfd6c (#575) merge happened cleanly via stash/pop on the in-progress CHANGELOG.md edit.
    4 Sibling sites Section 5 Sibling-site Scan: N/A. The QA skill has 3 mirrored files (.claude/skills/, templates/skills/, skills/) but those are mirrors, not siblings — they receive the SAME edit by definition. No other skill SKILL.md has a "checklist-promoted-to-structured" pattern that warrants the same treatment in this PR; this is a single-instance doc structural change.
    5 Out-of-scope/Non-Goals Issue #582 lists 3 Non-Goals: (a) not modifying Simple Fix template — implemented exactly (Adversarial Re-Read added to omission list at line 2363); (b) not adding automated detector for "did re-read happen?" — implemented (gate is structural, not parsed); (c) not removing the existing trailing checkbox — partial deviation: the implementation did replace the trailing single-line checkbox at line 2404 with the structured item rather than keeping both. The issue's Non-Goal #3 said "it can stay as a redundant safety net under Output Verification, and the new section provides the actual structure," suggesting the trailing line was meant to remain alongside. The implementation went further and replaced it. Justification for the deviation: keeping both creates ambiguity (which one drives the gate?) and the structured item explicitly cites Section 6d as the source of truth, which subsumes the safety-net role. Mentioning here for transparency rather than as a blocker — the structured item carries strictly more information than the line it replaced.

    Findings: No severe gaps. One minor scope deviation (Non-Goal #3 partial: trailing checkbox replaced rather than retained alongside) — substantive expansion of the structured item, but technically deviates from the issue body's stated intent. Not blocking; documenting in this Adversarial Re-Read for the audit trail.

    Status: Gaps Found


    Verdict: NEEDS_VERIFICATION

    Why not READY_FOR_MERGE: All 7 ACs MET, build clean, skill-sync clean, but 8/8 CI checks pending (Hooks Validation, build 20.x, build 22.x, validate-skills, typecheck, Plugin Structure Validation, Setup Directory Creation, validate-plugin all IN_PROGRESS or QUEUED). Per the verdict gate, CI pending → NEEDS_VERIFICATION.

    Why not AC_MET_BUT_NOT_A_PLUS: The Adversarial Re-Read found one minor scope deviation (Non-Goal #3 partial) — under the new gating, this would normally downgrade to Gaps Found → AC_MET_BUT_NOT_A_PLUS. However: NEEDS_VERIFICATION is stricter than AC_MET_BUT_NOT_A_PLUS for merge purposes (CI pending dominates), so the verdict reflects the binding constraint. Once CI lands green:

    • If reviewer accepts the Non-Goal Doctor: Add Claude Code CLI check #3 deviation rationale → upgrade to READY_FOR_MERGE
    • If reviewer wants the trailing checkbox retained → downgrade to AC_MET_BUT_NOT_A_PLUS and apply the small fix

    Documentation

    • CHANGELOG entry added under [Unreleased] / Changed
    • N/A - No README/docs changes (skill is the documentation surface here)
    • No standalone documentation file added (the SKILL.md change IS the documentation)

    Next Steps

    1. Wait for 8 CI checks to complete on c2be91b
    2. Reviewer decides on the Non-Goal Doctor: Add Claude Code CLI check #3 deviation (trailing checkbox replaced vs. retained-alongside)
      • If accepted: merge as-is (squash) → READY_FOR_MERGE
      • If rejected: small follow-up commit restoring the trailing single-line checkbox alongside the structured item
    3. Post-merge: next /qa invocation will produce the new structured section (self-validating via dogfood on next real issue)
  3. added a commit that references this issue on May 6, 2026
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

    enhancementplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions