@azure-id/orc 2.0.2 → 2.1.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 +455 -0
- package/README-id.md +52 -23
- package/README.md +36 -20
- package/bin/build-agents.js +205 -206
- package/bin/clear-logs.js +620 -0
- package/bin/cli.js +47417 -46420
- package/bin/fix.js +459 -0
- package/bin/gotcha.js +288 -8
- package/bin/habit.js +1538 -1453
- package/bin/mockrun-catalog.js +3 -0
- package/bin/onboarding-content.js +2 -1
- package/bin/pricing.json +28 -21
- package/bin/trace-write.js +869 -657
- package/bin/verify-contracts.js +5552 -5471
- package/bin/verify-package.js +716 -705
- package/bin/webui/api.js +125 -6
- package/bin/webui/css/panels/hookui.css +79 -0
- package/bin/webui/fixtures/behaviour.js +30 -0
- package/bin/webui/fixtures/extra.js +2036 -2036
- package/bin/webui/fixtures/flow.js +81 -81
- package/bin/webui/fixtures/hookui.js +506 -431
- package/bin/webui/fixtures/index.js +32 -3
- package/bin/webui/fixtures/knowledge.js +2 -2
- package/bin/webui/fixtures/maintenance.js +123 -42
- package/bin/webui/fixtures/rules.js +1007 -1002
- package/bin/webui/fixtures/settings.js +6 -7
- package/bin/webui/fixtures/stats.js +9 -6
- package/bin/webui/fixtures/wait.js +98 -97
- package/bin/webui/i18n/en/behaviour.json +13 -0
- package/bin/webui/i18n/en/hookui.json +290 -194
- package/bin/webui/i18n/en/maintenance.json +71 -52
- package/bin/webui/i18n/en/settings.json +60 -60
- package/bin/webui/i18n/id/behaviour.json +13 -0
- package/bin/webui/i18n/id/hookui.json +290 -194
- package/bin/webui/i18n/id/maintenance.json +71 -52
- package/bin/webui/i18n/id/settings.json +60 -60
- package/bin/webui/js/05-banners.js +181 -172
- package/bin/webui/js/06-edit.js +193 -183
- package/bin/webui/js/panels/behaviour.js +77 -12
- package/bin/webui/js/panels/hookui.js +2196 -1691
- package/bin/webui/js/panels/maintenance.js +336 -235
- package/bin/webui/js/panels/settings.js +726 -719
- package/mock-run/INDEX.md +1 -0
- package/mock-run/a-normal-day.md +2 -2
- package/mock-run/extra-slots.md +177 -177
- package/mock-run/habits.md +1 -1
- package/mock-run/orc-aftermath.md +392 -392
- package/mock-run/orc-budget.md +29 -33
- package/mock-run/orc-cli.md +200 -200
- package/mock-run/orc-explain.md +86 -86
- package/mock-run/orc-extra.md +389 -392
- package/mock-run/orc-fast.md +2 -2
- package/mock-run/orc-fix.md +87 -0
- package/mock-run/orc-pattern.md +112 -112
- package/mock-run/orc-quick.md +146 -146
- package/mock-run/orc.md +4 -4
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +176 -173
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -2
- package/templates/agents/{orc-claude-writer-opus-5-med.md → orc-claude-writer-opus-5-low.md} +4 -4
- package/templates/agents/orc-executor-haiku-4-5.md +1 -1
- package/templates/agents/orc-executor-opus-5-low.md +1 -1
- package/templates/agents/orc-executor-sonnet-4-6-high.md +1 -1
- package/templates/agents/orc-executor-sonnet-4-6-med.md +1 -1
- package/templates/agents/orc-executor-sonnet-5-high.md +2 -2
- package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
- package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +2 -2
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -2
- package/templates/agents/{orc-recon-sonnet-4-6-med.md → orc-recon-sonnet-5-med.md} +4 -4
- package/templates/agents/orc-retro-sonnet-5-high.md +2 -2
- package/templates/agents/{orc-reviewer-opus-5-med.md → orc-reviewer-opus-5-low.md} +4 -4
- package/templates/agents/{orc-wiki-scanner-opus-5-med.md → orc-wiki-scanner-opus-5-low.md} +3 -3
- package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +2 -2
- package/templates/commands/orc-fast.md +10 -10
- package/templates/commands/orc-fix.md +18 -0
- package/templates/commands/orc-wiki.md +64 -64
- package/templates/hooks/README.md +75 -7
- package/templates/hooks/orc-session-hook.js +78 -3
- package/templates/hooks/orc-statusline-render.js +317 -23
- package/templates/hooks/orc-statusline.js +162 -49
- package/templates/hooks/orc-subagent-line.js +23 -5
- package/templates/hooks/orc-weather-fetch.js +123 -0
- package/templates/skills/_shared/extra-dispatch.md +1331 -1331
- package/templates/skills/_shared/gotchas.md +27 -7
- package/templates/skills/_shared/habits.md +2 -2
- package/templates/skills/_shared/opus5-only.md +137 -137
- package/templates/skills/_shared/phases/review.md +2 -2
- package/templates/skills/_shared/phases/trace-verbs.md +17 -3
- package/templates/skills/_shared/phases/trace.md +136 -136
- package/templates/skills/_shared/review-slice.md +28 -1
- package/templates/skills/_shared/wait.md +1 -0
- package/templates/skills/orc/README.md +2 -2
- package/templates/skills/orc/SKILL.md +227 -227
- package/templates/skills/orc/config.md +25 -27
- package/templates/skills/orc/examples/full-run-mock.md +74 -73
- package/templates/skills/orc/references/effort-and-mode.md +222 -222
- package/templates/skills/orc/references/preflight-report.md +3 -3
- package/templates/skills/orc/references/ultra-mode.md +1 -1
- package/templates/skills/orc/schemas/checkpoint.md +122 -122
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +3 -3
- package/templates/skills/orc/subskills/orc-review-verify/core.md +1 -1
- package/templates/skills/orc-analyze/SKILL.md +4 -2
- package/templates/skills/orc-claude/SKILL.md +14 -14
- package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
- package/templates/skills/orc-diy/SKILL.md +5 -5
- package/templates/skills/orc-fast/SKILL.md +210 -208
- package/templates/skills/orc-fix/SKILL.md +110 -0
- package/templates/skills/orc-grill/SKILL.md +232 -232
- package/templates/skills/orc-grill/references/grill-doc.md +1 -1
- package/templates/skills/orc-mini/SKILL.md +4 -4
- package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
- package/templates/skills/orc-quick/README.md +536 -536
- package/templates/skills/orc-quick/SKILL.md +2 -2
- package/templates/skills/orc-quick/references/context-doc.md +145 -145
- package/templates/skills/orc-quick/references/dispatch-gate.md +220 -219
- package/templates/skills/orc-quick/references/gh-mode.md +4 -2
- package/templates/skills/orc-retro/SKILL.md +1 -1
- package/templates/skills/orc-retro/examples/retro-mock.md +16 -16
- package/templates/skills/orc-wiki/README.md +325 -325
- package/templates/skills/orc-wiki/SKILL.md +195 -195
- package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
- package/templates/skills/orc-wiki/references/extra.md +2 -2
- package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
- package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -1
- package/templates/skills/orc-wiki/references/phases/phase-2.md +3 -3
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +3 -2
- package/templates/agents/orc-claude-writer-opus-4-8-high.md +0 -48
- package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +0 -74
|
@@ -1,208 +1,210 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orc-fast
|
|
3
|
-
description: >
|
|
4
|
-
Fastest ORC lane — knowledge-gated single-executor implementation, with no
|
|
5
|
-
analyst and no planner. Use for "use orc-fast to implement X" or "/orc-fast".
|
|
6
|
-
Requires TWO prerequisites: a fresh project wiki (orc-wiki) AND a cached
|
|
7
|
-
code-pattern for the request's language. If either is missing, it falls back
|
|
8
|
-
to orc-mini. One Sonnet
|
|
9
|
-
round, ship.
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# ORC-FAST
|
|
13
|
-
|
|
14
|
-
The speed lane: precomputed knowledge instead of pipeline phases — the wiki
|
|
15
|
-
supplies grounding, the pattern cache supplies house style, so fast pays for
|
|
16
|
-
neither an analyst nor a planner. That trade only holds when both exist and
|
|
17
|
-
the wiki is fresh, so the two prerequisite gates below are hard: fail either →
|
|
18
|
-
**fall back to orc-mini** carrying whatever intake was done. Fallback is the
|
|
19
|
-
router — orc-fast is always safe to try.
|
|
20
|
-
|
|
21
|
-
Runs fine with the orchestrator at **Sonnet 4.6
|
|
22
|
-
no scoring, no planning judgment (the effort guard only gates the full `orc`
|
|
23
|
-
skill). **You never implement — you spawn.**
|
|
24
|
-
|
|
25
|
-
## What fast deliberately does NOT have
|
|
26
|
-
|
|
27
|
-
No analyst, planner, scoring, waves, reviewer, verifier, test-author, or
|
|
28
|
-
summary. One executor, one smoke gate, one repair round. More than that → the
|
|
29
|
-
fit gate hands it to orc-mini.
|
|
30
|
-
|
|
31
|
-
## Phases
|
|
32
|
-
|
|
33
|
-
`orc lane phases orc-fast --json` is this lane's pipeline. **The CLI owns the order**:
|
|
34
|
-
never derive it from the headings below, and never rename or renumber one
|
|
35
|
-
without the manifest (`../_shared/lane-contract.md` §Phases).
|
|
36
|
-
|
|
37
|
-
## Phase F0 — Preflight (the two prerequisite gates; no spawn)
|
|
38
|
-
|
|
39
|
-
Emit a `GATE` trace line per check.
|
|
40
|
-
|
|
41
|
-
**
|
|
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
|
-
- the
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
`
|
|
112
|
-
the
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
`.claude/orc/
|
|
121
|
-
`
|
|
122
|
-
|
|
123
|
-
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
`
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
1
|
+
---
|
|
2
|
+
name: orc-fast
|
|
3
|
+
description: >
|
|
4
|
+
Fastest ORC lane — knowledge-gated single-executor implementation, with no
|
|
5
|
+
analyst and no planner. Use for "use orc-fast to implement X" or "/orc-fast".
|
|
6
|
+
Requires TWO prerequisites: a fresh project wiki (orc-wiki) AND a cached
|
|
7
|
+
code-pattern for the request's language. If either is missing, it falls back
|
|
8
|
+
to orc-mini. One Sonnet 5 medium executor, a build+test smoke gate, one repair
|
|
9
|
+
round, ship.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ORC-FAST
|
|
13
|
+
|
|
14
|
+
The speed lane: precomputed knowledge instead of pipeline phases — the wiki
|
|
15
|
+
supplies grounding, the pattern cache supplies house style, so fast pays for
|
|
16
|
+
neither an analyst nor a planner. That trade only holds when both exist and
|
|
17
|
+
the wiki is fresh, so the two prerequisite gates below are hard: fail either →
|
|
18
|
+
**fall back to orc-mini** carrying whatever intake was done. Fallback is the
|
|
19
|
+
router — orc-fast is always safe to try.
|
|
20
|
+
|
|
21
|
+
Runs fine with the orchestrator at **Sonnet 5, medium effort** (a Sonnet 4.6 main session is below the executor pin) —
|
|
22
|
+
no scoring, no planning judgment (the effort guard only gates the full `orc`
|
|
23
|
+
skill). **You never implement — you spawn.**
|
|
24
|
+
|
|
25
|
+
## What fast deliberately does NOT have
|
|
26
|
+
|
|
27
|
+
No analyst, planner, scoring, waves, reviewer, verifier, test-author, or
|
|
28
|
+
summary. One executor, one smoke gate, one repair round. More than that → the
|
|
29
|
+
fit gate hands it to orc-mini.
|
|
30
|
+
|
|
31
|
+
## Phases
|
|
32
|
+
|
|
33
|
+
`orc lane phases orc-fast --json` is this lane's pipeline. **The CLI owns the order**:
|
|
34
|
+
never derive it from the headings below, and never rename or renumber one
|
|
35
|
+
without the manifest (`../_shared/lane-contract.md` §Phases).
|
|
36
|
+
|
|
37
|
+
## Phase F0 — Preflight (the two prerequisite gates; no spawn)
|
|
38
|
+
|
|
39
|
+
Emit a `GATE` trace line per check.
|
|
40
|
+
|
|
41
|
+
**0. Config, FIRST.** `orc lane config orc-fast --json`: obey `effective`, print
|
|
42
|
+
`announce[]` VERBATIM, honour `stops[]`; never merge `.claude/orc.config.yaml`
|
|
43
|
+
(`../_shared/config-precedence.md`). **`habits{}` in it → print `habits.line`,
|
|
44
|
+
read `../_shared/habits.md` NOW.**
|
|
45
|
+
|
|
46
|
+
**a. Wiki gate.** Decide existence with `orc wiki status` — the deterministic
|
|
47
|
+
probe in `../_shared/detecting-artifacts.md`, never an ad-hoc `find` (`.claude`
|
|
48
|
+
is hidden). `none` = gate FAILED → fallback; else read the tier from
|
|
49
|
+
`orc wiki status --json` → `.tier` (FRESH / AGING / STALE; the CLI computes
|
|
50
|
+
it — never recompute it by hand).
|
|
51
|
+
- **FRESH** → proceed silently. **AGING** → one-line notice, proceed.
|
|
52
|
+
- **STALE** → the user judges. Ask (H `fast.f0.stale-wiki`) with exactly these options:
|
|
53
|
+
1. **Refresh wiki, then continue fast** *(recommended)* — run orc-wiki's
|
|
54
|
+
incremental refresh (diff since `scan_commit`, re-scan only affected
|
|
55
|
+
docs), then re-enter this preflight.
|
|
56
|
+
2. **Drop to orc-mini** *(preferable if in a hurry — mini grounds itself)*.
|
|
57
|
+
3. **Continue fast anyway** *(not recommended — the executor may follow
|
|
58
|
+
stale claims)* — proceed and stamp `wiki_stale_override: true` in the
|
|
59
|
+
checkpoint so /orc-retro can correlate outcomes with overrides.
|
|
60
|
+
|
|
61
|
+
**b. Pattern gate.** Detect the request's language (file extensions / repo
|
|
62
|
+
deps, same signals as the full lane's tagging) and confirm the cache with
|
|
63
|
+
`orc pattern status <lang>` (exit 0 = cached — the deterministic probe in
|
|
64
|
+
`../_shared/detecting-artifacts.md`, never an ad-hoc `find`). Absent for the
|
|
65
|
+
language in play → gate FAILED → fallback. (A request touching no FE/BE language — pure docs/
|
|
66
|
+
config — passes this gate as N/A.) The cross-cutting `postgres` pattern is
|
|
67
|
+
NEVER a gate prerequisite — it is bonus-only (injected at F2 on a cache HIT),
|
|
68
|
+
so a missing `postgres-pattern.md` never fails the gate or forces a fallback.
|
|
69
|
+
|
|
70
|
+
**Any gate FAILED** → announce which prerequisite failed in one line, then
|
|
71
|
+
hand off to orc-mini via the fallback contract below. Never stop the chat.
|
|
72
|
+
|
|
73
|
+
**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. The code graph is NOT a gate either (e. below).
|
|
74
|
+
|
|
75
|
+
**e. Code graph cache — NOT a gate, and never skipped** (`../_shared/code-graph.md` §0). Every call carries
|
|
76
|
+
`--if-enabled`: exit 3 = off → print `graph: off` once, make no other graph call. Print each JSON `line`; put
|
|
77
|
+
each `trace` in the next packet VERBATIM. (1) **Here:** `orc graph status --if-enabled --heal --json --brief` builds or
|
|
78
|
+
updates the cache itself. (2) **F2 slice:** ONE `orc graph ctx <declared files> --if-enabled --json --brief` → its `card`
|
|
79
|
+
is the `graph` block; the return carries `graph_used`. (3) **F3 GREEN:** `orc graph update --if-enabled --json --brief`,
|
|
80
|
+
then one `orc graph notes pending` batch — the next run starts from this cache. A missing graph never falls back.
|
|
81
|
+
|
|
82
|
+
**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.
|
|
83
|
+
|
|
84
|
+
Their shape and four rules: `../_shared/phases/preflight.md` (`core`). The
|
|
85
|
+
probes are this lane's own.
|
|
86
|
+
|
|
87
|
+
## Phase F1 — Fit gate + micro-intake (one pass, ONE user round-trip)
|
|
88
|
+
|
|
89
|
+
Draft a 3–5 line intent spec + 2–3 acceptance bullets. Judge fit: more than
|
|
90
|
+
one real task, ~5+ files, or core/security-sensitive surface → fallback to
|
|
91
|
+
orc-mini WITH the intent spec attached (no rework); emit a `GATE` line for the
|
|
92
|
+
verdict. Then the lane's ONLY pre-spawn ask — one combined confirmation:
|
|
93
|
+
preflight result + intent spec + acceptance bullets + "proceed?" (soft
|
|
94
|
+
sign-off; never split into multiple questions). Create the run folder
|
|
95
|
+
(`.claude/orc/run/{run-slug}/` — shared format, so fallback needs no
|
|
96
|
+
migration) and write the intent-spec + a minimal checkpoint.
|
|
97
|
+
|
|
98
|
+
## Phase F2 — Slice build + dispatch (ONE executor)
|
|
99
|
+
|
|
100
|
+
Build one slice for `orc-executor-sonnet-5-med` (dispatch BY NAME; model
|
|
101
|
+
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.5 main session, so the "runs fine at Sonnet medium" premise applies only with it off (`../_shared/opus5-only.md`).
|
|
102
|
+
|
|
103
|
+
**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.
|
|
104
|
+
|
|
105
|
+
- the task (intent spec) + acceptance bullets as definition-of-done
|
|
106
|
+
- **wiki pointers, not content** (fast's lane-delta in
|
|
107
|
+
`../_shared/phases/wiki-consult.md`): the PATHS of 1–3 relevant pages
|
|
108
|
+
selected from `wiki/INDEX.md` by keyword match — prefer the cross-cutting
|
|
109
|
+
maps (`orc-reference-api-surface` etc.) when the domain matches. Instruct
|
|
110
|
+
the executor to READ them first, and include the precedence line verbatim:
|
|
111
|
+
`code > fresh wiki > stale wiki (hints) > model priors`. Never paste wiki
|
|
112
|
+
bodies into the slice (a Sonnet-medium orchestrator curating wiki prose
|
|
113
|
+
defeats the lane). **Emit `WIKI-CONSULT <tier> :: docs=<the selected pointer
|
|
114
|
+
paths>`** (tier from the F0 gate; `docs=none` if no pages fit) — the F0
|
|
115
|
+
`GATE` line captured the gate *decision*; this captures which pages grounded
|
|
116
|
+
the run.
|
|
117
|
+
- the cached pattern injected LITERALLY (same `pattern` slice contract as
|
|
118
|
+
full; the pattern file is small by design)
|
|
119
|
+
- **crosslink (cross-repo, advisory):** a task touching a boundary in
|
|
120
|
+
`.claude/orc/crosslink/needs.json` gets the cached linked contract injected
|
|
121
|
+
as `crosslink` ("hints, not verified") — advisory, never blocks, never
|
|
122
|
+
outranks local code.
|
|
123
|
+
- **`db:postgres` bonus:** a data-access task with
|
|
124
|
+
`.claude/orc/patterns/postgres-pattern.md` CACHED merges it into the same
|
|
125
|
+
`pattern` slice (query invariants). Cache MISS → skip silently — fast never
|
|
126
|
+
codifies and never falls back on this.
|
|
127
|
+
- **the read ladder** (`../_shared/read-ladder.md`): read only as far up as the
|
|
128
|
+
question needs — a file the task will EDIT is read in full first. Precomputed
|
|
129
|
+
knowledge REPLACING exploration is this lane; a directory sweep is not. With the graph on, `orc graph ctx` cards locate first.
|
|
130
|
+
- the standing `house_rules` card (`../_shared/phases/house-rules.md`, literal,
|
|
131
|
+
same as full/mini) + the `rules_card` under it (`orc rules slice` → `text`, verbatim)
|
|
132
|
+
- constraints from the intent spec
|
|
133
|
+
- **terse-return rule:** standard contract fields, NO narrative prose — files
|
|
134
|
+
changed, one-line diff summary, smoke-relevant notes only.
|
|
135
|
+
|
|
136
|
+
Validate the return per `../_shared/return-validation.md` §1–§3 + the § of
|
|
137
|
+
each field you injected — `unmet[]`
|
|
138
|
+
honesty, `pattern_version` + `invariants_checked` attestation, `actual_model`
|
|
139
|
+
/ `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
|
|
140
|
+
return = failure (one re-dispatch, then fallback offer).
|
|
141
|
+
|
|
142
|
+
**Before any re-dispatch, run `orc run inflight`**. A Task error does not kill the agent behind it, and exit 2 REFUSES by default — `a lane that re-dispatches over a live attempt` has broken the contract. Canonical: `../_shared/return-validation.md`.
|
|
143
|
+
|
|
144
|
+
## Phase F3 — Smoke gate (build + test; blocks ship on red)
|
|
145
|
+
|
|
146
|
+
Run the gate per `../_shared/smoke-gate.md`, sourcing commands **from
|
|
147
|
+
`wiki-meta.json`'s `commands` block** (recorded at wiki scan — don't
|
|
148
|
+
rediscover tooling; manifest lacks them → detect once and say so). **GREEN**
|
|
149
|
+
→ code-graph step e.(3) (never a gate) → ship. **RED** → the flaky check, then one repair round; second red → STOP and offer: escalate to
|
|
150
|
+
orc-mini (reason `smoke-red-escalation`) / switch to full `/orc` / stop.
|
|
151
|
+
Docs-only → gate N/A, say so.
|
|
152
|
+
|
|
153
|
+
## Phase F3.5 — Mock example (config `mock_example`, default ask)
|
|
154
|
+
|
|
155
|
+
After a GREEN F3, before ship (H `fast.f3-5.mock`): follow `../_shared/drift-recovery.md` (load on
|
|
156
|
+
fire) — the `mock-examples/<change-slug>/` deliverable, the `DRIFT-FROM` loop and
|
|
157
|
+
its cap. Trace: `PHASE mock-example`, `DRIFT loop=<n>`.
|
|
158
|
+
|
|
159
|
+
## Phase F4 — Ship
|
|
160
|
+
|
|
161
|
+
Offer commit (H `fast.f4.ship` · `any.ship.review-before-push`; push if asked; never stage `mock-examples/`). Append the final markers to the checkpoint, emit
|
|
162
|
+
`OUTCOME task=… band=fast model=… retries=… unmet=…` + `FINISH`, show the
|
|
163
|
+
dispatch line (model/effort actually used) + the `/usage` reminder. Every end — ship
|
|
164
|
+
or a red STOP — prints the card (`../_shared/phases/summary.md` §End-of-run card). Fast never
|
|
165
|
+
triggers the post-ship wiki refresh ask (preflight polices freshness on the
|
|
166
|
+
way in) — the passive stale-flag note still applies to touched covered files.
|
|
167
|
+
|
|
168
|
+
## Fallback contract (orc-fast → orc-mini)
|
|
169
|
+
|
|
170
|
+
Follow the writer side of `../_shared/fallback-handoff.md`: announce the
|
|
171
|
+
failed gate in one line, write the `FALLBACK-FROM` block into the run folder
|
|
172
|
+
(REASON: wiki-absent | wiki-stale-user-choice | pattern-absent | fit-gate |
|
|
173
|
+
smoke-red-escalation), and invoke orc-mini pointing at it. The run folder is
|
|
174
|
+
already in the shared format — no migration.
|
|
175
|
+
|
|
176
|
+
## Behavior trace (always on)
|
|
177
|
+
|
|
178
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases orc-fast --json` →
|
|
179
|
+
`trace_grammar` gives the verbs). Lane token `fast`, tier
|
|
180
|
+
**Build lanes** — batched to **2 packets** (preflight+dispatch ·
|
|
181
|
+
gate+ship) → `orc trace write --packet -`. At run start write `log_dir/.current` =
|
|
182
|
+
`run-fast-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
|
|
183
|
+
in the SAME step. A phase that ends with `zero new trace lines is a protocol violation`.
|
|
184
|
+
|
|
185
|
+
## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
|
|
186
|
+
|
|
187
|
+
- **Calls:** `orc lane calls orc-fast --json` names every call and its exit codes.
|
|
188
|
+
**An exit code is an ANSWER where it says so, not a failure.** Make no other call.
|
|
189
|
+
- **Config:** F0 step 0.
|
|
190
|
+
- **Rules:** `orc rules slice --lane orc-fast --json` is the ONLY assembler
|
|
191
|
+
(`../_shared/phases/rules.md`). Its `line` prints VERBATIM at preflight.
|
|
192
|
+
|
|
193
|
+
Fast has no config key of its own — command-entry only; wave/scoring/review
|
|
194
|
+
keys never apply, and the tier edges the F0 gate reads arrive resolved.
|
|
195
|
+
|
|
196
|
+
## Checkpoint (minimal, append-only)
|
|
197
|
+
|
|
198
|
+
One `fast-checkpoint.md` in the run folder: GATE results (+ any
|
|
199
|
+
`wiki_stale_override`), the dispatch, smoke verdicts, OUTCOME — enough for
|
|
200
|
+
/orc-retro mining and fresh-session resume, nothing more.
|
|
201
|
+
|
|
202
|
+
## What fast still enforces
|
|
203
|
+
|
|
204
|
+
All artifacts in the run subfolder, never project root · never offer commit on
|
|
205
|
+
a red build · never invoke `/usage` programmatically.
|
|
206
|
+
|
|
207
|
+
## Waiting mid-run (`/orc-wait`)
|
|
208
|
+
|
|
209
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
210
|
+
Checkpoint **full** · safe point **after the executor returns**.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orc-fix
|
|
3
|
+
description: >
|
|
4
|
+
Say "this is a fix, and here is what it fixes". Use for "/orc-fix", "this
|
|
5
|
+
fixes Sonar typescript:S3776", "ORC caused this defect", "this bug came from
|
|
6
|
+
AI-generated code", "record this fix". It classifies the fix from evidence,
|
|
7
|
+
asks once, and records it so the next review sees it. A rider: it opens no
|
|
8
|
+
run and returns to exactly where the run was. With no run open it can also
|
|
9
|
+
make the fix, like /orc-quick.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ORC — the fix record
|
|
13
|
+
|
|
14
|
+
A RIDER lane, like `/orc-wait` and `/orc-explain`. It opens no run of its own,
|
|
15
|
+
writes no `run-<lane>-<slug>` pointer and never writes `.current`. The user can
|
|
16
|
+
call it at any time — also while another lane waits at a question.
|
|
17
|
+
|
|
18
|
+
## What this lane never does
|
|
19
|
+
|
|
20
|
+
- It never begins between a dispatch and its validated return.
|
|
21
|
+
- It never changes the host run: no re-plan, no re-score, no new task. A
|
|
22
|
+
suspend does not widen anyone's authority.
|
|
23
|
+
- With a run open, it never writes code. The host lane makes the fix — two
|
|
24
|
+
writers on one tree is the conflict `/orc-wait` forbids (DE-12).
|
|
25
|
+
- It never sets `miss` itself, and never records `author: orc`. The CLI does
|
|
26
|
+
the first, and refuses the second.
|
|
27
|
+
|
|
28
|
+
## F0 — look (silent)
|
|
29
|
+
|
|
30
|
+
Run `orc fix classify --text "<the user's words>" --json`. The CLI reads the
|
|
31
|
+
git state, `git blame` on the named lines, the traces and the host run, and
|
|
32
|
+
proposes ONE class on two axes:
|
|
33
|
+
|
|
34
|
+
- `source` (what found it): `sonar` · `ci` · `defect` · `pr` · `review` · `other`
|
|
35
|
+
- `introduced_by` (who wrote the bad lines): `orc` · `ai` · `human` · `unknown`
|
|
36
|
+
|
|
37
|
+
| exit | meaning | what you do |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| 0 | classified | go to F1 |
|
|
40
|
+
| 1 | a dispatch is in flight | say so, wait for its return, then run F0 again |
|
|
41
|
+
| 2 | no text | ask what the fix fixes |
|
|
42
|
+
|
|
43
|
+
Never classify in your head. The user's three cases: "a SonarQube fix" →
|
|
44
|
+
`source: sonar`; "a defect caused by ORC" → `source: defect, introduced_by:
|
|
45
|
+
orc`; "a bug caused by AI-generated code" → `introduced_by: ai`.
|
|
46
|
+
|
|
47
|
+
## F1 — ask once (H `fix.f1.class`)
|
|
48
|
+
|
|
49
|
+
Show the proposed class, every `evidence` line and the file, then:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
This fix: source sonar · introduced by ORC (run-mini-total-290926)
|
|
53
|
+
- a Sonar rule key (typescript:S3776)
|
|
54
|
+
- git blame → 4c1e2a9: the commit falls inside the run's trace window ...
|
|
55
|
+
1. confirm 2. change the class 3. cancel
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The user's word wins over the evidence. A changed class goes into the record
|
|
59
|
+
as `class_by: "user"`; a confirmed one as `class_by: "evidence"`. Cancel →
|
|
60
|
+
nothing is written; return to the run.
|
|
61
|
+
|
|
62
|
+
## F2 — record
|
|
63
|
+
|
|
64
|
+
Pipe the classify answer's `record` object (with the user's class and
|
|
65
|
+
`class_by`) to `orc fix record - --json`. The CLI:
|
|
66
|
+
|
|
67
|
+
1. writes ONE observation through the gotcha store — with a Sonar issue key it
|
|
68
|
+
uses the importer's own id, so a later `gotcha sync` completes the same row;
|
|
69
|
+
2. computes `miss` from the stored review scopes;
|
|
70
|
+
3. writes ONE `FIX` line into the HOST run's trace, when one is open;
|
|
71
|
+
4. prints ONE line. Show it VERBATIM, then stop.
|
|
72
|
+
|
|
73
|
+
Exit 1 → a dispatch started meanwhile; nothing was written. Wait, then F2 again.
|
|
74
|
+
|
|
75
|
+
## No run open — offer the fix (DE-12)
|
|
76
|
+
|
|
77
|
+
`mode: may-fix` from F0 → offer to make the fix before F2, like `/orc-quick`:
|
|
78
|
+
|
|
79
|
+
1. The user picks the executor at the `/orc-quick` dispatch gate (that lane's
|
|
80
|
+
`dispatch-gate.md` reference, "Writing code") — nothing spawns without a yes.
|
|
81
|
+
2. The slice carries `orc rules slice --lane orc-fix --json` (below).
|
|
82
|
+
3. The smoke gate (`../_shared/smoke-gate.md`): red blocks the record.
|
|
83
|
+
4. F2 with `outcome: "addressed"` and `via: "orc-fix"`.
|
|
84
|
+
|
|
85
|
+
The user can also say "record only" — then F2 at once.
|
|
86
|
+
|
|
87
|
+
## Config
|
|
88
|
+
|
|
89
|
+
`orc lane config orc-fix --json`, obey `effective`. Never merge
|
|
90
|
+
`.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`).
|
|
91
|
+
|
|
92
|
+
## Rules — the anti-slop card (`../_shared/phases/rules.md`)
|
|
93
|
+
|
|
94
|
+
`orc rules slice --lane orc-fix --json` is the ONLY assembler. It rides only in
|
|
95
|
+
an executor slice of the no-run fix.
|
|
96
|
+
|
|
97
|
+
## Habits and trace
|
|
98
|
+
|
|
99
|
+
**Habits:** the host run had `habits{}` in its config answer → read
|
|
100
|
+
`../_shared/habits.md`; its next packet takes the `ASK` for `fix.f1.class`
|
|
101
|
+
(class `never`: a fact is never a habit). No `habits{}` → ignore `(H …)`.
|
|
102
|
+
|
|
103
|
+
**Trace:** the CLI writes the `FIX` line itself. You do not narrate it and you
|
|
104
|
+
do not repeat it. With no run open, nothing is traced — the record is the
|
|
105
|
+
observation.
|
|
106
|
+
|
|
107
|
+
## Waiting mid-run (`/orc-wait`)
|
|
108
|
+
|
|
109
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
110
|
+
Checkpoint **none** · safe point **after the record is written**. Nothing here to checkpoint, so all three modes behave identically — say so rather than asking.
|