@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,271 +1,276 @@
1
- # Reference — targeted refresh, the scan tier ladder, debt and usage (v0.46.0)
2
-
3
- Loaded when the user asks for a refresh, or when `/orc-wiki refresh …` is the
4
- entry. This is the half that makes a 2-line change cost 2 lines.
5
-
6
- ## What already worked, and must not be rebuilt
7
-
8
- - `orc wiki impact` already classifies every doc `CLEAN | TOUCHED | STRUCTURAL`
9
- against **its own** `scanned_commit`.
10
- - Delta refresh has been the default since v0.33.0.
11
- - `orc wiki sync` is free and CLI-only.
12
- - `computeWikiFreshness` already makes staleness coverage-relative.
13
-
14
- Nothing here replaces any of it. `orc wiki plan` sits ON TOP of `impact` and
15
- answers the question impact does not: **what to do about it, in what order, for
16
- how much.**
17
-
18
- ## Free repairs ALWAYS come before anything that costs money
19
-
20
- A hard rule, in this order, every time:
21
-
22
- | # | Step | Cost | Fixes |
23
- |---|---|---|---|
24
- | 1 | `orc wiki sync` | free | UNREGISTERED / drifted registration |
25
- | 2 | regenerate `wiki/orc-orientation.md` | free | the derived doc every consumer reads first |
26
- | 3 | crosslink-only backfill | free | tags publishable from already-anchored rows |
27
- | 4 | targeted refresh | **money** | actual doc rot |
28
-
29
- **A user must never be able to pay for something a free step would have fixed.**
30
- `orc wiki plan` prints the available free repairs above the priced table; do the
31
- same in prose, and never offer step 4 while a step 1–3 is outstanding.
32
-
33
- ## `orc wiki plan` — the ranked, priced work list
34
-
35
- Free, CLI, no model. Exit 0 nothing to do · 1 work pending, all light · 2 work
36
- pending, at least one deep · 3 cannot compute.
37
-
38
- **The ranking rule, and the reasons for it:**
39
-
40
- 1. **`STRUCTURAL` always first.** A doc pointing at a file that no longer exists is
41
- actively lying, and no cheaper step repairs it — a targeted refresh cannot
42
- re-anchor blind, which is also why STRUCTURAL always takes the deep tier.
43
- 2. **Then by use × delta**, where `used` is how many of the last 20 runs actually
44
- put that doc into a slice. Refresh what gets read.
45
- 3. **Zero-use docs sink to the bottom** with a retire hint. `used: ?` (no usage
46
- data yet) is NOT zero-use and must never be ranked as dead.
47
-
48
- Render what the CLI returns. **Never compute the order, the tier or the estimate
49
- in this skill** — one engine, the same rule the wiki tier itself lives under
50
- (`../../_shared/detecting-artifacts.md`).
51
-
52
- ## Targeted refresh
53
-
54
- ```
55
- /orc-wiki update <doc> the same thing, under the name people type
56
- /orc-wiki update "<topic>" resolved to a doc first — see below
57
- /orc-wiki refresh <doc>
58
- /orc-wiki refresh --only api/refunds/**
59
- /orc-wiki refresh --top 2
60
- /orc-wiki refresh --all-touched (today's delta behaviour)
61
- ```
62
-
63
- `update` is an ENTRY, not a second mechanism. A filename goes straight into
64
- R0–R5 below. A topic goes through `orc wiki resolve "<topic>" --json` first
65
- (free, no scan): **exit 0** names the doc · **exit 2** is AMBIGUOUS, so ask which
66
- one rather than scanning a guess · **exit 1** means nothing covers it, and the
67
- request is really an ADD.
68
-
69
- It **skips Phase 0 branch detection and Phase 1 area planning entirely** — the doc
70
- exists, so its coverage area is already in its own header. That skip is the whole
71
- saving in wall-clock terms.
72
-
73
- ```
74
- R0 probe orc wiki plan --json (free)
75
- R1 confirm the doc, the delta, the TIER, the token + $ estimate. ONE turn.
76
- R2 scan ONE scan-task, at the tier the ladder resolved
77
- R3 write doc body + crosslink tags (unchanged — per-scan-task rule)
78
- R4 register orc wiki sync (free)
79
- R5 integrity the existing self-check, scoped to the touched doc
80
- ```
81
-
82
- **No new pause mechanic.** The fixed pause every 5 scan-tasks still holds; a 1–2
83
- task refresh simply never reaches it.
84
-
85
- **Crosslink rules are unchanged:** tags publish per scan-task, no refresh path
86
- bulk-deletes `wiki/crosslink/`, and the dead-tag sweep still runs per point.
87
-
88
- ## Add ONE topic — `/orc-wiki add "<topic>"` (v1.7.0)
89
-
90
- The other half of "one doc at a time". Targeted refresh answers *this doc has
91
- moved*; this answers *this topic is not in the wiki at all* — and until v1.7.0 a
92
- new coverage area only appeared as a by-product of the coverage-gap sweep during
93
- a delta refresh, so "add the remittance feature" had no path that did not
94
- re-plan every area in the repo.
95
-
96
- Like a targeted refresh it **skips Phase 0 branch detection and Phase 1 area
97
- planning**. Unlike one, it ends with the **reference sweep**: adding a doc moves
98
- more derived surfaces than changing one does.
99
-
100
- ```
101
- A0 resolve orc wiki resolve "<topic>" --json free
102
- exit 0 MATCH → this is really an UPDATE. Say so, route there.
103
- exit 2 AMBIGUOUS → ask which doc. NEVER scan a guess.
104
- exit 1 NEW → continue.
105
- exit 3 → no wiki, or unregistered. Fix that first.
106
- A1 scope the resolver returns `suggested_covers` from PATH NAMES ONLY.
107
- Show them as a proposal and let the user correct them. ONE turn.
108
- A wrong glob is a doc that documents the wrong area forever.
109
- A2 confirm slug · title · covers · the resolved TIER · the token + $ estimate.
110
- ONE turn. NOTHING spawns before the user says yes.
111
- A3 reserve orc wiki add <slug> --title "<t>" --covers "<glob>" free
112
- Writes a STUB with `status: reserved` — a target for the scan,
113
- not a document. It is reported as outstanding until a scan
114
- replaces the body, so a half-finished add can never look done.
115
- A4 scan ONE scan-task, at the tier the ladder resolved
116
- A5 write doc body + crosslink tags (the per-scan-task rule, unchanged).
117
- Replace `status: reserved` with a real `scanned_at`,
118
- `scanned_commit` and `covered_files` set.
119
- A6 references orc wiki refs free
120
- A7 integrity the existing self-check, scoped to the new doc
121
- ```
122
-
123
- ### A6 — the reference sweep, and why it is its own step
124
-
125
- After ONE doc is written, these surfaces are derived from the doc SET and are
126
- now behind it. Before v1.7.0 they were repaired from memory, one at a time, and
127
- the ones nobody remembered stayed wrong — which is likeliest on a SMALL run,
128
- because the run feels too small to need a sweep.
129
-
130
- | Surface | What goes wrong | Repaired by |
131
- |---|---|---|
132
- | `wiki-meta.json` + `wiki/INDEX.md` | the new doc is not registered | `orc wiki refs` does it (free) |
133
- | a reserved row | the reservation never got its scan | reported, with the update command |
134
- | `wiki/orc-orientation.md` | its reading order predates the new doc | reported — free to regenerate |
135
- | `wiki/orc-architecture-overview.md` | it names neither the file nor the area | reported — free, and OPTIONAL |
136
- | the `CLAUDE.md` pointer block | its doc COUNT is now measurably wrong | reported |
137
- | `wiki/crosslink/**` | a tag anchored to a file that is gone | reported, offered per tag, never bulk-deleted |
138
-
139
- `orc wiki refs` **repairs only the registration**, because `orc wiki sync` is
140
- free and already the single writer of those two files. Everything else is
141
- REPORTED with its command. A sweep that silently regenerated prose would be
142
- spending money nobody asked it to spend, which is the same rule the free-repair
143
- ladder above is built on.
144
-
145
- `orc wiki refs --check` reports and repairs nothing. Exit **0** clean · **1**
146
- work pending or registration repaired · **2** cannot compute.
147
-
148
- ## The scan tier ladder (`wiki_scan_tier`, default `ladder`)
149
-
150
- Every scan-task used to dispatch the most expensive scanner in the payload whether
151
- the delta was 2 lines or 2000. Five rows, in order, first match wins:
152
-
153
- | Condition | Tier | Agent |
154
- |---|---|---|
155
- | first scan of an area (no doc yet) | deep | `orc-wiki-scanner-opus-4-8-high` |
156
- | `STRUCTURAL` | deep | `orc-wiki-scanner-opus-4-8-high` |
157
- | ≥ `wiki_tier_deep_files` covered files touched (default 3) | deep | `orc-wiki-scanner-opus-4-8-high` |
158
- | a new exported symbol in a covered file | deep | `orc-wiki-scanner-opus-4-8-high` |
159
- | otherwise (small delta, no new surface) | **light** | **`orc-wiki-scanner-sonnet-5-high`** |
160
-
161
- - **`opus5_only` needs no new pair.** It already forces the wiki scanner to
162
- `orc-wiki-scanner-opus-5-med`, which already ships, so **both tiers collapse onto
163
- that one agent** while the flag is on. `OPUS5_ONLY_ROLES` gains no row and no
164
- phantom pair — see `../../_shared/opus5-only.md`.
165
- - **`wiki_scan_tier: always_deep`** restores pre-v0.46.0 behaviour exactly.
166
- - **NEVER SILENT.** The resolved tier is printed in `orc wiki plan` and in the R1
167
- confirmation. A cheaper model is a decision the user sees, never a quiet
168
- substitution.
169
- - The light scanner escalates rather than under-delivers: a `needs_context` return
170
- naming a new symbol or a missing anchor is re-run deep. That is cheap; a doc with
171
- invented anchors is permanent.
172
-
173
- **Expected saving:** a delta refresh where 3 of 4 docs have a one-or-two-file delta
174
- goes from 4×deep to 1×deep + 3×light — roughly **40% off**, with the deep scan
175
- still doing the work that needs it.
176
-
177
- ## Budget cap (`wiki_refresh_budget`, default 0 = no cap)
178
-
179
- Max scan-tasks per refresh run. A capped refresh is a **planned stop**, not an
180
- interrupt:
181
-
182
- ```
183
- Refresh · budget reached
184
- Done : 2 of 4 scan-tasks Left : 2 tasks, est. 73k tokens / $0.14
185
- orc wiki sync ran. The wiki is REGISTERED and consistent right now.
186
- The two remaining docs are AGING, not broken.
187
- Continue any time: /orc-wiki refresh --top 2
188
- ```
189
-
190
- Stopping mid-refresh must leave a VALID wiki. That already holds — sync runs after
191
- every scan-task and freshness is per-doc. This only makes the stop first-class.
192
-
193
- **It is a different mechanic from the fixed pause every 5 scan-tasks. Do not merge
194
- them.** The pause is a checkpoint you continue through; the budget is a ceiling you
195
- stop at.
196
-
197
- ## `orc wiki debt`
198
-
199
- One line, for the habit: docs pending, tokens, dollars, oldest debt, tier, and the
200
- reassurance that matters — *nothing is broken*. Exit 0 no debt · 1 debt exists · 3
201
- no wiki.
202
-
203
- Inside `/orc`, one preflight tail **only when debt exists**:
204
-
205
- ```
206
- wiki : FRESH — 4 docs pending refresh, 335k tok / $0.94
207
- ```
208
-
209
- **This is the real budget win** — not a cheaper full refresh, but a full refresh you
210
- never need.
211
-
212
- ## `orc wiki usage` and retirement (`wiki_retire_after_runs`, default 0 = never)
213
-
214
- Since v0.41.0 every dispatch whose slice carried wiki material writes a `wiki:`
215
- continuation and every return carries `wiki_used`. Two releases of clean
216
- point-of-use attribution that nothing read back. `orc wiki usage --rebuild` reads
217
- it into `.claude/orc/wiki-usage.json`.
218
-
219
- > **Do NOT put usage in `wiki-meta.json`.** That manifest is 100% derived from doc
220
- > headers and `orc wiki sync` is its only writer — a load-bearing rule. Usage comes
221
- > from traces, so it gets its own file and its own writer.
222
-
223
- Three things it unlocks: the ranking above · honest coverage on `orc wiki status`
224
- (`14 registered · 8 in active use · 2 never used in 20 runs`) · and retirement.
225
-
226
- When `wiki_retire_after_runs` is non-zero and a doc has been in no slice for that
227
- many runs, OFFER retirement — never do it silently:
228
-
229
- ```
230
- 2 docs were never put into a slice in 20 runs. They cost money on every full
231
- refresh — and context tokens whenever they ARE included.
232
- Retire them? (moves to wiki/retired/, drops from INDEX.md and every plan.
233
- Reversible. Never a delete.)
234
- ```
235
-
236
- **Retirement MOVES, never deletes**, and `orc wiki sync` re-derives `INDEX.md`
237
- afterwards. A retired doc that turns out to matter is one `git mv` away.
238
-
239
- ## The consent prompt gets a real number
240
-
241
- ```
242
- Before: ⚠ This is an EXPENSIVE, possibly multi-session scan. Continue?
243
- After: ⚠ Full scan: 14 areas, est. 2.1M tokens / $3.80 → $6.10, 25–40 min,
244
- 2 pause points, ~48% of a 5-hour window on Max 20x.
245
- A targeted refresh of the 4 stale docs: 335k tokens / $0.94.
246
- Continue with the full scan?
247
- ```
248
-
249
- The numbers come from `/orc-budget`'s engine (`orc wiki plan --json` carries them).
250
- When there is no history yet, print `insufficient history` rather than a guess.
251
-
252
- ## Later, opt-in: surgical section refresh — NOT in this release
253
-
254
- Noted so it is not re-invented. A doc's sections each anchor to files; in principle
255
- only the sections whose files changed need regenerating (~20% of the body). It
256
- waits because it needs the wiki-doc header parser to carry a section→file map — one
257
- of the GRAMMAR-shaped drift surfaces the contract lint cannot see — and because a
258
- partial body rewrite can break the integrity self-check's anchoring rule. If it is
259
- ever built: default off, and the integrity check still runs over the whole doc.
260
-
261
- ## What must NOT change
262
-
263
- - `orc wiki sync` stays the only writer of `wiki-meta.json` + `INDEX.md`, and stays
264
- 100% derived from doc headers.
265
- - `meta.scan_commit` stays the OLDEST doc's anchor, and nothing reads it as a tier.
266
- - Edges come from `wiki_fresh_max` / `wiki_aging_max`. A hardcoded 10/30 is a bug.
267
- - `computeWikiFreshness` stays the ONE engine. `plan`, `debt` and `usage` all call
268
- it, and skills never compute a tier.
269
- - Crosslink publish stays per-scan-task.
270
- - A STRUCTURAL blind spot still degrades one step and never past AGING.
271
- - The fixed pause every 5 scan-tasks is not configurable.
1
+ # Reference — targeted refresh, the scan tier ladder, debt and usage (v0.46.0)
2
+
3
+ Loaded when the user asks for a refresh, or when `/orc-wiki refresh …` is the
4
+ entry. This is the half that makes a 2-line change cost 2 lines.
5
+
6
+ ## What already worked, and must not be rebuilt
7
+
8
+ - `orc wiki impact` already classifies every doc `CLEAN | TOUCHED | STRUCTURAL`
9
+ against **its own** `scanned_commit`.
10
+ - Delta refresh has been the default since v0.33.0.
11
+ - `orc wiki sync` is free and CLI-only.
12
+ - `computeWikiFreshness` already makes staleness coverage-relative.
13
+
14
+ Nothing here replaces any of it. `orc wiki plan` sits ON TOP of `impact` and
15
+ answers the question impact does not: **what to do about it, in what order, for
16
+ how much.**
17
+
18
+ ## Free repairs ALWAYS come before anything that costs money
19
+
20
+ A hard rule, in this order, every time:
21
+
22
+ | # | Step | Cost | Fixes |
23
+ |---|---|---|---|
24
+ | 1 | `orc wiki sync` | free | UNREGISTERED / drifted registration |
25
+ | 2 | regenerate `wiki/orc-orientation.md` | free | the derived doc every consumer reads first |
26
+ | 3 | crosslink-only backfill | free | tags publishable from already-anchored rows |
27
+ | 4 | targeted refresh | **money** | actual doc rot |
28
+
29
+ **A user must never be able to pay for something a free step would have fixed.**
30
+ `orc wiki plan` prints the available free repairs above the priced table; do the
31
+ same in prose, and never offer step 4 while a step 1–3 is outstanding.
32
+
33
+ ## `orc wiki plan` — the ranked, priced work list
34
+
35
+ Free, CLI, no model. Exit 0 nothing to do · 1 work pending, all light · 2 work
36
+ pending, at least one deep · 3 cannot compute.
37
+
38
+ **The ranking rule, and the reasons for it:**
39
+
40
+ 1. **`STRUCTURAL` always first.** A doc pointing at a file that no longer exists is
41
+ actively lying, and no cheaper step repairs it — a targeted refresh cannot
42
+ re-anchor blind, which is also why STRUCTURAL always takes the deep tier.
43
+ 2. **Then by use × delta**, where `used` is how many of the last 20 runs actually
44
+ put that doc into a slice. Refresh what gets read.
45
+ 3. **Zero-use docs sink to the bottom** with a retire hint. `used: ?` (no usage
46
+ data yet) is NOT zero-use and must never be ranked as dead.
47
+
48
+ Render what the CLI returns. **Never compute the order, the tier or the estimate
49
+ in this skill** — one engine, the same rule the wiki tier itself lives under
50
+ (`../../_shared/detecting-artifacts.md`).
51
+
52
+ ## Targeted refresh
53
+
54
+ ```
55
+ /orc-wiki update <doc> the same thing, under the name people type
56
+ /orc-wiki update "<topic>" resolved to a doc first — see below
57
+ /orc-wiki refresh <doc>
58
+ /orc-wiki refresh --only api/refunds/**
59
+ /orc-wiki refresh --top 2
60
+ /orc-wiki refresh --all-touched (today's delta behaviour)
61
+ ```
62
+
63
+ `update` is an ENTRY, not a second mechanism. A filename goes straight into
64
+ R0–R5 below. A topic goes through `orc wiki resolve "<topic>" --json` first
65
+ (free, no scan): **exit 0** names the doc · **exit 2** is AMBIGUOUS, so ask which
66
+ one rather than scanning a guess · **exit 1** means nothing covers it, and the
67
+ request is really an ADD.
68
+
69
+ It **skips Phase 0 branch detection and Phase 1 area planning entirely** — the doc
70
+ exists, so its coverage area is already in its own header. That skip is the whole
71
+ saving in wall-clock terms.
72
+
73
+ ```
74
+ R0 probe orc wiki plan --json (free)
75
+ R1 confirm the doc, the delta, the TIER, the token + $ estimate. ONE turn.
76
+ R2 scan ONE scan-task, at the tier the ladder resolved
77
+ R3 write doc body + crosslink tags (unchanged — per-scan-task rule)
78
+ R4 register orc wiki sync (free)
79
+ R5 integrity the existing self-check, scoped to the touched doc
80
+ ```
81
+
82
+ **No new pause mechanic.** The fixed pause every 5 scan-tasks still holds; a 1–2
83
+ task refresh simply never reaches it.
84
+
85
+ **Crosslink rules are unchanged:** tags publish per scan-task, no refresh path
86
+ bulk-deletes `wiki/crosslink/`, and the dead-tag sweep still runs per point.
87
+
88
+ ## Add ONE topic — `/orc-wiki add "<topic>"` (v1.7.0)
89
+
90
+ The other half of "one doc at a time". Targeted refresh answers *this doc has
91
+ moved*; this answers *this topic is not in the wiki at all* — and until v1.7.0 a
92
+ new coverage area only appeared as a by-product of the coverage-gap sweep during
93
+ a delta refresh, so "add the remittance feature" had no path that did not
94
+ re-plan every area in the repo.
95
+
96
+ Like a targeted refresh it **skips Phase 0 branch detection and Phase 1 area
97
+ planning**. Unlike one, it ends with the **reference sweep**: adding a doc moves
98
+ more derived surfaces than changing one does.
99
+
100
+ ```
101
+ A0 resolve orc wiki resolve "<topic>" --json free
102
+ exit 0 MATCH → this is really an UPDATE. Say so, route there.
103
+ exit 2 AMBIGUOUS → ask which doc. NEVER scan a guess.
104
+ exit 1 NEW → continue.
105
+ exit 3 → no wiki, or unregistered. Fix that first.
106
+ A1 scope the resolver returns `suggested_covers` from PATH NAMES ONLY.
107
+ Show them as a proposal and let the user correct them. ONE turn.
108
+ A wrong glob is a doc that documents the wrong area forever.
109
+ A2 confirm slug · title · covers · the resolved TIER · the token + $ estimate.
110
+ ONE turn. NOTHING spawns before the user says yes.
111
+ A3 reserve orc wiki add <slug> --title "<t>" --covers "<glob>" free
112
+ Writes a STUB with `status: reserved` — a target for the scan,
113
+ not a document. It is reported as outstanding until a scan
114
+ replaces the body, so a half-finished add can never look done.
115
+ A4 scan ONE scan-task, at the tier the ladder resolved
116
+ A5 write doc body + crosslink tags (the per-scan-task rule, unchanged).
117
+ Replace `status: reserved` with a real `scanned_at`,
118
+ `scanned_commit` and `covered_files` set.
119
+ A6 references orc wiki refs free
120
+ A7 integrity the existing self-check, scoped to the new doc
121
+ ```
122
+
123
+ ### A6 — the reference sweep, and why it is its own step
124
+
125
+ After ONE doc is written, these surfaces are derived from the doc SET and are
126
+ now behind it. Before v1.7.0 they were repaired from memory, one at a time, and
127
+ the ones nobody remembered stayed wrong — which is likeliest on a SMALL run,
128
+ because the run feels too small to need a sweep.
129
+
130
+ | Surface | What goes wrong | Repaired by |
131
+ |---|---|---|
132
+ | `wiki-meta.json` + `wiki/INDEX.md` | the new doc is not registered | `orc wiki refs` does it (free) |
133
+ | a reserved row | the reservation never got its scan | reported, with the update command |
134
+ | `wiki/orc-orientation.md` | its reading order predates the new doc | reported — free to regenerate |
135
+ | `wiki/orc-architecture-overview.md` | it names neither the file nor the area | reported — free, and OPTIONAL |
136
+ | the `CLAUDE.md` pointer block | its doc COUNT is now measurably wrong | reported |
137
+ | `wiki/crosslink/**` | a tag anchored to a file that is gone | reported, offered per tag, never bulk-deleted |
138
+
139
+ `orc wiki refs` **repairs only the registration**, because `orc wiki sync` is
140
+ free and already the single writer of those two files. Everything else is
141
+ REPORTED with its command. A sweep that silently regenerated prose would be
142
+ spending money nobody asked it to spend, which is the same rule the free-repair
143
+ ladder above is built on.
144
+
145
+ `orc wiki refs --check` reports and repairs nothing. Exit **0** clean · **1**
146
+ work pending or registration repaired · **2** cannot compute.
147
+
148
+ ## The scan tier ladder (`wiki_scan_tier`, default `ladder`)
149
+
150
+ Every scan-task used to dispatch the most expensive scanner in the payload whether
151
+ the delta was 2 lines or 2000. Five rows, in order, first match wins:
152
+
153
+ | Condition | Tier | Agent |
154
+ |---|---|---|
155
+ | first scan of an area (no doc yet) | deep | `orc-wiki-scanner-opus-5-low` |
156
+ | `STRUCTURAL` | deep | `orc-wiki-scanner-opus-5-low` |
157
+ | ≥ `wiki_tier_deep_files` covered files touched (default 3) | deep | `orc-wiki-scanner-opus-5-low` |
158
+ | a new exported symbol in a covered file | deep | `orc-wiki-scanner-opus-5-low` |
159
+ | otherwise (small delta, no new surface) | **light** | **`orc-wiki-scanner-sonnet-5-high`** |
160
+
161
+ - **`opus5_only` needs no new pair.** The deep tier is already
162
+ `orc-wiki-scanner-opus-5-low`. The flag flips the light tier to that same agent,
163
+ so **both tiers collapse onto that one agent** while the flag is on. `OPUS5_ONLY_ROLES` gains no row and no
164
+ phantom pair — see `../../_shared/opus5-only.md`.
165
+ - **`wiki_scan_tier: always_deep`** restores pre-v0.46.0 behaviour exactly.
166
+ - **NEVER SILENT.** The resolved tier is printed in `orc wiki plan` and in the R1
167
+ confirmation. A cheaper model is a decision the user sees, never a quiet
168
+ substitution.
169
+ - The light scanner escalates rather than under-delivers: a `needs_context` return
170
+ naming a new symbol or a missing anchor is re-run deep. That is cheap; a doc with
171
+ invented anchors is permanent.
172
+
173
+ **Expected saving:** a delta refresh where 3 of 4 docs have a one-or-two-file delta
174
+ goes from 4×deep to 1×deep + 3×light — roughly **40% off**, with the deep scan
175
+ still doing the work that needs it.
176
+
177
+ **Since v2.1.0 the deep tier is Opus 5.5 low** (it was Opus 4.8 high). Opus 5.5 low
178
+ costs $4 / $20 per MTok and Sonnet 5 high costs $2 / $10, but at a higher effort.
179
+ Nobody has measured the tokens of each tier yet, so the ladder stays. To see
180
+ whether light is still cheaper, read the per-agent rows in `/orc-retro`.
181
+
182
+ ## Budget cap (`wiki_refresh_budget`, default 0 = no cap)
183
+
184
+ Max scan-tasks per refresh run. A capped refresh is a **planned stop**, not an
185
+ interrupt:
186
+
187
+ ```
188
+ Refresh · budget reached
189
+ Done : 2 of 4 scan-tasks Left : 2 tasks, est. 73k tokens / $0.14
190
+ orc wiki sync ran. The wiki is REGISTERED and consistent right now.
191
+ The two remaining docs are AGING, not broken.
192
+ Continue any time: /orc-wiki refresh --top 2
193
+ ```
194
+
195
+ Stopping mid-refresh must leave a VALID wiki. That already holds — sync runs after
196
+ every scan-task and freshness is per-doc. This only makes the stop first-class.
197
+
198
+ **It is a different mechanic from the fixed pause every 5 scan-tasks. Do not merge
199
+ them.** The pause is a checkpoint you continue through; the budget is a ceiling you
200
+ stop at.
201
+
202
+ ## `orc wiki debt`
203
+
204
+ One line, for the habit: docs pending, tokens, dollars, oldest debt, tier, and the
205
+ reassurance that matters — *nothing is broken*. Exit 0 no debt · 1 debt exists · 3
206
+ no wiki.
207
+
208
+ Inside `/orc`, one preflight tail **only when debt exists**:
209
+
210
+ ```
211
+ wiki : FRESH — 4 docs pending refresh, 335k tok / $0.94
212
+ ```
213
+
214
+ **This is the real budget win** — not a cheaper full refresh, but a full refresh you
215
+ never need.
216
+
217
+ ## `orc wiki usage` and retirement (`wiki_retire_after_runs`, default 0 = never)
218
+
219
+ Since v0.41.0 every dispatch whose slice carried wiki material writes a `wiki:`
220
+ continuation and every return carries `wiki_used`. Two releases of clean
221
+ point-of-use attribution that nothing read back. `orc wiki usage --rebuild` reads
222
+ it into `.claude/orc/wiki-usage.json`.
223
+
224
+ > **Do NOT put usage in `wiki-meta.json`.** That manifest is 100% derived from doc
225
+ > headers and `orc wiki sync` is its only writer — a load-bearing rule. Usage comes
226
+ > from traces, so it gets its own file and its own writer.
227
+
228
+ Three things it unlocks: the ranking above · honest coverage on `orc wiki status`
229
+ (`14 registered · 8 in active use · 2 never used in 20 runs`) · and retirement.
230
+
231
+ When `wiki_retire_after_runs` is non-zero and a doc has been in no slice for that
232
+ many runs, OFFER retirement — never do it silently:
233
+
234
+ ```
235
+ 2 docs were never put into a slice in 20 runs. They cost money on every full
236
+ refresh — and context tokens whenever they ARE included.
237
+ Retire them? (moves to wiki/retired/, drops from INDEX.md and every plan.
238
+ Reversible. Never a delete.)
239
+ ```
240
+
241
+ **Retirement MOVES, never deletes**, and `orc wiki sync` re-derives `INDEX.md`
242
+ afterwards. A retired doc that turns out to matter is one `git mv` away.
243
+
244
+ ## The consent prompt gets a real number
245
+
246
+ ```
247
+ Before: ⚠ This is an EXPENSIVE, possibly multi-session scan. Continue?
248
+ After: ⚠ Full scan: 14 areas, est. 2.1M tokens / $3.80 → $6.10, 25–40 min,
249
+ 2 pause points, ~48% of a 5-hour window on Max 20x.
250
+ A targeted refresh of the 4 stale docs: 335k tokens / $0.94.
251
+ Continue with the full scan?
252
+ ```
253
+
254
+ The numbers come from `/orc-budget`'s engine (`orc wiki plan --json` carries them).
255
+ When there is no history yet, print `insufficient history` rather than a guess.
256
+
257
+ ## Later, opt-in: surgical section refresh — NOT in this release
258
+
259
+ Noted so it is not re-invented. A doc's sections each anchor to files; in principle
260
+ only the sections whose files changed need regenerating (~20% of the body). It
261
+ waits because it needs the wiki-doc header parser to carry a section→file map — one
262
+ of the GRAMMAR-shaped drift surfaces the contract lint cannot see — and because a
263
+ partial body rewrite can break the integrity self-check's anchoring rule. If it is
264
+ ever built: default off, and the integrity check still runs over the whole doc.
265
+
266
+ ## What must NOT change
267
+
268
+ - `orc wiki sync` stays the only writer of `wiki-meta.json` + `INDEX.md`, and stays
269
+ 100% derived from doc headers.
270
+ - `meta.scan_commit` stays the OLDEST doc's anchor, and nothing reads it as a tier.
271
+ - Edges come from `wiki_fresh_max` / `wiki_aging_max`. A hardcoded 10/30 is a bug.
272
+ - `computeWikiFreshness` stays the ONE engine. `plan`, `debt` and `usage` all call
273
+ it, and skills never compute a tier.
274
+ - Crosslink publish stays per-scan-task.
275
+ - A STRUCTURAL blind spot still degrades one step and never past AGING.
276
+ - The fixed pause every 5 scan-tasks is not configurable.
@@ -1,11 +1,6 @@
1
1
  # Phase — Phase 0 — Entry & auto-branch (on /orc-wiki) (id: `phase-0`)
2
2
 
3
- > **`/orc-wiki` phase file.** Moved out of `orc-wiki/SKILL.md` at v1.0.0 W14. The
4
- > spine is loaded IN FULL when the skill activates; this is loaded when the phase
5
- > fires — and a wiki run reaches FEW of them: Phase 0 auto-branches into fresh /
6
- > resume / refresh / repair, and Phase 3c is a legacy backfill. ONE consumer, so
7
- > it stays in this lane (`../../../_shared/phases/README.md`: a file with one
8
- > consumer stays home). `orc lane phases orc-wiki --json` names the file.
3
+ > **`/orc-wiki` phase file** — read when the phase fires; a wiki run reaches few of them. One consumer, so it stays home. `orc lane phases orc-wiki --json` names the file.
9
4
 
10
5
  <!-- orc:layer full -->
11
6
 
@@ -42,7 +37,7 @@ Then detect state and branch:
42
37
  boundary guard fired and already names the real fix. Auto-detect OFFERS it in
43
38
  one line with a small cost note; never start unasked.
44
39
  - **Empty/absent `wiki/` AND no wiki checkpoint** → FRESH. Show the generic
45
- cost warning ("scans your code with Opus 4.8 high — expensive, likely
40
+ cost warning ("scans your code with Opus 5.5 low — expensive, likely
46
41
  multi-session, fixed pause every 5 areas; nothing scanned until you
47
42
  confirm") and wait for explicit consent. Only THEN Phase 1.
48
43
  - **Wiki checkpoint exists (mid-scan)** → RESUME. Re-anchor from
@@ -1,11 +1,6 @@
1
1
  # Phase — Phase 1 — Area planning (after consent) (id: `phase-1`)
2
2
 
3
- > **`/orc-wiki` phase file.** Moved out of `orc-wiki/SKILL.md` at v1.0.0 W14. The
4
- > spine is loaded IN FULL when the skill activates; this is loaded when the phase
5
- > fires — and a wiki run reaches FEW of them: Phase 0 auto-branches into fresh /
6
- > resume / refresh / repair, and Phase 3c is a legacy backfill. ONE consumer, so
7
- > it stays in this lane (`../../../_shared/phases/README.md`: a file with one
8
- > consumer stays home). `orc lane phases orc-wiki --json` names the file.
3
+ > **`/orc-wiki` phase file** — read when the phase fires; a wiki run reaches few of them. One consumer, so it stays home. `orc lane phases orc-wiki --json` names the file.
9
4
 
10
5
  <!-- orc:layer full -->
11
6
 
@@ -1,11 +1,6 @@
1
1
  # Phase — Phase 2 — Scan (spawned agents, 5-task pauses) (id: `phase-2`)
2
2
 
3
- > **`/orc-wiki` phase file.** Moved out of `orc-wiki/SKILL.md` at v1.0.0 W14. The
4
- > spine is loaded IN FULL when the skill activates; this is loaded when the phase
5
- > fires — and a wiki run reaches FEW of them: Phase 0 auto-branches into fresh /
6
- > resume / refresh / repair, and Phase 3c is a legacy backfill. ONE consumer, so
7
- > it stays in this lane (`../../../_shared/phases/README.md`: a file with one
8
- > consumer stays home). `orc lane phases orc-wiki --json` names the file.
3
+ > **`/orc-wiki` phase file** — read when the phase fires; a wiki run reaches few of them. One consumer, so it stays home. `orc lane phases orc-wiki --json` names the file.
9
4
 
10
5
  <!-- orc:layer full -->
11
6
 
@@ -16,12 +11,12 @@ Write checkpoint + state-of-play into the run subfolder BEFORE dispatching.
16
11
  `wiki_tier_deep_files`, default 3 — full ladder in references/partial-refresh.md):
17
12
  first scan · STRUCTURAL · wide delta · a new exported symbol → **deep**; otherwise
18
13
  **light** (`orc-wiki-scanner-sonnet-5-high`). `always_deep` restores the old
19
- behaviour, `opus5_only` collapses BOTH tiers onto `orc-wiki-scanner-opus-5-med`
14
+ behaviour, `opus5_only` collapses BOTH tiers onto `orc-wiki-scanner-opus-5-low`
20
15
  (no new pair). **PRINT the resolved tier** — a cheaper model is never a quiet
21
16
  substitution. **Extra (`extra_enabled`) reaches the SCANNER ONLY, and it is a POSITION per tier** — `wiki-scanner-deep` / `wiki-scanner-light`, held by `orc extra role` and resolved for the tier JUST PICKED. The resolved tier already prints; PRINT ITS TARGET with it. Load `../extra.md` at the scan phase when the gate is on; `orc wiki sync` never routes foreign (registration is CLI-derived — there is no model in it to replace). A wiki doc is evidence-anchored and cheap to re-scan, which is what makes the scanner the one role here worth handing over; `orc wiki sync` never routes foreign (registration is CLI-derived — there is no model in it to replace). `wiki_refresh_budget` (0 = no cap) caps scan-tasks per run as a
22
17
  PLANNED stop, and `wiki_retire_after_runs` (0 = never) offers — never performs —
23
18
  retirement of a doc no run has sliced.
24
- Per scan-task: spawn `orc-wiki-scanner-opus-4-8-high` BY NAME (`orc-wiki-scanner-opus-5-med` under `opus5_only`, `orc-wiki-scanner-sonnet-5-high` at the light tier) with the area's file list + the
19
+ Per scan-task: spawn `orc-wiki-scanner-opus-5-low` BY NAME (`orc-wiki-scanner-sonnet-5-high` at the light tier; under `opus5_only` BOTH tiers use `orc-wiki-scanner-opus-5-low`) with the area's file list + the
25
20
  doc-writing contract (schemas/wiki-doc.md — v2: evidence anchors in contract
26
21
  sections, `keywords[]` + per-file `covered_files` hashes, AND `crosslink_tags`
27
22
  = one tag body per OUTWARD boundary point in the area's files, or `none`+reason)
@@ -47,6 +42,6 @@ repo believing it was done. At every pause, lead with the coverage line:
47
42
  > The {N} docs so far are registered and usable now. Reply **continue** to scan
48
43
  > the rest.
49
44
  At completion, say **✅ Wiki complete — all {M} areas scanned.** The two must be
50
- impossible to confuse at a glance.
45
+ impossible to confuse at a glance.
51
46
 
52
47
  <!-- /orc:layer -->