@azure-id/orc 1.9.2 → 2.0.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 (172) hide show
  1. package/CHANGELOG.md +321 -0
  2. package/README-id.md +21 -36
  3. package/README.md +25 -36
  4. package/bin/build-agents.js +117 -20
  5. package/bin/cli.js +725 -29
  6. package/bin/gotcha-import.js +1081 -0
  7. package/bin/gotcha.js +1286 -0
  8. package/bin/graph-query.js +1 -1
  9. package/bin/graph.js +717 -717
  10. package/bin/habit.js +1453 -0
  11. package/bin/mockrun-catalog.js +281 -276
  12. package/bin/run-undo.js +398 -0
  13. package/bin/trace-write.js +657 -0
  14. package/bin/verify-contracts.js +525 -79
  15. package/bin/verify-package.js +51 -4
  16. package/bin/webui/api.js +26 -0
  17. package/bin/webui/app.html +239 -232
  18. package/bin/webui/css/00-tokens.css +110 -92
  19. package/bin/webui/css/04-motion.css +87 -0
  20. package/bin/webui/css/06-responsive.css +203 -178
  21. package/bin/webui/css/panels/behaviour.css +205 -0
  22. package/bin/webui/fixtures/behaviour.js +532 -0
  23. package/bin/webui/fixtures/index.js +34 -0
  24. package/bin/webui/fixtures/knowledge.js +7 -1
  25. package/bin/webui/fixtures/stats.js +16 -0
  26. package/bin/webui/i18n/en/behaviour.json +143 -0
  27. package/bin/webui/i18n/en/nav.json +25 -24
  28. package/bin/webui/i18n/en/tour.json +37 -35
  29. package/bin/webui/i18n/id/behaviour.json +143 -0
  30. package/bin/webui/i18n/id/nav.json +25 -24
  31. package/bin/webui/i18n/id/tour.json +37 -35
  32. package/bin/webui/js/01-i18n.js +155 -154
  33. package/bin/webui/js/90-tour.js +498 -494
  34. package/bin/webui/js/91-shortcuts.js +126 -126
  35. package/bin/webui/js/99-boot.js +121 -118
  36. package/bin/webui/js/panels/behaviour.js +1022 -0
  37. package/mock-run/INDEX.md +109 -107
  38. package/mock-run/gotcha-import.md +118 -0
  39. package/mock-run/habits.md +129 -0
  40. package/mock-run/orc-quick.md +6 -1
  41. package/package.json +1 -1
  42. package/templates/agents/MODEL-MAPPING.md +7 -7
  43. package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
  44. package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
  45. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +1 -4
  46. package/templates/agents/orc-claude-writer-opus-4-8-high.md +48 -53
  47. package/templates/agents/orc-claude-writer-opus-5-med.md +1 -8
  48. package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
  49. package/templates/agents/orc-executor-haiku-4-5.md +14 -6
  50. package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
  51. package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
  52. package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
  53. package/templates/agents/orc-executor-opus-5-high.md +14 -6
  54. package/templates/agents/orc-executor-opus-5-low.md +14 -6
  55. package/templates/agents/orc-executor-opus-5-med.md +14 -6
  56. package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
  57. package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
  58. package/templates/agents/orc-executor-sonnet-5-high.md +14 -6
  59. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
  60. package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
  61. package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
  62. package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
  63. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
  64. package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
  65. package/templates/agents/orc-planner-mini-sonnet-5-high.md +1 -2
  66. package/templates/agents/orc-planner-opus-5-med.md +1 -4
  67. package/templates/agents/orc-recon-opus-5-low.md +1 -8
  68. package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
  69. package/templates/agents/orc-retro-opus-5-med.md +6 -8
  70. package/templates/agents/orc-retro-sonnet-5-high.md +6 -7
  71. package/templates/agents/orc-reviewer-opus-5-med.md +52 -16
  72. package/templates/agents/orc-scout-opus-5-low.md +1 -6
  73. package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
  74. package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
  75. package/templates/agents/orc-test-author-opus-5-med.md +4 -5
  76. package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
  77. package/templates/agents/orc-verifier-opus-5-med.md +16 -8
  78. package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +74 -79
  79. package/templates/agents/orc-wiki-scanner-opus-5-med.md +1 -8
  80. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
  81. package/templates/commands/orc-analyze.md +13 -21
  82. package/templates/commands/orc-fast.md +10 -15
  83. package/templates/commands/orc-poly.md +12 -21
  84. package/templates/commands/orc-pr-driver.md +11 -30
  85. package/templates/commands/orc-pr-setup.md +10 -31
  86. package/templates/commands/orc-route.md +11 -41
  87. package/templates/commands/orc-test.md +5 -60
  88. package/templates/hooks/README.md +34 -0
  89. package/templates/hooks/orc-session-hook.js +264 -0
  90. package/templates/hooks/orc-statusline.js +3 -1
  91. package/templates/skills/_shared/README.md +9 -0
  92. package/templates/skills/_shared/code-graph.md +47 -55
  93. package/templates/skills/_shared/config-precedence.md +3 -1
  94. package/templates/skills/_shared/extra-dispatch.md +73 -88
  95. package/templates/skills/_shared/gotchas.md +228 -177
  96. package/templates/skills/_shared/habits.md +101 -0
  97. package/templates/skills/_shared/lane-contract.md +84 -0
  98. package/templates/skills/_shared/phases/README.md +142 -83
  99. package/templates/skills/_shared/phases/analyst-gates.md +10 -21
  100. package/templates/skills/_shared/phases/execution.md +8 -14
  101. package/templates/skills/_shared/phases/house-rules.md +27 -32
  102. package/templates/skills/_shared/phases/intake.md +127 -133
  103. package/templates/skills/_shared/phases/mock-example.md +46 -56
  104. package/templates/skills/_shared/phases/plan-handoff.md +91 -97
  105. package/templates/skills/_shared/phases/planning.md +7 -17
  106. package/templates/skills/_shared/phases/preflight.md +19 -42
  107. package/templates/skills/_shared/phases/review.md +23 -27
  108. package/templates/skills/_shared/phases/rules.md +18 -42
  109. package/templates/skills/_shared/phases/scoring.md +55 -65
  110. package/templates/skills/_shared/phases/security-checklist.md +46 -50
  111. package/templates/skills/_shared/phases/security.md +45 -55
  112. package/templates/skills/_shared/phases/ship.md +6 -15
  113. package/templates/skills/_shared/phases/stop-resume.md +2 -5
  114. package/templates/skills/_shared/phases/summary.md +73 -48
  115. package/templates/skills/_shared/phases/testgen.md +41 -51
  116. package/templates/skills/_shared/phases/trace-verbs.md +433 -0
  117. package/templates/skills/_shared/phases/trace.md +136 -367
  118. package/templates/skills/_shared/phases/verify.md +62 -70
  119. package/templates/skills/_shared/phases/wave-grouping.md +128 -133
  120. package/templates/skills/_shared/phases/wiki-consult.md +10 -6
  121. package/templates/skills/_shared/read-ladder.md +2 -55
  122. package/templates/skills/_shared/return-validation.md +17 -70
  123. package/templates/skills/_shared/review-slice.md +79 -0
  124. package/templates/skills/_shared/smoke-gate.md +46 -28
  125. package/templates/skills/context-combiner/SKILL.md +15 -44
  126. package/templates/skills/orc/SKILL.md +34 -62
  127. package/templates/skills/orc/references/pattern-gate.md +89 -89
  128. package/templates/skills/orc/references/phases/intake.md +41 -47
  129. package/templates/skills/orc/references/phases/integration.md +13 -19
  130. package/templates/skills/orc/references/preflight-report.md +8 -9
  131. package/templates/skills/orc/references/ultra-mode.md +8 -6
  132. package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
  133. package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
  134. package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
  135. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +11 -52
  136. package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
  137. package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
  138. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
  139. package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
  140. package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
  141. package/templates/skills/orc-advisor/SKILL.md +56 -60
  142. package/templates/skills/orc-analyze/SKILL.md +30 -66
  143. package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
  144. package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
  145. package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
  146. package/templates/skills/orc-diy/README.md +31 -0
  147. package/templates/skills/orc-diy/SKILL.md +23 -74
  148. package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
  149. package/templates/skills/orc-fast/SKILL.md +44 -72
  150. package/templates/skills/orc-judge/SKILL.md +77 -82
  151. package/templates/skills/orc-mini/SKILL.md +61 -109
  152. package/templates/skills/orc-pattern/SKILL.md +27 -48
  153. package/templates/skills/orc-poly/SKILL.md +32 -61
  154. package/templates/skills/orc-pr-driver/SKILL.md +25 -51
  155. package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
  156. package/templates/skills/orc-pr-setup/SKILL.md +20 -45
  157. package/templates/skills/orc-quick/README.md +43 -2
  158. package/templates/skills/orc-quick/SKILL.md +76 -107
  159. package/templates/skills/orc-quick/references/dispatch-gate.md +16 -5
  160. package/templates/skills/orc-quick/references/gh-mode.md +48 -1
  161. package/templates/skills/orc-quick/references/look.md +3 -1
  162. package/templates/skills/orc-retro/SKILL.md +19 -18
  163. package/templates/skills/orc-retro/examples/retro-mock.md +1 -1
  164. package/templates/skills/orc-route/SKILL.md +25 -45
  165. package/templates/skills/orc-test/SKILL.md +16 -37
  166. package/templates/skills/orc-verify/SKILL.md +14 -32
  167. package/templates/skills/orc-wait/SKILL.md +156 -163
  168. package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -6
  169. package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
  170. package/templates/skills/orc-wiki/references/phases/phase-2.md +1 -6
  171. package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
  172. package/templates/skills/orc-wiki/references/phases/phase-3c.md +1 -6
@@ -1,83 +1,142 @@
1
- # `_shared/phases/` — one copy of a phase, and a manifest per lane
2
-
3
- This directory is NOT a skill and NOT a lane. It holds the single canonical copy
4
- of a phase that **two or more lanes run**. A lane's spine keeps its identity, its
5
- trigger, its own hard rules and its own phases — and for a shared phase it keeps
6
- only a POINTER plus that lane's own deltas.
7
-
8
- **The CLI owns the pipeline, not the prose.** `orc lane phases <lane> [--json]`
9
- is the manifest: the ordered phase list, the file each phase lives in, the layers
10
- that lane reads, the catalogued calls it makes, and when to read it. A skill
11
- never derives the phase list or its order from these filenames — the same rule
12
- the Flow stepper follows, for the same reason: *a second idea of the pipeline is
13
- the drift this exists to make impossible.*
14
-
15
- ## What belongs here — the rule is mechanical
16
-
17
- > A file under `templates/skills/<lane>/` that a file in a DIFFERENT lane already
18
- > points at belongs here. **A file with exactly one consumer stays home.**
19
-
20
- That is auditable by grep, which is what makes it a lint rather than an opinion.
21
- `bin/verify-contracts.js` asserts both halves: nothing under a lane folder may be
22
- pointed at from another lane, and every file here must be claimed by **≥2 lanes**.
23
-
24
- Centralizing a one-consumer file is centralizing for its own sake, and it costs a
25
- lane its own wording for nothing.
26
-
27
- ## The layer set is CLOSED
28
-
29
- A phase file may be cut into layers with the same marker grammar `orc diy
30
- compile` already parses (`<!-- diy:when key=value -->`):
31
-
32
- ```markdown
33
- <!-- orc:layer core -->
34
- Every lane that runs this phase does this. Never optional.
35
- <!-- /orc:layer -->
36
-
37
- <!-- orc:layer trim -->
38
- orc-mini / orc-fast: ONE executor, no waves. This is a REDUCTION and it is
39
- deliberate — do not read the `full` layer here.
40
- <!-- /orc:layer -->
41
- ```
42
-
43
- | Layer | Read by | Meaning |
44
- |---|---|---|
45
- | `core` | every lane running this phase | the invariant. Never optional |
46
- | `full` | `/orc`, `/orc-ultra` | the complete procedure |
47
- | `trim` | `orc-mini`, `orc-fast` | an explicit REDUCTION, stated as one |
48
- | `composed` | `orc-diy` | what `orc diy compile` stitches |
49
-
50
- **Four names, closed. A fifth layer is a lint failure, not a feature** — free
51
- markers are drift with extra steps. A lane reads `core` plus at most one other
52
- layer, and `orc lane phases` tells it which.
53
-
54
- **Why the set exists at all:** the single biggest way this library breaks ORC is
55
- `orc-mini` reading a shared `review.md` written for the full lane and starting to
56
- do a full code review. Mini's product promise is that it *skips* review.
57
- Centralizing without layers does not just cost tokens — it changes behaviour. So
58
- **a `trim` layer must say what it drops and that dropping it is deliberate.**
59
-
60
- **A single-layer file is a legitimate answer.** `trace.md` and `stop-resume.md`
61
- declare `core` only: their procedure really is identical in every lane that runs
62
- them, and what varies is DATA (the tier table, the lane token), not prose. Cutting
63
- them into layers to look symmetrical would be inventing structure the phase does
64
- not have.
65
-
66
- ## Pointer discipline
67
-
68
- Every pointer a spine adds declares `when` and `read` — the partial-read rules in
69
- `../read-ladder.md`. `on-phase` is the default; `always` must be justified in the
70
- release's findings; a `read:` names a HEADING and **never a line number**
71
- (`/orc-doc` rule 2 — a stored line number is a wrong line number one edit later).
72
-
73
- ## What is here
74
-
75
- | File | id | Layers | Lanes |
76
- |---|---|---|---|
77
- | `trace.md` | `trace` | `core` | every trace-owning lane (28) |
78
- | `preflight.md` | `preflight` | `core`, `full` | the silent-probe lanes (15) |
79
- | `stop-resume.md` | `stop-resume` | `core` | `orc`, `orc-wiki`, `orc-diy` |
80
- | `rules.md` | `rules` | `core` | every lane that writes words or code (28) — **never `orc-doc`** |
81
-
82
- `orc lane phases --all --json` is the authoritative list; this table is a
83
- human index of it.
1
+ # `_shared/phases/` — one copy of a phase, and a manifest per lane
2
+
3
+ This directory is NOT a skill and NOT a lane. It holds the single canonical copy
4
+ of a phase that **two or more lanes run**. A lane's spine keeps its identity, its
5
+ trigger, its own hard rules and its own phases — and for a shared phase it keeps
6
+ only a POINTER plus that lane's own deltas.
7
+
8
+ **The CLI owns the pipeline, not the prose.** `orc lane phases <lane> [--json]`
9
+ is the manifest: the ordered phase list, the file each phase lives in, the layers
10
+ that lane reads, the catalogued calls it makes, and when to read it. A skill
11
+ never derives the phase list or its order from these filenames — the same rule
12
+ the Flow stepper follows, for the same reason: *a second idea of the pipeline is
13
+ the drift this exists to make impossible.*
14
+
15
+ ## What belongs here — the rule is mechanical
16
+
17
+ > A file under `templates/skills/<lane>/` that a file in a DIFFERENT lane already
18
+ > points at belongs here. **A file with exactly one consumer stays home.**
19
+
20
+ That is auditable by grep, which is what makes it a lint rather than an opinion.
21
+ `bin/verify-contracts.js` asserts both halves: nothing under a lane folder may be
22
+ pointed at from another lane, and every file here must be claimed by **≥2 lanes**.
23
+
24
+ Centralizing a one-consumer file is centralizing for its own sake, and it costs a
25
+ lane its own wording for nothing.
26
+
27
+ ## The layer set is CLOSED
28
+
29
+ A phase file may be cut into layers with the same marker grammar `orc diy
30
+ compile` already parses (`<!-- diy:when key=value -->`):
31
+
32
+ ```markdown
33
+ <!-- orc:layer core -->
34
+ Every lane that runs this phase does this. Never optional.
35
+ <!-- /orc:layer -->
36
+
37
+ <!-- orc:layer trim -->
38
+ orc-mini / orc-fast: ONE executor, no waves. This is a REDUCTION and it is
39
+ deliberate — do not read the `full` layer here.
40
+ <!-- /orc:layer -->
41
+ ```
42
+
43
+ | Layer | Read by | Meaning |
44
+ |---|---|---|
45
+ | `core` | every lane running this phase | the invariant. Never optional |
46
+ | `full` | `/orc`, `/orc-ultra` | the complete procedure |
47
+ | `trim` | `orc-mini`, `orc-fast` | an explicit REDUCTION, stated as one |
48
+ | `composed` | `orc-diy` | what `orc diy compile` stitches |
49
+
50
+ **Four names, closed. A fifth layer is a lint failure, not a feature** — free
51
+ markers are drift with extra steps. A lane reads `core` plus at most one other
52
+ layer, and `orc lane phases` tells it which.
53
+
54
+ **Why the set exists at all:** the single biggest way this library breaks ORC is
55
+ `orc-mini` reading a shared `review.md` written for the full lane and starting to
56
+ do a full code review. Mini's product promise is that it *skips* review.
57
+ Centralizing without layers does not just cost tokens — it changes behaviour. So
58
+ **a `trim` layer must say what it drops and that dropping it is deliberate.**
59
+
60
+ **A single-layer file is a legitimate answer.** `trace.md` and `stop-resume.md`
61
+ declare `core` only: their procedure really is identical in every lane that runs
62
+ them, and what varies is DATA (the tier table, the lane token), not prose. Cutting
63
+ them into layers to look symmetrical would be inventing structure the phase does
64
+ not have.
65
+
66
+ ## Pointer discipline — the partial-read rules (v1.0.0 W10)
67
+
68
+ Every pointer a spine adds declares `when` and `read`. `on-phase` is the
69
+ default; `always` must be justified in the release's findings; a `read:` names
70
+ a HEADING and **never a line number** (`/orc-doc` rule 2 — a stored line number
71
+ is a wrong line number one edit later). **Rule of 2.0.0:** every new shared file
72
+ is `on-phase` or `on-demand`, never `always`, and a new CLI answer is brief by
73
+ default (the full rows only on request). This section is for the
74
+ ORCHESTRATOR; an executor or a recon agent reads only `../read-ladder.md`.
75
+
76
+ ### Reading ORC's own payload
77
+
78
+ The read ladder (`../read-ladder.md`) is about reading the PROJECT. It
79
+ applies unchanged to reading ORC's own files, and it has to: a lane manifest of
80
+ pointers that every lane dutifully reads whole is MORE round-trips than the prose it replaced, for the
81
+ same bytes. Centralizing prose and then reading all of it is a slower payload,
82
+ not a smaller one.
83
+
84
+ So every pointer a lane carries declares three things.
85
+
86
+ | Declaration | Values | Means |
87
+ |---|---|---|
88
+ | `when` | `always` · `on-phase` · `on-state` · `on-demand` · `compile-time` | WHETHER to open it at all |
89
+ | `read` | `layer` · `section` · `whole` | HOW MUCH to open |
90
+ | `layers` | `core` · `full` · `trim` · `composed` | WHICH part, when `read: layer` |
91
+
92
+ #### The five rules that make it honest
93
+
94
+ 1. **`on-phase` is the default, and `always` must be justified.** A file every
95
+ lane always loads has saved nothing by moving. Each `always` pointer is
96
+ named in the wave that adds it.
97
+ 2. **`read: section` names a HEADING, never a line number.** A stored line
98
+ number is a wrong line number one edit later; a heading anchor survives an
99
+ edit above it. This is why a shared file's headings are part of its
100
+ contract — renaming one breaks every pointer into it.
101
+ 3. **A trimmed lane reads `core` plus its OWN layer, and never the `full`
102
+ layer.** Reading a neighbouring layer "for context" is the bleed this rule
103
+ exists to stop: the layer boundary is the product promise, not a suggestion.
104
+ 4. **The two exceptions of `../read-ladder.md` carry over unchanged.** A file
105
+ you will EDIT is read in full, first, always; and output a gate parses is read whole.
106
+ 5. **`compile-time` is not a run-time read at all.** `orc-diy` is a declared
107
+ reader of ten shared phases and opens none of them during a run: the `orc
108
+ diy compile` CLI reads their `composed` layer once and stitches it into
109
+ `FLOW-COMPILED.md`, which is the only spine that run then follows. Saying
110
+ `on-phase` there would describe a read that never happens, and a manifest
111
+ that describes a run nobody performs is the drift it exists to prevent
112
+ (v1.0.0 W13).
113
+
114
+ #### The honest limit
115
+
116
+ A partial read saves round-trips and bytes for the lanes that SKIP a phase. It
117
+ does **not** make a phase cheaper for the lane that runs it — that lane reads
118
+ its layers whole. Any claim otherwise has to show the measurement.
119
+
120
+ ### Why the ladder exists
121
+
122
+ ORC's cost is dominated by parallel reading, not by thinking: up to `max_scouts`
123
+ scouts at once, a wiki scan that is expensive by design, and every executor in a
124
+ wave opening its declared files. A role that opens a 900-line file to learn one
125
+ function's shape has spent the run's budget on bytes nobody needed. Reading more
126
+ is not understanding more.
127
+
128
+ What a lane INVOKES, and what each exit code means, is not in this file: that is
129
+ `orc lane calls <lane> --json`, whose catalogue is the one copy of every call
130
+ two or more lanes share.
131
+
132
+ ## What is here
133
+
134
+ | File | id | Layers | Lanes |
135
+ |---|---|---|---|
136
+ | `trace.md` | `trace` | `core` | every trace-owning lane (28) |
137
+ | `preflight.md` | `preflight` | `core`, `full` | the silent-probe lanes (15) |
138
+ | `stop-resume.md` | `stop-resume` | `core` | `orc`, `orc-wiki`, `orc-diy` |
139
+ | `rules.md` | `rules` | `core` | every lane that writes words or code (28) — **never `orc-doc`** |
140
+
141
+ `orc lane phases --all --json` is the authoritative list; this table is a
142
+ human index of it.
@@ -1,11 +1,6 @@
1
1
  # Phase — Analyst & plan gates (id: `analyst-gates`)
2
2
 
3
- > **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
4
- > private `references/`, and other lanes already reached across into it. Read
5
- > by `orc`, `orc-analyze`, `orc-mini`. Layers declared: `core` only — single-
6
- > layer because these are the orchestrator-side gates on a returned analysis
7
- > or plan, and a trimmed lane runs fewer of them rather than different ones.
8
- > `orc lane phases <lane> --json` names the file and the layers to read.
3
+ > **Library file** (`orc`, `orc-analyze`, `orc-mini`), `core` only: the orchestrator-side gates on a returned analysis or plan — a trimmed lane runs fewer of them, never different ones.
9
4
 
10
5
  <!-- orc:layer core -->
11
6
  ## Reference — Analyst, Combiner & Plan Gates (orchestrator side)
@@ -33,13 +28,8 @@ analyze; you only dispatch and relay.
33
28
 
34
29
  1. **Evidence spot-check:** Glob every `files[]` path in the spec +
35
30
  Grep-verify the quoted snippet on **EVERY quote-anchored ref, whatever its
36
- `status`** (v0.34.6). It used to check only `exists|conflict` — but the two
37
- statuses a GOOD audit most often produces are `resolved` (a challenged row
38
- the user decided) and `buildable` (the actual work), so a correctly-triaged
39
- analysis was the one the gate barely checked: a real spec had zero
40
- `exists|conflict` rows, so the mandated verification covered 0 of 5 refs and
41
- a `file:5` citing a quote that lives at `file:4` went through. It is one
42
- Grep per ref, and it is the ONLY mechanical defence against a wrong line
31
+ `status`** — `resolved` and `buildable` included: they are the rows a GOOD
32
+ audit produces most. It is one Grep per ref, and it is the ONLY mechanical defence against a wrong line
43
33
  number reaching the planner. Note the causal shape: that ref started as a
44
34
  line RANGE with no quote (auto-UNVERIFIED per hard rule 2); narrowing it to
45
35
  one line + quote was the CORRECT fix and is what introduced the off-by-one —
@@ -54,7 +44,7 @@ lacks `scope_closed: true` (a one-Grep check).
54
44
 
55
45
  ## Combiner tracking (yours; full lane only)
56
46
 
57
- `context-combiner` (`orc-context-combiner-opus-5-high` — Opus 5.5 high, v0.34.0)
47
+ `context-combiner` (`orc-context-combiner-opus-5-high` — Opus 5.5 high)
58
48
  merges 2+ RELATED, already-confirmed
59
49
  analyses from the same run into ONE combined requirement-spec before build.
60
50
 
@@ -93,7 +83,7 @@ proceed-with-flagged.
93
83
  over `declared_files` (two tasks sharing a file need a serializing dep or a
94
84
  merge). Both trivial at ≤ 20 tasks — never trust the planner's self-check
95
85
  alone.
96
- 4. **TDD/test-task collision (v0.34.4):** a `tdd_spec` entry whose target file
86
+ 4. **TDD/test-task collision:** a `tdd_spec` entry whose target file
97
87
  is in the `declared_files` of a task whose `facets.test_surface` is
98
88
  `new-tests` is a miss. The paired TDD task materializes `tdd_spec` BEFORE the
99
89
  task it guards, so that task's planned work is already on disk and
@@ -101,14 +91,14 @@ proceed-with-flagged.
101
91
  no-op, silently drop promised coverage, or re-slice mid-run). The planner
102
92
  authored both mechanisms and folds them together itself: extend the
103
93
  materialized file, never re-author it.
104
- 5. **TDD disposition gate (v0.41.0)** — this gate is what lets TDD be skipped
94
+ 5. **TDD disposition gate** — this gate is what lets TDD be skipped
105
95
  safely. Skipping a test is cheap to claim and expensive to get wrong, so
106
96
  every skip must be checkable, and it is checked in BOTH directions: a rule
107
97
  that only ever prevents tests is a rule that deletes coverage.
108
98
  - `disposition` outside the closed set
109
99
  `new-surface | behavior-change | covered-by-existing | no-behavior | no-runner`
110
- → miss. (Absent on a pre-v0.41.0 plan → derive from `kind`; never bounce an
111
- old plan — see the legacy exception below.)
100
+ → miss. (No `disposition` on an entry → derive it from `kind`; never bounce
101
+ the plan — see the legacy exception below.)
112
102
  - `covered-by-existing` **without a resolvable `covered_by`** → miss. Glob the
113
103
  cited `path` exactly as check 1 does for `disposition: exists`. "A test
114
104
  already covers this" is the one claim that, if false, silently removes
@@ -128,9 +118,8 @@ proceed-with-flagged.
128
118
 
129
119
  Any miss → the plan is malformed: bounce it back to the planner WITH the miss
130
120
  list (one retry), then escalate to the user. **Legacy exception:** a
131
- pre-v0.7.0 plan resumed from an old checkpoint has no `grounding[]`
132
- (pre-v0.9.0: no `requirements[]`/`spec_invariants[]`; pre-v0.41.0: no
133
- `disposition`) — resume it without the
121
+ plan resumed from an old checkpoint may lack `grounding[]`,
122
+ `requirements[]`/`spec_invariants[]` or `disposition` — resume it without the
134
123
  missing checks; never bounce an old plan.
135
124
 
136
125
  <!-- /orc:layer -->
@@ -1,16 +1,6 @@
1
1
  # Phase — Execution (id: `execution`)
2
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.
3
+ > **Shared phase file** — read when the phase fires. A lane reads ONE layer: `full` (`/orc`) or `composed` (the `<!-- diy:when -->` variants `orc diy compile` stitches). `orc lane phases <lane> --json` names it.
14
4
 
15
5
  <!-- orc:layer full -->
16
6
 
@@ -60,8 +50,12 @@ the codifier); hold resolved patterns in run state.
60
50
  `trace_extras[]` entry VERBATIM into the packet — the CLI composes them, and the
61
51
  hook emits NO `SPAWN`/`RETURN` for a foreign worker, so they are the whole record.
62
52
  2. Record worker milestone pings (they bound what a mid-wave stop can save).
63
- 3. Collect returns; VALIDATE each (emit `VERIFY <task> actual=<model>/<effort>`
64
- ✅ MATCH / ⛔ DOWNGRADE per return — surface any downgrade to the user).
53
+ 3. Collect returns; VALIDATE each — read `_shared/return-validation.md` §1–§3,
54
+ then ONLY the § of each field the slice carried (§4 `pattern`, §5 `tdd_spec`,
55
+ §5b wiki, §5b.1 graph, §5c `rules_card`, §5d `repro`); §0 only before a
56
+ re-dispatch, §6 only after the wave, §7 only on a repair loop. Emit
57
+ `VERIFY <task> actual=<model>/<effort>` ✅ MATCH / ⛔ DOWNGRADE per return —
58
+ surface any downgrade to the user.
65
59
  **A FOREIGN return runs `_shared/return-validation.md` §2b INSTEAD of §2** — it
66
60
  has no injected model-id line, so it cannot carry `actual_model` and faking one
67
61
  claims evidence that does not exist; ⛔ SUBSTITUTION replaces the downgrade
@@ -106,7 +100,7 @@ invalidates a DONE task → re-run once, then set every reverse-`depends_on`
106
100
  consumer to `stale_review`. **Worker failure/garbage/timeout:** flag +
107
101
  continue the wave; audit and re-dispatch at the next batch checkpoint
108
102
 
109
- **Before any re-dispatch, run `orc run inflight`** (0 clear · 1 in-flight · 2 unknown). A Task error does not kill the agent behind it, and exit 2 REFUSES by default — `a lane that re-dispatches over a live attempt` has broken the contract. Canonical: `../return-validation.md`.
103
+ **Before any re-dispatch, run `orc run inflight`** (0 clear · 1 in-flight · 2 unknown). A Task error does not kill the agent behind it, and exit 2 REFUSES by default — `a lane that re-dispatches over a live attempt` has broken the contract. Canonical: `../return-validation.md` §0.
110
104
  (`requeued`, retry_count++). Hard retry cap 2 → STOP and surface.
111
105
 
112
106
  <!-- /orc:layer -->
@@ -1,32 +1,27 @@
1
- # Phase — House rules (id: `house-rules`)
2
-
3
- > **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
4
- > private `references/`, and other lanes already reached across into it. Read
5
- > by `orc`, `orc-mini`, `orc-fast`, `orc-quick`, `orc-doc`. Layers declared:
6
- > `core` only — single-layer because it is a standing card injected VERBATIM
7
- > into a slice — a layered card would be a different card. `orc lane phases
8
- > <lane> --json` names the file and the layers to read.
9
-
10
- <!-- orc:layer core -->
11
- ## ORC House Rules (standing behavioral card)
12
-
13
- Injected LITERALLY into every executor slice as `house_rules` — never a file
14
- pointer. Keep the card ≤ 10 lines: it rides in EVERY dispatch, so every
15
- redundant line is paid on every spawn. Do NOT add rules the slice contract
16
- already enforces (constraints, pattern-matching, stay-in-slice, invariant
17
- re-check) — duplication dilutes.
18
-
19
- ## The card (inject exactly the lines between the markers)
20
-
21
- <!-- card-start -->
22
- HOUSE RULES (standing, apply to every change):
23
- 1. Surgical changes only — touch nothing orthogonal to your task, even "easy wins".
24
- 2. Simplicity first — no speculative abstraction, no config for needs that don't exist yet.
25
- 3. No unrequested scope — build exactly what the task asks, nothing extra.
26
- 4. Prefer the boring solution — the obvious approach over the clever one, every time.
27
- 5. Never claim what you haven't observed — name a file/symbol/behavior only after reading it this session; mark inferences as inferences.
28
- 6. An honest partial beats a false done — report what's unmet, never round up.
29
- 7. Never revert, discard or rewrite files you did not write — `git checkout/restore/reset/stash/clean` are forbidden in your slice; an impossible assertion is `unmet`, never something to make true.
30
- <!-- card-end -->
31
-
32
- <!-- /orc:layer -->
1
+ # Phase — House rules (id: `house-rules`)
2
+
3
+ > **Library file** (`orc`, `orc-mini`, `orc-fast`, `orc-quick`, `orc-doc`), `core` only: a standing card injected VERBATIM into a slice — a layered card would be a different card.
4
+
5
+ <!-- orc:layer core -->
6
+ ## ORC House Rules (standing behavioral card)
7
+
8
+ Injected LITERALLY into every executor slice as `house_rules` — never a file
9
+ pointer. Keep the card ≤ 10 lines: it rides in EVERY dispatch, so every
10
+ redundant line is paid on every spawn. Do NOT add rules the slice contract
11
+ already enforces (constraints, pattern-matching, stay-in-slice, invariant
12
+ re-check) — duplication dilutes.
13
+
14
+ ## The card (inject exactly the lines between the markers)
15
+
16
+ <!-- card-start -->
17
+ HOUSE RULES (standing, apply to every change):
18
+ 1. Surgical changes only — touch nothing orthogonal to your task, even "easy wins".
19
+ 2. Simplicity first — no speculative abstraction, no config for needs that don't exist yet.
20
+ 3. No unrequested scope — build exactly what the task asks, nothing extra.
21
+ 4. Prefer the boring solution — the obvious approach over the clever one, every time.
22
+ 5. Never claim what you haven't observed — name a file/symbol/behavior only after reading it this session; mark inferences as inferences.
23
+ 6. An honest partial beats a false done — report what's unmet, never round up.
24
+ 7. Never revert, discard or rewrite files you did not write — `git checkout/restore/reset/stash/clean` are forbidden in your slice; an impossible assertion is `unmet`, never something to make true.
25
+ <!-- card-end -->
26
+
27
+ <!-- /orc:layer -->