@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,55 +1,45 @@
1
- # Phase — Security pass (opt-in) (id: `security`)
2
-
3
- > **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
4
- > this library at W13 when `orc-diy` became its second reader. A spine is loaded
5
- > IN FULL when its skill activates; this is loaded when the phase fires, and most
6
- > runs skip most phases.
7
- >
8
- > **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
9
- > `composed` is what `orc diy compile` stitches — the same phase expressed as
10
- > `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
11
- > procedure. Reading the wrong one is the failure `README.md` names: a lane
12
- > doing a phase its product promise says it does differently.
13
- > `orc lane phases <lane> --json` names the layer for each lane.
14
-
15
- <!-- orc:layer full -->
16
-
17
- ## Security pass (opt-in)
18
-
19
- Only when config `security_review` is `on`/`ask` (default `off`) AND a task
20
- scored **≥ 70** (reuses the risk floor). `ask` → one P0 prompt; `on` →
21
- silent. Dispatch the reviewer with `phase=security` + changed files +
22
- `security-checklist.md` (load only now). Same ladder, same
23
- hard-rule-5 handling; report-only.
24
-
25
- <!-- /orc:layer -->
26
-
27
- <!-- orc:layer composed -->
28
-
29
- ## Phase: Security pass
30
-
31
- <!-- diy:when security=off -->
32
- The security pass is OFF in this flow — skip silently.
33
- <!-- /diy:when -->
34
- <!-- diy:when security=ask -->
35
- When at least one task scored at or above the risk floor (70), ask the user
36
- once after review whether to run the security pass; on yes, run it exactly as
37
- the full lane's Phase 5.5 (reviewer re-dispatched with the checklist from
38
- `.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
39
- run's changed files).
40
- <!-- /diy:when -->
41
- <!-- diy:when security=on -->
42
- When at least one task scored at or above the risk floor (70), dispatch the
43
- security pass without asking — the full lane's Phase 5.5 with the checklist
44
- from `.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
45
- run's changed files.
46
- <!-- /diy:when -->
47
- <!-- diy:when security=always -->
48
- Dispatch the security pass on EVERY run of this flow, regardless of task
49
- scores — the full lane's Phase 5.5 with the checklist from
50
- `.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
51
- run's changed files. (This flow removes the risk-floor trigger, not the
52
- pass's mechanics.)
53
- <!-- /diy:when -->
54
-
55
- <!-- /orc:layer -->
1
+ # Phase — Security pass (opt-in) (id: `security`)
2
+
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.
4
+
5
+ <!-- orc:layer full -->
6
+
7
+ ## Security pass (opt-in)
8
+
9
+ Only when config `security_review` is `on`/`ask` (default `off`) AND a task
10
+ scored **≥ 70** (reuses the risk floor). `ask` → one P0 prompt (H `orc.phase-5-5.security`); `on` →
11
+ silent. Dispatch the reviewer with `phase=security` + changed files +
12
+ `security-checklist.md` (load only now). Same ladder, same
13
+ hard-rule-5 handling; report-only.
14
+
15
+ <!-- /orc:layer -->
16
+
17
+ <!-- orc:layer composed -->
18
+
19
+ ## Phase: Security pass
20
+
21
+ <!-- diy:when security=off -->
22
+ The security pass is OFF in this flow — skip silently.
23
+ <!-- /diy:when -->
24
+ <!-- diy:when security=ask -->
25
+ When at least one task scored at or above the risk floor (70), ask the user
26
+ once after review (H `orc.phase-5-5.security`) whether to run the security pass; on yes, run it exactly as
27
+ the full lane's Phase 5.5 (reviewer re-dispatched with the checklist from
28
+ `.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
29
+ run's changed files).
30
+ <!-- /diy:when -->
31
+ <!-- diy:when security=on -->
32
+ When at least one task scored at or above the risk floor (70), dispatch the
33
+ security pass without asking — the full lane's Phase 5.5 with the checklist
34
+ from `.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
35
+ run's changed files.
36
+ <!-- /diy:when -->
37
+ <!-- diy:when security=always -->
38
+ Dispatch the security pass on EVERY run of this flow, regardless of task
39
+ scores — the full lane's Phase 5.5 with the checklist from
40
+ `.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
41
+ run's changed files. (This flow removes the risk-floor trigger, not the
42
+ pass's mechanics.)
43
+ <!-- /diy:when -->
44
+
45
+ <!-- /orc:layer -->
@@ -1,16 +1,6 @@
1
1
  # Phase — Ship (id: `ship`)
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
 
@@ -23,7 +13,7 @@ Emit `PHASE ship start`. Show current branch.
23
13
  (`git diff --numstat`, exclusions applied) vs config `stacked_pr_loc`/
24
14
  `stacked_pr_files`. Under threshold or `stacked_pr: off` → silent, ship normally
25
15
  (`GATE stack-gate pass :: under-threshold`). Tripped → surface report + ONE P0
26
- question (stack into layers? or one regular PR?) in the SAME round as its two
16
+ question (H `orc.phase-8.stack`: stack into layers? or one regular PR?) in the SAME round as its two
27
17
  prerequisites — **a ticket** and a resolved PR template
28
18
  (`_shared/pr-templates.md`; none found → recommend three options). No ticket, no
29
19
  template, or "no" → **one regular PR, never re-asked**. "Yes" → commit on the
@@ -36,7 +26,7 @@ GREEN surface in `orc handoff surfaces --json`, say so —
36
26
  *"2 of these were changes a PM could have made alone — `/orc-handoff` next time."*
37
27
  That sentence is how anyone finds out that lane exists.
38
28
 
39
- Then ask together: **commit? push? create PR?** (PR: ticket +
29
+ Then ask together (H `orc.phase-8.ship`): **commit? push? create PR?** (PR: ticket +
40
30
  title + target branch; generate from `../../orc/subskills/orc-pr/pr.md`). If Phase 6.5 ran,
41
31
  commit `test-generator/<change-slug>/` too (a user deliverable, never gitignored).
42
32
  **`mock-examples/` is NEVER staged** (drift-recovery.md; no `.gitignore` edit —
@@ -46,10 +36,11 @@ On success: delete the ephemeral decision log; KEEP checkpoint + dispatch log.
46
36
  run changed; point at `/orc-wiki`. **Post-ship refresh ask** (BIG runs, /orc +
47
37
  /orc-ultra — the `wiki_refresh_ask_tasks`/`_files` triggers and full rules in
48
38
  `../../orc-wiki/references/staleness.md`): upgrade the passive note to **"Refresh
49
- wiki now?"**; on "later" print the prominent stale warning and stamp
39
+ wiki now?"** (H `orc.phase-8.wiki-refresh`); on "later" print the prominent stale warning and stamp
50
40
  `wiki_refresh_declined` in the checkpoint. Then ALWAYS show the completion
51
41
  usage report — /usage limits + the full dispatch log (model/effort/score per
52
- subagent). The user must always know what the run cost. **Code graph
42
+ subagent). The user must always know what the run cost. A `proposal` in
43
+ `habits{}` → its ONE line joins that report (`../habits.md` §3). **Code graph
53
44
  (`../code-graph.md` §5–§6):** run `orc graph update --if-enabled` once more —
54
45
  fix rounds move code — and emit `GRAPH-UPDATE`; then run `orc graph notes pending
55
46
  --files <every path the run changed> --at end --if-enabled` — exit 0 → one noter
@@ -1,9 +1,6 @@
1
1
  # Phase — Stop, usage report, resume (id: `stop-resume`)
2
2
 
3
- > **Library file.** Canonical since v1.0.0 W11; it was
4
- > the `orc` skill's own `stop-and-resume` reference. Layers declared: `core` only — the stop
5
- > sequence is identical in every lane that stops, and the lane-specific half
6
- > (which moments are MANDATORY stops) is already a per-lane rule in the spine.
3
+ > **Library file**, `core` only: the stop sequence is identical in every lane that stops; which moments are MANDATORY stops is a per-lane rule in the spine.
7
4
 
8
5
  <!-- orc:layer core -->
9
6
 
@@ -41,7 +38,7 @@ boundary is not.
41
38
  4. **Usage report** (see below).
42
39
  5. **Generate the resume block** (see below) — regenerate FRESH at every stop,
43
40
  never reuse an old one. It is printed inline AND is the body of `RESUME.md`.
44
- 6. Tell the user: what's done / remaining, then BOTH continue paths:
41
+ 6. Tell the user: what's done / remaining, then BOTH continue paths (H `any.stop.where`):
45
42
  "Reply **continue** here, or paste the block below in a **fresh session**
46
43
  (recommended if this conversation is long — cheaper and cleaner than
47
44
  dragging this context forward)."
@@ -1,48 +1,73 @@
1
- # Phase — Summary (id: `summary`)
2
-
3
- > **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
4
- > this library at W13 when `orc-diy` became its second reader. A spine is loaded
5
- > IN FULL when its skill activates; this is loaded when the phase fires, and most
6
- > runs skip most phases.
7
- >
8
- > **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
9
- > `composed` is what `orc diy compile` stitches — the same phase expressed as
10
- > `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
11
- > procedure. Reading the wrong one is the failure `README.md` names: a lane
12
- > doing a phase its product promise says it does differently.
13
- > `orc lane phases <lane> --json` names the layer for each lane.
14
-
15
- <!-- orc:layer full -->
16
-
17
- ## Summary
18
-
19
- Emit `PHASE summary start`. Report: tasks/waves/dispatches (scores + overrides), escalations,
20
- needs_context events, findings by severity (P0/P1 resolved; P2 itemized; P3
21
- counted), verify result, authored tests when 6.5 ran, repo state + branch,
22
- stale_review flags. Then ONE question: **"Apply the P2 fix-batch? The P3
23
- cosmetics too?"** — never fix unasked. Emit `PHASE summary end`.
24
-
25
- <!-- /orc:layer -->
26
-
27
- <!-- orc:layer composed -->
28
-
29
- ## Phase: Summary
30
-
31
- <!-- diy:when summary=off -->
32
- No summary phase: end after ship with a single line (tasks done / gate color
33
- / ship action taken) plus usage, and note which phases this flow skipped.
34
- <!-- /diy:when -->
35
- <!-- diy:when summary=short -->
36
- Short summary: one paragraph — what was built, gate results, ship action,
37
- skipped phases, and usage. No per-task breakdown.
38
- <!-- /diy:when -->
39
- <!-- diy:when summary=full -->
40
- Full summary exactly as the full lane's final phase: per-task outcomes with
41
- models used, findings outcomes, verify results, ship action, skipped
42
- phases, and usage.
43
- <!-- /diy:when -->
44
-
45
- Always name the phases this flow skipped by config — the user must never
46
- mistake a DIY run for a full-lane run.
47
-
48
- <!-- /orc:layer -->
1
+ # Phase — Summary (id: `summary`)
2
+
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.
4
+
5
+ <!-- orc:layer full -->
6
+
7
+ ## Summary
8
+
9
+ Emit `PHASE summary start`. Report: tasks/waves/dispatches (scores + overrides), escalations,
10
+ needs_context events, findings by severity (P0/P1 resolved; P2 itemized by
11
+ `group`; P3 counted; `pre_existing` in its own non-gating bucket; the
12
+ after-filter's `removed[]`, each with the id that removed it), verify result,
13
+ authored tests when 6.5 ran, repo state + branch,
14
+ stale_review flags. Then ONE question: **"Apply the P2 fix-batch? The P3
15
+ cosmetics too?"** (H `orc.phase-7.p2-batch` · `orc.phase-7.p3-batch`) — never fix unasked.
16
+ A yes dispatches ONE fix per `group` (R7), never one per finding. Then record
17
+ each Phase 5 finding's outcome and emit `FINDING-OUTCOME` (`../gotchas.md` §10
18
+ "Review close"). Print the card (§End-of-run card), then emit `PHASE summary end`.
19
+
20
+ <!-- /orc:layer -->
21
+
22
+ <!-- orc:layer composed -->
23
+
24
+ ## Phase: Summary
25
+
26
+ <!-- diy:when summary=off -->
27
+ No summary phase: end after ship with a single line (tasks done / gate color
28
+ / ship action taken) plus usage, and note which phases this flow skipped.
29
+ <!-- /diy:when -->
30
+ <!-- diy:when summary=short -->
31
+ Short summary: one paragraph — what was built, gate results, ship action,
32
+ skipped phases, and usage. No per-task breakdown.
33
+ <!-- /diy:when -->
34
+ <!-- diy:when summary=full -->
35
+ Full summary exactly as the full lane's final phase: per-task outcomes with
36
+ models used, findings outcomes, verify results, ship action, skipped
37
+ phases, and usage.
38
+ <!-- /diy:when -->
39
+
40
+ Always name the phases this flow skipped by config — the user must never
41
+ mistake a DIY run for a full-lane run. The run ends with the card
42
+ (`.claude/skills/_shared/phases/summary.md` §End-of-run card).
43
+
44
+ <!-- /orc:layer -->
45
+
46
+ ## End-of-run card
47
+
48
+ **ONE template, the same shape in every coding lane.** `/orc` and `/orc-diy`
49
+ print it at the end of the summary; `/orc-mini`, `/orc-fast` and `/orc-quick`
50
+ point here and print it at their end — a green ship, a red STOP, or a quick
51
+ entry that wrote code. Every detail goes BELOW the card, never above it.
52
+
53
+ ```
54
+ ✅ Fixed the null charge on guest checkout — 3 files, tests 14 passed (2 affected first)
55
+ review 2 findings · 1 fixed · 1 disputed (recorded) gotchas 1 recorded (G-044)
56
+ risk low — callers 3 in 2 files, tests reach 2 habits 1 proposal below
57
+ flaky 1 test passed on the re-run (no repair round) graph <gain line>
58
+ undo orc undo --run <run-slug> next commit? (your usual: review → commit)
59
+ ```
60
+
61
+ - **Line 1 is the outcome.** Start with ✅ (done), ⚠ (partial) or ⛔ (red). Then
62
+ say what happened, the files and the tests. The first sentence answers "what
63
+ happened?".
64
+ - **A row shows only when it has something.** Never print an empty row.
65
+ - **The `undo` row always shows on a run that wrote code:**
66
+ `orc undo --run <run-slug>` — never `git checkout -- .`, which also discards
67
+ the user's own edits. No `checkpoint.json` with `actual_files` → add
68
+ `--files <actual_files>`. No snapshot (not a git repository) → say
69
+ `undo none — no snapshot`. The command only PRINTS the undo; `--apply` runs
70
+ it. The lane never runs it itself.
71
+ - **Copy the CLI's words.** `risk` is the `blast_line` with its `why`;
72
+ `graph` is the `orc graph gain` `line`, VERBATIM — an estimate with a range,
73
+ never restated as a saving. `flaky` is the `GATE flaky` tests.
@@ -1,51 +1,41 @@
1
- # Phase — Test authoring (opt-in) (id: `testgen`)
2
-
3
- > **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
4
- > this library at W13 when `orc-diy` became its second reader. A spine is loaded
5
- > IN FULL when its skill activates; this is loaded when the phase fires, and most
6
- > runs skip most phases.
7
- >
8
- > **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
9
- > `composed` is what `orc diy compile` stitches — the same phase expressed as
10
- > `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
11
- > procedure. Reading the wrong one is the failure `README.md` names: a lane
12
- > doing a phase its product promise says it does differently.
13
- > `orc lane phases <lane> --json` names the layer for each lane.
14
-
15
- <!-- orc:layer full -->
16
-
17
- ## Test Authoring (opt-in; load ../../orc/subskills/orc-testgen/)
18
-
19
- Only when `config.generate_tests` is on (confirmed at intake). ORC **writes**
20
- test cases and **runs nothing** — never gates the ship. Dispatch
21
- `orc-test-author-opus-5-med` (run's `actual_files`, definition-of-done,
22
- touched flows, constraints, stack); it returns test files + a `TEST-PLAN.md` + a
23
- Postman-importable `test-cases.http` (HTTP APIs), the two manual deliverables
24
- written to **`test-generator/<change-slug>/` at the project root**. Validate the
25
- returned `test_plan_path`/`curl_bundle_path` are under that folder (else
26
- malformed → re-dispatch); state the exact path in the summary — discoverability
27
- is the point.
28
-
29
- <!-- /orc:layer -->
30
-
31
- <!-- orc:layer composed -->
32
-
33
- ## Phase: Test authoring
34
-
35
- <!-- diy:when testgen=off -->
36
- Test authoring is OFF in this flow — skip silently.
37
- <!-- /diy:when -->
38
- <!-- diy:when testgen=ask -->
39
- After verify (or after execution when verify is off), offer test authoring
40
- once; on yes, run the full lane's Phase 6.5 via
41
- `.claude/skills/orc/subskills/orc-testgen/SKILL.md` — it WRITES test cases
42
- and a test plan, never runs them, and never gates the ship.
43
- <!-- /diy:when -->
44
- <!-- diy:when testgen=on -->
45
- After verify (or after execution when verify is off), run the full lane's
46
- Phase 6.5 without asking via
47
- `.claude/skills/orc/subskills/orc-testgen/SKILL.md` — it WRITES test cases
48
- and a test plan, never runs them, and never gates the ship.
49
- <!-- /diy:when -->
50
-
51
- <!-- /orc:layer -->
1
+ # Phase — Test authoring (opt-in) (id: `testgen`)
2
+
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.
4
+
5
+ <!-- orc:layer full -->
6
+
7
+ ## Test Authoring (opt-in; load ../../orc/subskills/orc-testgen/)
8
+
9
+ Only when `config.generate_tests` is on (confirmed at intake). ORC **writes**
10
+ test cases and **runs nothing** — never gates the ship. Dispatch
11
+ `orc-test-author-opus-5-med` (run's `actual_files`, definition-of-done,
12
+ touched flows, constraints, stack); it returns test files + a `TEST-PLAN.md` + a
13
+ Postman-importable `test-cases.http` (HTTP APIs), the two manual deliverables
14
+ written to **`test-generator/<change-slug>/` at the project root**. Validate the
15
+ returned `test_plan_path`/`curl_bundle_path` are under that folder (else
16
+ malformed → re-dispatch); state the exact path in the summary — discoverability
17
+ is the point.
18
+
19
+ <!-- /orc:layer -->
20
+
21
+ <!-- orc:layer composed -->
22
+
23
+ ## Phase: Test authoring
24
+
25
+ <!-- diy:when testgen=off -->
26
+ Test authoring is OFF in this flow — skip silently.
27
+ <!-- /diy:when -->
28
+ <!-- diy:when testgen=ask -->
29
+ After verify (or after execution when verify is off), offer test authoring
30
+ once; on yes, run the full lane's Phase 6.5 via
31
+ `.claude/skills/orc/subskills/orc-testgen/SKILL.md` — it WRITES test cases
32
+ and a test plan, never runs them, and never gates the ship.
33
+ <!-- /diy:when -->
34
+ <!-- diy:when testgen=on -->
35
+ After verify (or after execution when verify is off), run the full lane's
36
+ Phase 6.5 without asking via
37
+ `.claude/skills/orc/subskills/orc-testgen/SKILL.md` — it WRITES test cases
38
+ and a test plan, never runs them, and never gates the ship.
39
+ <!-- /diy:when -->
40
+
41
+ <!-- /orc:layer -->