@azure-id/orc 1.7.0 → 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.
- package/CHANGELOG.md +3649 -3339
- package/README-id.md +923 -844
- package/README.md +836 -860
- package/bin/build-agents.js +43 -27
- package/bin/cli.js +701 -3
- package/bin/graph-extract.js +927 -0
- package/bin/graph-notes.js +188 -0
- package/bin/graph-query.js +808 -0
- package/bin/graph-resolve.js +178 -0
- package/bin/graph-signals.js +277 -0
- package/bin/graph.js +605 -0
- package/bin/verify-contracts.js +4669 -4527
- package/bin/verify-package.js +626 -616
- package/bin/webui/api.js +1419 -1414
- package/bin/webui/fixtures/index.js +579 -576
- package/bin/webui/fixtures/knowledge.js +316 -291
- package/bin/webui/i18n/en/knowledge.json +167 -151
- package/bin/webui/i18n/en/overview.json +101 -100
- package/bin/webui/i18n/id/knowledge.json +167 -151
- package/bin/webui/i18n/id/overview.json +101 -100
- package/bin/webui/js/panels/knowledge.js +1065 -1006
- package/bin/webui/js/panels/overview.js +492 -488
- package/package.json +39 -39
- package/templates/agents/MODEL-MAPPING.md +163 -158
- package/templates/agents/orc-executor-haiku-4-5.md +133 -113
- package/templates/agents/orc-executor-opus-4-7-high.md +134 -114
- package/templates/agents/orc-executor-opus-4-7-med.md +134 -114
- package/templates/agents/orc-executor-opus-4-8-high.md +134 -114
- package/templates/agents/orc-executor-opus-5-high.md +134 -114
- package/templates/agents/orc-executor-opus-5-low.md +134 -114
- package/templates/agents/orc-executor-opus-5-med.md +134 -114
- package/templates/agents/orc-executor-sonnet-4-6-high.md +134 -114
- package/templates/agents/orc-executor-sonnet-4-6-med.md +134 -114
- package/templates/agents/orc-executor-sonnet-5-high.md +134 -114
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +86 -0
- package/templates/hooks/README.md +444 -396
- package/templates/hooks/orc-graph-hook.js +336 -0
- package/templates/hooks/orc-statusline-render.js +922 -921
- package/templates/hooks/orc-statusline.js +1596 -1545
- package/templates/skills/_shared/README.md +4 -0
- package/templates/skills/_shared/code-graph.md +220 -0
- package/templates/skills/_shared/extra-dispatch.md +1 -1
- package/templates/skills/_shared/opus5-only.md +4 -0
- package/templates/skills/_shared/phases/execution.md +166 -145
- package/templates/skills/_shared/phases/planning.md +142 -135
- package/templates/skills/_shared/phases/preflight.md +132 -118
- package/templates/skills/_shared/phases/review.md +63 -53
- package/templates/skills/_shared/phases/rules.md +5 -0
- package/templates/skills/_shared/phases/ship.md +96 -88
- package/templates/skills/_shared/phases/trace.md +6 -0
- package/templates/skills/_shared/phases/wiki-consult.md +194 -189
- package/templates/skills/_shared/read-ladder.md +124 -102
- package/templates/skills/_shared/return-validation.md +259 -250
- package/templates/skills/orc/SKILL.md +255 -254
- package/templates/skills/orc/references/preflight-report.md +6 -0
- package/templates/skills/orc/subskills/orc-execution/SKILL.md +2 -1
- package/templates/skills/orc/subskills/orc-execution/core.md +9 -1
- package/templates/skills/orc-diy/references/flow-schema.md +101 -100
- package/templates/skills/orc-fast/SKILL.md +236 -229
- package/templates/skills/orc-mini/SKILL.md +267 -259
- package/templates/skills/orc-quick/SKILL.md +378 -360
- package/templates/skills/orc-quick/references/dispatch-gate.md +6 -0
- package/templates/skills/orc-wiki/references/staleness.md +294 -288
|
@@ -1,135 +1,142 @@
|
|
|
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
|
-
**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`orc
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
`
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
`
|
|
74
|
-
`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<!-- diy:when planning=
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
<!-- diy:when
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
<!-- diy:when
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
<!-- diy:when
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
`.claude/skills/orc/schemas/planning-output.md`
|
|
132
|
-
|
|
133
|
-
<!-- /diy:when -->
|
|
134
|
-
|
|
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
|
+
**Code graph (`../code-graph.md` §7):** with the graph on, run
|
|
34
|
+
`orc graph impact <candidate declared_files> --if-enabled --json` and hand its
|
|
35
|
+
callers to the planner — they sharpen `declared_files` and the `fan` and risk
|
|
36
|
+
facets. Also run `orc graph cochange <each candidate file> --if-enabled --json`:
|
|
37
|
+
it answers "what else will I have to touch" from HISTORY, which a static edge
|
|
38
|
+
cannot see. Co-change is a HINT about people, never a dependency — exit 4 means
|
|
39
|
+
this file changes alone, which is an answer. Exit 3 or 4 → plan exactly as before.
|
|
40
|
+
**Pact / boundary / aftermath / wiki debt (v0.46.0 — all CONSUMED here, never
|
|
41
|
+
written here):** probe `orc pact status --json` (`pact_gate`, default `warn`),
|
|
42
|
+
`orc boundary status --json` (`boundary_gate`, default `warn`), `orc wiki debt
|
|
43
|
+
--json`, and — only to decide whether the preflight's `after:` line fires at all —
|
|
44
|
+
`orc aftermath status --json`. Print each probe's own `line` VERBATIM; never
|
|
45
|
+
recount or re-word one. Gates: `../../orc-pact/references/gate.md` +
|
|
46
|
+
`../../orc-boundary/references/gate.md`. **Challenge (v0.47.0, `challenge_gate`,
|
|
47
|
+
default `warn`):** when the run's INPUT DOCUMENT has a cycle, print
|
|
48
|
+
`orc challenge status <slug> --json`'s `preflight_line` verbatim — building from
|
|
49
|
+
a document that has not passed its own review is worth one line. There is no
|
|
50
|
+
`block` mode (the `/orc-pact` precedent). **Extra (v0.50.0, `extra_enabled`) —
|
|
51
|
+
resolved HERE, announced HERE, never silent:** load `../extra-dispatch.md`;
|
|
52
|
+
per task run `orc extra resolve <score> --role executor --risk <n> --json`, and
|
|
53
|
+
before wave 1 settle its two pre-dispatch states, both PRINTED — a `needs_reping`
|
|
54
|
+
profile (re-ping; a STALE profile still routes) and a vaulted credential, which is
|
|
55
|
+
**LOCKED AT DISPATCH TIME whatever `credential.present` says** and falls back to
|
|
56
|
+
Claude rather than stopping the run. **Preflight:** print the compact block per
|
|
57
|
+
`../../orc/references/preflight-report.md` once wiki + crosslink (+ pattern/waves) resolve.
|
|
58
|
+
|
|
59
|
+
Ask which planner: **Superpowers / OpenSpec / Requirement Planner / ORC
|
|
60
|
+
(self)**. With an analyst requirement-spec present, the Requirement Planner
|
|
61
|
+
is the natural choice (consumes the spec; does NOT re-question scope); apply
|
|
62
|
+
the `git_head` staleness valve first (analyst-gates.md). Dispatch the planner
|
|
63
|
+
as a subagent — never plan yourself.
|
|
64
|
+
|
|
65
|
+
**CRITICAL — planning always hands back here.** However a plan was produced,
|
|
66
|
+
control returns to THIS orchestrator, which runs Phase 2 → 3 → … → 8 — never
|
|
67
|
+
jump from a plan straight to implementation. **ONE exception — a poly-spec
|
|
68
|
+
(`orc-poly:spec`, from `/orc-poly`):** the planner runs poly-split mode (one
|
|
69
|
+
plan per repo, each pinned to the frozen contract, each written into its own
|
|
70
|
+
repo); present the per-repo plans + build handoff and STOP — a poly-spec is the
|
|
71
|
+
only input that does NOT proceed to Phase 2 (each repo builds later, in its own
|
|
72
|
+
`/orc` session). The plan must satisfy
|
|
73
|
+
`../../orc/schemas/planning-output.md` (per-task `declared_files` incl. tests,
|
|
74
|
+
`grounding[]`, `acceptance[]`, `requirements[]`, `spec_invariants[]`,
|
|
75
|
+
`depends_on`, `owns_area`, `spec_ref`, + a `coverage` echo, + `tdd_spec` —
|
|
76
|
+
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);
|
|
77
|
+
missing declared files → extract and confirm before leaving this phase.
|
|
78
|
+
|
|
79
|
+
**Phase 1 exit gate** (deterministic — full checks in analyst-gates.md; emit
|
|
80
|
+
`GATE` lines): Glob every `disposition: exists` path, recompute coverage (no
|
|
81
|
+
`orphan` requirements), cycle + same-file collision checks. Any miss →
|
|
82
|
+
bounce to the planner (one retry), then escalate. **After the gate passes,
|
|
83
|
+
relay the plan's `open_questions[]` in ONE batch:** blocking questions must be
|
|
84
|
+
answered before Phase 2; non-blocking show their `proposed_default` for tacit
|
|
85
|
+
approval. **Step-back valve:** `plan_confidence: low` OR >3 blocking questions →
|
|
86
|
+
recommend stepping back to `orc-analyze` (user may override and proceed).
|
|
87
|
+
**Pact injection (`pact_gate: warn`) — the payoff, and it happens HERE:** a
|
|
88
|
+
DRIFTED or BROKEN promise whose `anchors` intersect a task's `declared_files` is
|
|
89
|
+
appended VERBATIM to that task's `constraints[]` (the `spec_invariants[]`
|
|
90
|
+
channel — no new plumbing) and PRINTED per task. HOLDING entries are never
|
|
91
|
+
injected. Last month's decision constrains this month's plan, automatically. On
|
|
92
|
+
pass, emit `PHASE planning end`.
|
|
93
|
+
|
|
94
|
+
**Then print the `forecast:` block, BEFORE the Phase-2 pause question**
|
|
95
|
+
(`../../orc/references/preflight-report.md`) — tasks · waves · estimated subagents · model
|
|
96
|
+
mix · a measured time RANGE · one cheaper lane and what it costs. This is the
|
|
97
|
+
earliest instant every number is real and the last cheap moment to walk away.
|
|
98
|
+
Presentation only, no new probes. When `config.run_budget_dispatches` > 0 and the
|
|
99
|
+
forecast exceeds it, this is a **hard stop** with the batch pause's discipline
|
|
100
|
+
(`GATE budget stop`) offering proceed · cheaper lane · re-plan smaller — never
|
|
101
|
+
dispatch wave 1 past it.
|
|
102
|
+
|
|
103
|
+
<!-- /orc:layer -->
|
|
104
|
+
|
|
105
|
+
<!-- orc:layer composed -->
|
|
106
|
+
|
|
107
|
+
## Phase: Planning
|
|
108
|
+
|
|
109
|
+
<!-- diy:when planning=auto -->
|
|
110
|
+
Route planning exactly as the full lane does — Superpowers plan, OpenSpec
|
|
111
|
+
change, or ORC's own planner, chosen by what exists in the project. Follow
|
|
112
|
+
`.claude/skills/orc/subskills/orc-planner/SKILL.md` for the own-planner path
|
|
113
|
+
and validate the planning output against
|
|
114
|
+
`.claude/skills/orc/schemas/planning-output.md`.
|
|
115
|
+
<!-- /diy:when -->
|
|
116
|
+
<!-- diy:when planning=own-planner -->
|
|
117
|
+
Always use ORC's own Requirement Planner, even when Superpowers/OpenSpec
|
|
118
|
+
artifacts exist: follow `.claude/skills/orc/subskills/orc-planner/SKILL.md`
|
|
119
|
+
and validate the planning output against
|
|
120
|
+
`.claude/skills/orc/schemas/planning-output.md`.
|
|
121
|
+
<!-- /diy:when -->
|
|
122
|
+
<!-- diy:when planning=superpowers -->
|
|
123
|
+
Plan via Superpowers: require a Superpowers-written plan as planning input
|
|
124
|
+
(ask the user to produce one if absent), then convert it to ORC planning
|
|
125
|
+
output validated against `.claude/skills/orc/schemas/planning-output.md` —
|
|
126
|
+
same conversion the full lane applies on its Superpowers route.
|
|
127
|
+
<!-- /diy:when -->
|
|
128
|
+
<!-- diy:when planning=openspec -->
|
|
129
|
+
Plan via OpenSpec: require an OpenSpec change as planning input (ask the user
|
|
130
|
+
to produce one if absent), then convert it to ORC planning output validated
|
|
131
|
+
against `.claude/skills/orc/schemas/planning-output.md` — same conversion the
|
|
132
|
+
full lane applies on its OpenSpec route.
|
|
133
|
+
<!-- /diy:when -->
|
|
134
|
+
<!-- diy:when tdd=on -->
|
|
135
|
+
TDD is ON for this flow: the plan must carry a `tdd_spec` per requirement
|
|
136
|
+
(given/when/then + a runnable skeleton in the project's test framework, or
|
|
137
|
+
`tdd: exempt — <reason>`; schema in
|
|
138
|
+
`.claude/skills/orc/schemas/planning-output.md`). No test runner in the
|
|
139
|
+
project → whole-run exemption, stated once at preflight.
|
|
140
|
+
<!-- /diy:when -->
|
|
141
|
+
|
|
142
|
+
<!-- /orc:layer -->
|
|
@@ -1,118 +1,132 @@
|
|
|
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
|
-
## The rules line (v1.7.0) — printed by every lane that runs the `rules` phase
|
|
59
|
-
|
|
60
|
-
`orc rules slice --lane <lane> --json` returns a `line`. Print it VERBATIM:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
rules: ORC 65 (W 23 · C 22 · D 10 · U 10) · yours 9 lines (P0 4 · P1 2 · P2 3) · 1 override
|
|
64
|
-
rules: ORC 65 (W 23 · C 22 · D 10 · U 10) · yours none
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**Both spellings are mandatory in their state.** `yours none` says the project
|
|
68
|
-
has not written its own rules — a different fact from the CLI failing to look,
|
|
69
|
-
and the line is what keeps the two apart. Never compute the counts here.
|
|
70
|
-
|
|
71
|
-
Where the lane's preflight prints a REPORT rather than a bare line, the report
|
|
72
|
-
names each override under it. An override the user cannot see is an override
|
|
73
|
-
they cannot audit. The rest of the mechanic is `./rules.md`.
|
|
74
|
-
|
|
75
|
-
`/orc-doc` prints `house rules: …` instead, from `orc doc rules`. The two
|
|
76
|
-
surfaces are different files and never mix.
|
|
77
|
-
|
|
78
|
-
## The usage line (v1.1.0) — printed whenever `usage_gate` is armed
|
|
79
|
-
|
|
80
|
-
`usage_gate` resolves in step 1 like any other key. When it is anything but
|
|
81
|
-
`off`, run `orc usage check --json` in step 3 and print ONE line:
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
usage: 5h 71% · wk 38% · gate at 10% left · warn
|
|
85
|
-
usage: unknown (no reading in the last 30 minutes) · a run is never stopped on this
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Both spellings are mandatory in their state. A gate that prints only when it
|
|
89
|
-
fires is a gate the user cannot tell from a gate that is not running — and the
|
|
90
|
-
`unknown` line is what stops someone believing they are protected when Claude
|
|
91
|
-
Code is sending no usage headers at all.
|
|
92
|
-
|
|
93
|
-
**Exit 2 (`unknown`) NEVER stops a run.** Absent is not low.
|
|
94
|
-
|
|
95
|
-
A `blocked` run (`orc wait status --json`) prints the block and its AGE here too,
|
|
96
|
-
and again at every gate it suppresses. The rest of the mechanic — the modes, the
|
|
97
|
-
hops, what `stop` and `wait` actually do — is `../wait.md`; this file only says
|
|
98
|
-
that the line is printed and when.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
`
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
+
## The rules line (v1.7.0) — printed by every lane that runs the `rules` phase
|
|
59
|
+
|
|
60
|
+
`orc rules slice --lane <lane> --json` returns a `line`. Print it VERBATIM:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
rules: ORC 65 (W 23 · C 22 · D 10 · U 10) · yours 9 lines (P0 4 · P1 2 · P2 3) · 1 override
|
|
64
|
+
rules: ORC 65 (W 23 · C 22 · D 10 · U 10) · yours none
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Both spellings are mandatory in their state.** `yours none` says the project
|
|
68
|
+
has not written its own rules — a different fact from the CLI failing to look,
|
|
69
|
+
and the line is what keeps the two apart. Never compute the counts here.
|
|
70
|
+
|
|
71
|
+
Where the lane's preflight prints a REPORT rather than a bare line, the report
|
|
72
|
+
names each override under it. An override the user cannot see is an override
|
|
73
|
+
they cannot audit. The rest of the mechanic is `./rules.md`.
|
|
74
|
+
|
|
75
|
+
`/orc-doc` prints `house rules: …` instead, from `orc doc rules`. The two
|
|
76
|
+
surfaces are different files and never mix.
|
|
77
|
+
|
|
78
|
+
## The usage line (v1.1.0) — printed whenever `usage_gate` is armed
|
|
79
|
+
|
|
80
|
+
`usage_gate` resolves in step 1 like any other key. When it is anything but
|
|
81
|
+
`off`, run `orc usage check --json` in step 3 and print ONE line:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
usage: 5h 71% · wk 38% · gate at 10% left · warn
|
|
85
|
+
usage: unknown (no reading in the last 30 minutes) · a run is never stopped on this
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Both spellings are mandatory in their state. A gate that prints only when it
|
|
89
|
+
fires is a gate the user cannot tell from a gate that is not running — and the
|
|
90
|
+
`unknown` line is what stops someone believing they are protected when Claude
|
|
91
|
+
Code is sending no usage headers at all.
|
|
92
|
+
|
|
93
|
+
**Exit 2 (`unknown`) NEVER stops a run.** Absent is not low.
|
|
94
|
+
|
|
95
|
+
A `blocked` run (`orc wait status --json`) prints the block and its AGE here too,
|
|
96
|
+
and again at every gate it suppresses. The rest of the mechanic — the modes, the
|
|
97
|
+
hops, what `stop` and `wait` actually do — is `../wait.md`; this file only says
|
|
98
|
+
that the line is printed and when.
|
|
99
|
+
|
|
100
|
+
## The graph line (v1.8.0) — code-changing lanes only
|
|
101
|
+
|
|
102
|
+
`/orc`, `/orc-ultra`, `/orc-diy`, `/orc-mini`, `/orc-fast` and `/orc-quick` run
|
|
103
|
+
`orc graph status --if-enabled --heal --json` in step 3, BEFORE the first
|
|
104
|
+
dispatch — never skipped. `--heal` builds a missing graph and updates a drifted
|
|
105
|
+
one in the same call (it is free), so there is no second call to forget. Print
|
|
106
|
+
its `line` (`off` included) and put its `trace` (`GRAPH-CONSULT …`) in the next
|
|
107
|
+
packet as it is — never as a `GATE` line in your own words. While the graph is
|
|
108
|
+
on, `orc lane config` prints the three graph steps in `announce[]` (`../code-graph.md`
|
|
109
|
+
§0). **The lane reads no `code_graph` key:** `--if-enabled`
|
|
110
|
+
makes the CLI decide, which is how `/orc-quick` takes part while its step 1 still
|
|
111
|
+
reads `log_dir` and nothing else. A graph that cannot be built never stops a run,
|
|
112
|
+
and `/orc-fast` gains no third gate. Every other lane prints nothing.
|
|
113
|
+
|
|
114
|
+
<!-- /orc:layer -->
|
|
115
|
+
|
|
116
|
+
<!-- orc:layer full -->
|
|
117
|
+
|
|
118
|
+
## `/orc` and `/orc-ultra` — preflight also REPORTS
|
|
119
|
+
|
|
120
|
+
The full lane's preflight does everything in `core` and then prints the
|
|
121
|
+
**preflight report**: tasks · waves · estimated subagents · model mix · the wiki
|
|
122
|
+
tier · the resolved pattern · crosslink state · the pause schedule · the run
|
|
123
|
+
budget. That format, its `GATE budget stop|pass` line and the FLOOR rule (repairs
|
|
124
|
+
push the real count up, never down) live in the `orc` skill's own
|
|
125
|
+
`references/preflight-report.md` — read it relative to that skill. It has ONE
|
|
126
|
+
consumer, so it stays home rather than moving here.
|
|
127
|
+
|
|
128
|
+
A trimmed lane must **not** read that file. `orc-mini` and `orc-fast` print their
|
|
129
|
+
resolved lines and go; there is no forecast to report because there are no waves
|
|
130
|
+
to forecast.
|
|
131
|
+
|
|
132
|
+
<!-- /orc:layer -->
|