@orkestrel/scaffold 0.0.50 → 0.0.52

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/dist/bin/main.js +46 -17
  2. package/dist/bin/main.js.map +1 -1
  3. package/dist/host/AGENTS.md +2 -2
  4. package/dist/host/CLAUDE.md +3 -1
  5. package/dist/host/agents/orchestration.md +109 -274
  6. package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +12 -8
  7. package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +2 -2
  8. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +15 -11
  9. package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +38 -12
  10. package/dist/host/agents/skills/orkestrel-debrief/references/retention.md +107 -0
  11. package/dist/host/agents/skills/{orkestrel-human-journey → orkestrel-prove-journey}/SKILL.md +1 -1
  12. package/dist/host/agents/skills/{orkestrel-human-journey → orkestrel-prove-journey}/agents/openai.yaml +1 -1
  13. package/dist/host/agents/skills/orkestrel-publish/SKILL.md +77 -0
  14. package/dist/host/agents/skills/orkestrel-publish/agents/openai.yaml +4 -0
  15. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +97 -0
  16. package/dist/host/agents/skills/orkestrel-publish/references/window.md +95 -0
  17. package/dist/host/agents/templates/brief.md +157 -0
  18. package/dist/host/{codex/agents/claude.toml → agents/transports/claude.md} +16 -10
  19. package/dist/host/{claude/agents → agents/transports}/codex.md +13 -12
  20. package/dist/host/claude/agents/analyst.md +11 -10
  21. package/dist/host/claude/agents/application.md +6 -3
  22. package/dist/host/claude/agents/builder.md +11 -10
  23. package/dist/host/claude/agents/checker.md +20 -10
  24. package/dist/host/claude/agents/grok.md +8 -7
  25. package/dist/host/claude/agents/implementer.md +7 -4
  26. package/dist/host/claude/agents/orkestrel.md +27 -21
  27. package/dist/host/claude/agents/planner.md +13 -5
  28. package/dist/host/claude/agents/researcher.md +8 -7
  29. package/dist/host/claude/agents/reviewer.md +6 -4
  30. package/dist/host/claude/agents/scout.md +6 -7
  31. package/dist/host/claude/agents/sol.md +9 -8
  32. package/dist/host/claude/agents/verifier.md +6 -3
  33. package/dist/host/claude/rules/architecture.md +6 -6
  34. package/dist/host/claude/rules/documentation.md +2 -0
  35. package/dist/host/claude/rules/tests.md +4 -2
  36. package/dist/host/claude/rules/workspace.md +1 -1
  37. package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +12 -8
  38. package/dist/host/claude/skills/orkestrel-debrief/SKILL.md +1 -1
  39. package/dist/host/claude/skills/{orkestrel-human-journey → orkestrel-prove-journey}/SKILL.md +2 -2
  40. package/dist/host/claude/skills/orkestrel-publish/SKILL.md +12 -0
  41. package/dist/host/codex/agents/analyst.toml +3 -0
  42. package/dist/host/codex/agents/application.toml +3 -0
  43. package/dist/host/codex/agents/builder.toml +10 -7
  44. package/dist/host/codex/agents/checker.toml +14 -3
  45. package/dist/host/codex/agents/grok.toml +5 -2
  46. package/dist/host/codex/agents/implementer.toml +3 -2
  47. package/dist/host/codex/agents/opus.toml +4 -3
  48. package/dist/host/codex/agents/orkestrel.toml +14 -9
  49. package/dist/host/codex/agents/planner.toml +7 -5
  50. package/dist/host/codex/agents/researcher.toml +6 -4
  51. package/dist/host/codex/agents/reviewer.toml +4 -3
  52. package/dist/host/codex/agents/scout.toml +4 -1
  53. package/dist/host/codex/agents/verifier.toml +3 -2
  54. package/dist/host/codex/config.toml +1 -1
  55. package/dist/host/guides/scaffold.md +48 -44
  56. package/dist/host/manifest.json +132 -84
  57. package/dist/host/tests/config.test.ts +57 -0
  58. package/dist/src/core/index.cjs +455 -406
  59. package/dist/src/core/index.cjs.map +1 -1
  60. package/dist/src/core/index.d.cts +51 -48
  61. package/dist/src/core/index.d.ts +51 -48
  62. package/dist/src/core/index.js +455 -406
  63. package/dist/src/core/index.js.map +1 -1
  64. package/package.json +2 -2
  65. /package/dist/host/agents/skills/{orkestrel-human-journey → orkestrel-prove-journey}/references/captures.md +0 -0
  66. /package/dist/host/agents/skills/{orkestrel-human-journey → orkestrel-prove-journey}/references/layer.md +0 -0
package/dist/bin/main.js CHANGED
@@ -832,7 +832,9 @@ var CLI = class CLI {
832
832
  pins: versions.pins,
833
833
  scripts: blueprintToWritableScripts(blueprint)
834
834
  }, target));
835
- const [terminal] = this.#survey(host.materializer, this.#derive(target), target, groups);
835
+ const terminalBlueprint = this.#derive(target);
836
+ const [measured] = this.#survey(host.materializer, terminalBlueprint, target, groups);
837
+ const terminal = this.#appendQuestions(measured, target, terminalBlueprint, groups);
836
838
  const outcome = {
837
839
  ...result,
838
840
  audit: terminal,
@@ -927,7 +929,8 @@ var CLI = class CLI {
927
929
  } : worktree, target);
928
930
  const offline = this.#merge(repaired, removed);
929
931
  const online = command.offline === true ? await this.#offline(host.materializer, target, declared, host.baseline) : await this.#reconcile(host.materializer, target, declared, host.baseline, host.forced);
930
- const [terminal] = this.#survey(host.materializer, blueprint, target, groups);
932
+ const [measured] = this.#survey(host.materializer, blueprint, target, groups);
933
+ const terminal = this.#appendQuestions(measured, target, blueprint, groups);
931
934
  const outcome = {
932
935
  ...online,
933
936
  ...this.#merge(offline, online),
@@ -1463,27 +1466,42 @@ var CLI = class CLI {
1463
1466
  blocking: false,
1464
1467
  groups: ["configs"]
1465
1468
  };
1466
- const missing = [...expectedLines].filter(([project]) => !reachable.has(project)).sort(([left], [right]) => left.localeCompare(right));
1467
- if (missing.length === 0) return void 0;
1468
- const names = missing.map(([project]) => project);
1469
- const unscripted = missing.filter(([project]) => !isString(scripts[`test:${project}`]));
1470
- const ungated = missing.filter(([project]) => isString(scripts[`test:${project}`]));
1471
- const remedies = [];
1472
- if (ungated.length > 0) {
1473
- const declared = ungated.map(([project]) => `test:${project}`);
1474
- remedies.push(`${declared.join(", ")} ${declared.length === 1 ? "is" : "are"} already declared, so the gate is missing rather than the script: invoke ${declared.length === 1 ? "it" : "each of them"} by name from the ${gateNames} chain.`);
1475
- }
1476
- if (unscripted.length > 0) {
1477
- const lines = unscripted.map(([, line]) => line);
1478
- remedies.push(`${writing ? "To continue, add" : "Add"} ${lines.length === 1 ? "this exact script line" : "these exact script lines"} to package.json: ${lines.join(" ")}`);
1479
- }
1469
+ const ungated = [...expectedLines].filter(([project]) => !reachable.has(project)).sort(([left], [right]) => left.localeCompare(right)).filter(([project]) => isString(scripts[`test:${project}`]));
1470
+ if (ungated.length === 0) return void 0;
1471
+ const names = ungated.map(([project]) => project);
1472
+ const declared = ungated.map(([project]) => `test:${project}`);
1480
1473
  return {
1481
1474
  field: "projects",
1482
- message: `${writing ? "The configs group is blocked because " : ""}the manifest at ${target} does not reach ${names.length === 1 ? "a Vitest project" : "Vitest projects"} the planned configuration registers: ${names.join(", ")}. No chain from ${gateNames} invokes ${names.length === 1 ? "it" : "them"}. ${remedies.join(" ")}${writing ? " Exclude configs from --groups to write another group." : ""}`,
1475
+ message: `${writing ? "The configs group is blocked because " : ""}the manifest at ${target} does not reach ${names.length === 1 ? "a Vitest project" : "Vitest projects"} the planned configuration registers: ${names.join(", ")}. No chain from ${gateNames} invokes ${names.length === 1 ? "it" : "them"}. ${declared.join(", ")} ${declared.length === 1 ? "is" : "are"} already declared, so the gate is missing rather than the script: invoke ${declared.length === 1 ? "it" : "each of them"} by name from the ${gateNames} chain.${writing ? " Exclude configs from --groups to write another group." : ""}`,
1483
1476
  blocking: false,
1484
1477
  groups: ["configs"]
1485
1478
  };
1486
1479
  }
1480
+ #scriptQuestion(target, blueprint) {
1481
+ const text = this.#manifest(target);
1482
+ const writable = blueprintToWritableScripts(blueprint);
1483
+ const parsed = parseJSON(text);
1484
+ const scripts = isRecord(parsed) && isRecord(parsed.scripts) ? parsed.scripts : {};
1485
+ const missing = writable.filter((script) => !Object.hasOwn(scripts, script.name));
1486
+ const differing = writable.filter((script) => {
1487
+ const value = scripts[script.name];
1488
+ return isString(value) && value !== script.command && !script.accepted.includes(value);
1489
+ });
1490
+ if (missing.length === 0 && differing.length === 0) return void 0;
1491
+ const missingNames = missing.map((script) => script.name);
1492
+ const missingLines = missing.map((script) => `${JSON.stringify(script.name)}: ${JSON.stringify(script.command)},`);
1493
+ const differingNames = differing.map((script) => script.name);
1494
+ const differingLines = differing.map((script) => {
1495
+ const value = scripts[script.name];
1496
+ return `${JSON.stringify(script.name)} declares ${JSON.stringify(value)}; planned ${JSON.stringify(script.command)}.`;
1497
+ });
1498
+ return {
1499
+ field: "scripts",
1500
+ message: [missing.length === 0 ? "" : `The manifest at ${target} does not declare ${missingNames.length === 1 ? "a planned script" : "planned scripts"}: ${missingNames.join(", ")}. Add ${missingLines.length === 1 ? "this exact script line" : "these exact script lines"} to package.json: ${missingLines.join(" ")}`, differing.length === 0 ? "" : `The manifest at ${target} declares ${differingNames.length === 1 ? "a planned script" : "planned scripts"} with ${differingNames.length === 1 ? "a differing value" : "differing values"}: ${differingNames.join(", ")}. Keep ${differingNames.length === 1 ? "the declared value" : "each declared value"} unchanged or replace ${differingNames.length === 1 ? "it" : "them"} with the planned ${differingNames.length === 1 ? "value" : "values"}: ${differingLines.join(" ")}`].filter((message) => message !== "").join(" "),
1501
+ blocking: false,
1502
+ groups: ["manifest"]
1503
+ };
1504
+ }
1487
1505
  #dependencyQuestion(target, blueprint, writing = false) {
1488
1506
  const parsed = parseJSON(this.#manifest(target));
1489
1507
  if (!isRecord(parsed)) return void 0;
@@ -1535,6 +1553,10 @@ var CLI = class CLI {
1535
1553
  }
1536
1554
  #targetQuestions(target, blueprint, groups, writing = false) {
1537
1555
  const questions = [];
1556
+ if (!writing) {
1557
+ const script = this.#scriptQuestion(target, blueprint);
1558
+ if (script !== void 0) questions.push(script);
1559
+ }
1538
1560
  const project = this.#projectQuestion(target, blueprint, writing);
1539
1561
  if (project !== void 0) questions.push(project);
1540
1562
  const dependency = this.#dependencyQuestion(target, blueprint, writing);
@@ -1550,6 +1572,13 @@ var CLI = class CLI {
1550
1572
  ...candidates === void 0 ? {} : { candidates }
1551
1573
  }));
1552
1574
  }
1575
+ #appendQuestions(audit, target, blueprint, groups) {
1576
+ const questions = this.#targetQuestions(target, blueprint, groups);
1577
+ return questions.length === 0 ? audit : {
1578
+ ...audit,
1579
+ questions: [...audit.questions, ...questions]
1580
+ };
1581
+ }
1553
1582
  #assertTarget(target, blueprint, groups) {
1554
1583
  const questions = this.#targetQuestions(target, blueprint, groups, true);
1555
1584
  if (questions.length === 0) return;