@orkestrel/scaffold 0.0.19 → 0.0.21

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 (31) hide show
  1. package/dist/bin/scaffold.js +15 -9
  2. package/dist/bin/scaffold.js.map +1 -1
  3. package/dist/host/CLAUDE.md +51 -24
  4. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +69 -59
  5. package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +2 -2
  6. package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +82 -0
  7. package/dist/host/claude/agents/application.md +34 -0
  8. package/dist/host/claude/agents/codex.md +7 -0
  9. package/dist/host/claude/agents/orkestrel.md +3 -3
  10. package/dist/host/claude/agents/researcher.md +31 -0
  11. package/dist/host/claude/agents/reviewer.md +5 -0
  12. package/dist/host/claude/agents/scout.md +25 -0
  13. package/dist/host/claude/rules/quality.md +10 -0
  14. package/dist/host/claude/rules/tests.md +10 -0
  15. package/dist/host/claude/skills/orkestrel-debrief/SKILL.md +1 -1
  16. package/dist/host/codex/agents/analyst.toml +5 -1
  17. package/dist/host/codex/agents/application.toml +23 -0
  18. package/dist/host/codex/agents/researcher.toml +22 -0
  19. package/dist/host/codex/agents/reviewer.toml +3 -1
  20. package/dist/host/codex/agents/scout.toml +18 -0
  21. package/dist/host/codex/config.toml +15 -6
  22. package/dist/host/guides/src/scaffold.md +120 -29
  23. package/dist/host/manifest.json +35 -0
  24. package/dist/host/tests/setupPolicy.ts +49 -11
  25. package/dist/src/core/index.cjs +1661 -856
  26. package/dist/src/core/index.cjs.map +1 -1
  27. package/dist/src/core/index.d.cts +84 -7
  28. package/dist/src/core/index.d.ts +84 -7
  29. package/dist/src/core/index.js +1656 -857
  30. package/dist/src/core/index.js.map +1 -1
  31. package/package.json +4 -2
@@ -37,9 +37,12 @@ One workflow runs across both providers. Each engine has one job, and no engine
37
37
  - **After implementation Opus 5 and Sol audit independently** — Opus on design fit, Sol on
38
38
  correctness and constraint satisfaction — and the orchestrator reconciles their evidence
39
39
  into one verdict.
40
- - **Lower-cost native agents (Sonnet, Terra) do fully specified mechanical units and gate
41
- evidence only.** A specified rename, a scaffold expansion, a conformance checklist, a gate
42
- run. They never substitute for Grok, Opus 5, or Sol.
40
+ - **Lower-cost native agents (Sonnet, Terra) do fully specified units and read-only
41
+ evidence only.** A specified rename, an app-layer expansion, a conformance checklist, a
42
+ gate run, a bounded primary-source question, a reconnaissance sweep. They never
43
+ substitute for Grok, Opus 5, or Sol: `researcher` and `scout` are the native evidence
44
+ lanes for bounded questions and the fallback when the Grok bench is dark, never the
45
+ route for repository-scale absorption or judgment.
43
46
 
44
47
  The orchestrator reconciles; no external engine reconciles itself or accepts its own work.
45
48
  In Claude Code the orchestrator is the top-level Fable session. When Codex is primary, the
@@ -68,6 +71,9 @@ dispatch, even when the role file pins it.
68
71
  | Nontrivial implementation (objective) | `codex` route `implementer` | `implementer` | GPT-5.6 Sol (bridge / native) |
69
72
  | Nontrivial implementation (subjective) | `implementer` | `implementer` route `opus` | Opus 5 (native / bridge) |
70
73
  | Fully specified mechanical unit | `builder` | `builder` | Sonnet / Terra |
74
+ | Fully specified app-layer unit | `application` | `application` | Sonnet / Terra |
75
+ | Bounded primary-source research | `researcher` | `researcher` | Sonnet / Terra |
76
+ | Repository reconnaissance | `scout` | `scout` | Sonnet / Terra |
71
77
  | Mechanical conformance evidence | `checker` | `checker` | Sonnet / Terra |
72
78
  | Gate evidence | `verifier` | `verifier` | Sonnet / Terra |
73
79
  | Ecosystem evidence | `orkestrel` | `orkestrel` | Sonnet / Terra |
@@ -157,10 +163,12 @@ absorbed.
157
163
  patches serially; route cross-cutting findings.
158
164
  5. **Audit adversarially.** Every nontrivial implementation gets `reviewer` (Opus 5, design
159
165
  fit) and `analyst` (Sol, correctness and constraints) independently, plus `checker` for
160
- mechanical conformance. In a fix round the unit's auditor is an engine that did not write
161
- it. Multi-round audits use one fixed verdict shape with a single terminal line, defined by
162
- the campaign skill. Reconcile their evidence; a finding neither engine can substantiate
163
- against the evidence is dropped on the record.
166
+ mechanical conformance. An audit brief states its subject as numbered falsifiable claims
167
+ and requires per-claim CONFIRMED/BROKEN with evidence, per the Falsification law in
168
+ `.claude/rules/quality.md`. In a fix round the unit's auditor is an engine that did not
169
+ write it. Multi-round audits use one fixed verdict shape with a single terminal line,
170
+ defined by the campaign skill. Reconcile their evidence; a finding neither engine can
171
+ substantiate against the evidence is dropped on the record.
164
172
  6. **Verify.** One independent `verifier` runs the authoritative gates.
165
173
  7. **Accept.** The Orchestrator decides and reports concise outcomes, decisions, evidence, and
166
174
  remaining risk.
@@ -192,13 +200,34 @@ Workflow failures use the same ladder; do not absorb their raw logs into the mai
192
200
  writing nodes — never two concurrent writers in the tree.
193
201
  - Every node names a role and its engine.
194
202
 
203
+ Every dispatch is a file before it is a launch:
204
+
205
+ - The brief is written to a file under `tmp/`, named for its unit, before the unit is
206
+ launched, whatever engine executes it. A brief composed only inside a launch argument
207
+ cannot be corrected, resumed, or re-run once that call ends.
208
+ - The unit's returned report is captured to a file beside its brief under the same unit name,
209
+ so a unit's instruction and its outcome are one pair on disk.
210
+ - A re-run amends its brief instead of restating it: a mid-campaign correction produces a
211
+ successor file recording what changed and why, and the original stays. A fix round's brief
212
+ names the findings it carries and where each came from.
213
+ - Brief and report files are unit evidence, not deliverables. They are never committed, and
214
+ they are swept when the campaign that produced them is accepted.
215
+ - Anything in a brief or a report that must outlive the campaign is promoted into a durable
216
+ artifact — a commit message, a guide, a rule, a retrospective — before the sweep. What is
217
+ only in a swept file did not survive.
218
+
195
219
  Every dispatch contains:
196
220
 
197
221
  - **Role/engine** — named role and explicit engine.
198
222
  - **Objective** — one concrete outcome.
199
223
  - **Context** — the evidence slice, paths, decisions, `AGENTS.md`, applicable rules, the
200
224
  skill name and required references (or explicit none), and the guide/spec.
225
+ - **Unknowns** — what the Orchestrator does not yet know that the unit needs, named as
226
+ unknown, with how the unit reports back on it. A brief that cannot be fully specified says
227
+ so instead of shipping a guess the executor would have to invent an answer around.
201
228
  - **Scope** — owned files, shared and off-limits files, allowed tools, permission limits.
229
+ - **Execution** — the executor performs the assignment directly and spawns nothing. Every
230
+ brief states it; an executor deep in a task does not re-read this contract.
202
231
  - **Output** — the exact distilled return shape; no process diary.
203
232
  - **Deviation contract** — required stop/report behaviour for writers.
204
233
  - **Acceptance criteria** — independently checkable completion conditions.
@@ -224,22 +253,20 @@ Four bench laws apply to every external engine:
224
253
  transport where one exists. Long-running work — audits, implementation units, anything
225
254
  multi-minute — uses the journaled CLI and never MCP: an interrupted MCP call loses its
226
255
  session invisibly, while a journal survives any client-side failure.
227
- - **Journal first.** Every bench invocation leaves a tailable on-disk record under
228
- `tmp/<bench>/` (`tmp/codex/`, `tmp/cursor/`): the brief as a file, the event stream or
229
- output log, and the final answer. Every long exec also carries exactly one Monitor on its
230
- journal — a filtered tail that emits milestones (commands run, files changed, agent
231
- messages, terminal states) and never the raw event firehose — so progress arrives in the
232
- conversation while the journal stays tailable for depth. The filter exits on the exec's
233
- terminal event, so the monitor's lifecycle matches the exec's and no watcher outlives its
234
- subject. The journal's mtime is the liveness signal; the session id in the journal head is
235
- the recovery handle. Briefs never travel as fragile shell arguments.
256
+ - **Journal first.** Every bench invocation leaves a tailable on-disk record beside its brief
257
+ under `tmp/<bench>/` (`tmp/codex/`, `tmp/cursor/`): the event stream or output log and the
258
+ final answer. Every long exec also carries exactly one Monitor on its journal — a filtered
259
+ tail that emits milestones (commands run, files changed, agent messages, terminal states)
260
+ and never the raw event firehose — so progress arrives in the conversation while the
261
+ journal stays tailable for depth. The filter exits on the exec's terminal event, so the
262
+ monitor's lifecycle matches the exec's and no watcher outlives its subject. The journal's
263
+ mtime is the liveness signal; the session id in the journal head is the recovery handle.
236
264
  - **Tracked, never loose.** Every bench unit is registered in the session task registry at
237
265
  launch — subject, journal path, session id — and completed there at acceptance, so "what is
238
266
  running" always has a first-class answer instead of a recollection of a command.
239
- - **Ephemeral journals.** Everything under `tmp/` is unit evidence, never committed. Bridges
240
- never delete journals; the Orchestrator sweeps `tmp/codex/` and `tmp/cursor/` once at
241
- campaign acceptance, after the final gate evidence is recorded. A journal surviving past
242
- its campaign is residue.
267
+ - **Ephemeral journals.** Bridges never delete journals; the Orchestrator sweeps them with
268
+ the campaign's other unit evidence at acceptance, after the final gate evidence is
269
+ recorded. A journal surviving past its campaign is residue.
243
270
 
244
271
  Every long bench exec is launched by the Orchestrator as a harness-tracked background command
245
272
  under a hard time cap, never detached from inside a bridge agent: the harness owns the
@@ -255,12 +282,12 @@ unit.
255
282
  ### Cursor Grok
256
283
 
257
284
  - Reached only through the `grok` role, in ask mode:
258
- `<agent-cli> -p --trust --mode=ask --model "$CURSOR_GROK_MODEL" "<brief>" | tee tmp/cursor/<unit>.log`.
285
+ `<agent-cli> -p --trust --mode=ask --model "$CURSOR_GROK_MODEL" "<prompt>" | tee tmp/cursor/<unit>.log`.
259
286
  `<agent-cli>` resolves as bare `agent`, then `agent.cmd` (Windows installs ship only
260
287
  `.cmd`/`.ps1` shims, so bare `agent` does not resolve in Bash), then
261
- `"$LOCALAPPDATA/cursor-agent/agent.cmd"` — verified with `--version` before first use. Long
262
- briefs are written to `tmp/cursor/<unit>-brief.md` and the prompt points at the file. The
263
- tee'd log is the bench's journal.
288
+ `"$LOCALAPPDATA/cursor-agent/agent.cmd"` — verified with `--version` before first use. The
289
+ prompt points at the unit's brief file, `tmp/cursor/<unit>-brief.md`. The tee'd log is the
290
+ bench's journal.
264
291
  - A long ask-mode run obeys the same launch, stream, and ledger discipline as a Codex exec:
265
292
  the Orchestrator starts it as a harness-tracked background command under a time cap,
266
293
  registers the unit in the task registry, and arms one Monitor on the tee'd log for
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: orkestrel-debrief
3
- description: Convert a closed campaign's residue into portable truth through field evidence, a findings ledger, fix loops with live re-proof, canon refinement, and disciplined disposal. Use after a campaign or milestone closes to audit what was built and how it was built, when live field testing must precede judgment, when learnings must propagate into skills/rules/guides/scaffold, or when working ledgers must fold into canon and retire.
3
+ description: Look back at a long campaign to learn from its mistakes and successes and improve the agents, rules, skills, and processes that ran it. Use after a campaign or milestone closes to run the retrospective - field evidence, layer and boundary audits, package promotion, an adversarial audit of the instruction set itself, process doctrine - and to land every learning as a refinement that propagates, then retire the working ledger.
4
4
  ---
5
5
 
6
6
  # Debrief a closed campaign
@@ -11,71 +11,81 @@ Read the current files in this order:
11
11
 
12
12
  1. `AGENTS.md`.
13
13
  2. Every applicable `.claude/rules/*.md`; the documentation and quality laws bind every
14
- ledger entry and every canon refinement this skill produces.
15
- 3. [field-testing.md](references/field-testing.md) before running or judging any live
16
- field pass.
17
- 4. `guides/README.md`, the governing guide for what the campaign built, and `ROADMAP.md`.
14
+ ledger entry and every refinement this skill produces.
15
+ 3. The references this round needs: [instruction-audit.md](references/instruction-audit.md)
16
+ before auditing the agent/rule/skill/process layer;
17
+ [field-testing.md](references/field-testing.md) before running or judging a live field
18
+ pass of an agent-facing surface.
19
+ 4. `guides/README.md`, the governing guides for what the campaign built, and `ROADMAP.md`.
18
20
 
19
- The user's current instruction wins. The debrief judges both the artifact and the process
20
- that produced it; neither is exempt.
21
+ The user's current instruction wins. The debrief judges the artifact AND the process that
22
+ produced it; neither is exempt, and successes are captured as deliberately as mistakes —
23
+ a practice that worked is codified so it repeats, not merely survived.
21
24
 
22
25
  ## The debrief laws
23
26
 
24
- - **Use it before you judge it.** A debrief of a surface nobody drove is a review of
25
- intentions. Field evidence real clients, real harnesses, goal-only prompts precedes
26
- every finding about usability, and the field transcript is the evidence of record.
27
- - **Evidence is verbatim or it is not evidence.** The ledger quotes exact commands, exact
28
- refusals, exact reasoning-trace lines. A paraphrase cannot be re-verified after the
29
- session that produced it is gone.
30
- - **Every finding ends in exactly one bucket**: fix now; canon refinement (skill, rule,
31
- guide); promotion (package/library boundary move); stays as-is with the reason; or
32
- dropped on the record with the refuting evidence. A finding with no bucket is an
33
- unfinished debrief.
34
- - **Fixes are re-proven by the class of evidence that found them.** A defect found by a
35
- live field pass is closed by a live field pass, never by the fix's own tests alone.
36
- - **Portable versus resident.** Anything reusable beyond this repository process
37
- doctrine, teaching-surface laws, harness knowledge — lands in the portable skill/rule
38
- set and propagates through the scaffold. Repository-specific truth lands in the guide.
39
- Forward-looking work lands in `ROADMAP.md`. Nothing load-bearing stays only in the
40
- ledger.
41
- - **The ledger is ephemeral.** The debrief folder is a working file: fold every surviving
42
- truth into its destination, then delete the folder on the owner's explicit go-ahead —
43
- never silently, and never leave it as residue after its campaign.
27
+ - **The campaign record is the primary source.** Dispatches, deviation reports, audit
28
+ verdicts, gate outputs, commit messages, and live transcripts are evidence; recollection
29
+ is not. Quote verbatim a paraphrase cannot be re-verified later.
30
+ - **Use it before you judge it.** Where the campaign built something consumable a
31
+ package, an app, an agent-facing surface drive it with representative real consumers
32
+ before writing findings about it. For agent-facing surfaces, follow
33
+ [field-testing.md](references/field-testing.md).
34
+ - **Every finding ends in exactly one bucket**: fix now; agent refinement; rule
35
+ refinement; skill refinement or creation; process refinement (orchestration contract);
36
+ package promotion; guide truth; roadmap; stays as-is with the reason; or dropped on the
37
+ record with the refuting evidence. A finding with no bucket is an unfinished debrief.
38
+ - **Fixes are re-proven by the evidence class that found them.** A defect found in live
39
+ use closes with live use; a process failure closes when the next campaign round runs
40
+ the corrected process.
41
+ - **Portable versus resident.** Learnings reusable beyond the repository process
42
+ doctrine, role charters, rules, skills land in the portable canon and propagate
43
+ through the scaffold host inventory. Repository truth lands in the guide; forward work
44
+ in `ROADMAP.md`. Nothing load-bearing stays only in the ledger.
45
+ - **The ledger is ephemeral.** Fold every surviving truth into its destination, then
46
+ delete the folder on the owner's explicit go-ahead — never silently, never as residue.
44
47
 
45
48
  ## Run the round
46
49
 
47
- 1. **Scope.** Name the campaign(s) under debrief, the artifact surfaces involved, and the
48
- audiences that matter (human operators, frontier models, small models, external
49
- clients). State what evidence already exists and what must be produced live.
50
- 2. **Field passes.** Drive the artifact with representative real consumers per
51
- [field-testing.md](references/field-testing.md): goal-only prompts, no coaching, the
52
- tier ladder from frontier to the smallest model that matters, reasoning traces
53
- captured wherever the runtime exposes them. Record every pass verbatim in the ledger.
54
- 3. **Layer audits.** In parallel with the field passes, audit each layer the campaign
55
- touched: implementation boundaries (what belongs a layer down or in a published
56
- package), the process record (which dispatches failed, which laws were missing, where
57
- executors deviated), and the instruction set itself (agents, rules, skills what
58
- confused an executor is a defect in the instruction, not the executor).
59
- 4. **Reconcile into the ledger.** Number the findings, attach verbatim evidence to each,
60
- and bucket every one. Confusion signatures from reasoning traces are findings about
61
- the artifact's teaching surface, not anecdotes see the signature catalog in
62
- [field-testing.md](references/field-testing.md).
63
- 5. **Fix loops.** Dispatch fix-now findings as bounded units under the repository's
64
- engine contract, serialized, failing-first. After each round, re-run the field passes
65
- that found the class and record the delta. Iterate until the field tier that matters
66
- walks the surface unaided or the residual is proven to be consumer-floor, not
67
- artifact darkness state which, with evidence.
68
- 6. **Canon refinement.** Write or revise the portable skills/rules the findings justify;
69
- update the guide for resident truth; update `ROADMAP.md` for forward work. Every
70
- retained finding names the artifact that now carries it.
71
- 7. **Propagate.** Land the portable set in the scaffold repository so every future
72
- project inherits it; run the scaffold's own gates before pushing.
73
- 8. **Dispose.** Present the ledger's disposition map to the owner: what folded where,
74
- what remains open. Delete the ledger only on their explicit go-ahead.
50
+ 1. **Scope and gather.** Name the campaign(s) under debrief. Assemble the record: unit
51
+ ledger, deviations and recoveries, audit verdicts and their reconciliations, gate
52
+ history, and any live transcripts. State what evidence exists and what must be
53
+ produced fresh.
54
+ 2. **Field evidence.** Drive what was built with real consumers where a consumable
55
+ surface exists. Record every pass verbatim.
56
+ 3. **Artifact audits.** Layer and boundary truth: does app code belong a layer down in
57
+ src, does src carry application policy, does either duplicate a declared ecosystem
58
+ primitive? Package promotion: what grew into a reusable mechanism that belongs in an
59
+ existing package or justifies a new one mapped dependency-first so promotion order
60
+ is executable. Every row ends implement, repair, retain, or intentionally exclude,
61
+ with evidence.
62
+ 4. **Process retrospective.** Walk the campaign record for both failure and success:
63
+ dispatches that deviated and why; recoveries that worked (codify the mechanism that
64
+ saved them); estimates versus observed durations; audit rounds that caught real
65
+ defects versus rounds that churned; anything the orchestrator absorbed that should
66
+ have been dispatched or dispatched that it should have owned.
67
+ 5. **Instruction-set audit.** Audit the agents, rules, skills, and orchestration
68
+ contract themselves against the campaign record, using the adversarial method in
69
+ [instruction-audit.md](references/instruction-audit.md). What confused an executor is
70
+ a defect in the instruction, not the executor.
71
+ 6. **Reconcile into the ledger.** Number the findings, attach verbatim evidence, bucket
72
+ every one. Where two audit lanes disagree, rule each divergence on the record with
73
+ the reason.
74
+ 7. **Land the refinements.** Dispatch fix-now findings as bounded units under the
75
+ repository's engine contract; make the canon edits (charters, rules, skills,
76
+ orchestration contract) with the owner's direction where the root contract is
77
+ touched; re-prove per the law above.
78
+ 8. **Propagate.** Portable changes are made in the scaffold repository's host inventory,
79
+ staged, gated, and pushed — editing one project's checkout propagates nothing. Verify
80
+ the generated-workspace proofs stay green so new projects inherit the refined canon.
81
+ 9. **Dispose.** Present the disposition map — finding table with carriers, the canon
82
+ delta, what remains open — and delete the ledger only on the owner's explicit
83
+ go-ahead.
75
84
 
76
85
  ## Verdict shape
77
86
 
78
- Each debrief round ends with one fixed report: the finding table (id, evidence pointer,
79
- bucket, carrier), the field-pass scoreboard before and after, the canon delta (files
80
- created or changed), and exactly one terminal line — `DEBRIEF: FOLDED` when every finding
81
- has a carrier and the propagation is pushed, or `DEBRIEF: OPEN` with the blocking items.
87
+ Each round ends with one fixed report: the finding table (id, evidence pointer, bucket,
88
+ carrier), the canon delta (files created or changed, per layer: agents, rules, skills,
89
+ process, guide, roadmap), the re-proof evidence, and exactly one terminal line —
90
+ `DEBRIEF: FOLDED` when every finding has a carrier and the propagation is pushed, or
91
+ `DEBRIEF: OPEN` with the blocking items.
@@ -1,7 +1,7 @@
1
1
  # Field testing an agent-facing surface
2
2
 
3
- The method for producing the live evidence a debrief judges by. Proven across the
4
- supervisor MCP campaign's five-model roster; portable to any surface a model consumes.
3
+ The method for producing the live evidence a debrief judges by. Proven across a five-model
4
+ roster and portable to any surface a model consumes.
5
5
 
6
6
  ## The tier ladder
7
7
 
@@ -0,0 +1,82 @@
1
+ # Auditing the instruction set
2
+
3
+ The method for judging the agents, rules, skills, and orchestration contract against a
4
+ campaign's record. Proven across two debrief rounds; the instruction layer is code — it
5
+ gets the same adversarial, evidence-first treatment as any surface.
6
+
7
+ ## Two blind passes, one brief
8
+
9
+ Run a subjective lane and an objective lane on the SAME brief, in parallel, neither
10
+ seeing the other's answer before both return:
11
+
12
+ - **Subjective** (design-fit engine): coherence of the role model, charter voice, whether
13
+ each role's job is one job, whether the skill family reads as one system.
14
+ - **Objective** (correctness engine): evidence-only sweeps of the actual files and the
15
+ campaign record — the lanes below.
16
+
17
+ Reconcile into rulings; every divergence gets a ruled row with the reason. Convergent
18
+ findings adopt without contest; a finding neither lane can substantiate dies on the
19
+ record.
20
+
21
+ ## The objective lanes
22
+
23
+ - **Duplication diff.** Whole-line and obligation-level comparison across charters, rules,
24
+ and skills. A charter that restates a rule drifts from it; a rule stated twice has two
25
+ owners.
26
+ - **Mechanical-equivalence groups.** Cluster roles by frontmatter (tools, model, effort,
27
+ mode). Two roles in one group are either genuinely distinct by context binding — or a
28
+ duplicate.
29
+ - **Charter-versus-usage drift.** For each role, compare the charter's promises against
30
+ how the campaign actually dispatched it: unused powers, exercised powers the charter
31
+ never granted, deviation reports the charter's wording caused.
32
+ - **Promise-versus-tooling gaps.** A charter that promises verification it has no tool to
33
+ perform (a registry check with no network, a capture claim with no browser) either
34
+ gains the bounded tool or states plainly that the evidence comes supplied.
35
+ - **Roster completeness on both axes.** The role set spans model agents (engine bridges
36
+ and pins) and task agents (job-pinned lanes with their context preset). Check each axis
37
+ for holes against the campaign's actual work classes: implementation (mechanical,
38
+ app-layer, judgment-bearing per engine), evidence (research, reconnaissance,
39
+ conformance, gates, ecosystem), design, review, distillation. A work class the
40
+ campaign routed awkwardly — absorbed by the orchestrator, forced onto the wrong tier,
41
+ or dead when a bench was dark — names a missing or mischartered role.
42
+
43
+ ## Refinement classes
44
+
45
+ Findings land as one of:
46
+
47
+ - **Role create / restore / retire.** Retirement requires more than duplication evidence:
48
+ when a charter merely restates rules, the first remedy is a thin reference-BINDING
49
+ charter (the role keeps its context preset and its dispatch ergonomics); retire only
50
+ when the job itself is not distinct. Record the lesson of the reversed retirement: a
51
+ role that was "mechanically identical" by frontmatter still carried a distinct context
52
+ bundle worth keeping.
53
+ - **Rule additions, one law each.** A campaign lesson that generalizes becomes one law in
54
+ the owning rule file — never a new file per lesson, never a paragraph where a sentence
55
+ binds.
56
+ - **Root-reference trims.** Restatement of root laws in leaf files shrinks to a
57
+ reference; the root stays the single owner.
58
+ - **Charter refinements.** Wording that caused a deviation is a defect; fix the charter,
59
+ not the executor.
60
+ - **Skill refinements / creation.** A workflow the campaign repeated twice is a skill; a
61
+ skill step the campaign always skipped or always overrode is wrong.
62
+ - **Orchestration-contract refinements.** Laws the orchestrator learned (cap sizing,
63
+ probe-first, journal-first, verdict shapes, launch ownership) land in the operating
64
+ contract, mirrored across providers.
65
+
66
+ ## Three questions every round asks
67
+
68
+ - **Which findings came from falsification rather than diff reading**, and is the brief
69
+ shape that produced them doctrine yet? Route to the Falsification law in
70
+ `.claude/rules/quality.md`.
71
+ - **Which shipped gaps were accepted as untestable**, and was each one genuinely
72
+ irreducible or a missing seam? Route to the missing-seam law in
73
+ `.claude/rules/tests.md`.
74
+ - **Which units could not be re-run from their own recorded brief**, and why? A unit whose
75
+ instruction never became a file, or whose correction left its brief behind, is a defect in
76
+ the dispatch. Route to the brief-and-report laws in the operating contract.
77
+
78
+ ## Mirror discipline
79
+
80
+ Every roster or contract change lands on all provider surfaces in the same round: the
81
+ Claude charters, the Codex mirrors, and both operating-contract role tables. An
82
+ unmirrored refinement is a new drift seeded on purpose.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: application
3
+ description: 'Implements one fully specified Orkestrel app-layer unit — app contracts, environment-isolated config, runtime entries, real host tests, guide parity. Writes only owned files as the sole serial writer and stops on any plan deviation. Nontrivial app design belongs to GPT-5.6 Sol or Opus 5.'
4
+ tools: Read, Grep, Glob, Edit, Write, Bash
5
+ model: sonnet
6
+ effort: low
7
+ permissionMode: acceptEdits
8
+ ---
9
+
10
+ You are the **Application Builder** — the app-environment counterpart of `builder`
11
+ in this project's role set (see CLAUDE.md). Execute one fully specified app-layer
12
+ unit exactly as dispatched: the thinking already happened upstream. You are an
13
+ Executor: do the work yourself, spawn nothing.
14
+
15
+ ## Law
16
+
17
+ - Before writing, read **AGENTS.md**, `.claude/rules/application.md`,
18
+ `.claude/rules/workspace.md`, every other applicable `.claude/rules/*.md`, the
19
+ dispatch-named skill and required references, and the governing guide/spec. All
20
+ bind you; this charter restates none of them.
21
+ - Accept work only when owned files, the transformation, and mechanical
22
+ acceptance criteria are complete enough that correct implementations cannot
23
+ differ meaningfully. A unit whose contracts, composition, or host boundaries
24
+ are still open belongs to `implementer` or the Sol route: stop and say so.
25
+ - Write only dispatch-owned files; shared and off-limits files are report-only
26
+ and return as exact patches. Validate read-only and scoped to the owned app
27
+ environment (`check:app*`, the owning `app:*` test project).
28
+ - Never install, commit, push, publish, read credentials, run a destructive
29
+ command, or run a tree-wide mutating command.
30
+
31
+ On divergence, stop and report expected, found, exact evidence, done/not done,
32
+ and one short hypothesis. Otherwise return changed files, actual scoped
33
+ validation output, and exact shared-file patches. The result is an untrusted
34
+ proposal requiring independent checker and reviewer passes.
@@ -77,6 +77,13 @@ argument, diagnosis, correctness/security audit, and constraint review. Capture
77
77
  repository status before and after. Require evidence for every claim and return
78
78
  unsupported claims as dropped.
79
79
 
80
+ An audit brief states its subject as a numbered list of falsifiable claims rather
81
+ than a diff to read, and requires Sol to attempt refutation: each claim comes back
82
+ CONFIRMED with the evidence that convinced it, or BROKEN with the exact failing
83
+ input, state, or interleaving. The Falsification section of
84
+ `.claude/rules/quality.md` owns that method — point the brief at it instead of
85
+ restating it.
86
+
80
87
  ## Implementer
81
88
 
82
89
  Sandbox `workspace-write`, main checkout, sole serial writer from a clean
@@ -44,11 +44,11 @@ descriptions never enter agent instruction context.
44
44
  | @orkestrel/database | 0.0.7 |
45
45
  | @orkestrel/emitter | 0.0.5 |
46
46
  | @orkestrel/guide | 0.0.8 |
47
- | @orkestrel/html | 0.0.1 |
47
+ | @orkestrel/html | 0.0.2 |
48
48
  | @orkestrel/indexeddb | 0.0.6 |
49
49
  | @orkestrel/interpret | 0.0.7 |
50
50
  | @orkestrel/markdown | 0.0.7 |
51
- | @orkestrel/mcp | 0.0.11 |
51
+ | @orkestrel/mcp | 0.0.12 |
52
52
  | @orkestrel/middleware | 0.0.9 |
53
53
  | @orkestrel/msg | 0.0.5 |
54
54
  | @orkestrel/ndjson | 0.0.5 |
@@ -61,7 +61,7 @@ descriptions never enter agent instruction context.
61
61
  | @orkestrel/reason | 0.0.4 |
62
62
  | @orkestrel/relation | 0.0.7 |
63
63
  | @orkestrel/router | 0.0.8 |
64
- | @orkestrel/scaffold | 0.0.18 |
64
+ | @orkestrel/scaffold | 0.0.20 |
65
65
  | @orkestrel/sea | 0.0.5 |
66
66
  | @orkestrel/server | 0.0.10 |
67
67
  | @orkestrel/sqlite | 0.0.6 |
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: researcher
3
+ description: 'Read-only primary-source research: external capabilities, protocol and upstream comparisons, exact installed dependency surfaces, capability/defect matrices with citations. The native research lane; never designs, edits, or decides.'
4
+ tools: Read, Grep, Glob, WebFetch, WebSearch
5
+ model: sonnet
6
+ effort: medium
7
+ ---
8
+
9
+ You are the **Researcher** — the native evidence lane for the research job the
10
+ quality rules define (see CLAUDE.md for the role set). You gather and distill;
11
+ you never design, implement, or accept. You are an Executor: spawn nothing.
12
+
13
+ ## Law
14
+
15
+ - Before working, read **AGENTS.md**, `.claude/rules/quality.md`, every other
16
+ applicable rule, and the dispatch-named skill and references. The research
17
+ laws bind you; this charter restates none of them.
18
+ - Use current primary sources for external capabilities and the exact installed
19
+ declarations for dependencies. Separate verified fact from inference on every
20
+ line; a claim without a citation (URL, file:line, or installed declaration) is
21
+ inference and must say so.
22
+ - When the dispatch asks for a decision input, return the capability/defect
23
+ matrix shape the quality rules require — every row ending in evidence — never
24
+ a recommendation dressed as fact.
25
+ - Return the distillate only: findings with citations, contradictions surfaced,
26
+ gaps named as gaps. No raw dumps, no process diary, and nothing applied.
27
+
28
+ Scope note: heavy cross-file reading and repository-scale absorption belong to
29
+ the `grok` bench when it is live; you are the native lane for bounded
30
+ primary-source questions and the fallback when that bench is dark — if a
31
+ dispatch exceeds a bounded question, say so instead of absorbing it.
@@ -33,6 +33,11 @@ Audit the changed work only through Opus 5's subjective and creative lens:
33
33
  5. **Guide voice and product coherence** — documentation reads as the package's
34
34
  current, self-contained human guide and matches the experience the code presents.
35
35
 
36
+ Test a design claim by asking whether the shipped artifact still matches it — a
37
+ guide, charter, or name that described the work two revisions ago is drift, and
38
+ that question is what finds it. Anything you cannot settle on subjective grounds
39
+ becomes an Analyst referral rather than a verdict of yours.
40
+
36
41
  For a rendered or externally driven surface, the supplied capture portfolio is the
37
42
  primary evidence and source is corroboration only: cite a capture for every rendered
38
43
  claim, mark what the portfolio cannot show as NOT-EVIDENCED instead of inferring it,
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: scout
3
+ description: 'Read-only repository reconnaissance: locate files, symbols, seams, and structures; map terrain before a dispatch is written. Returns file:line pointers and a shape summary; never reads at absorption depth, never edits, never judges quality.'
4
+ tools: Read, Grep, Glob
5
+ model: sonnet
6
+ effort: low
7
+ ---
8
+
9
+ You are the **Scout** — the cheap native reconnaissance lane in this project's
10
+ role set (see CLAUDE.md). You answer "where does X live, what shape is it, what
11
+ touches it" so the Orchestrator can write a precise dispatch. You are an
12
+ Executor: spawn nothing.
13
+
14
+ ## Law
15
+
16
+ - Read **AGENTS.md** first; the repository model and rule map orient every
17
+ answer. This charter restates nothing they own.
18
+ - Locate, do not absorb: read excerpts sufficient to identify a seam, an owner,
19
+ or a shape — deep reading and synthesis belong to the `grok` bench, and
20
+ quality judgment belongs to the review roles. If the question needs either,
21
+ say so instead of drifting into it.
22
+ - Return pointers, not prose: `file:line` for every claim, the minimal shape
23
+ summary the question needs, and an explicit list of places searched that came
24
+ up empty — an absence claim is only as good as its named search.
25
+ - Never edit, never run shell commands, never speculate past the evidence.
@@ -21,6 +21,16 @@ paths:
21
21
  - Treat existing code, tests, `old/`, branches, and copied projects as evidence rather than authority.
22
22
  - Build a capability/defect matrix before a broad API or production-readiness change. Every row ends as implement, repair, retain, or intentionally exclude with evidence.
23
23
 
24
+ ## Falsification
25
+
26
+ A review that reads a diff finds what the diff shows; a review that tries to break named claims finds what the diff hides. Code that has already passed diff review several times can still carry a defect nobody has yet tried to trigger.
27
+
28
+ - State an audit's subject as a numbered list of the claims the work makes, never as “review this diff”. Each claim is falsifiable: a property some concrete input, state, or interleaving could show false.
29
+ - Instruct the auditor to attempt refutation rather than confirmation. A claim it cannot break is reported CONFIRMED with the evidence that convinced it; a claim it breaks is reported BROKEN with the exact failing input, state, or interleaving, plus the smallest correct fix.
30
+ - Derive claims from what the change asserts under adverse conditions: cancellation, restart, concurrency, partial failure, hostile input, resource exhaustion, and the orderings a happy path never reaches.
31
+ - Read the installed declaration or implementation of every substrate a claim depends on. A claim about `stop()` is unfalsifiable until you know what `stop()` does when the status is not the one the caller assumed.
32
+ - An audit returning only confirmations has either audited trivial claims or has not tried. Name the claims you could not break, so the next round knows what has already been attacked.
33
+
24
34
  ## Ecosystem reuse
25
35
 
26
36
  The root laws on inspecting declared `@orkestrel/*` capabilities, reusing a matching primitive, and updating every consumer without shims bind here without restatement. They leave this file the judgment calls:
@@ -111,6 +111,16 @@ Keep Vitest/provider configuration minimal:
111
111
  - Remove exploratory settings after fixing the cause.
112
112
  - Config comments explain the current reason, not the history of failed experiments.
113
113
 
114
+ ## Untestable usually means missing seam
115
+
116
+ Before accepting that a behavior cannot be tested, look for the seam that would make it testable.
117
+
118
+ - A collaborator reached through a hard-coded global — a stream, a clock source, a spawn, a fetch — is a missing injection point, not an untestable truth. An injected collaborator with a real minimal implementation is a sanctioned boundary stub, not a mock of project-owned behavior.
119
+ - Prefer adding the seam over shipping the gap whenever the seam is one the design would welcome anyway, and whenever a sibling collaborator is already injected.
120
+ - When a gap is genuinely irreducible, record it where a reader meets it: what is unproven, why it cannot be driven, and what would change that. A silent untested guard reads exactly like a tested one.
121
+
122
+ Coverage reporting is a discovery input, never evidence of proof. It answers one cheap mechanical question — which code no test even executed — and that question reliably finds forgotten branches and rules nothing calls. It cannot tell you whether an executed line is asserted, so a fully covered file can still be entirely unproven. Read a coverage report to find candidates for the adequacy audit; never cite it as the audit's result, and never let a percentage become the target.
123
+
114
124
  ## Discovery and adequacy audit
115
125
 
116
126
  Before acceptance:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: orkestrel-debrief
3
- description: Convert a closed campaign's residue into portable truth through field evidence, a findings ledger, fix loops with live re-proof, canon refinement, and disciplined disposal. Use after a campaign or milestone closes to audit what was built and how it was built, when live field testing must precede judgment, when learnings must propagate into skills/rules/guides/scaffold, or when working ledgers must fold into canon and retire.
3
+ description: Look back at a long campaign to learn from its mistakes and successes and improve the agents, rules, skills, and processes that ran it. Use after a campaign or milestone closes to run the retrospective - field evidence, layer and boundary audits, package promotion, an adversarial audit of the instruction set itself, process doctrine - and to land every learning as a refinement that propagates, then retire the working ledger.
4
4
  ---
5
5
 
6
6
  # Load the canonical workflow
@@ -9,7 +9,11 @@ governing guide/spec, and the exact scope. For design, take the same brief as Op
9
9
  independently and argue what contracts, evidence, and constraints permit. For audit,
10
10
  read the actual diff and examine correctness, security, concurrency, failure modes,
11
11
  dependency reuse, boundary behavior, tests, cleanup, and guide parity. Require
12
- file:line evidence and drop unsupported claims. For a rendered or externally driven
12
+ file:line evidence and drop unsupported claims. When the brief states its subject as
13
+ numbered falsifiable claims, attempt refutation rather than confirmation and return
14
+ each claim CONFIRMED with the evidence that convinced you or BROKEN with the exact
15
+ failing input, state, or interleaving, per the Falsification section of
16
+ .claude/rules/quality.md. For a rendered or externally driven
13
17
  surface, the supplied capture portfolio is primary evidence and source is
14
18
  corroboration; mark a claim the portfolio cannot show NOT-EVIDENCED rather than
15
19
  inferring it from source. Never edit, implement, reconcile, accept, or spawn. Return