Repository navigation
Closed
Labels
cliCLI commands and interfaceenhancementNew feature or requestno-browser-testSkip the /test browser phase (no web surface)plannedImplementation plan approvedready-for-reviewReady for code reviewuiUser interface and visualization
Description
Problem
Two related CLI UX issues surfaced while running sequant run:
1. -q / -Q flag collision (footgun)
Commander short flags are case-sensitive, so bin/cli.ts currently has two near-identical short flags on run:
-q, --quiet(bin/cli.ts:254) → suppress output-Q, --quality-loop(bin/cli.ts:238) → enable quality loop
A user running npx sequant run 665 -q intending to enable the quality loop instead silently enabled quiet mode. Two bad outcomes at once: no quality loop, and the live renderer is suppressed (see run-progress.ts:73 — the live renderer is only built when !quiet), so they got the old plain journal output and assumed the new UI was missing.
2. New boxed Ink TUI is opt-in for run
The boxed Ink TUI is only mounted when --experimental-tui is passed (run.ts:102-103). Default run falls back to the line-based phase-matrix renderer. The boxed TUI should be the default experience.
Desired behavior (decisions confirmed)
Flags
- Free
-qfrom quiet.--quietbecomes-s, --quiet(mnemonic: silent).-qno longer maps to quiet. - Quality loop responds to both
-qand-Q. Keep-Q, --quality-loopas the primary; add-qas an alias that normalizes tooptions.qualityLoopinrunCommand. (Commander 14 only allows one short flag per option definition, so implement-qas a hidden alias option and OR it intoqualityLoopat the top ofrunCommand.) - Both
-qand-Qproduce identical behavior (quality loop on); verified by a CLI parse test.
Boxed TUI as default for run
- Boxed Ink TUI is the default when stdout is a TTY and output is not suppressed:
tuiEnabled = (options.tui !== false) && isTTY. - Add
--no-tuito opt out → falls back to the line-based phase-matrix renderer (run-progress.tspath). - Non-TTY / piped output still safely degrades to the phase-matrix / linear renderer (no Ink writes corrupting pipes).
- Keep
--experimental-tuias a hidden, no-op alias (it's now the default) so existing scripts/muscle-memory don't break. -
--quiet/-scontinues to suppress the renderer entirely (heartbeat-only), regardless of TUI default.
sequant ready parity
- Confirm
sequant readyuses the same full boxed Ink TUI. It already mountsrenderTuivia the shared../ui/tui/index.jswhen TTY + non---json(ready.ts:144,171-182, from feat(tui): upgradesequant readyto the boxed Ink TUI + harden TUI for large batches #699/feat(tui): upgradesequant readyto the boxed Ink TUI + harden TUI (#699) #700). Verify it is the same "full box" treatment as the newrundefault and not degraded/single-row whererunis multi-row. Close any gap so both commands render identically.
Files in scope
bin/cli.ts— flag definitions (runcommand ~line 223-318)src/commands/run.ts—tuiEnabledcomputation (line 102),qualityLoopnormalizationsrc/commands/run-progress.ts— renderer gating (line 73)src/lib/workflow/types.ts—RunOptions(quiet,qualityLoop,experimentalTui, newtui/alias fields)src/commands/ready.ts— verify TUI parity (line 144, 171-182)
Acceptance Criteria summary
-qand-Qboth enable the quality loop; neither enables quiet.--quietis reachable via-s(and long form); suppresses the renderer.sequant runshows the boxed Ink TUI by default on a TTY.--no-tuiopts out to the phase-matrix renderer; non-TTY auto-degrades.--experimental-tuistill parses (hidden no-op alias).sequant readyrenders the same full boxed TUI asrun.- Help text and any docs/README references updated to reflect the new flags.
Metadata
Metadata
Assignees
Labels
cliCLI commands and interfaceenhancementNew feature or requestno-browser-testSkip the /test browser phase (no web surface)plannedImplementation plan approvedready-for-reviewReady for code reviewuiUser interface and visualization
Activity
admarble commentedon Jun 3, 2026
Complexity: Standard (7 ACs, 3 directories)
AC Quality Check
Machine AC parse returned 0 (the
- [ ]checkboxes under Desired behavior lackAC-NIDs; the authoritative list is the numbered Acceptance Criteria summary 1–7). ACs are concrete and measurable — no vague/unmeasurable flags. One title/body tension: AC-3 says boxed TUI is default "when stdout is a TTY and output is not suppressed," but the formula given (tuiEnabled = (options.tui !== false) && isTTY) omits the!quietterm that the last flag checkbox requires (see Open Question 1).Scope Assessment
Non-Goals:⚠️ No explicit Non-Goals section. Implicit boundary is sound: terminal-Ink rendering +
runflag remap only — no web UI, no renderer internals rewrite.bin/,src/commands/,src/lib/workflow/)Verdict:⚠️ SCOPE_WARNING — cohesive single subsystem (CLI run rendering/flags), tightly coupled, well-specified. Keep as one issue; do not split.
Acceptance Criteria
AC-1:
-qand-Qboth enable the quality loop; neither enables quietVerification: Integration Test (CLI parse). Reverses existing #658 test
cli.integration.test.ts:162which pins-q→--quiet— that test must be rewritten.Scenario: Given
run 705 -qandrun 705 -Q→ When parsed → Then both setoptions.qualityLoop=trueand neither setsquiet.Assumptions: Commander 14.0.3 allows only one short per Option, so
-qis a hidden alias Option ORed intoqualityLoopat the top ofrunCommand.AC-2:
--quietreachable via-s(and long form); suppresses the rendererVerification: Integration Test (
run --helpshows-s, --quiet) + Unit (heartbeat-only path).Scenario: Given
-s/--quiet→ Then renderer + TUI suppressed,LivenessHeartbeatis the only liveness signal.AC-3:
sequant runshows the boxed Ink TUI by default on a TTYVerification: Unit Test on the
tuiEnabledcomputation (run.ts:101) with mockedisTTY.Scenario: Given TTY, no
--no-tui, not quiet → ThentuiEnabled=trueandrenderTuimounts.AC-4:
--no-tuiopts out to phase-matrix renderer; non-TTY auto-degradesVerification: Unit Test on
tuiEnabled(--no-tui→ false; non-TTY → false →run-progress.tsline renderer).AC-5:
--experimental-tuistill parses (hidden no-op alias)Verification: Integration Test — flag parses without error; hidden from
--help.AC-6:
sequant readyrenders the same full boxed TUI asrunVerification: Manual/Integration (confirmation). Both already mount the same
renderTui(provider: SnapshotProvider)(ui/tui/index.ts:32) —runvia orchestrator,readyviaReadySnapshotAdapter. Structurally identical for a single issue. Confirm no degraded/single-row divergence; close gap only if found.AC-7: Help text and docs/README references updated
Verification: Manual/Docs check across ALL locations.
Scope:
README.md:22(TUI-default framing).docs/features/quiet-mode-heartbeat.mdis built entirely around-q=quiet (title, every example) →-q→-sthroughout, and rewrite the "on by default … without--experimental-tui" gating prose (TUI is now default; heartbeat path is now-s --no-tuior non-TTY).Implementation Plan
Phase 1: Flag remap (
-q/-Q/-s)bin/cli.ts(~254): change-q, --quiet→-s, --quiet. Add a hidden alias Option carrying short-q(e.g.new Option("-q, --quality-loop-alias").hideHelp()) so Commander accepts-qwithout colliding with-Q, --quality-loop(238).src/commands/run.tstop ofrunCommand(~22):options.qualityLoop = Boolean(options.qualityLoop || options.qualityLoopAlias);before any consumer reads it.src/lib/workflow/types.ts: add the alias field toRunOptions.Phase 2: Boxed TUI as default
bin/cli.ts: add--no-tui(Commander surfacesoptions.tui=false); convert--experimental-tuito a hidden no-op alias (.hideHelp()), keep parsing.src/commands/run.ts:101:tuiEnabled = (options.tui !== false) && Boolean(process.stdout.isTTY) && !options.quiet;(the!quietterm honors AC-2 — see Open Q1).run-progress.ts:61heartbeat gate (quiet && !tuiEnabled) still yields heartbeat-only under-s(true once step 5 forcestuiEnabled=falsewhen quiet).RunOptions: addtui?: boolean; keepexperimentalTui?.Phase 3: Docs + tests
-q/-Q/-s/--no-tui/--experimental-tui.Rule Touchpoints
bin/cli.tsrun cmd-qalias Optionsrc/commands/run.ts:~22options.qualityLoopbin/cli.ts--no-tuidefault + hidden--experimental-tuisrc/commands/run.ts:101tuiEnabledcomputationrun.ts:101+run-progress.ts:61quietmust forcetuiEnabled=false, thenquiet && !tuiEnabledgives heartbeatDesign Review
bin/cli.ts; flag normalization (-q→qualityLoop, quiet→suppress) inrunCommandas the single composition root, matching howquiet/experimentalTuialready feedbuildProgressWiring.!quietterm added to the existingtuiEnabledexpression. No renderer changes —renderTuiis already shared (AC-6).experimentalTui/quietBoolean-coercion pattern.!quietterm (step 5). "Did you update the heartbeat doc, not just README?" — yes (AC-7). "Hidden alias long-name collision?" — pick a non-conflicting long name.Open Questions
tuiEnabledformula vs AC-2. The issue's formula omits!quiet, but the final flag checkbox says-ssuppresses the renderer "regardless of TUI default." Recommendation: include&& !options.quiet(Plan step 5). Impact if wrong:-son a TTY would still mount the full TUI, contradicting AC-2 and disabling the heartbeat.uilabel → browser test? This is terminal Ink, not web. Recommendation: addno-browser-test; do not add thetestphase.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled (small, well-bounded surface; SCOPE_WARNING does not force it here given single subsystem)
Reasoning: Tiny logic surface with an existing test home (
cli.integration.test.ts). Skippingtestgenavoids stale untracked stubs; tests are written inline in exec. Skiptestphase — terminal TUI, not browser.Label Review
Current: enhancement, cli, ui
Recommended: enhancement, cli, ui, planned, no-browser-test
Reason:
uihere is terminal Ink rendering;no-browser-testprevents thetestphase from being auto-added.Quality Loop: Won't auto-enable (no
complex/refactorlabel; cohesive scope).→
gh issue edit 705 --add-label no-browser-testadmarble commentedon Jun 3, 2026
Exec Progress Update (#705)
Implemented and pushed as PR #706.
AC Coverage
-q/-Qboth enable quality loop; neither enables quiet--quietreachable via-s; suppresses renderer--no-tuiopts out; non-TTY auto-degrades--experimental-tuiparses (hidden no-op)readyrenders same full boxed TUI asrunKey files changed
bin/cli.ts—-s, --quiet; hidden-qquality-loop alias;--no-tui; hidden--experimental-tuino-opsrc/commands/run.ts— alias normalization +resolveTuiEnabledwiringsrc/commands/run-flags.ts(new) —normalizeQualityLoop,resolveTuiEnabled(pure, unit-tested)src/lib/workflow/types.ts—tui?,qualityLoopAlias?fields;experimentalTuire-documented as no-oprun-flags.test.ts(new), reversed fix(cli): -q is short for --quality-loop, not --quiet — silently bypasses quiet-mode rendering #658 binding incli.integration.test.ts, updatedrun-tui.integration.test.tsrun-command.md,quiet-mode-heartbeat.md,run-renderer.md,experimental-tui-dashboard.md, CHANGELOGAC-6 confirmation
Both
run(run.ts:140) andready(ready.ts:182) mount the identicalrenderTui(provider)fromsrc/ui/tui/index.ts→ sameAppcomponent, same full-box treatment. The only difference is the provider/data source (multi-row forrun, single-row forready), which is data-driven, not a degraded path. No code change required.Checks
npm run build✅ ·npm run lint✅ (0 warnings) · 69 tests passed across all affected filesprompt-wait.test.ts(relay-inbox timer race) is unrelated — fails identically on the clean base; this PR does not touch the prompt/relay system.Design note (Open Question 1 resolved)
Followed the spec recommendation to include
&& !options.quietintuiEnabledso-ssuppresses the TUI on a TTY (honors AC-2). The issue body's formula omitted this term; the final flag checkbox required it.→ Next:
/qa 705admarble commentedon Jun 3, 2026
/test — Not Applicable (no browser surface)
Browser-based testing does not apply to #705. This is a terminal Ink TUI + CLI flag change; the project has no web surface for Chrome DevTools to drive:
app//pages//components//public/directories.npm run devistsx bin/cli.ts(the CLI itself, not an HTTP server); no Next/React-DOM/Vite/Astro/Express.uilabel here denotes terminal Ink rendering, not web UI.This matches the
/specrecommendation ("Skiptestphase — terminal TUI, not browser"). Applied theno-browser-testlabel so future orchestrated runs skip this phase.Coverage
Appropriate verification instead
Functional verification for this CLI feature was already exercised during
/exec(see PR #706):run --helpshows-Q,-s, --quiet,--no-tui;-q/-Q/-s/--no-tui/--experimental-tuiall parse without "unknown option";resolveTuiEnabled/normalizeQualityLoopunit-tested (69 tests green).Recommended next step:
/qa 705(code review + AC validation). For deeper hands-on CLI command capture,/verify 705is the right tool — not/test.fix(#705): trim run.ts comments to stay under 200-LOC cap (#503 AC-2)
admarble commentedon Jun 3, 2026
QA Review for Issue #705
AC Coverage
-q/-Qboth enable quality loop; neither enables quiet-q, --quality-loop-aliasOption +normalizeQualityLoopORs it intoqualityLoop(run.ts:23).--quietmoved off-q. Unit-tested (run-flags.test.ts) + parse-tested (cli.integration.test.ts).--quietreachable via-s; suppresses rendererbin/cli.ts-s, --quiet;resolveTuiEnabled!options.quietterm forces TUI off;run-progress.tsheartbeat gate (quiet && !tuiEnabled) → heartbeat-only. Help test asserts-s, --quietand NOT-q, --quiet.resolveTuiEnabled({}, true) === true;run.tsmountsrenderTui. Unit-tested.--no-tuiopts out; non-TTY auto-degrades--no-tui→options.tui === false;resolveTuiEnabledfalse fortui:falseandisTTY:false. Both unit-tested.--experimental-tuiparses (hidden no-op)addOption(new Option("--experimental-tui").hideHelp()); ignored byresolveTuiEnabled. Parse + hidden-from-help tests.readyrenders same full boxed TUI asrunrenderTui(provider)fromui/tui/index.ts—run.ts:146(orchestrator),ready.ts:182(ReadySnapshotAdapter). SameApp; row count is data-driven, not a degraded path. See Manual Test Override.run-command.md,quiet-mode-heartbeat.md,run-renderer.md,experimental-tui-dashboard.md, CHANGELOG. Liverun --helpverified.Coverage: 7/7 AC items met.
CI Status
build (22.x)typecheckvalidate-pluginvalidate-skillsCI Summary: 4 passed, 0 pending, 0 failed (run
26864008841, commit872f568).Quality Metrics
any)CLI Registration Verification
Option files modified: Yes (
bin/cli.ts,run.ts,types.ts)qualityLoopAliasnormalizeQualityLoop(options.qualityLoopAlias)-q, --quality-loop-aliastuiresolveTuiEnabled(options.tui !== false)--no-tuiexperimentalTui--experimental-tuiVerification Status: Passed.
Test Coverage Analysis
src/commands/run-flags.ts(new)run-flags.test.ts(12 cases)bin/cli.tscli.integration.test.ts(help + parse)src/commands/run.tssrc/lib/workflow/types.tsCoverage: core logic fully covered. No critical paths (auth/payment/etc.) touched.
Code Review
Strengths:
normalizeQualityLoop,resolveTuiEnabled) makes the flag precedence directly and non-tautologically unit-testable, and keepsrun.tsa thin adapter.resolveTuiEnabledcorrectly resolves the spec's Open Question 1 by including the!quietterm, so-sbeats the new TUI default (AC-2).--experimental-tuipreserved as a no-op for backward compat.--quiet+TUI interaction claim inexperimental-tui-dashboard.md, not just flag renames.Issues: None blocking. (The LOC-cap regression was self-introduced and fixed during this QA pass.)
Suggestions: None.
Behavior-Rule Survival Check
The old rule (
tuiEnabled = experimentalTui && isTTY) is fully removed. The only residualexperimentalTuireference is the AC-5-mandated no-op (hidden Option + type field);resolveTuiEnablednever reads it. Status: Clean.Manual Test ACs
Manual Test Override
AC: AC-6
Requirement: Runtime confirmation that
readyandrunrender identicallyOverride: Yes
Justification: No runtime-divergence surface — both commands invoke the identical
renderTui(provider)fromui/tui/index.ts(sameAppcomponent). The only difference is the snapshot provider/data source, which is the spec's expected "structurally identical for a single issue" outcome. Verified by code trace of both call sites.Risk Assessment: Low (equivalent to spec's structural determination; no code path unique to
runvsreadyin the renderer).Execution Evidence
sequant run --help-Q,-s, --quiet,--no-tui; hides-qalias +--experimental-tuirun 1 {-q,-Q,-s,--no-tui,--experimental-tui} --dry-runEvidence status: Complete.
Risk Assessment
bin/cli.tscould re-collide-q; thecli.integration.test.tshelp-surface assertions guard against silent regression. The hidden alias long-name (--quality-loop-alias) is non-conflicting.resolveTuiEnabledunit tests + the pre-existingrun-tui.integration.test.tsparse/fallback coverage.ready.tsis the cross-file sibling for the TUI-mount path — reviewed and confirmed it shares the samerenderTuicontract (AC-6), no divergence.normalizeQualityLoop/resolveTuiEnabledare single call sites inrunCommand; no adjacent gating lines with the same pattern.Adversarial Re-Read
Findings: No gaps found, because: (1) traced both
renderTuicall sites and confirmed structural identity for AC-6; (2) audited the "evidence" — the help/parse outputs are post-fix validations, not bug repros; (3) inspected process state — the only CI failure was a self-introduced LOC-cap regression, now fixed and CI-green at872f568, no uncommitted/divergent state; (4) cited siblings explicitly (ready.tscross-file; single-call-site intra-file); (5) checked the spec's implicit Non-Goals — no web-UI / renderer-internals scope crept in (renderer untouched;renderTuireused, not rewritten).Status: Clean
Verdict: READY_FOR_MERGE
All 7 ACs met, all 4 CI checks green, no
any/security/deleted-test issues, comprehensive unit + integration coverage, and a thorough docs sweep. Code quality is high (clean pure-function extraction, correct quiet-precedence). The one CI failure (self-introduced 200-LOC-cap breach) was caught and fixed during this QA pass.Documentation
[Unreleased]entry addedDocumentation: Optionally run
/docs 705before merge, though the feature docs are already updated as part of AC-7.Next Steps
admarble commentedon Jun 3, 2026
Quality Loop — No Action Needed (exit: READY_FOR_MERGE)
The orchestrator flagged the prior phase as "QA completed without a parseable verdict" and invoked
/loop. On inspecting the authoritative QA comment (not the orchestrator's chat-summary parse), the loop found nothing to fix:verdict: READY_FOR_MERGE@872f568(current HEAD)### Verdict: READY_FOR_MERGE(present, line 140)NOT_MET/PARTIALLY_METRoot cause of the false "failure": the verdict parser ran against the conversational turn summary, which didn't carry a
Verdict:token in the expected position. The posted GitHub QA comment is well-formed and machine-parseable (both the### Verdict:prose line and theSEQUANT_PHASEmarker). No AC gap, no test/CI failure exists.Loop iterations: 0/3 (exit condition met on entry — no actionable findings).
Final status: READY_FOR_MERGE — PR #706 is ready for the human merge gate.