@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/mock-run/INDEX.md CHANGED
@@ -1,107 +1,109 @@
1
- # Mocked runs — what each ORC lane looks like when it runs
2
-
3
- New to ORC? Start here. Every file below is a **mocked run**: the screen you
4
- would see, the questions you would be asked, and the files that would land on
5
- disk — written the way the real lane writes them.
6
-
7
- Nothing here was executed. It is documentation, and it is here because you
8
- should not have to spend tokens to find out what a command does.
9
-
10
- All of it uses **easy English**, short sentences, and the same fake project.
11
-
12
- > **Read it in the panel instead:** `orc ui` ▸ **Mocked Skill Use** — the same
13
- > documents, searchable, with a reading pane. From the terminal:
14
- > `orc mock-run list` and `orc mock-run show <slug>`.
15
-
16
- ---
17
-
18
- ## Start here
19
-
20
- | Doc | What it shows |
21
- |---|---|
22
- | [The example project](the-example-project.md) | `shopcart`, the fake project every mock uses, and how to read these files |
23
- | [A normal day](a-normal-day.md) | `/orc-pact`, `/orc-boundary`, `/orc-budget`, `/orc-aftermath` and the rest, all inside one ordinary run |
24
-
25
- ## Build a change
26
-
27
- | Doc | Lane | One line |
28
- |---|---|---|
29
- | [orc](orc.md) | `/orc` | The full pipeline: intake → plan → score → parallel waves → review → verify → ship |
30
- | [orc-ultra](orc-ultra.md) | `/orc-ultra` | The same, plus an advisor and three judgment gates. Costs the most |
31
- | [orc-mini](../templates/skills/orc-mini/examples/mini-run-mock.md) | `/orc-mini` | One executor, a smoke gate, ship |
32
- | [orc-fast](orc-fast.md) | `/orc-fast` | No analyst, no planner — the wiki and the pattern already did that work |
33
- | [orc-quick](orc-quick.md) | `/orc-quick` | Ask for anything. Look → ask once → do, and it always asks which agent |
34
- | [orc-diy](orc-diy.md) | `/orc-diy` | Your own lane, composed in the terminal and compiled |
35
-
36
- ## Decide what to build
37
-
38
- | Doc | Lane | One line |
39
- |---|---|---|
40
- | [orc-brainstorm](orc-brainstorm.md) | `/orc-brainstorm` | No idea yet: it generates the options and **you** pick |
41
- | [orc-grill](orc-grill.md) | `/orc-grill` | One vague idea, sharpened by questions — it never answers its own |
42
- | [orc-doc](orc-doc.md) | `/orc-doc` | A PRD, TSD, agreement, report or runbook — written in parts, so nothing holds it all |
43
- | [orc-plan](orc-plan.md) | `/orc-plan` | A real task plan: grounded files, dependencies, facets, test dispositions |
44
- | [orc-route](orc-route.md) | `/orc-route` | You have a plan — which lane should build it, and which cannot |
45
- | [orc-explain](orc-explain.md) | `/orc-explain` | "Wait, what?" — it says the last message again, properly |
46
- | [orc-analyze](../templates/skills/orc-analyze/examples/analyze-mock.md) | `/orc-analyze` | A document turned into code-grounded requirements |
47
- | [orc-analyze-mini](../templates/skills/orc-analyze-mini/examples/quick-analysis-mock.md) | *(inside `/orc-mini`)* | The same, single pass, much cheaper |
48
- | [context-combiner](context-combiner.md) | — | Two related analyses merged into one spec, with a 100% conservation gate |
49
- | [orc-poly](../templates/skills/orc-poly/examples/poly-run-mock.md) | `/orc-poly` | One change across two or more repos, without drift |
50
-
51
- ## Teach ORC your project
52
-
53
- | Doc | Lane | One line |
54
- |---|---|---|
55
- | [orc-rules](orc-rules.md) | `orc rules` | The anti-slop rules: 65 shipped read-only, plus your own, which win |
56
- | [orc-wiki](../templates/skills/orc-wiki/examples/wiki-run-mock.md) | `/orc-wiki` | Scan the codebase into an evidence-anchored knowledge base |
57
- | [orc-pattern](orc-pattern.md) | `/orc-pattern` | Learn your real conventions so executors match your house style |
58
- | [orc-learn](../templates/skills/orc-learn/examples/learn-run-mock.md) | `/orc-learn` | Onboarding docs for a human, per feature |
59
- | [orc-claude](../templates/skills/orc-claude/examples/claude-run-mock.md) | `/orc-claude` | Build or refresh this repo's `CLAUDE.md` from verified facts |
60
- | [orc-export](orc-export.md) | `/orc-export` | Compile it all into a portable `AGENTS.md` so ORC is not a trap |
61
-
62
- ## Check what happened
63
-
64
- | Doc | Lane | One line |
65
- |---|---|---|
66
- | [orc-verify](../templates/skills/orc-verify/examples/verify-mock.md) | `/orc-verify` | Verify only your git-modified changes. Read-only |
67
- | [orc-challenge](orc-challenge.md) | `/orc-challenge` | Grade a finished document, then stop and make you fix it in another session |
68
- | [orc-challenge-council](orc-challenge-council.md) | `/orc-challenge` | Six more ways of looking at the same document — and you choose which ones run |
69
- | [orc-pact](orc-pact.md) | `/orc-pact` | The promises your system makes, and which are in doubt right now |
70
- | [orc-boundary](orc-boundary.md) | `/orc-boundary` | What the agent should **not** try here, and what would change that |
71
- | [orc-aftermath](orc-aftermath.md) | `/orc-aftermath` | Did what we shipped hold up. Churn is a signal, never a verdict |
72
- | [orc-budget](orc-budget.md) | `/orc-budget` | What a run costs, in the unit you are billed in |
73
- | [orc-retro](../templates/skills/orc-retro/examples/retro-mock.md) | `/orc-retro` | Mine the behavior traces into a calibration report |
74
-
75
- ## Ship and hand over
76
-
77
- | Doc | Lane | One line |
78
- |---|---|---|
79
- | [orc-pr-setup / orc-pr-driver](orc-pr-setup.md) | `/orc-pr-setup`, `/orc-pr-driver` | Split a big change into a stack of PRs, then build and merge them |
80
- | [orc-handoff](orc-handoff.md) | `/orc-handoff` | What a non-developer can safely change, graded by whether a check exists |
81
-
82
- ## Panel and terminal
83
-
84
- | Doc | One line |
85
- |---|---|
86
- | [orc-ui](orc-ui.md) | The local control panel for everything that is not ai (**video placeholder here**) |
87
- | [orc-cli](orc-cli.md) | The terminal commands: install, config, probes, run state, stats |
88
- | [orc-extra](orc-extra.md) | Run some of ORC's work on a different AI model, and still know what left your machine |
89
- | [extra-recovery](extra-recovery.md) | When that other model stops half-way: what it left on disk, whose fault it was, and how to continue |
90
- | [extra-slots](extra-slots.md) | The four lanes that never score a task: giving one JOB to a cheaper model, and what ORC says before it does |
91
-
92
- ---
93
-
94
- ## Two kinds of document
95
-
96
- - **Walkthroughs** (this folder) — written for a person, in easy English.
97
- - **Annotated examples** (`templates/skills/<skill>/examples/`) — dense, written
98
- for the model, and shipped inside your `.claude/` install. Both appear in
99
- `orc mock-run list` and in the **Mocked Skill Use** panel.
100
-
101
- ## Adding one
102
-
103
- Drop a `.md` file in this folder with a `# Title` heading and a `> one line`
104
- summary under it. It appears in `orc mock-run`, in the panel, and here — no list
105
- to update anywhere else. Reading order comes from `GROUP_OF` in
106
- [`bin/mockrun-catalog.js`](../bin/mockrun-catalog.js); a file nobody placed
107
- there still shows, under **More**.
1
+ # Mocked runs — what each ORC lane looks like when it runs
2
+
3
+ New to ORC? Start here. Every file below is a **mocked run**: the screen you
4
+ would see, the questions you would be asked, and the files that would land on
5
+ disk — written the way the real lane writes them.
6
+
7
+ Nothing here was executed. It is documentation, and it is here because you
8
+ should not have to spend tokens to find out what a command does.
9
+
10
+ All of it uses **easy English**, short sentences, and the same fake project.
11
+
12
+ > **Read it in the panel instead:** `orc ui` ▸ **Mocked Skill Use** — the same
13
+ > documents, searchable, with a reading pane. From the terminal:
14
+ > `orc mock-run list` and `orc mock-run show <slug>`.
15
+
16
+ ---
17
+
18
+ ## Start here
19
+
20
+ | Doc | What it shows |
21
+ |---|---|
22
+ | [The example project](the-example-project.md) | `shopcart`, the fake project every mock uses, and how to read these files |
23
+ | [A normal day](a-normal-day.md) | `/orc-pact`, `/orc-boundary`, `/orc-budget`, `/orc-aftermath` and the rest, all inside one ordinary run |
24
+
25
+ ## Build a change
26
+
27
+ | Doc | Lane | One line |
28
+ |---|---|---|
29
+ | [orc](orc.md) | `/orc` | The full pipeline: intake → plan → score → parallel waves → review → verify → ship |
30
+ | [orc-ultra](orc-ultra.md) | `/orc-ultra` | The same, plus an advisor and three judgment gates. Costs the most |
31
+ | [orc-mini](../templates/skills/orc-mini/examples/mini-run-mock.md) | `/orc-mini` | One executor, a smoke gate, ship |
32
+ | [orc-fast](orc-fast.md) | `/orc-fast` | No analyst, no planner — the wiki and the pattern already did that work |
33
+ | [orc-quick](orc-quick.md) | `/orc-quick` | Ask for anything. Look → ask once → do, and it always asks which agent |
34
+ | [orc-diy](orc-diy.md) | `/orc-diy` | Your own lane, composed in the terminal and compiled |
35
+
36
+ ## Decide what to build
37
+
38
+ | Doc | Lane | One line |
39
+ |---|---|---|
40
+ | [orc-brainstorm](orc-brainstorm.md) | `/orc-brainstorm` | No idea yet: it generates the options and **you** pick |
41
+ | [orc-grill](orc-grill.md) | `/orc-grill` | One vague idea, sharpened by questions — it never answers its own |
42
+ | [orc-doc](orc-doc.md) | `/orc-doc` | A PRD, TSD, agreement, report or runbook — written in parts, so nothing holds it all |
43
+ | [orc-plan](orc-plan.md) | `/orc-plan` | A real task plan: grounded files, dependencies, facets, test dispositions |
44
+ | [orc-route](orc-route.md) | `/orc-route` | You have a plan — which lane should build it, and which cannot |
45
+ | [orc-explain](orc-explain.md) | `/orc-explain` | "Wait, what?" — it says the last message again, properly |
46
+ | [orc-analyze](../templates/skills/orc-analyze/examples/analyze-mock.md) | `/orc-analyze` | A document turned into code-grounded requirements |
47
+ | [orc-analyze-mini](../templates/skills/orc-analyze-mini/examples/quick-analysis-mock.md) | *(inside `/orc-mini`)* | The same, single pass, much cheaper |
48
+ | [context-combiner](context-combiner.md) | — | Two related analyses merged into one spec, with a 100% conservation gate |
49
+ | [orc-poly](../templates/skills/orc-poly/examples/poly-run-mock.md) | `/orc-poly` | One change across two or more repos, without drift |
50
+
51
+ ## Teach ORC your project
52
+
53
+ | Doc | Lane | One line |
54
+ |---|---|---|
55
+ | [orc-rules](orc-rules.md) | `orc rules` | The anti-slop rules: 65 shipped read-only, plus your own, which win |
56
+ | [orc-wiki](../templates/skills/orc-wiki/examples/wiki-run-mock.md) | `/orc-wiki` | Scan the codebase into an evidence-anchored knowledge base |
57
+ | [orc-pattern](orc-pattern.md) | `/orc-pattern` | Learn your real conventions so executors match your house style |
58
+ | [orc-learn](../templates/skills/orc-learn/examples/learn-run-mock.md) | `/orc-learn` | Onboarding docs for a human, per feature |
59
+ | [orc-claude](../templates/skills/orc-claude/examples/claude-run-mock.md) | `/orc-claude` | Build or refresh this repo's `CLAUDE.md` from verified facts |
60
+ | [orc-export](orc-export.md) | `/orc-export` | Compile it all into a portable `AGENTS.md` so ORC is not a trap |
61
+ | [habits](habits.md) | `orc habit` | The answers you keep giving, proposed once at the end of a run. Off by default, never applied without your yes |
62
+ | [gotcha-import](gotcha-import.md) | `orc gotcha import` | Teach the repair memory from SARIF, Sonar, PR threads and closed defects |
63
+
64
+ ## Check what happened
65
+
66
+ | Doc | Lane | One line |
67
+ |---|---|---|
68
+ | [orc-verify](../templates/skills/orc-verify/examples/verify-mock.md) | `/orc-verify` | Verify only your git-modified changes. Read-only |
69
+ | [orc-challenge](orc-challenge.md) | `/orc-challenge` | Grade a finished document, then stop and make you fix it in another session |
70
+ | [orc-challenge-council](orc-challenge-council.md) | `/orc-challenge` | Six more ways of looking at the same document — and you choose which ones run |
71
+ | [orc-pact](orc-pact.md) | `/orc-pact` | The promises your system makes, and which are in doubt right now |
72
+ | [orc-boundary](orc-boundary.md) | `/orc-boundary` | What the agent should **not** try here, and what would change that |
73
+ | [orc-aftermath](orc-aftermath.md) | `/orc-aftermath` | Did what we shipped hold up. Churn is a signal, never a verdict |
74
+ | [orc-budget](orc-budget.md) | `/orc-budget` | What a run costs, in the unit you are billed in |
75
+ | [orc-retro](../templates/skills/orc-retro/examples/retro-mock.md) | `/orc-retro` | Mine the behavior traces into a calibration report |
76
+
77
+ ## Ship and hand over
78
+
79
+ | Doc | Lane | One line |
80
+ |---|---|---|
81
+ | [orc-pr-setup / orc-pr-driver](orc-pr-setup.md) | `/orc-pr-setup`, `/orc-pr-driver` | Split a big change into a stack of PRs, then build and merge them |
82
+ | [orc-handoff](orc-handoff.md) | `/orc-handoff` | What a non-developer can safely change, graded by whether a check exists |
83
+
84
+ ## Panel and terminal
85
+
86
+ | Doc | One line |
87
+ |---|---|
88
+ | [orc-ui](orc-ui.md) | The local control panel for everything that is not ai (**video placeholder here**) |
89
+ | [orc-cli](orc-cli.md) | The terminal commands: install, config, probes, run state, stats |
90
+ | [orc-extra](orc-extra.md) | Run some of ORC's work on a different AI model, and still know what left your machine |
91
+ | [extra-recovery](extra-recovery.md) | When that other model stops half-way: what it left on disk, whose fault it was, and how to continue |
92
+ | [extra-slots](extra-slots.md) | The four lanes that never score a task: giving one JOB to a cheaper model, and what ORC says before it does |
93
+
94
+ ---
95
+
96
+ ## Two kinds of document
97
+
98
+ - **Walkthroughs** (this folder) — written for a person, in easy English.
99
+ - **Annotated examples** (`templates/skills/<skill>/examples/`) — dense, written
100
+ for the model, and shipped inside your `.claude/` install. Both appear in
101
+ `orc mock-run list` and in the **Mocked Skill Use** panel.
102
+
103
+ ## Adding one
104
+
105
+ Drop a `.md` file in this folder with a `# Title` heading and a `> one line`
106
+ summary under it. It appears in `orc mock-run`, in the panel, and here — no list
107
+ to update anywhere else. Reading order comes from `GROUP_OF` in
108
+ [`bin/mockrun-catalog.js`](../bin/mockrun-catalog.js); a file nobody placed
109
+ there still shows, under **More**.
@@ -0,0 +1,118 @@
1
+ # Mock run — gotcha import and sync (`orc gotcha`)
2
+
3
+ > Teach the repair memory from what your tools and your reviewers already
4
+ > said: SARIF, Sonar, PR threads and closed defects. No model, and nothing is
5
+ > written to GitHub.
6
+
7
+ ---
8
+
9
+ ## 1. What it does
10
+
11
+ Gotchas are ORC's repair memory: what this project already got wrong, and how
12
+ it was fixed. Before 2.0.0 only a red → green inside a run could add one. Now
13
+ the CLI also reads four outside sources and turns each finding into an
14
+ **observation** in `.claude/orc/observations.jsonl`.
15
+
16
+ An observation is not an entry yet. A candidate becomes an entry only by a
17
+ fixed rule — or when you promote it yourself. The reviewer then gets a short
18
+ **card** of the entries that match the files it reviews.
19
+
20
+ ---
21
+
22
+ ## 2. Import once, from each source
23
+
24
+ ```
25
+ $ orc gotcha import sarif reports/eslint.sarif
26
+ sarif · ESLint · 14 results · 1 suppressed (skipped) · 13 observations
27
+ new since the last ESLint import: 4
28
+
29
+ $ export SONAR_TOKEN=… # the token is never a config key
30
+ $ orc config set sonar_url https://sonarcloud.io
31
+ $ orc config set sonar_project shopcart
32
+ $ orc config set sonar_org shopcart-team
33
+ $ orc gotcha import sonar --branch main
34
+ sonar · 9 issues · 9 observations
35
+
36
+ $ orc gotcha import pr 212
37
+ pr #212 · 6 threads · 5 by people, 1 by a bot (measured, not recorded)
38
+ 5 observations (3 addressed · 1 disputed · 1 open)
39
+
40
+ $ orc gotcha import issues --label bug
41
+ issues · 4 closed defects with a closing PR · 4 observations
42
+ ```
43
+
44
+ Every import is read-only. `gh` is used only to read, and a test with a fake
45
+ `gh` proves that no call writes.
46
+
47
+ ---
48
+
49
+ ## 3. Keep it fresh
50
+
51
+ ```
52
+ $ orc gotcha sync
53
+ sarif nothing new
54
+ sonar 2 new issues
55
+ pr #214: 1 new thread
56
+ issues nothing new
57
+ synced · 3 observations · next sync due in 6 h (gotcha_sync_hours)
58
+ ```
59
+
60
+ `sync` runs every source that is available, reads only what is new, and has a
61
+ time limit. The review step of a lane runs it too. If a source fails, the lane
62
+ goes on — a failed import never blocks a review.
63
+
64
+ ---
65
+
66
+ ## 4. From observations to an entry
67
+
68
+ ```
69
+ $ orc gotcha list --candidates
70
+ C-004 money rounding in cart totals 3 addressed cases in 2 PRs → promoted as G-017
71
+ C-007 missing await on db.save 2 addressed cases in 1 PR needs 1 more case in 1 more PR
72
+ C-009 "prefer template literals" 4 disputed proposed suppression
73
+
74
+ $ orc gotcha accept C-007
75
+ C-007 → G-018 (promoted by a person)
76
+ ```
77
+
78
+ The fixed rule promotes a candidate on ONE of these:
79
+
80
+ - a red → green inside a lane, with a reproduction;
81
+ - a miss — an ORC review read those lines and did not flag them;
82
+ - a security finding with a CWE tag or a HIGH impact (one case is enough);
83
+ - 3 addressed cases in 2 PRs within 90 days.
84
+
85
+ ---
86
+
87
+ ## 5. What the reviewer sees
88
+
89
+ ```
90
+ $ orc gotcha card --files src/cart/total.ts
91
+ gotchas · 2 of 18 match · budget 600 tokens · 0 dropped
92
+ G-017 money rounding in cart totals — round once, at the end, in cents
93
+ G-011 totals cached across currency switch — clear on currency change
94
+ ```
95
+
96
+ The card is always on. `gotcha_card_budget` sets its size (600 tokens, at
97
+ least 200). An entry that does not fit is counted in the header, never dropped
98
+ in silence.
99
+
100
+ ---
101
+
102
+ ## 6. What to notice
103
+
104
+ - **People teach, bots are measured.** A bot comment is counted for quality,
105
+ but it never becomes an entry by itself.
106
+ - **`orc gotcha filter` never removes a P0 or a P1.** It removes only
107
+ suppressed, folded and noisy advice.
108
+ - **Your v1 file stays valid.** `gotchas.md` is not rewritten, and ORC 1.9.2
109
+ can still read the file 2.0.0 writes.
110
+ - **Quality is measured.** `orc gotcha quality` shows the acceptance per
111
+ category after five reviews, and `orc ui` ▸ **Behaviour** draws it.
112
+
113
+ ---
114
+
115
+ ## 7. Related
116
+
117
+ - The full guide: [`guides/habits-and-gotchas.md`](../guides/habits-and-gotchas.md)
118
+ - A normal run that uses the card: [orc](orc.md)
@@ -0,0 +1,129 @@
1
+ # Mock run — habits (`orc habit`)
2
+
3
+ > You keep giving the same answer to the same question. ORC notices, asks you
4
+ > ONCE at the end of a run, and applies nothing without your yes.
5
+
6
+ ---
7
+
8
+ ## 1. What it does
9
+
10
+ Every lane asks you questions: review first or commit now, use TDD or not,
11
+ open a PR or commit only. Some of those answers are the same every time.
12
+
13
+ With habits on, each answer writes one `ASK` line into the run's trace. The
14
+ CLI (`orc habit`, no model) counts those lines. When one answer is clearly your
15
+ usual, it proposes it — once, at the end of a run, inside the questions the
16
+ lane already asks.
17
+
18
+ Habits are **off by default**. Off costs zero tokens: no line is written, no
19
+ question changes, and `orc lane config --json` has no habits field.
20
+
21
+ ---
22
+
23
+ ## 2. Turn it on
24
+
25
+ ```
26
+ $ orc config set habits propose
27
+ habits: off → propose
28
+ ORC now writes one ASK line per answered question. At the end of a run it may
29
+ ask ONE question. Nothing is applied without your yes.
30
+ ```
31
+
32
+ `observe` is the quieter step: ORC counts, and `orc habit show` tells you what
33
+ it sees, but it never proposes.
34
+
35
+ ---
36
+
37
+ ## 3. Six runs later
38
+
39
+ You ran `/orc-quick` six times on `shopcart`. Each time, at the Q3 offers, you
40
+ chose **review first**. The seventh run opens with the usual preflight lines,
41
+ plus one more:
42
+
43
+ ```
44
+ habits: propose — 0 learned, 0 usual mark(s), 1 proposal for the end of the run
45
+ ```
46
+
47
+ The work runs as normal. The dispatch gate still asks which agent to use —
48
+ every time, with or without habits. At the end, the proposal is ONE line in
49
+ the offers you already get:
50
+
51
+ ```
52
+ Entry 7 written to orc-quick/cart-rounding/quick-context.md
53
+
54
+ 1 review first dispatch orc-reviewer-opus-5-med on the diff
55
+ 2 commit directly
56
+ 3 stop
57
+
58
+ You chose review first in 6 of your last 6 answers to "Code review before
59
+ commit". Make it your usual? [yes · not now · never]
60
+
61
+ > 1, and yes
62
+ ```
63
+
64
+ ORC runs the command that the `lane config` answer named for "yes". Nothing
65
+ else changes in this run.
66
+
67
+ ---
68
+
69
+ ## 4. The next run
70
+
71
+ ```
72
+ habits: propose — 0 learned, 1 usual mark(s), no proposal
73
+ ```
74
+
75
+ ```
76
+ 1 review → then commit → usual (6 of 6)
77
+ 2 commit without review
78
+ 3 stop
79
+ ```
80
+
81
+ The usual answer is FIRST and marked. It is not pre-selected: the question is
82
+ still asked, and the review is still a dispatch, so its gate still asks which
83
+ agent.
84
+
85
+ ---
86
+
87
+ ## 5. Look at it, and undo it
88
+
89
+ ```
90
+ $ orc habit show
91
+ mode propose · window 30d · 7 runs · 7 answers
92
+
93
+ H-3f9a2c Code review before commit applied 6 of 6
94
+ You chose review first in 6 of your last 6 answers to "Code review
95
+ before commit".
96
+ rule: Wilson95 LB 0.61 (n_eff 6, raw n 6) — proposes at ≥ 0.55 with
97
+ n ≥ 5 and the last 3 agreeing
98
+ undo: orc habit forget H-3f9a2c
99
+
100
+ $ orc habit why H-3f9a2c # every ASK line behind it
101
+ $ orc habit forget H-3f9a2c # back to asking with no mark
102
+ ```
103
+
104
+ `orc ui` ▸ **Behaviour** shows the same rows, with the buttons the CLI allows.
105
+
106
+ ---
107
+
108
+ ## 6. What to notice
109
+
110
+ - **Nothing is applied without your yes.** There is no automatic level, and
111
+ `orc config set habits auto` is refused by name.
112
+ - **A habit moves only toward the careful side.** A habit can turn
113
+ `review_before_push`, `mini_tdd` or `quick_update_tests` to `on`. A habit to
114
+ skip a review, drop TDD or continue on a stale wiki is never applied.
115
+ - **Your config file wins.** An accepted habit is the `learned` rank, below
116
+ `.claude/orc.config.yaml`. `orc config set` always beats it.
117
+ - **Your words are never stored.** An answer in your own words is recorded as
118
+ `chose=other`.
119
+ - **A habit can go stale.** Two overrides in the last three answers, or 90 days
120
+ without use, and ORC asks again at the end of a run.
121
+ - **Old runs do not count.** Traces from before 2.0.0 have no `ASK` lines, so
122
+ habits start at `none yet`.
123
+
124
+ ---
125
+
126
+ ## 7. Related
127
+
128
+ - The full guide: [`guides/habits-and-gotchas.md`](../guides/habits-and-gotchas.md)
129
+ - The quick lane: [orc-quick](orc-quick.md)
@@ -125,7 +125,12 @@ Your next request becomes entry 2 in the same file, and so on.
125
125
  thread, approves or merges. PR comments are treated as data, never as
126
126
  instructions.
127
127
  - **It never undoes your work.** If you stop while things are red, it prints
128
- the `git` command and leaves your tree alone.
128
+ `orc undo --run <slug>` and leaves your tree alone. That command reverts only
129
+ the files the run changed, and only when you add `--apply`.
130
+ - **The review offer uses the repair memory.** A review gets the gotcha card of
131
+ the files it reads, and the outcome of each finding is recorded. With
132
+ [habits](habits.md) on, your usual answer is marked — the dispatch gate is
133
+ still asked every time.
129
134
  - **A defect is shown red first.** If it cannot be reproduced — no runner, no
130
135
  reachable entry point — the entry says *not reproduced* with the reason, and
131
136
  says it again at the commit offer. It never invents a reproduction.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-id/orc",
3
- "version": "1.9.2",
3
+ "version": "2.0.2",
4
4
  "description": "ORC — an orchestrator skill constellation for Claude Code: intake, planning, scored parallel subagents, code-pattern matching, review, verify, ship, plus a project knowledge-base wiki.",
5
5
  "bin": {
6
6
  "orc": "bin/cli.js"
@@ -20,7 +20,7 @@ Score→executor mapping lives in config.md (one canonical 6-band table;
20
20
  **Executors no band names — they still ship.**
21
21
  `orc-executor-opus-4-7-med`, `orc-executor-opus-4-7-high`,
22
22
  `orc-executor-opus-4-8-high` and `orc-executor-opus-5-high` are still generated
23
- and still installed. Since v1.0.0 they are reachable only when a user names one
23
+ and still installed. They are reachable only when a user names one
24
24
  explicitly: `rubric_bands_override`, `orc diy`'s `fixed_executor`, or
25
25
  `extra_fallback_agent`. They are not deleted because a table change is not a
26
26
  model change, and an agent's model change is always a RENAME.
@@ -42,7 +42,7 @@ model change, and an agent's model change is always a RENAME.
42
42
  | orc-context-combiner-opus-5-high | claude-opus-5-5 | high | combine 2+ related analyses (full lane) |
43
43
  | orc-pattern-codifier-sonnet-5-high | claude-sonnet-5 | high | reconcile per-language playbook vs. project files → cached code-pattern (opt-in) |
44
44
  | orc-retro-sonnet-5-high | claude-sonnet-5 | high | mine behavior traces → calibration report (/orc-retro; read-only) |
45
- | orc-wiki-scanner-opus-4-8-high | claude-opus-4-8 | high | scan ONE wiki coverage area → evidence-anchored doc body + crosslink tags (/orc-wiki only; read-only against the project). The DEEP half of the v0.46.0 tier ladder: first scan · STRUCTURAL · wide delta · a new exported symbol |
45
+ | orc-wiki-scanner-opus-4-8-high | claude-opus-4-8 | high | scan ONE wiki coverage area → evidence-anchored doc body + crosslink tags (/orc-wiki only; read-only against the project). The DEEP half of the tier ladder: first scan · STRUCTURAL · wide delta · a new exported symbol |
46
46
  | orc-wiki-scanner-sonnet-5-high | claude-sonnet-5 | high | the LIGHT half of the same ladder — an existing doc whose covered files moved by a small, no-new-surface delta. IDENTICAL return contract; it escalates with `needs_context` rather than under-delivering. Never used for a first scan |
47
47
  | orc-executor-opus-5-med | claude-opus-5-5 | medium | the `[90,100]` band in BOTH tables |
48
48
  | orc-executor-opus-5-low | claude-opus-5-5 | low | the default table's `[65,90)`, `opus5_only`'s `[0,90)`, and the forced mini/fast executor |
@@ -53,7 +53,7 @@ model change, and an agent's model change is always a RENAME.
53
53
  | orc-challenge-judge-opus-5-high | claude-opus-5-5 | high | grade ONE finished artifact against a FROZEN goal + template (/orc-challenge only; read-only). It reports findings and can never declare a pass — `orc challenge record` computes that |
54
54
  | orc-challenge-advisor-opus-5-med | claude-opus-5-5 | medium | turn a FAILED verdict into a remediation strategy — root-cause groups, an order with reasons, the decisions that are not defects (/orc-challenge only; read-only, no prose, no diffs) |
55
55
  | orc-challenge-reader-opus-5-low | claude-opus-5-5 | low | the COLD READ: answer questions from ONE artifact with `Read` and nothing else (/orc-challenge only). LOW ON PURPOSE — a harder-thinking reader reasons around the gaps D4 exists to find, so a stronger configuration is a worse instrument |
56
- | orc-challenge-contrarian-opus-5-high | claude-opus-5-5 | high | THE COUNCIL (v0.49.1): start from "this has a fatal flaw" and go find it — load-bearing claim, then unhappy path, then second-order (/orc-challenge only; read-only). HIGH IS THE INSTRUMENT: a shallow contrarian returns the three surface complaints the free lint already caught |
56
+ | orc-challenge-contrarian-opus-5-high | claude-opus-5-5 | high | THE COUNCIL: start from "this has a fatal flaw" and go find it — load-bearing claim, then unhappy path, then second-order (/orc-challenge only; read-only). HIGH IS THE INSTRUMENT: a shallow contrarian returns the three surface complaints the free lint already caught |
57
57
  | orc-challenge-outsider-opus-5-low | claude-opus-5-5 | low | THE COUNCIL: what does this page assume you already know? The TIGHTEST slice in the lane — the artifact and this protocol, `Read` only, no goal, no audience, no template (/orc-challenge only). LOW IS A MEASUREMENT, NOT A COST CHOICE: a harder-thinking outsider reasons its way around an unexplained acronym and reports the document is fine. NOTHING MAY UPGRADE IT |
58
58
  | orc-challenge-executor-opus-5-med | claude-opus-5-5 | medium | THE COUNCIL: can this be started on Monday, and where is the first step? Returns D6/D2 findings plus the literal `monday_morning` list — or the point at which writing it becomes impossible (/orc-challenge only; read-only, `Bash` to CHECK a prerequisite, never to change anything). Not an ORC build executor — it writes nothing |
59
59
  | orc-challenge-principles-opus-5-high | claude-opus-5-5 | high | THE COUNCIL: the ONLY role allowed to say the frozen goal is wrong. Returns `premise` objects — no severity, never in findings[], never near the pass gate — and its report NEVER reaches the judge (/orc-challenge only; read-only). HIGH because rebuilding a problem statement from the ground up is the deepest reasoning in the lane |
@@ -116,10 +116,10 @@ executor the user already chose for that entry; round 3 asks again.
116
116
  the one exception to `opus5_only`'s otherwise flat precedence. See
117
117
  `skills/_shared/opus5-only.md` and `skills/orc-quick/references/dispatch-gate.md`.
118
118
 
119
- **Recon is a pinned PAIR since v1.9.0; `other` is the ad-hoc escape hatch.** The
119
+ **Recon is a pinned PAIR; `other` is the ad-hoc escape hatch.** The
120
120
  pair exists because the trace hook only sees an agent whose name starts with
121
- `orc-`: an ad-hoc recon wrote no SPAWN/RETURN, was invisible to
122
- `orc run inflight`, and could not be counted by `/orc-retro`. The two files share
121
+ `orc-`: an ad-hoc recon writes no SPAWN/RETURN, is invisible to
122
+ `orc run inflight`, and cannot be counted by `/orc-retro`. The two files share
123
123
  ONE return contract, so the choice is a model choice and nothing else.
124
124
 
125
125
  The escape hatch names **a model only**. The Agent tool takes a per-call model
@@ -157,7 +157,7 @@ roles).
157
157
 
158
158
  A subagent's model cannot exceed the MAIN session's cost tier — request pricier
159
159
  and it silently falls back to the main model. **Run your main Claude Code
160
- session on Opus** or every opus-* agent downgrades to Sonnet. As of v0.34.0 the
160
+ session on Opus** or every opus-* agent downgrades to Sonnet. The
161
161
  [90,100] executor band AND every core fixed role (analyst, planner, reviewer,
162
162
  verifier, test author, combiner, learn writer, ultra advisor/judge) are pinned
163
163
  to **claude-opus-5-5** — on an Opus 4.8 session they all land on Opus 4.8. Verify by
@@ -1,13 +1,7 @@
1
1
  ---
2
2
  name: orc-advisor-opus-5-xhigh
3
3
  description: >
4
- ORC Advisor — claude-opus-5-5, xhigh effort. Ultra lane only. Single-role:
5
- pre-analysis advisory. Turns the user's request + read-only repo access into
6
- an advisory brief: domain risks, architectural pitfalls, alternatives, a
7
- mandatory security-risk section, and a request-specific RUBRIC of what a
8
- correct analysis, plan, and implementation must each get right — plus
9
- open_questions[] (every ambiguity, each with a proposed default). Dispatched
10
- once by the orchestrator at ultra Phase U0, before the analyst.
4
+ ORC Advisor — claude-opus-5-5, xhigh effort. Dispatched by /orc-ultra at Phase U0, before the analyst: the advisory brief, the security risks and the rubric.
11
5
  model: claude-opus-5-5
12
6
  effort: xhigh
13
7
  tools: Read, Glob, Grep, Bash
@@ -1,12 +1,7 @@
1
1
  ---
2
2
  name: orc-analyze-mini-opus-5-med
3
3
  description: >
4
- ORC mini System Analyst — Opus-5-only mode variant. claude-opus-5-5, medium
5
- effort. Fast-lane requirement analysis for ORC-MINI. Same artifacts/contract as
6
- orc-analyze-mini-sonnet-5-high, trimmed depth. Doc-optional + evidence-or-mark
7
- + recommended-option questions, but always single-pass — NO deep mode, NO
8
- scouts. Dispatched INSTEAD of orc-analyze-mini-sonnet-5-high when
9
- `opus5_only: true`.
4
+ ORC mini System Analyst — claude-opus-5-5, medium effort. Dispatched by /orc-mini and /orc-analyze-mini, instead of orc-analyze-mini-sonnet-5-high when `opus5_only: true`.
10
5
  model: claude-opus-5-5
11
6
  effort: medium
12
7
  tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch
@@ -1,10 +1,7 @@
1
1
  ---
2
2
  name: orc-analyze-mini-sonnet-5-high
3
3
  description: >
4
- ORC mini System Analyst — claude-sonnet-5, high effort. Fast-lane requirement
5
- analysis for ORC-MINI. Same artifacts/contract as the full analyst, trimmed
6
- depth. Doc-optional + evidence-or-mark + recommended-option questions, but
7
- always single-pass — NO deep mode, NO scouts.
4
+ ORC mini System Analyst — claude-sonnet-5, high effort. Dispatched by /orc-mini and /orc-analyze-mini at analysis: single pass, no deep mode, no scouts.
8
5
  model: claude-sonnet-5
9
6
  effort: high
10
7
  tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch