Files
gstack/ship/sections/capy-pr.md
T
Garry Tanandcapy-ai[bot] 901f246d74 feat: crew PRs carry their brief's Plan line; ship-queue ready and land check it (GST-1751) (#4118)
* feat: crew PRs carry their brief's Plan line; ship-queue ready and land check it (GST-1751)

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

* feat: /ship finish and train ready/land check the Plan line (GST-1751)

finish --plan resolves the brief's Plan line before stage 1; train ready,
base-red ready, train land and stamp land read and write the READY note's
plan record like direct ready and land. Review fixes: grant and exception
rows never pass as plan approvals, render --plan stays short when redacted,
no explicit changelog-only exemption, off mode still records a resolved line.

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

* fix: pre-landing review fixes

Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#3 reader=red-team
Review-Finding: p1/specialist-batched#1 reader=testing
Review-Finding: bin/gstack-approvals:56:functional-contract reader=qa
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test: cover the plan check at ready, train ready, land-direct, finish and the policy key (GST-1751)

Review-Finding: p1/specialist-batched#3 reader=testing
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix: the Plan line stands for the gate's real state, and a broken store never throws (GST-1751)

A row id from an autoplan run resolves to that run's newest gate revision; a
run id needs the plan approval answered and no decision left unanswered.
readStore skips malformed rows and unreadable files; with the key off the
check never throws or prints. Train land rechecks the Plan line before its
merge on every path. /ship's Step 19-C renders Approvals with --plan;
DRIVER.md back under its size limit.

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

* test: train land refuses a slot with no plan record under require (GST-1751)

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

* fix: pre-landing review fixes

Step 8 plan discovery (lib/ship-audit.ts and the plan-completion sections) skips the Plan record line, so a later Plan: <path> binding is still found; render --plan refuses a line it cannot parse. The review skill's pins drop by 4 bytes.

Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: scripts/resolvers/plan-gates.ts:206:functional-contract reader=qa
Review-Finding: p1/red-team#3 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: changelog fragment passes the prose lint (GST-1751)

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

* docs: captain.md describes the READY PLAN: line (GST-1751)

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

* fix: plan discovery splits the Plan line on whitespace and skips record kinds in any case (GST-1751)

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

* test: lower the gstack-review size pins after the Step 8 binding shrank 4 bytes (GST-1751)

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>
2026-11-07 09:53:38 +00:00

3.9 KiB

Step 19-C: Capy PR body (What changed, Why, Blast radius, Approvals)

Read only when Step 19 printed CAPY_PR: on. Under Capy a person decides the merge from the PR and the READY report, through a Captain, so the body shows what changed in pictures, why, and who approved what. Guide: captain.md beside the Capy gstack skill's SKILL.md.

Order. The gstack-ship-receipt block stays first when Step 19 writes one. Then ## What changed, ## Why, ## Blast radius and ## Approvals, then the standard sections below. Keep ## Summary to commit themes; do not repeat the captions.

  1. Pick the evidence: one to three before/after pairs, highest-signal first. The first is the key image.
    • UI change: screenshot the changed screen at the base and on this branch with the browse flow, or your host's browser, at the same size.
    • Skill or prompt change: ~/.claude/skills/gstack/bin/gstack-pr-shots --path <template or SKILL.md> --heading "<changed section>" --caption "<what changed and why>".
    • CLI change: save the output of a command this ship already runs, at the base and on this branch, to files inside the repository (.gstack/tmp/before.txt, .gstack/tmp/after.txt), then ~/.claude/skills/gstack/bin/gstack-pr-shots --before <file> --after <file> --kind terminal --caption "<…>". Never run a command with side effects just to make a picture.
    • No visible surface: picture the source section or test output that best shows the change. gstack-pr-shots refuses inputs that match the secret scanner (PR_SHOTS_INPUT_REFUSED). Remove the secret from the capture; never work around the refusal.
  2. Read SHOT_PNG:. A path: use it. unavailable (…): screenshot the printed shot.html with your own browser at 880 px wide and use that PNG. failed (…): use the text version only.
  3. Upload. Only for a public repository (gh repo view --json visibility -q .visibility prints PUBLIC). A private repository gets the text version, unless the person approved images for it (record that with gstack-approvals add). Upload each PNG with Capy's PR asset tool (tools.pr.uploadAsset). Embed exactly the URL it returns, with the caption as alt text: ![<caption>](<url>) (a returned bare video URL stays on its own line). If an upload fails, retry once, and only for a transient error. Otherwise use the text version and write image upload failed: <reason> under the caption. Never block publication on an image.
  4. Under every image: a one-line caption saying what changed and why, then the contents of the printed text.md (a collapsed text before/after, for readers who cannot see the image and for search).
  5. ## Why: two or three sentences. The first states the problem in the person's words (the issue, the failed run, or their request, quoted); the rest say what changes for them. No inventory: BAD "Adds a lint and a CI step." GOOD "'The review loop is too overzealous.' Pass 2 now reads only pass 1's range."
  6. ## Blast radius: the body template's item, written once, here: what else the change touches and the one fact that makes that safe, with the evidence-ladder rung it reached (file:line read, walked failure path, script ran, repro).
  7. ## Approvals: the output of ~/.claude/skills/gstack/bin/gstack-approvals render --plan "<the brief's Plan line>", verbatim. It escapes its cells, and the receipt never reads it as an approval citation. A public repo (or unknown visibility) gets only Approved: yes|no (record <id>); never pass --full for a PR body. On APPROVAL_RECORD_UNAVAILABLE keep its text and say so in the READY report. Never type rows by hand.
  8. READY report: attach the key image's PNG to the report you send (Capy's message attachments) and give its uploaded URL, so the Captain can show it inline.