@azure-id/orc 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/CHANGELOG.md +374 -0
  2. package/README.md +49 -36
  3. package/bin/build-agents.js +7 -5
  4. package/bin/cli.js +1006 -235
  5. package/bin/fix.js +21 -18
  6. package/bin/graph-extract.js +314 -6
  7. package/bin/graph-gain.js +83 -2
  8. package/bin/graph-map.js +23 -1
  9. package/bin/graph-notes.js +1 -1
  10. package/bin/graph-query.js +1362 -37
  11. package/bin/graph-resolve.js +1 -1
  12. package/bin/graph-shard.js +29 -6
  13. package/bin/graph-signals.js +5 -3
  14. package/bin/graph.js +7 -3
  15. package/bin/habit.js +1 -1
  16. package/bin/pricing.json +8 -1
  17. package/bin/trace-write.js +40 -11
  18. package/bin/verify-contracts.js +169 -60
  19. package/bin/verify-package.js +3 -3
  20. package/bin/webui/api.js +8 -0
  21. package/bin/webui/fixtures/extra.js +9 -9
  22. package/bin/webui/fixtures/flow.js +1 -1
  23. package/bin/webui/fixtures/index.js +2 -2
  24. package/bin/webui/fixtures/knowledge.js +8 -1
  25. package/bin/webui/fixtures/pact.js +112 -111
  26. package/bin/webui/fixtures/stats.js +2 -2
  27. package/bin/webui/i18n/en/knowledge.json +2 -0
  28. package/bin/webui/i18n/id/knowledge.json +2 -0
  29. package/bin/webui/js/panels/knowledge.js +17 -0
  30. package/guides/code-graph-benefit.md +116 -0
  31. package/guides/configuration.md +150 -0
  32. package/guides/documents.md +262 -0
  33. package/guides/extra-models.md +448 -0
  34. package/guides/habits-and-gotchas.md +152 -0
  35. package/guides/knowledge-reads.md +190 -0
  36. package/guides/model-selection.md +186 -0
  37. package/guides/rules.md +305 -0
  38. package/guides/status-line.md +344 -0
  39. package/mock-run/a-normal-day.md +2 -2
  40. package/mock-run/extra-slots.md +177 -177
  41. package/mock-run/orc-cli.md +3 -2
  42. package/mock-run/orc-doc.md +452 -448
  43. package/mock-run/orc-fast.md +2 -2
  44. package/mock-run/orc-quick.md +146 -146
  45. package/mock-run/orc.md +4 -4
  46. package/package.json +2 -1
  47. package/templates/agents/MODEL-MAPPING.md +12 -12
  48. package/templates/agents/{orc-executor-haiku-4-5.md → orc-executor-haiku-5-high.md} +21 -8
  49. package/templates/agents/orc-executor-opus-4-7-high.md +17 -5
  50. package/templates/agents/orc-executor-opus-4-7-med.md +17 -5
  51. package/templates/agents/orc-executor-opus-4-8-high.md +17 -5
  52. package/templates/agents/orc-executor-opus-5-high.md +17 -5
  53. package/templates/agents/orc-executor-opus-5-low.md +17 -5
  54. package/templates/agents/orc-executor-opus-5-med.md +17 -5
  55. package/templates/agents/orc-executor-sonnet-4-6-high.md +17 -5
  56. package/templates/agents/orc-executor-sonnet-5-high.md +17 -5
  57. package/templates/agents/orc-executor-sonnet-5-low.md +17 -5
  58. package/templates/agents/orc-executor-sonnet-5-med.md +17 -5
  59. package/templates/agents/{orc-graph-noter-sonnet-4-6-med.md → orc-graph-noter-haiku-5-high.md} +4 -4
  60. package/templates/agents/orc-planner-mini-opus-5-med.md +3 -1
  61. package/templates/agents/orc-planner-mini-sonnet-5-high.md +3 -1
  62. package/templates/agents/orc-planner-opus-5-med.md +3 -1
  63. package/templates/agents/{orc-recon-sonnet-4-6-med.md → orc-recon-sonnet-5-med.md} +4 -4
  64. package/templates/agents/{orc-trace-writer-haiku-4-5.md → orc-trace-writer-haiku-5-high.md} +4 -3
  65. package/templates/commands/orc-doc.md +128 -128
  66. package/templates/commands/orc-export.md +51 -46
  67. package/templates/commands/orc-fast.md +10 -10
  68. package/templates/hooks/README.md +8 -3
  69. package/templates/hooks/orc-effort-guard.js +105 -27
  70. package/templates/hooks/orc-graph-hook.js +252 -4
  71. package/templates/hooks/orc-statusline.js +13 -6
  72. package/templates/hooks/orc-trace.js +1 -1
  73. package/templates/skills/_shared/README.md +2 -2
  74. package/templates/skills/_shared/code-graph.md +185 -251
  75. package/templates/skills/_shared/extra-dispatch.md +4 -4
  76. package/templates/skills/_shared/lane-contract.md +7 -3
  77. package/templates/skills/_shared/opus5-only.md +3 -3
  78. package/templates/skills/_shared/phases/execution.md +13 -11
  79. package/templates/skills/_shared/phases/planning.md +27 -9
  80. package/templates/skills/_shared/phases/preflight.md +3 -3
  81. package/templates/skills/_shared/phases/review.md +4 -3
  82. package/templates/skills/_shared/phases/ship.md +7 -10
  83. package/templates/skills/_shared/phases/summary.md +2 -3
  84. package/templates/skills/_shared/phases/trace-verbs.md +21 -16
  85. package/templates/skills/_shared/phases/trace.md +3 -3
  86. package/templates/skills/_shared/phases/wiki-consult.md +2 -2
  87. package/templates/skills/_shared/pr-templates.md +108 -106
  88. package/templates/skills/_shared/read-ladder.md +8 -2
  89. package/templates/skills/_shared/return-validation.md +10 -6
  90. package/templates/skills/_shared/review-slice.md +1 -1
  91. package/templates/skills/_shared/stack-plan.md +135 -135
  92. package/templates/skills/_shared/wait.md +14 -2
  93. package/templates/skills/context-combiner/SKILL.md +2 -2
  94. package/templates/skills/orc/SKILL.md +7 -7
  95. package/templates/skills/orc/config.md +2 -2
  96. package/templates/skills/orc/examples/full-run-mock.md +7 -7
  97. package/templates/skills/orc/references/effort-and-mode.md +222 -222
  98. package/templates/skills/orc/schemas/planning-output.md +3 -0
  99. package/templates/skills/orc-aftermath/SKILL.md +15 -15
  100. package/templates/skills/orc-analyze/SKILL.md +2 -2
  101. package/templates/skills/orc-analyze-mini/SKILL.md +2 -2
  102. package/templates/skills/orc-boundary/SKILL.md +15 -15
  103. package/templates/skills/orc-boundary/references/card.md +81 -78
  104. package/templates/skills/orc-boundary/references/gate.md +113 -113
  105. package/templates/skills/orc-brainstorm/SKILL.md +15 -15
  106. package/templates/skills/orc-budget/SKILL.md +15 -15
  107. package/templates/skills/orc-challenge/README.md +1 -1
  108. package/templates/skills/orc-challenge/SKILL.md +16 -16
  109. package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
  110. package/templates/skills/orc-claude/SKILL.md +4 -4
  111. package/templates/skills/orc-claude/examples/claude-run-mock.md +1 -1
  112. package/templates/skills/orc-diy/SKILL.md +2 -2
  113. package/templates/skills/orc-diy/references/blocks/wiki.md +26 -26
  114. package/templates/skills/orc-diy/references/flow-schema.md +2 -2
  115. package/templates/skills/orc-doc/README.md +2 -2
  116. package/templates/skills/orc-doc/SKILL.md +501 -490
  117. package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +12 -1
  118. package/templates/skills/orc-doc/references/chunking.md +6 -4
  119. package/templates/skills/orc-doc/references/gates.md +311 -311
  120. package/templates/skills/orc-doc/references/resume-protocol.md +229 -228
  121. package/templates/skills/orc-explain/SKILL.md +88 -88
  122. package/templates/skills/orc-export/SKILL.md +190 -187
  123. package/templates/skills/orc-fast/SKILL.md +17 -14
  124. package/templates/skills/orc-grill/SKILL.md +16 -16
  125. package/templates/skills/orc-grill/references/grill-doc.md +1 -1
  126. package/templates/skills/orc-handoff/SKILL.md +11 -11
  127. package/templates/skills/orc-learn/SKILL.md +13 -13
  128. package/templates/skills/orc-learn/examples/learn-run-mock.md +2 -2
  129. package/templates/skills/orc-mini/SKILL.md +12 -12
  130. package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -5
  131. package/templates/skills/orc-pact/SKILL.md +15 -15
  132. package/templates/skills/orc-pact/references/gate.md +70 -70
  133. package/templates/skills/orc-pattern/SKILL.md +3 -3
  134. package/templates/skills/orc-poly/SKILL.md +4 -4
  135. package/templates/skills/orc-poly/examples/poly-run-mock.md +51 -51
  136. package/templates/skills/orc-pr-driver/SKILL.md +4 -3
  137. package/templates/skills/orc-pr-driver/references/orc-run-split.md +108 -99
  138. package/templates/skills/orc-pr-setup/SKILL.md +2 -2
  139. package/templates/skills/orc-quick/README.md +11 -12
  140. package/templates/skills/orc-quick/SKILL.md +29 -32
  141. package/templates/skills/orc-quick/references/context-doc.md +5 -5
  142. package/templates/skills/orc-quick/references/dispatch-gate.md +10 -10
  143. package/templates/skills/orc-quick/references/gh-mode.md +2 -1
  144. package/templates/skills/orc-quick/references/look.md +34 -12
  145. package/templates/skills/orc-retro/SKILL.md +2 -2
  146. package/templates/skills/orc-retro/examples/retro-mock.md +2 -2
  147. package/templates/skills/orc-route/SKILL.md +2 -2
  148. package/templates/skills/orc-test/SKILL.md +6 -3
  149. package/templates/skills/orc-verify/SKILL.md +2 -2
  150. package/templates/skills/orc-wait/SKILL.md +10 -2
  151. package/templates/skills/orc-wiki/SKILL.md +4 -4
  152. package/templates/skills/orc-wiki/references/pattern-prewarm.md +19 -19
  153. package/templates/agents/orc-executor-sonnet-4-6-med.md +0 -155
@@ -1,99 +1,108 @@
1
- # Reference — splitting an already-built worktree (entry mode `orc-run`)
2
-
3
- Loaded at Phase D1/D2 when the change ALREADY exists — the normal case when
4
- ORC's ship phase hands the stack over. The code is written; the job is to
5
- distribute it across layer branches **without losing a byte and without hunk
6
- surgery**.
7
-
8
- ## Invariants
9
-
10
- - **File-granular only.** Every changed path belongs to exactly ONE layer. A file
11
- whose content seems to belong in two layers is an UNCERTAIN → ask; the default
12
- option offered is "the whole file lands in the LOWEST layer that needs it".
13
- - **The snapshot exists before any branch switch.** The user's work is never held
14
- only by the worktree once branch surgery starts.
15
- - **Nothing is lost:** after the last layer, the union of the layers' files must
16
- equal the snapshot's changed-file set, exactly. That equality is a GATE.
17
-
18
- ## Step 1 — snapshot the change
19
-
20
- ```bash
21
- git status --short > /tmp/orc-stack-surface.txt # the authoritative surface list
22
- git checkout -b orc-stack-snapshot/<slug> # keeps the worktree as-is
23
- git add -A # tracked + untracked
24
- git commit -m "<TICKET> snapshot: pre-stack state (temporary, not for review)"
25
- SNAPSHOT=$(git rev-parse HEAD)
26
- ```
27
-
28
- Then **verify the snapshot is complete** before going further:
29
-
30
- ```bash
31
- git diff --name-status <trunk>..$SNAPSHOT # must cover every path in the surface list
32
- ```
33
-
34
- Any path in `git status --short` that is missing from that diff → **STOP**. Do not
35
- proceed with a partial snapshot.
36
-
37
- Note the excluded-but-listed paths (generated code, lockfiles, vendored trees —
38
- `../../_shared/stack-plan.md`): they are still real files that must land in some
39
- layer, they just do not count toward a budget.
40
-
41
- ## Step 2 — start the stack from the trunk
42
-
43
- ```bash
44
- git checkout <trunk> && git pull --ff-only
45
- gh stack init -b <trunk>
46
- ```
47
-
48
- The worktree now shows trunk state. The change is safe in `$SNAPSHOT`.
49
-
50
- ## Step 3 — materialize each layer, bottom-up
51
-
52
- Per layer, from the plan's explicit file list:
53
-
54
- ```bash
55
- gh stack add -m "<TICKET> <layer title>" <layer-branch>
56
-
57
- # additions + modifications for THIS layer only
58
- git checkout $SNAPSHOT -- <file> <file> ...
59
-
60
- # deletions this layer owns (checkout cannot delete)
61
- git rm <deleted-file> ...
62
-
63
- git status --short # sanity: nothing from another layer
64
- ```
65
-
66
- Then run the full green-gate ladder (`green-gate.md`) and commit through the
67
- repo's hooks. Never `--no-verify`.
68
-
69
- **A moved/renamed file** is one unit: its delete and its add land in the SAME
70
- layer, always.
71
-
72
- ## Step 4 — completeness gate (before `gh stack submit`)
73
-
74
- ```bash
75
- git diff --name-only <trunk>..<top layer branch> | sort > /tmp/stacked.txt
76
- git diff --name-only <trunk>..$SNAPSHOT | sort > /tmp/snapshot.txt
77
- diff /tmp/stacked.txt /tmp/snapshot.txt # MUST be empty
78
- ```
79
-
80
- Non-empty → a file was dropped or duplicated. Fix it before submitting: an
81
- unreviewed missing file is exactly the failure stacking is supposed to prevent.
82
-
83
- ## Step 5 — the snapshot branch stays
84
-
85
- Keep `orc-stack-snapshot/<slug>` until the last layer merges — it is the undo
86
- button, and it is also how you re-cut a seam without re-deriving the change. It
87
- is **never pushed** and never becomes a PR. Delete it (after asking) when the
88
- stack is fully merged.
89
-
90
- ## When the change is already committed on a feature branch
91
-
92
- Same procedure with `$SNAPSHOT` = that branch's tip; skip the `add`/`commit`.
93
- Leave the original branch untouched — it is the snapshot.
94
-
95
- ## What this reference does NOT do
96
-
97
- - No hunk splitting, no interactive `git add -p`, no manual patch editing.
98
- - No retrofitting an already-open PR into a stack (`gh stack link`) — out of
99
- scope; ship it as one regular PR instead.
1
+ # Reference — splitting an already-built worktree (entry mode `orc-run`)
2
+
3
+ Loaded at Phase D1/D2 when the change ALREADY exists — the normal case when
4
+ ORC's ship phase hands the stack over. The code is written; the job is to
5
+ distribute it across layer branches **without losing a byte and without hunk
6
+ surgery**.
7
+
8
+ ## Invariants
9
+
10
+ - **File-granular only.** Every changed path belongs to exactly ONE layer. A file
11
+ whose content seems to belong in two layers is an UNCERTAIN → ask; the default
12
+ option offered is "the whole file lands in the LOWEST layer that needs it".
13
+ - **The snapshot exists before any branch switch.** The user's work is never held
14
+ only by the worktree once branch surgery starts.
15
+ - **Nothing is lost:** after the last layer, the union of the layers' files must
16
+ equal the snapshot's changed-file set, exactly. That equality is a GATE.
17
+
18
+ ## Step 1 — snapshot the change
19
+
20
+ ```bash
21
+ git status --short > /tmp/orc-stack-surface.txt # the authoritative surface list
22
+ git checkout -b orc-stack-snapshot/<slug> # keeps the worktree as-is
23
+ git add -A # tracked + untracked
24
+ git commit -m "<TICKET> snapshot: pre-stack state (temporary, not for review)"
25
+ SNAPSHOT=$(git rev-parse HEAD)
26
+ ```
27
+
28
+ Then **verify the snapshot is complete** before going further:
29
+
30
+ ```bash
31
+ git diff --name-status <trunk>..$SNAPSHOT # must cover every path in the surface list
32
+ ```
33
+
34
+ Any path in `git status --short` that is missing from that diff → **STOP**. Do not
35
+ proceed with a partial snapshot.
36
+
37
+ Note the excluded-but-listed paths (generated code, lockfiles, vendored trees —
38
+ `../../_shared/stack-plan.md`): they are still real files that must land in some
39
+ layer, they just do not count toward a budget.
40
+
41
+ ## Step 2 — start the stack from the trunk
42
+
43
+ ```bash
44
+ git checkout <trunk>
45
+ git merge-base --is-ancestor <trunk> $SNAPSHOT # exit 1 → STOP (below)
46
+ gh stack init -b <trunk>
47
+ ```
48
+
49
+ The worktree now shows trunk state. The change is safe in `$SNAPSHOT`.
50
+
51
+ **Do not pull here.** The stack starts from the trunk commit the change was cut
52
+ from, so `git checkout $SNAPSHOT -- <file>` reproduces exactly the change and
53
+ Step 4 compares like with like. The trunk is not an ancestor of `$SNAPSHOT`
54
+ (it moved after the change was cut) → **STOP** and ask: rebase the snapshot
55
+ first (`git rebase <trunk> orc-stack-snapshot/<slug>`), or stop. A remote trunk
56
+ that moved ahead is `gh stack sync` after submit (`conflict-playbook.md`, "the
57
+ trunk moved") — never a pull in the middle of a split.
58
+
59
+ ## Step 3 — materialize each layer, bottom-up
60
+
61
+ Per layer, from the plan's explicit file list:
62
+
63
+ ```bash
64
+ gh stack add -m "<TICKET> <layer title>" <layer-branch>
65
+
66
+ # additions + modifications for THIS layer only
67
+ git checkout $SNAPSHOT -- <file> <file> ...
68
+
69
+ # deletions this layer owns (checkout cannot delete)
70
+ git rm <deleted-file> ...
71
+
72
+ git status --short # sanity: nothing from another layer
73
+ ```
74
+
75
+ Then run the full green-gate ladder (`green-gate.md`) and commit through the
76
+ repo's hooks. Never `--no-verify`.
77
+
78
+ **A moved/renamed file** is one unit: its delete and its add land in the SAME
79
+ layer, always.
80
+
81
+ ## Step 4 — completeness gate (before `gh stack submit`)
82
+
83
+ ```bash
84
+ git diff --name-only <trunk>..<top layer branch> | sort > /tmp/stacked.txt
85
+ git diff --name-only <trunk>..$SNAPSHOT | sort > /tmp/snapshot.txt
86
+ diff /tmp/stacked.txt /tmp/snapshot.txt # MUST be empty
87
+ ```
88
+
89
+ Non-empty → a file was dropped or duplicated. Fix it before submitting: an
90
+ unreviewed missing file is exactly the failure stacking is supposed to prevent.
91
+
92
+ ## Step 5 — the snapshot branch stays
93
+
94
+ Keep `orc-stack-snapshot/<slug>` until the last layer merges — it is the undo
95
+ button, and it is also how you re-cut a seam without re-deriving the change. It
96
+ is **never pushed** and never becomes a PR. Delete it (after asking) when the
97
+ stack is fully merged.
98
+
99
+ ## When the change is already committed on a feature branch
100
+
101
+ Same procedure with `$SNAPSHOT` = that branch's tip; skip the `add`/`commit`.
102
+ Leave the original branch untouched — it is the snapshot.
103
+
104
+ ## What this reference does NOT do
105
+
106
+ - No hunk splitting, no interactive `git add -p`, no manual patch editing.
107
+ - No retrofitting an already-open PR into a stack (`gh stack link`) — out of
108
+ scope; ship it as one regular PR instead.
@@ -186,8 +186,8 @@ in the SAME step. A phase that ends with `zero new trace lines is a protocol vio
186
186
 
187
187
  ## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
188
188
 
189
- - **Calls:** `orc lane calls orc-pr-setup --json` names every call and its exit codes.
190
- **An exit code is an ANSWER where it says so, not a failure.** Make no other call.
189
+ - **Calls:** `orc lane calls orc-pr-setup --json` names shared calls and exit codes.
190
+ **An exit code is an ANSWER where it says so, not a failure.** Own calls are here; make no other.
191
191
  - **Config:** `orc lane config orc-pr-setup --json`. Obey `effective`. Never merge
192
192
  `.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`). Nothing
193
193
  here is contested, gated or a stop: no preflight line, no gate to honour.
@@ -113,22 +113,21 @@ Now the **one** user turn — questions and the agent choice together:
113
113
  Z delete now — breaks clients still sending `a`
114
114
 
115
115
  Which executor?
116
- 1. orc-executor-sonnet-4-6-med 3 files, mechanical
116
+ 1. orc-executor-sonnet-5-med 3 files, mechanical
117
117
  2. orc-executor-opus-5-low thinks harder, ~3× cost
118
118
  ```
119
119
 
120
120
  > **You:** `1: Y, 2: Y, executor 1`
121
121
 
122
122
  ```
123
- dispatching orc-executor-sonnet-4-6-med…
124
- ✅ returned · 3 files · expect=sonnet-4-6/medium actual=sonnet-4-6/medium
123
+ dispatching orc-executor-sonnet-5-med…
124
+ ✅ returned · 3 files · expect=sonnet-5-5/medium actual=sonnet-5-5/medium
125
125
 
126
126
  build npm run build → GREEN
127
127
  tests reached 1 file (call 1) → 4 passed
128
128
  suite 41 passed
129
129
  blast radius 2 symbols · callers 3 in 2 files · tests reach 2 · risk none
130
- graph gen 43 · 2 files updated
131
- graph gain paid 1.2K tokens · avoided an estimated 3–9K · measured: not yet (N=1)
130
+ graph pack 2 files · 3 ranges quoted
132
131
 
133
132
  (test-update not offered — the executor already fixed the spec)
134
133
 
@@ -204,7 +203,7 @@ this needs more reading than I should do myself, so it wants a dispatch.
204
203
 
205
204
  Entry 2 is a context dig. Which agent should look?
206
205
 
207
- 1. orc-recon-sonnet-4-6-med finding things, not deciding → suggested
206
+ 1. orc-recon-sonnet-5-med finding things, not deciding → suggested
208
207
  2. orc-recon-opus-5-low a wide or subtle question
209
208
  3. other — name a model (effort follows your session; not traced by the hook)
210
209
 
@@ -271,7 +270,7 @@ of you:
271
270
  ```
272
271
  kind: defect — the fix will be shown red first.
273
272
 
274
- dispatching orc-executor-sonnet-4-6-med…
273
+ dispatching orc-executor-sonnet-5-med…
275
274
  ✅ returned · 2 files
276
275
 
277
276
  repro red npm test -- tests/orders.search.test.js exit 1
@@ -349,12 +348,12 @@ There is **no smoke gate** in this lane. Two simple rules instead.
349
348
  build tsc → ❌ RED (14 errors)
350
349
  starting repair — rounds 1–2 reuse this executor.
351
350
 
352
- repair 1/3 · orc-executor-sonnet-4-6-med RED (6 errors)
353
- repair 2/3 · orc-executor-sonnet-4-6-med RED (4 errors)
351
+ repair 1/3 · orc-executor-sonnet-5-med RED (6 errors)
352
+ repair 2/3 · orc-executor-sonnet-5-med RED (4 errors)
354
353
 
355
354
  2 rounds in, still red. The rest is type-level, not mechanical.
356
355
  Round 3 — which executor?
357
- 1. orc-executor-sonnet-4-6-med current
356
+ 1. orc-executor-sonnet-5-med current
358
357
  → 2. orc-executor-opus-5-low stronger
359
358
  ```
360
359
 
@@ -366,8 +365,8 @@ After 3 rounds it stops and shows you **how the errors moved**:
366
365
  ```
367
366
  3 rounds, still red.
368
367
  left 2 errors, middleware/validate.ts:31
369
- tried r1 sonnet-4-6-med 14 → 6
370
- r2 sonnet-4-6-med 6 → 4
368
+ tried r1 sonnet-5-med 14 → 6
369
+ r2 sonnet-5-med 6 → 4
371
370
  r3 opus-5-low 4 → 2
372
371
 
373
372
  1. 3 more rounds
@@ -12,7 +12,7 @@ description: >
12
12
 
13
13
  The quick lane. You ask for something. It looks, asks you **one** set of
14
14
  questions, dispatches one agent, and writes down what happened. **Three steps
15
- per request, one user turn. Fewer than any other lane. Do not add steps.**
15
+ per request, one user turn. Do not add steps.**
16
16
 
17
17
  **You never implement — you spawn.** You read only to FIND the right files. To
18
18
  UNDERSTAND something, you dispatch an agent.
@@ -21,7 +21,7 @@ UNDERSTAND something, you dispatch an agent.
21
21
  decide if it only READS or also WRITES → pick what to dispatch → **ask the
22
22
  user** → dispatch → check the return → write the doc entry. No request is "not
23
23
  supported"; a request can only be **too big**, and then you OFFER `/orc-mini`.
24
- **What this lane is NOT** — no teaching doc, no repo scan, no spec, no plan, no
24
+ **What this lane is NOT** — no repo scan, no spec, no plan, no
25
25
  waves, no scoring, no acceptance pass (`README.md` §2).
26
26
 
27
27
  ---
@@ -34,10 +34,9 @@ without the manifest (`../_shared/lane-contract.md` §Phases).
34
34
 
35
35
  ## Q0 — Preflight (ONE time per session, silent, nothing can stop the run)
36
36
 
37
- 1. **Config.** Read `log_dir` only. Read no other key. **One exception, and it
37
+ 1. **Config.** Read `log_dir` only. **One exception, and it
38
38
  is a PROBE, not a key read:** `probes["extra-slot"]` in the `orc lane config`
39
- answer (`resolved`: extra or claude) answers the master gate, the position and the
40
- routing in one, so the code-writing menu can offer line 3. Do not call
39
+ answer (`resolved`: extra or claude) answers the gate and the routing, so the code-writing menu can offer line 3. Do not call
41
40
  `orc extra resolve --slot quick-executor`. **A gate that is never probed is a
42
41
  gate that is always off.** Keep the answer for this session; it is an OPTION
43
42
  on a menu, never a default (`references/dispatch-gate.md`). **`habits{}` in
@@ -61,7 +60,7 @@ without the manifest (`../_shared/lane-contract.md` §Phases).
61
60
  4. **Code graph cache — never skipped** (`../_shared/code-graph.md` §0). Print
62
61
  `probes["graph-status"].line`; run
63
62
  `orc graph status --if-enabled --heal --json --brief` only when `heal_needed` is true. Put the `trace` (`GRAPH-CONSULT …`) in
64
- the packet VERBATIM. Exit 3 = off → no other graph call this session. Every graph
63
+ the packet VERBATIM. Exit 3 (`off` or `semi`) → no other graph call this session. Every graph
65
64
  call carries `--if-enabled`, so the CLI reads the `code_graph` keys —
66
65
  this lane still reads `log_dir` and nothing else.
67
66
  5. **`gh` probe — only when the request names a PR** (`pr <n>`, `PR <n>`, a
@@ -96,16 +95,15 @@ Print it on ONE line:
96
95
 
97
96
  **The dig — graph first** (`references/look.md`). Ask the graph BEFORE any
98
97
  Grep; Grep only for what the graph does not know.
99
- - Names a file or symbol → `orc graph ctx <targets> --if-enabled --json --brief`, 5 at
100
- most. Names none → `orc graph map --focus "<3–6 words>" --budget 800
101
- --if-enabled --json --brief`, then `ctx` on the files it ranks first. Asks what breaks
102
- or who uses something → `ctx <symbol> --depth 2` and `orc graph coverage
103
- <files> --if-enabled --json --brief` before you call anything absent. Exit 3 →
104
- Grep/Glob. Exit 4 → Grep the name, carry EVERY candidate into your question.
105
- Copy each `line` into chat, each `trace` into the running record. A `map`
106
- answer is ONE call; a card never replaces reading the range it names.
98
+ - Names a symbol → ONE `orc graph ctx <symbol> --anchors --focus=<words> --if-enabled
99
+ --json --brief`: callers, tests (also via a caller), coverage — no Grep of that name,
100
+ `coverage` only on `partial`; `anchors_card` = the slice's `graph_anchors` (no
101
+ `--for-slice`), declared = target file + its caller files. Files → `ctx <files>` (≤ 5).
102
+ None → `orc graph map --focus=<3–6 words> --budget 800 …`, then ONE `ctx` (≤ 5), not
103
+ `cat`/`grep`. Exit 3 → Grep/Glob. Exit 4 → Grep the name, carry EVERY candidate.
104
+ `line` → chat, `trace` → the record. A card never replaces reading its range.
107
105
  - Wiki exists → pick 1–3 pages from `wiki/INDEX.md` and keep their **PATHS**
108
- only. Never paste wiki text into a slice. Emit
106
+ only. With `graph_anchors` in the slice, list at most ONE wiki page path (the one about the feature's intent), not 1–3. Never paste wiki text into a slice. Emit
109
107
  `WIKI-CONSULT <tier> :: docs=<paths>`.
110
108
  - Pattern cached → keep it for the slice.
111
109
  - Always put this line in every slice, word for word:
@@ -157,12 +155,14 @@ Rules:
157
155
 
158
156
  ### 3.1 Dispatch and check the return
159
157
 
160
- Put in the slice: the change sketch, the Q2 answers, 2–3 acceptance bullets, the
161
- `graph` block from `orc graph ctx <declared files> --for-slice --if-enabled
162
- --json --brief` (the OUTSIDE view — `references/look.md` §5), the wiki **paths**, the
163
- cached pattern (whole text), the `house_rules` card
164
- (`../_shared/phases/house-rules.md`, whole text), the `rules_card` under it
165
- (`orc rules slice --lane orc-quick --json` → `text`, whole text), PR comments
158
+ Put in the slice: the change sketch, Q2 answers, 2–3 acceptance bullets, the
159
+ `graph_anchors` (WHOLE `card` VERBATIM, `read all:` + code) from ONE `orc graph ctx --for-slice <declared files>
160
+ --focus=<3–8 words: request, doc, copy-from name> [--refs=<copy-FROM files,
161
+ found first>] --anchors --if-enabled --json --brief`
162
+ (print `line`; exit 3/4 or one file, no outside change → none — `references/look.md`
163
+ §5), the wiki **paths**, the cached pattern, the `house_rules` card
164
+ (`../_shared/phases/house-rules.md`), the `rules_card` under it
165
+ (`orc rules slice --lane orc-quick --json` → `text`) — all three whole text, PR comments
166
166
  with their `file:line`, and a short-return rule. A `kind: defect` entry also
167
167
  carries `repro` — the EXECUTOR writes it red, then fixes it green, never you
168
168
  (`references/defect.md`). An **ad-hoc** dispatch is also told to report its own
@@ -170,7 +170,7 @@ carries `repro` — the EXECUTOR writes it red, then fixes it green, never you
170
170
 
171
171
  Check the return with `../_shared/return-validation.md` §1–§3 + each injected
172
172
  field's §: honest `unmet[]`, `pattern_version` + `invariants_checked`,
173
- `graph_used` (absent on a slice that carried a card = malformed), `repro` when
173
+ `graph_used` (absent on a slice that carried `graph_anchors` = malformed), `repro` when
174
174
  the slice asked for it, and `actual_model` / `actual_effort` → emit `VERIFY`, which names
175
175
  `graph_used=<n> targets gen <n>` and `repro red→green` beside the model match,
176
176
  and show ⛔ DOWNGRADE if they differ. Also compare `git status --short`
@@ -209,16 +209,13 @@ Never offer commit while tests are red.
209
209
 
210
210
  ### 3.3 Write the doc — ALWAYS, and BEFORE any offer
211
211
 
212
- **After a request that WROTE code** (never after a read-only one), so the next
213
- request and the next session start from a current cache, in this order:
212
+ **After a request that WROTE code** (never after a read-only one), and ONLY
213
+ when `probes["graph-status"].update_step` is `lane`:
214
214
  `orc graph update --notes-pending --files <actual_files> --if-enabled --json --brief`
215
215
  — ONE call that answers both (print its `line`, copy its `trace`). Exit 0 on
216
- `notes` → dispatch `orc-graph-noter-sonnet-4-6-med` in the SAME tool block as
217
- this doc write. It is ORC bookkeeping, like the trace writer — not a Q2 gate
218
- dispatch (`references/dispatch-gate.md` rule 8). Exit 3 or 5 → nothing. Then,
219
- after the entry is appended, `orc graph gain --run <this run> --if-enabled
220
- --json --brief` → print its `line` VERBATIM into chat and the entry. It is an estimate
221
- with a range; never restate it as a saving.
216
+ `notes` → dispatch `orc-graph-noter-haiku-5-high` in the SAME tool block as
217
+ this doc write — bookkeeping, not a Q2 gate dispatch (`references/dispatch-gate.md` rule 8). Exit 3 or 5 → nothing.
218
+ `hook`, `preflight` or `none` → no update call. No lane runs the gain meter.
222
219
 
223
220
  Append entry N to `orc-quick/<slug>/quick-context.md`
224
221
  (`references/context-doc.md`, only `## Entry shape` or `## A read-only entry`).
@@ -270,8 +267,8 @@ every event is a protocol violation. Pipe each packet to
270
267
 
271
268
  ## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
272
269
 
273
- - **Calls:** `orc lane calls orc-quick --json` names every call and its exit codes.
274
- **An exit code is an ANSWER where it says so, not a failure.** Make no other call.
270
+ - **Calls:** `orc lane calls orc-quick --json` names shared calls and exit codes.
271
+ **An exit code is an ANSWER where it says so, not a failure.** Own calls are here; make no other.
275
272
  - **Config:** `orc lane config orc-quick --json`. Obey `effective`, print every line
276
273
  in `announce[]` VERBATIM at preflight, and honour `stops[]` before wave 1.
277
274
  Never merge `.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`).
@@ -75,8 +75,8 @@ Use as many of these as apply. Leave out what does not fit.
75
75
  **dispatches**
76
76
  | # | kind | agent / model | expect | actual | result |
77
77
  |---|---|---|---|---|---|
78
- | 1 | recon | `orc-recon-sonnet-4-6-med` | sonnet-4-6/medium | sonnet-4-6/medium ✅ | what it found |
79
- | 2 | executor | `orc-executor-sonnet-4-6-med` | sonnet-4-6/medium | sonnet-4-6/medium ✅ | 3 files |
78
+ | 1 | recon | `orc-recon-sonnet-5-med` | sonnet-5-5/medium | sonnet-5-5/medium ✅ | what it found |
79
+ | 2 | executor | `orc-executor-sonnet-5-med` | sonnet-5-5/medium | sonnet-5-5/medium ✅ | 3 files |
80
80
 
81
81
  Only an **other** dispatch keeps the `*(ad-hoc, untraced-by-hook)*` mark. A
82
82
  dispatch of either pinned recon agent is a normal row with the agent's name.
@@ -86,7 +86,7 @@ dispatch of either pinned recon agent is a normal row with the agent's name.
86
86
  **repro** red → green · `npm test -- tests/orders.search.test.js` (before: exit 1 · after: exit 0)
87
87
  **blast radius** 3 symbols · callers 7 in 4 files · tests reach 2 · risk high: searchByItemPrefix (exported, fan-in 4, no test reaches it)
88
88
  **tests** reached 12 passed · suite 41 passed
89
- **graph** gen 42 · cards 2 · <the `orc graph gain` line, word for word>
89
+ **graph** gen 42 · <the pack `line`, word for word>
90
90
 
91
91
  **how it was resolved** a short, plain explanation of the fix and WHY this way.
92
92
  Say what you did not do, and why. This is the most useful part later.
@@ -118,8 +118,8 @@ Leave out the ones that do not apply:
118
118
  the entry tidy: an unreproduced fix is the thing the reader most needs to know.
119
119
  - **`blast radius`** — a `risk` word NEVER appears without its `why`. Nothing in
120
120
  the graph → `none indexed (<n> files not in the graph)`.
121
- - **`graph`** — the gain line is an estimate with a range. Copy it; never turn
122
- it into a saving.
121
+ - **`graph`** — the pack `line`, as the CLI printed it. Copy it; never
122
+ change it.
123
123
 
124
124
  ## A read-only entry
125
125
 
@@ -10,8 +10,8 @@ what is about to be spent, before it is spent.
10
10
 
11
11
  | Kind | Offer | Traced by the hook | Downgrade check |
12
12
  |------|-------|--------------------|-----------------|
13
- | Writes code | `orc-executor-sonnet-4-6-med` · `orc-executor-opus-5-low` · **a third option when a `quick-executor` position is held** | yes | yes (a foreign return has no `actual_model` — §2b) |
14
- | Read only (recon) | `orc-recon-sonnet-4-6-med` · `orc-recon-opus-5-low` · **other — name a model** | yes · yes · no | yes |
13
+ | Writes code | `orc-executor-sonnet-5-med` · `orc-executor-opus-5-low` · **a third option when a `quick-executor` position is held** | yes | yes (a foreign return has no `actual_model` — §2b) |
14
+ | Read only (recon) | `orc-recon-sonnet-5-med` · `orc-recon-opus-5-low` · **other — name a model** | yes · yes · no | yes |
15
15
  | Review | `orc-reviewer-opus-5-low` · or ad-hoc | yes / no | yes |
16
16
  | Build repair, round 1–2 | *reused — not asked* | yes | yes |
17
17
  | Build repair, round 3 | asked again | yes | yes |
@@ -28,7 +28,7 @@ each outcome with `orc gotcha observe` (one per finding, with `run`) and the
28
28
  ```
29
29
  Which executor for entry 2 — "add retry header"?
30
30
 
31
- 1. orc-executor-sonnet-4-6-med cheap, fits a 3-file change
31
+ 1. orc-executor-sonnet-5-med cheap, fits a 3-file change
32
32
  2. orc-executor-opus-5-low thinks harder, about 3× the cost → suggested: callers 9 in 5 files
33
33
 
34
34
  Your choice — nothing runs until you answer.
@@ -49,7 +49,7 @@ Show a third line ONLY when all three are true:
49
49
  ```
50
50
  Which executor for entry 2 — "add retry header"?
51
51
 
52
- 1. orc-executor-sonnet-4-6-med cheap, fits a 3-file change
52
+ 1. orc-executor-sonnet-5-med cheap, fits a 3-file change
53
53
  2. orc-executor-opus-5-low thinks harder, about 3× the cost
54
54
  3. deepseek/deepseek-chat via profile `ds` — sends this slice to a third party
55
55
  ```
@@ -89,7 +89,7 @@ else.
89
89
  ```
90
90
  Entry 3 is a context dig. Which agent should look?
91
91
 
92
- 1. orc-recon-sonnet-4-6-med finding things, not deciding → suggested
92
+ 1. orc-recon-sonnet-5-med finding things, not deciding → suggested
93
93
  2. orc-recon-opus-5-low a wide or subtle question
94
94
  3. other — name a model (effort follows your session; not traced by the hook)
95
95
 
@@ -133,12 +133,12 @@ count (`../../_shared/habits.md`), never from a feeling. Suggest
133
133
  | confident callers of the files to change ≥ 8 (from the dig, or from `orc graph changes`) | the change is felt in more places than a cheap pass checks |
134
134
  | a risk class is visible: auth · money · migration · security · concurrency · data-integrity | the same six classes the full lane's planner floors to 70 |
135
135
  | more than 3 files will really change | the cheap executor's sweet spot is a 1–3 file change |
136
- | **otherwise** → `orc-executor-sonnet-4-6-med` | the boring choice for a mechanical edit |
136
+ | **otherwise** → `orc-executor-sonnet-5-med` | the boring choice for a mechanical edit |
137
137
 
138
138
  **Always print the reason beside the marker.** A marker with no reason is a
139
139
  default wearing a recommendation's clothes, and rule 1 forbids it.
140
140
 
141
- For recon, the suggestion is simpler: `orc-recon-sonnet-4-6-med` finds things;
141
+ For recon, the suggestion is simpler: `orc-recon-sonnet-5-med` finds things;
142
142
  `orc-recon-opus-5-low` is for a wide or a subtle question.
143
143
 
144
144
  ## Rules
@@ -181,7 +181,7 @@ For recon, the suggestion is simpler: `orc-recon-sonnet-4-6-med` finds things;
181
181
  no step and no question to this lane.
182
182
 
183
183
  8. **ORC bookkeeping is not a dispatch you gate.** The trace writer and
184
- `orc-graph-noter-sonnet-4-6-med` (the code graph's notes,
184
+ `orc-graph-noter-haiku-5-high` (the code graph's notes,
185
185
  `../../_shared/code-graph.md` §6) are fixed, never offered on this menu and
186
186
  never asked. They run no user task and change no code, and asking about them
187
187
  would add a user turn to a lane whose promise is one turn per request.
@@ -200,8 +200,8 @@ bad day worse, so:
200
200
  ```
201
201
  3 rounds, still red.
202
202
  left 2 errors, middleware/validate.ts:31
203
- tried r1 sonnet-4-6-med 14 → 6
204
- r2 sonnet-4-6-med 6 → 4
203
+ tried r1 sonnet-5-med 14 → 6
204
+ r2 sonnet-5-med 6 → 4
205
205
  r3 opus-5-low 4 → 2
206
206
 
207
207
  1. 3 more rounds
@@ -88,7 +88,8 @@ it — a test that arrives through a URL included. Print one line per thread:
88
88
  [1] dana · export.js:34 → streamRows (callers 2 · tests 1)
89
89
  ```
90
90
 
91
- That card goes into the thread's slice. Exit 3 (the graph is off) or exit 4 (not
91
+ Use that card to choose the thread's declared files. The slice gets the pack
92
+ (`SKILL.md` Q3.1), not this card. Exit 3 (the graph is off) or exit 4 (not
92
93
  found) → skip the line and work from the anchor alone.
93
94
 
94
95
  ## One gate per thread
@@ -22,13 +22,17 @@ way round.
22
22
 
23
23
  | The request | The call |
24
24
  |---|---|
25
- | names a file or a symbol | `orc graph ctx <targets> --if-enabled --json --brief` — 5 targets at most |
26
- | names none ("where is the retry logic?") | `orc graph map --focus "<3–6 words from the request>" --budget 800 --if-enabled --json --brief`, then `ctx` on the files it ranks first |
27
- | asks what breaks, or who uses something | `orc graph ctx <symbol> --depth 2 --if-enabled --json --brief`, then `orc graph coverage <files> --if-enabled --json --brief` |
25
+ | names a symbol | ONE `orc graph ctx <symbol> --anchors --focus=<words> --if-enabled --json --brief` — the card gives the callers, the tests (also via a caller) and the coverage verdict: do not Grep that name, do not run `coverage` unless the card says `partial` |
26
+ | names a file | `orc graph ctx <targets> --if-enabled --json --brief` — 5 targets at most |
27
+ | names none ("where is the retry logic?") | `orc graph map --focus=<3–6 words from the request> --budget 300 --if-enabled --json --brief`, then `ctx` on the files it ranks first |
28
+ | asks what breaks, or who uses a FILE | `orc graph ctx <files> --if-enabled --json --brief`, then `orc graph coverage <files> --if-enabled --json --brief` |
28
29
 
29
30
  Exit 3 = the graph is off → Grep and Glob, as before, and make no other graph
30
31
  call this session. Exit 1 = no index → the same. **A `map` answer is ONE call**,
31
- not one per file it lists.
32
+ not one per file it lists. After `map`, get facts about the files it names with
33
+ ONE `orc graph ctx <files…> --if-enabled --json --brief` (≤ 5) — not `cat`/`grep`
34
+ of those files. Read source only for a fact the card cannot give (a literal
35
+ string, a template line).
32
36
 
33
37
  Copy each answer's `line` into chat. Copy each answer's `trace` into the running
34
38
  record, word for word.
@@ -38,9 +42,10 @@ record, word for word.
38
42
  **A card does not replace reading the range it names.** It tells you where to
39
43
  look. It never tells you what the code does.
40
44
 
41
- **No card in the slice for a change inside one file the user named**, when no
42
- signature changes and nothing new is exported (`../../_shared/code-graph.md`
43
- §7). The executor reads that file whole anyway, so the card would be paid twice.
45
+ **The slice gets the pack path, never a card.** A dispatch that writes code
46
+ gets ONE pack (§5). **No pack when the change stays inside ONE file the user
47
+ named and nothing outside it changes** (no signature change, no new export):
48
+ the executor reads that file anyway, and a pack there is pure cost.
44
49
 
45
50
  **`--source [N]` is for a range you will NOT edit.** A caller's body, a
46
51
  neighbour, a test. A file the executor is going to change is read in full by the
@@ -76,14 +81,31 @@ sentence, word for word:
76
81
 
77
82
  ## 5. What you hand to an executor
78
83
 
84
+ **A request that names a symbol:** the look call `ctx <symbol> --anchors` (§2)
85
+ already returned the anchors. Its `anchors_card` goes into the slice as
86
+ `graph_anchors` — no second `--for-slice` call for that dispatch. Declared files
87
+ = the target file + the caller files the card lists.
88
+
89
+ **A request that names files, or nothing (map first):**
90
+
79
91
  ```
80
- orc graph ctx <declared files> --for-slice --if-enabled --json --brief
92
+ orc graph ctx --for-slice <file1> <file2> … (space- or comma-separated) --focus=<the dig words> [--refs=<copy-from files>] --anchors --if-enabled --json --brief
81
93
  ```
82
94
 
83
- ONE call, 10 files at most. Its `card` becomes the slice's `graph` block. This
84
- is the **outside view** — who imports these files, who calls into them from
85
- elsewhere, which tests reach them, where they are mounted. It is the half the
86
- executor cannot see by reading the files it was given.
95
+ ONE call, 10 files at most. No file is written; it answers ONE `line` (print it)
96
+ and a `card`. Paste the `card` into the slice VERBATIM as `graph_anchors`, with its `read all: …` line and its code block — never shorten it. With `graph_anchors` in the slice, list at most ONE wiki page path (the one about the feature's intent), not 1–3. The card:
97
+ up to 12 `path:a-b` ranges the dig found — the members of the declared files and
98
+ of the `--refs` files that best match the focus words — and ONE `read all:` command
99
+ the executor runs first. `--refs` = every file the request or its
100
+ requirement document says to copy behaviour or style FROM, plus the precedent
101
+ the dig found (max 5) — never the files you will edit. You have none → leave it out; the CLI picks them.
102
+
103
+ `--focus=` takes 3–8 words from the request AND from the requirement document it names — always
104
+ the words the document uses to name a file to copy behaviour or style from (e.g. `swap,modal,selection`).
105
+ Before the anchors call, locate every copy-from file the document names with ONE
106
+ `orc graph map --focus=<its words> --budget 300 --if-enabled --json --brief` (or `orc graph ctx <Name>
107
+ --if-enabled --json --brief` when the name is exact), and pass it in `--refs=`.
108
+ Exit 3 or 4 → none. One named file, nothing outside it changes → none (§3).
87
109
 
88
110
  Its `trace` gets `entry=<n>`.
89
111
 
@@ -236,11 +236,11 @@ documented defaults, out loud. Priorities and families:
236
236
  ## Calls
237
237
 
238
238
  **ONE catalogue, and it is not you:** `orc lane calls orc-retro --json` names every
239
- CLI call this lane makes, each with its exit-code contract, its cost, when to run
239
+ SHARED CLI call this lane makes, each with its exit-code contract, its cost, when to run
240
240
  it, and what an EMPTY answer means. Never invent a spelling, never re-word an
241
241
  exit code, and never re-derive a state word — the CLI's state words are the only
242
242
  state words, and **an exit code is an ANSWER wherever that contract says so, not
243
- a failure**. A call the answer does not name is a call this lane does not make.
243
+ a failure**. A call that neither it nor this skill names is a call this lane does not make.
244
244
  Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
245
245
  command you are about to run, out loud, before running it.
246
246