@azure-id/orc 1.8.1 → 1.9.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.
- package/CHANGELOG.md +386 -0
- package/README-id.md +110 -73
- package/README.md +96 -33
- package/bin/cli.js +45520 -44867
- package/bin/graph-extract.js +2409 -120
- package/bin/graph-gain.js +404 -0
- package/bin/graph-map.js +232 -0
- package/bin/graph-notes.js +49 -8
- package/bin/graph-query.js +1770 -808
- package/bin/graph-resolve.js +93 -16
- package/bin/graph-shard.js +325 -0
- package/bin/graph.js +658 -605
- package/bin/verify-contracts.js +297 -56
- package/bin/verify-package.js +29 -1
- package/bin/webui/api.js +6 -0
- package/bin/webui/fixtures/index.js +6 -1
- package/bin/webui/fixtures/knowledge.js +41 -1
- package/bin/webui/fixtures/stats.js +107 -104
- package/bin/webui/i18n/en/knowledge.json +16 -1
- package/bin/webui/i18n/id/knowledge.json +16 -1
- package/bin/webui/js/panels/knowledge.js +68 -3
- package/mock-run/orc-quick.md +141 -113
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +15 -5
- package/templates/agents/orc-executor-haiku-4-5.md +25 -13
- package/templates/agents/orc-executor-opus-4-7-high.md +25 -13
- package/templates/agents/orc-executor-opus-4-7-med.md +25 -13
- package/templates/agents/orc-executor-opus-4-8-high.md +25 -13
- package/templates/agents/orc-executor-opus-5-high.md +25 -13
- package/templates/agents/orc-executor-opus-5-low.md +25 -13
- package/templates/agents/orc-executor-opus-5-med.md +25 -13
- package/templates/agents/orc-executor-sonnet-4-6-high.md +25 -13
- package/templates/agents/orc-executor-sonnet-4-6-med.md +25 -13
- package/templates/agents/orc-executor-sonnet-5-high.md +25 -13
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +15 -12
- package/templates/agents/orc-planner-mini-opus-5-med.md +75 -69
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +73 -67
- package/templates/agents/orc-recon-opus-5-low.md +99 -0
- package/templates/agents/orc-recon-sonnet-4-6-med.md +99 -0
- package/templates/commands/orc-mini.md +10 -12
- package/templates/commands/orc-quick.md +20 -33
- package/templates/hooks/README.md +13 -3
- package/templates/hooks/orc-graph-hook.js +148 -13
- package/templates/hooks/orc-trace.js +476 -471
- package/templates/skills/_shared/code-graph.md +148 -20
- package/templates/skills/_shared/phases/execution.md +13 -11
- package/templates/skills/_shared/phases/planning.md +8 -1
- package/templates/skills/_shared/phases/rules.md +172 -159
- package/templates/skills/_shared/phases/ship.md +5 -1
- package/templates/skills/_shared/phases/trace.md +4 -1
- package/templates/skills/_shared/phases/wiki-consult.md +10 -6
- package/templates/skills/_shared/read-ladder.md +10 -2
- package/templates/skills/_shared/return-validation.md +22 -0
- package/templates/skills/context-combiner/SKILL.md +13 -13
- package/templates/skills/orc/SKILL.md +1 -1
- package/templates/skills/orc/subskills/orc-execution/core.md +171 -159
- package/templates/skills/orc-analyze/SKILL.md +13 -13
- package/templates/skills/orc-diy/references/flow-schema.md +1 -1
- package/templates/skills/orc-mini/SKILL.md +148 -136
- package/templates/skills/orc-mini/examples/mini-run-mock.md +64 -50
- package/templates/skills/orc-mini/references/complexity.md +105 -0
- package/templates/skills/orc-quick/README.md +495 -423
- package/templates/skills/orc-quick/SKILL.md +157 -211
- package/templates/skills/orc-quick/references/context-doc.md +145 -114
- package/templates/skills/orc-quick/references/defect.md +101 -0
- package/templates/skills/orc-quick/references/dispatch-gate.md +55 -24
- package/templates/skills/orc-quick/references/gh-mode.md +148 -127
- package/templates/skills/orc-quick/references/look.md +107 -0
- package/templates/skills/orc-wiki/references/staleness.md +1 -1
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orc-mini
|
|
3
3
|
description: >
|
|
4
|
-
Lightweight
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
build+test smoke gate (blocks ship on red) and offers opt-in test authoring.
|
|
10
|
-
Switchable to full flow mid-run. The orchestrator never implements — it spawns.
|
|
4
|
+
Lightweight build lane: light intake, a mini planner, ONE Sonnet 5
|
|
5
|
+
executor, a build+test smoke gate, ship. Use for "/orc-mini", "use
|
|
6
|
+
orc-mini to implement X", or a small change that needs a plan but not a
|
|
7
|
+
full review. Skips review, verify and summary; can switch to the full
|
|
8
|
+
/orc flow mid-run.
|
|
11
9
|
---
|
|
12
10
|
|
|
13
11
|
# ORC-MINI
|
|
14
12
|
|
|
15
13
|
A trimmed orchestrator for when you want speed over the full quality pipeline.
|
|
16
|
-
Everything in the main spine (`../orc/SKILL.md`) applies EXCEPT the
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
Everything in the main spine (`../orc/SKILL.md`) applies EXCEPT the differences
|
|
15
|
+
below. Load its references and schemas by path — the HOT-PATH essentials
|
|
16
|
+
(dispatch names, return-contract fields, artifact path) are inlined here so
|
|
17
|
+
nothing is reconstructed from "full minus deltas."
|
|
20
18
|
|
|
21
19
|
Run as **Opus 4.8 high**, or Opus 5 / Fable 5 at medium+ (as full; never downgrade).
|
|
22
|
-
**You never implement — you spawn.** The one exception is the **smoke gate**:
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
**You never implement — you spawn.** The one exception is the **smoke gate**: a
|
|
21
|
+
read-only build+test run, not implementation — you still never write code.
|
|
25
22
|
**Worked example** (orient only — never execute from it): `examples/mini-run-mock.md`.
|
|
26
23
|
|
|
27
24
|
## Differences from the full orchestrator
|
|
@@ -30,20 +27,21 @@ a read-only build+test run, not implementation — you still never write code.
|
|
|
30
27
|
Instead: the **smoke gate** after execution, then the opt-in
|
|
31
28
|
**test-authoring ask**, then ship.
|
|
32
29
|
2. **Implementation is ONE subagent, Sonnet 5, high effort.** No waves. **No
|
|
33
|
-
scoring table** —
|
|
34
|
-
|
|
35
|
-
3. **No dispatch-style and no batch-pause questions** —
|
|
36
|
-
|
|
37
|
-
4. **Lighter intake.**
|
|
38
|
-
`../_shared/phases/intake.md`);
|
|
39
|
-
|
|
40
|
-
names
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
scoring table** — a **one-line complexity read** replaces it (mini-ok? or
|
|
31
|
+
recommend switching to full); log that line, never render the matrix.
|
|
32
|
+
3. **No dispatch-style and no batch-pause questions** — one subagent makes both
|
|
33
|
+
meaningless; never ask them.
|
|
34
|
+
4. **Lighter intake.** Only the **Always + medium tier** (Q1–Q4 in
|
|
35
|
+
`../_shared/phases/intake.md`); no high tier (Q5/Q6). Step 3.5 runs at
|
|
36
|
+
NAMES-ONLY depth: confirm the names the draft cites with ONE `orc graph ctx
|
|
37
|
+
<names> --if-enabled --json` (five per call; exit 4, or a non-code noun such
|
|
38
|
+
as a command or a config key → Glob/Grep as before), tag the rest
|
|
39
|
+
`UNVERIFIED`, resolve the tags in the sign-off line, >3 tags → recommend full
|
|
40
|
+
or `orc-analyze`. Sign-off **defaults to SOFT**, not GATE.
|
|
41
|
+
5. **Still write tests** when the project has a test setup (the executor does it
|
|
42
|
+
inside its task).
|
|
45
43
|
6. **Everything else is identical:** run folder + intent-spec, planning,
|
|
46
|
-
checkpoint
|
|
44
|
+
checkpoint, stop sequence, usage reminder, ship flow.
|
|
47
45
|
|
|
48
46
|
## Mini flow (the phase set)
|
|
49
47
|
|
|
@@ -51,115 +49,120 @@ a read-only build+test run, not implementation — you still never write code.
|
|
|
51
49
|
Phase 0 intake (Q1–Q4, soft sign-off) + run folder + intent-spec
|
|
52
50
|
Phase 1 planning (dispatch orc-planner-mini; analyst first only on real docs)
|
|
53
51
|
→ one-line complexity read (mini-ok? or recommend switch-to-full)
|
|
54
|
-
Phase 3 dispatch ONE executor (orc-executor-sonnet-5-high) — slice carries
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
Phase 3 dispatch ONE executor (orc-executor-sonnet-5-high) — slice carries the
|
|
53
|
+
standing `house_rules` card (../_shared/phases/house-rules.md, literal) +
|
|
54
|
+
the `rules_card` under it (`orc rules slice` → `text`, verbatim) + the cached
|
|
55
|
+
`postgres` pattern (HIT only) + the --for-slice card + wiki PATHS
|
|
58
56
|
Phase M SMOKE GATE — run build+test → GREEN proceed · RED block ship + surface
|
|
59
57
|
Phase X MOCK EXAMPLE (config mock_example) — offer/build after a GREEN gate
|
|
60
58
|
Phase T TEST-AUTHORING ASK (opt-in) — offer to write test cases (never run them)
|
|
61
59
|
Phase 8 ship (commit / push / PR — never stages mock-examples/)
|
|
62
60
|
```
|
|
63
|
-
(No Phase 2 scoring table, no dispatch-style/batch-pause asks, no full
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
`find` for `.claude/orc/patterns/postgres-pattern.md`), inject it LITERALLY into
|
|
70
|
-
the slice (conventions + blocking query invariants).
|
|
71
|
-
Cache MISS → skip — mini never codifies (that's the full lane /
|
|
72
|
-
`/orc-pattern`); universal invariants + neighbor imitation still cover it.
|
|
61
|
+
(No Phase 2 scoring table, no dispatch-style/batch-pause asks, no full review/verify/summary.)
|
|
62
|
+
**Postgres query grounding.** Data-access task on a Postgres project → probe
|
|
63
|
+
`orc pattern status postgres` (`../_shared/detecting-artifacts.md`, never an
|
|
64
|
+
ad-hoc `find`). HIT → inject the pattern LITERALLY into the slice (conventions +
|
|
65
|
+
blocking query invariants). MISS → skip; mini never codifies (full lane /
|
|
66
|
+
`/orc-pattern`).
|
|
73
67
|
|
|
74
68
|
**Gotchas (repair memory; config `gotchas`) — mini READS and WRITES.** Probe at
|
|
75
69
|
Phase 1 (`orc gotcha status`, one row, never silent), inject the SCOPE-MATCHING
|
|
76
|
-
entries into the Phase 3 slice (cap 3; zero matches = no block,
|
|
77
|
-
|
|
78
|
-
Trimmed mechanics + `.claude/orc/gotchas.md`: `../_shared/gotchas.md` §10.
|
|
70
|
+
entries into the Phase 3 slice (cap 3; zero matches = no block), and append a
|
|
71
|
+
returned `gotcha_recorded` YOURSELF. `.claude/orc/gotchas.md` and the mechanics: `../_shared/gotchas.md` §10.
|
|
79
72
|
|
|
80
73
|
## Code graph cache — consult, build, use, update (`../_shared/code-graph.md` §0)
|
|
81
74
|
|
|
82
|
-
Never skipped. Every call carries `--if-enabled`: exit 3 = off → print `graph: off` once, make no other graph call.
|
|
83
|
-
Print each JSON `line` in chat; put each `trace` in the next packet VERBATIM.
|
|
75
|
+
Never skipped. Every call carries `--if-enabled`: exit 3 = off → print `graph: off` once, make no other graph call. Print each JSON `line` in chat; put each `trace` in the next packet VERBATIM.
|
|
84
76
|
1. **Preflight, with the probes, before the planner:** `orc graph status --if-enabled --heal --json` — it builds or updates the cache itself.
|
|
85
|
-
2. **Phase
|
|
86
|
-
3. **Phase
|
|
77
|
+
2. **Phase 0, before the tiered round:** `orc graph map --focus "<3–6 words from the request>" --budget 800 --if-enabled --json`. Its ranked files pre-fill Q4's `➡️` recommendation. Never ask what the map already answered.
|
|
78
|
+
3. **Phase 1, into `graph_facts` and the complexity line:** `orc graph impact <declared_files> --if-enabled --json` (ONE call) and `orc graph cochange <each declared file> --if-enabled --json` — NUMBERS, never a judgment (`references/complexity.md`).
|
|
79
|
+
4. **Phase 3 slice:** ONE `orc graph ctx <declared_files> --for-slice --if-enabled --json` → its `card` is the `graph` block, the OUTSIDE view. No card when the change stays inside one named file with no signature change (`../_shared/code-graph.md` §7). The return carries `graph_used`.
|
|
80
|
+
5. **Phase M, before the suite:** `orc graph changes --if-enabled --json` names the tests that reach the change; run those first, then the suite. `risk` never prints without its `why`.
|
|
81
|
+
6. **Phase M GREEN:** `orc graph update --notes-pending --files <actual_files> --if-enabled --json` — ONE call for the update AND the notes batch (§6) — then `orc graph gain --run <this run> --if-enabled --json`, `line` copied VERBATIM into the ship summary. It is an estimate with a range; never restate it as a saving.
|
|
87
82
|
|
|
88
83
|
## Phase M — Smoke gate (build + test; blocks ship on red)
|
|
89
84
|
|
|
90
|
-
After the executor return validates (`../_shared/return-validation.md` —
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
`
|
|
85
|
+
After the executor return validates (`../_shared/return-validation.md` — including `done` with non-empty `unmet[]` = partial, and §6's worktree delta: a path changed outside `declared_files` is a violation whatever the return said), YOU run the smoke gate
|
|
86
|
+
per `../_shared/smoke-gate.md`: read-only build+test, with **the affected tests
|
|
87
|
+
FIRST** (code-graph step 5; a runner that takes no file list → one line saying
|
|
88
|
+
so), then build and suite once each, then the blast radius from the same
|
|
89
|
+
`changes` answer, `risk` never without its `why`:
|
|
90
|
+
`blast radius 2 symbols touched · callers 3 in 2 files · tests reach 2 · risk medium: <symbol> (fan-in 3, no test reaches it)`.
|
|
91
|
+
**GREEN** → code-graph step 6 → test-authoring ask, then ship. **RED** → never
|
|
92
|
+
offer commit/ship; one repair re-dispatch, second red → STOP and surface.
|
|
93
|
+
Docs-only → gate N/A, say so. `orc run inflight` FIRST — exit 2 REFUSES, because
|
|
96
94
|
`a lane that re-dispatches over a live attempt` has broken the contract
|
|
97
|
-
(`../_shared/return-validation.md` §0).
|
|
95
|
+
(`../_shared/return-validation.md` §0). **A `risk: high` row adds ONE option,
|
|
96
|
+
never a phase:** an exported symbol with fan-in 3+ that no test reaches adds one
|
|
97
|
+
option to the EXISTING end-of-run batch (mock example · test authoring · ship)
|
|
98
|
+
— *a. dispatch `orc-reviewer-opus-5-med` on the diff (P0/P1 block the commit
|
|
99
|
+
offer once) · b. write a test in Phase T · c. ship anyway*. No new user turn;
|
|
100
|
+
mini still skips full review.
|
|
98
101
|
|
|
99
102
|
## Phase X — Mock example + drift recovery (config `mock_example`, default ask)
|
|
100
103
|
|
|
101
104
|
Canonical: `../_shared/drift-recovery.md` — load it when the phase fires. After
|
|
102
105
|
a GREEN Phase M, before ship: `ask` → MANDATORY offer (never silently
|
|
103
106
|
skipped/run) · `on` → build · `off` → skip. Deliverable
|
|
104
|
-
`mock-examples/<change-slug>/` at project root
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
<describe>]. Drift → `DRIFT-FROM` handoff (gap analysis → patch plan → dispatch
|
|
108
|
-
→ re-gate → re-offer), hard cap 2 loops, then an honest unresolved report.
|
|
109
|
-
Trace: `PHASE mock-example`, `DRIFT loop=<n>`.
|
|
107
|
+
`mock-examples/<change-slug>/` at project root — **never committed, never
|
|
108
|
+
staged**. Drift → `DRIFT-FROM` handoff, hard cap 2 loops, then an honest
|
|
109
|
+
unresolved report. Trace: `PHASE mock-example`, `DRIFT loop=<n>`.
|
|
110
110
|
|
|
111
111
|
## Phase T — Test-authoring ask (opt-in; writes tests, never runs them)
|
|
112
112
|
|
|
113
113
|
Same opt-in as full Phase 6.5 — mini **only asks** (never gates the ship).
|
|
114
|
-
Default from `config.generate_tests`; at the end of a GREEN run ask
|
|
115
|
-
test cases
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
not gitignored). No → ship. Either way this NEVER runs tests.
|
|
114
|
+
Default from `config.generate_tests`; at the end of a GREEN run ask whether to
|
|
115
|
+
author test cases (files + TEST-PLAN.md + a curl bundle for HTTP APIs), saying
|
|
116
|
+
they are never run. Yes → dispatch `orc-test-author-opus-5-med` (subskill
|
|
117
|
+
`../orc/subskills/orc-testgen/`) with `actual_files`, the definition-of-done,
|
|
118
|
+
touched flows, constraints and stack; the manual deliverables land in
|
|
119
|
+
**`test-generator/<change-slug>/` at the project root**. Validate that the
|
|
120
|
+
returned `test_plan_path`/`curl_bundle_path` sit under that folder (else
|
|
121
|
+
malformed → re-dispatch) and state the exact path. No → ship; either way this
|
|
122
|
+
NEVER runs tests.
|
|
124
123
|
|
|
125
124
|
## Behavior trace (always on)
|
|
126
125
|
|
|
127
|
-
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
126
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names the
|
|
127
|
+
file and the layers). Lane token `mini`, tier **Build lanes** — per phase,
|
|
128
|
+
batched to **3 packets** (intake+plan · execution · ship), each paired with the
|
|
129
|
+
next phase's first dispatch. At run start write `log_dir/.current` =
|
|
130
|
+
`run-mini-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
|
|
131
|
+
in the SAME step. Nothing else about the protocol is restated here; a phase that
|
|
132
|
+
ends with `zero new trace lines is a protocol violation`. Mini does NOT drop the
|
|
133
|
+
trace. `OUTCOME … band=mini` per task.
|
|
134
|
+
|
|
135
|
+
## Complexity read (replaces the scoring table) — `references/complexity.md`
|
|
136
|
+
|
|
137
|
+
ONE line before dispatch, carrying its own NUMBERS — never a narrative
|
|
138
|
+
judgment. Counted from `graph_facts` and `facets.risk[]`; how, and why each
|
|
139
|
+
threshold is that number: `references/complexity.md`.
|
|
140
|
+
`complexity: mini-ok — 3 files · confident callers 4 in 2 files · tests reach 2 · risk none · cochange none`
|
|
141
|
+
**Recommend the full lane when ANY holds:** confident callers in 4+ files
|
|
142
|
+
outside `declared_files` · 8+ confident callers · any `facets.risk[]` entry · a
|
|
143
|
+
`cochange` partner with 3+ co-commits not in the plan. `AMBIGUOUS` callers print
|
|
144
|
+
as `maybe <n>` and never trip one alone. Graph off → the `(graph off)` form,
|
|
145
|
+
from `facets.risk[]` alone; never invent a number. It is an OFFER: *1. switch to
|
|
146
|
+
/orc (recommended — <the reason>) · 2. continue in mini*. Continuing writes the
|
|
147
|
+
NUMBERS into the decision log. Trace: `GATE complexity :: <the line>`.
|
|
144
148
|
|
|
145
149
|
## Fallback intake (arriving from orc-fast)
|
|
146
150
|
|
|
147
|
-
orc-fast falls back HERE whenever its prerequisites fail — never by stopping
|
|
148
|
-
|
|
149
|
-
`FALLBACK-FROM` block in the shared run folder names the reason; acknowledge
|
|
150
|
-
|
|
151
|
+
orc-fast falls back HERE whenever its prerequisites fail — never by stopping the
|
|
152
|
+
chat. Follow the reader side of `../_shared/fallback-handoff.md`: the
|
|
153
|
+
`FALLBACK-FROM` block in the shared run folder names the reason; acknowledge it
|
|
154
|
+
in one line, reuse the run folder, re-derive nothing it carries.
|
|
151
155
|
|
|
152
156
|
## Switching to full flow mid-run
|
|
153
157
|
|
|
154
|
-
On "switch to full" (or when the complexity read
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
the decision log.
|
|
158
|
+
On "switch to full" (or when the complexity read recommends it): the run folder,
|
|
159
|
+
checkpoint and intent-spec already use the shared `.claude/orc/run/{run-slug}/`
|
|
160
|
+
format, so the full flow resumes from the current checkpoint and adds the phases
|
|
161
|
+
mini skipped. Record the switch in the decision log.
|
|
159
162
|
|
|
160
163
|
## Dispatch via named agents (canonical name-map — dispatch BY these names)
|
|
161
164
|
|
|
162
|
-
Models pinned in `.claude/agents/`; look up here, never reconstruct a name (agent = skill-name + model-effort suffix). See `.claude/agents/MODEL-MAPPING.md`. `opus5_only: true` FORCES the right column and needs an Opus 5 main session — mini's cheap-lane premise is off while it is on (`../_shared/opus5-only.md`).
|
|
165
|
+
Models pinned in `.claude/agents/`; look one up here, never reconstruct a name (agent = skill-name + model-effort suffix). See `.claude/agents/MODEL-MAPPING.md`. `opus5_only: true` FORCES the right column and needs an Opus 5 main session — mini's cheap-lane premise is off while it is on (`../_shared/opus5-only.md`).
|
|
163
166
|
|
|
164
167
|
**Extra (`extra_enabled`, `../_shared/extra-dispatch.md`):** mini's ONE executor may run off Claude. It has no score, so resolve the pinned executor's **BAND, both edges, and require them to agree** — a partially covering row keeps the run on Claude and the preflight says so. Print the `extra:` line at intake whenever the gate is on (P0: `a lane that sends work off Claude without saying so`); dispatch via `orc extra dispatch --task <file> --json` with the IDENTICAL slice; validate with `return-validation.md` **§2b, not §2** (⛔ SUBSTITUTION replaces the downgrade check); a failure runs `orc extra reconcile <task_id>` FIRST — a worktree that moved is RESUMED, never re-done — then falls back to the pinned Claude agent, announced. A cited-risk change never leaves Claude (`extra_risk_tasks`, default `off`) — and mini's complexity read is not a substitute for that gate.
|
|
165
168
|
|
|
@@ -179,10 +182,8 @@ from `.claude/orc.config.yaml` — a key this lane does not read is not in the
|
|
|
179
182
|
answer, and a key another key shadows comes back already marked. Exit ≠ 0 → say
|
|
180
183
|
the CLI is unavailable and fall back to `../_shared/config-precedence.md`'s
|
|
181
184
|
documented defaults, out loud. Priorities and families:
|
|
182
|
-
`../_shared/config-precedence.md`.
|
|
183
|
-
|
|
184
|
-
Wave/scoring/scout keys never apply to mini — and they are not in the answer,
|
|
185
|
-
so there is nothing to render or ask.
|
|
185
|
+
`../_shared/config-precedence.md`. Wave, scoring and scout keys never apply to
|
|
186
|
+
mini and are not in the answer, so there is nothing to render or ask.
|
|
186
187
|
|
|
187
188
|
## Rules — the anti-slop card (`../_shared/phases/rules.md`)
|
|
188
189
|
|
|
@@ -216,50 +217,61 @@ reason at preflight — never silent. No → skip entirely; never re-ask.
|
|
|
216
217
|
## Analyst & planner (mini lane)
|
|
217
218
|
|
|
218
219
|
orc-mini dispatches the FAST variants (Sonnet 5 high): `orc-analyze-mini` and
|
|
219
|
-
`orc-planner-mini
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
mode, no scouts**; it escalates to `/orc-analyze` deep on its concrete
|
|
220
|
+
`orc-planner-mini`. The mini analyst is **doc-optional**: on real doc input it
|
|
221
|
+
runs first, then the mini planner; on a merely ambiguous request, prefer one
|
|
222
|
+
inline clarifying question over a cold analyst spawn. Always single-pass — **no
|
|
223
|
+
deep mode, no scouts**; it escalates to `/orc-analyze` deep on its concrete
|
|
224
224
|
thresholds and the user chooses. You never analyze or plan yourself.
|
|
225
225
|
|
|
226
|
+
**The planner slice carries `graph_facts`** — `map`, `impact`, `cochange` and
|
|
227
|
+
the `generation`, or `null` when the graph is off (shape:
|
|
228
|
+
`references/complexity.md` §1b). The planner grounds `declared_files` and
|
|
229
|
+
`facets.breadth` on them; a `cochange` partner not in the plan is an
|
|
230
|
+
`open_questions[]` entry, never a silent addition.
|
|
231
|
+
|
|
226
232
|
**Mini-lane gates (yours, deterministic — same as full; full detail in
|
|
227
233
|
`../_shared/phases/analyst-gates.md`; emit `GATE` trace lines).** On
|
|
228
234
|
mini-analyst return: evidence spot-check + derivation lint; refuse
|
|
229
235
|
take-into-build on open `UNVERIFIED`/missing `scope_closed`; `git_head` ≠
|
|
230
|
-
HEAD at plan time → re-run the spot-check first. On mini-planner return:
|
|
231
|
-
every `disposition: exists` path
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
236
|
+
HEAD at plan time → re-run the spot-check first. On mini-planner return: confirm
|
|
237
|
+
every `disposition: exists` path with `orc graph ctx <paths> --if-enabled
|
|
238
|
+
--json`, FIVE at a time — exit 0 confirms, exit 4 or an unindexed path falls
|
|
239
|
+
back to a Glob. Then recompute coverage (no orphan requirements), cycle +
|
|
240
|
+
collision checks. Any miss → bounce (one retry, then escalate). At dispatch,
|
|
241
|
+
append the task's `spec_invariants` to the slice's `constraints[]` verbatim.
|
|
235
242
|
|
|
236
243
|
## Wiki consult (if present)
|
|
237
244
|
|
|
238
245
|
Same rule as the full skill — load `../_shared/phases/wiki-consult.md` at the
|
|
239
|
-
planning/complexity-read step: compute the FRESH / AGING / STALE tier from
|
|
240
|
-
`.claude/orc/wiki-meta.json
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
246
|
+
planning/complexity-read step: compute the FRESH / `AGING` / STALE tier from
|
|
247
|
+
`.claude/orc/wiki-meta.json` and `orc wiki status --json`, then **select PATHS,
|
|
248
|
+
never bodies**. From `wiki/INDEX.md` pick 1–3 page paths by keyword
|
|
249
|
+
(cross-cutting maps like `orc-reference-api-surface` when their domain applies)
|
|
250
|
+
and put the PATHS in the planner and executor slices with *"Read these first:
|
|
251
|
+
the TL;DR for orientation, `Contracts & shapes` for specifics"* plus
|
|
252
|
+
`code > fresh wiki > stale wiki (hints) > model priors`. **You never read a page
|
|
253
|
+
body into your own context.** **Emit `WIKI-CONSULT <tier> :: docs=<paths>`**. Crosslink: a task touching a
|
|
254
|
+
boundary in `.claude/orc/crosslink/needs.json` gets the cached contract injected
|
|
255
|
+
per that reference — advisory, never blocking. Mini never generates the wiki;
|
|
256
|
+
after a code-changing run apply the passive stale-flag note only.
|
|
257
|
+
|
|
258
|
+
**`none` is an answer — record it, never drop it.** `wiki_used: none` and
|
|
259
|
+
`graph_used: none` from ANY return go into the checkpoint and the ship line
|
|
260
|
+
(`knowledge: wiki 2 pages offered · used none · graph card 2 targets · used
|
|
261
|
+
none`). Two runs in a row with `wiki_used: none` on FRESH pages → one line:
|
|
262
|
+
`wiki: the selected pages were not used in 2 runs — check their TL;DRs
|
|
263
|
+
(/orc-wiki)`. A signal, never a gate, never dropped for looking null.
|
|
264
|
+
|
|
265
|
+
## Shared artifacts, and what mini still enforces
|
|
266
|
+
|
|
267
|
+
Mini writes to the SAME location as the full skill (`.claude/orc/run/`
|
|
268
|
+
`{run-slug}/`), so a switch needs no migration. From the main hard rules: never
|
|
269
|
+
implement yourself (the smoke gate is read-only) · every RUN-STATE artifact in
|
|
270
|
+
the run subfolder, never the project root (the one exception is the opt-in
|
|
271
|
+
`test-generator/<change-slug>/` deliverable, at the project root by design) ·
|
|
272
|
+
validate every subagent return (malformed = failure) · report the dispatch log
|
|
273
|
+
and remind the user to run `/usage` (never yourself) · **never offer commit on a
|
|
274
|
+
red build** (Phase M enforces it).
|
|
263
275
|
|
|
264
276
|
## Waiting mid-run (`/orc-wait`)
|
|
265
277
|
|
|
@@ -1,50 +1,64 @@
|
|
|
1
|
-
# Example — Annotated Mini Run (dry run)
|
|
2
|
-
|
|
3
|
-
O: = orchestrator (Opus 4.8 high, always) · U: = user. Nothing real. The
|
|
4
|
-
orchestrator NEVER implements — it spawns ONE Sonnet-5-high executor, then runs a
|
|
5
|
-
read-only build+test smoke gate itself.
|
|
6
|
-
|
|
7
|
-
U: /orc-mini add a `--json` flag to the `report` CLI command
|
|
8
|
-
|
|
9
|
-
## Phase 0 — Intake (lighter: Q1–Q4, soft sign-off)
|
|
10
|
-
O: Creates run folder run/report-json-flag/ FIRST.
|
|
11
|
-
[reads repo: Python/poetry/pytest — asks nothing about stack]
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
O
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
O:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
O:
|
|
41
|
-
tests/test_report.py
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
# Example — Annotated Mini Run (dry run)
|
|
2
|
+
|
|
3
|
+
O: = orchestrator (Opus 4.8 high, always) · U: = user. Nothing real. The
|
|
4
|
+
orchestrator NEVER implements — it spawns ONE Sonnet-5-high executor, then runs a
|
|
5
|
+
read-only build+test smoke gate itself.
|
|
6
|
+
|
|
7
|
+
U: /orc-mini add a `--json` flag to the `report` CLI command
|
|
8
|
+
|
|
9
|
+
## Phase 0 — Intake (lighter: Q1–Q4, soft sign-off)
|
|
10
|
+
O: Creates run folder run/report-json-flag/ FIRST.
|
|
11
|
+
[reads repo: Python/poetry/pytest — asks nothing about stack]
|
|
12
|
+
graph: FRESH — 6 files · 8 symbols
|
|
13
|
+
GRAPH-MAP :: focus="report json flag" budget=800 → cli/report.py, tests/test_report.py
|
|
14
|
+
Batched round (medium tier): 1) What should exist? 2) Out of scope?
|
|
15
|
+
3) How do we know it's done? 4) Patterns/files to avoid?
|
|
16
|
+
[Q4's ➡️ already names cli/report.py and tests/test_report.py — the map
|
|
17
|
+
answered it, so O does not ask the user to recite their own repo.]
|
|
18
|
+
U: report --json prints machine-readable output; no other commands touched;
|
|
19
|
+
`pytest tests/test_report.py` green; follow the existing click option style.
|
|
20
|
+
O: [drafts intent-spec.md] Sign-off defaults to SOFT — proceeding unless you object.
|
|
21
|
+
|
|
22
|
+
## Phase 1 — Planning + complexity read
|
|
23
|
+
O: [dispatches orc-planner-mini WITH graph_facts: map + impact + cochange, gen 7]
|
|
24
|
+
→ 1 task, declared_files: cli/report.py, tests/test_report.py — both grounded
|
|
25
|
+
`exists`, evidence "graph gen 7" + acceptance sliced from the intent-spec.
|
|
26
|
+
O confirms both paths with ONE `orc graph ctx` call (exit 0) ✓.
|
|
27
|
+
O: GATE complexity :: complexity: mini-ok — 2 files · confident callers 1 in 1 file ·
|
|
28
|
+
tests reach 1 · risk none · cochange none
|
|
29
|
+
(4+ caller files, 8+ callers, a cited risk class, or a cochange partner with
|
|
30
|
+
3+ co-commits would have made this "recommend /orc" — an offer, never a switch.)
|
|
31
|
+
|
|
32
|
+
## Phase 3 — Execute (ONE subagent)
|
|
33
|
+
O: graph: --for-slice card (2 files) · wiki: 1 path (pointer, body never read here)
|
|
34
|
+
O: → claude-sonnet-5 / high :: DISPATCH orc-executor-sonnet-5-high :: add --json flag
|
|
35
|
+
[executor edits cli/report.py + updates tests, returns actual_files + actual_model
|
|
36
|
+
+ evidence {`pytest tests/test_report.py`, exit 0, tail quoted} + empty unmet[]]
|
|
37
|
+
O: VERIFY actual=claude-sonnet-5/high ✅ MATCH · evidence present ✓
|
|
38
|
+
|
|
39
|
+
## Phase M — Smoke gate (build + test; blocks ship on red)
|
|
40
|
+
O: GRAPH-CHANGES → tests reached 1 file (call 1)
|
|
41
|
+
[runs `pytest tests/test_report.py` FIRST] ⛔ RED — 1 failure: JSON missing trailing key.
|
|
42
|
+
Not offering commit. Auto-fix ONCE → re-dispatch executor with the failure output.
|
|
43
|
+
[re-run] ✅ GREEN — tests reached 1 file → 4 passed · suite 12 passed · build ok.
|
|
44
|
+
blast radius 1 symbol touched · callers 1 in 1 file · tests reach 1 · risk none
|
|
45
|
+
VERDICT pass
|
|
46
|
+
O: GRAPH-UPDATE :: gen 8 · 2 files · 1 note pending → noter batch dispatched
|
|
47
|
+
graph gain: paid 0.8K tokens · avoided an estimated 2–5K · measured: not yet (N=1)
|
|
48
|
+
|
|
49
|
+
## Phase T — Test-authoring ask (opt-in; writes, never runs)
|
|
50
|
+
O: Write test cases for these changes? (I author them — files + TEST-PLAN.md — but
|
|
51
|
+
never run them; you test manually.) [default from config.generate_tests]
|
|
52
|
+
U: yes
|
|
53
|
+
O: [dispatches orc-test-author-opus-5-med] → automated tests in
|
|
54
|
+
tests/test_report.py; manual deliverable at test-generator/report-json-flag/TEST-PLAN.md
|
|
55
|
+
(non-API project → curl_bundle_path null). Validate: path under
|
|
56
|
+
test-generator/report-json-flag/ ✓.
|
|
57
|
+
O: Self-QA plan: test-generator/report-json-flag/TEST-PLAN.md (committed on ship).
|
|
58
|
+
|
|
59
|
+
## Phase 8 — Ship
|
|
60
|
+
O: Current branch: feat/report-json. Commit? Push? PR?
|
|
61
|
+
U: commit
|
|
62
|
+
O: knowledge: wiki 1 page offered · used tests/test_report.py note · graph used 1 target
|
|
63
|
+
O: [commits] Done. Usage: dispatch log below + run /usage for your limits.
|
|
64
|
+
(Switch to full flow any time — the run folder + checkpoint are shared.)
|