@orkestrel/scaffold 0.0.21 → 0.0.22

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 (68) hide show
  1. package/dist/bin/scaffold.js +371 -140
  2. package/dist/bin/scaffold.js.map +1 -1
  3. package/dist/host/AGENTS.md +61 -42
  4. package/dist/host/CLAUDE.md +39 -408
  5. package/dist/host/agents/orchestration.md +454 -0
  6. package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +25 -7
  7. package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +2 -2
  8. package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +42 -31
  9. package/dist/host/agents/skills/orkestrel-build-application/references/application.md +129 -0
  10. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +3 -3
  11. package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +2 -2
  12. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +167 -0
  13. package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +98 -0
  14. package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +148 -0
  15. package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +4 -2
  16. package/dist/host/agents/skills/orkestrel-harden-package/references/centralization.md +5 -5
  17. package/dist/host/agents/skills/orkestrel-harden-package/references/research.md +2 -0
  18. package/dist/host/agents/skills/orkestrel-polish-surface/SKILL.md +11 -6
  19. package/dist/host/claude/agents/analyst.md +59 -0
  20. package/dist/host/claude/agents/application.md +1 -1
  21. package/dist/host/claude/agents/builder.md +1 -1
  22. package/dist/host/claude/agents/checker.md +5 -1
  23. package/dist/host/claude/agents/codex.md +120 -94
  24. package/dist/host/claude/agents/grok.md +44 -32
  25. package/dist/host/claude/agents/implementer.md +1 -1
  26. package/dist/host/claude/agents/orkestrel.md +1 -1
  27. package/dist/host/claude/agents/planner.md +9 -3
  28. package/dist/host/claude/agents/researcher.md +6 -5
  29. package/dist/host/claude/agents/reviewer.md +12 -6
  30. package/dist/host/claude/agents/scout.md +7 -4
  31. package/dist/host/claude/agents/verifier.md +1 -1
  32. package/dist/host/claude/rules/application.md +17 -16
  33. package/dist/host/claude/rules/architecture.md +41 -22
  34. package/dist/host/claude/rules/documentation.md +2 -1
  35. package/dist/host/claude/rules/names.md +7 -6
  36. package/dist/host/claude/rules/quality.md +65 -18
  37. package/dist/host/claude/rules/styles.md +1 -1
  38. package/dist/host/claude/rules/tests.md +12 -6
  39. package/dist/host/claude/rules/typescript.md +1 -1
  40. package/dist/host/claude/rules/workspace.md +6 -3
  41. package/dist/host/claude/settings.json +2 -0
  42. package/dist/host/claude/skills/orkestrel-falsify/SKILL.md +10 -0
  43. package/dist/host/codex/agents/analyst.toml +13 -4
  44. package/dist/host/codex/agents/checker.toml +1 -1
  45. package/dist/host/codex/agents/grok.toml +2 -1
  46. package/dist/host/codex/agents/opus.toml +1 -1
  47. package/dist/host/codex/agents/planner.toml +1 -1
  48. package/dist/host/codex/agents/researcher.toml +2 -2
  49. package/dist/host/codex/agents/reviewer.toml +1 -1
  50. package/dist/host/codex/agents/scout.toml +2 -2
  51. package/dist/host/codex/config.toml +23 -70
  52. package/dist/host/cursor/rules/orchestration.mdc +33 -0
  53. package/dist/host/guides/src/scaffold.md +301 -123
  54. package/dist/host/manifest.json +47 -1
  55. package/dist/host/tests/setupPolicy.ts +83 -3
  56. package/dist/src/core/index.cjs +404 -63
  57. package/dist/src/core/index.cjs.map +1 -1
  58. package/dist/src/core/index.d.cts +119 -41
  59. package/dist/src/core/index.d.ts +119 -41
  60. package/dist/src/core/index.js +401 -64
  61. package/dist/src/core/index.js.map +1 -1
  62. package/dist/src/server/index.cjs +83 -33
  63. package/dist/src/server/index.cjs.map +1 -1
  64. package/dist/src/server/index.d.cts +32 -16
  65. package/dist/src/server/index.d.ts +32 -16
  66. package/dist/src/server/index.js +84 -35
  67. package/dist/src/server/index.js.map +1 -1
  68. package/package.json +4 -4
@@ -177,8 +177,8 @@ export declare function artifactShape(): UnionShape<readonly [ ObjectShape<{
177
177
  *
178
178
  * @remarks
179
179
  * A `Compiler.audit` over a gate-failing blueprint sets `complete: false` with
180
- * the gate's `questions` and zero findings, while `diffPlan` over an existing
181
- * plan is always `complete: true`.
180
+ * the gate's `questions` and zero findings. `diffPlan` over an existing plan
181
+ * is always complete; a host artifact without `hex` is presence-owned.
182
182
  */
183
183
  export declare interface Audit {
184
184
  readonly findings: readonly Finding[];
@@ -268,8 +268,8 @@ export declare interface Blueprint {
268
268
  readonly bin: boolean;
269
269
  /** Structural: `true` only for a repo that ships `tests/integration` — a slow, opt-in proof project over the repo's own built output, outside the default run, never by name. */
270
270
  readonly integration: boolean;
271
- /** Structural: `true` only for a repo that ships `tests/service` a slow, opt-in proof project against a foreign running process, outside the default run, never by name. Derivation requires `tests/setupService.ts` and `scripts/service.sh` beside it and fails `TARGET` otherwise. */
272
- readonly service: boolean;
271
+ /** Structural vendor names derived from non-empty `tests/service/<name>` directories, sorted in code-unit order. Each vendor owns `tests/service/<name>/setup.ts`; the workspace owns `scripts/service.sh`. */
272
+ readonly services: readonly string[];
273
273
  /** Structural: `true` only for a repo that carries the physical, exact-case `tests/setupGlobal.ts` module — integration and `srcBrowser` projects consume that shared global setup only under their own additional structural conditions. */
274
274
  readonly global: boolean;
275
275
  /** Structural: `true` only for a repo that carries the physical, exact-case `configs/app/vite.showcase.config.ts` regular file; valid only with `app/browser`. */
@@ -284,8 +284,8 @@ export declare interface Blueprint {
284
284
  * @remarks
285
285
  * `version` / `engines` default `DEFAULT_VERSION` / `DEFAULT_ENGINES`,
286
286
  * `src` defaults `['core']`, and `app` / `keywords` / `dependencies` /
287
- * `peers` / `extras` / `overrides` default `[]`, and `bin` / `integration` /
288
- * `service` / `global` / `showcase` default `false`. `description` is OMITTED entirely
287
+ * `peers` / `extras` / `overrides` / `services` default `[]`, and `bin` /
288
+ * `integration` / `global` / `showcase` default `false`. `description` is OMITTED entirely
289
289
  * when absent, so the result round-trips the exact-record `Blueprint` guard.
290
290
  * @returns A complete `Blueprint`.
291
291
  *
@@ -342,7 +342,7 @@ export declare function blueprintShape(): ObjectShape<{
342
342
  }, false>>;
343
343
  bin: BooleanShape;
344
344
  integration: BooleanShape;
345
- service: BooleanShape;
345
+ services: ArrayShape<StringShape>;
346
346
  global: BooleanShape;
347
347
  showcase: BooleanShape;
348
348
  }, false>;
@@ -398,6 +398,17 @@ export declare type BuildFormat = 'es' | 'cjs';
398
398
  */
399
399
  export declare function bytesToHex(bytes: Uint8Array): string;
400
400
 
401
+ /**
402
+ * The catalog agent file whose bounded marker region the catalog operation alone owns.
403
+ *
404
+ * @remarks
405
+ * Vendored like every other host artifact, but presence-owned after hydration:
406
+ * `diffPlan` compares this one path by presence, so a consumer restores it while
407
+ * absent and never replaces its bytes — not from an audit, not from a repair, and
408
+ * not under `replace`.
409
+ */
410
+ export declare const CATALOG_AGENT_PATH = ".claude/agents/orkestrel.md";
411
+
401
412
  /**
402
413
  * One fleet package's catalog row — the `orkestrel` agent's package-catalog
403
414
  * section, derived rather than hand-maintained.
@@ -439,7 +450,7 @@ export declare function catalogNames(text: string): readonly string[];
439
450
 
440
451
  /**
441
452
  * Project a fleet package catalog into a markdown table — the block
442
- * `.claude/agents/orkestrel.md`'s catalog markers wrap.
453
+ * `CATALOG_AGENT_PATH`'s catalog markers wrap.
443
454
  *
444
455
  * @param entries - The catalog rows to render.
445
456
  * @remarks
@@ -905,13 +916,14 @@ export declare function coreViteConfig(): string;
905
916
  * @param plan - The plan whose artifacts are the source of truth.
906
917
  * @param current - The target's current content, keyed by artifact-relative path.
907
918
  * @remarks
908
- * Audit semantics are per-origin. A `host`-origin artifact is audited by
909
- * PRESENCE only `missing` or `aligned`, never `stale` UNLESS it has been
910
- * hydrated with its real host bytes (`hydratePlan`'s `content`), in which case
911
- * it is content-compared exactly like a `computed` artifact and CAN be
912
- * `stale`. `hydratePlan` expands directory-shaped host artifacts into
913
- * content-bearing file artifacts; only an unresolved degrade-path host
914
- * artifact stays presence-only. A `computed` artifact is content-aware canon —
919
+ * Audit semantics are per-origin. A `host`-origin artifact with canonical
920
+ * `hex` is content-compared exactly like a `computed` artifact and CAN be
921
+ * `stale`. A host artifact without canonical bytes is presence-owned:
922
+ * present is `aligned`, absent is `missing`. `CATALOG_AGENT_PATH` remains
923
+ * presence-owned after hydration because the catalog operation alone owns its
924
+ * bounded marker region. `hydratePlan` expands directory-shaped host artifacts
925
+ * into byte-aware file artifacts; only an intentional dependency-guide pointer
926
+ * may remain without `hex`. A `computed` artifact is content-aware canon —
915
927
  * `missing` / `aligned` / `stale` — and gates the audit like any drifted
916
928
  * finding. A `template`-origin artifact is BIRTH-ONLY and AUDIT-EXEMPT: it is
917
929
  * always reported `aligned`, regardless of whether the target has it at all
@@ -1317,15 +1329,23 @@ export declare function coreViteConfig(): string;
1317
1329
  * The byte-copied host artifact paths, frozen.
1318
1330
  *
1319
1331
  * @remarks
1320
- * The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, `.agents`, `.claude`, `.codex`,
1321
- * the four SessionStart hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` /
1322
- * `scripts/codex.sh` / `scripts/ollama.sh`), the repository coding-law policy module,
1323
- * the line's seven byte-identical root dotfiles, and the two guides-grouped
1324
- * mirror candidates: the line-wide dev-tooling guide
1325
- * (`guides/src/guide.md`) and the scaffold bin's own self-guide
1326
- * (`guides/src/scaffold.md`). `stageHost` vendors both; each plan carries the
1327
- * subset selected by `selectHostPaths`, omitting the target blueprint's own
1328
- * guide.
1332
+ * The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, the canonical
1333
+ * orchestration contract (`.agents/orchestration.md`) every harness bridge
1334
+ * points at, `.agents`, `.claude`, `.codex`, `.cursor`, the four SessionStart
1335
+ * hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` / `scripts/codex.sh` /
1336
+ * `scripts/ollama.sh`), the repository coding-law policy module, the line's
1337
+ * seven byte-identical root dotfiles, and the two guides-grouped mirror
1338
+ * candidates: the line-wide dev-tooling guide (`guides/src/guide.md`) and the
1339
+ * scaffold bin's own self-guide (`guides/src/scaffold.md`). `stageHost` vendors
1340
+ * both; each plan carries the subset selected by `selectHostPaths`, omitting the
1341
+ * target blueprint's own guide.
1342
+ *
1343
+ * Three harness bridges point at `.agents/orchestration.md` and carry only their
1344
+ * own harness's specifics: `CLAUDE.md`, `.codex/config.toml`, and
1345
+ * `.cursor/rules`. They are meaningless without the contract they reference, but
1346
+ * they do not share a `Group` — `hostGroup` keeps `CLAUDE.md` in `docs` with the
1347
+ * other root documents, so a plan selecting `orchestration` carries two of the
1348
+ * three and a plan selecting `docs` carries the third.
1329
1349
  */
1330
1350
  export declare const HOST_PATHS: readonly string[];
1331
1351
 
@@ -1347,10 +1367,26 @@ export declare function coreViteConfig(): string;
1347
1367
  * @example
1348
1368
  * ```ts
1349
1369
  * hostGroup('AGENTS.md') // 'docs'
1350
- * hostGroup('.agents') // 'orchestration'
1351
- * hostGroup('.claude') // 'orchestration'
1352
- * hostGroup('.codex') // 'orchestration'
1370
+ * hostGroup('.agents/orchestration.md') // 'orchestration'
1371
+ * hostGroup('.claude/rules') // 'orchestration'
1372
+ * hostGroup('.cursor/rules') // 'orchestration'
1373
+ * hostGroup('.mcp.json') // 'orchestration'
1374
+ * hostGroup('.oxlintrc.json') // 'configs'
1353
1375
  * ```
1376
+ *
1377
+ * @remarks
1378
+ * Takes a `HOST_PATHS` entry, so every example above is one. A bare directory
1379
+ * name is not: `ORCHESTRATION_PATH_PREFIXES` entries carry a trailing slash, so
1380
+ * `hostGroup('.cursor')` is `configs`, and no vendored entry has that form.
1381
+ *
1382
+ * Below the `docs` branch the split is by what a path governs rather than where
1383
+ * it sits, which is why both MCP registrations — `.mcp.json` and
1384
+ * `.cursor/mcp.json` — group with the harness bridges instead of with the root
1385
+ * dotfiles beside them. The `docs` branch is checked first and is deliberately
1386
+ * positional: `AGENTS.md`, `CLAUDE.md`, and `LICENSE` are the root documents, and
1387
+ * `CLAUDE.md` stays there as a root document even though it is also a harness
1388
+ * bridge. A plan selecting `orchestration` therefore carries two of the three
1389
+ * bridges; a plan selecting `docs` carries the third.
1354
1390
  */
1355
1391
  export declare function hostGroup(path: string): Group;
1356
1392
 
@@ -1362,10 +1398,12 @@ export declare function coreViteConfig(): string;
1362
1398
  *
1363
1399
  * @param path - The target-relative path to classify.
1364
1400
  * @remarks
1365
- * Ordered prefix match — `src/`, `tests/`, `guides/`, `docs/`, `configs/`,
1366
- * then `.agents/`, `.claude/`, `.codex/`, `.github/`, and `scripts/` as
1367
- * `'orchestration'`, then the two manifest files by exact name. Anything else
1368
- * (a root-level, prefix-less file) falls through to `'configs'`.
1401
+ * Ordered prefix match — `src/`, `tests/`, `guides/`, `docs/`, `configs/`, then
1402
+ * `matchesOrchestrationPath`, which owns the orchestration membership rule for
1403
+ * this function and for `hostGroup` alike, then the two manifest files by exact
1404
+ * name. Anything left falls through to `'configs'`. Read the rule at
1405
+ * `matchesOrchestrationPath` rather than here; one rule with two descriptions
1406
+ * drifts exactly as fast as one rule with two implementations.
1369
1407
  * @returns The inferred `Group` for `path`.
1370
1408
  *
1371
1409
  * @example
@@ -1565,6 +1603,23 @@ export declare function coreViteConfig(): string;
1565
1603
  */
1566
1604
  export declare function manifestToName(manifest: string): string | undefined;
1567
1605
 
1606
+ /**
1607
+ * Test whether a path instructs or wires an agent rather than the toolchain.
1608
+ *
1609
+ * @param path - The portable path to classify.
1610
+ * @returns `true` when the path is agent orchestration.
1611
+ *
1612
+ * @example
1613
+ * ```ts
1614
+ * import { matchesOrchestrationPath } from '@orkestrel/scaffold'
1615
+ *
1616
+ * matchesOrchestrationPath('.cursor/rules/orchestration.mdc') // true
1617
+ * matchesOrchestrationPath('.mcp.json') // true
1618
+ * matchesOrchestrationPath('.oxlintrc.json') // false
1619
+ * ```
1620
+ */
1621
+ export declare function matchesOrchestrationPath(path: string): boolean;
1622
+
1568
1623
  /** Maximum byte size accepted for one scaffold artifact. */
1569
1624
  export declare const MAX_ARTIFACT_BYTES = 5242880;
1570
1625
 
@@ -1650,6 +1705,27 @@ export declare function coreViteConfig(): string;
1650
1705
  /** The package-name RegExp — lowercase alphanumeric-with-hyphens, letter-first. */
1651
1706
  export declare const NAME_PATTERN: RegExp;
1652
1707
 
1708
+ /**
1709
+ * The exact root filenames that wire an agent bench rather than the toolchain, frozen.
1710
+ *
1711
+ * @remarks
1712
+ * `.mcp.json` registers MCP servers for the harness. It sits among the root
1713
+ * dotfiles but governs agents, so it groups with the harness bridges.
1714
+ */
1715
+ export declare const ORCHESTRATION_PATH_NAMES: readonly string[];
1716
+
1717
+ /**
1718
+ * The path prefixes whose contents instruct or wire an agent, frozen.
1719
+ *
1720
+ * @remarks
1721
+ * Group classification splits by what a path governs, not by where it sits:
1722
+ * anything under these prefixes is `orchestration`, and everything else that is
1723
+ * not source, tests, guides, docs, or a manifest is `configs`. Both classifiers
1724
+ * — `inferGroup` for a foreign target path and `hostGroup` for a `HOST_PATHS`
1725
+ * entry — read this one list, so a new harness directory is admitted once.
1726
+ */
1727
+ export declare const ORCHESTRATION_PATH_PREFIXES: readonly string[];
1728
+
1653
1729
  /**
1654
1730
  * How an `Artifact`'s content is produced: `host` byte-copied from the vendored
1655
1731
  * data root, `template` filled from a frozen `TemplateDefinition` by
@@ -2103,7 +2179,7 @@ export declare function coreViteConfig(): string;
2103
2179
  }, false>>;
2104
2180
  bin: BooleanShape;
2105
2181
  integration: BooleanShape;
2106
- service: BooleanShape;
2182
+ services: ArrayShape<StringShape>;
2107
2183
  global: BooleanShape;
2108
2184
  showcase: BooleanShape;
2109
2185
  }, false>;
@@ -2344,7 +2420,7 @@ export declare function coreViteConfig(): string;
2344
2420
  *
2345
2421
  * @param src - The declared `Environment[]`.
2346
2422
  * @param facts - Optional structural facts. `bin` appends the standalone executable
2347
- * build-and-test project; `integration` and `service` append their standalone
2423
+ * build-and-test project; `integration` and `services` append their standalone
2348
2424
  * proof projects; `global` wires the shared global-setup module.
2349
2425
  * @returns The root `vite.config.ts` file content, newline-terminated.
2350
2426
  *
@@ -2356,7 +2432,7 @@ export declare function coreViteConfig(): string;
2356
2432
  export declare function rootViteConfig(src: readonly Environment[], facts?: ViteFacts): string;
2357
2433
 
2358
2434
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
2359
- export declare const SCAFFOLD_RANGE = "^0.0.21";
2435
+ export declare const SCAFFOLD_RANGE = "^0.0.22";
2360
2436
 
2361
2437
  /**
2362
2438
  * Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
@@ -2428,20 +2504,21 @@ export declare function coreViteConfig(): string;
2428
2504
  */
2429
2505
  export declare function serializeTypeScriptString(value: string): string;
2430
2506
 
2431
- /** The consumer-owned live-service provisioner expected only by service workspaces. */
2507
+ /** The birth-only provisioner skeleton retained by workspaces with declared service vendors. */
2432
2508
  export declare const SERVICE_SCRIPT_PATH = "scripts/service.sh";
2433
2509
 
2434
2510
  /**
2435
- * Build the standalone Node-only live-service proof project.
2511
+ * Build one standalone Node-only live-service vendor proof project.
2436
2512
  *
2437
- * @returns The emitted `service` project definition.
2513
+ * @param name - The bounded vendor directory name.
2514
+ * @returns The emitted `service:<name>` project definition.
2438
2515
  *
2439
2516
  * @example
2440
2517
  * ```ts
2441
- * serviceViteProject().includes("label: 'service'") // true
2518
+ * serviceViteProject('claude').includes("label: 'service:claude'") // true
2442
2519
  * ```
2443
2520
  */
2444
- export declare function serviceViteProject(): string;
2521
+ export declare function serviceViteProject(name: string): string;
2445
2522
 
2446
2523
  /** Immutable official actions/setup-node v6.4.0 commit used by generated CI. */
2447
2524
  export declare const SETUP_NODE_ACTION_SHA = "48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e";
@@ -2832,7 +2909,8 @@ export declare function coreViteConfig(): string;
2832
2909
  * Optional structural facts consumed by a generated root Vite configuration.
2833
2910
  *
2834
2911
  * @remarks
2835
- * `bin`, `integration`, and `service` select their matching projects.
2912
+ * `bin` and `integration` select their matching projects. `services` is the
2913
+ * sorted list of vendor projects derived from `tests/service/<name>` directories.
2836
2914
  * `global` records the physical `tests/setupGlobal.ts` module and wires it
2837
2915
  * into every selected project that consumes that shared setup. `showcase`
2838
2916
  * records the physical app showcase wrapper and selects its browser machinery.
@@ -2840,7 +2918,7 @@ export declare function coreViteConfig(): string;
2840
2918
  export declare interface ViteFacts {
2841
2919
  readonly bin?: boolean;
2842
2920
  readonly integration?: boolean;
2843
- readonly service?: boolean;
2921
+ readonly services?: readonly string[];
2844
2922
  readonly global?: boolean;
2845
2923
  readonly showcase?: boolean;
2846
2924
  }
@@ -177,8 +177,8 @@ export declare function artifactShape(): UnionShape<readonly [ ObjectShape<{
177
177
  *
178
178
  * @remarks
179
179
  * A `Compiler.audit` over a gate-failing blueprint sets `complete: false` with
180
- * the gate's `questions` and zero findings, while `diffPlan` over an existing
181
- * plan is always `complete: true`.
180
+ * the gate's `questions` and zero findings. `diffPlan` over an existing plan
181
+ * is always complete; a host artifact without `hex` is presence-owned.
182
182
  */
183
183
  export declare interface Audit {
184
184
  readonly findings: readonly Finding[];
@@ -268,8 +268,8 @@ export declare interface Blueprint {
268
268
  readonly bin: boolean;
269
269
  /** Structural: `true` only for a repo that ships `tests/integration` — a slow, opt-in proof project over the repo's own built output, outside the default run, never by name. */
270
270
  readonly integration: boolean;
271
- /** Structural: `true` only for a repo that ships `tests/service` a slow, opt-in proof project against a foreign running process, outside the default run, never by name. Derivation requires `tests/setupService.ts` and `scripts/service.sh` beside it and fails `TARGET` otherwise. */
272
- readonly service: boolean;
271
+ /** Structural vendor names derived from non-empty `tests/service/<name>` directories, sorted in code-unit order. Each vendor owns `tests/service/<name>/setup.ts`; the workspace owns `scripts/service.sh`. */
272
+ readonly services: readonly string[];
273
273
  /** Structural: `true` only for a repo that carries the physical, exact-case `tests/setupGlobal.ts` module — integration and `srcBrowser` projects consume that shared global setup only under their own additional structural conditions. */
274
274
  readonly global: boolean;
275
275
  /** Structural: `true` only for a repo that carries the physical, exact-case `configs/app/vite.showcase.config.ts` regular file; valid only with `app/browser`. */
@@ -284,8 +284,8 @@ export declare interface Blueprint {
284
284
  * @remarks
285
285
  * `version` / `engines` default `DEFAULT_VERSION` / `DEFAULT_ENGINES`,
286
286
  * `src` defaults `['core']`, and `app` / `keywords` / `dependencies` /
287
- * `peers` / `extras` / `overrides` default `[]`, and `bin` / `integration` /
288
- * `service` / `global` / `showcase` default `false`. `description` is OMITTED entirely
287
+ * `peers` / `extras` / `overrides` / `services` default `[]`, and `bin` /
288
+ * `integration` / `global` / `showcase` default `false`. `description` is OMITTED entirely
289
289
  * when absent, so the result round-trips the exact-record `Blueprint` guard.
290
290
  * @returns A complete `Blueprint`.
291
291
  *
@@ -342,7 +342,7 @@ export declare function blueprintShape(): ObjectShape<{
342
342
  }, false>>;
343
343
  bin: BooleanShape;
344
344
  integration: BooleanShape;
345
- service: BooleanShape;
345
+ services: ArrayShape<StringShape>;
346
346
  global: BooleanShape;
347
347
  showcase: BooleanShape;
348
348
  }, false>;
@@ -398,6 +398,17 @@ export declare type BuildFormat = 'es' | 'cjs';
398
398
  */
399
399
  export declare function bytesToHex(bytes: Uint8Array): string;
400
400
 
401
+ /**
402
+ * The catalog agent file whose bounded marker region the catalog operation alone owns.
403
+ *
404
+ * @remarks
405
+ * Vendored like every other host artifact, but presence-owned after hydration:
406
+ * `diffPlan` compares this one path by presence, so a consumer restores it while
407
+ * absent and never replaces its bytes — not from an audit, not from a repair, and
408
+ * not under `replace`.
409
+ */
410
+ export declare const CATALOG_AGENT_PATH = ".claude/agents/orkestrel.md";
411
+
401
412
  /**
402
413
  * One fleet package's catalog row — the `orkestrel` agent's package-catalog
403
414
  * section, derived rather than hand-maintained.
@@ -439,7 +450,7 @@ export declare function catalogNames(text: string): readonly string[];
439
450
 
440
451
  /**
441
452
  * Project a fleet package catalog into a markdown table — the block
442
- * `.claude/agents/orkestrel.md`'s catalog markers wrap.
453
+ * `CATALOG_AGENT_PATH`'s catalog markers wrap.
443
454
  *
444
455
  * @param entries - The catalog rows to render.
445
456
  * @remarks
@@ -905,13 +916,14 @@ export declare function coreViteConfig(): string;
905
916
  * @param plan - The plan whose artifacts are the source of truth.
906
917
  * @param current - The target's current content, keyed by artifact-relative path.
907
918
  * @remarks
908
- * Audit semantics are per-origin. A `host`-origin artifact is audited by
909
- * PRESENCE only `missing` or `aligned`, never `stale` UNLESS it has been
910
- * hydrated with its real host bytes (`hydratePlan`'s `content`), in which case
911
- * it is content-compared exactly like a `computed` artifact and CAN be
912
- * `stale`. `hydratePlan` expands directory-shaped host artifacts into
913
- * content-bearing file artifacts; only an unresolved degrade-path host
914
- * artifact stays presence-only. A `computed` artifact is content-aware canon —
919
+ * Audit semantics are per-origin. A `host`-origin artifact with canonical
920
+ * `hex` is content-compared exactly like a `computed` artifact and CAN be
921
+ * `stale`. A host artifact without canonical bytes is presence-owned:
922
+ * present is `aligned`, absent is `missing`. `CATALOG_AGENT_PATH` remains
923
+ * presence-owned after hydration because the catalog operation alone owns its
924
+ * bounded marker region. `hydratePlan` expands directory-shaped host artifacts
925
+ * into byte-aware file artifacts; only an intentional dependency-guide pointer
926
+ * may remain without `hex`. A `computed` artifact is content-aware canon —
915
927
  * `missing` / `aligned` / `stale` — and gates the audit like any drifted
916
928
  * finding. A `template`-origin artifact is BIRTH-ONLY and AUDIT-EXEMPT: it is
917
929
  * always reported `aligned`, regardless of whether the target has it at all
@@ -1317,15 +1329,23 @@ export declare function coreViteConfig(): string;
1317
1329
  * The byte-copied host artifact paths, frozen.
1318
1330
  *
1319
1331
  * @remarks
1320
- * The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, `.agents`, `.claude`, `.codex`,
1321
- * the four SessionStart hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` /
1322
- * `scripts/codex.sh` / `scripts/ollama.sh`), the repository coding-law policy module,
1323
- * the line's seven byte-identical root dotfiles, and the two guides-grouped
1324
- * mirror candidates: the line-wide dev-tooling guide
1325
- * (`guides/src/guide.md`) and the scaffold bin's own self-guide
1326
- * (`guides/src/scaffold.md`). `stageHost` vendors both; each plan carries the
1327
- * subset selected by `selectHostPaths`, omitting the target blueprint's own
1328
- * guide.
1332
+ * The root docs (`AGENTS.md` / `CLAUDE.md`), `LICENSE`, the canonical
1333
+ * orchestration contract (`.agents/orchestration.md`) every harness bridge
1334
+ * points at, `.agents`, `.claude`, `.codex`, `.cursor`, the four SessionStart
1335
+ * hook scripts (`scripts/deps.sh` / `scripts/cursor.sh` / `scripts/codex.sh` /
1336
+ * `scripts/ollama.sh`), the repository coding-law policy module, the line's
1337
+ * seven byte-identical root dotfiles, and the two guides-grouped mirror
1338
+ * candidates: the line-wide dev-tooling guide (`guides/src/guide.md`) and the
1339
+ * scaffold bin's own self-guide (`guides/src/scaffold.md`). `stageHost` vendors
1340
+ * both; each plan carries the subset selected by `selectHostPaths`, omitting the
1341
+ * target blueprint's own guide.
1342
+ *
1343
+ * Three harness bridges point at `.agents/orchestration.md` and carry only their
1344
+ * own harness's specifics: `CLAUDE.md`, `.codex/config.toml`, and
1345
+ * `.cursor/rules`. They are meaningless without the contract they reference, but
1346
+ * they do not share a `Group` — `hostGroup` keeps `CLAUDE.md` in `docs` with the
1347
+ * other root documents, so a plan selecting `orchestration` carries two of the
1348
+ * three and a plan selecting `docs` carries the third.
1329
1349
  */
1330
1350
  export declare const HOST_PATHS: readonly string[];
1331
1351
 
@@ -1347,10 +1367,26 @@ export declare function coreViteConfig(): string;
1347
1367
  * @example
1348
1368
  * ```ts
1349
1369
  * hostGroup('AGENTS.md') // 'docs'
1350
- * hostGroup('.agents') // 'orchestration'
1351
- * hostGroup('.claude') // 'orchestration'
1352
- * hostGroup('.codex') // 'orchestration'
1370
+ * hostGroup('.agents/orchestration.md') // 'orchestration'
1371
+ * hostGroup('.claude/rules') // 'orchestration'
1372
+ * hostGroup('.cursor/rules') // 'orchestration'
1373
+ * hostGroup('.mcp.json') // 'orchestration'
1374
+ * hostGroup('.oxlintrc.json') // 'configs'
1353
1375
  * ```
1376
+ *
1377
+ * @remarks
1378
+ * Takes a `HOST_PATHS` entry, so every example above is one. A bare directory
1379
+ * name is not: `ORCHESTRATION_PATH_PREFIXES` entries carry a trailing slash, so
1380
+ * `hostGroup('.cursor')` is `configs`, and no vendored entry has that form.
1381
+ *
1382
+ * Below the `docs` branch the split is by what a path governs rather than where
1383
+ * it sits, which is why both MCP registrations — `.mcp.json` and
1384
+ * `.cursor/mcp.json` — group with the harness bridges instead of with the root
1385
+ * dotfiles beside them. The `docs` branch is checked first and is deliberately
1386
+ * positional: `AGENTS.md`, `CLAUDE.md`, and `LICENSE` are the root documents, and
1387
+ * `CLAUDE.md` stays there as a root document even though it is also a harness
1388
+ * bridge. A plan selecting `orchestration` therefore carries two of the three
1389
+ * bridges; a plan selecting `docs` carries the third.
1354
1390
  */
1355
1391
  export declare function hostGroup(path: string): Group;
1356
1392
 
@@ -1362,10 +1398,12 @@ export declare function coreViteConfig(): string;
1362
1398
  *
1363
1399
  * @param path - The target-relative path to classify.
1364
1400
  * @remarks
1365
- * Ordered prefix match — `src/`, `tests/`, `guides/`, `docs/`, `configs/`,
1366
- * then `.agents/`, `.claude/`, `.codex/`, `.github/`, and `scripts/` as
1367
- * `'orchestration'`, then the two manifest files by exact name. Anything else
1368
- * (a root-level, prefix-less file) falls through to `'configs'`.
1401
+ * Ordered prefix match — `src/`, `tests/`, `guides/`, `docs/`, `configs/`, then
1402
+ * `matchesOrchestrationPath`, which owns the orchestration membership rule for
1403
+ * this function and for `hostGroup` alike, then the two manifest files by exact
1404
+ * name. Anything left falls through to `'configs'`. Read the rule at
1405
+ * `matchesOrchestrationPath` rather than here; one rule with two descriptions
1406
+ * drifts exactly as fast as one rule with two implementations.
1369
1407
  * @returns The inferred `Group` for `path`.
1370
1408
  *
1371
1409
  * @example
@@ -1565,6 +1603,23 @@ export declare function coreViteConfig(): string;
1565
1603
  */
1566
1604
  export declare function manifestToName(manifest: string): string | undefined;
1567
1605
 
1606
+ /**
1607
+ * Test whether a path instructs or wires an agent rather than the toolchain.
1608
+ *
1609
+ * @param path - The portable path to classify.
1610
+ * @returns `true` when the path is agent orchestration.
1611
+ *
1612
+ * @example
1613
+ * ```ts
1614
+ * import { matchesOrchestrationPath } from '@orkestrel/scaffold'
1615
+ *
1616
+ * matchesOrchestrationPath('.cursor/rules/orchestration.mdc') // true
1617
+ * matchesOrchestrationPath('.mcp.json') // true
1618
+ * matchesOrchestrationPath('.oxlintrc.json') // false
1619
+ * ```
1620
+ */
1621
+ export declare function matchesOrchestrationPath(path: string): boolean;
1622
+
1568
1623
  /** Maximum byte size accepted for one scaffold artifact. */
1569
1624
  export declare const MAX_ARTIFACT_BYTES = 5242880;
1570
1625
 
@@ -1650,6 +1705,27 @@ export declare function coreViteConfig(): string;
1650
1705
  /** The package-name RegExp — lowercase alphanumeric-with-hyphens, letter-first. */
1651
1706
  export declare const NAME_PATTERN: RegExp;
1652
1707
 
1708
+ /**
1709
+ * The exact root filenames that wire an agent bench rather than the toolchain, frozen.
1710
+ *
1711
+ * @remarks
1712
+ * `.mcp.json` registers MCP servers for the harness. It sits among the root
1713
+ * dotfiles but governs agents, so it groups with the harness bridges.
1714
+ */
1715
+ export declare const ORCHESTRATION_PATH_NAMES: readonly string[];
1716
+
1717
+ /**
1718
+ * The path prefixes whose contents instruct or wire an agent, frozen.
1719
+ *
1720
+ * @remarks
1721
+ * Group classification splits by what a path governs, not by where it sits:
1722
+ * anything under these prefixes is `orchestration`, and everything else that is
1723
+ * not source, tests, guides, docs, or a manifest is `configs`. Both classifiers
1724
+ * — `inferGroup` for a foreign target path and `hostGroup` for a `HOST_PATHS`
1725
+ * entry — read this one list, so a new harness directory is admitted once.
1726
+ */
1727
+ export declare const ORCHESTRATION_PATH_PREFIXES: readonly string[];
1728
+
1653
1729
  /**
1654
1730
  * How an `Artifact`'s content is produced: `host` byte-copied from the vendored
1655
1731
  * data root, `template` filled from a frozen `TemplateDefinition` by
@@ -2103,7 +2179,7 @@ export declare function coreViteConfig(): string;
2103
2179
  }, false>>;
2104
2180
  bin: BooleanShape;
2105
2181
  integration: BooleanShape;
2106
- service: BooleanShape;
2182
+ services: ArrayShape<StringShape>;
2107
2183
  global: BooleanShape;
2108
2184
  showcase: BooleanShape;
2109
2185
  }, false>;
@@ -2344,7 +2420,7 @@ export declare function coreViteConfig(): string;
2344
2420
  *
2345
2421
  * @param src - The declared `Environment[]`.
2346
2422
  * @param facts - Optional structural facts. `bin` appends the standalone executable
2347
- * build-and-test project; `integration` and `service` append their standalone
2423
+ * build-and-test project; `integration` and `services` append their standalone
2348
2424
  * proof projects; `global` wires the shared global-setup module.
2349
2425
  * @returns The root `vite.config.ts` file content, newline-terminated.
2350
2426
  *
@@ -2356,7 +2432,7 @@ export declare function coreViteConfig(): string;
2356
2432
  export declare function rootViteConfig(src: readonly Environment[], facts?: ViteFacts): string;
2357
2433
 
2358
2434
  /** The devDependency range generated packages pin `@orkestrel/scaffold` at. */
2359
- export declare const SCAFFOLD_RANGE = "^0.0.21";
2435
+ export declare const SCAFFOLD_RANGE = "^0.0.22";
2360
2436
 
2361
2437
  /**
2362
2438
  * Carries a `ScaffoldErrorCode` + optional `context` (AGENTS §12).
@@ -2428,20 +2504,21 @@ export declare function coreViteConfig(): string;
2428
2504
  */
2429
2505
  export declare function serializeTypeScriptString(value: string): string;
2430
2506
 
2431
- /** The consumer-owned live-service provisioner expected only by service workspaces. */
2507
+ /** The birth-only provisioner skeleton retained by workspaces with declared service vendors. */
2432
2508
  export declare const SERVICE_SCRIPT_PATH = "scripts/service.sh";
2433
2509
 
2434
2510
  /**
2435
- * Build the standalone Node-only live-service proof project.
2511
+ * Build one standalone Node-only live-service vendor proof project.
2436
2512
  *
2437
- * @returns The emitted `service` project definition.
2513
+ * @param name - The bounded vendor directory name.
2514
+ * @returns The emitted `service:<name>` project definition.
2438
2515
  *
2439
2516
  * @example
2440
2517
  * ```ts
2441
- * serviceViteProject().includes("label: 'service'") // true
2518
+ * serviceViteProject('claude').includes("label: 'service:claude'") // true
2442
2519
  * ```
2443
2520
  */
2444
- export declare function serviceViteProject(): string;
2521
+ export declare function serviceViteProject(name: string): string;
2445
2522
 
2446
2523
  /** Immutable official actions/setup-node v6.4.0 commit used by generated CI. */
2447
2524
  export declare const SETUP_NODE_ACTION_SHA = "48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e";
@@ -2832,7 +2909,8 @@ export declare function coreViteConfig(): string;
2832
2909
  * Optional structural facts consumed by a generated root Vite configuration.
2833
2910
  *
2834
2911
  * @remarks
2835
- * `bin`, `integration`, and `service` select their matching projects.
2912
+ * `bin` and `integration` select their matching projects. `services` is the
2913
+ * sorted list of vendor projects derived from `tests/service/<name>` directories.
2836
2914
  * `global` records the physical `tests/setupGlobal.ts` module and wires it
2837
2915
  * into every selected project that consumes that shared setup. `showcase`
2838
2916
  * records the physical app showcase wrapper and selects its browser machinery.
@@ -2840,7 +2918,7 @@ export declare function coreViteConfig(): string;
2840
2918
  export declare interface ViteFacts {
2841
2919
  readonly bin?: boolean;
2842
2920
  readonly integration?: boolean;
2843
- readonly service?: boolean;
2921
+ readonly services?: readonly string[];
2844
2922
  readonly global?: boolean;
2845
2923
  readonly showcase?: boolean;
2846
2924
  }