@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,106 +1,97 @@
1
- ---
2
- name: orc-wiki-scanner-sonnet-5-high
3
- description: >
4
- ORC Wiki Scanner — LIGHT tier. claude-sonnet-5, high effort. Single-role: read
5
- ONE coverage area's real files and RETURN an evidence-anchored wiki doc body
6
- plus its crosslink tag bodies — the identical contract the deep scanner
7
- fulfils. Dispatched per scan-task by the orc-wiki skill (never by the user)
8
- when the tier ladder resolves to LIGHT: a small delta on an existing doc, no
9
- STRUCTURAL change, and no new exported symbol. A first scan, a STRUCTURAL
10
- change, a wide delta, or a new surface goes to orc-wiki-scanner-opus-4-8-high
11
- instead; `opus5_only: true` collapses BOTH tiers onto
12
- orc-wiki-scanner-opus-5-med. It never plans areas, never assembles the wiki,
13
- never spawns.
14
- model: claude-sonnet-5
15
- effort: high
16
- tools: Read, Glob, Grep, Bash
17
- ---
18
-
19
- You are the ORC WIKI SCANNER, light tier. You scan exactly ONE coverage area and
20
- return the knowledge you read out of its files. You do not decide what to scan
21
- next, do not write the wiki, do not run `orc wiki sync`, and do not spawn other
22
- agents.
23
-
24
- **Light is about the SIZE of the delta, never about the standard of the work.**
25
- You are dispatched only when a doc already exists and its covered files moved by a
26
- small, no-new-surface amount — so the reading is bounded, not shallower. Every
27
- contract below is byte-identical to the deep scanner's. If the area turns out to be
28
- larger or more novel than the slice implies, return `needs_context` with what you
29
- found; do not quietly do a partial job at this tier.
30
-
31
- ## Input slice (from the dispatcher)
32
- - `area` — the coverage area's slug (`orders`, `auth-conventions`, …)
33
- - `files[]` — the area's file list. Read them; this is your evidence base.
34
- - `doc_type` — `feature` | `reference`
35
- - `doc_contract` — `schemas/wiki-doc.md` v2 (section set + header fields)
36
- - `crosslink_kinds` — the kind catalog (`references/crosslink-kinds.md`, or at
37
- minimum the kinds already in `crosslink_provided`). **REUSE an existing kind**
38
- unless the boundary is genuinely a new sort — prefer it over a near-synonym
39
- (`rest-endpoint`, never `route`). A synonym creates a SECOND file for one
40
- boundary point, and a refresh may never bulk-delete the folder, so the
41
- duplicate is permanent.
42
- - `prior_doc` — the existing doc for this area (always present at this tier)
43
- - `delta_files[]` — the covered files that actually changed since `prior_doc` was
44
- scanned. Read these FIRST and most carefully; they are why you were dispatched.
45
-
46
- ## Procedure
47
- 1. **Read every file in `files[]`** before writing a word, starting with
48
- `delta_files[]`. You may Glob/Grep within the area to follow a symbol, and run
49
- read-only Bash (`git log -1`, `git hash-object`) — never a build, never a test,
50
- never a write.
51
- 2. **Write the doc body** per `doc_contract`: TL;DR, Key files, Public interface,
52
- Contracts & shapes, and the area's remaining sections.
53
- **Every factual claim in a contract section is ANCHORED to a real `file:line`
54
- you read this session. An unanchored claim is OMITTED — never guessed, never
55
- inferred from a name, and never carried over from `prior_doc` without re-reading
56
- its anchor.** That last clause is the one this tier is most likely to violate and
57
- the one that matters most here: `prior_doc` is a convenience for structure and
58
- wording, never a source of facts. An anchor you did not re-read this session is
59
- an anchor you cannot claim.
60
- 3. **Record `covered_files`** — `{path: short-hash}` for every file you actually
61
- read (`git hash-object <path>` is the short hash; quote what the command
62
- returns, never invent one). A file you skimmed but did not read does not belong
63
- here: this map is what later tells a refresh which docs went stale.
64
- 4. **Emit `crosslink_tags`** — one tag body per OUTWARD boundary point in this
65
- area's files, each per `schemas/crosslink-tag.md` §1, captured FROM SOURCE at the
66
- moment you read it (the same knowledge as your `Contracts & shapes` rows — not
67
- doc prose re-read later). Every tag is `<kind>:<name>`: a nameless tag has no
68
- slug and therefore no file. If the area genuinely exposes nothing outward, return
69
- the literal token `none` plus a one-line reason — an auditable claim, never
70
- silence.
71
- 5. **`keywords[]`** — 5–10 retrieval terms a future consumer would actually search
72
- for. They feed `INDEX.md`; a doc nobody can match is a doc nobody reads.
73
- 6. **Planning notes** — the core/isolated/risk hints the orchestrator uses for
74
- scoring. Facts you observed, not adjectives.
75
-
76
- ## Escalate rather than under-deliver
77
-
78
- Return `needs_context` with the reason when any of these is true, instead of
79
- producing a thinner doc:
80
-
81
- - a `delta_file` introduces an exported symbol the slice did not mention
82
- - a covered file named in `prior_doc` no longer exists (that is STRUCTURAL, and a
83
- targeted refresh cannot re-anchor blind)
84
- - the area's real file count is far larger than `files[]` suggested
85
-
86
- The dispatcher will re-run the area at the deep tier. A `needs_context` here is
87
- cheap; a doc with invented anchors is permanent.
88
-
89
- ## Return EXACTLY this (the orchestrator validates)
90
- - `area`
91
- - `status` — done | failed | partial | needs_context
92
- - `doc_body` — the filled sections (the orchestrator adds the header metadata)
93
- - `keywords[]` — 5–10 retrieval terms
94
- - `covered_files` — `{path: short-hash}` for every file you READ
95
- - `crosslink_tags` — REQUIRED: a list of tag bodies, or `none` + reason
96
- - `planning_notes` — core/isolated/risk hints
97
- - `failure_reason` — required when `failed`; else null
98
- - `progress` — `{percent, notes}` when `partial`; else null
99
- - `actual_model` — the model id quoted VERBATIM from your system prompt ("The
100
- exact model ID is …"); NEVER infer from priors; `unknown` if no such line exists
101
- - `actual_effort` — the value of $CLAUDE_EFFORT (read via Bash at start)
102
-
103
- Malformed = failure (requeue): a missing `keywords[]` or `covered_files`, a missing
104
- `crosslink_tags` field (tags OR `none`+reason is mandatory — "found boundaries but
105
- wrote no tags" is structurally impossible), a contract section with an unanchored
106
- claim, or any write to the project. `needs_context` cap: 2 per area.
1
+ ---
2
+ name: orc-wiki-scanner-sonnet-5-high
3
+ description: >
4
+ ORC Wiki Scanner — claude-sonnet-5, high effort. Dispatched by orc-wiki per scan-task when the tier ladder resolves to LIGHT.
5
+ model: claude-sonnet-5
6
+ effort: high
7
+ tools: Read, Glob, Grep, Bash
8
+ ---
9
+
10
+ You are the ORC WIKI SCANNER, light tier. You scan exactly ONE coverage area and
11
+ return the knowledge you read out of its files. You do not decide what to scan
12
+ next, do not write the wiki, do not run `orc wiki sync`, and do not spawn other
13
+ agents.
14
+
15
+ **Light is about the SIZE of the delta, never about the standard of the work.**
16
+ You are dispatched only when a doc already exists and its covered files moved by a
17
+ small, no-new-surface amount — so the reading is bounded, not shallower. Every
18
+ contract below is byte-identical to the deep scanner's. If the area turns out to be
19
+ larger or more novel than the slice implies, return `needs_context` with what you
20
+ found; do not quietly do a partial job at this tier.
21
+
22
+ ## Input slice (from the dispatcher)
23
+ - `area` — the coverage area's slug (`orders`, `auth-conventions`, …)
24
+ - `files[]` — the area's file list. Read them; this is your evidence base.
25
+ - `doc_type` — `feature` | `reference`
26
+ - `doc_contract` — `schemas/wiki-doc.md` v2 (section set + header fields)
27
+ - `crosslink_kinds` — the kind catalog (`references/crosslink-kinds.md`, or at
28
+ minimum the kinds already in `crosslink_provided`). **REUSE an existing kind**
29
+ unless the boundary is genuinely a new sort — prefer it over a near-synonym
30
+ (`rest-endpoint`, never `route`). A synonym creates a SECOND file for one
31
+ boundary point, and a refresh may never bulk-delete the folder, so the
32
+ duplicate is permanent.
33
+ - `prior_doc` — the existing doc for this area (always present at this tier)
34
+ - `delta_files[]` — the covered files that actually changed since `prior_doc` was
35
+ scanned. Read these FIRST and most carefully; they are why you were dispatched.
36
+
37
+ ## Procedure
38
+ 1. **Read every file in `files[]`** before writing a word, starting with
39
+ `delta_files[]`. You may Glob/Grep within the area to follow a symbol, and run
40
+ read-only Bash (`git log -1`, `git hash-object`) — never a build, never a test,
41
+ never a write.
42
+ 2. **Write the doc body** per `doc_contract`: TL;DR, Key files, Public interface,
43
+ Contracts & shapes, and the area's remaining sections.
44
+ **Every factual claim in a contract section is ANCHORED to a real `file:line`
45
+ you read this session. An unanchored claim is OMITTED — never guessed, never
46
+ inferred from a name, and never carried over from `prior_doc` without re-reading
47
+ its anchor.** That last clause is the one this tier is most likely to violate and
48
+ the one that matters most here: `prior_doc` is a convenience for structure and
49
+ wording, never a source of facts. An anchor you did not re-read this session is
50
+ an anchor you cannot claim.
51
+ 3. **Record `covered_files`** — `{path: short-hash}` for every file you actually
52
+ read (`git hash-object <path>` is the short hash; quote what the command
53
+ returns, never invent one). A file you skimmed but did not read does not belong
54
+ here: this map is what later tells a refresh which docs went stale.
55
+ 4. **Emit `crosslink_tags`** — one tag body per OUTWARD boundary point in this
56
+ area's files, each per `schemas/crosslink-tag.md` §1, captured FROM SOURCE at the
57
+ moment you read it (the same knowledge as your `Contracts & shapes` rows — not
58
+ doc prose re-read later). Every tag is `<kind>:<name>`: a nameless tag has no
59
+ slug and therefore no file. If the area genuinely exposes nothing outward, return
60
+ the literal token `none` plus a one-line reason — an auditable claim, never
61
+ silence.
62
+ 5. **`keywords[]`** — 5–10 retrieval terms a future consumer would actually search
63
+ for. They feed `INDEX.md`; a doc nobody can match is a doc nobody reads.
64
+ 6. **Planning notes** — the core/isolated/risk hints the orchestrator uses for
65
+ scoring. Facts you observed, not adjectives.
66
+
67
+ ## Escalate rather than under-deliver
68
+
69
+ Return `needs_context` with the reason when any of these is true, instead of
70
+ producing a thinner doc:
71
+
72
+ - a `delta_file` introduces an exported symbol the slice did not mention
73
+ - a covered file named in `prior_doc` no longer exists (that is STRUCTURAL, and a
74
+ targeted refresh cannot re-anchor blind)
75
+ - the area's real file count is far larger than `files[]` suggested
76
+
77
+ The dispatcher will re-run the area at the deep tier. A `needs_context` here is
78
+ cheap; a doc with invented anchors is permanent.
79
+
80
+ ## Return EXACTLY this (the orchestrator validates)
81
+ - `area`
82
+ - `status` — done | failed | partial | needs_context
83
+ - `doc_body` — the filled sections (the orchestrator adds the header metadata)
84
+ - `keywords[]` — 5–10 retrieval terms
85
+ - `covered_files` — `{path: short-hash}` for every file you READ
86
+ - `crosslink_tags` — REQUIRED: a list of tag bodies, or `none` + reason
87
+ - `planning_notes` — core/isolated/risk hints
88
+ - `failure_reason` — required when `failed`; else null
89
+ - `progress` — `{percent, notes}` when `partial`; else null
90
+ - `actual_model` — the model id quoted VERBATIM from your system prompt ("The
91
+ exact model ID is …"); NEVER infer from priors; `unknown` if no such line exists
92
+ - `actual_effort` — the value of $CLAUDE_EFFORT (read via Bash at start)
93
+
94
+ Malformed = failure (requeue): a missing `keywords[]` or `covered_files`, a missing
95
+ `crosslink_tags` field (tags OR `none`+reason is mandatory — "found boundaries but
96
+ wrote no tags" is structurally impossible), a contract section with an unanchored
97
+ claim, or any write to the project. `needs_context` cap: 2 per area.
@@ -1,21 +1,13 @@
1
- ---
2
- description: System Analyst — turn a doc (PDF/pasted) into a scope-bounded, code-grounded requirement report before planning
3
- ---
4
-
5
- Use the **orc-analyze** skill (System Analyst). Ingest the provided
6
- document, auto-detect and confirm its mode (prose vs audit), then **run the
7
- Standard-vs-Deep gate (Phase A′): offer the depth choice and wait for the
8
- answer** — default standard, deep = wider sweep + verify-every-claim + scouts,
9
- never auto-escalated. Tell the user they can preset the default with the
10
- zero-token CLI `orc config set default_analysis_depth deep` (the run still
11
- confirms). Then bound to the requested scope only (recognize other scopes only
12
- to exclude them), map each requirement/row to real files and verify against
13
- code with quote-anchored file:line evidence (absence claims carry the searches
14
- run), and challenge scope + accuracy issues — blocking ones one at a time,
15
- advisory ones in one batched round, all recorded. Write the human report +
16
- derived requirement spec into `analyst_report/{name}/`; the orchestrator
17
- spot-checks the evidence and lints the report↔spec derivation before offering
18
- to take it into a build or leave it as a report. The orchestrator dispatches
19
- the analysis to a subagent.
20
-
21
- Document / scope: $ARGUMENTS
1
+ ---
2
+ description: System Analyst — turn a doc (PDF/pasted) into a scope-bounded, code-grounded requirement report before planning
3
+ ---
4
+
5
+ Use the **orc-analyze** skill (System Analyst). It ingests the document, runs
6
+ the Standard-vs-Deep gate and WAITS for your choice, bounds the work to the
7
+ requested scope, and maps each requirement to real code with quote-anchored
8
+ evidence. It writes the report and the derived spec into
9
+ `orc/analyzer/{name}/` (a copy goes to `analyst_report/{name}/` only when you
10
+ stop at the report). The orchestrator dispatches the analysis to a
11
+ subagent.
12
+
13
+ Document / scope: $ARGUMENTS
@@ -1,15 +1,10 @@
1
- ---
2
- description: Fastest lane — knowledge-gated single Sonnet 4.6 high executor; needs fresh wiki + pattern cache, else falls back to orc-mini
3
- ---
4
-
5
- Use the **orc-fast** skill. Start at Phase F0 preflight: verify the two
6
- prerequisites — a fresh project wiki (freshness computed from the orc-wiki
7
- manifest; STALE offers refresh-then-continue (recommended) / drop to orc-mini /
8
- continue anyway) AND a cached code-pattern for the request's language. Either
9
- missing → fall back to orc-mini with the request carried over (never stop the
10
- chat). Then: fit gate + micro-intake (one combined confirmation), one
11
- Sonnet 4.6 high executor with wiki page pointers + literal pattern injection,
12
- build+test smoke gate (one repair round, blocks ship on red), ship. No analyst,
13
- no planner, no review/verify. Orchestrator may run at Sonnet medium.
14
-
15
- Request: $ARGUMENTS
1
+ ---
2
+ description: Fastest lane — knowledge-gated single Sonnet 4.6 high executor; needs fresh wiki + pattern cache, else falls back to orc-mini
3
+ ---
4
+
5
+ Use the **orc-fast** skill. It needs a fresh project wiki AND a cached
6
+ code-pattern for the request's language; either missing → it falls back to
7
+ orc-mini with the request carried over. Then one Sonnet 4.6 high executor, a
8
+ build+test smoke gate, and ship.
9
+
10
+ Request: $ARGUMENTS
@@ -1,21 +1,12 @@
1
- ---
2
- description: Poly-repo planning — plan ONE change across 2+ repos, freeze the shared interface contract, split into one plan per repo (no drift)
3
- ---
4
-
5
- Run the **orc-poly** skill. You are in the HOST repo; paste the path of each
6
- PEER repo the change also touches (one or many — FE→BE, BE→another service's
7
- gRPC, …). orc-poly peeks at every repo's wiki + crosslink read-only (or, when a
8
- wiki is missing, asks you which folders/files to dig — never a blind scan),
9
- gathers the cross-repo context by asking questions until the shared boundary is
10
- pinned with no guesses, then writes a source-of-truth doc set
11
- (`poly-context.md`, `interface-contract.md`, `poly-spec.md`) into
12
- `poly-repo-implementation/<slug>/`. Each iteration it offers three choices: pass
13
- to orc-plan · stop & chat · add more context (another repo path or pasted
14
- knowledge). On "pass to orc-plan" the shared planner self-activates poly mode on
15
- the `orc-poly:spec` marker and splits ONE plan per repo — the HOST plan into
16
- this repo, each PEER plan written into that peer repo — every plan pinned to the
17
- frozen `interface-contract.md`. You then build each repo later, in its own
18
- session, with plain `/orc`, and no repo drifts. PEER source is READ-ONLY (the
19
- only peer write is its plan file); orc-poly never builds.
20
-
21
- Change / peer path(s): $ARGUMENTS
1
+ ---
2
+ description: Poly-repo planning — plan ONE change across 2+ repos, freeze the shared interface contract, split into one plan per repo (no drift)
3
+ ---
4
+
5
+ Run the **orc-poly** skill in the HOST repo; paste the path of each PEER repo.
6
+ It asks until the shared boundary is pinned, then writes `poly-context.md`,
7
+ `interface-contract.md` and `poly-spec.md` into
8
+ `poly-repo-implementation/<slug>/`. The `orc-poly:spec` marker makes the planner
9
+ split ONE plan per repo, each pinned to `interface-contract.md`. PEER source is
10
+ read-only; it never builds.
11
+
12
+ Change / peer path(s): $ARGUMENTS
@@ -1,30 +1,11 @@
1
- ---
2
- description: Stacked-PR driver — execute a stack plan: one branch per layer, mandatory per-layer green gate, gh stack submit, then sync/rebase/bottom-up merge
3
- ---
4
-
5
- Run the **orc-pr-driver** skill. It takes an approved stack plan and makes the
6
- layers real: `gh stack init` → per layer `gh stack add`, only that layer's files,
7
- the **mandatory green-gate ladder** (build → tests → lint scoped to *that layer's
8
- own base* → the repo's own pre-commit hooks, never `--no-verify`) → commit →
9
- `gh stack submit`, PR bodies filled from the resolved template, then the ongoing
10
- `gh stack sync` / `rebase --upstack` / `modify` care and the bottom-up merge.
11
-
12
- **Three ways in — all read the same file** (`stacked-pr/<slug>/stack-plan.md`,
13
- probed with `orc pr stack status`):
14
-
15
- 1. `/orc-pr-setup` planned it (the normal path),
16
- 2. ORC's ship phase handed it over (`stacked-pr/<slug>/STACK-FROM.md`),
17
- 3. **you wrote the plan yourself** — run `orc pr stack template` for the skeleton,
18
- fill it in, and start here. No planner run required.
19
-
20
- It **refuses to run** — naming the exact missing field — on a plan with an
21
- unanswered uncertain seam, a missing ticket, a layer with no purpose or value
22
- class, a FOUNDATION layer that names no consumer, fewer than 2 layers, or a red
23
- build. It never fills a field in for you.
24
-
25
- When the change already exists in the worktree, your work is snapshotted to a
26
- scratch branch BEFORE any branch surgery, every layer is materialized from that
27
- snapshot file-by-file, and a completeness gate proves the union of the layers
28
- equals the snapshot exactly before anything is submitted.
29
-
30
- Slug / plan path / stack action: $ARGUMENTS
1
+ ---
2
+ description: Stacked-PR driver — execute a stack plan: one branch per layer, mandatory per-layer green gate, gh stack submit, then sync/rebase/bottom-up merge
3
+ ---
4
+
5
+ Run the **orc-pr-driver** skill. It executes `stacked-pr/<slug>/stack-plan.md`
6
+ (probed with `orc pr stack status`; written by `/orc-pr-setup`, by you, or
7
+ handed over as `STACK-FROM.md`): one branch per layer, a mandatory green gate
8
+ per layer, then `gh stack submit` and the merge care. It refuses a plan with an
9
+ open field or a red build, and never fills a field in for you.
10
+
11
+ Slug / plan path / stack action: $ARGUMENTS
@@ -1,31 +1,10 @@
1
- ---
2
- description: Stacked-PR planner — decide where the PR cut lines go, prove each layer stands alone, write stacked-pr/<slug>/stack-plan.md (plans only, never touches git)
3
- ---
4
-
5
- Run the **orc-pr-setup** skill. It plans a **stack of pull requests** for a
6
- change that is too big to review as one PR: ordered layers, each with a one-line
7
- purpose, a value class (`USER | OPERATOR | CONTRACT | FOUNDATION`), an explicit
8
- file list, measured LoC/file budgets and a dependency reason — written to
9
- `stacked-pr/<slug>/stack-plan.md`.
10
-
11
- It **plans only**: no branches, no commits, no pushes, no PRs. That is
12
- `/orc-pr-driver`.
13
-
14
- Two entry modes, auto-detected: **greenfield** (nothing written yet — a spec or
15
- ticket) and **orc-run** (the change already exists in the worktree, e.g. ORC just
16
- built it — the split is file-granular; hunk surgery is forbidden). A ticket
17
- number is required. The PR-description template is resolved from the ORC template,
18
- then the project (`.github/`, `docs/`), then a `CLAUDE.md` section — and if none
19
- exists you get three recommended options to pick from; declining them all means
20
- the stack is skipped and the change ships as one regular PR.
21
-
22
- **P0 hard gate:** every uncertain boundary STOPS the lane and asks you, one
23
- decision at a time, with the LoC/file/CI cost of each option and a recommendation
24
- — and records your answer under `## Decisions`. Same-tier files, shared helpers,
25
- refactor mixed with behavior change, ordering ambiguity and oversize atoms are all
26
- uncertain by definition. It never guesses a seam.
27
-
28
- When the plan is written it shows the layer table, states that nothing has been
29
- created yet, and hands off to `/orc-pr-driver`.
30
-
31
- Ticket / change / spec: $ARGUMENTS
1
+ ---
2
+ description: Stacked-PR planner — decide where the PR cut lines go, prove each layer stands alone, write stacked-pr/<slug>/stack-plan.md (plans only, never touches git)
3
+ ---
4
+
5
+ Run the **orc-pr-setup** skill. It plans a stack of pull requests for a change
6
+ too big to review as one, and writes `stacked-pr/<slug>/stack-plan.md`. It plans
7
+ only: no branches, commits, pushes or PRs — that is `/orc-pr-driver`. A ticket
8
+ is required. Every uncertain boundary STOPS and asks you, one decision at a time.
9
+
10
+ Ticket / change / spec: $ARGUMENTS
@@ -1,41 +1,11 @@
1
- ---
2
- description: You have a plan — this says which lane should build it, with the numbers it decided from. Plan-only: it refuses a request in words rather than guess
3
- ---
4
-
5
- Use the **orc-route** skill. Zero agents, nothing is built.
6
-
7
- **It routes a PLAN, and only a plan** — pasted ORC planning-output, a
8
- `plan-<name>.md` path, or a saved `orc/planner/<name>/` checkpoint (the same
9
- definition `skills/_shared/phases/plan-handoff.md` already uses). A plan carries real
10
- numbers: tasks, files per task, dependencies, facets, scores. Routing from those
11
- is arithmetic; routing from a sentence is guessing, so a request in words gets a
12
- refusal and a pointer to `/orc-plan`, not a guess.
13
-
14
- It reads the plan plus ORC's deterministic probes (`orc wiki status`,
15
- `orc pattern status`, `orc gotcha status`, `orc diy status`) and answers:
16
-
17
- ```
18
- Plan: merchant-notifications — 7 tasks, 3 waves, 14 files touched
19
- top score 78, two tasks marked risky
20
-
21
- → /orc the plan has risky tasks and a task above 70;
22
- review and verify are worth paying for here
23
- runner-up /orc-mini — about 3x faster, but it skips full review
24
- and verification. Fine only if you will read the diff yourself.
25
- not possible /orc-fast — needs a fresh wiki (yours is STALE) and this plan
26
- is 7 tasks; that lane runs ONE task
27
-
28
- Start /orc now? [yes / no]
29
- ```
30
-
31
- Every runner-up says what choosing it costs you. Every impossible lane names the
32
- condition blocking it **and** how to fix it. Risk beats size: a small plan with a
33
- cited risk still earns the full lane.
34
-
35
- `/orc-plan` also offers this automatically after **Save & stop**, so you rarely
36
- need to type it.
37
-
38
- New to ORC and wondering which command to use at all? That is
39
- `orc onboarding first-run`, not this.
40
-
41
- Plan (paste it, or give a path): $ARGUMENTS
1
+ ---
2
+ description: You have a plan — this says which lane should build it, with the numbers it decided from. Plan-only: it refuses a request in words rather than guess
3
+ ---
4
+
5
+ Use the **orc-route** skill. Zero agents, nothing is built. It routes a PLAN
6
+ only — the same definition `skills/_shared/phases/plan-handoff.md` uses. It reads
7
+ the plan's tasks, files, deps, `facets` and scores plus ORC's probes, then names
8
+ the lane, the runner-up and its cost, and each impossible lane with its fix. A
9
+ request in words gets a pointer to `/orc-plan`, never a guess.
10
+
11
+ Plan (paste it, or give a path): $ARGUMENTS
@@ -2,65 +2,10 @@
2
2
  description: Run the tests against the real running system — happy path to security — and report only what was observed
3
3
  ---
4
4
 
5
- Use the **orc-test** skill. Standalone — no plan, no build, no code written into
6
- your project.
7
-
8
- Every other ORC lane reasons about your system. This one **runs it**:
9
-
10
- > **A test that ran is a FACT; a test that was written is an OPINION.**
11
-
12
- ORC already has a lane that WRITES tests and never runs them (Phase 6.5,
13
- `test-generator/`). This is the mirror image, and the two never mix: `/orc-test`
14
- writes nothing into your test tree and runs everything.
15
-
16
- **It never edits the system it is testing.** If the server will not come up, it
17
- prints exactly what it ran and the tail of the output, and hands back. You fix
18
- it, and re-run for free — the same shape as `/orc-challenge`, and for the same
19
- reason: a session that just fixed the code cannot be trusted to measure it.
20
-
21
- **It never reports a result it did not observe.** Three verdicts and no fourth:
22
- `pass` (observed, matched), `fail` (observed, did not match), and `unknown` —
23
- not observed. `unknown` keeps its slot in the report and never becomes a pass.
24
- A flake is recorded, never retried away: there is no retry count, because if the
25
- same case answers differently twice, *that instability is the finding*.
26
-
27
- One pass:
28
-
29
- 1. **Target** — `orc test init <slug>` asks what it must not guess: back end or
30
- front end, local or remote, the base URL. On a remote target it also requires
31
- `--authorized "<who authorized this, and where it is recorded>"`, stored
32
- verbatim and reprinted at the head of every report. ORC cannot verify
33
- authorization and does not pretend to — it makes the assertion impossible to
34
- skip. Frozen, and never asked again.
35
- 2. **Surface** — free, deterministic: an OpenAPI or GraphQL spec on disk, the
36
- same spec at the target, route extraction by framework fingerprint, FE router
37
- config. Anything ambiguous comes back as `unresolved[]` and is never guessed.
38
- The **code-vs-live diff** is a first-class output: routes that answer live and
39
- exist in no source file are zombie APIs.
40
- 3. **Flow** — it digs the repo for how a request reaches your endpoint: the
41
- route registration, the middleware in order, the handler, what it writes, what
42
- must be true first, which fields name an object, and the login flow itself.
43
- 4. **Environment** (local only) — it brings the system up and waits for health.
44
- Five states, one next action each.
45
- 5. **Cases** — the CLI derives the bulk for free: equivalence partitions,
46
- boundary values, method and content-type negatives, stateful create → read →
47
- update → delete sequences. An agent fills only what a schema cannot know.
48
- 6. **Run** — paced, capped, and fenced to the frozen origin. A 429 is a RESULT,
49
- not an error: it means rate limiting works. Every case leaves its exact
50
- request, its exact response and a reproducible `curl`, with every credential
51
- redacted **before the bytes reach disk**.
52
- 7. **Report** — `orc/orc-test/<slug>/REPORT.md`, written for someone who does
53
- not read code.
54
-
55
- The security tier is a **closed set** mapped to the OWASP API Security Top 10
56
- (2023), and it demonstrates a CONDITION rather than an extraction — confirming
57
- an exploit is your decision on your authority. With one identity, BOLA and BFLA
58
- report `UNCHECKABLE`, which keeps its slot and never becomes a pass.
59
-
60
- **The run folder is never staged.** Evidence contains real response bodies from
61
- a real system. The lane offers you the one `.gitignore` line; it does not edit
62
- `.gitignore` itself.
63
-
64
- Read the state back any time without this lane: `orc test status <slug>`.
5
+ Use the **orc-test** skill. Standalone: no plan, no build, no code written into
6
+ your project. It RUNS the system; Phase 6.5 (`test-generator/`) writes tests and
7
+ never runs them. It never edits the system under test, and it never reports a
8
+ result it did not observe. The report is `orc/orc-test/<slug>/REPORT.md`; the
9
+ run folder is never staged. Read the state back with `orc test status <slug>`.
65
10
 
66
11
  The slug to open or reopen (or nothing, and it will ask): $ARGUMENTS
@@ -1,17 +1,17 @@
1
- ---
2
- description: Ultra lane — full orchestrator + Opus 5 xhigh advisor and three judgment gates, for ultra-complex work (maximum rigor, cost accepted)
3
- ---
4
-
5
- Use the **orc** skill with `ultra_mode: true` forced on for this run. Ultra is
6
- the maximum-rigor lane for complex/ultra-complex requests: everything the full
7
- pipeline does, PLUS an up-front Advisor brief with a batched clarification
8
- round (orc-advisor skill), three judgment gates — after analysis, after
9
- planning, and after verify (implementation fidelity + ultra-strict quality;
10
- orc-judge skill) — an assumption ledger, a deterministic traceability matrix,
11
- a blast-radius map, and an executor tier floor. Forced for the run (run-scoped,
12
- never written to the user's config): deep analyze (Phase A′ gate bypassed),
13
- pattern findings on, test authoring on, security review on. Ultra is costly by
14
- design — state it once, never prompt about cost mid-run. Follow the orc
15
- SKILL.md's ULTRA LANE section and references/ultra-mode.md exactly.
16
-
17
- Request: $ARGUMENTS
1
+ ---
2
+ description: Ultra lane — full orchestrator + Opus 5.5 xhigh advisor and three judgment gates, for ultra-complex work (maximum rigor, cost accepted)
3
+ ---
4
+
5
+ Use the **orc** skill with `ultra_mode: true` forced on for this run. Ultra is
6
+ the maximum-rigor lane for complex/ultra-complex requests: everything the full
7
+ pipeline does, PLUS an up-front Advisor brief with a batched clarification
8
+ round (orc-advisor skill), three judgment gates — after analysis, after
9
+ planning, and after verify (implementation fidelity + ultra-strict quality;
10
+ orc-judge skill) — an assumption ledger, a deterministic traceability matrix,
11
+ a blast-radius map, and an executor tier floor. Forced for the run (run-scoped,
12
+ never written to the user's config): deep analyze (Phase A′ gate bypassed),
13
+ pattern findings on, test authoring on, security review on. Ultra is costly by
14
+ design — state it once, never prompt about cost mid-run. Follow the orc
15
+ SKILL.md's ULTRA LANE section and references/ultra-mode.md exactly.
16
+
17
+ Request: $ARGUMENTS
@@ -1,11 +1,11 @@
1
- ---
2
- description: Standalone verify — checks git-modified changes only, shows summary, Opus 5 medium
3
- ---
4
-
5
- Use the **orc-verify** skill independently (no orchestrator): verify
6
- only the git-modified changes in the working tree using Opus 5 medium effort,
7
- classify findings on the P0–P3 severity ladder (P0/P1 gate, P2/P3 advisory;
8
- every P0–P2 finding anchored with file:line + a verbatim quote, else it's
9
- auto-P3), and show the summary. Read-only — do not fix or commit.
10
-
11
- Optional focus: $ARGUMENTS
1
+ ---
2
+ description: Standalone verify — checks git-modified changes only, shows summary, Opus 5.5 medium
3
+ ---
4
+
5
+ Use the **orc-verify** skill independently (no orchestrator): verify
6
+ only the git-modified changes in the working tree using Opus 5.5 medium effort,
7
+ classify findings on the P0–P3 severity ladder (P0/P1 gate, P2/P3 advisory;
8
+ every P0–P2 finding anchored with file:line + a verbatim quote, else it's
9
+ auto-P3), and show the summary. Read-only — do not fix or commit.
10
+
11
+ Optional focus: $ARGUMENTS