Repository navigation
Make autoplan's rec and all replies apply every recommended plan change (GST-2139) - #4225
Merged
Merged
Conversation
…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>
|
😎 This pull request was merged. |
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>
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/autoplan now treats
rec(and its aliasall), 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 parseandgstack-autoplan answeractually do.rec/allare the one-word default and take every recommendation, recommended plan changes included. A chosen plan-changing option goes to B (ad<n>) or B2 (auc<n>), so the change is applied and the affected phases rerun before the gate comes back.as-isstays "the plan as first written". Before,allwent straight to A ("approve as written") while the gate had already recorded every plan-changing recommendation, andrechad no row at all.changes_plan: true, or an override of an option with no flag, goes to B or B2. That is the same ruleanswerGateuses (changes_plan ?? how === 'override'), sop1a d2bno longer approves the plan and drops the owner'sd2b.uc<n>/d<n>option now setschanges_planin a hand-written gate.json,truewhen it changes the plan andfalseotherwise. Without the flag,reccould not tell a plan change from a keep.p1awith a user challenge pending approves nothing. The skill waits for the owner's own answer to theuc<n>and re-parses their whole reply.p1item recommendsb(take the recommended changes) when a recommended option changes the plan, otherwisea.Why
Garry's standing rule is that the recommended reply, which accepts every recommended plan change, is the one-word default, and
allis 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
allat the /autoplan gate got the plan approved as first written, even though gstack had recorded each recommended plan change as accepted. Nowrecandallroute 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 whatgstack-gate parsereturns.Blast radius
Only autoplan/SKILL.md.tmpl Phase 4 and its regenerated SKILL.md change, and the routing they describe matches
answerGatein 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/recwith plan-changing recommendations (expects B and B2, never A), barep1awith a pendinguc1(expects no approval), andp1a d1bon 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.
autoplan/SKILL.md.tmpl:423Dropped '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.autoplan/SKILL.md.tmpl:406Hand-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.autoplan/SKILL.md.tmpl:365changes_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).autoplan/SKILL.md.tmpl:406One 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.autoplan/SKILL.md.tmpl:413With rec as default, the 3-cycle cap's end state (approve, stop or escalate) is undefined.autoplan/SKILL.md.tmpl:404Pending uc items take precedence over p1c/p1e, so the owner cannot reject or interrogate until every user challenge is answered (matches answerGate).autoplan/SKILL.md.tmpl:423Size 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 parsewas driven forall,rec,p1aandp1a 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-andplus staged changes (changelog fragment rename):autoplan/SKILL.md.tmpl(gate reply table:rec/alltake every recommendation,as-iskeeps the plan,p1recommendsbwhen a recommended option changes the plan,changes_planon everyuc/doption, barep1awith a pendingucapproves nothing), its generatedautoplan/SKILL.md,test/gate-list.test.ts, the size allowlist, and the changelog fragment.Documentation health:
docs/unattended.md— Current (already documentsrecaliasall,as-is,p1b, and the pending-ucrules)docs/skills.md— Current (/autoplanoverview 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.mddoes not mentionrec/as-isfor interactive users (common gap, reference-only). Diagram drift: none.Test plan
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.