@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,325 +1,325 @@
1
- # orc-wiki
2
-
3
- Builds and maintains a persistent, evidence-anchored project knowledge base (the
4
- **wiki**) under project-root `wiki/`, plus a cross-repo **crosslink** subsystem.
5
- Skill mechanics live in `SKILL.md`; freshness in `references/staleness.md`;
6
- integrity in `references/integrity-check.md`; doc shape in `schemas/wiki-doc.md`;
7
- crosslink mechanics in `references/crosslink.md`.
8
-
9
- ## What the wiki is
10
-
11
- `/orc-wiki` scans the codebase with Opus 4.8 high and writes `wiki/orc-feature-*`,
12
- `wiki/orc-reference-*`, and `wiki/orc-architecture-overview.md`, an `INDEX.md`, and
13
- the machine manifest `.claude/orc/wiki-meta.json`. Future ORC runs consult it —
14
- precedence `code > fresh wiki > stale wiki (hints) > model priors`. Freshness is
15
- computed on read (git commit distance), never stored. Expensive and often
16
- multi-session — it always warns and gets consent before scanning.
17
-
18
- ## Two halves: docs and registration
19
-
20
- - **Docs** (`wiki/*.md`) — prose. Written by the skill's scan agents, because it
21
- takes a model to read code and summarize it. This is the expensive half.
22
- - **Registration** (`wiki/INDEX.md` + `.claude/orc/wiki-meta.json`) — the index
23
- and manifest that make the docs *findable*. Every field is derived from the
24
- docs' own headers, so the **`orc wiki sync` CLI** writes it: instant, free,
25
- deterministic. No model is ever involved.
26
-
27
- ```bash
28
- orc wiki # registration state: registered / UNREGISTERED / corrupt / out of sync
29
- orc wiki sync # (re)build INDEX.md + wiki-meta.json from the docs on disk
30
- orc wiki sync --check # read-only; exit 1 if registration doesn't match the docs
31
- ```
32
-
33
- **If ORC or `orc crosslink` says it can't see your wiki, run `orc wiki sync` —
34
- not a re-scan.** A wiki with docs but no manifest is UNREGISTERED, not missing:
35
- the docs are fine, nothing indexed them. This is common and expected, because
36
- `/orc-wiki` pauses every 5 areas by design, and a run stopped at a pause never
37
- reached its assemble phase. Sync fixes it in a second, for free; re-scanning
38
- buys you docs you already have. `/orc-wiki` also detects this on entry and
39
- offers the repair without any scan.
40
-
41
- ---
42
-
43
- # Cross-repo crosslink — the complete guide
44
-
45
- ## Why you'd want this
46
-
47
- You have more than one repo, and they talk to each other:
48
-
49
- - a **backend** that a **frontend dashboard** calls over HTTP, or
50
- - a **backend** that calls **another service** over gRPC (maybe several).
51
-
52
- Each repo's wiki only knows *its own* code. So when you ask ORC to build a new
53
- gRPC call from `service-a` to `service-c`, it has no idea what `service-c`'s
54
- `CreateInvoice` actually expects — it guesses the field names. **Crosslink fixes
55
- that:** it lets `service-a`'s wiki read `service-c`'s wiki *at the exact boundary*
56
- so the executor builds against the real contract.
57
-
58
- **The one rule that makes it safe:** crosslink is **advisory and never blocking**,
59
- and it only ever **reads** another repo's *wiki* — never its source code, and it
60
- never writes anything in the other repo. If a linked repo is missing, un-scanned,
61
- or out of date, you just get a warning and less context — your build never stops.
62
-
63
- ## The mental model (30 seconds)
64
-
65
- 1. Every repo **publishes** its own boundary (its endpoints / gRPC methods) as
66
- small per-point "tag" files when you scan it — automatically.
67
- 2. You **draw the graph** once with a CLI: "this repo calls that one over gRPC."
68
- 3. ORC **connects the dots**: when a task touches a boundary, it hands the
69
- executor the linked repo's real contract as a hint.
70
-
71
- You do step 2 (coarse: which repos, which way). The machine does the rest.
72
-
73
- ## Before you start
74
-
75
- - ORC installed in **each** repo you want to link (`orc init`).
76
- - The repos checked out as **siblings** (or anywhere reachable by a relative
77
- path), e.g. `~/code/service-a`, `~/code/service-c`, `~/code/dashboard`.
78
- - A terminal open in the **consuming** repo (the one that calls the others).
79
-
80
- ---
81
-
82
- ## Step 1 — give every repo a wiki
83
-
84
- In **each** repo, run:
85
-
86
- ```
87
- /orc-wiki
88
- ```
89
-
90
- Besides the normal knowledge base, a scan also **publishes that repo's
91
- boundary**: one small per-point tag file per endpoint / gRPC method under
92
- `wiki/crosslink/<kind>/<slug>.md`, plus a `crosslink_provided` list in that
93
- repo's `.claude/orc/wiki-meta.json`. This is **always on and happens per
94
- scan-task**, in the same pass as the docs — whether or not anyone links to you
95
- yet, so you never coordinate timing between teams. Every later scan/refresh
96
- re-publishes in the same pass, and a refresh **never deletes** your tags
97
- (a vanished endpoint is retired one-at-a-time, and only with your say-so).
98
-
99
- > A repo with no outward boundary simply publishes nothing (each scan-task
100
- > records that explicitly). That's fine.
101
-
102
- ### Old wiki with no tags? Backfill — don't re-scan.
103
-
104
- A wiki built **before v0.24.0** has docs but no `wiki/crosslink/` folder, because
105
- publishing used to happen only at the end of a scan (so a run that stopped at one
106
- of the 5-area pauses never reached it). The boundary is already described in your
107
- docs' evidence-anchored `Contracts & shapes` rows, so recovering it needs no repo
108
- scan:
109
-
110
- ```
111
- /orc-wiki crosslink
112
- ```
113
-
114
- This is the **CROSSLINK-ONLY** legacy-backfill branch. It reads those rows, opens
115
- *only* the files they anchor to, writes the tag files, resolves what you consume,
116
- and indexes it all with `orc wiki sync`. It never re-scans an area, never rewrites
117
- a doc, and never touches coverage. **"No crosslink tags" is never a reason to pay
118
- for a refresh.**
119
-
120
- > On a wiki scanned at **v0.24.0 or later** you should never land here: tags
121
- > publish on every scan/refresh automatically. If `orc wiki status` says
122
- > `crosslink: UNPUBLISHED boundary` or `orc wiki sync --check` fails with
123
- > "boundary documented but no crosslink tags", run the backfill above — that's
124
- > the guard catching a gap, not a re-scan request.
125
-
126
- > **Run it in the repo being CALLED.** Tags are published by the *provider*, so
127
- > `no crosslink tags yet` about your backend is fixed in the **backend**, not in
128
- > the frontend you're standing in. Running it in the caller publishes the
129
- > caller's *own* surface — which for a typical frontend is nothing at all, since
130
- > a pure consumer exposes no API and correctly publishes zero tags. If both repos
131
- > call each other (e.g. backend webhooks into the frontend), run it in both.
132
-
133
- ## Step 2 — draw the graph (in the consuming repo)
134
-
135
- From the repo that *calls* the others, run:
136
-
137
- ```
138
- orc crosslink
139
- ```
140
-
141
- You'll get a tiny menu:
142
-
143
- ```
144
- ORC crosslink — self: service-a · 0 linked repo(s), 0 edge(s)
145
- [1] add linked repo [2] list [3] remove [4] done
146
- > 1
147
- ```
148
-
149
- Adding a link walks you through five short prompts. Here's a real one — linking
150
- `service-a` to a gRPC dependency `service-c`:
151
-
152
- ```
153
- name for the linked repo (slug): service-c
154
- repo path (repo ROOT, relative to this repo, e.g. ../service-z): ../service-c
155
- ✓ wiki found · last_scan 11-07-2026 09:12:00 · FRESH · 8 tags
156
-
157
- kinds this repo exposes/consumes (catalog):
158
- 1) grpc 2) rest-endpoint 3) graphql
159
- ... (18 in the catalog, plus type your own)
160
- pick (numbers and/or names, comma-separated): 1
161
-
162
- direction? [1] this repo CALLS them [2] they CALL this repo
163
- > 1
164
-
165
- linked to which repo?
166
- 1) this repo (service-a)
167
- > 1
168
- ✓ added service-c · edge self ──grpc──▶ service-c (we consume → drift-checked)
169
- ```
170
-
171
- What each prompt means:
172
-
173
- | Prompt | What to enter |
174
- |--------|---------------|
175
- | **name** | any short slug for the linked repo (`service-c`, `dashboard`) |
176
- | **repo path** | the linked repo's **root folder**, relative to this repo (`../service-c`) — not its `wiki/` folder |
177
- | **kinds** | how they connect — pick from the catalog (`grpc`, `rest-endpoint`, …) or type your own; "Other" is always allowed |
178
- | **direction** | `[1]` = *you* call them (you'll get drift-checked against their contract); `[2]` = they call you |
179
- | **linked to** | which repo is the other end — **option 1 is always this repo**; other repos you've added show up as 2, 3, … |
180
-
181
- **The freshness line after you paste the path is the important safety check.** The
182
- CLI reads the linked repo's `wiki-meta.json` right then and tells you:
183
-
184
- - `✓ wiki found · … · FRESH · 8 tags` — great, fully linked.
185
- - `⚠ no wiki-meta.json there — run orc-wiki in that repo first` — typo or you
186
- skipped Step 1 there. The link is still saved (inert until they scan).
187
- - `✗ path not found — saved as a PENDING edge` — wrong path; fix it later, it
188
- resolves automatically when the path exists.
189
-
190
- **Bulk-add (nice shortcut).** If the linked repo *already* declares a matching
191
- link back at you, the CLI notices and offers to mirror it:
192
-
193
- ```
194
- service-c also declares service-c ──webhook──▶ service-a — mirror it into your config? (y/n) y
195
- ✓ mirrored
196
- ```
197
-
198
- When you're done, pick `[4]`. On your first setup the CLI offers to add the
199
- derived cache folder to `.gitignore` — say yes.
200
-
201
- Everything you just did was written to **one file**: `.claude/orc-crosslink.config.yaml`.
202
- The CLI never touches the linked repo.
203
-
204
- ## Step 3 — let ORC connect the dots
205
-
206
- Back in the consuming repo, run `/orc-wiki` once more (or your next scan/refresh).
207
- Now that the graph exists, orc-wiki walks your call sites and:
208
-
209
- - resolves the **exact** per-point contracts you depend on into
210
- `.claude/orc/crosslink/needs.json` (you never hand-list endpoints), and
211
- - mirrors snapshots of those contracts into `.claude/orc/crosslink/cache/`
212
- (gitignored) so they're available even when the other repo isn't checked out.
213
-
214
- That's it. You're set up.
215
-
216
- ### One-shot alternative: `/orc-wiki crosslink compile`
217
-
218
- Once the graph exists (Step 2), `/orc-wiki crosslink compile` does the whole
219
- connect-the-dots pass in one command (v0.33.0): resolve/consume from the graph
220
- (refresh `needs.json` + `cache/`) → generate the federation **ATLAS** (below) →
221
- write the atlas into each linked repo → inject/update the CLAUDE.md pointer
222
- block locally **and in each linked repo** (in-place block update, user content
223
- byte-preserved; a peer with no CLAUDE.md gets a minimal file with only the
224
- block). Every step is warn-only on failure, never a re-scan, never a doc
225
- rewrite, and it ends with one summary line per repo touched. Hard
226
- precondition: `.claude/orc-crosslink.config.yaml` with ≥1 edge — missing/empty
227
- means it explains the `orc crosslink` CLI steps and stops.
228
-
229
- ## The ATLAS — federation super-context (v0.33.0)
230
-
231
- `wiki/crosslink/atlas.md` is ONE repo-agnostic document describing the whole
232
- federation — every node, every edge (including transitive repos learned from
233
- peer atlases), what each repo provides/consumes, and **peek hints** (which of a
234
- repo's wiki docs answer which questions). The same document lives in EACH
235
- linked repo; a header records `generated_from`, the `generated` timestamp, and
236
- per-peer peek freshness. Freshness on read = `min(own wiki tier, oldest peek
237
- age)` — computed on read, never stored; across copies, **newest wins** (trust
238
- the newer `generated` stamp).
239
-
240
- It is regenerated at the end of every scan/refresh (derived + cheap — never a
241
- scan), and after writing the local copy the session **writes the same file into
242
- each linked repo** — this is a sanctioned peer FILE write (exception #2 in
243
- `references/crosslink.md`, next to orc-poly's handoff plan): never a commit,
244
- never a push, never any other peer path, and any failure warns and continues.
245
- `orc wiki sync` treats it as derived — never a registered doc, never
246
- bulk-deleted by a refresh.
247
-
248
- ## Step 4 — check it worked
249
-
250
- ```
251
- orc crosslink status
252
- ```
253
-
254
- ```
255
- Crosslink status — self: service-a, 1 linked repo(s), 1 edge(s)
256
-
257
- service-c:
258
- ✓ wiki found · last_scan 11-07-2026 09:12:00 · FRESH · 8 tags
259
-
260
- needs baseline: .claude/orc/crosslink/needs.json (per-point tags orc-wiki resolved)
261
- ```
262
-
263
- From now on, when you run `/orc`, `/orc-fast`, or `/orc-mini` and a task touches
264
- that gRPC boundary, the executor gets `service-c`'s real `CreateInvoice` contract
265
- handed to it as a hint — no more guessed field names.
266
-
267
- ---
268
-
269
- ## What lives where (after setup)
270
-
271
- | File | Who writes it | Committed? | What it is |
272
- |------|---------------|-----------|------------|
273
- | `.claude/orc-crosslink.config.yaml` | `orc crosslink` CLI (you) | yes | the graph you drew |
274
- | `wiki/crosslink/**` | `/orc-wiki` | yes | this repo's own published boundary tags |
275
- | `.claude/orc/crosslink/needs.json` | `/orc-wiki` | yes | the exact contracts you depend on (drift baseline) |
276
- | `.claude/orc/crosslink/cache/**` | `/orc-wiki` | **no** (gitignored) | mirrored snapshots of linked contracts |
277
- | `wiki/crosslink/atlas.md` | `/orc-wiki` (derived; also written into each linked repo) | yes | the federation atlas — repo-agnostic super-context |
278
-
279
- `orc update` never touches any of these.
280
-
281
- ## Everyday use
282
-
283
- - **Drift warnings.** If a contract you depend on changes or disappears, the next
284
- `/orc-wiki` scan warns you *by exact tag* (`grpc:billing.v1.CreateInvoice
285
- changed under you`). It's a **warning only** — nothing is ever blocked.
286
- - **Keeping it current.** Re-run `/orc-wiki` (incremental refresh is cheap) in
287
- the consuming repo to re-sync the cache and re-check drift.
288
- - **Freshness you can trust.** A linked hint is only used as fresh when *both* the
289
- provider's wiki is fresh *and* your snapshot is recent — the weaker of the two
290
- wins, and it's labeled "cross-repo hints, not verified". Local code always wins
291
- over any cross-repo hint.
292
-
293
- ## Troubleshooting
294
-
295
- | You see | What it means | Fix |
296
- |---------|---------------|-----|
297
- | `⚠ wiki found (N docs) but UNREGISTERED` | that repo's wiki is real and possibly complete — nothing ever indexed it (usually a scan stopped at a 5-area pause) | `orc wiki sync` in the linked repo — instant, free, **do not re-scan** |
298
- | `⚠ wiki-meta.json there is unreadable` | the manifest is corrupt JSON | `orc wiki sync` in the linked repo rebuilds it from the docs |
299
- | `⚠ no wiki there` | that repo genuinely has no docs | run `/orc-wiki` in the linked repo |
300
- | `✓ inbound only (they call us)` | that repo only *consumes* your API — you read nothing from it | nothing to do; its tags/freshness are irrelevant on your side |
301
- | `⚠ linked, but no edge yet` | you added the repo but never drew an edge | `orc crosslink` → add the edge; a node alone does nothing |
302
- | `✗ path not found — PENDING` | the repo path is wrong or not checked out | fix the path with `orc crosslink` (remove + re-add), or check the repo out |
303
- | `no crosslink tags yet (coarse hints only)` | that repo has wiki docs but never published its boundary — its scan stopped before the publish step, or its wiki predates crosslink | run **`/orc-wiki crosslink`** in that repo: publishes the tags from the docs it already has, no re-scan. (It also upgrades on that repo's next full scan — but don't pay for a scan just for this.) |
304
- | `tier unknown (git unavailable there)` | linked folder isn't a git checkout | freshness falls back to the snapshot date — still works |
305
- | executor didn't get a contract | the task didn't touch a linked boundary, or `needs.json` isn't built | run `/orc-wiki` in this repo to build the needs baseline |
306
-
307
- ## The guarantees (why it's safe to adopt)
308
-
309
- - **Advisory, never blocking** — every failure degrades to a warning; your build
310
- never stops on a cross-repo issue.
311
- - **Reads foreign *wiki* only** — never another repo's source. The whole
312
- footprint is a few read-only wiki files + read-only git queries. The ONLY
313
- writes into a peer are the two sanctioned file writes (the atlas +, via
314
- `crosslink compile`, the CLAUDE.md pointer block) — file writes only, never
315
- a commit or push, warn-only on failure.
316
- - **No cross-team coordination** — publish and consume are independent; a repo on
317
- an older wiki gives you coarse hints today and precise ones for free the day it
318
- re-scans.
319
-
320
- ## Git hygiene
321
-
322
- Commit `.claude/orc-crosslink.config.yaml`, `.claude/orc/crosslink/needs.json`,
323
- and `wiki/crosslink/**`. Keep `.claude/orc/crosslink/cache/**` out of git — it's
324
- derived and regenerable. The `orc crosslink` CLI offers, once, to append the cache
325
- path to `.gitignore`; it never edits `.gitignore` silently.
1
+ # orc-wiki
2
+
3
+ Builds and maintains a persistent, evidence-anchored project knowledge base (the
4
+ **wiki**) under project-root `wiki/`, plus a cross-repo **crosslink** subsystem.
5
+ Skill mechanics live in `SKILL.md`; freshness in `references/staleness.md`;
6
+ integrity in `references/integrity-check.md`; doc shape in `schemas/wiki-doc.md`;
7
+ crosslink mechanics in `references/crosslink.md`.
8
+
9
+ ## What the wiki is
10
+
11
+ `/orc-wiki` scans the codebase with Opus 5.5 low and writes `wiki/orc-feature-*`,
12
+ `wiki/orc-reference-*`, and `wiki/orc-architecture-overview.md`, an `INDEX.md`, and
13
+ the machine manifest `.claude/orc/wiki-meta.json`. Future ORC runs consult it —
14
+ precedence `code > fresh wiki > stale wiki (hints) > model priors`. Freshness is
15
+ computed on read (git commit distance), never stored. Expensive and often
16
+ multi-session — it always warns and gets consent before scanning.
17
+
18
+ ## Two halves: docs and registration
19
+
20
+ - **Docs** (`wiki/*.md`) — prose. Written by the skill's scan agents, because it
21
+ takes a model to read code and summarize it. This is the expensive half.
22
+ - **Registration** (`wiki/INDEX.md` + `.claude/orc/wiki-meta.json`) — the index
23
+ and manifest that make the docs *findable*. Every field is derived from the
24
+ docs' own headers, so the **`orc wiki sync` CLI** writes it: instant, free,
25
+ deterministic. No model is ever involved.
26
+
27
+ ```bash
28
+ orc wiki # registration state: registered / UNREGISTERED / corrupt / out of sync
29
+ orc wiki sync # (re)build INDEX.md + wiki-meta.json from the docs on disk
30
+ orc wiki sync --check # read-only; exit 1 if registration doesn't match the docs
31
+ ```
32
+
33
+ **If ORC or `orc crosslink` says it can't see your wiki, run `orc wiki sync` —
34
+ not a re-scan.** A wiki with docs but no manifest is UNREGISTERED, not missing:
35
+ the docs are fine, nothing indexed them. This is common and expected, because
36
+ `/orc-wiki` pauses every 5 areas by design, and a run stopped at a pause never
37
+ reached its assemble phase. Sync fixes it in a second, for free; re-scanning
38
+ buys you docs you already have. `/orc-wiki` also detects this on entry and
39
+ offers the repair without any scan.
40
+
41
+ ---
42
+
43
+ # Cross-repo crosslink — the complete guide
44
+
45
+ ## Why you'd want this
46
+
47
+ You have more than one repo, and they talk to each other:
48
+
49
+ - a **backend** that a **frontend dashboard** calls over HTTP, or
50
+ - a **backend** that calls **another service** over gRPC (maybe several).
51
+
52
+ Each repo's wiki only knows *its own* code. So when you ask ORC to build a new
53
+ gRPC call from `service-a` to `service-c`, it has no idea what `service-c`'s
54
+ `CreateInvoice` actually expects — it guesses the field names. **Crosslink fixes
55
+ that:** it lets `service-a`'s wiki read `service-c`'s wiki *at the exact boundary*
56
+ so the executor builds against the real contract.
57
+
58
+ **The one rule that makes it safe:** crosslink is **advisory and never blocking**,
59
+ and it only ever **reads** another repo's *wiki* — never its source code, and it
60
+ never writes anything in the other repo. If a linked repo is missing, un-scanned,
61
+ or out of date, you just get a warning and less context — your build never stops.
62
+
63
+ ## The mental model (30 seconds)
64
+
65
+ 1. Every repo **publishes** its own boundary (its endpoints / gRPC methods) as
66
+ small per-point "tag" files when you scan it — automatically.
67
+ 2. You **draw the graph** once with a CLI: "this repo calls that one over gRPC."
68
+ 3. ORC **connects the dots**: when a task touches a boundary, it hands the
69
+ executor the linked repo's real contract as a hint.
70
+
71
+ You do step 2 (coarse: which repos, which way). The machine does the rest.
72
+
73
+ ## Before you start
74
+
75
+ - ORC installed in **each** repo you want to link (`orc init`).
76
+ - The repos checked out as **siblings** (or anywhere reachable by a relative
77
+ path), e.g. `~/code/service-a`, `~/code/service-c`, `~/code/dashboard`.
78
+ - A terminal open in the **consuming** repo (the one that calls the others).
79
+
80
+ ---
81
+
82
+ ## Step 1 — give every repo a wiki
83
+
84
+ In **each** repo, run:
85
+
86
+ ```
87
+ /orc-wiki
88
+ ```
89
+
90
+ Besides the normal knowledge base, a scan also **publishes that repo's
91
+ boundary**: one small per-point tag file per endpoint / gRPC method under
92
+ `wiki/crosslink/<kind>/<slug>.md`, plus a `crosslink_provided` list in that
93
+ repo's `.claude/orc/wiki-meta.json`. This is **always on and happens per
94
+ scan-task**, in the same pass as the docs — whether or not anyone links to you
95
+ yet, so you never coordinate timing between teams. Every later scan/refresh
96
+ re-publishes in the same pass, and a refresh **never deletes** your tags
97
+ (a vanished endpoint is retired one-at-a-time, and only with your say-so).
98
+
99
+ > A repo with no outward boundary simply publishes nothing (each scan-task
100
+ > records that explicitly). That's fine.
101
+
102
+ ### Old wiki with no tags? Backfill — don't re-scan.
103
+
104
+ A wiki built **before v0.24.0** has docs but no `wiki/crosslink/` folder, because
105
+ publishing used to happen only at the end of a scan (so a run that stopped at one
106
+ of the 5-area pauses never reached it). The boundary is already described in your
107
+ docs' evidence-anchored `Contracts & shapes` rows, so recovering it needs no repo
108
+ scan:
109
+
110
+ ```
111
+ /orc-wiki crosslink
112
+ ```
113
+
114
+ This is the **CROSSLINK-ONLY** legacy-backfill branch. It reads those rows, opens
115
+ *only* the files they anchor to, writes the tag files, resolves what you consume,
116
+ and indexes it all with `orc wiki sync`. It never re-scans an area, never rewrites
117
+ a doc, and never touches coverage. **"No crosslink tags" is never a reason to pay
118
+ for a refresh.**
119
+
120
+ > On a wiki scanned at **v0.24.0 or later** you should never land here: tags
121
+ > publish on every scan/refresh automatically. If `orc wiki status` says
122
+ > `crosslink: UNPUBLISHED boundary` or `orc wiki sync --check` fails with
123
+ > "boundary documented but no crosslink tags", run the backfill above — that's
124
+ > the guard catching a gap, not a re-scan request.
125
+
126
+ > **Run it in the repo being CALLED.** Tags are published by the *provider*, so
127
+ > `no crosslink tags yet` about your backend is fixed in the **backend**, not in
128
+ > the frontend you're standing in. Running it in the caller publishes the
129
+ > caller's *own* surface — which for a typical frontend is nothing at all, since
130
+ > a pure consumer exposes no API and correctly publishes zero tags. If both repos
131
+ > call each other (e.g. backend webhooks into the frontend), run it in both.
132
+
133
+ ## Step 2 — draw the graph (in the consuming repo)
134
+
135
+ From the repo that *calls* the others, run:
136
+
137
+ ```
138
+ orc crosslink
139
+ ```
140
+
141
+ You'll get a tiny menu:
142
+
143
+ ```
144
+ ORC crosslink — self: service-a · 0 linked repo(s), 0 edge(s)
145
+ [1] add linked repo [2] list [3] remove [4] done
146
+ > 1
147
+ ```
148
+
149
+ Adding a link walks you through five short prompts. Here's a real one — linking
150
+ `service-a` to a gRPC dependency `service-c`:
151
+
152
+ ```
153
+ name for the linked repo (slug): service-c
154
+ repo path (repo ROOT, relative to this repo, e.g. ../service-z): ../service-c
155
+ ✓ wiki found · last_scan 11-07-2026 09:12:00 · FRESH · 8 tags
156
+
157
+ kinds this repo exposes/consumes (catalog):
158
+ 1) grpc 2) rest-endpoint 3) graphql
159
+ ... (18 in the catalog, plus type your own)
160
+ pick (numbers and/or names, comma-separated): 1
161
+
162
+ direction? [1] this repo CALLS them [2] they CALL this repo
163
+ > 1
164
+
165
+ linked to which repo?
166
+ 1) this repo (service-a)
167
+ > 1
168
+ ✓ added service-c · edge self ──grpc──▶ service-c (we consume → drift-checked)
169
+ ```
170
+
171
+ What each prompt means:
172
+
173
+ | Prompt | What to enter |
174
+ |--------|---------------|
175
+ | **name** | any short slug for the linked repo (`service-c`, `dashboard`) |
176
+ | **repo path** | the linked repo's **root folder**, relative to this repo (`../service-c`) — not its `wiki/` folder |
177
+ | **kinds** | how they connect — pick from the catalog (`grpc`, `rest-endpoint`, …) or type your own; "Other" is always allowed |
178
+ | **direction** | `[1]` = *you* call them (you'll get drift-checked against their contract); `[2]` = they call you |
179
+ | **linked to** | which repo is the other end — **option 1 is always this repo**; other repos you've added show up as 2, 3, … |
180
+
181
+ **The freshness line after you paste the path is the important safety check.** The
182
+ CLI reads the linked repo's `wiki-meta.json` right then and tells you:
183
+
184
+ - `✓ wiki found · … · FRESH · 8 tags` — great, fully linked.
185
+ - `⚠ no wiki-meta.json there — run orc-wiki in that repo first` — typo or you
186
+ skipped Step 1 there. The link is still saved (inert until they scan).
187
+ - `✗ path not found — saved as a PENDING edge` — wrong path; fix it later, it
188
+ resolves automatically when the path exists.
189
+
190
+ **Bulk-add (nice shortcut).** If the linked repo *already* declares a matching
191
+ link back at you, the CLI notices and offers to mirror it:
192
+
193
+ ```
194
+ service-c also declares service-c ──webhook──▶ service-a — mirror it into your config? (y/n) y
195
+ ✓ mirrored
196
+ ```
197
+
198
+ When you're done, pick `[4]`. On your first setup the CLI offers to add the
199
+ derived cache folder to `.gitignore` — say yes.
200
+
201
+ Everything you just did was written to **one file**: `.claude/orc-crosslink.config.yaml`.
202
+ The CLI never touches the linked repo.
203
+
204
+ ## Step 3 — let ORC connect the dots
205
+
206
+ Back in the consuming repo, run `/orc-wiki` once more (or your next scan/refresh).
207
+ Now that the graph exists, orc-wiki walks your call sites and:
208
+
209
+ - resolves the **exact** per-point contracts you depend on into
210
+ `.claude/orc/crosslink/needs.json` (you never hand-list endpoints), and
211
+ - mirrors snapshots of those contracts into `.claude/orc/crosslink/cache/`
212
+ (gitignored) so they're available even when the other repo isn't checked out.
213
+
214
+ That's it. You're set up.
215
+
216
+ ### One-shot alternative: `/orc-wiki crosslink compile`
217
+
218
+ Once the graph exists (Step 2), `/orc-wiki crosslink compile` does the whole
219
+ connect-the-dots pass in one command (v0.33.0): resolve/consume from the graph
220
+ (refresh `needs.json` + `cache/`) → generate the federation **ATLAS** (below) →
221
+ write the atlas into each linked repo → inject/update the CLAUDE.md pointer
222
+ block locally **and in each linked repo** (in-place block update, user content
223
+ byte-preserved; a peer with no CLAUDE.md gets a minimal file with only the
224
+ block). Every step is warn-only on failure, never a re-scan, never a doc
225
+ rewrite, and it ends with one summary line per repo touched. Hard
226
+ precondition: `.claude/orc-crosslink.config.yaml` with ≥1 edge — missing/empty
227
+ means it explains the `orc crosslink` CLI steps and stops.
228
+
229
+ ## The ATLAS — federation super-context (v0.33.0)
230
+
231
+ `wiki/crosslink/atlas.md` is ONE repo-agnostic document describing the whole
232
+ federation — every node, every edge (including transitive repos learned from
233
+ peer atlases), what each repo provides/consumes, and **peek hints** (which of a
234
+ repo's wiki docs answer which questions). The same document lives in EACH
235
+ linked repo; a header records `generated_from`, the `generated` timestamp, and
236
+ per-peer peek freshness. Freshness on read = `min(own wiki tier, oldest peek
237
+ age)` — computed on read, never stored; across copies, **newest wins** (trust
238
+ the newer `generated` stamp).
239
+
240
+ It is regenerated at the end of every scan/refresh (derived + cheap — never a
241
+ scan), and after writing the local copy the session **writes the same file into
242
+ each linked repo** — this is a sanctioned peer FILE write (exception #2 in
243
+ `references/crosslink.md`, next to orc-poly's handoff plan): never a commit,
244
+ never a push, never any other peer path, and any failure warns and continues.
245
+ `orc wiki sync` treats it as derived — never a registered doc, never
246
+ bulk-deleted by a refresh.
247
+
248
+ ## Step 4 — check it worked
249
+
250
+ ```
251
+ orc crosslink status
252
+ ```
253
+
254
+ ```
255
+ Crosslink status — self: service-a, 1 linked repo(s), 1 edge(s)
256
+
257
+ service-c:
258
+ ✓ wiki found · last_scan 11-07-2026 09:12:00 · FRESH · 8 tags
259
+
260
+ needs baseline: .claude/orc/crosslink/needs.json (per-point tags orc-wiki resolved)
261
+ ```
262
+
263
+ From now on, when you run `/orc`, `/orc-fast`, or `/orc-mini` and a task touches
264
+ that gRPC boundary, the executor gets `service-c`'s real `CreateInvoice` contract
265
+ handed to it as a hint — no more guessed field names.
266
+
267
+ ---
268
+
269
+ ## What lives where (after setup)
270
+
271
+ | File | Who writes it | Committed? | What it is |
272
+ |------|---------------|-----------|------------|
273
+ | `.claude/orc-crosslink.config.yaml` | `orc crosslink` CLI (you) | yes | the graph you drew |
274
+ | `wiki/crosslink/**` | `/orc-wiki` | yes | this repo's own published boundary tags |
275
+ | `.claude/orc/crosslink/needs.json` | `/orc-wiki` | yes | the exact contracts you depend on (drift baseline) |
276
+ | `.claude/orc/crosslink/cache/**` | `/orc-wiki` | **no** (gitignored) | mirrored snapshots of linked contracts |
277
+ | `wiki/crosslink/atlas.md` | `/orc-wiki` (derived; also written into each linked repo) | yes | the federation atlas — repo-agnostic super-context |
278
+
279
+ `orc update` never touches any of these.
280
+
281
+ ## Everyday use
282
+
283
+ - **Drift warnings.** If a contract you depend on changes or disappears, the next
284
+ `/orc-wiki` scan warns you *by exact tag* (`grpc:billing.v1.CreateInvoice
285
+ changed under you`). It's a **warning only** — nothing is ever blocked.
286
+ - **Keeping it current.** Re-run `/orc-wiki` (incremental refresh is cheap) in
287
+ the consuming repo to re-sync the cache and re-check drift.
288
+ - **Freshness you can trust.** A linked hint is only used as fresh when *both* the
289
+ provider's wiki is fresh *and* your snapshot is recent — the weaker of the two
290
+ wins, and it's labeled "cross-repo hints, not verified". Local code always wins
291
+ over any cross-repo hint.
292
+
293
+ ## Troubleshooting
294
+
295
+ | You see | What it means | Fix |
296
+ |---------|---------------|-----|
297
+ | `⚠ wiki found (N docs) but UNREGISTERED` | that repo's wiki is real and possibly complete — nothing ever indexed it (usually a scan stopped at a 5-area pause) | `orc wiki sync` in the linked repo — instant, free, **do not re-scan** |
298
+ | `⚠ wiki-meta.json there is unreadable` | the manifest is corrupt JSON | `orc wiki sync` in the linked repo rebuilds it from the docs |
299
+ | `⚠ no wiki there` | that repo genuinely has no docs | run `/orc-wiki` in the linked repo |
300
+ | `✓ inbound only (they call us)` | that repo only *consumes* your API — you read nothing from it | nothing to do; its tags/freshness are irrelevant on your side |
301
+ | `⚠ linked, but no edge yet` | you added the repo but never drew an edge | `orc crosslink` → add the edge; a node alone does nothing |
302
+ | `✗ path not found — PENDING` | the repo path is wrong or not checked out | fix the path with `orc crosslink` (remove + re-add), or check the repo out |
303
+ | `no crosslink tags yet (coarse hints only)` | that repo has wiki docs but never published its boundary — its scan stopped before the publish step, or its wiki predates crosslink | run **`/orc-wiki crosslink`** in that repo: publishes the tags from the docs it already has, no re-scan. (It also upgrades on that repo's next full scan — but don't pay for a scan just for this.) |
304
+ | `tier unknown (git unavailable there)` | linked folder isn't a git checkout | freshness falls back to the snapshot date — still works |
305
+ | executor didn't get a contract | the task didn't touch a linked boundary, or `needs.json` isn't built | run `/orc-wiki` in this repo to build the needs baseline |
306
+
307
+ ## The guarantees (why it's safe to adopt)
308
+
309
+ - **Advisory, never blocking** — every failure degrades to a warning; your build
310
+ never stops on a cross-repo issue.
311
+ - **Reads foreign *wiki* only** — never another repo's source. The whole
312
+ footprint is a few read-only wiki files + read-only git queries. The ONLY
313
+ writes into a peer are the two sanctioned file writes (the atlas +, via
314
+ `crosslink compile`, the CLAUDE.md pointer block) — file writes only, never
315
+ a commit or push, warn-only on failure.
316
+ - **No cross-team coordination** — publish and consume are independent; a repo on
317
+ an older wiki gives you coarse hints today and precise ones for free the day it
318
+ re-scans.
319
+
320
+ ## Git hygiene
321
+
322
+ Commit `.claude/orc-crosslink.config.yaml`, `.claude/orc/crosslink/needs.json`,
323
+ and `wiki/crosslink/**`. Keep `.claude/orc/crosslink/cache/**` out of git — it's
324
+ derived and regenerable. The `orc crosslink` CLI offers, once, to append the cache
325
+ path to `.gitignore`; it never edits `.gitignore` silently.