@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,4 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Phase — Security pass (id: `security-checklist`)
|
|
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 an
|
|
6
|
+
> opt-in pass either runs its checklist or does not run. `orc lane phases
|
|
7
|
+
> <lane> --json` names the file and the layers to read.
|
|
8
|
+
|
|
9
|
+
<!-- orc:layer core -->
|
|
10
|
+
## Reference — Security-Pass Checklist (Phase 5.5, opt-in)
|
|
2
11
|
|
|
3
12
|
Loaded ONLY when the Phase 5.5 security pass fires (config `security_review`
|
|
4
13
|
`on`/`ask` + a task scored ≥ 70 in the run). Passed to the reviewer as
|
|
@@ -37,3 +46,5 @@ a hardening gap on a touched path = P1 · defense-in-depth suggestions = P2/P3.
|
|
|
37
46
|
surfaced to callers by the new error handling.
|
|
38
47
|
12. **Crypto misuse** — home-rolled hashing/encryption, weak algorithms (MD5,
|
|
39
48
|
SHA1 for passwords), missing salts, static IVs in the diff.
|
|
49
|
+
|
|
50
|
+
<!-- /orc:layer -->
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Phase — Security pass (opt-in) (id: `security`)
|
|
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
|
+
## Security pass (opt-in)
|
|
18
|
+
|
|
19
|
+
Only when config `security_review` is `on`/`ask` (default `off`) AND a task
|
|
20
|
+
scored **≥ 70** (reuses the risk floor). `ask` → one P0 prompt; `on` →
|
|
21
|
+
silent. Dispatch the reviewer with `phase=security` + changed files +
|
|
22
|
+
`security-checklist.md` (load only now). Same ladder, same
|
|
23
|
+
hard-rule-5 handling; report-only.
|
|
24
|
+
|
|
25
|
+
<!-- /orc:layer -->
|
|
26
|
+
|
|
27
|
+
<!-- orc:layer composed -->
|
|
28
|
+
|
|
29
|
+
## Phase: Security pass
|
|
30
|
+
|
|
31
|
+
<!-- diy:when security=off -->
|
|
32
|
+
The security pass is OFF in this flow — skip silently.
|
|
33
|
+
<!-- /diy:when -->
|
|
34
|
+
<!-- diy:when security=ask -->
|
|
35
|
+
When at least one task scored at or above the risk floor (70), ask the user
|
|
36
|
+
once after review whether to run the security pass; on yes, run it exactly as
|
|
37
|
+
the full lane's Phase 5.5 (reviewer re-dispatched with the checklist from
|
|
38
|
+
`.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
|
|
39
|
+
run's changed files).
|
|
40
|
+
<!-- /diy:when -->
|
|
41
|
+
<!-- diy:when security=on -->
|
|
42
|
+
When at least one task scored at or above the risk floor (70), dispatch the
|
|
43
|
+
security pass without asking — the full lane's Phase 5.5 with the checklist
|
|
44
|
+
from `.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
|
|
45
|
+
run's changed files.
|
|
46
|
+
<!-- /diy:when -->
|
|
47
|
+
<!-- diy:when security=always -->
|
|
48
|
+
Dispatch the security pass on EVERY run of this flow, regardless of task
|
|
49
|
+
scores — the full lane's Phase 5.5 with the checklist from
|
|
50
|
+
`.claude/skills/_shared/phases/security-checklist.md`, sweeping only the
|
|
51
|
+
run's changed files. (This flow removes the risk-floor trigger, not the
|
|
52
|
+
pass's mechanics.)
|
|
53
|
+
<!-- /diy:when -->
|
|
54
|
+
|
|
55
|
+
<!-- /orc:layer -->
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Phase — Ship (id: `ship`)
|
|
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
|
+
## Ship (load ../../orc/subskills/orc-pr/SKILL.md)
|
|
18
|
+
|
|
19
|
+
Emit `PHASE ship start`. Show current branch.
|
|
20
|
+
|
|
21
|
+
**Stacked-PR gate FIRST (deterministic; full `/orc` + `/orc-ultra` only — load
|
|
22
|
+
`../../orc/subskills/orc-pr/stack-gate.md`; never mini/fast/diy).** Measure the change
|
|
23
|
+
(`git diff --numstat`, exclusions applied) vs config `stacked_pr_loc`/
|
|
24
|
+
`stacked_pr_files`. Under threshold or `stacked_pr: off` → silent, ship normally
|
|
25
|
+
(`GATE stack-gate pass :: under-threshold`). Tripped → surface report + ONE P0
|
|
26
|
+
question (stack into layers? or one regular PR?) in the SAME round as its two
|
|
27
|
+
prerequisites — **a ticket** and a resolved PR template
|
|
28
|
+
(`_shared/pr-templates.md`; none found → recommend three options). No ticket, no
|
|
29
|
+
template, or "no" → **one regular PR, never re-asked**. "Yes" → commit on the
|
|
30
|
+
current branch (the driver's snapshot), write `stacked-pr/<slug>/STACK-FROM.md`
|
|
31
|
+
(`_shared/stack-plan.md`, `ENTRY-MODE: orc-run`, this run's `RUN-DIR`), then hand
|
|
32
|
+
off **`/orc-pr-setup`** → **`/orc-pr-driver`**. ORC never cuts layers itself.
|
|
33
|
+
|
|
34
|
+
**Handoff seam (one sentence, only when it applies):** if any changed file is a
|
|
35
|
+
GREEN surface in `orc handoff surfaces --json`, say so —
|
|
36
|
+
*"2 of these were changes a PM could have made alone — `/orc-handoff` next time."*
|
|
37
|
+
That sentence is how anyone finds out that lane exists.
|
|
38
|
+
|
|
39
|
+
Then ask together: **commit? push? create PR?** (PR: ticket +
|
|
40
|
+
title + target branch; generate from `../../orc/subskills/orc-pr/pr.md`). If Phase 6.5 ran,
|
|
41
|
+
commit `test-generator/<change-slug>/` too (a user deliverable, never gitignored).
|
|
42
|
+
**`mock-examples/` is NEVER staged** (drift-recovery.md; no `.gitignore` edit —
|
|
43
|
+
just never `git add` it).
|
|
44
|
+
On success: delete the ephemeral decision log; KEEP checkpoint + dispatch log.
|
|
45
|
+
**Wiki stale-flag:** flag (never re-scan) wiki docs whose covered files this
|
|
46
|
+
run changed; point at `/orc-wiki`. **Post-ship refresh ask** (BIG runs, /orc +
|
|
47
|
+
/orc-ultra — the `wiki_refresh_ask_tasks`/`_files` triggers and full rules in
|
|
48
|
+
`../../orc-wiki/references/staleness.md`): upgrade the passive note to **"Refresh
|
|
49
|
+
wiki now?"**; on "later" print the prominent stale warning and stamp
|
|
50
|
+
`wiki_refresh_declined` in the checkpoint. Then ALWAYS show the completion
|
|
51
|
+
usage report — /usage limits + the full dispatch log (model/effort/score per
|
|
52
|
+
subagent). The user must always know what the run cost. Finally emit
|
|
53
|
+
`PHASE ship end`, then the one-line `STATS lane=… dispatches=… downgrades=…`
|
|
54
|
+
summary (trace.md — what `orc stats` reads), then `FINISH :: <detail>`,
|
|
55
|
+
and in ONE step delete BOTH `log_dir/.current` and the run's `RESUME.md` (that
|
|
56
|
+
file existing is what marks a run unfinished — stop-resume.md).
|
|
57
|
+
|
|
58
|
+
<!-- /orc:layer -->
|
|
59
|
+
|
|
60
|
+
<!-- orc:layer composed -->
|
|
61
|
+
|
|
62
|
+
## Phase: Ship
|
|
63
|
+
|
|
64
|
+
State the current branch and the change summary BEFORE any git action, and
|
|
65
|
+
never ship on a red build (locked rule).
|
|
66
|
+
|
|
67
|
+
<!-- diy:when ship_mode=ask -->
|
|
68
|
+
Ask the user how to ship: commit, PR (via
|
|
69
|
+
`.claude/skills/orc/subskills/orc-pr/SKILL.md`), or leave the working tree
|
|
70
|
+
as-is. Default when auto-accepted by autonomy: leave as-is and report.
|
|
71
|
+
<!-- /diy:when -->
|
|
72
|
+
<!-- diy:when ship_mode=commit -->
|
|
73
|
+
Commit the run's changes on a green gate without asking (branch first if on
|
|
74
|
+
the default branch; conventional message from the intent). PRs only if the
|
|
75
|
+
user asks afterwards.
|
|
76
|
+
<!-- /diy:when -->
|
|
77
|
+
<!-- diy:when ship_mode=pr -->
|
|
78
|
+
On a green gate, create the PR without asking via
|
|
79
|
+
`.claude/skills/orc/subskills/orc-pr/SKILL.md` (branch + commit + push + PR
|
|
80
|
+
body from the run artifacts).
|
|
81
|
+
<!-- /diy:when -->
|
|
82
|
+
<!-- diy:when ship_mode=report-only -->
|
|
83
|
+
NEVER commit or push in this flow. Leave the working tree modified, and end
|
|
84
|
+
with the change report + suggested commit message the user can apply
|
|
85
|
+
themselves.
|
|
86
|
+
<!-- /diy:when -->
|
|
87
|
+
|
|
88
|
+
<!-- /orc:layer -->
|
package/templates/skills/{orc/references/stop-and-resume.md → _shared/phases/stop-resume.md}
RENAMED
|
@@ -1,160 +1,169 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
|
|
1
|
+
# Phase — Stop, usage report, resume (id: `stop-resume`)
|
|
2
|
+
|
|
3
|
+
> **Library file.** Canonical since v1.0.0 W11; it was
|
|
4
|
+
> the `orc` skill's own `stop-and-resume` reference. Layers declared: `core` only — the stop
|
|
5
|
+
> sequence is identical in every lane that stops, and the lane-specific half
|
|
6
|
+
> (which moments are MANDATORY stops) is already a per-lane rule in the spine.
|
|
7
|
+
|
|
8
|
+
<!-- orc:layer core -->
|
|
9
|
+
|
|
10
|
+
The token-saving heart of ORC. Load whenever a stop fires (batch
|
|
11
|
+
boundary, token pressure, phase transition worth guarding, or user request).
|
|
12
|
+
|
|
13
|
+
## When a stop is MANDATORY vs a judgment call
|
|
14
|
+
|
|
15
|
+
Most stops are yours to judge (token pressure, a phase worth guarding, a user
|
|
16
|
+
request). **The batch boundary is NOT a judgment call — it is a hard gate.**
|
|
17
|
+
Waves are computed for every run regardless of dispatch style (sequential runs
|
|
18
|
+
have waves too — see `wave-grouping.md`), so the boundary binds to wave numbers
|
|
19
|
+
in both styles. After completing wave W, if `W % batch_pause_every == 0` **and at
|
|
20
|
+
least one wave remains** (`W < total_waves`), the stop sequence below is MANDATORY
|
|
21
|
+
and deterministic: **never dispatch wave W+1 past an unacknowledged boundary.** The
|
|
22
|
+
boundary is computed from the answered pause schedule at intake (Phase 2) and
|
|
23
|
+
stored as `pause_schedule` in the checkpoint, so a resumed session enforces the
|
|
24
|
+
same boundaries. Emit `GATE wave-boundary :: wave=W of K → STOP (batch_pause_every=N)`
|
|
25
|
+
before the stop. Token pressure and user request remain judgment; the batch
|
|
26
|
+
boundary is not.
|
|
27
|
+
|
|
28
|
+
## The stop sequence (order is mandatory)
|
|
29
|
+
|
|
30
|
+
1. **Decide** to stop (your judgment for token/phase/user stops; the batch
|
|
31
|
+
boundary above is not a decision but a hard gate). The checkpoint skill
|
|
32
|
+
never decides.
|
|
33
|
+
2. **Write the checkpoint** into the run subfolder via
|
|
34
|
+
`subskills/orc-checkpoint/SKILL.md`. VALIDATE the
|
|
35
|
+
return. If the write fails → DO NOT STOP; surface the write failure instead.
|
|
36
|
+
Stopping without a good checkpoint is the one thing that loses work.
|
|
37
|
+
3. **Update `run/{run-slug}/state-of-play.md`** — the 10-line human-readable re-anchor:
|
|
38
|
+
current phase, wave, done/pending tasks, last decision, next action.
|
|
39
|
+
3b. **Write `{run_dir}/{run-slug}/RESUME.md`** — the same breath as steps 2–3,
|
|
40
|
+
by YOU, never a dispatched agent. Overwrite; never append. Shape below.
|
|
41
|
+
4. **Usage report** (see below).
|
|
42
|
+
5. **Generate the resume block** (see below) — regenerate FRESH at every stop,
|
|
43
|
+
never reuse an old one. It is printed inline AND is the body of `RESUME.md`.
|
|
44
|
+
6. Tell the user: what's done / remaining, then BOTH continue paths:
|
|
45
|
+
"Reply **continue** here, or paste the block below in a **fresh session**
|
|
46
|
+
(recommended if this conversation is long — cheaper and cleaner than
|
|
47
|
+
dragging this context forward)."
|
|
48
|
+
7. End the turn.
|
|
49
|
+
|
|
50
|
+
## Usage report (at EVERY stop and ALSO at run completion)
|
|
51
|
+
|
|
52
|
+
Do NOT attempt to invoke `/usage` — it cannot be called programmatically.
|
|
53
|
+
Instead, at every stop and at run completion:
|
|
54
|
+
1. Report the **dispatch log** you fully control: every subagent's model,
|
|
55
|
+
effort, and score. At completion, show the full per-task table (task, score
|
|
56
|
+
+ override reason, model, effort) so the user sees where tokens went.
|
|
57
|
+
2. **Remind the user to run `/usage` themselves** for their 5-hour and weekly
|
|
58
|
+
limit numbers: "Run `/usage` to see your remaining limits."
|
|
59
|
+
|
|
60
|
+
Never skip either part.
|
|
61
|
+
|
|
62
|
+
## The resume block — printed inline AND written to `RESUME.md`
|
|
63
|
+
|
|
64
|
+
A fresh session + disk state is cheaper AND higher-fidelity than a long compacted
|
|
65
|
+
session: near-empty context, perfect state. Offer it proactively at every pause
|
|
66
|
+
once the run is more than ~2 waves old or usage is heavy — do not wait to be
|
|
67
|
+
forced.
|
|
68
|
+
|
|
69
|
+
**The problem this file fixes.** ORC used to print the block and nothing else. If
|
|
70
|
+
the user closed the window, got distracted, or came back three days later, the
|
|
71
|
+
work was safe (the checkpoint is on disk) but the *way back in* was gone.
|
|
72
|
+
|
|
73
|
+
### Where it goes, and why there
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
{run_dir}/{run-slug}/RESUME.md
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Inside the run folder — with `checkpoint.json` and `state-of-play.md`, where run
|
|
80
|
+
state has lived safely since v0.34.1 — **never at the project root**.
|
|
81
|
+
`/orc-quick` and `/orc-grill` put their docs at the root because those are
|
|
82
|
+
deliverables a human reads later. A resume prompt is *transient run state*: dead
|
|
83
|
+
the moment the run finishes, and it must never be at risk of being committed.
|
|
84
|
+
Discovery is `orc resume`'s job, not the filesystem's.
|
|
85
|
+
|
|
86
|
+
### Lifecycle — the file existing IS the "unfinished" flag
|
|
87
|
+
|
|
88
|
+
- **Written at EVERY stop**, as the third write in the same breath as
|
|
89
|
+
`checkpoint.json` and `state-of-play.md`. ORC writes it itself — no dispatch.
|
|
90
|
+
A dispatch inside the stop sequence would mean a stop can fail because a
|
|
91
|
+
subagent did, at the one step whose entire job is not losing work.
|
|
92
|
+
- **ONE per run slug, always overwritten, never appended.** This is already the
|
|
93
|
+
protocol's rule above ("regenerated FRESH at every stop, never reuse an old
|
|
94
|
+
one"), because a stale resume block points at a wave that is already done. This
|
|
95
|
+
gives that rule a place on disk.
|
|
96
|
+
- **Deleted at `FINISH`** — in the same Phase 8 step that deletes
|
|
97
|
+
`log_dir/.current`. So a `RESUME.md` existing means **this run is still waiting
|
|
98
|
+
for you**, with no stale entries and no separate "is this consumed?"
|
|
99
|
+
bookkeeping.
|
|
100
|
+
- **NOT deleted when a resume merely starts.** If that session then dies, the
|
|
101
|
+
pointer must still be there.
|
|
102
|
+
|
|
103
|
+
### Contents (deterministic — this shape, not an improvisation)
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Continue ORC run `merchant-notifications`.
|
|
107
|
+
|
|
108
|
+
Read .claude/orc/run/merchant-notifications/state-of-play.md,
|
|
109
|
+
then .claude/orc/run/merchant-notifications/checkpoint.json.
|
|
110
|
+
Resume from the checkpoint's phase and wave.
|
|
111
|
+
The intent-spec is approved — do not re-plan. Do not redo tasks marked done.
|
|
112
|
+
|
|
113
|
+
Where it stands: /orc · phase execution · wave 2 of 4 done
|
|
114
|
+
Done: T1, T2, T3, T5
|
|
115
|
+
Left: T4 (requeued — see failure_reason), T6, T7
|
|
116
|
+
Watch out for: T4 failed once on a missing migration; the gotcha is recorded
|
|
117
|
+
Next action: dispatch wave 3 (T6, T7)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Every blank is a value you hold at that instant (phase, wave, task states,
|
|
121
|
+
failure reasons) — which is exactly why no model is needed to fill them in.
|
|
122
|
+
|
|
123
|
+
**Keep the `Where it stands:` line in exactly that shape** — lane, then phase,
|
|
124
|
+
then `wave K of N`, separated by ` · `. It is the ONE line `orc resume` and
|
|
125
|
+
`orc run list` parse, which is how they can list every waiting run without ever
|
|
126
|
+
opening a `checkpoint.json`. Prose elsewhere in the file is free-form.
|
|
127
|
+
|
|
128
|
+
### Always tell the user both paths
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Paused after wave 2 of 4.
|
|
132
|
+
|
|
133
|
+
To continue in a NEW session (cheaper and cleaner than this long one):
|
|
134
|
+
open a fresh session and paste the contents of
|
|
135
|
+
|
|
136
|
+
.claude/orc/run/merchant-notifications/RESUME.md
|
|
137
|
+
(or just run `orc resume` and pick it from the list)
|
|
138
|
+
|
|
139
|
+
Or reply `continue` here.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Name the path AND the command. A user who lost the chat has neither the block nor
|
|
143
|
+
the slug in front of them.
|
|
144
|
+
|
|
145
|
+
## Compaction-proofing (always on, not just at stops)
|
|
146
|
+
|
|
147
|
+
- **Disk is truth.** Everything needed to continue lives in `run/` files you
|
|
148
|
+
created: intent-spec, checkpoint, state-of-play, decision log. Conversation
|
|
149
|
+
is a disposable cache.
|
|
150
|
+
- Write the checkpoint EAGERLY: after every wave, every escalation answer,
|
|
151
|
+
every phase transition — so a surprise compaction never catches state that
|
|
152
|
+
exists only in conversation.
|
|
153
|
+
- On ANY suspicion of compaction (context feels summarized, details missing):
|
|
154
|
+
re-read state-of-play → checkpoint → re-anchor BEFORE acting.
|
|
155
|
+
|
|
156
|
+
## Resume procedure (both paths: "continue" here, or fresh session)
|
|
157
|
+
|
|
158
|
+
1. Read `run/{run-slug}/state-of-play.md` (one-glance orientation).
|
|
159
|
+
2. Read the newest valid checkpoint (`updated_at` wins).
|
|
160
|
+
3. One-line intent reconfirm (fresh session only): "Resuming: <scope>. Still
|
|
161
|
+
correct?"
|
|
162
|
+
4. From task_state: done stays done; partial resumes from
|
|
163
|
+
`progress.files_written` (last milestone); pending awaits its wave;
|
|
164
|
+
requeued/failed re-dispatch reading `failure_reason`; stale_review gets a
|
|
165
|
+
review pass.
|
|
166
|
+
5. Re-attach the decision log, regenerate the digest, continue from the
|
|
167
|
+
checkpoint's phase.
|
|
168
|
+
|
|
169
|
+
<!-- /orc:layer -->
|
|
@@ -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 -->
|