Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
5.6 KiB
Lane start card
For a crew lane (a thread working for a Captain). Read this once gstack: ok <revision> for=<skill> is in hand from this machine's install check, instead of the rest of SKILL.md. It keeps what a lane needs between the check and /ship. Before you run /ship, read SKILL.md § "Unattended runs for a parent agent" and § "Plan, approve, ship". For anything else (an upgrade that fails, driving /autoplan, loading another workflow, maintenance), read the matching SKILL.md section.
After the check
- Report the trailer verbatim in your first report,
floor=andbehind=notes included. The trailer'sfix:command runs once before the next workflow whenever it carriesbehind=1or more,floor=orstale=, and a thread older than a day reruns the check before its next workflow (§ "Session start: check, then install only when needed", step 2, which names what holds the checkout); afloor=note that saysno release meets this floor yetruns nothing and goes to your Captain. - Read
capy/skill/gstack/factory.mdin the checkout once per session. - Start every shell that runs a gstack command with
. <GSTACK_LAUNCH_FILE>. Never re-type the assignments asexport $(...), and never runenv,printenv, a baresetor a bareexport: they print API keys into the transcript. Hand a child agent the file path, never the values. - Every subagent runs its own
--checkand puts its trailer in its first report; a read-only reviewer uses--for review-voice. One machine's install never covers another. - A workflow that prints
INSTALL: fail …and exits 3 refuses this install: run its fix and start again. A planning-only install does not admitreview,shiporqa; run--for <that skill>first. - Run directories and scratch live under
~/.capy/work/<name>, never/tmp, which Capy wipes when a machine sleeps.
Plan, approve, ship
- New functionality gets a lean
/autoplan(--kind feature) right after the check. Bug fixes skip plan review (--kind fix) but carry a repro on current main or a failing test written first. Exempt: read-only work, the daily flaky pass's repairs, slot stamps, CHANGELOG-only resolves, cap re-pins under a written grant, S1 emergencies and fixes from an already-diagnosed, audited problem list. - Send the gate to the Captain as
gstack-owner-brief render --captain --out <run dir>, whole. Build only after the owner's word is answered into the run and it reportsAPPROVED, thengstack-approvals import --autoplan <run dir> --by "<owner>". - /ship runs at the final pushed head before any READY;
SHIP_RECEIPT: pr=<n> head=<head>names that head, and a later push needs a new /ship. - After dispatching /ship, end your turn and hold no PR watch until it completes. Then subscribe to the PR, read its checks and comments once, stop the /ship subagent and run
gstack-ship-queue ready. - Never merge. The controller merges on a recorded standing approval.
- UI work (recommended, never a READY prerequisite): once the change renders, run
install.sh --check --for design-reviewandgstack-browser-ensure, launch with the printedGSTACK_LAUNCHline, then/design-review --build <preview url>, and paste its oneDESIGN_BUILD:line in READY. A start that printsGSTACK_RESULT: skill=design-review status=refusedisDESIGN_BUILD: unrendered code=INSTALL(gstack-design-build admit <saved start output>prints it).incompletedoes not count as having run it.
Under a Captain
- Asks go to the Captain as a needs-you report, never to the person. Cite a standing approval instead of asking again.
- A fresh ask is always needed for a product or behaviour decision, spend over a stated cap, anything published outside the repository, a change to a threshold, budget or trial count, closing someone's contribution without landing it, and anything destructive.
- Record every answer with
gstack-approvals addorgstack-approvals import;gstack-approvals renderprints the table for your report and the PR body. Full guide: captain.md.
Keep context cheap
- Batch independent reads in one parallel program. Return 4k characters or less per call; write long output to a file under
~/.capy/workand read the part you need. - A wait you expect to last under about 30 minutes checks in every 240 s:
waiton the operation withduration_seconds: 240, then re-issue it silently on a wake that brings nothing new. After about 30 minutes, or past the expected end, stop re-issuing and sleep on the operation or pull request watch. A longer wait sleeps on its operations. While /ship runs, sleep. - Past twice the crew's median lane spend, write
handoffs/<code>/next.mdand tell the Captain in one line; it decides whether you continue, rotate or park. - Keep your PR until it merges or closes; never hand off mid-PR on a token count. Past 1B own tokens (about $330), check in with the Captain once, then carry on unless told otherwise.
Before a push
In a repository with a sealed key in .gstack/pregate.json, run ~/.local/share/gstack/bin/gstack-pregate sealed before every push and every pull request (§ "Before any push or pull request").
Capy adaptations
An instruction to invoke Skill means read that SKILL.md. Messages and questions go through Capy's tools; plain assistant text reaches nobody. Hooks are advisory here; report a missing capability instead of claiming an equivalent. Selecting a model in Capy installs no Codex or Claude Code CLI; a subagent on another model family is a full outside voice. Installing gstack authorizes no merge, deploy or destructive step (§ "Adapt host-specific instructions to Capy").