@azure-id/orc 1.0.0 → 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 +2437 -2367
- package/README.md +694 -631
- package/bin/cli.js +639 -0
- package/bin/verify-contracts.js +74 -0
- package/bin/verify-package.js +568 -563
- package/bin/webui/api.js +15 -0
- package/bin/webui/app.html +210 -207
- package/bin/webui/css/panels/wait.css +123 -0
- package/bin/webui/fixtures/index.js +7 -0
- package/bin/webui/fixtures/wait.js +97 -0
- package/bin/webui/i18n/en/nav.json +21 -20
- package/bin/webui/i18n/en/wait.json +41 -0
- package/bin/webui/i18n/id/nav.json +21 -20
- package/bin/webui/i18n/id/wait.json +41 -0
- package/bin/webui/js/01-i18n.js +151 -150
- package/bin/webui/js/panels/wait.js +253 -0
- package/package.json +1 -1
- package/templates/commands/orc-wait.md +19 -0
- package/templates/hooks/orc-statusline.js +39 -0
- package/templates/skills/_shared/phases/preflight.md +22 -0
- package/templates/skills/_shared/wait.md +240 -0
- package/templates/skills/orc/SKILL.md +6 -1
- package/templates/skills/orc-aftermath/SKILL.md +6 -1
- package/templates/skills/orc-analyze/SKILL.md +6 -1
- package/templates/skills/orc-boundary/SKILL.md +6 -1
- package/templates/skills/orc-brainstorm/SKILL.md +6 -1
- package/templates/skills/orc-budget/SKILL.md +6 -1
- package/templates/skills/orc-challenge/SKILL.md +6 -1
- package/templates/skills/orc-claude/SKILL.md +6 -1
- package/templates/skills/orc-diy/SKILL.md +6 -1
- package/templates/skills/orc-doc/SKILL.md +6 -1
- package/templates/skills/orc-explain/SKILL.md +5 -0
- package/templates/skills/orc-export/SKILL.md +5 -0
- package/templates/skills/orc-fast/SKILL.md +6 -1
- package/templates/skills/orc-grill/SKILL.md +6 -1
- package/templates/skills/orc-learn/SKILL.md +6 -1
- package/templates/skills/orc-mini/SKILL.md +6 -1
- package/templates/skills/orc-pact/SKILL.md +6 -1
- package/templates/skills/orc-pattern/SKILL.md +6 -1
- package/templates/skills/orc-poly/SKILL.md +6 -1
- package/templates/skills/orc-quick/SKILL.md +6 -1
- package/templates/skills/orc-retro/SKILL.md +6 -1
- package/templates/skills/orc-route/SKILL.md +6 -1
- package/templates/skills/orc-verify/SKILL.md +6 -1
- package/templates/skills/orc-wait/SKILL.md +163 -0
- package/templates/skills/orc-wiki/SKILL.md +6 -1
|
@@ -290,4 +290,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
290
290
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
291
291
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
292
292
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
293
|
-
command you are about to run, out loud, before running it.
|
|
293
|
+
command you are about to run, out loud, before running it.
|
|
294
|
+
|
|
295
|
+
## Waiting mid-run (`/orc-wait`)
|
|
296
|
+
|
|
297
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
298
|
+
Checkpoint **cycle** · safe point **after a cycle records**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -213,4 +213,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
213
213
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
214
214
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
215
215
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
216
|
-
command you are about to run, out loud, before running it.
|
|
216
|
+
command you are about to run, out loud, before running it.
|
|
217
|
+
|
|
218
|
+
## Waiting mid-run (`/orc-wait`)
|
|
219
|
+
|
|
220
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
221
|
+
Checkpoint **none** · safe point **single dispatch**. 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.
|
|
@@ -126,4 +126,9 @@ command you are about to run, out loud, before running it.
|
|
|
126
126
|
`orc diy set` + `orc diy compile`, both run by the user.
|
|
127
127
|
2. Fail closed: any gate ambiguity = STALE, with the reason shown.
|
|
128
128
|
3. The fallback ask is ONE question with two outcomes (`/orc` or stop) —
|
|
129
|
-
never a menu, never a silent fallback.
|
|
129
|
+
never a menu, never a silent fallback.
|
|
130
|
+
|
|
131
|
+
## Waiting mid-run (`/orc-wait`)
|
|
132
|
+
|
|
133
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
134
|
+
Checkpoint **full** · safe point **compiled phase edge**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -478,4 +478,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
478
478
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
479
479
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
480
480
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
481
|
-
command you are about to run, out loud, before running it.
|
|
481
|
+
command you are about to run, out loud, before running it.
|
|
482
|
+
|
|
483
|
+
## Waiting mid-run (`/orc-wait`)
|
|
484
|
+
|
|
485
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
486
|
+
Checkpoint **full** · safe point **wave edge**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -74,3 +74,8 @@ state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
|
74
74
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
75
75
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
76
76
|
command you are about to run, out loud, before running it.
|
|
77
|
+
|
|
78
|
+
## Waiting mid-run (`/orc-wait`)
|
|
79
|
+
|
|
80
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
81
|
+
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.
|
|
@@ -173,3 +173,8 @@ state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
|
173
173
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
174
174
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
175
175
|
command you are about to run, out loud, before running it.
|
|
176
|
+
|
|
177
|
+
## Waiting mid-run (`/orc-wait`)
|
|
178
|
+
|
|
179
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
180
|
+
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.
|
|
@@ -212,4 +212,9 @@ One `fast-checkpoint.md` in the run folder: GATE results (+ any
|
|
|
212
212
|
Never implement yourself (smoke gate = read-only build+test) · all artifacts
|
|
213
213
|
in the run subfolder, never project root · validate the subagent return
|
|
214
214
|
(malformed = failure) · never offer commit on a red build · report the
|
|
215
|
-
dispatch + remind the user to run `/usage` (never invoke it programmatically).
|
|
215
|
+
dispatch + remind the user to run `/usage` (never invoke it programmatically).
|
|
216
|
+
|
|
217
|
+
## Waiting mid-run (`/orc-wait`)
|
|
218
|
+
|
|
219
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
220
|
+
Checkpoint **full** · safe point **after the executor returns**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -230,4 +230,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
230
230
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
231
231
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
232
232
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
233
|
-
command you are about to run, out loud, before running it.
|
|
233
|
+
command you are about to run, out loud, before running it.
|
|
234
|
+
|
|
235
|
+
## Waiting mid-run (`/orc-wait`)
|
|
236
|
+
|
|
237
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
238
|
+
Checkpoint **snapshot** · safe point **round edge**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -173,4 +173,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
173
173
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
174
174
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
175
175
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
176
|
-
command you are about to run, out loud, before running it.
|
|
176
|
+
command you are about to run, out loud, before running it.
|
|
177
|
+
|
|
178
|
+
## Waiting mid-run (`/orc-wait`)
|
|
179
|
+
|
|
180
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
181
|
+
Checkpoint **none** · safe point **single dispatch**. 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.
|
|
@@ -241,4 +241,9 @@ exception is the opt-in `test-generator/<change-slug>/` self-QA deliverable,
|
|
|
241
241
|
which lands at the project root by design) · validate every
|
|
242
242
|
subagent return (malformed = failure) · report the dispatch log + remind the
|
|
243
243
|
user to run `/usage` (never invoke it programmatically) · **never offer commit
|
|
244
|
-
on a red build** (enforced by Phase M).
|
|
244
|
+
on a red build** (enforced by Phase M).
|
|
245
|
+
|
|
246
|
+
## Waiting mid-run (`/orc-wait`)
|
|
247
|
+
|
|
248
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
249
|
+
Checkpoint **full** · safe point **after the executor returns**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -247,4 +247,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
247
247
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
248
248
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
249
249
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
250
|
-
command you are about to run, out loud, before running it.
|
|
250
|
+
command you are about to run, out loud, before running it.
|
|
251
|
+
|
|
252
|
+
## Waiting mid-run (`/orc-wait`)
|
|
253
|
+
|
|
254
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
255
|
+
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.
|
|
@@ -146,4 +146,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
146
146
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
147
147
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
148
148
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
149
|
-
command you are about to run, out loud, before running it.
|
|
149
|
+
command you are about to run, out loud, before running it.
|
|
150
|
+
|
|
151
|
+
## Waiting mid-run (`/orc-wait`)
|
|
152
|
+
|
|
153
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
154
|
+
Checkpoint **none** · safe point **single dispatch**. 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.
|
|
@@ -234,4 +234,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
234
234
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
235
235
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
236
236
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
237
|
-
command you are about to run, out loud, before running it.
|
|
237
|
+
command you are about to run, out loud, before running it.
|
|
238
|
+
|
|
239
|
+
## Waiting mid-run (`/orc-wait`)
|
|
240
|
+
|
|
241
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
242
|
+
Checkpoint **docset** · safe point **after a per-repo plan is written**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -343,4 +343,9 @@ Never implement yourself · ask the gate before every dispatch · check every
|
|
|
343
343
|
return (broken = failure) · never offer commit while tests are red · never undo
|
|
344
344
|
the user's files · write the doc before the offers · stage only the task's files
|
|
345
345
|
· never write anything to GitHub · tell the user to run `/usage` (never run it
|
|
346
|
-
yourself).
|
|
346
|
+
yourself).
|
|
347
|
+
|
|
348
|
+
## Waiting mid-run (`/orc-wait`)
|
|
349
|
+
|
|
350
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
351
|
+
Checkpoint **entry** · safe point **after an entry closes**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|
|
@@ -241,4 +241,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
241
241
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
242
242
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
243
243
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
244
|
-
command you are about to run, out loud, before running it.
|
|
244
|
+
command you are about to run, out loud, before running it.
|
|
245
|
+
|
|
246
|
+
## Waiting mid-run (`/orc-wait`)
|
|
247
|
+
|
|
248
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
249
|
+
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.
|
|
@@ -180,4 +180,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
180
180
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
181
181
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
182
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.
|
|
183
|
+
command you are about to run, out loud, before running it.
|
|
184
|
+
|
|
185
|
+
## Waiting mid-run (`/orc-wait`)
|
|
186
|
+
|
|
187
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
188
|
+
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.
|
|
@@ -97,4 +97,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
97
97
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
98
98
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
99
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.
|
|
100
|
+
command you are about to run, out loud, before running it.
|
|
101
|
+
|
|
102
|
+
## Waiting mid-run (`/orc-wait`)
|
|
103
|
+
|
|
104
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
105
|
+
Checkpoint **none** · safe point **single dispatch**. 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.
|
|
@@ -0,0 +1,163 @@
|
|
|
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". You watched the statusline, you
|
|
7
|
+
saw the window was almost full, and you decided to stop — this carries that
|
|
8
|
+
decision out: it writes the hand-back, waits in short detached hops that cost
|
|
9
|
+
ZERO tokens, and picks the run back up where it left it. Three modes decide
|
|
10
|
+
how much finishes before it stops: safe (finish the wave), soft (stop now, but
|
|
11
|
+
force the checkpoint first), hard (stop now, RESUME.md only, can lose work).
|
|
12
|
+
Also carries the veto — "/orc-wait block <reason>" tells ORC not to stop you
|
|
13
|
+
at all. It never dispatches an agent, never runs another lane, and never
|
|
14
|
+
writes your config.
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# ORC — the wait
|
|
18
|
+
|
|
19
|
+
Canonical contract: **`_shared/wait.md`**. Load it before you do anything here.
|
|
20
|
+
This spine is the entry point; that file is the rule.
|
|
21
|
+
|
|
22
|
+
> **`a lane that waits without a hand-back` has broken this contract.**
|
|
23
|
+
|
|
24
|
+
A wait is a stop. Every stop writes its hand-back BEFORE it ends, because the
|
|
25
|
+
thing that resumes the run may not be this session.
|
|
26
|
+
|
|
27
|
+
## What this lane never does
|
|
28
|
+
|
|
29
|
+
- It never dispatches an agent to do the waiting. An agent runs on the same
|
|
30
|
+
account and burns the window the wait exists to protect.
|
|
31
|
+
- It never runs another lane, and never changes the work: same tasks, same
|
|
32
|
+
slice, same agent resolve after the wait as before it.
|
|
33
|
+
- It never writes the user's config.
|
|
34
|
+
- It never computes hops itself. `orc wait plan` does that.
|
|
35
|
+
- It is **command-entry only.** No lane invokes `/orc-wait` for itself.
|
|
36
|
+
|
|
37
|
+
## W1 — parse (silent)
|
|
38
|
+
|
|
39
|
+
Run `orc wait plan <spec> --json`. Never do this arithmetic in your head.
|
|
40
|
+
|
|
41
|
+
| exit | meaning | what you do |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| 0 | planned | go to W2 |
|
|
44
|
+
| 1 | unparsable | show the `hint` verbatim and STOP. Do not guess a duration. |
|
|
45
|
+
| 2 | no reading | show the `hint` verbatim and STOP. `reset` needs a usage reading; ask for a time instead. |
|
|
46
|
+
|
|
47
|
+
`block` / `unblock` skip W1 entirely — see **The veto** below.
|
|
48
|
+
|
|
49
|
+
## W2 — resolve the mode
|
|
50
|
+
|
|
51
|
+
A named mode always wins. With none, read `wait_default_mode`:
|
|
52
|
+
|
|
53
|
+
- `ask` (the default) → ask, in ONE turn, with the cost of each spelled out:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Which mode?
|
|
57
|
+
1. safe — finish the current wave first, then wait. Loses nothing.
|
|
58
|
+
2. soft — stop at the next turn. Forces the checkpoint first.
|
|
59
|
+
3. hard — stop at the next turn. No checkpoint. Can lose the wave.
|
|
60
|
+
```
|
|
61
|
+
- `safe` | `soft` | `hard` → use it, and say which one you used and why.
|
|
62
|
+
|
|
63
|
+
If `orc wait lanes --json` reports `modes_differ: false` for the lane in flight
|
|
64
|
+
(nothing to checkpoint), SAY SO and do not ask — the three modes are identical
|
|
65
|
+
there, and asking a question with one real answer wastes a turn.
|
|
66
|
+
|
|
67
|
+
## W3 — reach the stop point
|
|
68
|
+
|
|
69
|
+
Answer the user IMMEDIATELY, before you reach it. A queued command that looks
|
|
70
|
+
ignored reads as a broken command.
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
⏸ I got your wait. 30 minutes, soft.
|
|
74
|
+
Wave 3 is running. I do not stop a dispatch in the middle.
|
|
75
|
+
I stop as soon as wave 3's returns are validated.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
| mode | stop at |
|
|
79
|
+
|---|---|
|
|
80
|
+
| `safe` | the next SAFE POINT — see the table in `_shared/wait.md` |
|
|
81
|
+
| `soft` | the next model turn |
|
|
82
|
+
| `hard` | the next model turn |
|
|
83
|
+
|
|
84
|
+
**Never begin a wait** between a dispatch and its validated return, inside the
|
|
85
|
+
stop sequence, during a file write, or before the smoke gate has reported. That
|
|
86
|
+
holds in every mode, `hard` included.
|
|
87
|
+
|
|
88
|
+
Never write "immediately". `hard` stops at the first moment ORC can act.
|
|
89
|
+
|
|
90
|
+
## W4 — hand back (the step that is never skipped)
|
|
91
|
+
|
|
92
|
+
| mode | what you write |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `safe`, `soft` | the FULL stop sequence — `_shared/phases/stop-resume.md`, steps 2–3b |
|
|
95
|
+
| `hard` | `RESUME.md` ONLY, with your own hand, never a dispatched agent |
|
|
96
|
+
|
|
97
|
+
**`soft` is FORCED.** If the checkpoint write fails, **do not stop**. Report the
|
|
98
|
+
failure and stay in the run. Stopping without a good checkpoint is the one thing
|
|
99
|
+
that loses work.
|
|
100
|
+
|
|
101
|
+
`hard` is the dispatch-free stop: it writes only what ORC can write itself, and
|
|
102
|
+
that is exactly why it is fast. When you use it, name what may be lost:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
⚠ hard: wave 3 had 2 dispatches in flight. Their file writes may still land,
|
|
106
|
+
but their returns are not validated. RESUME.md records this.
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## W5 — hop
|
|
110
|
+
|
|
111
|
+
Run each hop as a **detached** command so no model is running and no tokens are
|
|
112
|
+
spent. One hop per entry in `hops[]` from W1.
|
|
113
|
+
|
|
114
|
+
After every hop:
|
|
115
|
+
|
|
116
|
+
1. `orc usage check --json` (exit 0 → the window recovered; go to W6)
|
|
117
|
+
2. `orc wait status --json` — `cancel_requested: true` → stop hopping, go to W6
|
|
118
|
+
3. otherwise, the next hop
|
|
119
|
+
|
|
120
|
+
Print the END TIME every hop, not only the length: "hop 2 of 4, ends 19:14".
|
|
121
|
+
A user who cannot see when a wait ends cannot tell it from a hang.
|
|
122
|
+
|
|
123
|
+
## W6 — come back
|
|
124
|
+
|
|
125
|
+
Read `context` from `orc usage check --json`.
|
|
126
|
+
|
|
127
|
+
- **context small** → continue the run here, in one line.
|
|
128
|
+
- **context large** → STOP. Offer both paths, and recommend the fresh session:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
The wait ended. usage: 5h 9% (4h51m) · context: 81%
|
|
132
|
+
|
|
133
|
+
Context is large, and the prompt cache expired during the wait.
|
|
134
|
+
→ new session, then: orc resume <slug>
|
|
135
|
+
Or reply `continue` to go on here.
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
ORC cannot clear its own context — `/clear` is the user's action. Offer the
|
|
139
|
+
swap; never claim to have performed it.
|
|
140
|
+
|
|
141
|
+
## The veto — `block` and `unblock`
|
|
142
|
+
|
|
143
|
+
`/orc-wait block <reason>` → `orc wait block <slug> --reason "<why>"`.
|
|
144
|
+
|
|
145
|
+
- The CLI writes it. You never write `wait.json` yourself.
|
|
146
|
+
- **The reason is required.** Exit 1 means you must ask for one — relay the
|
|
147
|
+
refusal, never invent a reason on the user's behalf.
|
|
148
|
+
- It suppresses what ORC COMPUTES, never what the user TYPES. A typed
|
|
149
|
+
`/orc-wait 30 hard` still waits while a block is active.
|
|
150
|
+
- Re-announce it, with its age, at EVERY gate it suppresses. There is no
|
|
151
|
+
auto-expiry.
|
|
152
|
+
|
|
153
|
+
`orc wait cancel` is a DIFFERENT thing: it ends a wait already running. Block is
|
|
154
|
+
before, cancel is during. Never present them as the same choice.
|
|
155
|
+
|
|
156
|
+
## Trace
|
|
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.
|
|
@@ -168,4 +168,9 @@ exit code, and never re-derive a state word — the CLI's state words are the on
|
|
|
168
168
|
state words, and **an exit code is an ANSWER wherever that contract says so, not
|
|
169
169
|
a failure**. A call the answer does not name is a call this lane does not make.
|
|
170
170
|
Exit ≠ 0 from the catalogue itself → say the CLI is unavailable and name the
|
|
171
|
-
command you are about to run, out loud, before running it.
|
|
171
|
+
command you are about to run, out loud, before running it.
|
|
172
|
+
|
|
173
|
+
## Waiting mid-run (`/orc-wait`)
|
|
174
|
+
|
|
175
|
+
Canonical: `../_shared/wait.md`. **`a lane that waits without a hand-back` has broken this contract.**
|
|
176
|
+
Checkpoint **full** · safe point **scan-task boundary**. `soft` FORCES that checkpoint and does NOT stop if the write fails; `hard` skips it and can lose an in-flight return. Never begin a wait between a dispatch and its validated return, or before the smoke gate has reported.
|