@orkestrel/scaffold 0.0.62 → 0.0.64

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 (52) hide show
  1. package/README.md +18 -103
  2. package/dist/bin/main.js +95 -27
  3. package/dist/bin/main.js.map +1 -1
  4. package/dist/host/AGENTS.md +2 -2
  5. package/dist/host/CLAUDE.md +6 -0
  6. package/dist/host/agents/orchestration.md +23 -15
  7. package/dist/host/agents/skills/enterprise-bootstrap/references/bootstrap-reference.md +16 -16
  8. package/dist/host/agents/skills/enterprise-bootstrap/references/frontend-design.md +6 -6
  9. package/dist/host/agents/skills/enterprise-bootstrap/references/utilities.md +4 -4
  10. package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +5 -5
  11. package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +1 -1
  12. package/dist/host/agents/skills/orkestrel-publish/SKILL.md +15 -15
  13. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +43 -17
  14. package/dist/host/agents/skills/orkestrel-publish/references/window.md +41 -16
  15. package/dist/host/claude/agents/orkestrel.md +56 -56
  16. package/dist/host/claude/agents/reviewer.md +13 -0
  17. package/dist/host/claude/rules/architecture.md +51 -45
  18. package/dist/host/claude/rules/documentation.md +18 -1
  19. package/dist/host/claude/rules/portability.md +2 -0
  20. package/dist/host/claude/rules/quality.md +1 -1
  21. package/dist/host/claude/rules/tests.md +12 -11
  22. package/dist/host/claude/rules/typescript.md +5 -0
  23. package/dist/host/claude/rules/workspace.md +23 -18
  24. package/dist/host/claude/rules/writing.md +4 -0
  25. package/dist/host/codex/agents/orkestrel.toml +3 -3
  26. package/dist/host/codex/agents/reviewer.toml +4 -2
  27. package/dist/host/configs/helpers.ts +311 -2
  28. package/dist/host/configs/policy.ts +1100 -51
  29. package/dist/host/dotfiles/oxlintrc.json +72 -1
  30. package/dist/host/guides/guide.md +749 -222
  31. package/dist/host/guides/scaffold.md +472 -378
  32. package/dist/host/manifest.json +34 -33
  33. package/dist/host/scripts/codex.sh +0 -0
  34. package/dist/host/scripts/cursor.sh +0 -0
  35. package/dist/host/scripts/deps.sh +0 -0
  36. package/dist/host/scripts/ollama.sh +0 -0
  37. package/dist/host/tests/config.test.ts +1200 -16
  38. package/dist/host/tests/policy.test.ts +157 -173
  39. package/dist/host/tests/setupPolicy.ts +522 -1007
  40. package/dist/src/core/index.cjs +373 -279
  41. package/dist/src/core/index.cjs.map +1 -1
  42. package/dist/src/core/index.d.cts +130 -120
  43. package/dist/src/core/index.d.ts +130 -120
  44. package/dist/src/core/index.js +373 -278
  45. package/dist/src/core/index.js.map +1 -1
  46. package/dist/src/server/index.cjs +28 -21
  47. package/dist/src/server/index.cjs.map +1 -1
  48. package/dist/src/server/index.d.cts +38 -33
  49. package/dist/src/server/index.d.ts +38 -33
  50. package/dist/src/server/index.js +28 -21
  51. package/dist/src/server/index.js.map +1 -1
  52. package/package.json +17 -18
@@ -1835,11 +1835,11 @@ function stageBytes(host, root, destinations) {
1835
1835
  * such a path is skipped. A path either list names itself is curated data
1836
1836
  * rather than discovery, so it is staged or the stage is refused.
1837
1837
  *
1838
- * @example
1838
+ * @example Vendored data root
1839
1839
  * ```ts
1840
1840
  * import { stageHost } from '@orkestrel/scaffold/server'
1841
1841
  *
1842
- * stageHost(process.cwd(), 'dist/host').length // the files staged
1842
+ * stageHost(process.cwd(), 'dist/host') // one ManifestEntry per file staged
1843
1843
  * ```
1844
1844
  */
1845
1845
  function stageHost(checkout, host) {
@@ -2728,7 +2728,9 @@ var WriteTransaction = class {
2728
2728
  * declare const plan: Plan
2729
2729
  *
2730
2730
  * const materializer = new Materializer({ host: './dist/host' })
2731
- * materializer.materialize(plan, './packages/router')
2731
+ * const result = materializer.materialize(plan, './packages/router')
2732
+ *
2733
+ * result.written // every path created
2732
2734
  * materializer.destroy()
2733
2735
  * ```
2734
2736
  */
@@ -2803,8 +2805,7 @@ var Materializer = class {
2803
2805
  *
2804
2806
  * @param plan - The compiled plan to compare.
2805
2807
  * @param target - The directory to inspect.
2806
- * @returns One finding per hydrated planned path, plus the foreign files
2807
- * beneath owned host roots and inside the instruction canon.
2808
+ * @returns Findings for hydrated planned paths and selected foreign candidates.
2808
2809
  * @throws {@link ScaffoldError} coded `INVALID` when an argument is not the
2809
2810
  * exact shape, `TARGET` when the host or target cannot be read within its
2810
2811
  * bounds, and `DESTROYED` after teardown.
@@ -2812,10 +2813,10 @@ var Materializer = class {
2812
2813
  * @remarks
2813
2814
  * Host directories expand before the target is read, so this method and
2814
2815
  * {@link repair} compare the same paths with the same ownership. Foreign
2815
- * candidates are files beneath those expanded roots and files the target holds
2816
- * at a `CANON_PATHS` member, each in a group the plan selects; a file outside
2817
- * both populations never becomes a deletion candidate merely because its group
2818
- * is selected.
2816
+ * candidates are files beneath those expanded roots and files the target holds at
2817
+ * a `CANON_PATHS` member. A
2818
+ * file outside these populations never becomes a deletion candidate merely
2819
+ * because its group is selected.
2819
2820
  *
2820
2821
  * The canon is staged for reading rather than for a target, so a copy of one of
2821
2822
  * its paths sitting in a target is a superseded artifact and reports foreign. A
@@ -3020,13 +3021,12 @@ var Materializer = class {
3020
3021
  * recovery mechanism, so a path it cannot restore is not one this verb takes.
3021
3022
  * A tree carrying uncommitted work is refused whole for the same reason.
3022
3023
  *
3023
- * One candidate list carries both foreign populations {@link audit} reports, so
3024
- * a superseded instruction copy the target holds inside the canon is deleted in
3025
- * the same transaction as a stray beneath an owned root. Membership decides it,
3026
- * never byte identity: a copy a release behind no longer matches the bytes the
3027
- * canon now stages, and matching bytes is exactly how such a copy would be
3028
- * spared. An untracked leftover is left where it sits and stays a finding, which
3029
- * is the seam a maintainer keeps a git-ignored file in.
3024
+ * The candidate list carries every foreign population {@link audit} reports. A
3025
+ * superseded instruction copy inside the canon and a stray beneath an owned root
3026
+ * therefore follow the same transaction rules.
3027
+ * Membership decides it, never byte identity. An untracked leftover stays in
3028
+ * place and remains a finding, which is the seam a maintainer uses to keep a
3029
+ * git-ignored file.
3030
3030
  *
3031
3031
  * The whole call refuses when the preview disagrees with the re-derivation on
3032
3032
  * any foreign finding, including one the deletion itself would skip, because a
@@ -3498,22 +3498,26 @@ var Materializer = class {
3498
3498
  `\`${entry.name}\``,
3499
3499
  this.#cell(entry.note),
3500
3500
  "",
3501
+ "",
3501
3502
  ""
3502
3503
  ];
3503
3504
  const layer = placed.get(entry.name);
3504
3505
  const edges = entry.dependencies.map((dependency) => `\`${dependency.name}\` \`${dependency.range}\``).join(", ");
3506
+ const peers = entry.peers.map((dependency) => `\`${dependency.name}\` \`${dependency.range}\``).join(", ");
3505
3507
  return [
3506
3508
  `\`${entry.name}\``,
3507
3509
  `\`${entry.version}\``,
3508
3510
  layer === void 0 ? "" : `L${String(layer)}`,
3509
- edges
3511
+ edges,
3512
+ peers
3510
3513
  ];
3511
3514
  });
3512
3515
  const headers = [
3513
3516
  "Package",
3514
3517
  "Version",
3515
3518
  "Layer",
3516
- "Runtime dependencies"
3519
+ "Runtime dependencies",
3520
+ "Peer dependencies"
3517
3521
  ];
3518
3522
  const widths = headers.map((header, column) => {
3519
3523
  let width = Math.max(3, header.length);
@@ -3604,6 +3608,8 @@ var Materializer = class {
3604
3608
  *
3605
3609
  * const upstream = new Upstream({ registry: { timeout: 5_000 } })
3606
3610
  * const releases = await upstream.lookup([{ name: '@orkestrel/emitter', range: '^0.0.5' }])
3611
+ *
3612
+ * releases.filter((release) => release.lookup === 'found')
3607
3613
  * upstream.destroy()
3608
3614
  * ```
3609
3615
  */
@@ -3990,7 +3996,8 @@ var Upstream = class {
3990
3996
  name,
3991
3997
  lookup: "found",
3992
3998
  version,
3993
- dependencies: this.#edges(outcome.content, version)
3999
+ dependencies: this.#edges(outcome.content, version, "dependencies"),
4000
+ peers: this.#edges(outcome.content, version, "peerDependencies")
3994
4001
  };
3995
4002
  return {
3996
4003
  name,
@@ -3998,14 +4005,14 @@ var Upstream = class {
3998
4005
  note: outcome.lookup === "found" ? UNREADABLE_VERSION_NOTE : outcome.note
3999
4006
  };
4000
4007
  }
4001
- #edges(content, version) {
4008
+ #edges(content, version, section) {
4002
4009
  const parsed = (0, _orkestrel_contract.parseJSON)(content);
4003
4010
  if (!(0, _orkestrel_contract.isRecord)(parsed)) return [];
4004
4011
  const versions = parsed.versions;
4005
4012
  if (!(0, _orkestrel_contract.isRecord)(versions)) return [];
4006
4013
  const manifest = versions[version];
4007
4014
  if (!(0, _orkestrel_contract.isRecord)(manifest)) return [];
4008
- const declared = manifest.dependencies;
4015
+ const declared = manifest[section];
4009
4016
  if (!(0, _orkestrel_contract.isRecord)(declared)) return [];
4010
4017
  const edges = [];
4011
4018
  for (const [name, range] of Object.entries(declared)) {