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>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-29 04:53:30 +00:00
1 parent a56d675269
commit 5d4dcb2697
3 files changed
+20 -10

No files matched your search

+2 -2
View File
@@ -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 <run dir>
```
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:
+4 -1
View File
@@ -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 <dir> --stack <b1,b2,...>` 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 <name>`.
**Fix.** Check out the branch the work ships from, or pass `--branch <name>`. For
`--stack`, correct or fetch the named branch and import again.
<a id="approval-record-unavailable"></a>
### `gstack-approvals: ... (APPROVAL_RECORD_UNAVAILABLE)`
+14 -7
View File
@@ -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=<n> <- gate_rev=<m> words="<their words>" by=<relayer> reason=<why>`,
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 (<why>)` (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 <phase> cap" item is
read by one reviewer before it carries. `CARRY_CHECK:` names the attempt and
- **Unreviewed post-cap delta.** A "plan changed after <phase> 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<m>.md`, the accepted changes,
the full plan); the run reserves the estimate in `spend.json` and refuses
when it is over `--carry-check-cap <usd>` (default 5) or the run's cap.
@@ -526,13 +529,17 @@ off for the run.
(`--same-family "<why>"` when no other family is available). A High or
Critical finding, or `--unavailable "<reason>"`, leaves the gate for the
owner. The verdict is saved as `carry_check` on `gate.json`, on the
decision rows (`carry_check`) and in `<dir>/decisions.tsv`.
decision rows (`carry_check`) and in `<dir>/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 <m>".
Carried forward from gate_rev <m>", followed by any items taken under "do it"
without being shown to the owner.
## Owner brief