@azure-id/orc 1.7.1 → 1.8.2

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 +3869 -3381
  2. package/README-id.md +942 -844
  3. package/README.md +882 -788
  4. package/bin/build-agents.js +43 -27
  5. package/bin/cli.js +45460 -44169
  6. package/bin/graph-extract.js +3216 -0
  7. package/bin/graph-gain.js +404 -0
  8. package/bin/graph-map.js +232 -0
  9. package/bin/graph-notes.js +229 -0
  10. package/bin/graph-query.js +1770 -0
  11. package/bin/graph-resolve.js +255 -0
  12. package/bin/graph-shard.js +325 -0
  13. package/bin/graph-signals.js +277 -0
  14. package/bin/graph.js +658 -0
  15. package/bin/verify-contracts.js +4809 -4553
  16. package/bin/verify-package.js +640 -616
  17. package/bin/webui/api.js +1425 -1414
  18. package/bin/webui/fixtures/index.js +584 -576
  19. package/bin/webui/fixtures/knowledge.js +356 -291
  20. package/bin/webui/fixtures/stats.js +107 -104
  21. package/bin/webui/i18n/en/knowledge.json +182 -151
  22. package/bin/webui/i18n/en/overview.json +101 -100
  23. package/bin/webui/i18n/id/knowledge.json +182 -151
  24. package/bin/webui/i18n/id/overview.json +101 -100
  25. package/bin/webui/js/panels/knowledge.js +1130 -1006
  26. package/bin/webui/js/panels/overview.js +492 -488
  27. package/package.json +39 -39
  28. package/templates/agents/MODEL-MAPPING.md +163 -158
  29. package/templates/agents/orc-executor-haiku-4-5.md +128 -121
  30. package/templates/agents/orc-executor-opus-4-7-high.md +129 -122
  31. package/templates/agents/orc-executor-opus-4-7-med.md +129 -122
  32. package/templates/agents/orc-executor-opus-4-8-high.md +129 -122
  33. package/templates/agents/orc-executor-opus-5-high.md +129 -122
  34. package/templates/agents/orc-executor-opus-5-low.md +129 -122
  35. package/templates/agents/orc-executor-opus-5-med.md +129 -122
  36. package/templates/agents/orc-executor-sonnet-4-6-high.md +129 -122
  37. package/templates/agents/orc-executor-sonnet-4-6-med.md +129 -122
  38. package/templates/agents/orc-executor-sonnet-5-high.md +129 -122
  39. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +89 -0
  40. package/templates/hooks/README.md +454 -396
  41. package/templates/hooks/orc-graph-hook.js +471 -0
  42. package/templates/hooks/orc-statusline-render.js +922 -921
  43. package/templates/hooks/orc-statusline.js +1596 -1545
  44. package/templates/skills/_shared/README.md +4 -0
  45. package/templates/skills/_shared/code-graph.md +348 -0
  46. package/templates/skills/_shared/opus5-only.md +4 -0
  47. package/templates/skills/_shared/phases/execution.md +168 -147
  48. package/templates/skills/_shared/phases/planning.md +149 -135
  49. package/templates/skills/_shared/phases/preflight.md +132 -118
  50. package/templates/skills/_shared/phases/review.md +63 -53
  51. package/templates/skills/_shared/phases/ship.md +100 -88
  52. package/templates/skills/_shared/phases/trace.md +8 -0
  53. package/templates/skills/_shared/phases/wiki-consult.md +194 -189
  54. package/templates/skills/_shared/read-ladder.md +132 -102
  55. package/templates/skills/_shared/return-validation.md +259 -250
  56. package/templates/skills/orc/SKILL.md +255 -254
  57. package/templates/skills/orc-analyze/SKILL.md +13 -13
  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 -361
  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();