@orkestrel/scaffold 0.0.105 → 0.0.107
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/templates/brief.md +4 -2
- package/dist/bin/main.js +6 -6
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/orchestration.md +23 -8
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +4 -3
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +63 -53
- package/dist/host/agents/skills/orkestrel-parallel/references/harnesses.md +16 -9
- package/dist/host/agents/templates/brief.md +4 -2
- package/dist/host/claude/AGENTS.md +6 -5
- package/dist/host/claude/agents/orkestrel.md +1 -1
- package/dist/host/claude/agents/verifier.md +5 -5
- package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
- package/dist/host/codex/agents/verifier.toml +13 -9
- package/dist/host/codex/config.toml +4 -6
- package/dist/host/guides/agent.md +68 -59
- package/dist/host/guides/scaffold.md +38 -38
- package/dist/host/manifest.json +14 -14
- package/dist/src/core/index.cjs +10 -10
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +6 -6
- package/dist/src/core/index.d.ts +6 -6
- package/dist/src/core/index.js +10 -10
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +7 -7
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +10 -10
- package/dist/src/server/index.d.ts +10 -10
- package/dist/src/server/index.js +7 -7
- package/dist/src/server/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -52,6 +52,19 @@ The harness's own engine orchestrates: Claude Fable 5.1 or Claude Opus 5.5 in Cl
|
|
|
52
52
|
- Route gates to `verifier`. A writer's self-reported gate is not evidence.
|
|
53
53
|
- Work directly on a one-file change or a one-line fix, subject to the preceding routing rules. Route standalone lookups through `scout`. Dispatch when isolation, parallelism, a second engine, or a large read pays for the brief.
|
|
54
54
|
|
|
55
|
+
## Sessions and consultation
|
|
56
|
+
|
|
57
|
+
- Before launching a unit, check the roster for an existing session whose responsibility, model, permissions, workspace, and retained context fit the task, and resume it. Keep related tasks for one responsibility in that session.
|
|
58
|
+
- Start a fresh session when no suitable session survives, the work is unrelated, or retained context would compromise the judgment. Use fresh contexts for independent review and the blind design round. An agent that helped design or implement the subject cannot independently review that contribution.
|
|
59
|
+
- Record the session identity separately from its task, turn, process, and message address. Record each session's harness, provider, model, options, workspace, responsibility, owned paths, continuation address, latest task, and evidence paths in the roster, and preserve its prior task results.
|
|
60
|
+
- Treat a live writer as an agent with an active assignment and edit authority. A retained session without an assignment holds no resource merely by existing. Preserve an explicit hold until its owner releases it.
|
|
61
|
+
- Continue a unit through compaction. Before a handoff or context limit, record decisions, changed instructions, source identity, unresolved questions, failed and passing evidence, active process identities, ownership, and the next action. Compaction neither completes a task nor releases its files or processes.
|
|
62
|
+
- On continuation, the Orchestrator sends the next bounded objective and the facts changed after the last turn. The continued agent reads changed or missing authority and the source regions that objective needs, and rechecks mutable facts such as source state and process liveness. Do not repeat unchanged bulk reads merely because a unit resumes.
|
|
63
|
+
- Consult a suitable peer when a consequential approach remains open, evidence conflicts, or repeated attempts stop narrowing a failure. Give the peer the question, relevant evidence, attempted approaches, constraints, and requested answer. Use an existing specialist when its context helps and a fresh peer when the question needs an independent challenge.
|
|
64
|
+
- Keep consultation read-only and bounded. Ask for a recommendation, its evidence, uncertainty, and a concrete next check. The executor retains the work; the Orchestrator rules on scope and acceptance. Advice grants no authority and does not satisfy an independent review gate.
|
|
65
|
+
- Resolve conflicting advice against the contract and observable evidence. Do not add consultation to routine steps or repeat it without a changed question or evidence.
|
|
66
|
+
- When a requested transport fails, record the failure and whether a child was created. Before retrying an uncertain launch, inspect the recorded task or session. Use a permitted fallback with its actual model and options disclosed; retry a refused route only after a relevant condition changes.
|
|
67
|
+
|
|
55
68
|
## Size gate
|
|
56
69
|
|
|
57
70
|
`AGENTS.md` § Work loop sizes a change and fixes the precedence (large, then medium, then small). This file adds who runs what.
|
|
@@ -82,23 +95,25 @@ A large change runs these phases once each, in order, and ends when the exit cri
|
|
|
82
95
|
|
|
83
96
|
## Parallelism
|
|
84
97
|
|
|
85
|
-
-
|
|
98
|
+
- Parallelize independently owned work when useful progress can overlap. Reuse suitable sessions per § Sessions and consultation, bound each objective, and count coordination and verification costs when choosing the lanes. § Cache governs model and tool settings.
|
|
86
99
|
- Judgment stays narrow: a design or review pass is at most the two lanes the size gate names, each in a clean context, blind to the other, and it runs once. Never fan judgment out further, and never run it as a loop.
|
|
87
100
|
- One writer per checkout, except under `orkestrel-parallel`: there, at most three writers share one checkout, each owns disjoint files and disjoint regions of shared files, and one runner lane owns every test, check, and build process. Otherwise give parallel writers disjoint owned files, and give a writer its own worktree under `tmp/worktrees/` only when two units must write the same files at once. Commit a checkpoint before a writing dispatch.
|
|
88
101
|
- Shared files are report-only; a unit returns an exact patch. Under `orkestrel-parallel`, a writer edits its owned regions of a shared file directly.
|
|
89
|
-
-
|
|
102
|
+
- Scope validation by the claim and its input dependencies, not by writer ownership alone. Under `orkestrel-parallel`, the runner owns checks and obtains the required write holds. Preserve valid receipts; rerun a check when its inputs, configuration, environment, or claim changed. Never run tree-wide `format`, lint `--fix`, or `build` beside a live writer.
|
|
90
103
|
- One Grok lane at a time; queue the rest. An empty lane beside a live probe is starvation, not darkness.
|
|
91
104
|
- The Orchestrator's own sweep is a writing dispatch: run it before or after the units, never beside them.
|
|
92
105
|
|
|
93
106
|
## Permission floor
|
|
94
107
|
|
|
95
|
-
-
|
|
108
|
+
- Restrict read-only roles to read tools when the harness supports that restriction. Otherwise state the read-only boundary in the brief and record its enforcement limit. The Orchestrator supplies the diff and status to every review dispatch.
|
|
109
|
+
- Permit a verifier to write its assigned evidence artifacts and the generated outputs its dispatch declares; never permit source repairs. A declaration names the command and each path the command writes or replaces. Declare a path only when the command regenerates it and no lane authors it, such as a build directory or a generated inventory file; an authored path is source, whichever command rewrites it. Declare no path for a command that only deletes. Keep each declared output outside every other lane's owned files and recorded fixtures, and hold it with the command's inputs for the run. Under this floor, the declared command can remove and rewrite its declared outputs, and that replacement is neither a destructive command nor a deletion.
|
|
110
|
+
- Record `git status --porcelain` before and after a declared command. Report each declared output that git tracks and the run changed; never revert it. When the run changed a path outside its declarations, stop and report the path.
|
|
96
111
|
- No role commits, pushes, tags, publishes, installs, or runs a destructive command.
|
|
97
112
|
- No role runs `git checkout`, `git restore`, `git stash`, `git reset`, or `git clean`. Undo an edit by rewriting the text.
|
|
98
113
|
- No role reads, prints, copies, uploads, or packages a secret: `.env*`, `.npmrc`, `auth.json`, keys, tokens, `CURSOR_API_KEY`.
|
|
99
|
-
- A unit writes only under its owned files
|
|
114
|
+
- A unit writes only under its owned files, its checkout's `tmp/`, and the declared outputs the preceding bullets permit. The Orchestrator's own briefs, probes, drafts, and records live in the checkout's `tmp/` too, never in a directory outside the repository; the user follows the work through the tree.
|
|
100
115
|
- When a sandbox rejects a write, the unit stops and reports the rejection. It never tries another write mechanism.
|
|
101
|
-
-
|
|
116
|
+
- Apart from a declared command replacing its declared outputs, a unit deletes only the fixture directory it created, by its recorded path. It never removes a `tmp/<lane>` directory, another unit's files, or anything through `sweep.ts --tmp` or `--unit … --delete`; those are the Orchestrator's, after the last live unit exits.
|
|
102
117
|
|
|
103
118
|
## tmp layout
|
|
104
119
|
|
|
@@ -137,7 +152,7 @@ Every working file lives under the checkout's gitignored `tmp/`, in the director
|
|
|
137
152
|
- Capture a campaign unit's report to `tmp/units/<unit>-report.md`, or read the bench's last-message file.
|
|
138
153
|
- Launch every multi-minute command as a harness-tracked background command through `node .agents/skills/orkestrel-dispatch/scripts/launch.ts` under a cap sized from prior runs, and read a bench answer with that skill's `scripts/result.ts`. Every launcher, probe, and instrument is a TypeScript file run by `node`, never a shell or Python script. Read liveness from the artifact the work produces. Kill only a recorded process id, never a pattern, and confirm the process and its descendants are gone before another writer takes its files.
|
|
139
154
|
- Probe a bench with the dispatch skill's `scripts/bench.ts` before its first lane, and re-read liveness at every dispatch after a failure.
|
|
140
|
-
- Send a
|
|
155
|
+
- Send a changed decision to every affected session before it continues, including an idle session selected for reuse. Preserve the original brief and supply a checked successor brief when scope or acceptance changes.
|
|
141
156
|
|
|
142
157
|
## Deviation protocol
|
|
143
158
|
|
|
@@ -162,8 +177,8 @@ The Orchestrator triages: obvious correction → tighten and re-dispatch; missin
|
|
|
162
177
|
|
|
163
178
|
## Cache
|
|
164
179
|
|
|
165
|
-
-
|
|
166
|
-
- Keep the always-on instruction set small
|
|
180
|
+
- Keep the model, options, tools, and instruction prefix unchanged while they fit the task. Check the active provider and harness before claiming that a change preserves or invalidates caching. Treat a continued session as retained context, not as a cache hit; a cache hit depends on the provider, the prefix, and the retention window. Claim a saving only from recorded usage.
|
|
181
|
+
- Keep the always-on instruction set small and load supporting rules by scope. When instructions change, use the harness's documented reload mechanism and tell affected agents what changed. Do not assume a file edit updates an active session.
|
|
167
182
|
- Give reading and driver roles no instruction files (`omitClaudeMd` in Claude Code) when their charter carries the floor they need.
|
|
168
183
|
- Route bulk reads per § Routing and keep only the distillate.
|
|
169
184
|
|
|
@@ -33,7 +33,8 @@ description: >-
|
|
|
33
33
|
|
|
34
34
|
## Launch
|
|
35
35
|
|
|
36
|
-
-
|
|
36
|
+
- Select continuation or a fresh session per `.agents/orchestration.md` § Sessions and consultation. Use the message or resume mechanism the harness's live tool descriptions name, and record the session and task identities it returns. Read the harness reference named by `.agents/skills/orkestrel-parallel/SKILL.md` § Assign lanes for T3 and native channel mechanics.
|
|
37
|
+
- For a fresh native Claude Code unit, use the Agent tool with the role as `subagent_type`; for native Codex, use the custom agent by name. Use T3 `delegate_task` when the selected provider, model, options, or workspace require it.
|
|
37
38
|
- Bench: run `bench.ts --<bench>` once per session before the first lane, then launch the transport contract's command through `launch.ts` in the background with `--status`.
|
|
38
39
|
- Size the cap from the `durationMs` that `result.ts` reported for comparable runs, plus gate time, plus slack. Never let the unit name it.
|
|
39
40
|
- Confirm the launch within a minute with `result.ts`: `bytes` past the header and a small `ageMs`. An instantly dead journal is a failed launch; read its errors file.
|
|
@@ -57,5 +58,5 @@ description: >-
|
|
|
57
58
|
|
|
58
59
|
- A brief that contradicts a measurement the campaign already recorded: reconcile first.
|
|
59
60
|
- A unit that asks for an unowned edit: stop it and re-scope.
|
|
60
|
-
- A concurrent writer
|
|
61
|
-
- A tree-wide mutating command from a unit: strike it from the brief.
|
|
61
|
+
- A concurrent writer outside an acknowledged `orkestrel-parallel` ownership protocol: queue it.
|
|
62
|
+
- A tree-wide source-mutating command from a unit: strike it from the brief. For verifier command outputs, apply `.agents/orchestration.md` § Permission floor.
|
|
@@ -1,72 +1,82 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orkestrel-parallel
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
4
|
+
Coordinate independently owned writer lanes in one checkout through messages, with one runner for checks and an Orchestrator for decisions. Use when implementation units can progress in parallel with disjoint files or explicit regions of shared files. Serialize overlapping edits and hold every input needed for a reliable measurement. Require shared files and a channel that can wake an idle lane.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Parallel lanes
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Assign lanes
|
|
10
10
|
|
|
11
|
-
| Lane
|
|
12
|
-
|
|
|
13
|
-
| Orchestrator
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
11
|
+
| Lane | Responsibility | Write boundary |
|
|
12
|
+
| ------------ | ---------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
13
|
+
| Orchestrator | Own the protocol, roster, scope, rulings, holds, and acceptance. | Assigned coordination records and serial integration. |
|
|
14
|
+
| Runner | Run requested tests, checks, and builds as the verifier. | Assigned evidence and declared command outputs; never source repairs. |
|
|
15
|
+
| Writer | Implement its bounded unit under its assigned role. | Owned files and regions, plus its own log. |
|
|
16
|
+
| Reviewer | Independently assess the subject the size gate names. | None; return the verdict to the Orchestrator. |
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
18
|
+
- Apply `.agents/orchestration.md` for routing, session reuse, consultation, independence, and acceptance.
|
|
19
|
+
- Keep active lanes within the harness limit and the campaign's resource limits. Reserve capacity for the runner; queue work that does not fit.
|
|
20
|
+
- Assign every editable region to one writer. Name shared regions by their declarations or sections. Serialize units that rewrite the same region.
|
|
21
|
+
- Read `references/harnesses.md` before choosing the transport; it owns the wake, continuation, and tracking mechanics.
|
|
20
22
|
|
|
21
|
-
##
|
|
23
|
+
## Prepare the round
|
|
22
24
|
|
|
23
|
-
1. Commit the accepted
|
|
24
|
-
2. Write `tmp/units/<round>/coord/protocol.md`: the path
|
|
25
|
-
3.
|
|
26
|
-
4.
|
|
27
|
-
5.
|
|
25
|
+
1. Commit the accepted baseline before a writing dispatch.
|
|
26
|
+
2. Write `tmp/units/<round>/coord/protocol.md`: the skill path, baseline, lanes, owned regions, dependencies, acceptance commands, and exclusive resources. Mark each command whose input set must be held while it runs.
|
|
27
|
+
3. Write `coord/roster.md` with each lane's roster fields per `.agents/orchestration.md` § Sessions and consultation. Create `coord/results/` and `coord/runs/`.
|
|
28
|
+
4. Resume a suitable runner or launch one. Require its ready acknowledgment, then let its idle turn end.
|
|
29
|
+
5. Resume or launch writers as capacity permits. Fill each roster row from the actual launch or continuation result and send each lane the peer addresses it messages.
|
|
30
|
+
6. When adopting a running lane, send the protocol, ownership, log path, and next request number. Require acknowledgment before coordinated work begins.
|
|
28
31
|
|
|
29
|
-
##
|
|
32
|
+
## Exchange requests and results
|
|
30
33
|
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
34
|
+
- Append only to your own `coord/<lane>.md` log: `<lane> | <request or phase> | <kind> | <text>`. Reviewers write no log.
|
|
35
|
+
- Number requests monotonically per lane across continuations and fixes. Preserve earlier requests and results.
|
|
36
|
+
- Send each request through the wake-capable channel in the request shape that closes this section.
|
|
37
|
+
- The runner publishes a result by writing it under a temporary name and renaming it to `coord/results/<lane>-<request>.md` after command exit and cleanup, then sends its path and request identity to the requester and the Orchestrator.
|
|
38
|
+
- Wait for the harness's completion or message notice. When the notice is missing and the result is needed, read that request's durable result or task status once, reconcile the request identity, and suspend an unresolved delivery rather than launching duplicate work.
|
|
39
|
+
- Escalate per `.agents/orchestration.md` § Deviation protocol. Continue independent work. Share cross-lane facts directly; only the Orchestrator changes scope or rules on acceptance.
|
|
40
|
+
- End an idle runner turn after acknowledging readiness or publishing a result. Do not occupy the runner with a wait for requests queued behind that turn.
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
Use this request shape:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
REQUEST <lane>-<request>
|
|
39
46
|
from: <lane> <address>
|
|
47
|
+
source: <commit and changed input identity>
|
|
48
|
+
inputs: <files or bounded population read by the commands>
|
|
49
|
+
holds: <affected owners and exclusive resources>
|
|
40
50
|
commands:
|
|
41
51
|
1. <exact command>
|
|
42
|
-
expect: <red or green
|
|
52
|
+
expect: <red or green, named cases, required artifact>
|
|
43
53
|
```
|
|
44
54
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
- After every writer's current `FINAL
|
|
64
|
-
|
|
65
|
-
##
|
|
66
|
-
|
|
67
|
-
- Before ruling on an escalation,
|
|
68
|
-
- When
|
|
69
|
-
- Run the
|
|
70
|
-
- Before
|
|
71
|
-
- Before
|
|
72
|
-
-
|
|
55
|
+
## Implement in phases
|
|
56
|
+
|
|
57
|
+
- Log the applicable phases: types, failing proof, source, and documentation. Request the corresponding checks from the runner.
|
|
58
|
+
- Read a shared region immediately before each small, syntactically complete patch. On a context mismatch, reread and reapply only the owned hunk.
|
|
59
|
+
- Keep read-only shell searches within the campaign's terminal limits. Send every test, check, lint, format, and build request to the runner.
|
|
60
|
+
- Run no formatter. Apply the exact formatting hunk the Orchestrator supplies, then request a read-only format check.
|
|
61
|
+
- Before a temporary mutation, obtain the runner's hold on conflicting commands and each affected writer's hold on edits. Mutate only after their acknowledgments. Restore the exact input, verify the restoration, and release the holds through the runner.
|
|
62
|
+
- When the unit's required checks pass, send `FINAL <lane>` with source identity and evidence, write the report, and end the turn. Preserve the session for suitable follow-up work.
|
|
63
|
+
|
|
64
|
+
## Run evidence commands
|
|
65
|
+
|
|
66
|
+
- Before a command, verify its input holds and exclusive resources. Hold all writers when the command reads the whole tree; otherwise hold every owner in its input closure. Do not infer that closure from the requesting writer's files alone.
|
|
67
|
+
- When a conflicting process occupies a declared resource, record its owner, process id, command, and a bounded wait based on the expected work. If it remains after that wait, suspend the request for an Orchestrator ruling. Never terminate another lane's or repository's process.
|
|
68
|
+
- Launch through `node .agents/skills/orkestrel-dispatch/scripts/launch.ts` with a cap grounded in prior runs, separate journal and error paths under `coord/runs/`, and the request identity in each filename. Follow the launch reference named by `.agents/skills/orkestrel-dispatch/SKILL.md` for process tracking and cleanup.
|
|
69
|
+
- When the shell yields before the command exits, resume its tracked session per `references/harnesses.md`. Read the terminal record and confirm owned descendants have exited before publishing completion. Escalate incomplete cleanup before releasing files or starting another command.
|
|
70
|
+
- Run the commands the accepted unit and the size gate require, narrowest first, and add no standing root, guide, or entry check beyond the request. Preserve receipts and rerun checks per `.agents/orchestration.md` § Parallelism.
|
|
71
|
+
- Stop on the first unexpected failure. Return the complete diagnostic and the owning file, and classify the failure as an assertion failure, an invocation error, a reporting failure, a cap, or an interruption. Preserve every receipt obtained before the stop.
|
|
72
|
+
- Record the command's input identity and expected outputs before launch. When an input changes during the run, report that result as invalid and retain each result whose input set stayed stable.
|
|
73
|
+
- After every writer's current `FINAL`, the integrated review, and the acknowledged write holds, run the Orchestrator's closing acceptance request under a unique gate number. Publish `coord/results/closing-<gate>.md`, reply with that identity, and end the turn.
|
|
74
|
+
|
|
75
|
+
## Integrate and close
|
|
76
|
+
|
|
77
|
+
- Before ruling on an escalation, inspect its cited evidence. Bound the ruling to the changed claim and affected owners.
|
|
78
|
+
- When the format check reports only a filename, inspect the difference and send the writer the exact hunk.
|
|
79
|
+
- Run the size gate's independent review on a pinned subject; a unit review can overlap unrelated writing only while its whole subject stays unchanged. Use unit evidence for the integrated review, then run the closing acceptance gate in the order `.agents/orchestration.md` § Campaign fixes: Audit, then Verify.
|
|
80
|
+
- Before reopening a writer, invalidate that lane's `FINAL` with the runner and require acknowledgment. Keep every other valid `FINAL` result. Release the reopened writer only when no active gate reads its inputs.
|
|
81
|
+
- Before a closing request, obtain affected write-hold acknowledgments and hold your own source edits. Keep them until the matching complete result arrives. After a fix, request only the checks invalidated by that fix plus any unmet acceptance requirement.
|
|
82
|
+
- Commit after the required gates and review pass. When shared hunks form one integration, commit the batch and identify its units and fixes.
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
# Harness mechanics
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
| ----------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5
|
-
| T3 (any provider) | `delegate_task` with `isolation: "shared"`, `mode: "async"`, a stable `clientRequestId` | `parentThreadId` from `orchestrator_capabilities` | `t3_thread_send`: `queue` for a request (one turn per message, arrival order), `auto` for a reply or ruling, `steer` to change a running lane's instructions; `t3_thread_read` and `t3_thread_wait` to read a lane | a lane address embeds the Orchestrator's MCP session, which can change between launches: write each roster row from its launch result |
|
|
6
|
-
| Claude Code | the `Agent` tool, background by default | the agent id or name the launch returns | the Orchestrator sends `SendMessage` to a running subagent; a subagent without a message tool uses the file channel and the Orchestrator relays | the dispatch aliases `.claude/AGENTS.md` names |
|
|
7
|
-
| Codex | native agents or the CLI (`.agents/transports/codex.md`); under T3, the T3 row | the session id the launch returns | the native message and follow-up tools where the session exposes them; otherwise the T3 row when Codex runs under T3 | `max_concurrent_threads_per_session` in `.codex/config.toml` caps native agents; the shell tool returns after its yield time and leaves the command running, so write output to a file and poll the process or resume the shell session |
|
|
8
|
-
| Cursor | the CLI (`.agents/transports/cursor.md`) | the session id the launch returns | none, so a Cursor lane holds no writer or runner lane | the routing `.agents/orchestration.md` § Routing gives Cursor |
|
|
3
|
+
Apply `.agents/orchestration.md` § Sessions and consultation before choosing a launch or continuation. Read the live tool descriptions; do not infer a wake, resume, or isolation capability from a tool name.
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
5
|
+
| Harness | Start work | Continue work | Track |
|
|
6
|
+
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| T3 | Discover provider, model, options, and limits through `orchestrator_capabilities`. Use `delegate_task` for app-owned children, cross-provider work, requested model options, or worktree isolation. | Send an ordinary continuation to its `childThreadId` through `t3_thread_send`. Use `queue` for a separate request turn and `auto` for a reply or idle continuation. Use `steer` only for an in-flight change. | Retain the returned `taskId`, `childThreadId`, provider, model, and options and check them against the request. Retain each follow-up `taskId` beside, never in place of, the original result. |
|
|
8
|
+
| Claude Code | Start a named custom role with `Agent` for work that needs continuation. Apply the Claude bridge's model rules. | Resume per `.claude/AGENTS.md` § Dispatch. | Retain the stable agent id, not only its display name, and the parent session needed to recover it. |
|
|
9
|
+
| Codex | Use native collaboration when it supports the selected model and no model options are requested or inherited; otherwise use the T3 row. For a CLI bench, follow `.agents/transports/codex.md`. | Use `followup_task` to resume an idle native agent. Use `send_message` to deliver information; it wakes no idle agent. For a bench, use its recorded CLI session's resume command. | Retain the native agent id or CLI session id separately from a long command's shell session and process ids. |
|
|
10
|
+
| Cursor | Follow `.agents/transports/cursor.md` for the read-only bench. | Use only the continuation mechanism the installed transport supports. | Do not assign a writer or runner lane without a demonstrated peer-message wake channel. |
|
|
11
|
+
|
|
12
|
+
- For every T3 independent review round, call `delegate_task` with a distinct `clientRequestId`. Reuse that id only when retrying the same round's uncertain launch. Supply the original brief, prior findings, responses, and unresolved objections. Never continue a review round through `t3_thread_send`.
|
|
13
|
+
- For an ordinary T3 follow-up, use a stable `clientRequestId` and retain the returned task id. A completed task and a later turn in its child thread are distinct results. Read the intended task's status when completion is unclear.
|
|
14
|
+
- Use `restart` only to interrupt an active turn and start it again, never as a resume. Create no ordinary top-level thread as a delegated lane.
|
|
15
|
+
- A timeout on a parent wait cancels no child work. Before retrying a launch whose reply is missing or ambiguous, apply `.agents/orchestration.md` § Sessions and consultation.
|
|
16
|
+
- Keep the idle runner available for queued requests. Wait on completion delivery; run no watcher agent and no file-poll loop. `SKILL.md` § Exchange requests and results owns recovery of a missing notice.
|
|
17
|
+
- When a shell yields, retain and resume its tracked session until the terminal result arrives. Keep its output in the assigned artifact. Do not replace the command with a second launch.
|
|
18
|
+
- After compaction or a harness restart, reconcile the retained roster against the live session and process state. When continuation is unsupported or unavailable, dispatch a successor brief that carries the prior evidence and unresolved work.
|
|
19
|
+
- Keep provider-specific cache claims in evidence. For Claude behavior, verify the installed version against the official documentation; see the [subagent documentation](https://code.claude.com/docs/en/sub-agents), [team limitations](https://code.claude.com/docs/en/agent-teams), and [prompt-cache documentation](https://code.claude.com/docs/en/prompt-caching).
|
|
@@ -4,7 +4,9 @@ Fill every section. Write `none` in an empty one. Replace each `UPPER_SNAKE_CASE
|
|
|
4
4
|
|
|
5
5
|
## Role and engine
|
|
6
6
|
|
|
7
|
-
ROLE on ENGINE, reached as TRANSPORT. Executor: NATIVE_SUBAGENT | BENCH_ENGINE | BRIDGE_DRIVER.
|
|
7
|
+
ROLE on ENGINE with MODEL_OPTIONS, reached as TRANSPORT. Executor: NATIVE_SUBAGENT | BENCH_ENGINE | BRIDGE_DRIVER.
|
|
8
|
+
|
|
9
|
+
**Continuity.** Resume SESSION_ID for RELATED_RESPONSIBILITY, or start fresh because REASON, per `.agents/orchestration.md` § Sessions and consultation. On a resume, name PRIOR_BRIEF_AND_RESULT, CHANGED_FACTS, and SOURCE_IDENTITY.
|
|
8
10
|
|
|
9
11
|
## Objective
|
|
10
12
|
|
|
@@ -28,7 +30,7 @@ UNKNOWN and how the unit reports it.
|
|
|
28
30
|
- **Shared (report-only).** FILES; return an exact patch.
|
|
29
31
|
- **Off-limits.** FILES. Never list `tmp/probes/` here.
|
|
30
32
|
- **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.
|
|
33
|
+
- **Tools and limits.** ALLOWED_TOOLS; scoped validation only; no tree-wide source-mutating command. For a verifier, declare each permitted output path per `.agents/orchestration.md` § Permission floor.
|
|
32
34
|
|
|
33
35
|
## Execution
|
|
34
36
|
|
|
@@ -6,24 +6,25 @@
|
|
|
6
6
|
|
|
7
7
|
- Use the Agent tool for one unit, or when the next step depends on the result. Name a role from `.claude/agents/` as `subagent_type`; never `general-purpose`, `Plan`, `claude`, or `fork`.
|
|
8
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 from § Models and an effort. Serialize writing nodes. Recover an interrupted run with `resumeFromRunId`.
|
|
9
|
-
-
|
|
9
|
+
- Choose continuation or a fresh context per `.agents/orchestration.md` § Sessions and consultation. Resume a compatible custom subagent by its agent id through the installed tool's resume or message interface, and retain that id across compaction and restarts. Before relying on restart recovery, verify that the installed harness resumes that agent type; distinguish custom subagents from team teammates. A surviving transcript file establishes no continuation route. Use no one-shot `Explore` or `Plan` agent for work that needs continuation.
|
|
10
|
+
- Never dispatch `fork`; it inherits the session's model and context. Create independent review and blind design agents in clean contexts on their assigned models.
|
|
10
11
|
- Use the built-in `Explore` agent with `model: haiku` for an exact bounded lookup; apply `.agents/orchestration.md` § Routing. It loads no instruction files.
|
|
11
12
|
- Foreground Bash is capped at 10 minutes. Run anything longer as a background command with an internal `timeout`.
|
|
12
13
|
- 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
|
|
|
14
15
|
## Models
|
|
15
16
|
|
|
16
|
-
- Use the aliases `haiku`, `sonnet`, and `opus` in role frontmatter, a Workflow node, and a per-invocation `model`. Never `fable`, never `inherit`, never a fixed model ID, and never a dispatch that takes its model from the session, an `Explore` call or a Workflow node without `model
|
|
17
|
+
- Use the aliases `haiku`, `sonnet`, and `opus` in role frontmatter, a Workflow node, and a per-invocation `model`. Never `fable`, never `inherit`, never a fixed model ID, and never a dispatch that takes its model from the session, including an `Explore` call or a Workflow node without `model`: Claude Fable 5.1 orchestrates and is never a subagent.
|
|
17
18
|
- Keep `CLAUDE_CODE_SUBAGENT_MODEL` at `sonnet` in the `env` object of `.claude/settings.json`. It serves a subagent that no role frontmatter and no dispatch assigned a model; frontmatter and a per-invocation `model` outrank it (measured 2026-10-08 on Claude Code 2.1.294: `general-purpose` took it, `Plan` did not). Never set `CLAUDE_CODE_SUBAGENT_MODEL_FORCE`; it overrides every role.
|
|
18
19
|
- An alias serves the model the installed Claude Code maps it to. After a model release, measure the mapping with `claude -p "Reply with the single word OK." --model <alias> --output-format json --max-turns 1` and read `modelUsage`; when a newer model answers by id and the alias lags, update Claude Code (`scoop update claude-code` on the Windows host) and measure again. Claude Code 2.1.294 serves Haiku 5.5 as `haiku`, Sonnet 5.5 as `sonnet`, and Opus 5.5 as `opus` (measured 2026-10-08). When a measurement moves an alias, update, in the same change, the version each `.claude/agents/` charter names in its description and opening line and the rows of `.agents/orchestration.md` § Engines.
|
|
19
|
-
- Run the main session on `fable` or `opus` at high effort
|
|
20
|
+
- Run the main session on `fable` or `opus` at high effort. Apply `.agents/orchestration.md` § Cache; check Claude Code's documented behavior for the installed version, model, and provider before changing model options.
|
|
20
21
|
- Reach Astra through `analyst` and `astra`, Grok through `grok`. Role frontmatter carries Claude models only.
|
|
21
22
|
|
|
22
23
|
## Context and cache
|
|
23
24
|
|
|
24
25
|
- 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.
|
|
25
|
-
-
|
|
26
|
-
-
|
|
26
|
+
- Check whether MCP definitions load into the prefix or through deferred tool search before attributing a cache change to a server change.
|
|
27
|
+
- Reload loaded project instructions through `/clear`, `/compact`, or a restart when required by the installed version. Do not treat a changed agent definition as a change to an already running agent's tool set.
|
|
27
28
|
- Route supporting reads per `.agents/orchestration.md` § Routing. The main context holds decisions.
|
|
28
29
|
|
|
29
30
|
## Wiring
|
|
@@ -78,7 +78,7 @@ so network-controlled descriptions never enter agent instruction context.
|
|
|
78
78
|
| `@orkestrel/reason` | `0.0.13` | L2 | `@orkestrel/emitter` `^0.0.12`, `@orkestrel/contract` `^0.0.19` | |
|
|
79
79
|
| `@orkestrel/relation` | `0.0.16` | L3 | `@orkestrel/emitter` `^0.0.12`, `@orkestrel/contract` `^0.0.19`, `@orkestrel/database` `^0.0.18` | |
|
|
80
80
|
| `@orkestrel/router` | `0.0.17` | L2 | `@orkestrel/abort` `^0.0.13`, `@orkestrel/emitter` `^0.0.12`, `@orkestrel/contract` `^0.0.19` | |
|
|
81
|
-
| `@orkestrel/scaffold` | `0.0.
|
|
81
|
+
| `@orkestrel/scaffold` | `0.0.105` | L3 | `@orkestrel/console` `^0.0.16`, `@orkestrel/emitter` `^0.0.12`, `@orkestrel/process` `^0.0.15`, `@orkestrel/contract` `^0.0.19`, `@orkestrel/markdown` `^0.0.17`, `@orkestrel/template` `^0.0.10` | |
|
|
82
82
|
| `@orkestrel/sea` | `0.0.19` | L3 | `@orkestrel/emitter` `^0.0.12`, `@orkestrel/process` `^0.0.15`, `@orkestrel/contract` `^0.0.19` | |
|
|
83
83
|
| `@orkestrel/server` | `0.0.23` | L3 | `@orkestrel/abort` `^0.0.13`, `@orkestrel/codec` `^0.0.6`, `@orkestrel/router` `^0.0.17`, `@orkestrel/emitter` `^0.0.12`, `@orkestrel/timeout` `^0.0.13`, `@orkestrel/contract` `^0.0.19` | |
|
|
84
84
|
| `@orkestrel/sqlite` | `0.0.14` | L1 | `@orkestrel/contract` `^0.0.19` | |
|
|
@@ -8,7 +8,7 @@ permissionMode: default
|
|
|
8
8
|
omitClaudeMd: true
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
On Claude Haiku 5.5,
|
|
11
|
+
On Claude Haiku 5.5, run the requested gates and report their results. Write only the evidence artifacts and the declared outputs `.agents/orchestration.md` § Permission floor permits; never fix source. When dispatched as the runner, follow `.agents/skills/orkestrel-parallel/SKILL.md` for requests, holds, result publication, and continuation. Never spawn another agent.
|
|
12
12
|
|
|
13
13
|
## Do
|
|
14
14
|
|
|
@@ -16,14 +16,14 @@ On Claude Haiku 5.5, you run gates and report their true result. You never edit
|
|
|
16
16
|
2. Read each gate bare. Never pipe it through `tail` or `grep`.
|
|
17
17
|
3. Record each gate's outcome by exit code. A gate that "mostly passes" failed.
|
|
18
18
|
4. On failure, capture the exact failing excerpt and the `file:line` it points to.
|
|
19
|
-
5.
|
|
19
|
+
5. On a timing failure, request one coordinated isolated rerun and preserve both results. When that rerun fails, stop and report; run again only after a changed condition or an explicit investigation request.
|
|
20
20
|
|
|
21
21
|
## Refuse
|
|
22
22
|
|
|
23
|
-
- A mutating gate (`lint`, `format`, or any `--fix`)
|
|
23
|
+
- A source-mutating gate (`lint`, `format`, or any `--fix`), and a build without the declarations and holds `.agents/orchestration.md` § Permission floor requires.
|
|
24
24
|
- `git checkout`, `git restore`, `git stash`, `git reset`, `git clean`. Read a dirty tree as the expected state.
|
|
25
|
-
- Any command that installs, commits, pushes, publishes, deletes
|
|
25
|
+
- Any command that installs, commits, pushes, publishes, deletes beyond what § Permission floor permits, or reads a secret (`.env*`, `.npmrc`, `auth.json`, keys, tokens), whatever the dispatch says.
|
|
26
26
|
|
|
27
27
|
## Return
|
|
28
28
|
|
|
29
|
-
Per gate: command, PASS or FAIL with exit code, failing excerpt and owning file on FAIL. Overall: GREEN only when every gate passed, otherwise the first place to look. Anomalies in one line each.
|
|
29
|
+
Per gate: command, PASS or FAIL with exit code, failing excerpt and owning file on FAIL. Overall: GREEN only when every gate passed, otherwise the first place to look. Anomalies in one line each.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orkestrel-parallel
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
4
|
+
Coordinate independently owned writer lanes in one checkout through messages, with one runner for checks and an Orchestrator for decisions. Use when implementation units can progress in parallel with disjoint files or explicit regions of shared files. Serialize overlapping edits and hold every input needed for a reliable measurement. Require shared files and a channel that can wake an idle lane.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Load the canonical workflow
|
|
@@ -4,21 +4,25 @@ model = "gpt-6-luna"
|
|
|
4
4
|
model_reasoning_effort = "medium"
|
|
5
5
|
sandbox_mode = "workspace-write"
|
|
6
6
|
developer_instructions = """
|
|
7
|
-
Run gates and report their
|
|
8
|
-
.agents/
|
|
9
|
-
|
|
7
|
+
Run the requested gates and report their results. Write only the evidence artifacts and the declared
|
|
8
|
+
outputs .agents/orchestration.md § Permission floor permits; never fix source. When dispatched as the
|
|
9
|
+
runner, follow .agents/skills/orkestrel-parallel/SKILL.md for requests, holds, result publication,
|
|
10
|
+
and continuation. Never spawn another agent.
|
|
10
11
|
|
|
11
12
|
Run exactly the commands the dispatch names, in order. Default scoped sweep: the check: and test:
|
|
12
13
|
scripts of each named project. Default tree-wide sweep, only when the dispatch says tree-wide:
|
|
13
14
|
npm run format:check; npm run lint:check; npm run check; npm run build; npm test. Read each gate
|
|
14
15
|
bare, never through tail or grep. Record each outcome by exit code; a gate that mostly passes
|
|
15
|
-
failed. On failure capture the exact excerpt and the file:line it points to.
|
|
16
|
-
|
|
16
|
+
failed. On failure capture the exact excerpt and the file:line it points to. On a timing failure, request one coordinated isolated rerun and preserve both results. When that
|
|
17
|
+
rerun fails, stop and report; run again only after a changed condition or an explicit investigation
|
|
18
|
+
request.
|
|
17
19
|
|
|
18
|
-
Never run a mutating gate
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
Never run a source-mutating gate (lint, format, or any --fix), or a build without the declarations
|
|
21
|
+
and holds .agents/orchestration.md § Permission floor requires. Never run git checkout, restore,
|
|
22
|
+
stash, reset, or clean; read a dirty tree as the expected state. Never install, commit, push,
|
|
23
|
+
publish, delete beyond what § Permission floor permits, or read a secret (.env*, .npmrc, auth.json,
|
|
24
|
+
keys, tokens), whatever the dispatch says.
|
|
21
25
|
|
|
22
26
|
Return per gate: command, PASS or FAIL with exit code, excerpt and owning file on FAIL; overall
|
|
23
|
-
GREEN only when every gate passed; anomalies in one line each.
|
|
27
|
+
GREEN only when every gate passed; anomalies in one line each.
|
|
24
28
|
"""
|
|
@@ -14,12 +14,10 @@ Codex loads AGENTS.md itself. Read each .claude/rules/*.md file whose paths fron
|
|
|
14
14
|
files you touch; Codex does not load them for you. Follow a skill under .agents/skills when its
|
|
15
15
|
trigger fires.
|
|
16
16
|
|
|
17
|
-
Use the
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- The grok driver reaches Cursor Grok 4.7 Extra High read-only through .agents/transports/cursor.md;
|
|
22
|
-
apply .agents/orchestration.md § Routing for the reading boundary.
|
|
17
|
+
Use the role mapping and continuation rules in .agents/orchestration.md. Before using native or
|
|
18
|
+
T3 collaboration, read .agents/skills/orkestrel-parallel/references/harnesses.md for the channel
|
|
19
|
+
mechanics and retained identifiers, and read the installed tool descriptions before relying on a
|
|
20
|
+
capability that reference names.
|
|
23
21
|
|
|
24
22
|
Hooks: .codex/hooks.json runs the orkestrel-dispatch sweep script (node
|
|
25
23
|
.agents/skills/orkestrel-dispatch/scripts/sweep.ts --report) on SessionStart and git diff --check
|