Skip to content

Install /captain only on Capy machines (GST-1833) - #4143

Merged
capy-ai[bot] merged 4 commits into
mainfrom
capy/crew-tools-load-on-capy-only-gst-1833
Nov 7, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
capy/crew-tools-load-on-capy-only-gst-1833

Conversation

@garrytan

@garrytan garrytan commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

/captain is now installed only on Capy machines. This starts gathering gstack's crew tools under a crew/ folder that loads only on Capy, so people who install gstack from the README get the product without the machinery our crews use, and Capy users still get all of it.

{
  "schema_version": 1,
  "pr": 4143,
  "head": "80e54f078cad0c6db16ac3be7938a9421897819e",
  "version": "1.98.0.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1632,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 42418739025,
      "attempt": 1,
      "tree": "00f939401d35534b8d1158dcce89e7b08877f67d"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "00f939401d35534b8d1158dcce89e7b08877f67d",
  "product_patch_id": "621dfd995e2816dd724ac6e6ade358ea278ea641",
  "gstack_version": "1.98.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 56,
    "rules": "c6a079fdf812f479",
    "base": "5f9b7ef2090757dbe5dcd3a3d57eff1ee5f6ed6f",
    "registry": "5f9b7ef2090757dbe5dcd3a3d57eff1ee5f6ed6f",
    "gate_scan": {
      "tagged": 0,
      "head": "80e54f078cad0c6db16ac3be7938a9421897819e"
    },
    "reasons": [
      "runtime=56"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @00f939401d35 (8 checks, current for 80e54f078cad)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/42418739025/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/42418739025/attempts/1",
    "windows-setup-e2e.yml/windows-setup: https://github.com/garrytan/gstack/actions/runs/42418739034/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/42418739059/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=00f939401d35 tests=36191 skipped=105 runs=42418739025/1 profiles=ci-reuse/free-tests heads=80e54f078cad verified=2026-11-07T22:10:53.029Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "README.md, crew/README.md and docs/ (docs/skills.md, docs/captain.md reviewed), plus AGENTS.md"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 0,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 3,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  }
}

What changed

Off Capy, gstack-relink no longer links /captain; other skills link as before

Off Capy, gstack-relink no longer links /captain; other skills link as before.

Before/after as text: Off Capy, gstack-relink no longer links /captain; other skills link as before
--- Before · before.txt · captured output
+++ After · after.txt · captured output
 $ gstack-relink   # a machine with no ~/.capy and no CAPY_MACHINE_CONFIG
+Relinked 2 skills as flat names
-Relinked 3 skills as flat names
 $ ls skills/
-captain
 review
 ship
  • Setup and gstack-relink register /captain only on a Capy machine. A Capy machine is one where CAPY_MACHINE_CONFIG is set or ~/.capy/system exists, the same test gstack-capy-install's bun shim and the update channel already use. gstack_on_capy and GSTACK_CREW_SKILLS live in bin/gstack-install-registry.sh beside the retired-skill list, and GSTACK_UNREGISTERED_SKILLS (retired skills, plus the crew skills off Capy) now feeds the same no-entry path retired skills take. Off Capy, /captain gets no entry on any host and an entry an earlier install made is removed; a user's own captain skill is left alone. On Capy nothing changes.
  • Agent harness registration follows the same rule. lib/harness-register.ts filters through unregisteredSkills() in scripts/discover-skills.ts (CREW_SKILLS, onCapyMachine), for both the Claude render and the generated host renders.
  • crew/README.md, a short "gstack on Capy" README section and a note in the skills guide say what Capy users get on top (Captains, the merge queue, receipts, spend caps) and how it loads.

Why

The crew tools should be an optional layer that loads only for Capy users, with minimal impact on everyone else. People who install gstack from the README no longer get a /captain skill they cannot use, and Capy machines keep it.

Blast radius

Only who gets the /captain entry: no command, path or other skill moves. The one known gap is the root router, which still lists /captain off Capy (see Review notes); a smoke run of gstack-relink off Capy confirmed the skill entry is gone and the other skills link as before (script ran).

Approvals

Approved: yes (record r-99e90e0c8eb1). The full approval record stays private: this repository is public or its visibility is unknown.
Plan: approved (record r-dade9f38e7ca)
Plan check: approved (record r-dade9f38e7ca)

Summary

Off a Capy machine, ./setup and gstack-relink now leave /captain out on every host and remove an entry an earlier install made, and the agent harness registrar does the same. A test checks the shell and TypeScript lists agree, the Capy test, relink on and off Capy, and both harness renders. The README, crew/README.md and the skills guide say the crew tools are Capy-only.

Test Coverage

Coverage audit (Step 7, audit-only under the tooling freeze): 5 of 8 changed paths tested before the review; the three gaps were all in sourceSkills (lib/harness-register.ts): the crew filter on the Claude render, the gstack- prefix strip and the host-render filter.
Tests: 1751 → 1751 test files (+0 new files); two tests added to test/crew-skills-on-capy.test.ts in review cover all three gaps (dots and Hermes renders, off and on Capy). Removing the prefix strip makes the new off-Capy test fail.
Test value: 0 tests written by the audit, 0 rejected by the authoring gate, 1 existing test extended, 0 paths weakly covered.

Pre-Landing Review

Pre-Landing Review: 2 issues — 1 auto-fixed, 1 asked (0 fixed, 1 skipped), 0 deferred, 0 noted
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=0 fixed=1 scope=frozen ledgers_read=3 dispatches=8
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)
Outside review: not run (the review plan skips the outside voice for code-class changes with no numeric claims). The native adversarial reviewer ran on the final code tree.

  • Fixed: lib/harness-register.ts:237 had no test (testing). Added two tests.
  • Skipped in this PR: SKILL.md:220 off Capy the root router still says "invoke /captain" while the skill has no entry. Raised by the red-team checklist and the adversarial reviewer and confirmed by a smoke run. Below the blocking floor (no test fails, nothing is lost; an agent's invoke finds no skill). Fixing it means re-rendering the router on every non-Capy install, which costs install time this PR keeps unchanged, so it is left for the owner with the planned Phase 2 router change.

Review notes

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

  • INFORMATIONAL SKILL.md:220 Off Capy the router still says invoke /captain while the skill has no entry (same defect as p1/specialist-batched#1). setup builds _DISABLED_CSV from the user's list only; gstack-relink re-renders the router only for the user's list; the Codex .agents render has the same gap.
  • INFORMATIONAL lib/harness-register.ts:237 sourceSkills decides crew skills from process.env and os.homedir(), not the opts.env/opts.home register() is given.
  • INFORMATIONAL scripts/discover-skills.ts:33 onCapyMachine uses fs.existsSync (true for a plain file) while bash gstack_on_capy uses -d; they disagree only if ~/.capy/system is a regular file.
  • INFORMATIONAL bin/gstack-install-registry.sh:361 A Capy machine without CAPY_MACHINE_CONFIG or $HOME/.capy/system (sudo, container, paired device) is read as non-Capy and loses /captain without a note. Product call on which machines count.
  • INFORMATIONAL setup:1446 Non-Claude host loops call _remove_disabled_host_entry, which removes any symlink named gstack-captain without checking it resolves into gstack; now runs automatically off Capy. A symlink only; its target is untouched.
  • INFORMATIONAL test/crew-skills-on-capy.test.ts:1 No test covers the router line off Capy or setup's non-Claude host removal path under the crew rule.

Exploratory QA

Smoke probes (report-only, run by the parent): gstack-relink in a fixture off Capy with the committed root router copied in: captain entry absent, router still names /captain (the skipped finding above). Before/after capture above: main links captain off Capy, this branch does not. The new test file passes on and off Capy (9 pass). QA's exploratory method files were not read for this run, so no wider charters ran.

Design Review

No frontend files changed — design review skipped.

Eval Results

No prompt-related files changed — evals skipped.

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches).

Verification Results

No Step 8.1 obligations (no plan file bound).

TODOS

No TODO items completed in this PR.

Documentation

Status: updated. One factual edit, no blockers.

Scope: base 5f9b7ef..eb1e616, 3 commits and 9 files. Nothing was staged, unstaged or untracked. The change makes /captain (the crew skills) register only on Capy machines.

Documentation health:

  • README.md: Current. The /captain row and the "gstack on Capy" section match the code.
  • crew/README.md: Current. It is new, and all its links resolve.
  • docs/skills.md: Updated. The /captain table row and section now say it is Capy-only and link to crew/README.md.
  • docs/captain.md: Current. It is a Capy-specific guide with no contradiction.
  • AGENTS.md: Current. It is a name index only.

Coverage debt: CAPY_MACHINE_CONFIG/~/.capy/system gating is reference-only (crew/README.md). docs/captain.md has no note that /captain installs only on Capy. There is no diagram drift.

Test plan

  • bun test test/crew-skills-on-capy.test.ts: 9 pass, 0 fail
  • Tests that read docs/skills.md (6 files): 411 pass, 0 fail
  • bun run typecheck and bun run typecheck:test (812 known diagnostics, none new)
  • Free suite: carried from CI at the pushed head (see the receipt)

Fresh install, non-Capy vs main

Clean user with no ~/.capy and no CAPY_MACHINE_CONFIG, git clone --depth 1 then ./setup --no-browser, main (5f9b7ef) and this branch at 440ca71, 10 runs each with the order reversed for the second five. The later commits add a test and a docs line only.

  • Time: main 10.29 s (sd 1.37), this branch 10.52 s (sd 1.33). The paired mean difference is +0.23 s, well inside the per-run spread, so there is no measurable difference.
  • Size: 1,368,513 KB vs 1,368,525 KB (+12 KB, the new crew/README.md).
  • Skills: main's list minus captain. The state root holds the same files; only installs.tsv differs by 3 bytes, the shorter branch path it records.
  • With a Capy marker (~/.capy/system), this branch installs the same 63 skills as main, captain included.
Agent notes

GST-1833 Phase 1, PR 1 of 2 (gate and skeleton; the leaf move follows, stacked as #4145). Approved by Garry in FOUN-32, 2026-11-07. Does not touch the release path. The router and llms.txt still mention /captain; the physical move of captain/ into crew/ needs the skill generator to discover crew/* and comes with Phase 2.

Fresh-install harness: /srv/fresh-install.sh as user plain with env -i, cloning bare repos whose branch is named main (a differently named branch makes setup treat the clone as a contributor checkout). Raw rows: ~/.capy/work/fresh-pr3.tsv and fresh-pr3-rev.tsv on GSTA-401's machine.

/ship run ship-4143 (GSTA-401 /ship subagent): gstack: ok 1.98.0.0 for=ship

Open in Capy

garrytan and others added 2 commits November 7, 2026 20:43
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>
@trunk-io

trunk-io Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

Review-Finding: p1/specialist-batched#2 reader=testing
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan added a commit that referenced this pull request Nov 7, 2026
Review-Finding: docs/designs/GSTACK_ON_CAPY.md:89:documentation reader=core
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>
capy-ai Bot added a commit that referenced this pull request Nov 7, 2026
…, and how Phase 2 will switch crew steps (GST-1833) (#4144)

* Record what a lighter gate for crew-only pull requests would have saved, and the switch for Phase 2 (GST-1833)

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

* Add changelog entry for the crew gate cost note (GST-1833)

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

* Say that the Capy-machine check the design note cites comes from #4143

Review-Finding: docs/designs/GSTACK_ON_CAPY.md:89:documentation reader=core
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>
@capy-ai
capy-ai Bot merged commit bb3b7d0 into main Nov 7, 2026
47 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