@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,184 +1,212 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orc-pr-setup
|
|
3
|
-
description: >
|
|
4
|
-
Stacked-PR PLANNER. Use for "/orc-pr-setup", "plan the stacked PRs", "split
|
|
5
|
-
this change into stacked pull requests", "where do the PR cut lines go".
|
|
6
|
-
Decides the LAYERING of a big change — ordered layers, each with a purpose, a
|
|
7
|
-
value class, an explicit file list, a measured LoC/file budget and a
|
|
8
|
-
dependency reason — and writes stacked-pr/<slug>/stack-plan.md. Runs
|
|
9
|
-
INDEPENDENTLY (no orchestrator needed) and is also the lane ORC's ship phase
|
|
10
|
-
hands off to when a change is too big for one PR. It NEVER touches git
|
|
11
|
-
history: no branches, no commits, no pushes — that is orc-pr-driver's job.
|
|
12
|
-
P0 HARD GATE: when a boundary is uncertain it STOPS and asks, one decision at
|
|
13
|
-
a time, and records the answer.
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# ORC-PR-SETUP (stacked-PR planner)
|
|
17
|
-
|
|
18
|
-
Big PRs are not reviewed, they are rubber-stamped. A 3k-LoC / 40-file diff is
|
|
19
|
-
unreviewable, so review is weak, merges are big-bang, and reverts are painful.
|
|
20
|
-
GitHub's **stacked pull requests** fix the mechanics — an ordered chain of PRs in
|
|
21
|
-
one repo, each targeting the branch below it, each reviewable on its own.
|
|
22
|
-
|
|
23
|
-
The mechanics are the easy half. **The hard part is deciding where the cut lines
|
|
24
|
-
go**, and that is this skill's entire job: decide the layering correctly, prove
|
|
25
|
-
each layer stands alone, and **refuse to guess**.
|
|
26
|
-
|
|
27
|
-
This lane **plans only**. It writes one markdown file and stops. Every branch,
|
|
28
|
-
commit, push and merge belongs to `/orc-pr-driver`.
|
|
29
|
-
|
|
30
|
-
**Tier.** Not effort-gated (the effort guard matches the exact skill name `orc`),
|
|
31
|
-
so it runs at whatever tier the chat is on. Layering judgment is better at Opus
|
|
32
|
-
high; it is correct at any tier.
|
|
33
|
-
|
|
34
|
-
**Human guide:** this skill's own `README.md` (what a stack is, the whole
|
|
35
|
-
workflow, the plan file field by field, FAQ) — point the USER there when they ask
|
|
36
|
-
how any of this works; never load it to drive the run.
|
|
37
|
-
|
|
38
|
-
**Load at their phase, never preloaded:**
|
|
39
|
-
`../_shared/gh-stack-commands.md` (preflight + command surface) ·
|
|
40
|
-
`../_shared/stack-plan.md` (plan location, schema, budget math, `STACK-FROM`) ·
|
|
41
|
-
`../_shared/pr-templates.md` (template resolution) ·
|
|
42
|
-
`references/layer-taxonomy.md` (where the cut lines go) ·
|
|
43
|
-
`references/certainty-gate.md` (the P0 gate + red flags).
|
|
44
|
-
|
|
45
|
-
## Hard rules
|
|
46
|
-
|
|
47
|
-
1. **Never touches git history.** No branch, no commit, no push, no PR. Reads
|
|
48
|
-
git (`diff --numstat`, `status`, `log`) only.
|
|
49
|
-
2. **P0 HARD GATE — uncertainty ASKS.** Every candidate boundary is classified
|
|
50
|
-
CERTAIN or UNCERTAIN (`references/certainty-gate.md`). Every UNCERTAIN stops
|
|
51
|
-
the lane and asks the user, **one decision at a time**, with the cost of each
|
|
52
|
-
option and a recommendation. Never a silent default, never "I assumed and
|
|
53
|
-
noted it".
|
|
54
|
-
3. **Every layer needs a purpose and a value class.** No purpose → it is not a
|
|
55
|
-
layer, it is part of another one.
|
|
56
|
-
4. **Budgets are measured, not estimated** (`../_shared/stack-plan.md`): real
|
|
57
|
-
`git diff --numstat` numbers, exclusions applied, ceilings from config.
|
|
58
|
-
5. **Every answer is recorded** under `## Decisions` in the plan — that is the
|
|
59
|
-
audit trail and what makes the plan re-runnable after compaction.
|
|
60
|
-
6. **A ticket is required.** Branch names and layer titles derive from it. No
|
|
61
|
-
ticket after asking once → stop and recommend one regular PR.
|
|
62
|
-
|
|
63
|
-
##
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: orc-pr-setup
|
|
3
|
+
description: >
|
|
4
|
+
Stacked-PR PLANNER. Use for "/orc-pr-setup", "plan the stacked PRs", "split
|
|
5
|
+
this change into stacked pull requests", "where do the PR cut lines go".
|
|
6
|
+
Decides the LAYERING of a big change — ordered layers, each with a purpose, a
|
|
7
|
+
value class, an explicit file list, a measured LoC/file budget and a
|
|
8
|
+
dependency reason — and writes stacked-pr/<slug>/stack-plan.md. Runs
|
|
9
|
+
INDEPENDENTLY (no orchestrator needed) and is also the lane ORC's ship phase
|
|
10
|
+
hands off to when a change is too big for one PR. It NEVER touches git
|
|
11
|
+
history: no branches, no commits, no pushes — that is orc-pr-driver's job.
|
|
12
|
+
P0 HARD GATE: when a boundary is uncertain it STOPS and asks, one decision at
|
|
13
|
+
a time, and records the answer.
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# ORC-PR-SETUP (stacked-PR planner)
|
|
17
|
+
|
|
18
|
+
Big PRs are not reviewed, they are rubber-stamped. A 3k-LoC / 40-file diff is
|
|
19
|
+
unreviewable, so review is weak, merges are big-bang, and reverts are painful.
|
|
20
|
+
GitHub's **stacked pull requests** fix the mechanics — an ordered chain of PRs in
|
|
21
|
+
one repo, each targeting the branch below it, each reviewable on its own.
|
|
22
|
+
|
|
23
|
+
The mechanics are the easy half. **The hard part is deciding where the cut lines
|
|
24
|
+
go**, and that is this skill's entire job: decide the layering correctly, prove
|
|
25
|
+
each layer stands alone, and **refuse to guess**.
|
|
26
|
+
|
|
27
|
+
This lane **plans only**. It writes one markdown file and stops. Every branch,
|
|
28
|
+
commit, push and merge belongs to `/orc-pr-driver`.
|
|
29
|
+
|
|
30
|
+
**Tier.** Not effort-gated (the effort guard matches the exact skill name `orc`),
|
|
31
|
+
so it runs at whatever tier the chat is on. Layering judgment is better at Opus
|
|
32
|
+
high; it is correct at any tier.
|
|
33
|
+
|
|
34
|
+
**Human guide:** this skill's own `README.md` (what a stack is, the whole
|
|
35
|
+
workflow, the plan file field by field, FAQ) — point the USER there when they ask
|
|
36
|
+
how any of this works; never load it to drive the run.
|
|
37
|
+
|
|
38
|
+
**Load at their phase, never preloaded:**
|
|
39
|
+
`../_shared/gh-stack-commands.md` (preflight + command surface) ·
|
|
40
|
+
`../_shared/stack-plan.md` (plan location, schema, budget math, `STACK-FROM`) ·
|
|
41
|
+
`../_shared/pr-templates.md` (template resolution) ·
|
|
42
|
+
`references/layer-taxonomy.md` (where the cut lines go) ·
|
|
43
|
+
`references/certainty-gate.md` (the P0 gate + red flags).
|
|
44
|
+
|
|
45
|
+
## Hard rules
|
|
46
|
+
|
|
47
|
+
1. **Never touches git history.** No branch, no commit, no push, no PR. Reads
|
|
48
|
+
git (`diff --numstat`, `status`, `log`) only.
|
|
49
|
+
2. **P0 HARD GATE — uncertainty ASKS.** Every candidate boundary is classified
|
|
50
|
+
CERTAIN or UNCERTAIN (`references/certainty-gate.md`). Every UNCERTAIN stops
|
|
51
|
+
the lane and asks the user, **one decision at a time**, with the cost of each
|
|
52
|
+
option and a recommendation. Never a silent default, never "I assumed and
|
|
53
|
+
noted it".
|
|
54
|
+
3. **Every layer needs a purpose and a value class.** No purpose → it is not a
|
|
55
|
+
layer, it is part of another one.
|
|
56
|
+
4. **Budgets are measured, not estimated** (`../_shared/stack-plan.md`): real
|
|
57
|
+
`git diff --numstat` numbers, exclusions applied, ceilings from config.
|
|
58
|
+
5. **Every answer is recorded** under `## Decisions` in the plan — that is the
|
|
59
|
+
audit trail and what makes the plan re-runnable after compaction.
|
|
60
|
+
6. **A ticket is required.** Branch names and layer titles derive from it. No
|
|
61
|
+
ticket after asking once → stop and recommend one regular PR.
|
|
62
|
+
|
|
63
|
+
## Phases
|
|
64
|
+
|
|
65
|
+
`orc lane phases orc-pr-setup --json` is this lane's pipeline: the ordered list, where
|
|
66
|
+
each phase lives, and how much of it to read. **The CLI owns the order** — never
|
|
67
|
+
derive it from the headings below, and never renumber or rename one without the
|
|
68
|
+
manifest, because a `read: section` pointer names a HEADING and a renamed heading
|
|
69
|
+
is a pointer into nothing.
|
|
70
|
+
|
|
71
|
+
## Phase S0 — Preflight (probe, never assume)
|
|
72
|
+
|
|
73
|
+
Per `../_shared/gh-stack-commands.md`: `gh` present and ≥ 2.0 · authed ·
|
|
74
|
+
`github/gh-stack` installed (offer the install if not) · **same repo, not a
|
|
75
|
+
fork** (a fork is a hard STOP — cross-fork stacks are unsupported) · trunk name ·
|
|
76
|
+
branch protections / required checks (this is where "N layers = N CI runs"
|
|
77
|
+
becomes a real number) · merge queue present? Report the block in a few lines.
|
|
78
|
+
|
|
79
|
+
Any hard fail → say which check failed and recommend ONE regular PR. Do not
|
|
80
|
+
plan a stack that cannot be submitted.
|
|
81
|
+
|
|
82
|
+
The SHAPE of these steps — the order, and the four rules that make it worth
|
|
83
|
+
having — is `../_shared/phases/preflight.md` (`core`). The probes
|
|
84
|
+
themselves are this lane's own and stay here.
|
|
85
|
+
|
|
86
|
+
## Phase S1 — Intake (ticket, entry mode, template)
|
|
87
|
+
|
|
88
|
+
1. **Ticket** — ask for it if it was not given. Required (hard rule 6).
|
|
89
|
+
2. **Entry mode** (`../_shared/stack-plan.md`) — exactly two:
|
|
90
|
+
- **`greenfield`** — nothing written yet; the input is a spec / TSD / ticket.
|
|
91
|
+
- **`orc-run`** — the change already exists in the worktree (ORC built it, or
|
|
92
|
+
the user did). The split is **file-granular only**; hunk surgery is
|
|
93
|
+
forbidden.
|
|
94
|
+
Detect it: a dirty worktree with real changes → `orc-run`; a clean tree →
|
|
95
|
+
`greenfield`. Say which mode you picked. An already-open fat PR is out of
|
|
96
|
+
scope — say so and recommend one regular PR.
|
|
97
|
+
3. **`STACK-FROM` handoff?** If the invocation points at a
|
|
98
|
+
`stacked-pr/<slug>/STACK-FROM.md`, read it and skip everything it carries
|
|
99
|
+
(ticket, slug, entry mode, template, surface, run dir). `BUILD-GREEN: false`
|
|
100
|
+
is a **hard stop** — never plan a stack over a red build.
|
|
101
|
+
4. **PR template** — resolve per `../_shared/pr-templates.md` (ORC template →
|
|
102
|
+
project → CLAUDE.md → recommend three options). The user declining every
|
|
103
|
+
option means the **stack is skipped** — say so and stop; the change ships as
|
|
104
|
+
one regular PR.
|
|
105
|
+
5. Derive `<slug>` (kebab-case, from the ticket or the change).
|
|
106
|
+
|
|
107
|
+
## Phase S2 — Inventory (the real numbers)
|
|
108
|
+
|
|
109
|
+
- `orc-run`: `git diff --numstat` (staged + unstaged) → every changed file with
|
|
110
|
+
its additions/deletions. Apply the exclusion list from
|
|
111
|
+
`../_shared/stack-plan.md`, keeping excluded files in a separate LISTED bucket.
|
|
112
|
+
- `greenfield`: enumerate the files the change WILL touch from the spec, and
|
|
113
|
+
estimate each one's size — marked as estimates, refined by the driver.
|
|
114
|
+
- Build the **dependency graph** between those files (imports/callers, schema →
|
|
115
|
+
reader, type → consumer). A `RUN-DIR` from a `STACK-FROM` handoff gives you
|
|
116
|
+
ORC's per-task `declared_files` and `depends_on` — use it; it is better
|
|
117
|
+
evidence than a fresh guess.
|
|
118
|
+
- Report: total LoC, total files, excluded count, and how many layers the
|
|
119
|
+
ceilings imply.
|
|
120
|
+
|
|
121
|
+
## Phase S3 — Tier-assign
|
|
122
|
+
|
|
123
|
+
Map every file to a taxonomy tier per `references/layer-taxonomy.md` (framework
|
|
124
|
+
tiers first — data/schema → store → domain → adapter → wiring → transport →
|
|
125
|
+
async → tests-at-scale → docs/flag; generic fallback for unlisted stacks). A
|
|
126
|
+
file that fits no tier is an UNCERTAIN, not a guess.
|
|
127
|
+
|
|
128
|
+
## Phase S4 — Cut (the P0 gate lives here)
|
|
129
|
+
|
|
130
|
+
Group tiers into layers under the config ceilings (`stacked_pr_loc`,
|
|
131
|
+
`stacked_pr_files`, `stacked_pr_max_layers`). **Ordering principle: dependency
|
|
132
|
+
direction = stack direction.** Layer N may depend only on layers < N; the bottom
|
|
133
|
+
is the widest blast radius and the least reversible (schema), the top is the
|
|
134
|
+
thinnest (docs, flag flip).
|
|
135
|
+
|
|
136
|
+
At **every seam**, run the certainty classifier (`references/certainty-gate.md`).
|
|
137
|
+
CERTAIN → proceed silently. UNCERTAIN → **STOP and ask**, one decision at a
|
|
138
|
+
time, showing both candidate boundaries, the LoC/file/CI cost of each, the
|
|
139
|
+
review-experience consequence, and a recommended option. Record the answer.
|
|
140
|
+
|
|
141
|
+
Component and handler are **different layers by default** — even when both are
|
|
142
|
+
small and were written in the same sitting. Same for handler vs async consumer,
|
|
143
|
+
and migration vs the code that reads the new column.
|
|
144
|
+
|
|
145
|
+
## Phase S5 — Validate the plan (all seven, explicitly)
|
|
146
|
+
|
|
147
|
+
| # | Check | Fail → |
|
|
148
|
+
|---|-------|--------|
|
|
149
|
+
| 1 | every layer ≤ `stacked_pr_loc` | split, or log an accepted exception |
|
|
150
|
+
| 2 | every layer ≤ `stacked_pr_files` (soft target = half) | same |
|
|
151
|
+
| 3 | every layer has a purpose + value class (FOUNDATION names its consumer) | merge it into its consumer |
|
|
152
|
+
| 4 | component/handler and migration/reader are separated | re-cut |
|
|
153
|
+
| 5 | dependency order is acyclic and bottom-up | ask which seam breaks the cycle |
|
|
154
|
+
| 6 | every layer can plausibly **build + test on its own base** | re-cut, or ask |
|
|
155
|
+
| 7 | layer count ≤ `stacked_pr_max_layers` (+2 with an override, beyond → STOP) | multiple stacks or a phased release |
|
|
156
|
+
|
|
157
|
+
Check 6 is REASONED here and **verified for real by the driver** — say so, never
|
|
158
|
+
claim it as proven.
|
|
159
|
+
|
|
160
|
+
## Phase S6 — Emit the plan, then stop
|
|
161
|
+
|
|
162
|
+
Write `stacked-pr/<slug>/stack-plan.md` exactly per the schema in
|
|
163
|
+
`../_shared/stack-plan.md`, including per-layer draft PR titles/bodies built from
|
|
164
|
+
the resolved template, `## Decisions` (every P0 answer) and `## Accepted
|
|
165
|
+
exceptions`. Then:
|
|
166
|
+
|
|
167
|
+
1. Show the layer table in chat (# · branch · purpose · value · files · LoC).
|
|
168
|
+
2. State plainly that **nothing has been created yet** — no branches, no PRs.
|
|
169
|
+
3. Offer the handoff: write `stacked-pr/<slug>/STACK-FROM.md`
|
|
170
|
+
(`STACK-FROM: orc-pr-setup`, per `../_shared/stack-plan.md`) and tell the user
|
|
171
|
+
to run **`/orc-pr-driver`** — human approval sits exactly here, before any git
|
|
172
|
+
surgery.
|
|
173
|
+
|
|
174
|
+
## Behavior trace (always on)
|
|
175
|
+
|
|
176
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names
|
|
177
|
+
the file and the layers). Lane token `prsetup`, tier **Single-dispatch** —
|
|
178
|
+
exactly ONE end-of-run packet, dispatched solo before `.current` is deleted.
|
|
179
|
+
At run start write `log_dir/.current` = `run-prsetup-<slug>-<DDMMYY>-<HHMMSS>.txt` AND
|
|
180
|
+
`touch the trace file` of that name in the SAME step.
|
|
181
|
+
Nothing else about the protocol is restated here; a phase that ends with
|
|
182
|
+
`zero new trace lines is a protocol violation`.
|
|
183
|
+
|
|
184
|
+
## Boundaries
|
|
185
|
+
|
|
186
|
+
- **Plans only.** Never a branch, commit, push, PR, or `gh stack` write command.
|
|
187
|
+
- **Never guesses a seam.** Uncertainty is a question, not an assumption.
|
|
188
|
+
- **Never fake-splits** an unsplittable atom, and never games the budget.
|
|
189
|
+
- Out of scope: splitting an already-open PR (`gh stack link` retrofit), and
|
|
190
|
+
cross-repo stacks (unsupported by GitHub — use `/orc-poly` for cross-repo
|
|
191
|
+
planning).
|
|
192
|
+
- Reminder: to see usage limits, tell the user to run `/usage` (never invoke it
|
|
193
|
+
programmatically).
|
|
194
|
+
|
|
195
|
+
## Config
|
|
196
|
+
|
|
197
|
+
Resolve with `orc lane config orc-pr-setup --json` and obey `effective`. Never merge
|
|
198
|
+
`.claude/orc.config.yaml` yourself, and never re-derive a precedence. Exit ≠ 0 →
|
|
199
|
+
say so and use `../_shared/config-precedence.md`'s documented defaults, out
|
|
200
|
+
loud. Nothing this lane reads is contested, gated or a stop, so it owes no
|
|
201
|
+
preflight line and has no gate to honour.
|
|
202
|
+
|
|
203
|
+
## Calls
|
|
204
|
+
|
|
205
|
+
**ONE catalogue, and it is not you:** `orc lane calls orc-pr-setup --json` names every
|
|
206
|
+
CLI call this lane makes, each with its exit-code contract, its cost, when to run
|
|
207
|
+
it, and what an EMPTY answer means. Never invent a spelling, never re-word an
|
|
208
|
+
exit code, and never re-derive a state word — the CLI's state words are the only
|
|
209
|
+
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
210
|
+
a failure**. A call the answer does not name is a call this lane does not make.
|
|
211
|
+
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
212
|
+
command you are about to run, out loud, before running it.
|
|
@@ -383,8 +383,8 @@ Because two things were dispatched. A dig that turns into a fix is one entry
|
|
|
383
383
|
with two agents — so two questions. The count follows dispatches, not requests.
|
|
384
384
|
|
|
385
385
|
**"I have `opus5_only: true`. Why is Sonnet still offered?"**
|
|
386
|
-
Because this lane ignores it. `opus5_only
|
|
387
|
-
|
|
386
|
+
Because this lane ignores it. `opus5_only` and `rubric_bands_override` do
|
|
387
|
+
nothing here. You always choose. A one-word typo fix
|
|
388
388
|
should not go to the biggest model because a global setting said so.
|
|
389
389
|
|
|
390
390
|
**"It said DOWNGRADE. What happened?"**
|
|
@@ -60,8 +60,8 @@ add steps.
|
|
|
60
60
|
## Nothing can override this lane
|
|
61
61
|
|
|
62
62
|
orc-quick is standalone. These config keys **do nothing here**:
|
|
63
|
-
`opus5_only` · `
|
|
64
|
-
`
|
|
63
|
+
`opus5_only` · `rubric_bands_override` · `extra_resume` · `extra_on_failure` ·
|
|
64
|
+
`extra_fallback_agent`.
|
|
65
65
|
|
|
66
66
|
The user always picks the agent. See `../_shared/opus5-only.md` — orc-quick is
|
|
67
67
|
listed there as the one exception. Say this at the gate if `opus5_only` is on,
|
|
@@ -76,6 +76,14 @@ stay on Claude. See `references/dispatch-gate.md` and
|
|
|
76
76
|
|
|
77
77
|
---
|
|
78
78
|
|
|
79
|
+
## Phases
|
|
80
|
+
|
|
81
|
+
`orc lane phases orc-quick --json` is this lane's pipeline: the ordered list, where
|
|
82
|
+
each phase lives, and how much of it to read. **The CLI owns the order** — never
|
|
83
|
+
derive it from the headings below, and never renumber or rename one without the
|
|
84
|
+
manifest, because a `read: section` pointer names a HEADING and a renamed heading
|
|
85
|
+
is a pointer into nothing.
|
|
86
|
+
|
|
79
87
|
## Q0 — Preflight (ONE time per session, silent, nothing can stop the run)
|
|
80
88
|
|
|
81
89
|
1. **Config.** Read `log_dir` only. Read no other key.
|
|
@@ -103,6 +111,10 @@ stay on Claude. See `references/dispatch-gate.md` and
|
|
|
103
111
|
|
|
104
112
|
---
|
|
105
113
|
|
|
114
|
+
The SHAPE of these steps — the order, and the four rules that make it worth
|
|
115
|
+
having — is `../_shared/phases/preflight.md` (`core`). The probes
|
|
116
|
+
themselves are this lane's own and stay here.
|
|
117
|
+
|
|
106
118
|
## Q1 — LOOK (silent — no questions here)
|
|
107
119
|
|
|
108
120
|
**Sort the request.** Does it only read, or does it write? What needs to be
|
|
@@ -190,7 +202,7 @@ Rules:
|
|
|
190
202
|
|
|
191
203
|
Put in the slice: the change sketch, the Q2 answers, 2–3 acceptance bullets,
|
|
192
204
|
the wiki **paths**, the cached pattern (whole text), the `house_rules` card
|
|
193
|
-
(`../
|
|
205
|
+
(`../_shared/phases/house-rules.md`, whole text), PR comments with their
|
|
194
206
|
`file:line`, and a short-return rule (fields only, no long prose).
|
|
195
207
|
|
|
196
208
|
For an **ad-hoc** dispatch, also tell the agent to report its own
|
|
@@ -286,14 +298,14 @@ One folder per thread. **One file inside. Never a second file.**
|
|
|
286
298
|
re-open a thread, and when the user asks you to read it.
|
|
287
299
|
- Full shape and examples: `references/context-doc.md`.
|
|
288
300
|
|
|
289
|
-
## Behavior trace (always on
|
|
301
|
+
## Behavior trace (always on)
|
|
290
302
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
dispatch
|
|
295
|
-
|
|
296
|
-
|
|
303
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases` names
|
|
304
|
+
the file and the layers). Lane token `quick`, tier **Iterative** —
|
|
305
|
+
ONE packet per finished numbered entry, paired with the next entry's first
|
|
306
|
+
dispatch, plus the `FINISH` packet.
|
|
307
|
+
Nothing else about the protocol is restated here; a phase that ends with
|
|
308
|
+
`zero new trace lines is a protocol violation`.
|
|
297
309
|
|
|
298
310
|
Ad-hoc dispatches are not named `orc-*`, so the hook writes no `SPAWN`/`RETURN`
|
|
299
311
|
for them. You still emit `DISPATCH … adhoc=true` and `VERIFY` yourself, and the
|
|
@@ -301,8 +313,29 @@ downgrade check still works from the agent's own report.
|
|
|
301
313
|
|
|
302
314
|
## Config
|
|
303
315
|
|
|
304
|
-
|
|
305
|
-
|
|
316
|
+
**ONE resolver, and it is not you:** `orc lane config orc-quick --json`. Obey
|
|
317
|
+
`effective`, print every line in `announce[]` VERBATIM at preflight, and honour
|
|
318
|
+
`stops[]` before wave 1. Never re-derive a value, a precedence or an inertness
|
|
319
|
+
from `.claude/orc.config.yaml` — a key this lane does not read is not in the
|
|
320
|
+
answer, and a key another key shadows comes back already marked. Exit ≠ 0 → say
|
|
321
|
+
the CLI is unavailable and fall back to `../_shared/config-precedence.md`'s
|
|
322
|
+
documented defaults, out loud. Priorities and families:
|
|
323
|
+
`../_shared/config-precedence.md`.
|
|
324
|
+
|
|
325
|
+
orc-quick has no config key of its own and ignores every dispatch-forcing key —
|
|
326
|
+
which is why five of them come back INERT with a reason. Say that at the gate;
|
|
327
|
+
see "Nothing can override this lane" above.
|
|
328
|
+
|
|
329
|
+
## Calls
|
|
330
|
+
|
|
331
|
+
**ONE catalogue, and it is not you:** `orc lane calls orc-quick --json` names every
|
|
332
|
+
CLI call this lane makes, each with its exit-code contract, its cost, when to run
|
|
333
|
+
it, and what an EMPTY answer means. Never invent a spelling, never re-word an
|
|
334
|
+
exit code, and never re-derive a state word — the CLI's state words are the only
|
|
335
|
+
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
336
|
+
a failure**. A call the answer does not name is a call this lane does not make.
|
|
337
|
+
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
338
|
+
command you are about to run, out loud, before running it.
|
|
306
339
|
|
|
307
340
|
## Rules this lane always keeps
|
|
308
341
|
|
|
@@ -310,4 +343,9 @@ Never implement yourself · ask the gate before every dispatch · check every
|
|
|
310
343
|
return (broken = failure) · never offer commit while tests are red · never undo
|
|
311
344
|
the user's files · write the doc before the offers · stage only the task's files
|
|
312
345
|
· never write anything to GitHub · tell the user to run `/usage` (never run it
|
|
313
|
-
yourself).
|
|
346
|
+
yourself).
|
|
347
|
+
|
|
348
|
+
## Waiting mid-run (`/orc-wait`)
|
|
349
|
+
|
|
350
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
351
|
+
Checkpoint **entry** · safe point **after an entry closes**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -108,9 +108,8 @@ orc-quick has no score bands to tune. Mark the row
|
|
|
108
108
|
2. **Never sticky.** Do not carry the last answer into the next entry.
|
|
109
109
|
3. **Already answered is not skipped.** If the user wrote "use opus 5 low", the
|
|
110
110
|
gate is satisfied — say which one you are using, in one line.
|
|
111
|
-
4. **No config can ANSWER this menu.** `opus5_only`, `
|
|
112
|
-
|
|
113
|
-
this lane. If one is on, say so at the gate so the user is not confused:
|
|
111
|
+
4. **No config can ANSWER this menu.** `opus5_only`, `rubric_bands_override`
|
|
112
|
+
and `extra_resume` are all inert in this lane. If one is on, say so at the gate so the user is not confused:
|
|
114
113
|
```
|
|
115
114
|
(orc-quick ignores opus5_only — both options are live)
|
|
116
115
|
```
|