@azure-id/orc 0.55.0 → 0.56.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/package.json CHANGED
@@ -1,39 +1,39 @@
1
- {
2
- "name": "@azure-id/orc",
3
- "version": "0.55.0",
4
- "description": "ORC — an orchestrator skill constellation for Claude Code: intake, planning, scored parallel subagents, code-pattern matching, review, verify, ship, plus a project knowledge-base wiki.",
5
- "bin": {
6
- "orc": "bin/cli.js"
7
- },
8
- "files": [
9
- "README.md",
10
- "README-id.md",
11
- "CHANGELOG.md",
12
- "bin/",
13
- "mock-run/",
14
- "templates/"
15
- ],
16
- "scripts": {
17
- "postinstall": "node -e \"try{require('fs').accessSync(require('path').join(__dirname,'bin','cli.js'));console.log('\\nORC installed. Run: orc init (or orc init --global)\\n')}catch(e){console.error('\\n[orc] WARNING: bin/cli.js missing from this install — the repo/publish was incomplete. Reinstall from a complete source.\\n')}\"",
18
- "build:agents": "node bin/build-agents.js",
19
- "test": "node --test --test-concurrency=6 test/",
20
- "verify": "node bin/build-agents.js --check && node bin/verify-package.js && node bin/verify-contracts.js",
21
- "prepack": "node bin/build-agents.js --check && node bin/verify-package.js && node bin/verify-contracts.js && node --test --test-concurrency=6 test/"
22
- },
23
- "keywords": [
24
- "claude",
25
- "claude-code",
26
- "orchestrator",
27
- "skills",
28
- "agents",
29
- "ai"
30
- ],
31
- "license": "MIT",
32
- "engines": {
33
- "node": ">=18"
34
- },
35
- "repository": {
36
- "type": "git",
37
- "url": "github:azure-id/orc"
38
- }
39
- }
1
+ {
2
+ "name": "@azure-id/orc",
3
+ "version": "0.56.0",
4
+ "description": "ORC — an orchestrator skill constellation for Claude Code: intake, planning, scored parallel subagents, code-pattern matching, review, verify, ship, plus a project knowledge-base wiki.",
5
+ "bin": {
6
+ "orc": "bin/cli.js"
7
+ },
8
+ "files": [
9
+ "README.md",
10
+ "README-id.md",
11
+ "CHANGELOG.md",
12
+ "bin/",
13
+ "mock-run/",
14
+ "templates/"
15
+ ],
16
+ "scripts": {
17
+ "postinstall": "node -e \"try{require('fs').accessSync(require('path').join(__dirname,'bin','cli.js'));console.log('\\nORC installed. Run: orc init (or orc init --global)\\n')}catch(e){console.error('\\n[orc] WARNING: bin/cli.js missing from this install — the repo/publish was incomplete. Reinstall from a complete source.\\n')}\"",
18
+ "build:agents": "node bin/build-agents.js",
19
+ "test": "node --test --test-concurrency=6 test/",
20
+ "verify": "node bin/build-agents.js --check && node bin/verify-package.js && node bin/verify-contracts.js",
21
+ "prepack": "node bin/build-agents.js --check && node bin/verify-package.js && node bin/verify-contracts.js && node --test --test-concurrency=6 test/"
22
+ },
23
+ "keywords": [
24
+ "claude",
25
+ "claude-code",
26
+ "orchestrator",
27
+ "skills",
28
+ "agents",
29
+ "ai"
30
+ ],
31
+ "license": "MIT",
32
+ "engines": {
33
+ "node": ">=18"
34
+ },
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "github:azure-id/orc"
38
+ }
39
+ }
@@ -1,188 +1,187 @@
1
- ---
2
- name: orc-fast
3
- description: >
4
- Fastest ORC lane — knowledge-gated single-executor implementation. Use for
5
- "use orc-fast to implement X" or "/orc-fast". Requires TWO prerequisites:
6
- a fresh project wiki (orc-wiki) AND a cached code-pattern for the request's
7
- language — the precomputed knowledge replaces the analyst/planner entirely.
8
- Either missing → falls back to orc-mini (never stops the chat). One
9
- Sonnet 4.6 high executor, a build+test smoke gate, one repair round, ship.
10
- Orchestrator runs fine at Sonnet medium. The orchestrator never implements —
11
- it spawns.
12
- ---
13
-
14
- # ORC-FAST
15
-
16
- The speed lane: precomputed knowledge instead of pipeline phases — the wiki
17
- supplies grounding, the pattern cache supplies house style, so fast pays for
18
- neither an analyst nor a planner. That trade only holds when both exist and
19
- the wiki is fresh, so the two prerequisite gates below are hard: fail either →
20
- **fall back to orc-mini** carrying whatever intake was done. Fallback is the
21
- router — orc-fast is always safe to try.
22
-
23
- Runs fine with the orchestrator at **Sonnet 4.6 / Sonnet 5, medium effort** —
24
- no scoring, no planning judgment (the effort guard only gates the full `orc`
25
- skill). **You never implement — you spawn.**
26
-
27
- ## What fast deliberately does NOT have
28
-
29
- No analyst, planner, scoring, waves, reviewer, verifier, test-author, or
30
- summary. One executor, one smoke gate, one repair round. More than that → the
31
- fit gate hands it to orc-mini.
32
-
33
- ## Phase F0 — Preflight (the two prerequisite gates; no spawn)
34
-
35
- Emit a `GATE` trace line per check when logging.
36
-
37
- **a. Wiki gate.** Decide existence with `orc wiki status` — the deterministic
38
- probe in `../_shared/detecting-artifacts.md`, never an ad-hoc `find` (`.claude`
39
- is hidden). `none` = gate FAILED → fallback; else wiki present → compute the
40
- tier from `.claude/orc/wiki-meta.json` per `../orc-wiki/references/staleness.md`:
41
- `git rev-list --count <scan_commit>..HEAD` → FRESH / AGING / STALE (manifest
42
- absent but docs present = STALE; wiki absent/empty = gate FAILED → fallback).
43
- - **FRESH** → proceed silently. **AGING** → one-line notice, proceed.
44
- - **STALE** → the user judges. Ask with exactly these options:
45
- 1. **Refresh wiki, then continue fast** *(recommended)* — run orc-wiki's
46
- incremental refresh (diff since `scan_commit`, re-scan only affected
47
- docs), then re-enter this preflight.
48
- 2. **Drop to orc-mini** *(preferable if in a hurry — mini grounds itself)*.
49
- 3. **Continue fast anyway** *(not recommended — the executor may follow
50
- stale claims)* — proceed and stamp `wiki_stale_override: true` in the
51
- checkpoint so /orc-retro can correlate outcomes with overrides.
52
-
53
- **b. Pattern gate.** Detect the request's language (file extensions / repo
54
- deps, same signals as the full lane's tagging) and confirm the cache with
55
- `orc pattern status <lang>` (exit 0 = cached — the deterministic probe in
56
- `../_shared/detecting-artifacts.md`, never an ad-hoc `find`). Absent for the
57
- language in play → gate FAILED → fallback. (A request touching no FE/BE language — pure docs/
58
- config — passes this gate as N/A.) The cross-cutting `postgres` pattern is
59
- NEVER a gate prerequisite — it is bonus-only (injected at F2 on a cache HIT),
60
- so a missing `postgres-pattern.md` never fails the gate or forces a fallback.
61
-
62
- **Any gate FAILED** → announce which prerequisite failed in one line, then
63
- hand off to orc-mini via the fallback contract below. Never stop the chat.
64
-
65
- **c. Gotchas — NOT a gate.** Two prerequisites stay two: a missing
66
- `.claude/orc/gotchas.md` never forces a fallback. Fast READS repair memory
67
- (`orc gotcha status`, then inject the SCOPE-MATCHING entries into the F2 slice,
68
- cap 3) and never WRITES it — `../_shared/gotchas.md` §10.
69
-
70
- ## Phase F1 — Fit gate + micro-intake (one pass, ONE user round-trip)
71
-
72
- Draft a 3–5 line intent spec + 2–3 acceptance bullets. Judge fit: more than
73
- one real task, ~5+ files, or core/security-sensitive surface fallback to
74
- orc-mini WITH the intent spec attached (no rework); emit a `GATE` line for the
75
- verdict. Then the lane's ONLY pre-spawn ask one combined confirmation:
76
- preflight result + intent spec + acceptance bullets + "proceed?" (soft
77
- sign-off; never split into multiple questions). Create the run folder
78
- (`.claude/orc/run/{run-slug}/` shared format, so fallback needs no
79
- migration) and write the intent-spec + a minimal checkpoint.
80
-
81
- ## Phase F2 — Slice build + dispatch (ONE executor)
82
-
83
- Build one slice for `orc-executor-sonnet-4-6-high` (dispatch BY NAME; model
84
- pinned in the agent file). **Under `opus5_only` it is `orc-executor-opus-5-low`** — forced, and while that mode is on this lane needs an Opus 5 main session, so the "runs fine at Sonnet medium" premise applies only with it off (`../_shared/opus5-only.md`).
85
-
86
- **Extra (`extra_enabled`, `../_shared/extra-dispatch.md`):** the same slice may run off Claude. **This lane has no score at all, so it holds a POSITION, not a band:** resolve `orc extra resolve --slot fast-executor --json` (set with `orc extra role set fast-executor <profile>/<model>`). No row on that slot = Claude, and that is an answer, not a gap. The `extra:` line joins the F0 preflight (P0, printed whenever the gate is on) and NAMES the agent it displaces — `orc-executor-sonnet-4-6-high`; dispatch through `orc extra dispatch --task <file> --json` with `slot: "fast-executor"` and **no `score`** (both is refused by name); validate with `return-validation.md` **§2b, not §2**; a failure runs `orc extra reconcile <task_id>` FIRST — a worktree that moved is RESUMED, never re-done — then falls back to that same pinned agent BY NAME, announced. Extra is orthogonal to the knowledge gate — a fresh wiki and a cached pattern are still required, and a foreign worker gets the same pointers-not-content slice.
87
-
88
- - the task (intent spec) + acceptance bullets as definition-of-done
89
- - **wiki pointers, not content** (fast's lane-delta in
90
- `../orc/references/wiki-consult.md`): the PATHS of 1–3 relevant pages
91
- selected from `wiki/INDEX.md` by keyword match prefer the cross-cutting
92
- maps (`orc-reference-api-surface` etc.) when the domain matches. Instruct
93
- the executor to READ them first, and include the precedence line verbatim:
94
- `code > fresh wiki > stale wiki (hints) > model priors`. Never paste wiki
95
- bodies into the slice (a Sonnet-medium orchestrator curating wiki prose
96
- defeats the lane). **Emit `WIKI-CONSULT <tier> :: docs=<the selected pointer
97
- paths>`** (tier from the F0 gate; `docs=none` if no pages fit) — the F0
98
- `GATE` line captured the gate *decision*; this captures which pages grounded
99
- the run.
100
- - the cached pattern injected LITERALLY (same `pattern` slice contract as
101
- full; the pattern file is small by design)
102
- - **crosslink (cross-repo, advisory):** a task touching a boundary in
103
- `.claude/orc/crosslink/needs.json` gets the cached linked contract injected
104
- as `crosslink` ("hints, not verified") — advisory, never blocks, never
105
- outranks local code.
106
- - **`db:postgres` bonus:** a data-access task with
107
- `.claude/orc/patterns/postgres-pattern.md` CACHED merges it into the same
108
- `pattern` slice (query invariants). Cache MISS → skip silently — fast never
109
- codifies and never falls back on this.
110
- - **the read ladder** (`../_shared/read-ladder.md`): read only as far up as the
111
- question needs a file the task will EDIT is read in full first. Precomputed
112
- knowledge REPLACING exploration is this lane; a directory sweep is not.
113
- - the standing `house_rules` card (`../orc/references/house-rules.md`,
114
- injected literally, same as full/mini)
115
- - constraints from the intent spec
116
- - **terse-return rule:** standard contract fields, NO narrative prose — files
117
- changed, one-line diff summary, smoke-relevant notes only.
118
-
119
- Validate the return per `../_shared/return-validation.md` `unmet[]`
120
- honesty, `pattern_version` + `invariants_checked` attestation, `actual_model`
121
- / `actual_effort` downgrade check (emit the `VERIFY` trace line), and §6's worktree delta (`git status --short` before/after; a path changed outside `declared_files` is a violation whatever the return said). Malformed
122
- return = failure (one re-dispatch, then fallback offer).
123
-
124
- ## Phase F3 — Smoke gate (build + test; blocks ship on red)
125
-
126
- Run the gate per `../_shared/smoke-gate.md`, sourcing commands **from
127
- `wiki-meta.json`'s `commands` block** (recorded at wiki scan don't
128
- rediscover tooling; manifest lacks them detect once and say so). **GREEN**
129
- ship. **RED** one repair round; second red → STOP and offer: escalate to
130
- orc-mini (reason `smoke-red-escalation`) / switch to full `/orc` / stop.
131
- Docs-only → gate N/A, say so.
132
-
133
- ## Phase F3.5 — Mock example (config `mock_example`, default ask)
134
-
135
- Canonical: `../_shared/drift-recovery.md` load on fire. Only after a GREEN
136
- F3, before ship: `ask` MANDATORY offer · `on` → build · `off` → skip.
137
- Deliverable `mock-examples/<change-slug>/` at project root **never
138
- committed/staged**. Drift answer `DRIFT-FROM` recovery (cap 2 loops, honest
139
- report on cap). Trace: `PHASE mock-example`, `DRIFT loop=<n>`.
140
-
141
- ## Phase F4 — Ship
142
-
143
- Offer commit (push if asked; never stage `mock-examples/`). Append the final markers to the checkpoint, emit
144
- `OUTCOME task=… band=fast model=… retries=… unmet=…` + `FINISH`, show the
145
- dispatch line (model/effort actually used) + the `/usage` reminder. Fast never
146
- triggers the post-ship wiki refresh ask (preflight polices freshness on the
147
- way in) — the passive stale-flag note still applies to touched covered files.
148
-
149
- ## Fallback contract (orc-fast → orc-mini)
150
-
151
- Follow the writer side of `../_shared/fallback-handoff.md`: announce the
152
- failed gate in one line, write the `FALLBACK-FROM` block into the run folder
153
- (REASON: wiki-absent | wiki-stale-user-choice | pattern-absent | fit-gate |
154
- smoke-red-escalation), and invoke orc-mini pointing at it. The run folder is
155
- already in the shared format — no migration.
156
-
157
- ## Behavior trace (PERMANENT — same rule as every lane; always on)
158
-
159
- Follow `../orc/references/trace-protocol.md`: at run start write
160
- `log_dir/.current` = `run-fast-<slug>-<DDMMYY>-<HHMMSS>.txt`, `touch the trace file`
161
- of that name in the SAME step, + store `trace_path`. Narration is **dispatched, never remembered**: record each event
162
- with its REAL timestamp into a packet (F0–F4 `PHASE`, `GATE` at the preflight/
163
- fit/smoke verdicts, `DISPATCH`/`VERIFY` `actual_model`/`actual_effort` vs
164
- expected — `OUTCOME`, `FINISH`, plus `decisions` = the WHY), then dispatch
165
- `orc-trace-writer-haiku-4-5` PAIRED with the next dispatch; fast batches to
166
- **2 packets** (preflight+dispatch, gate+ship). A phase ending with
167
- zero new trace lines is a protocol violation — dispatch its packet NOW. The
168
- `FINISH` packet returns BEFORE you delete `log_dir/.current`.
169
-
170
- ## Config
171
-
172
- Resolve at run start (`../orc/config.md` `.claude/orc.config.yaml`):
173
- `wiki_fresh_max` / `wiki_aging_max` (tier edges) + `log_dir`. Fast has no
174
- config key of its own — command-entry only; wave/scoring/review keys never
175
- apply.
176
-
177
- ## Checkpoint (minimal, append-only)
178
-
179
- One `fast-checkpoint.md` in the run folder: GATE results (+ any
180
- `wiki_stale_override`), the dispatch, smoke verdicts, OUTCOME — enough for
181
- /orc-retro mining and fresh-session resume, nothing more.
182
-
183
- ## What fast still enforces (from the main hard rules)
184
-
185
- Never implement yourself (smoke gate = read-only build+test) · all artifacts
186
- in the run subfolder, never project root · validate the subagent return
187
- (malformed = failure) · never offer commit on a red build · report the
188
- dispatch + remind the user to run `/usage` (never invoke it programmatically).
1
+ ---
2
+ name: orc-fast
3
+ description: >
4
+ Fastest ORC lane — knowledge-gated single-executor implementation. Use for
5
+ "use orc-fast to implement X" or "/orc-fast". Requires TWO prerequisites:
6
+ a fresh project wiki (orc-wiki) AND a cached code-pattern for the request's
7
+ language — the precomputed knowledge replaces the analyst/planner entirely.
8
+ Either missing → falls back to orc-mini (never stops the chat). One
9
+ Sonnet 4.6 high executor, a build+test smoke gate, one repair round, ship.
10
+ Orchestrator runs fine at Sonnet medium. The orchestrator never implements —
11
+ it spawns.
12
+ ---
13
+
14
+ # ORC-FAST
15
+
16
+ The speed lane: precomputed knowledge instead of pipeline phases — the wiki
17
+ supplies grounding, the pattern cache supplies house style, so fast pays for
18
+ neither an analyst nor a planner. That trade only holds when both exist and
19
+ the wiki is fresh, so the two prerequisite gates below are hard: fail either →
20
+ **fall back to orc-mini** carrying whatever intake was done. Fallback is the
21
+ router — orc-fast is always safe to try.
22
+
23
+ Runs fine with the orchestrator at **Sonnet 4.6 / Sonnet 5, medium effort** —
24
+ no scoring, no planning judgment (the effort guard only gates the full `orc`
25
+ skill). **You never implement — you spawn.**
26
+
27
+ ## What fast deliberately does NOT have
28
+
29
+ No analyst, planner, scoring, waves, reviewer, verifier, test-author, or
30
+ summary. One executor, one smoke gate, one repair round. More than that → the
31
+ fit gate hands it to orc-mini.
32
+
33
+ ## Phase F0 — Preflight (the two prerequisite gates; no spawn)
34
+
35
+ Emit a `GATE` trace line per check when logging.
36
+
37
+ **a. Wiki gate.** Decide existence with `orc wiki status` — the deterministic
38
+ probe in `../_shared/detecting-artifacts.md`, never an ad-hoc `find` (`.claude`
39
+ is hidden). `none` = gate FAILED → fallback; else wiki present → compute the
40
+ tier from `.claude/orc/wiki-meta.json` per `../orc-wiki/references/staleness.md`:
41
+ `git rev-list --count <scan_commit>..HEAD` → FRESH / AGING / STALE (manifest
42
+ absent but docs present = STALE; wiki absent/empty = gate FAILED → fallback).
43
+ - **FRESH** → proceed silently. **AGING** → one-line notice, proceed.
44
+ - **STALE** → the user judges. Ask with exactly these options:
45
+ 1. **Refresh wiki, then continue fast** *(recommended)* — run orc-wiki's
46
+ incremental refresh (diff since `scan_commit`, re-scan only affected
47
+ docs), then re-enter this preflight.
48
+ 2. **Drop to orc-mini** *(preferable if in a hurry — mini grounds itself)*.
49
+ 3. **Continue fast anyway** *(not recommended — the executor may follow
50
+ stale claims)* — proceed and stamp `wiki_stale_override: true` in the
51
+ checkpoint so /orc-retro can correlate outcomes with overrides.
52
+
53
+ **b. Pattern gate.** Detect the request's language (file extensions / repo
54
+ deps, same signals as the full lane's tagging) and confirm the cache with
55
+ `orc pattern status <lang>` (exit 0 = cached — the deterministic probe in
56
+ `../_shared/detecting-artifacts.md`, never an ad-hoc `find`). Absent for the
57
+ language in play → gate FAILED → fallback. (A request touching no FE/BE language — pure docs/
58
+ config — passes this gate as N/A.) The cross-cutting `postgres` pattern is
59
+ NEVER a gate prerequisite — it is bonus-only (injected at F2 on a cache HIT),
60
+ so a missing `postgres-pattern.md` never fails the gate or forces a fallback.
61
+
62
+ **Any gate FAILED** → announce which prerequisite failed in one line, then
63
+ hand off to orc-mini via the fallback contract below. Never stop the chat.
64
+
65
+ **c. Gotchas — NOT a gate.** Two prerequisites stay two: a missing `.claude/orc/gotchas.md` never forces a fallback. Fast READS repair memory (`orc gotcha status`, then inject the SCOPE-MATCHING entries into the F2 slice, cap 3) and never WRITES it — `../_shared/gotchas.md` §10.
66
+
67
+ **d. Extra — a PROBE, not a gate (P0).** Run `orc extra resolve --slot fast-executor --json` (0 = extra, 1 = Claude) — **a gate that is never probed is a gate that is always off**, and without this step the lane silently runs on Claude however `extra_enabled` and `orc extra role` were set. `extra` → print the `extra:` line HERE and carry the answer into F2; `claude` → print nothing, never fall back, never stop.
68
+
69
+ ## Phase F1 — Fit gate + micro-intake (one pass, ONE user round-trip)
70
+
71
+ Draft a 3–5 line intent spec + 2–3 acceptance bullets. Judge fit: more than
72
+ one real task, ~5+ files, or core/security-sensitive surface fallback to
73
+ orc-mini WITH the intent spec attached (no rework); emit a `GATE` line for the
74
+ verdict. Then the lane's ONLY pre-spawn ask one combined confirmation:
75
+ preflight result + intent spec + acceptance bullets + "proceed?" (soft
76
+ sign-off; never split into multiple questions). Create the run folder
77
+ (`.claude/orc/run/{run-slug}/` shared format, so fallback needs no
78
+ migration) and write the intent-spec + a minimal checkpoint.
79
+
80
+ ## Phase F2 — Slice build + dispatch (ONE executor)
81
+
82
+ Build one slice for `orc-executor-sonnet-4-6-high` (dispatch BY NAME; model
83
+ pinned in the agent file). **Under `opus5_only` it is `orc-executor-opus-5-low`** forced, and while that mode is on this lane needs an Opus 5 main session, so the "runs fine at Sonnet medium" premise applies only with it off (`../_shared/opus5-only.md`).
84
+
85
+ **Extra (`extra_enabled`, `../_shared/extra-dispatch.md`):** the same slice may run off Claude. **This lane has no score at all, so it holds a POSITION, not a band:** resolve `orc extra resolve --slot fast-executor --json` (set with `orc extra role set fast-executor <profile>/<model>`). No row on that slot = Claude, and that is an answer, not a gap. The `extra:` line joins the F0 preflight (P0, printed whenever the gate is on) and NAMES the agent it displaces — `orc-executor-sonnet-4-6-high`; dispatch through `orc extra dispatch --task <file> --json` with `slot: "fast-executor"` and **no `score`** (both is refused by name); validate with `return-validation.md` **§2b, not §2**; a failure runs `orc extra reconcile <task_id>` FIRST — a worktree that moved is RESUMED, never re-done — then falls back to that same pinned agent BY NAME, announced. Extra is orthogonal to the knowledge gate — a fresh wiki and a cached pattern are still required, and a foreign worker gets the same pointers-not-content slice.
86
+
87
+ - the task (intent spec) + acceptance bullets as definition-of-done
88
+ - **wiki pointers, not content** (fast's lane-delta in
89
+ `../orc/references/wiki-consult.md`): the PATHS of 1–3 relevant pages
90
+ selected from `wiki/INDEX.md` by keyword match prefer the cross-cutting
91
+ maps (`orc-reference-api-surface` etc.) when the domain matches. Instruct
92
+ the executor to READ them first, and include the precedence line verbatim:
93
+ `code > fresh wiki > stale wiki (hints) > model priors`. Never paste wiki
94
+ bodies into the slice (a Sonnet-medium orchestrator curating wiki prose
95
+ defeats the lane). **Emit `WIKI-CONSULT <tier> :: docs=<the selected pointer
96
+ paths>`** (tier from the F0 gate; `docs=none` if no pages fit) — the F0
97
+ `GATE` line captured the gate *decision*; this captures which pages grounded
98
+ the run.
99
+ - the cached pattern injected LITERALLY (same `pattern` slice contract as
100
+ full; the pattern file is small by design)
101
+ - **crosslink (cross-repo, advisory):** a task touching a boundary in
102
+ `.claude/orc/crosslink/needs.json` gets the cached linked contract injected
103
+ as `crosslink` ("hints, not verified") advisory, never blocks, never
104
+ outranks local code.
105
+ - **`db:postgres` bonus:** a data-access task with
106
+ `.claude/orc/patterns/postgres-pattern.md` CACHED merges it into the same
107
+ `pattern` slice (query invariants). Cache MISS → skip silently — fast never
108
+ codifies and never falls back on this.
109
+ - **the read ladder** (`../_shared/read-ladder.md`): read only as far up as the
110
+ question needs — a file the task will EDIT is read in full first. Precomputed
111
+ knowledge REPLACING exploration is this lane; a directory sweep is not.
112
+ - the standing `house_rules` card (`../orc/references/house-rules.md`,
113
+ injected literally, same as full/mini)
114
+ - constraints from the intent spec
115
+ - **terse-return rule:** standard contract fields, NO narrative prose — files
116
+ changed, one-line diff summary, smoke-relevant notes only.
117
+
118
+ Validate the return per `../_shared/return-validation.md` — `unmet[]`
119
+ honesty, `pattern_version` + `invariants_checked` attestation, `actual_model`
120
+ / `actual_effort` downgrade check (emit the `VERIFY` trace line), and §6's worktree delta (`git status --short` before/after; a path changed outside `declared_files` is a violation whatever the return said). Malformed
121
+ return = failure (one re-dispatch, then fallback offer).
122
+
123
+ ## Phase F3 — Smoke gate (build + test; blocks ship on red)
124
+
125
+ Run the gate per `../_shared/smoke-gate.md`, sourcing commands **from
126
+ `wiki-meta.json`'s `commands` block** (recorded at wiki scan — don't
127
+ rediscover tooling; manifest lacks them detect once and say so). **GREEN**
128
+ ship. **RED** → one repair round; second redSTOP and offer: escalate to
129
+ orc-mini (reason `smoke-red-escalation`) / switch to full `/orc` / stop.
130
+ Docs-only gate N/A, say so.
131
+
132
+ ## Phase F3.5 — Mock example (config `mock_example`, default ask)
133
+
134
+ Canonical: `../_shared/drift-recovery.md` — load on fire. Only after a GREEN
135
+ F3, before ship: `ask` MANDATORY offer · `on` build · `off` → skip.
136
+ Deliverable `mock-examples/<change-slug>/` at project root **never
137
+ committed/staged**. Drift answer → `DRIFT-FROM` recovery (cap 2 loops, honest
138
+ report on cap). Trace: `PHASE mock-example`, `DRIFT loop=<n>`.
139
+
140
+ ## Phase F4 — Ship
141
+
142
+ Offer commit (push if asked; never stage `mock-examples/`). Append the final markers to the checkpoint, emit
143
+ `OUTCOME task=… band=fast model=… retries=… unmet=…` + `FINISH`, show the
144
+ dispatch line (model/effort actually used) + the `/usage` reminder. Fast never
145
+ triggers the post-ship wiki refresh ask (preflight polices freshness on the
146
+ way in) — the passive stale-flag note still applies to touched covered files.
147
+
148
+ ## Fallback contract (orc-fast → orc-mini)
149
+
150
+ Follow the writer side of `../_shared/fallback-handoff.md`: announce the
151
+ failed gate in one line, write the `FALLBACK-FROM` block into the run folder
152
+ (REASON: wiki-absent | wiki-stale-user-choice | pattern-absent | fit-gate |
153
+ smoke-red-escalation), and invoke orc-mini pointing at it. The run folder is
154
+ already in the shared format no migration.
155
+
156
+ ## Behavior trace (PERMANENT — same rule as every lane; always on)
157
+
158
+ Follow `../orc/references/trace-protocol.md`: at run start write
159
+ `log_dir/.current` = `run-fast-<slug>-<DDMMYY>-<HHMMSS>.txt`, `touch the trace file`
160
+ of that name in the SAME step, + store `trace_path`. Narration is **dispatched, never remembered**: record each event
161
+ with its REAL timestamp into a packet (F0–F4 `PHASE`, `GATE` at the preflight/
162
+ fit/smoke verdicts, `DISPATCH`/`VERIFY` `actual_model`/`actual_effort` vs
163
+ expected `OUTCOME`, `FINISH`, plus `decisions` = the WHY), then dispatch
164
+ `orc-trace-writer-haiku-4-5` PAIRED with the next dispatch; fast batches to
165
+ **2 packets** (preflight+dispatch, gate+ship). A phase ending with
166
+ zero new trace lines is a protocol violation — dispatch its packet NOW. The
167
+ `FINISH` packet returns BEFORE you delete `log_dir/.current`.
168
+
169
+ ## Config
170
+
171
+ Resolve at run start (`../orc/config.md` ← `.claude/orc.config.yaml`):
172
+ `wiki_fresh_max` / `wiki_aging_max` (tier edges) + `log_dir`. Fast has no
173
+ config key of its own command-entry only; wave/scoring/review keys never
174
+ apply.
175
+
176
+ ## Checkpoint (minimal, append-only)
177
+
178
+ One `fast-checkpoint.md` in the run folder: GATE results (+ any
179
+ `wiki_stale_override`), the dispatch, smoke verdicts, OUTCOME enough for
180
+ /orc-retro mining and fresh-session resume, nothing more.
181
+
182
+ ## What fast still enforces (from the main hard rules)
183
+
184
+ Never implement yourself (smoke gate = read-only build+test) · all artifacts
185
+ in the run subfolder, never project root · validate the subagent return
186
+ (malformed = failure) · never offer commit on a red build · report the
187
+ dispatch + remind the user to run `/usage` (never invoke it programmatically).