@orkestrel/scaffold 0.0.107 → 0.0.108
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/sweep.js +124 -4
- package/dist/bin/main.js +1 -1
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +5 -1
- package/dist/host/agents/orchestration.md +60 -45
- package/dist/host/agents/platforms/posix.md +15 -0
- package/dist/host/agents/platforms/windows.md +37 -0
- package/dist/host/agents/skills/orkestrel-debrief/references/retention.md +10 -10
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +6 -5
- package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +12 -8
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +144 -4
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +67 -10
- package/dist/host/agents/skills/orkestrel-parallel/agents/openai.yaml +2 -2
- package/dist/host/agents/skills/orkestrel-parallel/references/claude.md +32 -0
- package/dist/host/agents/skills/orkestrel-parallel/references/codex.md +28 -0
- package/dist/host/agents/skills/orkestrel-parallel/references/cursor.md +29 -0
- package/dist/host/agents/skills/orkestrel-parallel/references/t3.md +31 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +2 -1
- package/dist/host/agents/transports/codex.md +1 -1
- package/dist/host/claude/AGENTS.md +6 -9
- package/dist/host/claude/rules/campaign.md +55 -0
- package/dist/host/claude/rules/documentation.md +2 -0
- package/dist/host/claude/rules/portability.md +1 -2
- package/dist/host/claude/rules/typescript.md +1 -1
- package/dist/host/claude/rules/writing.md +5 -2
- package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
- package/dist/host/codex/config.toml +3 -3
- package/dist/host/configs/policy.ts +106 -1
- package/dist/host/cursor/rules/orchestration.mdc +1 -0
- package/dist/host/dotfiles/oxlintrc.json +4 -2
- package/dist/host/guides/scaffold.md +56 -1
- package/dist/host/manifest.json +64 -27
- package/dist/host/tests/config.test.ts +560 -5
- package/dist/host/tests/setupPolicy.ts +496 -6
- package/dist/src/core/index.cjs +26 -2
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +1 -1
- package/dist/src/core/index.d.ts +1 -1
- package/dist/src/core/index.js +26 -2
- package/dist/src/core/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/host/agents/skills/orkestrel-parallel/references/harnesses.md +0 -19
package/dist/host/AGENTS.md
CHANGED
|
@@ -70,6 +70,8 @@ configs/ thin target wrappers around root Vite/TypeScript configuration
|
|
|
70
70
|
|
|
71
71
|
## Work loop
|
|
72
72
|
|
|
73
|
+
Types, tests, and implementation decide every step; comments, TSDoc, and guides follow the final implementation. Report results against the goal, and prefer the smallest change that reaches green over a perfect one.
|
|
74
|
+
|
|
73
75
|
Size the change before touching a file. Take the largest row whose trigger applies: large, then medium, then small. Run only what the row names.
|
|
74
76
|
|
|
75
77
|
| Size | Trigger | Do |
|
|
@@ -87,7 +89,7 @@ Within the size, in order:
|
|
|
87
89
|
3. **Implement.** Conform to the types. Place each declaration in its kind file. Update the barrel.
|
|
88
90
|
4. **Test.** Cover happy paths, edge cases, failures, and boundaries with deterministic tests against real implementations. For a defect, record the failing command and count before the fix and the same command green after.
|
|
89
91
|
5. **Consolidate.** Remove duplication, nested functions, and superfluous wrappers without widening the API.
|
|
90
|
-
6. **Document.**
|
|
92
|
+
6. **Document.** Once the implementation is final, update the matching guide, comments, and TSDoc in one minimal pass. Before then, write, revise, and review no prose.
|
|
91
93
|
|
|
92
94
|
Test ladder, narrowest first; stop at the boundary the change size names:
|
|
93
95
|
|
|
@@ -96,6 +98,7 @@ Test ladder, narrowest first; stop at the boundary the change size names:
|
|
|
96
98
|
3. The touched project: `npm run test:<project>`, plus the `check:` script for that project where `package.json` declares one.
|
|
97
99
|
4. Tree-wide gates, once, by `verifier`: `npm run format:check`, `npm run lint:check`, `npm run check`, `npm run build`, `npm test`.
|
|
98
100
|
|
|
101
|
+
- Run types and behavior tests before format, lint, and guide checks. A format, lint, or guide failure never stops a behavior run; fix it in the final pass.
|
|
99
102
|
- Run the mutating `npm run lint` then `npm run format` only to converge before the non-mutating gates.
|
|
100
103
|
- A writing unit stops at the project boundary and reports the commands it ran. `verifier` runs the tree-wide gates when dispatched for them and edits no source.
|
|
101
104
|
- Never claim a gate passed without running it and reading its output bare, with no `| tail` or `| grep` behind it.
|
|
@@ -122,6 +125,7 @@ Each row is a normative extension of this file. Its `paths` frontmatter controls
|
|
|
122
125
|
| `.claude/rules/documentation.md` | Guides, parity, roadmap, showcase, examples, skill files |
|
|
123
126
|
| `.claude/rules/writing.md` | Prose in guides, replies, commits, and instruction files |
|
|
124
127
|
| `.claude/rules/quality.md` | Evidence, probes, instruments, performance, research, completion |
|
|
128
|
+
| `.claude/rules/campaign.md` | The `.orkestrel/` campaign folder: layout, content, session start |
|
|
125
129
|
|
|
126
130
|
## Writing
|
|
127
131
|
|
|
@@ -6,41 +6,44 @@ How agents are dispatched, parallelized, reviewed, and cleaned up. Every harness
|
|
|
6
6
|
|
|
7
7
|
Read in order: the user's instruction; `AGENTS.md` and the rules it scopes to your paths; this file; the named skill; the guide. A harness bridge (`.claude/AGENTS.md`, `.codex/config.toml`, `.cursor/rules/orchestration.mdc`) adds mechanics and restates nothing here.
|
|
8
8
|
|
|
9
|
+
On a harness with no bridge, orchestrate natively, record the harness in the roster, and dispatch no writer or runner lane until a page under `.agents/skills/orkestrel-parallel/references/` answers that skill's bring-up questions for it.
|
|
10
|
+
|
|
9
11
|
## Engines
|
|
10
12
|
|
|
11
13
|
Name the harness family and its access route: Claude through Claude Code or the Claude CLI; Codex through Codex native agents or the Codex CLI; Cursor through the Cursor CLI, with Grok 4.7 Extra High for the Grok bench. Classify GPT-6 Astra, GPT-6.1 Sol, and GPT-6 Luna as Codex-family engines, including when another harness hosts the Orchestrator.
|
|
12
14
|
|
|
13
|
-
| Engine | Job | Posture
|
|
14
|
-
| ----------------------- | ------------------------------------------------------------------------------- |
|
|
15
|
-
| Claude Fable 5.1 | orchestration in Claude Code: the plan, every decision, integration, acceptance | never dispatched: never a subagent, a bench, a fork, or a Workflow node |
|
|
16
|
-
| Cursor Grok | context absorption, distillation, broad mapping, exploration | read-only; returns evidence, never decisions
|
|
17
|
-
| Claude Opus 5.5 | subjective design, design-fit review, implementation | proposes, audits, implements; never accepts its own work
|
|
18
|
-
| GPT-6 Astra | objective analysis, correctness audit, implementation | proposes, audits, implements; never accepts its own work
|
|
19
|
-
| Claude Sonnet 5.5 | bounded implementation of a closed shape, ecosystem reconciliation | executes a fully specified brief
|
|
20
|
-
| Claude Haiku 5.5 | bench drivers, small precise tasks, exact lookups, conformance, gates | executes a fully specified brief; edits no source
|
|
21
|
-
| GPT-6.1 Sol, GPT-6 Luna | mechanical units, drivers, small precise tasks, gates, exact lookups | executes a fully specified brief
|
|
15
|
+
| Engine | Job | Posture |
|
|
16
|
+
| ----------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| Claude Fable 5.1 | orchestration in Claude Code: the plan, every decision, integration, acceptance | never dispatched: never a subagent, a bench, a fork, or a Workflow node, except as the consultant the user names for a wording and coherence pass after research and technical review |
|
|
18
|
+
| Cursor Grok | context absorption, distillation, broad mapping, exploration | read-only; returns evidence, never decisions |
|
|
19
|
+
| Claude Opus 5.5 | subjective design, design-fit review, implementation | proposes, audits, implements; never accepts its own work |
|
|
20
|
+
| GPT-6 Astra | objective analysis, correctness audit, implementation | proposes, audits, implements; never accepts its own work |
|
|
21
|
+
| Claude Sonnet 5.5 | bounded implementation of a closed shape, ecosystem reconciliation | executes a fully specified brief |
|
|
22
|
+
| Claude Haiku 5.5 | bench drivers, small precise tasks, exact lookups, conformance, gates | executes a fully specified brief; edits no source |
|
|
23
|
+
| GPT-6.1 Sol, GPT-6 Luna | mechanical units, drivers, small precise tasks, gates, exact lookups | executes a fully specified brief |
|
|
22
24
|
|
|
23
25
|
The harness's own engine orchestrates: Claude Fable 5.1 or Claude Opus 5.5 in Claude Code, GPT-6 Astra in Codex, Cursor Grok in Cursor. The Orchestrator owns the plan, every decision, integration, and acceptance. When the harness is Codex or the Orchestrator uses a Codex-family engine, use the Codex column: map Opus to GPT-6 Astra, Sonnet to GPT-6.1 Sol, and Haiku to GPT-6 Luna; execute mapped Astra roles natively without an Opus bench probe. Under this mapping, assign review to another agent in a clean context and forbid self-review, including when writer and reviewer both use Astra. For other harnesses, review runs on an engine that did not write the work.
|
|
24
26
|
|
|
25
27
|
## Roles
|
|
26
28
|
|
|
27
|
-
| Role | Job | Claude | Codex |
|
|
28
|
-
| ------------ | ---------------------------------------------------------- | ------------ | ----------- |
|
|
29
|
-
| `grok` | absorption, distillation, broad mapping, exploration | haiku driver | luna driver |
|
|
30
|
-
| `analyst` | objective design argument or correctness audit on Astra | haiku driver | astra |
|
|
31
|
-
| `astra` | objective, constraint-heavy implementation on Astra | haiku driver | astra |
|
|
32
|
-
| `planner` | subjective design | opus | astra |
|
|
33
|
-
| `reviewer` | design-fit or correctness review | opus | astra |
|
|
34
|
-
| `opus` | subjective implementation (API shape, naming, guide voice) | opus | astra |
|
|
35
|
-
| `builder` | one bounded unit with a closed shape, app layer included | sonnet | sol |
|
|
36
|
-
| `checker` | mechanical conformance against criteria and rules | haiku | luna |
|
|
37
|
-
| `verifier` | gates and evidence commands, exit-code truth | haiku | luna |
|
|
38
|
-
| `scout` | exact bounded lookup of files, symbols, seams | haiku | luna |
|
|
39
|
-
| `distiller` | bulk reading when the Cursor bench is dark | haiku | luna |
|
|
40
|
-
| `researcher` | primary-source research when the Cursor bench is dark | haiku | luna |
|
|
41
|
-
| `orkestrel` | ecosystem reconciliation over supplied evidence | sonnet | sol |
|
|
29
|
+
| Role | Job | Capability | Claude | Codex |
|
|
30
|
+
| ------------ | ---------------------------------------------------------- | ------------ | ------------ | ----------- |
|
|
31
|
+
| `grok` | absorption, distillation, broad mapping, exploration | reader | haiku driver | luna driver |
|
|
32
|
+
| `analyst` | objective design argument or correctness audit on Astra | objective | haiku driver | astra |
|
|
33
|
+
| `astra` | objective, constraint-heavy implementation on Astra | objective | haiku driver | astra |
|
|
34
|
+
| `planner` | subjective design | subjective | opus | astra |
|
|
35
|
+
| `reviewer` | design-fit or correctness review | subjective | opus | astra |
|
|
36
|
+
| `opus` | subjective implementation (API shape, naming, guide voice) | subjective | opus | astra |
|
|
37
|
+
| `builder` | one bounded unit with a closed shape, app layer included | closed-shape | sonnet | sol |
|
|
38
|
+
| `checker` | mechanical conformance against criteria and rules | mechanical | haiku | luna |
|
|
39
|
+
| `verifier` | gates and evidence commands, exit-code truth | mechanical | haiku | luna |
|
|
40
|
+
| `scout` | exact bounded lookup of files, symbols, seams | mechanical | haiku | luna |
|
|
41
|
+
| `distiller` | bulk reading when the Cursor bench is dark | reader | haiku | luna |
|
|
42
|
+
| `researcher` | primary-source research when the Cursor bench is dark | reader | haiku | luna |
|
|
43
|
+
| `orkestrel` | ecosystem reconciliation over supplied evidence | closed-shape | sonnet | sol |
|
|
42
44
|
|
|
43
45
|
- Name the role and its engine in every dispatch. Reach a role by its own name.
|
|
46
|
+
- On a harness with no column, map each capability to an engine in the roster and route by that map; add the harness's column here when it carries campaign work.
|
|
44
47
|
- A driver launches another harness's CLI and returns the journal path and session id with the result. It never judges or implements. Refuse a bench result that carries no journal path and session id; it ran on the driver.
|
|
45
48
|
- `.agents/transports/<harness>.md` owns each bench's invocation, sandbox, journal, and recovery. `.claude/agents/` and `.codex/agents/` hold one file per role.
|
|
46
49
|
|
|
@@ -50,20 +53,34 @@ The harness's own engine orchestrates: Claude Fable 5.1 or Claude Opus 5.5 in Cl
|
|
|
50
53
|
- Route all context absorption, distillation, broad mapping, and exploratory or fishing reads to `grok` on Cursor Grok 4.7 Extra High: terrain, prior art, diff sweeps, scattered sources. Keep decision-bearing reading with the decision owner. Fall back to `distiller` or `researcher` only when the Cursor bench is dark, and record the fallback; ease or cost never authorizes a fallback.
|
|
51
54
|
- Keep small tedious precise tasks native: Claude Haiku in Claude, Codex Luna in Codex. Use `scout` for an exact bounded lookup; keep bench drivers, `checker`, and `verifier` on their mapped native engines. A bounded file scope does not turn context absorption or exploratory reading into a native lookup.
|
|
52
55
|
- Route gates to `verifier`. A writer's self-reported gate is not evidence.
|
|
56
|
+
- Under the Codex mapping, put falsify lanes on Astra or Sol at high effort; keep Luna for gates and verifier runs, never for a lane that must resolve runtime claims.
|
|
53
57
|
- 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
58
|
|
|
55
59
|
## Sessions and consultation
|
|
56
60
|
|
|
57
61
|
- 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
62
|
- 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,
|
|
63
|
+
- 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, most recent task, and evidence paths in the roster, and preserve its prior task results. The roster is `coord/roster.md` of the live `orkestrel-parallel` round, or `tmp/units/roster.md` when no round is live.
|
|
60
64
|
- 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
65
|
- 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
66
|
- 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
67
|
- 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
68
|
- 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
69
|
- 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
|
|
70
|
+
- When a requested launch channel 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.
|
|
71
|
+
|
|
72
|
+
## Memory
|
|
73
|
+
|
|
74
|
+
- Agent memory is per user and per machine; it travels with neither the repository nor the harness. Keep only machine-local facts and pointers to tracked files there: paths, accounts, engine availability, process ids.
|
|
75
|
+
- When a ruling, correction, or lesson arrives, write it to its tracked home in the same turn: ecosystem law in the scaffold repository, a package decision in its campaign folder, a harness mechanic on its page under `.agents/skills/orkestrel-parallel/references/`, a platform quirk on its page under `.agents/platforms/`. No tracked file cites memory.
|
|
76
|
+
|
|
77
|
+
## Pace
|
|
78
|
+
|
|
79
|
+
- Spend process only where it changes a result. Launch, run, and report: no fixed clock windows, readiness-only turns, per-command acknowledgments, hash pins of a brief, or process queries beyond the recorded process ids.
|
|
80
|
+
- Re-run a check only when its inputs changed; never repeat a passing check to collect another receipt.
|
|
81
|
+
- Ask the user only for a decision that is theirs: scope, a conflicting ruling, a credential, publication, or a commit or push the law reserves. Decide routine matters yourself, such as time and lane allowances, retries, and order, and report them.
|
|
82
|
+
- Never end a turn with work pending and nothing that will wake the session: run the work as a tracked background command or a child whose completion notifies, or schedule a wake. While a lane runs, continue independent work.
|
|
83
|
+
- Keep the goal, the current step, and the next action visible in the campaign plan, and report progress against the goal at each milestone.
|
|
67
84
|
|
|
68
85
|
## Size gate
|
|
69
86
|
|
|
@@ -76,16 +93,17 @@ The harness's own engine orchestrates: Claude Fable 5.1 or Claude Opus 5.5 in Cl
|
|
|
76
93
|
| large | one independent round: `planner` and `analyst`, same brief, clean contexts, blind to each other | disjoint units in parallel | one `orkestrel-falsify` round on the integrated result | `verifier` tree-wide, once |
|
|
77
94
|
|
|
78
95
|
- Never run a review on a small change. Never run a second design round on the same brief.
|
|
96
|
+
- A review judges types, tests, and implementation. It reports comment, TSDoc, or guide wording only where the text contradicts the final behavior, and no fix round opens for prose alone.
|
|
79
97
|
- A fix round re-audits the repaired claim only. A fix that adopted the reviewer's prescription verbatim closes with a mutation probe (disable the load-bearing line, watch the test fail, restore it). A fix that departs from it gets one pass by an independent reviewer per § Engines.
|
|
80
98
|
- When review rounds at one seam keep surfacing defects without converging on their source, follow `.agents/skills/orkestrel-falsify/SKILL.md` § End the depth search.
|
|
81
99
|
- An all-confirmed round ends the audit. A round needs an added or repaired claim to test; reviewer appetite is not a subject.
|
|
82
100
|
|
|
83
101
|
## Campaign
|
|
84
102
|
|
|
85
|
-
A large change runs these phases once each, in order, and ends when
|
|
103
|
+
A large change opens with a concise goal and its exit criterion, short enough to serve as a goal prompt. It runs these phases once each, in order, and ends when that exit criterion is met.
|
|
86
104
|
|
|
87
105
|
1. **Absorb.** Map the terrain with the `orkestrel-scout` skill's `map.ts`, then `grok` distills it and the prior art. In an Orkestrel repository, `verifier` or another tool-capable role collects manifests, lockfiles, installed declarations, and registry readings, and `orkestrel` reconciles them.
|
|
88
|
-
2. **Design.** One independent round: `planner` (subjective) and `analyst` (objective) on one brief, clean contexts, blind to each other. Reconcile into one plan: units, owned files, dependencies, parallel and serial order, acceptance criteria, exit criterion,
|
|
106
|
+
2. **Design.** One independent round: `planner` (subjective) and `analyst` (objective) on one brief, clean contexts, blind to each other. Reconcile into one plan: units, owned files, dependencies, parallel and serial order, acceptance criteria, exit criterion, ledger.
|
|
89
107
|
3. **Implement.** Dispatch units per § Routing and § Parallelism.
|
|
90
108
|
4. **Integrate.** Apply returned patches to shared files serially. A type, mechanism, or criterion found here is a successor unit, never an integration edit.
|
|
91
109
|
5. **Audit.** One `orkestrel-falsify` round on the integrated result, an independent reviewer per § Engines in each lane; add `checker` when the criteria are mechanical.
|
|
@@ -97,7 +115,10 @@ A large change runs these phases once each, in order, and ends when the exit cri
|
|
|
97
115
|
|
|
98
116
|
- 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.
|
|
99
117
|
- 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.
|
|
118
|
+
- Keep every lane, in this session and in peer sessions on the same machine, within the host budget of `.agents/skills/orkestrel-parallel/SKILL.md` § Bound the host.
|
|
100
119
|
- 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.
|
|
120
|
+
- Fold every branch, clone, copy, or worktree an agent creates back into the original checkout's main branch with its changes left uncommitted there, so the user sees the whole difference from that branch. Commit inside the branch, clone, copy, or worktree as its unit needs, then remove it and delete its branch.
|
|
121
|
+
- In a checkout another session shares, read the branch and `git status` before a write, and stop and ask the user when another session's uncommitted work is present.
|
|
101
122
|
- 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.
|
|
102
123
|
- 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.
|
|
103
124
|
- One Grok lane at a time; queue the rest. An empty lane beside a live probe is starvation, not darkness.
|
|
@@ -122,7 +143,7 @@ Every working file lives under the checkout's gitignored `tmp/`, in the director
|
|
|
122
143
|
| Directory | Holds |
|
|
123
144
|
| ------------------------------------------ | -------------------------------------------------------------------------------------------------- |
|
|
124
145
|
| `tmp/claude/`, `tmp/codex/`, `tmp/cursor/` | bench briefs, launch scripts, journals, `.err` files, last-message files, login logs, per harness |
|
|
125
|
-
| `tmp/units/` | native unit briefs, reports, claims files, and
|
|
146
|
+
| `tmp/units/` | native unit briefs, reports, claims files, and unit records |
|
|
126
147
|
| `tmp/probes/` | runtime probes the `probe` Vitest project collects and the `probe` MCP server arms |
|
|
127
148
|
| `tmp/type/` | the type stage's workspace mirror, owned by `@orkestrel/probe` |
|
|
128
149
|
| `tmp/captures/` | screenshots, resolved-style snapshots, and other capture portfolios |
|
|
@@ -131,28 +152,20 @@ Every working file lives under the checkout's gitignored `tmp/`, in the director
|
|
|
131
152
|
|
|
132
153
|
## .orkestrel layout
|
|
133
154
|
|
|
134
|
-
`.orkestrel/` is the campaign folder
|
|
135
|
-
|
|
136
|
-
| Path | Holds |
|
|
137
|
-
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
138
|
-
| `.orkestrel/<package>/` | one package's live campaign: its `plan.md`, its routing ledger, the verdicts of its open seams, and its exposure records |
|
|
139
|
-
| `.orkestrel/plan.md` | the live fleet campaign's plan: goal, exit criterion, packages, layer order, and the units each package owes |
|
|
140
|
-
| `.orkestrel/ledger.md` | the fleet campaign's routing ledger: every dispatch, engine, and bench substitution across packages |
|
|
141
|
-
| `.orkestrel/release.md` | the live release wave: its layers, each package's bump ruling with its evidence, the round each package landed in, and standing readings |
|
|
142
|
-
|
|
143
|
-
- Write a file about one package under that package's directory and never at the top level; write a file about two or more packages at the top level and never under a package.
|
|
144
|
-
- Delete a package directory in that campaign's acceptance commit and a top-level file when the wave or fleet campaign it records closes. `sweep.ts --report` lists both.
|
|
155
|
+
`.orkestrel/` is the campaign folder, never a home for a rule. `.claude/rules/campaign.md` owns its layout, its content, its deletion, and how a session starts from it and hands it off. Read that rule at the start of every session in a repository that has the folder, whether or not the harness loads it by path.
|
|
145
156
|
|
|
146
157
|
## Dispatch
|
|
147
158
|
|
|
148
159
|
`orkestrel-dispatch` owns the brief template, launch mechanics for native and bench units, long-running commands, liveness, and recovery. Load it before a bench lane, a campaign unit, or any command that outlives the turn. The floor that follows binds every dispatch.
|
|
149
160
|
|
|
150
|
-
- A small native unit's brief is the dispatch message: scope, law references, expected result. Write a brief file with the dispatch skill's `scripts/brief.ts` at `tmp/units/<unit>-brief.md` (native) or `tmp/<bench>/<unit>-brief.md` (bench) when the unit is a bench lane, belongs to a campaign, or
|
|
161
|
+
- A small native unit's brief is the dispatch message: scope, law references, expected result. Write a brief file with the dispatch skill's `scripts/brief.ts` at `tmp/units/<unit>-brief.md` (native) or `tmp/<bench>/<unit>-brief.md` (bench) when the unit is a bench lane, belongs to a campaign, or might need re-running. A re-run gets `<unit>-brief-<n>.md`; never edit a launched brief.
|
|
151
162
|
- State in every brief: role and engine, one objective, the evidence slice, owned and off-limits files, the acceptance criteria cheap-first, the return shape, the deviation contract, and that the executor performs the work itself and spawns nothing.
|
|
152
163
|
- Capture a campaign unit's report to `tmp/units/<unit>-report.md`, or read the bench's last-message file.
|
|
153
164
|
- 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.
|
|
154
165
|
- 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.
|
|
155
166
|
- 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.
|
|
167
|
+
- Commit every tracked record edit before a dispatch whose entry reads `git status`, and edit only ignored files while that unit runs.
|
|
168
|
+
- `.agents/platforms/<platform>.md` owns the host shell's commands and quirks; read it before the first command on that host. On a host family with no page, write one from measurement before the first long command.
|
|
156
169
|
|
|
157
170
|
## Deviation protocol
|
|
158
171
|
|
|
@@ -163,14 +176,14 @@ The Orchestrator triages: obvious correction → tighten and re-dispatch; missin
|
|
|
163
176
|
## Benches
|
|
164
177
|
|
|
165
178
|
- Probe a bench with the dispatch skill's `scripts/bench.ts` and the model its transport pins before its first lane in a session. A version string or a login status is not liveness.
|
|
166
|
-
- For a harness that uses a bench, record a dispatch that fails on auth, quota, model access, or network as bench dark and re-plan the lane: Astra bench dark → Claude Opus holds the objective lane too; Claude Opus bench dark → Astra holds the subjective lane too; Grok dark → the harness's native reader, `distiller` or `researcher`: Claude Haiku 5.5 in Claude Code, GPT-6 Luna under the Codex mapping. When Haiku refuses the read, re-dispatch the role with `model: sonnet`. Record every substitution in the
|
|
179
|
+
- For a harness that uses a bench, record a dispatch that fails on auth, quota, model access, or network as bench dark and re-plan the lane: Astra bench dark → Claude Opus holds the objective lane too; Claude Opus bench dark → Astra holds the subjective lane too; Grok dark → the harness's native reader, `distiller` or `researcher`: Claude Haiku 5.5 in Claude Code, GPT-6 Luna under the Codex mapping. When Haiku refuses the read, re-dispatch the role with `model: sonnet`. Record every substitution in the brief and in the commit that carries the unit. For a native role failure, use § Deviation protocol without a Claude fallback prerequisite.
|
|
167
180
|
- Never assign Grok a design or review lane in Claude Code or Codex.
|
|
168
181
|
- Journal every bench run under `tmp/<bench>/` with its session id. Never commit a journal.
|
|
169
182
|
|
|
170
183
|
## Cleanup
|
|
171
184
|
|
|
172
|
-
- When a unit is accepted, carry its measurements, unresolved findings, and any instrument worth keeping into the commit message,
|
|
173
|
-
- `.
|
|
185
|
+
- When a unit is accepted, carry its measurements, unresolved findings, and any instrument worth keeping into the commit message, a tracked design, or a test, then delete its `tmp/units/<unit>-*` files and its bench journals.
|
|
186
|
+
- `.claude/rules/campaign.md` owns what `.orkestrel/` holds and when each file goes; git history is the archive.
|
|
174
187
|
- Delete a probe from the source tree before the unit returns; promote a probe that settled a claim into a test.
|
|
175
188
|
- Run `node .agents/skills/orkestrel-dispatch/scripts/sweep.ts --report` at acceptance; it lists leftovers under `tmp/` and `.orkestrel/` by age and deletes nothing. Run the same script with `--tmp` after the last live unit exits; it deletes files older than its threshold and refuses while a journal is changing.
|
|
176
189
|
- A campaign artifact never lives in the package it is about.
|
|
@@ -186,5 +199,7 @@ The Orchestrator triages: obvious correction → tighten and re-dispatch; missin
|
|
|
186
199
|
|
|
187
200
|
- No writer's and no bench's self-assessment is authoritative. The Orchestrator accepts after the review and the gates the size gate names.
|
|
188
201
|
- Accept when the exit criterion is met and the gates are green. Reopening an accepted criterion is the user's instruction, not a reviewer's finding.
|
|
189
|
-
- Substitute an engine only when the same session recorded the bench dark; name the fallback in the
|
|
202
|
+
- Substitute an engine only when the same session recorded the bench dark; name the fallback in the brief and the carrying commit.
|
|
203
|
+
- In a repository whose package the registry already serves, commit on the main branch and push it only on the user's go-ahead.
|
|
204
|
+
- Commit by explicit paths. Before a push, read `git log @{upstream}..` and push only commits meant to publish together; hold a push while a commit depends on an unpublished local pin.
|
|
190
205
|
- Publishing is the user's decision and credential; `orkestrel-publish` owns the release procedure, the bump rules, and the dependency-tarball rules.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# POSIX host
|
|
2
|
+
|
|
3
|
+
The commands an agent runs on a Linux or macOS host. `.claude/rules/portability.md` owns product code that runs on these hosts; `.agents/skills/orkestrel-dispatch/references/launch.md` owns the portable launch and kill procedure this page serves.
|
|
4
|
+
|
|
5
|
+
## Processes
|
|
6
|
+
|
|
7
|
+
- Read liveness with `kill -0 <pid>`; exit 0 means alive.
|
|
8
|
+
- List descendants by running `ps -A -o pid= -o ppid=`, taking the rows whose parent is the recorded pid, then each listed id in turn. Never take a pid from `pgrep -f` or `pkill -f`.
|
|
9
|
+
- Kill each listed id and the recorded pid with `kill -KILL <id>`. `launch.ts` kills only the command at its cap on this host; kill the listed descendants of a capped run by hand.
|
|
10
|
+
- No detach procedure is proven on this host. Before a run relies on one, prove that a detached run outlives the harness's idle stop, and record the procedure here with its date.
|
|
11
|
+
|
|
12
|
+
## Shell
|
|
13
|
+
|
|
14
|
+
- Gate a command on the previous one with `&&`, and read `$?` immediately after the command it reports on.
|
|
15
|
+
- Pass arguments as an array from a TypeScript launcher rather than through shell quoting.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Windows host
|
|
2
|
+
|
|
3
|
+
The commands an agent runs on a Windows host, and their quirks. `.claude/rules/portability.md` owns product code that runs on Windows; `.agents/skills/orkestrel-dispatch/references/launch.md` owns the portable launch and kill procedure this page serves.
|
|
4
|
+
|
|
5
|
+
## Processes
|
|
6
|
+
|
|
7
|
+
- Read liveness with `Get-Process -Id <pid>` in PowerShell, or under Git Bash from the output of `tasklist //FI "PID eq <pid>" //NH`: a row naming the pid means alive, and the `INFO:` line means gone. Never read liveness from `tasklist`'s exit code, `kill -0`, or `ps -eo`.
|
|
8
|
+
- List descendants with `Get-CimInstance Win32_Process -Filter "ParentProcessId=<pid>"`, applied to each listed id in turn. Under Git Bash, run it through `powershell -NoProfile -Command`, and write every Windows slash option as `//`.
|
|
9
|
+
- Kill a recorded tree with `taskkill /pid <pid> /T /F`. `launch.ts` kills the tree at its cap on this host.
|
|
10
|
+
- Detach a run from the session's process tree with WMI: `Invoke-CimMethod -ClassName Win32_Process -MethodName Create -Arguments @{ CommandLine = '<command>' }`. The run starts under `WmiPrvSE.exe`, outside the session's job and process tree (verified 2026-10-16). It receives the user's registry environment, not the caller's, so pass each value it needs on its command line. Record its journal and pid-file paths before the launch.
|
|
11
|
+
- Spawn npm without a shell through its JavaScript entry: `node <node directory>/node_modules/npm/bin/npm-cli.js <arguments>`. A `.cmd` shim cannot start without a shell, and `launch.ts` reports exit `127`.
|
|
12
|
+
- A child CLI can leak orphaned `conhost.exe` processes and open console windows. Count them with `Get-Process conhost` at each launch while such a lane is live.
|
|
13
|
+
|
|
14
|
+
## PowerShell 5.1
|
|
15
|
+
|
|
16
|
+
- Chain with `;` and gate with `if ($?) { ... }`; `&&` and `||` are parse errors.
|
|
17
|
+
- Edit text with the harness's file tools, never `Get-Content` piped through `-replace` into `Set-Content`. `-replace` matches case-insensitively, `Set-Content` writes the ANSI code page, `Set-Content -Encoding utf8` and `Out-File` write a byte-order mark, and the round trip turns non-ASCII punctuation into mojibake.
|
|
18
|
+
- Write a commit message to a file with the harness's file tool and commit with `git commit -F <file>`. A here-string carrying double quotes splits into stray arguments, and a byte-order mark in the file lands in the commit subject.
|
|
19
|
+
- Never pipe a command whose exit code gates the next step, a `node` probe included, into `Select-Object -First` or `-Last`. The cut pipeline kills the command early and leaves a misleading `$LASTEXITCODE`. Run it bare, read `$LASTEXITCODE`, or decide from `git status --porcelain` and `git rev-parse`.
|
|
20
|
+
- PowerShell drops a bare `--` before a native command, so `npm run <script> -- <arguments>` loses the separator. Run the tool's own entry with an argument array, or call `npm.cmd`.
|
|
21
|
+
- `Start-Process -ArgumentList` splits an element that contains spaces into several arguments. Put the launch in a TypeScript file run by `node`. `Start-Process` also detaches with no completion notice.
|
|
22
|
+
- Pass an absolute path to every .NET file call; `[System.IO.File]` resolves a relative path against the process directory, which `Set-Location` does not move.
|
|
23
|
+
- `Get-Content` without `-Encoding` reads a UTF-8 file with no byte-order mark as ANSI. Read with `-Encoding utf8` before concluding the bytes are corrupt.
|
|
24
|
+
- `*>` writes UTF-16LE. Redirect large output through a Node writer.
|
|
25
|
+
- Inside a double-quoted string, write `${name}:`; `$name:` parses as a drive reference.
|
|
26
|
+
- `Get-FileHash` prints uppercase hexadecimal, and Node's `createHash` prints lowercase. Compare digests case-insensitively.
|
|
27
|
+
- Redirecting a native command's standard error with `2>&1` wraps each line in an error record and sets `$?` to false on success. Let the harness capture standard error.
|
|
28
|
+
|
|
29
|
+
## Harness approval on this host
|
|
30
|
+
|
|
31
|
+
- Keep every program-carrying command in a TypeScript file run by `node`. A heredoc, `node -e`, an `&&` chain, or a `${...}` argument trips the harness's approval classifier; a one-shot read-only check can run inline.
|
|
32
|
+
- Run a `Remove-Item` as its own short command with a relative path. The classifier blocks a command that pairs it with a path-like literal elsewhere, such as a `'\'` string. Verify with `git status`.
|
|
33
|
+
|
|
34
|
+
## Deleting untracked files
|
|
35
|
+
|
|
36
|
+
- When a sweep you run by hand deletes untracked files, send them to the Recycle Bin through a shell file operation with undo, never permanent deletion, and report what went there. Leave emptying the bin to the user; hand them `Clear-RecycleBin -Force`.
|
|
37
|
+
- Remove a worktree with `git worktree remove`. Delete a leftover `node_modules` junction without recursing into its target.
|
|
@@ -10,7 +10,7 @@ carrier. A campaign that accepts with no debrief arrives at acceptance, per
|
|
|
10
10
|
either door.
|
|
11
11
|
|
|
12
12
|
Call the `.orkestrel/` folder the campaign folder, never a ledger. The word `ledger` names the
|
|
13
|
-
|
|
13
|
+
campaign's ledger file and the carry ledger only.
|
|
14
14
|
|
|
15
15
|
## The gate order
|
|
16
16
|
|
|
@@ -33,15 +33,15 @@ step.
|
|
|
33
33
|
|
|
34
34
|
Rule on every location in this table before deleting anything.
|
|
35
35
|
|
|
36
|
-
| Location | What it holds
|
|
37
|
-
| ----------------------- |
|
|
38
|
-
| `.orkestrel/<package>/` | One package's live campaign per `.
|
|
39
|
-
| `.orkestrel/*.md` | The ecosystem's records per the same section: the fleet campaign's `plan.md` and `ledger.md`, and the release wave's `release.md`.
|
|
40
|
-
| `tmp/units/` | A native unit's `<unit>-brief.md` and `<unit>-report.md` pair.
|
|
41
|
-
| `tmp/<bench>/` | A bench unit's brief, report, event stream, final answer, and any login log.
|
|
42
|
-
| `tmp/probes/` | The runtime probes the campaign wrote.
|
|
43
|
-
| `ROADMAP.md` | The repository's sequenced plan of record, where it keeps one.
|
|
44
|
-
| `PROPOSAL.md` | A proposal for work nobody has ruled on yet.
|
|
36
|
+
| Location | What it holds | What the prune does |
|
|
37
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| `.orkestrel/<package>/` | One package's live campaign per `.claude/rules/campaign.md` § Layout: its plan, ledger, open-seam verdicts, and the records that rule names. | Deleted in the prune commit, after each file that outlives the campaign moves to its root home. |
|
|
39
|
+
| `.orkestrel/*.md` | The ecosystem's records per the same section: the fleet campaign's `plan.md` and `ledger.md`, and the release wave's `release.md`. | Deleted in the prune commit of the wave or fleet campaign each records. |
|
|
40
|
+
| `tmp/units/` | A native unit's `<unit>-brief.md` and `<unit>-report.md` pair. | Swept after the unit's measurements and unresolved findings are carried into the acceptance record, a tracked design, or a test. |
|
|
41
|
+
| `tmp/<bench>/` | A bench unit's brief, report, event stream, final answer, and any login log. | Swept after the final gate evidence is recorded. Never committed. |
|
|
42
|
+
| `tmp/probes/` | The runtime probes the campaign wrote. | Swept. A probe that settled a claim becomes a test before the prune, per `.claude/rules/quality.md` § Instruments. |
|
|
43
|
+
| `ROADMAP.md` | The repository's sequenced plan of record, where it keeps one. | Kept. Strike the chunks the campaign closed and add the forward work it revealed. |
|
|
44
|
+
| `PROPOSAL.md` | A proposal for work nobody has ruled on yet. | Deleted after the work lands or the proposal is refused. The ruling goes in the prune commit message. |
|
|
45
45
|
|
|
46
46
|
A plan-of-record file is not campaign residue. `ROADMAP.md` outlives every prune and takes the
|
|
47
47
|
campaign's forward work; `PROPOSAL.md` is spent the moment its proposal is ruled on, and a spent
|
|
@@ -19,7 +19,7 @@ description: >-
|
|
|
19
19
|
| `scripts/result.ts` | `--cursor\|--claude\|--codex JOURNAL [--out PATH]` prints the session id, the answer length, the run's `exit`, `capped`, and `durationMs` from the errors file, and the journal's `bytes`, `ageMs`, and `lastEvent`. Exit 3 when the journal carries no session or answer. |
|
|
20
20
|
| `scripts/cite.ts` | `PATH [--root DIR] [--json]` lists every `file:line` citation in a report whose file does not exist or whose line is past the end. Exit 3 when one does not resolve. |
|
|
21
21
|
| `scripts/helpers.ts` | Import with `.ts`: `readOption`, `readOptions`, `readList`, `listFiles`, `readJsonObject`, `readString`, `readNumber`, `normalizeSlashes`, `resolveNpm`, `runNpm`, `SPEC_FIELDS`, `LOCAL_SPEC_PATTERN`, `ARCHIVE_SPEC_PATTERN`, `SHORTHAND_SPEC_PATTERN`, `matchesLocalSpec`, `collectSpecs`, `scanLocalSpecs`, `removeTree`, `isRecord`. Runs nothing. |
|
|
22
|
-
| `scripts/sweep.ts` | `--report` lists leftovers under `tmp/` and `.orkestrel/` by age and
|
|
22
|
+
| `scripts/sweep.ts` | `--report` lists leftovers under `tmp/` and `.orkestrel/` by age, deletes nothing, and flags a `.orkestrel/**/*.md` line that cites a backticked path git ignores or names a machine path; `--tmp [--older-than MINUTES]` deletes stale launch files and refuses while a journal is changing; `--unit UNIT [--delete]` lists or deletes one accepted unit's brief, report, claims, journal, errors, status, pid, and last-message files; `--tmp` and `--unit --delete` keep every file git tracks and print `kept tracked <path>`. |
|
|
23
23
|
|
|
24
24
|
## Write the brief
|
|
25
25
|
|
|
@@ -28,13 +28,14 @@ description: >-
|
|
|
28
28
|
3. Scope by what the change makes false: run the `orkestrel-scout` skill's `map.ts --refs` and `--census` for an existing member of any enumerated population the unit extends, and own every file that comes back, with the tests that pin the behavior, the fixtures derived from a constant, and the materialized copy of a template.
|
|
29
29
|
4. Order acceptance criteria cheap-first (regenerate, typecheck, lint, scoped test). Name a timing-sensitive or tree-wide gate as an observation, not a criterion.
|
|
30
30
|
5. State that the executor performs the work itself and spawns nothing. A bridge driver carries the brief unaltered and returns the journal path and session id.
|
|
31
|
-
6. Name the host conditions the unit will hit: shell, sandbox, network, files expected dirty, commands known to fail.
|
|
32
|
-
7.
|
|
31
|
+
6. Name the host conditions the unit will hit: shell, sandbox, network, files expected dirty, commands known to fail. Give absolute paths for work outside the session's root; a lane's shell can restart in another directory between calls.
|
|
32
|
+
7. Fill each placeholder at its value sites only; a global replace also rewrites a stop clause that names the placeholder.
|
|
33
|
+
8. Run `brief.ts --check <brief>` and fix every missing path before the launch.
|
|
33
34
|
|
|
34
35
|
## Launch
|
|
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.
|
|
37
|
-
-
|
|
37
|
+
- 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.
|
|
38
|
+
- Start a native unit by the Start row of the session's harness page under `.agents/skills/orkestrel-parallel/references/`; that row also names when a hosting harness's child-task channel replaces the native one.
|
|
38
39
|
- 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`.
|
|
39
40
|
- Size the cap from the `durationMs` that `result.ts` reported for comparable runs, plus gate time, plus slack. Never let the unit name it.
|
|
40
41
|
- 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.
|
|
@@ -4,27 +4,31 @@ Apply these rules to every command that outlives the turn that starts it: a benc
|
|
|
4
4
|
|
|
5
5
|
## Launch
|
|
6
6
|
|
|
7
|
-
- Launch as a harness-tracked background command through `scripts/launch.ts` under a hard cap
|
|
8
|
-
-
|
|
7
|
+
- Launch as a harness-tracked background command through `scripts/launch.ts` under a hard cap, per § Launch ownership.
|
|
8
|
+
- Spawn a package manager through its JavaScript entry; `.agents/platforms/<platform>.md` names the entry and the shell quirks of each host.
|
|
9
9
|
- Write a multi-step chain as a TypeScript file run by `node`, with an opening comment naming its log, its cap, and what changed from the file it supersedes. Never edit a script while it runs: copy, edit the copy, launch the copy.
|
|
10
|
-
- On Windows, keep every program-carrying command in a file: a heredoc, `node -e`, an `&&` chain, or a `${...}` argument trips the approval classifier.
|
|
11
10
|
- Run the first use of any flag, subcommand, or quoting form in a throwaway probe, never inside a unit.
|
|
12
11
|
- Keep network-dependent work (installs, lockfile generation, live fetches) out of sandboxed bench execs.
|
|
13
12
|
- Confirm the journal advanced past its header before recording the launch as started; `scripts/result.ts` reports `bytes` and `ageMs`.
|
|
14
13
|
- Never push a git commit through a hosting REST API when a file's content must ride in the request; the per-call cap truncates it.
|
|
15
14
|
|
|
15
|
+
## Launch ownership
|
|
16
|
+
|
|
17
|
+
- Give every run one owner whose lifetime exceeds the run: the owner holds the journal, the pid file, and the cap. A dispatched agent never detaches a run; its turn can end before the run does.
|
|
18
|
+
- When the expected duration exceeds the harness's background cap or idle-session window, which its page under `.agents/skills/orkestrel-parallel/references/` states, the Orchestrator starts the run outside the session's process tree by the detach procedure of `.agents/platforms/<platform>.md`. Record the journal and pid-file paths in the unit's records before the launch, and read liveness from the journal. No other session kills that pid.
|
|
19
|
+
- On a host whose platform page records no proven detach procedure, keep the session in its turn for the run's whole duration.
|
|
20
|
+
|
|
16
21
|
## Watch
|
|
17
22
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
23
|
+
- Watch each long exec through one harness-native watcher (Claude Code's Monitor), filtered to milestones and terminal states and exiting on the terminal event; on a harness with none, wait for its completion notice. Never stream the raw journal.
|
|
24
|
+
- Read a harness fan-out run's liveness and recover it per its page under `.agents/skills/orkestrel-parallel/references/`.
|
|
20
25
|
- Judge a unit by the tree it changes: owned-file mtimes, suite counts, its report file. Check before killing anything; a unit killed on a false signal loses unwritten work.
|
|
21
26
|
|
|
22
27
|
## Kill and relaunch
|
|
23
28
|
|
|
24
29
|
- Take the child's `pid` from the spawn line `scripts/launch.ts` prints when the command starts, or from `<journal>.pid`. Never take it from a pattern match over command lines, and never run `pgrep -f` or `pkill -f`.
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- Refuse a list holding PID 1, the harness shell, or an id outside the descent of the recorded pid. At the cap, `launch.ts` kills the tree on Windows and the command alone on any other host; on a POSIX host, kill the listed descendants of a capped run by hand.
|
|
30
|
+
- Read liveness, list descendants, and kill with the commands of `.agents/platforms/<platform>.md`: list every descendant of the recorded pid, print the list, then kill each listed id and the recorded pid.
|
|
31
|
+
- Refuse a list holding PID 1, the harness shell, or an id outside the descent of the recorded pid. At the cap, `launch.ts` kills what the platform page states; kill the remaining listed descendants by hand.
|
|
28
32
|
- Confirm the recorded process and every listed descendant are gone before another writer takes the files. A killed `codex exec` is dead only when its `codex-code-mode-host` child is gone too. Check owned-file mtimes before dispatching the substitute.
|
|
29
33
|
- Re-run a timing failure alone, after the unit exits, before believing it; a unit's own re-run is never alone.
|
|
30
34
|
|