Skip to content

Say one open pull request per agent thread and never archive a thread that owns work, on the factory page (GST-2077) - #4213

Merged
capy-ai[bot] merged 2 commits into
mainfrom
keep-work-owned-in-factory-page-gst-2077
Nov 9, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
keep-work-owned-in-factory-page-gst-2077

Conversation

@garrytan

@garrytan garrytan commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

The factory page that every Capy session reads now says that each agent thread keeps one open pull request at a time, and that a thread is never archived while it still owns open work. These are two lessons from gbrain's merge queue, which reached 220 open pull requests.

What changed

  • Point 2 of capy/skill/gstack/factory.md adds "One open PR per lane; follow-ups ride it."
  • Point 12 now says a Captain archives only its crew's threads, "never one with an open PR or issue until a live successor holds it; a PR closes only as landed, superseded or dropped."
  • The page's byte budget in test/capy-skill-wrapper.test.ts moves from 3,475 to 3,650. The page is now 3,626 bytes, rounded up to the next 25 as the test's own comment asks.
  • A changelog fragment describes the change.
Before/after as text

Before, point 2 ended "...send one READY quoting gstack's verify output verbatim, and stop. The merge owner merges on green...". After, it carries "One open PR per lane; follow-ups ride it." between those sentences. Before, point 12 said "Its Captain archives only its crew's threads; threads outside every crew are the owner's". After, the archive clause adds the live-successor condition and the three close reasons.

Why

This is P1.4 of the GST-2077 plan, which Garry approved ("do it", autoplan run-20261109085029). Under its D3-A, the page is reworded inside the cap, and the cap rises only by the bytes the new rules need. The full rules landed in crew/docs/captain.md with #4204. This page is the short version every session reads, so it now matches that manual.

Blast radius

One prose page that every session reads, one budget constant in a test and one changelog fragment. No tool, prompt template, policy key or behavior changed. The page test checks that every citation and heading resolves, and it passes on the merged tree.

Approvals

Plan: approved (record r-fc2045beacde).

Agent notes

Focused checks: capy-skill-wrapper, parity-suite, prose-voice-floor, touchfiles and captain-skill, 147 pass and 0 fail. gen:skill-docs left the tree clean, and the sealed pregate found no policy.

Summary

Crews lost finished work when a thread was archived while it still held an open PR or issue, and parallel PRs from one lane piled up in the queue. This PR puts the two rules on the always-loaded factory page, inside a byte budget raised by 175 bytes.

Test Coverage

No new code paths, because the change is Markdown plus one test constant. The coverage audit did not run because no runtime file changed. The page's existing test covers the new size and the citations.

Pre-Landing Review

Pre-Landing Review: No issues found.
Gate edits: none detected (1 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

The one gate hunk read is the cap raise in test/capy-skill-wrapper.test.ts. The plan's D3-A decision, cited in the diff's comment, justifies it, and the new limit is the page's measured size rounded up to the next 25 bytes. The review ran at light depth (class tests, 0 runtime lines), so no specialist, red-team or outside voice was dispatched. It ran once at 3b75ce1, then again at 45e6e9e after main was merged in under the Captain's rule-19 grant.

Exploratory QA

Smoke check at 45e6e9e: the page's test passed (10 tests, 0 fail). A byte probe found the page at 3,626 of 3,650 bytes, with both new clauses and all 13 points present. Verdict: pass. There is no browser surface.

Design Review

No frontend files changed, so design review was skipped.

Eval Results

bun run eval:select selected no behavioral probes and no quality judges, so evals were skipped.

Scope Drift

Scope Check: CLEAN. The intent was the approved GST-2077 plan item P1.4, and the PR delivers exactly that: two clauses, the cap and a fragment.

Plan Completion

The plan completion audit did not run, because no docs/designs/ file is bound to this branch. The approved plan is record r-fc2045beacde, item P1.4.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. The docs already match the diff, so nothing was edited and nothing blocks.

Scope: base bfa36fe to head 45e6e9e. Three files changed: capy/skill/gstack/factory.md (point 2 now says one open PR per lane; point 12 says never archive a thread that holds an open PR or issue, and names the reasons a PR may close), its changelog fragment, and the byte-budget test in test/capy-skill-wrapper.test.ts. I checked cross-references in crew/docs/captain.md and capy/README.md.

Documentation health:

  • capy/skill/gstack/factory.md: current. Its rules match the archive-only-with-a-live-owner rule in crew/docs/captain.md, and the page is 3,626 bytes, under the 3,650 limit.
  • crew/docs/captain.md: current. It already holds both rules in full.
  • changelog.d/keep-work-owned-in-factory-page-gst-2077.md: current. Its claims are accurate; it was read only.
  • capy/README.md: current. No change is needed.

Coverage debt: none. The diff adds no new commands, flags or skills.

Diagram drift: none.

Test plan

  • Free tests carried from CI run 42617456367/1 at tree a2151fbf5ac0 (head 45e6e9e), green, tests=36831. Pregate passed on the final tree (8 checks).
  • Local lanes at tree a2151fbf5ac0: bun test test/capy-skill-wrapper.test.ts (62 pass) and bun test test/parity-suite.test.ts (2 pass).
Agent notes

Approvals

Approved: yes (record r-4c23b20d2ed4). The full approval record stays private.
Plan: approved (record r-fc2045beacde)
Plan check: approved (record r-fc2045beacde)
Main merged into this branch under the Captain's rule-19 grant (approval a-b088ac572cd2), so the docs audit could see #4204's crew/docs/captain.md. The first docs audit, at 3b75ce1, was blocked on the pre-#4204 line, and the second, at 45e6e9e, came back current.

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

Refs GST-2077

{
  "schema_version": 1,
  "pr": 4213,
  "head": "45e6e9e2c19419993a7b18a313fc4a472f7d20ca",
  "version": "1.98.0.0",
  "base": "main",
  "gate": {
    "wrapper": {
      "pass": 62,
      "fail": 0,
      "skip": 0
    },
    "parity": {
      "pass": 2,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "a2151fbf5ac03e4b0f95bb6777de34c0fedc0ad7",
  "product_patch_id": "48e33dd44e00b1b1c7b6a4256d814f1322553950",
  "gstack_version": "1.98.0.0",
  "review_depth": {
    "depth": "light",
    "class": "tests",
    "runtime_lines": 0,
    "rules": "66e5174161eecc2c",
    "base": "bfa36fe59354a5dc8d21e11ef64a011d30cbd959",
    "registry": "bfa36fe59354a5dc8d21e11ef64a011d30cbd959",
    "gate_scan": {
      "tagged": 0,
      "head": "45e6e9e2c19419993a7b18a313fc4a472f7d20ca"
    },
    "reasons": [
      "runtime=0"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "pass @a2151fbf5ac0 (8 checks, current for 45e6e9e2c194)",
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "README.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md, docs/, crew/, captain/templates/, capy/ (236 docs; 3 changed files)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 0,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 2
  }
}

Open in Capy

…n the factory page (GST-2077)

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

trunk-io Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@capy-ai capy-ai Bot changed the title Say one open PR per lane and never archive a thread that owns work, on the factory page (GST-2077) Say one open pull request per agent thread and never archive a thread that owns work, on the factory page (GST-2077) Nov 9, 2026
@capy-ai
capy-ai Bot merged commit 6473a17 into main Nov 9, 2026
52 of 54 checks passed
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