From 5d4dcb269730bcd87033846aff662d93cc6b1dc4 Mon Sep 17 00:00:00 2001 From: garrytan Date: Thu, 29 Oct 2026 04:53:30 +0000 Subject: [PATCH] docs: carry-forward conditions, delta-check voiding and import --stack match the final code Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- capy/skill/gstack/captain.md | 4 ++-- docs/troubleshooting.md | 5 ++++- docs/unattended.md | 21 ++++++++++++++------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/capy/skill/gstack/captain.md b/capy/skill/gstack/captain.md index 410405a58..a33dba03d 100644 --- a/capy/skill/gstack/captain.md +++ b/capy/skill/gstack/captain.md @@ -101,8 +101,8 @@ For an autoplan run, open the plan with `## ELI5` (5-10 plain sentences), then w gstack-owner-brief render --captain --out ``` -It prints a header line ("Decision needed … Reply **rec** …"), the four plan sections (each capped, with a -pointer to the plan for the rest), and "What we need from you", which lists every choice `rec` takes, in +It prints a header line ("Decision needed … Reply **rec** …"), the `### ELI5` summary (on a run whose gate +carries `eli5`), the four plan sections (each capped, with a pointer to the plan for the rest), and "What we need from you", which lists every choice `rec` takes, in words, and closes with the "do it" reply, then a `### Cost` section (spent so far, worst case, and the estimate for the phases `rec` can reopen). The last line, "For the relaying agent", carries the run, `gate_rev`, `rec_hash` and the exact `gstack-autoplan answer` command. Relay everything above that line. When the reply comes back: diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d62bb0157..20285d89f 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -1729,8 +1729,11 @@ restate them. Rotate the secret if it was real. **Meaning.** The record is kept per branch (one Capy thread ships one branch), and HEAD is detached or the working directory is not a git repository. Exit 3. +From `import --autoplan --stack ` it means a listed branch exists +neither locally nor on origin; the line names it, and no branch's record was written. -**Fix.** Check out the branch the work ships from, or pass `--branch `. +**Fix.** Check out the branch the work ships from, or pass `--branch `. For +`--stack`, correct or fetch the named branch and import again. ### `gstack-approvals: ... (APPROVAL_RECORD_UNAVAILABLE)` diff --git a/docs/unattended.md b/docs/unattended.md index 44bf91a45..e67b637e9 100644 --- a/docs/unattended.md +++ b/docs/unattended.md @@ -501,10 +501,12 @@ A gate revision after the first (`gate_rev` 2 and later, written after a it when nothing new needs their decision. `gstack-autoplan` prints `CARRIED: gate_rev= <- gate_rev= words="" by= reason=`, then the usual `APPROVED:` lines, and journals `gate_carried`. The carry needs -all of: the earlier gate approved (`p1a` or `p1b`) with the owner's words +all of: the earlier gate approved (`p1a` or `p1b`) with `rec` or "do it" +(not item tokens), no item there left pending, and the owner's words recorded; that gate was not itself carried; every accepted change incorporated or settled; the plan file's bytes equal those recorded at the gate or at the -`revise` that took the changes (an ELI5-only edit counts); no urgent or +`revise` that took the changes (any later edit refuses, an ELI5-only one +included); no urgent or outside-plan finding open; and every new gate item one of the cases below. Anything else prints `CARRY: no ()` (journal `carry_refused`) and the gate goes to the owner as before. `--no-carry-forward` on the first `next` turns it @@ -512,12 +514,13 @@ off for the run. - **"do it".** When the owner's words were "do it" (their words, not a `captain:` relay of them), a new `auto` item that changes no scope, cost or - direction and is no round or budget grant takes its recommendation. The + direction, whose recommended option changes no plan text, and is no round + or budget grant takes its recommendation. The decision row gets `carried_under: do it`, the output prints `CARRIED_UNDER_DO_IT:` per item, and the approval record lists them as "taken under "do it", not seen by the owner". `rec` carries no new item. -- **Unreviewed post-cap delta.** A "plan changed after cap" item is - read by one reviewer before it carries. `CARRY_CHECK:` names the attempt and +- **Unreviewed post-cap delta.** A "plan changed after cap" item + recommending `a` (accept) is read by one reviewer before it carries. `CARRY_CHECK:` names the attempt and the prompt (the delta against `plan-at-gate.r.md`, the accepted changes, the full plan); the run reserves the estimate in `spend.json` and refuses when it is over `--carry-check-cap ` (default 5) or the run's cap. @@ -526,13 +529,17 @@ off for the run. (`--same-family ""` when no other family is available). A High or Critical finding, or `--unavailable ""`, leaves the gate for the owner. The verdict is saved as `carry_check` on `gate.json`, on the - decision rows (`carry_check`) and in `/decisions.tsv`. + decision rows (`carry_check`) and in `/decisions.tsv`. A pending + check is void, its reservation released and the gate left for the owner, + when the owner answers the gate, the plan is revised, a new gate is + written, or the delta changed after dispatch. Carried rows keep `answered_by: agent:gstack-autoplan` and name their source (`carried_gate_from`, `carried_gate_rev`, `carried_answered_by`); `gstack-approvals import --autoplan` writes the carried gate as its own row, and `gstack-owner-brief render --captain` opens with "Nothing pending. -Carried forward from gate_rev ". +Carried forward from gate_rev ", followed by any items taken under "do it" +without being shown to the owner. ## Owner brief