@azure-id/orc 1.7.1 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +3649 -3381
  2. package/README-id.md +923 -844
  3. package/README.md +836 -788
  4. package/bin/build-agents.js +43 -27
  5. package/bin/cli.js +701 -3
  6. package/bin/graph-extract.js +927 -0
  7. package/bin/graph-notes.js +188 -0
  8. package/bin/graph-query.js +808 -0
  9. package/bin/graph-resolve.js +178 -0
  10. package/bin/graph-signals.js +277 -0
  11. package/bin/graph.js +605 -0
  12. package/bin/verify-contracts.js +4669 -4553
  13. package/bin/verify-package.js +626 -616
  14. package/bin/webui/api.js +1419 -1414
  15. package/bin/webui/fixtures/index.js +579 -576
  16. package/bin/webui/fixtures/knowledge.js +316 -291
  17. package/bin/webui/i18n/en/knowledge.json +167 -151
  18. package/bin/webui/i18n/en/overview.json +101 -100
  19. package/bin/webui/i18n/id/knowledge.json +167 -151
  20. package/bin/webui/i18n/id/overview.json +101 -100
  21. package/bin/webui/js/panels/knowledge.js +1065 -1006
  22. package/bin/webui/js/panels/overview.js +492 -488
  23. package/package.json +39 -39
  24. package/templates/agents/MODEL-MAPPING.md +163 -158
  25. package/templates/agents/orc-executor-haiku-4-5.md +133 -121
  26. package/templates/agents/orc-executor-opus-4-7-high.md +134 -122
  27. package/templates/agents/orc-executor-opus-4-7-med.md +134 -122
  28. package/templates/agents/orc-executor-opus-4-8-high.md +134 -122
  29. package/templates/agents/orc-executor-opus-5-high.md +134 -122
  30. package/templates/agents/orc-executor-opus-5-low.md +134 -122
  31. package/templates/agents/orc-executor-opus-5-med.md +134 -122
  32. package/templates/agents/orc-executor-sonnet-4-6-high.md +134 -122
  33. package/templates/agents/orc-executor-sonnet-4-6-med.md +134 -122
  34. package/templates/agents/orc-executor-sonnet-5-high.md +134 -122
  35. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +86 -0
  36. package/templates/hooks/README.md +444 -396
  37. package/templates/hooks/orc-graph-hook.js +336 -0
  38. package/templates/hooks/orc-statusline-render.js +922 -921
  39. package/templates/hooks/orc-statusline.js +1596 -1545
  40. package/templates/skills/_shared/README.md +4 -0
  41. package/templates/skills/_shared/code-graph.md +220 -0
  42. package/templates/skills/_shared/opus5-only.md +4 -0
  43. package/templates/skills/_shared/phases/execution.md +166 -147
  44. package/templates/skills/_shared/phases/planning.md +142 -135
  45. package/templates/skills/_shared/phases/preflight.md +132 -118
  46. package/templates/skills/_shared/phases/review.md +63 -53
  47. package/templates/skills/_shared/phases/ship.md +96 -88
  48. package/templates/skills/_shared/phases/trace.md +6 -0
  49. package/templates/skills/_shared/phases/wiki-consult.md +194 -189
  50. package/templates/skills/_shared/read-ladder.md +124 -102
  51. package/templates/skills/_shared/return-validation.md +259 -250
  52. package/templates/skills/orc/SKILL.md +255 -254
  53. package/templates/skills/orc-diy/references/flow-schema.md +101 -100
  54. package/templates/skills/orc-fast/SKILL.md +236 -229
  55. package/templates/skills/orc-mini/SKILL.md +267 -259
  56. package/templates/skills/orc-quick/SKILL.md +378 -361
  57. package/templates/skills/orc-quick/references/dispatch-gate.md +6 -0
  58. package/templates/skills/orc-wiki/references/staleness.md +294 -288
@@ -1,53 +1,63 @@
1
- # Phase — Review (id: `review`)
2
-
3
- > **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
4
- > this library at W13 when `orc-diy` became its second reader. A spine is loaded
5
- > IN FULL when its skill activates; this is loaded when the phase fires, and most
6
- > runs skip most phases.
7
- >
8
- > **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
9
- > `composed` is what `orc diy compile` stitches — the same phase expressed as
10
- > `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
11
- > procedure. Reading the wrong one is the failure `README.md` names: a lane
12
- > doing a phase its product promise says it does differently.
13
- > `orc lane phases <lane> --json` names the layer for each lane.
14
-
15
- <!-- orc:layer full -->
16
-
17
- ## Review (load ../../orc/subskills/orc-review-verify/, spawned)
18
-
19
- Emit `PHASE review start`. Superpowers path: its review skill incl. tests
20
- (Sonnet 4.6 medium). OpenSpec/self path: review worker (Opus 5 medium). Pass the resolved
21
- `code_pattern` + its invariants + gate lines for the re-check
22
- (pattern-gate.md); no resolved pattern → FIRST ask for one (paste/md/none).
23
- FE tasks in run → pass `fe_rules[]` from `../../orc-pattern/references/` fe-a11y
24
- + fe-perf. Findings arrive on the **P0–P3 ladder** (invariant violation or
25
- unmet gate line = P0; every P0–P2 carries `file:line` + VERBATIM `quote`;
26
- unanchored → P3). Apply hard rule 5 INCLUDING the quote spot-check: P0 →
27
- auto-fix once · P1 → ask, then fix once · P2/P3 → record for Phase 7. Emit
28
- `FINDING p0=<n> p1=<n> p2=<n> p3=<n>` on the return, then `PHASE review end`.
29
-
30
- <!-- /orc:layer -->
31
-
32
- <!-- orc:layer composed -->
33
-
34
- ## Phase: Review
35
-
36
- <!-- diy:when review=off -->
37
- Code review is DISABLED in this flow. Say so in the run summary line ("review
38
- skipped by flow config") — never imply the work was reviewed.
39
- <!-- /diy:when -->
40
- <!-- diy:when review=on -->
41
- Dispatch the reviewer exactly as the full lane does — follow the review half
42
- of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` (reviewer agent
43
- `orc-reviewer-opus-5-med`; findings ride the severity ladder from the
44
- locked rules, blocking and advisory findings both surfaced).
45
- <!-- /diy:when -->
46
- <!-- diy:when review=blocking-only -->
47
- Dispatch the reviewer exactly as the full lane does — follow the review half
48
- of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` — but only
49
- P0/P1 findings gate anything; P2/P3 findings are listed once in the summary
50
- and never re-offered as fix-up tasks.
51
- <!-- /diy:when -->
52
-
53
- <!-- /orc:layer -->
1
+ # Phase — Review (id: `review`)
2
+
3
+ > **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
4
+ > this library at W13 when `orc-diy` became its second reader. A spine is loaded
5
+ > IN FULL when its skill activates; this is loaded when the phase fires, and most
6
+ > runs skip most phases.
7
+ >
8
+ > **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
9
+ > `composed` is what `orc diy compile` stitches — the same phase expressed as
10
+ > `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
11
+ > procedure. Reading the wrong one is the failure `README.md` names: a lane
12
+ > doing a phase its product promise says it does differently.
13
+ > `orc lane phases <lane> --json` names the layer for each lane.
14
+
15
+ <!-- orc:layer full -->
16
+
17
+ ## Review (load ../../orc/subskills/orc-review-verify/, spawned)
18
+
19
+ Emit `PHASE review start`. Superpowers path: its review skill incl. tests
20
+ (Sonnet 4.6 medium). OpenSpec/self path: review worker (Opus 5 medium). Pass the resolved
21
+ `code_pattern` + its invariants + gate lines for the re-check
22
+ (pattern-gate.md); no resolved pattern → FIRST ask for one (paste/md/none).
23
+ FE tasks in run → pass `fe_rules[]` from `../../orc-pattern/references/` fe-a11y
24
+ + fe-perf. **Code graph (`../code-graph.md` §7):** with the graph on, also pass
25
+ `orc graph changes --if-enabled --json` — the symbols THIS diff's hunks overlap,
26
+ each with its callers, its tests and a risk word that carries its own reason. It
27
+ replaces a whole-file `orc graph impact` here: a file card reports every symbol in
28
+ a touched file, and a symbol nobody edited is not a finding. An unchanged caller of
29
+ a changed signature is a finding candidate, anchored like any other. Findings arrive on the **P0–P3 ladder** (invariant violation or
30
+ unmet gate line = P0; every P0–P2 carries `file:line` + VERBATIM `quote`;
31
+ unanchored → P3). Apply hard rule 5 INCLUDING the quote spot-check: P0 →
32
+ auto-fix once · P1 → ask, then fix once · P2/P3 → record for Phase 7. Emit
33
+ `FINDING p0=<n> p1=<n> p2=<n> p3=<n>` on the return, then `PHASE review end`.
34
+
35
+ <!-- /orc:layer -->
36
+
37
+ <!-- orc:layer composed -->
38
+
39
+ ## Phase: Review
40
+
41
+ <!-- diy:when review=off -->
42
+ Code review is DISABLED in this flow. Say so in the run summary line ("review
43
+ skipped by flow config") — never imply the work was reviewed.
44
+ <!-- /diy:when -->
45
+ <!-- diy:when review=on -->
46
+ Dispatch the reviewer exactly as the full lane does — follow the review half
47
+ of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` (reviewer agent
48
+ `orc-reviewer-opus-5-med`; findings ride the severity ladder from the
49
+ locked rules, blocking and advisory findings both surfaced).
50
+ <!-- /diy:when -->
51
+ <!-- diy:when review=blocking-only -->
52
+ Dispatch the reviewer exactly as the full lane does — follow the review half
53
+ of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` — but only
54
+ P0/P1 findings gate anything; P2/P3 findings are listed once in the summary
55
+ and never re-offered as fix-up tasks.
56
+ <!-- /diy:when -->
57
+ <!-- diy:when code_graph=on -->
58
+ With the code graph on, the reviewer also gets the callers from
59
+ `orc graph changes --if-enabled --json` — an unchanged caller of a
60
+ changed signature is a finding candidate (`.claude/skills/_shared/code-graph.md` §7).
61
+ <!-- /diy:when -->
62
+
63
+ <!-- /orc:layer -->
@@ -1,88 +1,96 @@
1
- # Phase — Ship (id: `ship`)
2
-
3
- > **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
4
- > this library at W13 when `orc-diy` became its second reader. A spine is loaded
5
- > IN FULL when its skill activates; this is loaded when the phase fires, and most
6
- > runs skip most phases.
7
- >
8
- > **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
9
- > `composed` is what `orc diy compile` stitches — the same phase expressed as
10
- > `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
11
- > procedure. Reading the wrong one is the failure `README.md` names: a lane
12
- > doing a phase its product promise says it does differently.
13
- > `orc lane phases <lane> --json` names the layer for each lane.
14
-
15
- <!-- orc:layer full -->
16
-
17
- ## Ship (load ../../orc/subskills/orc-pr/SKILL.md)
18
-
19
- Emit `PHASE ship start`. Show current branch.
20
-
21
- **Stacked-PR gate FIRST (deterministic; full `/orc` + `/orc-ultra` only — load
22
- `../../orc/subskills/orc-pr/stack-gate.md`; never mini/fast/diy).** Measure the change
23
- (`git diff --numstat`, exclusions applied) vs config `stacked_pr_loc`/
24
- `stacked_pr_files`. Under threshold or `stacked_pr: off` → silent, ship normally
25
- (`GATE stack-gate pass :: under-threshold`). Tripped → surface report + ONE P0
26
- question (stack into layers? or one regular PR?) in the SAME round as its two
27
- prerequisites — **a ticket** and a resolved PR template
28
- (`_shared/pr-templates.md`; none found → recommend three options). No ticket, no
29
- template, or "no" → **one regular PR, never re-asked**. "Yes" → commit on the
30
- current branch (the driver's snapshot), write `stacked-pr/<slug>/STACK-FROM.md`
31
- (`_shared/stack-plan.md`, `ENTRY-MODE: orc-run`, this run's `RUN-DIR`), then hand
32
- off **`/orc-pr-setup`** → **`/orc-pr-driver`**. ORC never cuts layers itself.
33
-
34
- **Handoff seam (one sentence, only when it applies):** if any changed file is a
35
- GREEN surface in `orc handoff surfaces --json`, say so —
36
- *"2 of these were changes a PM could have made alone — `/orc-handoff` next time."*
37
- That sentence is how anyone finds out that lane exists.
38
-
39
- Then ask together: **commit? push? create PR?** (PR: ticket +
40
- title + target branch; generate from `../../orc/subskills/orc-pr/pr.md`). If Phase 6.5 ran,
41
- commit `test-generator/<change-slug>/` too (a user deliverable, never gitignored).
42
- **`mock-examples/` is NEVER staged** (drift-recovery.md; no `.gitignore` edit —
43
- just never `git add` it).
44
- On success: delete the ephemeral decision log; KEEP checkpoint + dispatch log.
45
- **Wiki stale-flag:** flag (never re-scan) wiki docs whose covered files this
46
- run changed; point at `/orc-wiki`. **Post-ship refresh ask** (BIG runs, /orc +
47
- /orc-ultra — the `wiki_refresh_ask_tasks`/`_files` triggers and full rules in
48
- `../../orc-wiki/references/staleness.md`): upgrade the passive note to **"Refresh
49
- wiki now?"**; on "later" print the prominent stale warning and stamp
50
- `wiki_refresh_declined` in the checkpoint. Then ALWAYS show the completion
51
- usage report — /usage limits + the full dispatch log (model/effort/score per
52
- subagent). The user must always know what the run cost. Finally emit
53
- `PHASE ship end`, then the one-line `STATS lane=… dispatches=… downgrades=…`
54
- summary (trace.md — what `orc stats` reads), then `FINISH :: <detail>`,
55
- and in ONE step delete BOTH `log_dir/.current` and the run's `RESUME.md` (that
56
- file existing is what marks a run unfinished — stop-resume.md).
57
-
58
- <!-- /orc:layer -->
59
-
60
- <!-- orc:layer composed -->
61
-
62
- ## Phase: Ship
63
-
64
- State the current branch and the change summary BEFORE any git action, and
65
- never ship on a red build (locked rule).
66
-
67
- <!-- diy:when ship_mode=ask -->
68
- Ask the user how to ship: commit, PR (via
69
- `.claude/skills/orc/subskills/orc-pr/SKILL.md`), or leave the working tree
70
- as-is. Default when auto-accepted by autonomy: leave as-is and report.
71
- <!-- /diy:when -->
72
- <!-- diy:when ship_mode=commit -->
73
- Commit the run's changes on a green gate without asking (branch first if on
74
- the default branch; conventional message from the intent). PRs only if the
75
- user asks afterwards.
76
- <!-- /diy:when -->
77
- <!-- diy:when ship_mode=pr -->
78
- On a green gate, create the PR without asking via
79
- `.claude/skills/orc/subskills/orc-pr/SKILL.md` (branch + commit + push + PR
80
- body from the run artifacts).
81
- <!-- /diy:when -->
82
- <!-- diy:when ship_mode=report-only -->
83
- NEVER commit or push in this flow. Leave the working tree modified, and end
84
- with the change report + suggested commit message the user can apply
85
- themselves.
86
- <!-- /diy:when -->
87
-
88
- <!-- /orc:layer -->
1
+ # Phase — Ship (id: `ship`)
2
+
3
+ > **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
4
+ > this library at W13 when `orc-diy` became its second reader. A spine is loaded
5
+ > IN FULL when its skill activates; this is loaded when the phase fires, and most
6
+ > runs skip most phases.
7
+ >
8
+ > **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
9
+ > `composed` is what `orc diy compile` stitches — the same phase expressed as
10
+ > `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
11
+ > procedure. Reading the wrong one is the failure `README.md` names: a lane
12
+ > doing a phase its product promise says it does differently.
13
+ > `orc lane phases <lane> --json` names the layer for each lane.
14
+
15
+ <!-- orc:layer full -->
16
+
17
+ ## Ship (load ../../orc/subskills/orc-pr/SKILL.md)
18
+
19
+ Emit `PHASE ship start`. Show current branch.
20
+
21
+ **Stacked-PR gate FIRST (deterministic; full `/orc` + `/orc-ultra` only — load
22
+ `../../orc/subskills/orc-pr/stack-gate.md`; never mini/fast/diy).** Measure the change
23
+ (`git diff --numstat`, exclusions applied) vs config `stacked_pr_loc`/
24
+ `stacked_pr_files`. Under threshold or `stacked_pr: off` → silent, ship normally
25
+ (`GATE stack-gate pass :: under-threshold`). Tripped → surface report + ONE P0
26
+ question (stack into layers? or one regular PR?) in the SAME round as its two
27
+ prerequisites — **a ticket** and a resolved PR template
28
+ (`_shared/pr-templates.md`; none found → recommend three options). No ticket, no
29
+ template, or "no" → **one regular PR, never re-asked**. "Yes" → commit on the
30
+ current branch (the driver's snapshot), write `stacked-pr/<slug>/STACK-FROM.md`
31
+ (`_shared/stack-plan.md`, `ENTRY-MODE: orc-run`, this run's `RUN-DIR`), then hand
32
+ off **`/orc-pr-setup`** → **`/orc-pr-driver`**. ORC never cuts layers itself.
33
+
34
+ **Handoff seam (one sentence, only when it applies):** if any changed file is a
35
+ GREEN surface in `orc handoff surfaces --json`, say so —
36
+ *"2 of these were changes a PM could have made alone — `/orc-handoff` next time."*
37
+ That sentence is how anyone finds out that lane exists.
38
+
39
+ Then ask together: **commit? push? create PR?** (PR: ticket +
40
+ title + target branch; generate from `../../orc/subskills/orc-pr/pr.md`). If Phase 6.5 ran,
41
+ commit `test-generator/<change-slug>/` too (a user deliverable, never gitignored).
42
+ **`mock-examples/` is NEVER staged** (drift-recovery.md; no `.gitignore` edit —
43
+ just never `git add` it).
44
+ On success: delete the ephemeral decision log; KEEP checkpoint + dispatch log.
45
+ **Wiki stale-flag:** flag (never re-scan) wiki docs whose covered files this
46
+ run changed; point at `/orc-wiki`. **Post-ship refresh ask** (BIG runs, /orc +
47
+ /orc-ultra — the `wiki_refresh_ask_tasks`/`_files` triggers and full rules in
48
+ `../../orc-wiki/references/staleness.md`): upgrade the passive note to **"Refresh
49
+ wiki now?"**; on "later" print the prominent stale warning and stamp
50
+ `wiki_refresh_declined` in the checkpoint. Then ALWAYS show the completion
51
+ usage report — /usage limits + the full dispatch log (model/effort/score per
52
+ subagent). The user must always know what the run cost. **Code graph
53
+ (`../code-graph.md` §5–§6):** run `orc graph update --if-enabled` once more —
54
+ fix rounds move code — and emit `GRAPH-UPDATE`; then run `orc graph notes pending
55
+ --files <every path the run changed> --at end --if-enabled` — exit 0 → one noter
56
+ dispatch, exit 3 or 5 → nothing. Finally emit
57
+ `PHASE ship end`, then the one-line `STATS lane=… dispatches=… downgrades=…`
58
+ summary (trace.md — what `orc stats` reads), then `FINISH :: <detail>`,
59
+ and in ONE step delete BOTH `log_dir/.current` and the run's `RESUME.md` (that
60
+ file existing is what marks a run unfinished — stop-resume.md).
61
+
62
+ <!-- /orc:layer -->
63
+
64
+ <!-- orc:layer composed -->
65
+
66
+ ## Phase: Ship
67
+
68
+ State the current branch and the change summary BEFORE any git action, and
69
+ never ship on a red build (locked rule).
70
+
71
+ <!-- diy:when code_graph=on -->
72
+ Before the ship action, run `orc graph update --if-enabled` once more — fix rounds
73
+ move code (`.claude/skills/_shared/code-graph.md` §5).
74
+ <!-- /diy:when -->
75
+ <!-- diy:when ship_mode=ask -->
76
+ Ask the user how to ship: commit, PR (via
77
+ `.claude/skills/orc/subskills/orc-pr/SKILL.md`), or leave the working tree
78
+ as-is. Default when auto-accepted by autonomy: leave as-is and report.
79
+ <!-- /diy:when -->
80
+ <!-- diy:when ship_mode=commit -->
81
+ Commit the run's changes on a green gate without asking (branch first if on
82
+ the default branch; conventional message from the intent). PRs only if the
83
+ user asks afterwards.
84
+ <!-- /diy:when -->
85
+ <!-- diy:when ship_mode=pr -->
86
+ On a green gate, create the PR without asking via
87
+ `.claude/skills/orc/subskills/orc-pr/SKILL.md` (branch + commit + push + PR
88
+ body from the run artifacts).
89
+ <!-- /diy:when -->
90
+ <!-- diy:when ship_mode=report-only -->
91
+ NEVER commit or push in this flow. Leave the working tree modified, and end
92
+ with the change report + suggested commit message the user can apply
93
+ themselves.
94
+ <!-- /diy:when -->
95
+
96
+ <!-- /orc:layer -->
@@ -231,6 +231,12 @@ supplies the fact in a packet, the writer writes the line. `SPAWN`, `RETURN` and
231
231
  | `CONFIG <key=value …>` | orc → writer | Phase 1 — the resolved config values this run will consume (ALWAYS `opus5_only` — it selects the executor table AND every fixed role, so retro can segment outcomes by dispatch mode). Runtime proof that the run honored the config; `/orc-retro` audits it against behavior |
232
232
  | `WIKI-CONSULT <tier> :: docs=<list>` | orc → writer | project wiki consulted for grounding (full/mini at planning; fast at slice-build) — tier ∈ `fresh` \| `aging` \| `stale` \| `absent` \| `empty`; `docs=` the pages pulled/handed to the executor (comma list) or `none`. Records whether the run grounded in the wiki and whether it was stale (surfaces grounding + staleness for later audit) |
233
233
  | `CROSSLINK <state> :: boundaries=<n> peers=<names>` | orc → writer | cross-repo peer-knowledge state at the consult point — state ∈ `cached` (peer cache present) \| `configured-no-cache` (crosslink configured but the cache is not built) \| `none`. Per-task `CROSSLINK inject task=<id> :: <boundary>` when a slice receives a linked contract. Records whether peer contracts were injected this run (full orc consumes only the pre-built crosslink cache — it never reads peer source live; mechanism in `wiki-consult.md`) |
234
+ | `GRAPH-CONSULT <state> :: files=<n> symbols=<n>` | orc → writer | the code graph's preflight state (`code-graph.md` §4) — state ∈ `fresh` \| `updated` \| `built` \| `drifted` \| `none` \| `off`. Copied VERBATIM from the `trace` field of `orc graph status --heal --json`; a `GATE` line that describes the graph in other words does not replace it. Plus `GRAPH-CONSULT card task=<id> :: targets=<…>` (the `trace` of `orc graph ctx --json`, with `task=` added) when a slice receives cards |
235
+ | `GRAPH-UPDATE <state> :: parsed=<n> reused=<n> deleted=<n> gen=<n> route=<n> ms=<n>` | orc → writer | one graph update at a wave close, a green smoke gate, a code-writing `/orc-quick` request, or ship — the `trace` field of `orc graph update --json`, verbatim. The graph HOOK writes its own `GRAPH-UPDATE … :: by=hook …` lines directly; never copy one of those, it is already in the file |
236
+ | `GRAPH-CHANGES <found\|none> :: symbols=<n> high=<n> medium=<n> low=<n> gen=<n>` | orc → writer | one line at review — the `trace` field of `orc graph changes --json`, verbatim. `high` counts symbols that are exported, have three or more callers and NO test reaching them |
237
+ | `GRAPH-COCHANGE <found\|none> :: rows=<n> commits=<n>` | orc → writer | one line per planning batch, not per file — the `trace` field of `orc graph cochange --json` for the file that produced the widest answer |
238
+ | `GRAPH-HINT injected=<n> subagent_start=<n> read_notes=<n> updates=<n>` | orc → writer | ONE line per phase close, not one per hint — the counters `orc-graph-hook.js` keeps in `<log_dir>/<run>.graph-hook.json`. Omitted when the file does not exist (the hook is off, or it never had anything to say) |
239
+ | `GRAPH-NOTES <applied\|below-min\|none\|deferred\|off\|skipped> :: <detail>` | orc → writer | one notes batch: the noter's ONE-line return copied verbatim (`applied`), the `trace` field of `orc graph notes pending --json` when it exited 3 or 5, `skipped` under the Opus-5-only mode |
234
240
  | `SPAWN <agent>` | hook | an agent dispatch was observed (skeleton) |
235
241
  | `RETURN <agent> :: <desc> dur=<m>m<s>s [model=<id>]` | hook | a subagent finished (skeleton). The hook attributes the RETURN to the finishing agent from the SubagentStop payload (`~<agent>` = approximate FIFO match on older Claude Code that omits `agent_type`; `~agent :: unattributed` = ≥2 agents in flight, so it deliberately claimed NO pending record rather than starve the right one), echoes the SPAWN's desc + wall-clock duration, and appends `model=<id>` when the return's `actual_model` is visible in the last message. A duplicate stop for an agent whose record was already consumed is DROPPED, never written as a desc-less RETURN. Still hook-written skeleton — NOT an orchestrator obligation; the authoritative model check is the `VERIFY` line |
236
242
  | `DISPATCH <agent> :: <task> expect=<model>/<effort>` | orc → writer | orchestrator dispatched a named agent (the claim). **A FOREIGN dispatch appends `via=extra:<profile>`** and its `expect=` names the profile's model rather than a Claude tier — additive, the way `/orc-doc`'s `sections=` was. A foreign worker is not a Claude subagent, so the hook emits NO `SPAWN` and NO `RETURN` for it (P7, the `/orc-quick` ad-hoc-recon precedent): this line and `EXTRA` are the whole record, which is why neither is optional. **The `/orc-doc` lane's tail NAMES ITS SECTIONS** (v0.49.2) — `doc write sections=03-scope,04-risks part=sections/03-scope.md`, `doc check sections=03-goals`, `doc digest source=<path>` — which is the only thing that makes `orc doc cost`'s per-section attribution honest rather than a guess. It is additive: the tail was already captured whole |