mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-04 07:47:27 +01:00
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>
This commit is contained in:
1 parent
5192908de4
commit
9911da738b
8 files changed
+26
-16
No files matched your search
+4
-1
@@ -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).
|
||||
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,10 +17,8 @@ Spend cap: <focused paid runs per PR, from SPEND>
|
||||
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 <run dir> --plan <plan.md> <scope flags>
|
||||
sized to this brief (a fix: --no-ui --no-dx --max-rounds 1 --estimate-usd <n>
|
||||
--spend-cap <small>, then close the CEO phase before dispatching its voices with
|
||||
gstack-autoplan close --out <run dir> --phase ceo --deferred "eng-only fix plan"
|
||||
--by agent:<your thread>).
|
||||
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 <run dir> whole, as a needs-you report.
|
||||
Build nothing yet.
|
||||
|
||||
@@ -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 <n> --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
|
||||
|
||||
|
||||
@@ -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.
|
||||
+5
-3
@@ -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 <run dir> --phase ceo --deferred "eng-only fix plan" --by agent:<thread>`).
|
||||
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: <run> | exempt: <reason>`, so an
|
||||
|
||||
@@ -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 <run dir> --phase ceo --deferred');
|
||||
expect(read('captain/templates/brief.md').replace(/\s+/g, ' ')).toContain('gstack-autoplan close --out <run dir> --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', () => {
|
||||
|
||||
Reference in new issue
Block a user