@orkestrel/scaffold 0.0.43 → 0.0.45

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 (66) hide show
  1. package/README.md +10 -10
  2. package/dist/bin/main.js +40 -43
  3. package/dist/bin/main.js.map +1 -1
  4. package/dist/host/AGENTS.md +7 -2
  5. package/dist/host/agents/orchestration.md +232 -56
  6. package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +7 -7
  7. package/dist/host/agents/skills/enterprise-bootstrap/references/bootstrap-reference.md +11 -9
  8. package/dist/host/agents/skills/enterprise-bootstrap/references/components.md +3 -3
  9. package/dist/host/agents/skills/enterprise-bootstrap/references/frontend-design.md +3 -3
  10. package/dist/host/agents/skills/enterprise-bootstrap/references/utilities.md +1 -1
  11. package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +1 -1
  12. package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +2 -2
  13. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +1 -1
  14. package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +2 -2
  15. package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +8 -8
  16. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +16 -14
  17. package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +3 -3
  18. package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +14 -14
  19. package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +1 -1
  20. package/dist/host/agents/skills/orkestrel-human-journey/SKILL.md +3 -3
  21. package/dist/host/agents/skills/orkestrel-human-journey/references/captures.md +3 -3
  22. package/dist/host/agents/skills/orkestrel-human-journey/references/layer.md +3 -3
  23. package/dist/host/agents/skills/orkestrel-polish-surface/SKILL.md +3 -3
  24. package/dist/host/claude/agents/analyst.md +2 -2
  25. package/dist/host/claude/agents/checker.md +2 -2
  26. package/dist/host/claude/agents/codex.md +5 -5
  27. package/dist/host/claude/agents/orkestrel.md +9 -8
  28. package/dist/host/claude/agents/planner.md +1 -1
  29. package/dist/host/claude/agents/researcher.md +2 -2
  30. package/dist/host/claude/agents/reviewer.md +1 -1
  31. package/dist/host/claude/agents/scout.md +2 -2
  32. package/dist/host/claude/agents/sol.md +3 -3
  33. package/dist/host/claude/agents/verifier.md +8 -0
  34. package/dist/host/claude/rules/application.md +7 -7
  35. package/dist/host/claude/rules/architecture.md +6 -6
  36. package/dist/host/claude/rules/documentation.md +1 -0
  37. package/dist/host/claude/rules/patterns.md +3 -3
  38. package/dist/host/claude/rules/quality.md +3 -3
  39. package/dist/host/claude/rules/tests.md +9 -2
  40. package/dist/host/claude/rules/workspace.md +7 -7
  41. package/dist/host/claude/rules/writing.md +12 -2
  42. package/dist/host/codex/agents/planner.toml +1 -1
  43. package/dist/host/configs/helpers.ts +21 -1
  44. package/dist/host/cursor/rules/orchestration.mdc +1 -1
  45. package/dist/host/dotfiles/gitignore +4 -1
  46. package/dist/host/guides/scaffold.md +134 -119
  47. package/dist/host/scripts/codex.sh +0 -0
  48. package/dist/host/scripts/cursor.sh +0 -0
  49. package/dist/host/scripts/deps.sh +0 -0
  50. package/dist/host/scripts/ollama.sh +0 -0
  51. package/dist/host/tests/config.test.ts +40 -1
  52. package/dist/host/tests/policy.test.ts +2 -2
  53. package/dist/host/tests/setupPolicy.ts +8 -5
  54. package/dist/src/core/index.cjs +143 -149
  55. package/dist/src/core/index.cjs.map +1 -1
  56. package/dist/src/core/index.d.cts +1624 -1643
  57. package/dist/src/core/index.d.ts +1624 -1643
  58. package/dist/src/core/index.js +144 -149
  59. package/dist/src/core/index.js.map +1 -1
  60. package/dist/src/server/index.cjs +82 -97
  61. package/dist/src/server/index.cjs.map +1 -1
  62. package/dist/src/server/index.d.cts +1844 -1871
  63. package/dist/src/server/index.d.ts +1844 -1871
  64. package/dist/src/server/index.js +83 -96
  65. package/dist/src/server/index.js.map +1 -1
  66. package/package.json +3 -2
@@ -4,7 +4,7 @@ let _orkestrel_template = require("@orkestrel/template");
4
4
  let _orkestrel_emitter = require("@orkestrel/emitter");
5
5
  //#region src/core/constants.ts
6
6
  /**
7
- * The three `Environment` values, frozen.
7
+ * The `Environment` values, frozen.
8
8
  *
9
9
  * @remarks
10
10
  * A blueprint's `src` and `app` axes are caller-supplied, so the gate measures
@@ -18,7 +18,7 @@ var ENVIRONMENTS = Object.freeze([
18
18
  "server"
19
19
  ]);
20
20
  /**
21
- * The seven `Group` values in plan order, frozen.
21
+ * The `Group` values in plan order, frozen.
22
22
  *
23
23
  * @remarks
24
24
  * A compile that names no groups covers every one of them, so this list is the
@@ -70,7 +70,7 @@ var SRC_MATRIX = Object.freeze({
70
70
  * @remarks
71
71
  * An application environment declares no exports, so it carries a runtime
72
72
  * entry instead of a subpath and formats. Core carries none because it is
73
- * shared logic the other two import rather than a host that runs.
73
+ * shared logic the other environments import rather than a host that runs.
74
74
  */
75
75
  var APP_MATRIX = Object.freeze({
76
76
  core: Object.freeze({
@@ -98,8 +98,8 @@ var BIN_ENTRY_PATH = "src/bin/main.ts";
98
98
  * @remarks
99
99
  * These are the files the fleet shares verbatim: the root instruction
100
100
  * documents, the licence, the canonical orchestration contract every harness
101
- * bridge points at, the four harness directories, the session hook scripts,
102
- * the shared policy register, the byte-identical root dotfiles, and the two
101
+ * bridge points at, the harness directories, the session hook scripts,
102
+ * the shared policy register, the byte-identical root dotfiles, and the
103
103
  * guide mirrors a generated workspace starts from. A directory entry vendors
104
104
  * everything beneath it.
105
105
  *
@@ -245,7 +245,7 @@ var DEPENDENCY_NAME_PATTERN = /^@orkestrel\/[a-z][a-z0-9-]*$/;
245
245
  * is admitted, so the shape cannot express a traversal.
246
246
  */
247
247
  var FOREIGN_NAME_PATTERN = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/;
248
- /** The exact three-component version syntax a blueprint declares. */
248
+ /** The exact `major.minor.patch` version syntax a blueprint declares. */
249
249
  var VERSION_PATTERN = /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/;
250
250
  /**
251
251
  * The exact caret-pinned pre-1.0 range accepted for an `@orkestrel/*` runtime dependency.
@@ -260,7 +260,7 @@ var ORKESTREL_RANGE_PATTERN = /^\^0\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/;
260
260
  /** The registry-only semver subset accepted for a development extra's range. */
261
261
  var EXTRA_RANGE_PATTERN = /^(?:\^|~)?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*))*)?$/;
262
262
  /**
263
- * The exact three-component floor accepted for a foreign peer's range.
263
+ * The exact `major.minor.patch` floor accepted for a foreign peer's range.
264
264
  *
265
265
  * @remarks
266
266
  * This is independent from {@link ENGINES_PATTERN}. An engine floors the Node
@@ -315,14 +315,14 @@ var DEFAULT_ENGINES = `>=${MINIMUM_NODE_VERSION}`;
315
315
  /** The tooling versions scaffold and every generated workspace share. */
316
316
  var BASE_DEV_DEPENDENCIES = Object.freeze({
317
317
  "@orkestrel/guide": "^0.0.12",
318
- "@orkestrel/scaffold": "^0.0.43",
318
+ "@orkestrel/scaffold": "^0.0.45",
319
319
  "@orkestrel/test": "^0.0.7",
320
320
  "@types/node": "^26.2.0",
321
- oxfmt: "^0.62.0",
322
- oxlint: "^1.77.0",
321
+ oxfmt: "^0.64.0",
322
+ oxlint: "^1.79.0",
323
323
  typescript: "^6.0.3",
324
- vite: "~8.2.0",
325
- vitest: "^4.1.10"
324
+ vite: "~8.2.1",
325
+ vitest: "^4.1.11"
326
326
  });
327
327
  /** The development dependencies that emit declarations for published source or an executable. */
328
328
  var DECLARATION_DEV_DEPENDENCIES = Object.freeze({
@@ -331,7 +331,7 @@ var DECLARATION_DEV_DEPENDENCIES = Object.freeze({
331
331
  });
332
332
  /** The development dependencies a published browser `src` environment adds. */
333
333
  var SOURCE_BROWSER_DEV_DEPENDENCIES = Object.freeze({
334
- "@vitest/browser-playwright": "^4.1.10",
334
+ "@vitest/browser-playwright": "^4.1.11",
335
335
  playwright: "^1.62.1"
336
336
  });
337
337
  /** The development dependency every private `app` environment adds. */
@@ -358,9 +358,9 @@ var SHOWCASE_DEV_DEPENDENCIES = Object.freeze({ "vite-plugin-singlefile": "^2.3.
358
358
  /** The development dependencies a private server application adds. */
359
359
  var APP_SERVER_DEV_DEPENDENCIES = Object.freeze({
360
360
  "@orkestrel/emitter": "^0.0.7",
361
- "@orkestrel/middleware": "^0.0.13",
361
+ "@orkestrel/middleware": "^0.0.16",
362
362
  "@orkestrel/router": "^0.0.10",
363
- "@orkestrel/server": "^0.0.13"
363
+ "@orkestrel/server": "^0.0.14"
364
364
  });
365
365
  //#endregion
366
366
  //#region src/core/templates.ts
@@ -462,6 +462,7 @@ const resolve = {
462
462
  emptyOutDir: true,
463
463
  sourcemap: true,
464
464
  minify: false,
465
+ rolldownOptions: { onLog: enforceBuildLog },
465
466
  },
466
467
  test: {
467
468
  name: { label: 'src:core', color: 'magenta' },
@@ -491,6 +492,7 @@ const resolve = {
491
492
  },
492
493
  outDir: 'dist/src/browser',
493
494
  rolldownOptions: {
495
+ onLog: enforceBuildLog,
494
496
  {{external}}
495
497
  {{output}}
496
498
  },
@@ -529,6 +531,7 @@ const resolve = {
529
531
  outDir: 'dist/src/server',
530
532
  target: 'node22',
531
533
  rolldownOptions: {
534
+ onLog: enforceBuildLog,
532
535
  platform: 'node',
533
536
  {{external}}
534
537
  {{output}}
@@ -563,6 +566,7 @@ const resolve = {
563
566
  outDir: 'dist/bin',
564
567
  target: 'node22',
565
568
  rolldownOptions: {
569
+ onLog: enforceBuildLog,
566
570
  external: (id: string) =>
567
571
  id.startsWith('node:') ||
568
572
  id.startsWith('@orkestrel/') ||
@@ -613,7 +617,10 @@ const resolve = {
613
617
  build: {
614
618
  {{showcaseBuild}} emptyOutDir: true,
615
619
  outDir: resolveWorkspacePath(output),
616
- rolldownOptions: { input: resolveWorkspacePath('app/browser/index.html') },
620
+ rolldownOptions: {
621
+ onLog: enforceBuildLog,
622
+ input: resolveWorkspacePath('app/browser/index.html'),
623
+ },
617
624
  },
618
625
  test: {
619
626
  name: { label: 'app:browser', color: 'blue' },
@@ -650,7 +657,10 @@ export function appBrowser(): UserConfig {
650
657
  },
651
658
  outDir: resolveWorkspacePath('dist/app/server'),
652
659
  target: 'node22',
653
- rolldownOptions: { external: (id: string) => id.startsWith('node:') },
660
+ rolldownOptions: {
661
+ onLog: enforceBuildLog,
662
+ external: (id: string) => id.startsWith('node:'),
663
+ },
654
664
  },
655
665
  test: {
656
666
  name: { label: 'app:server', color: 'green' },
@@ -1034,7 +1044,7 @@ export default defineConfig(
1034
1044
  import { srcBin } from '../../vite.config.ts'
1035
1045
 
1036
1046
  // The \`scaffold\` executable build — a single ESM lib file, no declarations (an
1037
- // executable ships no types), with the \`#!/usr/bin/env node\` shebang re-emitted via
1047
+ // executable ships no types), with the \`#!/usr/bin/env node\` shebang re-emitted through
1038
1048
  // \`output.banner\` (rolldown strips shebangs from source during bundling), and
1039
1049
  // \`output.paths\` rewriting the externalized \`@src/*\` specifiers to the built sibling
1040
1050
  // src environments (relative to \`dist/bin/\`), so the emitted bin resolves at runtime.
@@ -1286,7 +1296,7 @@ export function resolveBundledBrowser(platform: NodeJS.Platform, root: string):
1286
1296
  /**
1287
1297
  * Resolve the first installed stable system Chromium channel.
1288
1298
  *
1289
- * @param platform - The Node platform whose standard layouts should be probed.
1299
+ * @param platform - The Node platform whose standard layouts this call probes.
1290
1300
  * @param environment - The process environment supplying Windows installation roots.
1291
1301
  * @returns \`chrome\`, then \`msedge\`, or \`undefined\` when neither is executable.
1292
1302
  *
@@ -1331,7 +1341,7 @@ export function resolveSystemBrowser(
1331
1341
  * Resolve Playwright provider options for whatever browser this host can actually launch.
1332
1342
  *
1333
1343
  * @param pinned - The executable path for Playwright's pinned Chromium revision, when it has one.
1334
- * @param platform - The Node platform whose standard layouts should be probed.
1344
+ * @param platform - The Node platform whose standard layouts this call probes.
1335
1345
  * @param environment - The process environment supplying operator overrides and Windows roots.
1336
1346
  * @param root - The managed-container bundled browsers directory to search.
1337
1347
  * @returns Provider options naming an executable, a WebSocket endpoint, or a channel.
@@ -1340,7 +1350,7 @@ export function resolveSystemBrowser(
1340
1350
  * Precedence, most important first: \`PLAYWRIGHT_EXECUTABLE_PATH\`, \`PLAYWRIGHT_WS_ENDPOINT\`,
1341
1351
  * \`PLAYWRIGHT_CHANNEL\`, the managed Playwright Chromium, the container's bundled Chromium, a
1342
1352
  * verified system channel, then the platform default channel. An operator override outranks
1343
- * discovery and is returned exactly as given: none of those three environment values is checked
1353
+ * discovery and is returned exactly as given: none of those environment values is checked
1344
1354
  * against the filesystem, because verifying an override would defeat the override. The pinned
1345
1355
  * managed revision outranks anything found on the host because it is deterministic. The installed
1346
1356
  * pinned revision returns empty options so Playwright keeps its own default launch semantics. Only
@@ -1617,7 +1627,7 @@ var isHex = (0, _orkestrel_contract.stringOf)({
1617
1627
  * The bound is a code-unit ceiling rather than a byte count, because a string
1618
1628
  * of more code units than {@link MAX_ARTIFACT_BYTES} cannot encode within that
1619
1629
  * budget under any encoding this package writes. The exact UTF-8 measurement
1620
- * belongs to the compiler and the writer, which are the two places the bytes
1630
+ * belongs to the compiler and the writer, which are the places the bytes
1621
1631
  * are actually produced.
1622
1632
  */
1623
1633
  var isContent = (0, _orkestrel_contract.stringOf)({ max: MAX_ARTIFACT_BYTES });
@@ -1890,7 +1900,7 @@ var isFinding = (0, _orkestrel_contract.unionOf)((0, _orkestrel_contract.recordO
1890
1900
  *
1891
1901
  * @remarks
1892
1902
  * An audit reaches the writer and the destructive verb, so it is guarded as
1893
- * strictly as the plan beside it. Findings use the sum of the two producer
1903
+ * strictly as the plan beside it. Findings use the sum of the producer
1894
1904
  * bounds: one per planned artifact, then one per unplanned snapshot path.
1895
1905
  */
1896
1906
  var isAudit = (0, _orkestrel_contract.recordOf)({
@@ -1902,7 +1912,7 @@ var isAudit = (0, _orkestrel_contract.recordOf)({
1902
1912
  *
1903
1913
  * @remarks
1904
1914
  * `content` is the fetched guide text and `observed` is the local mirror's
1905
- * exact bytes, so the two carry different laws: one is content this package
1915
+ * exact bytes, so they carry different laws: one is content this package
1906
1916
  * writes, the other is the precondition that write is held to.
1907
1917
  */
1908
1918
  var isMirror = (0, _orkestrel_contract.unionOf)((0, _orkestrel_contract.recordOf)({
@@ -2269,7 +2279,7 @@ function matchesOrchestrationPath(path) {
2269
2279
  * @returns The group that owns the path.
2270
2280
  *
2271
2281
  * @remarks
2272
- * A path is grouped by what it governs rather than by where it sits. The two
2282
+ * A path is grouped by what it governs rather than by where it sits. The
2273
2283
  * manifest files are named exactly; anything
2274
2284
  * {@link matchesOrchestrationPath} accepts is orchestration; `src` and `app`
2275
2285
  * are source; `tests`, `guides`, and `docs` carry their own names; the licence
@@ -2401,7 +2411,7 @@ function matchesPrintWidth(line) {
2401
2411
  * module's own relative depth, so a nested module emits a path that escapes
2402
2412
  * `dist/src` and a flat one resolves only by luck. Both faces rewrite the same
2403
2413
  * relative core path to the package's published root export, so the branch is
2404
- * derived once here. The extension alternation is what the two permitted import
2414
+ * derived once here. The extension alternation is what the permitted import
2405
2415
  * spellings produce: an `@src/core` alias resolves to the core source module and
2406
2416
  * prints `.ts`, while a relative import prints the `.js` specifier it was
2407
2417
  * written with. The formatter keeps the call on one line only while the line it
@@ -2581,8 +2591,8 @@ function matchesDriftReachability(ownership, finding) {
2581
2591
  *
2582
2592
  * The order matters because these packages are `0.0.x`, where a caret pins one
2583
2593
  * exact release. Publishing a dependent before its dependency leaves the
2584
- * dependent pinned to the older release, and two ranges that disagree install
2585
- * two copies of one package that the compiler reads as two distinct types.
2594
+ * dependent pinned to the older release, and ranges that disagree install
2595
+ * duplicate copies of one package that the compiler reads as distinct types.
2586
2596
  *
2587
2597
  * A cycle cannot be published in rounds, so its members are omitted rather than
2588
2598
  * placed in an order that would be wrong. An absent name is the report: compare
@@ -2651,11 +2661,11 @@ function planToSummary(plan) {
2651
2661
  };
2652
2662
  }
2653
2663
  /**
2654
- * Extract the three numeric components of an exact version.
2664
+ * Extract the major, minor, and patch components of an exact version.
2655
2665
  *
2656
2666
  * @param version - The candidate version text.
2657
2667
  * @returns The major, minor, and patch numbers, or `undefined` when the text is
2658
- * not the exact three-component syntax.
2668
+ * not the exact `major.minor.patch` syntax.
2659
2669
  *
2660
2670
  * @remarks
2661
2671
  * Deliberately narrow: a prerelease or build suffix is not extracted, because
@@ -2725,10 +2735,10 @@ function compareVersions(left, right) {
2725
2735
  * @remarks
2726
2736
  * The one place this comparison is made. A `Release` records the declared range
2727
2737
  * and the reported version and stores no verdict beside them, because a stored
2728
- * verdict could only disagree with the two fields it sits next to.
2738
+ * verdict could only disagree with the fields it sits next to.
2729
2739
  *
2730
2740
  * Readability is decided first, and it is `EXTRA_RANGE_PATTERN`: an optional
2731
- * caret or tilde over three numeric components and an optional prerelease
2741
+ * caret or tilde over `major.minor.patch` and an optional prerelease
2732
2742
  * suffix. That pattern already covers every `ORKESTREL_RANGE_PATTERN` range and
2733
2743
  * every `VERSION_PATTERN` version, so the subset is stated once rather than
2734
2744
  * assembled here. Text outside it is never admitted, including text handed in on
@@ -3035,7 +3045,7 @@ function srcToExports(src) {
3035
3045
  * not installed by the workspace that declares it and developing against one
3036
3046
  * requires it present. A runtime dependency is the opposite case and is removed:
3037
3047
  * it is already installed, so a second declaration would state one fact twice
3038
- * and the two ranges would be free to disagree.
3048
+ * and the ranges would be free to disagree.
3039
3049
  *
3040
3050
  * A workspace never declares itself, so its own package name is removed. That
3041
3051
  * matters for a workspace named after a package the baseline already carries:
@@ -3219,7 +3229,7 @@ function blueprintToScripts(blueprint) {
3219
3229
  * artifact serialized directly.
3220
3230
  *
3221
3231
  * The artifact carrying this text is claimed by birth. A workspace owns its own
3222
- * manifest once it exists: its description, its keywords, and any script it
3232
+ * manifest after it exists: its description, its keywords, and any script it
3223
3233
  * added are the consumer's, so a repair that replaced the file would take them.
3224
3234
  * The one part scaffold keeps current afterwards is the declared `@orkestrel/*`
3225
3235
  * range set, and that is a region with its own writer rather than a claim over
@@ -3289,7 +3299,7 @@ function blueprintToManifest(blueprint) {
3289
3299
  * Derive the host-specific machinery a generated root Vite configuration carries.
3290
3300
  *
3291
3301
  * @param blueprint - The workspace specification.
3292
- * @returns The four pipelines the generated configuration selects.
3302
+ * @returns The pipelines the generated configuration selects.
3293
3303
  *
3294
3304
  * @remarks
3295
3305
  * The sole derivation of that set: every renderer reads it rather than
@@ -3520,11 +3530,15 @@ export function appShowcase(): UserConfig {
3520
3530
  ${projects.map((project) => `\t\t\t${project},`).join("\n")}
3521
3531
  \t],`;
3522
3532
  const body = `${factories.join("\n")}\n`;
3523
- const boundaries = ["environmentBoundary", "outputBoundary"].filter((boundary) => body.includes(boundary));
3533
+ const helpers = [
3534
+ "enforceBuildLog",
3535
+ "environmentBoundary",
3536
+ "outputBoundary"
3537
+ ].filter((helper) => body.includes(helper));
3524
3538
  return (0, _orkestrel_template.fillTemplate)(CONFIG_TEMPLATES.root.vite, {
3525
3539
  viteTypes: machinery.showcase ? "PluginOption, UserConfig" : "UserConfig",
3526
3540
  imports: imports.length === 0 ? "" : `${imports.join("\n")}\n`,
3527
- helpers: boundaries.length === 0 ? "" : `import { ${boundaries.join(", ")} } from './configs/helpers.js'\n`,
3541
+ helpers: helpers.length === 0 ? "" : `import { ${helpers.join(", ")} } from './configs/helpers.js'\n`,
3528
3542
  browsers: machinery.browser ? "import { resolveBrowser, resolvePinnedBrowser } from './configs/browsers.js'\n" : "",
3529
3543
  options: machinery.browser ? "const browserOptions = resolveBrowser(resolvePinnedBrowser(), process.platform, process.env)\n\n" : "",
3530
3544
  factories: body,
@@ -3649,7 +3663,7 @@ ${paths.join("\n")}
3649
3663
  *
3650
3664
  * @remarks
3651
3665
  * The barrels and every runtime entry intentionally hold nothing. A generated
3652
- * sample entity is too easy to mistake for package implementation, so the
3666
+ * sample entity would read as package implementation, so the
3653
3667
  * scaffold establishes only the selected environment boundaries. An application
3654
3668
  * entry is empty for the same reason the bin entry is, and because the vendored
3655
3669
  * lint config refuses an unassigned import outside a stylesheet, so the entry
@@ -4019,9 +4033,9 @@ function applyOverrides(artifacts, overrides) {
4019
4033
  *
4020
4034
  * @example
4021
4035
  * ```ts
4022
- * import { createBlueprint, createCompiler, planToHash } from '@orkestrel/scaffold'
4036
+ * import { Compiler, createBlueprint, planToHash } from '@orkestrel/scaffold'
4023
4037
  *
4024
- * const { plan } = createCompiler().compile(createBlueprint('router', { src: ['core'] }))
4038
+ * const { plan } = new Compiler().compile(createBlueprint('router', { src: ['core'] }))
4025
4039
  *
4026
4040
  * plan === undefined ? undefined : planToHash(plan)?.length // 16
4027
4041
  * ```
@@ -4050,7 +4064,7 @@ function planToHash(plan) {
4050
4064
  * destination has no bytes to record, and every other verdict records the bytes
4051
4065
  * it was given, which is the precondition the mutation that follows is held to.
4052
4066
  * Ownership is copied rather than inferred from drift because aligned findings
4053
- * span all three ownership tiers.
4067
+ * span every ownership tier.
4054
4068
  *
4055
4069
  * `foreign` is not answerable here, because it describes a path no artifact was
4056
4070
  * planned for.
@@ -4113,9 +4127,9 @@ function artifactToFinding(artifact, observed) {
4113
4127
  *
4114
4128
  * @example
4115
4129
  * ```ts
4116
- * import { createBlueprint, createCompiler, planToFindings } from '@orkestrel/scaffold'
4130
+ * import { Compiler, createBlueprint, planToFindings } from '@orkestrel/scaffold'
4117
4131
  *
4118
- * const { plan } = createCompiler().compile(createBlueprint('router', { src: ['core'] }))
4132
+ * const { plan } = new Compiler().compile(createBlueprint('router', { src: ['core'] }))
4119
4133
  *
4120
4134
  * plan === undefined ? [] : planToFindings(plan, { 'AGENTS.md': '68690a' })
4121
4135
  * ```
@@ -4151,7 +4165,7 @@ function planToFindings(plan, current) {
4151
4165
  * range, in list order.
4152
4166
  *
4153
4167
  * @remarks
4154
- * The declared lists and peer partitions differ only in the two syntaxes they
4168
+ * The declared lists and peer partitions differ only in the syntaxes they
4155
4169
  * accept, so the rules live here once and each caller supplies its own patterns.
4156
4170
  * A runtime dependency name reaches a path through its guide mirror and is
4157
4171
  * fixed to the `@orkestrel` scope. A foreign peer or development extra reaches
@@ -4208,14 +4222,14 @@ function dependenciesToQuestions(dependencies, field, name, range) {
4208
4222
  * Only the laws a blueprint answers alone are here. The structural record and
4209
4223
  * its bounds are already settled by `isBlueprint`, which refuses a value that is
4210
4224
  * not a blueprint at all; what remains is the syntax of a name, a version, a
4211
- * range, and an engines floor, the combinations the two environment axes admit,
4212
- * and the overlaps between the three declared package lists. The laws that need
4225
+ * range, and an engines floor, the combinations the environment axes admit,
4226
+ * and the overlaps between the declared package lists. The laws that need
4213
4227
  * a drafted plan belong to {@link artifactsToQuestions} and
4214
4228
  * {@link overridesToQuestions}.
4215
4229
  *
4216
4230
  * A question blocks when it describes a workspace this package cannot generate.
4217
- * Three do not, because each describes a workspace it can describe honestly and
4218
- * should not create: a published axis of several environments without core,
4231
+ * These do not, because each describes a workspace it can describe honestly but
4232
+ * will not create: a published axis of several environments without core,
4219
4233
  * whose manifest names a core build the workspace never runs; a showcase flag
4220
4234
  * whose required browser axis is absent, which emits nothing; and an
4221
4235
  * integration flag over fewer than two environments, whose seed does emit and
@@ -4462,6 +4476,72 @@ function overridesToQuestions(overrides, artifacts) {
4462
4476
  return questions;
4463
4477
  }
4464
4478
  //#endregion
4479
+ //#region src/core/factories.ts
4480
+ /**
4481
+ * Construct a {@link Blueprint} from a name and the fields that differ from the defaults.
4482
+ *
4483
+ * @param name - The bare workspace name.
4484
+ * @param input - The fields to set; every omitted field takes its default.
4485
+ * @returns The filled blueprint, owned by the caller and sharing nothing with `input`.
4486
+ * @throws {@link ScaffoldError} coded `INVALID` when the filled record is not a
4487
+ * blueprint.
4488
+ *
4489
+ * @remarks
4490
+ * A blueprint is a closed record, and most of its fields have one sensible
4491
+ * starting value: an empty list, a cleared flag, `DEFAULT_VERSION`, and
4492
+ * `DEFAULT_ENGINES`. Filling them here is what lets a caller state only what its
4493
+ * workspace actually declares.
4494
+ *
4495
+ * This is the construction door, and {@link parseBlueprint} is the coercing one.
4496
+ * They differ in every part: this fills the defaults and takes a
4497
+ * partial specification, where the parser fills nothing and takes an untrusted
4498
+ * value; and this refuses by throwing, where the parser refuses by answering
4499
+ * `undefined`. What they share is the law — both accept exactly what
4500
+ * `isBlueprint` accepts.
4501
+ *
4502
+ * That law is structural only. Whether the name is a name, the version a
4503
+ * version, and the environment axes a combination this package can generate
4504
+ * are the gate's laws, and the gate answers them with {@link Question}s carrying
4505
+ * their accepted candidates. Deciding them here as well would restate that law
4506
+ * and let the answers disagree, so a blueprint the gate will
4507
+ * refuse is still constructible.
4508
+ *
4509
+ * @example
4510
+ * ```ts
4511
+ * import { createBlueprint } from '@orkestrel/scaffold'
4512
+ *
4513
+ * createBlueprint('router', { src: ['core'] }).version // '0.0.1'
4514
+ * createBlueprint('Router').name // 'Router' — the gate refuses it, this does not
4515
+ * ```
4516
+ */
4517
+ function createBlueprint(name, input) {
4518
+ const blueprint = parseBlueprint(cloneValue({
4519
+ name,
4520
+ ...input?.description === void 0 ? {} : { description: input.description },
4521
+ keywords: input?.keywords ?? [],
4522
+ src: input?.src ?? [],
4523
+ app: input?.app ?? [],
4524
+ dependencies: input?.dependencies ?? [],
4525
+ peers: input?.peers ?? [],
4526
+ extras: input?.extras ?? [],
4527
+ version: input?.version ?? "0.0.1",
4528
+ engines: input?.engines ?? DEFAULT_ENGINES,
4529
+ overrides: input?.overrides ?? [],
4530
+ bin: input?.bin ?? false,
4531
+ setup: input?.setup ?? false,
4532
+ guides: input?.guides ?? false,
4533
+ distribution: input?.distribution ?? false,
4534
+ integration: input?.integration ?? false,
4535
+ conformance: input?.conformance ?? false,
4536
+ service: input?.service ?? false,
4537
+ vendors: input?.vendors ?? [],
4538
+ global: input?.global ?? false,
4539
+ showcase: input?.showcase ?? false
4540
+ }));
4541
+ if (blueprint === void 0) throw new ScaffoldError("INVALID", "The filled record is not a blueprint.", { name });
4542
+ return blueprint;
4543
+ }
4544
+ //#endregion
4465
4545
  //#region src/core/Compiler.ts
4466
4546
  /**
4467
4547
  * The compile spine: draft, gate, pin, run in that order over a blueprint.
@@ -4484,7 +4564,7 @@ function overridesToQuestions(overrides, artifacts) {
4484
4564
  * `INVALID`. Structure raises; the laws a well-formed blueprint can still break
4485
4565
  * are the gate's, and they answer with questions.
4486
4566
  *
4487
- * Two consequences of that order are worth stating, because they are the ones a
4567
+ * The consequences of that order are worth stating, because they are the ones a
4488
4568
  * JavaScript caller meets first. A property backed by an accessor is refused
4489
4569
  * rather than read, which is what closes the race a guard cannot close from
4490
4570
  * inside; the accessor never runs. And an optional field present with the value
@@ -4546,21 +4626,21 @@ var Compiler = class {
4546
4626
  * carries no plan, then `compile` with the whole outcome either way, so an
4547
4627
  * observer reads every compile from one event and the refusals from the other.
4548
4628
  *
4549
- * A plan says the blueprint can be built. It does not say the blueprint should
4550
- * be created, and the questions beside it are what this compiler could not
4551
- * settle. A caller creating a fresh workspace answers them first and writes
4552
- * nothing while any remains, which is the rule the `new` verb applies; a caller
4553
- * describing or repairing an existing target carries them through instead.
4554
- * Nothing downstream repeats that check, because only the caller knows which of
4555
- * the two it is.
4629
+ * A plan says the blueprint can be built. It does not decide whether to create
4630
+ * it, and the questions beside it are what this compiler could not settle. A
4631
+ * caller creating a fresh workspace answers them first and writes nothing while
4632
+ * any remains, which is the rule the `new` verb applies; a caller describing or
4633
+ * repairing an existing target carries them through instead.
4634
+ * Nothing downstream repeats that check, because only the caller knows which
4635
+ * case it is.
4556
4636
  *
4557
4637
  * @example
4558
4638
  * ```ts
4559
- * import { createBlueprint, createCompiler } from '@orkestrel/scaffold'
4639
+ * import { Compiler, createBlueprint } from '@orkestrel/scaffold'
4560
4640
  *
4561
4641
  * const blueprint = createBlueprint('router', { src: ['core'] })
4562
4642
  *
4563
- * createCompiler().compile(blueprint, ['manifest']).plan?.artifacts.length // 1
4643
+ * new Compiler().compile(blueprint, ['manifest']).plan?.artifacts.length // 1
4564
4644
  * ```
4565
4645
  */
4566
4646
  compile(blueprint, groups) {
@@ -4593,12 +4673,12 @@ var Compiler = class {
4593
4673
  *
4594
4674
  * @example
4595
4675
  * ```ts
4596
- * import { createBlueprint, createCompiler } from '@orkestrel/scaffold'
4676
+ * import { Compiler, createBlueprint } from '@orkestrel/scaffold'
4597
4677
  *
4598
4678
  * const blueprint = createBlueprint('router', { src: ['core'] })
4599
4679
  *
4600
- * createCompiler().audit(blueprint, {}, ['manifest']).findings[0]?.drift // 'aligned'
4601
- * createCompiler().audit(blueprint, {}, ['configs']).findings[0]?.drift // 'missing'
4680
+ * new Compiler().audit(blueprint, {}, ['manifest']).findings[0]?.drift // 'aligned'
4681
+ * new Compiler().audit(blueprint, {}, ['configs']).findings[0]?.drift // 'missing'
4602
4682
  * ```
4603
4683
  */
4604
4684
  audit(blueprint, current, groups) {
@@ -4621,9 +4701,9 @@ var Compiler = class {
4621
4701
  *
4622
4702
  * @example
4623
4703
  * ```ts
4624
- * import { createCompiler } from '@orkestrel/scaffold'
4704
+ * import { Compiler } from '@orkestrel/scaffold'
4625
4705
  *
4626
- * const compiler = createCompiler()
4706
+ * const compiler = new Compiler()
4627
4707
  * compiler.destroy()
4628
4708
  * compiler.emitter.destroyed // true
4629
4709
  * ```
@@ -4763,91 +4843,6 @@ var Compiler = class {
4763
4843
  }
4764
4844
  };
4765
4845
  //#endregion
4766
- //#region src/core/factories.ts
4767
- /**
4768
- * Construct a {@link Blueprint} from a name and the fields that differ from the defaults.
4769
- *
4770
- * @param name - The bare workspace name.
4771
- * @param input - The fields to set; every omitted field takes its default.
4772
- * @returns The filled blueprint, owned by the caller and sharing nothing with `input`.
4773
- * @throws {@link ScaffoldError} coded `INVALID` when the filled record is not a
4774
- * blueprint.
4775
- *
4776
- * @remarks
4777
- * A blueprint is a closed record, and most of its fields have one sensible
4778
- * starting value: an empty list, a cleared flag, `DEFAULT_VERSION`, and
4779
- * `DEFAULT_ENGINES`. Filling them here is what lets a caller state only what its
4780
- * workspace actually declares.
4781
- *
4782
- * This is the construction door, and {@link parseBlueprint} is the coercing one.
4783
- * They differ in all three of their parts: this fills the defaults and takes a
4784
- * partial specification, where the parser fills nothing and takes an untrusted
4785
- * value; and this refuses by throwing, where the parser refuses by answering
4786
- * `undefined`. What they share is the law — both accept exactly what
4787
- * `isBlueprint` accepts.
4788
- *
4789
- * That law is structural only. Whether the name is a name, the version a
4790
- * version, and the two environment axes a combination this package can generate
4791
- * are the gate's laws, and the gate answers them with {@link Question}s carrying
4792
- * their accepted candidates. Deciding them here as well would state one law in
4793
- * two places and let the two answers disagree, so a blueprint the gate will
4794
- * refuse is still constructible.
4795
- *
4796
- * @example
4797
- * ```ts
4798
- * import { createBlueprint } from '@orkestrel/scaffold'
4799
- *
4800
- * createBlueprint('router', { src: ['core'] }).version // '0.0.1'
4801
- * createBlueprint('Router').name // 'Router' — the gate refuses it, this does not
4802
- * ```
4803
- */
4804
- function createBlueprint(name, input) {
4805
- const blueprint = parseBlueprint(cloneValue({
4806
- name,
4807
- ...input?.description === void 0 ? {} : { description: input.description },
4808
- keywords: input?.keywords ?? [],
4809
- src: input?.src ?? [],
4810
- app: input?.app ?? [],
4811
- dependencies: input?.dependencies ?? [],
4812
- peers: input?.peers ?? [],
4813
- extras: input?.extras ?? [],
4814
- version: input?.version ?? "0.0.1",
4815
- engines: input?.engines ?? DEFAULT_ENGINES,
4816
- overrides: input?.overrides ?? [],
4817
- bin: input?.bin ?? false,
4818
- setup: input?.setup ?? false,
4819
- guides: input?.guides ?? false,
4820
- distribution: input?.distribution ?? false,
4821
- integration: input?.integration ?? false,
4822
- conformance: input?.conformance ?? false,
4823
- service: input?.service ?? false,
4824
- vendors: input?.vendors ?? [],
4825
- global: input?.global ?? false,
4826
- showcase: input?.showcase ?? false
4827
- }));
4828
- if (blueprint === void 0) throw new ScaffoldError("INVALID", "The filled record is not a blueprint.", { name });
4829
- return blueprint;
4830
- }
4831
- /**
4832
- * Construct a {@link Compiler}.
4833
- *
4834
- * @param options - The initial listeners and the listener-error handler.
4835
- * @returns The compiler, typed as the contract consumers program against.
4836
- * @throws {@link ScaffoldError} coded `INVALID` when `options` is present but is
4837
- * not an option bag the compiler accepts.
4838
- *
4839
- * @example
4840
- * ```ts
4841
- * import { createCompiler } from '@orkestrel/scaffold'
4842
- *
4843
- * const compiler = createCompiler({ on: { block: (questions) => report(questions) } })
4844
- * compiler.destroy()
4845
- * ```
4846
- */
4847
- function createCompiler(options) {
4848
- return new Compiler(options);
4849
- }
4850
- //#endregion
4851
4846
  exports.APP_BROWSER_DEV_DEPENDENCIES = APP_BROWSER_DEV_DEPENDENCIES;
4852
4847
  exports.APP_DEV_DEPENDENCIES = APP_DEV_DEPENDENCIES;
4853
4848
  exports.APP_MATRIX = APP_MATRIX;
@@ -4931,7 +4926,6 @@ exports.computeBytes = computeBytes;
4931
4926
  exports.computeHash = computeHash;
4932
4927
  exports.contentToHex = contentToHex;
4933
4928
  exports.createBlueprint = createBlueprint;
4934
- exports.createCompiler = createCompiler;
4935
4929
  exports.dependenciesToQuestions = dependenciesToQuestions;
4936
4930
  exports.extractVersion = extractVersion;
4937
4931
  exports.inferDrift = inferDrift;