@azure-id/orc 0.56.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +219 -0
- package/README-id.md +49 -107
- package/README.md +694 -719
- package/bin/build-agents.js +18 -11
- package/bin/cli.js +33699 -29855
- package/bin/onboarding-content.js +0 -3
- package/bin/test-run.js +491 -0
- package/bin/verify-contracts.js +4330 -3277
- package/bin/verify-package.js +76 -6
- package/bin/webui/api.js +1201 -1163
- package/bin/webui/app.html +210 -198
- package/bin/webui/css/06-responsive.css +120 -108
- package/bin/webui/css/panels/extra.css +29 -0
- package/bin/webui/css/panels/lanes.css +134 -0
- package/bin/webui/css/panels/settings.css +79 -3
- package/bin/webui/css/panels/wait.css +123 -0
- package/bin/webui/fixtures/extra.js +2036 -1934
- package/bin/webui/fixtures/flow.js +2 -2
- package/bin/webui/fixtures/index.js +510 -486
- package/bin/webui/fixtures/lanes.js +218 -0
- package/bin/webui/fixtures/settings.js +261 -34
- package/bin/webui/fixtures/stats.js +3 -3
- package/bin/webui/fixtures/wait.js +97 -0
- package/bin/webui/i18n/TERMS.md +135 -134
- package/bin/webui/i18n/en/extra.json +345 -313
- package/bin/webui/i18n/en/lanes.json +29 -0
- package/bin/webui/i18n/en/nav.json +21 -19
- package/bin/webui/i18n/en/overview.json +2 -0
- package/bin/webui/i18n/en/settings.json +16 -5
- package/bin/webui/i18n/en/wait.json +41 -0
- package/bin/webui/i18n/id/extra.json +345 -313
- package/bin/webui/i18n/id/lanes.json +29 -0
- package/bin/webui/i18n/id/nav.json +21 -19
- package/bin/webui/i18n/id/overview.json +2 -0
- package/bin/webui/i18n/id/settings.json +15 -4
- package/bin/webui/i18n/id/wait.json +41 -0
- package/bin/webui/js/01-i18n.js +151 -149
- package/bin/webui/js/panels/extra.js +3199 -3011
- package/bin/webui/js/panels/lanes.js +259 -0
- package/bin/webui/js/panels/overview.js +10 -0
- package/bin/webui/js/panels/settings.js +149 -3
- package/bin/webui/js/panels/wait.js +253 -0
- package/package.json +39 -39
- package/templates/agents/MODEL-MAPPING.md +23 -35
- package/templates/agents/orc-executor-opus-4-7-high.md +1 -1
- package/templates/agents/orc-executor-opus-4-7-med.md +1 -1
- package/templates/agents/orc-executor-opus-4-8-high.md +1 -1
- package/templates/agents/orc-executor-opus-5-high.md +1 -1
- package/templates/agents/orc-executor-opus-5-low.md +1 -1
- package/templates/agents/orc-executor-opus-5-med.md +1 -1
- package/templates/agents/orc-retro-opus-5-med.md +73 -73
- package/templates/agents/orc-retro-sonnet-5-high.md +72 -72
- package/templates/agents/orc-trace-writer-haiku-4-5.md +107 -107
- package/templates/commands/orc-route.md +1 -1
- package/templates/commands/orc-wait.md +19 -0
- package/templates/commands/orc.md +1 -1
- package/templates/hooks/orc-statusline.js +39 -0
- package/templates/skills/_shared/README.md +7 -3
- package/templates/skills/_shared/config-precedence.md +198 -0
- package/templates/skills/_shared/drift-recovery.md +1 -1
- package/templates/skills/_shared/extra-dispatch.md +159 -7
- package/templates/skills/_shared/interview.md +1 -1
- package/templates/skills/_shared/opus5-only.md +9 -7
- package/templates/skills/_shared/phases/README.md +82 -0
- package/templates/skills/{orc/references → _shared/phases}/analyst-gates.md +15 -3
- package/templates/skills/_shared/phases/execution.md +143 -0
- package/templates/skills/{orc/references → _shared/phases}/house-rules.md +13 -1
- package/templates/skills/{orc/references → _shared/phases}/intake.md +15 -2
- package/templates/skills/_shared/phases/mock-example.md +56 -0
- package/templates/skills/{orc/references → _shared/phases}/plan-handoff.md +16 -3
- package/templates/skills/_shared/phases/planning.md +135 -0
- package/templates/skills/_shared/phases/preflight.md +98 -0
- package/templates/skills/_shared/phases/review.md +53 -0
- package/templates/skills/_shared/phases/scoring.md +65 -0
- package/templates/skills/{orc/references → _shared/phases}/security-checklist.md +12 -1
- package/templates/skills/_shared/phases/security.md +55 -0
- package/templates/skills/_shared/phases/ship.md +88 -0
- package/templates/skills/{orc/references/stop-and-resume.md → _shared/phases/stop-resume.md} +169 -160
- package/templates/skills/_shared/phases/summary.md +48 -0
- package/templates/skills/_shared/phases/testgen.md +51 -0
- package/templates/skills/{orc/references/trace-protocol.md → _shared/phases/trace.md} +49 -6
- package/templates/skills/_shared/phases/verify.md +70 -0
- package/templates/skills/{orc/references → _shared/phases}/wave-grouping.md +14 -2
- package/templates/skills/{orc/references → _shared/phases}/wiki-consult.md +13 -1
- package/templates/skills/_shared/read-ladder.md +48 -0
- package/templates/skills/_shared/wait.md +240 -0
- package/templates/skills/context-combiner/SKILL.md +214 -187
- package/templates/skills/orc/README.md +148 -150
- package/templates/skills/orc/SKILL.md +75 -358
- package/templates/skills/orc/config.md +137 -389
- package/templates/skills/orc/examples/full-run-mock.md +1 -1
- package/templates/skills/orc/references/effort-and-mode.md +16 -18
- package/templates/skills/orc/references/phases/intake.md +47 -0
- package/templates/skills/orc/references/phases/integration.md +19 -0
- package/templates/skills/orc/references/preflight-report.md +4 -4
- package/templates/skills/orc/references/ultra-mode.md +117 -123
- package/templates/skills/orc/schemas/planning-output.md +279 -279
- package/templates/skills/orc/subskills/orc-planner/SKILL.md +260 -264
- package/templates/skills/orc/subskills/orc-pr/stack-gate.md +4 -1
- package/templates/skills/orc-aftermath/SKILL.md +158 -136
- package/templates/skills/orc-analyze/SKILL.md +252 -220
- package/templates/skills/orc-analyze/references/branching.md +51 -51
- package/templates/skills/orc-analyze/references/thin-input.md +1 -1
- package/templates/skills/orc-analyze-mini/SKILL.md +128 -112
- package/templates/skills/orc-boundary/SKILL.md +249 -208
- package/templates/skills/orc-brainstorm/SKILL.md +377 -339
- package/templates/skills/orc-budget/SKILL.md +248 -225
- package/templates/skills/orc-challenge/README.md +1 -1
- package/templates/skills/orc-challenge/SKILL.md +298 -255
- package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
- package/templates/skills/orc-claude/SKILL.md +221 -199
- package/templates/skills/orc-diy/README.md +2 -1
- package/templates/skills/orc-diy/SKILL.md +132 -68
- package/templates/skills/orc-diy/references/blocks/analyze.md +1 -1
- package/templates/skills/orc-diy/references/compile.md +21 -7
- package/templates/skills/orc-diy/references/flow-schema.md +2 -2
- package/templates/skills/orc-doc/SKILL.md +49 -7
- package/templates/skills/orc-explain/SKILL.md +24 -0
- package/templates/skills/orc-export/SKILL.md +31 -5
- package/templates/skills/orc-fast/SKILL.md +218 -185
- package/templates/skills/orc-grill/SKILL.md +238 -207
- package/templates/skills/orc-handoff/SKILL.md +223 -204
- package/templates/skills/orc-learn/SKILL.md +181 -156
- package/templates/skills/orc-mini/SKILL.md +47 -24
- package/templates/skills/orc-pact/SKILL.md +255 -218
- package/templates/skills/orc-pattern/SKILL.md +154 -124
- package/templates/skills/orc-poly/SKILL.md +242 -216
- package/templates/skills/orc-poly/references/gather.md +1 -1
- package/templates/skills/orc-pr-driver/SKILL.md +196 -167
- package/templates/skills/orc-pr-driver/references/orc-run-split.md +1 -1
- package/templates/skills/orc-pr-setup/SKILL.md +212 -184
- package/templates/skills/orc-quick/README.md +2 -2
- package/templates/skills/orc-quick/SKILL.md +51 -13
- package/templates/skills/orc-quick/references/dispatch-gate.md +2 -3
- package/templates/skills/orc-retro/SKILL.md +249 -222
- package/templates/skills/orc-retro/examples/retro-mock.md +171 -171
- package/templates/skills/orc-route/SKILL.md +188 -165
- package/templates/skills/orc-verify/SKILL.md +103 -84
- package/templates/skills/orc-wait/SKILL.md +163 -0
- package/templates/skills/orc-wiki/SKILL.md +60 -206
- package/templates/skills/orc-wiki/references/phases/phase-0.md +71 -0
- package/templates/skills/orc-wiki/references/phases/phase-1.md +35 -0
- package/templates/skills/orc-wiki/references/phases/phase-2.md +52 -0
- package/templates/skills/orc-wiki/references/phases/phase-3.md +57 -0
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +36 -0
- package/templates/agents/orc-advisor-fable-5.md +0 -50
- package/templates/agents/orc-analyst-fable-5.md +0 -115
- package/templates/agents/orc-judge-fable-5.md +0 -79
- package/templates/agents/orc-planner-fable-5.md +0 -152
- package/templates/agents/orc-reviewer-fable-5.md +0 -57
- package/templates/skills/_shared/fable5-override.md +0 -56
- package/templates/skills/orc-diy/references/blocks/execution.md +0 -42
- package/templates/skills/orc-diy/references/blocks/mock-example.md +0 -22
- package/templates/skills/orc-diy/references/blocks/planning.md +0 -34
- package/templates/skills/orc-diy/references/blocks/review.md +0 -18
- package/templates/skills/orc-diy/references/blocks/scoring.md +0 -16
- package/templates/skills/orc-diy/references/blocks/security.md +0 -25
- package/templates/skills/orc-diy/references/blocks/ship.md +0 -25
- package/templates/skills/orc-diy/references/blocks/summary.md +0 -18
- package/templates/skills/orc-diy/references/blocks/testgen.md +0 -17
- package/templates/skills/orc-diy/references/blocks/trace.md +0 -28
- package/templates/skills/orc-diy/references/blocks/verify.md +0 -25
|
@@ -1,199 +1,221 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orc-claude
|
|
3
|
-
description: >
|
|
4
|
-
CLAUDE.md builder/updater for the LOCAL project. Use for "/orc-claude",
|
|
5
|
-
"build a CLAUDE.md", "update the CLAUDE.md", or "refresh the CLAUDE.md".
|
|
6
|
-
Runs INDEPENDENTLY — no orchestrator, no run folder. Scans the repo for
|
|
7
|
-
ground-truth facts (verified commands, layout, conventions, boundaries) and
|
|
8
|
-
writes a section-fenced, version-stamped CLAUDE.md at the repo root — even
|
|
9
|
-
when ORC itself is installed globally. Never asks questions: P0 rules are a
|
|
10
|
-
template the user fills in themself. Refresh regenerates ONLY stale sections
|
|
11
|
-
and bumps the file version by 0.0.1. Never trims user-authored content;
|
|
12
|
-
never touches the orc-wiki pointer block. The skill dispatches the pinned
|
|
13
|
-
orc-claude-writer-opus-4-8-high agent — it never writes the file itself.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# ORC-CLAUDE (standalone)
|
|
17
|
-
|
|
18
|
-
Build or maintain the **local project's** `CLAUDE.md` from verified repo facts.
|
|
19
|
-
The target is ALWAYS `<repo root>/CLAUDE.md` of the current working directory —
|
|
20
|
-
never `~/.claude/CLAUDE.md`, even if ORC is installed globally.
|
|
21
|
-
|
|
22
|
-
**Dispatch, don't do.** Whatever model this chat runs on, the skill itself only
|
|
23
|
-
selects the mode and spawns `orc-claude-writer-opus-4-8-high` (the pinned
|
|
24
|
-
engine) — so the scan + writing always run at Opus 4.8 high regardless of the
|
|
25
|
-
caller's tier. When `opus5_only: true` the engine is
|
|
26
|
-
`orc-claude-writer-opus-5-med` instead (that mode FORCES it — see
|
|
27
|
-
`../_shared/opus5-only.md`), and it then needs an Opus 5 main session.
|
|
28
|
-
The one exception: the skill also writes the
|
|
29
|
-
trace pointer + a few markers around that spawn (behavior-trace logging is
|
|
30
|
-
permanent; see "Behavior trace"); that
|
|
31
|
-
tracing is its ONLY self-write — the `CLAUDE.md` write is always the writer's.
|
|
32
|
-
**Fully non-interactive: ask the user NOTHING.** No AskUserQuestion, no
|
|
33
|
-
confirmation prompts. Dispatch, relay the report, stop.
|
|
34
|
-
|
|
35
|
-
**Worked example** (orient only — never execute from it):
|
|
36
|
-
`examples/claude-run-mock.md`.
|
|
37
|
-
|
|
38
|
-
## The three modes (auto-selected, in this order)
|
|
39
|
-
|
|
40
|
-
1. **REFRESH** — `CLAUDE.md` exists AND contains an `orc-claude:meta` header.
|
|
41
|
-
Recompute section fingerprints; regenerate ONLY stale fenced sections;
|
|
42
|
-
bump `version` by exactly 0.0.1; update `updated:` (DD-MM-YYYY). Nothing
|
|
43
|
-
stale → report "up to date (vX.Y.Z)" and write NOTHING (no bump, no bak).
|
|
44
|
-
Protocol: `references/refresh.md`.
|
|
45
|
-
2. **UPDATE** — `CLAUDE.md` exists but has NO `orc-claude:meta` header (a
|
|
46
|
-
foreign / hand-written file). Copy it to `CLAUDE.md.bak` first (one bak,
|
|
47
|
-
overwritten each run; offer a `.gitignore` line for it in the report). Then
|
|
48
|
-
inject the meta header at the top and append/merge fenced generated
|
|
49
|
-
sections at version `0.0.1`.
|
|
50
|
-
**NEVER trim, delete, reorder, or rewrite existing user content — not one
|
|
51
|
-
line.** If a generated section would duplicate what the user already wrote,
|
|
52
|
-
generate the slimmer remainder or skip that section. The merged file MAY
|
|
53
|
-
exceed the budget (e.g. 600 existing lines + generated → 800): that is OK
|
|
54
|
-
by design — end the report with a hard note that the user should trim
|
|
55
|
-
unused content themself for better instruction-following.
|
|
56
|
-
3. **CREATE** — no `CLAUDE.md` at the repo root. Generate a fresh one from
|
|
57
|
-
`references/template.md` at version `0.0.1`.
|
|
58
|
-
|
|
59
|
-
Not inside a git repo / no project root findable → say so and stop.
|
|
60
|
-
|
|
61
|
-
## Dispatch (the skill's only real job)
|
|
62
|
-
|
|
63
|
-
Behavior-trace logging is permanent (always on). Weave the **Trace:** steps below
|
|
64
|
-
into the procedure — this skill owns a minimal one-dispatch trace (full marker
|
|
65
|
-
set in "Behavior trace").
|
|
66
|
-
|
|
67
|
-
1. Detect the repo root and pick the mode (REFRESH / UPDATE / CREATE above —
|
|
68
|
-
header sniff only; the writer re-verifies). **Trace:** open the run now —
|
|
69
|
-
write `log_dir/.current` = `run-claude-<slug>-<DDMMYY>-<HHMMSS>.txt` and
|
|
70
|
-
`touch the trace file` of that name in the SAME step, BEFORE the spawn (a
|
|
71
|
-
pointer to a file that does not exist reads as dangling — the hook rotates
|
|
72
|
-
away from it and the run splits across two files).
|
|
73
|
-
2. Spawn `orc-claude-writer-opus-4-8-high` — or `orc-claude-writer-opus-5-med`
|
|
74
|
-
when `opus5_only` — with: `mode`, `repo_root`,
|
|
75
|
-
`budget` (from a `budget=N` argument, else null), and the paths to
|
|
76
|
-
`references/template.md` + `references/refresh.md`. **Trace:** emit
|
|
77
|
-
`DISPATCH orc-claude-writer :: <mode> expect=opus-4-8/high` just before the
|
|
78
|
-
spawn (`expect=opus-5/medium` under `opus5_only` — the expectation is
|
|
79
|
-
derived from the agent NAME you actually dispatched, never from this line's
|
|
80
|
-
default; the hook then adds `SPAWN`/`RETURN` on its own).
|
|
81
|
-
3. On return, check `actual_model`/`actual_effort` against the pinned tier —
|
|
82
|
-
mismatch → prepend a tier-downgrade warning to the report. **Trace:** emit
|
|
83
|
-
`VERIFY writer actual=<model>/<effort> ✅ MATCH` (or
|
|
84
|
-
`⛔ DOWNGRADE expected=opus-4-8/high`).
|
|
85
|
-
4. Relay the Phase-3 report verbatim. **Trace:** emit
|
|
86
|
-
`FINISH :: <mode_ran> CLAUDE.md v<X.Y.Z>` (mode_ran may be `noop`), then
|
|
87
|
-
delete `log_dir/.current`. Then stop. The skill NEVER writes CLAUDE.md
|
|
88
|
-
itself — not even in a "trivial" refresh.
|
|
89
|
-
|
|
90
|
-
The writer performs Phases 1–3 below.
|
|
91
|
-
|
|
92
|
-
##
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- **
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
the
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: orc-claude
|
|
3
|
+
description: >
|
|
4
|
+
CLAUDE.md builder/updater for the LOCAL project. Use for "/orc-claude",
|
|
5
|
+
"build a CLAUDE.md", "update the CLAUDE.md", or "refresh the CLAUDE.md".
|
|
6
|
+
Runs INDEPENDENTLY — no orchestrator, no run folder. Scans the repo for
|
|
7
|
+
ground-truth facts (verified commands, layout, conventions, boundaries) and
|
|
8
|
+
writes a section-fenced, version-stamped CLAUDE.md at the repo root — even
|
|
9
|
+
when ORC itself is installed globally. Never asks questions: P0 rules are a
|
|
10
|
+
template the user fills in themself. Refresh regenerates ONLY stale sections
|
|
11
|
+
and bumps the file version by 0.0.1. Never trims user-authored content;
|
|
12
|
+
never touches the orc-wiki pointer block. The skill dispatches the pinned
|
|
13
|
+
orc-claude-writer-opus-4-8-high agent — it never writes the file itself.
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# ORC-CLAUDE (standalone)
|
|
17
|
+
|
|
18
|
+
Build or maintain the **local project's** `CLAUDE.md` from verified repo facts.
|
|
19
|
+
The target is ALWAYS `<repo root>/CLAUDE.md` of the current working directory —
|
|
20
|
+
never `~/.claude/CLAUDE.md`, even if ORC is installed globally.
|
|
21
|
+
|
|
22
|
+
**Dispatch, don't do.** Whatever model this chat runs on, the skill itself only
|
|
23
|
+
selects the mode and spawns `orc-claude-writer-opus-4-8-high` (the pinned
|
|
24
|
+
engine) — so the scan + writing always run at Opus 4.8 high regardless of the
|
|
25
|
+
caller's tier. When `opus5_only: true` the engine is
|
|
26
|
+
`orc-claude-writer-opus-5-med` instead (that mode FORCES it — see
|
|
27
|
+
`../_shared/opus5-only.md`), and it then needs an Opus 5 main session.
|
|
28
|
+
The one exception: the skill also writes the
|
|
29
|
+
trace pointer + a few markers around that spawn (behavior-trace logging is
|
|
30
|
+
permanent; see "Behavior trace"); that
|
|
31
|
+
tracing is its ONLY self-write — the `CLAUDE.md` write is always the writer's.
|
|
32
|
+
**Fully non-interactive: ask the user NOTHING.** No AskUserQuestion, no
|
|
33
|
+
confirmation prompts. Dispatch, relay the report, stop.
|
|
34
|
+
|
|
35
|
+
**Worked example** (orient only — never execute from it):
|
|
36
|
+
`examples/claude-run-mock.md`.
|
|
37
|
+
|
|
38
|
+
## The three modes (auto-selected, in this order)
|
|
39
|
+
|
|
40
|
+
1. **REFRESH** — `CLAUDE.md` exists AND contains an `orc-claude:meta` header.
|
|
41
|
+
Recompute section fingerprints; regenerate ONLY stale fenced sections;
|
|
42
|
+
bump `version` by exactly 0.0.1; update `updated:` (DD-MM-YYYY). Nothing
|
|
43
|
+
stale → report "up to date (vX.Y.Z)" and write NOTHING (no bump, no bak).
|
|
44
|
+
Protocol: `references/refresh.md`.
|
|
45
|
+
2. **UPDATE** — `CLAUDE.md` exists but has NO `orc-claude:meta` header (a
|
|
46
|
+
foreign / hand-written file). Copy it to `CLAUDE.md.bak` first (one bak,
|
|
47
|
+
overwritten each run; offer a `.gitignore` line for it in the report). Then
|
|
48
|
+
inject the meta header at the top and append/merge fenced generated
|
|
49
|
+
sections at version `0.0.1`.
|
|
50
|
+
**NEVER trim, delete, reorder, or rewrite existing user content — not one
|
|
51
|
+
line.** If a generated section would duplicate what the user already wrote,
|
|
52
|
+
generate the slimmer remainder or skip that section. The merged file MAY
|
|
53
|
+
exceed the budget (e.g. 600 existing lines + generated → 800): that is OK
|
|
54
|
+
by design — end the report with a hard note that the user should trim
|
|
55
|
+
unused content themself for better instruction-following.
|
|
56
|
+
3. **CREATE** — no `CLAUDE.md` at the repo root. Generate a fresh one from
|
|
57
|
+
`references/template.md` at version `0.0.1`.
|
|
58
|
+
|
|
59
|
+
Not inside a git repo / no project root findable → say so and stop.
|
|
60
|
+
|
|
61
|
+
## Dispatch (the skill's only real job)
|
|
62
|
+
|
|
63
|
+
Behavior-trace logging is permanent (always on). Weave the **Trace:** steps below
|
|
64
|
+
into the procedure — this skill owns a minimal one-dispatch trace (full marker
|
|
65
|
+
set in "Behavior trace").
|
|
66
|
+
|
|
67
|
+
1. Detect the repo root and pick the mode (REFRESH / UPDATE / CREATE above —
|
|
68
|
+
header sniff only; the writer re-verifies). **Trace:** open the run now —
|
|
69
|
+
write `log_dir/.current` = `run-claude-<slug>-<DDMMYY>-<HHMMSS>.txt` and
|
|
70
|
+
`touch the trace file` of that name in the SAME step, BEFORE the spawn (a
|
|
71
|
+
pointer to a file that does not exist reads as dangling — the hook rotates
|
|
72
|
+
away from it and the run splits across two files).
|
|
73
|
+
2. Spawn `orc-claude-writer-opus-4-8-high` — or `orc-claude-writer-opus-5-med`
|
|
74
|
+
when `opus5_only` — with: `mode`, `repo_root`,
|
|
75
|
+
`budget` (from a `budget=N` argument, else null), and the paths to
|
|
76
|
+
`references/template.md` + `references/refresh.md`. **Trace:** emit
|
|
77
|
+
`DISPATCH orc-claude-writer :: <mode> expect=opus-4-8/high` just before the
|
|
78
|
+
spawn (`expect=opus-5/medium` under `opus5_only` — the expectation is
|
|
79
|
+
derived from the agent NAME you actually dispatched, never from this line's
|
|
80
|
+
default; the hook then adds `SPAWN`/`RETURN` on its own).
|
|
81
|
+
3. On return, check `actual_model`/`actual_effort` against the pinned tier —
|
|
82
|
+
mismatch → prepend a tier-downgrade warning to the report. **Trace:** emit
|
|
83
|
+
`VERIFY writer actual=<model>/<effort> ✅ MATCH` (or
|
|
84
|
+
`⛔ DOWNGRADE expected=opus-4-8/high`).
|
|
85
|
+
4. Relay the Phase-3 report verbatim. **Trace:** emit
|
|
86
|
+
`FINISH :: <mode_ran> CLAUDE.md v<X.Y.Z>` (mode_ran may be `noop`), then
|
|
87
|
+
delete `log_dir/.current`. Then stop. The skill NEVER writes CLAUDE.md
|
|
88
|
+
itself — not even in a "trivial" refresh.
|
|
89
|
+
|
|
90
|
+
The writer performs Phases 1–3 below.
|
|
91
|
+
|
|
92
|
+
## Phases
|
|
93
|
+
|
|
94
|
+
`orc lane phases orc-claude --json` is this lane's pipeline: the ordered list, where
|
|
95
|
+
each phase lives, and how much of it to read. **The CLI owns the order** — never
|
|
96
|
+
derive it from the headings below, and never renumber or rename one without the
|
|
97
|
+
manifest, because a `read: section` pointer names a HEADING and a renamed heading
|
|
98
|
+
is a pointer into nothing.
|
|
99
|
+
|
|
100
|
+
## Phase 1 — ground-truth scan (facts, never guesses)
|
|
101
|
+
|
|
102
|
+
Read-only. Detect from real files, never from memory:
|
|
103
|
+
|
|
104
|
+
- **Stack & manifests:** `package.json`, `pyproject.toml`, `go.mod`,
|
|
105
|
+
`Cargo.toml`, `pom.xml`/`build.gradle`, `*.csproj`, `composer.json`,
|
|
106
|
+
`Gemfile`, `mix.exs` … Monorepo? (workspaces, `pnpm-workspace.yaml`,
|
|
107
|
+
`turbo.json`, `nx.json`, multiple manifests).
|
|
108
|
+
- **Commands:** only invocations that PROVABLY exist — a script in a manifest,
|
|
109
|
+
a Makefile/Taskfile target, a CI step. Prefer the single-test form when the
|
|
110
|
+
runner supports one. **Never invent a command.** Unverifiable → omit.
|
|
111
|
+
- **Conventions:** lint/format/type configs (eslint, prettier, biome, ruff,
|
|
112
|
+
black, clippy, tsconfig strictness…) + a small sample of real source files.
|
|
113
|
+
Record only DEVIATIONS from language defaults.
|
|
114
|
+
- **Boundaries:** generated/vendored/build dirs (from `.gitignore` + tree),
|
|
115
|
+
lockfiles, migration dirs, obvious legacy zones.
|
|
116
|
+
- **Environment:** env-var NAMES referenced in code/config/`.env.example`
|
|
117
|
+
(never values), external services.
|
|
118
|
+
|
|
119
|
+
## Phase 2 — generate / merge
|
|
120
|
+
|
|
121
|
+
Follow `references/template.md` exactly: the meta header, the section order
|
|
122
|
+
(Zone A rules → Zone B reference), and the fence grammar. Every generated
|
|
123
|
+
section sits inside `<!-- orc-claude:section <name> -->` …
|
|
124
|
+
`<!-- /orc-claude:section -->` fences so refresh can replace it surgically.
|
|
125
|
+
Sections whose scan came back empty are OMITTED, not stubbed.
|
|
126
|
+
|
|
127
|
+
**P0 is user-authored, always.** Emit the P0 placeholder template from
|
|
128
|
+
`references/template.md` with its hard fill-it-yourself note. Never invent P0
|
|
129
|
+
rules, never ask for them. Same for the other `@user` sections (Boundaries'
|
|
130
|
+
user half, Gotchas, Glossary): placeholder + note, then leave.
|
|
131
|
+
|
|
132
|
+
**Line budget — generated content only.** Default 400 lines, persisted as
|
|
133
|
+
`line-budget:` in the meta header. The budget counts ONLY orc-claude's own
|
|
134
|
+
output (header + fenced sections) — existing user content NEVER counts against
|
|
135
|
+
it and is NEVER trimmed to meet it. If generation would exceed the budget,
|
|
136
|
+
trim Zone B first: move overflow to a `docs/` file and leave an `@docs/...`
|
|
137
|
+
pointer. Zone A is never cut. The user may pass a different budget as an
|
|
138
|
+
argument (`/orc-claude budget=600`) — honor it and persist it in the header.
|
|
139
|
+
|
|
140
|
+
**Wiki block is untouchable.** If the file contains an `ORC-WIKI:START` /
|
|
141
|
+
`ORC-WIKI:END` block (managed by orc-wiki), byte-preserve it and generate no
|
|
142
|
+
wiki-overlapping content. orc-claude never writes inside another skill's
|
|
143
|
+
markers.
|
|
144
|
+
|
|
145
|
+
## Phase 3 — report
|
|
146
|
+
|
|
147
|
+
Show a short summary and STOP:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
ORC-CLAUDE — <create|update|refresh> → CLAUDE.md v<X.Y.Z> (<DD-MM-YYYY>)
|
|
151
|
+
Sections written: <list> · skipped (empty scan): <list>
|
|
152
|
+
Sections stale→refreshed: <list> (refresh mode only)
|
|
153
|
+
Preserved untouched: user content (<n> lines), wiki block
|
|
154
|
+
Conflicts flagged (scan contradicts existing text — NOT auto-edited):
|
|
155
|
+
- <file says X, repo shows Y>
|
|
156
|
+
Backup: CLAUDE.md.bak <written|not needed> (add it to .gitignore)
|
|
157
|
+
NOTE: file is <n> lines total (budget covers generated content only) — trim
|
|
158
|
+
unused user content yourself for better instruction-following.
|
|
159
|
+
Fill in the P0 / Gotchas / Glossary placeholders yourself — orc-claude never
|
|
160
|
+
writes them for you.
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Behavior trace (always on)
|
|
164
|
+
|
|
165
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names
|
|
166
|
+
the file and the layers). Lane token `claude`, tier **Single-dispatch** —
|
|
167
|
+
exactly ONE end-of-run packet, dispatched solo after the writer return
|
|
168
|
+
validates and BEFORE `.current` is deleted.
|
|
169
|
+
At run start write `log_dir/.current` = `run-claude-<slug>-<DDMMYY>-<HHMMSS>.txt` AND
|
|
170
|
+
`touch the trace file` of that name in the SAME step.
|
|
171
|
+
Nothing else about the protocol is restated here; a phase that ends with
|
|
172
|
+
`zero new trace lines is a protocol violation`.
|
|
173
|
+
|
|
174
|
+
Dispatch-only lane: emit ONLY the markers it can truthfully witness — **not**
|
|
175
|
+
`PHASE`/`SCORE`/`FINDING`/`VERDICT`, because scan/generate/report run INSIDE
|
|
176
|
+
the writer sub-agent and there is no scoring or review here. The marker set, in
|
|
177
|
+
order (actor `orc`, plus the hook's `SPAWN`/`RETURN`): `DISPATCH
|
|
178
|
+
orc-claude-writer :: <mode> expect=opus-4-8/high` before the spawn (the mode
|
|
179
|
+
rides in this tail and in `FINISH`, so no separate mode marker) · `VERIFY writer
|
|
180
|
+
actual=<model>/<effort>` · `FINISH :: <mode_ran> CLAUDE.md v<X.Y.Z>`, where
|
|
181
|
+
`mode_ran` may be `noop`. A noop refresh still traces the full cycle.
|
|
182
|
+
|
|
183
|
+
## Boundaries
|
|
184
|
+
|
|
185
|
+
- **Writes ONLY** `CLAUDE.md`, `CLAUDE.md.bak`, and (on budget overflow) a
|
|
186
|
+
`docs/` overflow file. Never edits source code, never commits, never pushes.
|
|
187
|
+
- **Never asks the user anything.** Placeholders + report notes replace every
|
|
188
|
+
question.
|
|
189
|
+
- **Never deletes or rewrites user-authored lines** — contradictions are
|
|
190
|
+
flagged in the report, not fixed.
|
|
191
|
+
- **Never touches** the orc-wiki managed block or any other skill's markers.
|
|
192
|
+
- Version bumps are always exactly +0.0.1; dates are always DD-MM-YYYY.
|
|
193
|
+
- Reminder: to see usage limits, tell the user to run `/usage` (never invoke
|
|
194
|
+
it programmatically).
|
|
195
|
+
|
|
196
|
+
## Config
|
|
197
|
+
|
|
198
|
+
**ONE resolver, and it is not you:** `orc lane config orc-claude --json`. Obey
|
|
199
|
+
`effective`, print every line in `announce[]` VERBATIM at preflight, and honour
|
|
200
|
+
`stops[]` before wave 1. Never re-derive a value, a precedence or an inertness
|
|
201
|
+
from `.claude/orc.config.yaml` — a key this lane does not read is not in the
|
|
202
|
+
answer, and a key another key shadows comes back already marked. Exit ≠ 0 → say
|
|
203
|
+
the CLI is unavailable and fall back to `../_shared/config-precedence.md`'s
|
|
204
|
+
documented defaults, out loud. Priorities and families:
|
|
205
|
+
`../_shared/config-precedence.md`.
|
|
206
|
+
|
|
207
|
+
## Calls
|
|
208
|
+
|
|
209
|
+
**ONE catalogue, and it is not you:** `orc lane calls orc-claude --json` names every
|
|
210
|
+
CLI call this lane makes, each with its exit-code contract, its cost, when to run
|
|
211
|
+
it, and what an EMPTY answer means. Never invent a spelling, never re-word an
|
|
212
|
+
exit code, and never re-derive a state word — the CLI's state words are the only
|
|
213
|
+
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
214
|
+
a failure**. A call the answer does not name is a call this lane does not make.
|
|
215
|
+
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
216
|
+
command you are about to run, out loud, before running it.
|
|
217
|
+
|
|
218
|
+
## Waiting mid-run (`/orc-wait`)
|
|
219
|
+
|
|
220
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
221
|
+
Checkpoint **none** · safe point **single dispatch**. Nothing here to checkpoint, so all three modes behave identically — say so rather than asking. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -68,7 +68,8 @@ The full key table lives in `references/flow-schema.md`. Highlights:
|
|
|
68
68
|
full grid: `sonnet-4-6-{med,high}`, `opus-4-7-{med,high}`,
|
|
69
69
|
`opus-4-8-{med,high,xhigh,max}`, `opus-5-{med,high,xhigh,max}`,
|
|
70
70
|
`fable-5-{med,high,xhigh,max}` (default
|
|
71
|
-
`opus-
|
|
71
|
+
`opus-5-high` — D29 moved it there at v1.0.0 so the wizard's own default
|
|
72
|
+
does not clip the two Opus 5 bands the score table ships). The effort guard enforces the effort half deterministically
|
|
72
73
|
(the compiled effort OR higher on the ladder); the statusline warns on the
|
|
73
74
|
model half. Executor choices above the tier are rejected at validate time; the
|
|
74
75
|
score table is clipped to the tier at compile time.
|