Skip to content

v1.91.285.0 docs(captain): plan before build — a sized /autoplan is a building lane's first act, the owner's word gates the build - #3521

Merged
capy-ai[bot] merged 7 commits into
mainfrom
gsta-130-plan-before-build
Oct 27, 2026
Merged

capy-ai[bot] merged 7 commits into
mainfrom
gsta-130-plan-before-build

Conversation

@garrytan

@garrytan garrytan commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3521,
  "head": "158850a44c14de6980211ff716bb839457edd5b4",
  "version": "1.91.281.0",
  "base": "main",
  "gate": {
    "remote-free-tier (Ubicloud, gsta130-remote5)": {
      "pass": 18045,
      "fail": 0,
      "skip": 0
    },
    "local-guards (typecheck, captain, skill-size, context-budget, parity, launch-env)": {
      "pass": 24,
      "fail": 0,
      "skip": 0
    }
  },
  "spend_usd": 0.13,
  "session_kind": "spawned",
  "thread": "jam_01M5ZCH2JYCB0DMFPMWWCQTXMF",
  "pregate": "requires-remote cleared @0b8eea0b21f0 (1 checks, current for 158850a44c14)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/40590081257",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/40590085372",
    "pregate.json/remote_gate: remote-gate tree=0b8eea0b21f0 tests=18045"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/captain.md, captain/templates/ (brief, CREW, plan-ask), captain/SKILL.md.tmpl and generated SKILL.md, capy/skill/gstack/ (SKILL.md, captain.md), docs/skills.md, docs/PROJECT_STRUCTURE.md, README.md, docs/capy-install.md, docs/unattended.md, CHANGELOG [Unreleased]; audits gsta130-docs-1 (blocked on two template lists) and gsta130-docs-2 (current after the fix)"
  },
  "review_loop": {
    "passes": 3,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 1,
    "fixed": 10,
    "scope": "frozen"
  }
}

What changed

The /captain skill's approvals part names Plan before build and the brief template

Before/after as text: The /captain skill's approvals part names Plan before build and the brief template
--- Before · captain/SKILL.md § Approvals: three shapes at 392f50d · source text
+++ After · captain/SKILL.md § Approvals: three shapes on this branch · source text
@@ ⋯ 20 unchanged ⋯ @@
 with one line saying what it covers. `gstack-owner-brief render --captain` prints this shape from
 a plan; relay it whole. Template: `captain/templates/plan-ask.md`.
 
+**Plan before build.** A lane that builds something runs a sized `/autoplan` on its brief as
+its first act and sends the controller the plan ask above; the controller relays it, and the
+lane builds only after the owner's word is answered into the run and it reports `APPROVED`.
+New scope taken on part-way gets its own plan. Read-only lanes, the flaky pass's repairs,
+slot stamps, CHANGELOG resolves and cap re-pins under a grant are exempt. 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).
+
 **C. The merge ask.** Every READY the controller brings to the owner, and every PR body:

The crew contract gains rule 24, Plan before build: a sized /autoplan first, the owner's word before the build; crew rules now number from 25

Before/after as text: The crew contract gains rule 24; crew rules now number from 25
--- Before · captain/templates/CREW.md § Crew-specific rules at 392f50d · source text
+++ After · captain/templates/CREW.md § Crew-specific rules on this branch · source text
 ## Crew-specific rules
+Add rules here, numbered from 25, each with the date, the owner's words where there are
+any, and the thread that produced it. A crew whose own rules already took 24 before rule
+24 shipped keeps its numbering and cites `docs/captain.md` (Plan before build) by section
+name. A rule that stays here for long is a gap in gstack: file it.
-Add rules here, numbered from 24, each with the date, the owner's words where there are
-any, and the thread that produced it. A rule that stays here for long is a gap in gstack:
-file it.

Lanes now start with the brief (captain/templates/brief.md), which says whether a plan is required

Before/after as text: Lanes now start with the brief, which says whether a plan is required
--- Before · docs/captain.md § Setting it up on Capy at 392f50d · source text
+++ After · docs/captain.md § Setting it up on Capy on this branch · source text
 4. Create the daily flaky-pass automation.
+5. Start lanes with the [brief](../captain/templates/brief.md): the files they own, the
+   rules file, whether a plan is required, and the READY contract. Read their reports
+   before their chat.
-5. Start lanes with a prompt that names the files they own, the rules file, and the
-   READY contract. Read their reports before their chat.

Every Capy thread gets the short form: autoplan sized to the work, ELI5 with rec as the default, build after APPROVED, /ship at the final head, no merge without the owner's word

Before/after as text: Every Capy thread gets the short form: autoplan sized to the work, ELI5 with rec as the default, build after APPROVED, /ship at the final head, no merge without the owner's word
--- Before · capy/skill/gstack/SKILL.md § Plan, approve, ship at 392f50d · source text (section not present before)
+++ After · capy/skill/gstack/SKILL.md § Plan, approve, ship on this branch · source text
+## Plan, approve, ship
+
+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.** Before building new functionality, run `/autoplan` on it as the first act after the install check, sized to the work (scope flags and `--max-rounds`; a one-file fix gets `--no-ui --no-dx --max-rounds 1` with `--estimate-usd` and a small `--spend-cap`, never no run).
+- **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>`, with `rec` as the one-word default and a "do it" reply that takes 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.
+- **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 and cap re-pins under a written grant.

New: docs/captain.md § Plan before build (the rule in full: who plans, the first act sized to the work, what the lane sends, what the controller relays, the build gate at APPROVED, the record, the exemptions), captain/templates/brief.md (the controller's brief, with a Plan: required | approved: <run dir> | exempt: <reason> line, three steps and a done line naming the approval row) and capy/skill/gstack/SKILL.md § Plan, approve, ship (the same rule in the short form every Capy thread reads, with capy/skill/gstack/captain.md § 3 pointing at it). docs/skills.md and docs/PROJECT_STRUCTURE.md name the lane brief in their template lists.

Why

The owner asked that a thread which makes something new, or takes on new functionality, plan it with /autoplan first and bring the plan as an ELI5 for approval. Until now that rule lived only in one crew's rules file, which no crew set up from gstack's templates would read; the first chance to say "smaller" or "not that way" was a finished PR with a paid gate behind it. The /captain skill, docs/captain.md and the crew templates now carry the rule, so every crew inherits it and the crew file can shrink to a pointer.

Blast radius

Prose and templates only: docs/captain.md, four files under captain/ (the skill template and its generated SKILL.md, the CREW and plan-ask templates, the new brief), the two Capy skill files (capy/skill/gstack/SKILL.md, captain.md), two template lists (docs/skills.md, docs/PROJECT_STRUCTURE.md), test/captain-skill.test.ts and the CHANGELOG. No tool, flag, threshold or READY field changes; the merge-train and READY sections are linked, not edited, and captain/templates/slot-call.md, docs/ship-policy.md, bin/gstack-ship-queue and lib/restamp.ts are untouched. The paid selection for this diff is empty (captain/templates/**, docs and the changelog select no case), so the evidence is the free tier: the whole free suite on one Ubicloud VM (18,045 tests, 0 failed, tree 0b8eea0b21f0), bun run typecheck, bun test test/captain-skill.test.ts (pins the template set at 12 files, the CREW template at 24 rules and the docs table at 24 rows), the skill size guard, the context-budget ratchet (captain eager tokens under the 6,551 ceiling; the Capy skill under its 4,120 ceiling), the parity suite and gstack-prose-lint CHANGELOG.md --unreleased --gate, all green at this head; Free Tests and Windows Free Tests ran at this head by dispatch because the only conflict with main is CHANGELOG.md, which the train's stamp resolves additively.

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-27 Approve the plan "GSTA-130: Plan before build (autoplan + ELI5 approval) in the /captain skill" (autoplan run run-20261027191719, 2 decisions) “Do it” (Garry (via GStack Minder), relayed by agent:jam_01M5ZCH2JYCB0DMFPMWWCQTXMF) approved the reviewed plan (sha256 ed53c812f8bd), every recommendation taken none

Open in Capy

Documentation

Scope: the two blockers of gsta130-docs-1 (captain/templates/ enumerations in docs/skills.md and docs/PROJECT_STRUCTURE.md). Result: both now name the lane brief; no other enumeration in docs/ or README.md omits brief.md. Debt: none.

Pre-Landing Review

REVIEW_LOOP: passes=3 blocking_found=0 deferred=0 noted=1 fixed=10 scope=frozen

Three review passes in total, with 10 fixed, 1 noted, 0 deferred and nothing at the blocking floor. Pass 1 (core + adversarial, the whole diff): 0 critical, 9 adversarial findings, eight of them changed in the diff (the import --by flag, the controller's compare rule, --estimate-usd beside the spend cap, run dir instead of run id, the full answer command, one "first act" after the install check, the launch env and checkpoint dir in the brief, the CHANGELOG pointer wording). Pass 2 (the fix range): 0 critical, 2 informational, both changed (the resume --from target is the checkpoint dir; plan-ask.md's answer line carries --rec-hash). Pass 3 (the four-line fix batch, one reviewer): NO FINDINGS, GATE: kept. Outside voice: not run, docs-only diff. Gate edits: none detected (the test hunk tightens the template pin from 23 to 24 and removes nothing).

Review notes

  • captain/templates/CREW.md rule 24, the "daily flaky pass's repairs" exemption is wide: those repairs can touch detectors and judged prose. Kept as the owner worded the rule; narrowing it is a separate ask.

…ne's first act, the owner's word gates the build (GSTA-130)

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

trunk-io Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 6 commits October 27, 2026 21:30
…oplan sized to the work, ELI5 with rec and do it, APPROVED before the build, /ship at the final head, no merge without the owner's word) (GSTA-130)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…en written over a truncated read (GSTA-130)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…the Capy skill stays under its 4120-token eager ceiling (GSTA-130)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…e controller checks the row against its relay, brief.md spells the full answer command and carries the run dir, first act after the install check (GSTA-130)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…plate command lines

docs/skills.md and docs/PROJECT_STRUCTURE.md enumerate captain/templates/ and
omitted brief.md (document-release audit gsta130-docs-1). brief.md's restore
line now names the checkpoint dir that resume --from takes, and plan-ask.md's
answer line carries --rec-hash like brief.md (ship review pass 2).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merge origin/main (10b77de) into gsta-130-plan-before-build and stamp slot 1.

FILES: CHANGELOG.md VERSION agents-digest/gstack-AGENTS.md package.json
MERGE_CONDITION: sha=158850a44c14de6980211ff716bb839457edd5b4
next: NEW_VERSION=1.91.285.0

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title docs(captain): plan before build — a sized /autoplan is a building lane's first act, the owner's word gates the build v1.91.285.0 docs(captain): plan before build — a sized /autoplan is a building lane's first act, the owner's word gates the build Oct 27, 2026
@capy-ai
capy-ai Bot merged commit 737e5a2 into main Oct 27, 2026
69 of 71 checks passed
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