@azure-id/orc 1.9.2 → 2.0.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 (172) hide show
  1. package/CHANGELOG.md +321 -0
  2. package/README-id.md +21 -36
  3. package/README.md +25 -36
  4. package/bin/build-agents.js +117 -20
  5. package/bin/cli.js +725 -29
  6. package/bin/gotcha-import.js +1081 -0
  7. package/bin/gotcha.js +1286 -0
  8. package/bin/graph-query.js +1 -1
  9. package/bin/graph.js +717 -717
  10. package/bin/habit.js +1453 -0
  11. package/bin/mockrun-catalog.js +281 -276
  12. package/bin/run-undo.js +398 -0
  13. package/bin/trace-write.js +657 -0
  14. package/bin/verify-contracts.js +525 -79
  15. package/bin/verify-package.js +51 -4
  16. package/bin/webui/api.js +26 -0
  17. package/bin/webui/app.html +239 -232
  18. package/bin/webui/css/00-tokens.css +110 -92
  19. package/bin/webui/css/04-motion.css +87 -0
  20. package/bin/webui/css/06-responsive.css +203 -178
  21. package/bin/webui/css/panels/behaviour.css +205 -0
  22. package/bin/webui/fixtures/behaviour.js +532 -0
  23. package/bin/webui/fixtures/index.js +34 -0
  24. package/bin/webui/fixtures/knowledge.js +7 -1
  25. package/bin/webui/fixtures/stats.js +16 -0
  26. package/bin/webui/i18n/en/behaviour.json +143 -0
  27. package/bin/webui/i18n/en/nav.json +25 -24
  28. package/bin/webui/i18n/en/tour.json +37 -35
  29. package/bin/webui/i18n/id/behaviour.json +143 -0
  30. package/bin/webui/i18n/id/nav.json +25 -24
  31. package/bin/webui/i18n/id/tour.json +37 -35
  32. package/bin/webui/js/01-i18n.js +155 -154
  33. package/bin/webui/js/90-tour.js +498 -494
  34. package/bin/webui/js/91-shortcuts.js +126 -126
  35. package/bin/webui/js/99-boot.js +121 -118
  36. package/bin/webui/js/panels/behaviour.js +1022 -0
  37. package/mock-run/INDEX.md +109 -107
  38. package/mock-run/gotcha-import.md +118 -0
  39. package/mock-run/habits.md +129 -0
  40. package/mock-run/orc-quick.md +6 -1
  41. package/package.json +1 -1
  42. package/templates/agents/MODEL-MAPPING.md +7 -7
  43. package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
  44. package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
  45. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +1 -4
  46. package/templates/agents/orc-claude-writer-opus-4-8-high.md +48 -53
  47. package/templates/agents/orc-claude-writer-opus-5-med.md +1 -8
  48. package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
  49. package/templates/agents/orc-executor-haiku-4-5.md +14 -6
  50. package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
  51. package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
  52. package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
  53. package/templates/agents/orc-executor-opus-5-high.md +14 -6
  54. package/templates/agents/orc-executor-opus-5-low.md +14 -6
  55. package/templates/agents/orc-executor-opus-5-med.md +14 -6
  56. package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
  57. package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
  58. package/templates/agents/orc-executor-sonnet-5-high.md +14 -6
  59. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
  60. package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
  61. package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
  62. package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
  63. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
  64. package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
  65. package/templates/agents/orc-planner-mini-sonnet-5-high.md +1 -2
  66. package/templates/agents/orc-planner-opus-5-med.md +1 -4
  67. package/templates/agents/orc-recon-opus-5-low.md +1 -8
  68. package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
  69. package/templates/agents/orc-retro-opus-5-med.md +6 -8
  70. package/templates/agents/orc-retro-sonnet-5-high.md +6 -7
  71. package/templates/agents/orc-reviewer-opus-5-med.md +52 -16
  72. package/templates/agents/orc-scout-opus-5-low.md +1 -6
  73. package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
  74. package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
  75. package/templates/agents/orc-test-author-opus-5-med.md +4 -5
  76. package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
  77. package/templates/agents/orc-verifier-opus-5-med.md +16 -8
  78. package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +74 -79
  79. package/templates/agents/orc-wiki-scanner-opus-5-med.md +1 -8
  80. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
  81. package/templates/commands/orc-analyze.md +13 -21
  82. package/templates/commands/orc-fast.md +10 -15
  83. package/templates/commands/orc-poly.md +12 -21
  84. package/templates/commands/orc-pr-driver.md +11 -30
  85. package/templates/commands/orc-pr-setup.md +10 -31
  86. package/templates/commands/orc-route.md +11 -41
  87. package/templates/commands/orc-test.md +5 -60
  88. package/templates/hooks/README.md +34 -0
  89. package/templates/hooks/orc-session-hook.js +264 -0
  90. package/templates/hooks/orc-statusline.js +3 -1
  91. package/templates/skills/_shared/README.md +9 -0
  92. package/templates/skills/_shared/code-graph.md +47 -55
  93. package/templates/skills/_shared/config-precedence.md +3 -1
  94. package/templates/skills/_shared/extra-dispatch.md +73 -88
  95. package/templates/skills/_shared/gotchas.md +228 -177
  96. package/templates/skills/_shared/habits.md +101 -0
  97. package/templates/skills/_shared/lane-contract.md +84 -0
  98. package/templates/skills/_shared/phases/README.md +142 -83
  99. package/templates/skills/_shared/phases/analyst-gates.md +10 -21
  100. package/templates/skills/_shared/phases/execution.md +8 -14
  101. package/templates/skills/_shared/phases/house-rules.md +27 -32
  102. package/templates/skills/_shared/phases/intake.md +127 -133
  103. package/templates/skills/_shared/phases/mock-example.md +46 -56
  104. package/templates/skills/_shared/phases/plan-handoff.md +91 -97
  105. package/templates/skills/_shared/phases/planning.md +7 -17
  106. package/templates/skills/_shared/phases/preflight.md +19 -42
  107. package/templates/skills/_shared/phases/review.md +23 -27
  108. package/templates/skills/_shared/phases/rules.md +18 -42
  109. package/templates/skills/_shared/phases/scoring.md +55 -65
  110. package/templates/skills/_shared/phases/security-checklist.md +46 -50
  111. package/templates/skills/_shared/phases/security.md +45 -55
  112. package/templates/skills/_shared/phases/ship.md +6 -15
  113. package/templates/skills/_shared/phases/stop-resume.md +2 -5
  114. package/templates/skills/_shared/phases/summary.md +73 -48
  115. package/templates/skills/_shared/phases/testgen.md +41 -51
  116. package/templates/skills/_shared/phases/trace-verbs.md +433 -0
  117. package/templates/skills/_shared/phases/trace.md +136 -367
  118. package/templates/skills/_shared/phases/verify.md +62 -70
  119. package/templates/skills/_shared/phases/wave-grouping.md +128 -133
  120. package/templates/skills/_shared/phases/wiki-consult.md +10 -6
  121. package/templates/skills/_shared/read-ladder.md +2 -55
  122. package/templates/skills/_shared/return-validation.md +17 -70
  123. package/templates/skills/_shared/review-slice.md +79 -0
  124. package/templates/skills/_shared/smoke-gate.md +46 -28
  125. package/templates/skills/context-combiner/SKILL.md +15 -44
  126. package/templates/skills/orc/SKILL.md +34 -62
  127. package/templates/skills/orc/references/pattern-gate.md +89 -89
  128. package/templates/skills/orc/references/phases/intake.md +41 -47
  129. package/templates/skills/orc/references/phases/integration.md +13 -19
  130. package/templates/skills/orc/references/preflight-report.md +8 -9
  131. package/templates/skills/orc/references/ultra-mode.md +8 -6
  132. package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
  133. package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
  134. package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
  135. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +11 -52
  136. package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
  137. package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
  138. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
  139. package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
  140. package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
  141. package/templates/skills/orc-advisor/SKILL.md +56 -60
  142. package/templates/skills/orc-analyze/SKILL.md +30 -66
  143. package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
  144. package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
  145. package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
  146. package/templates/skills/orc-diy/README.md +31 -0
  147. package/templates/skills/orc-diy/SKILL.md +23 -74
  148. package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
  149. package/templates/skills/orc-fast/SKILL.md +44 -72
  150. package/templates/skills/orc-judge/SKILL.md +77 -82
  151. package/templates/skills/orc-mini/SKILL.md +61 -109
  152. package/templates/skills/orc-pattern/SKILL.md +27 -48
  153. package/templates/skills/orc-poly/SKILL.md +32 -61
  154. package/templates/skills/orc-pr-driver/SKILL.md +25 -51
  155. package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
  156. package/templates/skills/orc-pr-setup/SKILL.md +20 -45
  157. package/templates/skills/orc-quick/README.md +43 -2
  158. package/templates/skills/orc-quick/SKILL.md +76 -107
  159. package/templates/skills/orc-quick/references/dispatch-gate.md +16 -5
  160. package/templates/skills/orc-quick/references/gh-mode.md +48 -1
  161. package/templates/skills/orc-quick/references/look.md +3 -1
  162. package/templates/skills/orc-retro/SKILL.md +19 -18
  163. package/templates/skills/orc-retro/examples/retro-mock.md +1 -1
  164. package/templates/skills/orc-route/SKILL.md +25 -45
  165. package/templates/skills/orc-test/SKILL.md +16 -37
  166. package/templates/skills/orc-verify/SKILL.md +14 -32
  167. package/templates/skills/orc-wait/SKILL.md +156 -163
  168. package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -6
  169. package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
  170. package/templates/skills/orc-wiki/references/phases/phase-2.md +1 -6
  171. package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
  172. package/templates/skills/orc-wiki/references/phases/phase-3c.md +1 -6
package/CHANGELOG.md CHANGED
@@ -10,6 +10,327 @@ Format: `### v<version> — <title> _(<date>)_`.
10
10
 
11
11
  ---
12
12
 
13
+ ### v2.0.2 — the lanes record what you answered, and the reviewer always gets the card _(2026-09-28)_
14
+
15
+ **Still on the unscoped `orc` package?** Do this once first - your `orc upgrade`
16
+ is the pre-v0.56.0 one and cannot install itself. Full detail in the CAUTION at
17
+ the top of this file.
18
+
19
+ - **Step 1 - release the command from the old package:** `npm uninstall -g orc`
20
+ - **Step 2 - install the current package:** `npm i -g @azure-id/orc`
21
+ - **Step 3 - re-apply it to your project:** `orc update`
22
+
23
+ **Do not use `npm i -g -f`.** Full detail in v0.56.0 below.
24
+
25
+ A patch from the live evals of 2.0 (E1–E4 in the eval sandbox). The habits feature did
26
+ not work in live use until this release: the lanes forgot to record answers, used their
27
+ own option and question names, and recorded a follow-up decision as the same question.
28
+ Each fix below is in the CLI or a hook, not in more lane prose.
29
+
30
+ - **`orc trace write` checks every `ASK` as it arrives.** A wrong option id, an unknown
31
+ question id, or a repeat of the same question with no new executor dispatch (a
32
+ follow-up) is kept OUT of the trace and handed back with the real ids, first in the
33
+ answer. The rest of the packet is written.
34
+ - **The FINISH packet names the questions nobody recorded.** With `habits` on, the answer
35
+ lists each registered question of the lane that has no `ASK` in the run, with its
36
+ option ids. A late packet with `run: <trace name>` still lands after `.current` is gone.
37
+ - **Habit evidence is not split by context.** The "any context" row counts every answer;
38
+ a row with `kind`/`branch` is a refinement. A dispatch-gate answer may list a
39
+ third-party slot. The habit cache version changed, so a parser change clears it.
40
+ - **The narration guard** (session hook, `Stop`). A run that dispatched agents and wrote
41
+ NO narration line is stopped ONCE, with the command that fixes it. Never twice, never
42
+ for a subagent.
43
+ - **The reviewer always gets the gotcha card** (session hook, `SubagentStart`). A live
44
+ review got no card in 5 of 5 runs. Now every `orc-reviewer-*`, `orc-verifier-*` and
45
+ `orc-judge-*` receives the card for the files git sees as changed. `orc update` wires
46
+ the new event; `orc doctor` names it when it is missing.
47
+ - **`/orc-quick` takes the undo snapshot.** Its own start step names
48
+ `orc run snapshot` (before: 3 of 8 runs took it; after: 6 of 6).
49
+ - **`rules_card_compact` is `on` by default.** Eval E4 (12 runs) passed: no new
50
+ `unmet[]`, no new `rules_conflicts[]`, the smoke gate green on the first try in 6 of 6
51
+ runs with the compact card against 3 of 6 without. `off` gives the full card.
52
+
53
+ **Eval results:** E1 (the trim broke nothing) passed · E2 (habits) passed — 6 answers →
54
+ the offer "5 of 5" → accepted → the next run marks `→ usual` and still asks; with
55
+ `habits: off` zero `ASK` lines · E3 (the gotcha card): E3 (the gotcha card): with the card the reviewer found all 3 recurring defects in 5 of 5 runs (without: 2.4 of 3; the float-money defect 5 of 5 against 2 of 5), ordinary recall was equal (3.0), false positives fell from 2.2 to 1.0 per run. The planned gap of 1.0 could not be reached: without the card the reviewer already finds 2 of the 3, so the most the card could add was 0.6, and it added all of it · E4 passed (above).
56
+
57
+ **What you have to do:** `orc update`.
58
+
59
+ ---
60
+
61
+ ### v2.0.1 — the trace keeps the gate name, and the lanes find the habits rule _(2026-09-27)_
62
+
63
+ **Still on the unscoped `orc` package?** Do this once first - your `orc upgrade`
64
+ is the pre-v0.56.0 one and cannot install itself. Full detail in the CAUTION at
65
+ the top of this file.
66
+
67
+ - **Step 1 - release the command from the old package:** `npm uninstall -g orc`
68
+ - **Step 2 - install the current package:** `npm i -g @azure-id/orc`
69
+ - **Step 3 - re-apply it to your project:** `orc update`
70
+
71
+ **Do not use `npm i -g -f`.** Full detail in v0.56.0 below.
72
+
73
+ A patch. The first live runs of 2.0.0 in the eval sandbox found four defects. Nothing
74
+ changes for a user who has `habits` off, except that traces are complete again.
75
+
76
+ - **`orc trace write` keeps the gate name.** A lane often sent `verb: GATE` and put
77
+ the rest in the tail. The CLI then wrote `GATE :: …`, and the name and the
78
+ `pass|bounce|escalate` word were lost (`orc stats` and `/orc-retro` read them).
79
+ The CLI now puts each event into the shape of its own grammar in `TRACE_VERBS`:
80
+ - `note:`, `detail:` or `text:` is used as the tail when `tail` is missing
81
+ (before: an EMPTY `.txt` line);
82
+ - a ` :: ` inside `verb` splits into head and tail, and a tail that starts with
83
+ `::` loses it (before: `GATE x :: :: …`);
84
+ - a verb with no ` :: ` in its grammar (`OUTCOME`, `FINDING`, `PHASE` …) that
85
+ has only a tail is joined to its head;
86
+ - a verb whose grammar needs head arguments (`GATE <name> pass|…`, `ASK <qid>`,
87
+ `DISPATCH <agent>`, `SCORE task=…`) is repaired from `args :: detail` in the
88
+ tail, or REFUSED by name (exit 2, nothing written) — the lane then uses the
89
+ writer agent.
90
+ `_shared/phases/trace.md` says it once: `verb` = the WHOLE head, `tail` = the detail.
91
+ - **The lanes find the habits rule.** The `habits{}` pointer sat in each spine's
92
+ lane-contract block, far from the step that reads the answer, and a live
93
+ `/orc-quick` run with `habits: propose` never opened `_shared/habits.md` and
94
+ wrote no `ASK`. The rule now sits IN the step that reads `orc lane config`:
95
+ `/orc-quick` Q0 step 1, `/orc-mini` Phase 0, and `_shared/phases/preflight.md`
96
+ step 1 (orc, fast, test, pr-setup). The orc and fast spine copies were removed.
97
+
98
+ **What you have to do:** `orc update`.
99
+
100
+ ---
101
+
102
+ ### v2.0.0 — the coding lanes remember what you fixed and how you work _(2026-09-27)_
103
+
104
+ **Still on the unscoped `orc` package?** Do this once first - your `orc upgrade`
105
+ is the pre-v0.56.0 one and cannot install itself. Full detail in the CAUTION at
106
+ the top of this file.
107
+
108
+ - **Step 1 - release the command from the old package:** `npm uninstall -g orc`
109
+ - **Step 2 - install the current package:** `npm i -g @azure-id/orc`
110
+ - **Step 3 - re-apply it to your project:** `orc update`
111
+
112
+ **Do not use `npm i -g -f`.** Full detail in v0.56.0 below.
113
+
114
+ This release does five things. The coding lanes load less than half the text
115
+ they loaded before. ORC can learn the answers you give to its questions, but
116
+ only when you turn that on, and it applies nothing without your yes. The repair
117
+ memory (gotchas) learns from reviews, Sonar, SARIF, PR threads and closed
118
+ defects. The reviewer returns more facts about each finding. And a set of small
119
+ tools: `orc undo`, `orc pr threads`, `orc ci failed`, `orc ci flaky`, an
120
+ end-of-run card, questions per run in `orc stats`, a terminal bell, and the run
121
+ pointer after a compact.
122
+
123
+ **BREAKING.** This is a major version because five contracts change in a way
124
+ that a 1.9.x user or a fork can see:
125
+
126
+ 1. **`/orc-quick` now takes part in the review memory.** Before, quick did not
127
+ read gotchas and did not record them, and its dispatch gate said never to
128
+ remember an answer for the next entry. Now quick reads the gotcha card when
129
+ it offers a review, records the review outcome, and shows a habit
130
+ suggestion on its `→ suggested` line (only when `habits` is not `off`). The
131
+ gate is still asked every time.
132
+ 2. **The reviewer return has new REQUIRED fields**: `category` (a closed set of
133
+ 11 values), `scenario` on every P0 and P1, and `pre_existing`. A forked or
134
+ hand-edited reviewer agent that does not return them fails the return
135
+ validation, and the orchestrator treats its return as malformed.
136
+ 3. **The closed trace verb set is larger**: `ASK` (one answered question),
137
+ `FINDING-OUTCOME` (what became of each finding at review close) and the
138
+ `GATE flaky` result. `FINDING` has optional tail fields
139
+ (`pre=` `suppressed=` `folded=`). A trace reader that treats the verb set as
140
+ closed must learn them. Old traces parse as before.
141
+ 4. **The lane spines have a new shape.** The shared lane contract text moved to
142
+ `_shared/lane-contract.md`, and worker instructions live in the agent files
143
+ only. `orc update` overwrites an installed spine as it always did, so a
144
+ hand patch on a spine is lost.
145
+ 5. **Config resolution has a new rank, `learned`,** below your config file and
146
+ above the shipped default, and a new state word `learned`. Both appear ONLY
147
+ when `habits` is not `off`.
148
+
149
+ Nothing is removed: no config key is retired, no command is renamed, and no file
150
+ that you own moves.
151
+
152
+ **T — the lanes load less.** Each lane reads the same rules from fewer bytes.
153
+ The trace protocol went from 36,089 to 7,885 bytes (the full verb table is now
154
+ on demand, and each lane gets only its own verbs from `orc lane phases`). The
155
+ file banners, history and repeated exit codes left the payload. The coding
156
+ spines have a 16,384-byte cap. Worker instructions have one source, the agent
157
+ file. The descriptions that load in every session went from 11,711 to 6,587
158
+ characters, and three internal skills are hidden from the skill list.
159
+ `orc lane config --json` now carries a `probes{}` block, so a preflight reads
160
+ up to seven probe answers from one call. `orc trace write --packet -` writes
161
+ the `.txt` and the `.jsonl` of a trace from one packet (the Haiku trace writer
162
+ is now the fallback). 16 more agent files are generated from
163
+ `agents-src/twins/`, and `node bin/build-agents.js --check` (part of
164
+ `npm run verify`) covers them.
165
+
166
+ Always-loaded bytes per lane (`spine + command + when: "always"` references):
167
+
168
+ | Lane | 1.9.2 | after the trim | 2.0.0 | change |
169
+ |---|---|---|---|---|
170
+ | orc | 60,169 | 29,289 | 29,124 | −52 % |
171
+ | orc-mini | 56,153 | 24,851 | 24,697 | −56 % |
172
+ | orc-fast | 59,142 | 27,793 | 27,750 | −53 % |
173
+ | orc-quick | 61,858 | 30,998 | 30,768 | −50 % |
174
+ | orc-verify | 42,330 | 13,224 | 13,035 | −69 % |
175
+ | orc-test | 61,566 | 28,295 | 27,994 | −55 % |
176
+ | orc-pr-setup | 56,130 | 24,673 | 24,380 | −57 % |
177
+ | orc-pr-driver | 48,456 | 18,071 | 17,882 | −63 % |
178
+ | orc-analyze | 52,351 | 21,514 | 21,339 | −59 % |
179
+ | orc-analyze-mini | 43,792 | 13,401 | 13,212 | −70 % |
180
+ | orc-poly | 51,483 | 20,826 | 20,637 | −60 % |
181
+ | orc-route | 47,454 | 16,923 | 16,734 | −65 % |
182
+ | orc-wait | 7,082 | 6,696 | 6,693 | −5 % |
183
+ | orc-diy | 8,098 | 5,292 | 5,278 | −35 % |
184
+ | context-combiner | 13,193 | 11,472 | 11,472 | −13 % |
185
+ | orc-pattern | 45,748 | 16,249 | 16,060 | −65 % |
186
+ | orc-advisor | 2,916 | 2,605 | 2,605 | −11 % |
187
+ | orc-judge | 4,679 | 4,280 | 4,280 | −9 % |
188
+ | **sum** | **722,600** | **316,452** | **313,940** | **−57 %** |
189
+
190
+ The habits, gotchas and review work that came after the trim added no byte to
191
+ any lane above its trimmed value: the new text is read on demand.
192
+
193
+ **H — habits (off by default).** New key `habits`: `off` · `observe` ·
194
+ `propose`.
195
+
196
+ - `off` (the default) costs zero tokens: `orc lane config --json` has no
197
+ habits field (with `--no-probes` it is byte-identical to 1.9.2), and no lane
198
+ writes an `ASK` line.
199
+ - `observe`: each answered question writes one `ASK` line into the trace.
200
+ `orc habit show` computes your usual answers from those lines. It proposes
201
+ nothing.
202
+ - `propose`: at the END of a run, at most once, ORC asks whether an answer you
203
+ keep giving should become your usual one. The rule is fixed in the CLI: at
204
+ least 5 full-weight answers, a Wilson lower bound of 0.55 or more, and the
205
+ last 3 answers the same.
206
+ - Nothing is applied without your yes. There is no automatic level, and
207
+ `auto` is refused by name. An accepted habit is the `learned` rank, below
208
+ your config file: `orc config set` always wins. `orc habit forget <id>`
209
+ undoes it.
210
+ - A habit can learn only toward the careful side: `review_before_push: on`,
211
+ `mini_tdd: on`, `quick_update_tests: on`. A habit to skip a review, to drop
212
+ TDD or to continue on a stale wiki is never applied. A dispatch gate is
213
+ asked every time; a habit only orders the offer.
214
+ - 30 question points in the lanes carry an `(H <qid>)` mark.
215
+ `orc habit points` lists them.
216
+ - Commands: `orc habit show | log | points | why | accept | decline | forget |
217
+ reset | doctor | export | purge`, and `orc habit repo` for the soft
218
+ preferences read from git history (commit, branch and test naming).
219
+ - New keys: `review_before_push` (`ask`), `mini_tdd` (`ask`),
220
+ `quick_update_tests` (`ask`).
221
+
222
+ **G — gotchas v2, importers and sync.** The repair memory learns from more
223
+ sources, and the reviewer gets a card.
224
+
225
+ - `orc gotcha add | match | card | filter | observe | accept | quality | why`,
226
+ `orc gotcha list --candidates` and `orc gotcha export --review-md`.
227
+ - `orc gotcha card` is the reviewer card, sized by `gotcha_card_budget`
228
+ (600 tokens, minimum 200). It is always on: `gotcha_card_budget` is a size,
229
+ not an off switch. An entry that does not fit is counted in the card header.
230
+ - Observations go to `.claude/orc/observations.jsonl`. A candidate becomes an
231
+ entry by a fixed rule: an in-lane red → green with a reproduction, a miss, a
232
+ security finding with a CWE tag or a HIGH impact, or 3 addressed cases in 2
233
+ PRs within 90 days. `orc gotcha accept <C-id>` promotes one by hand.
234
+ - `orc gotcha filter` drops suppressed, folded and noisy advice. It never
235
+ removes a P0 or a P1.
236
+ - Importers: `orc gotcha import sarif <file>`,
237
+ `orc gotcha import sonar` (the token comes from `SONAR_TOKEN` only),
238
+ `orc gotcha import pr <n>` (human threads only) and
239
+ `orc gotcha import issues`. `orc gotcha sync` runs every source that is
240
+ available, incremental and time-boxed. New keys: `gotcha_card_budget`,
241
+ `gotcha_sync_hours` (6), `sonar_url`, `sonar_project`, `sonar_org`.
242
+ - A v1 `gotchas.md` stays valid, with no rewrite. The 1.9.2 parser still reads
243
+ a file that 2.0.0 wrote (a test copies its regex).
244
+ - The status line gotcha count now shows a number. It was always empty.
245
+
246
+ **R — the reviewer v2.** New `_shared/review-slice.md` names the slice fields
247
+ once. The reviewer gets the diff ranges, the gotcha card, the rules card and
248
+ the tool findings. It returns `category`, `cwe`, `scenario`, `pre_existing`,
249
+ `group` and `confidence` on each finding. `/orc` and `/orc-ultra` can dispatch
250
+ a disprove pass on a P0/P1. A re-review gets the previous findings. At review
251
+ close the lane records each outcome, and `orc gotcha quality` measures the
252
+ acceptance per category.
253
+
254
+ **Q — quality of life.**
255
+
256
+ - **`orc undo --run <slug>`** prints the commands that revert ONLY the files the
257
+ run changed, back to the snapshot taken at run start
258
+ (`orc run snapshot`). It changes nothing until you add `--apply`. An edit you
259
+ made before the run stays.
260
+ - **`orc pr threads <n>`** lists the unresolved review threads.
261
+ **`orc ci failed`** lists the failing CI steps. Both are read-only.
262
+ `/orc-quick` takes a red CI, or Sonar and SARIF issues, as a request.
263
+ - **`orc ci flaky`** tells a flaky local red from a real one. A flaky re-run
264
+ does not use a repair round, and the trace gets `GATE flaky`.
265
+ - **The end-of-run card** names what changed and the undo command. Quick
266
+ prints it in place of `git checkout -- .`.
267
+ - **`orc stats --json`** has `questions{}`: questions per run, per lane and per
268
+ point.
269
+ - **`notify: bell`** rings the terminal bell once when a turn of an ORC run
270
+ ends. `off` is the default and is silent.
271
+ - **After a compact**, the session hook prints the run pointer line again.
272
+ - **`rules_card_compact`** (`off`) would give `/orc-mini` and `/orc-fast` the
273
+ compact rules card. It stays off until eval E4 passes.
274
+
275
+ **U — `orc ui` ▸ Behaviour.** A new panel under Stats, key `u`. It shows the
276
+ learning switch (Off · Observe · Propose), your habits with their evidence and
277
+ the buttons the CLI allows, the rhythm of your runs, the gotchas and what the
278
+ reviewer will see, review quality per category, and the answer log. It renders
279
+ the CLI's lines and computes no habit. A `never` habit has no button. With
280
+ `habits: off`, one card replaces the tabs. Reduced motion stops all motion.
281
+
282
+ **Upgrade notes — what a 1.9.2 install keeps, and what changes.**
283
+
284
+ - `.claude/orc.config.yaml` is read as it is. No key is renamed or retired. The
285
+ new keys resolve to their defaults: `habits: off`, `review_before_push: ask`,
286
+ `mini_tdd: ask`, `quick_update_tests: ask`, `gotcha_card_budget: 600`,
287
+ `gotcha_sync_hours: 6`, `notify: off`, `rules_card_compact: off`, and the
288
+ `sonar_*` keys empty.
289
+ - `.claude/orc/gotchas.md` and its archive stay valid, with no rewrite. A
290
+ downgrade to 1.9.2 still parses the file.
291
+ - `gotchas: off` no longer removes the reviewer card, because review learning is
292
+ always on. `orc config set gotchas off` says so. An old `gotchas: off` still
293
+ turns off the executor block (`orc gotcha match` exits 4).
294
+ - Old traces are read as they are. They have no `ASK` lines, so the habits start
295
+ at `none yet`. Nothing is guessed from old `NOTE` lines.
296
+ - Every existing field of `orc lane config --json` and `orc config list --json`
297
+ is unchanged (a test pins them). `probes{}` is added; `habits{}`, the
298
+ `learned` source and the `learned` state appear only when `habits` is on.
299
+ - `orc gotcha status | list | show | prune` are unchanged, with the same exit
300
+ codes.
301
+ - **A DIY flow compiled by 1.9.x is STALE after the update**, because the
302
+ version and the composed layers changed. Run `orc diy compile` after the
303
+ update. Until then `orc diy status` exits 1 and `/orc-diy` offers the compile
304
+ or plain `/orc`.
305
+ - A forked or hand-edited reviewer agent fails the v2 return validation (see
306
+ BREAKING item 2). Hand-edited installed spines are overwritten, as always.
307
+ - **`orc update` wires the new session hook** (`orc-session-hook.js`) into
308
+ `.claude/settings.json`: ONE `Stop` entry and ONE `SessionStart` entry with
309
+ the matcher `compact`. It is always wired. The `Stop` hook reads `notify` first
310
+ and stays silent unless `notify: bell`. `orc doctor` checks both entries, and
311
+ when one is missing it names `orc update` as the fix
312
+ (`session-hook-unwired`).
313
+ - New files are user data: `habits-state.json`, `habits-cache.json`,
314
+ `observations.jsonl`, `gotchas-sync.json`. They are never in the install
315
+ manifest, and they survive `update`, `update --prune` and `doctor --fix`.
316
+ - Node ≥ 18 and zero npm dependencies, as before.
317
+
318
+ **Evals owed.** Four evals are prepared and NOT run. Each needs a live Claude
319
+ Code session in the sandbox:
320
+
321
+ - **E1** — trace parity before and after the trim.
322
+ - **E2** — six `/orc-quick` requests under `habits: propose` give one proposal,
323
+ and the seventh shows `→ usual`.
324
+ - **E3** — five reviews with the gotcha card and five without it. The card
325
+ stays on whatever the result is.
326
+ - **E4** — the compact rules card on `/orc-mini` and `/orc-fast`.
327
+ `rules_card_compact` stays `off` until E4 passes.
328
+
329
+ **What you have to do:** `orc update`. Then, if you use `/orc-diy`,
330
+ `orc diy compile`. To try habits, `orc config set habits observe`.
331
+
332
+ ---
333
+
13
334
  ### v1.9.2 — the code graph gets its own tab, and Opus 5 becomes Opus 5.5 _(2026-09-23)_
14
335
 
15
336
  **Still on the unscoped `orc` package?** Do this once first - your `orc upgrade`
package/README-id.md CHANGED
@@ -7,13 +7,13 @@
7
7
  *Terima permintaan → pahami → rencanakan → beri nilai → kerjakan paralel → periksa → uji → kirim.*
8
8
 
9
9
  ![npm](https://img.shields.io/npm/v/%40azure-id%2Forc?style=for-the-badge&color=cb3837&logo=npm)
10
- ![Version](https://img.shields.io/badge/version-1.9.2-blue.svg?style=for-the-badge)
10
+ ![Version](https://img.shields.io/badge/version-2.0.2-blue.svg?style=for-the-badge)
11
11
  ![License](https://img.shields.io/badge/license-MIT-green.svg?style=for-the-badge)
12
12
  ![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg?style=for-the-badge)
13
13
  ![Claude Code](https://img.shields.io/badge/Claude_Code-Skills-purple.svg?style=for-the-badge)
14
14
  ![Dependencies](https://img.shields.io/badge/dependencies-zero-lightgrey.svg?style=for-the-badge)
15
15
 
16
- **Versi terbaru: v1.9.2** · diperbarui 23-09-2026 · [daftar perubahan lengkap](CHANGELOG.md)
16
+ **Versi terbaru: v2.0.2** · diperbarui 28-09-2026 · [daftar perubahan lengkap](CHANGELOG.md)
17
17
 
18
18
  **Ada di npm: [`@azure-id/orc`](https://www.npmjs.com/package/@azure-id/orc)** — `npm i -g @azure-id/orc`
19
19
 
@@ -786,43 +786,28 @@ Bacalah sebagai catatan putaran itu, bukan sebagai audit terkini:
786
786
  **Riwayat lengkap: [CHANGELOG.md](CHANGELOG.md)** — atau `orc changelog`, yang
787
787
  hanya mencetak yang lebih baru dari versi yang Anda punya.
788
788
 
789
- ### v1.9.2 - graf kode mendapat tab sendiri, dan Opus 5 menjadi Opus 5.5 _(23-09-2026)_
790
-
791
- **Graf kode punya tab sendiri.** `orc ui` ▸ Knowledge ▸ **Code graph**
792
- menggantikan satu kartu di tab Wiki. Tab ini menunjukkan, berurutan:
793
-
794
- - **Posisi graf Anda sekarang** — empat status (OFF · NONE · FRESH · DRIFTED)
795
- sebagai tangga. Status saat ini menyala, dan satu tindakan yang dibutuhkan
796
- ada di bawahnya.
797
- - **Cara kerja graf kode** — lima langkah beranimasi, dari file Anda sampai
798
- kartu singkat yang dibaca agent. Tiga langkah pertama gratis.
799
- - **Seperti apa graf kode** — contoh graf (bukan kode Anda). Arahkan pointer ke
800
- sebuah titik untuk melihat pemanggil dan yang dipanggilnya.
801
- - **Graf Anda, dalam angka** — file, simbol, kepadatan per bahasa, dan apa yang
802
- berubah sejak pembuatan terakhir.
803
- - **Biaya graf, dan perkiraan hematnya** — dibayar (persis) dan dihindari
804
- (perkiraan, digambar sebagai rentang) pada satu skala, dan pertanyaan yang
805
- diajukan lane.
806
- - **Arti setiap kata** — setiap istilah di tab ini, dengan kata sederhana.
807
-
808
- Temuan DRIFTED di Overview sekarang membuka tab ini. Reduced motion menghapus
809
- semua animasi.
810
-
811
- **Setiap agent Opus 5 sekarang memakai Opus 5.5.** Model id-nya
812
- `claude-opus-5-5` (sebelumnya `claude-opus-5`): executor, scout, analis,
813
- planner, reviewer, verifier, judge, dan setiap agent Opus lainnya. Opus 5.5
814
- lebih murah: $4 input, $5 cache write, $0,20 cache read, dan $20 output per
815
- sejuta token. `bin/pricing.json` punya baris baru, dan `orc budget`
816
- memakainya.
817
-
818
- **Yang harus Anda lakukan:** jalankan `orc update` untuk memasang file agent
819
- yang baru. NAMA agent tidak berubah, jadi `rubric_bands_override`,
820
- `fixed_executor` dan `opus5_only` tetap berjalan. Config yang masih menyebut
821
- `claude-opus-5` tetap valid.
789
+ ### v2.0.2 - lane mencatat jawaban Anda, dan reviewer selalu mendapat kartunya _(28-09-2026)_
790
+
791
+ **Patch dari eval langsung.** Habits sekarang benar-benar bekerja di run langsung, dan
792
+ reviewer selalu mendapat kartunya:
793
+
794
+ - **Jawaban Anda dicatat dengan benar.** `orc trace write` memeriksa setiap jawaban saat
795
+ masuk dan mengembalikan jawaban yang salah bersama id yang benar. Di akhir run, ia
796
+ menyebut pertanyaan yang belum dicatat.
797
+ - **Reviewer selalu mendapat kartu gotcha.** Sebuah hook memberikannya ke setiap
798
+ reviewer, verifier dan judge.
799
+ - **Run yang tidak menulis trace dihentikan sekali** dan diberi tahu cara memperbaikinya.
800
+ - **`/orc-quick` selalu mengambil snapshot undo.**
801
+ - **Kartu aturan ringkas menyala secara default untuk `/orc-mini` dan `/orc-fast`** (eval E4 lulus).
802
+
803
+ **Yang harus Anda lakukan:** `orc update`.
822
804
 
823
805
  <details>
824
- <summary><strong>Rilis sebelumnya</strong> — 121 rilis, hanya judulnya. Teks lengkapnya (dalam bahasa Inggris) ada di <a href="CHANGELOG.md">CHANGELOG.md</a>.</summary>
806
+ <summary><strong>Rilis sebelumnya</strong> — 124 rilis, hanya judulnya. Teks lengkapnya (dalam bahasa Inggris) ada di <a href="CHANGELOG.md">CHANGELOG.md</a>.</summary>
825
807
 
808
+ - **v2.0.1** — the trace keeps the gate name, and the lanes find the habits rule · _2026-09-27_
809
+ - **v2.0.0** — the coding lanes remember what you fixed and how you work · _2026-09-27_
810
+ - **v1.9.2** — the code graph gets its own tab, and Opus 5 becomes Opus 5.5 · _2026-09-23_
826
811
  - **v1.9.1** — the graph that was paid for and never asked · _2026-09-23_
827
812
  - **v1.9.0** — the lean lanes learn to look before they leap · _2026-09-21_
828
813
  - **v1.8.2** — the map that finds what a grep cannot · _2026-09-21_
package/README.md CHANGED
@@ -7,14 +7,14 @@
7
7
  *Intake → analyze → plan → score → parallel subagents → review → verify → ship.*
8
8
 
9
9
  ![npm](https://img.shields.io/npm/v/%40azure-id%2Forc?style=for-the-badge&color=cb3837&logo=npm)
10
- ![Version](https://img.shields.io/badge/version-1.9.2-blue.svg?style=for-the-badge)
10
+ ![Version](https://img.shields.io/badge/version-2.0.2-blue.svg?style=for-the-badge)
11
11
  ![License](https://img.shields.io/badge/license-MIT-green.svg?style=for-the-badge)
12
12
  ![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg?style=for-the-badge)
13
13
  ![Claude Code](https://img.shields.io/badge/Claude_Code-Skills-purple.svg?style=for-the-badge)
14
14
  ![Dependencies](https://img.shields.io/badge/dependencies-zero-lightgrey.svg?style=for-the-badge)
15
15
  ![GitHub stars](https://img.shields.io/github/stars/azure-id/orc?style=for-the-badge&color=yellow)
16
16
 
17
- **Latest: v1.9.2** · updated 2026-09-23 · [full changelog](CHANGELOG.md)
17
+ **Latest: v2.0.2** · updated 28-09-2026 · [full changelog](CHANGELOG.md)
18
18
 
19
19
  **On npm: [`@azure-id/orc`](https://www.npmjs.com/package/@azure-id/orc)** — `npm i -g @azure-id/orc`
20
20
 
@@ -505,7 +505,8 @@ orc ui --stop # shut this project's server down
505
505
  | Settings | every config key, grouped, each with its own control | staged edits, applied together |
506
506
  | Runs | run history as an accordion: a row opens in place into state-of-play, resume prompt, checkpoint, trace tail | — |
507
507
  | **Knowledge** | **five tabs**: the wiki's tier AND its **contents** (every doc, what it covers, how often it is read), coverage against your tracked files, the code patterns with the conflicts the codifier flagged, repair memory with a **preview-then-apply** prune, and a read-only view of the linked repos | `wiki sync`, `gotcha prune` |
508
- | Stats | lane and agent usage, downgrades, and a **Cost** tab whose stacked bar keeps cache-read visible | — |
508
+ | Stats | lane and agent usage, downgrades, questions per run, and a **Cost** tab whose stacked bar keeps cache-read visible | — |
509
+ | **Behaviour** | the learning switch (Off · Observe · Propose), your habits with their evidence, the rhythm of your runs, the gotchas and the exact card the reviewer sees, review quality per category, and the answer log | `config set habits`, `habit accept` / `decline` / `forget`, `gotcha accept` |
509
510
  | Flow | the compiled DIY flow, its gate, and a stepper of every phase in order | `diy set`, `diy compile`, presets |
510
511
  | Crosslink | **Design** (the boundary as a graph) and **Settings** (each peer's freshness) | `crosslink add` / `remove` |
511
512
  | Promises · Boundary · Self-serve | the pact ledger, the boundary cards, and the surfaces a non-developer can change | `pact check`, `pact sync`, `handoff set` |
@@ -663,7 +664,7 @@ bin/webui/ `orc ui` — the local control panel: css/ + js/ + i18n/<lang>
663
664
  fixtures/, one file per layer and per panel. Zero deps, no build step
664
665
  bin/mockrun-catalog.js the mocked-run catalogue (derived from the files on disk)
665
666
  mock-run/ the mocked runs themselves — start at INDEX.md
666
- guides/ configuration · model selection · documents · knowledge reads · other AI models
667
+ guides/ configuration · model selection · documents · knowledge reads · other AI models · habits and gotchas
667
668
  ```
668
669
 
669
670
  The `orc` skill is a thin **spine**: it loads a reference or a subskill only when
@@ -685,6 +686,7 @@ Some lanes ship a full how-to next to the skill, in plain language:
685
686
  | [ORC-PR-DRIVER](templates/skills/orc-pr-driver/README.md) | you have a stack plan and want to build, submit and merge it |
686
687
  | [Rules](guides/rules.md) | you want the 65 anti-slop rules, the precedence ladder and the lint |
687
688
  | [Configuration](guides/configuration.md) · [Model selection](guides/model-selection.md) | you want every key, or the scoring bands |
689
+ | [Habits and gotchas](guides/habits-and-gotchas.md) | you want to know how a habit is proposed, how to import Sonar, SARIF or PR history, and how to undo |
688
690
  | [Other AI models](guides/extra-models.md) | you want part of the ladder to run somewhere other than Claude |
689
691
 
690
692
  Every skill also ships its own `SKILL.md` and `references/`. The guides above are
@@ -728,41 +730,28 @@ a current audit: [EVAL-REPORT.md](EVAL-REPORT.md).
728
730
  **Full history: [CHANGELOG.md](CHANGELOG.md)** — or `orc changelog`, which prints
729
731
  only what is newer than the version you have.
730
732
 
731
- ### v1.9.2 — the code graph gets its own tab, and Opus 5 becomes Opus 5.5 _(2026-09-23)_
732
-
733
- **The code graph has its own tab.** `orc ui` ▸ Knowledge ▸ **Code graph**
734
- replaces the one card on the Wiki tab. The tab shows, in this order:
735
-
736
- - **Where your graph is now** — the four states (OFF · NONE · FRESH · DRIFTED)
737
- as a ladder. The current state is lit, and the one action it needs is below.
738
- - **How the code graph works** — five animated steps, from your files to the
739
- short card an agent reads. The first three are free.
740
- - **What a code graph looks like** — an example graph (not your code). Put the
741
- pointer on a dot to see its callers and callees.
742
- - **Your graph, in numbers** — files, symbols, density per language, and what
743
- changed since the last build.
744
- - **What the graph cost, and what it probably saved** — paid (exact) and
745
- avoided (an estimate, drawn as a range) on one scale, and which reads lanes
746
- asked.
747
- - **What each word means** — every term on the tab, in plain words.
748
-
749
- A DRIFTED finding on Overview now opens this tab. Reduced motion removes every
750
- animation.
751
-
752
- **Every Opus 5 agent now runs Opus 5.5.** The model id is `claude-opus-5-5`
753
- (was `claude-opus-5`): executors, scouts, the analyst, the planner, the
754
- reviewer, the verifier, the judges and every other Opus agent. Opus 5.5 costs
755
- less: $4 input, $5 cache write, $0.20 cache read and $20 output per million
756
- tokens. `bin/pricing.json` has the new row, and `orc budget` uses it.
757
-
758
- **What you have to do:** run `orc update` to install the new agent files. The
759
- agent NAMES did not change, so `rubric_bands_override`, `fixed_executor` and
760
- `opus5_only` keep working. A config that still names `claude-opus-5` is still
761
- valid.
733
+ ### v2.0.2 — the lanes record what you answered, and the reviewer always gets the card _(2026-09-28)_
734
+
735
+ **A patch from the live evals.** Habits now really work in a live run, and the reviewer
736
+ always gets its card:
737
+
738
+ - **Your answers are recorded correctly.** `orc trace write` checks every answer as it
739
+ arrives and hands a wrong one back with the right ids. At the end of a run it names
740
+ any question nobody recorded.
741
+ - **The reviewer always gets the gotcha card.** A hook hands it to every reviewer,
742
+ verifier and judge, so a lane that forgets it cannot lose it.
743
+ - **A run that writes no trace is stopped once** and told how to fix it.
744
+ - **`/orc-quick` always takes the undo snapshot.**
745
+ - **The compact rules card is on by default for `/orc-mini` and `/orc-fast`** (eval E4 passed).
746
+
747
+ **What you have to do:** `orc update`.
762
748
 
763
749
  <details>
764
- <summary><strong>Earlier releases</strong> — 121 of them, titles only. Full text in <a href="CHANGELOG.md">CHANGELOG.md</a>.</summary>
750
+ <summary><strong>Earlier releases</strong> — 124 of them, titles only. Full text in <a href="CHANGELOG.md">CHANGELOG.md</a>.</summary>
765
751
 
752
+ - **v2.0.1** — the trace keeps the gate name, and the lanes find the habits rule · _2026-09-27_
753
+ - **v2.0.0** — the coding lanes remember what you fixed and how you work · _2026-09-27_
754
+ - **v1.9.2** — the code graph gets its own tab, and Opus 5 becomes Opus 5.5 · _2026-09-23_
766
755
  - **v1.9.1** — the graph that was paid for and never asked · _2026-09-23_
767
756
  - **v1.9.0** — the lean lanes learn to look before they leap · _2026-09-21_
768
757
  - **v1.8.2** — the map that finds what a grep cannot · _2026-09-21_