@azure-id/orc 1.9.1 → 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 (224) hide show
  1. package/CHANGELOG.md +390 -0
  2. package/README-id.md +20 -36
  3. package/README.md +24 -34
  4. package/bin/build-agents.js +206 -109
  5. package/bin/cli.js +760 -62
  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/onboarding-content.js +4 -4
  13. package/bin/pricing.json +207 -200
  14. package/bin/run-undo.js +398 -0
  15. package/bin/trace-write.js +657 -0
  16. package/bin/verify-contracts.js +527 -81
  17. package/bin/verify-package.js +58 -11
  18. package/bin/webui/api.js +26 -0
  19. package/bin/webui/app.html +239 -232
  20. package/bin/webui/css/00-tokens.css +110 -92
  21. package/bin/webui/css/04-motion.css +249 -152
  22. package/bin/webui/css/06-responsive.css +203 -178
  23. package/bin/webui/css/panels/behaviour.css +205 -0
  24. package/bin/webui/css/panels/knowledge.css +563 -116
  25. package/bin/webui/fixtures/behaviour.js +532 -0
  26. package/bin/webui/fixtures/extra.js +2036 -2036
  27. package/bin/webui/fixtures/hookui.js +5 -5
  28. package/bin/webui/fixtures/index.js +34 -0
  29. package/bin/webui/fixtures/knowledge.js +7 -1
  30. package/bin/webui/fixtures/settings.js +305 -305
  31. package/bin/webui/fixtures/stats.js +16 -0
  32. package/bin/webui/i18n/en/behaviour.json +143 -0
  33. package/bin/webui/i18n/en/knowledge.json +117 -2
  34. package/bin/webui/i18n/en/nav.json +25 -24
  35. package/bin/webui/i18n/en/tour.json +37 -35
  36. package/bin/webui/i18n/id/behaviour.json +143 -0
  37. package/bin/webui/i18n/id/knowledge.json +117 -2
  38. package/bin/webui/i18n/id/nav.json +25 -24
  39. package/bin/webui/i18n/id/tour.json +37 -35
  40. package/bin/webui/js/01-i18n.js +155 -154
  41. package/bin/webui/js/90-tour.js +498 -494
  42. package/bin/webui/js/91-shortcuts.js +126 -126
  43. package/bin/webui/js/99-boot.js +121 -118
  44. package/bin/webui/js/panels/behaviour.js +1022 -0
  45. package/bin/webui/js/panels/knowledge.js +552 -7
  46. package/bin/webui/js/panels/overview.js +13 -4
  47. package/mock-run/INDEX.md +109 -107
  48. package/mock-run/context-combiner.md +100 -100
  49. package/mock-run/gotcha-import.md +118 -0
  50. package/mock-run/habits.md +129 -0
  51. package/mock-run/orc-budget.md +534 -534
  52. package/mock-run/orc-challenge-council.md +262 -262
  53. package/mock-run/orc-quick.md +6 -1
  54. package/mock-run/orc-ultra.md +103 -103
  55. package/package.json +1 -1
  56. package/templates/agents/MODEL-MAPPING.md +49 -49
  57. package/templates/agents/orc-advisor-opus-5-xhigh.md +50 -56
  58. package/templates/agents/orc-analyze-mini-opus-5-med.md +55 -60
  59. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +55 -58
  60. package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -75
  61. package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -110
  62. package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -114
  63. package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -112
  64. package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -132
  65. package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -109
  66. package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -109
  67. package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -90
  68. package/templates/agents/orc-claude-writer-opus-4-8-high.md +48 -53
  69. package/templates/agents/orc-claude-writer-opus-5-med.md +48 -55
  70. package/templates/agents/orc-context-combiner-opus-5-high.md +78 -88
  71. package/templates/agents/orc-doc-checker-opus-5-low.md +108 -108
  72. package/templates/agents/orc-doc-writer-opus-5-med.md +134 -134
  73. package/templates/agents/orc-executor-haiku-4-5.md +14 -6
  74. package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
  75. package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
  76. package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
  77. package/templates/agents/orc-executor-opus-5-high.md +15 -7
  78. package/templates/agents/orc-executor-opus-5-low.md +15 -7
  79. package/templates/agents/orc-executor-opus-5-med.md +15 -7
  80. package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
  81. package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
  82. package/templates/agents/orc-executor-sonnet-5-high.md +14 -6
  83. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
  84. package/templates/agents/orc-judge-opus-5-xhigh.md +81 -85
  85. package/templates/agents/orc-learn-writer-opus-5-low.md +67 -73
  86. package/templates/agents/orc-pattern-codifier-opus-5-med.md +58 -65
  87. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
  88. package/templates/agents/orc-planner-mini-opus-5-med.md +4 -7
  89. package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
  90. package/templates/agents/orc-planner-opus-5-med.md +157 -160
  91. package/templates/agents/orc-recon-opus-5-low.md +3 -10
  92. package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
  93. package/templates/agents/orc-retro-opus-5-med.md +8 -10
  94. package/templates/agents/orc-retro-sonnet-5-high.md +6 -7
  95. package/templates/agents/orc-reviewer-opus-5-med.md +96 -60
  96. package/templates/agents/orc-scout-opus-5-low.md +35 -40
  97. package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
  98. package/templates/agents/orc-system-analyst-opus-5-high.md +115 -120
  99. package/templates/agents/orc-test-author-opus-5-med.md +70 -71
  100. package/templates/agents/orc-test-designer-opus-5-high.md +158 -158
  101. package/templates/agents/orc-test-interpreter-opus-5-low.md +130 -130
  102. package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
  103. package/templates/agents/orc-verifier-opus-5-med.md +77 -69
  104. package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +74 -79
  105. package/templates/agents/orc-wiki-scanner-opus-5-med.md +74 -81
  106. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
  107. package/templates/commands/orc-analyze.md +13 -21
  108. package/templates/commands/orc-fast.md +10 -15
  109. package/templates/commands/orc-poly.md +12 -21
  110. package/templates/commands/orc-pr-driver.md +11 -30
  111. package/templates/commands/orc-pr-setup.md +10 -31
  112. package/templates/commands/orc-route.md +11 -41
  113. package/templates/commands/orc-test.md +5 -60
  114. package/templates/commands/orc-ultra.md +17 -17
  115. package/templates/commands/orc-verify.md +11 -11
  116. package/templates/hooks/README.md +36 -2
  117. package/templates/hooks/orc-effort-guard.js +178 -178
  118. package/templates/hooks/orc-session-hook.js +264 -0
  119. package/templates/hooks/orc-statusline.js +9 -7
  120. package/templates/skills/_shared/README.md +9 -0
  121. package/templates/skills/_shared/code-graph.md +48 -56
  122. package/templates/skills/_shared/config-precedence.md +200 -198
  123. package/templates/skills/_shared/extra-dispatch.md +1331 -1346
  124. package/templates/skills/_shared/gotchas.md +228 -177
  125. package/templates/skills/_shared/habits.md +101 -0
  126. package/templates/skills/_shared/lane-contract.md +84 -0
  127. package/templates/skills/_shared/opus5-only.md +8 -8
  128. package/templates/skills/_shared/phases/README.md +142 -83
  129. package/templates/skills/_shared/phases/analyst-gates.md +125 -136
  130. package/templates/skills/_shared/phases/execution.md +8 -14
  131. package/templates/skills/_shared/phases/house-rules.md +27 -32
  132. package/templates/skills/_shared/phases/intake.md +127 -133
  133. package/templates/skills/_shared/phases/mock-example.md +46 -56
  134. package/templates/skills/_shared/phases/plan-handoff.md +91 -97
  135. package/templates/skills/_shared/phases/planning.md +7 -17
  136. package/templates/skills/_shared/phases/preflight.md +19 -42
  137. package/templates/skills/_shared/phases/review.md +23 -27
  138. package/templates/skills/_shared/phases/rules.md +18 -42
  139. package/templates/skills/_shared/phases/scoring.md +55 -65
  140. package/templates/skills/_shared/phases/security-checklist.md +46 -50
  141. package/templates/skills/_shared/phases/security.md +45 -55
  142. package/templates/skills/_shared/phases/ship.md +6 -15
  143. package/templates/skills/_shared/phases/stop-resume.md +2 -5
  144. package/templates/skills/_shared/phases/summary.md +73 -48
  145. package/templates/skills/_shared/phases/testgen.md +41 -51
  146. package/templates/skills/_shared/phases/trace-verbs.md +433 -0
  147. package/templates/skills/_shared/phases/trace.md +136 -367
  148. package/templates/skills/_shared/phases/verify.md +62 -70
  149. package/templates/skills/_shared/phases/wave-grouping.md +128 -133
  150. package/templates/skills/_shared/phases/wiki-consult.md +10 -6
  151. package/templates/skills/_shared/read-ladder.md +2 -55
  152. package/templates/skills/_shared/return-validation.md +17 -70
  153. package/templates/skills/_shared/review-slice.md +79 -0
  154. package/templates/skills/_shared/smoke-gate.md +46 -28
  155. package/templates/skills/context-combiner/SKILL.md +16 -45
  156. package/templates/skills/context-combiner/schemas/combined-report.md +78 -78
  157. package/templates/skills/orc/README.md +2 -2
  158. package/templates/skills/orc/SKILL.md +41 -69
  159. package/templates/skills/orc/config.md +9 -9
  160. package/templates/skills/orc/examples/full-run-mock.md +73 -73
  161. package/templates/skills/orc/references/effort-and-mode.md +222 -222
  162. package/templates/skills/orc/references/pattern-gate.md +89 -89
  163. package/templates/skills/orc/references/phases/intake.md +41 -47
  164. package/templates/skills/orc/references/phases/integration.md +13 -19
  165. package/templates/skills/orc/references/preflight-report.md +10 -11
  166. package/templates/skills/orc/references/ultra-mode.md +11 -9
  167. package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
  168. package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
  169. package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
  170. package/templates/skills/orc/subskills/orc-planner/SKILL.md +2 -2
  171. package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -121
  172. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +35 -76
  173. package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
  174. package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
  175. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +34 -45
  176. package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
  177. package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
  178. package/templates/skills/orc-advisor/SKILL.md +56 -60
  179. package/templates/skills/orc-analyze/SKILL.md +32 -68
  180. package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -42
  181. package/templates/skills/orc-analyze/schemas/report-audit.md +84 -83
  182. package/templates/skills/orc-analyze/schemas/report-prose.md +64 -63
  183. package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -78
  184. package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
  185. package/templates/skills/orc-challenge/README.md +142 -142
  186. package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -273
  187. package/templates/skills/orc-challenge/references/council.md +315 -315
  188. package/templates/skills/orc-challenge/references/intake.md +171 -171
  189. package/templates/skills/orc-claude/SKILL.md +14 -14
  190. package/templates/skills/orc-diy/README.md +174 -143
  191. package/templates/skills/orc-diy/SKILL.md +23 -74
  192. package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
  193. package/templates/skills/orc-diy/references/flow-schema.md +1 -1
  194. package/templates/skills/orc-doc/README.md +229 -229
  195. package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -325
  196. package/templates/skills/orc-doc/references/chunking.md +527 -527
  197. package/templates/skills/orc-fast/SKILL.md +45 -73
  198. package/templates/skills/orc-judge/SKILL.md +77 -82
  199. package/templates/skills/orc-learn/SKILL.md +14 -14
  200. package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -61
  201. package/templates/skills/orc-mini/SKILL.md +65 -113
  202. package/templates/skills/orc-pattern/SKILL.md +27 -48
  203. package/templates/skills/orc-poly/SKILL.md +32 -61
  204. package/templates/skills/orc-pr-driver/SKILL.md +25 -51
  205. package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
  206. package/templates/skills/orc-pr-setup/SKILL.md +20 -45
  207. package/templates/skills/orc-quick/README.md +43 -2
  208. package/templates/skills/orc-quick/SKILL.md +76 -107
  209. package/templates/skills/orc-quick/references/dispatch-gate.md +16 -5
  210. package/templates/skills/orc-quick/references/gh-mode.md +48 -1
  211. package/templates/skills/orc-quick/references/look.md +3 -1
  212. package/templates/skills/orc-retro/SKILL.md +19 -18
  213. package/templates/skills/orc-retro/examples/retro-mock.md +1 -1
  214. package/templates/skills/orc-route/SKILL.md +25 -45
  215. package/templates/skills/orc-test/SKILL.md +16 -37
  216. package/templates/skills/orc-verify/SKILL.md +21 -39
  217. package/templates/skills/orc-verify/examples/verify-mock.md +33 -33
  218. package/templates/skills/orc-wait/SKILL.md +156 -163
  219. package/templates/skills/orc-wiki/references/extra.md +1 -1
  220. package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -6
  221. package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
  222. package/templates/skills/orc-wiki/references/phases/phase-2.md +1 -6
  223. package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
  224. package/templates/skills/orc-wiki/references/phases/phase-3c.md +1 -6
@@ -1,97 +1,91 @@
1
- # Phase — Plan handoff (id: `plan-handoff`)
2
-
3
- > **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
4
- > private `references/`, and another lane already reached across into it. Read
5
- > by `orc`, `orc-route`. Layers declared: `core` only — single-layer because
6
- > executing a plan another session wrote is the same procedure wherever it is
7
- > done, and /orc-route reads it to DEFINE what a plan is (v0.42.0 — a second
8
- > definition is drift the lint cannot see). `orc lane phases <lane> --json`
9
- > names the file and the layers to read.
10
-
11
- <!-- orc:layer core -->
12
- ## Reference — Plan Handoff (executing a plan from another session)
13
-
14
- The entry contract for the case ORC had no defined path for: **the run input
15
- IS a plan**, not a request. A plan was produced in one session (or saved to a
16
- file) and handed to a fresh session to build. Load `plan-handoff.md`
17
- at Phase 0 the moment you recognise a plan input; it turns a pasted plan into a
18
- real ORC run instead of an ad-hoc task-by-task improvisation.
19
-
20
- ## Trigger — the input IS a plan
21
-
22
- Recognise a plan input when the run starts from any of:
23
-
24
- - **pasted planning-output** — a YAML/markdown block matching
25
- `schemas/planning-output.md` (has a `tasks:` list with `declared_files`,
26
- `depends_on`, `grounding[]`);
27
- - **a `plan-{name}.md` path** the user points at;
28
- - **an `orc/planner/{name}/` checkpoint** (the planner's "Save & stop" artifact).
29
-
30
- A plain-language feature request is NOT a plan input — that is ordinary Phase 0
31
- intake. When in doubt (a prose paragraph with no task structure), treat it as a
32
- request and run intake normally.
33
-
34
- ## Why this exists (the failure it prevents)
35
-
36
- A plan built in session A and executed in session B used to improvise: no spine
37
- load, no trace protocol (the hook bootstrapped a generic `run-*.txt`), no Phase
38
- 1 exit gate re-run, no Phase 2 scoring or pause schedule, no Phase 3 wave
39
- grouping. The result was a bare SPAWN/RETURN trace, per-task ad-hoc pauses, and
40
- **phantom-file drift** — the plan declared a file that never (or no longer)
41
- existed, invisible because the plan's grounding Glob ran at *planning* time in
42
- the other session and nothing re-ran it here.
43
-
44
- ## Mandatory sequence (never execute a plan task-by-task ad hoc)
45
-
46
- Do these IN ORDER before any dispatch. Skipping any step is a protocol
47
- violation.
48
-
49
- 1. **This IS a run — bootstrap it.** Load the spine (`orc/SKILL.md`) and
50
- `../../_shared/phases/trace.md`; create `log_dir`, write `log_dir/.current` =
51
- `run-orc-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
52
- in the SAME step (both, or neither — a pointer naming a file that does not
53
- exist is what splits a run across two files), store `trace_path` in the
54
- checkpoint. Record `PHASE intake start` into this phase's packet.
55
- 2. **Schema-validate against `schemas/planning-output.md`.** Every task needs
56
- `declared_files`, `grounding[]`, `depends_on`, `requirements[]`,
57
- `acceptance[]`, `owns_area`, `spec_ref`, and the `facets` block (Part D). A
58
- malformed plan → show exactly what field is missing and offer a re-plan via
59
- `orc-planner` (dispatch it with the miss list). **Never improvise a missing
60
- field** — a guessed `declared_files` or an invented `facets` vector defeats
61
- the point of consuming a plan.
62
- 3. **Staleness valve (`plan_head`).** The plan carries `plan_head` — HEAD at
63
- plan time (the mirror of a requirement-spec's `git_head`). If `plan_head` ≠
64
- current HEAD, OR the field is absent (a pre-v0.31.0 plan), the grounding
65
- spot-check in step 4 is **compulsory** and its misses are surfaced, not
66
- waved through. Matching heads still run the gate — they only lower the
67
- suspicion.
68
- 4. **Re-run the FULL Phase 1 exit gate in THIS session** (deterministic — the
69
- checks live in `analyst-gates.md`; emit `GATE` lines): Glob every
70
- `disposition: exists` path, recompute coverage (no `orphan` requirements),
71
- cycle detection over `depends_on`, same-file collision over `declared_files`.
72
- This is the deterministic catch for phantom-file drift — a declared path that
73
- no longer (or never) existed bounces **before** any dispatch. On a miss,
74
- offer a targeted re-ground (one `orc-planner` re-dispatch with the miss list)
75
- or a user correction; never dispatch past an unresolved miss.
76
- 5. **Relay unresolved `open_questions[]`** (Part E) in ONE batch before
77
- proceeding: blocking questions must be answered; non-blocking show their
78
- `proposed_default` for tacit approval. A `plan_confidence: low` plan →
79
- recommend stepping back to `orc-analyze` (the user may override).
80
- 6. **Then the NORMAL pipeline.** Emit `PHASE planning end`, then run Phase 2
81
- (facet scoring + dispatch-style recommendation + the batch-pause schedule
82
- question) → Phase 3 (wave grouping — waves are computed regardless of
83
- dispatch style, see `wave-grouping.md`) → review → verify → ship. **A plan
84
- input never skips Phase 2/3.** The plan supplied the tasks; the orchestrator
85
- still owns scoring, waves, and pauses.
86
-
87
- ## Not this
88
-
89
- - **Not** a re-plan. If the plan validates and grounds clean, DO NOT re-run the
90
- planner — the plan is authoritative; you are scoring and scheduling it.
91
- - **Not** a scope re-litigation. Scope was settled where the plan (or its
92
- upstream spec) was produced. The gate checks structural integrity, not intent.
93
- - **Not** a poly-spec path. A poly-spec (`orc-poly:spec`) is split-and-STOP at
94
- Phase 1 (see SKILL.md) — that is a different input than a per-repo
95
- planning-output handed here to build.
96
-
97
- <!-- /orc:layer -->
1
+ # Phase — Plan handoff (id: `plan-handoff`)
2
+
3
+ > **Library file** (`orc`, `orc-route`), `core` only: executing another session's plan is one procedure, and /orc-route reads this file to DEFINE a plan — a second definition is drift.
4
+
5
+ <!-- orc:layer core -->
6
+ ## Reference — Plan Handoff (executing a plan from another session)
7
+
8
+ The entry contract for the case ORC had no defined path for: **the run input
9
+ IS a plan**, not a request. A plan was produced in one session (or saved to a
10
+ file) and handed to a fresh session to build. Load `plan-handoff.md`
11
+ at Phase 0 the moment you recognise a plan input; it turns a pasted plan into a
12
+ real ORC run instead of an ad-hoc task-by-task improvisation.
13
+
14
+ ## Trigger — the input IS a plan
15
+
16
+ Recognise a plan input when the run starts from any of:
17
+
18
+ - **pasted planning-output** — a YAML/markdown block matching
19
+ `schemas/planning-output.md` (has a `tasks:` list with `declared_files`,
20
+ `depends_on`, `grounding[]`);
21
+ - **a `plan-{name}.md` path** the user points at;
22
+ - **an `orc/planner/{name}/` checkpoint** (the planner's "Save & stop" artifact).
23
+
24
+ A plain-language feature request is NOT a plan input — that is ordinary Phase 0
25
+ intake. When in doubt (a prose paragraph with no task structure), treat it as a
26
+ request and run intake normally.
27
+
28
+ ## Why this exists (the failure it prevents)
29
+
30
+ A plan built in session A and executed in session B used to improvise: no spine
31
+ load, no trace protocol (the hook bootstrapped a generic `run-*.txt`), no Phase
32
+ 1 exit gate re-run, no Phase 2 scoring or pause schedule, no Phase 3 wave
33
+ grouping. The result was a bare SPAWN/RETURN trace, per-task ad-hoc pauses, and
34
+ **phantom-file drift** — the plan declared a file that never (or no longer)
35
+ existed, invisible because the plan's grounding Glob ran at *planning* time in
36
+ the other session and nothing re-ran it here.
37
+
38
+ ## Mandatory sequence (never execute a plan task-by-task ad hoc)
39
+
40
+ Do these IN ORDER before any dispatch. Skipping any step is a protocol
41
+ violation.
42
+
43
+ 1. **This IS a run — bootstrap it.** Load the spine (`orc/SKILL.md`) and
44
+ `../../_shared/phases/trace.md`; create `log_dir`, write `log_dir/.current` =
45
+ `run-orc-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
46
+ in the SAME step (both, or neither — a pointer naming a file that does not
47
+ exist is what splits a run across two files), store `trace_path` in the
48
+ checkpoint. Record `PHASE intake start` into this phase's packet.
49
+ 2. **Schema-validate against `schemas/planning-output.md`.** Every task needs
50
+ `declared_files`, `grounding[]`, `depends_on`, `requirements[]`,
51
+ `acceptance[]`, `owns_area`, `spec_ref`, and the `facets` block (Part D). A
52
+ malformed plan → show exactly what field is missing and offer a re-plan via
53
+ `orc-planner` (dispatch it with the miss list). **Never improvise a missing
54
+ field** — a guessed `declared_files` or an invented `facets` vector defeats
55
+ the point of consuming a plan.
56
+ 3. **Staleness valve (`plan_head`).** The plan carries `plan_head` — HEAD at
57
+ plan time (the mirror of a requirement-spec's `git_head`). If `plan_head` ≠
58
+ current HEAD, OR the field is absent (a pre-v0.31.0 plan), the grounding
59
+ spot-check in step 4 is **compulsory** and its misses are surfaced, not
60
+ waved through. Matching heads still run the gate — they only lower the
61
+ suspicion.
62
+ 4. **Re-run the FULL Phase 1 exit gate in THIS session** (deterministic — the
63
+ checks live in `analyst-gates.md`; emit `GATE` lines): Glob every
64
+ `disposition: exists` path, recompute coverage (no `orphan` requirements),
65
+ cycle detection over `depends_on`, same-file collision over `declared_files`.
66
+ This is the deterministic catch for phantom-file drift — a declared path that
67
+ no longer (or never) existed bounces **before** any dispatch. On a miss,
68
+ offer a targeted re-ground (one `orc-planner` re-dispatch with the miss list)
69
+ or a user correction; never dispatch past an unresolved miss.
70
+ 5. **Relay unresolved `open_questions[]`** (Part E) in ONE batch before
71
+ proceeding: blocking questions must be answered; non-blocking show their
72
+ `proposed_default` for tacit approval. A `plan_confidence: low` plan →
73
+ recommend stepping back to `orc-analyze` (the user may override).
74
+ 6. **Then the NORMAL pipeline.** Emit `PHASE planning end`, then run Phase 2
75
+ (facet scoring + dispatch-style recommendation + the batch-pause schedule
76
+ question) → Phase 3 (wave grouping — waves are computed regardless of
77
+ dispatch style, see `wave-grouping.md`) → review → verify → ship. **A plan
78
+ input never skips Phase 2/3.** The plan supplied the tasks; the orchestrator
79
+ still owns scoring, waves, and pauses.
80
+
81
+ ## Not this
82
+
83
+ - **Not** a re-plan. If the plan validates and grounds clean, DO NOT re-run the
84
+ planner — the plan is authoritative; you are scoring and scheduling it.
85
+ - **Not** a scope re-litigation. Scope was settled where the plan (or its
86
+ upstream spec) was produced. The gate checks structural integrity, not intent.
87
+ - **Not** a poly-spec path. A poly-spec (`orc-poly:spec`) is split-and-STOP at
88
+ Phase 1 (see SKILL.md) — that is a different input than a per-repo
89
+ planning-output handed here to build.
90
+
91
+ <!-- /orc:layer -->
@@ -1,16 +1,6 @@
1
1
  # Phase — Planning (id: `planning`)
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
 
@@ -21,7 +11,7 @@ resolved values of every config key this run will consume (ALWAYS `opus5_only`
21
11
  proof `/orc-retro` audits that the run honored the config.
22
12
  **Wiki consult (load `wiki-consult.md`;
23
13
  always report — no tier is silent):** read the FRESH/AGING/STALE tier from
24
- **`orc wiki status`** (v0.41.0 — deterministic; never hand-compute it from `wiki-meta.json`), pull the relevant pages (incl. cross-cutting maps like `orc-reference-api-surface`), apply
14
+ **`orc wiki status`** (deterministic; never hand-compute it from `wiki-meta.json`), pull the relevant pages (incl. cross-cutting maps like `orc-reference-api-surface`), apply
25
15
  `code > fresh wiki > stale wiki (hints) > model priors`, emit
26
16
  `WIKI-CONSULT <tier> :: docs=<pages>`, print the one-line tier report (every tier, `absent` included), and attribute per-dispatch too — `wiki:` on the `DISPATCH` line + a `wiki_used` return (wiki-consult.md Step 5). **Crosslink:** per wiki-consult.md, inject
27
17
  the cached `.claude/orc/crosslink/needs.json` contract into any boundary-touching
@@ -44,17 +34,17 @@ facets. Also run `orc graph cochange <each candidate file> --if-enabled --json -
44
34
  it answers "what else will I have to touch" from HISTORY, which a static edge
45
35
  cannot see. Co-change is a HINT about people, never a dependency — exit 4 means
46
36
  this file changes alone, which is an answer. Exit 3 or 4 → plan exactly as before.
47
- **Pact / boundary / aftermath / wiki debt (v0.46.0 — all CONSUMED here, never
37
+ **Pact / boundary / aftermath / wiki debt (all CONSUMED here, never
48
38
  written here):** probe `orc pact status --json` (`pact_gate`, default `warn`),
49
39
  `orc boundary status --json` (`boundary_gate`, default `warn`), `orc wiki debt
50
40
  --json`, and — only to decide whether the preflight's `after:` line fires at all —
51
41
  `orc aftermath status --json`. Print each probe's own `line` VERBATIM; never
52
42
  recount or re-word one. Gates: `../../orc-pact/references/gate.md` +
53
- `../../orc-boundary/references/gate.md`. **Challenge (v0.47.0, `challenge_gate`,
43
+ `../../orc-boundary/references/gate.md`. **Challenge (`challenge_gate`,
54
44
  default `warn`):** when the run's INPUT DOCUMENT has a cycle, print
55
45
  `orc challenge status <slug> --json`'s `preflight_line` verbatim — building from
56
46
  a document that has not passed its own review is worth one line. There is no
57
- `block` mode (the `/orc-pact` precedent). **Extra (v0.50.0, `extra_enabled`) —
47
+ `block` mode (the `/orc-pact` precedent). **Extra (`extra_enabled`) —
58
48
  resolved HERE, announced HERE, never silent:** load `../extra-dispatch.md`;
59
49
  per task run `orc extra resolve <score> --role executor --risk <n> --json`, and
60
50
  before wave 1 settle its two pre-dispatch states, both PRINTED — a `needs_reping`
@@ -63,7 +53,7 @@ profile (re-ping; a STALE profile still routes) and a vaulted credential, which
63
53
  Claude rather than stopping the run. **Preflight:** print the compact block per
64
54
  `../../orc/references/preflight-report.md` once wiki + crosslink (+ pattern/waves) resolve.
65
55
 
66
- Ask which planner: **Superpowers / OpenSpec / Requirement Planner / ORC
56
+ Ask which planner (H `orc.phase-1.planner`): **Superpowers / OpenSpec / Requirement Planner / ORC
67
57
  (self)**. With an analyst requirement-spec present, the Requirement Planner
68
58
  is the natural choice (consumes the spec; does NOT re-question scope); apply
69
59
  the `git_head` staleness valve first (analyst-gates.md). Dispatch the planner
@@ -80,7 +70,7 @@ only input that does NOT proceed to Phase 2 (each repo builds later, in its own
80
70
  `../../orc/schemas/planning-output.md` (per-task `declared_files` incl. tests,
81
71
  `grounding[]`, `acceptance[]`, `requirements[]`, `spec_invariants[]`,
82
72
  `depends_on`, `owns_area`, `spec_ref`, + a `coverage` echo, + `tdd_spec` —
83
- TDD is ALWAYS ON in full orc/ultra but **SCOPED to what can actually fail (v0.41.0)**: a `disposition` per entry (`new-surface | behavior-change | covered-by-existing | no-behavior | no-runner`) DERIVED from the planner's facets — constants/translations/file-splits get NO test, a cited `risk[]` is never scoped out, and a PAIRED task materializes it, never a Wave 0 (schema notes 7-8; gate check 5);
73
+ TDD is ALWAYS ON in full orc/ultra but **SCOPED to what can actually fail**: a `disposition` per entry (`new-surface | behavior-change | covered-by-existing | no-behavior | no-runner`) DERIVED from the planner's facets — constants/translations/file-splits get NO test, a cited `risk[]` is never scoped out, and a PAIRED task materializes it, never a Wave 0 (schema notes 7-8; gate check 5);
84
74
  missing declared files → extract and confirm before leaving this phase.
85
75
 
86
76
  **Phase 1 exit gate** (deterministic — full checks in analyst-gates.md; emit
@@ -1,14 +1,6 @@
1
1
  # Phase — Preflight (id: `preflight`)
2
2
 
3
- > **Library file.** New at v1.0.0 W11, distilled from the eleven lane preflight
4
- > sections that had independently converged on the same four steps in the same
5
- > order. Layers: `core` (every lane with a silent preflight) and `full`
6
- > (`/orc` and `/orc-ultra`, whose preflight also PRINTS a report).
7
- >
8
- > **What is NOT here:** the probes themselves. Which artifacts a lane probes, and
9
- > which config keys it reads, are the lane's own — they are in the lane's spine
10
- > and in `orc lane config <lane> --json`. This file is the SHAPE: the order, and
11
- > the four rules that make the shape worth having.
3
+ > **Library file.** `core` = every lane with a silent preflight; `full` = `/orc` and `/orc-ultra`, which also PRINT a report. This file is the SHAPE; the probes and config keys are the lane's own (its spine and `orc lane config <lane> --json`).
12
4
 
13
5
  <!-- orc:layer core -->
14
6
 
@@ -22,17 +14,17 @@ never a fifth step before step 2.
22
14
  yourself. Print every line of `announce[]` VERBATIM — *a shadowed setting must
23
15
  never be silent*, and a lane that resolves silently cannot tell the user why
24
16
  the thing they configured did not happen. Precedence, gates, inertness and the
25
- CLI-absent floor are all in `../config-precedence.md`.
17
+ CLI-absent floor are all in `../config-precedence.md`. **`habits{}` in the
18
+ answer → print `habits.line` and read `../habits.md` NOW**.
26
19
 
27
20
  2. **Trace.** Write `log_dir/.current` = `run-<lane>-<slug>-<DDMMYY>-<HHMMSS>.txt`
28
21
  AND `touch the trace file` of that name in the SAME step. **Both, or neither.**
29
- A pointer naming a file that does not exist is indistinguishable from a
30
- dangling one — that split fifteen graded runs across two files each. The rest
31
- of the protocol is `trace.md`.
22
+ The rest of the protocol is `trace.md`.
32
23
 
33
- 3. **Probes.** Use `../detecting-artifacts.md` — **never a raw `find`**, because
34
- `.claude/` is hidden and a filesystem search false-negatives a real artifact
35
- from the wrong CWD. Every probe is a documented exit-code contract, listed
24
+ 3. **Probes.** Read each probe's answer from `probes{}` in the step-1 answer.
25
+ Run a probe yourself only when `probes{}` does not have it or its entry has
26
+ `error` — by `../detecting-artifacts.md`, **never a raw `find`** (`.claude/`
27
+ is hidden). Every probe is a documented exit-code contract, listed
36
28
  once in `orc lane calls <lane>`. Treat a positive probe as the source of truth
37
29
  and never second-guess it.
38
30
 
@@ -55,27 +47,12 @@ never a fifth step before step 2.
55
47
  ledger yet, this is a first run"; `orc gotcha status` exit 1 is an empty
56
48
  ledger. Say what it means, not that it failed.
57
49
 
58
- ## The rules line (v1.7.0) — printed by every lane that runs the `rules` phase
50
+ ## The rules line — printed by every lane that runs the `rules` phase
59
51
 
60
- `orc rules slice --lane <lane> --json` returns a `line`. Print it VERBATIM:
52
+ Print `probes["rules-slice"].line` (`orc rules slice --lane <lane> --json`) VERBATIM — both spellings and the override names are `./rules.md` §One assembler and §Precedence.
53
+ `/orc-doc` prints `house rules: …` from `orc doc rules` instead; the two surfaces never mix.
61
54
 
62
- ```
63
- rules: ORC 65 (W 23 · C 22 · D 10 · U 10) · yours 9 lines (P0 4 · P1 2 · P2 3) · 1 override
64
- rules: ORC 65 (W 23 · C 22 · D 10 · U 10) · yours none
65
- ```
66
-
67
- **Both spellings are mandatory in their state.** `yours none` says the project
68
- has not written its own rules — a different fact from the CLI failing to look,
69
- and the line is what keeps the two apart. Never compute the counts here.
70
-
71
- Where the lane's preflight prints a REPORT rather than a bare line, the report
72
- names each override under it. An override the user cannot see is an override
73
- they cannot audit. The rest of the mechanic is `./rules.md`.
74
-
75
- `/orc-doc` prints `house rules: …` instead, from `orc doc rules`. The two
76
- surfaces are different files and never mix.
77
-
78
- ## The usage line (v1.1.0) — printed whenever `usage_gate` is armed
55
+ ## The usage line — printed whenever `usage_gate` is armed
79
56
 
80
57
  `usage_gate` resolves in step 1 like any other key. When it is anything but
81
58
  `off`, run `orc usage check --json` in step 3 and print ONE line:
@@ -97,14 +74,14 @@ and again at every gate it suppresses. The rest of the mechanic — the modes, t
97
74
  hops, what `stop` and `wait` actually do — is `../wait.md`; this file only says
98
75
  that the line is printed and when.
99
76
 
100
- ## The graph line (v1.8.0) — code-changing lanes only
77
+ ## The graph line — code-changing lanes only
101
78
 
102
- `/orc`, `/orc-ultra`, `/orc-diy`, `/orc-mini`, `/orc-fast` and `/orc-quick` run
103
- `orc graph status --if-enabled --heal --json --brief` in step 3, BEFORE the first
104
- dispatch — never skipped. `--heal` builds a missing graph and updates a drifted
105
- one in the same call (it is free), so there is no second call to forget. Print
106
- its `line` (`off` included) and put its `trace` (`GRAPH-CONSULT …`) in the next
107
- packet as it is — never as a `GATE` line in your own words. While the graph is
79
+ `/orc`, `/orc-ultra`, `/orc-diy`, `/orc-mini`, `/orc-fast` and `/orc-quick` print
80
+ `probes["graph-status"].line` (`off` included) in step 3, BEFORE the first
81
+ dispatch — never skipped. Run `orc graph status --if-enabled --heal --json --brief`
82
+ only when `heal_needed` is true (it builds or updates the graph, free). Put the
83
+ `trace` (`GRAPH-CONSULT …`) in the next packet as it is — never as a `GATE` line
84
+ in your own words. While the graph is
108
85
  on, `orc lane config` prints the three graph steps in `announce[]` (`../code-graph.md`
109
86
  §0). **The lane reads no `code_graph` key:** `--if-enabled`
110
87
  makes the CLI decide, which is how `/orc-quick` takes part while its step 1 still
@@ -1,38 +1,32 @@
1
1
  # Phase — Review (id: `review`)
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
 
17
7
  ## Review (load ../../orc/subskills/orc-review-verify/, spawned)
18
8
 
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
9
+ Emit `PHASE review start`. **Build the slice from `../review-slice.md`** — its
10
+ §1 free check FIRST, then its §2 fields (with the graph on, `graph_changes` keeps
11
+ its rows: no `--brief` here). Superpowers path: its review skill incl. tests
12
+ (Sonnet 4.6 medium), then `../review-slice.md` §3 on its findings — no second
13
+ dispatch. OpenSpec/self path: review worker (Opus 5.5 medium). Pass the resolved
21
14
  `code_pattern` + its invariants + gate lines for the re-check
22
- (pattern-gate.md); no resolved pattern → FIRST ask for one (paste/md/none).
15
+ (pattern-gate.md); no resolved pattern → FIRST ask for one (paste/md/none) (H `orc.phase-5.pattern-missing`).
23
16
  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.
27
- **This one read keeps its rows: no `--brief` here**, because the reviewer is
28
- handed `symbols[].caller_files` and reads them. It
29
- replaces a whole-file `orc graph impact` here: a file card reports every symbol in
30
- a touched file, and a symbol nobody edited is not a finding. An unchanged caller of
31
- a changed signature is a finding candidate, anchored like any other. Findings arrive on the **P0–P3 ladder** (invariant violation or
17
+ + fe-perf. Findings arrive on the **P0–P3 ladder** (invariant violation or
32
18
  unmet gate line = P0; every P0–P2 carries `file:line` + VERBATIM `quote`;
33
- unanchored → P3). Apply hard rule 5 INCLUDING the quote spot-check: P0 →
34
- auto-fix once · P1 → ask, then fix once · P2/P3 → record for Phase 7. Emit
35
- `FINDING p0=<n> p1=<n> p2=<n> p3=<n>` on the return, then `PHASE review end`.
19
+ unanchored → P3). Run `../review-slice.md` §3 (the after-filter) on the return.
20
+ **Disprove pass (R6, `/orc` and `/orc-ultra` ONLY):** a P0 or P1 left → dispatch
21
+ the SAME reviewer with `mode: disprove`, only those findings + their files; a
22
+ `keep: false` verdict → P3 with its `why`. Then apply hard rule 5 INCLUDING the
23
+ quote spot-check, per `group`: P0 →
24
+ auto-fix once · P1 → ask, then fix once · P2/P3 → record for Phase 7.
25
+ **Re-review (R9):** after a P0/P1 fix, dispatch the reviewer once more with
26
+ `previous_findings[]` (each with its outcome). It may raise a NEW finding only
27
+ on a line the fix changed. Its `gotcha_recorded` body → `orc gotcha add -`. Emit
28
+ `FINDING p0=<n> p1=<n> p2=<n> p3=<n> pre=<n> suppressed=<n> folded=<n>` on the
29
+ return (the tail = the §3 buckets), then `PHASE review end`. Outcomes: Phase 7.
36
30
 
37
31
  <!-- /orc:layer -->
38
32
 
@@ -48,11 +42,13 @@ skipped by flow config") — never imply the work was reviewed.
48
42
  Dispatch the reviewer exactly as the full lane does — follow the review half
49
43
  of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` (reviewer agent
50
44
  `orc-reviewer-opus-5-med`; findings ride the severity ladder from the
51
- locked rules, blocking and advisory findings both surfaced).
45
+ locked rules, blocking and advisory findings both surfaced). Build its slice
46
+ from `.claude/skills/_shared/review-slice.md` (§1 free check, §3 after-filter).
52
47
  <!-- /diy:when -->
53
48
  <!-- diy:when review=blocking-only -->
54
49
  Dispatch the reviewer exactly as the full lane does — follow the review half
55
- of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` — but only
50
+ of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md`, with the slice
51
+ of `.claude/skills/_shared/review-slice.md` — but only
56
52
  P0/P1 findings gate anything; P2/P3 findings are listed once in the summary
57
53
  and never re-offered as fix-up tasks.
58
54
  <!-- /diy:when -->
@@ -1,18 +1,6 @@
1
1
  # Phase — Rules (id: `rules`)
2
2
 
3
- > **Library file.** New at v1.7.0 W5. Layers declared: `core` only — single-layer
4
- > for the same reason `house-rules.md` is: it is a standing card injected
5
- > VERBATIM into a slice, and a layered card would be a different card. What
6
- > varies between lanes is DATA (which packs, whether a task is front-end), not
7
- > prose. `orc lane phases <lane> --json` names the file and the layers to read.
8
- >
9
- > **What is NOT here:** the rules. They are `../rules/` — four packs, read-only,
10
- > shipped. This file is the SHAPE: who assembles the card, where it sits in a
11
- > slice, what comes back, and what the phase must never do.
12
- >
13
- > **`/orc-doc` does not run this phase.** That lane has its own ledger
14
- > (`orc doc rules`) and its own frozen-per-document mechanic. Excluded means
15
- > excluded, and `orc rules slice --lane orc-doc` refuses by name.
3
+ > **Library file**, `core` only (a standing card, like `house-rules.md`). The rules are in `../rules/`; this file is the SHAPE. **`/orc-doc` does not run this phase** — it has `orc doc rules`, and `orc rules slice --lane orc-doc` refuses by name.
16
4
 
17
5
  <!-- orc:layer core -->
18
6
 
@@ -118,11 +106,8 @@ structural and safety rules.
118
106
  A rule that asks for one of those comes back as `unsupported_request` and is
119
107
  relayed as a gap. **Never a guessed compromise.**
120
108
 
121
- **Do not build a detector for this.** The CLI declares the boundary and does not
122
- pretend to enforce it, for the reason `orc doc rules` already settled: a
123
- validator that sometimes works is worse than none, because a clean pass then
124
- means nothing. The agent is the only reader that can tell a content rule from a
125
- structural one, so the agent is where the answer comes from.
109
+ The CLI declares this boundary and does not enforce it. The agent is the only
110
+ reader that can tell a content rule from a structural one.
126
111
 
127
112
  ## The free lint
128
113
 
@@ -144,29 +129,20 @@ An exemption is never silent either. The lint skips the rules packs themselves
144
129
  (a rule that bans a word has to print that word to define it) and any file
145
130
  marked `orc-rules-ignore-file`, and it reports the count of both.
146
131
 
147
- ## Cost, and where to cut it
148
-
149
- Measured at v1.7.0: roughly **3 600 tokens** per build-lane slice, **4 300** with
150
- the UI pack, **2 200** for a prose-only lane. The card already carries HARD rules
151
- in full and PURPOSE/LOCK rules as one line plus the file to open when one
152
- applies.
153
-
154
- If it must come down, the lever is the worked examples inside the HARD bodies,
155
- and the only place to pull it is `rulesSlice()` in `bin/cli.js`. **Never by a
156
- lane deciding to trim its own card** — that is the drift this phase exists to
157
- prevent, arriving disguised as a saving.
158
-
159
- **v1.9.0 — the COMPACT form, and the CLI decides which lanes get it.** The
160
- lever above is now pulled for **`orc-quick`** and for no one else: every HARD
161
- rule keeps its id, its title and its first line — the instruction — and the
162
- worked examples come out, with the pack file named beside them. Measured
163
- **13 874 → 5 838 chars** (~3 470 → ~1 460 tokens) with every HARD id still
164
- present. The lane that gets it is the lane with the smallest tasks under the
165
- largest fixed card, and the card is re-sent on every executor turn.
166
-
167
- The answer says which form it is: `compact: true` in the JSON. A reader that
168
- cannot tell a short card from a stripped one cannot trust either. `line` is
169
- IDENTICAL in both forms — it counts the rules in force, and compacting changes
170
- how a rule is written, never whether it applies.
132
+ ## The COMPACT card
133
+
134
+ `orc-quick` gets the COMPACT form: every HARD rule keeps its id, its title and
135
+ its first line. `orc-mini` and `orc-fast` get it too, because `rules_card_compact`
136
+ is `on` by default since v2.0.2 (eval E4 passed, DE-17); `off` gives them the full
137
+ card. The CLI decides this, never the lane. The answer says `compact: true` in the JSON. `line` is IDENTICAL in
138
+ both forms.
139
+
140
+ ## The LEARNED tier
141
+
142
+ With `habits` on, the card can carry **learned preferences** (commit, branch
143
+ and test-file naming, from `orc habit repo`). Each one rides only after your
144
+ yes. They sit BELOW your rules and ABOVE the ORC rules. A preference that no
145
+ longer matches 4 of the last 5 samples is `stale` and leaves the card. Under
146
+ `habits: off` the slice has no `learned` field and no byte of this tier.
171
147
 
172
148
  <!-- /orc:layer -->