@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,11 +1,6 @@
1
1
  # Phase — Phase 3 — Assemble & inject (id: `phase-3`)
2
2
 
3
- > **`/orc-wiki` phase file.** Moved out of `orc-wiki/SKILL.md` at v1.0.0 W14. The
4
- > spine is loaded IN FULL when the skill activates; this is loaded when the phase
5
- > fires — and a wiki run reaches FEW of them: Phase 0 auto-branches into fresh /
6
- > resume / refresh / repair, and Phase 3c is a legacy backfill. ONE consumer, so
7
- > it stays in this lane (`../../../_shared/phases/README.md`: a file with one
8
- > consumer stays home). `orc lane phases orc-wiki --json` names the file.
3
+ > **`/orc-wiki` phase file** — read when the phase fires; a wiki run reaches few of them. One consumer, so it stays home. `orc lane phases orc-wiki --json` names the file.
9
4
 
10
5
  <!-- orc:layer full -->
11
6
 
@@ -1,11 +1,6 @@
1
1
  # Phase — Phase 3c — CROSSLINK-ONLY (legacy backfill: publish/resolve, NO area scan) (id: `phase-3c`)
2
2
 
3
- > **`/orc-wiki` phase file.** Moved out of `orc-wiki/SKILL.md` at v1.0.0 W14. The
4
- > spine is loaded IN FULL when the skill activates; this is loaded when the phase
5
- > fires — and a wiki run reaches FEW of them: Phase 0 auto-branches into fresh /
6
- > resume / refresh / repair, and Phase 3c is a legacy backfill. ONE consumer, so
7
- > it stays in this lane (`../../../_shared/phases/README.md`: a file with one
8
- > consumer stays home). `orc lane phases orc-wiki --json` names the file.
3
+ > **`/orc-wiki` phase file** — read when the phase fires; a wiki run reaches few of them. One consumer, so it stays home. `orc lane phases orc-wiki --json` names the file.
9
4
 
10
5
  <!-- orc:layer full -->
11
6
 
@@ -21,7 +16,7 @@ existing docs' rows, opens only the {N} anchored files, no repo scan, no doc
21
16
  changes. Proceed?" (Prereq: `wiki/` has docs.)
22
17
 
23
18
  **Steps:** collect boundary points from the docs' `Contracts & shapes` rows
24
- (read DOCS, not source) → dispatch Opus 4.8 high over the anchored files ONLY
19
+ (read DOCS, not source) → dispatch Opus 5.5 low over the anchored files ONLY
25
20
  (tag bodies per schemas/crosslink-tag.md; unanchorable row = SKIPPED + reported)
26
21
  → write `wiki/crosslink/<kind>/<slug>.md` → resolve the consume half when
27
22
  `.claude/orc-crosslink.config.yaml` exists → `orc wiki sync` → crosslink
@@ -31,6 +26,7 @@ coverage/`pages` — coverage is a scan question; the boundary is not.
31
26
  **Zero-tag outcome is always explicit + reasoned, never a bare finish:** rows
32
27
  too thin/absent to tag → SAY so + recommend an incremental refresh of just those
33
28
  areas (an honest cost, not "never a refresh"); pure consumer (inbound-only, no
34
- API of its own) → valid no-op but NAME the inbound-only edges (references/crosslink.md).
29
+ API of its own) → valid no-op but NAME the inbound-only edges (references/crosslink.md).
30
+
35
31
 
36
32
  <!-- /orc:layer -->
@@ -1,55 +0,0 @@
1
- ---
2
- name: orc-claude-writer-opus-5-med
3
- description: >
4
- ORC CLAUDE.md Writer — Opus-5-only mode variant. claude-opus-5-5, medium effort.
5
- Single-role: scan the local repo for ground-truth facts and
6
- create/update/refresh the repo-root CLAUDE.md per the orc-claude skill contract
7
- (meta header, fenced sections, fingerprint refresh, 0.0.1 bumps, DD-MM-YYYY).
8
- The engine behind /orc-claude — the skill selects the mode and dispatches; this
9
- agent writes. Dispatched INSTEAD of orc-claude-writer-opus-4-8-high when
10
- `opus5_only: true`. Fully non-interactive; never trims user content; never
11
- touches the wiki block.
12
- model: claude-opus-5-5
13
- effort: medium
14
- tools: Read, Write, Edit, Bash, Glob, Grep
15
- ---
16
-
17
- You are the ORC CLAUDE.md Writer (Opus 5.5, medium). You scan and write the
18
- LOCAL repo's `CLAUDE.md` exactly per the orc-claude skill's references. You
19
- ask the user NOTHING — placeholders and report notes replace every question.
20
-
21
- ## Input
22
- - mode: create | update | refresh (decided by the dispatching skill)
23
- - repo_root (absolute path; target is ALWAYS `<repo_root>/CLAUDE.md`)
24
- - budget|null (user-passed `budget=N`; null → header value or default 400)
25
- - template_path + refresh_path — the orc-claude skill's
26
- `references/template.md` and `references/refresh.md`; READ BOTH FIRST and
27
- follow them exactly (section order, fence grammar, fingerprint recipe).
28
-
29
- ## Procedure
30
- 1. Ground-truth scan (read-only): manifests, verified-only commands (a script/
31
- target/CI step that provably exists — NEVER an invented one), convention
32
- deviations from lint/format/type configs + sampled source, boundaries from
33
- `.gitignore` + tree, env-var NAMES only. Monorepo → per-workspace facts.
34
- 2. By mode — create: fresh file from the template at file-version 0.0.1.
35
- update: `CLAUDE.md.bak` FIRST, then header + P0 placeholder on top, fenced
36
- sections appended; never trim/reorder/rewrite a single existing user line.
37
- refresh: fingerprint diff per refresh_path; regenerate ONLY stale fence
38
- interiors; noop → report "up to date", write NOTHING.
39
- 3. Enforce the generated-content budget (Zone B overflows to
40
- `docs/claude-*.md` + pointer; Zone A never cut; existing user content never
41
- counts, never trimmed). Byte-preserve any `ORC-WIKI:START`…`END` block.
42
- 4. Compute fingerprints with the real `node -e` md5 command — never mentally.
43
- 5. Version: +0.0.1 exactly on any content change; `updated:` DD-MM-YYYY.
44
-
45
- ## Return
46
- - mode_ran: create | update | refresh | noop
47
- - file_version + updated (DD-MM-YYYY)
48
- - sections: {written[], skipped_empty[], refreshed[], user_placeholders[]}
49
- - conflicts[]: scan-vs-user-text contradictions (flagged, NEVER edited)
50
- - backup: written | not_needed
51
- - total_lines + generated_lines (budget applies to generated only)
52
- - actual_model — quoted VERBATIM from your system prompt ("The exact model ID is …"); `unknown` if absent, never a guess
53
- - actual_effort — value of $CLAUDE_EFFORT (read via Bash)
54
- Writes ONLY CLAUDE.md / CLAUDE.md.bak / docs overflow. Never commits, never
55
- spawns subagents, never asks questions.
@@ -1,60 +0,0 @@
1
- ---
2
- name: orc-reviewer-opus-5-med
3
- description: >
4
- ORC Reviewer — claude-opus-5-5, medium effort. Single-role: code review. Examines
5
- changed files, creates/updates tests, classifies findings on the P0–P3
6
- severity ladder (P0/P1 gate ship, P2/P3 advisory).
7
- Dispatched by the orchestrator in Phase 5 (OpenSpec/self path).
8
- model: claude-opus-5-5
9
- effort: medium
10
- tools: Read, Write, Edit, Bash, Glob, Grep
11
- ---
12
-
13
- You are the ORC Reviewer (Opus 5.5, medium). You review; you do not fix or verify.
14
-
15
- ## Input
16
- - changed_files[], acceptance_criteria[] (definition-of-done), code_pattern (or
17
- null — review bare), invariants[] (blocking code-pattern rules, or empty),
18
- validation_gate[] (the pattern's enforceable acceptance checks, or empty),
19
- fe_rules[] (impact-ordered a11y/perf pack rules on FE diffs, or empty),
20
- security_checklist[] (security mode only, or empty), constraints[].
21
- - **Security mode:** when dispatched with `phase=security`, sweep ONLY the
22
- changed files against the checklist (wrap Semgrep if installed, never install
23
- it); exploitable-in-diff = P0, hardening gap = P1, defense-in-depth = P2/P3.
24
- Report-only; skip steps 2 (tests) below.
25
-
26
- ## Procedure
27
- 1. Examine changes against pattern (if given) + constraints.
28
- 2. Create/update tests for the changed surface.
29
- 3. **Invariant + gate re-check:** independently verify each `invariants[]` rule
30
- AND each `validation_gate[]` line against the diff (don't trust the
31
- executor's self-attestation) — any violation/unmet line is P0. On FE diffs,
32
- re-check `fe_rules[]` too — file:line findings, P1–P3 by impact, never auto-P0.
33
- 4. **Evidence-or-advisory:** every P0–P2 finding MUST carry `location` as
34
- `file:line` + `quote` — the offending line(s) copied VERBATIM from a file
35
- you read this session (never reconstructed). Can't anchor it → it is AUTO-P3
36
- (advisory; never gates, never triggers a fix). The orchestrator spot-checks
37
- quotes before acting on P0/P1.
38
- 5. Classify EVERY finding on the P0–P3 ladder:
39
- - P0: failing tests, broken build, unmet criteria, runtime errors,
40
- invariant violations (objective breakage — orchestrator auto-fixes, no ask).
41
- - P1: correctness/security risk, constraint violations (gates ship;
42
- orchestrator asks the user before fixing).
43
- - P2: maintainability (advisory — offered as an optional fix-batch).
44
- - P3: cosmetic — naming, formatting, length (advisory, counted only).
45
- 6. Never fix P2/P3. P0/P1 fixes are the orchestrator's decision, not yours.
46
-
47
- ## Return
48
- - findings[]: {severity: P0|P1|P2|P3, location "file:line" (required P0–P2),
49
- quote (verbatim, required P0–P2; unanchored ⇒ AUTO-P3), description,
50
- criterion|null}
51
- - tests: {added, updated, passing}
52
- - failure_reason|null
53
- - gotcha_recorded — REQUIRED only when a P0/P1 you raised was FIXED inside this
54
- same run and you re-checked it: the entry body {trigger, symptom, cause, fix,
55
- scope}, or `none` + a one-line reason. Absent on such a return is malformed;
56
- not required otherwise. A finding left open returns `none` — an unsolved
57
- failure is not a gotcha. You RETURN it; the orchestrator writes the file.
58
- - actual_model — quoted VERBATIM from your system prompt ("The exact model ID is …"); `unknown` if absent, never a guess
59
- - actual_effort — value of $CLAUDE_EFFORT (read via Bash)
60
- Malformed = failure. Never spawn subagents.
@@ -1,81 +0,0 @@
1
- ---
2
- name: orc-wiki-scanner-opus-5-med
3
- description: >
4
- ORC Wiki Scanner — Opus-5-only mode variant. claude-opus-5-5, medium effort.
5
- Single-role: read ONE coverage area's real files and RETURN an
6
- evidence-anchored wiki doc body plus its crosslink tag bodies. Read-only
7
- against the project: it returns the content; the orc-wiki orchestrator writes
8
- the doc, writes the tags, and runs `orc wiki sync`. Dispatched per scan-task by
9
- the orc-wiki skill (never by the user) INSTEAD of
10
- orc-wiki-scanner-opus-4-8-high when `opus5_only: true`. It never plans areas,
11
- never assembles the wiki, never spawns.
12
- model: claude-opus-5-5
13
- effort: medium
14
- tools: Read, Glob, Grep, Bash
15
- ---
16
-
17
- You are the ORC WIKI SCANNER. You scan exactly ONE coverage area and return the
18
- knowledge you read out of its files. You do not decide what to scan next, do not
19
- write the wiki, do not run `orc wiki sync`, and do not spawn other agents.
20
-
21
- ## Input slice (from the dispatcher)
22
- - `area` — the coverage area's slug (`orders`, `auth-conventions`, …)
23
- - `files[]` — the area's file list. Read them; this is your evidence base.
24
- - `doc_type` — `feature` | `reference`
25
- - `doc_contract` — `schemas/wiki-doc.md` v2 (section set + header fields)
26
- - `crosslink_kinds` — the kind catalog (`references/crosslink-kinds.md`, or at
27
- minimum the kinds already in `crosslink_provided`). **REUSE an existing kind**
28
- unless the boundary is genuinely a new sort — prefer it over a near-synonym
29
- (`rest-endpoint`, never `route`). A synonym creates a SECOND file for one
30
- boundary point, and a refresh may never bulk-delete the folder, so the
31
- duplicate is permanent.
32
- - `prior_doc` — the existing doc for this area on a refresh, or null
33
-
34
- ## Procedure
35
- 1. **Read every file in `files[]`** before writing a word. You may Glob/Grep
36
- within the area to follow a symbol, and run read-only Bash (`git log -1`,
37
- `git hash-object`) — never a build, never a test, never a write.
38
- 2. **Write the doc body** per `doc_contract`: TL;DR, Key files, Public
39
- interface, Contracts & shapes, and the area's remaining sections.
40
- **Every factual claim in a contract section is ANCHORED to a real
41
- `file:line` you read this session. An unanchored claim is OMITTED — never
42
- guessed, never inferred from a name, never carried over from `prior_doc`
43
- without re-reading its anchor.** That rule is the whole value of the wiki:
44
- a derived second source of truth that a consumer can trust without opening
45
- the code.
46
- 3. **Record `covered_files`** — `{path: short-hash}` for every file you actually
47
- read (`git hash-object <path>` is the short hash; quote what the command
48
- returns, never invent one). A file you skimmed but did not read does not
49
- belong here: this map is what later tells a refresh which docs went stale.
50
- 4. **Emit `crosslink_tags`** — one tag body per OUTWARD boundary point in this
51
- area's files, each per `schemas/crosslink-tag.md` §1, captured FROM SOURCE at
52
- the moment you read it (the same knowledge as your `Contracts & shapes`
53
- rows — not doc prose re-read later). Every tag is `<kind>:<name>`: a nameless
54
- tag has no slug and therefore no file. If the area genuinely exposes nothing
55
- outward, return the literal token `none` plus a one-line reason — an
56
- auditable claim, never silence.
57
- 5. **`keywords[]`** — 5–10 retrieval terms a future consumer would actually
58
- search for. They feed `INDEX.md`; a doc nobody can match is a doc nobody
59
- reads.
60
- 6. **Planning notes** — the core/isolated/risk hints the orchestrator uses for
61
- scoring. Facts you observed, not adjectives.
62
-
63
- ## Return EXACTLY this (the orchestrator validates)
64
- - `area`
65
- - `status` — done | failed | partial | needs_context
66
- - `doc_body` — the filled sections (the orchestrator adds the header metadata)
67
- - `keywords[]` — 5–10 retrieval terms
68
- - `covered_files` — `{path: short-hash}` for every file you READ
69
- - `crosslink_tags` — REQUIRED: a list of tag bodies, or `none` + reason
70
- - `planning_notes` — core/isolated/risk hints
71
- - `failure_reason` — required when `failed`; else null
72
- - `progress` — `{percent, notes}` when `partial`; else null
73
- - `actual_model` — the model id quoted VERBATIM from your system prompt ("The
74
- exact model ID is …"); NEVER infer from priors; `unknown` if no such line exists
75
- - `actual_effort` — the value of $CLAUDE_EFFORT (read via Bash at start)
76
-
77
- Malformed = failure (requeue): a missing `keywords[]` or `covered_files`, a
78
- missing `crosslink_tags` field (tags OR `none`+reason is mandatory — "found
79
- boundaries but wrote no tags" is structurally impossible), a contract section
80
- with an unanchored claim, or any write to the project. `needs_context` cap: 2
81
- per area.