@azure-id/orc 1.8.1 → 1.9.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.
- package/CHANGELOG.md +386 -0
- package/README-id.md +110 -73
- package/README.md +96 -33
- package/bin/cli.js +45520 -44867
- package/bin/graph-extract.js +2409 -120
- package/bin/graph-gain.js +404 -0
- package/bin/graph-map.js +232 -0
- package/bin/graph-notes.js +49 -8
- package/bin/graph-query.js +1770 -808
- package/bin/graph-resolve.js +93 -16
- package/bin/graph-shard.js +325 -0
- package/bin/graph.js +658 -605
- package/bin/verify-contracts.js +297 -56
- package/bin/verify-package.js +29 -1
- package/bin/webui/api.js +6 -0
- package/bin/webui/fixtures/index.js +6 -1
- package/bin/webui/fixtures/knowledge.js +41 -1
- package/bin/webui/fixtures/stats.js +107 -104
- package/bin/webui/i18n/en/knowledge.json +16 -1
- package/bin/webui/i18n/id/knowledge.json +16 -1
- package/bin/webui/js/panels/knowledge.js +68 -3
- package/mock-run/orc-quick.md +141 -113
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +15 -5
- package/templates/agents/orc-executor-haiku-4-5.md +25 -13
- package/templates/agents/orc-executor-opus-4-7-high.md +25 -13
- package/templates/agents/orc-executor-opus-4-7-med.md +25 -13
- package/templates/agents/orc-executor-opus-4-8-high.md +25 -13
- package/templates/agents/orc-executor-opus-5-high.md +25 -13
- package/templates/agents/orc-executor-opus-5-low.md +25 -13
- package/templates/agents/orc-executor-opus-5-med.md +25 -13
- package/templates/agents/orc-executor-sonnet-4-6-high.md +25 -13
- package/templates/agents/orc-executor-sonnet-4-6-med.md +25 -13
- package/templates/agents/orc-executor-sonnet-5-high.md +25 -13
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +15 -12
- package/templates/agents/orc-planner-mini-opus-5-med.md +75 -69
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +73 -67
- package/templates/agents/orc-recon-opus-5-low.md +99 -0
- package/templates/agents/orc-recon-sonnet-4-6-med.md +99 -0
- package/templates/commands/orc-mini.md +10 -12
- package/templates/commands/orc-quick.md +20 -33
- package/templates/hooks/README.md +13 -3
- package/templates/hooks/orc-graph-hook.js +148 -13
- package/templates/hooks/orc-trace.js +476 -471
- package/templates/skills/_shared/code-graph.md +148 -20
- package/templates/skills/_shared/phases/execution.md +13 -11
- package/templates/skills/_shared/phases/planning.md +8 -1
- package/templates/skills/_shared/phases/rules.md +172 -159
- package/templates/skills/_shared/phases/ship.md +5 -1
- package/templates/skills/_shared/phases/trace.md +4 -1
- package/templates/skills/_shared/phases/wiki-consult.md +10 -6
- package/templates/skills/_shared/read-ladder.md +10 -2
- package/templates/skills/_shared/return-validation.md +22 -0
- package/templates/skills/context-combiner/SKILL.md +13 -13
- package/templates/skills/orc/SKILL.md +1 -1
- package/templates/skills/orc/subskills/orc-execution/core.md +171 -159
- package/templates/skills/orc-analyze/SKILL.md +13 -13
- package/templates/skills/orc-diy/references/flow-schema.md +1 -1
- package/templates/skills/orc-mini/SKILL.md +148 -136
- package/templates/skills/orc-mini/examples/mini-run-mock.md +64 -50
- package/templates/skills/orc-mini/references/complexity.md +105 -0
- package/templates/skills/orc-quick/README.md +495 -423
- package/templates/skills/orc-quick/SKILL.md +157 -211
- package/templates/skills/orc-quick/references/context-doc.md +145 -114
- package/templates/skills/orc-quick/references/defect.md +101 -0
- package/templates/skills/orc-quick/references/dispatch-gate.md +55 -24
- package/templates/skills/orc-quick/references/gh-mode.md +148 -127
- package/templates/skills/orc-quick/references/look.md +107 -0
- package/templates/skills/orc-wiki/references/staleness.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,392 @@ Format: `### v<version> — <title> _(<date>)_`.
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
### v1.9.0 — the lean lanes learn to look before they leap _(2026-09-21)_
|
|
14
|
+
|
|
15
|
+
**Still on the unscoped `orc` package?** Do this once first - your `orc upgrade`
|
|
16
|
+
is the pre-v0.56.0 one and cannot install itself. Full detail in the CAUTION at
|
|
17
|
+
the top of this file.
|
|
18
|
+
|
|
19
|
+
- **Step 1 - release the command from the old package:** `npm uninstall -g orc`
|
|
20
|
+
- **Step 2 - install the current package:** `npm i -g @azure-id/orc`
|
|
21
|
+
- **Step 3 - re-apply it to your project:** `orc update`
|
|
22
|
+
|
|
23
|
+
**Do not use `npm i -g -f`.** Full detail in v0.56.0 below.
|
|
24
|
+
|
|
25
|
+
`/orc-quick` and `/orc-mini` are the two lanes people reach for most, and both
|
|
26
|
+
were working half blind. The code graph could tell them WHERE a symbol is, and
|
|
27
|
+
was forbidden from telling them WHAT BREAKS. A bug fix was never shown failing
|
|
28
|
+
before it was fixed. Read-only work was dispatched by model name, so nothing in
|
|
29
|
+
ORC could see it. This release fixes those three things and trims what the two
|
|
30
|
+
lanes cost to load.
|
|
31
|
+
|
|
32
|
+
**Nothing you have to do.** No new config key. No new prerequisite. If the code
|
|
33
|
+
graph is off, every new call says so in one line and the lanes work as before.
|
|
34
|
+
|
|
35
|
+
**A bug is now shown RED before it is fixed.**
|
|
36
|
+
|
|
37
|
+
- A request like *"the orders page returns 500, find it and fix it"* is sorted
|
|
38
|
+
as a **defect**, and the slice carries a `repro` field. The executor writes
|
|
39
|
+
the reproduction FIRST — a failing test in your own framework, or a command —
|
|
40
|
+
runs it, captures the red run, implements, and runs it again for the green.
|
|
41
|
+
- Both runs are printed, and the trace carries `REPRO red :: <cmd> exit=1` and
|
|
42
|
+
`REPRO green :: <cmd> exit=0`. `/orc-retro` counts them apart from a TDD
|
|
43
|
+
cycle, because a reproduction is not a `tdd_spec`.
|
|
44
|
+
- **A reproduction that cannot be written is `repro: none` with a reason**, and
|
|
45
|
+
the entry says *not reproduced* — repeated at the commit offer, so a fix
|
|
46
|
+
nobody has seen work is never quietly shipped as one. It is never faked.
|
|
47
|
+
- A `done` return whose `before` run was green, or whose `after` run is still
|
|
48
|
+
red, is a malformed return and is treated as a failure.
|
|
49
|
+
|
|
50
|
+
Why: without the red run, a fix is proven against your test suite — which was
|
|
51
|
+
green before and is green after. With it, the fix is proven against the bug you
|
|
52
|
+
reported. It costs one extra run of one command.
|
|
53
|
+
|
|
54
|
+
**The two lanes may now ask what breaks.**
|
|
55
|
+
|
|
56
|
+
- `/orc-quick` gained `orc graph map`, `changes` and `coverage`; `/orc-mini`
|
|
57
|
+
gained `map`, `impact`, `changes` and `cochange`. Until now both could ask
|
|
58
|
+
only `ctx`.
|
|
59
|
+
- **Affected tests run first.** After a dispatch that wrote code, `orc graph
|
|
60
|
+
changes` names the tests that reach the change — a test that arrives through
|
|
61
|
+
a URL included — and those run before the suite. A runner that takes no file
|
|
62
|
+
list says so in one line and runs the suite.
|
|
63
|
+
- **Every entry carries a blast-radius line:** `3 symbols touched · callers 7 in
|
|
64
|
+
4 files · tests reach 2 · risk high: <symbol> (exported, fan-in 4, no test
|
|
65
|
+
reaches it)`. A `risk` word never appears without its reason. Nothing indexed
|
|
66
|
+
means it says that instead of a number.
|
|
67
|
+
- **A request that names no file** starts with `orc graph map --focus`, so
|
|
68
|
+
*"where is the retry logic?"* no longer begins with a guess at a filename.
|
|
69
|
+
|
|
70
|
+
**`/orc-mini`'s complexity read now carries numbers.**
|
|
71
|
+
|
|
72
|
+
It used to be a sentence of judgment. It is now one line with counts behind it,
|
|
73
|
+
and four thresholds that each carry their reason:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
complexity: recommend /orc — 6 files · callers 27 in 9 files · risk auth (src/routes/orders.js:12) · cochange src/auth.js x3 not in plan
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Confident callers in 4 or more files outside the plan · 8 or more confident
|
|
80
|
+
callers · any cited risk class · a file that history says is always touched
|
|
81
|
+
alongside one of yours. `AMBIGUOUS` callers are counted and printed as
|
|
82
|
+
`maybe <n>`; they never trip a threshold alone. **It is an offer, never a
|
|
83
|
+
switch**, and continuing writes the NUMBERS into the decision log so a later
|
|
84
|
+
`/orc-retro` can move a threshold instead of anyone arguing about it. With the
|
|
85
|
+
graph off it says `(graph off)` and decides from the cited risk classes alone —
|
|
86
|
+
it never invents a number.
|
|
87
|
+
|
|
88
|
+
The mini planner is dispatched WITH those facts (`graph_facts`), so it grounds
|
|
89
|
+
its own file list on them. A file that history says belongs in the change, and
|
|
90
|
+
that the plan does not name, becomes an open question — never a file the planner
|
|
91
|
+
adds in silence.
|
|
92
|
+
|
|
93
|
+
**Read-only work is a real agent now.**
|
|
94
|
+
|
|
95
|
+
- `/orc-quick`'s recon is a pinned pair — `orc-recon-sonnet-4-6-med` and
|
|
96
|
+
`orc-recon-opus-5-low` — with one return contract: a short answer (12 lines at
|
|
97
|
+
most), evidence with `file:line`, what it searched, what it did NOT find and
|
|
98
|
+
the queries that prove it, and `graph_used`.
|
|
99
|
+
- They are **traced**. The hook writes `SPAWN` and `RETURN` for them, they show
|
|
100
|
+
up in `orc run inflight` while they run, and `/orc-retro` can count them. Each
|
|
101
|
+
is dispatched through the same gate as everything else — the gate still asks
|
|
102
|
+
every time.
|
|
103
|
+
- A blast-radius answer keeps four kinds of caller APART — a direct caller, one
|
|
104
|
+
that reaches through a URL, one through an alias, one through a base class —
|
|
105
|
+
and when a list rests on the map alone it carries the sentence that says so:
|
|
106
|
+
*A card lists every caller that NAMES the symbol. A card's silence is not
|
|
107
|
+
proof of absence.*
|
|
108
|
+
- **`other — name a model` stays** as the escape hatch, and it now names a MODEL
|
|
109
|
+
only. The Agent tool has no per-call effort knob, so the old "effort" option
|
|
110
|
+
was a setting that did not exist.
|
|
111
|
+
|
|
112
|
+
**The gate can now recommend, and it still never chooses.**
|
|
113
|
+
|
|
114
|
+
A menu line may carry an arrow marked `suggested` WITH its reason from the dig —
|
|
115
|
+
8 or more callers, a visible risk class, or more than three files changing. It
|
|
116
|
+
is a recommendation printed beside the option, never a pre-selection, and every
|
|
117
|
+
menu still ends with `Your choice — nothing runs until you answer.`
|
|
118
|
+
|
|
119
|
+
**Both lanes cost less to load.**
|
|
120
|
+
|
|
121
|
+
- The two skill descriptions load into **every** session. `/orc-quick`'s went
|
|
122
|
+
619 to 326 characters and `/orc-mini`'s 493 to 294, with every trigger phrase
|
|
123
|
+
kept word for word and a test that holds them there. Across all 33 skills that
|
|
124
|
+
is 492 characters off what every session pays before it does anything.
|
|
125
|
+
- The anti-slop rules card in a `/orc-quick` slice is now a **compact** form:
|
|
126
|
+
about 1,460 tokens instead of about 3,469, on every dispatch and re-sent every
|
|
127
|
+
executor turn. Every HARD rule keeps its id, its title and its instruction and
|
|
128
|
+
loses only the worked examples, the pack file is named beside it, and the JSON
|
|
129
|
+
says `compact: true` — a reader that cannot tell a short card from a stripped
|
|
130
|
+
one cannot trust either.
|
|
131
|
+
- `/orc-quick`'s spine went 379 to 325 lines and gained a budget it never had;
|
|
132
|
+
`/orc-mini`'s went 268 to 280 against a pin raised 270 to 280 with its reason
|
|
133
|
+
written into the guard. What left both spines is stated once, in the file that
|
|
134
|
+
owns it.
|
|
135
|
+
|
|
136
|
+
**Smaller things.**
|
|
137
|
+
|
|
138
|
+
- `orc graph update --notes-pending` replaces two calls with one in both lanes.
|
|
139
|
+
- One `orc graph gain` line at the close of a code-writing request, copied word
|
|
140
|
+
for word: what the map put in (recorded) and an estimate, always a range, of
|
|
141
|
+
what it kept out.
|
|
142
|
+
- `/orc-mini` passes wiki **paths**, not page bodies, to its planner and its
|
|
143
|
+
executor — the orchestrator's own context is the surface that fills up first.
|
|
144
|
+
- `wiki_used: none` and `graph_used: none` are recorded rather than dropped. Two
|
|
145
|
+
runs in a row of `wiki_used: none` on fresh pages prints one line suggesting
|
|
146
|
+
you check those pages' TL;DRs.
|
|
147
|
+
- `/orc-quick`'s `gh` probe is lazy — it runs on the first PR request, not at
|
|
148
|
+
every preflight.
|
|
149
|
+
- Each `/orc-quick` trace packet is built from a running record with the time
|
|
150
|
+
each event actually happened, instead of one timestamp for the whole packet.
|
|
151
|
+
|
|
152
|
+
**What this release does NOT promise.** It does not lower your bill. ORC
|
|
153
|
+
measured that in v1.8.2 and the answer has not changed: search results are a
|
|
154
|
+
fraction of one percent of what a session adds to its context. The claim here is
|
|
155
|
+
correctness, traceability and fewer round trips — a bug proven fixed, a dig that
|
|
156
|
+
shows up in the trace, and the affected tests run before the suite.
|
|
157
|
+
|
|
158
|
+
**Limits, with the numbers.**
|
|
159
|
+
|
|
160
|
+
- **The live-session evaluation in `eval/` did not run for this release.** The
|
|
161
|
+
deterministic half is covered by the suite — the shipped trace hook is driven
|
|
162
|
+
with a real recon dispatch and asserted to emit `SPAWN` and the `PHASE-EDGE`,
|
|
163
|
+
the `repro` contract is asserted across all ten executor agents, and the
|
|
164
|
+
compact rules card is asserted to keep every HARD rule id. What is NOT
|
|
165
|
+
measured is the part that needs a person driving a lane: whether a defect run
|
|
166
|
+
shows red then green three times out of three, whether recon's recall on
|
|
167
|
+
URL-reached callers beats the graph-off run, and whether a request with no
|
|
168
|
+
filename finds its files in fewer reads than the v1.8.2 baseline. Those are
|
|
169
|
+
the gates in the plan, and they are unmet, not passed.
|
|
170
|
+
- **`/orc-quick` still cannot call `orc graph impact`.** It has no planner and
|
|
171
|
+
no declared-file set before the gate, so the two planning reads stay out of
|
|
172
|
+
its catalogue. Its recon agent calls them instead.
|
|
173
|
+
- The complexity thresholds (4 files · 8 callers · any risk · 3 co-commits) are
|
|
174
|
+
a starting point chosen with reasons, not measured ones. They are printed in
|
|
175
|
+
the `GATE complexity` trace line precisely so a retro can move them.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### v1.8.2 — the map that finds what a grep cannot _(2026-09-21)_
|
|
180
|
+
|
|
181
|
+
**Still on the unscoped `orc` package?** Do this once first - your `orc upgrade`
|
|
182
|
+
is the pre-v0.56.0 one and cannot install itself. Full detail in the CAUTION at
|
|
183
|
+
the top of this file.
|
|
184
|
+
|
|
185
|
+
- **Step 1 - release the command from the old package:** `npm uninstall -g orc`
|
|
186
|
+
- **Step 2 - install the current package:** `npm i -g @azure-id/orc`
|
|
187
|
+
- **Step 3 - re-apply it to your project:** `orc update`
|
|
188
|
+
|
|
189
|
+
**Do not use `npm i -g -f`.** Full detail in v0.56.0 below.
|
|
190
|
+
|
|
191
|
+
v1.8.0 shipped the code graph with a known hole. A card listed every caller that
|
|
192
|
+
NAMES a symbol, so a test that reaches a route by its URL was not a caller, and
|
|
193
|
+
the card was silent about it. On one real question the graph declared eleven
|
|
194
|
+
route-level tests absent. This release closes that hole and four more like it,
|
|
195
|
+
adds five languages, and makes the map answer faster than it could before.
|
|
196
|
+
|
|
197
|
+
**Nothing you have to do.** The index upgrades itself. Engine `graph@5` re-reads
|
|
198
|
+
every record the first time you run `orc graph update` after this release; a
|
|
199
|
+
Django-sized repository takes about 14 s once, and every update after that is
|
|
200
|
+
small again. The graph is still **off by default**: `orc config set code_graph on`.
|
|
201
|
+
|
|
202
|
+
**A URL is now an edge.**
|
|
203
|
+
|
|
204
|
+
- `request(app).get("/orders/search")`, `client.post("/api/orders/")` and
|
|
205
|
+
`httptest.NewRequest("GET", "/p")` reach the route they resolve to. The card
|
|
206
|
+
prints `← reached via GET /orders/search tests/orders.test.js:27 ROUTE`,
|
|
207
|
+
`orc graph impact` follows it, `orc graph changes` counts it, and the `tests`
|
|
208
|
+
line names the test file.
|
|
209
|
+
- A decorated handler keeps its own symbol and gains a `<METHOD> <path>` alias,
|
|
210
|
+
with the class or router prefix folded in — `@Controller("orders")` plus
|
|
211
|
+
`@Get(":id")` is `GET /orders/:id`. A mount from another file (`app.use`,
|
|
212
|
+
`include_router`, `register_blueprint`, Django `include`) is applied when the
|
|
213
|
+
card is read. `ctx "GET /orders/:id"` and `ctx OrdersController.find` both
|
|
214
|
+
answer.
|
|
215
|
+
- A URL whose prefix is built at run time (`BASE + "/p"`) matches by its tail.
|
|
216
|
+
Two routes that match one URL are `AMBIGUOUS`, with both listed. **The graph
|
|
217
|
+
still never guesses.** `ROUTE` is a new state word beside `LOCAL`, `IMPORT`
|
|
218
|
+
and `UNIQUE`.
|
|
219
|
+
|
|
220
|
+
**Four more ways the map used to lose a caller.**
|
|
221
|
+
|
|
222
|
+
- **An instance alias.** `const svc = new OrderService(); svc.run()` now links to
|
|
223
|
+
`OrderService.run`. An alias head is a class name, so `router.get` with
|
|
224
|
+
`router = Router()` is `UNRESOLVED (external)` — not a list of every `get` in
|
|
225
|
+
the repository.
|
|
226
|
+
- **An inherited member.** `this.ok()` in a subclass finds `Base.ok`, and
|
|
227
|
+
`super.m()` skips the class's own `m`. The edge carries the state the base
|
|
228
|
+
class resolved with, plus `inherited`.
|
|
229
|
+
- **A barrel re-export.** An import searches the file it names first, then the
|
|
230
|
+
files that file re-exports, three deep. A barrel that defines the name itself
|
|
231
|
+
wins over one that passes it on.
|
|
232
|
+
- **A guess we removed.** A bare call with no receiver (`get("/p")`) no longer
|
|
233
|
+
resolves to the only method in the repository with that name. In v1.8.1 every
|
|
234
|
+
supertest `.get(...)` was recorded as a caller of some class method. That was
|
|
235
|
+
an invented edge, and it is gone.
|
|
236
|
+
|
|
237
|
+
Measured on two real repositories, v1.8.1 to v1.8.2:
|
|
238
|
+
|
|
239
|
+
| | django/django | nestjs/nest |
|
|
240
|
+
|---|---|---|
|
|
241
|
+
| confident edges | 65,379 → **72,955** | 7,288 → **9,426** |
|
|
242
|
+
| `UNIQUE` guesses | 23,866 → **6,442** | 1,957 → **275** |
|
|
243
|
+
| `AMBIGUOUS` hints | — | 81,485 → **33,906** |
|
|
244
|
+
| routes found | **656** | **344** |
|
|
245
|
+
| first build | 12.5 → 13.7 s | 3.1 → 4.0 s |
|
|
246
|
+
|
|
247
|
+
**Five more languages.** Ruby, Rust, Kotlin, Vue and Svelte single file
|
|
248
|
+
components (the `<script>` block, at the file's own line numbers) and C / C++.
|
|
249
|
+
The measurement that matters is how much of a real repository the parser could
|
|
250
|
+
not finish: rubocop **2.4%**, tokio **0.3%**, ktor **1.4%**, primevue **0.5%**,
|
|
251
|
+
sveltejs/svelte **0%**, abseil-cpp **1.7%**, redis **4.5%**.
|
|
252
|
+
|
|
253
|
+
**Borrowed parsers, where your project already has the tool.** Python already
|
|
254
|
+
used the `ast` of a Python on PATH. TypeScript and JavaScript now use your own
|
|
255
|
+
`node_modules/typescript`, and Go uses the `go` on PATH. ORC still has zero
|
|
256
|
+
dependencies, the record names the rung that read it (`extractor:
|
|
257
|
+
typescript@5.9.3`), and a failure falls back file by file. `ORC_GRAPH_NO_BORROW=1`
|
|
258
|
+
forces the heuristic everywhere.
|
|
259
|
+
|
|
260
|
+
> **This one missed its gate and ships anyway, on the maintainer's call.** The
|
|
261
|
+
> gate was a 10-point rise in the share of calls resolved with confidence. It
|
|
262
|
+
> measured **+1.0** on nestjs/nest, **−0.3** on vuejs/core and **−0.3** on hugo.
|
|
263
|
+
> The gate measured the wrong thing: that share is held down by calls into
|
|
264
|
+
> packages outside the repository, which no parser can resolve. What did move is
|
|
265
|
+
> INVENTED edges — `UNIQUE` guesses fell 36–40% and `IMPORT` facts rose. The
|
|
266
|
+
> borrow is more correct, not more complete. It costs +0.24 s (TypeScript) and
|
|
267
|
+
> +0.70 s (Go) on a one-file update. There is no new config key, on purpose.
|
|
268
|
+
|
|
269
|
+
**Fewer round trips.**
|
|
270
|
+
|
|
271
|
+
- **`orc graph ctx … --source [N]`** appends the target's own lines to the card
|
|
272
|
+
(80 by default, 200 at most), charged to the same budget. The card and the
|
|
273
|
+
range arrive in one call.
|
|
274
|
+
- **`orc graph ctx --for-slice <files…>`** prints only the OUTSIDE view of each
|
|
275
|
+
declared file: who calls into it and from which line, who imports it without
|
|
276
|
+
calling, which routes it answers, which tests cover it. No symbol table. An
|
|
277
|
+
executor reads its own files in full anyway, so a file card repeated what it
|
|
278
|
+
was about to read — on every later turn of that agent. The outside view is
|
|
279
|
+
30–51% smaller than the card it replaces.
|
|
280
|
+
- **`orc graph update --notes-pending`** answers the update and the notes batch
|
|
281
|
+
in one process and one lock.
|
|
282
|
+
- **A card prints one-letter states with a legend only when that is smaller**
|
|
283
|
+
than the words. A three-row card keeps the words. Always-short made small
|
|
284
|
+
cards bigger, which is the opposite of the point.
|
|
285
|
+
- **A card that hid nothing prints no footer.**
|
|
286
|
+
|
|
287
|
+
**The hook learned two more moments.** A shell search (`grep`, `rg`, `git grep`,
|
|
288
|
+
`findstr`, `Select-String`, `ag`, `ack`) is the same question as a Grep, and now
|
|
289
|
+
gets the same answer. And with `orc config set code_graph_hooks on,read`, a
|
|
290
|
+
whole-file read of a file with many symbols gets one line naming its six most
|
|
291
|
+
reached symbols and their ranges, so the NEXT read can ask for a range. **The
|
|
292
|
+
read always runs.** The hook never blocks a tool call and never rewrites one.
|
|
293
|
+
|
|
294
|
+
**Doc notes — the author's own sentence, for free.** The parser now takes the
|
|
295
|
+
first sentence of a docstring, a JSDoc block, a `///` run or a `#` block and
|
|
296
|
+
prints it on the card as `doc <sentence> (parser · current)`. It costs no model
|
|
297
|
+
tokens, and it is re-extracted with the body, so it cannot go stale on its own.
|
|
298
|
+
A comment can still lie, so a CURRENT model note outranks it: the order is
|
|
299
|
+
current note → doc → stale note.
|
|
300
|
+
|
|
301
|
+
> **We expected this to cover most of a repository. It does not.** The plan said
|
|
302
|
+
> more than 60% of symbols would carry a doc. Measured: **19.9%** on django
|
|
303
|
+
> (30.6% of non-test source), **7.1%** on nest (9.0%). The extractor is right —
|
|
304
|
+
> the comments are simply not there. The number in this file is the measured
|
|
305
|
+
> one.
|
|
306
|
+
|
|
307
|
+
**`orc graph gain` — what the map put in, and an estimate of what it kept out.**
|
|
308
|
+
Every read appends one line to a local ledger. The command adds them up and
|
|
309
|
+
keeps three kinds of knowing apart, because merging them produces a number
|
|
310
|
+
nobody can check:
|
|
311
|
+
|
|
312
|
+
- **paid** — the tokens the graph put into a context. Recorded, exact.
|
|
313
|
+
- **avoided** — what searching would have cost for the same question. **An
|
|
314
|
+
estimate**, always a range, never one number.
|
|
315
|
+
- **measured** — `--measured` reads your own runs with the graph on against your
|
|
316
|
+
runs with it off, and prints nothing until there are three of each.
|
|
317
|
+
|
|
318
|
+
It never prints a percent of a session, it never blocks a read, and `orc stats`
|
|
319
|
+
reports `graph: null` when there is no ledger — never a confident zero.
|
|
320
|
+
|
|
321
|
+
**`orc graph map` — the question you ask before you know a file name.** It ranks
|
|
322
|
+
every indexed file by how much of the repository's own call and import traffic
|
|
323
|
+
flows through it, and prints the top files with their most important symbols and
|
|
324
|
+
line ranges, inside a token budget. `--focus src/orders/service.js,createOrder`
|
|
325
|
+
re-ranks the whole repository around those files or names; it never filters it.
|
|
326
|
+
A test file ranks lower (by ten), a file whose every symbol is private ranks
|
|
327
|
+
lower (by half), and an edge is weighted by the square root of its call count, so
|
|
328
|
+
one import used in a loop does not outrank ten separate callers. **Rank is a hint
|
|
329
|
+
about where to look first, never proof that a file matters to this change** — the
|
|
330
|
+
card says so itself.
|
|
331
|
+
|
|
332
|
+
> **`map` is wired to PLANNING only, and that was a measurement, not a
|
|
333
|
+
> preference.** The gate was three answerable planning calls per run. Replaying
|
|
334
|
+
> real transcripts measured **0.39** (16 sweeps over 41 main windows), so the
|
|
335
|
+
> plan's own fallback applied and the analyst and `/orc-quick` wiring was
|
|
336
|
+
> removed again. The honest caveat: those transcripts drive lanes over a
|
|
337
|
+
> fourteen-file toy app, where a planner has nothing to sweep. It will be
|
|
338
|
+
> re-measured on a real repository.
|
|
339
|
+
|
|
340
|
+
**A one-symbol card is about twice as fast.** Working out who calls a symbol used
|
|
341
|
+
to mean parsing the whole index. The resolution cache is now also written as
|
|
342
|
+
shards, one file per name prefix, and a one-symbol `ctx` reads only the shards it
|
|
343
|
+
needs. On django: **881 → 480 ms** for the whole command, **361 → 50 ms** for the
|
|
344
|
+
work inside the process. The floor is Node's own start-up, about 300 ms on the
|
|
345
|
+
test machine.
|
|
346
|
+
|
|
347
|
+
The shards answer exactly what the full index answers, **or they decline**. 577
|
|
348
|
+
cards on django and nest were compared with and without them: **0 different.**
|
|
349
|
+
The fast path steps aside for a path, a URL, a `file:line`, a name that is not
|
|
350
|
+
exactly one symbol, `--for-slice`, a file card and any multi-target call, and
|
|
351
|
+
every answer says which path produced it. The cost is disk: django's shards are
|
|
352
|
+
**30 MB**, taking `.claude/orc/graph` from about 87 MB to about 117 MB. The
|
|
353
|
+
update pays nothing measurable.
|
|
354
|
+
|
|
355
|
+
**Also in this release**
|
|
356
|
+
|
|
357
|
+
- **`code_graph_ignore`** — extra paths the graph never indexes, as a
|
|
358
|
+
comma-separated list of globs (`vendor/**,*.gen.ts`). The engine already
|
|
359
|
+
skipped `node_modules`, root `dist/` and `build/`, caches, bundles, `.d.ts`
|
|
360
|
+
and generated files; this adds to that list. A skipped file is reported
|
|
361
|
+
`excluded` by `orc graph coverage`, never in silence.
|
|
362
|
+
- `code_graph_hooks` gains the value `on,read` (see the hook above). `on` and
|
|
363
|
+
`off` behave as before.
|
|
364
|
+
- `orc graph gain` also appears on the `orc ui` Knowledge panel and in one ship
|
|
365
|
+
line, marked an estimate in both places.
|
|
366
|
+
|
|
367
|
+
**Limits we know about**
|
|
368
|
+
|
|
369
|
+
- **Fixed since v1.8.1, with its new limit stated:** a caller that reaches a
|
|
370
|
+
symbol through a URL is now an edge. A caller that reaches it through a job
|
|
371
|
+
runner, a string dispatch, reflection, or a URL assembled at run time from
|
|
372
|
+
parts the parser cannot see is still not an edge and never will be. The file
|
|
373
|
+
still reads as fully parsed, and the card is still silent. **A card's silence
|
|
374
|
+
is not proof of absence.**
|
|
375
|
+
- TypeScript and Go are exact only where the project has the tool. Everything
|
|
376
|
+
else is a heuristic, which is why a card can say `coverage partial`.
|
|
377
|
+
- Java, PHP, Swift, Scala and Dart have no borrowed parser. Ruby's own parser
|
|
378
|
+
(`Prism`) was gated on the heuristic missing more than 5% of a real
|
|
379
|
+
repository. It missed 2.4%, so it was not built.
|
|
380
|
+
- The status line component compares HEAD with the index. Only
|
|
381
|
+
`orc graph status` sees uncommitted edits.
|
|
382
|
+
- The graph hook's delivery on `SubagentStart` is confirmed in a live session.
|
|
383
|
+
The other delivery events are still unconfirmed, and the hook stays silent and
|
|
384
|
+
free if they never are.
|
|
385
|
+
- **It is still NOT a token optimisation, and that is still measured, not
|
|
386
|
+
guessed.** `Grep` and `Glob` results are 0.06% of what a session adds to its
|
|
387
|
+
context, and a perfect locator would save 0.1% of a run. Turn the map on for
|
|
388
|
+
the cards: what calls what, what a change would touch, where the parser could
|
|
389
|
+
not finish. `orc graph gain` reports an estimate and says the word "estimate"
|
|
390
|
+
every time.
|
|
391
|
+
|
|
392
|
+
**How to check it.** `orc config set code_graph on`, then `orc graph update`,
|
|
393
|
+
then `orc graph map` to see the repository ranked, and
|
|
394
|
+
`orc graph ctx <a route or a function>` to see a card. Run `orc update` in your
|
|
395
|
+
project to get the lane changes.
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
13
399
|
### v1.8.1 — the guard that only failed on Windows _(2026-09-16)_
|
|
14
400
|
|
|
15
401
|
**Still on the unscoped `orc` package?** Do this once first - your `orc upgrade`
|