Skip to content

Make autoplan's rec and all replies apply every recommended plan change (GST-2139) - #4225

Merged
capy-ai[bot] merged 3 commits into
mainfrom
capy/make-autoplans-rec-and
Nov 9, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
capy/make-autoplans-rec-and

Conversation

@garrytan

@garrytan garrytan commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

/autoplan now treats rec (and its alias all), the one-word default reply at the plan gate, as "take every recommendation", so recommended plan changes are applied instead of the plan being approved as first written. This keeps the plan you approve the same as the decisions gstack records.

What changed

/autoplan's Phase 4 reply table now says what gstack-gate parse and gstack-autoplan answer actually do.

  • rec / all are the one-word default and take every recommendation, recommended plan changes included. A chosen plan-changing option goes to B (a d<n>) or B2 (a uc<n>), so the change is applied and the affected phases rerun before the gate comes back. as-is stays "the plan as first written". Before, all went straight to A ("approve as written") while the gate had already recorded every plan-changing recommendation, and rec had no row at all.
  • An explicit override still changes the plan. A chosen option marked changes_plan: true, or an override of an option with no flag, goes to B or B2. That is the same rule answerGate uses (changes_plan ?? how === 'override'), so p1a d2b no longer approves the plan and drops the owner's d2b.
  • Every uc<n>/d<n> option now sets changes_plan in a hand-written gate.json, true when it changes the plan and false otherwise. Without the flag, rec could not tell a plan change from a keep.
  • p1a with a user challenge pending approves nothing. The skill waits for the owner's own answer to the uc<n> and re-parses their whole reply.
  • The p1 item recommends b (take the recommended changes) when a recommended option changes the plan, otherwise a.
  • No gate code changed. lib/gate-list.ts and lib/autoplan-gate.ts already behave the way the new table describes.

Why

Garry's standing rule is that the recommended reply, which accepts every recommended plan change, is the one-word default, and all is never offered as the plan as first written. The old table broke that rule and let decisions.jsonl and the approved plan disagree.

Summary

An owner who answered all at the /autoplan gate got the plan approved as first written, even though gstack had recorded each recommended plan change as accepted. Now rec and all route recommended plan changes through the affected-phase rerun, explicit overrides keep counting as plan changes, and a test checks the skill's reply table against what gstack-gate parse returns.

Blast radius

Only autoplan/SKILL.md.tmpl Phase 4 and its regenerated SKILL.md change, and the routing they describe matches answerGate in lib/autoplan-gate.ts:451, which was read and traced for every reply case (script-ran: test/gate-list.test.ts parses each reply through bin/gstack-gate). To stay under the generated-size pins without raising one, other Phase 4 lines were shortened (the owner-brief parenthetical, the A close note, the D wording, the Cross-Phase "none" text, a repeated "Eng still runs last", one repeated "carry forward" sentence and one Decision Audit Trail clause), and every autoplan size pin drops by 35 characters.

Test Coverage

All new code paths have test coverage. test/gate-list.test.ts adds three cases that read the template's reply table and check it against bin/gstack-gate parse: all/rec with plan-changing recommendations (expects B and B2, never A), bare p1a with a pending uc1 (expects no approval), and p1a d1b on options with no flag (expects B). On main (1b96d9f) the first two fail, and the override case fails on 1bc1b7a; all pass at this head.
Tests ran: test 1654 (files, carried from CI run 42655104573 at tree 3e93bd33e373)

Pre-Landing Review

Pass 1 (full panel: batched specialists, Red Team) found two blocking issues in Phase 4, both fixed in f36c2b8: the skill never told a hand-written gate.json to set changes_plan, and the new table sent an override of an unflagged option to A. Pass 2 on the fix range and Step 11 (native adversarial and an outside voice, openai/gpt-6.1-sol) found nothing blocking.
Gate edits: none detected (2 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: CLEAN (openai/gpt-6.1-sol via a host subagent).

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL autoplan/SKILL.md.tmpl:423 Dropped 'Carry forward unchanged accepted requirements.' from the amendment paragraph; another line ('On a rerun, carry forward unchanged accepted requirements') may or may not cover amendments.
  • INFORMATIONAL autoplan/SKILL.md.tmpl:406 Hand-written re-presented gates have no carried/prior exclusion like answerGate, so a repeated applied decision could route rec back to B/B2; B2 has no cycle cap.
  • INFORMATIONAL autoplan/SKILL.md.tmpl:365 changes_plan on every uc/d option is prose only; validateGateList never checks it, so an unflagged plan-changing recommendation under rec still approves as written (answerGate agrees; tooling follow-up, freeze applies).
  • INFORMATIONAL autoplan/SKILL.md.tmpl:406 One rec reply can route to both B and B2; the skill does not say to rerun the union of affected phases with Eng once, last.
  • INFORMATIONAL autoplan/SKILL.md.tmpl:413 With rec as default, the 3-cycle cap's end state (approve, stop or escalate) is undefined.
  • INFORMATIONAL autoplan/SKILL.md.tmpl:404 Pending uc items take precedence over p1c/p1e, so the owner cannot reject or interrogate until every user challenge is answered (matches answerGate).
  • INFORMATIONAL autoplan/SKILL.md.tmpl:423 Size trim dropped reminders (Carry forward unchanged accepted requirements, Eng still runs last, draft-direction close note); meaning survives elsewhere.

Exploratory QA

Smoke probes for a prose change: each new test case was run against the pre-fix template (fails) and the fixed one (passes), and bin/gstack-gate parse was driven for all, rec, p1a and p1a d1b. No browser surface.

Eval Results

No eval selected: the change is skill prose checked by free tests and guards; no paid eval was run.

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a bug fix exempt from plan review (R65), with failing-first tests.

TODOS

No TODO items completed in this PR.

Documentation

Status: current — no documentation edits needed.

Scope: base 1b96d9f..HEAD on capy/make-autoplans-rec-and plus staged changes (changelog fragment rename): autoplan/SKILL.md.tmpl (gate reply table: rec/all take every recommendation, as-is keeps the plan, p1 recommends b when a recommended option changes the plan, changes_plan on every uc/d option, bare p1a with a pending uc approves nothing), its generated autoplan/SKILL.md, test/gate-list.test.ts, the size allowlist, and the changelog fragment.

Documentation health:

  • docs/unattended.md — Current (already documents rec alias all, as-is, p1b, and the pending-uc rules)
  • docs/skills.md — Current (/autoplan overview and example stay accurate)
  • autoplan/SKILL.md.tmpl — Current (authored source of the change)
  • changelog.d/capy-make-autoplans-rec-and.md — Current (not edited; owned by the parent)

Coverage debt: the gate reply grammar has reference and how-to coverage in docs/unattended.md; docs/skills.md does not mention rec/as-is for interactive users (common gap, reference-only). Diagram drift: none.

Test plan

  • bun run test: carried from CI run 42655104573 (free-tests.yml at tree 3e93bd33e373, 1654 files)
  • Guards on the final tree: typecheck, skill-size, parity-suite, context-budget, goldens, conflict-markers passed
  • bun test test/gate-list.test.ts test/autoplan-phase-handoff.test.ts test/autoplan-phase-order.test.ts test/headless-artifacts.test.ts: 81 pass, 0 fail
Agent notes

Refs GST-2139

Approvals

No approvals recorded for branch capy/make-autoplans-rec-and.
Plan: exempt: bug fix
Plan check: exempt bug fix

REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=2 fixed=2 scope=frozen dispatches=4
Gate edits: none detected (2 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Lane GSTA-450 for GST-2139. Out of scope and untouched: lib/autoplan-carry.ts, autoplan's other phases, gate id formats. Tooling-freeze exception: Garry's own call, relayed by GStack Minder on GST-2139.

{
  "schema_version": 1,
  "pr": 4225,
  "head": "99b91aba9411a34f2c376c542b051e5a0c7bb7f3",
  "version": "1.98.0.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1654,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 42655104573,
      "attempt": 1,
      "tree": "3e93bd33e373b4052e6b8d8d1e1ff1a43d7cf25d"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "3e93bd33e373b4052e6b8d8d1e1ff1a43d7cf25d",
  "product_patch_id": "104ceb1cb45d2a84bc91e01c7a942abe42888af2",
  "gstack_version": "1.98.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 34,
    "rules": "66e5174161eecc2c",
    "base": "1b96d9f8538ae0f3b66dd52b75793a3767e514d4",
    "registry": "1b96d9f8538ae0f3b66dd52b75793a3767e514d4",
    "gate_scan": {
      "tagged": 0,
      "head": "99b91aba9411a34f2c376c542b051e5a0c7bb7f3"
    },
    "reasons": [
      "gate-class",
      "runtime=34"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @3e93bd33e373 (8 checks, current for 99b91aba9411)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/42655104573/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/42653836776/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=3e93bd33e373 tests=36845 skipped=105 runs=42655104573/1 profiles=ci-reuse/free-tests heads=99b91aba9411 verified=2026-11-09T17:25:59.594Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md, docs/, autoplan/SKILL.md.tmpl"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 0,
    "noted": 2,
    "fixed": 2,
    "scope": "frozen",
    "rounds": 2,
    "dispatches": {
      "specialist": 2,
      "red-team": 2
    }
  }
}

…ge (GST-2139)

The Phase 4 reply table sent `all` to "approve as written" while gstack-gate
parse takes every recommendation, plan changes included, and it let `p1a`
approve with a user challenge still pending. The table now matches the gate:
`rec`/`all` is the one-word default and routes plan changes through B/B2,
a pending item approves nothing until the owner answers it, and p1 recommends
b when a recommended option changes the plan. A new test reads the table and
checks it against bin/gstack-gate parse for all, rec and p1a.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits November 9, 2026 16:05
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant