@azure-id/orc 1.7.1 → 1.8.1

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 (58) hide show
  1. package/CHANGELOG.md +3649 -3381
  2. package/README-id.md +923 -844
  3. package/README.md +836 -788
  4. package/bin/build-agents.js +43 -27
  5. package/bin/cli.js +701 -3
  6. package/bin/graph-extract.js +927 -0
  7. package/bin/graph-notes.js +188 -0
  8. package/bin/graph-query.js +808 -0
  9. package/bin/graph-resolve.js +178 -0
  10. package/bin/graph-signals.js +277 -0
  11. package/bin/graph.js +605 -0
  12. package/bin/verify-contracts.js +4669 -4553
  13. package/bin/verify-package.js +626 -616
  14. package/bin/webui/api.js +1419 -1414
  15. package/bin/webui/fixtures/index.js +579 -576
  16. package/bin/webui/fixtures/knowledge.js +316 -291
  17. package/bin/webui/i18n/en/knowledge.json +167 -151
  18. package/bin/webui/i18n/en/overview.json +101 -100
  19. package/bin/webui/i18n/id/knowledge.json +167 -151
  20. package/bin/webui/i18n/id/overview.json +101 -100
  21. package/bin/webui/js/panels/knowledge.js +1065 -1006
  22. package/bin/webui/js/panels/overview.js +492 -488
  23. package/package.json +39 -39
  24. package/templates/agents/MODEL-MAPPING.md +163 -158
  25. package/templates/agents/orc-executor-haiku-4-5.md +133 -121
  26. package/templates/agents/orc-executor-opus-4-7-high.md +134 -122
  27. package/templates/agents/orc-executor-opus-4-7-med.md +134 -122
  28. package/templates/agents/orc-executor-opus-4-8-high.md +134 -122
  29. package/templates/agents/orc-executor-opus-5-high.md +134 -122
  30. package/templates/agents/orc-executor-opus-5-low.md +134 -122
  31. package/templates/agents/orc-executor-opus-5-med.md +134 -122
  32. package/templates/agents/orc-executor-sonnet-4-6-high.md +134 -122
  33. package/templates/agents/orc-executor-sonnet-4-6-med.md +134 -122
  34. package/templates/agents/orc-executor-sonnet-5-high.md +134 -122
  35. package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +86 -0
  36. package/templates/hooks/README.md +444 -396
  37. package/templates/hooks/orc-graph-hook.js +336 -0
  38. package/templates/hooks/orc-statusline-render.js +922 -921
  39. package/templates/hooks/orc-statusline.js +1596 -1545
  40. package/templates/skills/_shared/README.md +4 -0
  41. package/templates/skills/_shared/code-graph.md +220 -0
  42. package/templates/skills/_shared/opus5-only.md +4 -0
  43. package/templates/skills/_shared/phases/execution.md +166 -147
  44. package/templates/skills/_shared/phases/planning.md +142 -135
  45. package/templates/skills/_shared/phases/preflight.md +132 -118
  46. package/templates/skills/_shared/phases/review.md +63 -53
  47. package/templates/skills/_shared/phases/ship.md +96 -88
  48. package/templates/skills/_shared/phases/trace.md +6 -0
  49. package/templates/skills/_shared/phases/wiki-consult.md +194 -189
  50. package/templates/skills/_shared/read-ladder.md +124 -102
  51. package/templates/skills/_shared/return-validation.md +259 -250
  52. package/templates/skills/orc/SKILL.md +255 -254
  53. package/templates/skills/orc-diy/references/flow-schema.md +101 -100
  54. package/templates/skills/orc-fast/SKILL.md +236 -229
  55. package/templates/skills/orc-mini/SKILL.md +267 -259
  56. package/templates/skills/orc-quick/SKILL.md +378 -361
  57. package/templates/skills/orc-quick/references/dispatch-gate.md +6 -0
  58. package/templates/skills/orc-wiki/references/staleness.md +294 -288
@@ -1,100 +1,101 @@
1
- # ORC-DIY — Flow config schema
2
-
3
- The single source of intent is `.claude/orc-diy.config.yaml`, written ONLY by
4
- the `orc diy` CLI (never by hand, never in a Claude session). Every write
5
- regenerates `.claude/orc/diy/flow.md` (the human-readable spec) and updates
6
- `.claude/orc/diy/flow.lock.json`, invalidating any previous compile.
7
-
8
- **Project-scoped only.** The config, lock, and compiled flow live in the
9
- project's `.claude/` — there is no global variant; `orc diy` rejects
10
- `--global`. One flow per project; `flow_name` is a display label, never a
11
- selector.
12
-
13
- ## Keys (all set via `orc diy set <key> <value>`)
14
-
15
- | Key | Values (default first) | Meaning |
16
- |---|---|---|
17
- | `analyze` | `auto` / `off` / `mini` / `full` | Doc-intake analyst routing |
18
- | `planning` | `auto` / `own-planner` / `superpowers` / `openspec` | Planning route |
19
- | `pattern` | `ask` / `off` / `on` | Code-pattern gate on a cache miss |
20
- | `scoring` | `on` / `off` | Rubric scoring; `off` needs `fixed_executor` |
21
- | `fixed_executor` | (none) — an executor agent name | Used for every task when `scoring: off` |
22
- | `extra` | `off` / `on` | May this flow dispatch an executor to a non-Claude worker (`_shared/extra-dispatch.md`)? It decides WHETHER; `orc extra resolve` still decides WHERE, per task, at run time — route rows are NOT baked into the compiled flow, because the lock's staleness triggers cannot see the ledger change. `off` makes a globally-enabled Extra **INERT here**, announced once, so turning it on globally never silently changes a compiled flow |
23
- | `review` | `on` / `off` / `blocking-only` | Review phase strictness |
24
- | `security` | `off` / `ask` / `on` / `always` | Security pass; `always` drops the risk-floor trigger |
25
- | `verify` | `full` / `off` / `smoke` | Verify depth |
26
- | `testgen` | `off` / `ask` / `on` | Test-authoring phase |
27
- | `mock_example` | `ask` / `on` / `off` | Post-verify mocked example + drift recovery (`mock-examples/<slug>/`, never committed) |
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
- | `gotchas` | `on` / `off` | Repair memory: inject scope-matching gotchas into slices, record one when a repair loop goes red → green (`_shared/gotchas.md`) |
30
- | `wiki_gate` | `notice` / `off` / `hard` | Wiki freshness handling at preflight |
31
- | `post_ship_wiki_ask` | `on` / `off` | Post-ship wiki refresh offer on big runs |
32
- | `summary` | `full` / `off` / `short` | Summary depth |
33
- | `autonomy` | `interactive` / `semi` / `hands-off` | Who answers routine asks |
34
- | `ship_mode` | `ask` / `commit` / `pr` / `report-only` | Terminal ship behavior |
35
- | `session_tier` | `sonnet-4-6-{med,high}` / `opus-4-7-{med,high}` / `opus-4-8-{med,high,xhigh,max}` / `opus-5-{med,high,xhigh,max}` / `fable-5-{med,high,xhigh,max}` | Required main-session model+effort (default `opus-5-high`) |
36
- | `max_wave_tasks` | `3` (integer ≥ 1) | Wave hard cap |
37
- | `batch_pause_every` | `2` (integer ≥ 1) | Waves between pauses |
38
- | `rubric_bands` | `5` (2–8) | Scoring granularity (`scoring: on` only) |
39
- | `flow_name` | `my-flow` (slug) | Display label for traces/statusline |
40
-
41
- ## Cross-key validation (CLI `orc diy validate`; also runs on every write)
42
-
43
- Hard errors (config not written):
44
- - `scoring: off` without a `fixed_executor`.
45
- - `fixed_executor` or any agent choice above `session_tier` (tier order:
46
- haiku-4-5 < sonnet-4-6 < sonnet-5 < opus-4-7 < opus-4-8 < opus-5 < fable-5 —
47
- subagents cannot exceed the main session; effort medium < high < xhigh < max).
48
- A tier below `opus-5-high` clips the `[90,100]` band to the highest agent it
49
- allows, at compile time.
50
- - `review: off` with `security` not `off` (the security pass reuses the
51
- reviewer).
52
- - Anything that would disable a locked rule (see `locked-blocks.md`).
53
-
54
- Warnings (written, reported):
55
- - `scoring: off` with `rubric_bands` overridden (ignored).
56
- - `testgen` on/ask with `verify: off` (testgen normally follows verify).
57
- - `tdd: on` with `verify: off` (the TDD gate runs in the verify slot; plan-time
58
- tests are authored but never gate the ship).
59
- - `autonomy: hands-off` with `ship_mode: commit` or `pr` (fully unattended
60
- git actions).
61
- - `session_tier` below `opus-5-med` with `review`/`verify` on: the pinned
62
- Opus 5 reviewer/verifier agents will silently run at the session's model —
63
- the flow still works, honesty-checked by the tier-honesty locked rule.
64
-
65
- ## `flow.lock.json` (machine state — written by the CLI only)
66
-
67
- ```json
68
- {
69
- "flow_name": "my-flow",
70
- "session_tier": "opus-5-high",
71
- "config_hash": "sha256 of orc-diy.config.yaml",
72
- "flow_hash": "sha256 of flow.md",
73
- "compiled_hash": "sha256 of FLOW-COMPILED.md (null until compiled)",
74
- "compiled_at": "ISO timestamp or null",
75
- "orc_version": "installed orc payload version at compile time, or null"
76
- }
77
- ```
78
-
79
- Gate status (computed by `orc diy status`, consumed by the stub skill and
80
- `orc doctor`; the effort guard does NOT read it — it keys on `flow.lock.json` +
81
- `session_tier` directly, and the statusline reads the lock, not this verb):
82
-
83
- **The exit code IS the contract** (v0.34.7), same convention as the sibling
84
- `orc pattern status <lang>` in `_shared/detecting-artifacts.md`:
85
-
86
- | Exit | State | Meaning |
87
- |---|---|---|
88
- | 0 | READY | everything matches; `/orc-diy` may run the compiled flow |
89
- | 1 | STALE | see the triggers below — the flow must be recompiled first |
90
- | 1 | UNCONFIGURED | no config file (or empty) |
91
-
92
- It used to exit 0 in all three states, so anything branching on it treated a
93
- hard-blocked flow as runnable — the direct inverse of its own sibling.
94
-
95
- STALE triggers (**all live ones are reported, joined by `;`** — not just the
96
- first): no lock / never compiled / `config_hash` mismatch (config changed since
97
- compile) / `orc_version` mismatch (orc was updated) / compiled file missing or
98
- `compiled_hash` mismatch (artifact modified). Reporting only the first meant a
99
- flow stale ONLY because `orc update` bumped the payload said "config changed",
100
- which contradicts a user who knows they never touched their config.
1
+ # ORC-DIY — Flow config schema
2
+
3
+ The single source of intent is `.claude/orc-diy.config.yaml`, written ONLY by
4
+ the `orc diy` CLI (never by hand, never in a Claude session). Every write
5
+ regenerates `.claude/orc/diy/flow.md` (the human-readable spec) and updates
6
+ `.claude/orc/diy/flow.lock.json`, invalidating any previous compile.
7
+
8
+ **Project-scoped only.** The config, lock, and compiled flow live in the
9
+ project's `.claude/` — there is no global variant; `orc diy` rejects
10
+ `--global`. One flow per project; `flow_name` is a display label, never a
11
+ selector.
12
+
13
+ ## Keys (all set via `orc diy set <key> <value>`)
14
+
15
+ | Key | Values (default first) | Meaning |
16
+ |---|---|---|
17
+ | `analyze` | `auto` / `off` / `mini` / `full` | Doc-intake analyst routing |
18
+ | `planning` | `auto` / `own-planner` / `superpowers` / `openspec` | Planning route |
19
+ | `pattern` | `ask` / `off` / `on` | Code-pattern gate on a cache miss |
20
+ | `scoring` | `on` / `off` | Rubric scoring; `off` needs `fixed_executor` |
21
+ | `fixed_executor` | (none) — an executor agent name | Used for every task when `scoring: off` |
22
+ | `extra` | `off` / `on` | May this flow dispatch an executor to a non-Claude worker (`_shared/extra-dispatch.md`)? It decides WHETHER; `orc extra resolve` still decides WHERE, per task, at run time — route rows are NOT baked into the compiled flow, because the lock's staleness triggers cannot see the ledger change. `off` makes a globally-enabled Extra **INERT here**, announced once, so turning it on globally never silently changes a compiled flow |
23
+ | `review` | `on` / `off` / `blocking-only` | Review phase strictness |
24
+ | `security` | `off` / `ask` / `on` / `always` | Security pass; `always` drops the risk-floor trigger |
25
+ | `verify` | `full` / `off` / `smoke` | Verify depth |
26
+ | `testgen` | `off` / `ask` / `on` | Test-authoring phase |
27
+ | `mock_example` | `ask` / `on` / `off` | Post-verify mocked example + drift recovery (`mock-examples/<slug>/`, never committed) |
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
+ | `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 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`) |
31
+ | `wiki_gate` | `notice` / `off` / `hard` | Wiki freshness handling at preflight |
32
+ | `post_ship_wiki_ask` | `on` / `off` | Post-ship wiki refresh offer on big runs |
33
+ | `summary` | `full` / `off` / `short` | Summary depth |
34
+ | `autonomy` | `interactive` / `semi` / `hands-off` | Who answers routine asks |
35
+ | `ship_mode` | `ask` / `commit` / `pr` / `report-only` | Terminal ship behavior |
36
+ | `session_tier` | `sonnet-4-6-{med,high}` / `opus-4-7-{med,high}` / `opus-4-8-{med,high,xhigh,max}` / `opus-5-{med,high,xhigh,max}` / `fable-5-{med,high,xhigh,max}` | Required main-session model+effort (default `opus-5-high`) |
37
+ | `max_wave_tasks` | `3` (integer ≥ 1) | Wave hard cap |
38
+ | `batch_pause_every` | `2` (integer ≥ 1) | Waves between pauses |
39
+ | `rubric_bands` | `5` (2–8) | Scoring granularity (`scoring: on` only) |
40
+ | `flow_name` | `my-flow` (slug) | Display label for traces/statusline |
41
+
42
+ ## Cross-key validation (CLI `orc diy validate`; also runs on every write)
43
+
44
+ Hard errors (config not written):
45
+ - `scoring: off` without a `fixed_executor`.
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 —
48
+ subagents cannot exceed the main session; effort medium < high < xhigh < max).
49
+ A tier below `opus-5-high` clips the `[90,100]` band to the highest agent it
50
+ allows, at compile time.
51
+ - `review: off` with `security` not `off` (the security pass reuses the
52
+ reviewer).
53
+ - Anything that would disable a locked rule (see `locked-blocks.md`).
54
+
55
+ Warnings (written, reported):
56
+ - `scoring: off` with `rubric_bands` overridden (ignored).
57
+ - `testgen` on/ask with `verify: off` (testgen normally follows verify).
58
+ - `tdd: on` with `verify: off` (the TDD gate runs in the verify slot; plan-time
59
+ tests are authored but never gate the ship).
60
+ - `autonomy: hands-off` with `ship_mode: commit` or `pr` (fully unattended
61
+ git actions).
62
+ - `session_tier` below `opus-5-med` with `review`/`verify` on: the pinned
63
+ Opus 5 reviewer/verifier agents will silently run at the session's model —
64
+ the flow still works, honesty-checked by the tier-honesty locked rule.
65
+
66
+ ## `flow.lock.json` (machine state — written by the CLI only)
67
+
68
+ ```json
69
+ {
70
+ "flow_name": "my-flow",
71
+ "session_tier": "opus-5-high",
72
+ "config_hash": "sha256 of orc-diy.config.yaml",
73
+ "flow_hash": "sha256 of flow.md",
74
+ "compiled_hash": "sha256 of FLOW-COMPILED.md (null until compiled)",
75
+ "compiled_at": "ISO timestamp or null",
76
+ "orc_version": "installed orc payload version at compile time, or null"
77
+ }
78
+ ```
79
+
80
+ Gate status (computed by `orc diy status`, consumed by the stub skill and
81
+ `orc doctor`; the effort guard does NOT read it — it keys on `flow.lock.json` +
82
+ `session_tier` directly, and the statusline reads the lock, not this verb):
83
+
84
+ **The exit code IS the contract** (v0.34.7), same convention as the sibling
85
+ `orc pattern status <lang>` in `_shared/detecting-artifacts.md`:
86
+
87
+ | Exit | State | Meaning |
88
+ |---|---|---|
89
+ | 0 | READY | everything matches; `/orc-diy` may run the compiled flow |
90
+ | 1 | STALE | see the triggers below — the flow must be recompiled first |
91
+ | 1 | UNCONFIGURED | no config file (or empty) |
92
+
93
+ It used to exit 0 in all three states, so anything branching on it treated a
94
+ hard-blocked flow as runnable — the direct inverse of its own sibling.
95
+
96
+ STALE triggers (**all live ones are reported, joined by `;`** — not just the
97
+ first): no lock / never compiled / `config_hash` mismatch (config changed since
98
+ compile) / `orc_version` mismatch (orc was updated) / compiled file missing or
99
+ `compiled_hash` mismatch (artifact modified). Reporting only the first meant a
100
+ flow stale ONLY because `orc update` bumped the payload said "config changed",
101
+ which contradicts a user who knows they never touched their config.