devrites 5.10.0 → 5.10.2

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +5 -2
  3. package/docs/architecture.md +8 -4
  4. package/docs/cli.md +4 -1
  5. package/docs/command-map.md +3 -2
  6. package/docs/engine/commands.md +7 -5
  7. package/docs/orchestration.md +5 -2
  8. package/docs/skills.md +1 -1
  9. package/docs/usage.md +5 -3
  10. package/engine/commands.go +3 -0
  11. package/engine/help.go +190 -0
  12. package/engine/help_test.go +98 -0
  13. package/engine/internal/parallel/cli.go +90 -32
  14. package/engine/internal/parallel/cli_test.go +32 -0
  15. package/engine/main.go +15 -8
  16. package/engine/root_routing_test.go +4 -0
  17. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +27 -9
  18. package/pack/.claude/skills/rite-autocomplete/SKILL.md +20 -9
  19. package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +5 -2
  20. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +25 -14
  21. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +10 -3
  22. package/pack/.claude/skills/rite-build/SKILL.md +3 -1
  23. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +4 -3
  24. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +3 -1
  25. package/pack/.claude/skills/rite-define/reference/gates.md +5 -0
  26. package/pack/.claude/skills/rite-define/reference/plan-template.md +1 -1
  27. package/pack/.claude/skills/rite-resolve/SKILL.md +5 -2
  28. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +27 -9
  29. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +20 -9
  30. package/pack/generated/claude/skills/rite-autocomplete/reference/decision-policy.md +5 -2
  31. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +25 -14
  32. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +10 -3
  33. package/pack/generated/claude/skills/rite-build/SKILL.md +3 -1
  34. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +4 -3
  35. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +3 -1
  36. package/pack/generated/claude/skills/rite-define/reference/gates.md +5 -0
  37. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +1 -1
  38. package/pack/generated/claude/skills/rite-resolve/SKILL.md +5 -2
  39. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +27 -9
  40. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +20 -9
  41. package/pack/generated/codex/skills/rite-autocomplete/reference/decision-policy.md +5 -2
  42. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +25 -14
  43. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +10 -3
  44. package/pack/generated/codex/skills/rite-build/SKILL.md +3 -1
  45. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +4 -3
  46. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +3 -1
  47. package/pack/generated/codex/skills/rite-define/reference/gates.md +5 -0
  48. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +1 -1
  49. package/pack/generated/codex/skills/rite-resolve/SKILL.md +5 -2
  50. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +27 -9
  51. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +20 -9
  52. package/pack/generated/omp/skills/rite-autocomplete/reference/decision-policy.md +5 -2
  53. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +25 -14
  54. package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +10 -3
  55. package/pack/generated/omp/skills/rite-build/SKILL.md +3 -1
  56. package/pack/generated/omp/skills/rite-build/reference/afk-discipline.md +4 -3
  57. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +3 -1
  58. package/pack/generated/omp/skills/rite-define/reference/gates.md +5 -0
  59. package/pack/generated/omp/skills/rite-define/reference/plan-template.md +1 -1
  60. package/pack/generated/omp/skills/rite-resolve/SKILL.md +5 -2
  61. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +27 -9
  62. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +20 -9
  63. package/pack/generated/pi/skills/rite-autocomplete/reference/decision-policy.md +5 -2
  64. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +25 -14
  65. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +10 -3
  66. package/pack/generated/pi/skills/rite-build/SKILL.md +3 -1
  67. package/pack/generated/pi/skills/rite-build/reference/afk-discipline.md +4 -3
  68. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +3 -1
  69. package/pack/generated/pi/skills/rite-define/reference/gates.md +5 -0
  70. package/pack/generated/pi/skills/rite-define/reference/plan-template.md +1 -1
  71. package/pack/generated/pi/skills/rite-resolve/SKILL.md +5 -2
  72. package/package.json +1 -1
@@ -17,18 +17,21 @@ allow_gates: [advisory, validating]
17
17
  # max_slices / max_agents / max_minutes / max_review_queue omitted: unlimited
18
18
  # continue_sequence: true # opt-in: chain recorded continuations after Seal GO
19
19
  # max_workspaces: 5 # sequence budget when chaining
20
- # max_parallel: 10 # Build batch cap; 1 = serial (default: eligible, cap 10)
20
+ # max_parallel: 10 # default cap when this invocation omits `--parallel N`; `--parallel N` wins and rewrites only this field
21
21
  # max_tokens: <N>
22
22
  # max_cost_usd: <amount>
23
23
  # notify: "<cmd>"
24
24
  ```
25
25
 
26
- Read an existing sentinel first. Preserve it byte-for-byte when valid; stop if
26
+ Read an existing sentinel first. Preserve it byte-for-byte when valid, except
27
+ when this invocation contains `--parallel N`: then write or replace only
28
+ `max_parallel: N` and leave every other key unchanged. Stop if the sentinel is
27
29
  malformed. Do not stop because it names `max_slices` / `max_agents` /
28
30
  `max_minutes` / `max_review_queue` or only `[advisory]`. If absent, write it
29
- once after clarity. Never write `max_slices` from `--max-slices`.
30
- It is read-only: never rewrite it after Vet or reset it on resume. Leftover
31
- `expires_at` is ignored and never rewritten.
31
+ once after clarity, and include `max_parallel: N` when that flag is present.
32
+ Never write `max_slices` from `--max-slices`. It is otherwise read-only: never rewrite it after Vet or reset it on resume. Leftover `expires_at` is ignored
33
+ and never rewritten. **Failing case:** leftover `max_parallel: 1` keeps the run
34
+ serial after `--parallel 5`.
32
35
 
33
36
  ### Derive the mutable post-vet budget
34
37
 
@@ -44,8 +47,13 @@ readiness check first; reject overlap. Do not stop on `max_agents`,
44
47
  gets fresh activation-local counters but retains durable slice/recovery state.
45
48
 
46
49
  When driving `$rite-build`, ignore afk-discipline remaining-0, `--max-slices`,
47
- and parallel AFK headroom. Close validating questions
48
- (recommended pick) instead of queuing them.
50
+ and parallel AFK headroom as stop conditions. Pass this invocation's
51
+ `--parallel N` into `$rite-build` when present; leftover sentinel
52
+ `max_parallel` is then not the cap. Close validating questions and blocking questions
53
+ that already name a ranked recommended option (recommended pick via
54
+ `devrites-engine state resolve`) instead of queuing them or handing
55
+ `$rite-resolve` to the user. Escalating, irreversible-risk, access, and
56
+ blocking with no recommended option still pause.
49
57
 
50
58
  ## Phase arc
51
59
 
@@ -58,7 +66,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
58
66
  | 3 | `$rite-temper` | harden, reduce, or expand; irreversible risk still pauses |
59
67
  | 4 | `$rite-define` | approved plan/tasks/traceability |
60
68
  | 5 | `$rite-vet` | every plan; derive mutable budget after READY |
61
- | 6 | `$rite-build` batch loop | largest eligible path-disjoint set (cap 10; one-slice round when <2 eligible); recompute after each round; charge once per green built slice |
69
+ | 6 | `$rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10; one-slice round when <2 eligible); recompute after each round; charge once per green built slice |
62
70
  | 7 | `$rite-prove` | all slices built; approved proof; recovery on red |
63
71
  | 8 | `$rite-polish` | re-prove after code edits |
64
72
  | 9 | `$rite-review` | in-scope correction then fresh proof |
@@ -122,16 +130,19 @@ agent-owned earlier-phase gap:
122
130
  6. Restore and consume the original cursor when prerequisites are green.
123
131
 
124
132
  <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"loop tick sees Workflow Artifact trigger/state","action":"invoke classifier once under owner lock; no actor-history migration","return":"same loop cursor; no budget charge for verify/rerun"} -->
125
- Ask only for a human-owned decision or mandatory safety/access action. Three
126
- no-progress corrections of one exact fingerprint exhaust; preserve its
127
- reproduction and dead ends without another Plan/Vet command.
133
+ Ask only for a human-owned decision or mandatory safety/access action. An open
134
+ blocking question with `proposed` or option 1 labelled Recommended is not that
135
+ decision: resolve it and continue. Three no-progress corrections of one exact
136
+ fingerprint exhaust; preserve its reproduction and dead ends without another
137
+ Plan/Vet command.
128
138
 
129
139
  ## Continuous caller obligation
130
140
 
131
141
  No user-facing reply is permitted while durable state contains agent-owned
132
- `NEEDS_REPLAN`, an intermediate Plan/Vet action, or a distinct retained
133
- Critical/Important fingerprint below its cap. Invoke the next internal repair
134
- immediately. A narrow reviewer closing one finding and exposing another
142
+ `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
143
+ Critical/Important fingerprint below its cap, or an open blocking question that
144
+ already names a ranked recommended option. Invoke the next internal repair or
145
+ `devrites-engine state resolve` immediately. A narrow reviewer closing one finding and exposing another
135
146
  Critical/Important invariant is progress, not exhaustion.
136
147
 
137
148
  The number of completed repair/Vet cycles is not a stop condition. Context
@@ -59,14 +59,21 @@ exhausted.
59
59
  <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"classifier returns owner-busy, exhausted, or existing hard gate","action":"stop on exact WAIT_ACTIVE_OWNER, BLOCKED_EXHAUSTED, or BLOCKED_GATE result","return":"unchanged cursor plus fixed route-owned output"} -->
60
60
  ## Other stop classes
61
61
 
62
- - **Gate severity:** blocking or escalating gate. Validating: auto-pick the
63
- recommended option, close the question, continue.
62
+ - **Gate severity:** escalating always stops. Blocking with a ranked recommended
63
+ option (`proposed` or option 1 labelled Recommended): auto-pick via
64
+ `devrites-engine state resolve`, then continue internally (including Spec Drift
65
+ Guard when the answer changes ownership or acceptance). Blocking with no
66
+ recommended option still stops. Validating: auto-pick the recommended option,
67
+ close the question, continue.
64
68
  - **Temper:** `expand` and extra acceptance auto-apply (record + Drift Guard).
65
69
  Irreversible-risk still pauses. `hold-rigor`, `reduce-to-MVP`, and a skip do not pause.
66
70
  - **Clarify:** material Partial/Missing/unowned decision coverage or a
67
71
  low-confidence high-consequence assumption. Continue the initial interview;
68
72
  never arm AFK early.
69
- - **Seal:** NO-GO, with every blocker and fix direction. Never round up to GO.
73
+ - **Seal:** remaining NO-GO after recommended-option questions are closed, with
74
+ every remaining blocker and fix direction. Never round up to GO. An open
75
+ recommended-option blocking question is not a Seal stop: resolve it, recover
76
+ agent-owned findings, then re-enter Seal.
70
77
  - **Reslice:** execute its marked action before deciding continue/stop.
71
78
  - **Slice budget:** do not stop on `--max-slices`. Leftover
72
79
  pre-existing remaining value, explicit flag, sentinel cap, or post-vet pending count
@@ -64,7 +64,9 @@ filled, and recomputes after every completed round (serial slice or parallel
64
64
  integrate) until no pending slice remains
65
65
  ([`parallel-batch.md` § Dynamic selection](reference/parallel-batch.md#dynamic-selection-and-re-batching)).
66
66
  Unattended runs (`$rite-autocomplete`, `.devrites/AFK` `max_parallel`) repeat batches
67
- inside the same run; HITL stops after each batch. Non-integer/`N≤0`/`N>10` hard refuse.
67
+ inside the same run; HITL stops after each batch. This invocation's `--parallel N`
68
+ is the cap: leftover sentinel `max_parallel` is not consulted. Autocomplete with
69
+ that flag also writes or replaces only `max_parallel: N`. Non-integer/`N≤0`/`N>10` hard refuse.
68
70
  All-green (independent review + proof) then integrate as one local `WIP(<slug>):`
69
71
  commit per sibling onto the current control branch (never pushed). Do not
70
72
  integrate a sibling because the wright returned. A red/gap sibling gets a bounded repair
@@ -16,9 +16,10 @@ control; irreversible work (destructive/auth/public API) always pauses.
16
16
  The controlling root owns the cap:
17
17
 
18
18
  1. **Before every dispatch**, re-read `.devrites/AFK`, `state.md`, and the
19
- selected slice. When `--parallel N` or sentinel `max_parallel` is greater than
20
- 1, recompute `N_eff` via `parallel select` before the next dispatch — a prior
21
- one-slice round does not keep the run serial. A configured `max_slices` and any existing
19
+ selected slice. This invocation's `--parallel N` is the cap when present;
20
+ leftover sentinel `max_parallel` is not consulted in that case. When that
21
+ flag or sentinel `max_parallel` is greater than 1, recompute `N_eff` via
22
+ `parallel select` before the next dispatch — a prior one-slice round does not keep the run serial. A configured `max_slices` and any existing
22
23
  `afk_slices_remaining` value, including its released bullet form, must each
23
24
  be a decimal nonnegative integer. A missing
24
25
  `state.md` or malformed configured value fails closed; an omitted cap is the
@@ -9,6 +9,7 @@ Opt-in only. Default `$rite-build` stays [`one-slice-cycle.md`](one-slice-cycle.
9
9
  | omitted / `--parallel 1` | Serial one-slice |
10
10
  | `--parallel N` (**2≤N≤10**) | N is a **cap**, not a quota: run the largest eligible set ≤ N |
11
11
  | non-integer / `N≤0` / `N>10` | Hard refuse (no silent clamp) |
12
+ | Autocomplete `--parallel N` | N is the cap for this run; leftover sentinel `max_parallel` is ignored, then `$rite-autocomplete` writes or replaces only `max_parallel: N` |
12
13
  | Autocomplete, no flag | Same path, cap from sentinel `max_parallel` else 10; serial only when ineligible |
13
14
 
14
15
  AFK caps `N`. Charge green siblings once after integrate; abort /
@@ -21,7 +22,8 @@ Size each batch by what is runnable **now**, never by the requested number:
21
22
 
22
23
  ```text
23
24
  N_eff = min(
24
- cap -- --parallel N | sentinel max_parallel | 10 (autocomplete default)
25
+ cap -- this invocation's --parallel N (wins over leftover sentinel max_parallel)
26
+ | else sentinel max_parallel | else 10 (autocomplete default)
25
27
  eligible set -- dependency-satisfied pending slices, pairwise path-disjoint
26
28
  AFK headroom -- remaining max_slices, max_agents, max_minutes, review queue
27
29
  host capacity -- concurrent worktree writers + the runtime isolation table
@@ -127,6 +127,11 @@ list.
127
127
  `escalating` is never in `allow_gates`: specialist routing is not something AFK can
128
128
  shortcut.
129
129
 
130
+ `$rite-autocomplete` does not add `blocking` to `allow_gates`. It auto-resolves
131
+ open blocking questions that already name a recommended option via
132
+ `devrites-engine state resolve`, then continues. That is an orchestrator
133
+ exception, not an AFK ceiling change.
134
+
130
135
  ## Anti-patterns
131
136
 
132
137
  - **One gate for everything.** This puts all work behind one reviewer. Pick gates per slice.
@@ -14,7 +14,7 @@ Spec: ./spec.md Decision coverage: ./decision-coverage.md Date: <date>
14
14
  - Language/runtime/version: <...>
15
15
  - Frameworks/libraries: <...>
16
16
  - Storage/data: <...>
17
- - Test commands: <discovered runner commands; discovery contract: rite-prove/reference/test-command-discovery.md>
17
+ - Test commands: <discovered runner commands; discovery contract: .agents/skills/rite-prove/reference/test-command-discovery.md>
18
18
  - Target/platform/constraints: <...>
19
19
  - Approach-affecting product/constraint unknowns route to `$rite-clarify`;
20
20
  `[NEEDS CLARIFICATION]` blocks approval.
@@ -86,8 +86,11 @@ Pull these via `Read` when shaping the resolve:
86
86
  recommend `$rite-plan repair`. Otherwise → recommend the slice's natural next action
87
87
  (typically `$rite-build` for the slice that was awaiting).
88
88
  **Completion:** the resolved state contains exactly one next command.
89
- 6. **STOP.** This skill does not run `$rite-build` itself: the user re-enters the
90
- workflow explicitly.
89
+ 6. **STOP.** User-invoked `$rite-resolve` does not run `$rite-build` itself: the
90
+ user re-enters the workflow explicitly. A controlling `$rite-autocomplete`
91
+ caller invokes the same `devrites-engine state resolve` writer internally and
92
+ continues; it must not emit this skill as a user handoff for a question that
93
+ already names a ranked recommended option.
91
94
 
92
95
  > **Mid-flight discipline.** Don't edit `spec.md` / `plan.md` to "incorporate" the
93
96
  > answer. That's `$rite-plan repair`. Don't silently retry a build after the answer
@@ -56,14 +56,14 @@ max_minutes: 120 # wall-clock minutes in one host activation
56
56
  max_review_queue: 8 # unresolved review/gate items admitted before fan-out stops
57
57
  # max_tokens: 200000 # optional stricter host-observed token cap
58
58
  # max_cost_usd: 10 # optional stricter host-observed cost cap
59
- notify: "ntfy.sh/my-topic" # shell command; examples: rite-build/reference/afk-discipline.md
59
+ notify: "ntfy.sh/my-topic" # shell command; examples: .omp/skills/rite-build/reference/afk-discipline.md
60
60
  allow_gates: [advisory, validating] # gate severities AFK auto-handles (auto-picks the recommended option)
61
61
  continue_sequence: true # after Seal GO, open the next recorded continuation
62
62
  max_workspaces: 5 # workspaces one armed sequence may open
63
- max_parallel: 10 # cap on eligible path-disjoint Build batches (1 = serial)
63
+ max_parallel: 10 # unattended default cap; `--parallel N` on this invocation wins and may rewrite only this field
64
64
  ```
65
65
 
66
- The file is **read-only config**: never rewritten in place. `max_slices` is the initial
66
+ The file is **read-only config**: never rewritten in place, except `/rite-autocomplete --parallel N` writes or replaces only `max_parallel: N`. `max_slices` is the initial
67
67
  budget; the mutable remaining count is the `state.md` cursor
68
68
  `afk_slices_remaining` (`AFK slices remaining: <n>` in the released bullet
69
69
  form), owned by the controlling root. Recognize either spelling and preserve
@@ -119,11 +119,18 @@ candidate manifest to cover the whole recorded chain — run
119
119
  - Every human-owned, safety, access, exhaustion, and `NO-GO` condition still stops the
120
120
  run exactly as without this field.
121
121
 
122
- `max_parallel` caps a Build batch for unattended runs; `1` forces the serial cycle.
123
- Unattended runs take the largest eligible set cap and recompute after every completed
124
- round (serial slice or parallel integrate)
125
- ([parallel-batch.md § Dynamic selection and re-batching](../../../rite-build/reference/parallel-batch.md#dynamic-selection-and-re-batching));
126
- an explicit `/rite-build --parallel N` cap wins for that invocation.
122
+ `max_parallel` is the unattended default batch cap only when this invocation does
123
+ not contain `--parallel N`; `1` forces the serial cycle only in that default
124
+ case. An exact `--parallel N` on `/rite-autocomplete` or `/rite-build` is the
125
+ batch cap for this run: do not consult leftover sentinel `max_parallel`, and do
126
+ not treat `max_parallel: 1` as serial. `/rite-autocomplete --parallel N` writes
127
+ or replaces only that field so later ticks keep the cap; `/rite-build --parallel N`
128
+ wins for that invocation without rewriting the sentinel. Never write `max_slices`
129
+ from `--max-slices`. **Failing case:** `/rite-autocomplete --parallel 5` honors a
130
+ leftover `max_parallel: 1` and stays serial.
131
+ Unattended runs take the largest eligible set ≤ that cap and recompute after
132
+ every completed round (serial slice or parallel integrate)
133
+ ([parallel-batch.md § Dynamic selection and re-batching](../../../rite-build/reference/parallel-batch.md#dynamic-selection-and-re-batching)).
127
134
 
128
135
  ## Unattended resource envelope
129
136
 
@@ -166,7 +173,18 @@ for the full taxonomy. Summary:
166
173
  | blocking | high | sync | 15m | **no** (always pauses) |
167
174
  | escalating | novel pattern | sync to specialist | 24h | **no** (always pauses) |
168
175
 
169
- `blocking` and `escalating` always pause regardless of `allow_gates`.
176
+ `blocking` and `escalating` always pause for HITL and for AFK `/rite-build`,
177
+ regardless of `allow_gates`.
178
+
179
+ **Autocomplete exception.** While `/rite-autocomplete` is the controlling
180
+ caller, an open `gate: blocking` question that already carries a ranked
181
+ recommended option (`proposed:` or option 1 labelled `(Recommended)`) is not a
182
+ user handoff: the orchestrator auto-picks that option through
183
+ `devrites-engine state resolve` and continues, including internal Spec Drift
184
+ Guard when the answer changes ownership or acceptance. Escalating,
185
+ irreversible-risk, access, and blocking questions with no recommended option
186
+ still pause. Putting `blocking` in `allow_gates` does not replace this resolve
187
+ step: an unanswered blocking question still fails Seal.
170
188
 
171
189
  An open `gate: validating` entry is **merge-blocking by definition**: at `/rite-seal` any
172
190
  `questions.md` entry with `gate: validating` and `status: open` is a NO-GO, regardless of
@@ -8,8 +8,10 @@ user-invocable: true
8
8
  # /rite-autocomplete: full lifecycle, unattended
9
9
 
10
10
  Run every phase after one clarification window. Irreversible-risk,
11
- blocking/escalating,<!-- pack-scan-ignore: negated statement: gates are NOT disabled -->
12
- and NO-GO still pause. Use the Standard native
11
+ escalating,<!-- pack-scan-ignore: negated statement: gates are NOT disabled -->
12
+ access, unanswered blocking with no recommended option, and remaining NO-GO
13
+ still pause. Open blocking questions that already name a ranked recommended
14
+ option auto-resolve; they are not a user handoff. Use the Standard native
13
15
  profile by default and Full for high-risk scope or explicit `--full`; see
14
16
  [`orchestration-profiles.md`](../devrites-lib/reference/orchestration-profiles.md).
15
17
 
@@ -85,25 +87,34 @@ executable controller/harness/bundle bytes or a missing writer, read
85
87
  3. **Arm AFK once.** Apply the loop's
86
88
  [one-write AFK contract](reference/loop.md#arm-afk-once): preserve valid
87
89
  existing bytes or create the sentinel once (`allow_gates: [advisory, validating]`); never
88
- rewrite it after Vet. Preserve an existing sentinel byte-for-byte.
90
+ rewrite it after Vet except to write or replace only `max_parallel: N` when
91
+ this invocation contains `--parallel N`. Preserve an existing sentinel
92
+ byte-for-byte otherwise. **Failing case:** leftover `max_parallel: 1` keeps
93
+ the run serial after `--parallel 5`.
89
94
  **Completion:** a valid read-only AFK sentinel exists.
90
95
  4. **Drive phases.** Follow [the loop](reference/loop.md): `/rite-spec` →
91
96
  `/rite-clarify` → `/rite-temper` → `/rite-define` → `/rite-vet` →
92
97
  `/rite-build` batch loop → `/rite-prove` → `/rite-polish` →
93
98
  `/rite-review` → `/rite-seal`. Read and execute each skill; durable files, not
94
99
  chat, carry state. Apply the mutable post-vet budget before first Build.
95
- Build runs the largest eligible path-disjoint batch (cap: `--parallel N`, else
96
- sentinel `max_parallel`, else 10) and recomputes after every completed round until no
97
- pending slice remains; a one-slice round is serial for that round only, then
100
+ Build runs the largest eligible path-disjoint batch (cap: this invocation's
101
+ `--parallel N`, else sentinel `max_parallel`, else 10) and recomputes after
102
+ every completed round until no pending slice remains; a one-slice round is serial for that round only, then
98
103
  selection runs again (host isolation still forces serial when concurrent writers
99
- cannot be separated).
104
+ cannot be separated). When `--parallel N`
105
+ is present, pass it into `/rite-build` and do not consult leftover sentinel
106
+ `max_parallel`.
100
107
  **Completion:** loop reaches Seal GO or persists a valid stop before any later phase.
101
108
  5. **Apply stops.** At every gate use
102
109
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
103
110
  route agent-owned red results through bounded recovery.
104
111
  Red gates block forward advancement and enter caller-owned recovery. Stop on
105
- hard risk, human-owned blocking/escalating/NO-GO, or the
106
- exact fingerprint's proven exhaustion. Technical exhaustion records terminal
112
+ hard risk, escalating, irreversible-risk, access, blocking with no
113
+ recommended option, remaining NO-GO, or the exact fingerprint's proven
114
+ exhaustion. An open blocking question that already names a ranked recommended
115
+ option (`proposed` or option 1 labelled Recommended) auto-resolves through
116
+ `devrites-engine state resolve` and continues; do not emit `/rite-resolve` as
117
+ a user handoff. Technical exhaustion records terminal
107
118
  `Next step: none`, never a routine phase command. **Completion:** no stop is active, or its cursor and reason are durable.
108
119
  6. **Seal boundary.** Without a ship flag, stop at Seal GO with `/rite-ship` —
109
120
  unless `continue_sequence` is armed and sequence budget remains, in which case
@@ -36,5 +36,8 @@ not pick the option that's merely easiest to implement.
36
36
 
37
37
  ## When a choice is NOT autocomplete's to make
38
38
 
39
- Human-owned blocking/escalating, irreversible-risk, and access stay human.
40
- Recommended temper `expand` auto-applies; do not invent product intent.
39
+ Irreversible-risk, escalating, access, and blocking questions with no ranked
40
+ recommended option stay human. A blocking question that already names option 1
41
+ `(Recommended)` or `proposed:` is autocomplete's to resolve: pick that option
42
+ via `devrites-engine state resolve` and continue. Recommended temper `expand`
43
+ auto-applies; do not invent product intent.
@@ -17,18 +17,21 @@ allow_gates: [advisory, validating]
17
17
  # max_slices / max_agents / max_minutes / max_review_queue omitted: unlimited
18
18
  # continue_sequence: true # opt-in: chain recorded continuations after Seal GO
19
19
  # max_workspaces: 5 # sequence budget when chaining
20
- # max_parallel: 10 # Build batch cap; 1 = serial (default: eligible, cap 10)
20
+ # max_parallel: 10 # default cap when this invocation omits `--parallel N`; `--parallel N` wins and rewrites only this field
21
21
  # max_tokens: <N>
22
22
  # max_cost_usd: <amount>
23
23
  # notify: "<cmd>"
24
24
  ```
25
25
 
26
- Read an existing sentinel first. Preserve it byte-for-byte when valid; stop if
26
+ Read an existing sentinel first. Preserve it byte-for-byte when valid, except
27
+ when this invocation contains `--parallel N`: then write or replace only
28
+ `max_parallel: N` and leave every other key unchanged. Stop if the sentinel is
27
29
  malformed. Do not stop because it names `max_slices` / `max_agents` /
28
30
  `max_minutes` / `max_review_queue` or only `[advisory]`. If absent, write it
29
- once after clarity. Never write `max_slices` from `--max-slices`.
30
- It is read-only: never rewrite it after Vet or reset it on resume. Leftover
31
- `expires_at` is ignored and never rewritten.
31
+ once after clarity, and include `max_parallel: N` when that flag is present.
32
+ Never write `max_slices` from `--max-slices`. It is otherwise read-only: never rewrite it after Vet or reset it on resume. Leftover `expires_at` is ignored
33
+ and never rewritten. **Failing case:** leftover `max_parallel: 1` keeps the run
34
+ serial after `--parallel 5`.
32
35
 
33
36
  ### Derive the mutable post-vet budget
34
37
 
@@ -44,8 +47,13 @@ readiness check first; reject overlap. Do not stop on `max_agents`,
44
47
  gets fresh activation-local counters but retains durable slice/recovery state.
45
48
 
46
49
  When driving `/rite-build`, ignore afk-discipline remaining-0, `--max-slices`,
47
- and parallel AFK headroom. Close validating questions
48
- (recommended pick) instead of queuing them.
50
+ and parallel AFK headroom as stop conditions. Pass this invocation's
51
+ `--parallel N` into `/rite-build` when present; leftover sentinel
52
+ `max_parallel` is then not the cap. Close validating questions and blocking questions
53
+ that already name a ranked recommended option (recommended pick via
54
+ `devrites-engine state resolve`) instead of queuing them or handing
55
+ `/rite-resolve` to the user. Escalating, irreversible-risk, access, and
56
+ blocking with no recommended option still pause.
49
57
 
50
58
  ## Phase arc
51
59
 
@@ -58,7 +66,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
58
66
  | 3 | `/rite-temper` | harden, reduce, or expand; irreversible risk still pauses |
59
67
  | 4 | `/rite-define` | approved plan/tasks/traceability |
60
68
  | 5 | `/rite-vet` | every plan; derive mutable budget after READY |
61
- | 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap 10; one-slice round when <2 eligible); recompute after each round; charge once per green built slice |
69
+ | 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10; one-slice round when <2 eligible); recompute after each round; charge once per green built slice |
62
70
  | 7 | `/rite-prove` | all slices built; approved proof; recovery on red |
63
71
  | 8 | `/rite-polish` | re-prove after code edits |
64
72
  | 9 | `/rite-review` | in-scope correction then fresh proof |
@@ -122,16 +130,19 @@ agent-owned earlier-phase gap:
122
130
  6. Restore and consume the original cursor when prerequisites are green.
123
131
 
124
132
  <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"loop tick sees Workflow Artifact trigger/state","action":"invoke classifier once under owner lock; no actor-history migration","return":"same loop cursor; no budget charge for verify/rerun"} -->
125
- Ask only for a human-owned decision or mandatory safety/access action. Three
126
- no-progress corrections of one exact fingerprint exhaust; preserve its
127
- reproduction and dead ends without another Plan/Vet command.
133
+ Ask only for a human-owned decision or mandatory safety/access action. An open
134
+ blocking question with `proposed` or option 1 labelled Recommended is not that
135
+ decision: resolve it and continue. Three no-progress corrections of one exact
136
+ fingerprint exhaust; preserve its reproduction and dead ends without another
137
+ Plan/Vet command.
128
138
 
129
139
  ## Continuous caller obligation
130
140
 
131
141
  No user-facing reply is permitted while durable state contains agent-owned
132
- `NEEDS_REPLAN`, an intermediate Plan/Vet action, or a distinct retained
133
- Critical/Important fingerprint below its cap. Invoke the next internal repair
134
- immediately. A narrow reviewer closing one finding and exposing another
142
+ `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
143
+ Critical/Important fingerprint below its cap, or an open blocking question that
144
+ already names a ranked recommended option. Invoke the next internal repair or
145
+ `devrites-engine state resolve` immediately. A narrow reviewer closing one finding and exposing another
135
146
  Critical/Important invariant is progress, not exhaustion.
136
147
 
137
148
  The number of completed repair/Vet cycles is not a stop condition. Context
@@ -59,14 +59,21 @@ exhausted.
59
59
  <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"classifier returns owner-busy, exhausted, or existing hard gate","action":"stop on exact WAIT_ACTIVE_OWNER, BLOCKED_EXHAUSTED, or BLOCKED_GATE result","return":"unchanged cursor plus fixed route-owned output"} -->
60
60
  ## Other stop classes
61
61
 
62
- - **Gate severity:** blocking or escalating gate. Validating: auto-pick the
63
- recommended option, close the question, continue.
62
+ - **Gate severity:** escalating always stops. Blocking with a ranked recommended
63
+ option (`proposed` or option 1 labelled Recommended): auto-pick via
64
+ `devrites-engine state resolve`, then continue internally (including Spec Drift
65
+ Guard when the answer changes ownership or acceptance). Blocking with no
66
+ recommended option still stops. Validating: auto-pick the recommended option,
67
+ close the question, continue.
64
68
  - **Temper:** `expand` and extra acceptance auto-apply (record + Drift Guard).
65
69
  Irreversible-risk still pauses. `hold-rigor`, `reduce-to-MVP`, and a skip do not pause.
66
70
  - **Clarify:** material Partial/Missing/unowned decision coverage or a
67
71
  low-confidence high-consequence assumption. Continue the initial interview;
68
72
  never arm AFK early.
69
- - **Seal:** NO-GO, with every blocker and fix direction. Never round up to GO.
73
+ - **Seal:** remaining NO-GO after recommended-option questions are closed, with
74
+ every remaining blocker and fix direction. Never round up to GO. An open
75
+ recommended-option blocking question is not a Seal stop: resolve it, recover
76
+ agent-owned findings, then re-enter Seal.
70
77
  - **Reslice:** execute its marked action before deciding continue/stop.
71
78
  - **Slice budget:** do not stop on `--max-slices`. Leftover
72
79
  pre-existing remaining value, explicit flag, sentinel cap, or post-vet pending count
@@ -64,7 +64,9 @@ filled, and recomputes after every completed round (serial slice or parallel
64
64
  integrate) until no pending slice remains
65
65
  ([`parallel-batch.md` § Dynamic selection](reference/parallel-batch.md#dynamic-selection-and-re-batching)).
66
66
  Unattended runs (`/rite-autocomplete`, `.devrites/AFK` `max_parallel`) repeat batches
67
- inside the same run; HITL stops after each batch. Non-integer/`N≤0`/`N>10` hard refuse.
67
+ inside the same run; HITL stops after each batch. This invocation's `--parallel N`
68
+ is the cap: leftover sentinel `max_parallel` is not consulted. Autocomplete with
69
+ that flag also writes or replaces only `max_parallel: N`. Non-integer/`N≤0`/`N>10` hard refuse.
68
70
  All-green (independent review + proof) then integrate as one local `WIP(<slug>):`
69
71
  commit per sibling onto the current control branch (never pushed). Do not
70
72
  integrate a sibling because the wright returned. A red/gap sibling gets a bounded repair
@@ -16,9 +16,10 @@ control; irreversible work (destructive/auth/public API) always pauses.
16
16
  The controlling root owns the cap:
17
17
 
18
18
  1. **Before every dispatch**, re-read `.devrites/AFK`, `state.md`, and the
19
- selected slice. When `--parallel N` or sentinel `max_parallel` is greater than
20
- 1, recompute `N_eff` via `parallel select` before the next dispatch — a prior
21
- one-slice round does not keep the run serial. A configured `max_slices` and any existing
19
+ selected slice. This invocation's `--parallel N` is the cap when present;
20
+ leftover sentinel `max_parallel` is not consulted in that case. When that
21
+ flag or sentinel `max_parallel` is greater than 1, recompute `N_eff` via
22
+ `parallel select` before the next dispatch — a prior one-slice round does not keep the run serial. A configured `max_slices` and any existing
22
23
  `afk_slices_remaining` value, including its released bullet form, must each
23
24
  be a decimal nonnegative integer. A missing
24
25
  `state.md` or malformed configured value fails closed; an omitted cap is the
@@ -9,6 +9,7 @@ Opt-in only. Default `/rite-build` stays [`one-slice-cycle.md`](one-slice-cycle.
9
9
  | omitted / `--parallel 1` | Serial one-slice |
10
10
  | `--parallel N` (**2≤N≤10**) | N is a **cap**, not a quota: run the largest eligible set ≤ N |
11
11
  | non-integer / `N≤0` / `N>10` | Hard refuse (no silent clamp) |
12
+ | Autocomplete `--parallel N` | N is the cap for this run; leftover sentinel `max_parallel` is ignored, then `/rite-autocomplete` writes or replaces only `max_parallel: N` |
12
13
  | Autocomplete, no flag | Same path, cap from sentinel `max_parallel` else 10; serial only when ineligible |
13
14
 
14
15
  AFK caps `N`. Charge green siblings once after integrate; abort /
@@ -21,7 +22,8 @@ Size each batch by what is runnable **now**, never by the requested number:
21
22
 
22
23
  ```text
23
24
  N_eff = min(
24
- cap -- --parallel N | sentinel max_parallel | 10 (autocomplete default)
25
+ cap -- this invocation's --parallel N (wins over leftover sentinel max_parallel)
26
+ | else sentinel max_parallel | else 10 (autocomplete default)
25
27
  eligible set -- dependency-satisfied pending slices, pairwise path-disjoint
26
28
  AFK headroom -- remaining max_slices, max_agents, max_minutes, review queue
27
29
  host capacity -- concurrent worktree writers + the runtime isolation table
@@ -127,6 +127,11 @@ list.
127
127
  `escalating` is never in `allow_gates`: specialist routing is not something AFK can
128
128
  shortcut.
129
129
 
130
+ `/rite-autocomplete` does not add `blocking` to `allow_gates`. It auto-resolves
131
+ open blocking questions that already name a recommended option via
132
+ `devrites-engine state resolve`, then continues. That is an orchestrator
133
+ exception, not an AFK ceiling change.
134
+
130
135
  ## Anti-patterns
131
136
 
132
137
  - **One gate for everything.** This puts all work behind one reviewer. Pick gates per slice.
@@ -14,7 +14,7 @@ Spec: ./spec.md Decision coverage: ./decision-coverage.md Date: <date>
14
14
  - Language/runtime/version: <...>
15
15
  - Frameworks/libraries: <...>
16
16
  - Storage/data: <...>
17
- - Test commands: <discovered runner commands; discovery contract: rite-prove/reference/test-command-discovery.md>
17
+ - Test commands: <discovered runner commands; discovery contract: .omp/skills/rite-prove/reference/test-command-discovery.md>
18
18
  - Target/platform/constraints: <...>
19
19
  - Approach-affecting product/constraint unknowns route to `/rite-clarify`;
20
20
  `[NEEDS CLARIFICATION]` blocks approval.
@@ -86,8 +86,11 @@ Pull these via `Read` when shaping the resolve:
86
86
  recommend `/rite-plan repair`. Otherwise → recommend the slice's natural next action
87
87
  (typically `/rite-build` for the slice that was awaiting).
88
88
  **Completion:** the resolved state contains exactly one next command.
89
- 6. **STOP.** This skill does not run `/rite-build` itself: the user re-enters the
90
- workflow explicitly.
89
+ 6. **STOP.** User-invoked `/rite-resolve` does not run `/rite-build` itself: the
90
+ user re-enters the workflow explicitly. A controlling `/rite-autocomplete`
91
+ caller invokes the same `devrites-engine state resolve` writer internally and
92
+ continues; it must not emit this skill as a user handoff for a question that
93
+ already names a ranked recommended option.
91
94
 
92
95
  > **Mid-flight discipline.** Don't edit `spec.md` / `plan.md` to "incorporate" the
93
96
  > answer. That's `/rite-plan repair`. Don't silently retry a build after the answer
@@ -56,14 +56,14 @@ max_minutes: 120 # wall-clock minutes in one host activation
56
56
  max_review_queue: 8 # unresolved review/gate items admitted before fan-out stops
57
57
  # max_tokens: 200000 # optional stricter host-observed token cap
58
58
  # max_cost_usd: 10 # optional stricter host-observed cost cap
59
- notify: "ntfy.sh/my-topic" # shell command; examples: rite-build/reference/afk-discipline.md
59
+ notify: "ntfy.sh/my-topic" # shell command; examples: .pi/skills/rite-build/reference/afk-discipline.md
60
60
  allow_gates: [advisory, validating] # gate severities AFK auto-handles (auto-picks the recommended option)
61
61
  continue_sequence: true # after Seal GO, open the next recorded continuation
62
62
  max_workspaces: 5 # workspaces one armed sequence may open
63
- max_parallel: 10 # cap on eligible path-disjoint Build batches (1 = serial)
63
+ max_parallel: 10 # unattended default cap; `--parallel N` on this invocation wins and may rewrite only this field
64
64
  ```
65
65
 
66
- The file is **read-only config**: never rewritten in place. `max_slices` is the initial
66
+ The file is **read-only config**: never rewritten in place, except `/rite-autocomplete --parallel N` writes or replaces only `max_parallel: N`. `max_slices` is the initial
67
67
  budget; the mutable remaining count is the `state.md` cursor
68
68
  `afk_slices_remaining` (`AFK slices remaining: <n>` in the released bullet
69
69
  form), owned by the controlling root. Recognize either spelling and preserve
@@ -119,11 +119,18 @@ candidate manifest to cover the whole recorded chain — run
119
119
  - Every human-owned, safety, access, exhaustion, and `NO-GO` condition still stops the
120
120
  run exactly as without this field.
121
121
 
122
- `max_parallel` caps a Build batch for unattended runs; `1` forces the serial cycle.
123
- Unattended runs take the largest eligible set cap and recompute after every completed
124
- round (serial slice or parallel integrate)
125
- ([parallel-batch.md § Dynamic selection and re-batching](../../../rite-build/reference/parallel-batch.md#dynamic-selection-and-re-batching));
126
- an explicit `/rite-build --parallel N` cap wins for that invocation.
122
+ `max_parallel` is the unattended default batch cap only when this invocation does
123
+ not contain `--parallel N`; `1` forces the serial cycle only in that default
124
+ case. An exact `--parallel N` on `/rite-autocomplete` or `/rite-build` is the
125
+ batch cap for this run: do not consult leftover sentinel `max_parallel`, and do
126
+ not treat `max_parallel: 1` as serial. `/rite-autocomplete --parallel N` writes
127
+ or replaces only that field so later ticks keep the cap; `/rite-build --parallel N`
128
+ wins for that invocation without rewriting the sentinel. Never write `max_slices`
129
+ from `--max-slices`. **Failing case:** `/rite-autocomplete --parallel 5` honors a
130
+ leftover `max_parallel: 1` and stays serial.
131
+ Unattended runs take the largest eligible set ≤ that cap and recompute after
132
+ every completed round (serial slice or parallel integrate)
133
+ ([parallel-batch.md § Dynamic selection and re-batching](../../../rite-build/reference/parallel-batch.md#dynamic-selection-and-re-batching)).
127
134
 
128
135
  ## Unattended resource envelope
129
136
 
@@ -166,7 +173,18 @@ for the full taxonomy. Summary:
166
173
  | blocking | high | sync | 15m | **no** (always pauses) |
167
174
  | escalating | novel pattern | sync to specialist | 24h | **no** (always pauses) |
168
175
 
169
- `blocking` and `escalating` always pause regardless of `allow_gates`.
176
+ `blocking` and `escalating` always pause for HITL and for AFK `/rite-build`,
177
+ regardless of `allow_gates`.
178
+
179
+ **Autocomplete exception.** While `/rite-autocomplete` is the controlling
180
+ caller, an open `gate: blocking` question that already carries a ranked
181
+ recommended option (`proposed:` or option 1 labelled `(Recommended)`) is not a
182
+ user handoff: the orchestrator auto-picks that option through
183
+ `devrites-engine state resolve` and continues, including internal Spec Drift
184
+ Guard when the answer changes ownership or acceptance. Escalating,
185
+ irreversible-risk, access, and blocking questions with no recommended option
186
+ still pause. Putting `blocking` in `allow_gates` does not replace this resolve
187
+ step: an unanswered blocking question still fails Seal.
170
188
 
171
189
  An open `gate: validating` entry is **merge-blocking by definition**: at `/rite-seal` any
172
190
  `questions.md` entry with `gate: validating` and `status: open` is a NO-GO, regardless of