@azure-id/orc 0.56.1 → 1.0.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 +2367 -2218
- package/README-id.md +49 -107
- package/README.md +45 -133
- package/bin/build-agents.js +18 -11
- package/bin/cli.js +33060 -29855
- package/bin/onboarding-content.js +0 -3
- package/bin/test-run.js +491 -0
- package/bin/verify-contracts.js +4256 -3277
- package/bin/verify-package.js +563 -498
- package/bin/webui/api.js +1186 -1163
- package/bin/webui/app.html +9 -0
- 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/fixtures/extra.js +2036 -1934
- package/bin/webui/fixtures/flow.js +2 -2
- package/bin/webui/fixtures/index.js +503 -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/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 +1 -0
- package/bin/webui/i18n/en/overview.json +2 -0
- package/bin/webui/i18n/en/settings.json +16 -5
- 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 +1 -0
- package/bin/webui/i18n/id/overview.json +2 -0
- package/bin/webui/i18n/id/settings.json +15 -4
- package/bin/webui/js/01-i18n.js +1 -0
- 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/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.md +1 -1
- 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 +76 -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/context-combiner/SKILL.md +214 -187
- package/templates/skills/orc/README.md +148 -150
- package/templates/skills/orc/SKILL.md +70 -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 +153 -136
- package/templates/skills/orc-analyze/SKILL.md +247 -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 +244 -208
- package/templates/skills/orc-brainstorm/SKILL.md +372 -339
- package/templates/skills/orc-budget/SKILL.md +243 -225
- package/templates/skills/orc-challenge/README.md +1 -1
- package/templates/skills/orc-challenge/SKILL.md +293 -255
- package/templates/skills/orc-challenge/examples/council-full-roster.md +1 -1
- package/templates/skills/orc-claude/SKILL.md +216 -199
- package/templates/skills/orc-diy/README.md +2 -1
- package/templates/skills/orc-diy/SKILL.md +129 -70
- 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 +44 -7
- package/templates/skills/orc-explain/SKILL.md +19 -0
- package/templates/skills/orc-export/SKILL.md +26 -5
- package/templates/skills/orc-fast/SKILL.md +215 -187
- package/templates/skills/orc-grill/SKILL.md +233 -207
- package/templates/skills/orc-handoff/SKILL.md +223 -204
- package/templates/skills/orc-learn/SKILL.md +176 -156
- package/templates/skills/orc-mini/SKILL.md +41 -23
- package/templates/skills/orc-pact/SKILL.md +250 -218
- package/templates/skills/orc-pattern/SKILL.md +149 -124
- package/templates/skills/orc-poly/SKILL.md +237 -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 +45 -12
- package/templates/skills/orc-quick/references/dispatch-gate.md +2 -3
- package/templates/skills/orc-retro/SKILL.md +244 -222
- package/templates/skills/orc-retro/examples/retro-mock.md +171 -171
- package/templates/skills/orc-route/SKILL.md +183 -165
- package/templates/skills/orc-verify/SKILL.md +100 -86
- package/templates/skills/orc-wiki/SKILL.md +55 -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,187 +1,214 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: context-combiner
|
|
3
|
-
description: >
|
|
4
|
-
Combines 2+ RELATED, already-confirmed ORC analyses (from orc-analyze) into
|
|
5
|
-
ONE merged, deduped, conflict-resolved requirement context before build. Use
|
|
6
|
-
when the user analyzed multiple related documents within the same scope and
|
|
7
|
-
chose "pass to context-combiner" at orc-analyze's Phase F. Verifies the source
|
|
8
|
-
analyses actually overlap (shared files/requirements/scope) and challenges the
|
|
9
|
-
user if they look unrelated; pools ALL source requirements into one table and
|
|
10
|
-
reconciles them (exact/semantic duplicates, partial overlaps split — never
|
|
11
|
-
collapsed, conflicts, ordering) one issue at a time; proves NOTHING WAS LOST
|
|
12
|
-
via a source coverage matrix and a 100% coverage gate before handoff;
|
|
13
|
-
spot-checks inherited evidence and marks stale anchors; writes
|
|
14
|
-
combined-report.md + combined-requirement-spec.md (the merged spec reuses the
|
|
15
|
-
requirement-spec schema, so the planner/build pipeline is unchanged). Full
|
|
16
|
-
lane only (Opus 5 high). The orchestrator DISPATCHES this to a subagent —
|
|
17
|
-
it never combines itself, and the combiner never builds or spawns subagents.
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
# CONTEXT-COMBINER
|
|
21
|
-
|
|
22
|
-
The orchestrator stays on top and **dispatches a Context Combiner subagent
|
|
23
|
-
(orc-context-combiner-opus-5-high)** with a list of 2+ confirmed analysis
|
|
24
|
-
spec paths. It never combines itself. The combiner merges related, ALREADY
|
|
25
|
-
code-grounded analyses — it does not re-analyze the repo from scratch.
|
|
26
|
-
|
|
27
|
-
Purpose: turn 2+ related, confirmed requirement-specs (same user scope) into ONE
|
|
28
|
-
merged, deduped, conflict-resolved requirement set a planner can build from as if
|
|
29
|
-
it were a single analysis — with PROOF that no source requirement was lost.
|
|
30
|
-
|
|
31
|
-
## Hard rules
|
|
32
|
-
|
|
33
|
-
1. **Dispatched, not self-run.** The orchestrator coordinates; the Combiner
|
|
34
|
-
subagent (Opus 5 high) reads the specs and reconciles them against each
|
|
35
|
-
other. The combiner NEVER builds and NEVER spawns subagents.
|
|
36
|
-
2. **Related only — verify + challenge.** The user asserted relatedness at the
|
|
37
|
-
Phase F gate, but the combiner MUST verify real overlap (shared files,
|
|
38
|
-
overlapping requirements, shared scope). If overlap is weak/empty, it
|
|
39
|
-
challenges: "combine anyway / keep separate" — and records the decision.
|
|
40
|
-
3. **Trust confirmed sources — but spot-check freshness.** Source specs are
|
|
41
|
-
already code-grounded with evidence. The combiner INHERITS their `file:line`
|
|
42
|
-
evidence — it does not re-derive the code. It only reconciles the specs
|
|
43
|
-
against EACH OTHER, plus ONE bounded freshness pass: for each inherited
|
|
44
|
-
anchor, confirm the file still exists and the line still plausibly matches
|
|
45
|
-
(Read just that region — never a re-analysis). A failed check marks the row's
|
|
46
|
-
evidence `STALE` — never silently carried. STALE evidence on a buildable
|
|
47
|
-
requirement becomes a Phase D challenge (re-anchor / proceed anyway / drop).
|
|
48
|
-
Record the repo state checked against as `combined_against` (git HEAD short
|
|
49
|
-
sha) in both artifacts.
|
|
50
|
-
4. **Resolve conflicts one at a time.** Every cross-source conflict, duplicate,
|
|
51
|
-
and ordering dependency is raised as a 2–3 option challenge with ONE
|
|
52
|
-
**recommended** option + a one-line reason. Wait, record, continue. Never
|
|
53
|
-
batch. Keep asking until the combined context is clear (no open conflict).
|
|
54
|
-
5. **Conservation — nothing is lost, and you must prove it.** Every source
|
|
55
|
-
requirement ID gets EXACTLY ONE outcome in the Source coverage matrix
|
|
56
|
-
(merged / deduped-into / split-across / conflict-resolved / dropped).
|
|
57
|
-
`dropped` is legal ONLY with a recorded user decision from a Phase D
|
|
58
|
-
challenge. **When in doubt, keep both rows** — a redundant requirement costs
|
|
59
|
-
the planner a dedupe; a lost one costs the build a feature. The conservation
|
|
60
|
-
gate (Phase E) blocks artifact handoff until `coverage_pct` is 100.
|
|
61
|
-
6. **Two artifacts, spec derived from report.** `combined-report.md` (human,
|
|
62
|
-
source of truth) and `combined-requirement-spec.md` DERIVED from it (schemas/).
|
|
63
|
-
7. **Never build on unresolved.** If a conflict is left unresolved, record it as
|
|
64
|
-
an open question and refuse handoff to build until it is resolved.
|
|
65
|
-
8. **Checkpoint decisions eagerly.** Every challenge verdict is appended to
|
|
66
|
-
`combine-decisions.md` in the internal folder THE MOMENT it is given
|
|
67
|
-
(question, options, choice, timestamp). On resume/compaction, replay that
|
|
68
|
-
file and continue from the first unanswered item — never re-ask a recorded
|
|
69
|
-
decision, never lose one.
|
|
70
|
-
9. Usage: report handoff + remind the user to run `/usage`. Never invoke it.
|
|
71
|
-
10. **Never open a run of your own.** The combiner has no slash command; it is
|
|
72
|
-
always dispatched from `orc-analyze` Phase F while that run's trace is still
|
|
73
|
-
open. So: do NOT write `log_dir/.current`, do NOT create a trace file, do
|
|
74
|
-
NOT emit `FINISH`. Your `DISPATCH`/`RETURN`, every Phase D verdict and the
|
|
75
|
-
Phase E conservation result belong to the **dispatching lane's** end-of-run
|
|
76
|
-
packet — the hook segments your work as its own `PHASE-EDGE` family
|
|
77
|
-
(`combine`) inside that same file. Bootstrapping here would split the
|
|
78
|
-
analyze run across two files and invent a lane nothing can open. See
|
|
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
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
1
|
+
---
|
|
2
|
+
name: context-combiner
|
|
3
|
+
description: >
|
|
4
|
+
Combines 2+ RELATED, already-confirmed ORC analyses (from orc-analyze) into
|
|
5
|
+
ONE merged, deduped, conflict-resolved requirement context before build. Use
|
|
6
|
+
when the user analyzed multiple related documents within the same scope and
|
|
7
|
+
chose "pass to context-combiner" at orc-analyze's Phase F. Verifies the source
|
|
8
|
+
analyses actually overlap (shared files/requirements/scope) and challenges the
|
|
9
|
+
user if they look unrelated; pools ALL source requirements into one table and
|
|
10
|
+
reconciles them (exact/semantic duplicates, partial overlaps split — never
|
|
11
|
+
collapsed, conflicts, ordering) one issue at a time; proves NOTHING WAS LOST
|
|
12
|
+
via a source coverage matrix and a 100% coverage gate before handoff;
|
|
13
|
+
spot-checks inherited evidence and marks stale anchors; writes
|
|
14
|
+
combined-report.md + combined-requirement-spec.md (the merged spec reuses the
|
|
15
|
+
requirement-spec schema, so the planner/build pipeline is unchanged). Full
|
|
16
|
+
lane only (Opus 5 high). The orchestrator DISPATCHES this to a subagent —
|
|
17
|
+
it never combines itself, and the combiner never builds or spawns subagents.
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# CONTEXT-COMBINER
|
|
21
|
+
|
|
22
|
+
The orchestrator stays on top and **dispatches a Context Combiner subagent
|
|
23
|
+
(orc-context-combiner-opus-5-high)** with a list of 2+ confirmed analysis
|
|
24
|
+
spec paths. It never combines itself. The combiner merges related, ALREADY
|
|
25
|
+
code-grounded analyses — it does not re-analyze the repo from scratch.
|
|
26
|
+
|
|
27
|
+
Purpose: turn 2+ related, confirmed requirement-specs (same user scope) into ONE
|
|
28
|
+
merged, deduped, conflict-resolved requirement set a planner can build from as if
|
|
29
|
+
it were a single analysis — with PROOF that no source requirement was lost.
|
|
30
|
+
|
|
31
|
+
## Hard rules
|
|
32
|
+
|
|
33
|
+
1. **Dispatched, not self-run.** The orchestrator coordinates; the Combiner
|
|
34
|
+
subagent (Opus 5 high) reads the specs and reconciles them against each
|
|
35
|
+
other. The combiner NEVER builds and NEVER spawns subagents.
|
|
36
|
+
2. **Related only — verify + challenge.** The user asserted relatedness at the
|
|
37
|
+
Phase F gate, but the combiner MUST verify real overlap (shared files,
|
|
38
|
+
overlapping requirements, shared scope). If overlap is weak/empty, it
|
|
39
|
+
challenges: "combine anyway / keep separate" — and records the decision.
|
|
40
|
+
3. **Trust confirmed sources — but spot-check freshness.** Source specs are
|
|
41
|
+
already code-grounded with evidence. The combiner INHERITS their `file:line`
|
|
42
|
+
evidence — it does not re-derive the code. It only reconciles the specs
|
|
43
|
+
against EACH OTHER, plus ONE bounded freshness pass: for each inherited
|
|
44
|
+
anchor, confirm the file still exists and the line still plausibly matches
|
|
45
|
+
(Read just that region — never a re-analysis). A failed check marks the row's
|
|
46
|
+
evidence `STALE` — never silently carried. STALE evidence on a buildable
|
|
47
|
+
requirement becomes a Phase D challenge (re-anchor / proceed anyway / drop).
|
|
48
|
+
Record the repo state checked against as `combined_against` (git HEAD short
|
|
49
|
+
sha) in both artifacts.
|
|
50
|
+
4. **Resolve conflicts one at a time.** Every cross-source conflict, duplicate,
|
|
51
|
+
and ordering dependency is raised as a 2–3 option challenge with ONE
|
|
52
|
+
**recommended** option + a one-line reason. Wait, record, continue. Never
|
|
53
|
+
batch. Keep asking until the combined context is clear (no open conflict).
|
|
54
|
+
5. **Conservation — nothing is lost, and you must prove it.** Every source
|
|
55
|
+
requirement ID gets EXACTLY ONE outcome in the Source coverage matrix
|
|
56
|
+
(merged / deduped-into / split-across / conflict-resolved / dropped).
|
|
57
|
+
`dropped` is legal ONLY with a recorded user decision from a Phase D
|
|
58
|
+
challenge. **When in doubt, keep both rows** — a redundant requirement costs
|
|
59
|
+
the planner a dedupe; a lost one costs the build a feature. The conservation
|
|
60
|
+
gate (Phase E) blocks artifact handoff until `coverage_pct` is 100.
|
|
61
|
+
6. **Two artifacts, spec derived from report.** `combined-report.md` (human,
|
|
62
|
+
source of truth) and `combined-requirement-spec.md` DERIVED from it (schemas/).
|
|
63
|
+
7. **Never build on unresolved.** If a conflict is left unresolved, record it as
|
|
64
|
+
an open question and refuse handoff to build until it is resolved.
|
|
65
|
+
8. **Checkpoint decisions eagerly.** Every challenge verdict is appended to
|
|
66
|
+
`combine-decisions.md` in the internal folder THE MOMENT it is given
|
|
67
|
+
(question, options, choice, timestamp). On resume/compaction, replay that
|
|
68
|
+
file and continue from the first unanswered item — never re-ask a recorded
|
|
69
|
+
decision, never lose one.
|
|
70
|
+
9. Usage: report handoff + remind the user to run `/usage`. Never invoke it.
|
|
71
|
+
10. **Never open a run of your own.** The combiner has no slash command; it is
|
|
72
|
+
always dispatched from `orc-analyze` Phase F while that run's trace is still
|
|
73
|
+
open. So: do NOT write `log_dir/.current`, do NOT create a trace file, do
|
|
74
|
+
NOT emit `FINISH`. Your `DISPATCH`/`RETURN`, every Phase D verdict and the
|
|
75
|
+
Phase E conservation result belong to the **dispatching lane's** end-of-run
|
|
76
|
+
packet — the hook segments your work as its own `PHASE-EDGE` family
|
|
77
|
+
(`combine`) inside that same file. Bootstrapping here would split the
|
|
78
|
+
analyze run across two files and invent a lane nothing can open. See
|
|
79
|
+
`../_shared/phases/trace.md`.
|
|
80
|
+
|
|
81
|
+
## Phases
|
|
82
|
+
|
|
83
|
+
`orc lane phases context-combiner --json` is this lane's pipeline: the ordered list, where
|
|
84
|
+
each phase lives, and how much of it to read. **The CLI owns the order** — never
|
|
85
|
+
derive it from the headings below, and never renumber or rename one without the
|
|
86
|
+
manifest, because a `read: section` pointer names a HEADING and a renamed heading
|
|
87
|
+
is a pointer into nothing.
|
|
88
|
+
|
|
89
|
+
## Phase A — Load sources
|
|
90
|
+
Read every source `requirement-spec.md` (2+) the orchestrator hands you, plus
|
|
91
|
+
their reports. Confirm you have ≥2. Note each source's scope, mode, depth.
|
|
92
|
+
Record `combined_against` = current git HEAD short sha.
|
|
93
|
+
**Scale guard:** if sources > 4, warn that merge quality and token cost degrade
|
|
94
|
+
and offer staged combining (combine the two most related first, then fold in
|
|
95
|
+
the next against the combined result). Record the choice in
|
|
96
|
+
`combine-decisions.md`.
|
|
97
|
+
|
|
98
|
+
## Phase B — Verify relatedness
|
|
99
|
+
Compute overlap across sources:
|
|
100
|
+
- shared `files[]` between specs,
|
|
101
|
+
- overlapping/duplicate requirement statements,
|
|
102
|
+
- shared scope string.
|
|
103
|
+
If overlap is strong → proceed. If weak/empty → CHALLENGE (recommended-option):
|
|
104
|
+
"These share {N} files / no overlapping requirements — combine anyway
|
|
105
|
+
(recommended only if you're sure) or keep separate?" Record the verdict in the
|
|
106
|
+
report's Relatedness check. If the user chooses **keep separate**, STOP the run:
|
|
107
|
+
do NOT proceed to Phase C or write any `combined-*` artifact — return to the
|
|
108
|
+
orchestrator with `combined: false` (the analyses stay separate; the orchestrator
|
|
109
|
+
falls back to per-analysis stop/build).
|
|
110
|
+
|
|
111
|
+
## Phase C — Pool, then reconcile
|
|
112
|
+
|
|
113
|
+
**C.0 — Pool first, never pairwise.** Normalize ALL source requirements into ONE
|
|
114
|
+
pooled table (`source_id` e.g. A.R1, statement, files, evidence, depth of its
|
|
115
|
+
source). Then cluster pooled rows by shared files/behavior and detect issues
|
|
116
|
+
WITHIN clusters. This scales to N sources — pairwise comparison misses
|
|
117
|
+
three-way interactions and is forbidden.
|
|
118
|
+
|
|
119
|
+
**C.1 — Classify every cluster:**
|
|
120
|
+
- **EXACT-DUPLICATE** — same requirement, same wording → merge into one row,
|
|
121
|
+
tracking `from: [A.Rx, B.Ry]`.
|
|
122
|
+
- **SEMANTIC-DUPLICATE** — same effect, different wording → merge, but QUOTE
|
|
123
|
+
both original statements in the report so intent nuance isn't erased. If the
|
|
124
|
+
equivalence is not obvious, it's a Phase D challenge, not a silent merge.
|
|
125
|
+
- **PARTIAL-OVERLAP** — one requirement subsumes or intersects another →
|
|
126
|
+
**SPLIT into a shared row + residue row(s)**; never collapse. Residue rows
|
|
127
|
+
keep their own `from[]` and evidence. Ambiguous splits are Phase D challenges.
|
|
128
|
+
- **CONFLICT** — source A and source B require contradictory things on the same
|
|
129
|
+
file/behavior.
|
|
130
|
+
- **ORDERING** — one source depends on another's change existing first. Record
|
|
131
|
+
as structured pairs (`before` / `after` merged IDs), not free text.
|
|
132
|
+
|
|
133
|
+
**C.2 — Reconcile beyond requirements.** Cross-check `assumptions_resolved` and
|
|
134
|
+
`alternatives` across sources too: contradictory resolved assumptions are a
|
|
135
|
+
CONFLICT (Phase D); alternatives anchored to a merged/split requirement are
|
|
136
|
+
re-pointed at the merged ID.
|
|
137
|
+
|
|
138
|
+
**C.3 — Evidence freshness spot-check** (per Hard rule 3): verify each inherited
|
|
139
|
+
anchor still exists; mark failures `STALE`.
|
|
140
|
+
|
|
141
|
+
Anything ambiguous becomes a Phase D challenge.
|
|
142
|
+
|
|
143
|
+
## Phase D — Challenge (interactive, recommended options, one at a time)
|
|
144
|
+
For every CONFLICT / ambiguous DUPLICATE or PARTIAL-OVERLAP split / ORDERING
|
|
145
|
+
decision / STALE-evidence-on-buildable / proposed drop, ask a single focused
|
|
146
|
+
2–3 option question with ONE **recommended** option + a one-line reason. Wait,
|
|
147
|
+
record, continue. Never batch. Append every verdict to `combine-decisions.md`
|
|
148
|
+
immediately (Hard rule 8). Keep going until nothing is unresolved.
|
|
149
|
+
|
|
150
|
+
## Phase E — Conservation gate (before any artifact is written)
|
|
151
|
+
Build the **Source coverage matrix**: one row per source requirement ID with
|
|
152
|
+
exactly one Outcome — `merged → #N` / `deduped-into → #N` / `split-across →
|
|
153
|
+
#N,#M` / `conflict-resolved → #N` / `dropped (user decision ref)`. Then check:
|
|
154
|
+
- every source ID appears exactly once (no unaccounted IDs, no double-counting),
|
|
155
|
+
- the union of `from[]` across merged rows equals the non-dropped source set,
|
|
156
|
+
- every `dropped` row cites a recorded decision in `combine-decisions.md`.
|
|
157
|
+
`coverage_pct` = accounted source IDs / total source IDs × 100. If it is not
|
|
158
|
+
100 → fix the merge (or raise the missing challenge), do NOT proceed.
|
|
159
|
+
`handoff_ready` = (`coverage_pct` == 100) AND (no open conflict).
|
|
160
|
+
|
|
161
|
+
## Phase F — Write combined artifacts
|
|
162
|
+
1. Write `combined-report.md` (schemas/combined-report.md) into
|
|
163
|
+
`.claude/skills/orc/analyzer/combined-{name}/` (internal): Relatedness check,
|
|
164
|
+
Merged requirements (deduped, ordered, evidence inherited, STALE flagged,
|
|
165
|
+
`depth_from` when sources differ in depth), **Source coverage matrix**
|
|
166
|
+
(Phase E), **Additional context (do not build)** merged from the sources
|
|
167
|
+
(anchors re-pointed at the merged requirement; dedupe ONLY when the evidence
|
|
168
|
+
anchor is the same `file:line` AND the notes convey the same constraint —
|
|
169
|
+
otherwise keep both; non-actionable, omit if none), Cross-scope conflicts &
|
|
170
|
+
decisions, Open questions, Handoff readiness.
|
|
171
|
+
2. Derive `combined-requirement-spec.md` (schemas/combined-requirement-spec.md)
|
|
172
|
+
FROM the confirmed combined report, in the same internal folder. Reuse the
|
|
173
|
+
base requirement-spec shape + `combined_from`, `cross_scope`, and the
|
|
174
|
+
`coverage` block.
|
|
175
|
+
|
|
176
|
+
## Phase G — Return & branch
|
|
177
|
+
Return to the orchestrator: `combined_report_path`, `combined_spec_path`,
|
|
178
|
+
`combined_from[]`, `conflicts_resolved[]`, `coverage_pct`, `dropped[]`
|
|
179
|
+
(source IDs dropped by user decision), `stale_evidence[]` (rows flagged STALE),
|
|
180
|
+
`handoff_ready: bool` (open/unresolved items are NOT a return field — they live
|
|
181
|
+
in the report's Open questions section, reachable via `combined_report_path`).
|
|
182
|
+
The orchestrator then offers the user (plain language):
|
|
183
|
+
- **Stop here** → COPY `combined-report.md` OUT to `{report_out_dir}/combined-{name}/`
|
|
184
|
+
and stop.
|
|
185
|
+
- **Pass to orc build** → hand `combined-requirement-spec.md` back to the
|
|
186
|
+
orchestrator, which continues at Phase 1 (Requirement Planner) and runs the
|
|
187
|
+
full pipeline. The combiner NEVER builds directly.
|
|
188
|
+
|
|
189
|
+
**Gate the build option on `handoff_ready`:** if `handoff_ready` is false (an
|
|
190
|
+
unresolved conflict remains per Hard rule 7, or `coverage_pct` < 100 per Hard
|
|
191
|
+
rule 5), the orchestrator offers ONLY **Stop here** — the build option is
|
|
192
|
+
withheld until the open conflict is resolved and coverage is complete.
|
|
193
|
+
|
|
194
|
+
## No mini variant
|
|
195
|
+
Full lane only. `orc-analyze-mini` / `orc-mini` do not use the combiner.
|
|
196
|
+
|
|
197
|
+
## Config
|
|
198
|
+
|
|
199
|
+
Resolve with `orc lane config context-combiner --json` and obey `effective`. Never merge
|
|
200
|
+
`.claude/orc.config.yaml` yourself, and never re-derive a precedence. Exit ≠ 0 →
|
|
201
|
+
say so and use `../_shared/config-precedence.md`'s documented defaults, out
|
|
202
|
+
loud. Nothing this lane reads is contested, gated or a stop, so it owes no
|
|
203
|
+
preflight line and has no gate to honour.
|
|
204
|
+
|
|
205
|
+
## Calls
|
|
206
|
+
|
|
207
|
+
**ONE catalogue, and it is not you:** `orc lane calls context-combiner --json` names every
|
|
208
|
+
CLI call this lane makes, each with its exit-code contract, its cost, when to run
|
|
209
|
+
it, and what an EMPTY answer means. Never invent a spelling, never re-word an
|
|
210
|
+
exit code, and never re-derive a state word — the CLI's state words are the only
|
|
211
|
+
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
212
|
+
a failure**. A call the answer does not name is a call this lane does not make.
|
|
213
|
+
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
214
|
+
command you are about to run, out loud, before running it.
|