@azure-id/orc 2.1.0 → 2.2.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 (153) hide show
  1. package/CHANGELOG.md +374 -0
  2. package/README.md +49 -36
  3. package/bin/build-agents.js +7 -5
  4. package/bin/cli.js +1006 -235
  5. package/bin/fix.js +21 -18
  6. package/bin/graph-extract.js +314 -6
  7. package/bin/graph-gain.js +83 -2
  8. package/bin/graph-map.js +23 -1
  9. package/bin/graph-notes.js +1 -1
  10. package/bin/graph-query.js +1362 -37
  11. package/bin/graph-resolve.js +1 -1
  12. package/bin/graph-shard.js +29 -6
  13. package/bin/graph-signals.js +5 -3
  14. package/bin/graph.js +7 -3
  15. package/bin/habit.js +1 -1
  16. package/bin/pricing.json +8 -1
  17. package/bin/trace-write.js +40 -11
  18. package/bin/verify-contracts.js +169 -60
  19. package/bin/verify-package.js +3 -3
  20. package/bin/webui/api.js +8 -0
  21. package/bin/webui/fixtures/extra.js +9 -9
  22. package/bin/webui/fixtures/flow.js +1 -1
  23. package/bin/webui/fixtures/index.js +2 -2
  24. package/bin/webui/fixtures/knowledge.js +8 -1
  25. package/bin/webui/fixtures/pact.js +112 -111
  26. package/bin/webui/fixtures/stats.js +2 -2
  27. package/bin/webui/i18n/en/knowledge.json +2 -0
  28. package/bin/webui/i18n/id/knowledge.json +2 -0
  29. package/bin/webui/js/panels/knowledge.js +17 -0
  30. package/guides/code-graph-benefit.md +116 -0
  31. package/guides/configuration.md +150 -0
  32. package/guides/documents.md +262 -0
  33. package/guides/extra-models.md +448 -0
  34. package/guides/habits-and-gotchas.md +152 -0
  35. package/guides/knowledge-reads.md +190 -0
  36. package/guides/model-selection.md +186 -0
  37. package/guides/rules.md +305 -0
  38. package/guides/status-line.md +344 -0
  39. package/mock-run/a-normal-day.md +2 -2
  40. package/mock-run/extra-slots.md +177 -177
  41. package/mock-run/orc-cli.md +3 -2
  42. package/mock-run/orc-doc.md +452 -448
  43. package/mock-run/orc-fast.md +2 -2
  44. package/mock-run/orc-quick.md +146 -146
  45. package/mock-run/orc.md +4 -4
  46. package/package.json +2 -1
  47. package/templates/agents/MODEL-MAPPING.md +12 -12
  48. package/templates/agents/{orc-executor-haiku-4-5.md → orc-executor-haiku-5-high.md} +21 -8
  49. package/templates/agents/orc-executor-opus-4-7-high.md +17 -5
  50. package/templates/agents/orc-executor-opus-4-7-med.md +17 -5
  51. package/templates/agents/orc-executor-opus-4-8-high.md +17 -5
  52. package/templates/agents/orc-executor-opus-5-high.md +17 -5
  53. package/templates/agents/orc-executor-opus-5-low.md +17 -5
  54. package/templates/agents/orc-executor-opus-5-med.md +17 -5
  55. package/templates/agents/orc-executor-sonnet-4-6-high.md +17 -5
  56. package/templates/agents/orc-executor-sonnet-5-high.md +17 -5
  57. package/templates/agents/orc-executor-sonnet-5-low.md +17 -5
  58. package/templates/agents/orc-executor-sonnet-5-med.md +17 -5
  59. package/templates/agents/{orc-graph-noter-sonnet-4-6-med.md → orc-graph-noter-haiku-5-high.md} +4 -4
  60. package/templates/agents/orc-planner-mini-opus-5-med.md +3 -1
  61. package/templates/agents/orc-planner-mini-sonnet-5-high.md +3 -1
  62. package/templates/agents/orc-planner-opus-5-med.md +3 -1
  63. package/templates/agents/{orc-recon-sonnet-4-6-med.md → orc-recon-sonnet-5-med.md} +4 -4
  64. package/templates/agents/{orc-trace-writer-haiku-4-5.md → orc-trace-writer-haiku-5-high.md} +4 -3
  65. package/templates/commands/orc-doc.md +128 -128
  66. package/templates/commands/orc-export.md +51 -46
  67. package/templates/commands/orc-fast.md +10 -10
  68. package/templates/hooks/README.md +8 -3
  69. package/templates/hooks/orc-effort-guard.js +105 -27
  70. package/templates/hooks/orc-graph-hook.js +252 -4
  71. package/templates/hooks/orc-statusline.js +13 -6
  72. package/templates/hooks/orc-trace.js +1 -1
  73. package/templates/skills/_shared/README.md +2 -2
  74. package/templates/skills/_shared/code-graph.md +185 -251
  75. package/templates/skills/_shared/extra-dispatch.md +4 -4
  76. package/templates/skills/_shared/lane-contract.md +7 -3
  77. package/templates/skills/_shared/opus5-only.md +3 -3
  78. package/templates/skills/_shared/phases/execution.md +13 -11
  79. package/templates/skills/_shared/phases/planning.md +27 -9
  80. package/templates/skills/_shared/phases/preflight.md +3 -3
  81. package/templates/skills/_shared/phases/review.md +4 -3
  82. package/templates/skills/_shared/phases/ship.md +7 -10
  83. package/templates/skills/_shared/phases/summary.md +2 -3
  84. package/templates/skills/_shared/phases/trace-verbs.md +21 -16
  85. package/templates/skills/_shared/phases/trace.md +3 -3
  86. package/templates/skills/_shared/phases/wiki-consult.md +2 -2
  87. package/templates/skills/_shared/pr-templates.md +108 -106
  88. package/templates/skills/_shared/read-ladder.md +8 -2
  89. package/templates/skills/_shared/return-validation.md +10 -6
  90. package/templates/skills/_shared/review-slice.md +1 -1
  91. package/templates/skills/_shared/stack-plan.md +135 -135
  92. package/templates/skills/_shared/wait.md +14 -2
  93. package/templates/skills/context-combiner/SKILL.md +2 -2
  94. package/templates/skills/orc/SKILL.md +7 -7
  95. package/templates/skills/orc/config.md +2 -2
  96. package/templates/skills/orc/examples/full-run-mock.md +7 -7
  97. package/templates/skills/orc/references/effort-and-mode.md +222 -222
  98. package/templates/skills/orc/schemas/planning-output.md +3 -0
  99. package/templates/skills/orc-aftermath/SKILL.md +15 -15
  100. package/templates/skills/orc-analyze/SKILL.md +2 -2
  101. package/templates/skills/orc-analyze-mini/SKILL.md +2 -2
  102. package/templates/skills/orc-boundary/SKILL.md +15 -15
  103. package/templates/skills/orc-boundary/references/card.md +81 -78
  104. package/templates/skills/orc-boundary/references/gate.md +113 -113
  105. package/templates/skills/orc-brainstorm/SKILL.md +15 -15
  106. package/templates/skills/orc-budget/SKILL.md +15 -15
  107. package/templates/skills/orc-challenge/README.md +1 -1
  108. package/templates/skills/orc-challenge/SKILL.md +16 -16
  109. package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
  110. package/templates/skills/orc-claude/SKILL.md +4 -4
  111. package/templates/skills/orc-claude/examples/claude-run-mock.md +1 -1
  112. package/templates/skills/orc-diy/SKILL.md +2 -2
  113. package/templates/skills/orc-diy/references/blocks/wiki.md +26 -26
  114. package/templates/skills/orc-diy/references/flow-schema.md +2 -2
  115. package/templates/skills/orc-doc/README.md +2 -2
  116. package/templates/skills/orc-doc/SKILL.md +501 -490
  117. package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +12 -1
  118. package/templates/skills/orc-doc/references/chunking.md +6 -4
  119. package/templates/skills/orc-doc/references/gates.md +311 -311
  120. package/templates/skills/orc-doc/references/resume-protocol.md +229 -228
  121. package/templates/skills/orc-explain/SKILL.md +88 -88
  122. package/templates/skills/orc-export/SKILL.md +190 -187
  123. package/templates/skills/orc-fast/SKILL.md +17 -14
  124. package/templates/skills/orc-grill/SKILL.md +16 -16
  125. package/templates/skills/orc-grill/references/grill-doc.md +1 -1
  126. package/templates/skills/orc-handoff/SKILL.md +11 -11
  127. package/templates/skills/orc-learn/SKILL.md +13 -13
  128. package/templates/skills/orc-learn/examples/learn-run-mock.md +2 -2
  129. package/templates/skills/orc-mini/SKILL.md +12 -12
  130. package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -5
  131. package/templates/skills/orc-pact/SKILL.md +15 -15
  132. package/templates/skills/orc-pact/references/gate.md +70 -70
  133. package/templates/skills/orc-pattern/SKILL.md +3 -3
  134. package/templates/skills/orc-poly/SKILL.md +4 -4
  135. package/templates/skills/orc-poly/examples/poly-run-mock.md +51 -51
  136. package/templates/skills/orc-pr-driver/SKILL.md +4 -3
  137. package/templates/skills/orc-pr-driver/references/orc-run-split.md +108 -99
  138. package/templates/skills/orc-pr-setup/SKILL.md +2 -2
  139. package/templates/skills/orc-quick/README.md +11 -12
  140. package/templates/skills/orc-quick/SKILL.md +29 -32
  141. package/templates/skills/orc-quick/references/context-doc.md +5 -5
  142. package/templates/skills/orc-quick/references/dispatch-gate.md +10 -10
  143. package/templates/skills/orc-quick/references/gh-mode.md +2 -1
  144. package/templates/skills/orc-quick/references/look.md +34 -12
  145. package/templates/skills/orc-retro/SKILL.md +2 -2
  146. package/templates/skills/orc-retro/examples/retro-mock.md +2 -2
  147. package/templates/skills/orc-route/SKILL.md +2 -2
  148. package/templates/skills/orc-test/SKILL.md +6 -3
  149. package/templates/skills/orc-verify/SKILL.md +2 -2
  150. package/templates/skills/orc-wait/SKILL.md +10 -2
  151. package/templates/skills/orc-wiki/SKILL.md +4 -4
  152. package/templates/skills/orc-wiki/references/pattern-prewarm.md +19 -19
  153. package/templates/agents/orc-executor-sonnet-4-6-med.md +0 -155
@@ -1,26 +1,26 @@
1
- ## Wiki gate
2
-
3
- <!-- diy:when wiki_gate=off -->
4
- Skip the wiki freshness check entirely for this flow. If a project wiki
5
- exists, executors may still receive wiki page pointers, but freshness is
6
- never computed and never surfaced.
7
- <!-- /diy:when -->
8
- <!-- diy:when wiki_gate=notice -->
9
- Compute the wiki freshness tier exactly as the full lane does (follow the
10
- read-side procedure in `.claude/skills/orc-wiki/references/staleness.md`).
11
- Fresh → use silently; aging → one-line notice, continue; stale → warn the
12
- user that wiki hints may be outdated, continue. Never block on it.
13
- <!-- /diy:when -->
14
- <!-- diy:when wiki_gate=hard -->
15
- Compute the wiki freshness tier exactly as the full lane does (follow the
16
- read-side procedure in `.claude/skills/orc-wiki/references/staleness.md`).
17
- Fresh or aging → proceed. Stale or missing → STOP and ask the user: refresh
18
- the wiki first (recommended), or continue anyway with hints demoted. Respect
19
- the precedence rule from that reference in every consumer slice.
20
- <!-- /diy:when -->
21
-
22
- <!-- diy:when post_ship_wiki_ask=on -->
23
- After a successful ship on a big run, offer the post-ship wiki refresh ask
24
- exactly as the full lane defines it in the orc skill (guarded on a non-empty
25
- wiki; judged by final task/file counts at ship time).
26
- <!-- /diy:when -->
1
+ ## Wiki gate
2
+
3
+ <!-- diy:when wiki_gate=off -->
4
+ Skip the wiki freshness check entirely for this flow. If a project wiki
5
+ exists, executors may still receive wiki page pointers, but freshness is
6
+ never computed and never surfaced.
7
+ <!-- /diy:when -->
8
+ <!-- diy:when wiki_gate=notice -->
9
+ Read the wiki freshness tier from `orc wiki status --json` (`state`, then
10
+ `tier`) — the CLI is its only executor; never compute it yourself.
11
+ Fresh → use silently; aging → one-line notice, continue; stale → warn the
12
+ user that wiki hints may be outdated, continue. Never block on it.
13
+ <!-- /diy:when -->
14
+ <!-- diy:when wiki_gate=hard -->
15
+ Read the wiki freshness tier from `orc wiki status --json` (`state`, then
16
+ `tier`) — the CLI is its only executor; never compute it yourself.
17
+ Fresh or aging → proceed. Stale or missing → STOP and ask the user: refresh
18
+ the wiki first (recommended), or continue anyway with hints demoted. Respect
19
+ the precedence rule from that reference in every consumer slice.
20
+ <!-- /diy:when -->
21
+
22
+ <!-- diy:when post_ship_wiki_ask=on -->
23
+ After a successful ship on a big run, offer the post-ship wiki refresh ask
24
+ exactly as the full lane defines it in the orc skill (guarded on a non-empty
25
+ wiki; judged by final task/file counts at ship time).
26
+ <!-- /diy:when -->
@@ -27,7 +27,7 @@ selector.
27
27
  | `mock_example` | `ask` / `on` / `off` | Post-verify mocked example + drift recovery (`mock-examples/<slug>/`, never committed) |
28
28
  | `tdd` | `on` / `off` | TDD-anchored planning: plan-time `tdd_spec` (scoped by `disposition`), paired TDD tasks for the red proof, TDD gate in the verify slot |
29
29
  | `gotchas` | `on` / `off` | Repair memory: inject scope-matching gotchas into slices, record one when a repair loop goes red → green (`_shared/gotchas.md`) |
30
- | `code_graph` | `on` (default) / `off` | Code-graph cache steps: `orc graph status --heal` at preflight, `orc graph ctx` cards in slices, `orc graph map` then `orc graph impact` + `orc graph cochange` at planning, `orc graph changes` at review, `orc graph coverage` on demand, `orc graph update` after every wave and at ship, one `orc graph notes` batch per wave when notes are on. `on` compiles them in and the global `code_graph` key decides at run time (every call carries `--if-enabled`); `off` removes them (`_shared/code-graph.md`) |
30
+ | `code_graph` | `on` (default) / `off` | The four graph touchpoints: consult at preflight (print the probe line; `orc graph status --heal` only when `heal_needed`), orient at planning (`orc graph map --focus=` once, then `orc graph impact` + `orc graph cochange`), ONE `orc graph ctx --for-slice … --anchors` per writing slice (`graph_anchors`, inline), `orc graph changes --files=` once at review; `orc graph update --notes-pending` only when `update_step` is `lane`; no gain step. `on` compiles them in and the global `code_graph` key decides at run time (every call carries `--if-enabled`); `off` removes them (`_shared/code-graph.md`) |
31
31
  | `wiki_gate` | `notice` / `off` / `hard` | Wiki freshness handling at preflight |
32
32
  | `post_ship_wiki_ask` | `on` / `off` | Post-ship wiki refresh offer on big runs |
33
33
  | `summary` | `full` / `off` / `short` | Summary depth |
@@ -44,7 +44,7 @@ selector.
44
44
  Hard errors (config not written):
45
45
  - `scoring: off` without a `fixed_executor`.
46
46
  - `fixed_executor` or any agent choice above `session_tier` (tier order:
47
- haiku-4-5 < sonnet-4-6 < sonnet-5 < opus-4-7 < opus-4-8 < opus-5 < fable-5 —
47
+ haiku-5 < sonnet-4-6 < sonnet-5 < opus-4-7 < opus-4-8 < opus-5 < fable-5 —
48
48
  subagents cannot exceed the main session; effort medium < high < xhigh < max).
49
49
  A tier below `opus-5-high` clips the `[90,100]` band to the highest agent it
50
50
  allows, at compile time.
@@ -13,7 +13,7 @@ explaining anything twice.
13
13
 
14
14
  That is why a 900-line TSD does not end a session. Nothing that holds context
15
15
  ever holds the document: each writer owns exactly ONE file, each checker reads
16
- ONE bounded part, and the orchestrator holds a map.
16
+ only the bounded part files of its slice, and the orchestrator holds a map.
17
17
 
18
18
  And since v0.49.0 there is a second sentence:
19
19
 
@@ -159,7 +159,7 @@ orc doc parts my-prd # what is written, and what is not
159
159
  orc doc compile my-prd [--partial] # sections/ -> document.md. FREE
160
160
  orc doc lint my-prd # the free check (0 clean / 1 findings)
161
161
  orc doc map my-prd # fresh line numbers, never stored
162
- orc doc plan my-prd --role check --json # one bounded part file per checker
162
+ orc doc plan my-prd --role check --json # bounded part files per checker slice
163
163
  orc doc split my-prd --section 04-design --by-heading # store a big section in parts
164
164
  orc doc split my-prd # recover sections/ from document.md
165
165
  orc doc status my-prd # 0 nothing to do / 1 something to do / 2 unknown