@azure-id/orc 2.0.2 → 2.1.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 (129) hide show
  1. package/CHANGELOG.md +455 -0
  2. package/README-id.md +52 -23
  3. package/README.md +36 -20
  4. package/bin/build-agents.js +205 -206
  5. package/bin/clear-logs.js +620 -0
  6. package/bin/cli.js +47417 -46420
  7. package/bin/fix.js +459 -0
  8. package/bin/gotcha.js +288 -8
  9. package/bin/habit.js +1538 -1453
  10. package/bin/mockrun-catalog.js +3 -0
  11. package/bin/onboarding-content.js +2 -1
  12. package/bin/pricing.json +28 -21
  13. package/bin/trace-write.js +869 -657
  14. package/bin/verify-contracts.js +5552 -5471
  15. package/bin/verify-package.js +716 -705
  16. package/bin/webui/api.js +125 -6
  17. package/bin/webui/css/panels/hookui.css +79 -0
  18. package/bin/webui/fixtures/behaviour.js +30 -0
  19. package/bin/webui/fixtures/extra.js +2036 -2036
  20. package/bin/webui/fixtures/flow.js +81 -81
  21. package/bin/webui/fixtures/hookui.js +506 -431
  22. package/bin/webui/fixtures/index.js +32 -3
  23. package/bin/webui/fixtures/knowledge.js +2 -2
  24. package/bin/webui/fixtures/maintenance.js +123 -42
  25. package/bin/webui/fixtures/rules.js +1007 -1002
  26. package/bin/webui/fixtures/settings.js +6 -7
  27. package/bin/webui/fixtures/stats.js +9 -6
  28. package/bin/webui/fixtures/wait.js +98 -97
  29. package/bin/webui/i18n/en/behaviour.json +13 -0
  30. package/bin/webui/i18n/en/hookui.json +290 -194
  31. package/bin/webui/i18n/en/maintenance.json +71 -52
  32. package/bin/webui/i18n/en/settings.json +60 -60
  33. package/bin/webui/i18n/id/behaviour.json +13 -0
  34. package/bin/webui/i18n/id/hookui.json +290 -194
  35. package/bin/webui/i18n/id/maintenance.json +71 -52
  36. package/bin/webui/i18n/id/settings.json +60 -60
  37. package/bin/webui/js/05-banners.js +181 -172
  38. package/bin/webui/js/06-edit.js +193 -183
  39. package/bin/webui/js/panels/behaviour.js +77 -12
  40. package/bin/webui/js/panels/hookui.js +2196 -1691
  41. package/bin/webui/js/panels/maintenance.js +336 -235
  42. package/bin/webui/js/panels/settings.js +726 -719
  43. package/mock-run/INDEX.md +1 -0
  44. package/mock-run/a-normal-day.md +2 -2
  45. package/mock-run/extra-slots.md +177 -177
  46. package/mock-run/habits.md +1 -1
  47. package/mock-run/orc-aftermath.md +392 -392
  48. package/mock-run/orc-budget.md +29 -33
  49. package/mock-run/orc-cli.md +200 -200
  50. package/mock-run/orc-explain.md +86 -86
  51. package/mock-run/orc-extra.md +389 -392
  52. package/mock-run/orc-fast.md +2 -2
  53. package/mock-run/orc-fix.md +87 -0
  54. package/mock-run/orc-pattern.md +112 -112
  55. package/mock-run/orc-quick.md +146 -146
  56. package/mock-run/orc.md +4 -4
  57. package/package.json +1 -1
  58. package/templates/agents/MODEL-MAPPING.md +176 -173
  59. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -2
  60. package/templates/agents/{orc-claude-writer-opus-5-med.md → orc-claude-writer-opus-5-low.md} +4 -4
  61. package/templates/agents/orc-executor-haiku-4-5.md +1 -1
  62. package/templates/agents/orc-executor-opus-5-low.md +1 -1
  63. package/templates/agents/orc-executor-sonnet-4-6-high.md +1 -1
  64. package/templates/agents/orc-executor-sonnet-4-6-med.md +1 -1
  65. package/templates/agents/orc-executor-sonnet-5-high.md +2 -2
  66. package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
  67. package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
  68. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +2 -2
  69. package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -2
  70. package/templates/agents/{orc-recon-sonnet-4-6-med.md → orc-recon-sonnet-5-med.md} +4 -4
  71. package/templates/agents/orc-retro-sonnet-5-high.md +2 -2
  72. package/templates/agents/{orc-reviewer-opus-5-med.md → orc-reviewer-opus-5-low.md} +4 -4
  73. package/templates/agents/{orc-wiki-scanner-opus-5-med.md → orc-wiki-scanner-opus-5-low.md} +3 -3
  74. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +2 -2
  75. package/templates/commands/orc-fast.md +10 -10
  76. package/templates/commands/orc-fix.md +18 -0
  77. package/templates/commands/orc-wiki.md +64 -64
  78. package/templates/hooks/README.md +75 -7
  79. package/templates/hooks/orc-session-hook.js +78 -3
  80. package/templates/hooks/orc-statusline-render.js +317 -23
  81. package/templates/hooks/orc-statusline.js +162 -49
  82. package/templates/hooks/orc-subagent-line.js +23 -5
  83. package/templates/hooks/orc-weather-fetch.js +123 -0
  84. package/templates/skills/_shared/extra-dispatch.md +1331 -1331
  85. package/templates/skills/_shared/gotchas.md +27 -7
  86. package/templates/skills/_shared/habits.md +2 -2
  87. package/templates/skills/_shared/opus5-only.md +137 -137
  88. package/templates/skills/_shared/phases/review.md +2 -2
  89. package/templates/skills/_shared/phases/trace-verbs.md +17 -3
  90. package/templates/skills/_shared/phases/trace.md +136 -136
  91. package/templates/skills/_shared/review-slice.md +28 -1
  92. package/templates/skills/_shared/wait.md +1 -0
  93. package/templates/skills/orc/README.md +2 -2
  94. package/templates/skills/orc/SKILL.md +227 -227
  95. package/templates/skills/orc/config.md +25 -27
  96. package/templates/skills/orc/examples/full-run-mock.md +74 -73
  97. package/templates/skills/orc/references/effort-and-mode.md +222 -222
  98. package/templates/skills/orc/references/preflight-report.md +3 -3
  99. package/templates/skills/orc/references/ultra-mode.md +1 -1
  100. package/templates/skills/orc/schemas/checkpoint.md +122 -122
  101. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +3 -3
  102. package/templates/skills/orc/subskills/orc-review-verify/core.md +1 -1
  103. package/templates/skills/orc-analyze/SKILL.md +4 -2
  104. package/templates/skills/orc-claude/SKILL.md +14 -14
  105. package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
  106. package/templates/skills/orc-diy/SKILL.md +5 -5
  107. package/templates/skills/orc-fast/SKILL.md +210 -208
  108. package/templates/skills/orc-fix/SKILL.md +110 -0
  109. package/templates/skills/orc-grill/SKILL.md +232 -232
  110. package/templates/skills/orc-grill/references/grill-doc.md +1 -1
  111. package/templates/skills/orc-mini/SKILL.md +4 -4
  112. package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
  113. package/templates/skills/orc-quick/README.md +536 -536
  114. package/templates/skills/orc-quick/SKILL.md +2 -2
  115. package/templates/skills/orc-quick/references/context-doc.md +145 -145
  116. package/templates/skills/orc-quick/references/dispatch-gate.md +220 -219
  117. package/templates/skills/orc-quick/references/gh-mode.md +4 -2
  118. package/templates/skills/orc-retro/SKILL.md +1 -1
  119. package/templates/skills/orc-retro/examples/retro-mock.md +16 -16
  120. package/templates/skills/orc-wiki/README.md +325 -325
  121. package/templates/skills/orc-wiki/SKILL.md +195 -195
  122. package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
  123. package/templates/skills/orc-wiki/references/extra.md +2 -2
  124. package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
  125. package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -1
  126. package/templates/skills/orc-wiki/references/phases/phase-2.md +3 -3
  127. package/templates/skills/orc-wiki/references/phases/phase-3c.md +3 -2
  128. package/templates/agents/orc-claude-writer-opus-4-8-high.md +0 -48
  129. package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +0 -74
@@ -33,7 +33,7 @@ const config = {
33
33
  { key: "opus5_only", tier: "common", answers: [{"family":"executor-band","prio":"P1","mode":"replace"},{"family":"fixed-role-model","prio":"P1","mode":"replace"}], family: "executor-band", prio: "P1", lanes: ["orc","orc-analyze","orc-challenge","orc-claude","orc-diy","orc-doc","orc-fast","orc-mini","orc-pattern","orc-quick","orc-retro","orc-wiki"], gated_by: null, value: "true", default: false, is_overridden: true, is_shadowed: true, shadow_reason: "partly shadowed by extra_enabled — [0,30), [30,55), [50,60), [60,70) are routed to a non-Claude worker; the quick-executor, doc-writer position is held by one too (not consulted here); every other score and position still resolves here", desc: "EVERY dispatched role uses ONE model — Opus 5.5 — with EFFORT as the cost dial.", options: ["true", "false"], control: { kind: "enum", choices: ["true", "false"], min: null, max: null } },
34
34
  { key: "wiki_fresh_max", tier: "advanced", answers: [{"family":"wiki","prio":"P2","mode":"replace"}], family: "wiki", prio: "P2", lanes: ["orc","orc-fast","orc-learn","orc-wiki"], gated_by: null, value: 10, default: 10, is_overridden: false, is_shadowed: false, shadow_reason: null, desc: "Wiki freshness: commit distance < this → FRESH.", options: null, control: { kind: "int", choices: null, min: 1, max: null } },
35
35
  { key: "wiki_aging_max", tier: "advanced", answers: [{"family":"wiki","prio":"P2","mode":"replace"}], family: "wiki", prio: "P2", lanes: ["orc","orc-fast","orc-learn","orc-wiki"], gated_by: null, value: 30, default: 30, is_overridden: false, is_shadowed: false, shadow_reason: null, desc: "Wiki freshness: commit distance <= this → AGING; beyond → STALE.", options: null, control: { kind: "int", choices: null, min: 1, max: null } },
36
- { key: "log_dir", tier: "advanced", answers: [{"family":"paths","prio":"P2","mode":"replace"}], family: "paths", prio: "P2", lanes: ["context-combiner","orc","orc-aftermath","orc-analyze","orc-analyze-mini","orc-boundary","orc-brainstorm","orc-budget","orc-challenge","orc-claude","orc-diy","orc-doc","orc-explain","orc-export","orc-fast","orc-grill","orc-handoff","orc-learn","orc-mini","orc-pact","orc-pattern","orc-poly","orc-pr-driver","orc-pr-setup","orc-quick","orc-retro","orc-route","orc-verify","orc-wiki"], gated_by: null, value: ".claude/orc/logs", default: ".claude/orc/logs", is_overridden: false, is_shadowed: false, shadow_reason: null, desc: "Persistent trace folder (never auto-deleted).", options: null, control: { kind: "path", choices: null, min: null, max: null } },
36
+ { key: "log_dir", tier: "advanced", answers: [{"family":"paths","prio":"P2","mode":"replace"}], family: "paths", prio: "P2", lanes: ["context-combiner","orc","orc-aftermath","orc-analyze","orc-analyze-mini","orc-boundary","orc-brainstorm","orc-budget","orc-challenge","orc-claude","orc-diy","orc-doc","orc-explain","orc-export","orc-fast","orc-fix","orc-grill","orc-handoff","orc-learn","orc-mini","orc-pact","orc-pattern","orc-poly","orc-pr-driver","orc-pr-setup","orc-quick","orc-retro","orc-route","orc-verify","orc-wiki"], gated_by: null, value: ".claude/orc/logs", default: ".claude/orc/logs", is_overridden: false, is_shadowed: false, shadow_reason: null, desc: "Persistent trace folder (never auto-deleted).", options: null, control: { kind: "path", choices: null, min: null, max: null } },
37
37
  { key: "retro_repo", tier: "advanced", answers: [{"family":"retro","prio":"P2","mode":"replace"}], family: "retro", prio: "P2", lanes: ["orc","orc-retro"], gated_by: null, value: "azure-id/orc", default: "azure-id/orc", is_overridden: false, is_shadowed: false, shadow_reason: null, desc: "GitHub owner/repo that receives /orc-retro reports.", options: null, control: { kind: "repo", choices: null, min: null, max: null } },
38
38
  // v0.50.0 — the nine `orc extra` keys, copied from the live registry so the
39
39
  // shapes cannot drift. `extra_enabled` is TRUE here on purpose: an ARMED
@@ -47,7 +47,7 @@ const config = {
47
47
  {"key": "extra_vault_max_attempts", "tier": "advanced", answers: [{"family":"extra","prio":"P2","mode":"replace"}], family: "extra", prio: "P2", lanes: [], gated_by: "extra_enabled", "value": 10, "default": 10, "is_overridden": false, "is_shadowed": false, "shadow_reason": null, "desc": "Wrong passphrases before the encrypted key DELETES ITSELF. It is a key rather than a magic number so the count is inspectable and testable — NOT so it can be switched off; below 3 is refused. The counter stops someone at your keyboard; it does not stop someone who copies the vault file and tries offline, and scrypt's cost is the only defence there.", "options": null, "control": {"kind": "int", "choices": null, "min": 3, "max": null}},
48
48
  {"key": "extra_timeout_s", "tier": "advanced", answers: [{"family":"extra","prio":"P2","mode":"replace"}], family: "extra", prio: "P2", lanes: [], gated_by: "extra_enabled", "value": 900, "default": 900, "is_overridden": false, "is_shadowed": false, "shadow_reason": null, "desc": "Per-dispatch wall clock for a foreign worker. The child's own timeouts are DERIVED from this rather than set independently, so three timeouts cannot disagree about which one fires first.", "options": null, "control": {"kind": "int", "choices": null, "min": 30, "max": null}},
49
49
  {"key": "extra_verify_max_days", "tier": "advanced", answers: [{"family":"extra","prio":"P2","mode":"replace"}], family: "extra", prio: "P2", lanes: [], gated_by: "extra_enabled", "value": 7, "default": 7, "is_overridden": false, "is_shadowed": false, "shadow_reason": null, "desc": "Past this a profile's verification reads STALE and is re-pinged before wave 1. A STALE profile STILL ROUTES — a stale check is not a failed one (the /orc-pact UNCHECKABLE rule) — and freshness is computed on read, never stored.", "options": null, "control": {"kind": "int", "choices": null, "min": 1, "max": null}},
50
- { key: "orchestrator_model", tier: "advanced", answers: [{"family":"session","prio":"P2","mode":"replace"}], family: "session", prio: "P2", lanes: ["orc"], gated_by: null, value: "claude-opus-4-8", tierNote: null, default: "claude-opus-4-8", is_overridden: false, is_shadowed: false, shadow_reason: null, desc: "Main-session model (below Opus breaks the tier ladder).", options: null, control: { kind: "enum", choices: ["claude-opus-5-5", "claude-opus-4-8", "claude-sonnet-5"], min: null, max: null } },
50
+ { key: "orchestrator_model", tier: "advanced", answers: [{"family":"session","prio":"P2","mode":"replace"}], family: "session", prio: "P2", lanes: ["orc"], gated_by: null, value: "claude-opus-4-8", tierNote: null, default: "claude-opus-4-8", is_overridden: false, is_shadowed: false, shadow_reason: null, desc: "Main-session model (below Opus breaks the tier ladder).", options: null, control: { kind: "enum", choices: ["claude-opus-5-5", "claude-opus-4-8", "claude-sonnet-5-5"], min: null, max: null } },
51
51
  ],
52
52
  // The registry-less, hand-written key — read-only everywhere, and shadowed here.
53
53
  hand_edited: [
@@ -69,11 +69,10 @@ const config = {
69
69
  score_table: {
70
70
  active: "opus5_only",
71
71
  default: [
72
- { from: 0, to: 30, inclusive_to: false, agent: "orc-executor-haiku-4-5" },
73
- { from: 30, to: 40, inclusive_to: false, agent: "orc-executor-sonnet-4-6-med" },
74
- { from: 40, to: 55, inclusive_to: false, agent: "orc-executor-sonnet-4-6-high" },
75
- { from: 55, to: 65, inclusive_to: false, agent: "orc-executor-sonnet-5-high" },
76
- { from: 65, to: 90, inclusive_to: false, agent: "orc-executor-opus-5-low" },
72
+ { from: 0, to: 21, inclusive_to: false, agent: "orc-executor-sonnet-5-low" },
73
+ { from: 21, to: 31, inclusive_to: false, agent: "orc-executor-sonnet-5-med" },
74
+ { from: 31, to: 41, inclusive_to: false, agent: "orc-executor-sonnet-5-high" },
75
+ { from: 41, to: 90, inclusive_to: false, agent: "orc-executor-opus-5-low" },
77
76
  { from: 90, to: 100, inclusive_to: true, agent: "orc-executor-opus-5-med" },
78
77
  ],
79
78
  opus5_only: [
@@ -24,6 +24,9 @@ const stats = {
24
24
  downgrades: 3,
25
25
  unfinished: 2,
26
26
  unknown_lane: 1,
27
+ // v2.1.0 W7 — runs `orc clear logs --apply` pruned; their counts live in
28
+ // logs-rollup.json and are already inside every total above.
29
+ pruned_runs: 17,
27
30
  // v1.8.2 W4b — the code-graph row. `paid` is exact; the avoided pair is an
28
31
  // ESTIMATE and always a RANGE, which is why the panel never shows one number.
29
32
  graph: { calls: 41, runs: 6, paid: 4912, avoided_low: 18900, avoided_high: 71400, estimate: true },
@@ -69,9 +72,9 @@ const budgetForecast = {
69
72
  // A task at CONTEXT RISK — the state that cannot be designed on a small plan.
70
73
  context_risk: [{ task: "T12", agent: "orc-executor-opus-5-med", peak: 189000, window: 200000, pct: 95 }],
71
74
  bands: [
72
- { band: "[0,30)", agent: "orc-executor-haiku-4-5", count: 2, tasks: ["T01", "T02"], samples: 9, p50: { input: 1200, cache_write: 6400, cache_read: 11800, output: 900 }, p90: { input: 1800, cache_write: 9200, cache_read: 17000, output: 1400 } },
73
- { band: "[40,55)", agent: "orc-executor-sonnet-4-6-high", count: 3, tasks: ["T03", "T05", "T07"], samples: 12, p50: { input: 7800, cache_write: 52100, cache_read: 104000, output: 8400 }, p90: { input: 11000, cache_write: 75000, cache_read: 150000, output: 12000 } },
74
- { band: "[65,90)", agent: "orc-executor-opus-5-low", count: 1, tasks: ["T04"], samples: 6, p50: { input: 5700, cache_write: 40200, cache_read: 81000, output: 9300 }, p90: { input: 8100, cache_write: 58000, cache_read: 117000, output: 13400 } },
75
+ { band: "[0,21)", agent: "orc-executor-sonnet-5-low", count: 2, tasks: ["T01", "T02"], samples: 9, p50: { input: 1200, cache_write: 6400, cache_read: 11800, output: 900 }, p90: { input: 1800, cache_write: 9200, cache_read: 17000, output: 1400 } },
76
+ { band: "[31,41)", agent: "orc-executor-sonnet-5-high", count: 3, tasks: ["T03", "T05", "T07"], samples: 12, p50: { input: 7800, cache_write: 52100, cache_read: 104000, output: 8400 }, p90: { input: 11000, cache_write: 75000, cache_read: 150000, output: 12000 } },
77
+ { band: "[41,90)", agent: "orc-executor-opus-5-low", count: 1, tasks: ["T04"], samples: 6, p50: { input: 5700, cache_write: 40200, cache_read: 81000, output: 9300 }, p90: { input: 8100, cache_write: 58000, cache_read: 117000, output: 13400 } },
75
78
  // A band with insufficient history — the low-confidence warning is not
76
79
  // optional chrome, so the fixture has to be able to trigger it.
77
80
  { band: "[90,100]", agent: "orc-executor-opus-5-med", count: 1, tasks: ["T12"], samples: 2, p50: { input: 9100, cache_write: 61000, cache_read: 128000, output: 17000 }, p90: { input: 14000, cache_write: 94000, cache_read: 198000, output: 26000 } },
@@ -107,9 +110,9 @@ const budgetRates = {
107
110
  dispatches_joined: 96,
108
111
  price_table_as_of: "2026-08-01",
109
112
  bands: {
110
- "[0,30)": { samples: 9, p50: { input: 1200, cache_write: 6400, cache_read: 11800, output: 900 }, p90: { input: 1800, cache_write: 9200, cache_read: 17000, output: 1400 }, peak_p50: 24000, peak_p90: 38000 },
111
- "[40,55)": { samples: 12, p50: { input: 7800, cache_write: 52100, cache_read: 104000, output: 8400 }, p90: { input: 11000, cache_write: 75000, cache_read: 150000, output: 12000 }, peak_p50: 78000, peak_p90: 121000 },
112
- "[70,80)": { samples: 6, p50: { input: 5700, cache_write: 40200, cache_read: 81000, output: 9300 }, p90: { input: 8100, cache_write: 58000, cache_read: 117000, output: 13400 }, peak_p50: 96000, peak_p90: 142000 },
113
+ "[0,21)": { samples: 9, p50: { input: 1200, cache_write: 6400, cache_read: 11800, output: 900 }, p90: { input: 1800, cache_write: 9200, cache_read: 17000, output: 1400 }, peak_p50: 24000, peak_p90: 38000 },
114
+ "[31,41)": { samples: 12, p50: { input: 7800, cache_write: 52100, cache_read: 104000, output: 8400 }, p90: { input: 11000, cache_write: 75000, cache_read: 150000, output: 12000 }, peak_p50: 78000, peak_p90: 121000 },
115
+ "[41,90)": { samples: 6, p50: { input: 5700, cache_write: 40200, cache_read: 81000, output: 9300 }, p90: { input: 8100, cache_write: 58000, cache_read: 117000, output: 13400 }, peak_p50: 96000, peak_p90: 142000 },
113
116
  "[90,100]": { samples: 2, p50: { input: 9100, cache_write: 61000, cache_read: 128000, output: 17000 }, p90: { input: 14000, cache_write: 94000, cache_read: 198000, output: 26000 }, peak_p50: 151000, peak_p90: 189000 },
114
117
  },
115
118
  roles: {
@@ -1,97 +1,98 @@
1
- "use strict";
2
- /**
3
- * fixtures/wait.js — canned `orc usage check` / `orc wait …` responses.
4
- *
5
- * ONE OF EVERY STATE, including the ugly ones. You cannot design an `unknown`
6
- * chip on a project whose statusline is happily writing a reading every second,
7
- * and `unknown` is the state that matters most here: it is what every install
8
- * on Claude Code before v2.1.80 sees, forever.
9
- */
10
-
11
- // LOW, and low on the WORST window rather than the obvious one. The 5-hour
12
- // window is the one people watch; this fixture has it comfortable and the
13
- // weekly one nearly gone, which is the case a panel gets wrong.
14
- const usage = {
15
- ok: true,
16
- state: "low",
17
- five_hour: {
18
- window: "5h",
19
- used_percentage: 62,
20
- remaining_percentage: 38,
21
- resets_at: new Date(Date.now() + 96 * 60000).toISOString(),
22
- resets_in_minutes: 96,
23
- low: false,
24
- },
25
- seven_day: {
26
- window: "wk",
27
- used_percentage: 94,
28
- remaining_percentage: 6,
29
- resets_at: new Date(Date.now() + 2 * 86400000).toISOString(),
30
- resets_in_minutes: 2880,
31
- low: true,
32
- },
33
- worst: "wk",
34
- context: 81,
35
- stop_pct: 10,
36
- gate: "wait",
37
- reading_age_minutes: 2,
38
- note: "read BEFORE a wave; the wave then spends tokens, so this is a reading and not a promise.",
39
- };
40
-
41
- // The state a fresh install on older Claude Code sits in permanently.
42
- const usageUnknown = {
43
- ok: true,
44
- state: "unknown",
45
- reason: "no reading in the last 30 minutes",
46
- five_hour: null,
47
- seven_day: null,
48
- context: null,
49
- stop_pct: 10,
50
- gate: "warn",
51
- note: "unknown is not low — a run is never stopped on a missing reading. Claude Code before v2.1.80 sends no usage headers.",
52
- };
53
-
54
- const waitLanes = {
55
- ok: true,
56
- modes: ["safe", "soft", "hard"],
57
- checkpoints: ["full", "docset", "entry", "cycle", "snapshot", "none"],
58
- lanes: [
59
- { lane: "/orc", checkpoint: "full", safe_point: "wave or phase edge", modes: ["safe", "soft", "hard"], modes_differ: true, detail: "soft forces the full checkpoint before it stops; hard writes RESUME.md only and can lose an in-flight return." },
60
- { lane: "/orc-doc", checkpoint: "full", safe_point: "wave edge", modes: ["safe", "soft", "hard"], modes_differ: true, detail: "soft forces the full checkpoint before it stops; hard writes RESUME.md only and can lose an in-flight return." },
61
- { lane: "/orc-quick", checkpoint: "entry", safe_point: "after an entry closes", modes: ["safe", "soft", "hard"], modes_differ: true, detail: "soft forces the entry checkpoint before it stops; hard writes RESUME.md only and can lose an in-flight return." },
62
- { lane: "/orc-brainstorm", checkpoint: "snapshot", safe_point: "phase edge", modes: ["safe", "soft", "hard"], modes_differ: true, detail: "soft forces the snapshot checkpoint before it stops; hard writes RESUME.md only and can lose an in-flight return." },
63
- // A `none` row KEEPS ITS SLOT. Filtering it out would make "this lane has
64
- // nothing to checkpoint" and "this lane does not support a wait" identical.
65
- { lane: "/orc-explain", checkpoint: "none", safe_point: "read-only, seconds long", modes: ["safe", "soft", "hard"], modes_differ: false, detail: "nothing to checkpoint — one dispatch, or a read. safe, soft and hard behave identically here." },
66
- { lane: "/orc-verify", checkpoint: "none", safe_point: "single dispatch", modes: ["safe", "soft", "hard"], modes_differ: false, detail: "nothing to checkpoint — one dispatch, or a read. safe, soft and hard behave identically here." },
67
- ],
68
- note: "A lane not in this list does not support a wait.",
69
- };
70
-
71
- // Blocked AND waiting at once — the busiest the card ever gets.
72
- const waitStatus = {
73
- ok: true,
74
- run: "rate-limit-api",
75
- waiting: true,
76
- mode: "soft",
77
- hop: 30,
78
- hops_done: 2,
79
- hops_planned: 4,
80
- ends_at: new Date(Date.now() + 44 * 60000).toISOString(),
81
- cancel_requested: false,
82
- blocked: true,
83
- block_reason: "window resets in 5m, task needs 10",
84
- blocked_at: new Date(Date.now() - 12 * 60000).toISOString(),
85
- block_age_minutes: 12,
86
- };
87
-
88
- // No run in flight. An empty result is an ANSWER, so it still carries an object.
89
- const waitStatusNone = {
90
- ok: true,
91
- run: null,
92
- waiting: false,
93
- blocked: false,
94
- note: "no run is in flight",
95
- };
96
-
97
- module.exports = { usage, usageUnknown, waitLanes, waitStatus, waitStatusNone };
1
+ "use strict";
2
+ /**
3
+ * fixtures/wait.js — canned `orc usage check` / `orc wait …` responses.
4
+ *
5
+ * ONE OF EVERY STATE, including the ugly ones. You cannot design an `unknown`
6
+ * chip on a project whose statusline is happily writing a reading every second,
7
+ * and `unknown` is the state that matters most here: it is what every install
8
+ * on Claude Code before v2.1.80 sees, forever.
9
+ */
10
+
11
+ // LOW, and low on the WORST window rather than the obvious one. The 5-hour
12
+ // window is the one people watch; this fixture has it comfortable and the
13
+ // weekly one nearly gone, which is the case a panel gets wrong.
14
+ const usage = {
15
+ ok: true,
16
+ state: "low",
17
+ five_hour: {
18
+ window: "5h",
19
+ used_percentage: 62,
20
+ remaining_percentage: 38,
21
+ resets_at: new Date(Date.now() + 96 * 60000).toISOString(),
22
+ resets_in_minutes: 96,
23
+ low: false,
24
+ },
25
+ seven_day: {
26
+ window: "wk",
27
+ used_percentage: 94,
28
+ remaining_percentage: 6,
29
+ resets_at: new Date(Date.now() + 2 * 86400000).toISOString(),
30
+ resets_in_minutes: 2880,
31
+ low: true,
32
+ },
33
+ worst: "wk",
34
+ context: 81,
35
+ stop_pct: 10,
36
+ gate: "wait",
37
+ reading_age_minutes: 2,
38
+ note: "read BEFORE a wave; the wave then spends tokens, so this is a reading and not a promise.",
39
+ };
40
+
41
+ // The state a fresh install on older Claude Code sits in permanently.
42
+ const usageUnknown = {
43
+ ok: true,
44
+ state: "unknown",
45
+ reason: "no reading in the last 30 minutes",
46
+ five_hour: null,
47
+ seven_day: null,
48
+ context: null,
49
+ stop_pct: 10,
50
+ gate: "warn",
51
+ note: "unknown is not low — a run is never stopped on a missing reading. Claude Code before v2.1.80 sends no usage headers.",
52
+ };
53
+
54
+ const waitLanes = {
55
+ ok: true,
56
+ modes: ["safe", "soft", "hard"],
57
+ checkpoints: ["full", "docset", "entry", "cycle", "snapshot", "none"],
58
+ lanes: [
59
+ { lane: "/orc", checkpoint: "full", safe_point: "wave or phase edge", modes: ["safe", "soft", "hard"], modes_differ: true, detail: "soft forces the full checkpoint before it stops; hard writes RESUME.md only and can lose an in-flight return." },
60
+ { lane: "/orc-doc", checkpoint: "full", safe_point: "wave edge", modes: ["safe", "soft", "hard"], modes_differ: true, detail: "soft forces the full checkpoint before it stops; hard writes RESUME.md only and can lose an in-flight return." },
61
+ { lane: "/orc-quick", checkpoint: "entry", safe_point: "after an entry closes", modes: ["safe", "soft", "hard"], modes_differ: true, detail: "soft forces the entry checkpoint before it stops; hard writes RESUME.md only and can lose an in-flight return." },
62
+ { lane: "/orc-brainstorm", checkpoint: "snapshot", safe_point: "phase edge", modes: ["safe", "soft", "hard"], modes_differ: true, detail: "soft forces the snapshot checkpoint before it stops; hard writes RESUME.md only and can lose an in-flight return." },
63
+ // A `none` row KEEPS ITS SLOT. Filtering it out would make "this lane has
64
+ // nothing to checkpoint" and "this lane does not support a wait" identical.
65
+ { lane: "/orc-explain", checkpoint: "none", safe_point: "read-only, seconds long", modes: ["safe", "soft", "hard"], modes_differ: false, detail: "nothing to checkpoint — one dispatch, or a read. safe, soft and hard behave identically here." },
66
+ { lane: "/orc-fix", checkpoint: "none", safe_point: "after the record is written", modes: ["safe", "soft", "hard"], modes_differ: false, detail: "nothing to checkpoint — one dispatch, or a read. safe, soft and hard behave identically here." },
67
+ { lane: "/orc-verify", checkpoint: "none", safe_point: "single dispatch", modes: ["safe", "soft", "hard"], modes_differ: false, detail: "nothing to checkpoint — one dispatch, or a read. safe, soft and hard behave identically here." },
68
+ ],
69
+ note: "A lane not in this list does not support a wait.",
70
+ };
71
+
72
+ // Blocked AND waiting at once — the busiest the card ever gets.
73
+ const waitStatus = {
74
+ ok: true,
75
+ run: "rate-limit-api",
76
+ waiting: true,
77
+ mode: "soft",
78
+ hop: 30,
79
+ hops_done: 2,
80
+ hops_planned: 4,
81
+ ends_at: new Date(Date.now() + 44 * 60000).toISOString(),
82
+ cancel_requested: false,
83
+ blocked: true,
84
+ block_reason: "window resets in 5m, task needs 10",
85
+ blocked_at: new Date(Date.now() - 12 * 60000).toISOString(),
86
+ block_age_minutes: 12,
87
+ };
88
+
89
+ // No run in flight. An empty result is an ANSWER, so it still carries an object.
90
+ const waitStatusNone = {
91
+ ok: true,
92
+ run: null,
93
+ waiting: false,
94
+ blocked: false,
95
+ note: "no run is in flight",
96
+ };
97
+
98
+ module.exports = { usage, usageUnknown, waitLanes, waitStatus, waitStatusNone };
@@ -118,6 +118,7 @@
118
118
  "behaviour.q.cats": "Accepted findings by kind",
119
119
  "behaviour.q.reviews": "1 review",
120
120
  "behaviour.q.reviewsPlural": "{n} reviews",
121
+ "behaviour.q.projectReviews": "Project reviews: {n} (counted apart from ORC reviews)",
121
122
  "behaviour.q.none": "No reviews in this window yet.",
122
123
  "behaviour.q.trend": "Acceptance, last 12 reviews",
123
124
  "behaviour.q.trendLabel": "acceptance over the last {n} reviews",
@@ -133,6 +134,18 @@
133
134
  "behaviour.q.accept": "Accept",
134
135
  "behaviour.q.acceptTitle": "Accept suppression {id}?",
135
136
  "behaviour.q.acceptWhat": "The reviewer does not raise this advice here again. P0 and P1 findings are never suppressed.",
137
+ "behaviour.q.fixes": "Fixes after review",
138
+ "behaviour.q.fixCount": "1 fix",
139
+ "behaviour.q.fixCountPlural": "{n} fixes",
140
+ "behaviour.q.fixesNone": "No fix was recorded in this window. Record one with /orc-fix.",
141
+ "behaviour.q.fixesNote": "A fix is never counted as a review. Its author is who found the problem.",
142
+ "behaviour.q.cause.sonar": "Sonar",
143
+ "behaviour.q.cause.orc": "ORC defect",
144
+ "behaviour.q.cause.ai": "AI-code bug",
145
+ "behaviour.q.cause.other": "Other",
146
+ "behaviour.q.misses": "Missed by review",
147
+ "behaviour.q.missesNone": "No fix touched lines that an earlier review read.",
148
+ "behaviour.q.missedBy": "missed by {run}",
136
149
  "behaviour.log.title": "Recent answers",
137
150
  "behaviour.log.from": "from the ASK lines in your traces",
138
151
  "behaviour.log.note": "learned means a habit you accepted chose the recommendation. The question was still shown.",