catherd-cli 1.5.0 → 2.0.0-beta.20261022113309
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.
- package/README.md +164 -208
- package/THIRD_PARTY_NOTICES.md +217 -35
- package/catalog/jev.json +27 -1
- package/catalog/models.json +56 -247
- package/package.json +6 -8
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/bin/catherd-mcp +1 -1
- package/plugin/commands/catherd.md +2 -2
- package/plugin/skills/catherd/SKILL.md +97 -421
- package/plugin/skills/catherd-setup/SKILL.md +20 -19
- package/src/adapters/all.ts +0 -4
- package/src/adapters/backend.ts +1 -2
- package/src/adapters/cursor/home.ts +1 -1
- package/src/adapters/cursor/index.ts +4 -4
- package/src/cli.ts +22 -27
- package/src/domain/bars.ts +33 -107
- package/src/domain/blocked.ts +72 -0
- package/src/domain/branch.ts +51 -0
- package/src/domain/brief.ts +21 -6
- package/src/domain/catalog.ts +69 -324
- package/src/domain/cost.ts +15 -30
- package/src/domain/errors.ts +2 -2
- package/src/domain/fail-lines.ts +26 -0
- package/src/domain/failover.ts +37 -87
- package/src/domain/findings.ts +47 -0
- package/src/domain/gate-brief.ts +1 -0
- package/src/domain/ids.ts +13 -2
- package/src/domain/jev.ts +47 -2
- package/src/domain/judge.ts +124 -0
- package/src/domain/lane.ts +22 -3
- package/src/domain/milestone-memory.ts +53 -0
- package/src/domain/notice.ts +25 -8
- package/src/domain/notify.ts +32 -0
- package/src/domain/plan-doc.ts +198 -0
- package/src/domain/plan-lint.ts +141 -0
- package/src/domain/profile-rules.ts +101 -160
- package/src/domain/profile.ts +116 -63
- package/src/domain/record.ts +53 -2
- package/src/domain/role-prompts.ts +131 -45
- package/src/domain/role-scope.ts +4 -34
- package/src/domain/role-tools.ts +2 -2
- package/src/domain/roles.ts +2 -0
- package/src/domain/route.ts +17 -0
- package/src/domain/rules.ts +33 -0
- package/src/domain/run-events.ts +298 -0
- package/src/domain/run-machine.ts +668 -0
- package/src/domain/run-state.ts +1310 -0
- package/src/domain/scorecard.ts +197 -0
- package/src/domain/select.ts +151 -146
- package/src/domain/slopalytics.ts +72 -0
- package/src/entry/answer-command.ts +39 -0
- package/src/entry/catalog-command.ts +25 -174
- package/src/entry/check-bin.ts +17 -0
- package/src/entry/cli-kit.ts +1 -1
- package/src/entry/daemon-bin.ts +22 -0
- package/src/entry/glyphs.ts +15 -2
- package/src/entry/init-command.ts +18 -68
- package/src/entry/knowledge-command.ts +45 -4
- package/src/entry/lock-command.ts +6 -7
- package/src/entry/mcp/role-server.ts +18 -0
- package/src/entry/mcp/server.ts +13 -40
- package/src/entry/mcp/session-tools.ts +149 -0
- package/src/entry/panel/openapi.ts +189 -0
- package/src/entry/panel/server.ts +410 -0
- package/src/entry/panel-command.ts +68 -0
- package/src/entry/profile-command.ts +10 -14
- package/src/entry/role-cli-command.ts +47 -3
- package/src/entry/runs-command.ts +3 -19
- package/src/entry/scorecard-command.ts +187 -0
- package/src/entry/supervise-bin.ts +1 -1
- package/src/infra/env.ts +0 -2
- package/src/infra/git.ts +64 -0
- package/src/infra/heavy-lock.ts +45 -7
- package/src/infra/launch.ts +63 -7
- package/src/infra/memory.ts +45 -0
- package/src/infra/ntfy.ts +40 -0
- package/src/infra/open-url.ts +42 -0
- package/src/infra/paths.ts +2 -2
- package/src/infra/slopalytics.ts +30 -0
- package/src/infra/store.ts +6 -1
- package/src/services/admission.ts +24 -9
- package/src/services/backends.ts +4 -6
- package/src/services/capture.ts +1 -22
- package/src/services/catalog-service.ts +155 -262
- package/src/services/credentials.ts +4 -20
- package/src/services/daemon.ts +181 -0
- package/src/services/dispatch-service.ts +5 -1
- package/src/services/doctor-backends.ts +1 -1
- package/src/services/doctor-checks.ts +47 -0
- package/src/services/doctor.ts +4 -9
- package/src/services/failover-rungs.ts +109 -0
- package/src/services/finalize.ts +12 -0
- package/src/services/gate-env.ts +1 -2
- package/src/services/gate-service.ts +21 -6
- package/src/services/jev-service.ts +2 -4
- package/src/services/lane-service.ts +34 -3
- package/src/services/milestone-check.ts +433 -0
- package/src/services/milestone-tree.ts +170 -0
- package/src/services/milestones.ts +35 -8
- package/src/services/notifier.ts +69 -2
- package/src/services/notify-service.ts +26 -0
- package/src/services/panel-setup.ts +116 -0
- package/src/services/plan-input.ts +151 -0
- package/src/services/ports.ts +30 -4
- package/src/services/preflight.ts +82 -8
- package/src/services/profile-service.ts +30 -3
- package/src/services/profile-store.ts +8 -3
- package/src/services/protocol.ts +4 -0
- package/src/services/provenance.ts +31 -90
- package/src/services/questions.ts +9 -0
- package/src/services/reconcile.ts +11 -0
- package/src/services/routing-service.ts +26 -15
- package/src/services/run-briefs.ts +477 -0
- package/src/services/run-client.ts +217 -0
- package/src/services/run-effects.ts +837 -0
- package/src/services/run-events-store.ts +174 -0
- package/src/services/run-evidence.ts +1 -1
- package/src/services/run-read.ts +221 -0
- package/src/services/run-report.ts +176 -0
- package/src/services/run-service.ts +55 -6
- package/src/services/run-store.ts +54 -7
- package/src/services/scorecard-metrics.ts +86 -0
- package/src/services/scorecard.ts +382 -0
- package/src/services/summary.ts +27 -3
- package/src/services/tree-path.ts +27 -0
- package/src/services/workspace-admission.ts +5 -13
- package/src/services/workspace-service.ts +5 -0
- package/web/dist/assets/Brand-PKlUX5TE.js +1 -0
- package/web/dist/assets/Brand-PKlUX5TE.js.br +0 -0
- package/web/dist/assets/Brand-PKlUX5TE.js.gz +0 -0
- package/web/dist/assets/Modal-Dxc5so53.js +1 -0
- package/web/dist/assets/Modal-Dxc5so53.js.br +0 -0
- package/web/dist/assets/Modal-Dxc5so53.js.gz +0 -0
- package/web/dist/assets/Pressable-C8-T6Ed_.js +1 -0
- package/web/dist/assets/StatusChip-B5xfI_Mn.js +153 -0
- package/web/dist/assets/StatusChip-B5xfI_Mn.js.br +0 -0
- package/web/dist/assets/StatusChip-B5xfI_Mn.js.gz +0 -0
- package/web/dist/assets/_app-Ea5cpyKe.js +1 -0
- package/web/dist/assets/_app-Ea5cpyKe.js.br +0 -0
- package/web/dist/assets/_app-Ea5cpyKe.js.gz +0 -0
- package/web/dist/assets/_runId-pTG0fXVo.js +1 -0
- package/web/dist/assets/_runId-pTG0fXVo.js.br +0 -0
- package/web/dist/assets/_runId-pTG0fXVo.js.gz +0 -0
- package/web/dist/assets/drawer-Du3cdlok.js +1 -0
- package/web/dist/assets/drawer-Du3cdlok.js.br +0 -0
- package/web/dist/assets/drawer-Du3cdlok.js.gz +0 -0
- package/web/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/web/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/web/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/web/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/web/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/web/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/web/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/web/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/web/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/web/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/web/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/web/dist/assets/index-B6GiwDkh.js +11 -0
- package/web/dist/assets/index-B6GiwDkh.js.br +0 -0
- package/web/dist/assets/index-B6GiwDkh.js.gz +0 -0
- package/web/dist/assets/index-C5IbylvM.css +2 -0
- package/web/dist/assets/index-C5IbylvM.css.br +0 -0
- package/web/dist/assets/index-C5IbylvM.css.gz +0 -0
- package/web/dist/assets/label-DFSYBc62.js +1 -0
- package/web/dist/assets/label-DFSYBc62.js.br +0 -0
- package/web/dist/assets/label-DFSYBc62.js.gz +0 -0
- package/web/dist/assets/link-D8EcKZUt.js +1 -0
- package/web/dist/assets/link-D8EcKZUt.js.br +0 -0
- package/web/dist/assets/link-D8EcKZUt.js.gz +0 -0
- package/web/dist/assets/login-DaN5HPPW.js +1 -0
- package/web/dist/assets/login-DaN5HPPW.js.br +0 -0
- package/web/dist/assets/login-DaN5HPPW.js.gz +0 -0
- package/web/dist/assets/query-Cu--ccT3.js +1 -0
- package/web/dist/assets/questions-shoO9OVj.js +1 -0
- package/web/dist/assets/questions-shoO9OVj.js.br +0 -0
- package/web/dist/assets/questions-shoO9OVj.js.gz +0 -0
- package/web/dist/assets/react-query.gen-Bu2yV-qJ.js +12 -0
- package/web/dist/assets/react-query.gen-Bu2yV-qJ.js.br +0 -0
- package/web/dist/assets/react-query.gen-Bu2yV-qJ.js.gz +0 -0
- package/web/dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/web/dist/assets/run-status-C0DRuV7U.js +1 -0
- package/web/dist/assets/runs-C3rg2zZc.js +1 -0
- package/web/dist/assets/runs-C3rg2zZc.js.br +0 -0
- package/web/dist/assets/runs-C3rg2zZc.js.gz +0 -0
- package/web/dist/assets/setup-5I4Vl9fR.js +1 -0
- package/web/dist/assets/setup-5I4Vl9fR.js.br +0 -0
- package/web/dist/assets/setup-5I4Vl9fR.js.gz +0 -0
- package/web/dist/assets/table-BOxXhqS4.js +1 -0
- package/web/dist/assets/table-BOxXhqS4.js.br +0 -0
- package/web/dist/assets/table-BOxXhqS4.js.gz +0 -0
- package/web/dist/assets/textfield-BzRFkxBF.js +1 -0
- package/web/dist/assets/textfield-BzRFkxBF.js.br +0 -0
- package/web/dist/assets/textfield-BzRFkxBF.js.gz +0 -0
- package/web/dist/assets/time--9kSQbbp.js +1 -0
- package/web/dist/assets/use-css-variable-CpnN9WtA.js +5 -0
- package/web/dist/assets/use-css-variable-CpnN9WtA.js.br +0 -0
- package/web/dist/assets/use-css-variable-CpnN9WtA.js.gz +0 -0
- package/web/dist/assets/useMutation-CVPKlR34.js +1 -0
- package/web/dist/assets/useMutation-CVPKlR34.js.br +0 -0
- package/web/dist/assets/useMutation-CVPKlR34.js.gz +0 -0
- package/web/dist/index.html +15 -0
- package/catalog/ATTRIBUTION.md +0 -44
- package/catalog/scores.json +0 -3202
- package/catalog/sources.json +0 -97
- package/src/adapters/antigravity/events.ts +0 -131
- package/src/adapters/antigravity/home.ts +0 -46
- package/src/adapters/antigravity/index.ts +0 -335
- package/src/adapters/antigravity/models.ts +0 -37
- package/src/adapters/grok/events.ts +0 -112
- package/src/adapters/grok/home.ts +0 -187
- package/src/adapters/grok/index.ts +0 -358
- package/src/adapters/grok/models.ts +0 -48
- package/src/domain/calibration.ts +0 -132
- package/src/domain/sources.ts +0 -144
- package/src/entry/mcp/dispatch-tools.ts +0 -52
- package/src/entry/mcp/lane-tools.ts +0 -131
- package/src/entry/mcp/protocol-tools.ts +0 -63
- package/src/entry/mcp/push-tools.ts +0 -16
- package/src/entry/mcp/run-tools.ts +0 -164
- package/src/entry/mcp/setup-tools.ts +0 -109
- package/src/entry/mcp/workspace-tools.ts +0 -142
- package/src/entry/tui/commands.ts +0 -563
- package/src/entry/tui/effects.ts +0 -385
- package/src/entry/tui/fixtures.ts +0 -637
- package/src/entry/tui/profile-edits.ts +0 -146
- package/src/entry/tui/profile-tree.ts +0 -429
- package/src/entry/tui/providers/app.tsx +0 -162
- package/src/entry/tui/providers/boundary.tsx +0 -57
- package/src/entry/tui/providers/data.tsx +0 -160
- package/src/entry/tui/providers/keymap.tsx +0 -166
- package/src/entry/tui/providers/root.tsx +0 -45
- package/src/entry/tui/providers/theme.tsx +0 -17
- package/src/entry/tui/providers/toast.tsx +0 -77
- package/src/entry/tui/run.tsx +0 -114
- package/src/entry/tui/state.ts +0 -400
- package/src/entry/tui/stories.ts +0 -114
- package/src/entry/tui/text.ts +0 -130
- package/src/entry/tui/theme.ts +0 -140
- package/src/entry/tui/views/app.tsx +0 -208
- package/src/entry/tui/views/dialogs.tsx +0 -41
- package/src/entry/tui/views/profile-actions.ts +0 -331
- package/src/entry/tui/views/profiles.tsx +0 -520
- package/src/entry/tui/views/runs.tsx +0 -619
- package/src/entry/tui/views/save-dialog.tsx +0 -344
- package/src/entry/tui/views/status.tsx +0 -213
- package/src/entry/tui/widgets/chrome.tsx +0 -114
- package/src/entry/tui/widgets/dialog-confirm.tsx +0 -58
- package/src/entry/tui/widgets/dialog-prompt.tsx +0 -52
- package/src/entry/tui/widgets/dialog-select.tsx +0 -212
- package/src/entry/tui/widgets/dialog.tsx +0 -68
- package/src/entry/tui/widgets/line.tsx +0 -92
- package/src/entry/tui/widgets/list.tsx +0 -197
- package/src/entry/tui/widgets/spinner.tsx +0 -49
- package/src/entry/tui/widgets/toast.tsx +0 -62
- package/src/infra/sources/arena.ts +0 -95
- package/src/infra/sources/artificial-analysis.ts +0 -119
- package/src/infra/sources/cache.ts +0 -126
- package/src/infra/sources/csv.ts +0 -38
- package/src/infra/sources/epoch.ts +0 -82
- package/src/infra/sources/http.ts +0 -75
- package/src/infra/sources/litellm.ts +0 -58
- package/src/infra/sources/models-dev.ts +0 -59
- package/src/infra/sources/openrouter-endpoints.ts +0 -52
- package/src/infra/sources/openrouter-models.ts +0 -60
- package/src/infra/sources/rows.ts +0 -38
- package/src/infra/sources/vectara.ts +0 -69
- package/src/infra/sources/zip.ts +0 -48
- package/src/services/catalog-refresh.ts +0 -201
- package/src/services/doctor-sources.ts +0 -76
- package/src/services/runs-page.ts +0 -290
- package/src/services/source-derive.ts +0 -397
- package/src/services/source-sync.ts +0 -312
- package/src/services/standins.ts +0 -238
- package/src/services/treat-likes.ts +0 -113
|
@@ -1,435 +1,111 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: catherd
|
|
3
|
-
description: Use when the user asks for a task or a project to be orchestrated with catherd — /catherd, "orchestrate this with catherd", "run this on catherd" — or when resuming a
|
|
3
|
+
description: Use when the user asks for a task or a project to be orchestrated with catherd — /catherd, "orchestrate this with catherd", "run this on catherd" — or when resuming, answering or reading a catherd run. Not for a plain request that merely mentions an architect, a verifier, a review or a plan.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# catherd
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
catherd runs the work in a background daemon: it plans, dispatches the roles, reviews, verifies and lands each
|
|
11
|
+
milestone by itself, and writes everything it does to the run's `events.jsonl`. You are the owner's front door to
|
|
12
|
+
it, not its driver. Your job is four things:
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
- write the A-lines the run must meet;
|
|
15
|
+
- start the run;
|
|
16
|
+
- carry the owner's answers to the questions the run parks;
|
|
17
|
+
- relay the finished report.
|
|
16
18
|
|
|
17
|
-
Your
|
|
19
|
+
**Your first call is `status()`.** Its `version` must be the one this plugin pins, `catherd-cli@2.0.0-beta.20261022113309`. If it
|
|
20
|
+
differs, stop and tell the user to restart their host session so the plugin and its server match.
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- report.
|
|
23
|
-
|
|
24
|
-
The catherd server keeps `state.md` true: it rewrites it on every dispatch, climb and landing.
|
|
25
|
-
|
|
26
|
-
**Your first call is `status()`.** Its `version` must be the one this plugin pins, `catherd-cli@1.5.0`. If it differs, stop and tell the user to restart their host session so the plugin and its server match. Read its host and capability diagnostics; unknown or conflicting identity never authorizes ownership or push.
|
|
27
|
-
|
|
28
|
-
**You never edit product files.** Every line of code, tests or docs comes from a role, including a one-line fix.
|
|
29
|
-
|
|
30
|
-
**You run in the user's own session, on purpose.** The main thread is the user's own model in Claude Code or native Codex, with their plugins, hooks and memory beside it: the environment they decide in every day. Never propose a stripped launcher or a headless relay to save tokens.
|
|
31
|
-
|
|
32
|
-
**Each role runs in its vendor's own harness with the user's customizations — never isolate it.** Codex roles keep the user's config, hooks, MCP servers, skills and `AGENTS.md`. The one exception is the user's own choice, the profile's `harness.<name>.isolated`, and `dispatch` applies it for you.
|
|
22
|
+
**You never edit product files and you never dispatch a role.** Every line of code, tests or docs comes from a
|
|
23
|
+
role the daemon runs. Each role runs headless in its vendor's own harness with the user's customizations; never
|
|
24
|
+
isolate it (the profile's `harness.<name>.isolated` is the user's own choice, and the daemon applies it).
|
|
33
25
|
|
|
34
26
|
## Tools
|
|
35
27
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
authorization and repository rules; there is no automatic commit, push or rollback.
|
|
121
|
-
|
|
122
|
-
## Roles
|
|
123
|
-
|
|
124
|
-
| Role | How to run it | Job |
|
|
125
|
-
| ----------- | ----------------------------------------------------------------------- | ------------------------------------------------------- |
|
|
126
|
-
| architect | `route(run, role: "architect")`, then the backend rule below | Decisions, milestones, lane files. No code. |
|
|
127
|
-
| verifier | `route(run, role: "verifier")`, then the backend rule below | Independent PASS/FAIL of a milestone, by running it |
|
|
128
|
-
| worker | `dispatch(run, "worker", "worker-<lane>", brief, rung, lane: "<lane>")` | One lane: its code and its tests |
|
|
129
|
-
| reviewer | `dispatch(run, "reviewer", "reviewer-<m>", brief, rung)` | Review of a milestone's diff |
|
|
130
|
-
| ui-reviewer | `dispatch(run, "ui-reviewer", "ui-<m>", brief, rung)` | Screenshots of the changed screens with `agent-browser` |
|
|
131
|
-
| artist | `dispatch(run, "artist", "artist-<n>", brief, rung)` | Images a screen needs, with Codex's built-in image tool |
|
|
132
|
-
| writer | `dispatch(run, "writer", "writer-<m>", brief, rung)` | README, docs, changelog, MR body |
|
|
133
|
-
| researcher | `dispatch(run, "researcher", "researcher-<n>", brief, rung)` | The dossier, or one factual question about the code |
|
|
134
|
-
|
|
135
|
-
- **Every rung comes from `route`,** never from you, for every role including architect and verifier. A rung names its backend: `backend:model#effort`, like `codex:gpt-6.1-sol#high` or `claude:claude-opus-5-5#high`. Only `backend: "claude"` on a Claude Code host uses `Agent(subagent_type: <agent>)`, with the brief and run id as its prompt. Every process backend uses `dispatch` followed by `result`, on either host. `dispatch` refuses native Claude rungs; Codex never fabricates native agents or silently changes `claude:` to `claude-code:`.
|
|
136
|
-
- **Only omitted architect/verifier rungs follow the host:** Codex uses exactly `codex:gpt-6.1-sol#high` and `codex:gpt-6.1-sol#low`; Claude Code retains its native Claude defaults. Explicit ladders, model IDs, efforts and existing materialized profiles stay unchanged. A deliberate reset removes only those two roles' `rungs` and `defaultRung` through the reviewed CLI workflow in the setup skill.
|
|
137
|
-
- **Verify the exact `gpt-6.1-sol` model ID against native catalog discovery and validation.** If the catalog spells it differently, report the mismatch and resolve it explicitly with the owner; never silently normalize or substitute a model. Retain architect high and verifier low effort.
|
|
138
|
-
- **After every native Claude subagent returns on Claude Code,** call `record_agent_run(run, name, role, rung, total_tokens, duration_ms, lane)` with the numbers its Agent result reports (`lane` when it worked one). Claude runs cost the budget too, and catherd cannot see them otherwise. Process roles already have dispatch records; do not report them as native agents.
|
|
139
|
-
- **A role the profile disables** (`profile_get`; every role but the worker can be off) is skipped, and the report says so.
|
|
140
|
-
- **Access:** catherd sets it per role. Worker, artist and writer write in the repo, the temp dir and catherd's lock dir, and reach the network, loopback ports and a local Docker, so a worker runs its installs and tests itself; reviewer, researcher and architect read; verifier and UI reviewer get full access for Docker, a browser, gate logs and screenshots. `catherd doctor` says per backend what a worker can reach.
|
|
141
|
-
- **A read-only role on claude-code or opencode has no shell** (no `git diff`, no `ls`), so its brief must list the files to read.
|
|
142
|
-
- **Cheap rungs hide broken tools.** The lowest Track A rung stays silent about a broken tool about a third of the time, so every lane on it is checked by your fast check, not by its own word.
|
|
143
|
-
- **Native Claude agents, only on Claude Code:**
|
|
144
|
-
- catherd generates them from the profile, and Claude Code registers them at session start.
|
|
145
|
-
- Pass no `model` to those Agent calls. Never let `Plan`, `general-purpose` or `Explore` stand in.
|
|
146
|
-
- `Agent type … not found` means the profile changed after this session started: tell the user to open a new session.
|
|
147
|
-
- If the model needs a newer Claude Code, stop and tell the user to upgrade Claude Code. Never pass a `model` to get past it.
|
|
148
|
-
- **The record:** each dispatch has its own folder, `R/roles/<name>/<dispatchId>/` (brief, reply, events, stderr); `result(run, name)` reads the latest. `R/runs.jsonl` holds one record per dispatch (role, rung, status, thread, seconds, tokens, the owned files it changed and any it should not have). `R/agents.jsonl` holds the Claude subagent runs you reported. Together they are the token and time record: never keep your own.
|
|
149
|
-
|
|
150
|
-
## Effort: the ladder, decided by Jev
|
|
151
|
-
|
|
152
|
-
A lane starts on the lowest rung that can do it, and climbs one rung when it shows it cannot. The ladders come from the profile and the catalog. With the default profile:
|
|
153
|
-
|
|
154
|
-
| Track | Lanes | Rungs, low to high |
|
|
155
|
-
| ----- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
156
|
-
| A | `copy` or `build`: an existing pattern, a clear fast check | `codex:gpt-6-luna#high` → `codex:gpt-6-sol#xhigh` |
|
|
157
|
-
| B | `logic` or `hard`, or `terminal` work: state, concurrency, ops, unclear cause | `codex:gpt-6-sol#medium` → `codex:gpt-6-sol#high` → `codex:gpt-6-sol#xhigh` |
|
|
158
|
-
|
|
159
|
-
A ladder holds only rungs at least as strong as its start on the lane's bar, so a climb never lands lower. When no rung clears a lane's bar, `route`'s `why` says so and names the closest rung; when rungs on two quotas score the same, the start goes to the quota the run has used least, and `why` says a tie decided.
|
|
160
|
-
|
|
161
|
-
**The lane's header decides; Jev fills in what it leaves out.** A lane file that declares both `Kind:` and `Difficulty:` routes on them (`source: "lane"`), and `why` says where Jev disagreed. Jev (TypeSafe) is a decision model: it answers a fixed set of questions about the lane with calibrated probabilities, usually in well under a second, for a fraction of a cent; `route` gives up on it after 25 s. It is optional. For a lane without both lines, `route` takes Jev's answer when its probabilities settle the track (`source: "jev"`), else the profile's default (`source: "default"`), so the run never waits on it. When Jev is sure of the kind but not the difficulty, `route` keeps the lane's kind if it has one, else keeps Jev's kind and takes the difficulty from the lane's `Difficulty:` line, else the role's default (`source: "jev-kind"`). Every Jev call is logged to `R/jev.jsonl`, without the lane's text, and every decision to `R/routes.jsonl`.
|
|
162
|
-
|
|
163
|
-
| When | Call | On the answer |
|
|
164
|
-
| ------------------------------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------- |
|
|
165
|
-
| A milestone's lanes, before their first dispatch | `route(run, lanes: ["lanes/Mx.L1.md", …])` | Dispatch each at its `rung` |
|
|
166
|
-
| A review finding that may be the plan's fault | `ask(run, "finding", { lane_file: "lanes/Mx.Ly.md", finding: "<the line>" })` | `design` → the architect. Else → the worker |
|
|
167
|
-
| A finding back after its fix round | `ask(run, "same-defect", { before: "<old line>", after: "<new line>" })` | `yes` → climb one rung |
|
|
168
|
-
|
|
169
|
-
**Climb one rung** with `climb(run, lane, reason, evidence)` (add `env: true` when a missing service, a broken tool or a usage limit caused it, not the rung), then dispatch the lane at the new rung on a fresh thread whose brief is the lane file plus the path of the failing evidence, when:
|
|
170
|
-
|
|
171
|
-
- your fast check fails twice on that lane (`check-failed-twice`);
|
|
172
|
-
- the lane gets a BLOCKER (`blocker`), or Jev calls a returning finding the same defect (`same-defect`);
|
|
173
|
-
- the reply says `STATUS: refused` or `blocked`, or the run exits 0 while the lane's owned files are unchanged: that is a refusal, whatever the reply says (`refused`, `blocked`, `unchanged`). The record's `hints` flag each of these as `climb: <reason>`.
|
|
174
|
-
|
|
175
|
-
A usage limit is not a climb. When the profile names a stand-in for that rung, catherd has already started the role on it, on a fresh thread, before it tells you: its message says `limit on <rung>; failed over to <rung>`, the limited record's first hint says `limit: … failed over to <rung>`, and the stand-in's own result arrives later. With no stand-in, the message says `paused: no stand-in` and the run is paused.
|
|
176
|
-
|
|
177
|
-
A climb is for capability only. When the evidence says the lane cannot be done as planned (the plan contradicts itself, the fix needs a file the lane does not own, an interface between lanes), `climb` refuses with `E_CLIMB_DESIGN`: that goes to the architect.
|
|
178
|
-
|
|
179
|
-
A failure on the top rung (`top: true`) goes to the architect when Jev calls it design, else to the report as open.
|
|
180
|
-
|
|
181
|
-
- Jev decides which model does the work. It never decides that the work is done: only a check, the reviewer or the verifier does.
|
|
182
|
-
- `R/routes.jsonl` records every role's decision (its why and provenance, a lane-less dispatch's rung too), each lane's rung, every climb with its reason, and each lane's outcome beside Jev's answer; `R/outcomes.jsonl` gets one row per lane when its milestone lands or it fails its top rung; a lane written again (landed after failing its top rung, or re-landed) keeps its rows, and the last row per lane wins.
|
|
183
|
-
- Never put a secret or a key into an `ask` state. Keep the state short and in English.
|
|
184
|
-
|
|
185
|
-
## Threads
|
|
186
|
-
|
|
187
|
-
A resumed thread replays its whole history on every tool call. In the first real run, one worker thread cost 20–25M input tokens per resume, and threads were 90% of the Codex spend.
|
|
188
|
-
|
|
189
|
-
- **Resume a thread only for its own fix round:** the reviewer's findings on that piece, or the verifier's FAIL, at the same rung. That is `dispatch(…, thread: <record.thread>)`, with the fix as the brief: the `thread:` the first line of its catherd message names, or `thread: "latest"` for that name's last thread. A thread that name never ran on in the run is refused (`E_ADMIT_THREAD`).
|
|
190
|
-
- **A new piece of work gets a fresh thread,** even for the same worker role: a new bug, a cleanup slice, a docs pass, a re-run, a climb to the next rung. Its brief carries what it needs, from its lane file and the ledger.
|
|
191
|
-
- A `thread-heavy` hint means that thread is spent. Its next piece starts fresh.
|
|
192
|
-
|
|
193
|
-
## Your own context
|
|
194
|
-
|
|
195
|
-
Your context is re-read on every turn, and it is the run's most expensive token. In the first real run you were 68% of the Claude spend: 269 turns at about 220k tokens each.
|
|
196
|
-
|
|
197
|
-
- **One turn per transition.** Make a transition's independent calls back to back (a `land`, the next lanes' routes and dispatches), each `dispatch` returning in about a second, then end the turn with one status line.
|
|
198
|
-
- **Read little, and read it narrowly.**
|
|
199
|
-
- From the architect, read its short reply. The plan lives in `plan.md` and the lane files; read a section with `read_run_file` only when a decision needs it.
|
|
200
|
-
- From a role, read its record and its capped reply.
|
|
201
|
-
- Never read a log, a diff, a test file or source.
|
|
202
|
-
- **Brief by path.** A brief names the files a role must read (its lane file, a prior reply, a finding). Never paste their contents into your own context to copy them over.
|
|
203
|
-
- **Screenshots are paths.** The UI reviewer's findings are text, each with its screenshot path. Open one yourself only when you must decide on a finding the text leaves unclear.
|
|
204
|
-
|
|
205
|
-
## After dispatching
|
|
206
|
-
|
|
207
|
-
Call `dispatch` from your main thread only, never from a subagent: catherd messages the session that dispatched.
|
|
208
|
-
|
|
209
|
-
Only you, the orchestrator, call the coordinator tools: `peek` (of another role), `result`, `dispatch`, `run_start`, `climb`, `land`, `park`, `cancel`, `set_next`, `answer`, `profile_set`, `test_push`, `run_pin`, `lane_set`, `owns_add`, `record_agent_run` and the `workspace_*` writers (`workspace_budget`, `workspace_pause` and `workspace_resume` among them). A role never does: a native Claude subagent's agent file forbids them, and a process role's catherd server refuses them with `E_ROLE_SCOPE`, so a role can never take the run from you. A brief never asks a role to call one.
|
|
210
|
-
|
|
211
|
-
- **Dispatch every independent role one after another.** Each `dispatch` returns in about a second, once its role has started, so they all run side by side.
|
|
212
|
-
- **Then write one status line and end your turn.** Claude Code receives `<cross-session-message from-name="catherd">` through its peer inbox with its existing priorities. Codex receives queued next input through the existing native server (`--remote unix://`): idle sessions can wake; a busy session processes it after the active turn, without Claude's urgent next-tool-round promise. The notice names the run, dispatch and every event ID, including every coalesced event. Call `result(run, name)` for each stored record you will act on, then dispatch what follows.
|
|
213
|
-
- **A single role is `dispatch`, then end your turn.**
|
|
214
|
-
- **Never `sleep`, loop, use `await_results`, or call `peek` again and again.** Call `peek(run)` when the user asks how it is going, when a decision needs the other roles' state, or once after `run_start` on a resumed run.
|
|
215
|
-
- **Queue acceptance is not processing or collection.** An unloaded, interrupted or restarted conversation may retain input without generating. Accepted and ambiguous events are never automatically resent; durable unread records remain recoverable with `peek`/`result`. Only `result` collects a finished record. `status` and `result` do not adopt ownership; explicit `peek(run)`, `run_start` and `dispatch` do.
|
|
216
|
-
- **Duplicate notices are idempotent reads.** Preserve every event ID, consult the actual stored record and protocol, and never redispatch work or land a milestone twice because input repeats. A message or transcript echo supplies neither delivery acknowledgement nor user approval; reviewer/verifier gates remain authoritative.
|
|
217
|
-
- **An ambiguous retry is an explicit decision:** after validating the current owner and exact stored event, use `catherd runs retry-push <run> <name> --event '<exact event ID>' --acknowledge-possible-duplicate` from that owner's host session. It may duplicate native input. Accepted receipts suppress another enqueue for that owner/event; no supported history reconciliation API means retain ambiguity until this deliberate decision. Unknown/conflicting hosts never push.
|
|
218
|
-
|
|
219
|
-
**When the user asks where it stands,** call `peek(run)` once and answer from it; `status(run)` adds the totals, budget and milestones.
|
|
220
|
-
|
|
221
|
-
**Push a notification through an available host facility** only at the moments the profile's `notify` lists (`profile_get({ repo })`), one line each. Claude Code may use `PushNotification`; if the host exposes none, report in the conversation without inventing a notification or scheduled follow-up:
|
|
222
|
-
|
|
223
|
-
- `milestone`: a milestone landed: its name, its commit, the time it took, and the path of its digest (`land`'s `digest`);
|
|
224
|
-
- `finish`: the run finished: verdict and total time;
|
|
225
|
-
- `blocked`: a milestone is parked on a decision only the user can make (`park`): push the full question.
|
|
226
|
-
|
|
227
|
-
Nothing else pushes: a phone that buzzes for progress teaches the user to ignore it.
|
|
228
|
-
|
|
229
|
-
### On Codex
|
|
230
|
-
|
|
231
|
-
- **Run inside tmux.** When `$TMUX` and `$STY` are both empty, tell the user once, at the run's start, to run the coordinator inside `tmux` (or `screen`): Codex's app-server stops a thread's MCP servers once no client is attached, so an SSH drop detaches you. Each role's supervisor also queues its result to your thread when it ends, and the queued input waits for the next attach.
|
|
232
|
-
- **Goal mode.** A goal continuation while only roles are live ends the turn with no tool call: no `peek`, no `sleep`, no `pidwait` or other wait cell, no role work of your own. When unsure, one `peek(run)` answers it: `actionable: false` and its `reason` mean nothing is yours to do until the next catherd message.
|
|
233
|
-
- **Test the push from inside the thread** with `test_push`, when the user asks whether results will reach you: a shell cannot name this thread, since Codex does not export its id to the commands it runs.
|
|
234
|
-
|
|
235
|
-
## The run folder
|
|
236
|
-
|
|
237
|
-
`run_start` creates `R` under catherd's data directory, outside the repo. It outlives the session. `R` holds:
|
|
238
|
-
|
|
239
|
-
- **`plan.md`:** the architect's decisions, milestones and lanes. It changes only by an architect delta.
|
|
240
|
-
- **`lanes/Mx.Ly.md`:** one file per lane, the only plan a worker reads. Its second line, `Owns: <paths>`, is what `dispatch` uses to refuse a lane that shares a file with a running one, and to spot a refusal.
|
|
241
|
-
- **`ledger.md`:** one row per landed piece, appended by `land`. Never rewritten.
|
|
242
|
-
- **`state.md`:** rewritten by the server at every dispatch, climb and landing, so a fresh session resumes from it alone: HEAD, the dirty files and their owners, each running role with its brief, thread and rung, the last check, the next step, and on the last line `Protocol next:`, the step of the milestone loop the run is at.
|
|
243
|
-
- **`runs.jsonl`, `agents.jsonl`, `jev.jsonl`, `routes.jsonl`, `outcomes.jsonl`, `harness.jsonl`, `verifier.jsonl`, `questions.jsonl`:** the record.
|
|
244
|
-
- **`digests/<milestone>.md`:** each landed milestone's digest, written by `land`.
|
|
245
|
-
- **`roles/<name>/<dispatchId>/`** (each dispatch's brief, reply, events and stderr) and **`shots/`** (screenshots).
|
|
246
|
-
- **The repo's `knowledge.md`** (per repo, not per run, keyed by its git origin, so every worktree and clone of it shares one): what past runs learned, beside the repo's gate environment (`catherd knowledge env`). `land`'s `learned` appends to it; `read_knowledge` reads it.
|
|
247
|
-
|
|
248
|
-
**Pause** (on the user's word, a usage limit, or `E_RUN_BUDGET`): dispatch nothing new, `cancel(run, name)` each live role the user wants stopped, and bring down only this run's stack. Leave the tree as it is, call `set_next(run, "paused: <why>; resume with <step>")`, then stop. On a usage limit with no stand-in, catherd has already written the pause.
|
|
249
|
-
|
|
250
|
-
**Cancel** a role with `cancel(run, name)` when the user asks, or when a role is plainly stuck on work you no longer need. It returns the role's record, `cancelled`, and marks it read.
|
|
251
|
-
|
|
252
|
-
**Resume** (a new session, or after your context was compacted): `status()` names the run, and `status(run)` shows it. Before dispatching anything, call `peek(run)` once: it lists the open owner questions first, the roles still running, the records not read yet (read each with `result`), and `protocol`, the step of the milestone loop the run is at, with the checklist. It also makes this session the run's owner, so catherd messages you from now on. Check HEAD and the dirty files against its `state.md`, whose last line is the same step. Continue each role on its own thread with `dispatch(…, thread, brief: "<where it stopped>")` (`dispatch` refuses a name that is still running).
|
|
253
|
-
|
|
254
|
-
**Owner questions:** a product question outside the A-lines never stops the run. `park(run, milestone, question)` parks that milestone (`land` refuses it until it is answered), notify through the available host facility as above, and go on with the milestones and runs that do not depend on it. When the owner answers in this session, `answer(run, milestone, answer)`, then finish the milestone.
|
|
255
|
-
|
|
256
|
-
## The sequence
|
|
257
|
-
|
|
258
|
-
**Once per project:**
|
|
259
|
-
|
|
260
|
-
1. **A-lines.** Write the request as numbered, observable lines `A1…An`. Ask the user every open product question now; after this point, run without them. Then `run_start(repo, title, a_lines)`.
|
|
261
|
-
- **Plan in hand:** when the request names a plan the user already has, keep it as an A-line, `plan: <path>[, <path>…]`. The run then skips the dossier, and the architect translates that plan instead of designing one (step 3).
|
|
262
|
-
2. **Dossier.** One researcher, `researcher-dossier`, maps the code the A-lines touch. Its brief asks for, with `file:line` everywhere:
|
|
263
|
-
- what past runs of this repo learned (`read_knowledge(repo)`), so it maps only what changed since then;
|
|
264
|
-
- the files and folders involved, one line each on what they hold;
|
|
265
|
-
- the existing patterns the work should copy, by path;
|
|
266
|
-
- the build, test and run commands, with how long the full suite takes;
|
|
267
|
-
- the lint and type-check commands, and how to scope each to one package;
|
|
268
|
-
- the symbols the change will call or alter, with their signatures;
|
|
269
|
-
- the repo's rules (`CLAUDE.md`, `AGENTS.md`, conventions) that bind this work;
|
|
270
|
-
- risks: shared files, generated code, slow or flaky tests.
|
|
271
|
-
|
|
272
|
-
It may run to 200 lines; the 15-line cap does not apply to it. Its reply is `result(run, "researcher-dossier")`, at the record's `replyPath`. A native Claude researcher on Claude Code writes it to `R/dossier.md` with `write_run_file` instead.
|
|
273
|
-
|
|
274
|
-
3. **Architect,** once, with the A-lines, the run id and the dossier's path. It reads the dossier first, writes `plan.md` and every `lanes/Mx.Ly.md` itself with `write_run_file`, and replies with a short list of milestones and lanes. Each lane names its owned files and its **fast check**: its targeted tests plus the linter of every package the lane touches, and the type check when the repo has one, scoped to those packages (seconds to a minute or two). Each milestone names its **full check** (the whole suite).
|
|
275
|
-
- A full check slower than about five minutes is a problem to solve, not to live with. The architect makes speeding it up (parallel tests, a shared fixture) an early lane.
|
|
276
|
-
- Every lane file starts with these lines: `# Mx.Ly — <title>`, `Owns: <paths>` (repo-relative, a trailing `/` for a folder, never a glob), `Fast check: <command>`, `Kind: repo_code|terminal|ui|prose|research` and `Difficulty: copy|build|logic|hard`. Two optional lines follow: `After: Mx.Ly, …` when the lane compiles against another lane's changes (`protocol.next` and `dispatch` hold it until those finish ok), and `Allow: path[:line], …` under a fast check that greps for absence, naming the hits that are allowed exceptions. `write_run_file` refuses a lane whose header values are wrong; fix one line with `lane_set`.
|
|
277
|
-
- **Plan in hand** (a `plan:` A-line): no dossier. Brief the architect with the A-lines, the run id and the plan's paths, to translate, not design: each plan task becomes lanes (`Owns:`, `Fast check:`, `Kind:`, `Difficulty:`), each MR or phase a milestone with its full check. It copies the plan's decisions into `plan.md` and the lane files, redesigns only what the plan leaves undecided, and stays the target for `design` findings.
|
|
278
|
-
- **No dossier and no architect** for a polish or fix run (a list of known defects or tweaks to code that exists) or a single mechanical task. You write the lane files yourself with `write_run_file`, straight from the A-lines: one lane per cluster of defects that share files, with owned files found by `grep -n`, and the same header lines.
|
|
279
|
-
4. **Route and preflight.** `route(run, lanes: ["lanes/Mx.L1.md", …])` once for the milestone's lanes: Jev is asked about all of them at once, where one call per lane may wait up to 25 s each (`dispatch` routes a lane you missed, and starts it at the routed rung when yours is off its ladder). `route`, `preflight` and `dispatch` refuse a lane whose `Kind:` or `Difficulty:` the catalog does not know (`E_LANE_INVALID`). Then, once every lane file exists, `preflight(run)` once, before dispatching any lane. Each lane comes back as one of:
|
|
280
|
-
- `pass`: the check already passes on the base tree;
|
|
281
|
-
- `fails-as-expected`: it runs and fails, because the lane has not been done yet;
|
|
282
|
-
- `skipped`: it checks a file the lane creates, or a pnpm filter that matches no package yet;
|
|
283
|
-
- `cannot-start`: it could not even run (a missing command, exit 126 or 127, a 120 s timeout, no `Fast check:` line, or an environment error its note names: no Docker at `DOCKER_HOST`, DNS, a denied permission). Only this blocks: fix that lane's check, or the environment (`catherd knowledge env set` for the repo's gate environment), and run `preflight` again;
|
|
284
|
-
- `lock-busy`: other checks held every heavy slot for 60 s; run `preflight` again later.
|
|
285
|
-
|
|
286
|
-
Preflight runs in your login environment and only the lanes of milestones not landed yet (`milestone` names one). Its `warnings` name a lane whose fast check runs no linter while the repo has one: add the linter of every package the lane touches.
|
|
287
|
-
|
|
288
|
-
When it returns `needsConfirmation: true`, the profile wants the user to see the commands first: show them the `commands`, and on their yes call `preflight(run, confirmed: true)`.
|
|
289
|
-
|
|
290
|
-
**Per milestone:**
|
|
291
|
-
|
|
292
|
-
5. **Lanes.** Dispatch every lane of the milestone, one after another, each at its rung, then end your turn: workers, the artist, and a researcher if needed. A worker's brief points at its lane file, and `dispatch` gets its `lane`. A worker runs its own fast check until it passes.
|
|
293
|
-
- When a worker's message arrives, read it with `result`: check its STATUS line, its `changedOwned` and its `hints`, then run its fast check yourself once. A fail goes back to the same thread with the failing output's path; a second fail climbs a rung.
|
|
294
|
-
- A hint `environment: <what>` (the reply had an `ENV:` line) is the machine, not the rung: `climb` refuses it (`E_CLIMB_ENV`). Fix the environment, or `park` the milestone when only the owner can. `STATUS: flaky` (a check failed, then passed alone) is the worker's evidence: rerun that check alone, accept it, or climb; the call is yours.
|
|
295
|
-
- A `violation: <paths>` hint means the role wrote outside its lane. Send those paths to the reviewer with the milestone; a lane that needs them gets an `Owns:` delta from the architect.
|
|
296
|
-
6. **writer,** when the milestone changes docs. It starts once the workers are done. Its brief names the files it may change on an `Owns:` line (default: `docs/**` and `*.md`), so its edits count as its own and never as a lane's violation.
|
|
297
|
-
7. **reviewer,** named `reviewer-<M>`, once, over the whole milestone diff on a frozen tree.
|
|
298
|
-
- A reply of `STATUS: partial` (it read only part of the diff) is not the milestone's review: `land` refuses it, and `protocol.next` names a scoped second pass, `reviewer-<M>-2`, over the files it did not read. For a native reviewer, pass `reply_status` to `record_agent_run`.
|
|
299
|
-
- While its BLOCKER or BUG lines are open, `protocol.next` names the fix round, not the verifier.
|
|
300
|
-
- **UI pass,** when the milestone touched a screen. List the changed files (`git diff --name-only <milestone base>`), map them to the screens that render them, and brief the UI reviewer on those screens only. You start the app first.
|
|
301
|
-
8. **One fix round.** Send each lane's findings, verbatim, to its own worker thread, at its rung. A BLOCKER climbs a rung instead, on a fresh thread. Dispatch every lane's fix, then end your turn. Then resume the same reviewer thread, and it re-checks only the BLOCKER and BUG lines.
|
|
302
|
-
- Before routing a finding that questions the plan, `ask(run, "finding", …)`. `design` goes to the architect: `SendMessage` to the same native Claude agent on Claude Code, or `dispatch` with its recorded process `thread` for its own delta, followed by `result`. Its delta rewrites the lane files.
|
|
303
|
-
- A finding that comes back: `ask(run, "same-defect", …)`. `yes` gets one climb and one re-check of that line. Anything still open goes to the report, not into another round.
|
|
304
|
-
9. **verifier,** named `verifier-<M>`, with the run id, the milestone's A-lines and the **full check**, on a frozen tree: it owns the independent gate. Route it first. A native Claude verifier runs in the foreground on Claude Code; a Codex or other process verifier uses `dispatch`, end the turn, then `result`. A full check that starts while a role still edits proves nothing, and it has to run again. Never give it a worker's reply.
|
|
305
|
-
- It checks each gate item with `gate_check` first and skips an item that passed on the same content (carried over from its commit); it records each pass with `gate_pass`, runs independent items side by side within the lock's slots, and builds each commit's images once. It names git-ignored inputs (`.env`, generated files) in `paths` explicitly: `.` covers only HEAD and uncommitted not-ignored changes. It passes `gate_check` the milestone it verifies, so the digest lists only that milestone's carried items. `peek` and `status` show its current step.
|
|
306
|
-
- For a native Claude verifier only, call `record_agent_run(run, "verifier-<M>", "verifier", rung, …)`, with `status: "failed"` when its verdict is FAIL: only a PASS is recorded `ok`. Pass `verdict:`, its reply's first line. A process verifier on any backend counts through its dispatch record only when its reply opens `VERDICT: PASS`; collect it with `result` before landing.
|
|
307
|
-
- `VERDICT: BLOCKED: environment — <probe>` is the machine, not the work (a VPN filter, a Docker proxy, a dead registry): no fix round and no climb. `land` refuses it; surface it to the owner with `park`, and run a fresh verifier once it is fixed.
|
|
308
|
-
- On FAIL, the owning worker fixes it, then a **fresh** verifier re-checks (a resumed one can hang): a new `dispatch` or Agent with no `thread`, its brief naming the failed items (`gate_check(run, milestone)` lists them) and a 10-minute cap on each command; what passed is carried over.
|
|
309
|
-
- A second FAIL on the same line goes to the architect.
|
|
310
|
-
- A third one: pause, report and push.
|
|
311
|
-
10. **Land.** Commit the milestone path-scoped, then `land(run, milestone, what, commit, evidence, next, learned)`, passing `learned` when the milestone taught the next run something worth knowing (a slow suite, a flaky test, a pattern to copy); push if the profile's `notify` has `milestone`, with `digestPath` (the digest's full path: its commits, findings and what is open), and move to the next milestone. Only a verifier named exactly `verifier-<M>` counts, and the minutes leave out parked and paused time.
|
|
312
|
-
- `land` refuses (`E_LAND_GATE`) a milestone with no reviewer record (a `reviewer-<M>` dispatch record, or a native Claude `record_agent_run` row with role reviewer and that name, status `ok`) or no verifier verdict since its lanes started. A skip over an empty commit range is refused too: commit first. A milestone that changed only docs lands with `skip: "docs-only"`; one that changed no source file with `skip: "no-code"` and the required local gate evidence in `evidence`. Follow the repo's CI policy; a skill never authorizes triggering checks.
|
|
313
|
-
- Commit only while no role is writing. A pre-commit hook may stash unstaged files, and a role's edits vanish under it.
|
|
314
|
-
- The next milestone's lanes can start in the same turn as the `land`.
|
|
315
|
-
|
|
316
|
-
**Finish:** run the project's final gate if it has one.
|
|
317
|
-
|
|
318
|
-
- The verifier is the gate owner, with `gate_check` and `gate_pass`. On Claude Code a native Claude verifier runs in the **foreground** (`run_in_background: false`); a background subagent dies with the session. A process verifier on either host uses `dispatch`/`result` and its durable record; finish only after its PASS.
|
|
319
|
-
- Beside it, in the background:
|
|
320
|
-
- any independent review (a spec or milestone review by a fresh verifier);
|
|
321
|
-
- the writer's MR body;
|
|
322
|
-
- one **whole-app UI pass**, for what a change broke on a screen nobody touched.
|
|
323
|
-
- A gate FAIL goes to a fresh worker thread as one piece. The gate then re-runs from the start on the new SHA.
|
|
324
|
-
|
|
325
|
-
Then report to the user, in their language, and push if `notify` has `finish`:
|
|
326
|
-
|
|
327
|
-
- the verdict per milestone;
|
|
328
|
-
- the commits;
|
|
329
|
-
- one line per role run, with its rung;
|
|
330
|
-
- the time and token sums per backend and per rung, and the climbs with their reasons (`runs_summary({ run })`), the Claude subagent runs you reported (say they are reported, not measured), and the Jev decisions with how many fell back (`status(run)`);
|
|
331
|
-
- the harness line from `runs_summary`: what the user's claude-code and opencode customizations cost per run, so they can judge the isolation toggle (`/catherd-setup` offers it). Codex reports no per-request input, so it has no harness figure: say so instead of offering one;
|
|
332
|
-
- the run's budget spend (`status(run)`), if the profile set one;
|
|
333
|
-
- what was left open, and why.
|
|
334
|
-
|
|
335
|
-
Roles never commit. You commit, following the repo's rules.
|
|
336
|
-
|
|
337
|
-
## Brief for a role
|
|
338
|
-
|
|
339
|
-
The brief is the `brief` text you pass to `dispatch` (catherd writes it to the dispatch's own `brief.md` and hands it to the CLI on stdin), or the prompt of a native Claude role's Agent call on Claude Code, with the run id. It has these parts, in order:
|
|
340
|
-
|
|
341
|
-
1. The role and the goal, in one line.
|
|
342
|
-
2. The A-lines this run must meet.
|
|
343
|
-
3. The files it owns, and the files it must not touch. If the repo has a `CLAUDE.md`, add "Read CLAUDE.md first": Codex loads only `AGENTS.md`.
|
|
344
|
-
4. For a worker:
|
|
345
|
-
- "Read `<R>/lanes/Mx.Ly.md`": decisions, signatures, data shapes;
|
|
346
|
-
- its fast check (targeted tests, lint and type check), to run until it passes;
|
|
347
|
-
- "Run the full suite only if this brief says so", and "Wrap any full build or full test suite in `bunx catherd-cli@1.5.0 lock -- <command>`": other lanes share the machine.
|
|
348
|
-
5. For a reviewer: the A-lines and the changed files, with new files read in full. It reports every finding as `BLOCKER|BUG|NIT file:line — problem — fix`, covering:
|
|
349
|
-
- unmet A-lines and edge cases;
|
|
350
|
-
- code or abstractions nobody needs;
|
|
351
|
-
- comments that restate code;
|
|
352
|
-
- tests that assert nothing.
|
|
353
|
-
|
|
354
|
-
With no finding, the reply is `CLEAN`.
|
|
355
|
-
|
|
356
|
-
6. For a UI reviewer:
|
|
357
|
-
- the URL and the changed screens, by route;
|
|
358
|
-
- the viewports and themes;
|
|
359
|
-
- `agent-browser screenshot <R>/shots/<name>.png` at viewport size, not full page; it opens each PNG with its image tool;
|
|
360
|
-
- every finding is `BLOCKER|BUG|NIT <screen> — problem — fix — <R>/shots/<name>.png`, always with the path.
|
|
361
|
-
7. For an artist, per image:
|
|
362
|
-
- the screen, where the image sits, its shape;
|
|
363
|
-
- the mood and scene in words (subject, materials, light, colour): taste, not measurements;
|
|
364
|
-
- the final `.webp` path in the repo's assets folder. The worker's brief names the same path, so both lanes run at once.
|
|
365
|
-
|
|
366
|
-
Its rules:
|
|
367
|
-
- use the built-in image tool, and copy its untouched output from `${CODEX_HOME:-~/.codex}/generated_images/`; the record's `images` lists those paths;
|
|
368
|
-
- the only processing is `cwebp -q 85 in.png -o out.webp`;
|
|
369
|
-
- never paint, patch or upscale;
|
|
370
|
-
- never redraw a real logo, and never present a generated person as a real customer;
|
|
371
|
-
- add one provenance line per image to a `README.md` beside it.
|
|
372
|
-
|
|
373
|
-
The tool tops out around 1536×1024.
|
|
374
|
-
|
|
375
|
-
8. Not the reply shape: `dispatch` appends the role's reply contract to every brief ("Do not commit", at most 15 lines, and the last line `STATUS: complete|partial|blocked|refused — <one line why>`), and a native Claude role's agent carries it.
|
|
376
|
-
9. Not the lane file's text, the role's scratch folder or its catherd tools: with `lane`, `dispatch` inlines the lane file as it stands, and every brief names the role's `$TMPDIR` (`<run>/scratch/<name>/`) and how it reads its run's files.
|
|
377
|
-
|
|
378
|
-
## Reading results
|
|
379
|
-
|
|
380
|
-
- Read each record a catherd message announces, its `hints`, and the reply, with `result(run, name)`, nothing else. Read the stderr the `failed: read <path>` hint names, with `read_run_file`, only when `status` is `failed`. Never read a diff or a log yourself: that is the reviewer's and verifier's job, and your context is the run's most expensive token.
|
|
381
|
-
- Exit 0 means the model finished, not that it is right. The STATUS line is the role's claim; `changedOwned` and your fast check are the facts.
|
|
382
|
-
- `failed` comes only from a real turn failure or an exit with no reply; a reconnect mid-run does not count. Read the reply before you retry.
|
|
383
|
-
- `cli-too-old`: tell the user the upgrade command its `cli-too-old:` hint names. `limit` with no stand-in: a usage limit is the user's to fix: pause, report and push that turn. `timeout`: the role went quiet for the profile's idle minutes, or ran past its wall minutes; resume its thread once with where it stopped, then climb.
|
|
384
|
-
- `thread-heavy`: that thread is spent; its next piece starts fresh.
|
|
385
|
-
|
|
386
|
-
## Red flags
|
|
387
|
-
|
|
388
|
-
| You notice | Do instead |
|
|
389
|
-
| ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
390
|
-
| A lane waits on another lane that shares none of its files | Dispatch it now, beside the others |
|
|
391
|
-
| A role dispatched, then waited on, before the next independent one is dispatched | Dispatch every independent role first, then end your turn |
|
|
392
|
-
| `sleep`, `await_results`, a loop, or repeated `peek` to see whether a role is done | End your turn; use the host's completion input and durable `result` recovery |
|
|
393
|
-
| A worker or fix loop runs the full suite to check one change | Its fast check. The full check is the verifier's, once per milestone |
|
|
394
|
-
| A reviewer or verifier runs after each lane | Once per milestone, over the whole milestone |
|
|
395
|
-
| A third review round | One fix round, one climb for a returning defect, one re-check. The rest goes to the report |
|
|
396
|
-
| You open a diff, a log or a source file to judge the work | Send a reviewer, or the verifier |
|
|
397
|
-
| You open every screenshot | Read the findings. Open one path only to settle an unclear finding |
|
|
398
|
-
| The UI pass covers the whole app mid-run | Changed screens only. The whole app once, at finish |
|
|
399
|
-
| You write `state.md`, the ledger or a brief file with your own tools | The server writes `state.md`, `land` writes the ledger, `dispatch` writes the brief |
|
|
400
|
-
| A new bug, cleanup, re-run or climb sent with `thread` | A fresh thread. Resume only for that piece's own findings at the same rung |
|
|
401
|
-
| One transition spread over several turns (a land, routes, dispatches) | One turn: every independent call back to back, then one status line |
|
|
402
|
-
| A plan, log or test file read whole into your context | `read_run_file` for the one section, or `grep -n` then those lines. Or name the path in a brief |
|
|
403
|
-
| You copy the architect's plan into `plan.md` yourself | The architect writes `plan.md` and the lane files. With a plan in hand, it copies the user's plan into them |
|
|
404
|
-
| A dossier, or an architect designing afresh, with a plan in hand | No dossier. Brief the architect to translate the plan, and to design only what it leaves undecided |
|
|
405
|
-
| A dossier or an architect for a polish or fix run | Write the lane files from the A-lines yourself |
|
|
406
|
-
| A lane file without an `Owns:` line | Add it: `dispatch` refuses the lane without one |
|
|
407
|
-
| A native Claude subagent on Claude Code returned and you moved on | `record_agent_run` with its `total_tokens` and `duration_ms` first |
|
|
408
|
-
| A rung written as `model#effort` | `backend:model#effort`, exactly as `route` returned it |
|
|
409
|
-
| `dispatch` retried after an `E_*` error without doing what its `fix` says | Do the `fix`, or pause and tell the user |
|
|
410
|
-
| A `cannot-start` preflight lane dispatched anyway | Fix its fast check first, and run `preflight` again |
|
|
411
|
-
| You pick a rung by feel | `route`. Its default covers the case where Jev is unsure or down |
|
|
412
|
-
| Jev's answer taken as proof a lane is done | Jev picks who works. Checks, the reviewer and the verifier decide done |
|
|
413
|
-
| A reply from the lowest Track A rung trusted without your fast check | Run it. Cheap rungs hide broken tools |
|
|
414
|
-
| A reviewer, or a `logic`/`hard` lane, on a rung you chose yourself | The rung `route` returned |
|
|
415
|
-
| Exit 0 with the owned files unchanged, treated as done | A refusal: climb with reason `unchanged` |
|
|
416
|
-
| A native Claude gate verifier dispatched in the background | Foreground on Claude Code; process verifiers use `dispatch`/`result` on either host |
|
|
417
|
-
| A full check started while a worker still edits | Wait for a frozen tree. That run proves nothing |
|
|
418
|
-
| Lanes dispatched before `preflight` ran | Run `preflight(run)` first; a lane whose check cannot even start wastes a dispatch |
|
|
419
|
-
| An architect planning without reading what past runs learned | `read_knowledge(repo)` first, from the dossier brief |
|
|
420
|
-
| A landed milestone that taught something, landed without `learned` | Pass it: the next run's architect reads `knowledge.md` |
|
|
421
|
-
| You update catherd, this plugin or the profile while a run is in flight | After the run. A role mid-flight must see one version |
|
|
422
|
-
| You stop to ask the user something mid-run | Decide within the A-lines and note it for the report. A product question outside them parks its milestone (`park`), with a push; the rest goes on |
|
|
423
|
-
| A brief that spells out the reply shape and the STATUS line | `dispatch` appends the reply contract itself |
|
|
424
|
-
| A milestone landed without its reviewer and verifier | `reviewer-<M>`, then the routed verifier's independent PASS, then `land` |
|
|
425
|
-
| A climb for a finding that questions the plan or the lane's owned files | `ask` finding, then the architect. `climb` refuses it (`E_CLIMB_DESIGN`) |
|
|
426
|
-
| A gate item run again on content that already passed it | The verifier's `gate_check` carries it over |
|
|
427
|
-
| A push for progress that is not a landed milestone, the finish or a block | No push. `status(run)` answers when the user asks |
|
|
428
|
-
| Your own decision changes behavior that already exists and no A-line asked for it (e.g. re-numbering `list` to match a new command) | Pick the option that keeps existing behavior, and fit the new code to it |
|
|
429
|
-
| `Agent(subagent_type: "Plan", model: "opus")` for the architect | Route first: native Claude's returned `agent` with no model on Claude Code, otherwise `dispatch`/`result` |
|
|
430
|
-
| `dispatch` called from a subagent | The main thread: catherd messages the session that dispatched |
|
|
431
|
-
| `codex exec` or `opencode run` called by hand | Always `dispatch`: it records the run, keeps `state.md` true and guards the lanes |
|
|
432
|
-
| You isolate a role's harness yourself, or tell a role to ignore the user's config | Never. Only the profile's `harness.<name>.isolated`, which the user sets |
|
|
433
|
-
| The architect's plan contains function bodies | Ask for decisions and signatures. The worker writes the code |
|
|
434
|
-
| "It's one line, I'll fix it myself" | Send it to the worker's thread |
|
|
435
|
-
| The artist's image was resized, retouched or patched | Regenerate it from the artist's thread |
|
|
28
|
+
Six tools, nothing else.
|
|
29
|
+
|
|
30
|
+
| Tool | Use |
|
|
31
|
+
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| `run_start(repo, title, a_lines, plan?, base?)` | Starts a run. Returns its id and the notify url its questions go to. |
|
|
33
|
+
| `status(run?)` | Each run's phase, milestones, live roles, parked questions, quota holds and whether the daemon is alive (a dead one is restarted). |
|
|
34
|
+
| `answer(run, unit, answer)` | Answers a parked unit (the run, a milestone or a lane); it runs again with the answer. |
|
|
35
|
+
| `cancel(run)` | Stops the run: every live role is cancelled. |
|
|
36
|
+
| `result(run, name?)` | The run's report, or with `name` one role's record. |
|
|
37
|
+
| `profile(action, …)` | Reads, validates or changes a profile, or sets `notify_url`. Tuning is the `catherd-setup` skill's. |
|
|
38
|
+
|
|
39
|
+
## Starting a run
|
|
40
|
+
|
|
41
|
+
1. Write the A-lines, the acceptance lines the work must meet, one per line, each checkable. Ask the owner every
|
|
42
|
+
product question first, before the run starts: a daemon that must park later costs a round trip.
|
|
43
|
+
2. A plan the owner already has ("implement the plan at …", a scorecard prompt) goes in `run_start`'s `plan:`
|
|
44
|
+
(several files, a contracts file included, as a list); an A-line `plan: <path>[, <path>…]` does the same. Write
|
|
45
|
+
only the acceptance lines the plan does not already state. The run then skips the dossier, and the architect
|
|
46
|
+
translates the plan instead of designing. With no plan, say that the architect writes one first, and the run
|
|
47
|
+
waits once for the owner's approval of it.
|
|
48
|
+
3. Call `run_start(repo, title, a_lines, plan?)` with the repo's absolute path. If it fails, `error.code` and
|
|
49
|
+
`error.fix` say what to do; relay them.
|
|
50
|
+
A run whose milestones should each be their own branch and merge request takes a `base`, a branch on origin
|
|
51
|
+
(`run_start(repo, title, a_lines, base)`). Each milestone then works in its own worktree from `origin/<base>`;
|
|
52
|
+
independent milestones run side by side while the machine has the memory for them (the profile's
|
|
53
|
+
`limits.memory`); a milestone that builds on another names it on an `After:` line. Without `base`, the run
|
|
54
|
+
works in the repo, one milestone at a time.
|
|
55
|
+
4. Tell the owner the run id and the notify url (an ntfy topic) to subscribe to on the phone: that is where a
|
|
56
|
+
parked question and the final report arrive.
|
|
57
|
+
5. End the turn. **The run does not need this session: it continues if the session is compacted or closed.**
|
|
58
|
+
Never poll, `sleep` or loop on `status`.
|
|
59
|
+
|
|
60
|
+
## When the run reports
|
|
61
|
+
|
|
62
|
+
A report reaches you as a catherd message (`<cross-session-message from-name="catherd">`) or the owner reads the
|
|
63
|
+
phone notice and asks. Either way:
|
|
64
|
+
|
|
65
|
+
1. Call `status(run)`. It lists the parked units with their questions, the live roles and any quota hold (a hold
|
|
66
|
+
lifts by itself; say when).
|
|
67
|
+
2. A parked unit is the owner's question. Put it to them in their own language, with the daemon's context and your
|
|
68
|
+
recommended answer, one question at a time. Pass their answer with `answer(run, unit, answer)` and nothing
|
|
69
|
+
else: do not rephrase it into a decision of your own. The run goes on with the work that does not depend on it.
|
|
70
|
+
A question may also be the plan's approval: relay `catherd run-file read <run> plan.md` for the owner to read,
|
|
71
|
+
then pass `answer approve` (the owner's yes) or the owner's changes as the answer; the architect revises and the
|
|
72
|
+
run asks again, the same way. It asks again later only when an architect change edits an approved `D<n>`
|
|
73
|
+
decision. A parked lane whose question quotes a DESIGN: line is a conflict between the plan and the code: the
|
|
74
|
+
owner answers it (the plan or the code changes). A question may also be a `push` (a landed milestone of a run with a base branch waits for the owner: relay the
|
|
75
|
+
question with its commands; an `answer push` has catherd push the branch and ask again with the MR command, and
|
|
76
|
+
any other answer, once the MR is merged, unblocks the milestones after it, which matters when the repo squash-merges)
|
|
77
|
+
or a `check_broken` (the milestone's check cannot run, so fix the environment, then answer).
|
|
78
|
+
3. A role that failed, a gate that is red or a milestone that climbed is the daemon's to handle; report it, do not
|
|
79
|
+
step in. The secret scan of a milestone's check uses `gitleaks` when it is installed; it is optional. Stop the run only on the owner's word: `cancel(run)`.
|
|
80
|
+
|
|
81
|
+
## The end
|
|
82
|
+
|
|
83
|
+
When `status(run)` shows the run ended, call `result(run)` and relay the report in the owner's language: what
|
|
84
|
+
landed, the known issues, and what the judge decided and why. `result(run, name)` shows one role's record when the
|
|
85
|
+
owner asks how a lane went.
|
|
86
|
+
|
|
87
|
+
The report may end with a rules review: a judge's proposed changes to the repo's standing rules, each with its
|
|
88
|
+
`catherd knowledge add` or `catherd knowledge rm` command, and the run has already ended. Give the owner each change in
|
|
89
|
+
one line and run a command only on their yes; a rule for some roles only is written
|
|
90
|
+
`catherd knowledge add "[worker, reviewer] <rule>"`.
|
|
91
|
+
|
|
92
|
+
**Push and the merge request only on the owner's word.** The run lands milestones on its own branch and pushes
|
|
93
|
+
it only when the owner answers `push`; catherd never opens an MR or merges. A merge request title is the run's outcome, under 72 characters, never the branch name.
|
|
94
|
+
|
|
95
|
+
## Errors
|
|
96
|
+
|
|
97
|
+
A tool failure carries `error.code`, `error.message` and often `error.fix`: act on the fix before you retry, and
|
|
98
|
+
tell the owner when the fix is theirs. Codes you will meet:
|
|
99
|
+
|
|
100
|
+
- `E_RUN_BUDGET`: the run's budget is spent; the owner raises it in the profile (`catherd-setup`) or ends the run.
|
|
101
|
+
- `E_BACKEND_NOT_LOGGED_IN`: a backend the run needs has no login; the owner logs in, then the daemon proceeds.
|
|
102
|
+
- `E_ADMIT_RUNG`: no rung can fill a role; the profile needs one (`catherd-setup`).
|
|
103
|
+
- `E_ROLE_SCOPE`: a role session called `run_start`, `answer`, `cancel`, `result` or `profile`; only you, the owner's session, may.
|
|
104
|
+
|
|
105
|
+
## What not to do
|
|
106
|
+
|
|
107
|
+
- Do not run the work yourself while a run is in flight: a second writer in the repo races the daemon's lanes.
|
|
108
|
+
- Do not promise a time: the roles take what they take, and a quota hold waits for its window.
|
|
109
|
+
- Do not copy secrets, tokens or notify urls into a lane, an A-line or a message to a role.
|
|
110
|
+
- Do not call `catherd` from a shell to drive a run; the six tools are the interface. `catherd answer` and
|
|
111
|
+
`catherd runs` are the owner's own terminal.
|