Ready Command
Quick Start: After a resolve finishes, run sequant ready <issue> to reproduce the maintainer’s manual fresh-session A+ QA pass deterministically. It drives the issue’s worktree through a full-weight qa → loop → qa pipeline, surfaces every gap in a structured report, and stops at the human merge gate — it never merges.
Access
Section titled “Access”- Command:
npx sequant ready <issue> [options] - Requirements:
- The issue already has a worktree (i.e.
sequant run <issue>ran first). - GitHub CLI authenticated (
gh auth login) — used to read the issue’s Non-Goals.
- The issue already has a worktree (i.e.
- Relationship: Runs AFTER a resolve (
sequant run//fullsolve), BEFORE a human merges.
sequant run 712 # implementsequant ready 712 # full-weight A+ gate (this command) — stops, never mergesgh pr merge 712 # human decidesWhy it exists
Section titled “Why it exists”Empirical analysis of .entire logs (2026-05-30) found the QA pass that runs inside sequant run / /fullsolve systematically under-catches relative to the fresh standalone /qa the maintainer runs afterward — 44% of fresh-session passes caught a real shipping bug or unmet AC that had already passed an in-orchestrator QA. Two structural gaps drive this:
- Orchestrated QA trusts the orchestrator’s git state and skips the branch-freshness / process-state pre-flight checks — exactly the no-implementation / divergent-branch class.
- The fullsolve QA loop stops at “good enough” (
AC_MET_BUT_NOT_A_PLUS) and never drives toward A+.
sequant ready closes both: it runs QA at full standalone weight (the pre-flight checks execute even under an orchestrator) and loops to a policy-selected threshold — while preserving the human merge decision.
Gate policy (configurable rigor)
Section titled “Gate policy (configurable rigor)”The loop’s exit threshold is set by a policy, not hardcoded:
| Policy | Loops until | Quality / polish gaps | Audience |
|---|---|---|---|
ac (default) | no AC_NOT_MET remains (ACs objectively met) | documented in the report, NOT auto-fixed | team engineer, fixed agenda, predictable diff |
a-plus (opt-in) | READY_FOR_MERGE | auto-fixed in the loop | solo maintainer / max-quality |
acis the default deliberately: “ACs met” is an objective stop condition (the written checklist), whereasa-plusauto-loops everything and risks scope creep, an unpredictable stop condition, and noise.acstill runs the full-weight QA + adversarial re-read, so every gap is surfaced in the report — it just stops fixing at the AC boundary.- In
acmode, any finding that touches the issue’s Non-Goals is explicitly report-only (never fed to the fix loop). - Resolution precedence:
--policyflag >ready.policyin.sequant/settings.json> default"ac".
Drive an issue to merge-readiness (default ac policy)
Section titled “Drive an issue to merge-readiness (default ac policy)”npx sequant ready 712Opt into the max-quality A+ loop
Section titled “Opt into the max-quality A+ loop”npx sequant ready 712 --policy a-plusCap the loop and emit JSON
Section titled “Cap the loop and emit JSON”npx sequant ready 712 --max-iterations 4 --budget 300000 --jsonOptions
Section titled “Options”| Flag | Description |
|---|---|
--policy <ac|a-plus> | Gate policy. Overrides ready.policy in settings. Invalid values fall back to settings/default. |
--max-iterations <n> | Max QA passes before halting for human review (default: run.maxIterations). |
--budget <tokens> | Token budget; on exhaustion the command halts cleanly with a “needs human” message rather than looping. |
--timeout <seconds> | Per-phase timeout (default: run.timeout). |
--no-mcp | Disable MCP server injection in headless mode. |
--json | Emit a structured JSON result instead of the markdown report. |
-v, --verbose | Verbose phase output. |
Termination & guards
Section titled “Termination & guards”The loop terminates on the first of:
- Policy threshold reached —
ac: noAC_NOT_MET;a-plus:READY_FOR_MERGE. → statewaiting_for_human_merge, exit0. maxIterations— clean “needs human” halt. → stateblocked, exit1.- Token budget — clean halt on exhaustion. → state
blocked, exit1. LOOP_NO_DIFF— the fix loop made no commit and no working-tree change (stagnation guard). → stateblocked, exit1.- No implementation (#534 guard) — a zero-diff worktree (empty branch, the #529/#570 class) or a null/unparseable QA verdict is never reported ready. → state
blocked, exit2.
Live progress
Section titled “Live progress”The gate runs a qa → loop → qa pipeline that can take several minutes. What you see while it runs depends on where output is going:
- Interactive terminal (a TTY, no
--json) — a boxed live dashboard: a single rounded box for the issue with an animated spinner, the worktree branch, and a phase row that fills in as each pass completes (✓ qa 04s ▸ ✓ loop 03s ▸ ✓ qa 02s). The box repaints in place; long titles/branches truncate to fit, so it stays clean on narrow (≤80-col) terminals and inside tmux. When the gate finishes, the live box is torn down and replaced by:- a durable one-line summary that stays in scrollback —
✔ #<issue> <title>(or✘if it ended not-ready), and - the full gap report (below), printed in clean scrollback beneath it.
- a durable one-line summary that stays in scrollback —
--json, or output that isn’t a TTY (piped, redirected, CI logs) — no live UI is drawn (so it never corrupts piped JSON or log files). You get only the final static report (or JSON).
There is nothing to configure — the dashboard is automatic on a TTY and silently skipped otherwise. NO_COLOR is respected.
Output
Section titled “Output”A structured gap report (markdown, or --json) containing:
- Headline + stop reason — ready vs. needs-human vs. no-implementation.
- Final verdict and QA pass count.
- Auto-fixed — gaps the fix loop addressed across iterations.
- Remaining / accepted gaps — quality gaps (under
ac) and Non-Goal items, tagged report-only. - Final state —
waiting_for_human_mergeorblocked. Reflected bysequant status.
The human merge gate is intentional and permanent:
sequant readynever merges. Review the gaps, then merge manually when satisfied.
Non-goals
Section titled “Non-goals”--from-pr <N>(reverse PR→issue resolution) — a follow-up, not yet supported.sequant run --ready-gateflag integration — a follow-up; reuses this engine (runReadyGate).- Auto-merge of any kind — the human merge gate is deliberate.
See also
Section titled “See also”ready.policyin.sequant/settings.json— configure the default policy (sequant initdocuments it inline).- Ready-gate backtest — recall/noise measurement methodology.
- Motivation:
.entirelog study (2026-05-30); related #448, #582, #608/#609, #534.