Skip to content

fix(cli): -q is short for --quality-loop, not --quiet — silently bypasses quiet-mode rendering #658

Closed

Description

@admarble

Summary

-q is registered at bin/cli.ts:234 as the short form for --quality-loop, not --quiet. Users typing npx sequant run … -q get qualityLoop: true, quiet: undefined — the renderer stays wired and "quiet mode" never activates. This invalidates a category of assumption in recent investigations (#647, #652, #654, #655): every "in -q mode" reference was actually describing renderer-mode behavior.

Evidence

bin/cli.ts:234  .option("-q, --quality-loop", "Enable quality loop with auto-retry")
bin/cli.ts:250  .option("--quiet", "Suppress version warnings and non-essential output")

Commander assigns -q to whichever option registered the short form first. --quiet has no short alias.

Verified live: npx sequant run 656 -q produces SEQUANT WORKFLOW · #N · …elapsed headers + table grid — text that only src/lib/cli-ui/run-renderer.ts:929/955/995 can emit, gated at src/commands/run-progress.ts:59-60 by !tuiEnabled && !quiet. Renderer active → quiet === false.

Impact

Fix options

Opt Change Pros Cons
A -q → --quiet; quality-loop gets -Q or -l Restores convention; matches expectation Breaking for anyone scripting -q for quality-loop
B Drop -q from quality-loop; add to --quiet Restores convention; quality-loop usually enabled by config default Breaking for quality-loop short-form users
C Document loudly, no change Zero break Confusing forever

Recommended: A or B (both fix the convention violation). Quality-loop is typically enabled via project config, so its short form is rarely typed.

Acceptance criteria

  • bin/cli.ts: -q binds to --quiet, not --quality-loop.
  • Live verification: npx sequant run <issue> -q produces heartbeat output only (▸ #N phase), no renderer table grid.
  • docs/incidents/655/negative-result.md mode-discrepancy callout updated.
  • Grep docs/README/SKILL.md/tests for -q references → update where they mean quality-loop, leave/correct where they mean quiet.

Related

Activity

  1. added
    bug
    cli
    on May 17, 2026
  2. admarble commented on May 17, 2026

    @admarble
    ContributorAuthor

    Complexity: Standard (4 ACs, ~3 directories)

    AC Quality Check

    AC Verdict Note
    AC-1 ✅ Clear Binary outcome: -q binds to --quiet. Verifiable by reading registered options.
    AC-2 ✅ Clear Concrete expected output (▸ #N phase heartbeat, no renderer grid). Live-verifiable.
    AC-3 ✅ Clear Single named file to update with a specific framing.
    AC-4 ⚠️ Slightly open "Grep … update where they mean quality-loop" — scope depends on which references are doc-style examples vs. test fixtures. Treat as a sweep, enumerate inline in the plan, and require the PR to list every site touched.

    Scope Assessment

    Non-Goals: ⚠️ Not stated explicitly. Inferred: don't change --quality-loop semantics; don't rewire the heartbeat/renderer behavior (that's still #647/#655); don't retro-edit the historical claims in #647/#652/#654 about "what -q did at the time" — only fix forward-looking references.

    Metric Value Status
    Feature count 1 (short-flag rebinding + docs sweep) ✅
    AC items 4 ✅
    Directory spread ~3 (bin/, docs/, skills/ + their mirrors) ✅

    Verdict: ✅ SCOPE_OK

    The docs sweep touches many files in absolute terms, but each touch is a one-line update of the same character sequence (-q → --quality-loop where intent is quality-loop). Low risk per site, mechanical, no design decisions inside the sweep.


    Acceptance Criteria

    AC-1: bin/cli.ts: -q binds to --quiet, not --quality-loop

    Verification: Unit Test (Commander option introspection) + Integration Test
    Scenario: Given the registered run command → When parsing npx sequant run 123 -q → Then options.quiet === true AND options.qualityLoop === undefined/false.
    Assumptions: Commander 13.x assigns the short form to whichever .option() declares it first; rebinding requires moving -q from line 234 to line 250 (or equivalent). No other code path infers quality-loop intent from -q directly (verified: qualityLoop is the field name everywhere).

    AC-2: Live verification: npx sequant run <issue> -q produces heartbeat output only

    Verification: Integration Test (live CLI invocation) + Manual Test
    Scenario: Given a real issue + the rebuilt CLI → When running npx sequant run <issue> -q --dry-run (or equivalent non-destructive form) → Then stdout shows the ▸ #N phase heartbeat lines from LivenessHeartbeat (src/commands/run-progress.ts:46-49) AND does NOT show the renderer SEQUANT WORKFLOW · #N · …elapsed header / table grid (src/lib/cli-ui/run-renderer.ts:929/955/995).
    Assumptions: The gating at run-progress.ts:59-60 (!tuiEnabled && !quiet) is the sole renderer gate — already proven by #655 static-analysis audit. Once quiet === true, this branch evaluates to false and the heartbeat takes over.

    AC-3: docs/incidents/655/negative-result.md mode-discrepancy callout updated

    Verification: Manual Test (doc content review)
    Scenario: Given the negative-result doc → When read after this fix → Then every "in -q mode" reference is either (a) corrected to "with renderer active" / "in default mode" where the transcript was actually renderer output, or (b) preserved as "in -q/--quiet mode" only where the discussion is about the heartbeat path. The mode-discrepancy callout in §How to capture AC-1 must be rewritten so the gating analysis remains correct (it is — run-progress.ts:59-60 still gates renderer; only the flag name in user prose was wrong).
    Assumptions: The static-analysis conclusion in #655 stands; only interpretation/labels need amendment.

    AC-4: Sweep — update -q references across docs/README/SKILL.md/tests

    Verification: Manual Test (grep + per-site judgement)
    Scenario: Given a candidate list from grep -RIn '\-q\b' across docs/, README.md, skills/, templates/skills/, .claude/skills/, __tests__/, src/**/*.test.ts → When each site is classified → Then:

    • Sites where -q was meant as quality-loop are updated to whichever new spelling is chosen (--quality-loop, or -Q/-l per option A).
    • Sites where -q was meant as quiet are left as-is or, if they predate this fix and were therefore wrong, corrected.
    • Sites unrelated to sequant run (e.g., grep -q, gh -q, GNU script -q) are left alone.
      Assumptions: A complete classification list ships in the PR description so QA can spot-check rather than re-grep from scratch. The "three skill directories" rule applies (.claude/skills/, templates/skills/, skills/) — every change must land in all three.

    Implementation Plan

    Phase 1: Decide the rebinding option (BLOCKS Phase 2)

    Two viable options from the issue:

    Option Change Net effect for users
    A (recommended) -q → --quiet; quality-loop gets new short form -Q (or -l) Convention restored; power users keep a short form for quality-loop
    B Drop -q from quality-loop entirely; -q → --quiet only Convention restored; quality-loop is long-form-only

    Recommendation: Option A with -Q. Rationale:

    1. The rest of bin/cli.ts already binds -q → --quiet for other commands (lines 185, 192 — sync, etc.). Option A makes run consistent with the rest of the CLI.
    2. skills/assess/SKILL.md has many user-facing example commands that recommend -q for quality-loop (lines 182, 241, 334-337, 377-378, 407, 438-440, 513, 536). Option A lets a global replace -q → -Q keep the examples short; Option B forces them all to --quality-loop (~13 chars each, less ergonomic).
    3. -Q is the natural capital-form pair; no conflict with any existing short flag in bin/cli.ts.

    Phase 2: Code change (single file)

    1. bin/cli.ts — move -q from line 234 to line 250:
      .option("--quality-loop", "Enable quality loop with auto-retry")     // was: "-q, --quality-loop"
      //   add new short form: "-Q, --quality-loop" if Option A
      …
      .option("-q, --quiet", "Suppress version warnings and non-essential output")  // was: "--quiet"
    2. Confirm via npx tsx bin/cli.ts run --help that the short forms render correctly.

    Phase 3: Doc and skill sweep

    1. docs/incidents/655/negative-result.md — rewrite per AC-3. The mode-discrepancy callout, the run-progress.ts:59-60 walk-through, and the §"How to capture AC-1" section all need re-labeling.
    2. skills/assess/SKILL.md (×3 mirrors) — update every -q example to -Q (Option A) or --quality-loop (Option B). Sites enumerated above (lines 182, 241, 334-337, 377-378, 407, 438-440, 513, 536) plus references in references/predicted-collision-detection.md and docs/reference/chain-mode-analysis-2026-05.md.
    3. README.md / docs/reference/cheat-sheet.md / docs/reference/run-command.md / docs/features/quiet-mode-heartbeat.md — verify each mentions the right short form.
    4. Test fixtures — src/lib/cli-ui/scrollback-harness.test.ts:70 comment references -q; verify intent and update if needed. __tests__/integration/error-capture.integration.test.ts and similar — check whether any test invokes -q expecting one behavior vs. the other.
    5. CHANGELOG.md — add a Changed entry for the rebinding (semver: this is breaking for anyone scripting -q for quality-loop, so flag it appropriately).
    6. Three skill directories — confirm every SKILL.md change lands in .claude/skills/, templates/skills/, and skills/ (per feedback_read_each_mirrored_file.md).

    Phase 4: Live verification

    1. Build (npm run build), then run npx sequant run <real-issue> -q --dry-run (or smallest non-destructive equivalent) and confirm heartbeat-only output per AC-2.
    2. Run npx sequant run <real-issue> --quality-loop --dry-run to confirm long form still works.
    3. If Option A: also confirm -Q resolves to quality-loop.

    Design Review

    1. Where does this logic belong? Commander option registration in bin/cli.ts. No business logic moves; only the short-form-to-long-form binding changes. The runtime read sites (config-resolver.ts, run-progress.ts, etc.) already use the long form names (qualityLoop, quiet), so nothing downstream needs to change.

    2. What's the simplest correct approach? Move one character. The 1-line code change in bin/cli.ts IS the fix; everything else is doc hygiene. Rejected alternatives: (a) emit a runtime warning when -q is parsed — adds code for a transient compat issue and never decays; (b) keep current binding and rename docs — Option C from the issue, leaves a UNIX convention violation forever.

    3. What existing pattern does this follow? Convention already established at bin/cli.ts:185 and bin/cli.ts:192 where -q, --quiet is the binding for sync and other commands. We're restoring local consistency.

    4. What would a senior reviewer challenge? "Why introduce -Q instead of just dropping the short form?" — Answer: assess SKILL.md has ~15 user-facing example commands using -q for quality-loop. Replacing each with --quality-loop is more disruptive to the example density than rebinding to -Q. The flag is also commonly typed by users running sequant run … -q interactively. Reviewer might also ask: "Is this a breaking change?" — Yes, technically, for anyone scripting -q for quality-loop. Worth noting in CHANGELOG with BREAKING: prefix; impact is low because the rebinding silently does the right thing for the convention-following majority.


    Feature Quality Planning

    All standard checks pass. Notable items:

    • Breaking-change classification: This rebinding silently flips behavior for anyone scripting npx sequant run … -q expecting quality-loop. CHANGELOG must call this out under BREAKING (or Changed with an explicit warning). No deprecation period offered (the issue explicitly considers and rejects Option C / "document loudly, no change").
    • Sibling-site finding: bin/cli.ts:185 and bin/cli.ts:192 already use -q for --quiet. The run command was the inconsistency, not a precedent to copy. No additional rebinding work elsewhere; just verify these existing sites stay as-is.
    • Three-directory sync: Per feedback_read_each_mirrored_file.md and the lint:skill-calls-style hygiene, every SKILL.md edit lands in .claude/skills/, templates/skills/, and skills/. Verify with diff -q after.
    • Test verification: Worth a small commander-introspection test asserting both -q → quiet and (if Option A) -Q → qualityLoop, since the regression failure mode here is silent.

    Derived ACs

    Source Derived AC Priority
    Breaking-change discipline AC-5: CHANGELOG.md entry under a Changed / BREAKING heading documenting -q rebinding (and -Q if Option A) High
    Regression prevention AC-6: A small unit/integration test pins the short-form-to-long-form binding so future option reorderings don't silently break it again Medium

    Open Questions

    1. Option A vs Option B? — Recommendation: A with -Q (preserves short form for quality-loop, matches assess SKILL.md examples with smaller edits). Impact if wrong: minor — choosing B just forces --quality-loop in ~15 example commands.
    2. Retro-edit historical incident docs? — Recommendation: leave the narrative of fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647/fix(cli): renderer bottom-output corruption — ✔ #5loop missing chars + U+FFFD in summary separator #652/fix(#652): renderer bottom-output corruption — column-binding + renderSummary teardown order #654/investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655 alone; they correctly describe what happened with the broken binding. Only update forward-looking guidance and any spots that confuse readers about what -q does today. AC-3 narrowly targets docs/incidents/655/negative-result.md per the issue; do not widen unless QA asks.
    3. -Q vs -l for quality-loop in Option A? — Recommendation: -Q (capital-pair convention; -l collides with common "list" semantics). Impact: trivial; if reviewer prefers -l, swap is one character.

    Recommended Workflow

    Phases: spec → exec → qa
    Quality Loop: disabled (small, well-scoped bug fix; AC criteria are binary)
    Reasoning: No new feature, no UI changes, bug fix with 4 ACs. ACs are mostly Manual/Integration verification — testgen would add little value over a single targeted unit test that exec produces inline. Quality-loop adds latency without clear benefit on a 1-line code change + mechanical doc sweep.


    Label Review

    Current: bug, cli
    Recommended: bug, cli, breaking (or whichever label this repo uses for breaking changes — check existing convention)
    Reason: Rebinding a short flag flips behavior for anyone scripting it. Worth a breaking label so the change shows up in release notes filtering.
    Quality Loop: Won't auto-enable — no complex / refactor / breaking label triggers scope-assessment yellow.

    → gh issue edit 658 --add-label planned


    --- DRAFT GITHUB ISSUE COMMENT (PLAN) ---

    TL;DR for reviewers — Commander binds -q to whichever option declares it first. bin/cli.ts:234 (-q, --quality-loop) shadows bin/cli.ts:250 (--quiet). Fix is one line: move -q from line 234 to line 250 and (per Option A) add -Q as the new short for --quality-loop. Then sweep docs//skills//README to update -q examples that meant quality-loop.

    Acceptance criteria + verification:

    • AC-1 — bin/cli.ts: -q binds to --quiet, not --quality-loop. Verify: Commander option introspection asserts options.quiet === true when parsing run 123 -q.
    • AC-2 — Live: npx sequant run <issue> -q shows ▸ #N phase heartbeat only, no SEQUANT WORKFLOW · …elapsed renderer header. Verify: run --dry-run capture.
    • AC-3 — docs/incidents/655/negative-result.md mode-discrepancy callout updated; transcripts re-labeled "default mode / renderer active" where the renderer was actually emitting, "-q/--quiet mode" preserved only where heartbeat was the writer.
    • AC-4 — Sweep across docs/, README.md, skills/ (×3 mirrors), __tests__/: classify each -q usage; update quality-loop sites; leave quiet sites; ignore unrelated (grep -q, gh -q, etc.). PR description must list every site touched.
    • AC-5 (derived) — CHANGELOG.md Changed/BREAKING entry for the rebinding.
    • AC-6 (derived) — Unit/integration test pins -q → quiet and -Q → qualityLoop to prevent silent regression on future option reordering.

    Recommended option: A with -Q — restores UNIX convention (matches bin/cli.ts:185, bin/cli.ts:192) and preserves a short form for quality-loop, keeping skills/assess/SKILL.md examples ergonomic. See full Open Questions in the spec body for the alternative.

    Workflow: spec → exec → qa, quality-loop off.

    Open questions resolved before exec:

    1. Option A vs B (recommendation: A with -Q).
    2. Scope of historical-doc retro-edit (recommendation: only docs/incidents/655/negative-result.md per AC-3; leave fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647/fix(cli): renderer bottom-output corruption — ✔ #5loop missing chars + U+FFFD in summary separator #652/fix(#652): renderer bottom-output corruption — column-binding + renderSummary teardown order #654 narratives alone).
    3. -Q vs -l (recommendation: -Q).
  3. added
    planned
    on May 17, 2026
  4. admarble commented on May 17, 2026

    @admarble
    ContributorAuthor

    /exec Progress Update

    Status: Implementation complete; PR #660 open.

    AC Coverage

    AC Source Status Evidence
    AC-1 Original ✅ Implemented bin/cli.ts:234 (-Q, --quality-loop), bin/cli.ts:250 (-q, --quiet); pinned by new regression test
    AC-2 Original ✅ Verified Inline Commander parse confirms -q → quiet=true, qualityLoop=undefined. Renderer gate at run-progress.ts:59-60 unchanged, so heartbeat path activates
    AC-3 Original ✅ Implemented docs/incidents/655/negative-result.md mode-discrepancy callout rewritten — explains the puzzle dissolves once the broken binding is read off bin/cli.ts:234. Static-analysis table also relabeled "quiet mode" for clarity
    AC-4 Original ✅ Implemented Sweep complete — see PR description for full enumeration. Quality-loop sites updated to -Q; quiet-mode docs (already correct under the fix) left as-is; unrelated grep -q/gh -q/etc. left alone
    AC-5 Derived ✅ Implemented CHANGELOG.md [Unreleased] → ### Changed entry flagged BREAKING
    AC-6 Derived ✅ Implemented src/commands/cli.integration.test.ts — 2 new cases under run command short-form bindings (#658) pin both bindings

    Quality Plan Alignment

    Quality Dimension Items Addressed Notes
    Breaking-change discipline 1/1 CHANGELOG entry flagged BREAKING
    Sibling-site finding 1/1 Verified bin/cli.ts:185, 192 (sync/doctor) already use -q → --quiet; no additional rebinding
    Three-directory sync 1/1 diff -q confirms all 3 mirrors in sync post-edit
    Test verification 1/1 Regression test pins -q → --quiet and -Q → --quality-loop against built CLI

    Files Changed (20)

    • bin/cli.ts — the 2-line binding fix
    • src/lib/assess-collision-detect.ts + test — chain suggestion
    • src/lib/__tests__/solve-comment-parser.test.ts — flag table fixture
    • src/commands/cli.integration.test.ts — new regression test (2 cases)
    • CHANGELOG.md — Changed/BREAKING entry
    • Docs: cheat-sheet.md, run-command.md, chain-mode-analysis-2026-05.md, assess-minimal-flags.md, assess-unification.md, spec-by-default.md, what-weve-built.md, incidents/655/negative-result.md
    • Assess SKILL.md + references doc (×3 mirrors: skills/, templates/skills/, .claude/skills/)

    Build / Lint / Tests

    • npm run build ✅ pass
    • npm run lint ✅ pass (0 errors, 0 warnings)
    • npx vitest run src/commands/cli.integration.test.ts — 6/6 pass (incl. 2 new)
    • Targeted tests on heartbeat, run-progress, scrollback-harness, assess-skill, assess-collision-detect, solve/assess-comment-parser — all pass, no regressions

    Live Verification (AC-2)

    npx tsx inline Commander introspection:

    args ["123","-q"]      → quiet=true,  qualityLoop=undefined
    args ["123","-Q"]      → quiet=undefined, qualityLoop=true
    args ["123","-q","-Q"] → quiet=true,  qualityLoop=true
    

    node dist/bin/cli.js run --help:

    -Q, --quality-loop    Enable quality loop with auto-retry
    -q, --quiet           Suppress version warnings and non-essential output
    

    (Could not run sequant run … -q against a live issue end-to-end because the project's CLI requires sequant init for full execution, but the parsing + gating logic is structurally proven and covered by the regression test.)

    Pre-PR Confidence Check

    • Weakest part: The doc sweep is mechanical but spans many small edits; AC-4 says the PR description must list every site touched. The PR body enumerates them in full so QA can spot-check rather than re-grep from scratch.
    • Coverage gaps: No new source code was added that lacks tests — the binding change is a 2-character edit in bin/cli.ts pinned by the new regression test. Doc changes are not test-covered (typical for documentation).

    PR Status

    ✅ Created: #660

  5. admarble commented on May 17, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #658

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original bin/cli.ts: -q binds to --quiet, not --quality-loop ✅ MET bin/cli.ts:234 now -Q, --quality-loop; :250 now -q, --quiet. node dist/bin/cli.js run --help confirms.
    AC-2 Original npx sequant run <issue> -q → heartbeat only, no renderer grid ✅ MET Verified structurally: Commander parses -q as quiet=true,qualityLoop=undefined; the gate at run-progress.ts:60 (!tuiEnabled && !quiet) confirms the renderer is not instantiated when quiet=true. End-to-end live run was substituted with run --help + Commander introspection because the CLI needs sequant init; acceptable given the gate is a single literal boolean.
    AC-3 Original docs/incidents/655/negative-result.md mode-discrepancy callout updated ✅ MET The "How to capture AC-1" callout has been fully rewritten — it now explains why the puzzle dissolves (bin/cli.ts:234 registered -q for --quality-loop so -q produced qualityLoop:true, leaving the renderer wired and free to emit ✔). Static-analysis table also relabeled to "quiet mode (--quiet)" for clarity.
    AC-4 Original Sweep -q references in docs//README/SKILL.md/tests; update where they mean quality-loop, leave/correct where they mean quiet ⚠️ PARTIALLY_MET Most of the sweep is done correctly (CHANGELOG, assess SKILL.md ×3, references doc ×3, cheat-sheet, run-command, chain-mode-analysis, assess-minimal-flags, assess-unification, spec-by-default, what-weve-built, incidents/655). Two specific sites in docs/features/run-renderer.md were left as-is per the PR description's blanket "quiet-mode references are correct now that -q activates quiet" — but the content of those lines is at odds with the corrected gating. See AC-4 sweep gaps below.
    AC-5 Derived CHANGELOG.md Changed/BREAKING entry ✅ MET Comprehensive entry under [Unreleased] → Changed, prefixed **BREAKING (CLI):**, explains the prior shadowing, the migration (-Q for users scripting quality-loop), and links #658.
    AC-6 Derived Regression test pins both bindings ✅ MET src/commands/cli.integration.test.ts:144-172 — two new cases under run command short-form bindings (#658): -q → --quiet and -Q → --quality-loop. Both assert against the built CLI's run --help output. 6/6 cases pass locally.

    Coverage: 5/6 fully MET, 1/6 PARTIALLY_MET.


    AC-4 sweep gaps

    Both sites are in docs/features/run-renderer.md and are explicitly classified as "left as-is" by the PR description. I disagree with the classification for these two:

    1. docs/features/run-renderer.md:115 — In the "What to Expect" list:

    Quiet mode (-q). Renderer still runs; --quiet only suppresses Claude's verbose stream. In non-TTY contexts the 60s heartbeat keeps -q runs from looking stalled…

    This contradicts the AC-3 corrected gating analysis in negative-result.md. The renderer is gated by !tuiEnabled && !quiet at run-progress.ts:60 and is not instantiated when quiet === true (the ternary returns null and the heartbeat path owns stdout instead). The bullet should be reworded to: "In quiet mode (-q / --quiet), the renderer is replaced by the heartbeat" (or similar). The phrase "Renderer still runs" was a documentation error that predates this PR; under the new binding (-q = quiet) it now actively misleads users about what they will see.

    2. docs/features/run-renderer.md:180 — In the renderer-debugging section:

    SEQUANT_DEBUG_RENDERER=1 npx sequant run 504 505 -q 2> /tmp/debug.jsonl

    Post-fix, -q disables the renderer. SEQUANT_DEBUG_RENDERER=1 will produce zero traces because the renderer is never instantiated to emit them. A user following this debugging guide to diagnose a renderer regression will get an empty debug.jsonl and assume the instrumentation is broken. The -q should be dropped from this example (the renderer is the default, so no flag is needed to debug it).

    These are exactly the kind of doc references AC-4 calls for. Both meant "renderer-active mode" pre-fix (when -q actually bound to --quality-loop), so they fall under the "update where they mean quality-loop" clause. feedback_qa_ac_literal.md applies here — the AC text is the contract; the PR author's "left as-is" judgment was a reasonable call applied uniformly across run-renderer.md, but two specific lines under that uniform call were misclassified.

    A third site — src/lib/cli-ui/scrollback-harness.test.ts:70 comment // Two issues, like \npx sequant run 504 505 -q`.— is preserved as a historical artifact per the spec plan's explicit allowance. Defensible (it's narrating a pre-fix transcript), but a parenthetical(pre-#658 binding)` would future-proof readers.


    Quality Plan Verification

    Spec plan listed 4 quality dimensions; all addressed:

    Dimension Items Planned Items Addressed Status
    Breaking-change discipline 1 (CHANGELOG flagged BREAKING) 1 ✅
    Sibling-site finding bin/cli.ts:185,192 (sync/doctor) confirmed already -q→--quiet 1 ✅
    Three-directory sync .claude/skills/, skills/, templates/skills/ mirrors 1 (diff -q clean) ✅
    Test verification Commander-introspection regression test 1 (2 cases, both pass) ✅

    Quality Plan Status: Complete


    CI Status

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

    CI Summary: 6 passed, 2 pending (build matrix), 0 failed. typecheck already green; npm run build passed locally; build matrix expected to pass. Pending is gating but low-risk.


    Quality Metrics

    Metric Value Status
    Type issues (any added on + lines) 0 ✅ OK
    Deleted tests 0 ✅ OK
    Files changed 20 ✅ OK
    Lines added +159 -
    Lines deleted -121 -
    Net diff +38 small for a sweep

    Size Gate: Diff is 280 lines, exceeds default 100-line threshold → standard pipeline. Inline review chosen over sub-agents (per feedback_qa_agent_worktree_verification.md — sub-agents hallucinate on worktree code and this diff is small + focused). The change is one 2-character code edit + a mechanical doc sweep + new regression tests.


    Build Verification

    Build passed cleanly (npm run build → tsc exit 0). N/A for cross-branch verification.


    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    bin/cli.ts Critical (user-facing CLI) ✅ Yes src/commands/cli.integration.test.ts:144-172
    src/lib/assess-collision-detect.ts Standard ✅ Yes src/lib/__tests__/assess-collision-detect.test.ts (updated)

    Coverage: 2/2 changed source files have tests.

    Targeted test runs:


    Code Review

    Strengths:

    • The fix is the minimum necessary edit: two characters (-q → -Q on line 234; add -q, on line 250). No control-flow changes, no new imports.
    • The regression test invokes the built CLI (node dist/bin/cli.js run --help) and asserts on actual help output — robust against future option reorderings.
    • negative-result.md rewrite is excellent — it directly explains the puzzle in terms a future reader can verify by reading bin/cli.ts:234.
    • CHANGELOG entry is exemplary: tells the reader why the change exists, the migration path, and what the prior bug looked like.
    • Three-mirror sync verified via diff -q — no skill drift.
    • bin/cli.ts:185, 192 (sync/doctor) correctly identified as already-consistent siblings; no spurious rebinding elsewhere.

    Issues:

    • AC-4 sweep gaps in docs/features/run-renderer.md:115 and :180 (detailed above).

    Suggestions:

    • Consider one of:
      • Update run-renderer.md:115 to remove the "Renderer still runs" claim (the renderer is replaced by the heartbeat in quiet mode).
      • Update run-renderer.md:180 to drop -q from the debug example (the renderer is the default; no flag needed).
    • Optional: add (pre-#658 binding) parenthetical to scrollback-harness.test.ts:70 to future-proof the historical comment.

    Test Quality Review

    Category Status Notes
    Behavior vs Implementation ✅ OK Tests assert on the built CLI's run --help output, not internal Commander state.
    Coverage Depth ✅ OK Both directions pinned (-q → --quiet, -Q → --quality-loop) + negative case (-q does not bind to --quality-loop).
    Mock Hygiene ✅ OK No mocks — runs the actual built CLI.
    Test Reliability ✅ OK Deterministic; no timing dependencies. The vitest.global-setup.ts handles the build prerequisite.

    Anti-Pattern Detection

    Dependency Audit

    N/A — no package.json changes.

    Code Patterns

    No new code patterns introduced. The 2-character bin/cli.ts edit, the regression test, and the assess-collision-detect.ts:269 (-q → -Q in a suggestion string) are all mechanical.

    Critical Issues: 0
    Warnings: 0


    Call-Site Review

    N/A — no new exported functions. The diff is option-string edits + a regression test.


    Execution Evidence

    Scripts directory not modified (no scripts/ files in diff). N/A for /verify. The CLI behavior is structurally verified by the regression test plus node dist/bin/cli.js run --help confirming the rendered help output.


    Skill Command Verification

    Skill markdown was modified (assess/SKILL.md + references/predicted-collision-detection.md, all 3 mirrors). The diff is mechanical text substitutions (-q → -Q in user-facing example commands). No new commands or JSON-field queries introduced. Verification Status: Passed (no new command syntax to verify; substitutions preserve existing command shape).


    Detection Pattern Verification

    Skill markdown files with pattern changes: 0 (no new grep/awk/jq/sed literals or regex blocks added in this PR's diff to skill markdown).

    Verification Status: Not Required


    CLI Registration Verification

    bin/cli.ts is modified but no new fields are added to RunOptions — the change is restricted to short-form aliases on existing flags (--quality-loop, --quiet). Both long forms remain registered and accessible via mergedOptions.qualityLoop / mergedOptions.quiet exactly as before.

    Verification Status: Passed


    Smoke Test

    Test Command Result Notes
    Help rendering node dist/bin/cli.js run --help ✅ Shows -Q, --quality-loop and -q, --quiet
    Commander parse inline tsx introspection (from exec progress) ✅ -q → quiet=true,qualityLoop=undefined; -Q → quiet=undefined,qualityLoop=true
    Renderer gating static + tests ✅ run-progress.ts:60 gate unchanged; heartbeat tests 24/24 pass

    Smoke Test Status: Complete


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (fix(cli): commit; user-visible flag binding)
    [Unreleased] entry ✅ Present under ### Changed
    Entry format ✅ Valid (action verb, BREAKING prefix, includes #658, migration path)

    Result: CHANGELOG requirements met.


    Risk Assessment

    • Likely failure mode: A user with a prior shell alias / CI script invoking sequant run … -q for quality-loop will silently get quiet mode instead. The CHANGELOG flags this as BREAKING but there is no runtime warning. Impact: their quality loop won't run; the renderer is silenced and only heartbeat shows. Detection is straightforward (no quality loop retry annotations) but the failure is silent.
    • Not tested: End-to-end sequant run … -q against a real issue (would require .sequant/state.json setup). The structural verification via Commander introspection + the unchanged run-progress.ts:60 gate is acceptable — the gate is a single boolean and is exercised by heartbeat tests.
    • Sibling sites considered (cross-file): bin/cli.ts:185, 192 (sync/doctor) — confirmed already consistent with -q → --quiet. No other -q collisions anywhere in bin/cli.ts.
    • Sibling-line audit (intra-file): Within bin/cli.ts's run command option block, audited adjacent .option() calls — no other short-form collisions; -d, -v, -Q, -q are all distinct.

    Adversarial Re-Read

    Findings:

    Status: Gaps Found (the two run-renderer.md doc misses — non-blocking but warrant correction).


    Verdict: AC_MET_BUT_NOT_A_PLUS

    The core fix is excellent — minimum-necessary code change, pinned by a robust regression test, with an exemplary CHANGELOG entry and a beautifully rewritten incident doc explaining why the puzzle dissolves. Five of six ACs are unambiguously met.

    AC-4 is partially met: the sweep covers ~95% of the targets correctly, but two specific lines in docs/features/run-renderer.md (line 115's "Renderer still runs in quiet mode" claim and line 180's broken SEQUANT_DEBUG_RENDERER=1 … -q debug example) should have been corrected. These are documentation accuracy issues, not behavior bugs — the binding fix itself works, and the regression test confirms it stays correct.

    I'm calling this AC_MET_BUT_NOT_A_PLUS rather than AC_NOT_MET because:

    1. The behavior fix is verified and complete.
    2. The missed sites are doc accuracy, not user-facing CLI behavior.
    3. Both can be addressed with two small follow-up edits in this PR before merge (preferred per feedback_fill_gaps_in_pr.md) — or merged as-is with a follow-up issue.

    Documentation

    • CHANGELOG entry added (BREAKING-flagged) — exemplary
    • docs/incidents/655/negative-result.md rewritten (AC-3)
    • Assess SKILL.md + references (×3 mirrors) swept
    • Doc reference pages (cheat-sheet, run-command, chain-mode-analysis, etc.) swept
    • Recommended: docs/features/run-renderer.md:115 (Renderer-still-runs claim) and :180 (debug example) — see AC-4 sweep gaps above

    Next Steps

    1. Recommended before merge: Update docs/features/run-renderer.md:115 to remove the "Renderer still runs" claim (renderer is replaced by heartbeat in quiet mode, per run-progress.ts:60 gate).
    2. Recommended before merge: Update docs/features/run-renderer.md:180 to drop -q from the SEQUANT_DEBUG_RENDERER=1 npx sequant run 504 505 -q example (the renderer is the default; -q now disables it).
    3. Optional: Add (pre-#658 binding) parenthetical to src/lib/cli-ui/scrollback-harness.test.ts:70 comment.
    4. Wait for build (20.x) / build (22.x) CI to complete (typecheck already green; expected to pass).
    5. Once docs are addressed and CI green: merge.
    6. After merge, run /docs 658 to refresh feature docs if needed.

  6. added
    needs-improvement
    and removed
    planned
    on May 17, 2026
  7. added a commit that references this issue on May 17, 2026
  8. admarble commented on May 17, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #658 (re-run after AC-4 sweep follow-up)

    Prior QA at def196b was AC_MET_BUT_NOT_A_PLUS (AC-4 docs sweep gap on run-renderer.md). HEAD is now be14a92 — re-run verifies the gap is closed.

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original bin/cli.ts: -q binds to --quiet, not --quality-loop ✅ MET bin/cli.ts:234 → -Q, --quality-loop; :250 → -q, --quiet. node dist/bin/cli.js run --help confirms. New integration test (src/commands/cli.integration.test.ts:140-172) pins both bindings.
    AC-2 Original npx sequant run <issue> -q → heartbeat only, no renderer grid ✅ MET Verified structurally (renderer gate at run-progress.ts:60 is !quiet); live -q --dry-run invocation produces no table grid; new integration test asserts -q → --quiet.
    AC-3 Original docs/incidents/655/negative-result.md mode-discrepancy callout updated ✅ MET Callout rewritten to attribute the puzzle to the -q binding bug being fixed in this PR (previously framed as unresolved mode discrepancy). All -q references in the audit table updated to --quiet.
    AC-4 Original Grep docs/README/SKILL.md/tests for -q references → update where they mean quality-loop, leave/correct where they mean quiet ✅ MET New commit be14a92 patched the two run-renderer.md misses from prior QA (line 115 quiet-mode entry and line 180 SEQUANT_DEBUG_RENDERER example). Final sweep finds zero quality-loop -q references; remaining -q mentions in docs/features/quiet-mode-heartbeat.md / run-renderer.md:135 correctly refer to the new -q = --quiet binding.

    Coverage: 4/4 ACs met. No derived ACs (no quality plan emitted).


    Precheck Findings

    Section Status Surfaced
    Fixtures pass 1 motivating fixture (the issue-body bin/cli.ts:234/:250 evidence block) — confirmed both flag bindings are flipped in the implementation
    Sibling-grep not_applicable No source-file declarations changed (docs / config / skill prose only)
    AC literal-diff pass PR body lists AC-1…AC-6 (PR section covers original 4 + the prior-QA gap-fix ACs)

    Source: .sequant/gap-precheck.json (schemaVersion 1)


    CI Status

    Check State Bucket Impact
    Plugin Structure Validation SUCCESS pass ✅ MET
    build (20.x) SUCCESS pass ✅ MET
    build (22.x) SUCCESS pass ✅ MET
    validate-skills SUCCESS pass ✅ MET
    Hooks Validation SUCCESS pass ✅ MET
    typecheck SUCCESS pass ✅ MET
    Setup Directory Creation SUCCESS pass ✅ MET
    validate-plugin SUCCESS pass ✅ MET

    CI Summary: 8 passed, 0 pending, 0 failed.


    Quality Metrics

    Metric Value Status
    Files changed 21 OK (focused sweep)
    Lines added +161 OK
    Lines deleted -123 OK
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Local tests (cli.integration + collision-detect + solve-comment-parser) 56/56 passed OK
    npm run build clean OK

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    bin/cli.ts Standard ✅ Yes src/commands/cli.integration.test.ts (new run command short-form bindings (#658) describe block)
    src/lib/assess-collision-detect.ts Standard ✅ Yes src/lib/__tests__/assess-collision-detect.test.ts (regex updated -q\b → -Q\b)

    Coverage: 2/2 changed source files have tests. Other 19 changed files are docs/skill MD or test fixtures.


    Code Review

    Strengths:

    • Surgical 2-line bin/cli.ts change; symmetric rebinding (quality-loop loses -q, gains -Q; quiet gains -q)
    • Regression test pins both bindings — locks against future option-reordering that could silently re-shadow short forms
    • CHANGELOG entry is explicit about the BREAKING nature with full rationale and migration path (-q → -Q for quality-loop scripts)
    • AC-4 sweep is exhaustive: 3-directory skill mirror sync verified clean, assess collision-detect chain suggestion + tests updated together, docs/incidents/655/negative-result.md mode-discrepancy callout rewritten to use the binding-bug-fix framing instead of leaving the puzzle unresolved
    • Follow-up commit be14a92 cleanly closes the prior-QA AC-4 gap: run-renderer.md quiet-mode bullet now correctly describes renderer disabled in quiet mode (matches the run-progress.ts:60 gate), and the SEQUANT_DEBUG_RENDERER example correctly drops -q because the renderer must be active for the tracing to emit

    Issues: None.

    Suggestions: None blocking.


    Anti-Pattern Detection

    Category Status
    Code patterns Clean (no new logic, only string literal updates and option-line rebindings)
    Dependency audit N/A — no package.json change
    Security N/A — no security-sensitive paths touched

    Skill Command Verification

    Skill files changed: 6 (assess SKILL.md + predicted-collision-detection.md across 3 mirrors)

    File Commands Found Verification Status
    .claude/skills/assess/SKILL.md (+2 mirrors) npx sequant run … -Q … examples ✅ Passed (verified -Q binds to --quality-loop via node dist/bin/cli.js run --help)
    .claude/skills/assess/references/predicted-collision-detection.md (+2 mirrors) npx sequant run A B C --chain --qa-gate -Q ✅ Passed

    Verification Status: Passed.


    Detection Pattern Verification

    §6c precondition not met — diff hunks in changed skill markdown contain no new grep/awk/jq/sed/regex literals (changes are pure -q → -Q string substitutions in prose and example commands). Section omitted per the hard precondition.


    CLI Registration Verification

    Interface Field Runtime Usage CLI Registered Status
    qualityLoop yes (mergedOptions.qualityLoop) -Q, --quality-loop (bin/cli.ts:234) ✅ OK
    quiet yes (mergedOptions.quiet) -q, --quiet (bin/cli.ts:250) ✅ OK

    Verification Status: Passed.


    Smoke Test

    Test Command Result Notes
    Short-form mapping node dist/bin/cli.js run --help ✅ Shows -Q, --quality-loop and -q, --quiet
    Live -q invocation tsx bin/cli.ts run 658 -q --dry-run ✅ No renderer table grid; static text output only
    Integration tests npx vitest run src/commands/cli.integration.test.ts ✅ 6/6 pass including the two new #658 regression tests
    Affected unit tests npx vitest run src/lib/__tests__/assess-collision-detect.test.ts src/lib/__tests__/solve-comment-parser.test.ts ✅ 50/50 pass

    Smoke Test Status: Complete.


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing change ✅ Yes (BREAKING CLI rebinding)
    [Unreleased] entry ✅ Present under ### Changed
    Entry format ✅ Valid (BREAKING marker + migration path + issue ref #658)

    Result: CHANGELOG requirements met.


    Risk Assessment

    • Likely failure mode: A user with a script or alias hard-coding sequant run … -q for quality-loop will now silently get quiet mode (renderer disabled, no auto-retry). This is the intended BREAKING semantics and is called out in the CHANGELOG; non-blocking.
    • Not tested: No automated coverage for the actual renderer-vs-heartbeat output difference under -q (that path is unchanged by this PR — gating logic at run-progress.ts:60 was already correct). The new test only covers the --help mapping, which is sufficient because Commander's flag resolution is the only thing the PR changes.
    • Sibling sites considered: sync and doctor commands already use -q, --quiet (predates this PR — see bin/cli.ts and the CHANGELOG entry rationale); no other commands register -q. No cross-file sibling sites with the same shadowing risk.
    • Sibling-line audit: Single intra-file fix at bin/cli.ts:234/:250; no adjacent short-form bindings on the run command share the rebinding pattern. -d/-v were untouched and remain correctly bound.

    Adversarial Re-Read

    Findings: No gaps found because:

    • The issue-body verbatim fixture (bin/cli.ts:234/:250 evidence block) was run against the implementation and matches the expected post-fix state — both flag declarations are exactly inverted per the AC text.
    • The "live verification" evidence is a post-fix --help invocation, not a pre-fix bug repro masquerading as validation.
    • Process state is clean: no uncommitted changes, branch is current with origin, 0 commits behind main.
    • Cross-file siblings (sync/doctor) and intra-file adjacent options (-d/-v) explicitly inspected and ruled non-conflicting.
    • No Non-Goals declared in the issue body; the BREAKING surface is contained to the run command short-form table and the assess workflow examples that recommend it.

    Status: Clean.


    Verdict: READY_FOR_MERGE

    All four original ACs are MET. The follow-up commit be14a92 cleanly closes the AC-4 sweep gap from the prior QA (the two run-renderer.md misses). CI is fully green (8/8), local tests pass (56/56), 3-directory skill mirrors are in sync, and the BREAKING semantics are explicitly called out in CHANGELOG with a migration note. The change is surgical, well-tested, and reversible.

    Documentation

    • CHANGELOG entry added under [Unreleased] → Changed with BREAKING marker (fix(cli): -q is short for --quality-loop, not --quiet — silently bypasses quiet-mode rendering #658)
    • docs/reference/run-command.md flag table updated (-Q, --quality-loop row + new -q, --quiet row)
    • docs/reference/cheat-sheet.md updated
    • docs/features/run-renderer.md quiet-mode behavior aligned with post-fix gating
    • docs/incidents/655/negative-result.md mode-discrepancy callout rewritten
    • assess SKILL.md workflow examples + chain-suggestion format updated (3-dir mirrors in sync)

    Next Steps

    1. Merge PR fix(cli): rebind -q to --quiet, quality-loop now -Q (#658) #660.
    2. After merge, /docs 658 is optional — docs/reference/run-command.md and CHANGELOG.md already cover the user-facing surface.
  9. added
    ready-for-review
    and removed
    needs-improvement
    on May 17, 2026
  10. added a commit that references this issue on Jun 3, 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

    bugcliready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions