@azure-id/orc 1.7.1 → 1.8.2

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 (63) hide show
  1. package/CHANGELOG.md +3869 -3381
  2. package/README-id.md +942 -844
  3. package/README.md +882 -788
  4. package/bin/build-agents.js +43 -27
  5. package/bin/cli.js +45460 -44169
  6. package/bin/graph-extract.js +3216 -0
  7. package/bin/graph-gain.js +404 -0
  8. package/bin/graph-map.js +232 -0
  9. package/bin/graph-notes.js +229 -0
  10. package/bin/graph-query.js +1770 -0
  11. package/bin/graph-resolve.js +255 -0
  12. package/bin/graph-shard.js +325 -0
  13. package/bin/graph-signals.js +277 -0
  14. package/bin/graph.js +658 -0
  15. package/bin/verify-contracts.js +4809 -4553
  16. package/bin/verify-package.js +640 -616
  17. package/bin/webui/api.js +1425 -1414
  18. package/bin/webui/fixtures/index.js +584 -576
  19. package/bin/webui/fixtures/knowledge.js +356 -291
  20. package/bin/webui/fixtures/stats.js +107 -104
  21. package/bin/webui/i18n/en/knowledge.json +182 -151
  22. package/bin/webui/i18n/en/overview.json +101 -100
  23. package/bin/webui/i18n/id/knowledge.json +182 -151
  24. package/bin/webui/i18n/id/overview.json +101 -100
  25. package/bin/webui/js/panels/knowledge.js +1130 -1006
  26. package/bin/webui/js/panels/overview.js +492 -488
  27. package/package.json +39 -39
  28. package/templates/agents/MODEL-MAPPING.md +163 -158
  29. package/templates/agents/orc-executor-haiku-4-5.md +128 -121
  30. package/templates/agents/orc-executor-opus-4-7-high.md +129 -122
  31. package/templates/agents/orc-executor-opus-4-7-med.md +129 -122
  32. package/templates/agents/orc-executor-opus-4-8-high.md +129 -122
  33. package/templates/agents/orc-executor-opus-5-high.md +129 -122
  34. package/templates/agents/orc-executor-opus-5-low.md +129 -122
  35. package/templates/agents/orc-executor-opus-5-med.md +129 -122
  36. package/templates/agents/orc-executor-sonnet-4-6-high.md +129 -122
  37. package/templates/agents/orc-executor-sonnet-4-6-med.md +129 -122
  38. package/templates/agents/orc-executor-sonnet-5-high.md +129 -122
  39. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +89 -0
  40. package/templates/hooks/README.md +454 -396
  41. package/templates/hooks/orc-graph-hook.js +471 -0
  42. package/templates/hooks/orc-statusline-render.js +922 -921
  43. package/templates/hooks/orc-statusline.js +1596 -1545
  44. package/templates/skills/_shared/README.md +4 -0
  45. package/templates/skills/_shared/code-graph.md +348 -0
  46. package/templates/skills/_shared/opus5-only.md +4 -0
  47. package/templates/skills/_shared/phases/execution.md +168 -147
  48. package/templates/skills/_shared/phases/planning.md +149 -135
  49. package/templates/skills/_shared/phases/preflight.md +132 -118
  50. package/templates/skills/_shared/phases/review.md +63 -53
  51. package/templates/skills/_shared/phases/ship.md +100 -88
  52. package/templates/skills/_shared/phases/trace.md +8 -0
  53. package/templates/skills/_shared/phases/wiki-consult.md +194 -189
  54. package/templates/skills/_shared/read-ladder.md +132 -102
  55. package/templates/skills/_shared/return-validation.md +259 -250
  56. package/templates/skills/orc/SKILL.md +255 -254
  57. package/templates/skills/orc-analyze/SKILL.md +13 -13
  58. package/templates/skills/orc-diy/references/flow-schema.md +101 -100
  59. package/templates/skills/orc-fast/SKILL.md +236 -229
  60. package/templates/skills/orc-mini/SKILL.md +267 -259
  61. package/templates/skills/orc-quick/SKILL.md +378 -361
  62. package/templates/skills/orc-quick/references/dispatch-gate.md +6 -0
  63. package/templates/skills/orc-wiki/references/staleness.md +294 -288
@@ -1,291 +1,356 @@
1
- "use strict";
2
- /* fixtures/knowledge.js — canned data for `orc ui --fixtures`.
3
- Wiki status, plan, debt, usage, impact, patterns and gotchas — carrying a
4
- STALE tier, a STRUCTURAL blind spot and a `used 0/20` row on purpose.
5
-
6
- THE RULE FOR EVERY FILE IN HERE: carry ONE OF EVERY STATE, including the
7
- ugly ones. You cannot DESIGN a STALE chip on a fresh wiki, and a state
8
- with no fixture is a state nobody has ever looked at. A per-state count
9
- test asserts this, so a new state cannot ship without one.
10
-
11
- Shapes MUST match what `bin/cli.js --json` really emits — a drifted
12
- fixture is worse than no fixture. */
13
-
14
- const { PROJECT } = require("./shell.js");
15
-
16
- const wiki = {
17
- state: "registered",
18
- docs: 14,
19
- tier: "STALE",
20
- distance: 47,
21
- anchor: "9f2c41ab8de0",
22
- last_scan: "2026-05-02",
23
- reasons: ["worst doc orc-feature-billing.md is 47 commits behind on its own covered files"],
24
- blind: 2,
25
- edges: { freshMax: 10, agingMax: 30 },
26
- crosslink_tags: 6,
27
- // v0.49.1 — `--json is not a summary`. Everything below was ALREADY printed by
28
- // the terminal branch and thrown away by `--json`, which is why the panel
29
- // could not be as detailed as the terminal no matter how it was written.
30
- counts: { FRESH: 6, AGING: 5, STALE: 2, unknown: 1 },
31
- // The doc actually pinning the tier, BY NAME. A hash is not a thing anybody
32
- // can go and refresh.
33
- worst: { file: "wiki/orc-feature-billing.md", distance: 47, anchor: "9f2c41ab8de0" },
34
- per_doc: [
35
- { file: "wiki/orc-orientation.md", title: "Orientation", tier: "FRESH", distance: 2, anchor: "aa11bb22", scanned_commit: "aa11bb22", doc_type: "reference", covers: ["README.md"], covered_files: 1, crosslink_tags: 0, used: 20, used_of: 20, last_used: "2026-08-10", retire_hint: false },
36
- { file: "wiki/orc-feature-billing.md", title: "Billing", tier: "STALE", distance: 47, anchor: "9f2c41ab", scanned_commit: "9f2c41ab", doc_type: "feature", covers: ["src/billing/"], covered_files: 23, crosslink_tags: 4, used: 12, used_of: 20, last_used: "2026-08-09", retire_hint: false },
37
- { file: "wiki/orc-feature-auth.md", title: "Auth", tier: "AGING", distance: 22, anchor: "3c4d5e6f", scanned_commit: "3c4d5e6f", doc_type: "feature", covers: ["src/auth/"], covered_files: 11, crosslink_tags: 2, used: 6, used_of: 20, last_used: "2026-08-01", retire_hint: false },
38
- // Zero-use KEEPS ITS SLOT with a retire hint, and it is never retired for
39
- // you. `used: null` on the next row is NOT zero-use — unknown must never be
40
- // reported as dead.
41
- { file: "wiki/orc-feature-admin-export.md", title: "Admin export", tier: "AGING", distance: 18, anchor: "7a8b9c0d", scanned_commit: "7a8b9c0d", doc_type: "feature", covers: ["src/admin/"], covered_files: 4, crosslink_tags: 0, used: 0, used_of: 20, last_used: null, retire_hint: true },
42
- { file: "wiki/orc-reference-http.md", title: "HTTP surface", tier: "unknown", distance: null, anchor: null, scanned_commit: null, doc_type: "reference", covers: [], covered_files: 0, crosslink_tags: 0, used: null, used_of: null, last_used: null, retire_hint: false },
43
- ],
44
- // THE FILES, not the number `2`. A count tells a user nothing they can act on.
45
- blind_spot: ["src/notifications/dispatcher.ts", "src/notifications/templates.ts"],
46
- orientation: { present: true, file: "wiki/orc-orientation.md", scanned_commit: "aa11bb22" },
47
- crosslink: { provided: 6, boundary_rows: 9, state: "PUBLISHED" },
48
- free_repairs: [
49
- { id: "crosslink", cost: "free", cmd: "/orc-wiki crosslink", what: "publish boundary tags from already-anchored doc rows" },
50
- ],
51
- };
52
-
53
- /* `orc wiki docs --json`. The order is the CLI's — THE PANEL NEVER INVENTS A
54
- RANK. Every ugly state is here on purpose: a STALE doc, an unmeasurable one,
55
- a zero-use retire candidate, and a doc with no crosslink tags. */
56
- const wikiDocs = {
57
- ok: true,
58
- state: "registered",
59
- tier: "STALE",
60
- edges: { freshMax: 10, agingMax: 30 },
61
- docs: wiki.per_doc,
62
- counts: wiki.counts,
63
- worst: wiki.worst,
64
- free_repairs: wiki.free_repairs,
65
- };
66
-
67
- /* One doc, with and without its body. `--body` is opt-in: prose is returned only
68
- on an explicit request, exactly one artifact at a time. */
69
- const wikiShow = {
70
- ok: true,
71
- doc: "wiki/orc-feature-billing.md",
72
- path: PROJECT + "/wiki/orc-feature-billing.md",
73
- ...wiki.per_doc[1],
74
- tags: [
75
- { tag: "http:POST /v1/invoices", kind: "http", anchor: "src/billing/invoice.ts:88" },
76
- { tag: "events:invoice.settled", kind: "events", anchor: "src/billing/emit.ts:14" },
77
- ],
78
- free_repairs: [],
79
- body: "---\nwiki_schema: 2\ndoc_type: feature\n---\n\n# Billing\n\n## TL;DR\n\n- Invoices are created, taxed, then settled by the worker.\n\n## Contracts & shapes\n\n| Surface | Shape |\n|---|---|\n| `POST /v1/invoices` | `{ merchant_id, lines[] }` |\n",
80
- };
81
-
82
- /* `orc wiki coverage --json`. A REPORT and never a gate: no threshold, no config
83
- key, nothing branches on it. The uncovered set is collapsed to DIRECTORIES and
84
- ranked by file count, because "240 files, all in vendor/" and "12 files, all
85
- in src/payments/" are opposite situations. */
86
- const wikiCoverage = {
87
- ok: true,
88
- tracked: 412,
89
- covered: 251,
90
- uncovered: 161,
91
- coverage_pct: 61,
92
- docs: 14,
93
- uncovered_dirs: [
94
- { dir: "vendor/stripe-sdk", files: 118, newest_commit: "a1b2c3d 2026-02-11", sample: ["vendor/stripe-sdk/index.js"] },
95
- { dir: "src/notifications", files: 22, newest_commit: "9f2c41a 2026-08-08", sample: ["src/notifications/dispatcher.ts", "src/notifications/templates.ts"] },
96
- { dir: "scripts", files: 13, newest_commit: "77aa11b 2026-06-30", sample: ["scripts/seed.js"] },
97
- { dir: "src/admin/legacy", files: 8, newest_commit: "0c0c0c0 2025-11-04", sample: ["src/admin/legacy/report.ts"] },
98
- ],
99
- honesty: "coverage is a report, not a target — there is no threshold and nothing branches on it",
100
- };
101
-
102
- /* A FULLY-COVERED repo, so 100% is designable too — and a wiki that is not
103
- registered at all, which is the state `orc doctor` now warns about. */
104
- const wikiCoverageFull = { ...wikiCoverage, covered: 412, uncovered: 0, coverage_pct: 100, uncovered_dirs: [] };
105
- const wikiUnregistered = { state: "unregistered", docs: 9, tier: null, distance: null, anchor: null, last_scan: null, reasons: [], blind: 0, edges: { freshMax: 10, agingMax: 30 } };
106
-
107
- /* `orc pattern show --json`. TWO of them: one with a real header, and one with
108
- NO header at all — which says so in one line and NEVER derives a date from the
109
- file's mtime. */
110
- const patternShow = {
111
- react: {
112
- ok: true,
113
- lang: "react",
114
- path: PROJECT + "/.claude/orc/patterns/react-pattern.md",
115
- headered: true,
116
- codified_at: "09-08-2026",
117
- source_commit: "9f2c41ab8de0",
118
- playbook: "react",
119
- headings: ["Component shape", "State", "Data fetching", "Testing", "CONVENTIONS the project already keeps", "INVARIANTS that are kept regardless"],
120
- conventions: 14,
121
- invariants: 6,
122
- conflicts: [
123
- "CONFLICT — the project puts hooks in the component file; the playbook wants them in hooks/. Project wins.",
124
- "CONFLICT — the project disables the exhaustive-deps lint rule; the invariant keeps it, because a stale closure is a correctness bug.",
125
- ],
126
- bytes: 9140,
127
- lines: 212,
128
- mtime_ms: Date.now() - 2 * 24 * 60 * 60 * 1000,
129
- body: "# React — project pattern\n\n## Component shape\n\nFunction components, named export, props typed inline.\n",
130
- },
131
- express: {
132
- ok: true,
133
- lang: "express",
134
- path: PROJECT + "/.claude/orc/patterns/express-pattern.md",
135
- headered: false,
136
- codified_at: null,
137
- source_commit: null,
138
- playbook: null,
139
- headings: ["Routing", "Error handling", "Testing"],
140
- conventions: 8,
141
- invariants: 4,
142
- conflicts: [],
143
- bytes: 4210,
144
- lines: 96,
145
- mtime_ms: Date.now() - 61 * 24 * 60 * 60 * 1000,
146
- header_note: "this pattern file carries no parseable header — reported as it is on disk; a codified-at date is never derived from the file's mtime",
147
- body: "# Express — project pattern\n\n## Routing\n\nOne router per resource.\n",
148
- },
149
- };
150
-
151
- /* The archive, and the prune PREVIEW. A COUNT IS NOT CONSENT, so the preview
152
- NAMES every entry it would move. */
153
- const gotchasArchived = {
154
- ok: true,
155
- file: PROJECT + "/.claude/orc/gotchas-archive.md",
156
- archived: true,
157
- count: 2,
158
- gotchas: [
159
- { id: "G-000", area: "build", kind: "repair", hits: 1, last_seen: "02-01-2026", trigger: "the old webpack config needed a polyfill for crypto", fields: {} },
160
- { id: "G-004", area: "react", kind: "drift", hits: 0, last_seen: "11-03-2026", trigger: "class components had to be wrapped for the router", fields: {} },
161
- ],
162
- };
163
-
164
- const gotchaPrunePreview = {
165
- ok: true,
166
- dry_run: true,
167
- file: PROJECT + "/.claude/orc/gotchas.md",
168
- count: 3,
169
- gotchas_max: 2,
170
- would_archive: [
171
- { id: "G-003", area: "build", kind: "verify", hits: 0, last_seen: "14-06-2026", trigger: "`npm run build` needs NODE_OPTIONS=--max-old-space-size=4096 on CI", why: "rank 1 of the low-value tail — 0 hit(s), last seen 14-06-2026" },
172
- ],
173
- archive: PROJECT + "/.claude/orc/gotchas-archive.md",
174
- honesty: "eviction is an ARCHIVE, never a delete — a gotcha that stopped being true is yours to remove",
175
- };
176
-
177
- const wikiPlan = {
178
- ok: true,
179
- registered: 14,
180
- pending: 4,
181
- deep: 2,
182
- light: 2,
183
- usage_window: 20,
184
- usage_runs_scanned: 20,
185
- estimate: { tokens: { input: 21000, cache_write: 96000, cache_read: 168000, output: 50000 }, usd: 0.94, weighted: 133800 },
186
- estimate_unavailable: null,
187
- freshness: { tier: "FRESH", distance: 6, edges: { freshMax: 10, agingMax: 30 } },
188
- scan_tier_mode: "ladder",
189
- free_repairs: [
190
- { id: "orientation", cost: "free", cmd: "/orc-wiki refresh wiki/orc-orientation.md", what: "regenerate the derived orientation doc (read first by every consumer)" },
191
- ],
192
- rows: [
193
- { doc: "wiki/orc-feature-refunds.md", state: "STRUCTURAL", delta: 0, delta_files: [], gone: ["api/refunds/window.ts"], used: 17, used_of: 20, last_used: "2026-08-10", tier: "deep", agent: "orc-wiki-scanner-opus-4-8-high", tier_rule: "structural", tier_why: "STRUCTURAL — a covered file is gone; a targeted refresh cannot re-anchor blind", new_surface: false, estimate: { p50: { input: 8000, cache_write: 40000, cache_read: 69000, output: 21000 }, p90: { input: 11000, cache_write: 58000, cache_read: 99000, output: 30000 }, samples: 7 }, usd: 0.42, retire_hint: false },
194
- { doc: "wiki/orc-feature-payments.md", state: "TOUCHED", delta: 6, delta_files: ["src/payments/ledger.ts", "src/payments/idempotency.ts"], gone: [], used: 14, used_of: 20, last_used: "2026-08-09", tier: "deep", agent: "orc-wiki-scanner-opus-4-8-high", tier_rule: "wide-delta", tier_why: "covered files touched >= wiki_tier_deep_files", new_surface: false, estimate: { p50: { input: 7000, cache_write: 36000, cache_read: 62000, output: 19000 }, p90: { input: 10000, cache_write: 51000, cache_read: 88000, output: 27000 }, samples: 7 }, usd: 0.38, retire_hint: false },
195
- { doc: "wiki/orc-reference-config.md", state: "TOUCHED", delta: 1, delta_files: ["src/config/index.ts"], gone: [], used: 2, used_of: 20, last_used: "2026-07-25", tier: "light", agent: "orc-wiki-scanner-sonnet-5-high", tier_rule: "small-delta", tier_why: "small delta, no new surface", new_surface: false, estimate: { p50: { input: 3000, cache_write: 11000, cache_read: 17000, output: 4000 }, p90: { input: 4000, cache_write: 16000, cache_read: 25000, output: 6000 }, samples: 4 }, usd: 0.06, retire_hint: false },
196
- // The zero-use retire candidate. It KEEPS ITS SLOT and renders muted with a
197
- // hint — filtering it out would make "unused" and "does not exist" identical.
198
- { doc: "wiki/orc-feature-admin-export.md", state: "TOUCHED", delta: 3, delta_files: ["src/admin/export.ts"], gone: [], used: 0, used_of: 20, last_used: null, tier: "light", agent: "orc-wiki-scanner-sonnet-5-high", tier_rule: "small-delta", tier_why: "small delta, no new surface", new_surface: false, estimate: { p50: { input: 3000, cache_write: 9000, cache_read: 20000, output: 6000 }, p90: { input: 4000, cache_write: 13000, cache_read: 29000, output: 9000 }, samples: 4 }, usd: 0.08, retire_hint: true },
199
- ],
200
- };
201
-
202
- const wikiDebt = {
203
- ok: true,
204
- project: "shopcart",
205
- pending: 4,
206
- deep: 2,
207
- tokens: { input: 21000, cache_write: 96000, cache_read: 168000, output: 50000 },
208
- usd: 0.94,
209
- oldest_commits_behind: 11,
210
- tier: "FRESH",
211
- edges: { freshMax: 10, agingMax: 30 },
212
- docs: [
213
- { doc: "wiki/orc-feature-refunds.md", state: "STRUCTURAL", tier: "deep", used: 17 },
214
- { doc: "wiki/orc-feature-payments.md", state: "TOUCHED", tier: "deep", used: 14 },
215
- { doc: "wiki/orc-reference-config.md", state: "TOUCHED", tier: "light", used: 2 },
216
- { doc: "wiki/orc-feature-admin-export.md", state: "TOUCHED", tier: "light", used: 0 },
217
- ],
218
- };
219
-
220
- const wikiUsage = {
221
- ok: true,
222
- file: PROJECT + "/.claude/orc/wiki-usage.json",
223
- window_runs: 20,
224
- runs_scanned: 20,
225
- rebuilt_at: "10-08-2026 09:41:02",
226
- registered: 14,
227
- in_active_use: 8,
228
- never_used: 2,
229
- rows: [
230
- { doc: "wiki/orc-orientation.md", used: 20, of: 20, last_used: "2026-08-10" },
231
- { doc: "wiki/orc-feature-refunds.md", used: 17, of: 20, last_used: "2026-08-10" },
232
- { doc: "wiki/orc-feature-payments.md", used: 14, of: 20, last_used: "2026-08-09" },
233
- { doc: "wiki/orc-reference-http.md", used: 9, of: 20, last_used: "2026-08-06" },
234
- { doc: "wiki/orc-reference-config.md", used: 2, of: 20, last_used: "2026-07-25" },
235
- { doc: "wiki/orc-feature-admin-export.md", used: 0, of: 20, last_used: null },
236
- { doc: "wiki/orc-reference-legacy-cron.md", used: 0, of: 20, last_used: null },
237
- ],
238
- };
239
-
240
- const patterns = {
241
- lang: null,
242
- cached: true,
243
- unknown_language: false,
244
- patterns_dir: PROJECT + "/.claude/orc/patterns",
245
- patterns: [
246
- { lang: "react", path: PROJECT + "/.claude/orc/patterns/react-pattern.md", mtime_ms: Date.now() - 2 * 24 * 60 * 60 * 1000 },
247
- { lang: "express", path: PROJECT + "/.claude/orc/patterns/express-pattern.md", mtime_ms: Date.now() - 61 * 24 * 60 * 60 * 1000 },
248
- ],
249
- known_languages: ["react", "vue", "express", "nestjs", "django", "rails", "spring", "dotnet"],
250
- };
251
-
252
- const gotchas = {
253
- file: PROJECT + "/.claude/orc/gotchas.md",
254
- count: 3,
255
- // v0.49.1: the cap is what makes the count mean anything, and only `prune`
256
- // used to print it — so "11 of 40" was not renderable from this payload.
257
- gotchas_max: 40,
258
- archive: PROJECT + "/.claude/orc/gotchas-archive.md",
259
- // `fields` was ALWAYS emitted and the panel rendered six columns and threw the
260
- // rest away. Symptom, fix and why are the half a person actually needs.
261
- gotchas: [
262
- { id: "G-001", area: "express", kind: "repair", hits: 7, last_seen: "05-08-2026", trigger: "Jest suite hangs unless the server handle is closed in afterAll", fields: { trigger: "Jest suite hangs unless the server handle is closed in afterAll", symptom: "`npm test` never exits; CI times out at 10 minutes", fix: "close the http server in afterAll and await it", why: "supertest keeps the listener open, and Jest waits for the handle", first_seen: "14-05-2026", hits: "7", last_seen: "05-08-2026" } },
263
- { id: "G-002", area: "react", kind: "review", hits: 2, last_seen: "22-07-2026", trigger: "Date pickers must use the tz-aware helper, never new Date(string)", fields: { trigger: "Date pickers must use the tz-aware helper, never new Date(string)", symptom: "bookings land one day early for users west of UTC", fix: "use parseInZone from src/time/zone.ts", why: "new Date(string) parses as UTC and then renders local", first_seen: "02-06-2026", hits: "2", last_seen: "22-07-2026" } },
264
- { id: "G-003", area: "build", kind: "verify", hits: 0, last_seen: "14-06-2026", trigger: "`npm run build` needs NODE_OPTIONS=--max-old-space-size=4096 on CI", fields: { trigger: "`npm run build` needs NODE_OPTIONS=--max-old-space-size=4096 on CI", symptom: "the CI build is OOM-killed with no error line", fix: "set NODE_OPTIONS in the workflow, not in package.json", why: "the runner has less memory than a dev laptop", first_seen: "14-06-2026", hits: "0", last_seen: "14-06-2026" } },
265
- ],
266
- };
267
-
268
- // STALE, so the Flow panel's gated state is designable.
269
-
270
- const wikiImpact = {
271
- ok: true,
272
- scan_commit: "9f2c41ab8de0aa17",
273
- changed_files: 61,
274
- docs: [
275
- { file: "wiki/orc-feature-billing.md", state: "TOUCHED", hits: ["src/billing/invoice.ts", "src/billing/tax.ts"], gone: [] },
276
- { file: "wiki/orc-feature-auth.md", state: "STRUCTURAL", hits: [], gone: ["src/auth/legacy-session.ts"] },
277
- { file: "wiki/orc-reference-http.md", state: "CLEAN", hits: [], gone: [] },
278
- { file: "wiki/orc-architecture-overview.md", state: "CLEAN", hits: [], gone: [] },
279
- ],
280
- blind_spot: ["src/notifications/dispatcher.ts", "src/notifications/templates.ts"],
281
- registered: 14,
282
- touched: 1,
283
- structural: 1,
284
- affected_pct: 14,
285
- threshold: 30,
286
- freshness: { tier: "STALE", distance: 47, aging_max: 30 },
287
- recommendation: "FULL",
288
- reasons: ["STRUCTURAL change (gone anchors / blind spot)", "worst doc 47 commits behind on its own covered files > wiki_aging_max 30"],
289
- };
290
-
291
- module.exports = { wiki, wikiDocs, wikiShow, wikiCoverage, wikiCoverageFull, wikiUnregistered, wikiPlan, wikiDebt, wikiUsage, patterns, patternShow, gotchas, gotchasArchived, gotchaPrunePreview, wikiImpact };
1
+ "use strict";
2
+ /* fixtures/knowledge.js — canned data for `orc ui --fixtures`.
3
+ Wiki status, plan, debt, usage, impact, patterns and gotchas — carrying a
4
+ STALE tier, a STRUCTURAL blind spot and a `used 0/20` row on purpose.
5
+
6
+ THE RULE FOR EVERY FILE IN HERE: carry ONE OF EVERY STATE, including the
7
+ ugly ones. You cannot DESIGN a STALE chip on a fresh wiki, and a state
8
+ with no fixture is a state nobody has ever looked at. A per-state count
9
+ test asserts this, so a new state cannot ship without one.
10
+
11
+ Shapes MUST match what `bin/cli.js --json` really emits — a drifted
12
+ fixture is worse than no fixture. */
13
+
14
+ const { PROJECT } = require("./shell.js");
15
+
16
+ const wiki = {
17
+ state: "registered",
18
+ docs: 14,
19
+ tier: "STALE",
20
+ distance: 47,
21
+ anchor: "9f2c41ab8de0",
22
+ last_scan: "2026-05-02",
23
+ reasons: ["worst doc orc-feature-billing.md is 47 commits behind on its own covered files"],
24
+ blind: 2,
25
+ edges: { freshMax: 10, agingMax: 30 },
26
+ crosslink_tags: 6,
27
+ // v0.49.1 — `--json is not a summary`. Everything below was ALREADY printed by
28
+ // the terminal branch and thrown away by `--json`, which is why the panel
29
+ // could not be as detailed as the terminal no matter how it was written.
30
+ counts: { FRESH: 6, AGING: 5, STALE: 2, unknown: 1 },
31
+ // The doc actually pinning the tier, BY NAME. A hash is not a thing anybody
32
+ // can go and refresh.
33
+ worst: { file: "wiki/orc-feature-billing.md", distance: 47, anchor: "9f2c41ab8de0" },
34
+ per_doc: [
35
+ { file: "wiki/orc-orientation.md", title: "Orientation", tier: "FRESH", distance: 2, anchor: "aa11bb22", scanned_commit: "aa11bb22", doc_type: "reference", covers: ["README.md"], covered_files: 1, crosslink_tags: 0, used: 20, used_of: 20, last_used: "2026-08-10", retire_hint: false },
36
+ { file: "wiki/orc-feature-billing.md", title: "Billing", tier: "STALE", distance: 47, anchor: "9f2c41ab", scanned_commit: "9f2c41ab", doc_type: "feature", covers: ["src/billing/"], covered_files: 23, crosslink_tags: 4, used: 12, used_of: 20, last_used: "2026-08-09", retire_hint: false },
37
+ { file: "wiki/orc-feature-auth.md", title: "Auth", tier: "AGING", distance: 22, anchor: "3c4d5e6f", scanned_commit: "3c4d5e6f", doc_type: "feature", covers: ["src/auth/"], covered_files: 11, crosslink_tags: 2, used: 6, used_of: 20, last_used: "2026-08-01", retire_hint: false },
38
+ // Zero-use KEEPS ITS SLOT with a retire hint, and it is never retired for
39
+ // you. `used: null` on the next row is NOT zero-use — unknown must never be
40
+ // reported as dead.
41
+ { file: "wiki/orc-feature-admin-export.md", title: "Admin export", tier: "AGING", distance: 18, anchor: "7a8b9c0d", scanned_commit: "7a8b9c0d", doc_type: "feature", covers: ["src/admin/"], covered_files: 4, crosslink_tags: 0, used: 0, used_of: 20, last_used: null, retire_hint: true },
42
+ { file: "wiki/orc-reference-http.md", title: "HTTP surface", tier: "unknown", distance: null, anchor: null, scanned_commit: null, doc_type: "reference", covers: [], covered_files: 0, crosslink_tags: 0, used: null, used_of: null, last_used: null, retire_hint: false },
43
+ ],
44
+ // THE FILES, not the number `2`. A count tells a user nothing they can act on.
45
+ blind_spot: ["src/notifications/dispatcher.ts", "src/notifications/templates.ts"],
46
+ orientation: { present: true, file: "wiki/orc-orientation.md", scanned_commit: "aa11bb22" },
47
+ crosslink: { provided: 6, boundary_rows: 9, state: "PUBLISHED" },
48
+ free_repairs: [
49
+ { id: "crosslink", cost: "free", cmd: "/orc-wiki crosslink", what: "publish boundary tags from already-anchored doc rows" },
50
+ ],
51
+ };
52
+
53
+ /* `orc wiki docs --json`. The order is the CLI's — THE PANEL NEVER INVENTS A
54
+ RANK. Every ugly state is here on purpose: a STALE doc, an unmeasurable one,
55
+ a zero-use retire candidate, and a doc with no crosslink tags. */
56
+ const wikiDocs = {
57
+ ok: true,
58
+ state: "registered",
59
+ tier: "STALE",
60
+ edges: { freshMax: 10, agingMax: 30 },
61
+ docs: wiki.per_doc,
62
+ counts: wiki.counts,
63
+ worst: wiki.worst,
64
+ free_repairs: wiki.free_repairs,
65
+ };
66
+
67
+ /* One doc, with and without its body. `--body` is opt-in: prose is returned only
68
+ on an explicit request, exactly one artifact at a time. */
69
+ const wikiShow = {
70
+ ok: true,
71
+ doc: "wiki/orc-feature-billing.md",
72
+ path: PROJECT + "/wiki/orc-feature-billing.md",
73
+ ...wiki.per_doc[1],
74
+ tags: [
75
+ { tag: "http:POST /v1/invoices", kind: "http", anchor: "src/billing/invoice.ts:88" },
76
+ { tag: "events:invoice.settled", kind: "events", anchor: "src/billing/emit.ts:14" },
77
+ ],
78
+ free_repairs: [],
79
+ body: "---\nwiki_schema: 2\ndoc_type: feature\n---\n\n# Billing\n\n## TL;DR\n\n- Invoices are created, taxed, then settled by the worker.\n\n## Contracts & shapes\n\n| Surface | Shape |\n|---|---|\n| `POST /v1/invoices` | `{ merchant_id, lines[] }` |\n",
80
+ };
81
+
82
+ /* `orc wiki coverage --json`. A REPORT and never a gate: no threshold, no config
83
+ key, nothing branches on it. The uncovered set is collapsed to DIRECTORIES and
84
+ ranked by file count, because "240 files, all in vendor/" and "12 files, all
85
+ in src/payments/" are opposite situations. */
86
+ const wikiCoverage = {
87
+ ok: true,
88
+ tracked: 412,
89
+ covered: 251,
90
+ uncovered: 161,
91
+ coverage_pct: 61,
92
+ docs: 14,
93
+ uncovered_dirs: [
94
+ { dir: "vendor/stripe-sdk", files: 118, newest_commit: "a1b2c3d 2026-02-11", sample: ["vendor/stripe-sdk/index.js"] },
95
+ { dir: "src/notifications", files: 22, newest_commit: "9f2c41a 2026-08-08", sample: ["src/notifications/dispatcher.ts", "src/notifications/templates.ts"] },
96
+ { dir: "scripts", files: 13, newest_commit: "77aa11b 2026-06-30", sample: ["scripts/seed.js"] },
97
+ { dir: "src/admin/legacy", files: 8, newest_commit: "0c0c0c0 2025-11-04", sample: ["src/admin/legacy/report.ts"] },
98
+ ],
99
+ honesty: "coverage is a report, not a target — there is no threshold and nothing branches on it",
100
+ };
101
+
102
+ /* A FULLY-COVERED repo, so 100% is designable too — and a wiki that is not
103
+ registered at all, which is the state `orc doctor` now warns about. */
104
+ const wikiCoverageFull = { ...wikiCoverage, covered: 412, uncovered: 0, coverage_pct: 100, uncovered_dirs: [] };
105
+ const wikiUnregistered = { state: "unregistered", docs: 9, tier: null, distance: null, anchor: null, last_scan: null, reasons: [], blind: 0, edges: { freshMax: 10, agingMax: 30 } };
106
+
107
+ /* `orc pattern show --json`. TWO of them: one with a real header, and one with
108
+ NO header at all — which says so in one line and NEVER derives a date from the
109
+ file's mtime. */
110
+ const patternShow = {
111
+ react: {
112
+ ok: true,
113
+ lang: "react",
114
+ path: PROJECT + "/.claude/orc/patterns/react-pattern.md",
115
+ headered: true,
116
+ codified_at: "09-08-2026",
117
+ source_commit: "9f2c41ab8de0",
118
+ playbook: "react",
119
+ headings: ["Component shape", "State", "Data fetching", "Testing", "CONVENTIONS the project already keeps", "INVARIANTS that are kept regardless"],
120
+ conventions: 14,
121
+ invariants: 6,
122
+ conflicts: [
123
+ "CONFLICT — the project puts hooks in the component file; the playbook wants them in hooks/. Project wins.",
124
+ "CONFLICT — the project disables the exhaustive-deps lint rule; the invariant keeps it, because a stale closure is a correctness bug.",
125
+ ],
126
+ bytes: 9140,
127
+ lines: 212,
128
+ mtime_ms: Date.now() - 2 * 24 * 60 * 60 * 1000,
129
+ body: "# React — project pattern\n\n## Component shape\n\nFunction components, named export, props typed inline.\n",
130
+ },
131
+ express: {
132
+ ok: true,
133
+ lang: "express",
134
+ path: PROJECT + "/.claude/orc/patterns/express-pattern.md",
135
+ headered: false,
136
+ codified_at: null,
137
+ source_commit: null,
138
+ playbook: null,
139
+ headings: ["Routing", "Error handling", "Testing"],
140
+ conventions: 8,
141
+ invariants: 4,
142
+ conflicts: [],
143
+ bytes: 4210,
144
+ lines: 96,
145
+ mtime_ms: Date.now() - 61 * 24 * 60 * 60 * 1000,
146
+ header_note: "this pattern file carries no parseable header — reported as it is on disk; a codified-at date is never derived from the file's mtime",
147
+ body: "# Express — project pattern\n\n## Routing\n\nOne router per resource.\n",
148
+ },
149
+ };
150
+
151
+ /* The archive, and the prune PREVIEW. A COUNT IS NOT CONSENT, so the preview
152
+ NAMES every entry it would move. */
153
+ const gotchasArchived = {
154
+ ok: true,
155
+ file: PROJECT + "/.claude/orc/gotchas-archive.md",
156
+ archived: true,
157
+ count: 2,
158
+ gotchas: [
159
+ { id: "G-000", area: "build", kind: "repair", hits: 1, last_seen: "02-01-2026", trigger: "the old webpack config needed a polyfill for crypto", fields: {} },
160
+ { id: "G-004", area: "react", kind: "drift", hits: 0, last_seen: "11-03-2026", trigger: "class components had to be wrapped for the router", fields: {} },
161
+ ],
162
+ };
163
+
164
+ const gotchaPrunePreview = {
165
+ ok: true,
166
+ dry_run: true,
167
+ file: PROJECT + "/.claude/orc/gotchas.md",
168
+ count: 3,
169
+ gotchas_max: 2,
170
+ would_archive: [
171
+ { id: "G-003", area: "build", kind: "verify", hits: 0, last_seen: "14-06-2026", trigger: "`npm run build` needs NODE_OPTIONS=--max-old-space-size=4096 on CI", why: "rank 1 of the low-value tail — 0 hit(s), last seen 14-06-2026" },
172
+ ],
173
+ archive: PROJECT + "/.claude/orc/gotchas-archive.md",
174
+ honesty: "eviction is an ARCHIVE, never a delete — a gotcha that stopped being true is yours to remove",
175
+ };
176
+
177
+ const wikiPlan = {
178
+ ok: true,
179
+ registered: 14,
180
+ pending: 4,
181
+ deep: 2,
182
+ light: 2,
183
+ usage_window: 20,
184
+ usage_runs_scanned: 20,
185
+ estimate: { tokens: { input: 21000, cache_write: 96000, cache_read: 168000, output: 50000 }, usd: 0.94, weighted: 133800 },
186
+ estimate_unavailable: null,
187
+ freshness: { tier: "FRESH", distance: 6, edges: { freshMax: 10, agingMax: 30 } },
188
+ scan_tier_mode: "ladder",
189
+ free_repairs: [
190
+ { id: "orientation", cost: "free", cmd: "/orc-wiki refresh wiki/orc-orientation.md", what: "regenerate the derived orientation doc (read first by every consumer)" },
191
+ ],
192
+ rows: [
193
+ { doc: "wiki/orc-feature-refunds.md", state: "STRUCTURAL", delta: 0, delta_files: [], gone: ["api/refunds/window.ts"], used: 17, used_of: 20, last_used: "2026-08-10", tier: "deep", agent: "orc-wiki-scanner-opus-4-8-high", tier_rule: "structural", tier_why: "STRUCTURAL — a covered file is gone; a targeted refresh cannot re-anchor blind", new_surface: false, estimate: { p50: { input: 8000, cache_write: 40000, cache_read: 69000, output: 21000 }, p90: { input: 11000, cache_write: 58000, cache_read: 99000, output: 30000 }, samples: 7 }, usd: 0.42, retire_hint: false },
194
+ { doc: "wiki/orc-feature-payments.md", state: "TOUCHED", delta: 6, delta_files: ["src/payments/ledger.ts", "src/payments/idempotency.ts"], gone: [], used: 14, used_of: 20, last_used: "2026-08-09", tier: "deep", agent: "orc-wiki-scanner-opus-4-8-high", tier_rule: "wide-delta", tier_why: "covered files touched >= wiki_tier_deep_files", new_surface: false, estimate: { p50: { input: 7000, cache_write: 36000, cache_read: 62000, output: 19000 }, p90: { input: 10000, cache_write: 51000, cache_read: 88000, output: 27000 }, samples: 7 }, usd: 0.38, retire_hint: false },
195
+ { doc: "wiki/orc-reference-config.md", state: "TOUCHED", delta: 1, delta_files: ["src/config/index.ts"], gone: [], used: 2, used_of: 20, last_used: "2026-07-25", tier: "light", agent: "orc-wiki-scanner-sonnet-5-high", tier_rule: "small-delta", tier_why: "small delta, no new surface", new_surface: false, estimate: { p50: { input: 3000, cache_write: 11000, cache_read: 17000, output: 4000 }, p90: { input: 4000, cache_write: 16000, cache_read: 25000, output: 6000 }, samples: 4 }, usd: 0.06, retire_hint: false },
196
+ // The zero-use retire candidate. It KEEPS ITS SLOT and renders muted with a
197
+ // hint — filtering it out would make "unused" and "does not exist" identical.
198
+ { doc: "wiki/orc-feature-admin-export.md", state: "TOUCHED", delta: 3, delta_files: ["src/admin/export.ts"], gone: [], used: 0, used_of: 20, last_used: null, tier: "light", agent: "orc-wiki-scanner-sonnet-5-high", tier_rule: "small-delta", tier_why: "small delta, no new surface", new_surface: false, estimate: { p50: { input: 3000, cache_write: 9000, cache_read: 20000, output: 6000 }, p90: { input: 4000, cache_write: 13000, cache_read: 29000, output: 9000 }, samples: 4 }, usd: 0.08, retire_hint: true },
199
+ ],
200
+ };
201
+
202
+ const wikiDebt = {
203
+ ok: true,
204
+ project: "shopcart",
205
+ pending: 4,
206
+ deep: 2,
207
+ tokens: { input: 21000, cache_write: 96000, cache_read: 168000, output: 50000 },
208
+ usd: 0.94,
209
+ oldest_commits_behind: 11,
210
+ tier: "FRESH",
211
+ edges: { freshMax: 10, agingMax: 30 },
212
+ docs: [
213
+ { doc: "wiki/orc-feature-refunds.md", state: "STRUCTURAL", tier: "deep", used: 17 },
214
+ { doc: "wiki/orc-feature-payments.md", state: "TOUCHED", tier: "deep", used: 14 },
215
+ { doc: "wiki/orc-reference-config.md", state: "TOUCHED", tier: "light", used: 2 },
216
+ { doc: "wiki/orc-feature-admin-export.md", state: "TOUCHED", tier: "light", used: 0 },
217
+ ],
218
+ };
219
+
220
+ const wikiUsage = {
221
+ ok: true,
222
+ file: PROJECT + "/.claude/orc/wiki-usage.json",
223
+ window_runs: 20,
224
+ runs_scanned: 20,
225
+ rebuilt_at: "10-08-2026 09:41:02",
226
+ registered: 14,
227
+ in_active_use: 8,
228
+ never_used: 2,
229
+ rows: [
230
+ { doc: "wiki/orc-orientation.md", used: 20, of: 20, last_used: "2026-08-10" },
231
+ { doc: "wiki/orc-feature-refunds.md", used: 17, of: 20, last_used: "2026-08-10" },
232
+ { doc: "wiki/orc-feature-payments.md", used: 14, of: 20, last_used: "2026-08-09" },
233
+ { doc: "wiki/orc-reference-http.md", used: 9, of: 20, last_used: "2026-08-06" },
234
+ { doc: "wiki/orc-reference-config.md", used: 2, of: 20, last_used: "2026-07-25" },
235
+ { doc: "wiki/orc-feature-admin-export.md", used: 0, of: 20, last_used: null },
236
+ { doc: "wiki/orc-reference-legacy-cron.md", used: 0, of: 20, last_used: null },
237
+ ],
238
+ };
239
+
240
+ const patterns = {
241
+ lang: null,
242
+ cached: true,
243
+ unknown_language: false,
244
+ patterns_dir: PROJECT + "/.claude/orc/patterns",
245
+ patterns: [
246
+ { lang: "react", path: PROJECT + "/.claude/orc/patterns/react-pattern.md", mtime_ms: Date.now() - 2 * 24 * 60 * 60 * 1000 },
247
+ { lang: "express", path: PROJECT + "/.claude/orc/patterns/express-pattern.md", mtime_ms: Date.now() - 61 * 24 * 60 * 60 * 1000 },
248
+ ],
249
+ known_languages: ["react", "vue", "express", "nestjs", "django", "rails", "spring", "dotnet"],
250
+ };
251
+
252
+ const gotchas = {
253
+ file: PROJECT + "/.claude/orc/gotchas.md",
254
+ count: 3,
255
+ // v0.49.1: the cap is what makes the count mean anything, and only `prune`
256
+ // used to print it — so "11 of 40" was not renderable from this payload.
257
+ gotchas_max: 40,
258
+ archive: PROJECT + "/.claude/orc/gotchas-archive.md",
259
+ // `fields` was ALWAYS emitted and the panel rendered six columns and threw the
260
+ // rest away. Symptom, fix and why are the half a person actually needs.
261
+ gotchas: [
262
+ { id: "G-001", area: "express", kind: "repair", hits: 7, last_seen: "05-08-2026", trigger: "Jest suite hangs unless the server handle is closed in afterAll", fields: { trigger: "Jest suite hangs unless the server handle is closed in afterAll", symptom: "`npm test` never exits; CI times out at 10 minutes", fix: "close the http server in afterAll and await it", why: "supertest keeps the listener open, and Jest waits for the handle", first_seen: "14-05-2026", hits: "7", last_seen: "05-08-2026" } },
263
+ { id: "G-002", area: "react", kind: "review", hits: 2, last_seen: "22-07-2026", trigger: "Date pickers must use the tz-aware helper, never new Date(string)", fields: { trigger: "Date pickers must use the tz-aware helper, never new Date(string)", symptom: "bookings land one day early for users west of UTC", fix: "use parseInZone from src/time/zone.ts", why: "new Date(string) parses as UTC and then renders local", first_seen: "02-06-2026", hits: "2", last_seen: "22-07-2026" } },
264
+ { id: "G-003", area: "build", kind: "verify", hits: 0, last_seen: "14-06-2026", trigger: "`npm run build` needs NODE_OPTIONS=--max-old-space-size=4096 on CI", fields: { trigger: "`npm run build` needs NODE_OPTIONS=--max-old-space-size=4096 on CI", symptom: "the CI build is OOM-killed with no error line", fix: "set NODE_OPTIONS in the workflow, not in package.json", why: "the runner has less memory than a dev laptop", first_seen: "14-06-2026", hits: "0", last_seen: "14-06-2026" } },
265
+ ],
266
+ };
267
+
268
+ // STALE, so the Flow panel's gated state is designable.
269
+
270
+ const wikiImpact = {
271
+ ok: true,
272
+ scan_commit: "9f2c41ab8de0aa17",
273
+ changed_files: 61,
274
+ docs: [
275
+ { file: "wiki/orc-feature-billing.md", state: "TOUCHED", hits: ["src/billing/invoice.ts", "src/billing/tax.ts"], gone: [] },
276
+ { file: "wiki/orc-feature-auth.md", state: "STRUCTURAL", hits: [], gone: ["src/auth/legacy-session.ts"] },
277
+ { file: "wiki/orc-reference-http.md", state: "CLEAN", hits: [], gone: [] },
278
+ { file: "wiki/orc-architecture-overview.md", state: "CLEAN", hits: [], gone: [] },
279
+ ],
280
+ blind_spot: ["src/notifications/dispatcher.ts", "src/notifications/templates.ts"],
281
+ registered: 14,
282
+ touched: 1,
283
+ structural: 1,
284
+ affected_pct: 14,
285
+ threshold: 30,
286
+ freshness: { tier: "STALE", distance: 47, aging_max: 30 },
287
+ recommendation: "FULL",
288
+ reasons: ["STRUCTURAL change (gone anchors / blind spot)", "worst doc 47 commits behind on its own covered files > wiki_aging_max 30"],
289
+ };
290
+
291
+ // v1.8.0 — `orc graph status --json`. DRIFTED on purpose: the state the card
292
+ // has to be designed for is the one that offers the free update.
293
+ const graph = {
294
+ ok: true,
295
+ enabled: true,
296
+ exists: true,
297
+ files: 1920,
298
+ symbols: 5896,
299
+ updated_at: "14-09-2026 22:10:04",
300
+ head_commit: "9f2c41ab8de0",
301
+ engine: "graph@4",
302
+ // EW1: every graph answer carries the generation it was computed from.
303
+ generation: 42,
304
+ gen_id: "c878981d",
305
+ state: "drifted",
306
+ behind: { added: 1, changed: 3, deleted: 0 },
307
+ engine_stale: false,
308
+ auto_update: true,
309
+ notes: "wave",
310
+ // W9 round 2: every graph --json answer carries the chat line and the trace
311
+ // line a lane copies. The card renders neither; the key set still matches live.
312
+ line: "graph: DRIFTED — 4 files behind (1 added · 3 changed · 0 deleted); hints only, code wins (run: orc graph update)",
313
+ trace: "GRAPH-CONSULT drifted :: files=1920 symbols=5896 gen=42",
314
+ };
315
+
316
+ // v1.8.2 W4b — `orc graph gain --json`. The fixture carries the ESTIMATE word
317
+ // and a RANGE, because those are the two things the card must never lose.
318
+ const graphGain = {
319
+ ok: true,
320
+ state: "rows",
321
+ scope: "project",
322
+ run: null,
323
+ since: null,
324
+ calls_recorded: 41,
325
+ runs: 6,
326
+ generation_range: [38, 42],
327
+ paid: { card: 4120, source: 610, hints: 182, total: 4912 },
328
+ avoided: { low: 18900, high: 71400 },
329
+ calls: { low: 58, high: 113 },
330
+ net: { low: 13988, high: 66488 },
331
+ by_command: { ctx: 29, impact: 6, changes: 4, "for-slice": 2 },
332
+ hints: { injected: 11, read_notes: 3, updates: 9 },
333
+ estimate: true,
334
+ carry_note:
335
+ "a card is re-sent on every later turn of the agent that received it — and so is the read it replaced. Both halves carry the same multiplier, so these are FIRST-ENTRY tokens on both sides (eval/graph-replay.js).",
336
+ };
337
+
338
+ // The A/B, with enough runs in both groups to print a comparison.
339
+ const graphGainMeasured = {
340
+ ok: true,
341
+ state: "compared",
342
+ min_runs: 3,
343
+ corpus: { dir: "~/.claude/projects/-home-dev-shop", ok: true },
344
+ runs: { on: 6, off: 4 },
345
+ rows: { on: [], off: [] },
346
+ compare: {
347
+ exec_retrieval_calls: { on: { n: 6, median: 19, min: 12, max: 27 }, off: { n: 4, median: 31, min: 24, max: 39 }, delta_pct: -39, off_spread_pct: 48 },
348
+ exec_bash_searches: { on: { n: 6, median: 2, min: 0, max: 5 }, off: { n: 4, median: 3, min: 1, max: 6 }, delta_pct: -33, off_spread_pct: 167 },
349
+ exec_result_tokens: { on: { n: 6, median: 27900, min: 18200, max: 41800 }, off: { n: 4, median: 41200, min: 29100, max: 60300 }, delta_pct: -32, off_spread_pct: 76 },
350
+ session_result_tokens: { on: { n: 6, median: 188000, min: 141000, max: 244000 }, off: { n: 4, median: 187000, min: 132000, max: 251000 }, delta_pct: 1, off_spread_pct: 64 },
351
+ },
352
+ note:
353
+ "executor windows and session totals are kept apart: the main session is 74–80% of a run and the graph never touches it. Every delta is printed beside the OFF group's own spread — a delta smaller than that spread is noise, not a result.",
354
+ };
355
+
356
+ module.exports = { wiki, wikiDocs, wikiShow, wikiCoverage, wikiCoverageFull, wikiUnregistered, wikiPlan, wikiDebt, wikiUsage, patterns, patternShow, gotchas, gotchasArchived, gotchaPrunePreview, wikiImpact, graph, graphGain, graphGainMeasured };