@orkestrel/scaffold 0.0.107 → 0.0.109

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.
Files changed (164) hide show
  1. package/dist/agents/skills/orkestrel-dispatch/scripts/bench.js +326 -91
  2. package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +110 -14
  3. package/dist/agents/skills/orkestrel-dispatch/scripts/chain.js +280 -0
  4. package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +188 -26
  5. package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +142 -43
  6. package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +240 -62
  7. package/dist/agents/skills/orkestrel-dispatch/scripts/patch.js +323 -0
  8. package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +169 -32
  9. package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +368 -27
  10. package/dist/agents/skills/orkestrel-falsify/scripts/mutate.js +560 -0
  11. package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +1052 -205
  12. package/dist/agents/skills/orkestrel-harden/scripts/measure.js +361 -0
  13. package/dist/agents/skills/orkestrel-harden/scripts/titles.js +455 -80
  14. package/dist/agents/skills/orkestrel-parallel/scripts/cases.js +327 -0
  15. package/dist/agents/skills/orkestrel-publish/scripts/compare.js +298 -51
  16. package/dist/agents/skills/orkestrel-publish/scripts/pins.js +170 -13
  17. package/dist/agents/skills/orkestrel-publish/scripts/swap.js +956 -191
  18. package/dist/agents/skills/orkestrel-publish/scripts/wave.js +707 -112
  19. package/dist/agents/skills/orkestrel-publish/scripts/window.js +235 -41
  20. package/dist/agents/skills/orkestrel-scout/scripts/map.js +341 -54
  21. package/dist/agents/templates/brief.md +1 -1
  22. package/dist/bin/main.js +51 -46
  23. package/dist/bin/main.js.map +1 -1
  24. package/dist/host/AGENTS.md +26 -20
  25. package/dist/host/agents/orchestration.md +98 -58
  26. package/dist/host/agents/platforms/posix.md +15 -0
  27. package/dist/host/agents/platforms/windows.md +37 -0
  28. package/dist/host/agents/skills/orkestrel-align/SKILL.md +10 -13
  29. package/dist/host/agents/skills/orkestrel-align/references/fleet.md +4 -10
  30. package/dist/host/agents/skills/orkestrel-align/references/integration.md +1 -1
  31. package/dist/host/agents/skills/orkestrel-build/SKILL.md +16 -48
  32. package/dist/host/agents/skills/orkestrel-build/agents/openai.yaml +1 -1
  33. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +19 -16
  34. package/dist/host/agents/skills/orkestrel-debrief/agents/openai.yaml +1 -1
  35. package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +15 -28
  36. package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +5 -6
  37. package/dist/host/agents/skills/orkestrel-debrief/references/retention.md +12 -14
  38. package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +36 -24
  39. package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +14 -11
  40. package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +366 -75
  41. package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +126 -16
  42. package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +323 -0
  43. package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +220 -31
  44. package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +176 -33
  45. package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +294 -59
  46. package/dist/host/agents/skills/orkestrel-dispatch/scripts/patch.ts +401 -0
  47. package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +199 -34
  48. package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +428 -27
  49. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +10 -8
  50. package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +1 -5
  51. package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +1 -1
  52. package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +701 -0
  53. package/dist/host/agents/skills/orkestrel-harden/SKILL.md +16 -12
  54. package/dist/host/agents/skills/orkestrel-harden/references/bindings.md +23 -81
  55. package/dist/host/agents/skills/orkestrel-harden/references/centralization.md +4 -5
  56. package/dist/host/agents/skills/orkestrel-harden/references/contract.md +2 -0
  57. package/dist/host/agents/skills/orkestrel-harden/references/document.md +33 -0
  58. package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +6 -3
  59. package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +8 -4
  60. package/dist/host/agents/skills/orkestrel-harden/references/research.md +2 -0
  61. package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +1272 -279
  62. package/dist/host/agents/skills/orkestrel-harden/scripts/measure.ts +425 -0
  63. package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +603 -98
  64. package/dist/host/agents/skills/orkestrel-journey/SKILL.md +75 -98
  65. package/dist/host/agents/skills/orkestrel-journey/references/captures.md +54 -17
  66. package/dist/host/agents/skills/orkestrel-journey/references/decide.md +1 -20
  67. package/dist/host/agents/skills/orkestrel-journey/references/layer.md +21 -31
  68. package/dist/host/agents/skills/orkestrel-journey/references/styles.md +1 -1
  69. package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +91 -30
  70. package/dist/host/agents/skills/orkestrel-parallel/agents/openai.yaml +2 -2
  71. package/dist/host/agents/skills/orkestrel-parallel/references/claude.md +34 -0
  72. package/dist/host/agents/skills/orkestrel-parallel/references/codex.md +29 -0
  73. package/dist/host/agents/skills/orkestrel-parallel/references/cursor.md +29 -0
  74. package/dist/host/agents/skills/orkestrel-parallel/references/t3.md +31 -0
  75. package/dist/host/agents/skills/orkestrel-parallel/scripts/cases.ts +389 -0
  76. package/dist/host/agents/skills/orkestrel-polish/SKILL.md +16 -20
  77. package/dist/host/agents/skills/orkestrel-polish/references/capture-harness.md +16 -26
  78. package/dist/host/agents/skills/orkestrel-publish/SKILL.md +12 -26
  79. package/dist/host/agents/skills/orkestrel-publish/agents/openai.yaml +2 -2
  80. package/dist/host/agents/skills/orkestrel-publish/references/adopt.md +23 -0
  81. package/dist/host/agents/skills/orkestrel-publish/references/release.md +4 -4
  82. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +12 -10
  83. package/dist/host/agents/skills/orkestrel-publish/references/window.md +20 -25
  84. package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +348 -59
  85. package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +202 -22
  86. package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +1061 -191
  87. package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +812 -140
  88. package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +280 -38
  89. package/dist/host/agents/skills/orkestrel-scout/SKILL.md +3 -3
  90. package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +428 -70
  91. package/dist/host/agents/templates/brief.md +1 -1
  92. package/dist/host/agents/transports/claude-cli.md +3 -3
  93. package/dist/host/agents/transports/codex.md +3 -8
  94. package/dist/host/agents/transports/cursor.md +2 -3
  95. package/dist/host/claude/AGENTS.md +7 -10
  96. package/dist/host/claude/agents/analyst.md +3 -3
  97. package/dist/host/claude/agents/astra.md +3 -3
  98. package/dist/host/claude/agents/builder.md +1 -1
  99. package/dist/host/claude/agents/checker.md +1 -1
  100. package/dist/host/claude/agents/distiller.md +1 -1
  101. package/dist/host/claude/agents/grok.md +1 -1
  102. package/dist/host/claude/agents/opus.md +2 -2
  103. package/dist/host/claude/agents/orkestrel.md +57 -90
  104. package/dist/host/claude/agents/researcher.md +1 -1
  105. package/dist/host/claude/agents/reviewer.md +4 -0
  106. package/dist/host/claude/agents/scout.md +1 -1
  107. package/dist/host/claude/agents/verifier.md +1 -1
  108. package/dist/host/claude/rules/application.md +14 -21
  109. package/dist/host/claude/rules/architecture.md +34 -44
  110. package/dist/host/claude/rules/browser.md +3 -4
  111. package/dist/host/claude/rules/campaign.md +55 -0
  112. package/dist/host/claude/rules/documentation.md +26 -11
  113. package/dist/host/claude/rules/names.md +9 -4
  114. package/dist/host/claude/rules/patterns.md +6 -7
  115. package/dist/host/claude/rules/portability.md +2 -3
  116. package/dist/host/claude/rules/quality.md +4 -5
  117. package/dist/host/claude/rules/styles.md +2 -2
  118. package/dist/host/claude/rules/tests.md +57 -114
  119. package/dist/host/claude/rules/typescript.md +8 -10
  120. package/dist/host/claude/rules/workspace.md +21 -19
  121. package/dist/host/claude/rules/writing.md +3 -3
  122. package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +1 -1
  123. package/dist/host/claude/skills/orkestrel-harden/SKILL.md +1 -1
  124. package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
  125. package/dist/host/claude/skills/orkestrel-publish/SKILL.md +1 -1
  126. package/dist/host/claude/skills/orkestrel-scout/SKILL.md +1 -1
  127. package/dist/host/codex/agents/analyst.toml +9 -3
  128. package/dist/host/codex/agents/astra.toml +3 -4
  129. package/dist/host/codex/agents/builder.toml +1 -1
  130. package/dist/host/codex/agents/opus.toml +3 -4
  131. package/dist/host/codex/agents/orkestrel.toml +1 -1
  132. package/dist/host/codex/agents/researcher.toml +2 -2
  133. package/dist/host/codex/agents/verifier.toml +1 -1
  134. package/dist/host/codex/config.toml +3 -3
  135. package/dist/host/configs/helpers.ts +21 -1
  136. package/dist/host/configs/policy.ts +405 -16
  137. package/dist/host/cursor/rules/orchestration.mdc +1 -0
  138. package/dist/host/dotfiles/oxlintrc.json +141 -5
  139. package/dist/host/guides/agent.md +111 -134
  140. package/dist/host/guides/capture.md +801 -0
  141. package/dist/host/guides/probe.md +27 -8
  142. package/dist/host/guides/scaffold.md +152 -19
  143. package/dist/host/guides/study.md +534 -440
  144. package/dist/host/guides/test.md +111 -44
  145. package/dist/host/manifest.json +199 -242
  146. package/dist/host/tests/config.test.ts +1558 -219
  147. package/dist/host/tests/policy.test.ts +127 -1
  148. package/dist/host/tests/setupPolicy.ts +1389 -39
  149. package/dist/src/core/index.cjs +239 -87
  150. package/dist/src/core/index.cjs.map +1 -1
  151. package/dist/src/core/index.d.cts +123 -39
  152. package/dist/src/core/index.d.ts +123 -39
  153. package/dist/src/core/index.js +234 -86
  154. package/dist/src/core/index.js.map +1 -1
  155. package/dist/src/server/index.cjs +20 -27
  156. package/dist/src/server/index.cjs.map +1 -1
  157. package/dist/src/server/index.js +21 -28
  158. package/dist/src/server/index.js.map +1 -1
  159. package/package.json +11 -11
  160. package/dist/agents/skills/orkestrel-dispatch/scripts/helpers.js +0 -283
  161. package/dist/host/agents/skills/orkestrel-dispatch/references/bench.md +0 -25
  162. package/dist/host/agents/skills/orkestrel-dispatch/scripts/helpers.ts +0 -333
  163. package/dist/host/agents/skills/orkestrel-parallel/references/harnesses.md +0 -19
  164. package/dist/host/guides/supervisor.md +0 -4890
@@ -14,18 +14,16 @@ than this summary of it.
14
14
 
15
15
  ## Select the environments
16
16
 
17
- `--src` selects published src environments and `--app` selects private app environments.
18
- The selections are independent, at least one is required, and each offers `core`, `browser`,
19
- and `server`.
17
+ `scaffold new` takes the independent selections `--src` and `--app`; `guides/scaffold.md` § Command line
18
+ and § Select at creation own the options and the combinations they refuse. The table names what each
19
+ app environment owns.
20
20
 
21
- | Selection | What it owns |
22
- | ----------- | ------------------------------------------------------------------------ |
23
- | app/core | Host-independent contracts and composition; check and test only |
24
- | app/browser | Vue runtime behind an `index.html` entry, `vue-tsc`, real Chromium tests |
25
- | app/server | Node runtime, `dist/app/server/main.cjs` with only `node:*` external |
26
-
27
- Core-only, browser-only, and server-only applications are valid. A browser+server pair
28
- includes app/core so the shared transport contracts have one host-independent owner.
21
+ | Selection | What it owns |
22
+ | ----------- | ------------------------------------------------------------------------------------------ |
23
+ | app/core | Host-independent contracts and composition; check and test only |
24
+ | app/browser | Framework-independent DOM runtime behind an `index.html` entry, `tsc`, real Chromium tests |
25
+ | app/vue | Vue runtime with `App.vue` behind an `index.html` entry, `vue-tsc`, real Chromium tests |
26
+ | app/server | Node runtime, `dist/app/server/main.cjs` with only `node:*` external |
29
27
 
30
28
  ## Execute the workflow
31
29
 
@@ -39,50 +37,26 @@ includes app/core so the shared transport contracts have one host-independent ow
39
37
  thin target wrappers and scoped tsconfigs.
40
38
  4. **Implement completely** — entries, barrels, centralized declarations, one-class
41
39
  implementation files, environment parsing, lifecycle, builds, and scripts — under the
42
- placement and manifest laws. Parse the options container and its host and port leaves
43
- before mutation, rejecting wrong-shaped containers, empty hosts, and non-integer,
44
- negative, or out-of-range ports with a coded error and its guard.
45
- 5. **Own the shutdown contract.**
40
+ placement and manifest laws in `.claude/rules/application.md`.
41
+ 5. **Own the shutdown contract** of the runner `.claude/rules/application.md` requires:
46
42
  - Serialize lifecycle transitions in call order.
47
43
  - Re-request port zero on an ephemeral restart.
48
44
  - Close lingering active connections deterministically on stop.
49
45
  - Release the runner's signal listeners idempotently on stop.
50
- - Isolate asynchronous failures by runner generation, so an older transition cannot
51
- release a newer run's listeners.
52
- - Return the runner from convenience startup rather than hiding that cleanup.
53
- 6. **Keep boundary enforcement inside the configured toolchain.** Each layer owns what it
54
- can express:
55
- - Oxlint `no-restricted-imports` — literal-string declared package, alias, and
56
- conventional relative import direction.
57
- - Oxfmt — formatting.
58
- - `tests/setupPolicy.ts` — the narrow TypeScript compiler-API pass over computed and
59
- template-literal specifiers, declaration placement, and the barrel law.
60
- - Scoped TypeScript projects — host-global isolation.
61
- - Vite's real builds and environment-boundary plugin — Vue, CSS, assets, workers,
62
- runtime resolution, and physical workspace containment. Its parsed HTML asset
63
- callbacks reject forced inlining before any direct asset read, and non-inlined
64
- output assets are audited by physical source path.
65
-
66
- Then hold these limits:
67
- - Add no standalone boundary script, and no second parser or source-language analyzer
68
- duplicating those layers. Reach for the toolchain's own facilities instead: Vite's
69
- Oxc/Rolldown AST for TypeScript and JavaScript asset references, the official Vue SFC
70
- compiler for `.vue` blocks, Vite's HTML parser callbacks, its bundled Lightning CSS
71
- dependency analyzer, and the TypeScript compiler API for the narrow coding-law pass.
46
+ 6. **Keep boundary enforcement inside the configured toolchain**, per
47
+ `.claude/rules/workspace.md` § Typechecking and environment isolation and § Tooling.
48
+ - Add no standalone boundary script and no second parser or source-language analyzer.
72
49
  - Disable the browser application's public directory, so an unmanaged file copy cannot
73
50
  ship outside the module graph.
74
51
  - Keep browser-only runtime tooling development-only.
75
52
  - Require explicit authorization before adding a Sass compiler.
76
-
77
53
  7. **Prove it on real hosts.**
78
54
  - Run app/browser tests on Playwright-backed Vitest Browser Mode against real DOM.
79
55
  Probe the installed executable directly with `existsSync(chromium.executablePath())`
80
56
  rather than guessing a channel or reading an environment flag.
81
57
  - Bind port zero on loopback in app/server tests and use real fetch.
82
58
  - Prove executable readiness, collision exit, signal termination, and port release with
83
- real child-process tests. Windows reports `ChildProcess.kill('SIGTERM')` as OS
84
- termination by signal, while POSIX delivery exercises the graceful listener and exits
85
- zero.
59
+ real child-process tests.
86
60
  - Probe the actual capability in a capability-dependent test, and scope any skip
87
61
  narrowly.
88
62
  8. **Document and prove parity** for every app export and behavioral method: guide,
@@ -92,10 +66,6 @@ includes app/core so the shared transport contracts have one host-independent ow
92
66
  `.agents/orchestration.md` § Size gate names for the change and the repository gates in
93
67
  their required order.
94
68
 
95
- Do not add showcase, authentication, persistence, proxy, styling-system, or product
96
- policy unless the request requires it. Do not leave placeholders, compatibility shims,
97
- empty setup files, or deferred app behavior.
98
-
99
69
  ## Accept the result
100
70
 
101
71
  Completion requires:
@@ -109,6 +79,4 @@ Completion requires:
109
79
  - guide parity green over every app export and behavioral method;
110
80
  - the repository gates green in their required order from an independent `verifier`.
111
81
 
112
- A selected environment still unwired, a real-host proof not taken, or an open parity row
113
- means the run is not finished. Report what each environment owns, the exact proof and gate
114
- evidence, and any residual risk. Do not call an in-scope omission future work.
82
+ Report what each environment owns, the exact proof and gate evidence, and any residual risk.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: 'Build Orkestrel Application'
3
- short_description: 'Design and harden Orkestrel app environments'
3
+ short_description: 'Wire and harden Orkestrel app environments'
4
4
  default_prompt: 'Use $orkestrel-build to build or harden this workspace application layer.'
@@ -13,8 +13,8 @@ auditing the agent, rule, skill, and process layer; [field-testing.md](reference
13
13
  before running or judging a live field pass of an agent-facing surface;
14
14
  [retention.md](references/retention.md) before retiring the campaign folder.
15
15
 
16
- The debrief judges the artifact and the process that produced it; neither is exempt. Record a
17
- practice that worked as a refinement, so it repeats.
16
+ The debrief judges the artifact and the process that produced it. Record a practice that worked
17
+ as a refinement.
18
18
 
19
19
  ## The debrief laws
20
20
 
@@ -43,23 +43,25 @@ practice that worked as a refinement, so it repeats.
43
43
 
44
44
  ## Run the round
45
45
 
46
- 1. **Scope and gather.** Name the campaign(s) under debrief. Assemble the record: unit
47
- ledger, deviations and recoveries, audit verdicts and their reconciliations, gate
48
- history, and any live transcripts. State what evidence exists and what must be
46
+ 1. **Scope and gather.** Name the campaign(s) under debrief. Assemble the record from the
47
+ campaign folder (`.claude/rules/campaign.md` § Layout): `plan.md`, `ledger.md`, `gaps.md`,
48
+ `ideas.md`, and the verdict files, plus deviations and recoveries, gate history, and any
49
+ live transcripts. State what evidence exists and what must be
49
50
  produced fresh.
50
51
  2. **Field evidence.** Drive what was built with real consumers where a consumable
51
52
  surface exists. Record every pass verbatim.
52
53
  3. **Artifact audits.** Layer and boundary truth: does app code belong a layer down in
53
54
  src, does src carry application policy, does either duplicate a declared ecosystem
54
55
  primitive? Package promotion: what grew into a reusable mechanism that belongs in an
55
- existing package or justifies a new one — mapped dependency-first so promotion order
56
- is executable. Sweep test infrastructure both ways: name every local test helper or
57
- fixture whose semantics an installed shared-package export already covers (compare
58
- against the declarations each repository compiles with, and adopt rather than keep),
59
- and name every instrument two or more packages built independently (count a value set
60
- fed through one proof loop as one implementation, whether the set sits beside the
61
- loop or its assertions are spelled out one by one). Every row ends implement, repair,
62
- retain, or intentionally exclude, with evidence.
56
+ existing package or justifies a new one, judged by the extraction signals in
57
+ `.agents/orchestration.md` § Depth, breadth, and machinery and mapped dependency-first
58
+ so promotion order is executable. Sweep test infrastructure both ways: name every
59
+ local test helper or fixture whose semantics an installed shared-package export already
60
+ covers (compare against the declarations each repository compiles with, and adopt
61
+ rather than keep), and name every instrument two or more packages built independently
62
+ (count a value set fed through one proof loop as one implementation, whether the set
63
+ sits beside the loop or its assertions are spelled out one by one). Every row ends
64
+ implement, repair, retain, or intentionally exclude, with evidence.
63
65
  4. **Process retrospective.** Walk the campaign record for both failure and success:
64
66
  dispatches that deviated and why; recoveries that worked (codify the mechanism that
65
67
  saved them); estimates versus observed durations; audit rounds that caught real
@@ -77,8 +79,9 @@ practice that worked as a refinement, so it repeats.
77
79
  orchestration contract) with the owner's direction where the root contract is
78
80
  touched; re-prove per the re-proving law in § "The debrief laws".
79
81
  8. **Propagate.** Portable changes are made in the scaffold repository's host inventory,
80
- staged, gated, and pushed — editing one project's checkout propagates nothing. Verify
81
- the generated-workspace proofs stay green so new projects inherit the refined canon.
82
+ staged, gated, and committed; editing one project's checkout propagates nothing. Push on
83
+ the user's go-ahead (`.agents/orchestration.md` § Acceptance). Verify the
84
+ generated-workspace proofs stay green so new projects inherit the refined canon.
82
85
  9. **Dispose.** Present the disposition map — finding table with carriers, the canon
83
86
  delta, what remains open — and retire the campaign folder through
84
87
  [retention.md](references/retention.md), which owns the checks, the go-ahead, the
@@ -89,5 +92,5 @@ practice that worked as a refinement, so it repeats.
89
92
  Each round ends with one fixed report: the finding table (id, evidence pointer, bucket,
90
93
  carrier), the canon delta (files created or changed, per layer: agents, rules, skills,
91
94
  process, guide, roadmap), the re-proof evidence, and exactly one terminal line —
92
- `DEBRIEF: FOLDED` when every finding has a carrier and the propagation is pushed, or
95
+ `DEBRIEF: FOLDED` when every finding has a carrier and the propagation is committed in scaffold, or
93
96
  `DEBRIEF: OPEN` with the blocking items.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: 'Debrief Closed Campaign'
3
3
  short_description: 'Fold a closed campaign into portable truth on field evidence'
4
- default_prompt: 'Use $orkestrel-debrief to debrief the closed campaign: field passes, findings ledger, fix loops, canon refinement, propagation, disposal.'
4
+ default_prompt: 'Use $orkestrel-debrief to debrief the closed campaign: field passes, finding table, fix loops, canon refinement, propagation, disposal.'
@@ -5,17 +5,18 @@ model consumes.
5
5
 
6
6
  ## The tier ladder
7
7
 
8
- Test from the top down, and do not stop at the tier that passes:
9
-
10
- 1. **Frontier** (the harness's default model) — proves the surface works at all.
11
- 2. **Mid tier** (for example, a codex mechanical model) — proves the surface survives a
12
- harness's schema abbreviation and a model that reads less carefully.
13
- 3. **Small harness-native** (for example, Haiku or a codex high-volume model) — the
14
- acceptance tier: these must walk the surface unaided, or the surface is not done.
15
- 4. **Local floor** (a quantized 2B-class model through a real tool-calling client) — not
16
- an acceptance gate; a stochastic probe that exposes teaching gaps nothing else hits.
17
- Its residual failures must be provably consumer-floor (malformed emission, attention
18
- loss), never surface darkness — every refusal it received must have named the fix.
8
+ Test from the top down, and do not stop at the tier that passes. Map each tier to an engine
9
+ per `.agents/orchestration.md` § Roles and name the map in the dispatch.
10
+
11
+ 1. **Frontier** (the harness's default engine) — proves the surface works at all.
12
+ 2. **Mid tier** — proves the surface survives a harness's schema abbreviation and an engine
13
+ that reads less carefully.
14
+ 3. **Small native** (the mechanical roles' engine) — the acceptance tier: it must walk the
15
+ surface unaided, or the surface is not done.
16
+ 4. **Local floor** (a small quantized model through a real tool-calling client) — not an
17
+ acceptance gate; a stochastic probe that exposes teaching gaps nothing else hits. Its
18
+ residual failures must be provably consumer-floor (malformed emission, attention loss),
19
+ never surface darkness — every refusal it received must have named the fix.
19
20
 
20
21
  ## The pass discipline
21
22
 
@@ -48,23 +49,9 @@ Read every trace against these; each maps to a class of surface fix:
48
49
  | Opaque-wall regression | A correct structure abandoned after an unnamed refusal | Every refusal names the subject, path, expectation, and candidates |
49
50
  | Repetition fixpoint | The identical failing call repeated verbatim | The refusal must change the caller's information state; if it already does, the residual is consumer-floor |
50
51
 
51
- ## The teaching-surface doctrine
52
-
53
- What the field passes repeatedly prove:
54
-
55
- - **Descriptions are the surviving surface.** Harnesses abbreviate nested schemas;
56
- the tool description reaches every model intact. The critical path — a worked example,
57
- the key nesting, the reply shape — lives there, importance-first, so a model that
58
- stops reading early still gets it.
59
- - **Every refusal orients, names, or corrects.** Subject, exact key path, expected
60
- shape, valid candidates, missing versus unexpected — a refusal that names nothing ends
61
- runs; a refusal that names everything converges even a 2B model.
62
- - **Strictness with teaching beats tolerance.** Never coerce, never silently drop;
63
- refuse with the correction in the message. Encode untrusted identifiers (JSON-encoded,
64
- length-capped) so malformed input cannot fake or balloon a diagnostic.
65
- - **Acknowledge or state, never both.** Mutations return acknowledgements; reads return
66
- state; the split is stated in both tools' descriptions so neither is polled for the
67
- other's job.
52
+ ## Judge the fix
53
+
54
+ Rule each fix against `.claude/rules/documentation.md` § Agent-facing surfaces.
68
55
 
69
56
  ## The scoreboard
70
57
 
@@ -88,7 +88,7 @@ Findings land as one of:
88
88
  reference; the root stays the single owner.
89
89
  - **Charter refinements.** Wording that caused a deviation is a defect; fix the charter,
90
90
  not the executor.
91
- - **Skill refinements / creation.** A workflow the campaign repeated twice is a skill; a
91
+ - **Skill refinements / creation.** A workflow a second campaign needs is a skill; a
92
92
  skill step the campaign always skipped or always overrode is wrong.
93
93
  - **Orchestration-contract refinements.** Laws the orchestrator learned (cap sizing,
94
94
  probe-first, journal-first, verdict shapes, launch ownership) land in the operating
@@ -97,8 +97,8 @@ Findings land as one of:
97
97
  ## The questions every round asks
98
98
 
99
99
  - **Which findings came from falsification rather than diff reading**, and is the brief
100
- shape that produced them doctrine yet? Route to the Falsification law in
101
- `.claude/rules/quality.md`.
100
+ shape that produced them doctrine yet? Route to `.claude/rules/quality.md` § Instruments or
101
+ the `orkestrel-falsify` skill.
102
102
  - **Which shipped gaps were accepted as untestable**, and was each one genuinely
103
103
  irreducible or a missing seam? Route to the missing-seam law in
104
104
  `.claude/rules/tests.md`.
@@ -108,6 +108,5 @@ Findings land as one of:
108
108
 
109
109
  ## Mirror discipline
110
110
 
111
- Every roster or contract change lands on all harness surfaces in the same round: the
112
- Claude charters, the Codex mirrors, and both operating-contract role tables. An
113
- unmirrored refinement is a new drift seeded on purpose.
111
+ Land every roster or contract change on all harness surfaces in the same round;
112
+ `.agents/orchestration.md` § Roles names them.
@@ -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
- routing ledger and the carry ledger only.
13
+ campaign's `ledger.md` only.
14
14
 
15
15
  ## The gate order
16
16
 
@@ -33,19 +33,17 @@ step.
33
33
 
34
34
  Rule on every location in this table before deleting anything.
35
35
 
36
- | Location | What it holds | What the prune does |
37
- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
38
- | `.orkestrel/<package>/` | One package's live campaign per `.agents/orchestration.md` § .orkestrel layout: its plan, routing ledger, open-seam verdicts, and exposure records. | Deleted in the prune commit. |
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, the campaign ledger, 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. |
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. |
45
44
 
46
45
  A plan-of-record file is not campaign residue. `ROADMAP.md` outlives every prune and takes the
47
- campaign's forward work; `PROPOSAL.md` is spent the moment its proposal is ruled on, and a spent
48
- proposal left in the tree reads as live work.
46
+ campaign's forward work.
49
47
 
50
48
  ## Sweep `tmp/` as a tree
51
49
 
@@ -68,8 +66,8 @@ decision, a withdrawn claim, an unmet acceptance condition. Each ends the check
68
66
  commit that closed it, a live brief that owns it, or an explicit drop on the record. An item with
69
67
  no carrier blocks the prune.
70
68
 
71
- Read the register files for this — the plan, the readiness grade, the carry ledger, the triage —
72
- rather than every brief and report in the folder.
69
+ Read `plan.md` § State, `ledger.md`, `gaps.md`, and `ideas.md` for this, rather than every brief and
70
+ report in the folder.
73
71
 
74
72
  ## The promotion check
75
73
 
@@ -1,25 +1,26 @@
1
1
  ---
2
2
  name: orkestrel-dispatch
3
3
  description: >-
4
- Dispatch one unit of work to a native subagent or an external bench and bring its result back: write the brief, probe the bench, launch under a cap, watch liveness, read the report, check its citations, accept, and delete the launch copies. Use when `.agents/orchestration.md` routes work to a role, when a bench lane (Grok, Astra, or Opus through the Claude CLI) is needed, or when a command will outlive the turn that starts it.
4
+ Dispatch one unit of work to a native subagent or an external bench and bring its result back: write the brief, probe the bench, launch under a cap, watch liveness, read the report, check its citations, accept, and delete the launch copies. Use when `.agents/orchestration.md` routes work to a role, when a bench lane is needed, or when a command will outlive the turn that starts it.
5
5
  ---
6
6
 
7
7
  # Dispatch
8
8
 
9
- `.agents/orchestration.md` decides who runs what and binds the permission floor; this skill runs the dispatch. Read `references/launch.md` before any command that outlives the turn, and `references/bench.md` before any bench lane. Run every step a script performs as that script, from the checkout root, with `node`.
9
+ `.agents/orchestration.md` decides who runs what and binds the permission floor; this skill runs the dispatch. Read `references/launch.md` before any command that outlives the turn. Run every step a script performs as that script, from the checkout root, with `node`.
10
10
 
11
11
  ## Scripts
12
12
 
13
- | Script | Does |
14
- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
- | `scripts/bench.ts` | `--cursor [--resolve]`, `--codex [--sandbox MODE]`, or `--claude`, each with `[--model ID] [--cap SECONDS]`: resolves the bench entry, reads its version and login, runs one bounded round trip into `tmp/<bench>/bench.jsonl`, and prints JSON with `live`; `--resolve` prints the Cursor entry alone. Exit 3 when the bench is dark. |
16
- | `scripts/brief.ts` | `--unit UNIT --lane units\|cursor\|codex\|claude [--subject TEXT]` writes the brief from `.agents/templates/brief.md` and never overwrites a launched one; `--check PATH` lists every slash-bearing path the brief names that does not resolve from the root. Exit 3 when one is missing. |
17
- | `scripts/launch.ts` | `--journal PATH --errors PATH --cap SECONDS [--status] -- COMMAND [ARGS...]` runs the command with no shell and closed stdin, kills it at the cap (its process tree on Windows), records `git status --porcelain` before and after with `--status`, prints a spawn line carrying the `pid` when the command starts, writes that pid to `<journal>.pid`, and ends the errors file with `exit=`. Exit 124 when capped; 127 when the command cannot start (the errors file names why); 64 on usage, including a cap above 2147483 seconds. |
18
- | `scripts/login.ts` | `--codex [--cap SECONDS]` reads `codex login status`, runs `codex login --device-auth` journaled to `tmp/codex/login.log` when it is not logged in, prints the URL and the one-time code as they appear, and polls the status until it answers or the cap ends; `--claude` reads `claude auth status`. Exit 0 logged in, 3 not. |
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
- | `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
- | `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 deletes nothing; `--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. |
13
+ | Script | Does |
14
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
+ | `scripts/bench.ts` | `--cursor [--resolve]`, `--codex [--sandbox MODE]`, or `--claude`, each with `[--model ID] [--cap SECONDS]`: resolves the bench entry, reads its version and login, runs one bounded round trip into `tmp/<bench>/bench.jsonl`, and prints JSON with `live`; `--resolve` prints the Cursor entry alone. A malformed cap, a `--sandbox` outside `read-only`, `workspace-write`, and `danger-full-access`, or `--resolve` without `--cursor` is a usage fault, never a dark bench. Exit 3 when the bench is dark, 64 on usage. |
16
+ | `scripts/brief.ts` | `--unit UNIT --lane units\|cursor\|codex\|claude [--subject TEXT]` writes the brief from `.agents/templates/brief.md` and never overwrites a launched one; `--check PATH` lists every slash-bearing path the brief names that does not resolve from the root. Exit 3 when one is missing. |
17
+ | `scripts/launch.ts` | `--journal PATH --errors PATH --cap SECONDS [--status] -- COMMAND [ARGS...]` runs the command with no shell and closed stdin, kills it at the cap (its process tree on Windows), records `git status --porcelain` before and after with `--status`, prints a spawn line carrying the `pid` when the command starts, writes that pid to `<journal>.pid`, and ends the errors file with `exit=`. Exit 124 when capped; 127 when the command cannot start (the errors file names why); 64 on usage, including a cap above 2147483 seconds. |
18
+ | `scripts/login.ts` | `--codex [--cap SECONDS]` reads `codex login status`, runs `codex login --device-auth` journaled to `tmp/codex/login.log` when it is not logged in, prints the URL and the one-time code as they appear, and polls the status until it answers or the cap ends, ending any status read that outlasts the cap, and refuses a cap above 2147483 seconds; `--claude` reads `claude auth status`. Exit 0 logged in, 3 not. |
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
+ | `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
+ | `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>`. |
22
+ | `scripts/chain.ts` | `--plan FILE.json --journal DIR` runs the steps of a JSON plan (`name`, `command`, `args`, optional `cwd` and `env`) in order with no shell, writes each step's output to `<journal>/<name>.txt`, prints one `name exit= durationMs=` line per step, and stops at the first step that does not exit 0. Exit is that step's code; 2 when a step cannot start; 64 on usage. |
23
+ | `scripts/patch.ts` | `EDITS.md (--plan \| --apply) [--skip N ...]` applies an edit file of `### <path>` blocks, each with a `reason:` line and fenced `old:` and `new:` texts: every `old` text must occur exactly once in its file after the earlier edits to that file (however the blocks spell its path), and nothing is written unless every selected edit resolves. `--plan` prints each edit's resolution; `--skip N` leaves out edit N and repeats. Exit 1 when an edit does not resolve, 64 on usage. |
23
24
 
24
25
  ## Write the brief
25
26
 
@@ -28,35 +29,46 @@ description: >-
28
29
  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
30
  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
31
  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. Run `brief.ts --check <brief>` and fix every missing path before the launch.
32
+ 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.
33
+ 7. Fill each placeholder at its value sites only; a global replace also rewrites a stop clause that names the placeholder.
34
+ 8. Run `brief.ts --check <brief>` and fix every missing path before the launch.
33
35
 
34
36
  ## Launch
35
37
 
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.
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`.
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.
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.
38
+ - 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.
39
+ - 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.
40
+ - Size the cap per `references/launch.md` § Cap. Never let the unit name it.
41
+ - Confirm the launch with `result.ts` before the next dispatch: `bytes` past the header and a small `ageMs`. An instantly dead journal is a failed launch; read its errors file.
42
+
43
+ ### Bench lanes
44
+
45
+ An external engine widens capacity and inherits no authority; treat its output as a proposal until the Orchestrator verifies it against the tree. `.agents/transports/<harness>.md` owns each bench's command, sandbox, and recovery.
46
+
47
+ - Probe once per session before the first lane with `bench.ts --<bench>`, and again at any dispatch after a failure. `live: false` records the bench dark. Then launch the transport's command through `launch.ts` in the background with `--status`.
48
+ - A driver writes the brief with `brief.ts --lane <bench>`, resolves the command, runs the lane itself only where its transport allows, and otherwise returns the brief path, the command, and the journal path for the Orchestrator to launch. A driver pinned read-only writes nothing: it returns the brief text, its intended path, the resolved command, and the journal paths, and the Orchestrator writes the brief. Briefs never travel as shell arguments.
49
+ - Name in the brief the host restrictions the transport records that the unit will meet. The Orchestrator takes a proof that needs a restricted capability on the host, and the unit records it as an observation naming the exact command.
50
+ - A bench unit writes only its owned files and its checkout's `tmp/`. Name its report path there, or take the report from the last-message file.
51
+ - Record the lane in the roster (`.agents/orchestration.md` § Sessions and consultation) with subject, journal path, and session id. The Orchestrator owns the cap and the watch; nothing polls the bench from inside the driver.
52
+ - Read the answer with `result.ts`, never from stdout, and refuse a result with no journal path and session id.
41
53
 
42
54
  ## Watch
43
55
 
44
56
  - Read liveness from the artifact the work produces: owned-file mtimes, `result.ts` on the journal, the counts a suite reports. A wrapper's silence proves nothing.
45
- - Prove a run dead before relaunching, by the process id in the spawn line `launch.ts` prints at start and in the `<journal>.pid` file it writes, per `references/launch.md` § Kill and relaunch. Never `pgrep -f` or `pkill -f` a pattern from a shell whose own command line contains it.
57
+ - Prove a run dead before relaunching, per `references/launch.md` § Kill and relaunch.
46
58
  - A stalled or cap-killed run: resume with the session id from `result.ts`, or relaunch with a successor brief. Triage per `.agents/orchestration.md` § Deviation protocol.
47
59
 
48
60
  ## Accept
49
61
 
50
- 1. Capture a native report to `tmp/units/<unit>-report.md`, or read a bench answer with `result.ts --<bench> <journal> --out <path>`. Refuse a bench report with no journal path and session id.
62
+ 1. Capture a native report to `tmp/units/<unit>-report.md`, or read a bench answer with `result.ts --<bench> <journal> --out <path>`.
51
63
  2. Run `cite.ts <report>` and discard every claim whose citation does not resolve before reading the rest.
52
64
  3. Verify with direct evidence: `git status --porcelain`, the diff, and the scoped validation the brief named. A writer's self-report is not evidence.
53
- 4. Run the review the size gate names, then integrate: apply shared-file patches serially; route an added type, mechanism, or criterion to a successor unit.
65
+ 4. Run the review the size gate names, then integrate: apply shared-file patches serially, each an edit file in the shape `patch.ts` reads, with `patch.ts EDITS.md --plan`, then `--apply`; route an added type, mechanism, or criterion to a successor unit.
54
66
  5. Write the acceptance commit message with what changed and what the unit measured; record `durationMs` when it informs a cap or a performance claim.
55
- 6. Run `sweep.ts --unit <unit> --delete` to remove the unit's brief, report, claims, journal, errors, status, pid, and last-message files. Delete any probe the unit left in the tree. In a campaign, update `.orkestrel/<package>/plan.md` and the ledger, and delete a closed seam's verdict. Run `sweep.ts --report` at acceptance and `sweep.ts --tmp [--older-than MINUTES]` after the last live unit exits.
67
+ 6. Run `sweep.ts --unit <unit> --delete` to remove the unit's brief, report, claims, journal, errors, status, pid, and last-message files. Delete any probe the unit left in the tree. In a campaign, update `.orkestrel/<package>/plan.md` and the ledger, and delete a closed seam's verdict. `.agents/orchestration.md` § Cleanup owns the `--report` and `--tmp` runs.
56
68
 
57
69
  ## Refuse
58
70
 
59
71
  - A brief that contradicts a measurement the campaign already recorded: reconcile first.
60
72
  - A unit that asks for an unowned edit: stop it and re-scope.
61
- - A concurrent writer outside an acknowledged `orkestrel-parallel` ownership protocol: queue it.
73
+ - A concurrent writer outside an `orkestrel-parallel` ownership assignment: queue it.
62
74
  - A tree-wide source-mutating command from a unit: strike it from the brief. For verifier command outputs, apply `.agents/orchestration.md` § Permission floor.
@@ -4,28 +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. Never detach a run from inside a dispatched agent; an unowned run has no completion signal and no death notice.
8
- - On Windows, launch npm through its JavaScript entry, `node <directory of node>/node_modules/npm/bin/npm-cli.js ARGS`: `launch.ts` spawns with no shell, a `.cmd` shim cannot start that way, and the launcher reports exit `127`.
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.
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
+ - Write a multi-step chain as a TypeScript file run by `node`, with an opening comment naming its log and its cap. Never edit a script while it runs: copy, edit the copy, launch the copy.
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
- - 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.
13
+
14
+ ## Launch ownership
15
+
16
+ - 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.
17
+ - 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.
18
+ - On a host whose platform page records no proven detach procedure, keep the session in its turn for the run's whole duration.
15
19
 
16
20
  ## Watch
17
21
 
18
- - Arm one Monitor per long exec, filtered to milestones and terminal states, exiting on the terminal event. Never stream the raw journal.
19
- - A Workflow journal writes only at agent start and result; read liveness from the newest subagent transcript. Recover with `resumeFromRunId`.
22
+ - Watch each long exec through one harness-native watcher, the one its page under `.agents/skills/orkestrel-parallel/references/` names, 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.
23
+ - Read a harness fan-out run's liveness and recover it per its page under `.agents/skills/orkestrel-parallel/references/`.
20
24
  - 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
25
 
22
26
  ## Kill and relaunch
23
27
 
24
28
  - 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
- - On a POSIX host, read liveness with `kill -0 <pid>` (exit 0 means alive), list descendants by running `ps -A -o pid= -o ppid=` and taking the rows whose ppid is the recorded pid, then each listed id in turn, print the list, then kill each listed id and the recorded pid with `kill -KILL <id>`.
26
- - On Windows under Git Bash, write every Windows slash option as `//`. Read liveness from the output of `tasklist //FI "PID eq <pid>" //NH`, never from its exit code: a row naming `<pid>` means alive, and the `INFO:` line means gone. Alternatively, read the `WINPID` column of `ps -W`. Never read liveness with `kill -0` or `ps -eo`. List descendants with `powershell -NoProfile -Command "Get-CimInstance Win32_Process -Filter 'ParentProcessId=<pid>' | Select-Object -ExpandProperty ProcessId"` applied to each listed id in turn, print the list, then kill the recorded tree with `taskkill //pid <pid> //T //F`.
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.
28
- - 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
+ - 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.
30
+ - 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.
31
+ - Confirm the recorded process and every listed descendant are gone before another writer takes the files. Check owned-file mtimes before dispatching the substitute.
29
32
  - Re-run a timing failure alone, after the unit exits, before believing it; a unit's own re-run is never alone.
30
33
 
31
34
  ## Cap