@azure-id/orc 2.0.2 → 2.1.1
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.
- package/CHANGELOG.md +455 -0
- package/README-id.md +52 -23
- package/README.md +36 -20
- package/bin/build-agents.js +205 -206
- package/bin/clear-logs.js +620 -0
- package/bin/cli.js +47417 -46420
- package/bin/fix.js +459 -0
- package/bin/gotcha.js +288 -8
- package/bin/habit.js +1538 -1453
- package/bin/mockrun-catalog.js +3 -0
- package/bin/onboarding-content.js +2 -1
- package/bin/pricing.json +28 -21
- package/bin/trace-write.js +869 -657
- package/bin/verify-contracts.js +5552 -5471
- package/bin/verify-package.js +716 -705
- package/bin/webui/api.js +125 -6
- package/bin/webui/css/panels/hookui.css +79 -0
- package/bin/webui/fixtures/behaviour.js +30 -0
- package/bin/webui/fixtures/extra.js +2036 -2036
- package/bin/webui/fixtures/flow.js +81 -81
- package/bin/webui/fixtures/hookui.js +506 -431
- package/bin/webui/fixtures/index.js +32 -3
- package/bin/webui/fixtures/knowledge.js +2 -2
- package/bin/webui/fixtures/maintenance.js +123 -42
- package/bin/webui/fixtures/rules.js +1007 -1002
- package/bin/webui/fixtures/settings.js +6 -7
- package/bin/webui/fixtures/stats.js +9 -6
- package/bin/webui/fixtures/wait.js +98 -97
- package/bin/webui/i18n/en/behaviour.json +13 -0
- package/bin/webui/i18n/en/hookui.json +290 -194
- package/bin/webui/i18n/en/maintenance.json +71 -52
- package/bin/webui/i18n/en/settings.json +60 -60
- package/bin/webui/i18n/id/behaviour.json +13 -0
- package/bin/webui/i18n/id/hookui.json +290 -194
- package/bin/webui/i18n/id/maintenance.json +71 -52
- package/bin/webui/i18n/id/settings.json +60 -60
- package/bin/webui/js/05-banners.js +181 -172
- package/bin/webui/js/06-edit.js +193 -183
- package/bin/webui/js/panels/behaviour.js +77 -12
- package/bin/webui/js/panels/hookui.js +2196 -1691
- package/bin/webui/js/panels/maintenance.js +336 -235
- package/bin/webui/js/panels/settings.js +726 -719
- package/mock-run/INDEX.md +1 -0
- package/mock-run/a-normal-day.md +2 -2
- package/mock-run/extra-slots.md +177 -177
- package/mock-run/habits.md +1 -1
- package/mock-run/orc-aftermath.md +392 -392
- package/mock-run/orc-budget.md +29 -33
- package/mock-run/orc-cli.md +200 -200
- package/mock-run/orc-explain.md +86 -86
- package/mock-run/orc-extra.md +389 -392
- package/mock-run/orc-fast.md +2 -2
- package/mock-run/orc-fix.md +87 -0
- package/mock-run/orc-pattern.md +112 -112
- package/mock-run/orc-quick.md +146 -146
- package/mock-run/orc.md +4 -4
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +176 -173
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -2
- package/templates/agents/{orc-claude-writer-opus-5-med.md → orc-claude-writer-opus-5-low.md} +4 -4
- package/templates/agents/orc-executor-haiku-4-5.md +1 -1
- package/templates/agents/orc-executor-opus-5-low.md +1 -1
- package/templates/agents/orc-executor-sonnet-4-6-high.md +1 -1
- package/templates/agents/orc-executor-sonnet-4-6-med.md +1 -1
- package/templates/agents/orc-executor-sonnet-5-high.md +2 -2
- package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
- package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +2 -2
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -2
- package/templates/agents/{orc-recon-sonnet-4-6-med.md → orc-recon-sonnet-5-med.md} +4 -4
- package/templates/agents/orc-retro-sonnet-5-high.md +2 -2
- package/templates/agents/{orc-reviewer-opus-5-med.md → orc-reviewer-opus-5-low.md} +4 -4
- package/templates/agents/{orc-wiki-scanner-opus-5-med.md → orc-wiki-scanner-opus-5-low.md} +3 -3
- package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +2 -2
- package/templates/commands/orc-fast.md +10 -10
- package/templates/commands/orc-fix.md +18 -0
- package/templates/commands/orc-wiki.md +64 -64
- package/templates/hooks/README.md +75 -7
- package/templates/hooks/orc-session-hook.js +78 -3
- package/templates/hooks/orc-statusline-render.js +317 -23
- package/templates/hooks/orc-statusline.js +162 -49
- package/templates/hooks/orc-subagent-line.js +23 -5
- package/templates/hooks/orc-weather-fetch.js +123 -0
- package/templates/skills/_shared/extra-dispatch.md +1331 -1331
- package/templates/skills/_shared/gotchas.md +27 -7
- package/templates/skills/_shared/habits.md +2 -2
- package/templates/skills/_shared/opus5-only.md +137 -137
- package/templates/skills/_shared/phases/review.md +2 -2
- package/templates/skills/_shared/phases/trace-verbs.md +17 -3
- package/templates/skills/_shared/phases/trace.md +136 -136
- package/templates/skills/_shared/review-slice.md +28 -1
- package/templates/skills/_shared/wait.md +1 -0
- package/templates/skills/orc/README.md +2 -2
- package/templates/skills/orc/SKILL.md +227 -227
- package/templates/skills/orc/config.md +25 -27
- package/templates/skills/orc/examples/full-run-mock.md +74 -73
- package/templates/skills/orc/references/effort-and-mode.md +222 -222
- package/templates/skills/orc/references/preflight-report.md +3 -3
- package/templates/skills/orc/references/ultra-mode.md +1 -1
- package/templates/skills/orc/schemas/checkpoint.md +122 -122
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +3 -3
- package/templates/skills/orc/subskills/orc-review-verify/core.md +1 -1
- package/templates/skills/orc-analyze/SKILL.md +4 -2
- package/templates/skills/orc-claude/SKILL.md +14 -14
- package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
- package/templates/skills/orc-diy/SKILL.md +5 -5
- package/templates/skills/orc-fast/SKILL.md +210 -208
- package/templates/skills/orc-fix/SKILL.md +110 -0
- package/templates/skills/orc-grill/SKILL.md +232 -232
- package/templates/skills/orc-grill/references/grill-doc.md +1 -1
- package/templates/skills/orc-mini/SKILL.md +4 -4
- package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
- package/templates/skills/orc-quick/README.md +536 -536
- package/templates/skills/orc-quick/SKILL.md +2 -2
- package/templates/skills/orc-quick/references/context-doc.md +145 -145
- package/templates/skills/orc-quick/references/dispatch-gate.md +220 -219
- package/templates/skills/orc-quick/references/gh-mode.md +4 -2
- package/templates/skills/orc-retro/SKILL.md +1 -1
- package/templates/skills/orc-retro/examples/retro-mock.md +16 -16
- package/templates/skills/orc-wiki/README.md +325 -325
- package/templates/skills/orc-wiki/SKILL.md +195 -195
- package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
- package/templates/skills/orc-wiki/references/extra.md +2 -2
- package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
- package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -1
- package/templates/skills/orc-wiki/references/phases/phase-2.md +3 -3
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +3 -2
- package/templates/agents/orc-claude-writer-opus-4-8-high.md +0 -48
- package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +0 -74
|
@@ -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
|
|
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.
|