@orkestrel/scaffold 0.0.108 → 0.0.110

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 (162) 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 +290 -69
  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 +6 -2
  22. package/dist/bin/main.js +51 -46
  23. package/dist/bin/main.js.map +1 -1
  24. package/dist/host/AGENTS.md +23 -21
  25. package/dist/host/agents/orchestration.md +85 -54
  26. package/dist/host/agents/platforms/windows.md +8 -3
  27. package/dist/host/agents/skills/orkestrel-align/SKILL.md +10 -13
  28. package/dist/host/agents/skills/orkestrel-align/references/fleet.md +4 -10
  29. package/dist/host/agents/skills/orkestrel-align/references/integration.md +1 -1
  30. package/dist/host/agents/skills/orkestrel-build/SKILL.md +16 -48
  31. package/dist/host/agents/skills/orkestrel-build/agents/openai.yaml +1 -1
  32. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +19 -16
  33. package/dist/host/agents/skills/orkestrel-debrief/agents/openai.yaml +1 -1
  34. package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +15 -28
  35. package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +5 -6
  36. package/dist/host/agents/skills/orkestrel-debrief/references/retention.md +4 -6
  37. package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +36 -25
  38. package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +4 -5
  39. package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +366 -75
  40. package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +126 -16
  41. package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +323 -0
  42. package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +220 -31
  43. package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +176 -33
  44. package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +294 -59
  45. package/dist/host/agents/skills/orkestrel-dispatch/scripts/patch.ts +401 -0
  46. package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +199 -34
  47. package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +330 -69
  48. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +14 -12
  49. package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +2 -5
  50. package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +2 -1
  51. package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +701 -0
  52. package/dist/host/agents/skills/orkestrel-harden/SKILL.md +31 -24
  53. package/dist/host/agents/skills/orkestrel-harden/references/bindings.md +23 -81
  54. package/dist/host/agents/skills/orkestrel-harden/references/centralization.md +4 -5
  55. package/dist/host/agents/skills/orkestrel-harden/references/contract.md +2 -0
  56. package/dist/host/agents/skills/orkestrel-harden/references/document.md +33 -0
  57. package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +6 -3
  58. package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +34 -18
  59. package/dist/host/agents/skills/orkestrel-harden/references/research.md +2 -0
  60. package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +1272 -279
  61. package/dist/host/agents/skills/orkestrel-harden/scripts/measure.ts +425 -0
  62. package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +603 -98
  63. package/dist/host/agents/skills/orkestrel-journey/SKILL.md +79 -98
  64. package/dist/host/agents/skills/orkestrel-journey/references/captures.md +54 -17
  65. package/dist/host/agents/skills/orkestrel-journey/references/decide.md +1 -20
  66. package/dist/host/agents/skills/orkestrel-journey/references/layer.md +21 -31
  67. package/dist/host/agents/skills/orkestrel-journey/references/styles.md +1 -1
  68. package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +33 -29
  69. package/dist/host/agents/skills/orkestrel-parallel/references/claude.md +15 -13
  70. package/dist/host/agents/skills/orkestrel-parallel/references/cloud.md +28 -0
  71. package/dist/host/agents/skills/orkestrel-parallel/references/codex.md +1 -0
  72. package/dist/host/agents/skills/orkestrel-parallel/references/cursor.md +13 -13
  73. package/dist/host/agents/skills/orkestrel-parallel/references/t3.md +13 -13
  74. package/dist/host/agents/skills/orkestrel-parallel/scripts/cases.ts +389 -0
  75. package/dist/host/agents/skills/orkestrel-polish/SKILL.md +16 -20
  76. package/dist/host/agents/skills/orkestrel-polish/references/capture-harness.md +16 -26
  77. package/dist/host/agents/skills/orkestrel-publish/SKILL.md +12 -26
  78. package/dist/host/agents/skills/orkestrel-publish/agents/openai.yaml +2 -2
  79. package/dist/host/agents/skills/orkestrel-publish/references/adopt.md +23 -0
  80. package/dist/host/agents/skills/orkestrel-publish/references/release.md +4 -4
  81. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +13 -10
  82. package/dist/host/agents/skills/orkestrel-publish/references/window.md +21 -26
  83. package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +348 -59
  84. package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +202 -22
  85. package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +1061 -191
  86. package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +812 -140
  87. package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +280 -38
  88. package/dist/host/agents/skills/orkestrel-scout/SKILL.md +3 -3
  89. package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +428 -70
  90. package/dist/host/agents/templates/brief.md +6 -2
  91. package/dist/host/agents/transports/claude-cli.md +3 -3
  92. package/dist/host/agents/transports/codex.md +3 -8
  93. package/dist/host/agents/transports/cursor.md +2 -3
  94. package/dist/host/claude/AGENTS.md +2 -3
  95. package/dist/host/claude/agents/analyst.md +3 -3
  96. package/dist/host/claude/agents/astra.md +4 -4
  97. package/dist/host/claude/agents/builder.md +4 -3
  98. package/dist/host/claude/agents/checker.md +1 -1
  99. package/dist/host/claude/agents/distiller.md +1 -1
  100. package/dist/host/claude/agents/grok.md +1 -1
  101. package/dist/host/claude/agents/opus.md +3 -3
  102. package/dist/host/claude/agents/orkestrel.md +57 -90
  103. package/dist/host/claude/agents/researcher.md +1 -1
  104. package/dist/host/claude/agents/reviewer.md +6 -2
  105. package/dist/host/claude/agents/scout.md +1 -1
  106. package/dist/host/claude/agents/verifier.md +2 -2
  107. package/dist/host/claude/rules/application.md +14 -21
  108. package/dist/host/claude/rules/architecture.md +34 -44
  109. package/dist/host/claude/rules/browser.md +3 -4
  110. package/dist/host/claude/rules/campaign.md +3 -2
  111. package/dist/host/claude/rules/documentation.md +25 -12
  112. package/dist/host/claude/rules/names.md +9 -4
  113. package/dist/host/claude/rules/patterns.md +6 -7
  114. package/dist/host/claude/rules/portability.md +1 -1
  115. package/dist/host/claude/rules/quality.md +7 -6
  116. package/dist/host/claude/rules/styles.md +2 -2
  117. package/dist/host/claude/rules/tests.md +68 -115
  118. package/dist/host/claude/rules/typescript.md +7 -9
  119. package/dist/host/claude/rules/workspace.md +27 -26
  120. package/dist/host/claude/rules/writing.md +2 -5
  121. package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +1 -1
  122. package/dist/host/claude/skills/orkestrel-harden/SKILL.md +1 -1
  123. package/dist/host/claude/skills/orkestrel-publish/SKILL.md +1 -1
  124. package/dist/host/claude/skills/orkestrel-scout/SKILL.md +1 -1
  125. package/dist/host/codex/agents/analyst.toml +9 -3
  126. package/dist/host/codex/agents/astra.toml +10 -7
  127. package/dist/host/codex/agents/builder.toml +4 -4
  128. package/dist/host/codex/agents/opus.toml +6 -6
  129. package/dist/host/codex/agents/orkestrel.toml +1 -1
  130. package/dist/host/codex/agents/researcher.toml +2 -2
  131. package/dist/host/codex/agents/reviewer.toml +2 -2
  132. package/dist/host/codex/agents/verifier.toml +4 -4
  133. package/dist/host/codex/config.toml +1 -1
  134. package/dist/host/configs/helpers.ts +21 -1
  135. package/dist/host/configs/policy.ts +299 -15
  136. package/dist/host/cursor/rules/orchestration.mdc +1 -1
  137. package/dist/host/dotfiles/oxlintrc.json +137 -3
  138. package/dist/host/guides/agent.md +111 -134
  139. package/dist/host/guides/capture.md +801 -0
  140. package/dist/host/guides/probe.md +27 -8
  141. package/dist/host/guides/scaffold.md +97 -19
  142. package/dist/host/guides/study.md +534 -440
  143. package/dist/host/guides/test.md +111 -44
  144. package/dist/host/manifest.json +170 -244
  145. package/dist/host/tests/config.test.ts +977 -187
  146. package/dist/host/tests/policy.test.ts +165 -1
  147. package/dist/host/tests/setupPolicy.ts +1246 -33
  148. package/dist/src/core/index.cjs +222 -90
  149. package/dist/src/core/index.cjs.map +1 -1
  150. package/dist/src/core/index.d.cts +126 -40
  151. package/dist/src/core/index.d.ts +126 -40
  152. package/dist/src/core/index.js +217 -89
  153. package/dist/src/core/index.js.map +1 -1
  154. package/dist/src/server/index.cjs +20 -27
  155. package/dist/src/server/index.cjs.map +1 -1
  156. package/dist/src/server/index.js +21 -28
  157. package/dist/src/server/index.js.map +1 -1
  158. package/package.json +11 -11
  159. package/dist/agents/skills/orkestrel-dispatch/scripts/helpers.js +0 -283
  160. package/dist/host/agents/skills/orkestrel-dispatch/references/bench.md +0 -25
  161. package/dist/host/agents/skills/orkestrel-dispatch/scripts/helpers.ts +0 -333
  162. package/dist/host/guides/supervisor.md +0 -4890
@@ -3,7 +3,7 @@ import { fillTemplate } from "@orkestrel/template";
3
3
  import { Emitter } from "@orkestrel/emitter";
4
4
  var package_default = {
5
5
  name: "@orkestrel/scaffold",
6
- version: "0.0.108",
6
+ version: "0.0.110",
7
7
  description: "Scaffold workspaces with commands: new, audit, repair, catalog, and overwrite.",
8
8
  keywords: [
9
9
  "audit",
@@ -80,7 +80,7 @@ var package_default = {
80
80
  "test:templates": "vitest run --config vite.config.ts --no-cache --reporter=dot --project templates",
81
81
  "test:distribution": "vitest run --config vite.config.ts --no-cache --reporter=dot --project distribution",
82
82
  "test:probe": "vitest run --config vite.config.ts --no-cache --reporter=verbose --project probe",
83
- "test:bench": "vitest bench --config vite.config.ts --no-cache --project probe",
83
+ "test:bench": "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\" --mode benchmark",
84
84
  "test:setup": "vitest run --config vite.config.ts --no-cache --reporter=dot --project setup",
85
85
  "build": "npm run clean && npm run build:src && npm run build:host && npm run build:skills && npm run build:inventory",
86
86
  "build:src": "npm run build:src:core && npm run build:src:server && npm run build:src:bin",
@@ -102,25 +102,24 @@ var package_default = {
102
102
  "@orkestrel/template": "^0.0.10"
103
103
  },
104
104
  devDependencies: {
105
- "@microsoft/api-extractor": "^7.59.4",
105
+ "@microsoft/api-extractor": "^7.60.0",
106
106
  "@orkestrel/browser": "^0.0.29",
107
107
  "@orkestrel/guide": "^0.0.25",
108
108
  "@orkestrel/html": "^0.0.12",
109
- "@orkestrel/probe": "^0.0.24",
110
- "@orkestrel/test": "^0.0.29",
109
+ "@orkestrel/probe": "^0.0.25",
110
+ "@orkestrel/test": "^0.0.30",
111
111
  "@types/node": "^24.19.2",
112
- "@vitest/browser-playwright": "^4.1.11",
113
- "oxfmt": "^0.74.0",
114
- "oxlint": "^1.89.0",
115
- "playwright": "^1.63.0",
116
- "typescript": "^6.0.3",
112
+ "@vitest/browser-playwright": "^5.0.5",
113
+ "oxfmt": "^0.75.0",
114
+ "oxlint": "^1.90.0",
115
+ "playwright": "^1.64.1",
116
+ "typescript": "^7.0.2",
117
117
  "vite": "^8.3.5",
118
- "vitest": "^4.1.12"
118
+ "vitest": "^5.0.5"
119
119
  },
120
120
  engines: { "node": ">=22.18.0" }
121
121
  };
122
- //#endregion
123
- //#region src/core/constants.ts
122
+ // src/core/constants.ts
124
123
  /**
125
124
  * Lists the `Environment` values, frozen.
126
125
  *
@@ -439,19 +438,19 @@ var CATALOG_AGENT_PATH = ".claude/agents/orkestrel.md";
439
438
  *
440
439
  * @remarks
441
440
  * The catalog verb rewrites the region between this marker and
442
- * {@link CATALOG_CLOSING_MARKER} and leaves every other byte of the file alone,
441
+ * {@link CATALOG_END_MARKER} and leaves every other byte of the file alone,
443
442
  * so the writer and every proof that reads the rendered file read the pair from
444
443
  * here rather than repeating a literal that only agrees by inspection.
445
444
  */
446
- var CATALOG_OPENING_MARKER = "<!-- orkestrel:catalog -->";
445
+ var CATALOG_START_MARKER = "<!-- orkestrel:catalog -->";
447
446
  /**
448
447
  * Names the marker closing the package table inside {@link CATALOG_AGENT_PATH}.
449
448
  *
450
449
  * @remarks
451
- * It pairs with {@link CATALOG_OPENING_MARKER}; a file missing either marker is
450
+ * It pairs with {@link CATALOG_START_MARKER}; a file missing either marker is
452
451
  * refused rather than rewritten.
453
452
  */
454
- var CATALOG_CLOSING_MARKER = "<!-- /orkestrel:catalog -->";
453
+ var CATALOG_END_MARKER = "<!-- /orkestrel:catalog -->";
455
454
  /**
456
455
  * Lists the package-facing skills a target receives pointers for, frozen and alphabetical.
457
456
  *
@@ -657,7 +656,7 @@ var WORKSPACE_DEV_ENGINES = Object.freeze({ packageManager: Object.freeze({
657
656
  version: `>=${MINIMUM_NPM_VERSION}`,
658
657
  onFail: "error"
659
658
  }) });
660
- /** Holds the tooling versions scaffold and every generated workspace share. */
659
+ /** Holds the baseline tooling versions, before framework holds apply. */
661
660
  var BASE_DEV_DEPENDENCIES = Object.freeze({
662
661
  "@orkestrel/guide": package_default.devDependencies["@orkestrel/guide"],
663
662
  "@orkestrel/probe": package_default.devDependencies["@orkestrel/probe"],
@@ -671,6 +670,19 @@ var BASE_DEV_DEPENDENCIES = Object.freeze({
671
670
  vitest: package_default.devDependencies.vitest
672
671
  });
673
672
  /**
673
+ * Holds foreign tool ranges required by selected browser frameworks, frozen.
674
+ *
675
+ * @remarks
676
+ * A selected framework overrides the baseline floor with its held range. `audit` names the hold
677
+ * where it would report a newer served major and reports a declaration past that hold. The
678
+ * constants proof ties the held range to the baseline manifest and the framework's planned range.
679
+ */
680
+ var TOOLCHAIN_HOLDS = Object.freeze({ typescript: Object.freeze({
681
+ framework: "vue",
682
+ range: "^6.0.3",
683
+ reason: "Vue workspaces require TypeScript 6.0.3 because no stable vue-tsc runs on TypeScript 7: vue-tsc resolves typescript/lib/tsc, which TypeScript 7.0.2 does not export, and the TypeScript 7.0 announcement directs Vue projects to stay on TypeScript 6.0"
684
+ }) });
685
+ /**
674
686
  * Lists the development dependencies that roll declarations up for published source.
675
687
  *
676
688
  * @remarks
@@ -694,6 +706,45 @@ var SOURCE_BROWSER_DEV_DEPENDENCIES = Object.freeze({
694
706
  */
695
707
  var BROWSE_DEV_DEPENDENCIES = Object.freeze({ "@orkestrel/browser": package_default.devDependencies["@orkestrel/browser"] });
696
708
  /**
709
+ * Names the development dependency a browser application's journey axis adds.
710
+ *
711
+ * @remarks
712
+ * Scaffold does not install this package, so its range is a seed. The planner withholds it
713
+ * from the workspaces {@link CAPTURE_UPSTREAM} lists.
714
+ *
715
+ * @example
716
+ * ```ts
717
+ * import { CAPTURE_DEV_DEPENDENCIES } from '@orkestrel/scaffold'
718
+ *
719
+ * CAPTURE_DEV_DEPENDENCIES['@orkestrel/capture'] // '^0.0.1'
720
+ * ```
721
+ */
722
+ var CAPTURE_DEV_DEPENDENCIES = Object.freeze({ "@orkestrel/capture": "^0.0.1" });
723
+ /**
724
+ * Lists the capture package and its fleet runtime dependency closure, frozen.
725
+ *
726
+ * @remarks
727
+ * The sorted list includes `@orkestrel/capture` and its transitive `@orkestrel/*` dependencies
728
+ * and peers, read from capture's installed manifests, and moves with the capture pin.
729
+ * A listed workspace cannot receive the capture development dependency without closing a cycle.
730
+ * Scaffold does not install capture, so the proof checks planning against this list; the
731
+ * installed closure-equality proof lands when scaffold installs capture.
732
+ *
733
+ * @example
734
+ * ```ts
735
+ * import { CAPTURE_UPSTREAM } from '@orkestrel/scaffold'
736
+ *
737
+ * CAPTURE_UPSTREAM.includes('@orkestrel/process') // true
738
+ * ```
739
+ */
740
+ var CAPTURE_UPSTREAM = Object.freeze([
741
+ "@orkestrel/capture",
742
+ "@orkestrel/contract",
743
+ "@orkestrel/emitter",
744
+ "@orkestrel/process",
745
+ "@orkestrel/timeout"
746
+ ]);
747
+ /**
697
748
  * Lists the packages `@orkestrel/browser` depends on at runtime, directly or transitively, frozen.
698
749
  *
699
750
  * @remarks
@@ -749,8 +800,7 @@ var APP_SERVER_DEV_DEPENDENCIES = Object.freeze({
749
800
  "@orkestrel/router": "^0.0.10",
750
801
  "@orkestrel/server": "^0.0.14"
751
802
  });
752
- //#endregion
753
- //#region src/core/templates.ts
803
+ // src/core/templates.ts
754
804
  /**
755
805
  * Holds formatter-stable template text for every configuration artifact.
756
806
  *
@@ -1248,6 +1298,7 @@ export function appJourney(
1248
1298
  variant: JourneyVariant,
1249
1299
  variants: readonly JourneyVariant[],
1250
1300
  mode?: string,
1301
+ override?: UserConfig,
1251
1302
  ): UserConfig {
1252
1303
  const application = resolveApplication(mode, applications)
1253
1304
  const browser = applications[application]()
@@ -1262,6 +1313,8 @@ export function appJourney(
1262
1313
  browser: {
1263
1314
  ...browser.test?.browser,
1264
1315
  enabled: true,
1316
+ // The runner UI CSS-scales the tester iframe, which scales observer root bounds and margins.
1317
+ ui: false,
1265
1318
  viewport: { width: variant.width, height: variant.height },
1266
1319
  instances: (browser.test?.browser?.instances ?? []).map(
1267
1320
  ({ name: _name, ...instance }) => instance,
@@ -1269,7 +1322,7 @@ export function appJourney(
1269
1322
  },
1270
1323
  },
1271
1324
  }
1272
- return mergeOverride(project)
1325
+ return mergeOverride(project, override)
1273
1326
  }
1274
1327
  `,
1275
1328
  showcase: `
@@ -1556,8 +1609,9 @@ export function service(override?: UserConfig): UserConfig {
1556
1609
  return mergeOverride(project, override)
1557
1610
  }
1558
1611
  `,
1559
- studies: `// Authored study proofs run installed packages through bounded subprocesses and protocol fixtures,
1560
- // so this project is isolated in its own gate script, test:studies.
1612
+ studies: `// The @orkestrel/study engine drives these proofs, running installed packages through bounded
1613
+ // subprocesses and protocol fixtures, so this project is isolated in its own gate script,
1614
+ // test:studies.
1561
1615
  export function studies(override?: UserConfig): UserConfig {
1562
1616
  const project: UserConfig = {
1563
1617
  resolve,
@@ -1595,9 +1649,9 @@ export function studies(override?: UserConfig): UserConfig {
1595
1649
  `,
1596
1650
  probe: `// A workbench, not a proof. No gate selects this project. Run in test mode by the
1597
1651
  // \`test:probe\` script, it collects \`tmp/probes/**/*.test.ts\`. Run in benchmark mode by the
1598
- // \`test:bench\` script, the same workbench also collects \`tests/**/*.test.ts\` for a \`bench\` block,
1599
- // so a suite may carry a bench beside its ordinary tests without a second project. The mode
1600
- // guard around each \`bench\` call keeps it out of test mode, so it never executes there.
1652
+ // \`test:bench\` script, it collects \`*.bench.ts\` files under \`tmp/probes\` and \`tests\`.
1653
+ // Each benchmark is a regular test that uses its context's \`bench\` fixture and awaits
1654
+ // \`bench(name, options, fn).run()\` or \`bench.compare(...)\`.
1601
1655
  export function probe(override?: UserConfig): UserConfig {
1602
1656
  const project: UserConfig = {
1603
1657
  resolve,
@@ -1610,7 +1664,7 @@ export function probe(override?: UserConfig): UserConfig {
1610
1664
  fileParallelism: false,
1611
1665
  sequence: { groupOrder: 1 },
1612
1666
  pool: 'threads',
1613
- benchmark: { include: ['tmp/probes/**/*.test.ts', 'tests/**/*.test.ts'] },
1667
+ benchmark: { include: ['tmp/probes/**/*.bench.ts', 'tests/**/*.bench.ts'] },
1614
1668
  },
1615
1669
  }
1616
1670
  return mergeOverride(project, override)
@@ -2625,11 +2679,14 @@ export const DISTRIBUTION_NPM = process.platform === 'win32' ? 'npm.cmd' : 'npm'
2625
2679
  // process: the command and its plain-text diagnostics are the same across the
2626
2680
  // compiler majors this toolchain supports, and its in-process API is not. It is
2627
2681
  // resolved from the workspace under proof, so a consumer of the packed artifact is
2628
- // checked by the same compiler that workspace's own \`check\` script runs.
2682
+ // checked by the same compiler that workspace's own \`check\` script runs. TypeScript 7 exports
2683
+ // \`package.json\` but not \`bin/tsc\`, so the path is joined from the manifest's directory.
2684
+ /** Names the TypeScript manifest installed by the workspace under proof. */
2685
+ export const DISTRIBUTION_TYPESCRIPT = createRequire(
2686
+ join(DISTRIBUTION_ROOT, 'package.json'),
2687
+ ).resolve('typescript/package.json')
2629
2688
  /** Names the compiler installed by the workspace under proof. */
2630
- export const DISTRIBUTION_COMPILER = createRequire(join(DISTRIBUTION_ROOT, 'package.json')).resolve(
2631
- 'typescript/bin/tsc',
2632
- )
2689
+ export const DISTRIBUTION_COMPILER = join(dirname(DISTRIBUTION_TYPESCRIPT), 'bin', 'tsc')
2633
2690
  // Windows needs a shell to launch a \`.cmd\`: Node refuses one directly since the
2634
2691
  // batch-argument hardening, and \`spawnSync\` returns \`EINVAL\` with a null status
2635
2692
  // rather than an exit code a caller can read. Every following argument is a literal or
@@ -2897,6 +2954,50 @@ export function readDistributionManifestName(path: string): string {
2897
2954
  return manifest.name
2898
2955
  }
2899
2956
 
2957
+ // A host carries a package's required peers at its own root. A consumer that carries none leaves
2958
+ // npm to place them, and npm can then resolve an optional peer of a peer to a release the
2959
+ // package's own range refuses, so the consumer declares them as a host would.
2960
+ /**
2961
+ * Reads the peers a host must carry: every peer dependency its metadata does not mark optional.
2962
+ *
2963
+ * @param path - The manifest to read.
2964
+ * @returns Each required peer's name mapped to its declared range.
2965
+ */
2966
+ export function readDistributionPeers(path: string): Readonly<Record<string, string>> {
2967
+ const manifest = readDistributionJSON(path)
2968
+ if (!isDistributionRecord(manifest) || !isDistributionRecord(manifest.peerDependencies)) {
2969
+ return {}
2970
+ }
2971
+ const meta = isDistributionRecord(manifest.peerDependenciesMeta)
2972
+ ? manifest.peerDependenciesMeta
2973
+ : undefined
2974
+ const peers = Object.entries(manifest.peerDependencies).filter(
2975
+ (entry): entry is [string, string] => typeof entry[1] === 'string',
2976
+ )
2977
+ return Object.fromEntries(
2978
+ peers.filter(([name]) => {
2979
+ const entry = meta?.[name]
2980
+ return !isDistributionRecord(entry) || entry.optional !== true
2981
+ }),
2982
+ )
2983
+ }
2984
+
2985
+ /**
2986
+ * Writes the consumer manifest, declaring the required peers as dependencies.
2987
+ *
2988
+ * @param peers - Each required peer's name mapped to its declared range.
2989
+ * @returns The manifest text; the bare manifest when the package declares no required peer.
2990
+ */
2991
+ export function createDistributionConsumerManifest(
2992
+ peers: Readonly<Record<string, string>>,
2993
+ ): string {
2994
+ const manifest: unknown = JSON.parse(DISTRIBUTION_CONSUMER_MANIFEST)
2995
+ if (Object.keys(peers).length === 0 || !isDistributionRecord(manifest)) {
2996
+ return DISTRIBUTION_CONSUMER_MANIFEST
2997
+ }
2998
+ return \`\${JSON.stringify({ ...manifest, dependencies: peers })}\\n\`
2999
+ }
3000
+
2900
3001
  /**
2901
3002
  * Writes a consumer file after creating its parent directory.
2902
3003
  *
@@ -3531,7 +3632,8 @@ export function buildDistributionStage(scratch: string): DistributionStage {
3531
3632
  if (archives.length !== 1 || archive === undefined) {
3532
3633
  throw new Error(\`npm pack wrote no single archive: \${archives.join(', ')}\`)
3533
3634
  }
3534
- writeDistributionFile(join(consumer, 'package.json'), DISTRIBUTION_CONSUMER_MANIFEST)
3635
+ const peers = readDistributionPeers(join(DISTRIBUTION_ROOT, 'package.json'))
3636
+ writeDistributionFile(join(consumer, 'package.json'), createDistributionConsumerManifest(peers))
3535
3637
  writeDistributionFile(join(consumer, DISTRIBUTION_ESM_DRIVER), DISTRIBUTION_ESM_DRIVER_SOURCE)
3536
3638
  writeDistributionFile(join(consumer, DISTRIBUTION_CJS_DRIVER), DISTRIBUTION_CJS_DRIVER_SOURCE)
3537
3639
  const install = runDistributionNpm(
@@ -4603,8 +4705,8 @@ skill itself ships with that package. Read the canonical \`SKILL.md\` completely
4603
4705
 
4604
4706
  Resolve every path the canonical skill names against the same root; under \`node_modules\` each
4605
4707
  segment drops its opening dot. Run a script the skill names through its built twin, as this
4606
- repository's \`AGENTS.md\` states. This pointer carries no process of its own; \`AGENTS.md\`, the applicable
4607
- rules, and the canonical skill remain authoritative in that order.
4708
+ repository's \`AGENTS.md\` states. This pointer carries no process of its own; the authority order is
4709
+ \`.agents/orchestration.md\` § Authority.
4608
4710
  `,
4609
4711
  service: `#!/usr/bin/env sh
4610
4712
  set -eu
@@ -4614,8 +4716,7 @@ printf '%s\\n' \\
4614
4716
  `
4615
4717
  })
4616
4718
  });
4617
- //#endregion
4618
- //#region src/core/errors.ts
4719
+ // src/core/errors.ts
4619
4720
  /**
4620
4721
  * Represents the one error this package throws, carrying the coded reason it was raised.
4621
4722
  *
@@ -4684,8 +4785,7 @@ var ScaffoldError = class extends Error {
4684
4785
  function isScaffoldError(value) {
4685
4786
  return isInstance(value, ScaffoldError);
4686
4787
  }
4687
- //#endregion
4688
- //#region src/core/validators.ts
4788
+ // src/core/validators.ts
4689
4789
  /**
4690
4790
  * Narrows a value to a logical target-relative path.
4691
4791
  *
@@ -5244,8 +5344,7 @@ var isCompilerOptions = recordOf({
5244
5344
  on: isCompilerHooks,
5245
5345
  error: isFunction
5246
5346
  }, true);
5247
- //#endregion
5248
- //#region src/core/cloners.ts
5347
+ // src/core/cloners.ts
5249
5348
  /**
5250
5349
  * Snapshots an untrusted value into exact JSON data the caller owns.
5251
5350
  *
@@ -5292,8 +5391,7 @@ function cloneValue(value) {
5292
5391
  const outcome = attempt(() => cloneJSONValue(value));
5293
5392
  return outcome.success ? outcome.value : void 0;
5294
5393
  }
5295
- //#endregion
5296
- //#region src/core/parsers.ts
5394
+ // src/core/parsers.ts
5297
5395
  /**
5298
5396
  * Coerces an extension value or a `surface:name` selection into an extension.
5299
5397
  * @param value - An extension record or its selection text.
@@ -5408,8 +5506,7 @@ function parseSnapshot(value) {
5408
5506
  function parseCompilerOptions(value) {
5409
5507
  return isCompilerOptions(value) ? value : void 0;
5410
5508
  }
5411
- //#endregion
5412
- //#region src/core/helpers.ts
5509
+ // src/core/helpers.ts
5413
5510
  /**
5414
5511
  * Encodes bytes as exact lowercase hexadecimal text.
5415
5512
  *
@@ -6428,9 +6525,9 @@ function manifestToDependencies(manifest) {
6428
6525
  function renderSkillPointer(canonical, name) {
6429
6526
  const lines = canonical.split(/\r\n|\n/u);
6430
6527
  if (lines[0] !== "---") return void 0;
6431
- const closing = lines.indexOf("---", 1);
6432
- if (closing === -1) return void 0;
6433
- return `${lines.slice(0, closing + 1).join("\n")}\n${fillTemplate(ARTIFACT_TEMPLATES.orchestration.skill, { name })}`;
6528
+ const end = lines.indexOf("---", 1);
6529
+ if (end === -1) return void 0;
6530
+ return `${lines.slice(0, end + 1).join("\n")}\n${fillTemplate(ARTIFACT_TEMPLATES.orchestration.skill, { name })}`;
6434
6531
  }
6435
6532
  /**
6436
6533
  * Scans manifest text for its strings and object braces, in order.
@@ -6476,8 +6573,7 @@ function scanManifestTokens(text) {
6476
6573
  }
6477
6574
  return tokens;
6478
6575
  }
6479
- //#endregion
6480
- //#region src/core/compilers.ts
6576
+ // src/core/compilers.ts
6481
6577
  /**
6482
6578
  * Projects a blueprint into browser extensions restricted to occupied browser axes.
6483
6579
  * @param blueprint - The workspace specification.
@@ -6653,8 +6749,10 @@ function srcToExports(src) {
6653
6749
  * @returns The merged set, sorted by package name.
6654
6750
  *
6655
6751
  * @remarks
6656
- * The shared toolchain is the baseline every generated workspace carries, and
6657
- * each declared axis adds the set its host needs. A declared extra or peer is
6752
+ * The shared toolchain is the baseline every generated workspace carries.
6753
+ * A selected browser framework applies its toolchain hold before the host-specific sets.
6754
+ * Vue faces on either axis select TypeScript 6.0.3; other workspaces select TypeScript 7.0.2.
6755
+ * Each declared axis adds the set its host needs. A declared extra or peer is
6658
6756
  * applied after those, so a workspace that pins a range for a package the
6659
6757
  * conditional sets also name gets the range it declared. An extra that restates
6660
6758
  * a shared toolchain pin never reaches here, because the gate refuses it. A peer
@@ -6669,6 +6767,11 @@ function srcToExports(src) {
6669
6767
  * to drive. A workspace {@link BROWSE_UPSTREAM} names receives nothing either, because
6670
6768
  * `@orkestrel/browser` depends on it at runtime and the declaration would close a cycle.
6671
6769
  *
6770
+ * A journey axis with a browser application receives {@link CAPTURE_DEV_DEPENDENCIES}.
6771
+ * A workspace {@link CAPTURE_UPSTREAM} names receives no capture seed, because it is capture
6772
+ * itself or a member of capture's runtime closure. A browser source, styles surface, or browser
6773
+ * setup alone selects no capture dependency.
6774
+ *
6672
6775
  * A peer is declared here as well as under `peerDependencies`, because a peer is
6673
6776
  * not installed by the workspace that declares it and developing against one
6674
6777
  * requires it present. A runtime dependency is the opposite case and is removed:
@@ -6695,7 +6798,9 @@ function blueprintToDevDependencies(blueprint) {
6695
6798
  const own = blueprint.src.length > 0 || sheets ? `@orkestrel/${blueprint.name}` : blueprint.name;
6696
6799
  const prior = {
6697
6800
  ...BASE_DEV_DEPENDENCIES,
6801
+ ...Object.fromEntries(Object.entries(blueprintToToolchainHolds(blueprint)).map(([name, hold]) => [name, hold.range])),
6698
6802
  ...rendered && !BROWSE_UPSTREAM.includes(own) ? BROWSE_DEV_DEPENDENCIES : {},
6803
+ ...blueprint.journey && blueprint.app.includes("browser") && !CAPTURE_UPSTREAM.includes(own) ? CAPTURE_DEV_DEPENDENCIES : {},
6699
6804
  ...sheets ? STYLES_DEV_DEPENDENCIES : {},
6700
6805
  ...blueprint.src.length > 0 || blueprint.bin ? DECLARATION_DEV_DEPENDENCIES : {},
6701
6806
  ...blueprint.src.includes("browser") || blueprint.setup.includes("browser") || sheets ? SOURCE_BROWSER_DEV_DEPENDENCIES : {},
@@ -6715,6 +6820,21 @@ function blueprintToDevDependencies(blueprint) {
6715
6820
  return Object.fromEntries(Object.entries(merged).filter(([name]) => name !== own && !runtime.has(name)).sort(([left], [right]) => compareValues(left, right)));
6716
6821
  }
6717
6822
  /**
6823
+ * Projects a blueprint into the toolchain holds its browser frameworks require.
6824
+ * @param blueprint - The workspace specification.
6825
+ * @returns The held tools for selected browser framework faces; empty without a framework.
6826
+ * @example
6827
+ * ```ts
6828
+ * import { blueprintToToolchainHolds, createBlueprint } from '@orkestrel/scaffold'
6829
+ *
6830
+ * blueprintToToolchainHolds(createBlueprint('router', { src: ['core'] })) // {}
6831
+ * ```
6832
+ */
6833
+ function blueprintToToolchainHolds(blueprint) {
6834
+ const frameworks = blueprintToFaces(blueprint).map((face) => face.name);
6835
+ return Object.fromEntries(Object.entries(TOOLCHAIN_HOLDS).filter(([, hold]) => frameworks.includes(hold.framework)));
6836
+ }
6837
+ /**
6718
6838
  * Projects the scoped npm overrides required by a selected browser showcase.
6719
6839
  *
6720
6840
  * @param blueprint - The workspace specification.
@@ -6851,6 +6971,9 @@ function replaceManifestOverride(manifest, path, range) {
6851
6971
  * The configuration paths interpolated here are the same ones `SRC_MATRIX` and
6852
6972
  * `APP_MATRIX` list as each environment's configuration files, so a rename in
6853
6973
  * either matrix is a rename in both places.
6974
+ * A browser application's journey axis adds `journey` (`capture journey`) and `capture`
6975
+ * (`capture frames`) beside `test:journey`. The scoped commands take an explicit selection;
6976
+ * the whole-suite `test:journey` invocation remains in the test chain.
6854
6977
  *
6855
6978
  * @example
6856
6979
  * ```ts
@@ -6949,6 +7072,8 @@ function blueprintToScripts(blueprint) {
6949
7072
  ...blueprint.setup.includes("browser") ? { "test:setup:browser": `${vitest} --project setup:browser` } : {},
6950
7073
  ...blueprint.journey && blueprint.app.includes("browser") ? {
6951
7074
  "test:journey": journey,
7075
+ journey: "capture journey",
7076
+ capture: "capture frames",
6952
7077
  ...Object.fromEntries(application.map((name) => [`test:journey:${name}`, `${journey} --mode ${name}`]))
6953
7078
  } : {},
6954
7079
  ...blueprint.skills ? { "test:skills": `${vitest} --project skills` } : {},
@@ -6956,7 +7081,7 @@ function blueprintToScripts(blueprint) {
6956
7081
  ...blueprint.conformance ? { "test:conformance": `${vitest} --project conformance` } : {},
6957
7082
  ...blueprint.tree ? { "test:tree": `${vitest} --project tree` } : {},
6958
7083
  "test:probe": "vitest run --config vite.config.ts --no-cache --reporter=verbose --project probe",
6959
- "test:bench": "vitest bench --config vite.config.ts --no-cache --project probe",
7084
+ "test:bench": "vitest bench --config vite.config.ts --no-cache --project \"probe (bench)\" --mode benchmark",
6960
7085
  ...publishes ? { "test:distribution": `${vitest} --project distribution` } : {},
6961
7086
  ...integrates ? { "test:integration": `${vitest} --project integration` } : {},
6962
7087
  ...blueprint.service ? { "test:service": `${vitest} --project service` } : {},
@@ -7021,12 +7146,16 @@ function blueprintToScripts(blueprint) {
7021
7146
  * rewrites, and one carrying skills adds `test:skills`. Publishing adds the pack and publication lifecycle scripts.
7022
7147
  * Sheet and framework faces add their check and build scripts, application frameworks add dev scripts,
7023
7148
  * and selected showcases and journeys add their mode scripts.
7149
+ * A browser application's journey axis also adds `journey` and `capture`. Their generated
7150
+ * commands are writable and have no predecessor forms; customized values remain caller-owned.
7024
7151
  * Aggregate test scripts and
7025
7152
  * maintainer-owned gate chains stay outside the region.
7026
7153
  *
7027
7154
  * `accepted` carries each generated predecessor the region can replace. The
7028
7155
  * guides entry accepts the generated command that invoked the guides project
7029
- * through Vitest alone. The pack hook accepts the build chain emitted before it
7156
+ * through Vitest alone. The benchmark entry accepts the one command that ran the
7157
+ * `probe` project through `vitest bench`, before the dedicated bench project
7158
+ * existed. The pack hook accepts the build chain emitted before it
7030
7159
  * delegated to `build`. The publication hook accepts the same gate chain without
7031
7160
  * {@link RELEASE_PROOF_COMMAND}. A workspace carrying studies also accepts the
7032
7161
  * chain without its study step and the chain without both its study step and
@@ -7052,11 +7181,11 @@ function blueprintToWritableScripts(blueprint) {
7052
7181
  const sheet = sheets.some((face) => name === `build:src:${face}` || name === `check:src:${face}`);
7053
7182
  const framework = blueprintToFaces(blueprint).some((extension) => extension.surface === "browser" && extension.axes.some((axis) => name === `check:${axis}:${extension.name}` || name === `build:${axis}:${extension.name}` || axis === "app" && name === `dev:${extension.name}`));
7054
7183
  const showcase = name === "showcase" || name.startsWith("showcase:") || name === "build:showcase" || name.startsWith("build:showcase:");
7055
- if (!direct && !sheet && !framework && !showcase) return [];
7184
+ if (!direct && !sheet && !framework && !showcase && !(name === "journey" || name === "capture")) return [];
7056
7185
  return [{
7057
7186
  name,
7058
7187
  command,
7059
- accepted: name === "test:guides" ? ["vitest run --config vite.config.ts --no-cache --reporter=dot --project guides"] : name === "build:src:styles" && blueprint.themes ? ["vite build --config configs/src/vite.styles.config.ts"] : sheets.some((face) => name === `test:src:${face}`) ? [command.slice(command.indexOf(" && ") + 4)] : []
7188
+ accepted: name === "test:guides" ? ["vitest run --config vite.config.ts --no-cache --reporter=dot --project guides"] : name === "test:bench" ? ["vitest bench --config vite.config.ts --no-cache --project probe"] : name === "build:src:styles" && blueprint.themes ? ["vite build --config configs/src/vite.styles.config.ts"] : sheets.some((face) => name === `test:src:${face}`) ? [command.slice(command.indexOf(" && ") + 4)] : []
7060
7189
  }];
7061
7190
  });
7062
7191
  const prepack = scripts.prepack;
@@ -7277,7 +7406,8 @@ function blueprintToRootTsconfig(blueprint) {
7277
7406
  * Projects a blueprint into the project labels its root Vitest configuration registers.
7278
7407
  *
7279
7408
  * @param blueprint - The workspace specification.
7280
- * @returns Project labels in registration order, including wrapper-registered sheet faces.
7409
+ * @returns Project labels in registration order, including wrapper-registered sheet faces and
7410
+ * the probe benchmark variant.
7281
7411
  *
7282
7412
  * @example
7283
7413
  * ```ts
@@ -7311,7 +7441,8 @@ function blueprintToProjects(blueprint) {
7311
7441
  ...blueprint.studies ? ["studies"] : [],
7312
7442
  ...blueprint.src.length > 0 || styled ? ["distribution"] : [],
7313
7443
  ...blueprint.integration ? ["integration"] : [],
7314
- "probe"
7444
+ "probe",
7445
+ "probe (bench)"
7315
7446
  ];
7316
7447
  }
7317
7448
  /**
@@ -8493,9 +8624,9 @@ function insertManifestSection(manifest, section, dependencies, present) {
8493
8624
  const root = tokens.find((token) => token.text === "}" && token.depth === 0)?.index;
8494
8625
  if (bounds === void 0) {
8495
8626
  if (present || root === void 0) return void 0;
8496
- const breaking = head === void 0 ? -1 : manifest.lastIndexOf("\n", head);
8497
- const margin = breaking < 0 ? "" : manifest.slice(breaking + 1, head);
8498
- const gap = breaking < 0 || /\S/u.test(margin) ? "" : `\n${margin}`;
8627
+ const lineBreak = head === void 0 ? -1 : manifest.lastIndexOf("\n", head);
8628
+ const margin = lineBreak < 0 ? "" : manifest.slice(lineBreak + 1, head);
8629
+ const gap = lineBreak < 0 || /\S/u.test(margin) ? "" : `\n${margin}`;
8499
8630
  const block = `${JSON.stringify(section)}: {${lines.map((line) => `${gap === "" ? "" : `${gap}${margin}`}${line}`).join(",")}${gap}}`;
8500
8631
  const tail = manifest.slice(1, root).trimEnd().length;
8501
8632
  const [position, insertion] = neighbor === void 0 ? [tail + 1, manifest.charAt(tail) === "{" ? block : `,${gap}${block}`] : section === "devDependencies" ? [neighbor.close + 1, `,${gap}${block}`] : [neighbor.start, `${block},${gap}`];
@@ -8517,11 +8648,11 @@ function insertManifestSection(manifest, section, dependencies, present) {
8517
8648
  const first = declarations[0];
8518
8649
  const last = declarations.at(-1);
8519
8650
  if (first === void 0 || last === void 0) {
8520
- const opening = manifest.lastIndexOf("\n", open);
8521
- const level = opening < 0 ? "" : /^\s*/u.exec(manifest.slice(opening + 1, open))?.[0] ?? "";
8522
- const separator = opening < 0 ? "" : `\n${level}${level}`;
8523
- const ending = opening < 0 ? "" : `\n${level}`;
8524
- return `${manifest.slice(0, open + 1)}${lines.map((line) => `${separator}${line}`).join(",")}${ending}${manifest.slice(close)}`;
8651
+ const lineBreak = manifest.lastIndexOf("\n", open);
8652
+ const level = lineBreak < 0 ? "" : /^\s*/u.exec(manifest.slice(lineBreak + 1, open))?.[0] ?? "";
8653
+ const separator = lineBreak < 0 ? "" : `\n${level}${level}`;
8654
+ const suffix = lineBreak < 0 ? "" : `\n${level}`;
8655
+ return `${manifest.slice(0, open + 1)}${lines.map((line) => `${separator}${line}`).join(",")}${suffix}${manifest.slice(close)}`;
8525
8656
  }
8526
8657
  const newline = manifest.lastIndexOf("\n", first.start);
8527
8658
  const indent = newline < 0 ? "" : manifest.slice(newline + 1, first.start);
@@ -8632,10 +8763,10 @@ function replaceManifestScripts(manifest, scripts) {
8632
8763
  }];
8633
8764
  });
8634
8765
  const missing = scripts.filter((script) => !written.has(script.name));
8635
- const opening = manifest.lastIndexOf("\n", start);
8636
- const level = opening < 0 ? "" : /^\s*/u.exec(manifest.slice(opening + 1, start))?.[0] ?? "";
8637
- const emptySeparator = opening < 0 ? "" : `\n${level}${level}`;
8638
- const emptyClosing = opening < 0 ? "" : `\n${level}`;
8766
+ const lineBreak = manifest.lastIndexOf("\n", start);
8767
+ const level = lineBreak < 0 ? "" : /^\s*/u.exec(manifest.slice(lineBreak + 1, start))?.[0] ?? "";
8768
+ const emptySeparator = lineBreak < 0 ? "" : `\n${level}${level}`;
8769
+ const emptySuffix = lineBreak < 0 ? "" : `\n${level}`;
8639
8770
  const tail = start + manifest.slice(start, end - 1).trimEnd().length;
8640
8771
  const newline = first === void 0 ? -1 : manifest.lastIndexOf("\n", first);
8641
8772
  const indent = first === void 0 || newline < 0 ? "" : manifest.slice(newline + 1, first);
@@ -8651,7 +8782,7 @@ function replaceManifestScripts(manifest, scripts) {
8651
8782
  const appended = missing.length === 0 ? [] : first === void 0 ? [{
8652
8783
  start: start + 1,
8653
8784
  end: end - 1,
8654
- text: `${missing.map((script) => `${emptySeparator}${JSON.stringify(script.name)}: ${JSON.stringify(script.command)}`).join(",")}${emptyClosing}`
8785
+ text: `${missing.map((script) => `${emptySeparator}${JSON.stringify(script.name)}: ${JSON.stringify(script.command)}`).join(",")}${emptySuffix}`
8655
8786
  }] : [...Map.groupBy(placements, ({ anchor }) => anchor)].map(([anchor, group]) => ({
8656
8787
  start: anchor,
8657
8788
  end: anchor,
@@ -9122,8 +9253,7 @@ function overridesToQuestions(overrides, artifacts) {
9122
9253
  }] : []];
9123
9254
  });
9124
9255
  }
9125
- //#endregion
9126
- //#region src/core/factories.ts
9256
+ // src/core/factories.ts
9127
9257
  /**
9128
9258
  * Constructs a {@link Blueprint} from a name and the fields that differ from the defaults.
9129
9259
  *
@@ -9200,8 +9330,7 @@ function createBlueprint(name, input) {
9200
9330
  if (blueprint === void 0) throw new ScaffoldError("INVALID", "The filled record is not a blueprint.", { name });
9201
9331
  return blueprint;
9202
9332
  }
9203
- //#endregion
9204
- //#region src/core/Compiler.ts
9333
+ // src/core/Compiler.ts
9205
9334
  /**
9206
9335
  * Represents the compile spine: draft, gate, pin, run in that order over a blueprint.
9207
9336
  *
@@ -9213,7 +9342,7 @@ function createBlueprint(name, input) {
9213
9342
  * records the coded reason beside them; the stages after a failed one never run,
9214
9343
  * so the records stop where the compile stopped.
9215
9344
  *
9216
- * The compile fails closed on one rule: a scaffolding carries a plan exactly
9345
+ * The compile fails closed on one rule: a compile result carries a plan exactly
9217
9346
  * when no question blocks. A refused blueprint is answered rather than raised,
9218
9347
  * so a caller reads the refusal from the value it asked for.
9219
9348
  *
@@ -9238,10 +9367,10 @@ function createBlueprint(name, input) {
9238
9367
  * import { Compiler, createBlueprint } from '@orkestrel/scaffold'
9239
9368
  *
9240
9369
  * const compiler = new Compiler()
9241
- * const scaffolding = compiler.compile(createBlueprint('router', { src: ['core'] }))
9370
+ * const result = compiler.compile(createBlueprint('router', { src: ['core'] }))
9242
9371
  *
9243
- * scaffolding.plan?.artifacts // every planned file, in group order
9244
- * scaffolding.stages // one CompileRecord per stage that ran
9372
+ * result.plan?.artifacts // every planned file, in group order
9373
+ * result.stages // one CompileRecord per stage that ran
9245
9374
  * compiler.destroy()
9246
9375
  * ```
9247
9376
  */
@@ -9278,7 +9407,7 @@ var Compiler = class {
9278
9407
  *
9279
9408
  * @param blueprint - The workspace specification to compile.
9280
9409
  * @param groups - The artifact groups to cover; every group when absent.
9281
- * @returns The scaffolding, carrying a plan only when the gate passed.
9410
+ * @returns The compile result, carrying a plan only when the gate passed.
9282
9411
  * @throws {@link ScaffoldError} coded `INVALID` when an argument is not the
9283
9412
  * exact shape, and `DESTROYED` when the compiler has been torn down.
9284
9413
  *
@@ -9307,10 +9436,10 @@ var Compiler = class {
9307
9436
  compile(blueprint, groups) {
9308
9437
  this.#assertAlive();
9309
9438
  const accepted = this.#accept(blueprint, parseBlueprint, "blueprint");
9310
- const scaffolding = this.#scaffold(accepted, this.#select(groups));
9311
- if (scaffolding.plan === void 0) this.#emitter.emit("block", scaffolding.questions);
9312
- this.#emitter.emit("compile", scaffolding);
9313
- return scaffolding;
9439
+ const result = this.#scaffold(accepted, this.#select(groups));
9440
+ if (result.plan === void 0) this.#emitter.emit("block", result.questions);
9441
+ this.#emitter.emit("compile", result);
9442
+ return result;
9314
9443
  }
9315
9444
  /**
9316
9445
  * Compiles a blueprint and compares its plan to a target's current content.
@@ -9346,11 +9475,11 @@ var Compiler = class {
9346
9475
  this.#assertAlive();
9347
9476
  const accepted = this.#accept(blueprint, parseBlueprint, "blueprint");
9348
9477
  const observed = this.#accept(current, parseSnapshot, "current");
9349
- const scaffolding = this.#scaffold(accepted, this.#select(groups));
9350
- if (scaffolding.plan === void 0) this.#emitter.emit("block", scaffolding.questions);
9478
+ const compiled = this.#scaffold(accepted, this.#select(groups));
9479
+ if (compiled.plan === void 0) this.#emitter.emit("block", compiled.questions);
9351
9480
  const result = {
9352
- findings: scaffolding.plan === void 0 ? [] : planToFindings(scaffolding.plan, observed),
9353
- questions: scaffolding.questions
9481
+ findings: compiled.plan === void 0 ? [] : planToFindings(compiled.plan, observed),
9482
+ questions: compiled.questions
9354
9483
  };
9355
9484
  this.#emitter.emit("audit", result);
9356
9485
  return result;
@@ -9501,7 +9630,6 @@ var Compiler = class {
9501
9630
  return error;
9502
9631
  }
9503
9632
  };
9504
- //#endregion
9505
- export { APP_BROWSER_DEV_DEPENDENCIES, APP_DEV_DEPENDENCIES, APP_MATRIX, APP_SERVER_DEV_DEPENDENCIES, ARTIFACT_TEMPLATES, AXES, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, BIN_ENTRY_PATH, BIN_OUTPUT_PATH, BROWSE_DEV_DEPENDENCIES, BROWSE_UPSTREAM, CANON_PATHS, CATALOG_AGENT_PATH, CATALOG_CLOSING_MARKER, CATALOG_OPENING_MARKER, CONFIG_TEMPLATES, CONFORMANCE_TEST_PATH, CONTROL_CHARACTER_PATTERN, Compiler, DECLARATION_DEV_DEPENDENCIES, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, DISTRIBUTION_SETUP_PATH, DISTRIBUTION_TEST_PATH, ENGINES_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, EXTRA_RANGE_PATTERN, FLOOR_RANGE_PATTERN, FOREIGN_NAME_PATTERN, FRAMEWORKS, FRAMEWORK_MATRIX, GLOBAL_SETUP_PATH, GROUPS, GUIDES_TEST_PATH, HEX_PATTERN, HOST_INVENTORY_PATH, HOST_PATHS, INTEGRATION_TEST_PATH, INVALID_PATH_CHARACTER_PATTERN, JOURNEY_CONFIG_PATH, MANIFEST_PATH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_AUDIT_FINDINGS, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_REGISTRY_BYTES, MAX_SCRIPT_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, MAX_TOTAL_REGISTRY_BYTES, MINIMUM_NODE_VERSION, MINIMUM_NPM_VERSION, NAME_PATTERN, ORCHESTRATION_PATH_NAMES, ORCHESTRATION_PATH_PREFIXES, ORKESTREL_RANGE_PATTERN, PRINT_WIDTH, REFERENCE_PATHS, RELEASE_PROOF_COMMAND, RESERVED_SHEET_NAMES, SEED_GUIDE_PATHS, SERVICE_SCRIPT_PATH, SERVICE_SETUP_PATH, SERVICE_TEST_INCLUDE, SHEET_ENTRY_NAME, SHOWCASE_CONFIG_PATH, SHOWCASE_DEV_DEPENDENCIES, SHOWCASE_OVERRIDES, SHOWCASE_PAGES_PATH, SKILLS_CONFIG_PATH, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, STUDIES_TEST_INCLUDE, STYLES_DEV_DEPENDENCIES, STYLES_ENTRY_PATH, SURFACES, ScaffoldError, TAB_WIDTH, TARGET_SKILL_NAMES, THEMES_BARREL_PATH, THEMES_ENTRY_PATH, TREE_TEST_PATH, VERSION_PATTERN, WORKSPACE_DEV_ENGINES, WORKSPACE_OWNED_PATHS, applyOverrides, artifactToFinding, artifactToHex, artifactsToQuestions, blueprintToConfigArtifacts, blueprintToDevDependencies, blueprintToDocumentArtifacts, blueprintToExports, blueprintToFaces, blueprintToGuideArtifacts, blueprintToHostArtifacts, blueprintToMachinery, blueprintToManifest, blueprintToManifestOverrides, blueprintToOptimizedDependencies, blueprintToOrchestrationArtifacts, blueprintToProjects, blueprintToQuestions, blueprintToRootTsconfig, blueprintToRootVite, blueprintToScripts, blueprintToSheets, blueprintToSourceArtifacts, blueprintToTestArtifacts, blueprintToWritableScripts, bytesToHex, catalogToLayers, cloneValue, compareVersions, computeBytes, computeHash, computeTotal, contentToHex, createBlueprint, dependenciesToQuestions, extractRangeMajor, extractVersion, inferDrift, inferGroup, insertManifestDependencies, insertManifestSection, isArtifact, isAudit, isBlueprint, isBrowserExtension, isCanonPath, isCatalogEntry, isCollection, isCompilerHooks, isCompilerOptions, isContent, isDeferredPath, isDependency, isDependencyName, isEnvironment, isExtension, isFinding, isFloorPath, isGroup, isGroups, isHex, isManifestScript, isMirror, isOverride, isPath, isPlan, isQuestion, isRetainedPath, isScaffoldError, isSheetName, isSnapshot, isStylesExtension, isSurface, iterateAnswers, manifestToDependencies, manifestToName, matchesDriftReachability, matchesEngines, matchesOrchestrationPath, matchesPrintWidth, matchesRange, nameToGuide, overridesToQuestions, parseBlueprint, parseCompilerOptions, parseExtension, parseGroups, parseSnapshot, pathToCondition, planToFindings, planToHash, planToSummary, renderSkillPointer, replaceManifestOverride, replaceManifestOverrides, replaceManifestRanges, replaceManifestScripts, replacePlanRanges, scanManifestTokens, selectGroups, selectHostPaths, serializeTypeScriptString, srcToEntry, srcToExports, srcToRoot };
9633
+ export { APP_BROWSER_DEV_DEPENDENCIES, APP_DEV_DEPENDENCIES, APP_MATRIX, APP_SERVER_DEV_DEPENDENCIES, ARTIFACT_TEMPLATES, AXES, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, BIN_ENTRY_PATH, BIN_OUTPUT_PATH, BROWSE_DEV_DEPENDENCIES, BROWSE_UPSTREAM, CANON_PATHS, CAPTURE_DEV_DEPENDENCIES, CAPTURE_UPSTREAM, CATALOG_AGENT_PATH, CATALOG_END_MARKER, CATALOG_START_MARKER, CONFIG_TEMPLATES, CONFORMANCE_TEST_PATH, CONTROL_CHARACTER_PATTERN, Compiler, DECLARATION_DEV_DEPENDENCIES, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, DISTRIBUTION_SETUP_PATH, DISTRIBUTION_TEST_PATH, ENGINES_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, EXTRA_RANGE_PATTERN, FLOOR_RANGE_PATTERN, FOREIGN_NAME_PATTERN, FRAMEWORKS, FRAMEWORK_MATRIX, GLOBAL_SETUP_PATH, GROUPS, GUIDES_TEST_PATH, HEX_PATTERN, HOST_INVENTORY_PATH, HOST_PATHS, INTEGRATION_TEST_PATH, INVALID_PATH_CHARACTER_PATTERN, JOURNEY_CONFIG_PATH, MANIFEST_PATH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_AUDIT_FINDINGS, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_REGISTRY_BYTES, MAX_SCRIPT_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, MAX_TOTAL_REGISTRY_BYTES, MINIMUM_NODE_VERSION, MINIMUM_NPM_VERSION, NAME_PATTERN, ORCHESTRATION_PATH_NAMES, ORCHESTRATION_PATH_PREFIXES, ORKESTREL_RANGE_PATTERN, PRINT_WIDTH, REFERENCE_PATHS, RELEASE_PROOF_COMMAND, RESERVED_SHEET_NAMES, SEED_GUIDE_PATHS, SERVICE_SCRIPT_PATH, SERVICE_SETUP_PATH, SERVICE_TEST_INCLUDE, SHEET_ENTRY_NAME, SHOWCASE_CONFIG_PATH, SHOWCASE_DEV_DEPENDENCIES, SHOWCASE_OVERRIDES, SHOWCASE_PAGES_PATH, SKILLS_CONFIG_PATH, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, STUDIES_TEST_INCLUDE, STYLES_DEV_DEPENDENCIES, STYLES_ENTRY_PATH, SURFACES, ScaffoldError, TAB_WIDTH, TARGET_SKILL_NAMES, THEMES_BARREL_PATH, THEMES_ENTRY_PATH, TOOLCHAIN_HOLDS, TREE_TEST_PATH, VERSION_PATTERN, WORKSPACE_DEV_ENGINES, WORKSPACE_OWNED_PATHS, applyOverrides, artifactToFinding, artifactToHex, artifactsToQuestions, blueprintToConfigArtifacts, blueprintToDevDependencies, blueprintToDocumentArtifacts, blueprintToExports, blueprintToFaces, blueprintToGuideArtifacts, blueprintToHostArtifacts, blueprintToMachinery, blueprintToManifest, blueprintToManifestOverrides, blueprintToOptimizedDependencies, blueprintToOrchestrationArtifacts, blueprintToProjects, blueprintToQuestions, blueprintToRootTsconfig, blueprintToRootVite, blueprintToScripts, blueprintToSheets, blueprintToSourceArtifacts, blueprintToTestArtifacts, blueprintToToolchainHolds, blueprintToWritableScripts, bytesToHex, catalogToLayers, cloneValue, compareVersions, computeBytes, computeHash, computeTotal, contentToHex, createBlueprint, dependenciesToQuestions, extractRangeMajor, extractVersion, inferDrift, inferGroup, insertManifestDependencies, insertManifestSection, isArtifact, isAudit, isBlueprint, isBrowserExtension, isCanonPath, isCatalogEntry, isCollection, isCompilerHooks, isCompilerOptions, isContent, isDeferredPath, isDependency, isDependencyName, isEnvironment, isExtension, isFinding, isFloorPath, isGroup, isGroups, isHex, isManifestScript, isMirror, isOverride, isPath, isPlan, isQuestion, isRetainedPath, isScaffoldError, isSheetName, isSnapshot, isStylesExtension, isSurface, iterateAnswers, manifestToDependencies, manifestToName, matchesDriftReachability, matchesEngines, matchesOrchestrationPath, matchesPrintWidth, matchesRange, nameToGuide, overridesToQuestions, parseBlueprint, parseCompilerOptions, parseExtension, parseGroups, parseSnapshot, pathToCondition, planToFindings, planToHash, planToSummary, renderSkillPointer, replaceManifestOverride, replaceManifestOverrides, replaceManifestRanges, replaceManifestScripts, replacePlanRanges, scanManifestTokens, selectGroups, selectHostPaths, serializeTypeScriptString, srcToEntry, srcToExports, srcToRoot };
9506
9634
 
9507
9635
  //# sourceMappingURL=index.js.map