@azure-id/orc 1.9.2 → 2.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 +722 -0
- package/README-id.md +56 -42
- package/README.md +58 -41
- package/bin/build-agents.js +125 -29
- package/bin/clear-logs.js +620 -0
- package/bin/cli.js +1873 -180
- package/bin/fix.js +459 -0
- package/bin/gotcha-import.js +1081 -0
- package/bin/gotcha.js +1566 -0
- package/bin/graph-query.js +1 -1
- package/bin/graph.js +717 -717
- package/bin/habit.js +1538 -0
- package/bin/mockrun-catalog.js +284 -276
- package/bin/onboarding-content.js +2 -1
- package/bin/pricing.json +28 -21
- package/bin/run-undo.js +398 -0
- package/bin/trace-write.js +869 -0
- package/bin/verify-contracts.js +627 -100
- package/bin/verify-package.js +68 -10
- package/bin/webui/api.js +151 -6
- package/bin/webui/app.html +239 -232
- package/bin/webui/css/00-tokens.css +110 -92
- package/bin/webui/css/04-motion.css +87 -0
- package/bin/webui/css/06-responsive.css +203 -178
- package/bin/webui/css/panels/behaviour.css +205 -0
- package/bin/webui/css/panels/hookui.css +79 -0
- package/bin/webui/fixtures/behaviour.js +562 -0
- package/bin/webui/fixtures/extra.js +9 -9
- package/bin/webui/fixtures/flow.js +81 -81
- package/bin/webui/fixtures/hookui.js +506 -431
- package/bin/webui/fixtures/index.js +66 -3
- package/bin/webui/fixtures/knowledge.js +9 -3
- package/bin/webui/fixtures/maintenance.js +123 -42
- package/bin/webui/fixtures/rules.js +1007 -1002
- package/bin/webui/fixtures/settings.js +6 -7
- package/bin/webui/fixtures/stats.js +25 -6
- package/bin/webui/fixtures/wait.js +98 -97
- package/bin/webui/i18n/en/behaviour.json +156 -0
- package/bin/webui/i18n/en/hookui.json +290 -194
- package/bin/webui/i18n/en/maintenance.json +71 -52
- package/bin/webui/i18n/en/nav.json +25 -24
- package/bin/webui/i18n/en/settings.json +60 -60
- package/bin/webui/i18n/en/tour.json +37 -35
- package/bin/webui/i18n/id/behaviour.json +156 -0
- package/bin/webui/i18n/id/hookui.json +290 -194
- package/bin/webui/i18n/id/maintenance.json +71 -52
- package/bin/webui/i18n/id/nav.json +25 -24
- package/bin/webui/i18n/id/settings.json +60 -60
- package/bin/webui/i18n/id/tour.json +37 -35
- package/bin/webui/js/01-i18n.js +155 -154
- package/bin/webui/js/05-banners.js +181 -172
- package/bin/webui/js/06-edit.js +193 -183
- package/bin/webui/js/90-tour.js +498 -494
- package/bin/webui/js/91-shortcuts.js +126 -126
- package/bin/webui/js/99-boot.js +121 -118
- package/bin/webui/js/panels/behaviour.js +1087 -0
- package/bin/webui/js/panels/hookui.js +2196 -1691
- package/bin/webui/js/panels/maintenance.js +336 -235
- package/bin/webui/js/panels/settings.js +726 -719
- package/mock-run/INDEX.md +110 -107
- package/mock-run/extra-slots.md +1 -1
- package/mock-run/gotcha-import.md +118 -0
- package/mock-run/habits.md +129 -0
- package/mock-run/orc-aftermath.md +392 -392
- package/mock-run/orc-budget.md +29 -33
- package/mock-run/orc-cli.md +200 -200
- package/mock-run/orc-explain.md +86 -86
- package/mock-run/orc-extra.md +389 -392
- package/mock-run/orc-fix.md +87 -0
- package/mock-run/orc-pattern.md +112 -112
- package/mock-run/orc-quick.md +6 -1
- package/mock-run/orc.md +157 -157
- package/package.json +1 -1
- package/templates/agents/MODEL-MAPPING.md +37 -34
- package/templates/agents/orc-advisor-opus-5-xhigh.md +1 -7
- package/templates/agents/orc-analyze-mini-opus-5-med.md +1 -6
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -5
- package/templates/agents/{orc-claude-writer-opus-4-8-high.md → orc-claude-writer-opus-5-low.md} +48 -53
- package/templates/agents/orc-context-combiner-opus-5-high.md +1 -11
- package/templates/agents/orc-executor-haiku-4-5.md +14 -6
- package/templates/agents/orc-executor-opus-4-7-high.md +14 -6
- package/templates/agents/orc-executor-opus-4-7-med.md +14 -6
- package/templates/agents/orc-executor-opus-4-8-high.md +14 -6
- package/templates/agents/orc-executor-opus-5-high.md +14 -6
- package/templates/agents/orc-executor-opus-5-low.md +14 -6
- package/templates/agents/orc-executor-opus-5-med.md +14 -6
- package/templates/agents/orc-executor-sonnet-4-6-high.md +14 -6
- package/templates/agents/orc-executor-sonnet-4-6-med.md +14 -6
- package/templates/agents/orc-executor-sonnet-5-high.md +15 -7
- package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
- package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
- package/templates/agents/orc-graph-noter-sonnet-4-6-med.md +1 -10
- package/templates/agents/orc-judge-opus-5-xhigh.md +5 -9
- package/templates/agents/orc-learn-writer-opus-5-low.md +1 -7
- package/templates/agents/orc-pattern-codifier-opus-5-med.md +1 -8
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +58 -63
- package/templates/agents/orc-planner-mini-opus-5-med.md +1 -4
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -3
- package/templates/agents/orc-planner-opus-5-med.md +1 -4
- package/templates/agents/orc-recon-opus-5-low.md +1 -8
- package/templates/agents/orc-recon-sonnet-4-6-med.md +1 -8
- package/templates/agents/orc-retro-opus-5-med.md +6 -8
- package/templates/agents/orc-retro-sonnet-5-high.md +7 -8
- package/templates/agents/orc-reviewer-opus-5-low.md +96 -0
- package/templates/agents/orc-scout-opus-5-low.md +1 -6
- package/templates/agents/orc-scout-sonnet-4-6-high.md +35 -39
- package/templates/agents/orc-system-analyst-opus-5-high.md +1 -6
- package/templates/agents/orc-test-author-opus-5-med.md +4 -5
- package/templates/agents/orc-trace-writer-haiku-4-5.md +3 -7
- package/templates/agents/orc-verifier-opus-5-med.md +16 -8
- package/templates/agents/{orc-wiki-scanner-opus-4-8-high.md → orc-wiki-scanner-opus-5-low.md} +74 -79
- package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +97 -106
- package/templates/commands/orc-analyze.md +13 -21
- package/templates/commands/orc-fast.md +10 -15
- package/templates/commands/orc-fix.md +18 -0
- package/templates/commands/orc-poly.md +12 -21
- package/templates/commands/orc-pr-driver.md +11 -30
- package/templates/commands/orc-pr-setup.md +10 -31
- package/templates/commands/orc-route.md +11 -41
- package/templates/commands/orc-test.md +5 -60
- package/templates/commands/orc-wiki.md +64 -64
- package/templates/hooks/README.md +109 -7
- package/templates/hooks/orc-session-hook.js +339 -0
- package/templates/hooks/orc-statusline-render.js +317 -23
- package/templates/hooks/orc-statusline.js +165 -50
- package/templates/hooks/orc-subagent-line.js +23 -5
- package/templates/hooks/orc-weather-fetch.js +123 -0
- package/templates/skills/_shared/README.md +9 -0
- package/templates/skills/_shared/code-graph.md +47 -55
- package/templates/skills/_shared/config-precedence.md +3 -1
- package/templates/skills/_shared/extra-dispatch.md +78 -93
- package/templates/skills/_shared/gotchas.md +248 -177
- package/templates/skills/_shared/habits.md +101 -0
- package/templates/skills/_shared/lane-contract.md +84 -0
- package/templates/skills/_shared/opus5-only.md +14 -14
- package/templates/skills/_shared/phases/README.md +142 -83
- package/templates/skills/_shared/phases/analyst-gates.md +10 -21
- package/templates/skills/_shared/phases/execution.md +8 -14
- package/templates/skills/_shared/phases/house-rules.md +27 -32
- package/templates/skills/_shared/phases/intake.md +127 -133
- package/templates/skills/_shared/phases/mock-example.md +46 -56
- package/templates/skills/_shared/phases/plan-handoff.md +91 -97
- package/templates/skills/_shared/phases/planning.md +7 -17
- package/templates/skills/_shared/phases/preflight.md +19 -42
- package/templates/skills/_shared/phases/review.md +24 -28
- package/templates/skills/_shared/phases/rules.md +18 -42
- package/templates/skills/_shared/phases/scoring.md +55 -65
- package/templates/skills/_shared/phases/security-checklist.md +46 -50
- package/templates/skills/_shared/phases/security.md +45 -55
- package/templates/skills/_shared/phases/ship.md +6 -15
- package/templates/skills/_shared/phases/stop-resume.md +2 -5
- package/templates/skills/_shared/phases/summary.md +73 -48
- package/templates/skills/_shared/phases/testgen.md +41 -51
- package/templates/skills/_shared/phases/trace-verbs.md +447 -0
- package/templates/skills/_shared/phases/trace.md +66 -297
- package/templates/skills/_shared/phases/verify.md +62 -70
- package/templates/skills/_shared/phases/wave-grouping.md +128 -133
- package/templates/skills/_shared/phases/wiki-consult.md +10 -6
- package/templates/skills/_shared/read-ladder.md +2 -55
- package/templates/skills/_shared/return-validation.md +17 -70
- package/templates/skills/_shared/review-slice.md +106 -0
- package/templates/skills/_shared/smoke-gate.md +46 -28
- package/templates/skills/_shared/wait.md +1 -0
- package/templates/skills/context-combiner/SKILL.md +15 -44
- package/templates/skills/orc/README.md +2 -2
- package/templates/skills/orc/SKILL.md +35 -63
- package/templates/skills/orc/config.md +25 -27
- package/templates/skills/orc/examples/full-run-mock.md +2 -1
- package/templates/skills/orc/references/effort-and-mode.md +17 -17
- package/templates/skills/orc/references/pattern-gate.md +89 -89
- package/templates/skills/orc/references/phases/intake.md +41 -47
- package/templates/skills/orc/references/phases/integration.md +13 -19
- package/templates/skills/orc/references/preflight-report.md +11 -12
- package/templates/skills/orc/references/ultra-mode.md +9 -7
- package/templates/skills/orc/schemas/checkpoint.md +122 -122
- package/templates/skills/orc/subskills/orc-execution/SKILL.md +27 -73
- package/templates/skills/orc/subskills/orc-execution/core.md +12 -99
- package/templates/skills/orc/subskills/orc-execution/subagent.md +14 -13
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +12 -53
- package/templates/skills/orc/subskills/orc-review-verify/core.md +52 -135
- package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -7
- package/templates/skills/orc/subskills/orc-testgen/SKILL.md +11 -22
- package/templates/skills/orc/subskills/orc-testgen/core.md +20 -59
- package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -7
- package/templates/skills/orc-advisor/SKILL.md +56 -60
- package/templates/skills/orc-analyze/SKILL.md +33 -67
- package/templates/skills/orc-analyze/schemas/report-audit.md +2 -1
- package/templates/skills/orc-analyze/schemas/report-prose.md +2 -1
- package/templates/skills/orc-analyze-mini/SKILL.md +35 -70
- package/templates/skills/orc-claude/SKILL.md +14 -14
- package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
- package/templates/skills/orc-diy/README.md +31 -0
- package/templates/skills/orc-diy/SKILL.md +27 -78
- package/templates/skills/orc-diy/references/blocks/pattern.md +18 -18
- package/templates/skills/orc-fast/SKILL.md +49 -75
- package/templates/skills/orc-fix/SKILL.md +110 -0
- package/templates/skills/orc-judge/SKILL.md +77 -82
- package/templates/skills/orc-mini/SKILL.md +64 -112
- package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
- package/templates/skills/orc-pattern/SKILL.md +27 -48
- package/templates/skills/orc-poly/SKILL.md +32 -61
- package/templates/skills/orc-pr-driver/SKILL.md +25 -51
- package/templates/skills/orc-pr-driver/references/green-gate.md +113 -105
- package/templates/skills/orc-pr-setup/SKILL.md +20 -45
- package/templates/skills/orc-quick/README.md +44 -3
- package/templates/skills/orc-quick/SKILL.md +77 -108
- package/templates/skills/orc-quick/references/dispatch-gate.md +18 -6
- package/templates/skills/orc-quick/references/gh-mode.md +50 -1
- package/templates/skills/orc-quick/references/look.md +3 -1
- package/templates/skills/orc-retro/SKILL.md +20 -19
- package/templates/skills/orc-retro/examples/retro-mock.md +17 -17
- package/templates/skills/orc-route/SKILL.md +25 -45
- package/templates/skills/orc-test/SKILL.md +16 -37
- package/templates/skills/orc-verify/SKILL.md +14 -32
- package/templates/skills/orc-wait/SKILL.md +156 -163
- package/templates/skills/orc-wiki/README.md +325 -325
- package/templates/skills/orc-wiki/SKILL.md +195 -195
- package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
- package/templates/skills/orc-wiki/references/extra.md +2 -2
- package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
- package/templates/skills/orc-wiki/references/phases/phase-0.md +2 -7
- package/templates/skills/orc-wiki/references/phases/phase-1.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-2.md +4 -9
- package/templates/skills/orc-wiki/references/phases/phase-3.md +1 -6
- package/templates/skills/orc-wiki/references/phases/phase-3c.md +4 -8
- package/templates/agents/orc-claude-writer-opus-5-med.md +0 -55
- package/templates/agents/orc-reviewer-opus-5-med.md +0 -60
- package/templates/agents/orc-wiki-scanner-opus-5-med.md +0 -81
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orc-route
|
|
3
3
|
description: >
|
|
4
|
-
Plan-only lane router — you have a plan, this tells you which lane should
|
|
5
|
-
it. Use for "/orc-route", "which lane for this plan?", "is this worth
|
|
6
|
-
orc run?". It reads the plan's own numbers
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
given a request in words it refuses and says why, because routing from a
|
|
11
|
-
sentence is guessing. Zero agents, user-invoked only, nothing is built.
|
|
4
|
+
Plan-only lane router — you have a plan, this tells you which lane should
|
|
5
|
+
build it. Use for "/orc-route", "which lane for this plan?", "is this worth
|
|
6
|
+
the full orc run?". It reads the plan's own numbers and ORC's knowledge
|
|
7
|
+
probes, then names ONE recommended lane, the runners-up with the reason each
|
|
8
|
+
lost, and any lane that is not possible. It routes a PLAN only, never a
|
|
9
|
+
request in words. Zero agents, nothing is built.
|
|
12
10
|
---
|
|
13
11
|
|
|
14
12
|
# ORC-ROUTE
|
|
@@ -148,13 +146,11 @@ exactly one branch.
|
|
|
148
146
|
|
|
149
147
|
## Behavior trace (always on)
|
|
150
148
|
|
|
151
|
-
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases`
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Nothing else about the protocol is restated here; a phase that ends with
|
|
157
|
-
`zero new trace lines is a protocol violation`.
|
|
149
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases orc-route --json` →
|
|
150
|
+
`trace_grammar` gives the verbs). Lane token `route`, tier
|
|
151
|
+
**Single-dispatch**. At run start write `log_dir/.current` =
|
|
152
|
+
`run-route-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
|
|
153
|
+
in the SAME step. A phase that ends with `zero new trace lines is a protocol violation`.
|
|
158
154
|
|
|
159
155
|
## Rules this lane always keeps
|
|
160
156
|
|
|
@@ -163,33 +159,17 @@ Routes a plan, refuses anything else · zero agents, nothing dispatched · reuse
|
|
|
163
159
|
only, never an ad-hoc `find` · reads no source file · never starts a lane the
|
|
164
160
|
user did not accept · never edits config or any project file.
|
|
165
161
|
|
|
166
|
-
##
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
181
|
-
a failure**. A call the answer does not name is a call this lane does not make.
|
|
182
|
-
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
183
|
-
command you are about to run, out loud, before running it.
|
|
184
|
-
|
|
185
|
-
## Rules — the anti-slop card (`../_shared/phases/rules.md`)
|
|
186
|
-
|
|
187
|
-
`orc rules slice --lane orc-route --json` is the ONLY assembler; never build
|
|
188
|
-
the card here. It rides under the house rules and above the task —
|
|
189
|
-
**house rules > your project's rules > ORC's own packs** — and its `line` prints
|
|
190
|
-
VERBATIM at preflight. Returns gain `rules_applied[]`, `rules_conflicts[]` (a gap,
|
|
191
|
-
never a silent choice) and `rules_overridden[]`.
|
|
192
|
-
## Waiting mid-run (`/orc-wait`)
|
|
193
|
-
|
|
194
|
-
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
195
|
-
Checkpoint **none** · safe point **read-only, seconds long**. Nothing here to checkpoint, so all three modes behave identically — say so rather than asking. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
162
|
+
## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
|
|
163
|
+
|
|
164
|
+
- **Calls:** `orc lane calls orc-route --json` names every call and its exit codes.
|
|
165
|
+
**An exit code is an ANSWER where it says so, not a failure.** Make no other call.
|
|
166
|
+
- **Config:** `orc lane config orc-route --json`. Obey `effective`. Never merge
|
|
167
|
+
`.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`). Nothing
|
|
168
|
+
here is contested, gated or a stop: no preflight line, no gate to honour.
|
|
169
|
+
- **Rules:** `orc rules slice --lane orc-route --json` is the ONLY assembler
|
|
170
|
+
(`../_shared/phases/rules.md`). Its `line` prints VERBATIM at preflight.
|
|
171
|
+
|
|
172
|
+
## Waiting mid-run (`/orc-wait`)
|
|
173
|
+
|
|
174
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
175
|
+
Checkpoint **none** · safe point **read-only, seconds long**.
|
|
@@ -4,12 +4,9 @@ description: >
|
|
|
4
4
|
Run the test against the real running system, and report only what was
|
|
5
5
|
observed. Use for "/orc-test", "test my API end to end", "run the endpoints
|
|
6
6
|
from happy path to security", "test this against staging", "e2e the login
|
|
7
|
-
flow". It brings the
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
edge to abuse to security, RUNS every case, and writes the evidence and the
|
|
11
|
-
report into orc/orc-test/<slug>/. It never edits the system it is testing,
|
|
12
|
-
never commits, and never reports a result it did not observe.
|
|
7
|
+
flow". It brings the system up, expands the cases from happy path to security,
|
|
8
|
+
RUNS every case, and writes the evidence and the report into
|
|
9
|
+
orc/orc-test/<slug>/. It never edits the system it tests and never commits.
|
|
13
10
|
---
|
|
14
11
|
|
|
15
12
|
# `/orc-test` — the lane that RUNS the test
|
|
@@ -172,26 +169,15 @@ Canonical contract: `../_shared/live-target.md`. Read it before phase T1.
|
|
|
172
169
|
and offer: re-run a tier · widen the surface · `/orc-pact` the invariant this
|
|
173
170
|
run proved · `/orc-challenge` the report. Never proceed on your own.
|
|
174
171
|
|
|
175
|
-
##
|
|
172
|
+
## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
|
|
176
173
|
|
|
177
|
-
**
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
`../_shared/
|
|
184
|
-
and families: `../_shared/config-precedence.md`.
|
|
185
|
-
|
|
186
|
-
## Calls
|
|
187
|
-
|
|
188
|
-
**ONE catalogue, and it is not you:** `orc lane calls orc-test --json` names
|
|
189
|
-
every CLI call this lane makes, each with its exit-code contract, its cost, when
|
|
190
|
-
to run it, and what an EMPTY answer means. Never invent a spelling, never
|
|
191
|
-
re-word an exit code, and never re-derive a state word — the CLI's state words
|
|
192
|
-
are the only state words, and **an exit code is an ANSWER wherever that contract
|
|
193
|
-
says so, not a failure**. A call the answer does not name is a call this lane
|
|
194
|
-
does not make.
|
|
174
|
+
- **Calls:** `orc lane calls orc-test --json` names every call and its exit codes.
|
|
175
|
+
**An exit code is an ANSWER where it says so, not a failure.** Make no other call.
|
|
176
|
+
- **Config:** `orc lane config orc-test --json`. Obey `effective`, print every line
|
|
177
|
+
in `announce[]` VERBATIM at preflight, and honour `stops[]` before the first case runs.
|
|
178
|
+
Never merge `.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`).
|
|
179
|
+
- **Rules:** `orc rules slice --lane orc-test --json` is the ONLY assembler
|
|
180
|
+
(`../_shared/phases/rules.md`). Its `line` prints VERBATIM at preflight.
|
|
195
181
|
|
|
196
182
|
## Sending work off Claude (`orc extra`)
|
|
197
183
|
|
|
@@ -223,18 +209,11 @@ behind the disk. Keep the `Where it stands:` line at column 0.
|
|
|
223
209
|
|
|
224
210
|
## Trace
|
|
225
211
|
|
|
226
|
-
Tier **Iterative** — one packet per completed cycle.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
## Rules — the anti-slop card (`../_shared/phases/rules.md`)
|
|
231
|
-
|
|
232
|
-
`orc rules slice --lane orc-test --json` is the ONLY assembler; never build
|
|
233
|
-
the card here. It rides under the house rules and above the task —
|
|
234
|
-
**house rules > your project's rules > ORC's own packs** — and its `line` prints
|
|
235
|
-
VERBATIM at preflight. Returns gain `rules_applied[]`, `rules_conflicts[]` (a gap,
|
|
236
|
-
never a silent choice) and `rules_overridden[]`.
|
|
212
|
+
Tier **Iterative** — one packet per completed cycle. Pipe the PHASE PACKET to
|
|
213
|
+
`orc trace write --packet -` (exit ≠ 0 → `orc-trace-writer-haiku-4-5`).
|
|
214
|
+
Canonical: `../_shared/phases/trace.md`.
|
|
215
|
+
|
|
237
216
|
## Waiting mid-run (`/orc-wait`)
|
|
238
217
|
|
|
239
218
|
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
240
|
-
Checkpoint **cycle** · safe point **case boundary**.
|
|
219
|
+
Checkpoint **cycle** · safe point **case boundary**. Never begin a wait mid-request — a long `orc test run` is the first ORC operation that takes minutes with no model in it, and the safe point is BETWEEN cases.
|
|
@@ -64,13 +64,11 @@ Verdict: <READY / NEEDS FIXES>
|
|
|
64
64
|
|
|
65
65
|
## Behavior trace (always on)
|
|
66
66
|
|
|
67
|
-
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases`
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Nothing else about the protocol is restated here; a phase that ends with
|
|
73
|
-
`zero new trace lines is a protocol violation`.
|
|
67
|
+
`../_shared/phases/trace.md` (`core`, at run start; `orc lane phases orc-verify --json` →
|
|
68
|
+
`trace_grammar` gives the verbs). Lane token `verify`, tier
|
|
69
|
+
**Single-dispatch**. At run start write `log_dir/.current` =
|
|
70
|
+
`run-verify-<slug>-<DDMMYY>-<HHMMSS>.txt` AND `touch the trace file` of that name
|
|
71
|
+
in the SAME step. A phase that ends with `zero new trace lines is a protocol violation`.
|
|
74
72
|
|
|
75
73
|
## Boundaries
|
|
76
74
|
|
|
@@ -80,33 +78,17 @@ Nothing else about the protocol is restated here; a phase that ends with
|
|
|
80
78
|
- Reminder: to see usage limits, tell the user to run `/usage` (never invoke it
|
|
81
79
|
programmatically).
|
|
82
80
|
|
|
83
|
-
##
|
|
81
|
+
## Lane contract (`../_shared/lane-contract.md` — read it ONLY when a call exits ≠ 0)
|
|
84
82
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
- **Calls:** `orc lane calls orc-verify --json` names every call and its exit codes.
|
|
84
|
+
**An exit code is an ANSWER where it says so, not a failure.** Make no other call.
|
|
85
|
+
- **Config:** `orc lane config orc-verify --json`. Obey `effective`. Never merge
|
|
86
|
+
`.claude/orc.config.yaml` yourself (`../_shared/config-precedence.md`). Nothing
|
|
87
|
+
here is contested, gated or a stop: no preflight line, no gate to honour.
|
|
88
|
+
- **Rules:** `orc rules slice --lane orc-verify --json` is the ONLY assembler
|
|
89
|
+
(`../_shared/phases/rules.md`). Its `line` prints VERBATIM at preflight.
|
|
90
90
|
|
|
91
|
-
## Calls
|
|
92
|
-
|
|
93
|
-
**ONE catalogue, and it is not you:** `orc lane calls orc-verify --json` names every
|
|
94
|
-
CLI call this lane makes, each with its exit-code contract, its cost, when to run
|
|
95
|
-
it, and what an EMPTY answer means. Never invent a spelling, never re-word an
|
|
96
|
-
exit code, and never re-derive a state word — the CLI's state words are the only
|
|
97
|
-
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
98
|
-
a failure**. A call the answer does not name is a call this lane does not make.
|
|
99
|
-
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
100
|
-
command you are about to run, out loud, before running it.
|
|
101
|
-
|
|
102
|
-
## Rules — the anti-slop card (`../_shared/phases/rules.md`)
|
|
103
|
-
|
|
104
|
-
`orc rules slice --lane orc-verify --json` is the ONLY assembler; never build
|
|
105
|
-
the card here. It rides under the house rules and above the task —
|
|
106
|
-
**house rules > your project's rules > ORC's own packs** — and its `line` prints
|
|
107
|
-
VERBATIM at preflight. Returns gain `rules_applied[]`, `rules_conflicts[]` (a gap,
|
|
108
|
-
never a silent choice) and `rules_overridden[]`.
|
|
109
91
|
## Waiting mid-run (`/orc-wait`)
|
|
110
92
|
|
|
111
93
|
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
112
|
-
Checkpoint **none** · safe point **single dispatch**.
|
|
94
|
+
Checkpoint **none** · safe point **single dispatch**.
|
|
@@ -1,163 +1,156 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orc-wait
|
|
3
|
-
description: >
|
|
4
|
-
Wait for wall-clock time to pass without losing the run you are in. Use for
|
|
5
|
-
"/orc-wait", "/orc-wait 30", "/orc-wait 2h hard", "wait for my quota to
|
|
6
|
-
reset", "pause this until the window resets".
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- It never
|
|
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
|
-
The CLI writes the `WAIT` lines itself, into the trace already open. You do not
|
|
159
|
-
narrate them and you do not repeat them.
|
|
160
|
-
|
|
161
|
-
`/orc-wait` opens no run, so it is **not a lane** in the trace enum and writes
|
|
162
|
-
no `run-<lane>-<slug>` pointer — the `/orc-explain` precedent. With no run in
|
|
163
|
-
flight, a wait is simply a wait and nothing is traced.
|
|
1
|
+
---
|
|
2
|
+
name: orc-wait
|
|
3
|
+
description: >
|
|
4
|
+
Wait for wall-clock time to pass without losing the run you are in. Use for
|
|
5
|
+
"/orc-wait", "/orc-wait 30", "/orc-wait 2h hard", "wait for my quota to
|
|
6
|
+
reset", "pause this until the window resets". It writes the hand-back, waits
|
|
7
|
+
in detached hops that cost ZERO tokens, and picks the run back up. Modes: safe
|
|
8
|
+
(finish the wave), soft (checkpoint, then stop), hard (stop now). "/orc-wait
|
|
9
|
+
block <reason>" is the veto.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# ORC — the wait
|
|
13
|
+
|
|
14
|
+
Canonical contract: **`_shared/wait.md`**. Load it before you do anything here.
|
|
15
|
+
This spine is the entry point; that file is the rule.
|
|
16
|
+
|
|
17
|
+
> **`a lane that waits without a hand-back` has broken this contract.**
|
|
18
|
+
|
|
19
|
+
A wait is a stop. Every stop writes its hand-back BEFORE it ends, because the
|
|
20
|
+
thing that resumes the run may not be this session.
|
|
21
|
+
|
|
22
|
+
## What this lane never does
|
|
23
|
+
|
|
24
|
+
- It never dispatches an agent to do the waiting. An agent runs on the same
|
|
25
|
+
account and burns the window the wait exists to protect.
|
|
26
|
+
- It never runs another lane, and never changes the work: same tasks, same
|
|
27
|
+
slice, same agent resolve after the wait as before it.
|
|
28
|
+
- It never writes the user's config.
|
|
29
|
+
- It never computes hops itself. `orc wait plan` does that.
|
|
30
|
+
- It is **command-entry only.** No lane invokes `/orc-wait` for itself.
|
|
31
|
+
|
|
32
|
+
## W1 — parse (silent)
|
|
33
|
+
|
|
34
|
+
Run `orc wait plan <spec> --json`. Never do this arithmetic in your head.
|
|
35
|
+
|
|
36
|
+
| exit | meaning | what you do |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| 0 | planned | go to W2 |
|
|
39
|
+
| 1 | unparsable | show the `hint` verbatim and STOP. Do not guess a duration. |
|
|
40
|
+
| 2 | no reading | show the `hint` verbatim and STOP. `reset` needs a usage reading; ask for a time instead. |
|
|
41
|
+
|
|
42
|
+
`block` / `unblock` skip W1 entirely — see **The veto** below.
|
|
43
|
+
|
|
44
|
+
## W2 — resolve the mode
|
|
45
|
+
|
|
46
|
+
A named mode always wins. With none, read `wait_default_mode`:
|
|
47
|
+
|
|
48
|
+
- `ask` (the default) → ask, in ONE turn, with the cost of each spelled out:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Which mode?
|
|
52
|
+
1. safe — finish the current wave first, then wait. Loses nothing.
|
|
53
|
+
2. soft — stop at the next turn. Forces the checkpoint first.
|
|
54
|
+
3. hard — stop at the next turn. No checkpoint. Can lose the wave.
|
|
55
|
+
```
|
|
56
|
+
- `safe` | `soft` | `hard` → use it, and say which one you used and why.
|
|
57
|
+
|
|
58
|
+
If `orc wait lanes --json` reports `modes_differ: false` for the lane in flight
|
|
59
|
+
(nothing to checkpoint), SAY SO and do not ask — the three modes are identical
|
|
60
|
+
there, and asking a question with one real answer wastes a turn.
|
|
61
|
+
|
|
62
|
+
## W3 — reach the stop point
|
|
63
|
+
|
|
64
|
+
Answer the user IMMEDIATELY, before you reach it. A queued command that looks
|
|
65
|
+
ignored reads as a broken command.
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
⏸ I got your wait. 30 minutes, soft.
|
|
69
|
+
Wave 3 is running. I do not stop a dispatch in the middle.
|
|
70
|
+
I stop as soon as wave 3's returns are validated.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
| mode | stop at |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `safe` | the next SAFE POINT — see the table in `_shared/wait.md` |
|
|
76
|
+
| `soft` | the next model turn |
|
|
77
|
+
| `hard` | the next model turn |
|
|
78
|
+
|
|
79
|
+
**Never begin a wait** between a dispatch and its validated return, inside the
|
|
80
|
+
stop sequence, during a file write, or before the smoke gate has reported. That
|
|
81
|
+
holds in every mode, `hard` included.
|
|
82
|
+
|
|
83
|
+
## W4 — hand back (the step that is never skipped)
|
|
84
|
+
|
|
85
|
+
| mode | what you write |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `safe`, `soft` | the FULL stop sequence — `_shared/phases/stop-resume.md`, steps 2–3b |
|
|
88
|
+
| `hard` | `RESUME.md` ONLY, with your own hand, never a dispatched agent |
|
|
89
|
+
|
|
90
|
+
**`soft` is FORCED.** If the checkpoint write fails, **do not stop**. Report the
|
|
91
|
+
failure and stay in the run. Stopping without a good checkpoint is the one thing
|
|
92
|
+
that loses work.
|
|
93
|
+
|
|
94
|
+
`hard` is the dispatch-free stop: it writes only what ORC can write itself, and
|
|
95
|
+
that is exactly why it is fast. When you use it, name what may be lost:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
⚠ hard: wave 3 had 2 dispatches in flight. Their file writes may still land,
|
|
99
|
+
but their returns are not validated. RESUME.md records this.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## W5 — hop
|
|
103
|
+
|
|
104
|
+
Run each hop as a **detached** command so no model is running and no tokens are
|
|
105
|
+
spent. One hop per entry in `hops[]` from W1.
|
|
106
|
+
|
|
107
|
+
After every hop:
|
|
108
|
+
|
|
109
|
+
1. `orc usage check --json` (exit 0 → the window recovered; go to W6)
|
|
110
|
+
2. `orc wait status --json` — `cancel_requested: true` → stop hopping, go to W6
|
|
111
|
+
3. otherwise, the next hop
|
|
112
|
+
|
|
113
|
+
Print the END TIME every hop, not only the length: "hop 2 of 4, ends 19:14".
|
|
114
|
+
A user who cannot see when a wait ends cannot tell it from a hang.
|
|
115
|
+
|
|
116
|
+
## W6 — come back
|
|
117
|
+
|
|
118
|
+
Read `context` from `orc usage check --json`.
|
|
119
|
+
|
|
120
|
+
- **context small** → continue the run here, in one line.
|
|
121
|
+
- **context large** → STOP. Offer both paths (H `any.stop.where`), and recommend the fresh session:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
The wait ended. usage: 5h 9% (4h51m) · context: 81%
|
|
125
|
+
|
|
126
|
+
Context is large, and the prompt cache expired during the wait.
|
|
127
|
+
→ new session, then: orc resume <slug>
|
|
128
|
+
Or reply `continue` to go on here.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Habits:** the run in flight had `habits{}` in its config answer → read
|
|
132
|
+
`../_shared/habits.md`; its next packet takes the `ASK`. No `habits{}` → ignore `(H …)`.
|
|
133
|
+
|
|
134
|
+
## The veto — `block` and `unblock`
|
|
135
|
+
|
|
136
|
+
`/orc-wait block <reason>` → `orc wait block <slug> --reason "<why>"`.
|
|
137
|
+
|
|
138
|
+
- The CLI writes it. You never write `wait.json` yourself.
|
|
139
|
+
- **The reason is required.** Exit 1 means you must ask for one — relay the
|
|
140
|
+
refusal, never invent a reason on the user's behalf.
|
|
141
|
+
- It suppresses what ORC COMPUTES, never what the user TYPES. A typed
|
|
142
|
+
`/orc-wait 30 hard` still waits while a block is active.
|
|
143
|
+
- Re-announce it, with its age, at EVERY gate it suppresses. There is no
|
|
144
|
+
auto-expiry.
|
|
145
|
+
|
|
146
|
+
`orc wait cancel` is a DIFFERENT thing: it ends a wait already running. Block is
|
|
147
|
+
before, cancel is during. Never present them as the same choice.
|
|
148
|
+
|
|
149
|
+
## Trace
|
|
150
|
+
|
|
151
|
+
The CLI writes the `WAIT` lines itself, into the trace already open. You do not
|
|
152
|
+
narrate them and you do not repeat them.
|
|
153
|
+
|
|
154
|
+
`/orc-wait` opens no run, so it is **not a lane** in the trace enum and writes
|
|
155
|
+
no `run-<lane>-<slug>` pointer — the `/orc-explain` precedent. With no run in
|
|
156
|
+
flight, a wait is simply a wait and nothing is traced.
|