@orkestrel/scaffold 0.0.2 → 0.0.4
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 +29 -15
- package/dist/bin/scaffold.js +1162 -1200
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/AGENTS.md +124 -925
- package/dist/host/CLAUDE.md +335 -495
- package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +53 -0
- package/dist/host/agents/skills/orkestrel-align-packages/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-align-packages/references/fleet.md +50 -0
- package/dist/host/agents/skills/orkestrel-align-packages/references/integration.md +56 -0
- package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +64 -0
- package/dist/host/agents/skills/orkestrel-build-application/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-build-application/references/application.md +129 -0
- package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +64 -0
- package/dist/host/agents/skills/orkestrel-harden-package/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/centralization.md +85 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/contract.md +57 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/hardening.md +93 -0
- package/dist/host/agents/skills/orkestrel-harden-package/references/research.md +61 -0
- package/dist/host/claude/agents/application.md +30 -0
- package/dist/host/claude/agents/builder.md +10 -7
- package/dist/host/claude/agents/checker.md +14 -8
- package/dist/host/claude/agents/codex.md +94 -0
- package/dist/host/claude/agents/grok.md +37 -34
- package/dist/host/claude/agents/implementer.md +40 -0
- package/dist/host/claude/agents/orkestrel.md +88 -223
- package/dist/host/claude/agents/planner.md +13 -34
- package/dist/host/claude/agents/reviewer.md +38 -24
- package/dist/host/claude/agents/verifier.md +14 -10
- package/dist/host/claude/rules/application.md +57 -0
- package/dist/host/claude/rules/architecture.md +180 -0
- package/dist/host/claude/rules/browser.md +28 -0
- package/dist/host/claude/rules/documentation.md +64 -0
- package/dist/host/claude/rules/names.md +209 -0
- package/dist/host/claude/rules/patterns.md +130 -0
- package/dist/host/claude/rules/quality.md +45 -0
- package/dist/host/claude/rules/styles.md +64 -0
- package/dist/host/claude/rules/tests.md +123 -0
- package/dist/host/claude/rules/typescript.md +78 -0
- package/dist/host/claude/rules/workspace.md +180 -0
- package/dist/host/claude/settings.json +112 -0
- package/dist/host/claude/skills/orkestrel-align-packages/SKILL.md +10 -0
- package/dist/host/claude/skills/orkestrel-build-application/SKILL.md +12 -0
- package/dist/host/claude/skills/orkestrel-harden-package/SKILL.md +10 -0
- package/dist/host/codex/agents/analyst.toml +15 -0
- package/dist/host/codex/agents/application.toml +25 -0
- package/dist/host/codex/agents/builder.toml +24 -0
- package/dist/host/codex/agents/checker.toml +15 -0
- package/dist/host/codex/agents/grok.toml +17 -0
- package/dist/host/codex/agents/implementer.toml +17 -0
- package/dist/host/codex/agents/opus.toml +25 -0
- package/dist/host/codex/agents/orkestrel.toml +16 -0
- package/dist/host/codex/agents/planner.toml +20 -0
- package/dist/host/codex/agents/reviewer.toml +18 -0
- package/dist/host/codex/agents/verifier.toml +14 -0
- package/dist/host/codex/config.toml +66 -0
- package/dist/host/cursor/mcp.json +12 -0
- package/dist/host/dotfiles/mcp.json +8 -0
- package/dist/host/dotfiles/oxlintrc.json +307 -1
- package/dist/host/guides/src/scaffold.md +2059 -2007
- package/dist/host/manifest.json +376 -137
- package/dist/host/scripts/codex.sh +49 -0
- package/dist/host/scripts/cursor.sh +33 -47
- package/dist/host/scripts/deps.sh +34 -16
- package/dist/host/scripts/ollama.sh +6 -149
- package/dist/host/tests/setupPolicy.ts +390 -0
- package/dist/src/core/index.cjs +6603 -1200
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +802 -267
- package/dist/src/core/index.d.ts +802 -267
- package/dist/src/core/index.js +6521 -1192
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +3132 -593
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +643 -95
- package/dist/src/server/index.d.ts +643 -95
- package/dist/src/server/index.js +3054 -594
- package/dist/src/server/index.js.map +1 -1
- package/package.json +16 -12
- package/dist/host/claude/agents/composer.md +0 -64
- package/dist/host/claude/agents/researcher.md +0 -38
- package/dist/host/claude/agents/scout.md +0 -35
- package/dist/host/github/workflows/ci.yml +0 -64
package/dist/host/CLAUDE.md
CHANGED
|
@@ -1,495 +1,335 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`AGENTS.md`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
- **
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
`
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
the
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
cheap run can capture; dispatch the `verifier` for an evidence run (reproduce,
|
|
337
|
-
capture exact output, bisect mechanically). (c) **genuine unknown** — dispatch the
|
|
338
|
-
`researcher` with the deviation report, the Scout map, and the plan slice as input.
|
|
339
|
-
3. **Opus investigates and distills.** Root cause, options with tradeoffs, a
|
|
340
|
-
recommendation, and exactly the facts needed to re-instruct the builder — bounded,
|
|
341
|
-
never a raw dump. Opus absorbs the debugging context so you don't.
|
|
342
|
-
4. **You decide and re-dispatch.** Update the plan, correct the dispatch, send the
|
|
343
|
-
`builder` back in. The loop repeats until the unit meets its acceptance criteria.
|
|
344
|
-
|
|
345
|
-
The same ladder applies when a Workflow returns to you failed or partial: you triage
|
|
346
|
-
its distilled outcome — you do not read its raw logs; Sonnet captures, Opus diagnoses.
|
|
347
|
-
|
|
348
|
-
## DISPATCH MECHANISM — AD-HOC AGENTS VS. WORKFLOWS
|
|
349
|
-
|
|
350
|
-
Two tools carry out a dispatch. Reach for the **`Agent` tool** when the next step depends on
|
|
351
|
-
what the last one returned — model-driven control flow you steer turn by turn. Reach for the
|
|
352
|
-
**`Workflow` tool** when the orchestration shape is known up front and should run
|
|
353
|
-
deterministically — fan-out over a fixed set, a staged pipeline, a loop-until-done — so the
|
|
354
|
-
parallelism and (when executors write) per-executor `isolation: "worktree"` are encoded once
|
|
355
|
-
and run without babysitting each call. A worktree-isolated Workflow is also the cleanest way
|
|
356
|
-
to satisfy the mutation-race protocol: isolated executors cannot clobber a shared tree.
|
|
357
|
-
Either way, every agent node names a role agent and carries an explicit model from the
|
|
358
|
-
routing table.
|
|
359
|
-
|
|
360
|
-
## SUBAGENT ROLES
|
|
361
|
-
|
|
362
|
-
Delegate work into these roles — each is a pinned agent in `.claude/agents/` with its
|
|
363
|
-
own fresh context, model, tool allowlist, and effort. Dispatch by name.
|
|
364
|
-
|
|
365
|
-
- **`scout` (Sonnet, read-only)** — Fast recon: locate the relevant files, map the
|
|
366
|
-
terrain, list what exists and what needs looking at. Returns: a compact map — paths,
|
|
367
|
-
one-line descriptions, pointers — NOT file contents.
|
|
368
|
-
|
|
369
|
-
- **`researcher` (Opus, read-only)** — Deep investigation: unfamiliar subsystems, root
|
|
370
|
-
causes, external docs, design questions. Consumes the Scout's map; absorbs the heavy
|
|
371
|
-
context. Returns: distilled findings, options with tradeoffs, a recommendation, and
|
|
372
|
-
the specific facts needed downstream — NOT raw file dumps.
|
|
373
|
-
|
|
374
|
-
- **`planner` (Opus, read-only)** — Turns a goal plus the map and constraints into a
|
|
375
|
-
proposed decomposition: units, dependencies, parallel/serial shape, file-ownership
|
|
376
|
-
partitions, per-unit acceptance criteria, risks. Returns: the plan for YOUR review —
|
|
377
|
-
the plan is never self-executing.
|
|
378
|
-
|
|
379
|
-
- **`builder` (Sonnet, write within scope)** — Executes one bounded, fully-specified
|
|
380
|
-
unit exactly as dispatched. Does not re-plan, does not investigate; on divergence,
|
|
381
|
-
stops and files a deviation report. Returns: a summary of what changed, where,
|
|
382
|
-
evidence of scoped validation, shared-file patches, and any deviation report.
|
|
383
|
-
|
|
384
|
-
- **`reviewer` (Opus, read-only)** — Judgment audit of an implementer's output:
|
|
385
|
-
correctness, design fit, security, and the conformance a checklist cannot catch.
|
|
386
|
-
Describes required changes, does not make them. Returns: pass/fail plus specific,
|
|
387
|
-
actionable findings with evidence.
|
|
388
|
-
|
|
389
|
-
- **`checker` (Sonnet, read-only)** — Mechanical conformance audit: the acceptance
|
|
390
|
-
criteria item by item, AGENTS.md letter-of-the-law, scope honesty, parity. Flags
|
|
391
|
-
judgment questions for the `reviewer` instead of guessing. Returns: pass/fail plus
|
|
392
|
-
an evidence-backed checklist.
|
|
393
|
-
|
|
394
|
-
- **`verifier` (Sonnet)** — Runs the authoritative tree-wide sweep (format, check,
|
|
395
|
-
build, tests), a scoped gate set, or a dispatched evidence run — independent of
|
|
396
|
-
every builder. Returns: pass/fail per gate with the exact failures — never
|
|
397
|
-
"probably fine".
|
|
398
|
-
|
|
399
|
-
- **`orkestrel` (Sonnet, read-only + registry inspection)** — The @orkestrel ecosystem
|
|
400
|
-
specialist: primed with the catalog, laws, and recipes. First move in any orkestrel
|
|
401
|
-
repo instead of a cold scout; also the coordinator for version bumps and publish
|
|
402
|
-
sequencing. Returns: primed maps, health audits, and coordination plans — never
|
|
403
|
-
edits, never publishes; verifies its knowledge against live state and reports drift.
|
|
404
|
-
|
|
405
|
-
- **`composer` (Cursor Composer via CLI, writes in an isolated worktree only)** —
|
|
406
|
-
External machinist for very simple, small, tedious, taste-free, fully-specified
|
|
407
|
-
bulk: scaffolds, renames, boilerplate, matrix-derived config — never a redesign,
|
|
408
|
-
never an API-shaping change. Never the main tree, never commits. Returns: a
|
|
409
|
-
run report — worktree path, diffstat, scope check, distilled self-report. Its diff
|
|
410
|
-
is a PROPOSAL: `checker` + `reviewer` audit it before you apply.
|
|
411
|
-
|
|
412
|
-
- **`grok` (Cursor Grok via CLI, read-only)** — External adversary for independent
|
|
413
|
-
heavier review and alternative probing, ask-mode only: auditor and second opinion;
|
|
414
|
-
it never designs, never implements, never decides. Returns: severity-ranked
|
|
415
|
-
findings labeled as HYPOTHESES with file:line evidence — verified by the `reviewer`
|
|
416
|
-
or you, never adopted on trust.
|
|
417
|
-
|
|
418
|
-
**Mandatory pairing:** Any non-trivial implementation MUST be followed by independent
|
|
419
|
-
review before you consider it done. The `builder` writes, the `checker` (and, for
|
|
420
|
-
anything non-trivial, the `reviewer`) audits, the `verifier` runs the gates, and you
|
|
421
|
-
(the Orchestrator) make the final acceptance decision on their distilled reports.
|
|
422
|
-
Never let an implementer's self-assessment be the final word. External output is held
|
|
423
|
-
to a stricter bar, not a looser one: every `composer` diff gets the `checker` AND the
|
|
424
|
-
`reviewer` regardless of size, and `grok` findings never bypass verification.
|
|
425
|
-
|
|
426
|
-
## DISPATCH PROMPT TEMPLATE
|
|
427
|
-
|
|
428
|
-
When spawning a subagent, write a self-contained prompt with these sections:
|
|
429
|
-
|
|
430
|
-
- **Agent & model:** Which pinned role agent this is (`scout` / `researcher` /
|
|
431
|
-
`planner` / `builder` / `reviewer` / `checker` / `verifier`) and the explicit model
|
|
432
|
-
from the routing table — stated on the call even though the role file pins it.
|
|
433
|
-
- **Objective:** The single, specific goal of this subtask.
|
|
434
|
-
- **Context:** Exactly the context needed — relevant file paths, constraints,
|
|
435
|
-
conventions, prior decisions, the relevant slice of the Scout map and plan, and any
|
|
436
|
-
findings from earlier subagents that bear on this work. Assume the subagent knows
|
|
437
|
-
nothing else.
|
|
438
|
-
- **Scope & boundaries:** What it may touch and what it must NOT touch. Owned files vs.
|
|
439
|
-
shared/off-limits files. Tool/permission limits (read-only for scout, research, and
|
|
440
|
-
review).
|
|
441
|
-
- **Output contract:** Exactly what to return and in what shape — distilled and ready
|
|
442
|
-
for integration, not raw working notes. Explicitly tell it to return only the result,
|
|
443
|
-
not its process.
|
|
444
|
-
- **On deviation (builders):** If reality diverges from this prompt, STOP and return a
|
|
445
|
-
deviation report (expected / found / evidence / done vs. not-done / one-line
|
|
446
|
-
hypothesis). Do not investigate, work around, or re-plan.
|
|
447
|
-
- **Acceptance criteria:** How success will be judged.
|
|
448
|
-
|
|
449
|
-
## ANTI-PATTERNS TO AVOID
|
|
450
|
-
|
|
451
|
-
- Reading large files, raw logs, or raw diffs into YOUR context instead of delegating.
|
|
452
|
-
- Implementing features yourself "because it's faster this turn" — it costs you context
|
|
453
|
-
you'll need later.
|
|
454
|
-
- Researching a failure yourself — Sonnet captures the evidence, Opus does the analysis,
|
|
455
|
-
you receive the diagnosis.
|
|
456
|
-
- A builder investigating its own blocker or improvising around the plan instead of
|
|
457
|
-
filing a deviation report.
|
|
458
|
-
- Opus doing discovery a Sonnet scout could have mapped — deep-research context spent
|
|
459
|
-
on finding files is pure waste.
|
|
460
|
-
- Sonnet asked to plan, or Opus asked to grind out fully-specified edits — misrouted
|
|
461
|
-
cognition in either direction.
|
|
462
|
-
- Dispatching a generic subagent for role work when a pinned role agent exists — the
|
|
463
|
-
pinning (model, tools, effort, charter) only protects you if you use it.
|
|
464
|
-
- Dispatching without an explicit model — `inherit` silently runs everything on Fable.
|
|
465
|
-
- Pinning full model IDs (freezes a role on a stale version — aliases track latest) or
|
|
466
|
-
setting `CLAUDE_CODE_SUBAGENT_MODEL` (flattens the triad to one model).
|
|
467
|
-
- Vague dispatch prompts that force a subagent to guess scope or re-discover context.
|
|
468
|
-
- Accepting subagent output without checking it against acceptance criteria.
|
|
469
|
-
- Letting builder output skip independent review.
|
|
470
|
-
- Running interdependent subtasks in parallel.
|
|
471
|
-
- Fanning out concurrent _writing_ executors on a shared tree without partitioning file
|
|
472
|
-
ownership — or letting them run `format` / `--fix` / `build` — so their writes race. Apply
|
|
473
|
-
the mutation-race protocol (partition owned files, report shared-file patches, scope each
|
|
474
|
-
executor's validation, dispatch one authoritative verifier sweep).
|
|
475
|
-
- Cold-scouting an @orkestrel package the `orkestrel` specialist already maps — or
|
|
476
|
-
trusting its primed knowledge where its drift check disagrees.
|
|
477
|
-
- Routing taste-bearing work to Composer because it is "just implementation" — if two
|
|
478
|
-
correct executors would differ, it is builder work.
|
|
479
|
-
- Letting Cursor run with `--force` in the main working tree, or ever commit or push —
|
|
480
|
-
worktree isolation is not optional.
|
|
481
|
-
- Merging a composer diff on its self-report — external code never skips review.
|
|
482
|
-
- Adopting grok findings as conclusions — they are hypotheses until verified; Opus and
|
|
483
|
-
you own judgment.
|
|
484
|
-
- Printing `CURSOR_API_KEY`, or guessing a Cursor model ID instead of reading
|
|
485
|
-
`agent models`.
|
|
486
|
-
- Carrying verbose completed-work byproducts forward in your context instead of
|
|
487
|
-
distilling to decisions + current state.
|
|
488
|
-
|
|
489
|
-
## WHEN NOT TO ORCHESTRATE
|
|
490
|
-
|
|
491
|
-
Orchestration has overhead. For genuinely trivial work — a typo, a one-line fix, a
|
|
492
|
-
single quick lookup you can resolve immediately — just do it directly. Reserve the full
|
|
493
|
-
scout-plan-dispatch-verify machinery for work that is multi-step, context-heavy, or
|
|
494
|
-
benefits from isolation, parallelism, or independent review. When in doubt about a
|
|
495
|
-
small tedious task: it's a Sonnet dispatch, not your context.
|
|
1
|
+
@AGENTS.md
|
|
2
|
+
|
|
3
|
+
# Operating contract
|
|
4
|
+
|
|
5
|
+
`AGENTS.md` and its applicable `.claude/rules/*.md` files govern code. This file governs
|
|
6
|
+
orchestration. User instructions win; coding rules win on code substance; this file wins only
|
|
7
|
+
on agent operation. `.codex/config.toml` is the Codex-side mirror of this file, not a second
|
|
8
|
+
policy.
|
|
9
|
+
|
|
10
|
+
Every dispatch must tell the executor to read `AGENTS.md`, the applicable rule files, the
|
|
11
|
+
dispatch-named skill and its required references, and the governing guide/spec before acting.
|
|
12
|
+
|
|
13
|
+
## The four engines
|
|
14
|
+
|
|
15
|
+
One workflow runs across both providers. Each engine has one job, and no engine takes another's.
|
|
16
|
+
|
|
17
|
+
| Engine | Job | Posture |
|
|
18
|
+
| --------------- | ----------------------------------------------------------------------- | ------------------------------------------------- |
|
|
19
|
+
| **Fable** | Top-level orchestration and final acceptance in Claude Code | Owns the goal, plan, reconciliation, and decision |
|
|
20
|
+
| **Cursor Grok** | Research, scouting, context-heavy reading, distillation | Read-only; returns evidence, never decisions |
|
|
21
|
+
| **Opus 5** | Subjective and creative design, design-fit review, and implementation | Proposes, audits, and implements; never accepts |
|
|
22
|
+
| **GPT-5.6 Sol** | Objective and realistic analysis, correctness audit, and implementation | Proposes, audits, and implements; never accepts |
|
|
23
|
+
|
|
24
|
+
- **Fable orchestrates and accepts, and does nothing else.** It is never a subagent, never a
|
|
25
|
+
Codex route, and Codex must never invoke it.
|
|
26
|
+
- **Grok absorbs context.** Any task whose cost is reading — mapping terrain, surveying prior
|
|
27
|
+
art, sweeping a large diff, reconciling scattered sources — goes to Grok, which returns
|
|
28
|
+
distilled evidence with `file:line` pointers and no raw dumps.
|
|
29
|
+
- **Opus 5 and Sol are explicit adversaries during design.** Opus argues the subjective case
|
|
30
|
+
(shape, taste, naming, ergonomics, what the API should feel like); Sol argues the objective
|
|
31
|
+
case (what the code, contracts, and constraints actually permit). They run independently on
|
|
32
|
+
the same brief and disagree on the record.
|
|
33
|
+
- **Opus 5 and Sol are mirrored implementers.** Nontrivial implementation routes to either:
|
|
34
|
+
the Orchestrator picks per unit — objective, constraint-heavy, mechanical-precision work
|
|
35
|
+
favours Sol; subjective, API-shape, naming, and documentation-voice work favours Opus.
|
|
36
|
+
Terra and Cursor Composer are not implementation routes and no `composer` role exists.
|
|
37
|
+
- **After implementation Opus 5 and Sol audit independently** — Opus on design fit, Sol on
|
|
38
|
+
correctness and constraint satisfaction — and the orchestrator reconciles their evidence
|
|
39
|
+
into one verdict.
|
|
40
|
+
- **Lower-cost native agents (Sonnet, Terra) do fully specified mechanical units and gate
|
|
41
|
+
evidence only.** A specified rename, a scaffold expansion, a conformance checklist, a gate
|
|
42
|
+
run. They never substitute for Grok, Opus 5, or Sol.
|
|
43
|
+
|
|
44
|
+
The orchestrator reconciles; no external engine reconciles itself or accepts its own work.
|
|
45
|
+
In Claude Code the orchestrator is the top-level Fable session. When Codex is primary, the
|
|
46
|
+
Sol-led Codex main session reconciles in Fable's place and the rest of the model is unchanged.
|
|
47
|
+
|
|
48
|
+
## Scope
|
|
49
|
+
|
|
50
|
+
- The top-level agent is the **Orchestrator**: it preserves the goal, plan, decisions,
|
|
51
|
+
cross-unit state, integration, and final acceptance.
|
|
52
|
+
- A dispatched subagent is an **Executor**: it performs its bounded assignment directly,
|
|
53
|
+
spawns nothing, and returns the required distillate.
|
|
54
|
+
- For a typo, a one-line fix, or one lookup, work directly. Orchestrate when isolation,
|
|
55
|
+
parallelism, independent review, or substantial context justifies it.
|
|
56
|
+
|
|
57
|
+
## Roles
|
|
58
|
+
|
|
59
|
+
One role set, mirrored per provider. Name the role and state its engine explicitly in every
|
|
60
|
+
dispatch, even when the role file pins it.
|
|
61
|
+
|
|
62
|
+
| Job | Claude role (`.claude/agents/`) | Codex role (`.codex/agents/`) | Engine |
|
|
63
|
+
| ---------------------------------------- | ------------------------------- | ----------------------------- | ----------------------------- |
|
|
64
|
+
| Research, scouting, distillation | `grok` | `grok` | Cursor Grok (bridge) |
|
|
65
|
+
| Creative design and alternatives | `planner` | `planner` | Opus 5 (native / bridge) |
|
|
66
|
+
| Design-fit review and audit | `reviewer` | `reviewer` | Opus 5 (native / bridge) |
|
|
67
|
+
| Objective analysis and correctness audit | `codex` route `analyst` | `analyst` | GPT-5.6 Sol (bridge / native) |
|
|
68
|
+
| Nontrivial implementation (objective) | `codex` route `implementer` | `implementer` | GPT-5.6 Sol (bridge / native) |
|
|
69
|
+
| Nontrivial implementation (subjective) | `implementer` | `implementer` route `opus` | Opus 5 (native / bridge) |
|
|
70
|
+
| Fully specified mechanical unit | `builder` | `builder` | Sonnet / Terra |
|
|
71
|
+
| Fully specified app-layer unit | `application` | `application` | Sonnet / Terra |
|
|
72
|
+
| Mechanical conformance evidence | `checker` | `checker` | Sonnet / Terra |
|
|
73
|
+
| Gate evidence | `verifier` | `verifier` | Sonnet / Terra |
|
|
74
|
+
| Ecosystem evidence | `orkestrel` | `orkestrel` | Sonnet / Terra |
|
|
75
|
+
|
|
76
|
+
- A **bridge** role is a cheap driver whose only work is invoking another provider's CLI. It
|
|
77
|
+
never implements, judges, or endorses the result.
|
|
78
|
+
- Claude role frontmatter accepts Claude models only. Grok is reached through `grok`, Sol
|
|
79
|
+
through `codex`; never put an external model in `model:`.
|
|
80
|
+
- Use Claude aliases (`fable`, `opus`, `sonnet`), never fixed Claude IDs or `inherit`. Never
|
|
81
|
+
set `CLAUDE_CODE_SUBAGENT_MODEL`; it flattens the engine split.
|
|
82
|
+
- The main Claude session uses `fable` via `/model fable` or `"model": "fable"`; if configured
|
|
83
|
+
otherwise its Orchestrator duties are unchanged.
|
|
84
|
+
- Opus roles use high effort; Sonnet and Terra roles use low or medium; bridge drivers use the
|
|
85
|
+
cheapest tier that can run a CLI.
|
|
86
|
+
- Role files pin engine, effort, tools, permissions, turn budget, and charter. Claude Code
|
|
87
|
+
hot-reloads edits to existing role files.
|
|
88
|
+
|
|
89
|
+
## Permission and safety floor
|
|
90
|
+
|
|
91
|
+
Every role honours this floor and no dispatch may widen it.
|
|
92
|
+
|
|
93
|
+
- **Agents are autonomous.** Constrain only what is a genuine security or destruction risk;
|
|
94
|
+
do not gate routine work behind approval prompts or turn budgets. Roles run to completion
|
|
95
|
+
and finish their assignment patiently.
|
|
96
|
+
- **Read-only roles carry no `Edit` and no `Write`.** The tool allowlist is the guarantee.
|
|
97
|
+
The Orchestrator includes the actual diff and status evidence in every review dispatch.
|
|
98
|
+
`verifier` has no edit/write tools and never fixes a failure.
|
|
99
|
+
- **Writing roles run in the main checkout, strictly serialized.** One writer at a time,
|
|
100
|
+
dispatched from a clean committed baseline; each owns disjoint files and treats every
|
|
101
|
+
shared file as report-only.
|
|
102
|
+
- No role commits, pushes, tags, publishes, installs dependencies, or runs a destructive
|
|
103
|
+
command.
|
|
104
|
+
- No role reads, prints, copies, uploads, or packages a secret: `CURSOR_API_KEY`, Codex auth
|
|
105
|
+
files, `.env*`, `.npmrc`, `auth.json`, keys, or tokens.
|
|
106
|
+
- Concurrent executors never run tree-wide `format`, lint `--fix`, or `build`; they validate
|
|
107
|
+
read-only and scoped to their own files.
|
|
108
|
+
- Hooks stay light. A Stop hook may run only cheap changed-file verification such as
|
|
109
|
+
`git diff --check`; it never duplicates the gate suite. Gates belong to `verifier`.
|
|
110
|
+
|
|
111
|
+
## Context and decomposition
|
|
112
|
+
|
|
113
|
+
- Keep the main context at decision level. Send large reads, repository scans, raw logs and
|
|
114
|
+
diffs, and exploratory sweeps to `grok`; consume the distillate.
|
|
115
|
+
- Decompose by required context and independently verifiable acceptance criteria, not by task
|
|
116
|
+
type.
|
|
117
|
+
- Instructions flow down fully specified; findings flow up smaller than the context consumed.
|
|
118
|
+
- Parallelize independent work; serialize dependencies and shared-file contention.
|
|
119
|
+
- The Orchestrator owns the plan and every final decision. Design engines propose; writers
|
|
120
|
+
execute; auditors advise.
|
|
121
|
+
|
|
122
|
+
## Writing concurrency
|
|
123
|
+
|
|
124
|
+
Concurrent executors share a filesystem unless isolated. Prevent clobbered edits, tree-wide
|
|
125
|
+
formatter and build races, cache phantoms, and validation cross-talk:
|
|
126
|
+
|
|
127
|
+
1. Serialize writing executors in the main checkout; commit a checkpoint before each
|
|
128
|
+
writing dispatch so git is the rollback mechanism.
|
|
129
|
+
2. Assign disjoint owned files plus explicit shared and off-limits files.
|
|
130
|
+
3. Shared files are report-only; executors return exact patches for serial integration.
|
|
131
|
+
4. Concurrent executors run only read-only, scoped validation. A tree-wide result may contain
|
|
132
|
+
siblings' in-flight failures; an executor reports only its owned scope.
|
|
133
|
+
5. After integration, clear shared caches when needed, then one independent `verifier` runs the
|
|
134
|
+
authoritative tree-wide sweep. Writer self-reports never establish green.
|
|
135
|
+
|
|
136
|
+
## Execution loop
|
|
137
|
+
|
|
138
|
+
At session start, before planning, the Orchestrator records bench liveness with the two cheap
|
|
139
|
+
probes (`codex --version`; `agent`/`agent.cmd` `--version`) and plans routing against that
|
|
140
|
+
record. Probes are read-only; a dark bench is noted with its fallback, never silently
|
|
141
|
+
absorbed.
|
|
142
|
+
|
|
143
|
+
1. **Absorb.** Dispatch `grok` for terrain, prior art, and the reading the decision needs. In
|
|
144
|
+
an Orkestrel repo dispatch `orkestrel` alongside it for live package state. Skip only when
|
|
145
|
+
the ground is already known.
|
|
146
|
+
2. **Design adversarially.** Dispatch `planner` (Opus 5) and `analyst` (Sol) on the SAME brief,
|
|
147
|
+
in parallel, without showing either the other's answer. Reconcile them yourself into one
|
|
148
|
+
plan: units, dependencies, ownership, parallel/serial order, acceptance criteria, risks.
|
|
149
|
+
Surface the plan before dispatch, including a routing ledger: every unit names its role
|
|
150
|
+
AND engine. A unit whose work class belongs to a bench (reading-heavy → Grok; objective
|
|
151
|
+
audit or objective implementation → Sol) that is routed to a Claude-native agent without a
|
|
152
|
+
recorded bench-dark deviation is a dispatch deviation.
|
|
153
|
+
3. **Implement.** Route each nontrivial unit to `implementer` (Sol, main checkout, sole
|
|
154
|
+
writer). Route a fully
|
|
155
|
+
specified, taste-free unit to `builder` or `application`. Never route implementation to an
|
|
156
|
+
engine the unit's judgment load exceeds.
|
|
157
|
+
4. **Integrate.** Evaluate each distillate against its acceptance criteria; apply shared-file
|
|
158
|
+
patches serially; route cross-cutting findings.
|
|
159
|
+
5. **Audit adversarially.** Every nontrivial implementation gets `reviewer` (Opus 5, design
|
|
160
|
+
fit) and `analyst` (Sol, correctness and constraints) independently, plus `checker` for
|
|
161
|
+
mechanical conformance. Reconcile their evidence; a finding neither engine can substantiate
|
|
162
|
+
against source is dropped on the record.
|
|
163
|
+
6. **Verify.** One independent `verifier` runs the authoritative gates.
|
|
164
|
+
7. **Accept.** The Orchestrator decides and reports concise outcomes, decisions, evidence, and
|
|
165
|
+
remaining risk.
|
|
166
|
+
|
|
167
|
+
## Deviation protocol
|
|
168
|
+
|
|
169
|
+
When reality diverges from a writing dispatch:
|
|
170
|
+
|
|
171
|
+
1. The writer stops and reports: expected, found, exact evidence, done/not done, and at most
|
|
172
|
+
one short hypothesis. It does not investigate, improvise, or alter the plan.
|
|
173
|
+
2. The Orchestrator triages:
|
|
174
|
+
- obvious correction → tighten and re-dispatch;
|
|
175
|
+
- missing mechanical evidence → dispatch `verifier`;
|
|
176
|
+
- unknown terrain → dispatch `grok` with the report and the plan slice;
|
|
177
|
+
- unknown design or root cause → dispatch `planner` and `analyst` on the question.
|
|
178
|
+
3. The Orchestrator decides, updates the plan, and re-dispatches.
|
|
179
|
+
|
|
180
|
+
Workflow failures use the same ladder; do not absorb their raw logs into the main context.
|
|
181
|
+
|
|
182
|
+
## Dispatch mechanism
|
|
183
|
+
|
|
184
|
+
- **Native first.** A model native to the running harness launches through that harness's own
|
|
185
|
+
agent and workflow mechanism — in Claude Code, Claude subagents via the Agent tool and
|
|
186
|
+
Workflows; in a Codex session, Codex-native agents; in Cursor, Cursor-native sessions. MCP
|
|
187
|
+
and CLI transports exist solely to reach a model that is NOT native to the running harness;
|
|
188
|
+
never route a native model through its own CLI or an MCP loopback.
|
|
189
|
+
- Use the Agent tool when later control flow depends on the previous result.
|
|
190
|
+
- Use a Workflow for a known deterministic fan-out, staged pipeline, or loop; serialize
|
|
191
|
+
writing nodes — never two concurrent writers in the tree.
|
|
192
|
+
- Every node names a role and its engine.
|
|
193
|
+
|
|
194
|
+
Every dispatch contains:
|
|
195
|
+
|
|
196
|
+
- **Role/engine** — named role and explicit engine.
|
|
197
|
+
- **Objective** — one concrete outcome.
|
|
198
|
+
- **Context** — the evidence slice, paths, decisions, `AGENTS.md`, applicable rules, the
|
|
199
|
+
skill name and required references (or explicit none), and the guide/spec.
|
|
200
|
+
- **Scope** — owned files, shared and off-limits files, allowed tools, permission limits.
|
|
201
|
+
- **Output** — the exact distilled return shape; no process diary.
|
|
202
|
+
- **Deviation contract** — required stop/report behaviour for writers.
|
|
203
|
+
- **Acceptance criteria** — independently checkable completion conditions.
|
|
204
|
+
- **Review evidence** — for `reviewer` and `checker`, the actual diff and status output;
|
|
205
|
+
omitting either is a dispatch deviation.
|
|
206
|
+
|
|
207
|
+
## Bench mechanics
|
|
208
|
+
|
|
209
|
+
External engines widen capacity; they never inherit authority. Their output is a proposal or
|
|
210
|
+
hypothesis until it is verified against source and accepted by the Orchestrator. Every bridge
|
|
211
|
+
verifies its CLI is present before running and stops with a deviation report naming the
|
|
212
|
+
fallback when it is not. Benches are cross-provider reach only: a model native to the running
|
|
213
|
+
harness never crosses a bridge.
|
|
214
|
+
|
|
215
|
+
Three bench laws apply to every external engine:
|
|
216
|
+
|
|
217
|
+
- **Transport by work class.** A short interactive exchange (one bounded question or a
|
|
218
|
+
follow-up on a live thread, expected to finish in about two minutes) may use an MCP
|
|
219
|
+
transport where one exists. Long-running work — audits, implementation units, anything
|
|
220
|
+
multi-minute — uses the journaled CLI and never MCP: an interrupted MCP call loses its
|
|
221
|
+
session invisibly, while a journal survives any client-side failure.
|
|
222
|
+
- **Journal first.** Every bench invocation leaves a tailable on-disk record under
|
|
223
|
+
`tmp/<bench>/` (`tmp/codex/`, `tmp/cursor/`): the brief as a file, the event stream or
|
|
224
|
+
output log, and the final answer. The user tails the journal for live progress; the
|
|
225
|
+
journal's mtime is the liveness signal; the session id in the journal head is the recovery
|
|
226
|
+
handle. Briefs never travel as fragile shell arguments.
|
|
227
|
+
- **Ephemeral journals.** Everything under `tmp/` is unit evidence, never committed. Bridges
|
|
228
|
+
never delete journals; the Orchestrator sweeps `tmp/codex/` and `tmp/cursor/` once at
|
|
229
|
+
campaign acceptance, after the final gate evidence is recorded. A journal surviving past
|
|
230
|
+
its campaign is residue.
|
|
231
|
+
|
|
232
|
+
For a long-running bridge exec the Orchestrator arms a stall watcher on the journal
|
|
233
|
+
(file-exists on the final answer, mtime-stall threshold of a few minutes) instead of trusting
|
|
234
|
+
the bridge to report failure — a wedged bridge is silent, and silence must never read as
|
|
235
|
+
progress. A stalled journal follows the deviation ladder, with the session id from the
|
|
236
|
+
journal head as the recovery handle.
|
|
237
|
+
|
|
238
|
+
### Cursor Grok
|
|
239
|
+
|
|
240
|
+
- Reached only through the `grok` role, in ask mode:
|
|
241
|
+
`<agent-cli> -p --trust --mode=ask --model "$CURSOR_GROK_MODEL" "<brief>" | tee tmp/cursor/<unit>.log`.
|
|
242
|
+
`<agent-cli>` resolves as bare `agent`, then `agent.cmd` (Windows installs ship only
|
|
243
|
+
`.cmd`/`.ps1` shims, so bare `agent` does not resolve in Bash), then
|
|
244
|
+
`"$LOCALAPPDATA/cursor-agent/agent.cmd"` — verified with `--version` before first use. Long
|
|
245
|
+
briefs are written to `tmp/cursor/<unit>-brief.md` and the prompt points at the file. The
|
|
246
|
+
tee'd log is the bench's journal.
|
|
247
|
+
- Read-only. `--force` never appears. Nothing it returns is applied.
|
|
248
|
+
- Read the exact model id from `agent models` and store it in `CURSOR_GROK_MODEL`. Never guess
|
|
249
|
+
or substitute.
|
|
250
|
+
- Never expose `CURSOR_API_KEY` in a command, a log, or a report.
|
|
251
|
+
- **Cursor is an MCP client, not a server.** The CLI ships no server mode; `.cursor/mcp.json`
|
|
252
|
+
(project-level, shared by editor and CLI) registers the `codex` and `claude` MCP servers so
|
|
253
|
+
Grok sessions reach Sol and Opus tool-natively — the client-side inverse of the other
|
|
254
|
+
benches. Approve once per machine with `agent mcp enable codex` / `agent mcp enable claude`.
|
|
255
|
+
- Fallback when the CLI, model, or authentication is unavailable: state the gap and hand the
|
|
256
|
+
reading to the Orchestrator, `planner`, or `analyst` directly.
|
|
257
|
+
|
|
258
|
+
### Codex Sol
|
|
259
|
+
|
|
260
|
+
- Reached from Claude Code only through the `codex` role, on journaled, resumable
|
|
261
|
+
`codex exec`; in a Codex session these are native agents.
|
|
262
|
+
- **Every run is journaled and resumable.** `--json` streams the event log to
|
|
263
|
+
`tmp/codex/<unit>.jsonl` (gitignored; the user tails it live for progress — nobody polls),
|
|
264
|
+
`--output-last-message` captures the final answer as a file, and the session id from the
|
|
265
|
+
journal head goes in every bridge report so follow-ups continue the same session via
|
|
266
|
+
`codex exec resume <session-id>` with context intact. `--output-schema` is available when
|
|
267
|
+
the Orchestrator wants a machine-checkable return shape.
|
|
268
|
+
- **Transport is chosen by work class.** The MCP wiring (`.mcp.json` registers
|
|
269
|
+
`codex mcp-server`; verified tools `codex` to start a session, `codex-reply` to continue
|
|
270
|
+
one; settings enable project MCP servers without prompting, so the wiring works headless —
|
|
271
|
+
including Claude Code Cloud once the codex binary is installed and device-authed) serves
|
|
272
|
+
short interactive exchanges only, and the bridge persists the thread id to
|
|
273
|
+
`tmp/codex/<unit>.session` the moment a response carries it — an interrupted MCP call with
|
|
274
|
+
no persisted id is unrecoverable and treated as failed. Long-running work (audits,
|
|
275
|
+
implementation units) always uses the journaled CLI: the brief at
|
|
276
|
+
`tmp/codex/<unit>-brief.md`, one `codex exec --json` streaming to `tmp/codex/<unit>.jsonl`
|
|
277
|
+
with `--output-last-message`, foreground when it fits the shell cap, backgrounded with the
|
|
278
|
+
turn ended when it may not — the harness re-invocation is the wait; placeholder loops and
|
|
279
|
+
wait-promise reports are deviations. Recovery ladder on interruption: persisted-id
|
|
280
|
+
`codex-reply` re-emission → fresh CLI session with the same brief file → for an interrupted
|
|
281
|
+
CLI exec, the journal survives and the Orchestrator chooses resume or fresh.
|
|
282
|
+
- **The inverse bridge exists too:** Claude Code exposes `claude mcp serve`, registered in
|
|
283
|
+
Codex's global config (`codex mcp add claude -- claude mcp serve`) so Codex-primary
|
|
284
|
+
sessions reach Claude/Opus as first-class MCP tools instead of shelling to the CLI.
|
|
285
|
+
- `analyst` runs `gpt-5.6-sol` at high effort with `--sandbox read-only` in the current
|
|
286
|
+
checkout, for objective analysis, the adversarial design argument, diagnosis, and the
|
|
287
|
+
post-implementation correctness audit.
|
|
288
|
+
- `implementer` runs `gpt-5.6-sol` at high effort with `--sandbox workspace-write` in the
|
|
289
|
+
main checkout as the sole writer from a clean committed baseline, for bounded
|
|
290
|
+
implementation.
|
|
291
|
+
- Raise the analyst to `xhigh` only for a stated hard reasoning need. `gpt-5.6-terra` serves
|
|
292
|
+
only explicitly mechanical, taste-free roles. `gpt-5.6-luna` requires a proven repeatable,
|
|
293
|
+
high-volume workload.
|
|
294
|
+
- The bridge never commits, pushes, installs, authenticates, or reads credentials.
|
|
295
|
+
- Claude Code Cloud setup installs `@openai/codex` globally but never authenticates; the
|
|
296
|
+
snapshotted setup state must contain no Codex credentials.
|
|
297
|
+
- At the start of each live Cloud session the user runs `codex login --device-auth` and
|
|
298
|
+
completes ChatGPT approval in the browser. `scripts/codex.sh` only reports readiness; it
|
|
299
|
+
never installs, authenticates, logs out, reads the auth cache, or performs a model call.
|
|
300
|
+
- If ChatGPT device login is unavailable or expires, the Codex bench is dark. Fall back to
|
|
301
|
+
`planner`/`reviewer` (Opus 5) and `builder`, and say so. Never substitute an API key, access
|
|
302
|
+
token, copied `auth.json`, or another login flow unless the user changes this policy.
|
|
303
|
+
|
|
304
|
+
Codex environment defaults:
|
|
305
|
+
|
|
306
|
+
```text
|
|
307
|
+
CODEX_ANALYST_MODEL=gpt-5.6-sol
|
|
308
|
+
CODEX_ANALYST_EFFORT=high
|
|
309
|
+
CODEX_IMPLEMENTER_MODEL=gpt-5.6-sol
|
|
310
|
+
CODEX_IMPLEMENTER_EFFORT=high
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Claude Opus from Codex
|
|
314
|
+
|
|
315
|
+
- Reached only through the Codex `planner` and `reviewer` bridges, which invoke the local
|
|
316
|
+
Claude CLI pinned to `--model opus`.
|
|
317
|
+
- Read-only: the bridge passes a brief and returns the response; it applies nothing.
|
|
318
|
+
- Never pin `fable` and never route orchestration or acceptance across the bridge.
|
|
319
|
+
- Fallback when the CLI or authentication is unavailable: state the gap, run the design or
|
|
320
|
+
design-audit pass in the Sol main session, and record that the subjective adversary was
|
|
321
|
+
missing from that round.
|
|
322
|
+
|
|
323
|
+
## Acceptance laws
|
|
324
|
+
|
|
325
|
+
- No writer's and no external engine's self-assessment is authoritative.
|
|
326
|
+
- Do not let a lower-cost native agent stand in for Grok, Opus 5, or Sol; do not spend Opus 5
|
|
327
|
+
on discovery or mechanical edits; do not route judgment-bearing implementation away from Sol.
|
|
328
|
+
A bench substitution is legitimate only when the same session records the bench dark (CLI
|
|
329
|
+
missing, auth expired, model unavailable) — the fallback is then named in the plan, not
|
|
330
|
+
improvised silently.
|
|
331
|
+
- Do not run the design adversaries on different briefs, or show either one the other's answer
|
|
332
|
+
before both have returned.
|
|
333
|
+
- Do not accept unreviewed implementation, unverified hypotheses, shared-tree writing races,
|
|
334
|
+
implicit engines, fixed Claude IDs, or verbose completed-work residue.
|
|
335
|
+
- Final acceptance belongs only to the Orchestrator, after independent audit and gate evidence.
|