@azure-id/orc 0.56.0 → 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 +228 -0
- package/README-id.md +143 -53
- package/README.md +124 -103
- package/bin/build-agents.js +18 -11
- package/bin/cli.js +4139 -315
- 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 +3 -3
- 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 +292 -6
- 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 +346 -313
- package/templates/skills/orc-quick/references/dispatch-gate.md +12 -4
- 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
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Phase — Summary (id: `summary`)
|
|
2
|
+
|
|
3
|
+
> **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
|
|
4
|
+
> this library at W13 when `orc-diy` became its second reader. A spine is loaded
|
|
5
|
+
> IN FULL when its skill activates; this is loaded when the phase fires, and most
|
|
6
|
+
> runs skip most phases.
|
|
7
|
+
>
|
|
8
|
+
> **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
|
|
9
|
+
> `composed` is what `orc diy compile` stitches — the same phase expressed as
|
|
10
|
+
> `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
|
|
11
|
+
> procedure. Reading the wrong one is the failure `README.md` names: a lane
|
|
12
|
+
> doing a phase its product promise says it does differently.
|
|
13
|
+
> `orc lane phases <lane> --json` names the layer for each lane.
|
|
14
|
+
|
|
15
|
+
<!-- orc:layer full -->
|
|
16
|
+
|
|
17
|
+
## Summary
|
|
18
|
+
|
|
19
|
+
Emit `PHASE summary start`. Report: tasks/waves/dispatches (scores + overrides), escalations,
|
|
20
|
+
needs_context events, findings by severity (P0/P1 resolved; P2 itemized; P3
|
|
21
|
+
counted), verify result, authored tests when 6.5 ran, repo state + branch,
|
|
22
|
+
stale_review flags. Then ONE question: **"Apply the P2 fix-batch? The P3
|
|
23
|
+
cosmetics too?"** — never fix unasked. Emit `PHASE summary end`.
|
|
24
|
+
|
|
25
|
+
<!-- /orc:layer -->
|
|
26
|
+
|
|
27
|
+
<!-- orc:layer composed -->
|
|
28
|
+
|
|
29
|
+
## Phase: Summary
|
|
30
|
+
|
|
31
|
+
<!-- diy:when summary=off -->
|
|
32
|
+
No summary phase: end after ship with a single line (tasks done / gate color
|
|
33
|
+
/ ship action taken) plus usage, and note which phases this flow skipped.
|
|
34
|
+
<!-- /diy:when -->
|
|
35
|
+
<!-- diy:when summary=short -->
|
|
36
|
+
Short summary: one paragraph — what was built, gate results, ship action,
|
|
37
|
+
skipped phases, and usage. No per-task breakdown.
|
|
38
|
+
<!-- /diy:when -->
|
|
39
|
+
<!-- diy:when summary=full -->
|
|
40
|
+
Full summary exactly as the full lane's final phase: per-task outcomes with
|
|
41
|
+
models used, findings outcomes, verify results, ship action, skipped
|
|
42
|
+
phases, and usage.
|
|
43
|
+
<!-- /diy:when -->
|
|
44
|
+
|
|
45
|
+
Always name the phases this flow skipped by config — the user must never
|
|
46
|
+
mistake a DIY run for a full-lane run.
|
|
47
|
+
|
|
48
|
+
<!-- /orc:layer -->
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Phase — Test authoring (opt-in) (id: `testgen`)
|
|
2
|
+
|
|
3
|
+
> **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
|
|
4
|
+
> this library at W13 when `orc-diy` became its second reader. A spine is loaded
|
|
5
|
+
> IN FULL when its skill activates; this is loaded when the phase fires, and most
|
|
6
|
+
> runs skip most phases.
|
|
7
|
+
>
|
|
8
|
+
> **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
|
|
9
|
+
> `composed` is what `orc diy compile` stitches — the same phase expressed as
|
|
10
|
+
> `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
|
|
11
|
+
> procedure. Reading the wrong one is the failure `README.md` names: a lane
|
|
12
|
+
> doing a phase its product promise says it does differently.
|
|
13
|
+
> `orc lane phases <lane> --json` names the layer for each lane.
|
|
14
|
+
|
|
15
|
+
<!-- orc:layer full -->
|
|
16
|
+
|
|
17
|
+
## Test Authoring (opt-in; load ../../orc/subskills/orc-testgen/)
|
|
18
|
+
|
|
19
|
+
Only when `config.generate_tests` is on (confirmed at intake). ORC **writes**
|
|
20
|
+
test cases and **runs nothing** — never gates the ship. Dispatch
|
|
21
|
+
`orc-test-author-opus-5-med` (run's `actual_files`, definition-of-done,
|
|
22
|
+
touched flows, constraints, stack); it returns test files + a `TEST-PLAN.md` + a
|
|
23
|
+
Postman-importable `test-cases.http` (HTTP APIs), the two manual deliverables
|
|
24
|
+
written to **`test-generator/<change-slug>/` at the project root**. Validate the
|
|
25
|
+
returned `test_plan_path`/`curl_bundle_path` are under that folder (else
|
|
26
|
+
malformed → re-dispatch); state the exact path in the summary — discoverability
|
|
27
|
+
is the point.
|
|
28
|
+
|
|
29
|
+
<!-- /orc:layer -->
|
|
30
|
+
|
|
31
|
+
<!-- orc:layer composed -->
|
|
32
|
+
|
|
33
|
+
## Phase: Test authoring
|
|
34
|
+
|
|
35
|
+
<!-- diy:when testgen=off -->
|
|
36
|
+
Test authoring is OFF in this flow — skip silently.
|
|
37
|
+
<!-- /diy:when -->
|
|
38
|
+
<!-- diy:when testgen=ask -->
|
|
39
|
+
After verify (or after execution when verify is off), offer test authoring
|
|
40
|
+
once; on yes, run the full lane's Phase 6.5 via
|
|
41
|
+
`.claude/skills/orc/subskills/orc-testgen/SKILL.md` — it WRITES test cases
|
|
42
|
+
and a test plan, never runs them, and never gates the ship.
|
|
43
|
+
<!-- /diy:when -->
|
|
44
|
+
<!-- diy:when testgen=on -->
|
|
45
|
+
After verify (or after execution when verify is off), run the full lane's
|
|
46
|
+
Phase 6.5 without asking via
|
|
47
|
+
`.claude/skills/orc/subskills/orc-testgen/SKILL.md` — it WRITES test cases
|
|
48
|
+
and a test plan, never runs them, and never gates the ship.
|
|
49
|
+
<!-- /diy:when -->
|
|
50
|
+
|
|
51
|
+
<!-- /orc:layer -->
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phase — Behavior trace (id: `trace`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** Canonical since v1.0.0 W11; it was
|
|
4
|
+
> the `orc` skill's own `trace-protocol` reference, and 26 lanes reached
|
|
5
|
+
> across into one lane's private folder to read it. Layers declared: `core` only — the protocol
|
|
6
|
+
> is identical in every lane that traces, and this phase's per-lane variation is
|
|
7
|
+
> the TIER TABLE below, which is DATA, not a layer. `orc lane phases <lane>
|
|
8
|
+
> --json` names the file and the layers to read; `README.md` in this folder
|
|
9
|
+
> holds the closed layer set.
|
|
10
|
+
|
|
11
|
+
<!-- orc:layer core -->
|
|
2
12
|
|
|
3
13
|
How ORC records its own behavior for later review. **Behavior-trace logging is
|
|
4
14
|
PERMANENT (always on) — there is no config toggle.** Every ORC run traces.
|
|
@@ -88,7 +98,7 @@ decisions: > # free text — the WHY layer
|
|
|
88
98
|
| Multi-dispatch | `orc-wiki`, `orc-pr-driver` (lane `prdriver`) | orc-wiki: one per scan-batch boundary (the points that already run the registration sync / offer the pause) + the end-of-run packet. orc-pr-driver: one per LAYER boundary (each layer's green gate closes) + the end-of-run packet |
|
|
89
99
|
| Composed | `orc-diy` | one packet per ENABLED phase group, **minimum 2** — the flow shape is user-composed, so the count is too (the compiled flow carries this block automatically) |
|
|
90
100
|
| Iterative | `orc-quick`, `orc-challenge` (lane `challenge`), `orc-doc` (lane `doc`) | **one packet per completed numbered entry** + the end-of-run `FINISH` packet — the lane loops on user requests, so the count follows entries, not phases. For `orc-challenge` the unit is one completed ITERATION (C2→C8), and the packet goes out at the stop; on a PASS it is the `FINISH` packet. **Several trace files for one cycle is CORRECT** — several sessions ran, and `orc stats` counts several. For `orc-doc` the unit is one completed WAVE, and the packet is the LAST step of the stop sequence |
|
|
91
|
-
| Single-dispatch | `orc-claude`, `orc-plan`, `orc-analyze`
|
|
101
|
+
| Single-dispatch | `orc-claude`, `orc-plan`, `orc-analyze` + `orc-analyze-mini` (both lane token `analyze`), `orc-pattern`, `orc-verify`, `orc-learn`, `orc-poly`, `orc-pr-setup` (lane `prsetup`), `orc-grill`, `orc-route`, `orc-brainstorm` (lane `brainstorm`), `orc-pact` (lane `pact`), `orc-boundary` (lane `boundary`), `orc-handoff` (lane `handoff`), `orc-budget` (lane `budget`), `orc-aftermath` (lane `aftermath`), `orc-export` (lane `export`) | **exactly ONE mandatory end-of-run packet** |
|
|
92
102
|
|
|
93
103
|
**`context-combiner` is NOT a lane — it is a PHASE inside the analyze run.** It
|
|
94
104
|
has no slash command and no entry point of its own: `orc-analyze` Phase F
|
|
@@ -218,9 +228,9 @@ supplies the fact in a packet, the writer writes the line. `SPAWN`, `RETURN` and
|
|
|
218
228
|
|------|-----------|---------|
|
|
219
229
|
| `PHASE <name> start\|end` | orc → writer | phase transition |
|
|
220
230
|
| `PHASE-EDGE <role-family> :: first=<agent>` | hook | **deterministic phase inference.** ORC agent names encode their role, so when a SPAWN's role family differs from the previous SPAWN's, the hook segments the run itself — families: `analyst\|scout → analysis`, `planner → planning`, `executor → execution`, `reviewer → review`, `verifier → verify`, `test-author → testgen`, `advisor\|judge → ultra-gate` (the trace writer never opens an edge). Zero model dependence: even a run where every writer dispatch was forgotten still reads planning → execution → review → verify, and `/orc-retro` computes NARRATION COVERAGE from edges with vs without a writer `SPAWN` between them |
|
|
221
|
-
| `CONFIG <key=value …>` | orc → writer | Phase 1 — the resolved config values this run will consume (
|
|
231
|
+
| `CONFIG <key=value …>` | orc → writer | Phase 1 — the resolved config values this run will consume (ALWAYS `opus5_only` — it selects the executor table AND every fixed role, so retro can segment outcomes by dispatch mode). Runtime proof that the run honored the config; `/orc-retro` audits it against behavior |
|
|
222
232
|
| `WIKI-CONSULT <tier> :: docs=<list>` | orc → writer | project wiki consulted for grounding (full/mini at planning; fast at slice-build) — tier ∈ `fresh` \| `aging` \| `stale` \| `absent` \| `empty`; `docs=` the pages pulled/handed to the executor (comma list) or `none`. Records whether the run grounded in the wiki and whether it was stale (surfaces grounding + staleness for later audit) |
|
|
223
|
-
| `CROSSLINK <state> :: boundaries=<n> peers=<names>` | orc → writer | cross-repo peer-knowledge state at the consult point — state ∈ `cached` (peer cache present) \| `configured-no-cache` (crosslink configured but the cache is not built) \| `none`. Per-task `CROSSLINK inject task=<id> :: <boundary>` when a slice receives a linked contract. Records whether peer contracts were injected this run (full orc consumes only the pre-built crosslink cache — it never reads peer source live; mechanism in `
|
|
233
|
+
| `CROSSLINK <state> :: boundaries=<n> peers=<names>` | orc → writer | cross-repo peer-knowledge state at the consult point — state ∈ `cached` (peer cache present) \| `configured-no-cache` (crosslink configured but the cache is not built) \| `none`. Per-task `CROSSLINK inject task=<id> :: <boundary>` when a slice receives a linked contract. Records whether peer contracts were injected this run (full orc consumes only the pre-built crosslink cache — it never reads peer source live; mechanism in `wiki-consult.md`) |
|
|
224
234
|
| `SPAWN <agent>` | hook | an agent dispatch was observed (skeleton) |
|
|
225
235
|
| `RETURN <agent> :: <desc> dur=<m>m<s>s [model=<id>]` | hook | a subagent finished (skeleton). The hook attributes the RETURN to the finishing agent from the SubagentStop payload (`~<agent>` = approximate FIFO match on older Claude Code that omits `agent_type`; `~agent :: unattributed` = ≥2 agents in flight, so it deliberately claimed NO pending record rather than starve the right one), echoes the SPAWN's desc + wall-clock duration, and appends `model=<id>` when the return's `actual_model` is visible in the last message. A duplicate stop for an agent whose record was already consumed is DROPPED, never written as a desc-less RETURN. Still hook-written skeleton — NOT an orchestrator obligation; the authoritative model check is the `VERIFY` line |
|
|
226
236
|
| `DISPATCH <agent> :: <task> expect=<model>/<effort>` | orc → writer | orchestrator dispatched a named agent (the claim). **A FOREIGN dispatch appends `via=extra:<profile>`** and its `expect=` names the profile's model rather than a Claude tier — additive, the way `/orc-doc`'s `sections=` was. A foreign worker is not a Claude subagent, so the hook emits NO `SPAWN` and NO `RETURN` for it (P7, the `/orc-quick` ad-hoc-recon precedent): this line and `EXTRA` are the whole record, which is why neither is optional. **The `/orc-doc` lane's tail NAMES ITS SECTIONS** (v0.49.2) — `doc write sections=03-scope,04-risks part=sections/03-scope.md`, `doc check sections=03-goals`, `doc digest source=<path>` — which is the only thing that makes `orc doc cost`'s per-section attribution honest rather than a guess. It is additive: the tail was already captured whole |
|
|
@@ -243,7 +253,7 @@ supplies the fact in a packet, the writer writes the line. `SPAWN`, `RETURN` and
|
|
|
243
253
|
| `PACT <state> :: <ids>` | orc → writer | invariant-ledger state at the Phase-1 probe (`pact_gate`), and `PACT inject task=<id> :: <PACT-id>` when a DRIFTED/BROKEN promise is appended to a task's `constraints[]`. `PACT recheck pass\|fail :: <ids>` at Phase 6. Records whether last month's decisions constrained this month's plan |
|
|
244
254
|
| `BOUNDARY <verdict> task=<id> :: <area>` | orc → writer | per-task boundary verdict (verdict ∈ `EXECUTE` \| `ESCALATE` \| `REFUSE` \| `unknown` — an uncarded area is UNKNOWN, never REFUSE), plus `BOUNDARY lift task=<id> :: <area>` when `boundary_gate: block` removes ONE task from a wave (the wave still runs). `/orc-retro` reads these to answer the question the lane exists for: how much work did we stop attempting, and was that right |
|
|
245
255
|
| `CHALLENGE iter=<n> findings=P0:<n>/P1:<n>/P2:<n> coverage=<n>% verdict=PASS\|FAIL` | orc → writer | one line per completed `/orc-challenge` iteration boundary. **Copy `orc challenge record`'s `trace_line` verbatim** — the CLI assembles it so the lane never composes a second wording for the same number. Plus `CHALLENGE accept :: <id>` and `CHALLENGE rebut :: <id>` when an escape valve is used, and `CHALLENGE regoal\|retemplate :: v<n>` on a re-freeze. `/orc-retro` reads the sequence to answer whether a cycle converged or stalled |
|
|
246
|
-
| `EXTRA <profile>/<model> engine=<api\|claude-shim\|cli> task=<id> band=[lo,hi) tok=in/cw/cr/out outcome=<done\|partial\|failed\|fallback> dur=<m>m<s>s` | orc → writer | one line per FOREIGN dispatch — a slice that executed on a non-Claude worker (`_shared/extra-dispatch.md`). **Copy `orc extra dispatch`'s `trace_line` verbatim** — the CLI assembles it, exactly as `orc challenge record` does, so the lane never composes a second wording for the same numbers. Plus `EXTRA fallback task=<id> :: <reason> → <agent>` when a failed foreign dispatch re-dispatches to Claude (P6), `EXTRA substitution task=<id> :: requested=<m> reported=<m>` / `EXTRA reroute task=<id> :: <providers>` when the endpoint answered with a different model, or the same model served by a different company, and — v0.54.0 — `EXTRA resume task=<id> attempt=<n> :: from=<reason> attribution=<verdict> target=<extra:profile\|agent> files_preexisting=<n>` when a dispatch CONTINUES a position an earlier attempt left on disk, plus `EXTRA orphan task=<id> :: attempt=<n> lease-expired files_changed=<n> state=<state>` when preflight reports a dispatch that never reported back. **A resume that leaves no line cannot be counted** — neither `orc extra stats` nor `/orc-retro` can then learn whether resuming works, or which providers ignore the resume preamble. `EXTRA resume` rides in the resumed dispatch's own `trace_extras[]`; `EXTRA orphan` is the LANE's to emit after it reports, the same ownership rule as `EXTRA fallback`. **`tok=none` is a real value** and the ONLY correct one when the worker reported no counts (engine `cli` often does not): `tok=0/0/0/0` would tell `/orc-budget` the run was free, while a measured zero — engine `api`'s `cw`, always — is a different fact. **On a lane with no score `band=` carries `slot:<slot>`** (v0.55.0 — `slot:doc-writer`, `slot:wiki-scanner-light`): the field NAME is unchanged, so this parser, the eight-field dedupe and the ` :: ` tolerance are untouched, and `orc extra stats` gives each POSITION its own row for free. This is the verb `/orc-retro` reads to answer the only question that matters: is the cheap model actually cheaper once you count the repairs |
|
|
256
|
+
| `EXTRA <profile>/<model> engine=<api\|claude-shim\|cli> task=<id> band=[lo,hi) tok=in/cw/cr/out outcome=<done\|partial\|failed\|fallback> dur=<m>m<s>s` | orc → writer | one line per FOREIGN dispatch — a slice that executed on a non-Claude worker (`_shared/extra-dispatch.md`). **Copy `orc extra dispatch`'s `trace_line` verbatim** — the CLI assembles it, exactly as `orc challenge record` does, so the lane never composes a second wording for the same numbers. Plus `EXTRA fallback task=<id> :: <reason> → <agent>` when a failed foreign dispatch re-dispatches to Claude (P6), `EXTRA substitution task=<id> :: requested=<m> reported=<m>` / `EXTRA reroute task=<id> :: <providers>` when the endpoint answered with a different model, or the same model served by a different company, and — v0.54.0 — `EXTRA resume task=<id> attempt=<n> :: from=<reason> attribution=<verdict> target=<extra:profile\|agent> files_preexisting=<n>` when a dispatch CONTINUES a position an earlier attempt left on disk, plus `EXTRA orphan task=<id> :: attempt=<n> lease-expired files_changed=<n> state=<state>` when preflight reports a dispatch that never reported back, and — v1.0.0 — `EXTRA demote run=<slug> :: profile=<p> reason=<consecutive-stall\|stale-live-attempt\|manual> n=<k> → <ladder>` when this run DROPS a foreign profile to the bottom of the ladder after two consecutive stalls, a stale live attempt, or `orc extra demote`. **A demotion that leaves no line cannot be counted** either — copy `orc extra demotion`’s `trace_line` VERBATIM and emit it before the next dispatch, beside the mandatory announce line. A demotion is RUN state: it never writes the config and it is never promoted back on its own. **A resume that leaves no line cannot be counted** — neither `orc extra stats` nor `/orc-retro` can then learn whether resuming works, or which providers ignore the resume preamble. `EXTRA resume` rides in the resumed dispatch's own `trace_extras[]`; `EXTRA orphan` is the LANE's to emit after it reports, the same ownership rule as `EXTRA fallback`. **`tok=none` is a real value** and the ONLY correct one when the worker reported no counts (engine `cli` often does not): `tok=0/0/0/0` would tell `/orc-budget` the run was free, while a measured zero — engine `api`'s `cw`, always — is a different fact. **On a lane with no score `band=` carries `slot:<slot>`** (v0.55.0 — `slot:doc-writer`, `slot:wiki-scanner-light`): the field NAME is unchanged, so this parser, the eight-field dedupe and the ` :: ` tolerance are untouched, and `orc extra stats` gives each POSITION its own row for free. This is the verb `/orc-retro` reads to answer the only question that matters: is the cheap model actually cheaper once you count the repairs |
|
|
247
257
|
| `FINISH :: <detail>` | orc → writer | run ended |
|
|
248
258
|
|
|
249
259
|
`SPAWN`/`RETURN`/`PHASE-EDGE` come from the hook automatically. Every other verb
|
|
@@ -294,7 +304,7 @@ For each spawn the orchestrator:
|
|
|
294
304
|
## Announce-on-spawn
|
|
295
305
|
|
|
296
306
|
When dispatching, announce the model to the user, derived from the agent NAME
|
|
297
|
-
(e.g. "Spawning orc-executor-opus-
|
|
307
|
+
(e.g. "Spawning orc-executor-opus-5-low → claude-opus-5 / low"). Derive it
|
|
298
308
|
from the name — do NOT pass the coarse `sonnet|opus|haiku` dispatch arg, which
|
|
299
309
|
cannot express 4-7 vs 4-8 and would override the frontmatter pin.
|
|
300
310
|
|
|
@@ -312,3 +322,36 @@ orc's plus the U0/judge ones.
|
|
|
312
322
|
- Append-only; one whole block per append (never edit prior lines).
|
|
313
323
|
- The trace records behavior faithfully — including the ugly bits (over-asking,
|
|
314
324
|
downgrades, failed waves). That honesty is the whole value.
|
|
325
|
+
|
|
326
|
+
<!-- /orc:layer -->
|
|
327
|
+
|
|
328
|
+
<!-- orc:layer composed -->
|
|
329
|
+
|
|
330
|
+
## Behavior trace (PERMANENT — always on, no flow key)
|
|
331
|
+
|
|
332
|
+
Tracing is NOT composable: every ORC run traces, this one included. Follow
|
|
333
|
+
`.claude/skills/_shared/phases/trace.md` (load it at run start) — this
|
|
334
|
+
block is stitched into every compiled flow so a user-composed pipeline can never
|
|
335
|
+
be the one lane that runs blind.
|
|
336
|
+
|
|
337
|
+
**Run start:** create `log_dir`, write `log_dir/.current` =
|
|
338
|
+
`run-diy-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
|
|
339
|
+
in the SAME step (a pointer naming a file that does not exist reads as dangling —
|
|
340
|
+
the hook rotates away from it and the run splits across two files), then store
|
|
341
|
+
`trace_path` in the checkpoint. The lane token is `diy`, whatever the flow is
|
|
342
|
+
named.
|
|
343
|
+
|
|
344
|
+
**Narration is dispatched, never remembered:** record each event with its REAL
|
|
345
|
+
timestamp into a phase packet (`PHASE`, `DISPATCH`/`VERIFY` per spawn —
|
|
346
|
+
`actual_model`/`actual_effort` vs expected, surface any ⛔ DOWNGRADE to the user
|
|
347
|
+
— `SCORE`, `OUTCOME`, `GATE`, `FINDING`/`VERDICT` for whichever gates this flow
|
|
348
|
+
enabled, `FINISH`, plus `decisions` = the WHY), then dispatch
|
|
349
|
+
`orc-trace-writer-haiku-4-5` with it, PAIRED with the next phase's first
|
|
350
|
+
dispatch. **One packet per ENABLED phase group, minimum 2** — the flow shape is
|
|
351
|
+
composed, so the packet count is too; a phase this flow turned OFF owes nothing.
|
|
352
|
+
A phase ending with `zero new trace lines is a protocol violation`.
|
|
353
|
+
|
|
354
|
+
**Run end:** the `FINISH` packet goes out and RETURNS, then delete
|
|
355
|
+
`log_dir/.current`.
|
|
356
|
+
|
|
357
|
+
<!-- /orc:layer -->
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Phase — Verify — TDD gate + adversarial review (id: `verify`)
|
|
2
|
+
|
|
3
|
+
> **Shared phase file.** Moved out of `orc/SKILL.md` at v1.0.0 W12, and into
|
|
4
|
+
> this library at W13 when `orc-diy` became its second reader. A spine is loaded
|
|
5
|
+
> IN FULL when its skill activates; this is loaded when the phase fires, and most
|
|
6
|
+
> runs skip most phases.
|
|
7
|
+
>
|
|
8
|
+
> **Two layers, and a lane reads exactly one.** `full` is `/orc`'s procedure.
|
|
9
|
+
> `composed` is what `orc diy compile` stitches — the same phase expressed as
|
|
10
|
+
> `<!-- diy:when -->` variants over a composed flow, NOT a second copy of the
|
|
11
|
+
> procedure. Reading the wrong one is the failure `README.md` names: a lane
|
|
12
|
+
> doing a phase its product promise says it does differently.
|
|
13
|
+
> `orc lane phases <lane> --json` names the layer for each lane.
|
|
14
|
+
|
|
15
|
+
<!-- orc:layer full -->
|
|
16
|
+
|
|
17
|
+
## Verify: TDD gate + adversarial review (same subskill, phase=verify)
|
|
18
|
+
|
|
19
|
+
Emit `PHASE verify start`. TWO halves in the SAME dispatched verifier slot
|
|
20
|
+
(../../orc/subskills/orc-review-verify/ — Phase 5's reviewer stays separate):
|
|
21
|
+
**1) TDD gate (deterministic):** run the plan's TDD suite — green IS the
|
|
22
|
+
definition-of-done for non-exempt requirements; red → repair loop (implement→
|
|
23
|
+
test→repair, cap `tdd_loop_max`; cap hit → STOP SEQUENCE + honest red report).
|
|
24
|
+
**2) Adversarial review:** attack the green implementation — edge cases the
|
|
25
|
+
spec missed, error paths, contract violations, race/ordering, workflow breaks
|
|
26
|
+
(dead wiring, broken commands) — findings on the existing P0–P3 ladder. The
|
|
27
|
+
verifier also checks the intent-spec's
|
|
28
|
+
definition-of-done PLUS the pattern's `validation_gate[]` lines (each a
|
|
29
|
+
criterion; unmet = P0). The return carries `criteria[]` {criterion, pass|fail,
|
|
30
|
+
evidence} — every criterion needs evidence. Quote spot-check P0/P1 first, then:
|
|
31
|
+
P0 → auto-fix once → re-verify once → second failure STOPS; P1 → ask before the
|
|
32
|
+
one fix attempt, then re-verify (same single-retry cap).
|
|
33
|
+
**Pact recheck (`pact_recheck_on_verify`, default true; emit `PACT recheck`):**
|
|
34
|
+
after GREEN, run `orc pact check` scoped to the promises whose anchors intersect
|
|
35
|
+
this run's CHANGED files. A promise that flips to BROKEN is a **P1 finding with its
|
|
36
|
+
check output** — reported, never an automatic abort: the ledger may simply have
|
|
37
|
+
outgrown the code, and that is the user's call. Emit
|
|
38
|
+
`VERDICT pass|fail :: <detail>`, then `PHASE verify end`.
|
|
39
|
+
|
|
40
|
+
<!-- /orc:layer -->
|
|
41
|
+
|
|
42
|
+
<!-- orc:layer composed -->
|
|
43
|
+
|
|
44
|
+
## Phase: Verify
|
|
45
|
+
|
|
46
|
+
<!-- diy:when verify=off -->
|
|
47
|
+
Verification is DISABLED in this flow. The build+test evidence in each
|
|
48
|
+
executor return is the only green signal; say "verify skipped by flow
|
|
49
|
+
config" in the summary. Never claim criteria were verified.
|
|
50
|
+
<!-- /diy:when -->
|
|
51
|
+
<!-- diy:when verify=smoke -->
|
|
52
|
+
Run a SMOKE verify only: dispatch the verifier
|
|
53
|
+
(`orc-verifier-opus-5-med`) with an explicitly narrowed scope — build +
|
|
54
|
+
full test suite, red/green verdict, NO per-criterion definition-of-done
|
|
55
|
+
sweep. Red blocks ship exactly as a full verify would.
|
|
56
|
+
<!-- /diy:when -->
|
|
57
|
+
<!-- diy:when verify=full -->
|
|
58
|
+
Dispatch verification exactly as the full lane does — follow the verify half
|
|
59
|
+
of `.claude/skills/orc/subskills/orc-review-verify/SKILL.md` (build + tests +
|
|
60
|
+
every acceptance criterion checked against the definition of done).
|
|
61
|
+
<!-- /diy:when -->
|
|
62
|
+
<!-- diy:when tdd=on -->
|
|
63
|
+
TDD gate (rides the verify slot): the verifier slice carries the plan's
|
|
64
|
+
`tdd_suite[]`; green is the definition-of-done for non-exempt requirements,
|
|
65
|
+
red → the repair loop capped at `tdd_loop_max` (cap hit → STOP + honest red
|
|
66
|
+
report). The adversarial half of the verify pass applies as the full lane
|
|
67
|
+
defines it.
|
|
68
|
+
<!-- /diy:when -->
|
|
69
|
+
|
|
70
|
+
<!-- /orc:layer -->
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phase — Wave grouping (id: `wave-grouping`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
|
|
4
|
+
> private `references/`, and another lane already reached across into it. Read
|
|
5
|
+
> by `orc`, `orc-diy`. Layers declared: `core` only — single-layer because the
|
|
6
|
+
> conflict graph is arithmetic, and a lane that groups waves at all groups
|
|
7
|
+
> them this way. `orc lane phases <lane> --json` names the file and the layers
|
|
8
|
+
> to read.
|
|
9
|
+
|
|
10
|
+
<!-- orc:layer core -->
|
|
11
|
+
## Reference — Wave Grouping & Conflict Graph
|
|
2
12
|
|
|
3
13
|
Turn the tagged task list into conflict-free waves. Load during Phase 3.
|
|
4
14
|
|
|
@@ -41,7 +51,7 @@ negotiated at runtime.
|
|
|
41
51
|
answer — mark `is_batch_pause: true` on wave W when `W % N == 0` AND a later
|
|
42
52
|
wave exists (`W < total_waves`); the last wave is NEVER a pause (nothing
|
|
43
53
|
remains to gate). The resulting wave indices are the `pause_schedule` stored
|
|
44
|
-
in the checkpoint. A pause so marked is a HARD gate (stop-
|
|
54
|
+
in the checkpoint. A pause so marked is a HARD gate (stop-resume.md), not
|
|
45
55
|
an orchestrator judgment call.
|
|
46
56
|
|
|
47
57
|
## Same-feature collision
|
|
@@ -119,3 +129,5 @@ after every task returns, then diff the two:
|
|
|
119
129
|
`git status` is the AUDIT — same instruction → contract → attestation →
|
|
120
130
|
spot-check pattern the plan applies to `grounding[]`.
|
|
121
131
|
- Canonical cross-lane wording: `_shared/return-validation.md` §6.
|
|
132
|
+
|
|
133
|
+
<!-- /orc:layer -->
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phase — Wiki consult (id: `wiki-consult`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** Canonical since v1.0.0 W12; it was under the `orc` skill's
|
|
4
|
+
> private `references/`, and other lanes already reached across into it. Read
|
|
5
|
+
> by `orc`, `orc-mini`, `orc-fast`, `orc-wiki`. Layers declared: `core` only —
|
|
6
|
+
> single-layer because the precedence ladder (`code > fresh wiki > stale wiki
|
|
7
|
+
> > model priors`) does not bend for a faster lane. `orc lane phases <lane>
|
|
8
|
+
> --json` names the file and the layers to read.
|
|
9
|
+
|
|
10
|
+
<!-- orc:layer core -->
|
|
11
|
+
## Reference — Wiki Consult (shared by orc / orc-mini / orc-fast)
|
|
2
12
|
|
|
3
13
|
The ONE canonical description of how a lane grounds itself in the project wiki.
|
|
4
14
|
Load at the consult point (full/mini: Phase 1 planning; fast: F0 gate + F2
|
|
@@ -175,3 +185,5 @@ After a run that changed code, flag (do NOT re-scan) any wiki docs whose
|
|
|
175
185
|
covered files this run changed and point the user at `/orc-wiki`. Mini/fast
|
|
176
186
|
keep this passive note only; the full/ultra post-ship refresh ASK is defined in
|
|
177
187
|
`../../orc-wiki/references/staleness.md`.
|
|
188
|
+
|
|
189
|
+
<!-- /orc:layer -->
|
|
@@ -47,8 +47,56 @@ is a `needs_context` return, not permission to keep going.
|
|
|
47
47
|
lint results — the smoke gate, the TDD gate, the verifier and orc-quick's
|
|
48
48
|
build loop decide red vs green from those exact bytes. Read them whole.
|
|
49
49
|
|
|
50
|
+
## Reading ORC's own payload — the partial-read discipline (v1.0.0 W10)
|
|
51
|
+
|
|
52
|
+
Everything above is about reading the PROJECT. It applies unchanged to reading
|
|
53
|
+
ORC's own files, and it has to: a lane manifest of pointers that every lane
|
|
54
|
+
dutifully reads whole is MORE round-trips than the prose it replaced, for the
|
|
55
|
+
same bytes. Centralizing prose and then reading all of it is a slower payload,
|
|
56
|
+
not a smaller one.
|
|
57
|
+
|
|
58
|
+
So every pointer a lane carries declares three things.
|
|
59
|
+
|
|
60
|
+
| Declaration | Values | Means |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `when` | `always` · `on-phase` · `on-state` · `on-demand` · `compile-time` | WHETHER to open it at all |
|
|
63
|
+
| `read` | `layer` · `section` · `whole` | HOW MUCH to open |
|
|
64
|
+
| `layers` | `core` · `full` · `trim` · `composed` | WHICH part, when `read: layer` |
|
|
65
|
+
|
|
66
|
+
### The four rules that make it honest
|
|
67
|
+
|
|
68
|
+
1. **`on-phase` is the default, and `always` must be justified.** A file every
|
|
69
|
+
lane always loads has saved nothing by moving. Each `always` pointer is
|
|
70
|
+
named in the wave that adds it.
|
|
71
|
+
2. **`read: section` names a HEADING, never a line number.** A stored line
|
|
72
|
+
number is a wrong line number one edit later; a heading anchor survives an
|
|
73
|
+
edit above it. This is why a shared file's headings are part of its
|
|
74
|
+
contract — renaming one breaks every pointer into it.
|
|
75
|
+
3. **A trimmed lane reads `core` plus its OWN layer, and never the `full`
|
|
76
|
+
layer.** Reading a neighbouring layer "for context" is the bleed this rule
|
|
77
|
+
exists to stop: the layer boundary is the product promise, not a suggestion.
|
|
78
|
+
4. **The two exceptions above carry over unchanged.** A file you will EDIT is
|
|
79
|
+
read in full, first, always; and output a gate parses is read whole.
|
|
80
|
+
5. **`compile-time` is not a run-time read at all.** `orc-diy` is a declared
|
|
81
|
+
reader of ten shared phases and opens none of them during a run: the `orc
|
|
82
|
+
diy compile` CLI reads their `composed` layer once and stitches it into
|
|
83
|
+
`FLOW-COMPILED.md`, which is the only spine that run then follows. Saying
|
|
84
|
+
`on-phase` there would describe a read that never happens, and a manifest
|
|
85
|
+
that describes a run nobody performs is the drift it exists to prevent
|
|
86
|
+
(v1.0.0 W13).
|
|
87
|
+
|
|
88
|
+
### The honest limit
|
|
89
|
+
|
|
90
|
+
A partial read saves round-trips and bytes for the lanes that SKIP a phase. It
|
|
91
|
+
does **not** make a phase cheaper for the lane that runs it — that lane reads
|
|
92
|
+
its layers whole. Any claim otherwise has to show the measurement.
|
|
93
|
+
|
|
50
94
|
## Handoff
|
|
51
95
|
|
|
52
96
|
The ladder governs HOW MUCH to read. It never decides WHETHER knowledge exists —
|
|
53
97
|
that is `detecting-artifacts.md` — and it never overrides precedence:
|
|
54
98
|
`code > fresh wiki > stale wiki (hints) > model priors`.
|
|
99
|
+
|
|
100
|
+
What a lane INVOKES, and what each exit code means, is not here either: that is
|
|
101
|
+
`orc lane calls <lane> --json`, whose catalogue is the one copy of every call
|
|
102
|
+
two or more lanes share.
|