Skip to content

Check a question against the owner's earlier answers before asking it again (GST-3025) - #4467

Merged
capy-ai[bot] merged 6 commits into
mainfrom
owner-answers-record
Nov 17, 2026
Merged

capy-ai[bot] merged 6 commits into
mainfrom
owner-answers-record

Conversation

@garrytan

@garrytan garrytan commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

An agent can now check a draft question against the owner's earlier answers before sending it, so the owner isn't asked again about something they already said yes to.
Why: owners repeat "don't ask me, just do it" across threads, because each new session forgets earlier answers. In a four-day sample, about 1% of 444 asks were repeats this could skip, so a two-week pilot decides whether it's kept.
Nothing to do: the new command is opt-in, and no existing command, install output or factory rule changes.

What changed

An owner who already said "yes, merge when green" gets asked again by the next thread, because that thread never saw the answer. gstack-owner-answers keeps those answers in one record outside every repository (on Capy, the owner's private Drive folder) and screen --ask-file proposes leaving out only the lines that a verified, current standing yes in the owner's own words covers exactly. Everything else stays in the ask, with related answers shown beside it.

  • Each answer is one file, written once; a correction is a new row that replaces the old one, and a second replacement of the same row is refused.
  • A row can be taken only when it is a standing yes in the owner's own words, with no limits, not replaced, and verified by a second actor who read the cited source.
  • screen keeps autoplan gate items, untyped, compound and limited lines, every "always a fresh ask" class, and any line where a newer or narrower answer for the same action can't be taken.
  • A damaged, conflicting or unreadable record keeps every ask. So does a record folder that is a link leading out of the owner's folder, and a write that fails removes its own file.
  • File format, fresh-ask classes and the pilot: docs/owner-answers.md. The nine new result codes: docs/troubleshooting.md.
Blast radius

New files only, plus nine new entries in the result-code table and its generated anchor map (bin/gstack-doctor-components.sh); no existing command reads the new module (checked by grepping every caller of lib/owner-answers.ts: only bin/gstack-owner-answers and its test).

Test Coverage

Coverage: 74% of 23 new code paths had a test at review time (17 of 23); the gaps were CLI check, list, argument errors, revoke through the CLI, an unreadable rows folder and long-quote truncation. Review fixes added 6 tests since. Tests ran: owner-answers 26. Tests ran: result-codes 394.

Pre-Landing Review

Six findings were fixed: a target that isn't one lower-case token was accepted; a multi-line agent name could forge output lines; a newer or narrower "no" didn't stop an older blanket yes from being proposed; a second replacement of a row left the record unreadable; a record folder linked outside the owner's folder was written and read through; and a failed write left an empty row behind. Nothing blocking is open. The second-model review (GPT-6.1 Sol) completed and raised the last two.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL lib/owner-answers.ts:136 A secret in the agent id of --words-by is refused, but the message names field by instead of --words-by.
  • INFORMATIONAL lib/owner-answers.ts:321 The screen veto keeps an ask for any newer non-takeable matching row (for example a newer standing yes not yet verified), not only a 'no'; it fails closed, and the docs describe the narrower case.
  • INFORMATIONAL lib/owner-answers.ts:89 On Capy without GSTACK_CAPY=1 (a shell that has not loaded the launch file) the record lands on the machine's thrown-away state root instead of the Drive.
  • INFORMATIONAL lib/owner-answers.ts:104 A verification binds only words; limits, words_by and recorded_by can be edited in the row file afterwards without voiding it.
  • INFORMATIONAL lib/owner-answers.ts:257 Self-verify compares recorder and verifier names exactly; a case-only difference passes.
  • INFORMATIONAL lib/owner-answers.ts:119 An omitted --scope defaults to all, the widest scope.
  • INFORMATIONAL bin/gstack-owner-answers:46 CLI parsing: a value flag accepts the next flag as its value, a repeated flag overwrites, and the revoke error names a --supersedes flag the CLI does not have.
  • INFORMATIONAL lib/owner-answers.ts:193 A dangling owner-answers/ link reads as an empty record instead of naming the link; every ask is still kept.
  • INFORMATIONAL lib/owner-answers.ts:390 logDecision still follows a link planted at the file log/.jsonl; the appended line holds no secrets.
  • INFORMATIONAL lib/owner-answers.ts:36 The spend keyword net misses 'credits', 'paid' and plural 'caps'; a take still needs an exact typed match, a verified owner row and a person confirming the take.
Exploratory QA

Functional smoke on the CLI with a throwaway record: before the fixes, three probes reproduced the target, agent-name and narrower-answer findings; after them, all seven probes pass (record, verify, propose, refuse a bad target, refuse a multi-line agent name, record a narrower decision, keep the ask). The secret-in-words probe was not run because the evidence recorder refuses sensitive input; the unit test covers it.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. The docs match the code and nothing was edited.

Scope: Base da98d0a to head d13d3f6 on branch owner-answers-record: 6 commits, 8 files, with no staged, unstaged or new files. The change adds gstack-owner-answers (in bin/ and lib/owner-answers.ts), nine OWNER_ANSWERS_* result codes, docs/owner-answers.md, troubleshooting anchors and a changelog.d fragment.

Documentation health

File Status
docs/owner-answers.md Current. Its file format, take rules, fail-closed cases, the screen keep reasons, the fresh-ask tags and the verify --event rule all match lib/owner-answers.ts.
docs/troubleshooting.md Current. Its nine owner-answers anchors match lib/result-codes-capy.ts and the anchor map in bin/gstack-doctor-components.sh.
changelog.d/owner-answers-record.md Reviewed only, because CHANGELOG fragments belong to the parent. It is consistent with the code.

Coverage debt: gstack-owner-answers has a reference page and a how-to (the pilot steps). No README.md or Captain guide (capy/skill/gstack/captain.md) links to it. That looks deliberate: it is a pilot, and shared guidance waits for the keep decision. It has no tutorial.

Diagram drift: none.

Tests
  • bun test test/owner-answers.test.ts: 26 pass, 0 fail
  • bun test test/troubleshooting-anchors.test.ts test/doctor-components.test.ts: 394 pass, 0 fail
  • bun run typecheck: clean; module-size ratchet: pass; gen:skill-docs --host all: no change
  • CI free-tests at d13d3f6 (run 44194489493): green; carried as the full suite
Agent notes
  • Refs GST-3025
  • Review: plan a8dd9c12 at full depth (money and security detected, user data declared). Pass 1: batched specialist reader and red team, 4 fixed. Fix-check 1 at ccd2de8: clean. Step 11: adversarial reader 6 notes, second-model reader 2 blocking. Fix-check 2 at d13d3f6 under grant a-5d7df31e8508 (Captain GStack Minder (GSTA-36): "Granted: one scoped fix-check at ccd2de8, within the $60 cap."): clean. Targeted money reader at d13d3f6: 1 note.
  • REVIEW_LOOP: passes=1 blocking_found=2 deferred=0 noted=10 fixed=6 scope=frozen fix_checks=2 dispatches=4
  • Gate edits: none detected (1 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
  • Plan: /autoplan run autoplan-kzoqvh-20261117210827, approved at gate_rev 3.
Approvals

Approved: yes (record r-53e6d9d26519). The full approval record stays private.
Plan: approved (record r-bd0b9372dba7)
Plan check: approved (record r-bd0b9372dba7)

Agent notes
{
  "schema_version": 1,
  "pr": 4467,
  "head": "d13d3f69d5acf80f10832853ad54dd14fcce9ee0",
  "version": "1.100.0.0",
  "base": "main",
  "gate": {
    "owner-answers": {
      "pass": 26,
      "fail": 0,
      "skip": 0
    },
    "result-codes": {
      "pass": 394,
      "fail": 0,
      "skip": 0
    }
  },
  "calls": 23,
  "session_kind": "unattended",
  "run": "ship-4467",
  "head_tree": "5e4228b28a8578d224c42d55f4cd6ae04a004987",
  "product_patch_id": "a248635209597903acb00f1246ba832dd0f5bb54",
  "gstack_version": "1.100.0.0",
  "review_depth": {
    "depth": "full",
    "class": "code",
    "runtime_lines": 602,
    "rules": "eea6cc4231b53b9e",
    "base": "fc5c285035b58ce0552d25cf7cb71749795b6d30",
    "registry": "fc5c285035b58ce0552d25cf7cb71749795b6d30",
    "gate_scan": {
      "tagged": 0,
      "head": "d13d3f69d5acf80f10832853ad54dd14fcce9ee0"
    },
    "reasons": [
      "risk:money",
      "risk:security",
      "risk:data",
      "runtime=602"
    ],
    "risk": [
      "money",
      "security",
      "data"
    ],
    "mode": "panel",
    "declared": [
      "data"
    ],
    "detected": [
      "money",
      "security"
    ]
  },
  "pregate": "requires-remote cleared @5e4228b28a85 (8 checks, current for d13d3f69d5ac)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/44194489493/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44194489493/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44192787381/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=5e4228b28a85 tests=37614 skipped=105 runs=44194489493/1 profiles=ci-reuse/free-tests heads=d13d3f69d5ac verified=2026-11-17T23:00:03.339Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and README.md (owner-answers reference, troubleshooting anchors, changelog fragment reviewed)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 2,
    "deferred": 0,
    "noted": 10,
    "fixed": 6,
    "scope": "frozen",
    "fix_checks": 2,
    "rounds": 3,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "money"
    ],
    "rules": "23eb808423669ba0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "a248635209597903acb00f1246ba832dd0f5bb54",
    "status": "done",
    "findings": 1,
    "raised_by": "targeted"
  }
}

garrytan and others added 3 commits November 17, 2026 22:11
… sending it (GST-3025)

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>
…arry limits

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

trunk-io Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot changed the title Let a Captain check an ask against the owner's earlier answers before sending it (GST-3025) Check a question against the owner's earlier answers before asking it again (GST-3025) Nov 17, 2026
garrytan and others added 2 commits November 17, 2026 22:31
… targets and agent names like other fields

Screen no longer proposes an older blanket yes when a newer or narrower matching answer can't be taken. --target must be one lower-case token, as the docs say. --words-by agent ids are length-capped, one line and secret-scanned. A second supersede or revoke of a row that is already replaced is refused instead of leaving the record unreadable.

Review-Finding: p1/specialist-batched#1 reader=testing
Review-Finding: p1/specialist-batched#2 reader=state-machines
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… row file whose write failed

Reads and writes now check that owner-answers/ and its rows/, verifications/ and log/ folders resolve inside the owner's Drive folder (or the record folder off Capy), before and after creating them. A write that fails after its file is created closes and removes the file, so the same add can be rerun instead of leaving the record unreadable.

Review-Finding: p3/outside-voice#1 reader=outside-voice
Review-Finding: p3/outside-voice#2 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 0b656a1 into main Nov 17, 2026
82 checks passed
This was referenced Nov 18, 2026
capy-ai Bot added a commit that referenced this pull request Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466)
- An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481)
- A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481)
- `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470)
- `revise --plan` with a different file now says the run follows that file. (#4470)
- A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471)
- The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460)
- A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456)
- A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451)
- /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458)
- A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458)
- A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458)
- A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473)
- /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461)
- /ship on Codex no longer stops at the test coverage audit. (#4489)
- A cold first-use check before an app build reaches its owner (GST-3025). (#4465)
- `skill_prefix=true` now survives updates when gbrain is installed. (#4454)
- The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454)
- `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454)
- /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464)
- /office-hours explains why it recommends a mode. (#4450)
- /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463)
- Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490)
- A Captain can check an ask against the owner's earlier answers before sending it. (#4467)
- `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488)
- GitHub release notes now list every change in plain words, with a link to its pull request. (#4390)
- gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442)
- /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469)
- /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472)
- A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479)
- The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457)
- A security finding's location and reason no longer go into a PR body. (#4486)
- The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487)
- A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485)
- A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452)
- /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474)
- A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440)
- One queued record with a malformed path no longer stops artifacts sync for every project. (#4455)
- A failed artifacts push stays reported until a push succeeds. (#4455)
- The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455)
- ### Tests (#4495)
- A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495)
- CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453)
- Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447)
- The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447)
- Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484)
- Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459)
- Two /autoplan runs started in the same second no longer share a run id. (#4459)

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