catherd-cli 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/README.md +144 -42
  2. package/catalog/ATTRIBUTION.md +12 -4
  3. package/catalog/models.json +8 -0
  4. package/package.json +1 -1
  5. package/plugin/.claude-plugin/plugin.json +1 -1
  6. package/plugin/.codex-plugin/plugin.json +11 -0
  7. package/plugin/.mcp-codex.json +10 -0
  8. package/plugin/bin/catherd-mcp +1 -1
  9. package/plugin/skills/catherd/SKILL.md +150 -79
  10. package/plugin/skills/catherd-setup/SKILL.md +24 -8
  11. package/src/adapters/access.ts +7 -1
  12. package/src/adapters/antigravity/index.ts +18 -3
  13. package/src/adapters/backend.ts +18 -2
  14. package/src/adapters/claude-code/index.ts +126 -14
  15. package/src/adapters/cli.ts +1 -64
  16. package/src/adapters/codex/events.ts +10 -0
  17. package/src/adapters/codex/index.ts +17 -5
  18. package/src/adapters/cursor/index.ts +7 -1
  19. package/src/adapters/grok/home.ts +75 -20
  20. package/src/adapters/grok/index.ts +27 -8
  21. package/src/adapters/opencode/index.ts +38 -1
  22. package/src/cli.ts +53 -19
  23. package/src/domain/agents.ts +3 -1
  24. package/src/domain/brief.ts +91 -0
  25. package/src/domain/calibration.ts +7 -0
  26. package/src/domain/catalog.ts +12 -1
  27. package/src/domain/changes.ts +23 -1
  28. package/src/domain/cost.ts +8 -3
  29. package/src/domain/errors.ts +4 -0
  30. package/src/domain/failover.ts +17 -5
  31. package/src/domain/gate-brief.ts +52 -0
  32. package/src/domain/hints.ts +13 -2
  33. package/src/domain/host.ts +17 -0
  34. package/src/domain/lane.ts +99 -3
  35. package/src/domain/notice.ts +14 -4
  36. package/src/domain/profile-rules.ts +129 -16
  37. package/src/domain/profile.ts +56 -5
  38. package/src/domain/record.ts +17 -2
  39. package/src/domain/reply.ts +29 -0
  40. package/src/domain/role-prompts.ts +56 -16
  41. package/src/domain/role-scope.ts +106 -0
  42. package/src/domain/role-tools.ts +34 -0
  43. package/src/domain/route.ts +73 -0
  44. package/src/domain/select.ts +177 -25
  45. package/src/domain/state.ts +5 -0
  46. package/src/domain/util.ts +22 -0
  47. package/src/domain/workspace.ts +130 -0
  48. package/src/entry/catalog-command.ts +18 -8
  49. package/src/entry/cli-kit.ts +17 -1
  50. package/src/entry/deps.ts +8 -3
  51. package/src/entry/doctor-command.ts +29 -2
  52. package/src/entry/host-arg.ts +56 -0
  53. package/src/entry/init-command.ts +20 -8
  54. package/src/entry/knowledge-command.ts +78 -3
  55. package/src/entry/lock-command.ts +111 -10
  56. package/src/entry/mcp/dispatch-tools.ts +3 -3
  57. package/src/entry/mcp/handshake.ts +8 -2
  58. package/src/entry/mcp/lane-tools.ts +55 -8
  59. package/src/entry/mcp/protocol-tools.ts +10 -4
  60. package/src/entry/mcp/push-tools.ts +16 -0
  61. package/src/entry/mcp/role-bin.ts +20 -0
  62. package/src/entry/mcp/role-server.ts +116 -0
  63. package/src/entry/mcp/run-tools.ts +25 -6
  64. package/src/entry/mcp/server.ts +224 -44
  65. package/src/entry/mcp/setup-tools.ts +11 -5
  66. package/src/entry/mcp/workspace-tools.ts +142 -0
  67. package/src/entry/pause-command.ts +67 -0
  68. package/src/entry/profile-command.ts +131 -16
  69. package/src/entry/role-cli-command.ts +115 -0
  70. package/src/entry/runs-command.ts +157 -11
  71. package/src/entry/supervise-command.ts +30 -3
  72. package/src/entry/tui/effects.ts +23 -8
  73. package/src/entry/tui/fixtures.ts +33 -10
  74. package/src/entry/tui/run.tsx +10 -4
  75. package/src/entry/tui/state.ts +56 -16
  76. package/src/entry/tui/stories.ts +11 -4
  77. package/src/entry/tui/views/profile-actions.ts +4 -2
  78. package/src/entry/tui/views/profiles.tsx +3 -3
  79. package/src/entry/tui/views/runs.tsx +66 -20
  80. package/src/entry/tui/views/save-dialog.tsx +8 -4
  81. package/src/entry/tui/views/status.tsx +6 -2
  82. package/src/entry/workspace-command.ts +44 -0
  83. package/src/infra/boot-lock.ts +25 -0
  84. package/src/infra/cli.ts +65 -0
  85. package/src/infra/codex-queue.ts +165 -0
  86. package/src/infra/delivery.ts +86 -0
  87. package/src/infra/dispatch-dir.ts +3 -0
  88. package/src/infra/env.ts +15 -2
  89. package/src/infra/git.ts +6 -0
  90. package/src/infra/heavy-lock.ts +93 -4
  91. package/src/infra/host-context.ts +58 -0
  92. package/src/infra/host-probe.ts +16 -0
  93. package/src/infra/lock-activity.ts +88 -0
  94. package/src/infra/login-env.ts +48 -0
  95. package/src/infra/paths.ts +35 -0
  96. package/src/infra/peer-inbox.ts +4 -1
  97. package/src/infra/role-mcp.ts +69 -0
  98. package/src/infra/sources/arena.ts +11 -3
  99. package/src/infra/sources/artificial-analysis.ts +8 -1
  100. package/src/infra/sources/cache.ts +2 -0
  101. package/src/infra/supervisor.ts +110 -18
  102. package/src/services/admission.ts +117 -26
  103. package/src/services/agent-links.ts +30 -5
  104. package/src/services/backends.ts +7 -0
  105. package/src/services/budget.ts +26 -6
  106. package/src/services/catalog-service.ts +20 -12
  107. package/src/services/credentials.ts +11 -6
  108. package/src/services/dispatch-service.ts +220 -22
  109. package/src/services/dispatches.ts +36 -3
  110. package/src/services/doctor-access.ts +8 -3
  111. package/src/services/doctor-backends.ts +30 -7
  112. package/src/services/doctor-checks.ts +20 -5
  113. package/src/services/doctor-docker.ts +221 -0
  114. package/src/services/doctor-push.ts +69 -90
  115. package/src/services/doctor-role-mcp.ts +65 -0
  116. package/src/services/doctor.ts +172 -38
  117. package/src/services/end-push.ts +157 -0
  118. package/src/services/finalize.ts +13 -3
  119. package/src/services/gate-env.ts +218 -0
  120. package/src/services/gate-service.ts +216 -45
  121. package/src/services/global-install.ts +46 -13
  122. package/src/services/lane-edit.ts +154 -0
  123. package/src/services/lane-service.ts +258 -52
  124. package/src/services/milestones.ts +137 -26
  125. package/src/services/notifier.ts +377 -72
  126. package/src/services/orchestrator-wait.ts +82 -0
  127. package/src/services/pause.ts +161 -0
  128. package/src/services/peek.ts +122 -23
  129. package/src/services/ports.ts +39 -4
  130. package/src/services/preflight.ts +153 -19
  131. package/src/services/profile-service.ts +117 -30
  132. package/src/services/profile-store.ts +31 -7
  133. package/src/services/protocol.ts +119 -25
  134. package/src/services/provenance.ts +16 -12
  135. package/src/services/questions.ts +15 -0
  136. package/src/services/reconcile.ts +22 -1
  137. package/src/services/reentry.ts +7 -6
  138. package/src/services/role-access.ts +27 -0
  139. package/src/services/routing-service.ts +150 -37
  140. package/src/services/run-debug.ts +98 -4
  141. package/src/services/run-pin.ts +125 -0
  142. package/src/services/run-service.ts +153 -19
  143. package/src/services/run-store.ts +119 -19
  144. package/src/services/runs-page.ts +45 -9
  145. package/src/services/scratch.ts +60 -0
  146. package/src/services/session-view.ts +18 -13
  147. package/src/services/sessions.ts +34 -16
  148. package/src/services/setup.ts +31 -10
  149. package/src/services/source-derive.ts +28 -5
  150. package/src/services/source-sync.ts +9 -2
  151. package/src/services/standins.ts +40 -6
  152. package/src/services/state.ts +21 -0
  153. package/src/services/summary.ts +86 -11
  154. package/src/services/treat-likes.ts +41 -12
  155. package/src/services/verifier-brief.ts +23 -0
  156. package/src/services/verifier-step.ts +48 -0
  157. package/src/services/workspace-admission.ts +267 -0
  158. package/src/services/workspace-service.ts +254 -0
  159. package/src/services/workspace-store.ts +95 -0
package/README.md CHANGED
@@ -6,19 +6,18 @@
6
6
  (")(")
7
7
  ```
8
8
 
9
- Autopilot builds from your own Claude Code session. Claude plans and verifies, Codex, opencode, Cursor, Grok Build,
10
- Antigravity or headless Claude Code workers write the code, and [Jev](https://typesafe.ai) picks the model and effort for each piece
9
+ Autopilot builds from your own Claude Code or native Codex session. Your profile routes the architect, verifier and workers to their backends; Codex, opencode, Cursor, Grok Build,
10
+ Antigravity or headless Claude Code processes write the code, and [Jev](https://typesafe.ai) picks the model and effort for each piece
11
11
  of work, climbing a ladder only when a cheaper rung falls short.
12
12
 
13
13
  - **Your harness, as you set it up.** Every role runs in its vendor's own CLI with your config,
14
14
  hooks, skills and `AGENTS.md`. Isolation is an opt-in toggle per profile and harness, for when
15
15
  you'd rather save the tokens your customizations cost.
16
- - **Claude roles stay native.** `claude:` rungs run as ordinary Claude Code subagents; Codex,
16
+ - **Claude roles stay native on Claude Code.** `claude:` rungs require that host and run as ordinary Claude Code subagents; Codex,
17
17
  opencode, Cursor, Grok Build, Antigravity and headless `claude-code:` rungs run through catherd's MCP server.
18
18
  - **Survives restarts.** Workers are detached processes writing straight to disk, so a dropped
19
19
  MCP server never loses a run.
20
- - **Results come to you.** Roles run side by side while you keep talking to Claude; each one that finishes
21
- arrives in the session as a message, like a native subagent's notice, and `peek` shows how a run stands.
20
+ - **Results come to you.** Roles run side by side while you keep talking. Claude Code uses its peer inbox; Codex uses queued next input through its existing native server. A busy Codex conversation processes it after the active turn. Queue acceptance and result collection are separate; `peek` shows how a run stands.
22
21
  - **A protocol the tools enforce.** Every lane is routed, every brief ends with the reply contract, and a
23
22
  milestone lands only after a reviewer and a verifier passed it. Workers can run their own checks (network,
24
23
  loopback, Docker, the lock dir); an owner question parks one milestone, not the run.
@@ -28,7 +27,7 @@ of work, climbing a ladder only when a cheaper rung falls short.
28
27
  ## Requirements
29
28
 
30
29
  - [Bun](https://bun.sh) ≥ 1.4
31
- - [Claude Code](https://claude.com/claude-code) (desktop app or CLI)
30
+ - An orchestration host: [Claude Code](https://claude.com/claude-code), or native [Codex](https://github.com/openai/codex) CLI/Desktop with plugin support and the existing native queue endpoint (installed CLI 0.159.2 verified for packaging; queue support is feature-detected)
32
31
  - At least one worker backend, logged in:
33
32
  - [Codex CLI](https://github.com/openai/codex) 0.157.0 or newer
34
33
  - [opencode](https://opencode.ai) **v2**, 2.0.16 or newer: `curl -fsSL https://opencode.ai/v2/install | bash`
@@ -47,7 +46,7 @@ of work, climbing a ladder only when a cheaper rung falls short.
47
46
 
48
47
  `catherd doctor` checks each backend's version and login and prints the fix for anything missing. The default
49
48
  profile runs its workers on Codex; without Codex, doctor's fix also names how to move those roles to a backend
50
- you have (`/catherd-setup` in Claude Code, or `catherd profile set roles.<role>.rungs <rung>`).
49
+ you have (`/catherd-setup`, or `catherd profile set roles.<role>.rungs <rung> --host <codex|claude-code>`). Codex-only setup does not require or configure Claude; enabled selected roles and reachable failover decide optional dependencies. Doctor sends nothing by default; `--test-push` is an explicit smoke send from a validated host session (`--thread <uuid>` names the Codex thread from a shell; inside a session, the `test_push` tool does the same).
51
50
 
52
51
  ### Cursor
53
52
 
@@ -93,7 +92,9 @@ grok keeps a session on the access it started with, so catherd refuses to resume
93
92
  An Antigravity rung names the model `agy models` lists, without an effort suffix; the effort is agy's `--effort`
94
93
  (`low`, `medium`, `high` or `max`), and `#default` passes none: `antigravity:gemini-3.8-flash#low`. No profile uses
95
94
  Antigravity until you put a rung on it. catherd never runs `agy -p` while agy is signed out, since agy would open a
96
- browser and wait; `catherd doctor` says so, with the fix. A Google login draws on your plan's quota (doctor shows
95
+ browser and wait; `catherd doctor` says so, with the fix. A sign-in check that passed is kept for 10 minutes, so
96
+ after you sign agy out, restart the catherd MCP server (or wait those minutes) before the next Antigravity dispatch.
97
+ A Google login draws on your plan's quota (doctor shows
97
98
  what is left); `GEMINI_API_KEY` bills the Gemini API project. Gemini rungs fail over between Antigravity and Cursor
98
99
  when either runs out, unless your profile names another stand-in.
99
100
 
@@ -111,14 +112,21 @@ route is the one meant for automation; check the terms before you rely on a plan
111
112
 
112
113
  ## Install
113
114
 
115
+ catherd runs from Claude Code or, since 1.4, from native Codex; one global `catherd` and one plugin version serve both. To check a packaged build before you rely on it, follow the [local packaged acceptance procedure](docs/dev/live-verification.md#14-native-codex-packaging-and-completion-acceptance); a matching version alone does not prove that the feature core ran.
116
+
117
+ ### Claude Code
118
+
114
119
  ```sh
115
120
  bun add -g catherd-cli
116
- catherd init
121
+ catherd init --host claude-code
117
122
  ```
118
123
 
119
- The npm package is `catherd-cli`; the command it installs is `catherd`. `bunx catherd-cli init` works too: `init`
124
+ The npm package is `catherd-cli`; the command it installs is `catherd`. `bunx catherd-cli init --host claude-code`
125
+ works too (a terminal with no host evidence cannot pick the architect/verifier defaults, so name the host): `init`
120
126
  installs the global command at its own version (`--no-global` skips it) and says `installing catherd…` before
121
- it does, though the first `bunx` resolve itself prints nothing for up to half a minute. `init` asks for the
127
+ it does, though the first `bunx` resolve itself prints nothing for up to half a minute: bunx fetches about a
128
+ hundred packages before catherd's first line, TypeScript among them (a peer dependency of OpenTUI's native
129
+ layer, which Bun installs), so `bun add -g catherd-cli` first is the quicker start. `init` asks for the
122
130
  optional Jev key and the optional Artificial Analysis key, syncs the public model sources, writes the default
123
131
  profile and links its Claude agents, lists your backends' models, and ends with a readiness report (`--no-input`
124
132
  asks nothing and keeps what exists; `--profile <name>` sets up and activates that profile instead of `default`;
@@ -132,41 +140,84 @@ claude plugin install catherd@catherd
132
140
  ```
133
141
 
134
142
  Start a new Claude Code session so the plugin, its MCP server and the agent files load, then check with
135
- `catherd doctor`. Run it once from inside that session too (ask Claude to run `catherd doctor`): its `push` row
136
- then checks that finished roles can reach the session.
143
+ `catherd doctor --host claude-code`. From inside that session, explicit `catherd doctor --test-push` sends a labeled smoke notice; inspect actual processing separately from transport acceptance.
144
+
145
+ ### Native Codex
146
+
147
+ ```sh
148
+ bun add -g catherd-cli
149
+ catherd init --host codex
150
+ codex plugin marketplace add 47vigen/catherd
151
+ codex plugin add catherd@catherd
152
+ codex mcp list --json
153
+ ```
154
+
155
+ Restart the Codex host to load the installed shared skills and server. Native CLI accepts `owner/repo[@ref]` and a local marketplace path. The supported marketplace uses `.claude-plugin/marketplace.json` with its plugin subdirectory; the native manifest is `plugin/.codex-plugin/plugin.json`, with `skills: "./skills/"` and `mcpServers: "./.mcp-codex.json"`. Installed native resolution supplies `command: "sh"`, `args: ["./bin/catherd-mcp"]`, `cwd: <installed plugin root>` and `CATHERD_ORCHESTRATION_HOST=codex`. No Claude root macro or synthetic session ID belongs in that declaration. The shared launcher/core remains versioned together with both manifests.
156
+
157
+ Pass the actual project `repo` to repository-aware MCP profile/setup/catalog calls, because the server cwd is the plugin root. `run_start(repo, ...)` already requires it. Terminal `init` and `doctor` accept `--host codex|claude-code|auto`; selecting a terminal host chooses setup checks without inventing a conversation owner.
137
158
 
138
159
  ## Use
139
160
 
140
- In Claude Code:
161
+ In either supported host, use the installed shared skills through that host's skill invocation and tool discovery:
141
162
 
142
163
  - `/catherd <task>` runs a task on autopilot; `/catherd` alone resumes the latest run. While it runs, keep
143
- talking: each finished role arrives as a message from catherd, and "how is it going?" gets a `peek`.
164
+ talking: completion arrives through the host's transport, and "how is it going?" gets a `peek`.
144
165
  - `/catherd-setup` tunes your profile in conversation: which models and efforts each role may
145
166
  use, cost or speed, isolation, budget and failover.
146
167
 
168
+ `route` chooses the backend for every role. Native `claude:` uses Claude Code's `Agent` and `record_agent_run` only on Claude Code; process backends, including Codex architect/verifier, use `dispatch` followed by `result`. Omitted Codex architect/verifier choices are exactly `codex:gpt-6.1-sol#high` / `codex:gpt-6.1-sol#low`; omitted Claude choices retain their existing native defaults. Verify that exact model ID against native catalog discovery and validation; if spelling differs, resolve the mismatch explicitly with the owner, never silently normalize or substitute, and retain high/low efforts. Explicit ladders and materialized profiles are preserved, without silently converting `claude:` to `claude-code:`. To opt into host defaults, review and save the narrow reset:
169
+
170
+ ```sh
171
+ catherd profile reset-host-defaults <profile> --host codex --preview --json > /tmp/catherd-host-defaults-review.json
172
+ # Review the diff, effective defaults, errors and warnings.
173
+ catherd profile reset-host-defaults <profile> --host codex --expect /tmp/catherd-host-defaults-review.json --json
174
+ ```
175
+
176
+ It removes only architect/verifier `rungs` and `defaultRung`; every other setting stays intact. Run profile CLI commands from the project directory and choose the actual profile name. Use `--host claude-code` for Claude defaults.
177
+
178
+ Completion never uses `await_results` or model polling. Codex sends through `codex queue --remote unix://` to the validated original thread: idle wake and ordered busy follow-up are the native semantics, without Claude's urgent tool-round priority. A receipt proves queue acceptance, not observed generation or collection; unloaded/interrupted hosts may retain input. Only `result` collects the actual stored record. Explicit `peek(run)` adopts the run for the current host/session; `status` and `result` do not. Unknown/conflicting identity never owns or pushes.
179
+
180
+ When a role ends, its own supervisor also queues the notice to a Codex owner's thread, under the same receipt as the server's push, so a thread whose MCP server Codex has stopped still hears, and nothing arrives twice. Run a Codex coordinator inside `tmux` (or `screen`): Codex stops a thread's MCP servers once no client is attached, and the queued input waits for the next attach. Every catherd message names the role's `thread:`; resume it with `dispatch(…, thread: "latest")` under the same name.
181
+
182
+ Roles get catherd's tools too. Headless Codex and Claude Code roles get a `catherd_role` MCP server, isolated or not, without any change to your config; roles on other backends run `catherd run-file read|write <run> <path>` and `catherd gate check|pass <run> …` from their shell, bound to their own run and to their role's tools: every role may read run files, only the architect and researcher write them, and only the verifier runs `gate check|pass` (anything else is `E_ROLE_SCOPE`). The coordinator tools (`dispatch`, `result`, `land`, `climb`, `peek` of another role, `run_start`, `park`, `answer`, `cancel`, `set_next`, `profile_set`, `test_push`, `run_pin`, `lane_set`, `owns_add`, `record_agent_run` and the workspace writers) are the orchestrator's: a role's process gets `E_ROLE_SCOPE` for them, so a role can never take the run over.
183
+
184
+ Recover unread work with `peek` and `result`. Accepted or ambiguous attempts are not automatically resent. When ambiguity needs a deliberate retry, run from the current owner's validated host session:
185
+
186
+ ```sh
187
+ catherd runs retry-push <run> <name> --event '<exact event ID from peek/status>' --acknowledge-possible-duplicate
188
+ ```
189
+
190
+ This acknowledges possible duplicate native input; an accepted receipt still suppresses a repeat for that owner/event. Without a supported history reconciliation API, retain ambiguity until an explicit decision. Notices preserve all event IDs, including coalesced events; repeated input means idempotent reads, never another dispatch or landing. Stored records and independent reviewer/verifier gates are authoritative. Profile notification moments use an available host facility, without inventing a Codex notification tool or scheduled wake.
191
+
147
192
  In a terminal:
148
193
 
149
- | Command | What it does |
150
- | ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
151
- | `catherd` | The dashboard: Status, Profiles and Runs (below) |
152
- | `catherd init [--no-input] [--no-global] [--profile <p>]` | First-run setup; installs the global `catherd` at its own version unless `--no-global` |
153
- | `catherd doctor [--json]` | Readiness report, one row per check with its fix; exits 3 when not ready |
154
- | `catherd profile list\|show\|use [--repo]\|new [--from <p>]\|copy\|rm\|diff\|validate` | Profiles; `use --repo` binds one to the repo you are in |
155
- | `catherd profile use --repo --clear` | Unbinds the repo you are in; it runs on the active profile again |
156
- | `catherd profile set <path> <value> [--profile <p>]` | One field, e.g. `roles.verifier.access read-only`, `roles.worker.network false`, `budget.usd 20` |
157
- | `catherd status [run]`, `catherd watch [--once] [--interval <s>]` | Where runs stand, grouped by the Claude Code session that drove them |
158
- | `catherd runs list [--repo <path>]\|show <id> [--debug [--name <n>]]\|cancel <id> <name>` | Past runs, by session; `--debug` adds exit.json and the stderr and event tails, `--name` one role's |
159
- | `catherd catalog refresh\|list [--backend <b>] [--role <r>] [--text <t>] [--scored]` | The models catherd can place, filtered |
160
- | `catherd catalog sync [--force] [--unmatched]` | Fetches the public model facts and scores now (below); `--unmatched` lists ids no model matched |
161
- | `catherd catalog treat-like <rung> <like>` | Scores an unscored rung as a scored one |
162
- | `catherd catalog treat-like --suggest <rung>\|--clear <rung>\|--reset` | The three nearest stand-ins for a rung; removes one or every mapping of yours |
163
- | `catherd knowledge show\|add "<line>"\|path [--repo <path>]` | The repo's knowledge.md, which new runs read; `add` appends a fact of yours, marked "by hand" |
164
- | `catherd lock [--slots N] -- <cmd>` | Runs a heavy command behind the machine-wide semaphore, in its own session (no /dev/tty) |
165
- | `catherd mcp` | The MCP server on stdio; the plugin starts it, you never need to |
166
- | `catherd capture-fixtures [--backend <b>] [--out <dir>]` | Contributors: records sanitized test fixtures from real runs (see CONTRIBUTING.md) |
194
+ | Command | What it does |
195
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
196
+ | `catherd` | The dashboard: Status, Profiles and Runs (below) |
197
+ | `catherd init [--host codex\|claude-code\|auto] [--no-input] [--no-global] [--profile <p>]` | First-run setup; installs the global `catherd` at its own version unless `--no-global` |
198
+ | `catherd doctor [--host codex\|claude-code\|auto] [--test-push [--thread <uuid>]] [--docker] [--json]` | Readiness and capability report; no send unless explicit smoke; `--docker` probes a compose network and the Docker disk; exits 3 when not ready |
199
+ | `catherd profile list\|show\|use [--repo]\|new [--from <p>]\|copy\|rm\|diff\|validate` | Profiles; `use --repo` binds one to the repo you are in |
200
+ | `catherd profile use --repo --clear` | Unbinds the repo you are in; it runs on the active profile again |
201
+ | `catherd profile set <path> <value> [--profile <p>]` | One field, e.g. `roles.verifier.access read-only`, `roles.worker.network false`, `budget.usd 20` |
202
+ | `catherd status [run]`, `catherd watch [--once] [--interval <s>]` | Where runs stand, grouped by host and session; read-only ownership |
203
+ | `catherd runs list [--repo <path>]\|show <id> [--debug [--name <n>]]\|cancel <id> <name>` | Past runs, by session; `--debug` adds exit.json and the stderr and event tails, `--name` one role's |
204
+ | `catherd runs clean [<id>]` | Removes the roles' scratch folders (each role's `$TMPDIR`) of runs with no live role |
205
+ | `catherd catalog refresh\|list [--backend <b>] [--role <r>] [--text <t>] [--scored]` | The models catherd can place, filtered |
206
+ | `catherd catalog sync [--force] [--unmatched]` | Fetches the public model facts and scores now (below); `--unmatched` lists ids no model matched |
207
+ | `catherd catalog treat-like <rung> <like>` | Scores an unscored rung as a scored one |
208
+ | `catherd catalog treat-like --suggest <rung>\|--clear <rung>\|--reset` | The three nearest stand-ins for a rung; removes one or every mapping of yours |
209
+ | `catherd knowledge show\|add "<line>"\|path [--repo <path>]` | The repo's knowledge.md, keyed by its git origin (its toplevel when it has none), which new runs read; `add` appends a fact of yours, marked "by hand" |
210
+ | `catherd knowledge env set NAME=value\|NAME --from VAR`, `env rm NAME`, `env list` | The repo's gate environment, which the verifier and preflight run with; a secret by reference only |
211
+ | `catherd runs supersede <id> --by <id>`, `catherd runs pin <id>` | Closes a run with a pointer to the one that took over; re-pins a run to the repo's profile now |
212
+ | `catherd pause --machine\|--workspace <id> "<reason>"`, `catherd resume --machine\|--workspace <id>` | Pauses every run on the machine (or in a workspace) on one blocker; dispatch is refused until resume |
213
+ | `catherd lock [--slots N] [--role verifier [--run <id>]] -- <cmd>` | Runs a heavy command behind the machine-wide semaphore, in its own session (no /dev/tty); `--role verifier` keeps two runs' verifiers apart |
214
+ | `catherd run-file read\|write <run> <path>` | A run's plan, lanes and notes (`write` reads stdin); in a role, its own run only |
215
+ | `catherd gate check <run> [--item <i> --command <c> --paths <p,…>] [--milestone <M>]`, `catherd gate pass <run> --item <i> --command <c> --paths <p,…> --evidence <e>` | A verifier's gate evidence, as `gate_check`/`gate_pass`; in a role, its own run only |
216
+ | `catherd mcp` | The MCP server on stdio; the plugin starts it, you never need to |
217
+ | `catherd capture-fixtures [--backend <b>] [--out <dir>]` | Contributors: records sanitized test fixtures from real runs (see CONTRIBUTING.md) |
167
218
 
168
219
  A profile command without a profile name (`show`, `set`, `diff`, `validate`), like the MCP profile tools, acts
169
- on the profile the repo you are in runs on: the one bound to it, else the active one. Run them as
220
+ on the profile the repo you are in runs on: the one bound to it, else the active one. Pass `repo` explicitly to MCP tools; profile CLI commands accept `--host` for effective defaults. Run them as
170
221
  `bunx catherd-cli <command>` when catherd is not installed globally. Every read command takes `--json`; a bare `catherd runs` is `catherd runs list`. Exit codes: 0 ok, 1 error, 2 usage, 3 not ready, 130 interrupted; an error prints
171
222
  `error E_CODE: message` and a `fix:` line. `--verbose` (or `CATHERD_LOG=debug`) logs more to
172
223
  `~/.local/share/catherd/logs/`, kept for 7 days with secrets redacted. The dashboard takes `--plain` (ASCII, no colour)
@@ -174,7 +225,7 @@ and `--reduced-motion`; `doctor` and `init` take `--plain` for ASCII glyphs too.
174
225
 
175
226
  Model facts and scores also come from public sources: models.dev, OpenRouter, LiteLLM, Arena (LMArena), Vectara's
176
227
  hallucination leaderboard and Epoch AI, plus Artificial Analysis when you give `catherd init` a free key. The MCP
177
- server syncs them in the background when a Claude Code session starts (each source at most every 12 hours, never
228
+ server syncs them in the background when a host session starts (each source at most every 12 hours, never
178
229
  delaying the session), `init` syncs them, and `catherd catalog sync` (or the `catalog_sync` tool) does it on demand.
179
230
  Each answer is kept in `~/.local/share/catherd/sources/`; a source that fails keeps its last good answer, and with no
180
231
  network and no sync at all catherd routes on the scores it ships. Those are the keyless sources' values, refreshed
@@ -185,15 +236,59 @@ A lane's kind and difficulty pick a bar: a threshold on each dimension it spans
185
236
  `honesty`, `agentic`, `frontend`; `steer` is shown but has no default bar), and the lane starts on the cheapest
186
237
  rung that clears them all. A rung with no value on a dimension takes its nearest stand-in's as `inferred`, and
187
238
  `profile validate` and `doctor` list it as a "stand-in to confirm": confirm or replace it with `catherd catalog
188
- treat-like --suggest <rung>`, then `treat-like <rung> <like>`. `route` says, for the rung it picks, each threshold,
189
- the value used, its confidence and source, and catherd's own runs on it ("12 lanes, 2 climbed, 1 partial"), which
190
- it shows but never routes on. A bar of your own goes in `~/.config/catherd/catalog.override.json`, per dimension
239
+ treat-like --suggest <rung>`, then `treat-like <rung> <like>`. A ladder holds only rungs at least as strong as its
240
+ start, and rungs of equal scores on two quotas start on the one the run has used least. `route` returns the rung,
241
+ its ladder and a one-line why (a lane's declared `Kind:`/`Difficulty:` wins over Jev, and the why says when Jev
242
+ disagreed, when no rung clears the bar, or when a tie decided); the run's `routes.jsonl` keeps every role's
243
+ decision with, for the rung it picks, each threshold, the value used, its confidence and source, and catherd's own
244
+ runs on it ("12 lanes, 2 climbed, 1 partial"), which it shows but never routes on. A bar of your own goes in `~/.config/catherd/catalog.override.json`, per dimension
191
245
  (`"bars": { "ui": { "hard": { "frontend": 1700, "honesty": null } } }`: a number sets a threshold, `null` removes
192
246
  the default's).
193
247
 
194
248
  Run data lives in `~/.local/share/catherd/`, config in `~/.config/catherd/` (both follow
195
249
  `XDG_*`).
196
250
 
251
+ ### Coordinating several repositories
252
+
253
+ A workspace can be a plain directory containing independent Git repositories. Declare its members explicitly
254
+ in `catherd.workspace.json`; catherd does not scan neighboring folders:
255
+
256
+ ```json
257
+ {
258
+ "schema": 1,
259
+ "repos": { "api": "./api", "web": "./web" }
260
+ }
261
+ ```
262
+
263
+ Run `catherd workspace inspect /path/to/workspace --json` to check the resolved members. Through MCP,
264
+ `workspace_start` takes `root`, `title`, `a_lines`, and `steps`: each step has `id`, a member `repo`, `title`,
265
+ `a_lines`, optional `depends_on` step ids, and the `milestone` that releases its dependents (default `M1`).
266
+ A step with `release: "merge"` and a `base` ref (`origin/main`) releases them only once its landed commit is
267
+ an ancestor of that ref (`git merge-base --is-ancestor`), checked when a dependent asks; fetch first, nothing
268
+ is polled.
269
+ An explicit `repos` map can replace the manifest. Only members used by the steps enter the run snapshot.
270
+ Steps reusing one member must be ordered by dependencies. A final verification step can reuse a member
271
+ after both parallel producer steps land; unordered steps in the same repository are refused.
272
+
273
+ Write the shared interface or coordination agreement with `workspace_contract(workspace, content)` before
274
+ starting children; the first child freezes it, and every child receives `workspace-contract.md`.
275
+ `workspace_child_start(workspace, step)` creates a single-repo run only when its prerequisites have landed.
276
+ Use the existing route, dispatch, verification and land workflow with that child's run id. Each member keeps
277
+ its own profile, knowledge and repository rules; workers write within their own repository.
278
+
279
+ `workspace_status(workspace)` and `catherd workspace status <id> --json` show the shared view and spending.
280
+ The optional workspace `budget` (`minutes`, `tokens`, `usd`; no cap unless given, minutes from the first
281
+ child) stops new admissions when aggregate observed spending reaches its cap, alongside each child's budget;
282
+ `workspace_budget(workspace, …)` raises it. Running workers may overshoot; native subagent usage is reported
283
+ after execution. Dependency readiness requires a recorded landing and finalized dispatches, not just a
284
+ finished worker. Landing a step's completion milestone and dispatch admission share the parent lock; other
285
+ milestones land freely, and a landed step admits a post-land fix. `workspace_pause(workspace, reason)` stops
286
+ every child's admission on one blocker until `workspace_resume`. Workspaces support at most 100 repositories
287
+ and 100 steps. A run folder without a readable `meta.json` is skipped and named in `workspace_status`; with a
288
+ cap set, unreadable or negative usage evidence blocks admission until repaired. Stored status remains available after a checkout disappears, while child
289
+ recovery and admission require the captured Git root. catherd never automatically commits, pushes,
290
+ rolls back repositories or starts the next child.
291
+
197
292
  ### Environment variables
198
293
 
199
294
  | Variable | What it does |
@@ -219,7 +314,7 @@ tests (CONTRIBUTING.md has the rest).
219
314
 
220
315
  `catherd` opens three tabs: **1 Status** (every check with its fix; `y` copies the fix, `r` checks again),
221
316
  **2 Profiles** (one tree per profile: roles with their access, default rung, models and efforts, then routing,
222
- harness, budget, failover, timeouts and notify) and **3 Runs** (the Claude Code sessions that drove your runs, newest
317
+ harness, budget, failover, timeouts and notify) and **3 Runs** (the host sessions that drove your runs, newest
223
318
  first; a session opens on its runs, their milestones and every role with its rung, status, time and last event, live
224
319
  ones first; a milestone opens on its digest (what landed, lanes and climbs, reviewer and verifier, tokens); a role
225
320
  opens on its brief, reply and record; the open screen redraws as run files change; `esc` goes back,
@@ -244,6 +339,12 @@ opens on its brief, reply and record; the open screen redraws as run files chang
244
339
 
245
340
  ## Upgrading
246
341
 
342
+ From 1.4: `bun add -g catherd-cli@latest && catherd doctor`, update the plugin and start a new session; `doctor`
343
+ names the Claude agent links to refresh. There is still no `wait` tool (it never shipped and is gone): end the
344
+ turn, and on Codex run the coordinator inside `tmux`. A role calling a coordinator tool now gets `E_ROLE_SCOPE`,
345
+ knowledge is keyed by the git origin, and `route` returns seven keys with the rest in `routes.jsonl`.
346
+ [MIGRATION.md](MIGRATION.md), "From 1.4 to 1.5", has the rest.
347
+
247
348
  From 1.0: install 1.1 and run its `init` (`bun add -g catherd-cli@latest && catherd init`, or
248
349
  `bunx catherd-cli@latest init`; 1.0's own `catherd init` does not upgrade), update the plugin
249
350
  (`claude plugin marketplace update catherd && claude plugin update catherd@catherd`) and start a new Claude Code
@@ -264,10 +365,11 @@ Code session. The details are in [MIGRATION.md](MIGRATION.md).
264
365
 
265
366
  | Where | What |
266
367
  | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
267
- | [MIGRATION.md](MIGRATION.md) | Upgrading from 1.0 and from 0.x |
368
+ | [MIGRATION.md](MIGRATION.md) | Upgrading from each release to the next, and from 0.x |
268
369
  | [CHANGELOG.md](CHANGELOG.md) | Releases |
269
370
  | [CONTRIBUTING.md](CONTRIBUTING.md) | Development setup, the checks, commits, changesets, live tests |
270
371
  | [SECURITY.md](SECURITY.md) | Reporting a vulnerability; what catherd stores and how |
372
+ | [`docs/specs/2026-10-02-catherd-1.5-design.md`](docs/specs/2026-10-02-catherd-1.5-design.md) | The 1.5 design (binding where it differs from the earlier ones) |
271
373
  | [`docs/specs/2026-09-28-catherd-1.1-design.md`](docs/specs/2026-09-28-catherd-1.1-design.md) | The 1.1 design (binding; builds on 1.0's) |
272
374
  | [`docs/specs/2026-09-25-catherd-1.0-design.md`](docs/specs/2026-09-25-catherd-1.0-design.md) | The 1.0 design |
273
375
  | [`docs/dev/`](docs/dev/) | Maintainer docs: live verification, manual tests, dependencies, ideas |
@@ -278,8 +380,8 @@ Code session. The details are in [MIGRATION.md](MIGRATION.md).
278
380
 
279
381
  ## Contributing
280
382
 
281
- See [CONTRIBUTING.md](CONTRIBUTING.md). CI runs the checks on Linux and macOS, on Bun 1.4.0 and the latest Bun;
282
- what CI cannot run is in [`docs/dev/live-verification.md`](docs/dev/live-verification.md). Report security issues
383
+ See [CONTRIBUTING.md](CONTRIBUTING.md). CI runs the checks on every pull request on Linux and macOS, with Bun 1.4.0 and the latest Bun (the full matrix nightly);
384
+ live verification is in [`docs/dev/live-verification.md`](docs/dev/live-verification.md). Report security issues
283
385
  privately, as [SECURITY.md](SECURITY.md) describes. Everyone taking part follows the
284
386
  [Code of Conduct](CODE_OF_CONDUCT.md).
285
387
 
@@ -1,7 +1,8 @@
1
1
  # Attribution for the shipped catalog data
2
2
 
3
3
  `catalog/scores.json` carries model scores from public sources. Each value names its source (`source`), the page
4
- it came from (`url`), its date and its confidence. The weekly `catalog-refresh` workflow rebuilds the values that
4
+ it came from (`url`), its date and its confidence. `catalog/models.json` carries each model's release date
5
+ (`releaseDate`) from models.dev. The weekly `catalog-refresh` workflow rebuilds the values that
5
6
  come from the keyless sources below; the hand-typed values (no `source`) cite their own vendor or benchmark page in
6
7
  their `url`.
7
8
 
@@ -20,6 +21,12 @@ their `url`.
20
21
  - License: CC BY 4.0; external tables keep their own license
21
22
  - Attribution: Epoch AI, 'Capabilities & benchmarking'. Published online at epoch.ai. Retrieved from 'https://epoch.ai/benchmarks' (CC BY 4.0)
22
23
 
24
+ ### models.dev
25
+
26
+ - Data: https://models.dev/api.json, the release dates in `catalog/models.json`
27
+ - License: MIT License
28
+ - Attribution: models.dev (MIT License), https://github.com/sst/models.dev
29
+
23
30
  ### Vectara hallucination leaderboard
24
31
 
25
32
  - Data: the README table of https://github.com/vectara/hallucination-leaderboard
@@ -28,9 +35,10 @@ their `url`.
28
35
 
29
36
  ## Sources read at run time only
30
37
 
31
- catherd reads these on the user's machine and ships none of their data: models.dev (MIT License,
32
- https://models.dev), the OpenRouter API (https://openrouter.ai) and LiteLLM's
33
- `model_prices_and_context_window.json` (MIT License, https://github.com/BerriAI/litellm).
38
+ catherd reads these on the user's machine and ships none of their data: the OpenRouter API
39
+ (https://openrouter.ai) and LiteLLM's `model_prices_and_context_window.json` (MIT License,
40
+ https://github.com/BerriAI/litellm). models.dev's prices, capabilities and efforts are read at run time too;
41
+ only its release dates ship (above).
34
42
 
35
43
  Artificial Analysis (https://artificialanalysis.ai) is read only with the user's own key, and its values are never
36
44
  shipped.
@@ -45,6 +45,7 @@
45
45
  {
46
46
  "id": "gpt-6.1-sol",
47
47
  "name": "GPT-6.1 Sol",
48
+ "predecessor": "gpt-6-sol",
48
49
  "vendor": "openai",
49
50
  "releaseDate": "2026-09-29",
50
51
  "capabilities": { "toolUse": true, "imageIn": true, "reasoning": true },
@@ -63,6 +64,7 @@
63
64
  {
64
65
  "id": "gpt-6-sol",
65
66
  "name": "GPT-6 Sol",
67
+ "predecessor": "gpt-5.6-sol",
66
68
  "vendor": "openai",
67
69
  "releaseDate": "2026-09-22",
68
70
  "capabilities": { "toolUse": true, "imageIn": true, "reasoning": true },
@@ -88,6 +90,7 @@
88
90
  {
89
91
  "id": "gpt-6-luna",
90
92
  "name": "GPT-6 Luna",
93
+ "predecessor": "gpt-5.6-luna",
91
94
  "vendor": "openai",
92
95
  "releaseDate": "2026-09-22",
93
96
  "capabilities": { "toolUse": true, "imageIn": true, "reasoning": true },
@@ -239,6 +242,7 @@
239
242
  {
240
243
  "id": "claude-sonnet-5-5",
241
244
  "name": "Claude Sonnet 5.5",
245
+ "predecessor": "claude-sonnet-5",
242
246
  "vendor": "anthropic",
243
247
  "releaseDate": "2026-09-28",
244
248
  "capabilities": { "toolUse": true, "imageIn": true, "reasoning": true },
@@ -292,6 +296,7 @@
292
296
  {
293
297
  "id": "grok-4-7",
294
298
  "name": "Grok 4.7",
299
+ "predecessor": "grok-4-6",
295
300
  "vendor": "xai",
296
301
  "releaseDate": "2026-09-21",
297
302
  "capabilities": { "toolUse": true, "imageIn": true, "reasoning": true },
@@ -308,6 +313,7 @@
308
313
  {
309
314
  "id": "grok-4-6",
310
315
  "name": "Grok 4.6",
316
+ "predecessor": "grok-4-5",
311
317
  "vendor": "xai",
312
318
  "releaseDate": "2026-08-12",
313
319
  "capabilities": { "toolUse": true, "imageIn": true, "reasoning": true },
@@ -356,6 +362,7 @@
356
362
  {
357
363
  "id": "gemini-3-8-flash",
358
364
  "name": "Gemini 3.8 Flash",
365
+ "predecessor": "gemini-3-7-flash",
359
366
  "vendor": "google",
360
367
  "releaseDate": "2026-09-02",
361
368
  "capabilities": { "toolUse": true, "imageIn": true, "reasoning": true },
@@ -368,6 +375,7 @@
368
375
  {
369
376
  "id": "gemini-3-7-flash",
370
377
  "name": "Gemini 3.7 Flash",
378
+ "predecessor": "gemini-3-6-flash",
371
379
  "vendor": "google",
372
380
  "releaseDate": "2026-08-13",
373
381
  "capabilities": { "toolUse": true, "imageIn": true, "reasoning": true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catherd-cli",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Herds coding agents: autopilot builds from your own Claude Code session.",
5
5
  "keywords": [
6
6
  "autopilot",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catherd",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Herds coding agents: Claude plans and verifies, Codex, opencode or headless Claude Code workers write the code, and Jev picks the model and effort for each piece.",
5
5
  "author": {
6
6
  "name": "47vigen",
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "catherd",
3
+ "version": "1.5.0",
4
+ "description": "Shared catherd orchestration, profiles and durable role results through the versioned MCP core.",
5
+ "author": { "name": "47vigen", "url": "https://github.com/47vigen" },
6
+ "homepage": "https://github.com/47vigen/catherd",
7
+ "repository": "https://github.com/47vigen/catherd",
8
+ "license": "MIT",
9
+ "skills": "./skills/",
10
+ "mcpServers": "./.mcp-codex.json"
11
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "mcpServers": {
3
+ "catherd": {
4
+ "command": "sh",
5
+ "args": ["./bin/catherd-mcp"],
6
+ "cwd": ".",
7
+ "env": { "CATHERD_ORCHESTRATION_HOST": "codex" }
8
+ }
9
+ }
10
+ }
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # catherd's MCP launcher (spec 1.1 §12): the plugin's .mcp.json runs it. The release stamps VERSION
3
3
  # (scripts/stamp-plugin-version.mjs), so the plugin always starts the server it was released with.
4
- VERSION="1.3.0"
4
+ VERSION="1.5.0"
5
5
 
6
6
  # a global catherd at this version (catherd init installs one): start it, no resolve at all
7
7
  if command -v catherd >/dev/null 2>&1 && [ "$(catherd --version 2>/dev/null)" = "$VERSION" ]; then