@orkestrel/scaffold 0.0.122 → 0.0.124

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 (72) hide show
  1. package/dist/agents/skills/orkestrel-harden/scripts/interleave.js +539 -0
  2. package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +1163 -0
  3. package/dist/bin/main.js +21 -19
  4. package/dist/bin/main.js.map +1 -1
  5. package/dist/host/agents/orchestration.md +13 -7
  6. package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +4 -3
  7. package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +1 -1
  8. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +4 -2
  9. package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +2 -2
  10. package/dist/host/agents/skills/orkestrel-harden/SKILL.md +16 -3
  11. package/dist/host/agents/skills/orkestrel-harden/references/bindings.md +18 -12
  12. package/dist/host/agents/skills/orkestrel-harden/references/document.md +1 -0
  13. package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +2 -1
  14. package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +1 -1
  15. package/dist/host/agents/skills/orkestrel-harden/references/methods.md +642 -0
  16. package/dist/host/agents/skills/orkestrel-harden/scripts/interleave.ts +665 -0
  17. package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +14 -13
  18. package/dist/host/agents/skills/orkestrel-parallel/references/claude-code.md +13 -13
  19. package/dist/host/agents/skills/orkestrel-parallel/references/t3.md +1 -0
  20. package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +1433 -0
  21. package/dist/host/agents/skills/orkestrel-publish/SKILL.md +2 -1
  22. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +18 -1
  23. package/dist/host/claude/AGENTS.md +1 -1
  24. package/dist/host/claude/agents/analyst.md +1 -1
  25. package/dist/host/claude/agents/builder.md +1 -1
  26. package/dist/host/claude/agents/distiller.md +2 -1
  27. package/dist/host/claude/agents/grok.md +2 -2
  28. package/dist/host/claude/agents/opus.md +2 -2
  29. package/dist/host/claude/agents/orkestrel.md +30 -30
  30. package/dist/host/claude/agents/reviewer.md +2 -2
  31. package/dist/host/claude/agents/scout.md +2 -1
  32. package/dist/host/claude/agents/verifier.md +1 -1
  33. package/dist/host/claude/rules/campaign.md +12 -11
  34. package/dist/host/claude/rules/documentation.md +1 -0
  35. package/dist/host/claude/rules/patterns.md +14 -0
  36. package/dist/host/claude/rules/quality.md +4 -1
  37. package/dist/host/claude/rules/tests.md +4 -0
  38. package/dist/host/claude/rules/writing.md +1 -1
  39. package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
  40. package/dist/host/codex/agents/analyst.toml +4 -1
  41. package/dist/host/codex/agents/astra.toml +1 -1
  42. package/dist/host/codex/agents/builder.toml +1 -1
  43. package/dist/host/codex/agents/distiller.toml +4 -2
  44. package/dist/host/codex/agents/grok.toml +5 -2
  45. package/dist/host/codex/agents/opus.toml +3 -3
  46. package/dist/host/codex/agents/reviewer.toml +6 -2
  47. package/dist/host/codex/agents/scout.toml +5 -1
  48. package/dist/host/codex/agents/verifier.toml +6 -1
  49. package/dist/host/guides/agent.md +1119 -457
  50. package/dist/host/guides/contract.md +226 -104
  51. package/dist/host/guides/database.md +12 -12
  52. package/dist/host/guides/ndjson.md +94 -21
  53. package/dist/host/guides/ollama.md +22 -18
  54. package/dist/host/guides/probe.md +29 -27
  55. package/dist/host/guides/reason.md +377 -114
  56. package/dist/host/guides/scaffold.md +43 -21
  57. package/dist/host/guides/study.md +538 -450
  58. package/dist/host/guides/tool.md +163 -58
  59. package/dist/host/manifest.json +70 -52
  60. package/dist/src/core/index.cjs +21 -20
  61. package/dist/src/core/index.cjs.map +1 -1
  62. package/dist/src/core/index.d.cts +1 -4
  63. package/dist/src/core/index.d.ts +1 -4
  64. package/dist/src/core/index.js +21 -20
  65. package/dist/src/core/index.js.map +1 -1
  66. package/dist/src/server/index.cjs +87 -8
  67. package/dist/src/server/index.cjs.map +1 -1
  68. package/dist/src/server/index.d.cts +50 -6
  69. package/dist/src/server/index.d.ts +50 -6
  70. package/dist/src/server/index.js +87 -10
  71. package/dist/src/server/index.js.map +1 -1
  72. package/package.json +15 -15
@@ -19,7 +19,7 @@ the verbs write and compare.
19
19
  skills, the templates, the transport contracts, the agent roles, the bench configuration, and the
20
20
  MCP registrations — which stays in one place and is published for reading. A target carries the
21
21
  `AGENTS.md` pointer that names where a reader finds it, the catalog agent file the `catalog` verb
22
- rewrites, and the skill pointer set for each package-facing skill `TARGET_SKILL_NAMES` lists: the
22
+ rewrites, and the skill pointer set for each canonical skill `TARGET_SKILL_NAMES` lists: the
23
23
  Claude bridge, the Codex sidecar, and a `SKILL.md` pointer that names the canonical skill. It
24
24
  carries nothing else at a canon path: a file found at one is a superseded copy, and `overwrite`
25
25
  deletes it.
@@ -219,7 +219,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
219
219
  | `SURFACE_EDIT_LENGTH` | const | `6` | Sets the shortest name length at which a one-edit neighbor counts as a near name. |
220
220
  | `SURFACE_TRANSFERS` | const | `readonly SurfaceTransfer[]` | Lists the declared transfers of bare names to their ruled keepers, frozen. |
221
221
  | `TAB_WIDTH` | const | `2` | Sets the columns one tab occupies when the formatter measures a line, matching `tabWidth`. |
222
- | `TARGET_SKILL_NAMES` | const | `readonly string[]` | Lists the package-facing skills a target receives pointers for, frozen and alphabetical. |
222
+ | `TARGET_SKILL_NAMES` | const | `readonly string[]` | Lists every canonical skill a target receives pointers for, frozen and alphabetical. |
223
223
  | `THEMES_BARREL_PATH` | const | `"src/styles/themes/index.scss"` | Names the themes stylesheet marker. |
224
224
  | `THEMES_ENTRY_PATH` | const | `"src/styles/themes/sheet.ts"` | Names the themes build entry marker. |
225
225
  | `TOOLCHAIN_HOLDS` | const | `Readonly<Record<string, ToolchainHold>>` | Holds foreign tool ranges required by selected browser frameworks, frozen. |
@@ -488,6 +488,7 @@ Exported from `@orkestrel/scaffold/server`, and reachable from
488
488
  | `listCanonPaths` | function | `(target: string, groups: readonly ArtifactGroup[]) => readonly string[]` | Lists the canon paths a target holds, filtered to a plan's groups. |
489
489
  | `listDirectories` | function | `(root: string) => readonly string[]` | Lists a directory's descendant directories as sorted root-relative paths. |
490
490
  | `listFiles` | function | `(root: string) => readonly string[]` | Lists a directory's files as sorted root-relative paths. |
491
+ | `listWrapperPaths` | function | `(target: string, groups: readonly ArtifactGroup[]) => readonly string[]` | Lists the configuration wrappers a target holds, filtered to a plan's groups. |
491
492
  | `matchesAnchor` | function | `(anchor: WriteAnchor) => boolean` | Tests whether a path still holds the captured directory identity. |
492
493
  | `matchesExecutablePath` | function | `(path: string) => boolean` | Tests whether a vendored path is one a target receives executable. |
493
494
  | `matchesExpectation` | function | `(expectation: WriteExpectation) => boolean` | Tests whether a destination still holds what was captured of it. |
@@ -517,6 +518,7 @@ Exported from `@orkestrel/scaffold/server`, and reachable from
517
518
  | `resolveHostRoot` | function | `() => string` | Resolves the bundled host root from the executing module's location. |
518
519
  | `resolveContainedPath` | function | `(root: string, path: string) => string \| undefined` | Resolves a root-relative path and refuses one that leaves its root. |
519
520
  | `resolveRealPath` | function | `(path: string) => string \| undefined` | Resolves a path through the real filesystem, keeping the part that does not exist yet. |
521
+ | `resolveSurfaceLoader` | function | `(roots: readonly string[]) => SurfaceLoader` | Resolves the guide loader one surface run passes to every reader. |
520
522
  | `stageBytes` | function | `(host: Host, root: string, destinations: readonly string[]) => readonly HostManifestEntry[]` | Stages the named destinations of a value host into a private root. |
521
523
  | `stageHost` | function | `(checkout: string, host: string, options?: HostStageOptions) => readonly HostManifestEntry[]` | Stages a vendored host root from a real checkout. |
522
524
  | `stageInventory` | function | `(checkout: string, path?: string) => HostManifest` | Stages the committed inventory of the files a vendored host carries. |
@@ -775,6 +777,14 @@ its `isGuideError` guard accepts, such as a `## Surface` header other than
775
777
  source, carrying the parser's message, and holding the guide error's `code` in the refusal's
776
778
  context. Any other error the parser raises propagates unchanged.
777
779
 
780
+ One run reads every guide and barrel through one `@orkestrel/guide` module, which
781
+ `resolveSurfaceLoader` selects. When a candidate's manifest names `@orkestrel/guide`, the run loads
782
+ the module through that checkout's own package exports, so guide's own checkout checks its claims
783
+ with its own build; otherwise the run loads the copy installed beside scaffold. Loading that module
784
+ executes the guide candidate's build output inside the scaffold process. The command refuses with
785
+ `TARGET` when two candidates name `@orkestrel/guide`, and when the guide candidate's exports do not
786
+ resolve, naming the checkout and the `npm run build` command its exports need.
787
+
778
788
  Compare unpublished candidates together with this command:
779
789
 
780
790
  ```sh
@@ -848,8 +858,9 @@ a contract.
848
858
  `readSurfaceModule` loads `@orkestrel/guide` lazily and narrows it with `isSurfaceModule`, which
849
859
  requires `createGuide`, `createSource`, `extractSourceLines`, and `isGuideError` as functions, and
850
860
  refuses with `TARGET` a module that lacks one or holds another value there; every reader takes an optional `SurfaceLoader` that resolves the module, and requires the package in
851
- scaffold's resolution path when none is supplied. Importing the server entry alone does not load
852
- it.
861
+ scaffold's resolution path when none is supplied. `resolveSurfaceLoader` returns the loader of the
862
+ one candidate checkout whose manifest names `@orkestrel/guide`, or scaffold's own resolution when no
863
+ candidate does. Importing the server entry alone does not load it.
853
864
 
854
865
  The executable's `SurfaceCommand` interface carries `verb: 'surface'`, positional `checkouts`,
855
866
  and the optional `offline`, `from`, `target`, and `json` members. The parser refuses other verbs'
@@ -1617,7 +1628,7 @@ The configuration a surface reaches is compiled or vendored, and no package-owne
1617
1628
  it. `tsconfig.json`, `vite.config.ts`, every wrapper under `configs/src`, and
1618
1629
  `configs/app/vite.showcase.config.ts` are content-owned template artifacts, so `repair` restores a
1619
1630
  deleted one and replaces a stale one. `configs/app/vite.journey.config.ts` is birth-owned and keeps
1620
- your variant list. `configs/helpers.ts`, `.oxlintrc.json`, `.prettierignore`, and
1631
+ your variant list while the plan claims it. `configs/helpers.ts`, `.oxlintrc.json`, `.prettierignore`, and
1621
1632
  `tests/config.test.ts` are `HOST_PATHS` members: hydration claims their bytes, so the next
1622
1633
  release's `repair` refreshes them, and `overwrite` adds deletions rather than a forced refresh.
1623
1634
  Ownership and drift states the hydration.
@@ -1758,7 +1769,7 @@ group carries the `AGENTS.md` pointer that names where each contract is read, pl
1758
1769
  destinations as this package's own template content. The `orchestration` group carries
1759
1770
  `CATALOG_AGENT_PATH`, a host-origin artifact at a canon path, because the `catalog` verb refuses a
1760
1771
  target that lacks the file. It also carries the skill pointer set, three host-origin artifacts for
1761
- each name in `TARGET_SKILL_NAMES`, so every harness in a target discovers the package-facing skills
1772
+ each name in `TARGET_SKILL_NAMES`, so every harness in a target discovers the canonical skills
1762
1773
  while their bodies, references, and scripts stay in the installed package. Every other canon path is
1763
1774
  staged for reading, so no group selection copies a contract into a target, and a copy a target holds
1764
1775
  at one of them is foreign drift in the group `inferArtifactGroup` gives it. A scoped audit reads the canon
@@ -2035,8 +2046,9 @@ configuration must keep those edits outside a content-owned file; `repair` resto
2035
2046
  canonical project set.
2036
2047
 
2037
2048
  An audit reports one `ArtifactFinding` per planned path, followed by every foreign path in the groups the
2038
- plan covers. That second list draws on a file beneath a vendored directory the plan expands and on a
2039
- file the target holds at a canon path the plan does not claim. Every planned finding carries its
2049
+ plan covers. That second list draws on a file beneath a vendored directory the plan expands, on a
2050
+ file the target holds at a canon path the plan does not claim, and on a configuration wrapper the
2051
+ `listWrapperPaths` function names and the plan does not claim. Every planned finding carries its
2040
2052
  artifact's `ownership`. A foreign finding has no ownership because no artifact was planned for its
2041
2053
  path. `Ownership` says what scaffold claims at
2042
2054
  a path, not what one run did there. Counting planned findings by `content`, `presence`, and `birth`
@@ -2141,7 +2153,7 @@ extras pass through unchanged except for the selected showcase pair. Extras foll
2141
2153
  `ORKESTREL_RANGE_PATTERN`; foreign peers follow `FLOOR_RANGE_PATTERN`.
2142
2154
 
2143
2155
  A browser application with `showcase: true`, including its Vue face, selects exact
2144
- `vite-plugin-singlefile: 2.3.3`, Vite `^8.3.5` from scaffold's manifest, and the npm override
2156
+ `vite-plugin-singlefile: 2.3.3`, Vite `^8.3.6` from scaffold's manifest, and the npm override
2145
2157
  `"vite-plugin-singlefile@2.3.3": { "micromatch": "npm:picomatch@2.3.2" }`. This policy applies
2146
2158
  after extras. Online resolution excludes this pair from ordinary foreign-major updates; other
2147
2159
  dependencies retain their usual resolution. Repair preserves each package's runtime or development
@@ -2212,13 +2224,13 @@ The dependency tables select these floors:
2212
2224
  | ---------------------------- | ---------- | -------------------------------------------------------------- |
2213
2225
  | TypeScript | `^7.0.2` | Baseline without a Vue extension |
2214
2226
  | TypeScript | `^6.0.3` | A selected `src/vue` or `app/vue` face |
2215
- | Vitest | `^5.0.5` | Every workspace |
2216
- | `@vitest/browser-playwright` | `^5.0.5` | Browser tooling |
2217
- | `oxlint` | `^1.90.0` | Every workspace |
2218
- | `oxfmt` | `^0.75.0` | Every workspace |
2219
- | `@microsoft/api-extractor` | `^7.60.0` | Declaration builds; uses its bundled TypeScript 6.0.3 engine |
2227
+ | Vitest | `^5.1.0` | Every workspace |
2228
+ | `@vitest/browser-playwright` | `^5.1.0` | Browser tooling |
2229
+ | `oxlint` | `^1.91.0` | Every workspace |
2230
+ | `oxfmt` | `^0.76.0` | Every workspace |
2231
+ | `@microsoft/api-extractor` | `^7.60.1` | Declaration builds; uses its bundled TypeScript 6.0.3 engine |
2220
2232
  | `playwright` | `^1.64.1` | Browser tooling |
2221
- | Vite | `^8.3.5` | Every workspace |
2233
+ | Vite | `^8.3.6` | Every workspace |
2222
2234
  | `@types/node` | `^24.19.2` | Every workspace; generated workspaces support Node `>=22.18.0` |
2223
2235
 
2224
2236
  Node 26 types admit APIs that the supported runtime lacks. Inside the declared major the verbs
@@ -2871,18 +2883,28 @@ a `foreign` finding the same way, and `overwrite` deletes it. A maintainer who w
2871
2883
  server registration keeps it outside the repository, in the harness's own local or user scope,
2872
2884
  rather than at `.mcp.json`, where the file is drift whoever wrote it.
2873
2885
 
2886
+ **`overwrite` takes only the wrappers scaffold can name.** When an environment leaves a target, the
2887
+ audit reports each wrapper the `listWrapperPaths` function names and the plan no longer claims as
2888
+ `foreign`, and `overwrite` deletes a tracked one. A named styles extension's wrappers sit outside
2889
+ that population because their names form an open set, so `configs/src/vite.print.config.ts` stays
2890
+ after `src/print` leaves, with no finding; delete it by hand. Any other file under `configs/src` or
2891
+ `configs/app` is yours and draws no finding. A journey wrapper leaves with `app/browser`, and `git show`
2892
+ returns a committed variant list. `--dirty` waives the refusal for the whole tree, so an uncommitted
2893
+ edit to a tracked wrapper is lost with the file. A target whose last environment has left compiles
2894
+ no plan, so `overwrite` removes nothing from it.
2895
+
2874
2896
  **A target holds no dispatchable role beyond the catalog agent.** The canon is staged for reading,
2875
2897
  so a target receives the `AGENTS.md` pointer, `.claude/agents/orkestrel.md`, and the skill pointer
2876
- set for each package-facing skill `TARGET_SKILL_NAMES` lists: the Claude bridge, the Codex sidecar,
2898
+ set for each canonical skill `TARGET_SKILL_NAMES` lists: the Claude bridge, the Codex sidecar,
2877
2899
  and a pointer that names the canonical skill, all content-owned and restored by `repair`. It
2878
2900
  receives no other agent role, no bench configuration, and no MCP registration. A harness running in
2879
2901
  a target loads none of those from `node_modules` either, so a role, a bench, or a server that target
2880
2902
  needs is defined in the harness's own local or user scope — the seam the preceding registration
2881
- entry already names. Fleet targets are not orchestration hosts: `TARGET_SKILL_NAMES` leaves out the
2882
- dispatch, publish, scout, and align skills, which run from a scaffold checkout, and a blueprint
2883
- carrying the `skills` fact ships its own skill canon and receives no pointer set. A session that
2884
- dispatches roles starts on scaffold, where `.agents/orchestration.md` and the role files sit, and
2885
- attaches the target it is working on.
2903
+ entry already names. `TARGET_SKILL_NAMES` names every canonical skill, so a target reaches each one
2904
+ through its pointer set and runs its scripts from their built twins, and a blueprint carrying the
2905
+ `skills` fact ships its own skill canon and receives no pointer set. A session that dispatches a
2906
+ role the target's harness scope does not define starts on scaffold, where
2907
+ `.agents/orchestration.md` and the role files sit, and attaches the target it is working on.
2886
2908
 
2887
2909
  **`isPath` does not prove host portability.** It proves bounded target-relative syntax and rejects
2888
2910
  traversal, separators, controls, and reserved syntax characters. It deliberately admits host-specific