@azure-id/orc 1.7.0 → 1.8.1

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 (63) hide show
  1. package/CHANGELOG.md +3649 -3339
  2. package/README-id.md +923 -844
  3. package/README.md +836 -860
  4. package/bin/build-agents.js +43 -27
  5. package/bin/cli.js +701 -3
  6. package/bin/graph-extract.js +927 -0
  7. package/bin/graph-notes.js +188 -0
  8. package/bin/graph-query.js +808 -0
  9. package/bin/graph-resolve.js +178 -0
  10. package/bin/graph-signals.js +277 -0
  11. package/bin/graph.js +605 -0
  12. package/bin/verify-contracts.js +4669 -4527
  13. package/bin/verify-package.js +626 -616
  14. package/bin/webui/api.js +1419 -1414
  15. package/bin/webui/fixtures/index.js +579 -576
  16. package/bin/webui/fixtures/knowledge.js +316 -291
  17. package/bin/webui/i18n/en/knowledge.json +167 -151
  18. package/bin/webui/i18n/en/overview.json +101 -100
  19. package/bin/webui/i18n/id/knowledge.json +167 -151
  20. package/bin/webui/i18n/id/overview.json +101 -100
  21. package/bin/webui/js/panels/knowledge.js +1065 -1006
  22. package/bin/webui/js/panels/overview.js +492 -488
  23. package/package.json +39 -39
  24. package/templates/agents/MODEL-MAPPING.md +163 -158
  25. package/templates/agents/orc-executor-haiku-4-5.md +133 -113
  26. package/templates/agents/orc-executor-opus-4-7-high.md +134 -114
  27. package/templates/agents/orc-executor-opus-4-7-med.md +134 -114
  28. package/templates/agents/orc-executor-opus-4-8-high.md +134 -114
  29. package/templates/agents/orc-executor-opus-5-high.md +134 -114
  30. package/templates/agents/orc-executor-opus-5-low.md +134 -114
  31. package/templates/agents/orc-executor-opus-5-med.md +134 -114
  32. package/templates/agents/orc-executor-sonnet-4-6-high.md +134 -114
  33. package/templates/agents/orc-executor-sonnet-4-6-med.md +134 -114
  34. package/templates/agents/orc-executor-sonnet-5-high.md +134 -114
  35. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +86 -0
  36. package/templates/hooks/README.md +444 -396
  37. package/templates/hooks/orc-graph-hook.js +336 -0
  38. package/templates/hooks/orc-statusline-render.js +922 -921
  39. package/templates/hooks/orc-statusline.js +1596 -1545
  40. package/templates/skills/_shared/README.md +4 -0
  41. package/templates/skills/_shared/code-graph.md +220 -0
  42. package/templates/skills/_shared/extra-dispatch.md +1 -1
  43. package/templates/skills/_shared/opus5-only.md +4 -0
  44. package/templates/skills/_shared/phases/execution.md +166 -145
  45. package/templates/skills/_shared/phases/planning.md +142 -135
  46. package/templates/skills/_shared/phases/preflight.md +132 -118
  47. package/templates/skills/_shared/phases/review.md +63 -53
  48. package/templates/skills/_shared/phases/rules.md +5 -0
  49. package/templates/skills/_shared/phases/ship.md +96 -88
  50. package/templates/skills/_shared/phases/trace.md +6 -0
  51. package/templates/skills/_shared/phases/wiki-consult.md +194 -189
  52. package/templates/skills/_shared/read-ladder.md +124 -102
  53. package/templates/skills/_shared/return-validation.md +259 -250
  54. package/templates/skills/orc/SKILL.md +255 -254
  55. package/templates/skills/orc/references/preflight-report.md +6 -0
  56. package/templates/skills/orc/subskills/orc-execution/SKILL.md +2 -1
  57. package/templates/skills/orc/subskills/orc-execution/core.md +9 -1
  58. package/templates/skills/orc-diy/references/flow-schema.md +101 -100
  59. package/templates/skills/orc-fast/SKILL.md +236 -229
  60. package/templates/skills/orc-mini/SKILL.md +267 -259
  61. package/templates/skills/orc-quick/SKILL.md +378 -360
  62. package/templates/skills/orc-quick/references/dispatch-gate.md +6 -0
  63. package/templates/skills/orc-wiki/references/staleness.md +294 -288
@@ -49,9 +49,17 @@ const VARIANTS = [
49
49
  { name: "orc-executor-opus-4-7-med", model: "claude-opus-4-7", effort: "medium", band: "no default band — reachable via rubric_bands_override, orc diy fixed_executor, or extra_fallback_agent" },
50
50
  ];
51
51
 
52
+ // Line endings are NOT content here: .gitattributes stores these files with LF
53
+ // and checks them out native, so a Windows worktree is CRLF and a Linux one LF.
54
+ // The injected frontmatter line therefore borrows the TEMPLATE's own ending, and
55
+ // --check compares LF-normalized text — otherwise the guard fails on Windows for
56
+ // a difference git itself does not record.
57
+ const eolOf = (s) => (/\r\n/.test(s) ? "\r\n" : "\n");
58
+ const lf = (s) => s.replace(/\r\n/g, "\n");
59
+
52
60
  function render(template, v) {
53
61
  const effortDesc = v.effort ? `, ${v.effort} effort` : " (no effort ladder)";
54
- const effortFm = v.effort ? `effort: ${v.effort}\n` : "";
62
+ const effortFm = v.effort ? `effort: ${v.effort}${eolOf(template)}` : "";
55
63
  return template
56
64
  .replace(/\{\{NAME\}\}/g, v.name)
57
65
  .replace(/\{\{MODEL\}\}/g, v.model)
@@ -60,34 +68,42 @@ function render(template, v) {
60
68
  .replace(/\{\{BAND\}\}/g, v.band);
61
69
  }
62
70
 
63
- const checkMode = process.argv.includes("--check");
64
- const template = fs.readFileSync(TEMPLATE, "utf8");
65
- if (/\{\{(?!NAME|MODEL|EFFORT_DESC|EFFORT_FM|BAND)\w/.test(template)) {
66
- console.error("❌ build-agents: unknown {{placeholder}} in executor.template.md");
67
- process.exit(1);
68
- }
71
+ function main() {
72
+ const checkMode = process.argv.includes("--check");
73
+ const template = fs.readFileSync(TEMPLATE, "utf8");
74
+ if (/\{\{(?!NAME|MODEL|EFFORT_DESC|EFFORT_FM|BAND)\w/.test(template)) {
75
+ console.error("❌ build-agents: unknown {{placeholder}} in executor.template.md");
76
+ process.exit(1);
77
+ }
69
78
 
70
- let drifted = 0;
71
- for (const v of VARIANTS) {
72
- const out = render(template, v);
73
- const dest = path.join(OUT_DIR, v.name + ".md");
74
- if (checkMode) {
75
- const current = fs.existsSync(dest) ? fs.readFileSync(dest, "utf8") : null;
76
- if (current !== out) {
77
- drifted++;
78
- console.error(
79
- `❌ generated agent drifted: templates/agents/${v.name}.md\n` +
80
- ` Executor agents are GENERATED — edit agents-src/executor.template.md\n` +
81
- ` (or bin/build-agents.js VARIANTS) and run: npm run build:agents`
82
- );
79
+ let drifted = 0;
80
+ for (const v of VARIANTS) {
81
+ const out = render(template, v);
82
+ const dest = path.join(OUT_DIR, v.name + ".md");
83
+ if (checkMode) {
84
+ const current = fs.existsSync(dest) ? fs.readFileSync(dest, "utf8") : null;
85
+ if (current === null || lf(current) !== lf(out)) {
86
+ drifted++;
87
+ console.error(
88
+ `❌ generated agent drifted: templates/agents/${v.name}.md\n` +
89
+ ` Executor agents are GENERATED — edit agents-src/executor.template.md\n` +
90
+ ` (or bin/build-agents.js VARIANTS) and run: npm run build:agents`
91
+ );
92
+ }
93
+ } else {
94
+ fs.writeFileSync(dest, out);
95
+ console.log(` gen templates/agents/${v.name}.md`);
83
96
  }
84
- } else {
85
- fs.writeFileSync(dest, out);
86
- console.log(` gen templates/agents/${v.name}.md`);
87
97
  }
88
- }
89
98
 
90
- if (checkMode) {
91
- if (drifted) process.exit(1);
92
- console.log(`✅ ORC executor agents OK — ${VARIANTS.length} files match the template.`);
99
+ if (checkMode) {
100
+ if (drifted) process.exit(1);
101
+ console.log(`✅ ORC executor agents OK — ${VARIANTS.length} files match the template.`);
102
+ }
93
103
  }
104
+
105
+ // Required by test/payload.test.js, which checks the line-ending rule above
106
+ // without writing to templates/agents/.
107
+ module.exports = { VARIANTS, render, lf, eolOf };
108
+
109
+ if (require.main === module) main();