Skip to content

Write up a failed or shelved attempt before closing it (GST-3576) - #4735

Merged
capy-ai[bot] merged 1 commit into
mainfrom
write-it-up-before-you-shelve-it
Nov 23, 2026
Merged

capy-ai[bot] merged 1 commit into
mainfrom
write-it-up-before-you-shelve-it

Conversation

@garrytan

@garrytan garrytan commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

gstack now asks for a short write-up before any attempt is closed as failed, shelved, cut, null or not now, and the close links to it.
Why: a failed attempt is paid-for knowledge; without a page of notes the next person repeats it or never learns which part worked.
To do: nothing. Workflows that close an attempt now point at the new template, docs/shelved-attempt.md.

What changed

When an experiment, an eval arm or a prototype didn't work out, gstack had no default for what to keep, so a dead attempt often closed with a one-line reason and its numbers stayed in a thread nobody reopens. Now there's one short template and every place that closes an attempt points at it.

  • New template, docs/shelved-attempt.md: takeaways, what we tried and why, what worked, what didn't (with numbers and how far each was checked), why it's shelved, what would reopen it, where the data and scripts are, what wasn't done, what went wrong on our side, and cost.
  • The default, stated where gstack keeps its rules: point 17 on the factory page every Capy session reads, and a new "Write it up before you shelve it" section in the multi-thread lead manual, whose rule for closing a PR as dropped now asks for the link too.
  • Workflows that close an attempt point at it: ETHOS.md's "Why null?" verdict, /eval-plan's results step (null, cut candidate, stopped at the approval ask, or out of budget), the lead skill's report and close rules, and the finished-work report template. The full list is in Agent notes.
  • One light check: gstack-archive-check thread, run before archiving a thread, now prints a NOTE: line for each PR the thread holds that closed without merging, asking that its close link a write-up if it was shelved. It is a note only and never refuses.
Why

A note and not a refusal, because no gstack tool sits on the moment an attempt closes. Issues close through the tracker, PRs close on GitHub, and an eval verdict is prose. The archive check is the one gstack step that sees a thread's closed PRs, but it can't read the close comment, and many closed PRs were superseded, not shelved. A refusal there would block every archive that holds a superseded PR, and /ship is being simplified to drop refusals without stated reasons, so this adds a reminder at the last moment the thread's context still exists. If write-ups still go missing, the next step is a refusal that checks the close comment for a link.

Blast radius

Prose in four agent-loaded files plus ETHOS.md and one new doc; the factory page budget rises from 5,300 to 5,550 bytes for point 17. The archive check's verdict and exit codes are unchanged, because the new line is pushed only as a note and the verdict still comes from open PRs and working issues alone (lib/archive-check.ts read, and a live run on two real PRs, one closed and one merged, printed one note and ARCHIVE_CHECK: clean).

Pre-Landing Review

No issues found by the checklist or the specialist reader. The second reader raised two low notes, neither blocking: the archive note also fires for superseded PRs (its wording says "if it was shelved", and it never changes the verdict), and nothing refuses a close without a write-up (by design; see Why).

Exploratory QA

Smoke: ran this branch's gstack-archive-check thread on a thread holding a closed PR (#4697) and a merged one (#4734): one NOTE: for #4697, none for #4734, ARCHIVE_CHECK: clean, exit 0. Control: main's copy printed no note. The new unit test fails on main's code and passes here.

Eval Results

No evals ran at PR tier. The selector fell back to its full set because crew/docs/captain.md is an unknown dependency, and it reported no quick live coverage; its selected behaviors stay scheduled and release coverage.

TODOS

No TODO items completed in this PR.

Documentation

Status: current — the docs already match the change and no edits were needed.

Scope: branch write-it-up-before-you-shelve-it against base 71c5e34d (head 37c5473, 13 files). There were no staged, unstaged or untracked candidate files. The audit covered the new template docs/shelved-attempt.md and every doc that links to it.

Documentation health

File Status
docs/shelved-attempt.md Current: new template, and its archive-check NOTE wording matches lib/archive-check.ts
ETHOS.md Current: the "Why null?" paragraph links the template
crew/docs/captain.md Current: new section, and the close rule links it
capy/skill/gstack/factory.md Current: point 17 cites docs/shelved-attempt.md
captain/SKILL.md.tmpl (+ generated SKILL.md) Current: generated output matches the template
captain/templates/report.md Current: the Outcome slot asks for the write-up link
eval-plan/SKILL.md.tmpl (+ generated SKILL.md) Current: shelved results paragraph, generated output matches
changelog.d/write-it-up-before-you-shelve-it.md Read only, and consistent with the change

Coverage debt: gstack-archive-check thread's new NOTE: pr … closed without merging line has reference coverage only (the template doc and crew/docs/captain.md) and no how-to page. The template is not listed in a docs index, but readers can reach it from ETHOS.md and the factory page. There is no diagram drift because no doc diagrams reference these files.

Tests
  • focused tests (bun test test/archive-check.test.ts test/captain-skill.test.ts test/capy-skill-wrapper.test.ts test/parity-suite.test.ts): 100 pass, 0 fail
  • CI free tests at this tree (run 45115977917): passed; macOS named regressions and Windows smoke passed
Agent notes

Agent notes

GST-3576. Owner instruction ("Do it", 2026-11-23), relayed by GSKI-1 then GStack Minder (GSTA-36).

Workflows that close work as cut, shelved, null or not now, and what each now says

  • capy/skill/gstack/factory.md point 17: the directive.
  • crew/docs/captain.md: new section "Write it up before you shelve it", and "Close only as landed, superseded or dropped" asks dropped attempts to link the write-up. The owner's words are quoted once, in docs/shelved-attempt.md (the captain manual must stay free of names).
  • ETHOS.md section 9 ("Why null?" / R48 verdict path): a cut gets a write-up before it closes.
  • eval-plan/SKILL.md.tmpl Step 5: null, CUT-CANDIDATE, option C at Step 4, or budget_exhausted is shelved work; its results file adds why shelved, what would reopen it and where the data is.
  • captain/SKILL.md.tmpl "Reports and waves": write-up first; report, issue and PR close link it.
  • captain/templates/report.md: Outcome slot asks for the link.
  • lib/archive-check.ts: the NOTE line (test in test/archive-check.test.ts, failing first on main's code).

Searched and left unchanged: /retro (reports merged PRs and issue counts, records no abandoned work), /gstack-upgrade, /office-hours and /autoplan "not now" (snoozes, not closed attempts), /runaway-stopper (stops threads, doesn't judge their work), /benchmark-models, /plan-tune (end no experiment).

R56 reason: the owner's standing rule (R120); measured by whether shelved closes carry a write-up link in the daily issue sweep. No new refusal. Factory budget raise reason is in the test comment.

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=2 fixed=0 scope=frozen ledgers_read=2 dispatches=1
Gate edits: none detected (2 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Approvals

Approved: yes (record r-a40074e2bed3). The full approval record stays private.
Plan: approved (record r-8e0436f69f81)
Plan check: approved (record r-8e0436f69f81)

{
  "schema_version": 1,
  "pr": 4735,
  "head": "37c5473c8056a47e7648991a25d318bc66d714d3",
  "version": "1.103.0.0",
  "base": "main",
  "gate": {
    "focused": {
      "pass": 100,
      "fail": 0,
      "skip": 0
    }
  },
  "calls": 25,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/ship/run1",
  "head_tree": "cde2d5bacee13c918a7266352e44def79e719728",
  "product_patch_id": "072e9b5db39976dddc318947509a889c64c6148d",
  "gstack_version": "1.103.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 33,
    "rules": "33831f8248a814fd",
    "base": "71c5e34d706831154dae2fb144a7c50e0e46beda",
    "registry": "71c5e34d706831154dae2fb144a7c50e0e46beda",
    "gate_scan": {
      "tagged": 0,
      "head": "37c5473c8056a47e7648991a25d318bc66d714d3"
    },
    "reasons": [
      "runtime=33"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @cde2d5bacee1 (8 checks, current for 37c5473c8056)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/45115977917/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/45115978245/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=cde2d5bacee1 tests=39232 skipped=104 runs=45115977917/1 profiles=ci-reuse/free-tests heads=37c5473c8056 verified=2026-11-23T05:43:08.576Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "README.md, docs/, crew/docs/, ETHOS.md, AGENTS.md, CLAUDE.md against 71c5e34d"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 2,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 1
    }
  },
  "gate_dispositions": []
}

Adds docs/shelved-attempt.md and points the factory page, ETHOS, /eval-plan, /captain, the report template and the archive check at it.

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

trunk-io Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@capy-ai
capy-ai Bot merged commit 8143a91 into main Nov 23, 2026
53 checks passed
@garrytan garrytan mentioned this pull request Nov 24, 2026
capy-ai Bot added a commit that referenced this pull request Nov 24, 2026
- `/ship` now tells you what to change when GitHub refuses a push for email privacy. (#4748)
- The release gate's /cso check accepts the low-confidence hypotheses /cso now reports. (#4753)
- /cso reports every security finding the code supports instead of dropping most of them. (#4739)
- /cso can search the whole repository in one call, and a daily report now lists its low-confidence hypotheses. (#4742)
- A first version's plan and try-it message now open with the owner's own words, and the build is tried the same way he will try it before he is asked. (#4759)
- A first version's public export now keeps out the owner's short quotes and his reasons to leave something out, and a phone first-use check installs a build the cloud phone can actually run. (#4772)
- Three intermittent test failures are fixed. (#4745)
- Free Tests runs its shards on 8-core runners again. (#4749)
- A land that waits on an earlier CI run now decides on what that run actually did. (#4763)
- Landing a PR no longer starts a new CI run when one for the same merged code is already running or has passed. (#4760)
- /ship no longer misses a file-mode change from main on files whose names start with `:`. (#4774)
- make-pdf keeps quotes in alt text, link titles and raw HTML attributes inside the attribute, so a Markdown file can no longer add an `onerror`, `onload` or `javascript:` link that runs in the print browser. (#4761)
- Posting a PR body that lists earlier /ship runs no longer stops for a phone number that isn't there. (#4747)
- A first version's public export now catches a short owner quote whose padding or quote marks are encoded. (#4778)
- A first version's public export now also keeps out a short owner quote written with spaces just inside its quote marks. (#4776)
- Posting a PR body that lists earlier /ship runs no longer stops for a card number that isn't there. (#4751)
- /ship no longer asks for an extra reader when you merge the base branch next to code that was already reviewed. (#4754)
- /ship no longer plans narrow re-checks after a fix. (#4741)
- /ship can't quietly gain new refusals. (#4740)
- `gstack-upgrade` no longer refuses to run after you disable skills. (#4743)
- The free test suite splits its shards from this week's recorded test times. (#4744)
- gstack now writes up a failed or shelved attempt before closing it. (#4735)

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