devrites 5.10.1 → 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 (50) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -1
  3. package/docs/cli.md +4 -1
  4. package/docs/command-map.md +2 -1
  5. package/docs/engine/commands.md +7 -5
  6. package/docs/orchestration.md +5 -2
  7. package/docs/usage.md +3 -1
  8. package/engine/commands.go +3 -0
  9. package/engine/help.go +190 -0
  10. package/engine/help_test.go +98 -0
  11. package/engine/internal/parallel/cli.go +90 -32
  12. package/engine/internal/parallel/cli_test.go +32 -0
  13. package/engine/main.go +15 -8
  14. package/engine/root_routing_test.go +4 -0
  15. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  16. package/pack/.claude/skills/rite-autocomplete/SKILL.md +10 -5
  17. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +12 -7
  18. package/pack/.claude/skills/rite-build/SKILL.md +3 -1
  19. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +4 -3
  20. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +3 -1
  21. package/pack/.claude/skills/rite-define/reference/plan-template.md +1 -1
  22. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  23. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +10 -5
  24. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +12 -7
  25. package/pack/generated/claude/skills/rite-build/SKILL.md +3 -1
  26. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +4 -3
  27. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +3 -1
  28. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +1 -1
  29. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  30. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +10 -5
  31. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +12 -7
  32. package/pack/generated/codex/skills/rite-build/SKILL.md +3 -1
  33. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +4 -3
  34. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +3 -1
  35. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +1 -1
  36. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  37. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +10 -5
  38. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +12 -7
  39. package/pack/generated/omp/skills/rite-build/SKILL.md +3 -1
  40. package/pack/generated/omp/skills/rite-build/reference/afk-discipline.md +4 -3
  41. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +3 -1
  42. package/pack/generated/omp/skills/rite-define/reference/plan-template.md +1 -1
  43. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +15 -8
  44. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +10 -5
  45. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +12 -7
  46. package/pack/generated/pi/skills/rite-build/SKILL.md +3 -1
  47. package/pack/generated/pi/skills/rite-build/reference/afk-discipline.md +4 -3
  48. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +3 -1
  49. package/pack/generated/pi/skills/rite-define/reference/plan-template.md +1 -1
  50. package/package.json +1 -1
@@ -87,18 +87,23 @@ executable controller/harness/bundle bytes or a missing writer, read
87
87
  3. **Arm AFK once.** Apply the loop's
88
88
  [one-write AFK contract](reference/loop.md#arm-afk-once): preserve valid
89
89
  existing bytes or create the sentinel once (`allow_gates: [advisory, validating]`); never
90
- 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`.
91
94
  **Completion:** a valid read-only AFK sentinel exists.
92
95
  4. **Drive phases.** Follow [the loop](reference/loop.md): `/rite-spec` →
93
96
  `/rite-clarify` → `/rite-temper` → `/rite-define` → `/rite-vet` →
94
97
  `/rite-build` batch loop → `/rite-prove` → `/rite-polish` →
95
98
  `/rite-review` → `/rite-seal`. Read and execute each skill; durable files, not
96
99
  chat, carry state. Apply the mutable post-vet budget before first Build.
97
- Build runs the largest eligible path-disjoint batch (cap: `--parallel N`, else
98
- sentinel `max_parallel`, else 10) and recomputes after every completed round until no
99
- 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
100
103
  selection runs again (host isolation still forces serial when concurrent writers
101
- 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`.
102
107
  **Completion:** loop reaches Seal GO or persists a valid stop before any later phase.
103
108
  5. **Apply stops.** At every gate use
104
109
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
@@ -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,7 +47,9 @@ 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 and blocking questions
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
48
53
  that already name a ranked recommended option (recommended pick via
49
54
  `devrites-engine state resolve`) instead of queuing them or handing
50
55
  `/rite-resolve` to the user. Escalating, irreversible-risk, access, and
@@ -61,7 +66,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
61
66
  | 3 | `/rite-temper` | harden, reduce, or expand; irreversible risk still pauses |
62
67
  | 4 | `/rite-define` | approved plan/tasks/traceability |
63
68
  | 5 | `/rite-vet` | every plan; derive mutable budget after READY |
64
- | 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 |
65
70
  | 7 | `/rite-prove` | all slices built; approved proof; recovery on red |
66
71
  | 8 | `/rite-polish` | re-prove after code edits |
67
72
  | 9 | `/rite-review` | in-scope correction then fresh proof |
@@ -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
@@ -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: .claude/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.
@@ -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: .agents/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
 
@@ -87,18 +87,23 @@ executable controller/harness/bundle bytes or a missing writer, read
87
87
  3. **Arm AFK once.** Apply the loop's
88
88
  [one-write AFK contract](reference/loop.md#arm-afk-once): preserve valid
89
89
  existing bytes or create the sentinel once (`allow_gates: [advisory, validating]`); never
90
- 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`.
91
94
  **Completion:** a valid read-only AFK sentinel exists.
92
95
  4. **Drive phases.** Follow [the loop](reference/loop.md): `$rite-spec` →
93
96
  `$rite-clarify` → `$rite-temper` → `$rite-define` → `$rite-vet` →
94
97
  `$rite-build` batch loop → `$rite-prove` → `$rite-polish` →
95
98
  `$rite-review` → `$rite-seal`. Read and execute each skill; durable files, not
96
99
  chat, carry state. Apply the mutable post-vet budget before first Build.
97
- Build runs the largest eligible path-disjoint batch (cap: `--parallel N`, else
98
- sentinel `max_parallel`, else 10) and recomputes after every completed round until no
99
- 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
100
103
  selection runs again (host isolation still forces serial when concurrent writers
101
- 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`.
102
107
  **Completion:** loop reaches Seal GO or persists a valid stop before any later phase.
103
108
  5. **Apply stops.** At every gate use
104
109
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
@@ -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,7 +47,9 @@ 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 and blocking questions
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
48
53
  that already name a ranked recommended option (recommended pick via
49
54
  `devrites-engine state resolve`) instead of queuing them or handing
50
55
  `$rite-resolve` to the user. Escalating, irreversible-risk, access, and
@@ -61,7 +66,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
61
66
  | 3 | `$rite-temper` | harden, reduce, or expand; irreversible risk still pauses |
62
67
  | 4 | `$rite-define` | approved plan/tasks/traceability |
63
68
  | 5 | `$rite-vet` | every plan; derive mutable budget after READY |
64
- | 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 |
65
70
  | 7 | `$rite-prove` | all slices built; approved proof; recovery on red |
66
71
  | 8 | `$rite-polish` | re-prove after code edits |
67
72
  | 9 | `$rite-review` | in-scope correction then fresh proof |
@@ -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
@@ -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.
@@ -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
 
@@ -87,18 +87,23 @@ executable controller/harness/bundle bytes or a missing writer, read
87
87
  3. **Arm AFK once.** Apply the loop's
88
88
  [one-write AFK contract](reference/loop.md#arm-afk-once): preserve valid
89
89
  existing bytes or create the sentinel once (`allow_gates: [advisory, validating]`); never
90
- 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`.
91
94
  **Completion:** a valid read-only AFK sentinel exists.
92
95
  4. **Drive phases.** Follow [the loop](reference/loop.md): `/rite-spec` →
93
96
  `/rite-clarify` → `/rite-temper` → `/rite-define` → `/rite-vet` →
94
97
  `/rite-build` batch loop → `/rite-prove` → `/rite-polish` →
95
98
  `/rite-review` → `/rite-seal`. Read and execute each skill; durable files, not
96
99
  chat, carry state. Apply the mutable post-vet budget before first Build.
97
- Build runs the largest eligible path-disjoint batch (cap: `--parallel N`, else
98
- sentinel `max_parallel`, else 10) and recomputes after every completed round until no
99
- 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
100
103
  selection runs again (host isolation still forces serial when concurrent writers
101
- 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`.
102
107
  **Completion:** loop reaches Seal GO or persists a valid stop before any later phase.
103
108
  5. **Apply stops.** At every gate use
104
109
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
@@ -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,7 +47,9 @@ 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 and blocking questions
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
48
53
  that already name a ranked recommended option (recommended pick via
49
54
  `devrites-engine state resolve`) instead of queuing them or handing
50
55
  `/rite-resolve` to the user. Escalating, irreversible-risk, access, and
@@ -61,7 +66,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
61
66
  | 3 | `/rite-temper` | harden, reduce, or expand; irreversible risk still pauses |
62
67
  | 4 | `/rite-define` | approved plan/tasks/traceability |
63
68
  | 5 | `/rite-vet` | every plan; derive mutable budget after READY |
64
- | 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 |
65
70
  | 7 | `/rite-prove` | all slices built; approved proof; recovery on red |
66
71
  | 8 | `/rite-polish` | re-prove after code edits |
67
72
  | 9 | `/rite-review` | in-scope correction then fresh proof |
@@ -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
@@ -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.
@@ -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
 
@@ -87,18 +87,23 @@ executable controller/harness/bundle bytes or a missing writer, read
87
87
  3. **Arm AFK once.** Apply the loop's
88
88
  [one-write AFK contract](reference/loop.md#arm-afk-once): preserve valid
89
89
  existing bytes or create the sentinel once (`allow_gates: [advisory, validating]`); never
90
- 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`.
91
94
  **Completion:** a valid read-only AFK sentinel exists.
92
95
  4. **Drive phases.** Follow [the loop](reference/loop.md): `/rite-spec` →
93
96
  `/rite-clarify` → `/rite-temper` → `/rite-define` → `/rite-vet` →
94
97
  `/rite-build` batch loop → `/rite-prove` → `/rite-polish` →
95
98
  `/rite-review` → `/rite-seal`. Read and execute each skill; durable files, not
96
99
  chat, carry state. Apply the mutable post-vet budget before first Build.
97
- Build runs the largest eligible path-disjoint batch (cap: `--parallel N`, else
98
- sentinel `max_parallel`, else 10) and recomputes after every completed round until no
99
- 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
100
103
  selection runs again (host isolation still forces serial when concurrent writers
101
- 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`.
102
107
  **Completion:** loop reaches Seal GO or persists a valid stop before any later phase.
103
108
  5. **Apply stops.** At every gate use
104
109
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition: