@azure-id/orc 1.9.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/CHANGELOG.md +722 -0
  2. package/README-id.md +56 -42
  3. package/README.md +58 -41
  4. package/bin/build-agents.js +125 -29
  5. package/bin/clear-logs.js +620 -0
  6. package/bin/cli.js +1873 -180
  7. package/bin/fix.js +459 -0
  8. package/bin/gotcha-import.js +1081 -0
  9. package/bin/gotcha.js +1566 -0
  10. package/bin/graph-query.js +1 -1
  11. package/bin/graph.js +717 -717
  12. package/bin/habit.js +1538 -0
  13. package/bin/mockrun-catalog.js +284 -276
  14. package/bin/onboarding-content.js +2 -1
  15. package/bin/pricing.json +28 -21
  16. package/bin/run-undo.js +398 -0
  17. package/bin/trace-write.js +869 -0
  18. package/bin/verify-contracts.js +627 -100
  19. package/bin/verify-package.js +68 -10
  20. package/bin/webui/api.js +151 -6
  21. package/bin/webui/app.html +239 -232
  22. package/bin/webui/css/00-tokens.css +110 -92
  23. package/bin/webui/css/04-motion.css +87 -0
  24. package/bin/webui/css/06-responsive.css +203 -178
  25. package/bin/webui/css/panels/behaviour.css +205 -0
  26. package/bin/webui/css/panels/hookui.css +79 -0
  27. package/bin/webui/fixtures/behaviour.js +562 -0
  28. package/bin/webui/fixtures/extra.js +9 -9
  29. package/bin/webui/fixtures/flow.js +81 -81
  30. package/bin/webui/fixtures/hookui.js +506 -431
  31. package/bin/webui/fixtures/index.js +66 -3
  32. package/bin/webui/fixtures/knowledge.js +9 -3
  33. package/bin/webui/fixtures/maintenance.js +123 -42
  34. package/bin/webui/fixtures/rules.js +1007 -1002
  35. package/bin/webui/fixtures/settings.js +6 -7
  36. package/bin/webui/fixtures/stats.js +25 -6
  37. package/bin/webui/fixtures/wait.js +98 -97
  38. package/bin/webui/i18n/en/behaviour.json +156 -0
  39. package/bin/webui/i18n/en/hookui.json +290 -194
  40. package/bin/webui/i18n/en/maintenance.json +71 -52
  41. package/bin/webui/i18n/en/nav.json +25 -24
  42. package/bin/webui/i18n/en/settings.json +60 -60
  43. package/bin/webui/i18n/en/tour.json +37 -35
  44. package/bin/webui/i18n/id/behaviour.json +156 -0
  45. package/bin/webui/i18n/id/hookui.json +290 -194
  46. package/bin/webui/i18n/id/maintenance.json +71 -52
  47. package/bin/webui/i18n/id/nav.json +25 -24
  48. package/bin/webui/i18n/id/settings.json +60 -60
  49. package/bin/webui/i18n/id/tour.json +37 -35
  50. package/bin/webui/js/01-i18n.js +155 -154
  51. package/bin/webui/js/05-banners.js +181 -172
  52. package/bin/webui/js/06-edit.js +193 -183
  53. package/bin/webui/js/90-tour.js +498 -494
  54. package/bin/webui/js/91-shortcuts.js +126 -126
  55. package/bin/webui/js/99-boot.js +121 -118
  56. package/bin/webui/js/panels/behaviour.js +1087 -0
  57. package/bin/webui/js/panels/hookui.js +2196 -1691
  58. package/bin/webui/js/panels/maintenance.js +336 -235
  59. package/bin/webui/js/panels/settings.js +726 -719
  60. package/mock-run/INDEX.md +110 -107
  61. package/mock-run/extra-slots.md +1 -1
  62. package/mock-run/gotcha-import.md +118 -0
  63. package/mock-run/habits.md +129 -0
  64. package/mock-run/orc-aftermath.md +392 -392
  65. package/mock-run/orc-budget.md +29 -33
  66. package/mock-run/orc-cli.md +200 -200
  67. package/mock-run/orc-explain.md +86 -86
  68. package/mock-run/orc-extra.md +389 -392
  69. package/mock-run/orc-fix.md +87 -0
  70. package/mock-run/orc-pattern.md +112 -112
  71. package/mock-run/orc-quick.md +6 -1
  72. package/mock-run/orc.md +157 -157
  73. package/package.json +1 -1
  74. package/templates/agents/MODEL-MAPPING.md +37 -34
  75. package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
  76. package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
  77. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -5
  78. package/templates/agents/{orc-claude-writer-opus-4-8-high.md → orc-claude-writer-opus-5-low.md} +48 -53
  79. package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
  80. package/templates/agents/orc-executor-haiku-4-5.md +14 -6
  81. package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
  82. package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
  83. package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
  84. package/templates/agents/orc-executor-opus-5-high.md +14 -6
  85. package/templates/agents/orc-executor-opus-5-low.md +14 -6
  86. package/templates/agents/orc-executor-opus-5-med.md +14 -6
  87. package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
  88. package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
  89. package/templates/agents/orc-executor-sonnet-5-high.md +15 -7
  90. package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
  91. package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
  92. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
  93. package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
  94. package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
  95. package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
  96. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
  97. package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
  98. package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
  99. package/templates/agents/orc-planner-opus-5-med.md +1 -4
  100. package/templates/agents/orc-recon-opus-5-low.md +1 -8
  101. package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
  102. package/templates/agents/orc-retro-opus-5-med.md +6 -8
  103. package/templates/agents/orc-retro-sonnet-5-high.md +7 -8
  104. package/templates/agents/orc-reviewer-opus-5-low.md +96 -0
  105. package/templates/agents/orc-scout-opus-5-low.md +1 -6
  106. package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
  107. package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
  108. package/templates/agents/orc-test-author-opus-5-med.md +4 -5
  109. package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
  110. package/templates/agents/orc-verifier-opus-5-med.md +16 -8
  111. package/templates/agents/{orc-wiki-scanner-opus-4-8-high.md → orc-wiki-scanner-opus-5-low.md} +74 -79
  112. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
  113. package/templates/commands/orc-analyze.md +13 -21
  114. package/templates/commands/orc-fast.md +10 -15
  115. package/templates/commands/orc-fix.md +18 -0
  116. package/templates/commands/orc-poly.md +12 -21
  117. package/templates/commands/orc-pr-driver.md +11 -30
  118. package/templates/commands/orc-pr-setup.md +10 -31
  119. package/templates/commands/orc-route.md +11 -41
  120. package/templates/commands/orc-test.md +5 -60
  121. package/templates/commands/orc-wiki.md +64 -64
  122. package/templates/hooks/README.md +109 -7
  123. package/templates/hooks/orc-session-hook.js +339 -0
  124. package/templates/hooks/orc-statusline-render.js +317 -23
  125. package/templates/hooks/orc-statusline.js +165 -50
  126. package/templates/hooks/orc-subagent-line.js +23 -5
  127. package/templates/hooks/orc-weather-fetch.js +123 -0
  128. package/templates/skills/_shared/README.md +9 -0
  129. package/templates/skills/_shared/code-graph.md +47 -55
  130. package/templates/skills/_shared/config-precedence.md +3 -1
  131. package/templates/skills/_shared/extra-dispatch.md +78 -93
  132. package/templates/skills/_shared/gotchas.md +248 -177
  133. package/templates/skills/_shared/habits.md +101 -0
  134. package/templates/skills/_shared/lane-contract.md +84 -0
  135. package/templates/skills/_shared/opus5-only.md +14 -14
  136. package/templates/skills/_shared/phases/README.md +142 -83
  137. package/templates/skills/_shared/phases/analyst-gates.md +10 -21
  138. package/templates/skills/_shared/phases/execution.md +8 -14
  139. package/templates/skills/_shared/phases/house-rules.md +27 -32
  140. package/templates/skills/_shared/phases/intake.md +127 -133
  141. package/templates/skills/_shared/phases/mock-example.md +46 -56
  142. package/templates/skills/_shared/phases/plan-handoff.md +91 -97
  143. package/templates/skills/_shared/phases/planning.md +7 -17
  144. package/templates/skills/_shared/phases/preflight.md +19 -42
  145. package/templates/skills/_shared/phases/review.md +24 -28
  146. package/templates/skills/_shared/phases/rules.md +18 -42
  147. package/templates/skills/_shared/phases/scoring.md +55 -65
  148. package/templates/skills/_shared/phases/security-checklist.md +46 -50
  149. package/templates/skills/_shared/phases/security.md +45 -55
  150. package/templates/skills/_shared/phases/ship.md +6 -15
  151. package/templates/skills/_shared/phases/stop-resume.md +2 -5
  152. package/templates/skills/_shared/phases/summary.md +73 -48
  153. package/templates/skills/_shared/phases/testgen.md +41 -51
  154. package/templates/skills/_shared/phases/trace-verbs.md +447 -0
  155. package/templates/skills/_shared/phases/trace.md +66 -297
  156. package/templates/skills/_shared/phases/verify.md +62 -70
  157. package/templates/skills/_shared/phases/wave-grouping.md +128 -133
  158. package/templates/skills/_shared/phases/wiki-consult.md +10 -6
  159. package/templates/skills/_shared/read-ladder.md +2 -55
  160. package/templates/skills/_shared/return-validation.md +17 -70
  161. package/templates/skills/_shared/review-slice.md +106 -0
  162. package/templates/skills/_shared/smoke-gate.md +46 -28
  163. package/templates/skills/_shared/wait.md +1 -0
  164. package/templates/skills/context-combiner/SKILL.md +15 -44
  165. package/templates/skills/orc/README.md +2 -2
  166. package/templates/skills/orc/SKILL.md +35 -63
  167. package/templates/skills/orc/config.md +25 -27
  168. package/templates/skills/orc/examples/full-run-mock.md +2 -1
  169. package/templates/skills/orc/references/effort-and-mode.md +17 -17
  170. package/templates/skills/orc/references/pattern-gate.md +89 -89
  171. package/templates/skills/orc/references/phases/intake.md +41 -47
  172. package/templates/skills/orc/references/phases/integration.md +13 -19
  173. package/templates/skills/orc/references/preflight-report.md +11 -12
  174. package/templates/skills/orc/references/ultra-mode.md +9 -7
  175. package/templates/skills/orc/schemas/checkpoint.md +122 -122
  176. package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
  177. package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
  178. package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
  179. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +12 -53
  180. package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
  181. package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
  182. package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
  183. package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
  184. package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
  185. package/templates/skills/orc-advisor/SKILL.md +56 -60
  186. package/templates/skills/orc-analyze/SKILL.md +33 -67
  187. package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
  188. package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
  189. package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
  190. package/templates/skills/orc-claude/SKILL.md +14 -14
  191. package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
  192. package/templates/skills/orc-diy/README.md +31 -0
  193. package/templates/skills/orc-diy/SKILL.md +27 -78
  194. package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
  195. package/templates/skills/orc-fast/SKILL.md +49 -75
  196. package/templates/skills/orc-fix/SKILL.md +110 -0
  197. package/templates/skills/orc-judge/SKILL.md +77 -82
  198. package/templates/skills/orc-mini/SKILL.md +64 -112
  199. package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
  200. package/templates/skills/orc-pattern/SKILL.md +27 -48
  201. package/templates/skills/orc-poly/SKILL.md +32 -61
  202. package/templates/skills/orc-pr-driver/SKILL.md +25 -51
  203. package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
  204. package/templates/skills/orc-pr-setup/SKILL.md +20 -45
  205. package/templates/skills/orc-quick/README.md +44 -3
  206. package/templates/skills/orc-quick/SKILL.md +77 -108
  207. package/templates/skills/orc-quick/references/dispatch-gate.md +18 -6
  208. package/templates/skills/orc-quick/references/gh-mode.md +50 -1
  209. package/templates/skills/orc-quick/references/look.md +3 -1
  210. package/templates/skills/orc-retro/SKILL.md +20 -19
  211. package/templates/skills/orc-retro/examples/retro-mock.md +17 -17
  212. package/templates/skills/orc-route/SKILL.md +25 -45
  213. package/templates/skills/orc-test/SKILL.md +16 -37
  214. package/templates/skills/orc-verify/SKILL.md +14 -32
  215. package/templates/skills/orc-wait/SKILL.md +156 -163
  216. package/templates/skills/orc-wiki/README.md +325 -325
  217. package/templates/skills/orc-wiki/SKILL.md +195 -195
  218. package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
  219. package/templates/skills/orc-wiki/references/extra.md +2 -2
  220. package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
  221. package/templates/skills/orc-wiki/references/phases/phase-0.md +2 -7
  222. package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
  223. package/templates/skills/orc-wiki/references/phases/phase-2.md +4 -9
  224. package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
  225. package/templates/skills/orc-wiki/references/phases/phase-3c.md +4 -8
  226. package/templates/agents/orc-claude-writer-opus-5-med.md +0 -55
  227. package/templates/agents/orc-reviewer-opus-5-med.md +0 -60
  228. package/templates/agents/orc-wiki-scanner-opus-5-med.md +0 -81
@@ -1,135 +1,52 @@
1
- # orc-review-verify — Core (mode-neutral)
2
-
3
- ## Input slice
4
-
5
- - phase: review | verify | security
6
- - acceptance_criteria[] — the intent-spec's definition-of-done, verbatim
7
- (verify checks EXACTLY these; nothing invented)
8
- - code_pattern — resolved/user-provided style guide, or null (review bare)
9
- - invariants[] — BLOCKING code-pattern rules to re-check, or empty
10
- (a violation is a P0 finding)
11
- - validation_gate[] — the pattern's enforceable acceptance checks (already
12
- measurability-filtered at reconciliation), or empty.
13
- Verify treats each line as an acceptance criterion;
14
- review re-checks them against the diff.
15
- - fe_rules[] — impact-ordered FE rule-pack rules (a11y/perf) when the
16
- diff touches FE files, else empty. Findings from these
17
- are P1–P3 by impact (never automatic P0), always with
18
- file:line.
19
- - security_checklist[] — OWASP/STRIDE checklist items (phase=security only),
20
- else empty
21
- - tdd_suite[] — (phase=verify, v0.33.0) the plan's materialized TDD
22
- acceptance tests: {requirement, test_path} per
23
- non-exempt requirement, plus the run's exemptions
24
- (`tdd: exempt — <reason>` lines). Empty on a
25
- whole-run exemption or a pre-v0.33.0 plan.
26
- - gotchas[] — 0–3 repair-memory entries whose `scope` glob matches
27
- `changed_files`, or empty. A CHECKLIST, not a rule
28
- set: "has this change reintroduced a failure this
29
- project already paid for?" A confirmed hit is a
30
- normal finding, anchored and severity-classified like
31
- any other — never an automatic P0 because a gotcha
32
- named it. Empty is the normal case. Canonical:
33
- `.claude/skills/_shared/gotchas.md`.
34
- - changed_files[] — the surface to examine
35
- - constraints[] — intent-spec hard rules (a violation is a P1 finding)
36
- - model, effort — informational
37
-
38
- ## Review procedure (phase=review)
39
-
40
- 1. Examine changed_files against code_pattern (if given) and constraints.
41
- 2. Create/update test files and test cases for the changed surface.
42
- 3. Re-check each `invariants[]` rule against the diff independently (don't trust the
43
- executor's self-attestation) — any violation is a P0 finding. Re-check each
44
- `validation_gate[]` line the same way — an unmet enforceable line is P0.
45
- 4. Re-check each `fe_rules[]` rule against the FE parts of the diff; emit
46
- findings with file:line, classified P1–P3 by real impact (a rule-pack hit is
47
- never automatically P0 — invariants and the gate own that severity).
48
- 5. **Evidence-or-advisory (anti-phantom rule):** every P0–P2 finding MUST carry
49
- `location` as `file:line` plus `quote` — the offending line(s) copied
50
- VERBATIM from the file (like `actual_model`: quoted, never reconstructed).
51
- A finding you cannot anchor to a real line you read this session is
52
- AUTO-P3 (advisory — it never gates ship and never triggers a fix dispatch).
53
- The caller spot-checks quotes before acting on P0/P1.
54
- 6. Classify EVERY finding on the P0–P3 ladder:
55
- - P0 — objective breakage: failing tests, broken build, unmet acceptance
56
- criteria, runtime errors, invariant violations. Gates ship; the caller
57
- auto-fixes immediately (no ask).
58
- - P1 — correctness or security risk, constraint violations (judgment-level
59
- blockers that don't break the build). Gates ship; the caller asks the user
60
- before fixing.
61
- - P2 — maintainability: duplication, missing tests for a changed path,
62
- unclear structure. Advisory; itemized in the summary as an optional fix-batch.
63
- - P3 — cosmetic: naming, formatting, length, style. Advisory; counted only.
64
- 7. Never fix P2/P3. P0/P1 fixes are the caller's decision, not yours.
65
-
66
- ## Verify procedure (phase=verify — two halves, v0.33.0)
67
-
68
- **Half 1 — TDD gate (deterministic):**
69
- 1. Run the build and full test suite — INCLUDING every `tdd_suite[]` test.
70
- 2. Per non-exempt requirement: its TDD test green = that requirement's
71
- definition-of-done met; red = a P0 finding tied to that requirement
72
- (`criterion` = the requirement id). Report `tdd: {green: n, red: n,
73
- exempt: n}` — the caller owns the `tdd_loop_max` repair loop; you never fix.
74
- An empty `tdd_suite[]` (whole-run exemption / older plan) → skip this half
75
- and SAY so in the return; never invent tests here.
76
-
77
- **Half 2 — adversarial review (attack the green implementation):**
78
- 3. Hunt what the spec missed: edge cases (empty/zero/max inputs, unicode,
79
- pagination edges), error paths (failure of each external call, partial
80
- writes), contract violations (response shapes, status codes, event
81
- payloads vs consumers), race/ordering hazards on shared state, and
82
- workflow breaks — dead wiring (a route/handler/command nothing reaches),
83
- broken commands, config keys read by nothing. Findings on the P0–P3
84
- ladder with the same evidence-or-advisory rule (verbatim quote or AUTO-P3).
85
-
86
- **Criteria sweep (unchanged):**
87
- 4. Fold every `validation_gate[]` line into the criteria set (each enforceable
88
- line IS an acceptance criterion; the slice only carries enforceable ones —
89
- measurability was decided at reconciliation, don't re-litigate it).
90
- 5. Check each criterion individually — pass/fail per criterion, each with
91
- `evidence`: the test name/output line that proves it, or the `file:line`
92
- that satisfies it (quoted, never asserted from memory). An unmet gate
93
- line is an unmet criterion (P0).
94
- 6. Report failures precisely (which criterion, what observed). You do not fix;
95
- the caller owns the auto-fix-once loop.
96
-
97
- ## Security procedure (phase=security — opt-in, config `security_review`)
98
-
99
- 1. Sweep ONLY `changed_files[]` against each `security_checklist[]` item
100
- (OWASP/STRIDE-derived; supplied in the slice, never invented).
101
- 2. If Semgrep is installed in the environment (`semgrep --version` succeeds),
102
- run it scoped to the changed files and fold its results in; skip silently
103
- otherwise — never install tooling.
104
- 3. Findings on the same P0–P3 ladder: a directly exploitable flaw introduced by
105
- the diff (injection, authz bypass, secret in code) is P0; a hardening gap or
106
- risky-but-guarded path is P1; defense-in-depth suggestions are P2/P3.
107
- 4. Report only; you never fix. Same return contract (no `result` field —
108
- security is a findings pass, not a verdict).
109
-
110
- ## Return contract (emit EXACTLY this)
111
-
112
- - phase
113
- - findings[]: { severity: P0|P1|P2|P3, location ("file:line" — REQUIRED for
114
- P0–P2), quote (offending line(s) VERBATIM — REQUIRED for P0–P2;
115
- missing/unanchored ⇒ the finding is AUTO-P3), description,
116
- criterion|null }
117
- - criteria[] (verify only): { criterion, result: pass|fail, evidence — the test
118
- name/output line or file:line that proves it }
119
- - tdd (verify only): { green: int, red: int, exempt: int } — the TDD-gate tally
120
- (omit only when the slice carried no tdd_suite[])
121
- - tests: { added: int, updated: int, passing: "x/y" }
122
- - result (verify only): passed | failed
123
- - actual_model — the model id quoted VERBATIM from your system prompt ("The exact
124
- model ID is …"); NEVER inferred; `unknown` if absent
125
- - actual_effort — the value of $CLAUDE_EFFORT (read via Bash)
126
- - failure_reason — required if the pass itself could not run; else null
127
- - gotcha_recorded — REQUIRED only when a repair loop CLOSED inside this same run
128
- and you re-checked it (a P0/P1 you raised and that was fixed; a
129
- verify criterion that was unmet and is now met): the entry body
130
- {trigger, symptom, cause, fix, scope}, or `none` + a one-line
131
- reason. Not required otherwise. A finding left OPEN returns
132
- `none` — an unsolved failure is not a gotcha. You RETURN it;
133
- the caller writes the file (`_shared/return-validation.md` §7)
134
-
135
- Malformed returns are treated as failure by the caller.
1
+ # orc-review-verify — Core (the input slice)
2
+
3
+ The INPUT SLICE the orchestrator builds for ONE review, verify or security
4
+ dispatch. The procedure and the return contract live in ONE place, the agent
5
+ file: `phase=review` and `phase=security` → `.claude/agents/orc-reviewer-opus-5-low.md`;
6
+ `phase=verify` → `.claude/agents/orc-verifier-opus-5-med.md`. The caller owns
7
+ the auto-fix-once loop and the `tdd_loop_max` repair loop, and validates the
8
+ return against `../../../_shared/return-validation.md`.
9
+
10
+ ## Input slice
11
+
12
+ Canonical shape + how to build it: `../../../_shared/review-slice.md` (read it at
13
+ the dispatch). The verifier gets the same `gotcha_card` + `tool_findings[]`.
14
+
15
+ Slice fields: changed_files[] · diff_ranges[] · acceptance_criteria[] · constraints[] · code_pattern · invariants[] · validation_gate[] · fe_rules[] · security_checklist[] · graph_changes · tool_findings[] · gotcha_card · rules_card · previous_findings[] · mode
16
+
17
+ - phase: review | verify | security
18
+ - acceptance_criteria[] — the intent-spec's definition-of-done, verbatim
19
+ (verify checks EXACTLY these; nothing invented)
20
+ - code_pattern — resolved/user-provided style guide, or null (review bare)
21
+ - invariants[] — BLOCKING code-pattern rules to re-check, or empty
22
+ (a violation is a P0 finding)
23
+ - validation_gate[] — the pattern's enforceable acceptance checks (already
24
+ measurability-filtered at reconciliation), or empty.
25
+ Verify treats each line as an acceptance criterion;
26
+ review re-checks them against the diff.
27
+ - fe_rules[] — impact-ordered FE rule-pack rules (a11y/perf) when the
28
+ diff touches FE files, else empty. Findings from these
29
+ are P1–P3 by impact (never automatic P0), always with
30
+ file:line.
31
+ - security_checklist[] — OWASP/STRIDE checklist items (phase=security only),
32
+ else empty
33
+ - tdd_suite[] — (phase=verify, v0.33.0) the plan's materialized TDD
34
+ acceptance tests: {requirement, test_path} per
35
+ non-exempt requirement, plus the run's exemptions
36
+ (`tdd: exempt — <reason>` lines). Empty on a
37
+ whole-run exemption or a pre-v0.33.0 plan.
38
+ - gotcha_card — the gotcha card's `text` (slice §2), or null (no
39
+ match is the normal case). ALWAYS built when anything
40
+ matches. A CHECKLIST, not a rule set: a confirmed hit
41
+ is a normal finding, never an automatic P0.
42
+ - tool_findings[] — the free check's lines on changed files (never
43
+ re-reported), or empty
44
+ - diff_ranges[], rules_card, graph_changes, previous_findings[] (re-review
45
+ only), mode (review · disprove · security) — as the canonical slice defines them
46
+ - changed_files[] — the surface to examine
47
+ - constraints[] — intent-spec hard rules (a violation is a P1 finding)
48
+ - model, effort — informational
49
+
50
+ The P0–P3 ladder and the AUTO-P3 evidence rule (an unanchored finding never
51
+ gates) are defined in the agent files. Malformed returns are treated as failure
52
+ by the caller.
@@ -1,7 +1,7 @@
1
- # orc-review-verify — Subagent wrapper (orchestrator prepends at spawn)
2
-
3
- You are an isolated review/verify worker. Examine only what the slice gives
4
- you. You do not fix anything — you classify, test, and report. Emit the return
5
- structure from core.md and STOP.
6
-
7
- [Orchestrator: append the input slice here at spawn time.]
1
+ # orc-review-verify — Subagent wrapper (orchestrator prepends at spawn)
2
+
3
+ You are an isolated review/verify worker. Examine only what the slice gives
4
+ you. You do not fix anything — you classify, test, and report. Emit the return
5
+ structure your agent file defines and STOP.
6
+
7
+ [Orchestrator: append the input slice here at spawn time.]
@@ -12,29 +12,18 @@ description: >
12
12
 
13
13
  # orc-testgen
14
14
 
15
- One entry point: spawned via the Task tool with `subagent.md` framing + the
16
- slice, which points to `core.md` — the AUTHORITATIVE procedure + return contract;
17
- the summary below orients.
15
+ A pointer. The orchestrator spawns `orc-test-author-opus-5-med` via the Task
16
+ tool, prepending `subagent.md` framing + the input slice. It WRITES test cases;
17
+ it never runs them and never gates the ship.
18
18
 
19
- ## What the worker does (summary)
20
-
21
- 1. Take the slice: changed surface (`actual_files`), the intent-spec's
22
- definition-of-done (acceptance criteria), touched flows, constraints, detected stack.
23
- 2. Write **automated test files** in the project's framework, covering the changed surface.
24
- 3. Write a manual **TEST-PLAN.md** with two separated sections — "run the automated
25
- suite" (exact CLI command) and "exercise the real running service" (manual/curl steps).
26
- 4. For an HTTP/API backend, write a Postman-importable **test-cases.http** curl bundle
27
- (env-var placeholders — never real secrets).
28
- 5. Run NOTHING. Advisory `notes[]` may flag a case the code likely won't satisfy.
29
-
30
- The manual deliverables (TEST-PLAN.md + test-cases.http) are pinned to
31
- **`test-generator/<change-slug>/` at the project root** — a visible user
32
- deliverable, never inside `.claude/` or the run folder (see `core.md`).
33
-
34
- **Validation checkpoint before returning:** confirm each promised deliverable
35
- actually exists on disk **at the pinned path** (test files in the project's
36
- conventions; TEST-PLAN.md and — when the stack exposes HTTP — test-cases.http
37
- under `test-generator/<change-slug>/`) before emitting the return contract in `core.md`.
19
+ - **Input slice** (the orchestrator builds it): `core.md`.
20
+ - **Procedure + return contract** (the ONE source): the agent file,
21
+ `.claude/agents/orc-test-author-opus-5-med.md`. The manual deliverables
22
+ (TEST-PLAN.md + test-cases.http) are pinned to
23
+ **`test-generator/<change-slug>/` at the project root** — a visible user
24
+ deliverable, never inside `.claude/` or the run folder.
25
+ - **Validator** (the caller checks every return against it):
26
+ `../../../_shared/return-validation.md`.
38
27
 
39
28
  Fixed model: `orc-test-author-opus-5-med` (Opus 5.5 medium — authoring good
40
29
  integration tests is a judgment task). Opt-in: the orchestrator dispatches this
@@ -1,59 +1,20 @@
1
- # orc-testgen — Core (mode-neutral)
2
-
3
- A procedure specification: inputs, steps, outputs. Executed by a spawned
4
- `orc-test-author-opus-5-med` subagent; the orchestrator never runs this
5
- itself. **Authoring only — RUN NOTHING, GATE NOTHING.** The user tests manually.
6
-
7
- ## Input slice (you receive exactly this)
8
-
9
- - changed_files[] — the surface the change touched (from the run's actual_files)
10
- - acceptance_criteria[] — the intent-spec's definition-of-done (the "new behaviour")
11
- - touched_flows[] — user journeys through the changed code (may be empty)
12
- - constraints[] — intent-spec hard rules
13
- - stack — {language, test_framework, is_http_api}; detect if absent
14
- - test_types[] — subset of {new_behaviour, flow, change, regression}; default all
15
- - output_conventions — where tests live in this repo
16
-
17
- ## Procedure
18
-
19
- 1. Detect stack: test framework + conventions, and whether the project exposes
20
- HTTP endpoints (→ `is_http_api`).
21
- 2. Derive a **test matrix** from changed_files + acceptance_criteria + flows —
22
- one row per case {id, type, target, asserts, external_deps}. Bound regression
23
- to the diff's blast radius; never test the whole app.
24
- 3. Author **automated test files** in the project's framework/conventions where
25
- feasible. Match existing test style. These stay in the project's own test
26
- conventions (`output_conventions`) — do NOT move them.
27
- 4. **Pin the manual-QA output folder.** The two manual deliverables below are
28
- USER deliverables, not run state — write BOTH to
29
- **`test-generator/<change-slug>/` at the PROJECT ROOT** (create the folder if
30
- absent). `<change-slug>` = the run's existing kebab-case run-folder slug (e.g.
31
- `post-users`). NEVER write them inside `.claude/`, and NEVER inside the run
32
- folder — a hidden path is invisible for self-QA.
33
- 5. Write **`test-generator/<change-slug>/TEST-PLAN.md`** (manual cases: scenario,
34
- setup, steps, expected) with two CLEARLY SEPARATED sections:
35
- - "Run the automated test suite" — the exact CLI command(s), pasted.
36
- - "Exercise the real running service" — manual steps / curl.
37
- 6. If `is_http_api`: write **`test-generator/<change-slug>/test-cases.http`** —
38
- one Postman-importable `curl` per endpoint/flow (env-var placeholders for base
39
- URL + auth; NEVER real secrets). Reference it from TEST-PLAN.md.
40
- 7. Advisory only: note (do not gate) any case the code likely won't satisfy.
41
-
42
- ## Return contract (emit EXACTLY this; the caller validates)
43
-
44
- - test_matrix[] — the rows above (or counts by type)
45
- - files_authored[] — automated test files created/updated
46
- - test_plan_path — path to TEST-PLAN.md; MUST be inside
47
- `test-generator/<change-slug>/` (any other location is
48
- a malformed return)
49
- - curl_bundle_path — path to test-cases.http (also inside
50
- `test-generator/<change-slug>/`), or null (non-API projects)
51
- - run_command — exact CLI command(s) to run the authored tests
52
- - notes[] — advisory gaps noticed while authoring (non-blocking); else []
53
- - actual_model — model id quoted VERBATIM from your system prompt ("The
54
- exact model ID is …"); NEVER inferred; `unknown` if absent
55
- - actual_effort — the value of $CLAUDE_EFFORT (read via Bash)
56
- - failure_reason — required if you could not author; else null
57
-
58
- Malformed returns are treated as failure by the caller. Never run tests; never
59
- spawn subagents.
1
+ # orc-testgen — Core (the input slice)
2
+
3
+ The INPUT SLICE the orchestrator builds for ONE `orc-test-author-opus-5-med`
4
+ dispatch. The procedure and the return contract live in ONE place: the agent
5
+ file, `.claude/agents/orc-test-author-opus-5-med.md`. The orchestrator never
6
+ runs this itself. **Authoring only — RUN NOTHING, GATE NOTHING.** The user tests manually.
7
+
8
+ ## Input slice (you receive exactly this)
9
+
10
+ - changed_files[] — the surface the change touched (from the run's actual_files)
11
+ - acceptance_criteria[] — the intent-spec's definition-of-done (the "new behaviour")
12
+ - touched_flows[] — user journeys through the changed code (may be empty)
13
+ - constraints[] — intent-spec hard rules
14
+ - stack — {language, test_framework, is_http_api}; detect if absent
15
+ - test_types[] — subset of {new_behaviour, flow, change, regression}; default all
16
+ - output_conventions — where tests live in this repo
17
+
18
+ The manual deliverables go to `test-generator/<change-slug>/` at the PROJECT
19
+ ROOT (`<change-slug>` = the run's kebab-case run-folder slug). Malformed returns
20
+ are treated as failure by the caller.
@@ -1,7 +1,7 @@
1
- # orc-testgen — Subagent wrapper (orchestrator prepends at spawn)
2
-
3
- You are an isolated test-authoring worker. You WRITE test cases from the slice
4
- below; you never run them, never fix code, never gate the ship. Make manual
5
- testing easy for the user. Emit the return structure from core.md and STOP.
6
-
7
- [Orchestrator: append the input slice here at spawn time.]
1
+ # orc-testgen — Subagent wrapper (orchestrator prepends at spawn)
2
+
3
+ You are an isolated test-authoring worker. You WRITE test cases from the slice
4
+ below; you never run them, never fix code, never gate the ship. Make manual
5
+ testing easy for the user. Emit the return structure your agent file defines and STOP.
6
+
7
+ [Orchestrator: append the input slice here at spawn time.]
@@ -1,60 +1,56 @@
1
- ---
2
- name: orc-advisor
3
- description: >
4
- Pre-analysis Advisor for the ORC ultra lane. Runs ONCE at ultra Phase U0
5
- (after intake, before the analyst) to produce a code-grounded advisory
6
- brief: domain risks, alternatives, a mandatory security-risk section, a
7
- request-specific rubric the ultra judges score against, open questions
8
- (relayed to the user in one batch), and the seed of the run's assumption
9
- ledger. Dispatched only from /orc-ultra — no slash command of its own, never
10
- in orc or orc-mini. The orchestrator dispatches the advisor subagent — it
11
- never advises itself.
12
- ---
13
-
14
- # ORC-ADVISOR (ultra-lane advisory brief)
15
-
16
- Ultra-complex tasks fail on wrong interpretation, silent assumptions, and
17
- generic quality bars. The Advisor front-loads the fix: one max-effort pass
18
- that frames the request against the REAL codebase and hands every downstream
19
- role — analyst, planner, judges, executors — the same request-specific brief.
20
-
21
- Ultra lane ONLY. There is no `/orc-advisor` command; the orchestrator
22
- dispatches `orc-advisor-opus-5-xhigh` at Phase U0 of an `/orc-ultra` run.
23
- Cost is accepted by definition of the lane — no consent prompt.
24
-
25
- ## Hard rules
26
-
27
- 1. **The orchestrator never advises — it spawns.** Dispatch
28
- `orc-advisor-opus-5-xhigh` with the slice below; the advisor writes the
29
- brief; the orchestrator relays and injects.
30
- 2. **The advisor is read-only on the project** (Read/Glob/Grep + Bash for
31
- git introspection). It never edits code, never spawns subagents.
32
- 3. **One dispatch per run.** The advisor is never re-dispatched for
33
- revisions — post-brief quality is the judges' job.
34
- 4. **The brief is injected LITERALLY** (never a file pointer) into the
35
- analyst slice, the planner slice, all three judge slices, and — as
36
- advisory notes — the executor slices.
37
- 5. **The security section may not be skipped.** "No security surface" is a
38
- legitimate conclusion but must be stated with reasoning.
39
-
40
- ## Dispatch slice (orchestrator → advisor)
41
-
42
- - The user's request verbatim (plus the doc path when one exists).
43
- - The run-folder path for `advisory-brief.md`.
44
- - Detected stack summary (from intake — never re-detected).
45
-
46
- ## Brief contents (see the agent file for the full section spec)
47
-
48
- Risks & pitfalls (anchored) · alternatives + trade-offs · security risks
49
- (mandatory) · the three-part RUBRIC (correct analysis / correct plan /
50
- faithful implementation) · open questions with proposed defaults · seed
51
- assumption-ledger entries.
52
-
53
- ## Return contract
54
-
55
- `brief_path`, `open_questions[]`, `assumptions[]`, `actual_model` (verbatim
56
- from the agent's system-prompt model-id line), `actual_effort`
57
- ($CLAUDE_EFFORT). The orchestrator validates the return, emits the `ADVISE`
58
- trace line when logging, relays the open questions to the user in ONE batched
59
- round, folds the answers into the intent-spec, and records unanswered
60
- defaults as UNCONFIRMED in the assumption ledger.
1
+ ---
2
+ name: orc-advisor
3
+ description: >
4
+ Internal to /orc-ultra: the pre-analysis Advisor. Runs ONCE at Phase U0 and
5
+ writes the advisory brief, the security-risk section and the rubric the ultra
6
+ judges score against. No slash command of its own.
7
+ disable-model-invocation: true
8
+ ---
9
+
10
+ # ORC-ADVISOR (ultra-lane advisory brief)
11
+
12
+ Ultra-complex tasks fail on wrong interpretation, silent assumptions, and
13
+ generic quality bars. The Advisor front-loads the fix: one max-effort pass
14
+ that frames the request against the REAL codebase and hands every downstream
15
+ role — analyst, planner, judges, executors — the same request-specific brief.
16
+
17
+ Ultra lane ONLY. There is no `/orc-advisor` command; the orchestrator
18
+ dispatches `orc-advisor-opus-5-xhigh` at Phase U0 of an `/orc-ultra` run.
19
+ Cost is accepted by definition of the lane — no consent prompt.
20
+
21
+ ## Hard rules
22
+
23
+ 1. **The orchestrator never advises — it spawns.** Dispatch
24
+ `orc-advisor-opus-5-xhigh` with the slice below; the advisor writes the
25
+ brief; the orchestrator relays and injects.
26
+ 2. **The advisor is read-only on the project** (Read/Glob/Grep + Bash for
27
+ git introspection). It never edits code, never spawns subagents.
28
+ 3. **One dispatch per run.** The advisor is never re-dispatched for
29
+ revisions — post-brief quality is the judges' job.
30
+ 4. **The brief is injected LITERALLY** (never a file pointer) into the
31
+ analyst slice, the planner slice, all three judge slices, and — as
32
+ advisory notes — the executor slices.
33
+ 5. **The security section may not be skipped.** "No security surface" is a
34
+ legitimate conclusion but must be stated with reasoning.
35
+
36
+ ## Dispatch slice (orchestrator → advisor)
37
+
38
+ - The user's request verbatim (plus the doc path when one exists).
39
+ - The run-folder path for `advisory-brief.md`.
40
+ - Detected stack summary (from intake — never re-detected).
41
+
42
+ ## Brief contents (see the agent file for the full section spec)
43
+
44
+ Risks & pitfalls (anchored) · alternatives + trade-offs · security risks
45
+ (mandatory) · the three-part RUBRIC (correct analysis / correct plan /
46
+ faithful implementation) · open questions with proposed defaults · seed
47
+ assumption-ledger entries.
48
+
49
+ ## Return contract
50
+
51
+ `brief_path`, `open_questions[]`, `assumptions[]`, `actual_model` (verbatim
52
+ from the agent's system-prompt model-id line), `actual_effort`
53
+ ($CLAUDE_EFFORT). The orchestrator validates the return, emits the `ADVISE`
54
+ trace line when logging, relays the open questions to the user in ONE batched
55
+ round, folds the answers into the intent-spec, and records unanswered
56
+ defaults as UNCONFIRMED in the assumption ledger.
@@ -2,16 +2,11 @@
2
2
  name: orc-analyze
3
3
  description: >
4
4
  System Analyst for ORC. Use for "/orc-analyze", "analyze this doc for scope
5
- X", or "analyze this requirement against the code" — turning a requirement (a
6
- document, PDF by path or pasted, OR a plain-language request) into a precise,
7
- code-grounded requirement set BEFORE any planning. Bounds the deliverable to
8
- exactly the asked scope, pulls related adjacent scopes in only as anchored
9
- "do not build" context, maps each requirement to real files with
10
- quote-anchored file:line evidence, and challenges the user with recommended
11
- options. Opt-in DEEP mode adds a scout-driven code sweep, verify-every-claim,
12
- and alternatives + risks. Also auto-triggers inside /orc on a doc or
13
- ambiguous requirement. The orchestrator dispatches this to a subagent — it
14
- never analyzes itself.
5
+ X", or "analyze this requirement against the code". Turns a document (PDF by
6
+ path or pasted) or a plain-language request into a scope-bounded,
7
+ code-grounded requirement set with quote-anchored file:line evidence BEFORE
8
+ any planning, and challenges the user with recommended options. Opt-in DEEP
9
+ mode adds a scout-driven code sweep. Also auto-triggers inside /orc on a doc.
15
10
  ---
16
11
 
17
12
  # ORC-ANALYZE (System Analyst)
@@ -79,28 +74,26 @@ the user meant.
79
74
 
80
75
  ## Behavior trace (always on)
81
76
 
82
- `../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names
83
- the file and the layers). Lane token `analyze`, tier **Single-dispatch** —
84
- exactly ONE end-of-run packet, dispatched solo before `.current` is deleted.
85
- At run start write `log_dir/.current` = `run-analyze-<slug>-<DDMMYY>-<HHMMSS>.txt` AND
86
- `touch the trace file` of that name in the SAME step.
87
- Nothing else about the protocol is restated here; a phase that ends with
88
- `zero new trace lines is a protocol violation`.
77
+ `../_shared/phases/trace.md` (`core`, at run start; `orc lane phases orc-analyze --json` →
78
+ `trace_grammar` gives the verbs). Lane token `analyze`, tier
79
+ **Single-dispatch**. At run start write `log_dir/.current` =
80
+ `run-analyze-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
81
+ in the SAME step. A phase that ends with `zero new trace lines is a protocol violation`.
89
82
 
90
83
  `context-combiner` is a PHASE of this run, not a lane: its `DISPATCH`/`RETURN`,
91
84
  its Phase D verdicts and its conservation-gate result fold into THIS packet.
92
85
 
93
86
  ## Phases
94
87
 
95
- `orc lane phases orc-analyze --json` is this lane's pipeline: the ordered list, where
96
- each phase lives, and how much of it to read. **The CLI owns the order** — never
97
- derive it from the headings below, and never renumber or rename one without the
98
- manifest, because a `read: section` pointer names a HEADING and a renamed heading
99
- is a pointer into nothing.
88
+ `orc lane phases orc-analyze --json` is this lane's pipeline. **The CLI owns the order**:
89
+ never derive it from the headings below, and never rename or renumber one
90
+ without the manifest (`../_shared/lane-contract.md` §Phases).
100
91
 
101
92
  ## Phase A — Ingest & detect source mode
102
93
 
103
- Read the source. **Auto-detect** which of three modes applies:
94
+ First `orc lane config orc-analyze --json`. **`habits{}` in it → print
95
+ `habits.line`, read `../_shared/habits.md` NOW**; none → ignore every `(H …)`.
96
+ Then read the source. **Auto-detect** which of three modes applies:
104
97
  - **prose/spec** — a document of narrative requirements, or
105
98
  - **audit/structured** — a document with columns like expectation / notes / result, or
106
99
  - **requirement** — NO document; the user's plain-language request is the source
@@ -133,12 +126,11 @@ offer wording, the auto-consume back here: `references/thin-input.md`.
133
126
 
134
127
  ## Phase A′ — Standard vs Deep gate (default STANDARD)
135
128
 
136
- Before reconciliation, offer the depth choice (config `default_analysis_depth`
137
- presets the default; the run still confirms): deep = wider sweep, verify every
138
- claim, more questions, alternatives with trade-offs, noticeably more tokens;
139
- standard = faster, verifies the stated floor (hard rule 4). Mention the
140
- zero-token default switch `orc config set default_analysis_depth deep`. Deep
141
- requires explicit consent — never auto-escalates — and is **two-pass with
129
+ Before reconciliation, offer the depth choice (H `any.analysis.depth`). Config
130
+ `default_analysis_depth` presets it; mention the free switch `orc config set
131
+ default_analysis_depth deep`. Deep = wider sweep, verify every claim, more
132
+ questions, alternatives, more tokens; standard = faster, the hard rule 4 floor.
133
+ Deep needs explicit consent EVERY run (never auto) and is **two-pass with
142
134
  scouts**: load `references/deep-mode.md`. Standard is single-pass.
143
135
 
144
136
  ## Phase B — Bound scope
@@ -216,44 +208,18 @@ another RELATED doc (multi-analyze loop → combiner once 2+ related analyses
216
208
  exist). Menu rules, relatedness gate, combiner handling:
217
209
  `references/branching.md`.
218
210
 
219
- ## Mini variant
220
-
221
- For the fast lane, `orc-analyze-mini` (Sonnet 5 high) does a shallower version
222
- of the same flow: doc-optional intake, the same evidence-or-mark + floor (a)+(b)
223
- + triage rules — but **no deep mode and no scouts** (always single-pass), and
224
- concrete escalation thresholds to the full analyst. Used by orc-mini. Same
225
- artifacts, same output contract; trimmed depth. See that skill.
226
-
227
- ## Config
228
-
229
- **ONE resolver, and it is not you:** `orc lane config orc-analyze --json`. Obey
230
- `effective`, print every line in `announce[]` VERBATIM at preflight, and honour
231
- `stops[]` before wave 1. Never re-derive a value, a precedence or an inertness
232
- from `.claude/orc.config.yaml` — a key this lane does not read is not in the
233
- answer, and a key another key shadows comes back already marked. Exit ≠ 0 → say
234
- the CLI is unavailable and fall back to `../_shared/config-precedence.md`'s
235
- documented defaults, out loud. Priorities and families:
236
- `../_shared/config-precedence.md`.
237
-
238
- ## Calls
239
-
240
- **ONE catalogue, and it is not you:** `orc lane calls orc-analyze --json` names every
241
- CLI call this lane makes, each with its exit-code contract, its cost, when to run
242
- it, and what an EMPTY answer means. Never invent a spelling, never re-word an
243
- exit code, and never re-derive a state word — the CLI's state words are the only
244
- state words, and **an exit code is an ANSWER wherever that contract says so, not
245
- a failure**. A call the answer does not name is a call this lane does not make.
246
- Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
247
- command you are about to run, out loud, before running it.
248
-
249
- ## Rules — the anti-slop card (`../_shared/phases/rules.md`)
250
-
251
- `orc rules slice --lane orc-analyze --json` is the ONLY assembler; never build
252
- the card here. It rides under the house rules and above the task —
253
- **house rules > your project's rules > ORC's own packs** — and its `line` prints
254
- VERBATIM at preflight. Returns gain `rules_applied[]`, `rules_conflicts[]` (a gap,
255
- never a silent choice) and `rules_overridden[]`.
211
+ ## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
212
+
213
+ - **Calls:** `orc lane calls orc-analyze --json` names every call and its exit codes.
214
+ **An exit code is an ANSWER where it says so, not a failure.** Make no other call.
215
+ - **Config:** `orc lane config orc-analyze --json`. Obey `effective`, print every line
216
+ in `announce[]` VERBATIM at preflight, and honour `stops[]` before wave 1.
217
+ Never merge `.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`).
218
+ - **Habits:** Phase A, first step.
219
+ - **Rules:** `orc rules slice --lane orc-analyze --json` is the ONLY assembler
220
+ (`../_shared/phases/rules.md`). Its `line` prints VERBATIM at preflight.
221
+
256
222
  ## Waiting mid-run (`/orc-wait`)
257
223
 
258
224
  Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
259
- Checkpoint **full** · safe point **after the analyst returns**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
225
+ Checkpoint **full** · safe point **after the analyst returns**.