You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(update): no non-interactive path — crashes without a TTY, add --yes #709
sequant update has no usable non-interactive path. It is interactive-only and, without a TTY, dies with a raw ExitPromptError stack trace instead of a clean message. There is no --yes/-y flag.
Split out from #708 (which covers the two correctness bugs in the update/sync flow); this is the headless/ergonomics half.
Behavior
update always prompts Apply updates? (Y/n). Piping or running without a controlling TTY produces:
ExitPromptError: User force closed the prompt with 0 null
at .../@inquirer/core/dist/lib/create-prompt.js:67:20
...
Node.js v23.11.0
i.e. an unhandled crash with a stack trace, not a graceful exit.
The only non-interactive alternative is sequant sync, but per #708sync is version-marker-only and silently reports "up to date" on real content drift — so today there is no trustworthy non-interactive way to apply template updates. Current workaround is yes | sequant update, which is non-obvious.
Acceptance criteria
sequant update --yes (and -y) applies updates without prompting.
When stdin is not a TTY and --yes was not passed, update exits with a clear, actionable message (e.g. "non-interactive shell: re-run with --yes") — not an ExitPromptError stack trace.
→ PROCEED — Add non-interactive --yes/-y path; replace ExitPromptError crash with a clean message
Workflow: spec → exec → qa (-Q)
Clear ACs (3). Small but multi-surface: flag + TTY guard + graceful exit + docs. Touches bin/cli.ts — coordinate with #713 (also edits bin/cli.ts) to avoid a merge conflict.
Coverage: Changed logic fully covered. New tests use save/restore of process.stdin.isTTY and process.exitCode — clean teardown, no global leakage.
Code Review
Strengths:
Reuses the existing isStdinTTY() util rather than hand-rolling TTY detection.
Both prompt sites guarded — the first-run dev-URL prompt (not just apply-confirm), which is the subtle case that would otherwise crash first-run-in-CI.
--yes kept semantically distinct from --force (auto-answer vs. overwrite in-place customizations), exactly per the spec's key decision.
process.exitCode = 1 + return matches the established sync.ts non-zero-exit pattern; no process.exit() hard-kill.
src/lib/wizard.ts also calls inquirer.prompt without a TTY guard. It's reached via init's setup flow (gated by --skip-setup/--yes), not by update, so it's outside this PR's blast radius. Worth a follow-up issue to confirm init's wizard degrades cleanly in non-TTY shells.
CLI Registration Verification
Interface Field
Runtime Usage
CLI Registered
Status
yes
options.yes (update.ts:115, :208)
-y, --yes in bin/cli.ts
✅ OK
Verification Status: Passed (flag confirmed in update --help)
grep confirmed --yes + automation guidance in --help, cheat-sheet, troubleshooting
AC-1 / AC-2 are integration-test ACs — executed (42/42 pass) and corroborated by E2E smoke.
Risk Assessment
Likely failure mode: A non-TTY-but-interactive edge (stdin redirected from a file on an attached terminal) is treated as non-interactive and refuses without --yes — the safe direction (refuse, don't crash).
Not tested: No automated test for the --dry-run + non-TTY interaction, but traced manually: a configured project returns at the dryRun guard before the apply-confirm site, so update --dry-run needs no --yes (no regression); a first-run non-TTY --dry-run now exits 1 cleanly instead of crashing (strict improvement).
Sibling-line audit: Both inquirer.prompt call sites in update.ts (dev-URL setup line ~118, apply-confirm line ~208) are guarded by refuseNonInteractive() — no unguarded prompt remains in the file.
Adversarial Re-Read
Findings: No gaps found because: (1) ran the implementation against the issue body's verbatim repro — the piped-stdin ExitPromptError crash is now a clean message + exit 1 (E2E confirmed); (2) the "Updated 5 files" / exit-1 evidence is post-fix validation, not a pre-fix bug repro; (3) inspected process state — worktree clean, 0 commits behind main, change committed (55982b8) and pushed; (4) sibling sites cited explicitly — intra-file both prompt sites guarded, cross-file wizard.ts is out-of-blast-radius and filed as a suggestion; (5) checked Non-Goals — --yes stays distinct from --force, no scope creep into overwrite semantics.
Status: Clean
Verdict: READY_FOR_MERGE
All 3 ACs MET with literal verification, end-to-end execution evidence, full CI green, complete docs, and a CHANGELOG entry. Implementation is minimal, reuses existing utilities, and guards both prompt sites (including the easy-to-miss first-run dev-URL prompt). The only finding is an out-of-scope sibling (wizard.ts) appropriately deferred to a follow-up rather than widening this PR.
Documentation
--help text added (-y, --yes)
docs/ updated (cheat-sheet + troubleshooting)
CHANGELOG entry added
Documentation:/docs 709 optional — the feature is already documented in cheat-sheet and troubleshooting.
QA Review for Issue #709 (re-run, independent verification)
PR #715 · all 4 CI checks green · 5/5 integration tests pass · build clean.
AC Coverage
AC
Source
Description
Status
Notes
AC-1
Original
update --yes/-y applies updates without prompting
MET
-y, --yes registered in bin/cli.ts and surfaced in --help. Apply-confirm skipped when options.yes; applySet for --yes is newFiles + modifiedFiles (local-overrides stay protected — correctly distinct from --force). Test AC-1 asserts inquirer.prompt not called + file written + exit 0.
AC-2
Original
Non-TTY + no --yes → actionable message naming --yes, clean non-zero exit, no ExitPromptError
MET
refuseNonInteractive() guards both prompt sites (first-run dev-URL setup at L117 and apply-confirm at L210), prints a red/yellow message naming --yes, sets process.exitCode = 1, and returns — never reaches inquirer, so no throw. Tests AC-2 ×2 (apply-confirm + first-run guard) both pass.
--help shows -y, --yes …; docs/reference/cheat-sheet.md adds the --yes row + automation callout; docs/troubleshooting.md adds an "update crashes in CI / scripts" section; CHANGELOG [Unreleased] entry present.
Coverage: 3/3 AC items fully met (no derived ACs — standard spec).
Quality Metrics
Metric
Value
Status
Type issues (any)
0
OK
Deleted tests
0
OK
Files changed
6
OK
Lines added
+157
-
Lines deleted
-5
-
CI Status
Check
Conclusion
Impact
build (22.x)
SUCCESS
✅
typecheck
SUCCESS
✅
validate-skills
SUCCESS
✅
validate-plugin
SUCCESS
✅
CI Summary: 4 passed, 0 pending, 0 failed.
CLI Registration Verification
Field
Runtime Usage
CLI Registered
Status
yes
options.yes (update.ts L114, L209)
-y, --yes in bin/cli.ts
✅ OK
Status: Passed.
Code Review
Strengths:
Both prompt sites guarded — no unguarded inquirer.prompt remains in update.ts (verified by grep).
--yes (auto-answer) kept semantically distinct from --force (overwrite in-place customizations); local-overrides remain protected under --yes, matching the issue's explicit requirement.
refuseNonInteractive() sets process.exitCode (not process.exit()), so the message flushes and the function returns cleanly — exactly the AC-2 "clean exit, not a crash" contract.
Reuses the existing isStdinTTY() helper from src/lib/tty.ts rather than re-detecting TTY.
Issues: None.
Suggestions: None blocking. (Minor: the message names only --yes; --force is an intentional omission since it has different semantics.)
Execution Evidence
Test
Command
Result
Build
npm run build (tsc)
✅ exit 0
Tests
vitest run update.integration.test.ts
✅ 5/5 pass
Help
update --help
✅ shows -y, --yes
Smoke
printf '' | update --dry-run (non-TTY)
✅ no ExitPromptError
Self-Evaluation
Verified working: Yes — built the worktree, ran the integration suite, exercised --help and a piped (non-TTY) invocation against the compiled CLI.
Test efficacy: High — AC-2 tests assert process.exitCode === 1, no write, no prompt, and the message contains --yes; AC-1 asserts no-prompt + write under a TTY.
Likely failure mode: A future third prompt added to update without a TTY guard — current diff covers both existing sites.
Verdict confidence: High.
Verdict: READY_FOR_MERGE
All three ACs met literally, CI green, build + tests pass, CLI flag registered and reachable. Clean, well-scoped, well-tested change.
Activity
admarble commentedon Jun 4, 2026
→ PROCEED — Add non-interactive
--yes/-ypath; replace ExitPromptError crash with a clean messageWorkflow: spec → exec → qa (-Q)
Clear ACs (3). Small but multi-surface: flag + TTY guard + graceful exit + docs. Touches
bin/cli.ts— coordinate with #713 (also edits bin/cli.ts) to avoid a merge conflict.admarble commentedon Jun 4, 2026
Spec / Plan (Standard — 3 ACs)
Acceptance Criteria & verification
update --yes/-yapplies updates without prompting — Integration Test--yes→ actionable message naming--yes, clean non-zero exit, noExitPromptError— Integration Test--help, cheat-sheet, troubleshooting document--yes+ automation guidance — Manual/doc checkPlan
-y, --yesto theupdatecommand (bin/cli.ts:177) +UpdateOptions.yes.nonInteractive = yes || force; guard both prompt sites — dev-URL (update.ts:108) and apply-confirm (update.ts:219).--yesabsent → print actionable message, exit non-zero (noExitPromptErrorthrow).cheat-sheet.md,troubleshooting.md, help text.Key decisions
--yes(auto-answer) distinct from--force(overwrite local modifications).--yesmust not imply force.Open questions
--yes≠--forcesemantics (recommended: keep distinct).update.ts:108(recommended: yes).Coordination: #713 also edits
bin/cli.ts— both worktrees currently empty; rebase whichever merges second.Workflow: exec → qa (
-Q, quality loop on).admarble commentedon Jun 4, 2026
Exec Progress Update
PR: #715 — created ✅
AC Coverage
update --yes/-yapplies without promptingbin/cli.tsflag +update.tsapply-confirm skip; E2E:echo "" | update --yes→ "Updated 5 files", exit 0--yes→ actionable message, clean non-zero exit, noExitPromptErrorrefuseNonInteractive()guards both prompt sites; E2E piped → message naming--yes+ exit 1, no stack trace--help/ cheat-sheet / troubleshooting document--yes+ automation--helpshows-y, --yes;docs/reference/cheat-sheet.md;docs/troubleshooting.mdKey files changed
bin/cli.ts— register-y, --yesonupdatesrc/commands/update.ts—UpdateOptions.yes,refuseNonInteractive()TTY guard on both prompt sitessrc/commands/update.integration.test.ts— 3 new tests (AC-1, AC-2 apply-confirm + first-run guard)docs/reference/cheat-sheet.md,docs/troubleshooting.md,CHANGELOG.mdChecks
npm run build✅ ·npm run lint✅ (0 warnings) ·vitest update.integration✅ 5/5CLI Wiring Self-Check
yes-y, --yesQuality Plan Alignment
N/A — no Feature Quality Planning section in issue (Standard 3-AC spec).
Notes / coordination
Touches
bin/cli.tsalongside #713 — single additive.option(); rebase whichever merges second.admarble commentedon Jun 4, 2026
QA Review for Issue #709
AC Coverage
update --yes/-yapplies updates without prompting-y, --yesregistered inbin/cli.ts; apply-confirm skipped whenoptions.yes. Integration testAC-1assertsinquirer.promptnot called + file written; E2E:echo "" | update --yes→ "Updated 5 files", exit 0--yes→ actionable message naming--yes, clean non-zero exit, noExitPromptErrorrefuseNonInteractive()guards both prompt sites (dev-URL setup + apply-confirm), prints msg naming--yes, setsexitCode=1, returns (no throw). TestsAC-2×2; E2E piped → message + exit 1, no stack trace--help, cheat-sheet, troubleshooting document--yes+ automation--helpshows-y, --yes;cheat-sheet.md(automation note + "when to use" row);troubleshooting.md(updatecrashes in CI section)Coverage: 3/3 AC items fully met
CI Status
build (22.x)typecheckvalidate-skillsvalidate-pluginCI Summary: 4 passed, 0 pending, 0 failed (waited for build matrix to complete)
Quality Metrics
any)Local:
npm run build✅ ·npm run lint✅ (0 warnings) ·vitest✅ 42/42 (update.integration + tty + sync)Test Coverage Analysis
src/commands/update.tsupdate.integration.test.ts(+3 tests)bin/cli.ts--help+ E2ECoverage: Changed logic fully covered. New tests use save/restore of
process.stdin.isTTYandprocess.exitCode— clean teardown, no global leakage.Code Review
Strengths:
isStdinTTY()util rather than hand-rolling TTY detection.--yeskept semantically distinct from--force(auto-answer vs. overwrite in-place customizations), exactly per the spec's key decision.process.exitCode = 1+returnmatches the establishedsync.tsnon-zero-exit pattern; noprocess.exit()hard-kill.Issues: None blocking.
Suggestions (non-blocking, out of #709 scope):
src/lib/wizard.tsalso callsinquirer.promptwithout a TTY guard. It's reached viainit's setup flow (gated by--skip-setup/--yes), not byupdate, so it's outside this PR's blast radius. Worth a follow-up issue to confirminit's wizard degrades cleanly in non-TTY shells.CLI Registration Verification
yesoptions.yes(update.ts:115, :208)-y, --yesin bin/cli.tsVerification Status: Passed (flag confirmed in
update --help)Execution Evidence
--yesecho "" | sequant update--yes, noExitPromptError✅--yesecho "" | sequant update --yessequant update --help-y, --yes✅Evidence status: Complete
CHANGELOG Verification
fix(#709)commit)### Added, references #709)Result: CHANGELOG requirements met
Manual Test ACs
grepconfirmed--yes+ automation guidance in--help, cheat-sheet, troubleshootingAC-1 / AC-2 are integration-test ACs — executed (42/42 pass) and corroborated by E2E smoke.
Risk Assessment
--yes— the safe direction (refuse, don't crash).--dry-run+ non-TTY interaction, but traced manually: a configured project returns at thedryRunguard before the apply-confirm site, soupdate --dry-runneeds no--yes(no regression); a first-run non-TTY--dry-runnow exits 1 cleanly instead of crashing (strict improvement).src/lib/wizard.tshas an unguardedinquirer.promptbut is outside fix(update): no non-interactive path — crashes without a TTY, add --yes #709's blast radius (invoked byinit, notupdate) — surfaced as a follow-up suggestion above, not widened into this PR.inquirer.promptcall sites inupdate.ts(dev-URL setup line ~118, apply-confirm line ~208) are guarded byrefuseNonInteractive()— no unguarded prompt remains in the file.Adversarial Re-Read
Findings: No gaps found because: (1) ran the implementation against the issue body's verbatim repro — the piped-stdin
ExitPromptErrorcrash is now a clean message + exit 1 (E2E confirmed); (2) the "Updated 5 files" / exit-1 evidence is post-fix validation, not a pre-fix bug repro; (3) inspected process state — worktree clean, 0 commits behind main, change committed (55982b8) and pushed; (4) sibling sites cited explicitly — intra-file both prompt sites guarded, cross-filewizard.tsis out-of-blast-radius and filed as a suggestion; (5) checked Non-Goals —--yesstays distinct from--force, no scope creep into overwrite semantics.Status: Clean
Verdict: READY_FOR_MERGE
All 3 ACs MET with literal verification, end-to-end execution evidence, full CI green, complete docs, and a CHANGELOG entry. Implementation is minimal, reuses existing utilities, and guards both prompt sites (including the easy-to-miss first-run dev-URL prompt). The only finding is an out-of-scope sibling (
wizard.ts) appropriately deferred to a follow-up rather than widening this PR.Documentation
--helptext added (-y, --yes)Documentation:
/docs 709optional — the feature is already documented in cheat-sheet and troubleshooting.Next Steps
bin/cli.tsaddition with fix(sync): areSkillsOutdated/checkAndWarnSkillsOutdated pre-flight is version-only — misses content drift (sibling of #708) #713 — trivial rebase).init'swizard.tsprompt degrades cleanly in non-TTY shells.admarble commentedon Jun 4, 2026
QA Review for Issue #709 (re-run, independent verification)
PR #715 · all 4 CI checks green · 5/5 integration tests pass · build clean.
AC Coverage
update --yes/-yapplies updates without prompting-y, --yesregistered inbin/cli.tsand surfaced in--help. Apply-confirm skipped whenoptions.yes;applySetfor--yesisnewFiles + modifiedFiles(local-overrides stay protected — correctly distinct from--force). TestAC-1assertsinquirer.promptnot called + file written + exit 0.--yes→ actionable message naming--yes, clean non-zero exit, noExitPromptErrorrefuseNonInteractive()guards both prompt sites (first-run dev-URL setup at L117 and apply-confirm at L210), prints a red/yellow message naming--yes, setsprocess.exitCode = 1, andreturns — never reaches inquirer, so no throw. TestsAC-2×2 (apply-confirm + first-run guard) both pass.--help/ cheat-sheet / troubleshooting document--yes+ automation--helpshows-y, --yes …;docs/reference/cheat-sheet.mdadds the--yesrow + automation callout;docs/troubleshooting.mdadds an "update crashes in CI / scripts" section; CHANGELOG[Unreleased]entry present.Coverage: 3/3 AC items fully met (no derived ACs — standard spec).
Quality Metrics
any)CI Status
CI Summary: 4 passed, 0 pending, 0 failed.
CLI Registration Verification
yesoptions.yes(update.ts L114, L209)-y, --yesinbin/cli.tsStatus: Passed.
Code Review
Strengths:
inquirer.promptremains inupdate.ts(verified by grep).--yes(auto-answer) kept semantically distinct from--force(overwrite in-place customizations); local-overrides remain protected under--yes, matching the issue's explicit requirement.refuseNonInteractive()setsprocess.exitCode(notprocess.exit()), so the message flushes and the function returns cleanly — exactly the AC-2 "clean exit, not a crash" contract.isStdinTTY()helper fromsrc/lib/tty.tsrather than re-detecting TTY.Issues: None.
Suggestions: None blocking. (Minor: the message names only
--yes;--forceis an intentional omission since it has different semantics.)Execution Evidence
npm run build(tsc)vitest run update.integration.test.tsupdate --help-y, --yesprintf '' | update --dry-run(non-TTY)ExitPromptErrorSelf-Evaluation
--helpand a piped (non-TTY) invocation against the compiled CLI.process.exitCode === 1, no write, no prompt, and the message contains--yes; AC-1 asserts no-prompt + write under a TTY.updatewithout a TTY guard — current diff covers both existing sites.Verdict: READY_FOR_MERGE
All three ACs met literally, CI green, build + tests pass, CLI flag registered and reachable. Clean, well-scoped, well-tested change.
Documentation
[Unreleased] → Added)Next Steps
fix(#709): harden update non-interactive guard — detect CI, allow dry…
fix(#709): non-interactive update path — add --yes, replace ExitPromp…
fix(#1030): content-aware opencode shim decision — 'current' is nothi…
fix(sync): exclude templates/opencode from the generic diff/copy engi…