@azure-id/orc 1.9.2 → 2.1.0

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 (228) hide show
  1. package/CHANGELOG.md +722 -0
  2. package/README-id.md +56 -42
  3. package/README.md +58 -41
  4. package/bin/build-agents.js +125 -29
  5. package/bin/clear-logs.js +620 -0
  6. package/bin/cli.js +1873 -180
  7. package/bin/fix.js +459 -0
  8. package/bin/gotcha-import.js +1081 -0
  9. package/bin/gotcha.js +1566 -0
  10. package/bin/graph-query.js +1 -1
  11. package/bin/graph.js +717 -717
  12. package/bin/habit.js +1538 -0
  13. package/bin/mockrun-catalog.js +284 -276
  14. package/bin/onboarding-content.js +2 -1
  15. package/bin/pricing.json +28 -21
  16. package/bin/run-undo.js +398 -0
  17. package/bin/trace-write.js +869 -0
  18. package/bin/verify-contracts.js +627 -100
  19. package/bin/verify-package.js +68 -10
  20. package/bin/webui/api.js +151 -6
  21. package/bin/webui/app.html +239 -232
  22. package/bin/webui/css/00-tokens.css +110 -92
  23. package/bin/webui/css/04-motion.css +87 -0
  24. package/bin/webui/css/06-responsive.css +203 -178
  25. package/bin/webui/css/panels/behaviour.css +205 -0
  26. package/bin/webui/css/panels/hookui.css +79 -0
  27. package/bin/webui/fixtures/behaviour.js +562 -0
  28. package/bin/webui/fixtures/extra.js +9 -9
  29. package/bin/webui/fixtures/flow.js +81 -81
  30. package/bin/webui/fixtures/hookui.js +506 -431
  31. package/bin/webui/fixtures/index.js +66 -3
  32. package/bin/webui/fixtures/knowledge.js +9 -3
  33. package/bin/webui/fixtures/maintenance.js +123 -42
  34. package/bin/webui/fixtures/rules.js +1007 -1002
  35. package/bin/webui/fixtures/settings.js +6 -7
  36. package/bin/webui/fixtures/stats.js +25 -6
  37. package/bin/webui/fixtures/wait.js +98 -97
  38. package/bin/webui/i18n/en/behaviour.json +156 -0
  39. package/bin/webui/i18n/en/hookui.json +290 -194
  40. package/bin/webui/i18n/en/maintenance.json +71 -52
  41. package/bin/webui/i18n/en/nav.json +25 -24
  42. package/bin/webui/i18n/en/settings.json +60 -60
  43. package/bin/webui/i18n/en/tour.json +37 -35
  44. package/bin/webui/i18n/id/behaviour.json +156 -0
  45. package/bin/webui/i18n/id/hookui.json +290 -194
  46. package/bin/webui/i18n/id/maintenance.json +71 -52
  47. package/bin/webui/i18n/id/nav.json +25 -24
  48. package/bin/webui/i18n/id/settings.json +60 -60
  49. package/bin/webui/i18n/id/tour.json +37 -35
  50. package/bin/webui/js/01-i18n.js +155 -154
  51. package/bin/webui/js/05-banners.js +181 -172
  52. package/bin/webui/js/06-edit.js +193 -183
  53. package/bin/webui/js/90-tour.js +498 -494
  54. package/bin/webui/js/91-shortcuts.js +126 -126
  55. package/bin/webui/js/99-boot.js +121 -118
  56. package/bin/webui/js/panels/behaviour.js +1087 -0
  57. package/bin/webui/js/panels/hookui.js +2196 -1691
  58. package/bin/webui/js/panels/maintenance.js +336 -235
  59. package/bin/webui/js/panels/settings.js +726 -719
  60. package/mock-run/INDEX.md +110 -107
  61. package/mock-run/extra-slots.md +1 -1
  62. package/mock-run/gotcha-import.md +118 -0
  63. package/mock-run/habits.md +129 -0
  64. package/mock-run/orc-aftermath.md +392 -392
  65. package/mock-run/orc-budget.md +29 -33
  66. package/mock-run/orc-cli.md +200 -200
  67. package/mock-run/orc-explain.md +86 -86
  68. package/mock-run/orc-extra.md +389 -392
  69. package/mock-run/orc-fix.md +87 -0
  70. package/mock-run/orc-pattern.md +112 -112
  71. package/mock-run/orc-quick.md +6 -1
  72. package/mock-run/orc.md +157 -157
  73. package/package.json +1 -1
  74. package/templates/agents/MODEL-MAPPING.md +37 -34
  75. package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
  76. package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
  77. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -5
  78. package/templates/agents/{orc-claude-writer-opus-4-8-high.md → orc-claude-writer-opus-5-low.md} +48 -53
  79. package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
  80. package/templates/agents/orc-executor-haiku-4-5.md +14 -6
  81. package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
  82. package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
  83. package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
  84. package/templates/agents/orc-executor-opus-5-high.md +14 -6
  85. package/templates/agents/orc-executor-opus-5-low.md +14 -6
  86. package/templates/agents/orc-executor-opus-5-med.md +14 -6
  87. package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
  88. package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
  89. package/templates/agents/orc-executor-sonnet-5-high.md +15 -7
  90. package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
  91. package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
  92. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
  93. package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
  94. package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
  95. package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
  96. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
  97. package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
  98. package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
  99. package/templates/agents/orc-planner-opus-5-med.md +1 -4
  100. package/templates/agents/orc-recon-opus-5-low.md +1 -8
  101. package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
  102. package/templates/agents/orc-retro-opus-5-med.md +6 -8
  103. package/templates/agents/orc-retro-sonnet-5-high.md +7 -8
  104. package/templates/agents/orc-reviewer-opus-5-low.md +96 -0
  105. package/templates/agents/orc-scout-opus-5-low.md +1 -6
  106. package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
  107. package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
  108. package/templates/agents/orc-test-author-opus-5-med.md +4 -5
  109. package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
  110. package/templates/agents/orc-verifier-opus-5-med.md +16 -8
  111. package/templates/agents/{orc-wiki-scanner-opus-4-8-high.md → orc-wiki-scanner-opus-5-low.md} +74 -79
  112. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
  113. package/templates/commands/orc-analyze.md +13 -21
  114. package/templates/commands/orc-fast.md +10 -15
  115. package/templates/commands/orc-fix.md +18 -0
  116. package/templates/commands/orc-poly.md +12 -21
  117. package/templates/commands/orc-pr-driver.md +11 -30
  118. package/templates/commands/orc-pr-setup.md +10 -31
  119. package/templates/commands/orc-route.md +11 -41
  120. package/templates/commands/orc-test.md +5 -60
  121. package/templates/commands/orc-wiki.md +64 -64
  122. package/templates/hooks/README.md +109 -7
  123. package/templates/hooks/orc-session-hook.js +339 -0
  124. package/templates/hooks/orc-statusline-render.js +317 -23
  125. package/templates/hooks/orc-statusline.js +165 -50
  126. package/templates/hooks/orc-subagent-line.js +23 -5
  127. package/templates/hooks/orc-weather-fetch.js +123 -0
  128. package/templates/skills/_shared/README.md +9 -0
  129. package/templates/skills/_shared/code-graph.md +47 -55
  130. package/templates/skills/_shared/config-precedence.md +3 -1
  131. package/templates/skills/_shared/extra-dispatch.md +78 -93
  132. package/templates/skills/_shared/gotchas.md +248 -177
  133. package/templates/skills/_shared/habits.md +101 -0
  134. package/templates/skills/_shared/lane-contract.md +84 -0
  135. package/templates/skills/_shared/opus5-only.md +14 -14
  136. package/templates/skills/_shared/phases/README.md +142 -83
  137. package/templates/skills/_shared/phases/analyst-gates.md +10 -21
  138. package/templates/skills/_shared/phases/execution.md +8 -14
  139. package/templates/skills/_shared/phases/house-rules.md +27 -32
  140. package/templates/skills/_shared/phases/intake.md +127 -133
  141. package/templates/skills/_shared/phases/mock-example.md +46 -56
  142. package/templates/skills/_shared/phases/plan-handoff.md +91 -97
  143. package/templates/skills/_shared/phases/planning.md +7 -17
  144. package/templates/skills/_shared/phases/preflight.md +19 -42
  145. package/templates/skills/_shared/phases/review.md +24 -28
  146. package/templates/skills/_shared/phases/rules.md +18 -42
  147. package/templates/skills/_shared/phases/scoring.md +55 -65
  148. package/templates/skills/_shared/phases/security-checklist.md +46 -50
  149. package/templates/skills/_shared/phases/security.md +45 -55
  150. package/templates/skills/_shared/phases/ship.md +6 -15
  151. package/templates/skills/_shared/phases/stop-resume.md +2 -5
  152. package/templates/skills/_shared/phases/summary.md +73 -48
  153. package/templates/skills/_shared/phases/testgen.md +41 -51
  154. package/templates/skills/_shared/phases/trace-verbs.md +447 -0
  155. package/templates/skills/_shared/phases/trace.md +66 -297
  156. package/templates/skills/_shared/phases/verify.md +62 -70
  157. package/templates/skills/_shared/phases/wave-grouping.md +128 -133
  158. package/templates/skills/_shared/phases/wiki-consult.md +10 -6
  159. package/templates/skills/_shared/read-ladder.md +2 -55
  160. package/templates/skills/_shared/return-validation.md +17 -70
  161. package/templates/skills/_shared/review-slice.md +106 -0
  162. package/templates/skills/_shared/smoke-gate.md +46 -28
  163. package/templates/skills/_shared/wait.md +1 -0
  164. package/templates/skills/context-combiner/SKILL.md +15 -44
  165. package/templates/skills/orc/README.md +2 -2
  166. package/templates/skills/orc/SKILL.md +35 -63
  167. package/templates/skills/orc/config.md +25 -27
  168. package/templates/skills/orc/examples/full-run-mock.md +2 -1
  169. package/templates/skills/orc/references/effort-and-mode.md +17 -17
  170. package/templates/skills/orc/references/pattern-gate.md +89 -89
  171. package/templates/skills/orc/references/phases/intake.md +41 -47
  172. package/templates/skills/orc/references/phases/integration.md +13 -19
  173. package/templates/skills/orc/references/preflight-report.md +11 -12
  174. package/templates/skills/orc/references/ultra-mode.md +9 -7
  175. package/templates/skills/orc/schemas/checkpoint.md +122 -122
  176. package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
  177. package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
  178. package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
  179. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +12 -53
  180. package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
  181. package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
  182. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
  183. package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
  184. package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
  185. package/templates/skills/orc-advisor/SKILL.md +56 -60
  186. package/templates/skills/orc-analyze/SKILL.md +33 -67
  187. package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
  188. package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
  189. package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
  190. package/templates/skills/orc-claude/SKILL.md +14 -14
  191. package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
  192. package/templates/skills/orc-diy/README.md +31 -0
  193. package/templates/skills/orc-diy/SKILL.md +27 -78
  194. package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
  195. package/templates/skills/orc-fast/SKILL.md +49 -75
  196. package/templates/skills/orc-fix/SKILL.md +110 -0
  197. package/templates/skills/orc-judge/SKILL.md +77 -82
  198. package/templates/skills/orc-mini/SKILL.md +64 -112
  199. package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
  200. package/templates/skills/orc-pattern/SKILL.md +27 -48
  201. package/templates/skills/orc-poly/SKILL.md +32 -61
  202. package/templates/skills/orc-pr-driver/SKILL.md +25 -51
  203. package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
  204. package/templates/skills/orc-pr-setup/SKILL.md +20 -45
  205. package/templates/skills/orc-quick/README.md +44 -3
  206. package/templates/skills/orc-quick/SKILL.md +77 -108
  207. package/templates/skills/orc-quick/references/dispatch-gate.md +18 -6
  208. package/templates/skills/orc-quick/references/gh-mode.md +50 -1
  209. package/templates/skills/orc-quick/references/look.md +3 -1
  210. package/templates/skills/orc-retro/SKILL.md +20 -19
  211. package/templates/skills/orc-retro/examples/retro-mock.md +17 -17
  212. package/templates/skills/orc-route/SKILL.md +25 -45
  213. package/templates/skills/orc-test/SKILL.md +16 -37
  214. package/templates/skills/orc-verify/SKILL.md +14 -32
  215. package/templates/skills/orc-wait/SKILL.md +156 -163
  216. package/templates/skills/orc-wiki/README.md +325 -325
  217. package/templates/skills/orc-wiki/SKILL.md +195 -195
  218. package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
  219. package/templates/skills/orc-wiki/references/extra.md +2 -2
  220. package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
  221. package/templates/skills/orc-wiki/references/phases/phase-0.md +2 -7
  222. package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
  223. package/templates/skills/orc-wiki/references/phases/phase-2.md +4 -9
  224. package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
  225. package/templates/skills/orc-wiki/references/phases/phase-3c.md +4 -8
  226. package/templates/agents/orc-claude-writer-opus-5-med.md +0 -55
  227. package/templates/agents/orc-reviewer-opus-5-med.md +0 -60
  228. package/templates/agents/orc-wiki-scanner-opus-5-med.md +0 -81
@@ -1,41 +1,11 @@
1
- ---
2
- description: You have a plan — this says which lane should build it, with the numbers it decided from. Plan-only: it refuses a request in words rather than guess
3
- ---
4
-
5
- Use the **orc-route** skill. Zero agents, nothing is built.
6
-
7
- **It routes a PLAN, and only a plan** — pasted ORC planning-output, a
8
- `plan-<name>.md` path, or a saved `orc/planner/<name>/` checkpoint (the same
9
- definition `skills/_shared/phases/plan-handoff.md` already uses). A plan carries real
10
- numbers: tasks, files per task, dependencies, facets, scores. Routing from those
11
- is arithmetic; routing from a sentence is guessing, so a request in words gets a
12
- refusal and a pointer to `/orc-plan`, not a guess.
13
-
14
- It reads the plan plus ORC's deterministic probes (`orc wiki status`,
15
- `orc pattern status`, `orc gotcha status`, `orc diy status`) and answers:
16
-
17
- ```
18
- Plan: merchant-notifications — 7 tasks, 3 waves, 14 files touched
19
- top score 78, two tasks marked risky
20
-
21
- → /orc the plan has risky tasks and a task above 70;
22
- review and verify are worth paying for here
23
- runner-up /orc-mini — about 3x faster, but it skips full review
24
- and verification. Fine only if you will read the diff yourself.
25
- not possible /orc-fast — needs a fresh wiki (yours is STALE) and this plan
26
- is 7 tasks; that lane runs ONE task
27
-
28
- Start /orc now? [yes / no]
29
- ```
30
-
31
- Every runner-up says what choosing it costs you. Every impossible lane names the
32
- condition blocking it **and** how to fix it. Risk beats size: a small plan with a
33
- cited risk still earns the full lane.
34
-
35
- `/orc-plan` also offers this automatically after **Save & stop**, so you rarely
36
- need to type it.
37
-
38
- New to ORC and wondering which command to use at all? That is
39
- `orc onboarding first-run`, not this.
40
-
41
- Plan (paste it, or give a path): $ARGUMENTS
1
+ ---
2
+ description: You have a plan — this says which lane should build it, with the numbers it decided from. Plan-only: it refuses a request in words rather than guess
3
+ ---
4
+
5
+ Use the **orc-route** skill. Zero agents, nothing is built. It routes a PLAN
6
+ only — the same definition `skills/_shared/phases/plan-handoff.md` uses. It reads
7
+ the plan's tasks, files, deps, `facets` and scores plus ORC's probes, then names
8
+ the lane, the runner-up and its cost, and each impossible lane with its fix. A
9
+ request in words gets a pointer to `/orc-plan`, never a guess.
10
+
11
+ Plan (paste it, or give a path): $ARGUMENTS
@@ -2,65 +2,10 @@
2
2
  description: Run the tests against the real running system — happy path to security — and report only what was observed
3
3
  ---
4
4
 
5
- Use the **orc-test** skill. Standalone — no plan, no build, no code written into
6
- your project.
7
-
8
- Every other ORC lane reasons about your system. This one **runs it**:
9
-
10
- > **A test that ran is a FACT; a test that was written is an OPINION.**
11
-
12
- ORC already has a lane that WRITES tests and never runs them (Phase 6.5,
13
- `test-generator/`). This is the mirror image, and the two never mix: `/orc-test`
14
- writes nothing into your test tree and runs everything.
15
-
16
- **It never edits the system it is testing.** If the server will not come up, it
17
- prints exactly what it ran and the tail of the output, and hands back. You fix
18
- it, and re-run for free — the same shape as `/orc-challenge`, and for the same
19
- reason: a session that just fixed the code cannot be trusted to measure it.
20
-
21
- **It never reports a result it did not observe.** Three verdicts and no fourth:
22
- `pass` (observed, matched), `fail` (observed, did not match), and `unknown` —
23
- not observed. `unknown` keeps its slot in the report and never becomes a pass.
24
- A flake is recorded, never retried away: there is no retry count, because if the
25
- same case answers differently twice, *that instability is the finding*.
26
-
27
- One pass:
28
-
29
- 1. **Target** — `orc test init <slug>` asks what it must not guess: back end or
30
- front end, local or remote, the base URL. On a remote target it also requires
31
- `--authorized "<who authorized this, and where it is recorded>"`, stored
32
- verbatim and reprinted at the head of every report. ORC cannot verify
33
- authorization and does not pretend to — it makes the assertion impossible to
34
- skip. Frozen, and never asked again.
35
- 2. **Surface** — free, deterministic: an OpenAPI or GraphQL spec on disk, the
36
- same spec at the target, route extraction by framework fingerprint, FE router
37
- config. Anything ambiguous comes back as `unresolved[]` and is never guessed.
38
- The **code-vs-live diff** is a first-class output: routes that answer live and
39
- exist in no source file are zombie APIs.
40
- 3. **Flow** — it digs the repo for how a request reaches your endpoint: the
41
- route registration, the middleware in order, the handler, what it writes, what
42
- must be true first, which fields name an object, and the login flow itself.
43
- 4. **Environment** (local only) — it brings the system up and waits for health.
44
- Five states, one next action each.
45
- 5. **Cases** — the CLI derives the bulk for free: equivalence partitions,
46
- boundary values, method and content-type negatives, stateful create → read →
47
- update → delete sequences. An agent fills only what a schema cannot know.
48
- 6. **Run** — paced, capped, and fenced to the frozen origin. A 429 is a RESULT,
49
- not an error: it means rate limiting works. Every case leaves its exact
50
- request, its exact response and a reproducible `curl`, with every credential
51
- redacted **before the bytes reach disk**.
52
- 7. **Report** — `orc/orc-test/<slug>/REPORT.md`, written for someone who does
53
- not read code.
54
-
55
- The security tier is a **closed set** mapped to the OWASP API Security Top 10
56
- (2023), and it demonstrates a CONDITION rather than an extraction — confirming
57
- an exploit is your decision on your authority. With one identity, BOLA and BFLA
58
- report `UNCHECKABLE`, which keeps its slot and never becomes a pass.
59
-
60
- **The run folder is never staged.** Evidence contains real response bodies from
61
- a real system. The lane offers you the one `.gitignore` line; it does not edit
62
- `.gitignore` itself.
63
-
64
- Read the state back any time without this lane: `orc test status <slug>`.
5
+ Use the **orc-test** skill. Standalone: no plan, no build, no code written into
6
+ your project. It RUNS the system; Phase 6.5 (`test-generator/`) writes tests and
7
+ never runs them. It never edits the system under test, and it never reports a
8
+ result it did not observe. The report is `orc/orc-test/<slug>/REPORT.md`; the
9
+ run folder is never staged. Read the state back with `orc test status <slug>`.
65
10
 
66
11
  The slug to open or reopen (or nothing, and it will ask): $ARGUMENTS
@@ -1,64 +1,64 @@
1
- ---
2
- description: Build/maintain the project knowledge base (wiki) — Opus 4.8 high, expensive, multi-session, warns before scanning
3
- ---
4
-
5
- Use the **orc-wiki** skill. Start at Phase 0: auto-detect whether this is a
6
- repair of an unregistered wiki, a fresh build, a resume of an in-progress scan,
7
- or a refresh of an existing wiki, and branch accordingly. On a fresh build, show
8
- the cost warning and scan NOTHING until the user explicitly confirms. Refreshes
9
- also sweep for coverage gaps (changed files no doc covers → propose new areas)
10
- and dead docs (covered files gone → archive/delete, user decides). Every run
11
- registers via `orc wiki sync` and ends with the integrity self-check. Follow the
12
- skill's SKILL.md exactly.
13
-
14
- **Crosslink is always on.** Plain `/orc-wiki` — every scan, resume, incremental,
15
- full regenerate, or selective refresh — publishes/updates this repo's boundary
16
- tags (`wiki/crosslink/`) in the SAME pass as the docs, and a refresh never
17
- deletes them. There is no separate "generate crosslink" step in a wiki's normal
18
- life; the only crosslink config is the graph (`orc crosslink`), needed only to
19
- resolve what this repo consumes.
20
-
21
- **`/orc-wiki crosslink`** → the CROSSLINK-ONLY branch (Phase 3c) is a LEGACY
22
- BACKFILL: publish tags + resolve consumption from the existing docs'
23
- `Contracts & shapes` rows (opening only the files they anchor), for wikis whose
24
- docs predate v0.24.0 and so have no `wiki/crosslink/` yet. No area is re-scanned,
25
- no doc rewritten. On a wiki scanned at ≥v0.24.0, missing tags are not this
26
- branch — `orc wiki sync --check` names the real fix. Never a refresh.
27
-
28
- **`/orc-wiki crosslink compile`** → the one-shot CROSSLINK COMPILE branch
29
- (v0.33.0 — references/crosslink-compile.md): resolve/consume from the graph →
30
- generate the federation atlas (`wiki/crosslink/atlas.md`) → write it into each
31
- linked repo → inject/update the CLAUDE.md pointer block locally and in each
32
- linked repo (in-place, user content byte-preserved). Requires a crosslink
33
- config with ≥1 edge; every step warn-only; never a re-scan. Peer writes are
34
- FILE writes only — never a commit or push.
35
-
36
- **`/orc-wiki update <doc-or-topic>`** → ONE doc, re-scanned. A filename goes
37
- straight into the targeted refresh. A topic ("the remittance feature") is
38
- resolved first with `orc wiki resolve` — free, no scan — and an AMBIGUOUS result
39
- is a question for you, never a guess. Branch detection and area planning are both
40
- skipped: the doc exists, so its coverage area is already in its own header.
41
-
42
- **`/orc-wiki add "<topic>"`** → ONE new doc, in a wiki that already exists, with
43
- no other area re-planned. It resolves the topic first (if something already
44
- covers it, that is an `update` and it says so), proposes a coverage scope from
45
- path names for you to correct, confirms the slug, the covers, the tier and the
46
- cost in ONE turn, and scans nothing until you say yes. It ends with
47
- `orc wiki refs`, the derived-reference sweep — adding a doc moves more derived
48
- surfaces than changing one does: the registration, the orientation page, the
49
- architecture overview, the CLAUDE.md pointer's doc count, and any crosslink tag
50
- left anchored to a file that is gone. Only the registration is repaired for you;
51
- the rest is reported with its command, because a sweep that silently regenerated
52
- prose would be spending money nobody asked it to spend.
53
-
54
- | Argument | Branch |
55
- |---|---|
56
- | *(none)* | Phase 0 auto-branch: repair / fresh / resume / refresh (delta default) |
57
- | `update <doc>` | targeted refresh of ONE doc (skips branch detection + area planning) |
58
- | `update "<topic>"` | resolve the topic to a doc, then refresh it |
59
- | `add "<topic>"` | reserve + scan + write ONE new doc, then sweep every derived reference |
60
- | `crosslink` | Phase 3c legacy backfill (publish tags from existing docs) |
61
- | `crosslink compile` | one-shot resolve + atlas + CLAUDE.md injection (local + peers) |
62
-
63
- Optional focus (`update <doc>` · `add "<topic>"` · `crosslink` ·
64
- `crosslink compile`): $ARGUMENTS
1
+ ---
2
+ description: Build/maintain the project knowledge base (wiki) — Opus 5.5 low, expensive, multi-session, warns before scanning
3
+ ---
4
+
5
+ Use the **orc-wiki** skill. Start at Phase 0: auto-detect whether this is a
6
+ repair of an unregistered wiki, a fresh build, a resume of an in-progress scan,
7
+ or a refresh of an existing wiki, and branch accordingly. On a fresh build, show
8
+ the cost warning and scan NOTHING until the user explicitly confirms. Refreshes
9
+ also sweep for coverage gaps (changed files no doc covers → propose new areas)
10
+ and dead docs (covered files gone → archive/delete, user decides). Every run
11
+ registers via `orc wiki sync` and ends with the integrity self-check. Follow the
12
+ skill's SKILL.md exactly.
13
+
14
+ **Crosslink is always on.** Plain `/orc-wiki` — every scan, resume, incremental,
15
+ full regenerate, or selective refresh — publishes/updates this repo's boundary
16
+ tags (`wiki/crosslink/`) in the SAME pass as the docs, and a refresh never
17
+ deletes them. There is no separate "generate crosslink" step in a wiki's normal
18
+ life; the only crosslink config is the graph (`orc crosslink`), needed only to
19
+ resolve what this repo consumes.
20
+
21
+ **`/orc-wiki crosslink`** → the CROSSLINK-ONLY branch (Phase 3c) is a LEGACY
22
+ BACKFILL: publish tags + resolve consumption from the existing docs'
23
+ `Contracts & shapes` rows (opening only the files they anchor), for wikis whose
24
+ docs predate v0.24.0 and so have no `wiki/crosslink/` yet. No area is re-scanned,
25
+ no doc rewritten. On a wiki scanned at ≥v0.24.0, missing tags are not this
26
+ branch — `orc wiki sync --check` names the real fix. Never a refresh.
27
+
28
+ **`/orc-wiki crosslink compile`** → the one-shot CROSSLINK COMPILE branch
29
+ (v0.33.0 — references/crosslink-compile.md): resolve/consume from the graph →
30
+ generate the federation atlas (`wiki/crosslink/atlas.md`) → write it into each
31
+ linked repo → inject/update the CLAUDE.md pointer block locally and in each
32
+ linked repo (in-place, user content byte-preserved). Requires a crosslink
33
+ config with ≥1 edge; every step warn-only; never a re-scan. Peer writes are
34
+ FILE writes only — never a commit or push.
35
+
36
+ **`/orc-wiki update <doc-or-topic>`** → ONE doc, re-scanned. A filename goes
37
+ straight into the targeted refresh. A topic ("the remittance feature") is
38
+ resolved first with `orc wiki resolve` — free, no scan — and an AMBIGUOUS result
39
+ is a question for you, never a guess. Branch detection and area planning are both
40
+ skipped: the doc exists, so its coverage area is already in its own header.
41
+
42
+ **`/orc-wiki add "<topic>"`** → ONE new doc, in a wiki that already exists, with
43
+ no other area re-planned. It resolves the topic first (if something already
44
+ covers it, that is an `update` and it says so), proposes a coverage scope from
45
+ path names for you to correct, confirms the slug, the covers, the tier and the
46
+ cost in ONE turn, and scans nothing until you say yes. It ends with
47
+ `orc wiki refs`, the derived-reference sweep — adding a doc moves more derived
48
+ surfaces than changing one does: the registration, the orientation page, the
49
+ architecture overview, the CLAUDE.md pointer's doc count, and any crosslink tag
50
+ left anchored to a file that is gone. Only the registration is repaired for you;
51
+ the rest is reported with its command, because a sweep that silently regenerated
52
+ prose would be spending money nobody asked it to spend.
53
+
54
+ | Argument | Branch |
55
+ |---|---|
56
+ | *(none)* | Phase 0 auto-branch: repair / fresh / resume / refresh (delta default) |
57
+ | `update <doc>` | targeted refresh of ONE doc (skips branch detection + area planning) |
58
+ | `update "<topic>"` | resolve the topic to a doc, then refresh it |
59
+ | `add "<topic>"` | reserve + scan + write ONE new doc, then sweep every derived reference |
60
+ | `crosslink` | Phase 3c legacy backfill (publish tags from existing docs) |
61
+ | `crosslink compile` | one-shot resolve + atlas + CLAUDE.md injection (local + peers) |
62
+
63
+ Optional focus (`update <doc>` · `add "<topic>"` · `crosslink` ·
64
+ `crosslink compile`): $ARGUMENTS
@@ -214,18 +214,76 @@ move, and it tells you why.
214
214
  Every component can be changed: its words, its colour, its shape, how wide it
215
215
  is, and when it is allowed to disappear.
216
216
 
217
- **The shape decides what the other settings can do.** Only these shapes print a
218
- short name in front of the value: `plain`, `label-value`, `bracket`, `angle`,
219
- `badge`, `pill` and `stack`. A bar, an icon and a bare value have no room for
220
- one, so the panel switches the Name box off for them and says so. The same is
221
- true of the number settings: a bar has a width and a colour ramp, and no number
222
- format at all.
217
+ **The shape decides what the other settings can do.** The panel switches off a
218
+ setting that the shape does not use, and says so.
219
+
220
+ **Words around any shape** (v2.0.4). Every shape draws the name you type. You
221
+ choose where it goes: before, after, above or below the part. A bar can also have
222
+ text before and after it (for example `[██░░]`) and its number beside it. If you
223
+ type no name, only `plain`, `label-value`, `bracket`, `angle`, `badge`, `pill` and
224
+ `stack` print the part's built-in name.
225
+
226
+ **Captions.** A caption is a short text on a row above or below a part, at the
227
+ column of that part. `{value}` and `{label}` in the caption are replaced. A caption
228
+ makes the line one row taller.
229
+
230
+ **Small text.** A terminal has no font size. The letter styles `small` (ꜱᴍᴀʟʟ
231
+ ᴄᴀᴘꜱ), `super` (ˢᵘᵖᵉʳ) and `sub` (₆₁) use Unicode letters that look smaller.
232
+ A character with no small form stays as it is.
233
+
234
+ **Bars in your own colours and characters.** A bar can have its own fill colour,
235
+ empty colour, colour range (for example `#22c55e,#eab308,#ef4444`, blended cell by
236
+ cell on `gradient`), and its own fill and empty characters (one cell each).
237
+
238
+ **Every part** can also have brackets, space on the left and right, a background,
239
+ any `#rrggbb` colour, more than one weight, and its own colour and symbol per
240
+ state. A line can be aligned right or centre, and its separator can have a colour.
241
+ `text`, `divider`, `spacer`, `icon-static`, `fill` (pushes the rest to the right
242
+ edge) and `config` take their text in the part's settings.
243
+
244
+ **Claude Code removes the spaces at the start of every row.** So when a row of
245
+ your status line starts with a space (a caption row, a line prefix, a
246
+ right-aligned line), ORC makes that first space a braille blank (U+2800). It is one
247
+ cell wide and Claude Code keeps it, so a caption stays above or below its own part.
248
+ Under `ORC_STATUSLINE_ASCII=1` this is not done, because U+2800 is not ASCII.
249
+
250
+ **Pets that move** (the "Pets and motion" group): a pixel cat drawn in braille
251
+ dots, a mouse, a cat that chases the mouse, the text cat ᓚᘏᗢ, pac-man, a fish, a
252
+ bird and a dog. Each can `run` across its track, `bounce` right and back, or stay
253
+ `idle` and move its legs.
254
+
255
+ **Motion needs a timer.** Claude Code redraws the status line when something
256
+ happens (a message, typing), or every `refreshInterval` seconds if you set it (at
257
+ least 1). Set it with:
258
+
259
+ ```
260
+ orc statusline refresh 1
261
+ ```
262
+
263
+ and remove it with `orc statusline refresh off`. With the timer the hook runs
264
+ every second even when you do nothing, and each run starts `node`. So a pet moves
265
+ about one step per second.
266
+
267
+ **Weather** (`weather`, `weather-icon`, `weather-desc`). This is the ONLY part of
268
+ the status line that uses the network. The hook itself never waits for it: it reads
269
+ `.claude/orc/weather.json`, and when that is older than 30 minutes it starts
270
+ `orc-weather-fetch.js` in the background, which asks wttr.in and writes the file.
271
+ With an empty `location`, wttr.in finds your place from your network address. It
272
+ runs only while a weather part is on your layout. `ORC_STATUSLINE_NO_NET=1` stops
273
+ it. Every text it gets back is cleaned of control characters before it is saved.
274
+
275
+ **The panel shows your unsaved changes.** The picture above the board is drawn
276
+ from a temporary copy with your staged changes, so you see the result before you
277
+ press Apply. Nothing is written until you press Apply.
278
+
279
+ A layout may not carry a control character (for example ESC) in any text. It is
280
+ printed to your terminal, so the CLI refuses it.
223
281
 
224
282
  **Three things a terminal cannot do**, said plainly so you do not look for them:
225
283
 
226
284
  | You may want | What you get |
227
285
  |---|---|
228
- | A bigger font | The terminal owns the font size. Use **bold**, or make a component wider — a bar at width 12 is a big object. |
286
+ | A bigger font | The terminal owns the font size. Use **bold**, a small letter style for the words around it, or make a component wider — a bar at width 12 is a big object. |
229
287
  | A blinking part | Refused. Half of terminals turn it off, and no part of a status line needs it. |
230
288
  | Icon-font symbols | Not shipped. They need a font we cannot check for, and they draw as empty boxes without it. |
231
289
 
@@ -414,6 +472,40 @@ outside an ORC run, and never when the map does not exist.
414
472
 
415
473
  ---
416
474
 
475
+ ## The session hook
476
+
477
+ This is a fourth hook, `orc-session-hook.js`. It has four jobs. All of them are
478
+ silent when no ORC run is open.
479
+
480
+ - **The bell.** A turn of an ORC run ends, and your terminal rings once. This
481
+ job is off until you turn it on:
482
+
483
+ ```
484
+ orc config set notify bell # ring when a turn of a run ends
485
+ orc config set notify off # silent (the default)
486
+ ```
487
+
488
+ It rings only when the run moved since the last bell. A normal chat never
489
+ rings. It sends no OS notification and uses no network.
490
+ - **After a compaction.** Claude Code keeps only the start of each skill when it
491
+ compacts a long session, so a long run can lose its place. When a run is in
492
+ flight, the hook adds ONE line: the run name, and the `state-of-play.md` file
493
+ to read first. It costs about 40 tokens, once per compaction.
494
+
495
+ - **The narration guard** (v2.0.2). A run dispatched agents but wrote no trace
496
+ line of its own. Then the hook stops the turn ONCE and says which command
497
+ writes the trace. It never stops twice, and never stops a subagent.
498
+ - **The review card** (v2.0.2). When a reviewer, verifier or judge starts, the
499
+ hook asks `orc gotcha card` for the files git sees as changed and gives the
500
+ card to that agent. No match → nothing. This is why a review always sees the
501
+ mistakes this project already made, even if the lane forgot the card.
502
+
503
+ It never writes model text, and it blocks a stop only for the narration guard.
504
+ `orc doctor` tells you whether all three events are wired (`Stop`,
505
+ `SessionStart compact`, `SubagentStart`).
506
+
507
+ ---
508
+
417
509
  ## For maintainers
418
510
 
419
511
  - The hook is `orc-statusline.js`. `orc init` installs it and wires it into
@@ -438,6 +530,16 @@ outside an ORC run, and never when the map does not exist.
438
530
  authored. If the compiled file is missing, stale, or does not pass a cheap
439
531
  shape check, the hook silently renders the shipped lines instead and
440
532
  `orc doctor` names the reason.
533
+ - **Stale means the parts changed, not the version** (v2.0.3). `orc init` and
534
+ `orc update` write `catalog_hash` into `hooks/orc-version.json`, and the hook
535
+ compares it with the `catalog_hash` in `statusline.lock.json`. An install with
536
+ no hash compares the version, as before. `orc update` also recompiles every
537
+ layout that exists and validates, so an upgrade never leaves your bar on the
538
+ shipped lines. A good render deletes `orc/statusline-state.json`, so
539
+ `orc doctor` never reports a fallback that is already gone.
540
+ - `orc statusline show --json` carries `hook`: the hook the settings point to,
541
+ its version, whether it will run this layout, the last fallback, and the fix.
542
+ `orc ui` shows that on the status card.
441
543
  - The cache file is `.claude/orc/usage-session.json`. The hook reads it once and
442
544
  writes it once, after the text is ready. It stores raw numbers only — never a
443
545
  word like `fresh` or `STALE`, which is computed each time it is shown.