Repository navigation
Description
Motivation
There is no first-class way for an issue to say "this point is a product decision — ask, don't infer." The nearest mechanism is §3a manual-test detection: ACs naming manual steps become PENDING, which routes the verdict to NEEDS_VERIFICATION. But in sequant ready's loop, NEEDS_VERIFICATION can never satisfy either policy — isAtThreshold (src/lib/workflow/ready-gate.ts:195-202) returns true only for READY_FOR_MERGE (both policies) or AC_MET_BUT_NOT_A_PLUS (ac policy). A pending human question therefore burns the entire iteration budget re-running qa/loop cycles that cannot resolve it, then exits MAX_ITERATIONS — the failure is reported as loop exhaustion when the true state is "waiting on a human answer." Tokens are spent to discover nothing.
The behavioral risk on the other side: an agent that is not told a decision is human-owned will infer it. The audit's requirement-gap catch (#785 — an AC phrase "literally undefined for two-thirds of the verdicts") shows what inference produces: a confident implementation of one arbitrary interpretation, caught only by the manual second look.
Proposal
A declared human-decision class with a clean early stop.
Declaration (two forms, both line-anchored single lines):
- [ ] **AC-4:** Resend extends invite expiry (Human decision: extend or preserve?)and/or an issue-level section:
## Human decisions required
- Should resending an existing invitation extend expiry or preserve it?Parser: parseACLine sets a new humanDecision: boolean on ACs carrying the (Human decision: ...) clause; a ## Human decisions required section parses like parseNonGoals (heading-bounded list).
Consumers:
/specmust not plan an implementation for an undeclared side of a human decision — it lists open decisions in the plan comment and stops short of choosing (matches the existing plan-approval flow)./qarouteshumanDecisionACs toPENDING(reusing the §3a →NEEDS_VERIFICATIONpath — zero new verdicts).sequant ready: when the only non-MET ACs arehumanDecisionACs, stop immediately with a new terminal reasonWAITING_FOR_HUMAN_DECISION(joins the existing nineReadyTerminalReasonvalues) instead of iterating toMAX_ITERATIONS. Exit code stays 1 (needs-human), status staysblocked— the enum value is the only addition.- The structured gap report (if the gap-schema issue lands first) emits these as
requirement_gap/pause_for_humanfindings; otherwise they render in the existing report prose.
Non-Goals
- No blocking of
/execon open decisions with a declaredsafe_default— an issue that states a default is executable; the decision surfaces in the PR body instead. - No notification/escalation machinery (push, Slack) — surfacing in report + issue comment is this issue's boundary.
- No attempt to detect undeclared product decisions heuristically — that is exactly the "invent plausible concerns forever" failure mode (investigate(metrics): gap-check signal-to-noise — does flagged → action rate justify cumulative QA prompt cost? #608); this issue only honors declared ones.
Tailored caveats
- Single-line AC clause (line-anchored parser); the section parser reuses the
parseNonGoalsboundary rule (next heading of any level closes it) rather than inventing a new one. ready's loop-context prompt (buildLoopContext) must exclude humanDecision ACs from "fix ONLY the unmet ACs" instructions, or the loop will thrash trying to implement an unanswerable AC before the stop check runs.- New
ReadyTerminalReasonvalue must be added togetReadyExitCode,formatReadyReport, the--jsonpayload, and (if feat(ready): sequant ready never records run metrics — no visibility into escalation, iteration counts, or gate outcomes #929 has landed) the metrics record — enum-widening has a history of silent partial consumers (grep-as-checklist across allReadyTerminalReasonswitch sites). - State CLI rejects derived AC IDs — fixtures use trailing sequential IDs.
Acceptance Criteria
- AC-1: The
(Human decision: ...)AC clause and the## Human decisions requiredsection both parse into state, line-anchored, with prose quotes not triggering. Evidence: parser unit tests including a false-positive prose fixture. - AC-2:
/qamarkshumanDecisionACsPENDINGvia the §3a path with no new verdict values. Evidence: scoped gate test on §3a text, mutation-verified;QaVerdictSchemaunchanged. - AC-3:
sequant readystops on the first QA pass when onlyhumanDecisionACs are non-MET, with terminal reasonWAITING_FOR_HUMAN_DECISION, exit code 1, zero loop dispatches. Evidence: unit test onrunReadyGatewith a stubbed QA result asserting zero loop calls and the new reason. - AC-4: All
ReadyTerminalReasonconsumers handle the new value (exit-code map, report formatter,--json, metrics if present). Evidence: grep-derived checklist of switch/map sites in the PR body, each with a covering assertion. - AC-5:
buildLoopContextexcludeshumanDecisionACs from fix instructions. Evidence: unit test asserting the generated prompt omits the human-decision AC and names it as excluded. - AC-6: The verbatim motivating scenario — an issue whose sole open item is a product question — exists as a fixture driving AC-3's test. Evidence: fixture file referenced by the test.
Human decisions required
- Should
WAITING_FOR_HUMAN_DECISIONalso post an issue comment listing the open questions (piggy-backing the gap-schema issue's comment if that lands first, standalone comment otherwise)?
Context
From the 2026-08-13 strategy review (per-issue contract fields; the "Autonomy" clause reshaped onto existing machinery). Fits the autonomy roadmap (#817/#818/#819 — the human merge gate stays; this adds a human decision gate with the same philosophy). Related: #785 (inference-on-undefined-AC catch), ready-gate budget-burn analysis from the flow map.
Activity
admarble commentedon Oct 16, 2026
Field input from varius: a
DEFERREDAC status (2026-08-15, local/qaoverride).varius #3's AC-4 needed the
gmail.modifyOAuth scope, which the project's permission policy holds back for a validation week. The tool was built, live-tested (it returned 403), removed, and the AC was deferred to #12. Stock/qafloors that atAC_NOT_MET, so every recurrence needs a hand-written override. The local rule addsDEFERRED, allowed only when all three hold and are stated in the AC row:It is routed like
PENDING:pending + deferred > 0with noNOT_METorPARTIALLY_METgivesNEEDS_VERIFICATION.How it relates to this issue and to existing machinery:
NEEDS_VERIFICATIONhid real bugs. A new status that routes there isn't free. If it's adopted, it may need its own terminal state, or a required re-check date, rather than sharingNEEDS_VERIFICATION.Recorded here as input to #942's design, not as a separate request.