@azure-id/orc 0.56.0 → 1.0.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 +228 -0
- package/README-id.md +143 -53
- package/README.md +124 -103
- package/bin/build-agents.js +18 -11
- package/bin/cli.js +4139 -315
- package/bin/onboarding-content.js +0 -3
- package/bin/test-run.js +491 -0
- package/bin/verify-contracts.js +4256 -3277
- package/bin/verify-package.js +563 -498
- package/bin/webui/api.js +1186 -1163
- package/bin/webui/app.html +9 -0
- package/bin/webui/css/06-responsive.css +120 -108
- package/bin/webui/css/panels/extra.css +29 -0
- package/bin/webui/css/panels/lanes.css +134 -0
- package/bin/webui/css/panels/settings.css +79 -3
- package/bin/webui/fixtures/extra.js +2036 -1934
- package/bin/webui/fixtures/flow.js +2 -2
- package/bin/webui/fixtures/index.js +503 -486
- package/bin/webui/fixtures/lanes.js +218 -0
- package/bin/webui/fixtures/settings.js +261 -34
- package/bin/webui/fixtures/stats.js +3 -3
- package/bin/webui/i18n/TERMS.md +135 -134
- package/bin/webui/i18n/en/extra.json +345 -313
- package/bin/webui/i18n/en/lanes.json +29 -0
- package/bin/webui/i18n/en/nav.json +1 -0
- package/bin/webui/i18n/en/overview.json +2 -0
- package/bin/webui/i18n/en/settings.json +16 -5
- package/bin/webui/i18n/id/extra.json +345 -313
- package/bin/webui/i18n/id/lanes.json +29 -0
- package/bin/webui/i18n/id/nav.json +1 -0
- package/bin/webui/i18n/id/overview.json +2 -0
- package/bin/webui/i18n/id/settings.json +15 -4
- package/bin/webui/js/01-i18n.js +1 -0
- package/bin/webui/js/panels/extra.js +3199 -3011
- package/bin/webui/js/panels/lanes.js +259 -0
- package/bin/webui/js/panels/overview.js +10 -0
- package/bin/webui/js/panels/settings.js +149 -3
- package/package.json +3 -3
- package/templates/agents/MODEL-MAPPING.md +23 -35
- package/templates/agents/orc-executor-opus-4-7-high.md +1 -1
- package/templates/agents/orc-executor-opus-4-7-med.md +1 -1
- package/templates/agents/orc-executor-opus-4-8-high.md +1 -1
- package/templates/agents/orc-executor-opus-5-high.md +1 -1
- package/templates/agents/orc-executor-opus-5-low.md +1 -1
- package/templates/agents/orc-executor-opus-5-med.md +1 -1
- package/templates/agents/orc-retro-opus-5-med.md +73 -73
- package/templates/agents/orc-retro-sonnet-5-high.md +72 -72
- package/templates/agents/orc-trace-writer-haiku-4-5.md +107 -107
- package/templates/commands/orc-route.md +1 -1
- package/templates/commands/orc.md +1 -1
- package/templates/skills/_shared/README.md +7 -3
- package/templates/skills/_shared/config-precedence.md +198 -0
- package/templates/skills/_shared/drift-recovery.md +1 -1
- package/templates/skills/_shared/extra-dispatch.md +292 -6
- package/templates/skills/_shared/interview.md +1 -1
- package/templates/skills/_shared/opus5-only.md +9 -7
- package/templates/skills/_shared/phases/README.md +82 -0
- package/templates/skills/{orc/references → _shared/phases}/analyst-gates.md +15 -3
- package/templates/skills/_shared/phases/execution.md +143 -0
- package/templates/skills/{orc/references → _shared/phases}/house-rules.md +13 -1
- package/templates/skills/{orc/references → _shared/phases}/intake.md +15 -2
- package/templates/skills/_shared/phases/mock-example.md +56 -0
- package/templates/skills/{orc/references → _shared/phases}/plan-handoff.md +16 -3
- package/templates/skills/_shared/phases/planning.md +135 -0
- package/templates/skills/_shared/phases/preflight.md +76 -0
- package/templates/skills/_shared/phases/review.md +53 -0
- package/templates/skills/_shared/phases/scoring.md +65 -0
- package/templates/skills/{orc/references → _shared/phases}/security-checklist.md +12 -1
- package/templates/skills/_shared/phases/security.md +55 -0
- package/templates/skills/_shared/phases/ship.md +88 -0
- package/templates/skills/{orc/references/stop-and-resume.md → _shared/phases/stop-resume.md} +169 -160
- package/templates/skills/_shared/phases/summary.md +48 -0
- package/templates/skills/_shared/phases/testgen.md +51 -0
- package/templates/skills/{orc/references/trace-protocol.md → _shared/phases/trace.md} +49 -6
- package/templates/skills/_shared/phases/verify.md +70 -0
- package/templates/skills/{orc/references → _shared/phases}/wave-grouping.md +14 -2
- package/templates/skills/{orc/references → _shared/phases}/wiki-consult.md +13 -1
- package/templates/skills/_shared/read-ladder.md +48 -0
- package/templates/skills/context-combiner/SKILL.md +214 -187
- package/templates/skills/orc/README.md +148 -150
- package/templates/skills/orc/SKILL.md +70 -358
- package/templates/skills/orc/config.md +137 -389
- package/templates/skills/orc/examples/full-run-mock.md +1 -1
- package/templates/skills/orc/references/effort-and-mode.md +16 -18
- package/templates/skills/orc/references/phases/intake.md +47 -0
- package/templates/skills/orc/references/phases/integration.md +19 -0
- package/templates/skills/orc/references/preflight-report.md +4 -4
- package/templates/skills/orc/references/ultra-mode.md +117 -123
- package/templates/skills/orc/schemas/planning-output.md +279 -279
- package/templates/skills/orc/subskills/orc-planner/SKILL.md +260 -264
- package/templates/skills/orc/subskills/orc-pr/stack-gate.md +4 -1
- package/templates/skills/orc-aftermath/SKILL.md +153 -136
- package/templates/skills/orc-analyze/SKILL.md +247 -220
- package/templates/skills/orc-analyze/references/branching.md +51 -51
- package/templates/skills/orc-analyze/references/thin-input.md +1 -1
- package/templates/skills/orc-analyze-mini/SKILL.md +128 -112
- package/templates/skills/orc-boundary/SKILL.md +244 -208
- package/templates/skills/orc-brainstorm/SKILL.md +372 -339
- package/templates/skills/orc-budget/SKILL.md +243 -225
- package/templates/skills/orc-challenge/README.md +1 -1
- package/templates/skills/orc-challenge/SKILL.md +293 -255
- package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
- package/templates/skills/orc-claude/SKILL.md +216 -199
- package/templates/skills/orc-diy/README.md +2 -1
- package/templates/skills/orc-diy/SKILL.md +129 -70
- package/templates/skills/orc-diy/references/blocks/analyze.md +1 -1
- package/templates/skills/orc-diy/references/compile.md +21 -7
- package/templates/skills/orc-diy/references/flow-schema.md +2 -2
- package/templates/skills/orc-doc/SKILL.md +44 -7
- package/templates/skills/orc-explain/SKILL.md +19 -0
- package/templates/skills/orc-export/SKILL.md +26 -5
- package/templates/skills/orc-fast/SKILL.md +215 -187
- package/templates/skills/orc-grill/SKILL.md +233 -207
- package/templates/skills/orc-handoff/SKILL.md +223 -204
- package/templates/skills/orc-learn/SKILL.md +176 -156
- package/templates/skills/orc-mini/SKILL.md +41 -23
- package/templates/skills/orc-pact/SKILL.md +250 -218
- package/templates/skills/orc-pattern/SKILL.md +149 -124
- package/templates/skills/orc-poly/SKILL.md +237 -216
- package/templates/skills/orc-poly/references/gather.md +1 -1
- package/templates/skills/orc-pr-driver/SKILL.md +196 -167
- package/templates/skills/orc-pr-driver/references/orc-run-split.md +1 -1
- package/templates/skills/orc-pr-setup/SKILL.md +212 -184
- package/templates/skills/orc-quick/README.md +2 -2
- package/templates/skills/orc-quick/SKILL.md +346 -313
- package/templates/skills/orc-quick/references/dispatch-gate.md +12 -4
- package/templates/skills/orc-retro/SKILL.md +244 -222
- package/templates/skills/orc-retro/examples/retro-mock.md +171 -171
- package/templates/skills/orc-route/SKILL.md +183 -165
- package/templates/skills/orc-verify/SKILL.md +100 -86
- package/templates/skills/orc-wiki/SKILL.md +55 -206
- package/templates/skills/orc-wiki/references/phases/phase-0.md +71 -0
- package/templates/skills/orc-wiki/references/phases/phase-1.md +35 -0
- package/templates/skills/orc-wiki/references/phases/phase-2.md +52 -0
- package/templates/skills/orc-wiki/references/phases/phase-3.md +57 -0
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +36 -0
- package/templates/agents/orc-advisor-fable-5.md +0 -50
- package/templates/agents/orc-analyst-fable-5.md +0 -115
- package/templates/agents/orc-judge-fable-5.md +0 -79
- package/templates/agents/orc-planner-fable-5.md +0 -152
- package/templates/agents/orc-reviewer-fable-5.md +0 -57
- package/templates/skills/_shared/fable5-override.md +0 -56
- package/templates/skills/orc-diy/references/blocks/execution.md +0 -42
- package/templates/skills/orc-diy/references/blocks/mock-example.md +0 -22
- package/templates/skills/orc-diy/references/blocks/planning.md +0 -34
- package/templates/skills/orc-diy/references/blocks/review.md +0 -18
- package/templates/skills/orc-diy/references/blocks/scoring.md +0 -16
- package/templates/skills/orc-diy/references/blocks/security.md +0 -25
- package/templates/skills/orc-diy/references/blocks/ship.md +0 -25
- package/templates/skills/orc-diy/references/blocks/summary.md +0 -18
- package/templates/skills/orc-diy/references/blocks/testgen.md +0 -17
- package/templates/skills/orc-diy/references/blocks/trace.md +0 -28
- package/templates/skills/orc-diy/references/blocks/verify.md +0 -25
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# `_shared/phases/` — one copy of a phase, and a manifest per lane
|
|
2
|
+
|
|
3
|
+
This directory is NOT a skill and NOT a lane. It holds the single canonical copy
|
|
4
|
+
of a phase that **two or more lanes run**. A lane's spine keeps its identity, its
|
|
5
|
+
trigger, its own hard rules and its own phases — and for a shared phase it keeps
|
|
6
|
+
only a POINTER plus that lane's own deltas.
|
|
7
|
+
|
|
8
|
+
**The CLI owns the pipeline, not the prose.** `orc lane phases <lane> [--json]`
|
|
9
|
+
is the manifest: the ordered phase list, the file each phase lives in, the layers
|
|
10
|
+
that lane reads, the catalogued calls it makes, and when to read it. A skill
|
|
11
|
+
never derives the phase list or its order from these filenames — the same rule
|
|
12
|
+
the Flow stepper follows, for the same reason: *a second idea of the pipeline is
|
|
13
|
+
the drift this exists to make impossible.*
|
|
14
|
+
|
|
15
|
+
## What belongs here — the rule is mechanical
|
|
16
|
+
|
|
17
|
+
> A file under `templates/skills/<lane>/` that a file in a DIFFERENT lane already
|
|
18
|
+
> points at belongs here. **A file with exactly one consumer stays home.**
|
|
19
|
+
|
|
20
|
+
That is auditable by grep, which is what makes it a lint rather than an opinion.
|
|
21
|
+
`bin/verify-contracts.js` asserts both halves: nothing under a lane folder may be
|
|
22
|
+
pointed at from another lane, and every file here must be claimed by **≥2 lanes**.
|
|
23
|
+
|
|
24
|
+
Centralizing a one-consumer file is centralizing for its own sake, and it costs a
|
|
25
|
+
lane its own wording for nothing.
|
|
26
|
+
|
|
27
|
+
## The layer set is CLOSED
|
|
28
|
+
|
|
29
|
+
A phase file may be cut into layers with the same marker grammar `orc diy
|
|
30
|
+
compile` already parses (`<!-- diy:when key=value -->`):
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
<!-- orc:layer core -->
|
|
34
|
+
Every lane that runs this phase does this. Never optional.
|
|
35
|
+
<!-- /orc:layer -->
|
|
36
|
+
|
|
37
|
+
<!-- orc:layer trim -->
|
|
38
|
+
orc-mini / orc-fast: ONE executor, no waves. This is a REDUCTION and it is
|
|
39
|
+
deliberate — do not read the `full` layer here.
|
|
40
|
+
<!-- /orc:layer -->
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Layer | Read by | Meaning |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `core` | every lane running this phase | the invariant. Never optional |
|
|
46
|
+
| `full` | `/orc`, `/orc-ultra` | the complete procedure |
|
|
47
|
+
| `trim` | `orc-mini`, `orc-fast` | an explicit REDUCTION, stated as one |
|
|
48
|
+
| `composed` | `orc-diy` | what `orc diy compile` stitches |
|
|
49
|
+
|
|
50
|
+
**Four names, closed. A fifth layer is a lint failure, not a feature** — free
|
|
51
|
+
markers are drift with extra steps. A lane reads `core` plus at most one other
|
|
52
|
+
layer, and `orc lane phases` tells it which.
|
|
53
|
+
|
|
54
|
+
**Why the set exists at all:** the single biggest way this library breaks ORC is
|
|
55
|
+
`orc-mini` reading a shared `review.md` written for the full lane and starting to
|
|
56
|
+
do a full code review. Mini's product promise is that it *skips* review.
|
|
57
|
+
Centralizing without layers does not just cost tokens — it changes behaviour. So
|
|
58
|
+
**a `trim` layer must say what it drops and that dropping it is deliberate.**
|
|
59
|
+
|
|
60
|
+
**A single-layer file is a legitimate answer.** `trace.md` and `stop-resume.md`
|
|
61
|
+
declare `core` only: their procedure really is identical in every lane that runs
|
|
62
|
+
them, and what varies is DATA (the tier table, the lane token), not prose. Cutting
|
|
63
|
+
them into layers to look symmetrical would be inventing structure the phase does
|
|
64
|
+
not have.
|
|
65
|
+
|
|
66
|
+
## Pointer discipline
|
|
67
|
+
|
|
68
|
+
Every pointer a spine adds declares `when` and `read` — the partial-read rules in
|
|
69
|
+
`../read-ladder.md`. `on-phase` is the default; `always` must be justified in the
|
|
70
|
+
release's findings; a `read:` names a HEADING and **never a line number**
|
|
71
|
+
(`/orc-doc` rule 2 — a stored line number is a wrong line number one edit later).
|
|
72
|
+
|
|
73
|
+
## What is here
|
|
74
|
+
|
|
75
|
+
| File | id | Layers | Lanes |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| `trace.md` | `trace` | `core` | every trace-owning lane (28) |
|
|
78
|
+
| `preflight.md` | `preflight` | `core`, `full` | the silent-probe lanes (15) |
|
|
79
|
+
| `stop-resume.md` | `stop-resume` | `core` | `orc`, `orc-wiki`, `orc-diy` |
|
|
80
|
+
|
|
81
|
+
`orc lane phases --all --json` is the authoritative list; this table is a
|
|
82
|
+
human index of it.
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phase — Analyst & plan gates (id: `analyst-gates`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
|
|
4
|
+
> private `references/`, and other lanes already reached across into it. Read
|
|
5
|
+
> by `orc`, `orc-analyze`, `orc-mini`. Layers declared: `core` only — single-
|
|
6
|
+
> layer because these are the orchestrator-side gates on a returned analysis
|
|
7
|
+
> or plan, and a trimmed lane runs fewer of them rather than different ones.
|
|
8
|
+
> `orc lane phases <lane> --json` names the file and the layers to read.
|
|
9
|
+
|
|
10
|
+
<!-- orc:layer core -->
|
|
11
|
+
## Reference — Analyst, Combiner & Plan Gates (orchestrator side)
|
|
2
12
|
|
|
3
13
|
The orchestrator's deterministic gates around the analyst, the
|
|
4
14
|
context-combiner, and the planner. The roles themselves are defined in
|
|
5
15
|
`../../orc-analyze/SKILL.md`, `../../context-combiner/SKILL.md`, and
|
|
6
|
-
|
|
16
|
+
`../../orc/subskills/orc-planner/SKILL.md` — this file is what YOU do around their
|
|
7
17
|
dispatches and returns. Load at Phase 0 (analyst dispatch) and Phase 1
|
|
8
18
|
(planner return). Emit a `GATE` trace line (pass|bounce) per check when
|
|
9
19
|
logging.
|
|
@@ -113,7 +123,7 @@ proceed-with-flagged.
|
|
|
113
123
|
- `new-surface` / `behavior-change` missing `skeleton` or `given_when_then`
|
|
114
124
|
→ miss.
|
|
115
125
|
- A disposition that DEVIATES from the derivation table in
|
|
116
|
-
|
|
126
|
+
`../../orc/schemas/planning-output.md` without a `reason` → miss. The derivation
|
|
117
127
|
is the default; departing from it is the thing that needs justifying.
|
|
118
128
|
|
|
119
129
|
Any miss → the plan is malformed: bounce it back to the planner WITH the miss
|
|
@@ -122,3 +132,5 @@ pre-v0.7.0 plan resumed from an old checkpoint has no `grounding[]`
|
|
|
122
132
|
(pre-v0.9.0: no `requirements[]`/`spec_invariants[]`; pre-v0.41.0: no
|
|
123
133
|
`disposition`) — resume it without the
|
|
124
134
|
missing checks; never bounce an old plan.
|
|
135
|
+
|
|
136
|
+
<!-- /orc:layer -->
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Phase — Execution (id: `execution`)
|
|
2
|
+
|
|
3
|
+
> **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
|
|
4
|
+
> this library at W13 when `orc-diy` became its second reader. A spine is loaded
|
|
5
|
+
> IN FULL when its skill activates; this is loaded when the phase fires, and most
|
|
6
|
+
> runs skip most phases.
|
|
7
|
+
>
|
|
8
|
+
> **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
|
|
9
|
+
> `composed` is what `orc diy compile` stitches — the same phase expressed as
|
|
10
|
+
> `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
|
|
11
|
+
> procedure. Reading the wrong one is the failure `README.md` names: a lane
|
|
12
|
+
> doing a phase its product promise says it does differently.
|
|
13
|
+
> `orc lane phases <lane> --json` names the layer for each lane.
|
|
14
|
+
|
|
15
|
+
<!-- orc:layer full -->
|
|
16
|
+
|
|
17
|
+
## Execution (load wave-grouping.md + log-protocol.md)
|
|
18
|
+
|
|
19
|
+
Emit `PHASE execution start`. Build the conflict graph from `declared_files` →
|
|
20
|
+
group waves (cap `max_wave_tasks`, mark `is_batch_pause` from `pause_schedule`;
|
|
21
|
+
waves are computed for BOTH dispatch styles — sequential fires a wave's tasks
|
|
22
|
+
one at a time, parallel fires them together) → SHOW the wave plan (wave → tasks →
|
|
23
|
+
pause marks) to the user BEFORE wave 1 → write checkpoint + state-of-play BEFORE
|
|
24
|
+
dispatching. **Boundary gate, per wave (`boundary_gate`; emit `BOUNDARY`):**
|
|
25
|
+
`warn` prints each task's verdict; `block` additionally LIFTS a REFUSE task out of
|
|
26
|
+
the wave — **the wave still runs the rest** — and hands it back with its checklist
|
|
27
|
+
plus the "not blocked for you" line (it gates ORC's dispatch, never an explicit
|
|
28
|
+
instruction). ESCALATE dispatches but gates ship on the named human, riding the
|
|
29
|
+
EXISTING pause machinery. An uncarded area is `unknown`, never REFUSE. **Pattern-resolve gate
|
|
30
|
+
(once, before the first wave):** resolve each tagged language per
|
|
31
|
+
`../../orc/references/pattern-gate.md` and report ONE user line per language (cache hit →
|
|
32
|
+
apply cached; miss → codify/agnostic per `pattern_findings`; learn → dispatch
|
|
33
|
+
the codifier); hold resolved patterns in run state.
|
|
34
|
+
|
|
35
|
+
**TDD red proof — PAIRED TASKS, not a Wave 0 (v0.41.0):** TDD tasks are ORDINARY planner-emitted tasks the impl task `depends_on`, so they wave and score like any other (mechanics in `wave-grouping.md`); no `new-surface`/`behavior-change` entries → no TDD task at all. Each materializes its skeletons into real FAILING tests and returns the red evidence; emit `TDD-RED task=<id> iter=0` per requirement.
|
|
36
|
+
**Pre-implementation green is read per `disposition`:** a `new-surface` entry that PASSES is a spec bug → block that requirement's dispatch and surface it; a `behavior-change` regression-guard passing is EXPECTED and blocks nothing; anything else → adjudicate with the user, recorded in `decisions`. Then per implementation wave:
|
|
37
|
+
1. Dispatch EVERY task as a spawned subagent (emit `DISPATCH <agent> :: <task>
|
|
38
|
+
expect=<model>/<effort>` BEFORE the Task call; subagent wrapper framing + the
|
|
39
|
+
task's INPUT SLICE per orc-execution/core.md + its scored model). Every
|
|
40
|
+
slice carries the task's `acceptance[]`, its `tdd_spec` tests (the executor
|
|
41
|
+
implements to green: implement→test→repair, cap `tdd_loop_max`, emitting
|
|
42
|
+
`TDD-RED`/`TDD-GREEN` per iteration; cap hit → STOP SEQUENCE + honest red
|
|
43
|
+
report) and the `house_rules` card lines
|
|
44
|
+
(`house-rules.md`, injected LITERALLY — read once per run, never
|
|
45
|
+
a pointer); FE/BE and `db:postgres` tasks get the resolved `pattern`
|
|
46
|
+
injected literally (pattern-gate.md), and — with `gotchas: on` — the
|
|
47
|
+
SCOPE-MATCHING gotchas beside it (glob vs this task's `declared_files`, cap 3,
|
|
48
|
+
highest `hits` first; zero matches = NO block, never an empty one — NEVER
|
|
49
|
+
inject unfiltered: `_shared/gotchas.md` §7).
|
|
50
|
+
**A FOREIGN task uses Bash, not the Task tool:** write the IDENTICAL slice to a
|
|
51
|
+
file and run `orc extra dispatch --task <file> --json` (exit codes + the
|
|
52
|
+
fallback procedure: `../extra-dispatch.md`). Append `via=extra:<profile>`
|
|
53
|
+
to the `DISPATCH` line and copy the return's `trace_line` + every
|
|
54
|
+
`trace_extras[]` entry VERBATIM into the packet — the CLI composes them, and the
|
|
55
|
+
hook emits NO `SPAWN`/`RETURN` for a foreign worker, so they are the whole record.
|
|
56
|
+
2. Record worker milestone pings (they bound what a mid-wave stop can save).
|
|
57
|
+
3. Collect returns; VALIDATE each (emit `VERIFY <task> actual=<model>/<effort>`
|
|
58
|
+
✅ MATCH / ⛔ DOWNGRADE per return — surface any downgrade to the user).
|
|
59
|
+
**A FOREIGN return runs `_shared/return-validation.md` §2b INSTEAD of §2** — it
|
|
60
|
+
has no injected model-id line, so it cannot carry `actual_model` and faking one
|
|
61
|
+
claims evidence that does not exist; ⛔ SUBSTITUTION replaces the downgrade
|
|
62
|
+
check. A failure runs the fallback procedure, which BEGINS with a free
|
|
63
|
+
`orc extra reconcile <task>` — a worktree that moved is RESUMED, never re-done
|
|
64
|
+
— then re-dispatches or STOPs, announced, with the `EXTRA fallback` line.
|
|
65
|
+
`needs_context` → adjudicate → re-slice
|
|
66
|
+
(cap 2 per task, then escalate). A `pattern` task must return
|
|
67
|
+
`invariants_checked: true` + the matching `pattern_version`. **Evidence
|
|
68
|
+
check:** `status=done` on a stack with a runnable build/test REQUIRES
|
|
69
|
+
`evidence` {command, exit_code, tail} — a missing block or false
|
|
70
|
+
`no_runner_detected` is malformed (requeue); `done` with non-empty
|
|
71
|
+
`unmet[]` is `partial`.
|
|
72
|
+
4. **Post-wave worktree audit (GATE, `_shared/return-validation.md` §6):** diff `git status --short` before/after the wave — a changed path in NO task's `declared_files`, INCLUDING one that became less modified (the revert signature), blocks the close until named and decided.
|
|
73
|
+
Overlap → `failure_reason: "file-collision:<file> with <agent>"`, requeue later wave.
|
|
74
|
+
5. Append worker `log_entries` to the decision log; regenerate the digest.
|
|
75
|
+
**Gotcha capture (`gotchas: on`):** a return that CLOSED a repair loop carries
|
|
76
|
+
`gotcha_recorded` (`_shared/return-validation.md` §7) — dedupe on
|
|
77
|
+
`symptom`+`scope` (a match bumps `hits`/`last_seen` and appends nothing), else
|
|
78
|
+
append the block to `.claude/orc/gotchas.md`. YOU write it, never a subagent;
|
|
79
|
+
a capped-and-stopped loop records NOTHING.
|
|
80
|
+
6. Update checkpoint + state-of-play; emit `OUTCOME task=<id> score=<n>
|
|
81
|
+
band=<range> model=<m> retries=<n> requeues=<n> needs_context=<n> unmet=<n>`
|
|
82
|
+
as each task closes.
|
|
83
|
+
7. **Wave-boundary gate (deterministic — NOT judgment):** after wave W, if the
|
|
84
|
+
wave's `is_batch_pause` is true (W in `pause_schedule`) AND a later wave
|
|
85
|
+
remains, emit `GATE wave-boundary :: wave=W of K → STOP (batch_pause_every=N)`
|
|
86
|
+
and run the MANDATORY STOP SEQUENCE — never dispatch wave W+1 past an
|
|
87
|
+
unacknowledged boundary. Token pressure → same STOP SEQUENCE (judgment).
|
|
88
|
+
Last wave closes → emit `PHASE execution end`. (stop-resume.md)
|
|
89
|
+
|
|
90
|
+
**User escalations:** relay question → broadcast answer to log; an answer that
|
|
91
|
+
invalidates a DONE task → re-run once, then set every reverse-`depends_on`
|
|
92
|
+
consumer to `stale_review`. **Worker failure/garbage/timeout:** flag +
|
|
93
|
+
continue the wave; audit and re-dispatch at the next batch checkpoint
|
|
94
|
+
(`requeued`, retry_count++). Hard retry cap 2 → STOP and surface.
|
|
95
|
+
|
|
96
|
+
<!-- /orc:layer -->
|
|
97
|
+
|
|
98
|
+
<!-- orc:layer composed -->
|
|
99
|
+
|
|
100
|
+
## Phase: Execution (waves)
|
|
101
|
+
|
|
102
|
+
Run execution exactly as the full lane's execution subskill defines it —
|
|
103
|
+
follow `.claude/skills/orc/subskills/orc-execution/SKILL.md` (slices
|
|
104
|
+
constructed by you, standing rules injected, evidence-bearing returns
|
|
105
|
+
validated against the contract) with these compiled overrides:
|
|
106
|
+
|
|
107
|
+
- Max parallel tasks per wave: **{{max_wave_tasks}}** (hard cap; overflow →
|
|
108
|
+
next wave; wave grouping per
|
|
109
|
+
`.claude/skills/_shared/phases/wave-grouping.md`).
|
|
110
|
+
- Stop-and-continue pause every **{{batch_pause_every}}** waves (checkpoint
|
|
111
|
+
confirmed BEFORE announcing any stop; resume per
|
|
112
|
+
`.claude/skills/_shared/phases/stop-resume.md`).
|
|
113
|
+
- Executor selection comes from this flow's scoring section above — never
|
|
114
|
+
from the shipped presets.
|
|
115
|
+
|
|
116
|
+
<!-- diy:when tdd=on -->
|
|
117
|
+
TDD execution: `tdd_spec` is SCOPED by each entry's `disposition` — only
|
|
118
|
+
`new-surface` and `behavior-change` get tests; `covered-by-existing` (cited
|
|
119
|
+
existing test) and `no-behavior` (constants, translation strings, docs, config)
|
|
120
|
+
get none, and a task with cited `risk[]` is never scoped out. A PAIRED TDD task
|
|
121
|
+
(never a Wave 0) materializes the remaining skeletons into real
|
|
122
|
+
FAILING tests (red proven before implementation; a `new-surface` pre-implementation
|
|
123
|
+
pass is a spec bug → block that requirement). Each implementation slice carries its
|
|
124
|
+
`tdd_spec`; executors implement to green (implement→test→repair, cap
|
|
125
|
+
`tdd_loop_max`; `TDD-RED`/`TDD-GREEN` per iteration) and return `tdd_state`
|
|
126
|
+
per `.claude/skills/_shared/return-validation.md` — including §6's worktree
|
|
127
|
+
delta: `git status --short` before/after each dispatch, any changed path
|
|
128
|
+
outside `declared_files` (a revert included) gates the wave close.
|
|
129
|
+
<!-- /diy:when -->
|
|
130
|
+
|
|
131
|
+
<!-- diy:when gotchas=on -->
|
|
132
|
+
Repair memory: probe `orc gotcha status` once at preflight (exit 0 = entries,
|
|
133
|
+
1 = none — never a `find`) and print one line either way. Inject the
|
|
134
|
+
SCOPE-MATCHING entries into each slice beside `pattern` — glob vs that task's
|
|
135
|
+
`declared_files`, cap 3, highest `hits` first; zero matches = NO block, never an
|
|
136
|
+
empty one, and NEVER unfiltered. A return that CLOSED a repair loop carries
|
|
137
|
+
`gotcha_recorded`; dedupe it on `symptom`+`scope` (a match bumps `hits` and
|
|
138
|
+
`last_seen`) and append it to `.claude/orc/gotchas.md` YOURSELF — a subagent never
|
|
139
|
+
writes that file, and a loop that hit its cap and stopped records nothing. Full
|
|
140
|
+
contract: `.claude/skills/_shared/gotchas.md`.
|
|
141
|
+
<!-- /diy:when -->
|
|
142
|
+
|
|
143
|
+
<!-- /orc:layer -->
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phase — House rules (id: `house-rules`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
|
|
4
|
+
> private `references/`, and other lanes already reached across into it. Read
|
|
5
|
+
> by `orc`, `orc-mini`, `orc-fast`, `orc-quick`, `orc-doc`. Layers declared:
|
|
6
|
+
> `core` only — single-layer because it is a standing card injected VERBATIM
|
|
7
|
+
> into a slice — a layered card would be a different card. `orc lane phases
|
|
8
|
+
> <lane> --json` names the file and the layers to read.
|
|
9
|
+
|
|
10
|
+
<!-- orc:layer core -->
|
|
11
|
+
## ORC House Rules (standing behavioral card)
|
|
2
12
|
|
|
3
13
|
Injected LITERALLY into every executor slice as `house_rules` — never a file
|
|
4
14
|
pointer. Keep the card ≤ 10 lines: it rides in EVERY dispatch, so every
|
|
@@ -18,3 +28,5 @@ HOUSE RULES (standing, apply to every change):
|
|
|
18
28
|
6. An honest partial beats a false done — report what's unmet, never round up.
|
|
19
29
|
7. Never revert, discard or rewrite files you did not write — `git checkout/restore/reset/stash/clean` are forbidden in your slice; an impossible assertion is `unmet`, never something to make true.
|
|
20
30
|
<!-- card-end -->
|
|
31
|
+
|
|
32
|
+
<!-- /orc:layer -->
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phase — Intake (id: `intake`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
|
|
4
|
+
> private `references/`, and other lanes already reached across into it. Read
|
|
5
|
+
> by `orc`, `orc-mini`, `orc-diy`, `orc-challenge`. Layers: `core` and `full`
|
|
6
|
+
> — `core` is the intake procedure every lane runs; `full` is /orc's own Phase
|
|
7
|
+
> 0, which adds the analyst branch, the poly-spec split-and-STOP and the run-
|
|
8
|
+
> folder open. `orc lane phases <lane> --json` names the file and the layers
|
|
9
|
+
> to read.
|
|
10
|
+
|
|
11
|
+
<!-- orc:layer core -->
|
|
12
|
+
## Reference — Phase 0 Intake
|
|
2
13
|
|
|
3
14
|
Goal: extract just enough that the intent-spec can't be misread, then get out of
|
|
4
15
|
the way. A wrong understanding parallelized is worse than a wrong understanding
|
|
@@ -7,7 +18,7 @@ done serially. Never interrogate; never ask what the repo can tell you.
|
|
|
7
18
|
**Before anything — plan-input trigger (see `plan-handoff.md`):** if the run
|
|
8
19
|
input IS a plan (pasted planning-output, a `plan-{name}.md` path, or an
|
|
9
20
|
`orc/planner/{name}/` checkpoint), do NOT run intake — switch to the plan-handoff
|
|
10
|
-
entry contract (`
|
|
21
|
+
entry contract (`plan-handoff.md`): bootstrap the trace, schema-
|
|
11
22
|
validate, apply the `plan_head` staleness valve, re-run the full Phase 1 exit
|
|
12
23
|
gate in this session, relay `open_questions[]`, then continue at Phase 2. A plain
|
|
13
24
|
prose request is not a plan — run intake normally.
|
|
@@ -118,3 +129,5 @@ showing unless the user objects.
|
|
|
118
129
|
When resuming a run in a fresh session, show a ONE-LINE reconfirm of the
|
|
119
130
|
intent-spec's scope ("Resuming: <one-line scope>. Still correct?") before
|
|
120
131
|
continuing. Catches requirements that changed between sessions, costs one line.
|
|
132
|
+
|
|
133
|
+
<!-- /orc:layer -->
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Phase — Mock example + drift recovery (id: `mock-example`)
|
|
2
|
+
|
|
3
|
+
> **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
|
|
4
|
+
> this library at W13 when `orc-diy` became its second reader. A spine is loaded
|
|
5
|
+
> IN FULL when its skill activates; this is loaded when the phase fires, and most
|
|
6
|
+
> runs skip most phases.
|
|
7
|
+
>
|
|
8
|
+
> **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
|
|
9
|
+
> `composed` is what `orc diy compile` stitches — the same phase expressed as
|
|
10
|
+
> `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
|
|
11
|
+
> procedure. Reading the wrong one is the failure `README.md` names: a lane
|
|
12
|
+
> doing a phase its product promise says it does differently.
|
|
13
|
+
> `orc lane phases <lane> --json` names the layer for each lane.
|
|
14
|
+
|
|
15
|
+
<!-- orc:layer full -->
|
|
16
|
+
|
|
17
|
+
## Mock example + drift recovery (config `mock_example`)
|
|
18
|
+
|
|
19
|
+
Load `../drift-recovery.md` (canonical). Only after a GREEN Phase 6,
|
|
20
|
+
before ship: `ask` (default) → the offer is MANDATORY (never silently skipped,
|
|
21
|
+
never silently run); `on` → build; `off` → skip. Deliverable:
|
|
22
|
+
`mock-examples/<change-slug>/` at the project root (`EXAMPLE.md` + one minimal
|
|
23
|
+
runnable artifact; mocked inputs only) — **NEVER committed**. After the user
|
|
24
|
+
runs it, ONE question: matches expectation? [yes / drift: <describe>]. On
|
|
25
|
+
drift → `DRIFT-FROM` handoff → analyze-mini gap analysis → mini planner patch
|
|
26
|
+
plan → scored dispatch → re-verify → re-offer; **hard cap 2 loops**, then an
|
|
27
|
+
honest unresolved report. Emit `DRIFT loop=<n>` per loop; end-of-phase packet.
|
|
28
|
+
|
|
29
|
+
<!-- /orc:layer -->
|
|
30
|
+
|
|
31
|
+
<!-- orc:layer composed -->
|
|
32
|
+
|
|
33
|
+
## Phase: Mock example (after a green verify, before ship)
|
|
34
|
+
|
|
35
|
+
<!-- diy:when mock_example=off -->
|
|
36
|
+
The mock-example phase is DISABLED in this flow. Skip silently.
|
|
37
|
+
<!-- /diy:when -->
|
|
38
|
+
<!-- diy:when mock_example=ask -->
|
|
39
|
+
After the verify/smoke gate is GREEN and BEFORE any ship action, the offer is
|
|
40
|
+
MANDATORY (never silently skipped, never silently run): follow
|
|
41
|
+
`.claude/skills/_shared/drift-recovery.md` — build
|
|
42
|
+
`mock-examples/<change-slug>/` (EXAMPLE.md + one minimal runnable mocked
|
|
43
|
+
artifact) only on a yes. After the user runs it, ask the one drift question;
|
|
44
|
+
on drift run the `DRIFT-FROM` recovery loop (hard cap 2, then an honest
|
|
45
|
+
unresolved report). `mock-examples/` is NEVER staged by the ship phase.
|
|
46
|
+
<!-- /diy:when -->
|
|
47
|
+
<!-- diy:when mock_example=on -->
|
|
48
|
+
After the verify/smoke gate is GREEN and BEFORE any ship action, build the
|
|
49
|
+
mocked example without asking, per
|
|
50
|
+
`.claude/skills/_shared/drift-recovery.md`: `mock-examples/<change-slug>/`
|
|
51
|
+
(EXAMPLE.md + one minimal runnable mocked artifact; mocked inputs only). Then
|
|
52
|
+
ask the one drift question; on drift run the `DRIFT-FROM` recovery loop (hard
|
|
53
|
+
cap 2). `mock-examples/` is NEVER staged by the ship phase.
|
|
54
|
+
<!-- /diy:when -->
|
|
55
|
+
|
|
56
|
+
<!-- /orc:layer -->
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phase — Plan handoff (id: `plan-handoff`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
|
|
4
|
+
> private `references/`, and another lane already reached across into it. Read
|
|
5
|
+
> by `orc`, `orc-route`. Layers declared: `core` only — single-layer because
|
|
6
|
+
> executing a plan another session wrote is the same procedure wherever it is
|
|
7
|
+
> done, and /orc-route reads it to DEFINE what a plan is (v0.42.0 — a second
|
|
8
|
+
> definition is drift the lint cannot see). `orc lane phases <lane> --json`
|
|
9
|
+
> names the file and the layers to read.
|
|
10
|
+
|
|
11
|
+
<!-- orc:layer core -->
|
|
12
|
+
## Reference — Plan Handoff (executing a plan from another session)
|
|
2
13
|
|
|
3
14
|
The entry contract for the case ORC had no defined path for: **the run input
|
|
4
15
|
IS a plan**, not a request. A plan was produced in one session (or saved to a
|
|
5
|
-
file) and handed to a fresh session to build. Load `
|
|
16
|
+
file) and handed to a fresh session to build. Load `plan-handoff.md`
|
|
6
17
|
at Phase 0 the moment you recognise a plan input; it turns a pasted plan into a
|
|
7
18
|
real ORC run instead of an ad-hoc task-by-task improvisation.
|
|
8
19
|
|
|
@@ -36,7 +47,7 @@ Do these IN ORDER before any dispatch. Skipping any step is a protocol
|
|
|
36
47
|
violation.
|
|
37
48
|
|
|
38
49
|
1. **This IS a run — bootstrap it.** Load the spine (`orc/SKILL.md`) and
|
|
39
|
-
|
|
50
|
+
`../../_shared/phases/trace.md`; create `log_dir`, write `log_dir/.current` =
|
|
40
51
|
`run-orc-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
|
|
41
52
|
in the SAME step (both, or neither — a pointer naming a file that does not
|
|
42
53
|
exist is what splits a run across two files), store `trace_path` in the
|
|
@@ -82,3 +93,5 @@ violation.
|
|
|
82
93
|
- **Not** a poly-spec path. A poly-spec (`orc-poly:spec`) is split-and-STOP at
|
|
83
94
|
Phase 1 (see SKILL.md) — that is a different input than a per-repo
|
|
84
95
|
planning-output handed here to build.
|
|
96
|
+
|
|
97
|
+
<!-- /orc:layer -->
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Phase — Planning (id: `planning`)
|
|
2
|
+
|
|
3
|
+
> **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
|
|
4
|
+
> this library at W13 when `orc-diy` became its second reader. A spine is loaded
|
|
5
|
+
> IN FULL when its skill activates; this is loaded when the phase fires, and most
|
|
6
|
+
> runs skip most phases.
|
|
7
|
+
>
|
|
8
|
+
> **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
|
|
9
|
+
> `composed` is what `orc diy compile` stitches — the same phase expressed as
|
|
10
|
+
> `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
|
|
11
|
+
> procedure. Reading the wrong one is the failure `README.md` names: a lane
|
|
12
|
+
> doing a phase its product promise says it does differently.
|
|
13
|
+
> `orc lane phases <lane> --json` names the layer for each lane.
|
|
14
|
+
|
|
15
|
+
<!-- orc:layer full -->
|
|
16
|
+
|
|
17
|
+
## Planning
|
|
18
|
+
|
|
19
|
+
Emit `PHASE planning start`, then emit ONE `CONFIG <key=value …>` line with the
|
|
20
|
+
resolved values of every config key this run will consume (ALWAYS `opus5_only` — it selects the executor table AND every fixed role, so retro can segment per-band outcomes BY dispatch mode) — the runtime
|
|
21
|
+
proof `/orc-retro` audits that the run honored the config.
|
|
22
|
+
**Wiki consult (load `wiki-consult.md`;
|
|
23
|
+
always report — no tier is silent):** read the FRESH/AGING/STALE tier from
|
|
24
|
+
**`orc wiki status`** (v0.41.0 — deterministic; never hand-compute it from `wiki-meta.json`), pull the relevant pages (incl. cross-cutting maps like `orc-reference-api-surface`), apply
|
|
25
|
+
`code > fresh wiki > stale wiki (hints) > model priors`, emit
|
|
26
|
+
`WIKI-CONSULT <tier> :: docs=<pages>`, print the one-line tier report (every tier, `absent` included), and attribute per-dispatch too — `wiki:` on the `DISPATCH` line + a `wiki_used` return (wiki-consult.md Step 5). **Crosslink:** per wiki-consult.md, inject
|
|
27
|
+
the cached `.claude/orc/crosslink/needs.json` contract into any boundary-touching
|
|
28
|
+
task (advisory) and print + emit `CROSSLINK <state> :: boundaries=<n> peers=<names>`
|
|
29
|
+
— `configured-no-cache` prints the "cache not built" warning (full orc reads
|
|
30
|
+
only pre-built needs/cache, never peer source live). **Gotchas (repair memory,
|
|
31
|
+
config `gotchas`):** probe ONCE with `orc gotcha status` (exit 0 = entries exist,
|
|
32
|
+
1 = none — never a `find`); canonical `_shared/gotchas.md`.
|
|
33
|
+
**Pact / boundary / aftermath / wiki debt (v0.46.0 — all CONSUMED here, never
|
|
34
|
+
written here):** probe `orc pact status --json` (`pact_gate`, default `warn`),
|
|
35
|
+
`orc boundary status --json` (`boundary_gate`, default `warn`), `orc wiki debt
|
|
36
|
+
--json`, and — only to decide whether the preflight's `after:` line fires at all —
|
|
37
|
+
`orc aftermath status --json`. Print each probe's own `line` VERBATIM; never
|
|
38
|
+
recount or re-word one. Gates: `../../orc-pact/references/gate.md` +
|
|
39
|
+
`../../orc-boundary/references/gate.md`. **Challenge (v0.47.0, `challenge_gate`,
|
|
40
|
+
default `warn`):** when the run's INPUT DOCUMENT has a cycle, print
|
|
41
|
+
`orc challenge status <slug> --json`'s `preflight_line` verbatim — building from
|
|
42
|
+
a document that has not passed its own review is worth one line. There is no
|
|
43
|
+
`block` mode (the `/orc-pact` precedent). **Extra (v0.50.0, `extra_enabled`) —
|
|
44
|
+
resolved HERE, announced HERE, never silent:** load `../extra-dispatch.md`;
|
|
45
|
+
per task run `orc extra resolve <score> --role executor --risk <n> --json`, and
|
|
46
|
+
before wave 1 settle its two pre-dispatch states, both PRINTED — a `needs_reping`
|
|
47
|
+
profile (re-ping; a STALE profile still routes) and a vaulted credential, which is
|
|
48
|
+
**LOCKED AT DISPATCH TIME whatever `credential.present` says** and falls back to
|
|
49
|
+
Claude rather than stopping the run. **Preflight:** print the compact block per
|
|
50
|
+
`../../orc/references/preflight-report.md` once wiki + crosslink (+ pattern/waves) resolve.
|
|
51
|
+
|
|
52
|
+
Ask which planner: **Superpowers / OpenSpec / Requirement Planner / ORC
|
|
53
|
+
(self)**. With an analyst requirement-spec present, the Requirement Planner
|
|
54
|
+
is the natural choice (consumes the spec; does NOT re-question scope); apply
|
|
55
|
+
the `git_head` staleness valve first (analyst-gates.md). Dispatch the planner
|
|
56
|
+
as a subagent — never plan yourself.
|
|
57
|
+
|
|
58
|
+
**CRITICAL — planning always hands back here.** However a plan was produced,
|
|
59
|
+
control returns to THIS orchestrator, which runs Phase 2 → 3 → … → 8 — never
|
|
60
|
+
jump from a plan straight to implementation. **ONE exception — a poly-spec
|
|
61
|
+
(`orc-poly:spec`, from `/orc-poly`):** the planner runs poly-split mode (one
|
|
62
|
+
plan per repo, each pinned to the frozen contract, each written into its own
|
|
63
|
+
repo); present the per-repo plans + build handoff and STOP — a poly-spec is the
|
|
64
|
+
only input that does NOT proceed to Phase 2 (each repo builds later, in its own
|
|
65
|
+
`/orc` session). The plan must satisfy
|
|
66
|
+
`../../orc/schemas/planning-output.md` (per-task `declared_files` incl. tests,
|
|
67
|
+
`grounding[]`, `acceptance[]`, `requirements[]`, `spec_invariants[]`,
|
|
68
|
+
`depends_on`, `owns_area`, `spec_ref`, + a `coverage` echo, + `tdd_spec` —
|
|
69
|
+
TDD is ALWAYS ON in full orc/ultra but **SCOPED to what can actually fail (v0.41.0)**: a `disposition` per entry (`new-surface | behavior-change | covered-by-existing | no-behavior | no-runner`) DERIVED from the planner's facets — constants/translations/file-splits get NO test, a cited `risk[]` is never scoped out, and a PAIRED task materializes it, never a Wave 0 (schema notes 7-8; gate check 5);
|
|
70
|
+
missing declared files → extract and confirm before leaving this phase.
|
|
71
|
+
|
|
72
|
+
**Phase 1 exit gate** (deterministic — full checks in analyst-gates.md; emit
|
|
73
|
+
`GATE` lines): Glob every `disposition: exists` path, recompute coverage (no
|
|
74
|
+
`orphan` requirements), cycle + same-file collision checks. Any miss →
|
|
75
|
+
bounce to the planner (one retry), then escalate. **After the gate passes,
|
|
76
|
+
relay the plan's `open_questions[]` in ONE batch:** blocking questions must be
|
|
77
|
+
answered before Phase 2; non-blocking show their `proposed_default` for tacit
|
|
78
|
+
approval. **Step-back valve:** `plan_confidence: low` OR >3 blocking questions →
|
|
79
|
+
recommend stepping back to `orc-analyze` (user may override and proceed).
|
|
80
|
+
**Pact injection (`pact_gate: warn`) — the payoff, and it happens HERE:** a
|
|
81
|
+
DRIFTED or BROKEN promise whose `anchors` intersect a task's `declared_files` is
|
|
82
|
+
appended VERBATIM to that task's `constraints[]` (the `spec_invariants[]`
|
|
83
|
+
channel — no new plumbing) and PRINTED per task. HOLDING entries are never
|
|
84
|
+
injected. Last month's decision constrains this month's plan, automatically. On
|
|
85
|
+
pass, emit `PHASE planning end`.
|
|
86
|
+
|
|
87
|
+
**Then print the `forecast:` block, BEFORE the Phase-2 pause question**
|
|
88
|
+
(`../../orc/references/preflight-report.md`) — tasks · waves · estimated subagents · model
|
|
89
|
+
mix · a measured time RANGE · one cheaper lane and what it costs. This is the
|
|
90
|
+
earliest instant every number is real and the last cheap moment to walk away.
|
|
91
|
+
Presentation only, no new probes. When `config.run_budget_dispatches` > 0 and the
|
|
92
|
+
forecast exceeds it, this is a **hard stop** with the batch pause's discipline
|
|
93
|
+
(`GATE budget stop`) offering proceed · cheaper lane · re-plan smaller — never
|
|
94
|
+
dispatch wave 1 past it.
|
|
95
|
+
|
|
96
|
+
<!-- /orc:layer -->
|
|
97
|
+
|
|
98
|
+
<!-- orc:layer composed -->
|
|
99
|
+
|
|
100
|
+
## Phase: Planning
|
|
101
|
+
|
|
102
|
+
<!-- diy:when planning=auto -->
|
|
103
|
+
Route planning exactly as the full lane does — Superpowers plan, OpenSpec
|
|
104
|
+
change, or ORC's own planner, chosen by what exists in the project. Follow
|
|
105
|
+
`.claude/skills/orc/subskills/orc-planner/SKILL.md` for the own-planner path
|
|
106
|
+
and validate the planning output against
|
|
107
|
+
`.claude/skills/orc/schemas/planning-output.md`.
|
|
108
|
+
<!-- /diy:when -->
|
|
109
|
+
<!-- diy:when planning=own-planner -->
|
|
110
|
+
Always use ORC's own Requirement Planner, even when Superpowers/OpenSpec
|
|
111
|
+
artifacts exist: follow `.claude/skills/orc/subskills/orc-planner/SKILL.md`
|
|
112
|
+
and validate the planning output against
|
|
113
|
+
`.claude/skills/orc/schemas/planning-output.md`.
|
|
114
|
+
<!-- /diy:when -->
|
|
115
|
+
<!-- diy:when planning=superpowers -->
|
|
116
|
+
Plan via Superpowers: require a Superpowers-written plan as planning input
|
|
117
|
+
(ask the user to produce one if absent), then convert it to ORC planning
|
|
118
|
+
output validated against `.claude/skills/orc/schemas/planning-output.md` —
|
|
119
|
+
same conversion the full lane applies on its Superpowers route.
|
|
120
|
+
<!-- /diy:when -->
|
|
121
|
+
<!-- diy:when planning=openspec -->
|
|
122
|
+
Plan via OpenSpec: require an OpenSpec change as planning input (ask the user
|
|
123
|
+
to produce one if absent), then convert it to ORC planning output validated
|
|
124
|
+
against `.claude/skills/orc/schemas/planning-output.md` — same conversion the
|
|
125
|
+
full lane applies on its OpenSpec route.
|
|
126
|
+
<!-- /diy:when -->
|
|
127
|
+
<!-- diy:when tdd=on -->
|
|
128
|
+
TDD is ON for this flow: the plan must carry a `tdd_spec` per requirement
|
|
129
|
+
(given/when/then + a runnable skeleton in the project's test framework, or
|
|
130
|
+
`tdd: exempt — <reason>`; schema in
|
|
131
|
+
`.claude/skills/orc/schemas/planning-output.md`). No test runner in the
|
|
132
|
+
project → whole-run exemption, stated once at preflight.
|
|
133
|
+
<!-- /diy:when -->
|
|
134
|
+
|
|
135
|
+
<!-- /orc:layer -->
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Phase — Preflight (id: `preflight`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** New at v1.0.0 W11, distilled from the eleven lane preflight
|
|
4
|
+
> sections that had independently converged on the same four steps in the same
|
|
5
|
+
> order. Layers: `core` (every lane with a silent preflight) and `full`
|
|
6
|
+
> (`/orc` and `/orc-ultra`, whose preflight also PRINTS a report).
|
|
7
|
+
>
|
|
8
|
+
> **What is NOT here:** the probes themselves. Which artifacts a lane probes, and
|
|
9
|
+
> which config keys it reads, are the lane's own — they are in the lane's spine
|
|
10
|
+
> and in `orc lane config <lane> --json`. This file is the SHAPE: the order, and
|
|
11
|
+
> the four rules that make the shape worth having.
|
|
12
|
+
|
|
13
|
+
<!-- orc:layer core -->
|
|
14
|
+
|
|
15
|
+
## The order is the contract
|
|
16
|
+
|
|
17
|
+
Four steps, always in this order, and a lane adds its own probes to step 3 —
|
|
18
|
+
never a fifth step before step 2.
|
|
19
|
+
|
|
20
|
+
1. **Config.** Resolve every key this lane reads through **one** resolver:
|
|
21
|
+
`orc lane config <lane> --json`. Never merge `.claude/orc.config.yaml`
|
|
22
|
+
yourself. Print every line of `announce[]` VERBATIM — *a shadowed setting must
|
|
23
|
+
never be silent*, and a lane that resolves silently cannot tell the user why
|
|
24
|
+
the thing they configured did not happen. Precedence, gates, inertness and the
|
|
25
|
+
CLI-absent floor are all in `../config-precedence.md`.
|
|
26
|
+
|
|
27
|
+
2. **Trace.** Write `log_dir/.current` = `run-<lane>-<slug>-<DDMMYY>-<HHMMSS>.txt`
|
|
28
|
+
AND `touch the trace file` of that name in the SAME step. **Both, or neither.**
|
|
29
|
+
A pointer naming a file that does not exist is indistinguishable from a
|
|
30
|
+
dangling one — that split fifteen graded runs across two files each. The rest
|
|
31
|
+
of the protocol is `trace.md`.
|
|
32
|
+
|
|
33
|
+
3. **Probes.** Use `../detecting-artifacts.md` — **never a raw `find`**, because
|
|
34
|
+
`.claude/` is hidden and a filesystem search false-negatives a real artifact
|
|
35
|
+
from the wrong CWD. Every probe is a documented exit-code contract, listed
|
|
36
|
+
once in `orc lane calls <lane>`. Treat a positive probe as the source of truth
|
|
37
|
+
and never second-guess it.
|
|
38
|
+
|
|
39
|
+
4. **One line each.** Print one line per probe, per resolved gate, per tier.
|
|
40
|
+
**A probe whose answer is silent is a probe that gets skipped** — by the next
|
|
41
|
+
maintainer, and eventually by the model. An empty result is an ANSWER and
|
|
42
|
+
still gets its line.
|
|
43
|
+
|
|
44
|
+
## The four rules
|
|
45
|
+
|
|
46
|
+
- **Preflight is SILENT in the sense that it asks nothing** — it prints, it never
|
|
47
|
+
interviews. A question in preflight is a question asked before the lane knows
|
|
48
|
+
enough to ask it well.
|
|
49
|
+
- **Nothing here stops a run unless the lane's own spine says it does.** Most
|
|
50
|
+
lanes treat missing knowledge as a helpful extra: it means more of the work is
|
|
51
|
+
a question instead of a lookup. `/orc-fast` is the exception, and it says so.
|
|
52
|
+
- **ONCE per run** (`/orc-quick`: once per session). A preflight that re-runs is
|
|
53
|
+
a preflight nobody reads.
|
|
54
|
+
- **An exit code is an answer, not a failure.** `orc pact status` exit 3 is "no
|
|
55
|
+
ledger yet, this is a first run"; `orc gotcha status` exit 1 is an empty
|
|
56
|
+
ledger. Say what it means, not that it failed.
|
|
57
|
+
|
|
58
|
+
<!-- /orc:layer -->
|
|
59
|
+
|
|
60
|
+
<!-- orc:layer full -->
|
|
61
|
+
|
|
62
|
+
## `/orc` and `/orc-ultra` — preflight also REPORTS
|
|
63
|
+
|
|
64
|
+
The full lane's preflight does everything in `core` and then prints the
|
|
65
|
+
**preflight report**: tasks · waves · estimated subagents · model mix · the wiki
|
|
66
|
+
tier · the resolved pattern · crosslink state · the pause schedule · the run
|
|
67
|
+
budget. That format, its `GATE budget stop|pass` line and the FLOOR rule (repairs
|
|
68
|
+
push the real count up, never down) live in the `orc` skill's own
|
|
69
|
+
`references/preflight-report.md` — read it relative to that skill. It has ONE
|
|
70
|
+
consumer, so it stays home rather than moving here.
|
|
71
|
+
|
|
72
|
+
A trimmed lane must **not** read that file. `orc-mini` and `orc-fast` print their
|
|
73
|
+
resolved lines and go; there is no forecast to report because there are no waves
|
|
74
|
+
to forecast.
|
|
75
|
+
|
|
76
|
+
<!-- /orc:layer -->
|