@orkestrel/scaffold 0.0.77 → 0.0.78
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/dist/agents/skills/orkestrel-dispatch/scripts/bench.js +204 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +102 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +95 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/helpers.js +207 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +108 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +114 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +108 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +156 -0
- package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +196 -0
- package/dist/agents/skills/orkestrel-publish/scripts/compare.js +206 -0
- package/dist/agents/skills/orkestrel-publish/scripts/pins.js +93 -0
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +458 -0
- package/dist/agents/skills/orkestrel-publish/scripts/window.js +188 -0
- package/dist/agents/skills/orkestrel-scout/scripts/map.js +300 -0
- package/dist/agents/templates/brief.md +55 -0
- package/dist/bin/main.js +4 -2
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +77 -135
- package/dist/host/agents/orchestration.md +147 -998
- package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +2 -2
- package/dist/host/agents/skills/enterprise-bootstrap/references/inspection.md +1 -1
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/SKILL.md +6 -13
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/references/fleet.md +5 -7
- package/dist/host/agents/skills/{orkestrel-build-application → orkestrel-build}/SKILL.md +11 -22
- package/dist/host/agents/skills/{orkestrel-build-application → orkestrel-build}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +8 -16
- package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +3 -3
- package/dist/host/agents/skills/orkestrel-debrief/references/retention.md +13 -13
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +61 -0
- package/dist/host/agents/skills/orkestrel-dispatch/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-dispatch/references/bench.md +25 -0
- package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +32 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +259 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +110 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +115 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/helpers.ts +239 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +124 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +123 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +129 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +157 -0
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +42 -193
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +38 -108
- package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +35 -134
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/SKILL.md +10 -14
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/hardening.md +3 -4
- package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +228 -0
- package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/SKILL.md +15 -23
- package/dist/host/agents/skills/orkestrel-journey/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/captures.md +1 -1
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/SKILL.md +25 -33
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/references/capture-harness.md +3 -3
- package/dist/host/agents/skills/orkestrel-publish/SKILL.md +33 -20
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +39 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +22 -21
- package/dist/host/agents/skills/orkestrel-publish/references/window.md +27 -14
- package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +220 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +114 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +629 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +242 -0
- package/dist/host/agents/skills/orkestrel-scout/SKILL.md +28 -0
- package/dist/host/agents/skills/orkestrel-scout/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +352 -0
- package/dist/host/agents/templates/brief.md +21 -142
- package/dist/host/agents/transports/claude-cli.md +21 -0
- package/dist/host/agents/transports/codex.md +38 -159
- package/dist/host/agents/transports/cursor.md +16 -65
- package/dist/host/claude/AGENTS.md +38 -0
- package/dist/host/claude/agents/analyst.md +14 -53
- package/dist/host/claude/agents/astra.md +26 -0
- package/dist/host/claude/agents/builder.md +14 -30
- package/dist/host/claude/agents/checker.md +13 -57
- package/dist/host/claude/agents/distiller.md +11 -26
- package/dist/host/claude/agents/grok.md +12 -35
- package/dist/host/claude/agents/opus.md +14 -30
- package/dist/host/claude/agents/planner.md +10 -44
- package/dist/host/claude/agents/researcher.md +11 -30
- package/dist/host/claude/agents/reviewer.md +11 -95
- package/dist/host/claude/agents/scout.md +9 -23
- package/dist/host/claude/agents/verifier.md +15 -33
- package/dist/host/claude/rules/documentation.md +8 -2
- package/dist/host/claude/rules/portability.md +7 -1
- package/dist/host/claude/rules/quality.md +36 -96
- package/dist/host/claude/rules/styles.md +3 -0
- package/dist/host/claude/rules/tests.md +6 -3
- package/dist/host/claude/rules/workspace.md +19 -15
- package/dist/host/claude/rules/writing.md +57 -108
- package/dist/host/claude/settings.json +5 -3
- package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +1 -1
- package/dist/host/claude/skills/{orkestrel-align-packages → orkestrel-align}/SKILL.md +2 -2
- package/dist/host/claude/skills/{orkestrel-build-application → orkestrel-build}/SKILL.md +2 -2
- package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +11 -0
- package/dist/host/claude/skills/orkestrel-falsify/SKILL.md +2 -1
- package/dist/host/claude/skills/{orkestrel-harden-package → orkestrel-harden}/SKILL.md +2 -2
- package/dist/host/claude/skills/{orkestrel-prove-journey → orkestrel-journey}/SKILL.md +2 -2
- package/dist/host/claude/skills/orkestrel-polish/SKILL.md +12 -0
- package/dist/host/claude/skills/orkestrel-scout/SKILL.md +11 -0
- package/dist/host/codex/agents/analyst.toml +14 -31
- package/dist/host/codex/agents/astra.toml +25 -0
- package/dist/host/codex/agents/builder.toml +13 -20
- package/dist/host/codex/agents/checker.toml +13 -27
- package/dist/host/codex/agents/distiller.toml +9 -22
- package/dist/host/codex/agents/grok.toml +11 -30
- package/dist/host/codex/agents/opus.toml +14 -22
- package/dist/host/codex/agents/orkestrel.toml +1 -1
- package/dist/host/codex/agents/planner.toml +11 -28
- package/dist/host/codex/agents/researcher.toml +10 -22
- package/dist/host/codex/agents/reviewer.toml +11 -27
- package/dist/host/codex/agents/scout.toml +11 -17
- package/dist/host/codex/agents/verifier.toml +16 -12
- package/dist/host/codex/config.toml +18 -21
- package/dist/host/cursor/mcp.json +0 -4
- package/dist/host/cursor/rules/orchestration.mdc +12 -20
- package/dist/host/dotfiles/mcp.json +0 -4
- package/dist/host/dotfiles/oxlintrc.json +7 -0
- package/dist/host/guides/probe.md +9 -9
- package/dist/host/guides/scaffold.md +117 -71
- package/dist/host/guides/test.md +1 -1
- package/dist/host/manifest.json +321 -184
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/host/tests/config.test.ts +68 -46
- package/dist/host/tests/policy.test.ts +1 -5
- package/dist/host/tests/setupPolicy.ts +179 -4
- package/dist/src/core/index.cjs +255 -84
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +94 -29
- package/dist/src/core/index.d.ts +94 -29
- package/dist/src/core/index.js +253 -85
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +55 -9
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +29 -4
- package/dist/src/server/index.d.ts +29 -4
- package/dist/src/server/index.js +56 -11
- package/dist/src/server/index.js.map +1 -1
- package/package.json +15 -11
- package/dist/host/CLAUDE.md +0 -61
- package/dist/host/agents/skills/orkestrel-prove-journey/agents/openai.yaml +0 -4
- package/dist/host/agents/transports/claude.md +0 -49
- package/dist/host/claude/agents/application.md +0 -36
- package/dist/host/claude/agents/sol.md +0 -61
- package/dist/host/claude/skills/orkestrel-polish-surface/SKILL.md +0 -12
- package/dist/host/codex/agents/application.toml +0 -25
- package/dist/host/codex/agents/sol.toml +0 -19
- /package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/references/integration.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/centralization.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/contract.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/research.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/decide.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/layer.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/statechart.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/styles.md +0 -0
|
@@ -1,176 +1,55 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Unit UNIT_ID — SHORT_SUBJECT
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
`.agents/orchestration.md` § "Check the brief before you send it" against what you filled, and save
|
|
5
|
-
the filled copy and the returned report under the names § "Every dispatch is a file before it is a
|
|
6
|
-
launch" fixes.
|
|
7
|
-
|
|
8
|
-
Replace every placeholder written in upper snake case with a concrete value. Retitle the filled
|
|
9
|
-
copy `# Unit UNIT_ID — SHORT_SUBJECT`. Delete each italic reminder as you fill the row it sits
|
|
10
|
-
under, and leave no row blank: fill a row you cannot close with a named unknown label, and
|
|
11
|
-
describe that label under § Unknowns with how the unit reports back on it.
|
|
12
|
-
|
|
13
|
-
An audit lane is the exception that drops rows: fill the rows
|
|
14
|
-
`.agents/skills/orkestrel-falsify/references/brief.md` § "The audit lane's brief" names
|
|
15
|
-
and delete the rest of this template. Every other dispatch keeps every section and row heading
|
|
16
|
-
verbatim.
|
|
3
|
+
Fill every section. Write `none` in an empty one. Replace each `UPPER_SNAKE_CASE` placeholder.
|
|
17
4
|
|
|
18
5
|
## Role and engine
|
|
19
6
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_Name the executor that opens this brief — a native subagent, a bench engine inside its own CLI, or a
|
|
23
|
-
bridge driver — and write every later section for that reader._
|
|
7
|
+
ROLE on ENGINE, reached as TRANSPORT. Executor: NATIVE_SUBAGENT | BENCH_ENGINE | BRIDGE_DRIVER.
|
|
24
8
|
|
|
25
9
|
## Objective
|
|
26
10
|
|
|
27
11
|
ONE_OUTCOME.
|
|
28
12
|
|
|
29
|
-
_State one outcome. Give a small unrelated obligation its own unit._
|
|
30
|
-
|
|
31
13
|
## Context
|
|
32
14
|
|
|
33
|
-
**Evidence.**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
**Law.** `AGENTS.md`, RULE_FILES, SKILL_NAME and the references it requires, GUIDE_OR_SPEC.
|
|
40
|
-
|
|
41
|
-
_Name each applicable rule file, the dispatch-named skill and its required references, and the
|
|
42
|
-
governing guide or spec. Write `none` in a slot that is genuinely empty rather than dropping the
|
|
43
|
-
slot._
|
|
44
|
-
|
|
45
|
-
**Installed primitives.** ORKESTREL_PACKAGES_WITH_SURFACE_POINTERS.
|
|
46
|
-
|
|
47
|
-
_Name every installed `@orkestrel/*` package whose exports the unit's owned files may overlap —
|
|
48
|
-
`@orkestrel/test` and `@orkestrel/contract` for any unit that owns a `tests/**` or `src/**` file —
|
|
49
|
-
with the pointer the unit reads first: the package's guide `## Surface` section in the scaffold
|
|
50
|
-
checkout, or its declaration under `node_modules`. State that a helper, guard, wait, recorder, or
|
|
51
|
-
deferred whose job an installed export does is a defect, and give the audit's checker the
|
|
52
|
-
export-name probe over the diff._
|
|
53
|
-
|
|
54
|
-
**Host.** SHELL, WORKING_PATH, NETWORK_AND_SANDBOX_LIMITS.
|
|
55
|
-
|
|
56
|
-
_Name the shell, the working path, and the sandbox, network, and approval limits the unit's commands
|
|
57
|
-
run under._
|
|
58
|
-
|
|
59
|
-
**Measurements.** MEASURED_FACTS_AND_THE_CONDITIONS_THEY_WERE_TAKEN_UNDER.
|
|
60
|
-
|
|
61
|
-
_Take each measurement under the conditions the unit runs in, or have the unit take it before doing
|
|
62
|
-
anything else._
|
|
63
|
-
|
|
64
|
-
**Control identifiers.** CONTROL_LABELS.
|
|
65
|
-
|
|
66
|
-
_Keep this brief's control labels inside this brief, and state that a test is named for what it
|
|
67
|
-
proves rather than for the control that specified it._
|
|
68
|
-
|
|
69
|
-
**Standing conditions.** DIRTY_FILES, KNOWN_FAILING_COMMANDS, BLOCKED_TOOLS.
|
|
70
|
-
|
|
71
|
-
_Name each condition the unit meets and must not diagnose as its own: a file expected to be dirty, a
|
|
72
|
-
command known to fail, a gate red at the baseline, a shim the shell blocks, and who repairs each
|
|
73
|
-
one._
|
|
15
|
+
- **Evidence.** COMMANDS_AND_OUTPUT behind every fact.
|
|
16
|
+
- **Law.** `AGENTS.md`; RULE_FILES; SKILL and the references it names; GUIDE_OR_SPEC.
|
|
17
|
+
- **Installed primitives.** ORKESTREL_PACKAGES with the surface each unit reads first. A local helper whose job an installed export does is a defect.
|
|
18
|
+
- **Host.** SHELL, WORKING_PATH, SANDBOX_NETWORK_APPROVAL_LIMITS.
|
|
19
|
+
- **Standing conditions.** DIRTY_FILES, KNOWN_FAILING_COMMANDS, BLOCKED_TOOLS, and who repairs each.
|
|
74
20
|
|
|
75
21
|
## Unknowns
|
|
76
22
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
_Name what you do not know that the unit needs, as an unknown, with the report-back it takes. Write
|
|
80
|
-
`none` where the brief is fully specified, rather than shipping a guess the unit has to invent an
|
|
81
|
-
answer around._
|
|
23
|
+
UNKNOWN and how the unit reports it.
|
|
82
24
|
|
|
83
25
|
## Scope
|
|
84
26
|
|
|
85
|
-
**Owned.**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
behaviour it moves. A unit that moves a published symbol owns the package `README.md`._
|
|
91
|
-
|
|
92
|
-
**Shared (report-only).** SHARED_FILES
|
|
93
|
-
|
|
94
|
-
_Name each file another live unit owns. The unit returns an exact patch for serial integration and
|
|
95
|
-
edits nothing in this row._
|
|
96
|
-
|
|
97
|
-
**Off-limits.** OFF_LIMITS_FILES
|
|
98
|
-
|
|
99
|
-
_Name each file the unit must not touch, and read every acceptance criterion against this row line by
|
|
100
|
-
line. Grant the file a criterion needs, or strike that criterion. A file the change breaks that
|
|
101
|
-
appears in no row of this section is unscoped. Never list `tmp/probe/` off-limits: it is the unit's
|
|
102
|
-
probe home, and `.claude/rules/tests.md` puts every runtime probe there._
|
|
103
|
-
|
|
104
|
-
**What asserts the state this change ends.** FILES_THE_RESULT_MAKES_FALSE
|
|
105
|
-
|
|
106
|
-
_List every file the result makes false rather than every file that declares the thing changing: the
|
|
107
|
-
test asserting the reversed behaviour, the fixture carrying the raised value, the golden digest over
|
|
108
|
-
generated output, the consumer script naming the removed union member. Derive the list by running the
|
|
109
|
-
suite; where you cannot run it, name the search's bound so the unit re-derives the list. A rename's
|
|
110
|
-
search bound is a word-boundary sweep over the old name followed by a case-insensitive sweep over
|
|
111
|
-
its `-s`, `-ed`, and `-ing` inflections. End each entry in Owned, in Shared, or with a named carrier
|
|
112
|
-
dispatched before this change ships._
|
|
113
|
-
|
|
114
|
-
**Tools and limits.** ALLOWED_TOOLS, PERMISSION_LIMITS
|
|
115
|
-
|
|
116
|
-
_Check the § Output mechanism and every acceptance criterion's verification method against this
|
|
117
|
-
allowlist. A read-only lane writes no report file and runs no probe, so hand it the rendered evidence
|
|
118
|
-
instead. A rename moves the file with the shell's `mv`, never `git mv`; `git add -N` is permitted
|
|
119
|
-
only to render diff evidence._
|
|
27
|
+
- **Owned.** FILES, including the tests that pin the behavior, the fixtures derived from a constant, and the materialized copy of a template.
|
|
28
|
+
- **Shared (report-only).** FILES; return an exact patch.
|
|
29
|
+
- **Off-limits.** FILES. Never list `tmp/probes/` here.
|
|
30
|
+
- **Made false by this change.** FILES, derived by running the suite or by a named search bound.
|
|
31
|
+
- **Tools and limits.** ALLOWED_TOOLS; scoped validation only; no tree-wide mutating command.
|
|
120
32
|
|
|
121
33
|
## Execution
|
|
122
34
|
|
|
123
|
-
|
|
124
|
-
assignment directly and spawn nothing.
|
|
125
|
-
|
|
126
|
-
**A bridge driver:** carry this brief across unaltered, launch ENGINE_NAME through its CLI, and
|
|
127
|
-
return the journal path and the session id with the result.
|
|
128
|
-
|
|
129
|
-
_Keep the line written for the reader this brief reaches. Delete the line written for the other
|
|
130
|
-
reader. A bench result that carries no journal path and no session id ran on the driver's own engine:
|
|
131
|
-
refuse it._
|
|
35
|
+
Perform the assignment yourself and spawn nothing. (Bridge driver: carry this brief unaltered, launch ENGINE through its CLI, and return the journal path and session id with the result.)
|
|
132
36
|
|
|
133
37
|
## Output
|
|
134
38
|
|
|
135
|
-
RETURN_SHAPE
|
|
136
|
-
|
|
137
|
-
_State the exact distilled return shape and the mechanism that delivers it. No process diary._
|
|
39
|
+
RETURN_SHAPE through OUTPUT_MECHANISM. No process diary.
|
|
138
40
|
|
|
139
41
|
## Deviation contract
|
|
140
42
|
|
|
141
|
-
Stop and report
|
|
142
|
-
hypothesis — on CONFLICT_WITH_THE_OBJECTIVE. Decide, record, and carry on from
|
|
143
|
-
ANCILLARY_CONFLICT_THE_UNIT_SETTLES.
|
|
144
|
-
|
|
145
|
-
_Scope the contract. A conflict with the objective stops the unit; where a paragraph sits and which
|
|
146
|
-
heading a section takes are the unit's to settle._
|
|
43
|
+
Stop and report (expected, found, evidence, done or not done, one hypothesis) on OBJECTIVE_CONFLICT. Settle ANCILLARY_CHOICES yourself and record them.
|
|
147
44
|
|
|
148
45
|
## Acceptance criteria
|
|
149
46
|
|
|
150
|
-
1.
|
|
151
|
-
2.
|
|
47
|
+
1. CHEAPEST_GATE (regeneration, typecheck, or lint over owned files)
|
|
48
|
+
2. SCOPED_TEST
|
|
152
49
|
3. ARTIFACT_CRITERION
|
|
153
50
|
|
|
154
|
-
|
|
155
|
-
criterion behind it. Where the change edits a file the repository vendors or digests, put the
|
|
156
|
-
regeneration step ahead of every gate that reads the generated artifact. Ask what the change does
|
|
157
|
-
to every fact you measured, and fix each criterion to the state the unit finishes in. Close each
|
|
158
|
-
criterion with owned files alone, and name the property the unit must change; record a consequence
|
|
159
|
-
you expect to follow as an observation, never as a criterion. A criterion that closes on an
|
|
160
|
-
instrument's reading names that instrument's negative control and the class the control proves the
|
|
161
|
-
instrument can see. A scoped run over the unit's own owned files stays a legitimate criterion._
|
|
162
|
-
|
|
163
|
-
**Observations, not criteria.** TIMING_SENSITIVE_OR_WHOLE_SUITE_GATES
|
|
164
|
-
|
|
165
|
-
_Name each timing-sensitive or whole-suite gate as an observation the unit reports with its own
|
|
166
|
-
reading. Take the authoritative run yourself after the unit exits._
|
|
51
|
+
**Observations, not criteria.** TIMING_SENSITIVE_OR_TREE_WIDE_GATES the unit reports and the Orchestrator re-runs.
|
|
167
52
|
|
|
168
53
|
## Review evidence
|
|
169
54
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
_Supply what `orkestrel-falsify` § "Evidence, by subject type" requires of each row the subject
|
|
173
|
-
occupies: for a code change the actual diff and the actual status output, for a rendered or
|
|
174
|
-
externally driven surface the capture portfolio as primary and source as corroboration, and for a
|
|
175
|
-
policy, design, or process proposal the proposal, the canon it must satisfy, and the record of what
|
|
176
|
-
motivated it. A subject occupying more than one row takes the evidence of every row._
|
|
55
|
+
The actual diff and `git status --porcelain` for a code change; the capture portfolio for a rendered surface; the proposal, the canon it must satisfy, and its motivation for a process proposal.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Claude transport contract
|
|
2
|
+
|
|
3
|
+
Every Codex-side driver that carries a brief to the Claude Opus 5.5 bench follows this file. Routes: `planner`, `reviewer`, `opus`. A driver writes the brief, resolves the command, and returns the brief path, the command, and the journal path. The Orchestrator launches the run as a tracked background command under a cap it sizes from prior runs. Read `.agents/orchestration.md` first; it owns the role set and the routing.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
node .agents/skills/orkestrel-dispatch/scripts/launch.ts --journal tmp/claude/<unit>.jsonl --errors tmp/claude/<unit>.err --cap <seconds> --status -- claude -p "Read tmp/claude/<unit>-brief.md and execute it exactly. Your final message is the report it specifies." --model opus --output-format stream-json --verbose --permission-mode <mode>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- Pass the permission mode the route pins. Never substitute a fixed Claude model id; `opus` and `sonnet` are the aliases.
|
|
12
|
+
- Write the brief to `tmp/claude/<unit>-brief.md` with `scripts/brief.ts --lane claude`; the prompt is a pointer to it. Briefs never travel as shell arguments.
|
|
13
|
+
- Read the answer and the session id with `node .agents/skills/orkestrel-dispatch/scripts/result.ts --claude tmp/claude/<unit>.jsonl`. A unit with no journal ran on its driver's engine, however normal its answer reads.
|
|
14
|
+
- A driver pinned `workspace-write` writes the brief itself. A driver pinned `read-only` writes nothing: it returns the brief text, its intended path, the resolved command, and the journal paths, and the Orchestrator writes and launches.
|
|
15
|
+
- A driver never launches long work, recommends a cap, detaches, polls, restarts, or kills a run.
|
|
16
|
+
|
|
17
|
+
## Availability
|
|
18
|
+
|
|
19
|
+
- Probe with `node .agents/skills/orkestrel-dispatch/scripts/bench.ts --claude` before the first use in a session. `live: false` records the bench dark: return it at once with the fallback named, so the Astra main session records Opus unavailable for the round. Where the binary is absent, name the install command for the `claude` CLI so the Orchestrator can put it to the user in the same turn.
|
|
20
|
+
- Never install, authenticate, or substitute an API key, access token, or copied auth file.
|
|
21
|
+
- Never route orchestration or acceptance across this bridge. Never read credentials, edit, or spawn another agent.
|
|
@@ -1,175 +1,54 @@
|
|
|
1
1
|
# Codex transport contract
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
GPT-6 Astra bench: work class to transport, the exact exec form, journalling, session ids,
|
|
5
|
-
and recovery. Reach a route by its own name — `analyst` for audit, `sol` for
|
|
6
|
-
implementation. This file is a contract, not a role: it is never dispatched, and the
|
|
7
|
-
drivers that bind it pin their own tools, model, effort, and permission mode.
|
|
3
|
+
Every driver that carries a brief to the GPT-6 Astra bench follows this file. Routes: `analyst` (audit, objective design argument) and `astra` (implementation). A driver writes the brief, resolves the command, and returns the brief path, the command, and the journal path. The Orchestrator launches the run as a tracked background command under a cap it sizes from prior runs.
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
## Models and effort
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
```text
|
|
8
|
+
CODEX_ASTRA_MODEL=gpt-6-astra effort high; xhigh only for a stated hard-reasoning need
|
|
9
|
+
CODEX_MECHANICAL_MODEL=gpt-6-sol fully specified, taste-free units and drivers
|
|
10
|
+
CODEX_READING_MODEL=gpt-6-luna absorption and research when the Cursor bench is dark; record the substitution
|
|
11
|
+
```
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
skill, guide or spec, scope, output contract, and acceptance criteria. Spawn no Claude
|
|
16
|
-
agent, never implement directly, and never treat Astra's response as authoritative.
|
|
13
|
+
## Command
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
Use the journaled CLI for every unit. `codex mcp-server` was removed in Codex 0.154.0: never register it in an MCP configuration and never call an `mcp__codex__*` tool.
|
|
19
16
|
|
|
20
17
|
```text
|
|
21
|
-
|
|
22
|
-
CODEX_ANALYST_EFFORT=high
|
|
23
|
-
CODEX_IMPLEMENTER_MODEL=gpt-6-astra
|
|
24
|
-
CODEX_IMPLEMENTER_EFFORT=high
|
|
18
|
+
node .agents/skills/orkestrel-dispatch/scripts/launch.ts --journal tmp/codex/<unit>.jsonl --errors tmp/codex/<unit>.err --cap <seconds> --status -- codex exec --json -C <checkout> --sandbox <sandbox> --model gpt-6-astra -c model_reasoning_effort="high" --output-last-message tmp/codex/<unit>-last.md "Read tmp/codex/<unit>-brief.md from disk and execute it exactly. Your final message is the report it specifies."
|
|
25
19
|
```
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## Prepare the journaled CLI launch
|
|
47
|
-
|
|
48
|
-
Your jobs are drafting the brief and running short MCP exchanges. For long work you
|
|
49
|
-
prepare the launch and return it; the Orchestrator runs it as a harness-tracked
|
|
50
|
-
background command under a hard cap.
|
|
51
|
-
|
|
52
|
-
Create `tmp/codex/`, then write the full brief to `tmp/codex/<unit>-brief.md`. Briefs
|
|
53
|
-
never travel as shell arguments. Return the exact resolved command with a pointer prompt:
|
|
54
|
-
|
|
55
|
-
`timeout <cap> codex exec --json -C <working-directory> --sandbox <route-sandbox> --model gpt-6-astra -c "model_reasoning_effort=\"high\"" --output-last-message tmp/codex/<unit>-last.md "Read and execute the brief at tmp/codex/<unit>-brief.md exactly. Your final message must be the report it specifies." < /dev/null > tmp/codex/<unit>.jsonl`
|
|
56
|
-
|
|
57
|
-
- Return the brief path, that resolved command, and the journal path. Leave
|
|
58
|
-
`<cap>` unresolved — the Orchestrator owns it, per **Long-running commands → Launching**
|
|
59
|
-
in `.agents/orchestration.md`. You hold no record of prior runs.
|
|
60
|
-
- Never launch, background, poll, sleep-loop, restart, or kill an exec.
|
|
61
|
-
- Keep `< /dev/null`. A background-launched exec that inherits an open stdin pipe wedges
|
|
62
|
-
before its first event, and only the cap ever surfaces it.
|
|
63
|
-
- Add `--skip-git-repo-check` when the working directory is outside a trusted git
|
|
64
|
-
repository, and `--output-schema <file>` when the Orchestrator supplies one.
|
|
65
|
-
- The journal at `tmp/codex/<unit>.jsonl` is the live progress record and its mtime is
|
|
66
|
-
the liveness signal the Orchestrator watches. Never re-print the stream into your report.
|
|
67
|
-
- The Orchestrator reads Astra's answer from the `--output-last-message` file rather than
|
|
68
|
-
stdout, and records the session id (`thread_id` in the journal's opening events)
|
|
69
|
-
beside the result; a follow-up on a finished exec is a fresh dispatch.
|
|
70
|
-
|
|
71
|
-
## The exec sandbox denies network
|
|
72
|
-
|
|
73
|
-
`codex exec` runs with `--unshare-net`. Any unit needing the registry or another remote
|
|
74
|
-
endpoint — lockfile generation, real installs, live fetches — belongs to the
|
|
75
|
-
Orchestrator's own tracked commands or a network-capable native agent. Never put it in a
|
|
76
|
-
brief. A Astra exec hanging on `npm` until its cap fires is this misroute, not a slow bench.
|
|
77
|
-
|
|
78
|
-
The namespace has its own loopback, so a host daemon on `127.0.0.1` is unreachable and a bind can
|
|
79
|
-
fail `EPERM`. It has no IPv6, so `::1` fails `EAFNOSUPPORT`. Any proof that must reach a daemon,
|
|
80
|
-
bind a port, or drive a built server belongs outside the exec.
|
|
81
|
-
|
|
82
|
-
## The exec sandbox mounts `.git` read-only
|
|
83
|
-
|
|
84
|
-
A `workspace-write` exec can write the working tree and cannot write `.git`. Every command
|
|
85
|
-
that takes the index lock fails, `git checkout -- <file>` included.
|
|
86
|
-
|
|
87
|
-
Never write a git command into a brief as a mechanism. A unit that must restore a file it
|
|
88
|
-
mutated restores it by rewriting the original text, and proves it with
|
|
89
|
-
`git diff --exit-code -- <file>`, which reads the index without locking it. Reading commands
|
|
90
|
-
— `status`, `diff`, `log` — are unaffected and stay available.
|
|
91
|
-
|
|
92
|
-
## Recovery ladder
|
|
93
|
-
|
|
94
|
-
On any interruption or missing result, in order:
|
|
95
|
-
|
|
96
|
-
1. Interrupted MCP call with a persisted thread id → `mcp__codex__codex-reply` asking Astra
|
|
97
|
-
to re-emit the complete final report. The reasoning may have finished server-side.
|
|
98
|
-
2. No persisted id, or the reply fails → prepare a fresh journaled CLI launch with the
|
|
99
|
-
same brief file and return it.
|
|
100
|
-
3. Interrupted CLI exec → the journal survives. Report the thread id and the last journal
|
|
101
|
-
events as a deviation, and let the Orchestrator choose resume or fresh.
|
|
102
|
-
|
|
103
|
-
`codex exec resume <session-id>` inherits the session's sandbox, model, effort, and
|
|
104
|
-
working directory, and rejects `--sandbox`, `--model`, `-c`, and `-C`. Only output flags
|
|
105
|
-
and the prompt are valid on a resume. A read-only session can therefore never be resumed
|
|
106
|
-
into a writer, so implementation always gets a fresh `workspace-write` session.
|
|
107
|
-
|
|
108
|
-
## Analyst route
|
|
109
|
-
|
|
110
|
-
Sandbox `read-only`, current checkout. Use for the objective design argument, diagnosis,
|
|
111
|
-
correctness and security audit, and constraint review. Capture repository status before
|
|
112
|
-
and after. Require evidence for every claim and return unsupported claims as dropped.
|
|
113
|
-
|
|
114
|
-
An audit brief states its subject as a numbered list of falsifiable claims rather than a
|
|
115
|
-
diff to read, and requires Astra to attempt refutation. The Falsification section of
|
|
116
|
-
`.claude/rules/quality.md` owns the method and the evidence each verdict carries. The verdict shape
|
|
117
|
-
defaults to `orkestrel-falsify`; a dispatch may name a different skill that fixes another. That
|
|
118
|
-
skill owns the value set and the terminal line. Point the brief at both; restate neither.
|
|
119
|
-
|
|
120
|
-
## Astra route
|
|
121
|
-
|
|
122
|
-
Sandbox `workspace-write`, the checkout the route writes in, its sole serial writer from a clean committed
|
|
123
|
-
baseline, with owned files, off-limits files, and a deviation contract. The brief forbids
|
|
124
|
-
dependency installation, commits, pushes, publishing, credentials, destructive commands,
|
|
125
|
-
shared-file edits, and tree-wide mutating gates.
|
|
126
|
-
|
|
127
|
-
The Orchestrator verifies the finished exec with direct evidence — git status, the diff,
|
|
128
|
-
scoped validation — and carries touched files, diffstat, and deviation state into
|
|
129
|
-
integration and review.
|
|
130
|
-
|
|
131
|
-
On a Windows host a shell write that decodes and re-encodes text can replace a code point the active
|
|
132
|
-
code page cannot represent, so when a bench unit must edit a line carrying a code point above
|
|
133
|
-
`0x7F`, the brief tells it to make that edit through the exec's own patch tool, never through
|
|
134
|
-
`Get-Content`, `Set-Content`, `Out-File`, or a `>` redirection, and to report every such line it
|
|
135
|
-
touched. The Orchestrator's review sweep compares the set of code points above `0x7F` on each
|
|
136
|
-
touched line before and after the edit, and flags a line that lost any of them.
|
|
137
|
-
|
|
138
|
-
## Routing exclusion — defensive negative-test units
|
|
139
|
-
|
|
140
|
-
The provider applies a content-safety filter that terminates a turn mid-run when the work
|
|
141
|
-
requires authoring or reproducing a violation construct, even when the purpose is to prove
|
|
142
|
-
a guard rejects it: sandbox escapes, resolution-bypassing imports, boundary evasion,
|
|
143
|
-
injection payloads, credential-handling probes. The filter reads the construct, not the
|
|
144
|
-
intent, so a legitimate negative test trips it exactly like an attack would. Observed twice
|
|
145
|
-
on one unit, at the same point in the work, with nothing written to disk either time.
|
|
146
|
-
|
|
147
|
-
Route such a unit to `opus` from the start and record the Codex
|
|
148
|
-
bench dark for that unit with this reason. Do not soften or obscure a brief to slip past
|
|
149
|
-
the filter; a bench that declines work is a routing fact, not an obstacle. The exclusion is
|
|
150
|
-
per unit — everything else still routes to Astra, and an audit that merely reads existing
|
|
151
|
-
negative tests is unaffected.
|
|
21
|
+
- Launch through the dispatch skill's `launch.ts` as the preceding block shows; it closes stdin, records `git status --porcelain` before and after, and kills the process tree at the cap. Write the brief with `scripts/brief.ts --lane codex`. Never write a `.sh` launcher.
|
|
22
|
+
- Codex appends piped stdin to the prompt; the launcher closes stdin so an inherited pipe adds nothing.
|
|
23
|
+
- Add `--skip-git-repo-check` outside a trusted repository and `--output-schema <file>` when the Orchestrator supplies one.
|
|
24
|
+
- The first journal event, `thread.started`, carries the session id. Read the answer with `node .agents/skills/orkestrel-dispatch/scripts/result.ts --codex tmp/codex/<unit>.jsonl`, which reads the last-message file, never stdout.
|
|
25
|
+
- Follow up with `codex exec resume <session-id> "<prompt>"`. Resume accepts `--model`, `-c`, and output flags, and inherits the session's directory; pass the sandbox and permissions you intend explicitly rather than inferring them from the session's former role.
|
|
26
|
+
|
|
27
|
+
## Sandbox by host
|
|
28
|
+
|
|
29
|
+
| Host | `analyst` | `astra` |
|
|
30
|
+
| ------------------------------------------------ | -------------------- | -------------------- |
|
|
31
|
+
| POSIX, Claude Code Cloud | `read-only` | `workspace-write` |
|
|
32
|
+
| Windows (measured 2026-09-28 on the user's host) | `danger-full-access` | `danger-full-access` |
|
|
33
|
+
|
|
34
|
+
- On the measured Windows host `read-only` and `workspace-write` reject every shell command with `blocked by policy`. Recheck when the host or the Codex version changes. Under `danger-full-access` the brief states read-only where the route is read-only, and the launch script records `git status --porcelain` before and after; any difference is a deviation. This mode detects tracked changes only; it does not enforce read-only access.
|
|
35
|
+
- Recorded POSIX sandbox behavior, to recheck when conditions change: network denied, `.git` mounted read-only, loopback bind fails `EPERM`, a grandchild process is denied. Route installs, live fetches, servers, process-tree proofs, and lockfile generation to the Orchestrator or a native writer.
|
|
36
|
+
- A nested `git` inside the sandbox has reported `not a git repository` while the unit's own `git status` worked; name this in the brief so the unit does not diagnose the checkout.
|
|
37
|
+
- When a sandbox rejects a write, the unit stops and reports it. It never tries another write mechanism.
|
|
38
|
+
- A Windows shell write can re-encode text. Edit a line carrying a code point above `0x7F` with the exec's patch tool, never with `Set-Content`, `Out-File`, or `>`.
|
|
152
39
|
|
|
153
40
|
## Availability
|
|
154
41
|
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
- Binary present but authentication unavailable: report it so the Orchestrator can start
|
|
161
|
-
device-auth recovery in the same turn. It backgrounds `codex login --device-auth` with
|
|
162
|
-
output captured to `tmp/codex/login.log`, surfaces the verification URL and one-time code
|
|
163
|
-
from that file, and re-probes `codex login status` on completion.
|
|
164
|
-
- Recovery impossible — device login unavailable, declined, or expired: the Codex bench is
|
|
165
|
-
dark. Name the fallback explicitly: `planner` and `reviewer` (Opus 5.5) for judgment, and
|
|
166
|
-
`builder` for fully specified mechanics.
|
|
167
|
-
- Never authenticate, log out, inspect auth files, or substitute an API key, access token,
|
|
168
|
-
or copied `auth.json`.
|
|
42
|
+
- Probe with `node .agents/skills/orkestrel-dispatch/scripts/bench.ts --codex` before the first use in a session: it reads `codex --version` and `codex login status`, then runs one bounded exec and reports `live`. Neither the version nor the login status alone is liveness.
|
|
43
|
+
- Binary absent: report it; the Orchestrator names `npm install -g @openai/codex` to the user and re-probes when the user answers.
|
|
44
|
+
- Not logged in: the Orchestrator runs `node .agents/skills/orkestrel-dispatch/scripts/login.ts --codex` in the background, which journals `codex login --device-auth` to `tmp/codex/login.log`, prints the URL and the one-time code for the user, and polls the status until it answers; then it re-probes with `bench.ts --codex`.
|
|
45
|
+
- Recovery impossible: record the bench dark. `planner` and `reviewer` hold the objective lane too; `builder` takes fully specified mechanics.
|
|
46
|
+
- Never authenticate on the user's behalf, read an auth file, or substitute a key or token.
|
|
169
47
|
|
|
170
|
-
##
|
|
48
|
+
## Routing exclusion
|
|
171
49
|
|
|
172
|
-
|
|
173
|
-
|
|
50
|
+
The provider's content filter has ended turns that authored a violation construct, even as a negative test: sandbox escapes, resolution-bypassing imports, injection payloads, credential probes. Route such a unit to `opus` from the start and record the bench dark for that unit only.
|
|
51
|
+
|
|
52
|
+
## Journals
|
|
174
53
|
|
|
175
|
-
|
|
54
|
+
Journals live under `tmp/codex/` and are never committed. `.agents/orchestration.md` § Cleanup owns their deletion.
|
|
@@ -1,85 +1,36 @@
|
|
|
1
1
|
# Cursor transport contract
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
bench: the model pin, the CLI resolution ladder, the launch form, journalling, session ids,
|
|
5
|
-
and recovery. Reach the route by its own name — `grok`. This file is a contract, not a
|
|
6
|
-
role: it is never dispatched, and the drivers that bind it pin their own tools, model,
|
|
7
|
-
effort, and permission or sandbox mode.
|
|
8
|
-
|
|
9
|
-
Read `.agents/orchestration.md` first. It owns the role set, the routing, and the dispatch
|
|
10
|
-
contract. Cursor is native to neither Claude Code nor Codex, so both harnesses' `grok`
|
|
11
|
-
bridges bind this file.
|
|
3
|
+
Every driver that carries a brief to the Cursor Grok bench follows this file. Route: `grok`. A driver writes the brief, resolves the command, and returns the brief path, the command, and the journal path. The Orchestrator launches the run as a tracked background command under a cap it sizes from prior runs. Read `.agents/orchestration.md` first; it owns the role set and the routing.
|
|
12
4
|
|
|
13
5
|
## Model
|
|
14
6
|
|
|
15
7
|
```text
|
|
16
|
-
CURSOR_GROK_MODEL=
|
|
8
|
+
CURSOR_GROK_MODEL=grok-4.7-high
|
|
17
9
|
```
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
dispatch. Re-read `agent models` and update this line when the id changes. Never guess or
|
|
21
|
-
substitute a model id.
|
|
22
|
-
|
|
23
|
-
## Invocation
|
|
24
|
-
|
|
25
|
-
Resolve the CLI in this order, verifying with `--version` before first use:
|
|
26
|
-
|
|
27
|
-
1. bare `agent`, on a POSIX host;
|
|
28
|
-
2. on Windows, the versioned entry under `"$LOCALAPPDATA/cursor-agent/versions/"` — take the
|
|
29
|
-
newest directory and invoke its own `node.exe` against its `index.js` directly.
|
|
30
|
-
|
|
31
|
-
Launch an unattended run through the versioned entry, never through `agent`, `agent.cmd`, or
|
|
32
|
-
`agent.ps1` on Windows. Those shims delegate to `cursor-agent.ps1`, which sets the console window
|
|
33
|
-
title and can abort with Win32 `0xE9` when no console is attached. The failure is intermittent, so a
|
|
34
|
-
shim that answered once does not clear it, and when it does fire it leaves only a PowerShell
|
|
35
|
-
`SetConsoleWindowTitle` trace — which reads as a bench that returned nothing rather than as a launch
|
|
36
|
-
that never happened. The versioned entry has no console dependency and no such failure mode.
|
|
37
|
-
|
|
38
|
-
Read an empty shim run as a launch failure until its `.err` journal is checked for that
|
|
39
|
-
trace.
|
|
11
|
+
Read from `agent models` on 2026-08-13. Re-read `agent models` and update this line when the id changes. Never guess or substitute a model id.
|
|
40
12
|
|
|
41
|
-
##
|
|
13
|
+
## Command
|
|
42
14
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
fragile shell arguments. Every run journals its event stream, so the user can tail progress
|
|
46
|
-
live and an interrupted run leaves its partial distillate on disk:
|
|
15
|
+
- Resolve the entry with `node .agents/skills/orkestrel-dispatch/scripts/bench.ts --cursor --resolve`: bare `agent` on a POSIX host; on Windows, the newest versioned install's own `node.exe` and `index.js` under `%LOCALAPPDATA%\cursor-agent\versions\`. Never launch through `agent`, `agent.cmd`, or `agent.ps1` on Windows: the shims can abort with Win32 `0xE9` when no console is attached and leave only a `SetConsoleWindowTitle` trace in the `.err` file. Read an empty shim run as a launch failure.
|
|
16
|
+
- Launch:
|
|
47
17
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
journalling are one artifact the next run reuses.
|
|
52
|
-
|
|
53
|
-
A driver pinned `workspace-write` writes the brief and the run script itself. A driver pinned
|
|
54
|
-
`read-only` writes nothing at all — not the brief, not the script, not the journal: return the
|
|
55
|
-
brief text, its intended path, the resolved command, and the journal and `.err` paths, and the
|
|
56
|
-
Orchestrator writes them and launches the run. Check your own pinned sandbox before drafting, and
|
|
57
|
-
take the branch that matches it.
|
|
58
|
-
|
|
59
|
-
The journal's first event is the `init` event, and its `session_id` is the run's recovery
|
|
60
|
-
handle. The journal's `result` event carries the final answer. Return the journal path and
|
|
61
|
-
that session id with the result, so the Orchestrator can confirm the bench ran. Read the
|
|
62
|
-
`.err` file before calling a run empty; a launch that never reached the model leaves its
|
|
63
|
-
trace only there. Resume an interrupted run through the CLI's `--resume` option, probed
|
|
64
|
-
before its first use.
|
|
18
|
+
```text
|
|
19
|
+
node .agents/skills/orkestrel-dispatch/scripts/launch.ts --journal tmp/cursor/<unit>.jsonl --errors tmp/cursor/<unit>.err --cap <seconds> --status -- <node> <index> -p --trust --mode=ask --model grok-4.7-high --output-format stream-json "Read tmp/cursor/<unit>-brief.md and execute it exactly. Your final message is the document it specifies."
|
|
20
|
+
```
|
|
65
21
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
end your turn; an unowned run has no completion signal and no death notice.
|
|
22
|
+
- Write the brief to `tmp/cursor/<unit>-brief.md` with `scripts/brief.ts --lane cursor`; the prompt is a pointer to it.
|
|
23
|
+
- Read the answer and the session id with `node .agents/skills/orkestrel-dispatch/scripts/result.ts --cursor tmp/cursor/<unit>.jsonl`. The `init` event carries the session id; resume through the CLI's `--resume` option, probed before its first use.
|
|
24
|
+
- A driver runs a lane finishing in about two minutes itself and returns the result. For anything longer its job ends at drafting: return the brief path, the resolved command, and the journal path. A driver never recommends a cap and never detaches a run.
|
|
25
|
+
- A driver pinned read-only writes nothing: it returns the brief text, its intended path, the resolved command, and the journal paths, and the Orchestrator writes and launches.
|
|
71
26
|
|
|
72
27
|
## Containment
|
|
73
28
|
|
|
74
29
|
- Never use `--force`.
|
|
75
30
|
- Never expose `CURSOR_API_KEY`, inspect unrelated environment values, or read credentials.
|
|
76
|
-
- Leave `tmp/cursor/` to the Orchestrator
|
|
77
|
-
retention rule for every journal.
|
|
31
|
+
- Leave `tmp/cursor/` to the Orchestrator; `.agents/orchestration.md` § Cleanup owns retention.
|
|
78
32
|
|
|
79
33
|
## Availability
|
|
80
34
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`analyst`. Never install or authenticate.
|
|
84
|
-
|
|
85
|
-
Never route orchestration or acceptance across this bridge.
|
|
35
|
+
- `bench.ts --cursor` reporting `live: false` records the bench dark. Stop with a deviation naming the fallback from `.agents/orchestration.md` § Benches: Luna, then Sonnet. Never hand the reading to the Orchestrator, `planner`, or `analyst`. Never install or authenticate.
|
|
36
|
+
- Never route orchestration or acceptance across this bridge.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Claude Code bridge
|
|
2
|
+
|
|
3
|
+
`AGENTS.md` governs code. `.agents/orchestration.md` governs agent operation. This file adds Claude Code mechanics and cannot weaken either. Claude Code loads it at session start beside the root `AGENTS.md`; another harness reads it only when started inside `.claude/`.
|
|
4
|
+
|
|
5
|
+
## Dispatch
|
|
6
|
+
|
|
7
|
+
- Use the Agent tool for one unit, or when the next step depends on the result. Name the role as `subagent_type`.
|
|
8
|
+
- Use a Workflow for a fan-out of many small units, a staged pipeline, or a loop. Give every `agent()` node a model alias and an effort. Serialize writing nodes. Recover an interrupted run with `resumeFromRunId`.
|
|
9
|
+
- Never run a design or review lane as `fork`. A lane starts with a clean context.
|
|
10
|
+
- Use the built-in `Explore` agent for a quick locate; it loads no instruction files.
|
|
11
|
+
- Foreground Bash is capped at 10 minutes. Run anything longer as a background command with an internal `timeout`.
|
|
12
|
+
- Write a reusable or long-running program as a TypeScript file and run it with `node`; a heredoc, `node -e`, `&&` chain, or `${...}` argument trips the Windows approval classifier, and a one-shot read-only check may run inline. Probe a bench with `node .agents/skills/orkestrel-dispatch/scripts/bench.ts`, launch a lane through `scripts/launch.ts`, and read its answer with `scripts/result.ts`, all from the dispatch skill.
|
|
13
|
+
|
|
14
|
+
## Models
|
|
15
|
+
|
|
16
|
+
- Use the aliases `opus` and `sonnet`. Never `inherit`, never a fixed model ID, never `CLAUDE_CODE_SUBAGENT_MODEL`.
|
|
17
|
+
- An alias serves the model the installed Claude Code maps it to. After a model release, measure the mapping with `claude -p --model <alias> --output-format json` and read `modelUsage`; when a newer model answers by id and the alias lags, update Claude Code (`scoop update claude-code` on this host) and measure again. Claude Code 2.1.284 serves Sonnet 5.5 as `sonnet` and Opus 5.5 as `opus` (measured 2026-09-29).
|
|
18
|
+
- Run the main session on `opus` at high effort and keep the model fixed for the session; a model switch invalidates the prompt cache. An effort switch invalidates it too except on Opus 5.5 and Fable 5.1 under a Claude subscription or API key.
|
|
19
|
+
- Reach Astra through `analyst` and `astra`, Grok through `grok`. Role frontmatter carries Claude models only.
|
|
20
|
+
|
|
21
|
+
## Context and cache
|
|
22
|
+
|
|
23
|
+
- Roles that launch a CLI, run gates, or only read set `omitClaudeMd: true`; their charters carry the permission floor they need. Writers and reviewers load the contract.
|
|
24
|
+
- Adding or removing an MCP server invalidates the cache when its tools load into the prefix; deferred tools (the default) append without disturbing it. Avoid either mid-session.
|
|
25
|
+
- An edit to a loaded instruction file takes effect after `/clear`, `/compact`, or a restart. Edits under `.claude/agents/` and `.claude/skills/` hot-reload.
|
|
26
|
+
- Keep large reads in subagents. The main context holds decisions.
|
|
27
|
+
|
|
28
|
+
## Wiring
|
|
29
|
+
|
|
30
|
+
- `.mcp.json` registers `probe` from `node_modules/@orkestrel/probe/dist/bin/main.js`. Run `npm ci --ignore-scripts` before the first `prove` call in a fresh checkout.
|
|
31
|
+
- `.claude/settings.json` hooks: `SessionStart` runs the Cloud setup hooks under `scripts/` and the dispatch skill's `sweep.ts --report`; `Stop` runs `git diff --check`. `scripts/` holds Cloud setup hooks and nothing else.
|
|
32
|
+
- `claude mcp serve` exposes this harness to a Codex- or Cursor-primary session.
|
|
33
|
+
- `.claude/skills/<name>/SKILL.md` loads `.agents/skills/<name>/SKILL.md` and adds nothing.
|
|
34
|
+
|
|
35
|
+
## Cloud
|
|
36
|
+
|
|
37
|
+
- Setup installs `@openai/codex` and never authenticates. Start each live session with `codex login --device-auth`.
|
|
38
|
+
- `scripts/deps.sh` reinstalls when the lockfile digest differs from `node_modules/.orkestrel-lock.sha256`. Write the marker only after `npm ci` succeeds for that lockfile, in the same turn.
|