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
sequant ready (#683, promoted in #689) reproduces the maintainer's manual fresh-session A+ pass: a policy-bounded qa → loop → qa engine that stops at a human merge gate. Its header comment explicitly designs the next step: "This module is the reusable engine — a future sequant run --ready-gate (out of scope for #683) can reuse runReadyGate directly" (src/lib/workflow/ready-gate.ts:20-22).
Session-log analysis (2026-07-26, 43 driver sessions / 20 issues over Jun 20–Jul 26) quantifies the gap this closes: after essentially every /qa, the maintainer manually types the same triple — a gap probe ("any gaps?"), a fix command ("fix all gaps"), then "merge". 34 of 249 typed messages are literally these strings, and the probe reliably surfaces real defects the first /qa pass accepted (consistent with the recorded 44%-of-second-looks defect rate). The engine that automates exactly this loop already exists; it just isn't reachable from sequant run.
A second dead end this fixes: on the run path, an AC_MET_BUT_NOT_A_PLUS verdict breaks to PR (#749, correctly) and nothing re-drives it — ready --policy a-plus is the intended escalation, but invoking it is manual and requires knowing it exists.
Proposal
An opt-in --ready-gate flag on sequant run that invokes the existing runReadyGate engine after the standard phases succeed, driving the issue to the configured policy threshold (ac default / a-plus) before handing back to the human. Exact sequencing relative to PR creation/finalization is /spec's call; the requirement is only that the run terminates with the PR open, the gate's gap report produced, and the issue in waiting_for_merge-style state — never merged.
Design constraints (strategic, from past failures):
No new policy surface. Reuse ready's existing policy setting and bounds (maxIterations, token budget, LOOP_NO_DIFF stagnation guard, Non-Goals exclusion). Zero new configuration concepts for end users.
Default off, byte-identical behavior without the flag. Existing users' runs must not get longer or more expensive without opting in.
Acceptance Criteria
sequant run -Q <issue> --ready-gate invokes the existing runReadyGate engine after the standard phases succeed, and the run terminates with the PR open, the gate report produced, and the persisted status matching sequant ready's terminal semantics — it never merges.
Gate policy, iteration cap, token budget, stagnation guard, and Non-Goals handling all come from the existing ready machinery; no new flags or settings beyond --ready-gate itself.
Without the flag, run behavior is unchanged (existing run-path tests still pass unmodified).
The run summary and PR body surface the gate outcome (threshold reached vs guard halt) the same way sequant ready reports it.
Documentation covers the flag in the main README, marketplace README, and docs/.
Out of scope
Auto-merge or adding merger to default phases (human merge gate is deliberate policy); MCP exposure of the gate; changing -Q semantics; batch/chain interaction beyond "gate runs per-issue after that issue's phases" (if chain interaction is non-trivial, note it and defer).
References
src/lib/workflow/ready-gate.ts header — the designed seam this builds
Context
sequant ready(#683, promoted in #689) reproduces the maintainer's manual fresh-session A+ pass: a policy-boundedqa → loop → qaengine that stops at a human merge gate. Its header comment explicitly designs the next step: "This module is the reusable engine — a futuresequant run --ready-gate(out of scope for #683) can reuserunReadyGatedirectly" (src/lib/workflow/ready-gate.ts:20-22).Session-log analysis (2026-07-26, 43 driver sessions / 20 issues over Jun 20–Jul 26) quantifies the gap this closes: after essentially every
/qa, the maintainer manually types the same triple — a gap probe ("any gaps?"), a fix command ("fix all gaps"), then "merge". 34 of 249 typed messages are literally these strings, and the probe reliably surfaces real defects the first/qapass accepted (consistent with the recorded 44%-of-second-looks defect rate). The engine that automates exactly this loop already exists; it just isn't reachable fromsequant run.A second dead end this fixes: on the
runpath, anAC_MET_BUT_NOT_A_PLUSverdict breaks to PR (#749, correctly) and nothing re-drives it —ready --policy a-plusis the intended escalation, but invoking it is manual and requires knowing it exists.Proposal
An opt-in
--ready-gateflag onsequant runthat invokes the existingrunReadyGateengine after the standard phases succeed, driving the issue to the configured policy threshold (acdefault /a-plus) before handing back to the human. Exact sequencing relative to PR creation/finalization is /spec's call; the requirement is only that the run terminates with the PR open, the gate's gap report produced, and the issue inwaiting_for_merge-style state — never merged.Design constraints (strategic, from past failures):
--qa-gateshipped unwired and had to be deprecated (chore(run): --qa-gate is an inert no-op flag — remove or make it actually gate #795). The flag must be traced end-to-end (bin/cli.ts.option()→RunOptions→ExecutionConfig→ batch-executor) with a test that fails if any link is dropped.ready's existing policy setting and bounds (maxIterations, token budget,LOOP_NO_DIFFstagnation guard, Non-Goals exclusion). Zero new configuration concepts for end users.Acceptance Criteria
sequant run -Q <issue> --ready-gateinvokes the existingrunReadyGateengine after the standard phases succeed, and the run terminates with the PR open, the gate report produced, and the persisted status matchingsequant ready's terminal semantics — it never merges.--ready-gate, anAC_MET_BUT_NOT_A_PLUSoutcome is escalated through the gate per the configured policy instead of dead-ending at PR; without the flag, fix(run): AC_MET_BUT_NOT_A_PLUS QA verdict misrouted into quality loop → fails with no PR (should break to PR) #749 behavior is unchanged.readymachinery; no new flags or settings beyond--ready-gateitself.sequant readyreports it.Out of scope
Auto-merge or adding
mergerto default phases (human merge gate is deliberate policy); MCP exposure of the gate; changing-Qsemantics; batch/chain interaction beyond "gate runs per-issue after that issue's phases" (if chain interaction is non-trivial, note it and defer).References
src/lib/workflow/ready-gate.tsheader — the designed seam this buildssequant ready <issue>— post-resolve A+ QA gate that drives an issue to merge-readiness #683 / Promotesequant readyfrom experimental: Layer-2 backtest + Layer-3 shadow dogfood, meet promotion gate (#683 follow-up) #689 / feat(cli):sequant ready— wire live phase-matrix renderer (parity withsequant run) #697 — ready engine, promotion, TUI parity