mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-03 15:27:56 +01:00
v1.94.4.0 captain docs: plan-first rule matches R65 (no plan review for bug fixes) (#3908)
* 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 docs: trim plan-first wording under the context-budget ceilings The eager-loaded captain and Capy gstack skills grew past their context-budget ratchet ceilings (captain 6576 > 6551, capy/skill/gstack 5367 > 5315). Shorten the sentence in both, drop the duplicate bug-fix clause from the Capy skill's Plan first bullet, and remove the stale 'short run, not no run' clause from docs/captain.md that contradicted the new rule. The test now asks each copy for --kind fix and --kind feature. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes (plain bug fixes are exempt, proof is a repro or failing test) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes (proof is a repro on current main or a failing test written first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * changelog: gsta258 row 8 fragment matches the final wording 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>
This commit is contained in:
1 parent
ad51cef58a
commit
5f705f367a
11 files changed
+31
-23
No files matched your search
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [1.94.4.0] - 2026-11-03
|
||||
|
||||
- The captain skill, the CREW template, the lane brief, docs/captain.md and the Capy gstack skill now follow R65 instead of telling a lane that every fix needs a one-round, eng-only plan. A bug fix is exempt from plan review (`gstack-autoplan next --kind fix`; the brief's reason is `bug fix (R65)`), and its PR carries 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.
|
||||
|
||||
## [1.94.3.0] - 2026-11-03
|
||||
|
||||
**`gstack-ship-preflight` no longer trusts a local `origin/HEAD` when origin can't say its default branch.** Preflight fell back to the local `origin/HEAD` whenever `git ls-remote --symref origin HEAD` failed or named no branch. With no local `origin/HEAD`, it went on from the default branch itself and merged the given base into it. When a PR-branch clone's `origin/HEAD` named the feature branch, it refused that branch as "on the base branch". Now a failed `ls-remote` stops with `git ls-remote origin HEAD failed: …; restore access first` before anything merges. A remote HEAD that names no branch (a detached HEAD, or a server that sends no symref) falls back to the shared default-base order in `lib/default-base.ts`, which uses the local `origin/HEAD` only when it doesn't name the checked-out branch, its upstream or HEAD's commit. The default-branch check now runs after the fetch, so a failed fetch still reports the fetch.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# gstack digest v1.94.3.0 — regenerate/re-copy after upgrading gstack
|
||||
# gstack digest v1.94.4.0 — regenerate/re-copy after upgrading gstack
|
||||
|
||||
Behavioral rules from gstack (https://github.com/garrytan/gstack), compressed
|
||||
for agent hosts without a full skill install. The full skills add workflows,
|
||||
|
||||
+2
-1
@@ -374,7 +374,8 @@ 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. Other bug fixes skip plan review (`--kind fix`, R65) but carry a repro
|
||||
on current main or a failing test written first; features get the lean run (`--kind feature`). 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,8 @@ 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. Other bug fixes skip plan review (`--kind fix`, R65) but carry a repro
|
||||
on current main or a failing test written first; features get the lean run (`--kind feature`). 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 is exempt too (`gstack-autoplan next --kind fix`, R65) and carries a repro on
|
||||
current main or a failing test written first 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: Plan: exempt: bug fix (R65)).
|
||||
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.
|
||||
|
||||
@@ -52,13 +52,13 @@ Token caps on /ship: pass a brief's cap as `--token-cap <n>`. /ship reads `cost.
|
||||
|
||||
Every Capy thread that uses gstack follows these for new work, under a Captain or on its own. The rule in full is `docs/captain.md`, "Plan before build"; the lane side is section 3 of captain.md in this folder.
|
||||
|
||||
- **Plan first.** Run `/autoplan` on new functionality right after the install check. A bug fix needs none (`gstack-autoplan next --kind fix`), just a repro or failing test in the PR. A feature gets the lean run (the Capy default), one reviewer over plan and draft code; `--full` adds every phase.
|
||||
- **Plan first.** Run `/autoplan` on new functionality right after the install check. The lean run (the Capy default) is one reviewer over plan and draft code; `--full` adds every phase.
|
||||
- **ELI5, then the word.** Send the plan and gate to the person, or the Captain, in plain language: `gstack-owner-brief render --captain --out <run dir> --captain-name "<Captain name>"`, its choices as lettered lines in the ask format (`docs/captain.md`) and "do it" taking every recommendation at full scope. Build only after their word is answered into the run and it reports `APPROVED`; then `gstack-approvals import --autoplan <run dir> --by "<owner>"`.
|
||||
- **/ship before ready.** Run /ship at the final pushed head before a PR is called ready; `SHIP_RECEIPT: pr=<n> head=<head>` must name that head, and a later push needs a new /ship. The review inside /ship, like the autoplan, is sized to the change.
|
||||
- **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. Other bug fixes skip plan review (`--kind fix`, R65) but carry a repro on current main or a failing test written first; features get the lean run (`--kind feature`).
|
||||
|
||||
## Working under a Captain
|
||||
|
||||
|
||||
+7
-6
@@ -135,9 +135,8 @@ alone is not an ask.
|
||||
|
||||
A lane that builds something plans first. Its first act after the session-start install
|
||||
check, before any product code, is a `/autoplan` run on its brief, sized to the work. The
|
||||
phases run in order, CEO, then design, then DX, then eng, with design and DX only when the
|
||||
scope has them, and a fix the exemptions below don't cover gets a short run (`--no-ui --no-dx --max-rounds 1`, with
|
||||
`--estimate-usd` set so a small `--spend-cap` still seats its attempts), not no run. On Capy the
|
||||
full run's phases run in order, CEO, then design, then DX, then eng, with design and DX only when the
|
||||
scope has them. A bug fix gets no plan review and a feature gets the lean run (both below). On Capy the
|
||||
unattended loop is `autoplan/DRIVER.md` in the gstack checkout. New functionality a lane
|
||||
takes on part-way, scope its brief did not name, gets its own plan and its own ask before
|
||||
the lane builds it. In the rules file this is rule 24 of the
|
||||
@@ -183,9 +182,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 is exempt too (R65; the brief's reason is `bug fix (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
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gstack",
|
||||
"version": "1.94.3",
|
||||
"version": "1.94.4",
|
||||
"description": "Garry's Stack — Claude Code skills + fast headless browser. One repo, one install, entire AI engineering workflow.",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
|
||||
@@ -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('--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