From 9911da738be72bc85ca42de85383c18fb19940cf Mon Sep 17 00:00:00 2001 From: garrytan Date: Tue, 3 Nov 2026 02:13:00 +0000 Subject: [PATCH] captain docs: plan-first rule matches R65 (no plan review for bug fixes) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- captain/SKILL.md | 5 ++++- captain/SKILL.md.tmpl | 5 ++++- captain/templates/CREW.md | 5 +++-- captain/templates/brief.md | 6 ++---- capy/skill/gstack/SKILL.md | 2 +- changelog.d/gsta258-row8-plan-wording.md | 1 + docs/captain.md | 8 +++++--- test/captain-skill.test.ts | 10 ++++++---- 8 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 changelog.d/gsta258-row8-plan-wording.md diff --git a/captain/SKILL.md b/captain/SKILL.md index 776349ddb..b2cae3996 100644 --- a/captain/SKILL.md +++ b/captain/SKILL.md @@ -374,7 +374,10 @@ lane builds only after the owner's word is answered into the run and it reports New scope taken on part-way gets its own plan. Read-only lanes, the flaky pass's repairs, slot stamps, CHANGELOG resolves, cap re-pins under a grant, S1 emergencies (broken install or upgrade, red main, a security bug) and fixes from an already-diagnosed, audited problem -list are exempt; every other fix gets a one-round, eng-only plan. The brief a +list are exempt. Any other bug fix gets no plan review (`gstack-autoplan next --kind fix`, +R65), and its PR carries the proof: a repro on current main or a failing test written +first. A feature gets the lean run (`--kind feature`): one reviewer reading the plan and +the draft code together. The brief a controller hands a lane, with its `Plan: required | approved | exempt` line, is `captain/templates/brief.md`; the rule is `docs/captain.md` (Plan before build). diff --git a/captain/SKILL.md.tmpl b/captain/SKILL.md.tmpl index 1a5fb0e40..485b5edf5 100644 --- a/captain/SKILL.md.tmpl +++ b/captain/SKILL.md.tmpl @@ -302,7 +302,10 @@ lane builds only after the owner's word is answered into the run and it reports New scope taken on part-way gets its own plan. Read-only lanes, the flaky pass's repairs, slot stamps, CHANGELOG resolves, cap re-pins under a grant, S1 emergencies (broken install or upgrade, red main, a security bug) and fixes from an already-diagnosed, audited problem -list are exempt; every other fix gets a one-round, eng-only plan. The brief a +list are exempt. Any other bug fix gets no plan review (`gstack-autoplan next --kind fix`, +R65), and its PR carries the proof: a repro on current main or a failing test written +first. A feature gets the lean run (`--kind feature`): one reviewer reading the plan and +the draft code together. The brief a controller hands a lane, with its `Plan: required | approved | exempt` line, is `captain/templates/brief.md`; the rule is `docs/captain.md` (Plan before build). diff --git a/captain/templates/CREW.md b/captain/templates/CREW.md index 1d0165ae5..26dd7e3b3 100644 --- a/captain/templates/CREW.md +++ b/captain/templates/CREW.md @@ -135,8 +135,9 @@ Homes are paths in the gstack checkout the lane checked at session start. import --autoplan`. New scope taken on part-way gets the same. Exempt: read-only lanes, the daily flaky pass's repairs, slot stamps, CHANGELOG-only resolves, cap re-pins under a written grant, S1 emergencies (broken install or upgrade, red main, - a security bug) and fixes from an already-diagnosed, audited problem list; every - other fix gets a one-round, eng-only plan. Home: `docs/captain.md` (Plan before build), + a security bug) and fixes from an already-diagnosed, audited problem list. Any other + bug fix gets no plan review (`gstack-autoplan next --kind fix`, R65) and carries its + proof in the PR; a feature gets the lean run (`--kind feature`). Home: `docs/captain.md` (Plan before build), `captain/templates/brief.md`. ## Crew-specific rules diff --git a/captain/templates/brief.md b/captain/templates/brief.md index 6af25e7cd..7aa8b7abd 100644 --- a/captain/templates/brief.md +++ b/captain/templates/brief.md @@ -17,10 +17,8 @@ Spend cap: set, run dir under ~/.capy/work). Write the plan with its ## ELI5, ## Before → after, ## Why it matters, ## What caused this work, ## Big decisions and ## Implementation plan sections, then run gstack-autoplan next --out --plan - sized to this brief (a fix: --no-ui --no-dx --max-rounds 1 --estimate-usd - --spend-cap , then close the CEO phase before dispatching its voices with - gstack-autoplan close --out --phase ceo --deferred "eng-only fix plan" - --by agent:). + sized to this brief (a feature: --kind feature, the lean run with one reviewer over + the plan and the draft code; a bug fix needs no plan run, see Plan: exempt). At the gate send me the output of gstack-owner-brief render --captain --out whole, as a needs-you report. Build nothing yet. diff --git a/capy/skill/gstack/SKILL.md b/capy/skill/gstack/SKILL.md index ad8c801bf..a00712271 100644 --- a/capy/skill/gstack/SKILL.md +++ b/capy/skill/gstack/SKILL.md @@ -58,7 +58,7 @@ Every Capy thread that uses gstack follows these for new work, under a Captain o - **Stop a finished /ship subagent.** When a /ship subagent opens its PR, the parent subscribes to that PR with Capy's subscribe tool and keeps that one subscription until the PR merges or closes, re-subscribing if the watch expires, then cancels it. Once the subscription is in place and READY arrives, the parent stops the subagent and owns the PR from then on, slot stamp, re-READY and receipt carry included. A stopped /ship subagent woken by a check, review or merge notice, not by its parent, reports one line naming what woke it, its pin and the PR head (`gh pr view --json headRefOid --jq .headRefOid`) and ends the turn without acting, whether or not the head moved. A message from its parent is an instruction it carries out. - **No merge without the owner's word.** A thread never merges on its own; under a Captain the controller merges on a recorded standing approval, and a thread with no Captain asks the person. -Exempt from the plan step: read-only work, the daily flaky pass's repairs, slot stamps, CHANGELOG-only resolves, cap re-pins under a written grant, S1 emergencies (a broken install or upgrade, a red main, a security bug) and fixes from an already-diagnosed, audited problem list. Every other fix gets a one-round, eng-only plan. +Exempt from the plan step: read-only work, the daily flaky pass's repairs, slot stamps, CHANGELOG-only resolves, cap re-pins under a written grant, S1 emergencies (a broken install or upgrade, a red main, a security bug) and fixes from an already-diagnosed, audited problem list. Any other bug fix gets no plan review (`gstack-autoplan next --kind fix`, R65), and its PR carries the proof: a repro on current main or a failing test written first. A feature gets the lean run (`--kind feature`): one reviewer reading the plan and the draft code together. ## Working under a Captain diff --git a/changelog.d/gsta258-row8-plan-wording.md b/changelog.d/gsta258-row8-plan-wording.md new file mode 100644 index 000000000..b095189bf --- /dev/null +++ b/changelog.d/gsta258-row8-plan-wording.md @@ -0,0 +1 @@ +- **The plan-first rule now matches R65.** The captain skill, the CREW template, the lane brief, docs/captain.md and the Capy gstack skill no longer tell a lane that every fix needs a one-round, eng-only plan. A bug fix gets no plan review (`gstack-autoplan next --kind fix`), and its PR carries the proof: a repro on current main or a failing test written first. A feature gets the lean run (`--kind feature`): one reviewer reading the plan and the draft code together. The S1 and audited-problem-list exemptions are unchanged. diff --git a/docs/captain.md b/docs/captain.md index b09778c50..0dae70094 100644 --- a/docs/captain.md +++ b/docs/captain.md @@ -183,9 +183,11 @@ flaky pass's repairs, slot stamps, CHANGELOG-only conflict resolves and a size o cap re-pinned under the controller's written grant need no plan. Two kinds of fix are exempt too: an S1 emergency (a broken install or upgrade, a red main, a security bug), and a fix from a problem list that was already diagnosed and audited, where that list is the plan. -Every other fix, a one-line bug fix included, gets a one-round, eng-only plan: the short -run above, with the CEO phase closed before its voices are dispatched -(`gstack-autoplan close --out --phase ceo --deferred "eng-only fix plan" --by agent:`). +Any other bug fix gets no plan review (R65): `gstack-autoplan next --kind fix` prints +`AUTOPLAN: not needed (bug fix; R65)` and writes nothing, and the PR carries the bug's +proof, a repro on current main or a failing test written first. A feature gets the lean +run, `--kind feature`: one reviewer reading the plan and the draft code together, one gate +revision and no carry check (docs/unattended.md). `--full` brings back the full run. A crew may add exemptions in its rules file with the owner's words and date; it does not remove these. The brief says which applies, `Plan: required | approved: | exempt: `, so an diff --git a/test/captain-skill.test.ts b/test/captain-skill.test.ts index 60d21a1f7..a3f758f8b 100644 --- a/test/captain-skill.test.ts +++ b/test/captain-skill.test.ts @@ -81,15 +81,17 @@ describe('/captain skill', () => { expect(read('captain/templates/automation-flaky-pass.md')).toContain('never merge'); }); - test('every copy of the plan-first exemptions names the two fix exemptions and the eng-only plan for every other fix', () => { + test('every copy of the plan-first exemptions names the two fix exemptions and the R65 no-review rule for other bug fixes', () => { for (const rel of ['docs/captain.md', 'captain/SKILL.md', 'captain/templates/CREW.md', 'capy/skill/gstack/SKILL.md']) { const text = read(rel).replace(/\s+/g, ' '); expect(text, rel).toMatch(/S1 emergenc(?:y|ies) \(a? ?broken install or upgrade, a? ?red main, a security bug\)/); expect(text, rel).toMatch(/already[- ]diagnosed,? (?:and )?audited problem list|problem list that was already diagnosed and audited/); - expect(text, rel).toContain('one-round, eng-only plan'); + expect(text, rel).toContain('gstack-autoplan next --kind fix'); + expect(text, rel).toContain('--kind feature'); + expect(text, rel).not.toContain('one-round, eng-only plan'); } - expect(read('docs/captain.md')).toContain('gstack-autoplan close --out --phase ceo --deferred'); - expect(read('captain/templates/brief.md').replace(/\s+/g, ' ')).toContain('gstack-autoplan close --out --phase ceo --deferred'); + expect(read('docs/captain.md')).toContain('AUTOPLAN: not needed (bug fix; R65)'); + expect(read('captain/templates/brief.md').replace(/\s+/g, ' ')).toContain('--kind feature'); }); test('is generic: parameters, not one crew\'s codes, names or repository', () => {