devrites 7.3.5 → 7.3.6

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 (42) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/docs/adr/0040-early-preparation-admission.md +76 -0
  4. package/docs/adr/README.md +1 -0
  5. package/docs/engine/commands.md +48 -6
  6. package/engine/internal/lib/context.go +50 -2
  7. package/engine/internal/lib/continuation.go +2 -0
  8. package/engine/internal/lib/dispatch.go +75 -20
  9. package/engine/internal/lib/frontier.go +40 -16
  10. package/engine/internal/lib/frontier_controller.go +53 -38
  11. package/engine/internal/lib/frontier_preparation.go +210 -0
  12. package/engine/internal/lib/next.go +5 -2
  13. package/engine/internal/lib/triggers.go +9 -0
  14. package/pack/.claude/skills/devrites-lib/SKILL.md +2 -0
  15. package/pack/.claude/skills/devrites-lib/reference/parallel-workspaces.md +12 -10
  16. package/pack/.claude/skills/rite-autocomplete/SKILL.md +7 -5
  17. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +55 -42
  18. package/pack/generated/claude/skills/devrites-lib/SKILL.md +2 -0
  19. package/pack/generated/claude/skills/devrites-lib/reference/parallel-workspaces.md +12 -10
  20. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +7 -5
  21. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +55 -42
  22. package/pack/generated/codex/skills/devrites-lib/SKILL.md +2 -0
  23. package/pack/generated/codex/skills/devrites-lib/reference/parallel-workspaces.md +12 -10
  24. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +7 -5
  25. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +55 -42
  26. package/pack/generated/devin/skills/devrites-lib/SKILL.md +2 -0
  27. package/pack/generated/devin/skills/devrites-lib/reference/parallel-workspaces.md +12 -10
  28. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +7 -5
  29. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +55 -42
  30. package/pack/generated/dsh/skills/devrites-lib/SKILL.md +2 -0
  31. package/pack/generated/dsh/skills/devrites-lib/reference/parallel-workspaces.md +12 -10
  32. package/pack/generated/dsh/skills/rite-autocomplete/SKILL.md +7 -5
  33. package/pack/generated/dsh/skills/rite-autocomplete/reference/loop.md +55 -42
  34. package/pack/generated/omp/skills/devrites-lib/SKILL.md +2 -0
  35. package/pack/generated/omp/skills/devrites-lib/reference/parallel-workspaces.md +12 -10
  36. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +7 -5
  37. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +55 -42
  38. package/pack/generated/pi/skills/devrites-lib/SKILL.md +2 -0
  39. package/pack/generated/pi/skills/devrites-lib/reference/parallel-workspaces.md +12 -10
  40. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +7 -5
  41. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +55 -42
  42. package/package.json +1 -1
@@ -101,16 +101,18 @@ return cursors and native handles: one controller, not another phase or queue.
101
101
  Normalize unresolved legacy sequence authority through its owning decision/
102
102
  phase. Positive budget, ambiguous prose or path disjointness grants nothing.
103
103
  A current invalid canonical map is an error, never a fallback to history.
104
- For controller mode at cap>1, before a new Build-wright wave writes claims,
105
- rounds or history, start preparation of that source's immediate recorded
106
- successor. Missing targets need native Spec → Clarify → Temper → Define/Plan →
107
- affected Vet; existing targets need completed native state, actual pending
108
- planning/review handles, current Build-ready binding, or a human/dependency hold.
109
- Completed live/archived successors need no reopening; retained actors still bind.
110
- A placeholder, prose claim, unopened wave or unrelated reviewer is insufficient.
111
- Pipeline one successor per admitted source; preparing the whole roadmap first
112
- is unnecessary. Opt-out, zero opening budget or source human/question holds
113
- prevent new openings, not already-created child planning or independent work.
104
+ At controller cap>1, resolve sequence authority and start actual immediate-
105
+ successor preparation before ordinary local Temper/Define/Plan/Vet context or
106
+ dispatch open, and retain the full Build gate before claims/rounds/history.
107
+ Follow [early preparation](../../rite-autocomplete/reference/loop.md#early-preparation-admission)
108
+ for native launch/start, internal markers and bounded preparatory-only routing.
109
+ Missing targets need native Spec → Clarify → Temper → Define/Plan → affected
110
+ Vet; existing targets need current completed/readiness state, registered pending
111
+ native preparation, or an existing human/dependency hold. Completed live/
112
+ archived successors need no reopening; valid finite tails discharge the
113
+ obligation. Placeholders, reports and unopened waves prove nothing.
114
+ Opt-out, zero opening budget or source human/question holds prevent new
115
+ openings, not existing child preparation or independent work.
114
116
  If preparation cannot start, retain `frontier-blocked: <successor> — <constraint>`
115
117
  in source `evidence.md`. `frontier-blocked: sequence — <constraint>` may defer
116
118
  unresolved historical normalization for valid independent local work. Each row
@@ -117,11 +117,13 @@ next sequence continuation through Vet in a second session, then stop.
117
117
  Temper → Define → Vet → Build → Prove → Polish → Review → Seal. Durable files
118
118
  carry state. Apply the mutable post-vet budget before Build. Consume fresh scheduling
119
119
  emitted by recorded `dispatch return`; rerun frontier after further changes
120
- and before waits. Start actual immediate-successor preparation before local
121
- writer admission, or disclose the narrow deferral in the shared global pass.
122
- A placeholder or report is not preparation; the entire sequence need not be
123
- prepared at once. Preserve local cursors and protected validation windows;
124
- pass Build the resolved global cap and retain every admission/isolation gate.
120
+ and before waits. Before ordinary local Temper/Define/Plan/Vet context/dispatch,
121
+ resolve sequence authority and start actual immediate-successor preparation
122
+ under [early admission](reference/loop.md#early-preparation-admission),
123
+ or retain the global pass's concrete deferral; keep the full Build gate.
124
+ Derive initial preparatory-only routing before any marked wave; do not recurse
125
+ through the roadmap. Preserve local cursors, protected validation windows and
126
+ every admission/isolation gate; pass Build the resolved global cap.
125
127
  **Completion:** Seal GO or a durable valid stop precedes later phases.
126
128
  5. **Apply stops.** At every gate use
127
129
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
@@ -41,18 +41,41 @@ remaining. AFK configuration itself stays unchanged.
41
41
 
42
42
  ### Admit each unattended cycle
43
43
 
44
- Before each phase, fan-out, recovery or writer: run cheap readiness and reject
45
- overlap. Before Build admission, execute the shared immediate-successor
46
- preparation/deferral and global cohort rules; local readiness alone is insufficient.
47
- Count every leaf result. Explicit activations reset activation-local counters,
48
- not durable slice/recovery state. Pass resolved `--parallel N` to
49
- [Build](../../rite-build/reference/output.md#caller-owned-continuation).
50
- Ignored legacy budgets and local serial constraints are not whole-run stops.
51
- Invented ceilings on dispatches, waits, tool calls or turns cannot stop execution;
52
- human instructions to pause or limit scope still bind.
53
- Resolve ranked validating/blocking picks via `devrites-engine state resolve`;
54
- never hand `/rite-resolve` to the user. Escalating, irreversible-risk, access, blocking
55
- without recommendations, and Seal judgment (`slice: seal`) still pause.
44
+ Before each phase/fan-out/recovery/writer, check readiness/overlap and apply early
45
+ admission and the global pass below; local readiness is insufficient. Count every leaf.
46
+ Explicit activation resets only activation-local counters, not durable recovery.
47
+ Pass resolved `--parallel N` to [Build](../../rite-build/reference/output.md#caller-owned-continuation).
48
+ Legacy or invented execution ceilings never stop this controller; human limits bind.
49
+ Resolve ranked validating/blocking picks via `devrites-engine state resolve`, not
50
+ a user handoff. Escalating, irreversible-risk, access, unrecommended blocking picks
51
+ and Seal judgment (`slice: seal`) still pause.
52
+
53
+ ## Early preparation admission
54
+
55
+ Internal exclusive `context`/`dispatch open` flags:
56
+ - `--prepare-for <parent-source>`: permitted native non-Build preparation roles
57
+ (only controlling-root context may be roleless), exact existing immediate
58
+ successor/parent agreeing on canonical identity, binding, adjacency and chain.
59
+ Exempts the child's successor gate, never product writes.
60
+ - `--sequence-research`: only canonical `evidence-scout`, Spec/Clarify/Temper/Define/
61
+ Plan/Vet, exact existing source and normal path/role/ledger constraints. Exempts
62
+ authority/successor admission solely to investigate broken authority read-only:
63
+ no acceptance, scope/approval/phase advance, successor creation, writers,
64
+ readiness or preparation credit.
65
+
66
+ Context (`--skill rite-<phase>` too) checks before writes; no account required.
67
+ Use context → packet → open → native launch → `dispatch start` actual handles
68
+ before parent admission; openings alone do not count.
69
+
70
+ Derive preparatory-only B before any marked wave from nonterminal parent A:
71
+ until ordinary unmarked B Temper/Define/Plan/Vet or Build-wright admission
72
+ (checking C first), A becoming terminal or ordered handoff to B, C waits—even
73
+ explicit C `next`/`check continuation`. No C creation/rerouting before A's eligible
74
+ phase. Completed B history retains this bound; Spec/Clarify/research/read-only
75
+ Build do not release it. Independent work stays visible; all global-pass gates bind.
76
+
77
+ Shared registry edits alone do not serialize disjoint modules. Isolate their
78
+ writer; refusal-only tests never replace positive requirements or defer their band.
56
79
 
57
80
  ## Phase arc
58
81
 
@@ -72,12 +95,10 @@ Workspace files, not chat, carry state. Read/execute each phase skill:
72
95
  | 10 | `/rite-seal` | GO/NO-GO; no Git |
73
96
  | 11 | `/rite-ship` | only after GO; `--ship` never authorizes Git; stop at literal-GO/native approval |
74
97
 
75
- At phase entry, before local recovery or waits, execute the
98
+ At phase entry, before recovery/waits, execute the
76
99
  [global pass](../../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier).
77
- Consume the fresh frontier emitted after a recorded `dispatch return`; after
78
- landing, planning/artifact changes or capacity updates, rerun frontier. Execute
79
- authorized preparation/selection, preserving pending handles, local cursors and
80
- protected validation windows. Reporting or creating a placeholder is not progress.
100
+ Consume persisted return frontiers; rerun after landing/artifact/capacity changes.
101
+ Execute authorized routes, retaining handles, cursors and protected proof windows.
81
102
 
82
103
  Check [stop-conditions.md](stop-conditions.md) before advancing. Discard stale
83
104
  pass evidence after source edits. Re-read the selected source before each phase per [phase target binding](../../devrites-lib/reference/parallel-workspaces.md#phase-target-binding). On a cold resume or
@@ -90,14 +111,12 @@ floor; `--update` never excuses an unreconciled regression.
90
111
 
91
112
  ## Sequence continuation
92
113
 
93
- With a recorded successor, opening budget and no opt-out, Seal GO stays internal:
94
- leave the owner sealed/unshipped with `/rite-ship`, then resume the prepared child
95
- or invoke its authorized native Spec. Sequence authority follows the
96
- [shared grammar](../../devrites-lib/reference/workspace-artifact-schema.md#what-each-file-owns),
97
- not invented slugs. Charge an opening once; preparation may pipeline before Seal,
98
- one immediate successor per admitted source, not the whole roadmap at once.
99
- Reuse the child's durable cursor and controller. ACTIVE changes only at normal
100
- ordered handoff; early planning or isolated independent Build does not advance it.
114
+ With a recorded successor, budget and no opt-out, Seal GO stays internal:
115
+ leave the owner sealed/unshipped with `/rite-ship`; resume the child's cursor/
116
+ controller or authorized native Spec. Use the
117
+ [shared grammar](../../devrites-lib/reference/workspace-artifact-schema.md#what-each-file-owns).
118
+ Charge once; pipeline only immediate successors. ACTIVE changes at ordered handoff,
119
+ not early planning or isolated independent Build.
101
120
 
102
121
  Before invoking a continuation, require durable `state.md`
103
122
  `sequence_workspaces_remaining > 0`; if absent, first write
@@ -151,20 +170,14 @@ and park it after three escalations while independent work continues.
151
170
 
152
171
  ## Continuous caller obligation
153
172
 
154
- After a green slice or phase, execute its recorded `next_action` internally;
155
- reply only at completion or a genuine stop.
156
-
157
- Before replying, run `devrites-engine check continuation`: `required` means
158
- consume `invoke:` now; only `clear` permits a final reply. Under controller mode,
159
- actionable normalization, successor preparation or foreign work precedes local
160
- Build. Local-only reconciliation, repair, picks or discharged scheduling deferrals
161
- retain the owning phase edge, not recursive `/rite-autocomplete`.
162
- Agent-owned NEEDS_REPLAN, budgeted Critical/Important recovery, independent work
163
- or a recommended blocking answer stays internal. Invoke repair or `state resolve`
164
- unless the [resolver-failure stop](stop-conditions.md#other-stop-classes) applies.
165
- A distinct invariant is progress, not exhaustion; repeated failed resolver calls
166
- without correction are not progress.
167
-
168
- The number of completed repair/Vet cycles, context pressure, compaction, session
169
- duration, and nested completion never turn checkpoints into handoffs. Persist and
170
- resume to the requested rest point or shared human/safety/access/parked-recovery stop.
173
+ Execute each green slice/phase's `next_action` internally. Before replying, run
174
+ `devrites-engine check continuation`: consume `required`'s `invoke:`; only `clear`
175
+ permits reply. Controller normalization/preparation/foreign work precedes local
176
+ Build; local repair/picks/reconciliation/discharged deferrals keep their phase,
177
+ not recursive Autocomplete. Route agent-owned NEEDS_REPLAN, budgeted Critical/Important recovery,
178
+ independent work and recommended blocking answers internally; invoke repair or
179
+ `state resolve` unless the [resolver-failure stop](stop-conditions.md#other-stop-classes)
180
+ applies. Distinct invariants are progress; unchanged resolver retries are not.
181
+ Cycles, context pressure, compaction, duration and nested completion never create
182
+ handoffs. Persist/resume until requested completion or a shared human/safety/
183
+ access/parked-recovery stop.
@@ -39,6 +39,8 @@ lifecycle state from chat or optional `README.md`.
39
39
  completion states. The host renders the response normally.
40
40
  - [`reference/parallel-workspaces.md`](reference/parallel-workspaces.md): explicit
41
41
  phase targets, one isolated global controller, and source-owned proof.
42
+ - [Autocomplete loop](../rite-autocomplete/reference/loop.md#early-preparation-admission):
43
+ controller-only early preparation, bounded successor routing and normalization research.
42
44
  - [`reference/visual-playbooks/index.md`](reference/visual-playbooks/index.md): progressive
43
45
  visual HTML playbook router (load matching ids only; dual-read outline).
44
46
 
@@ -101,16 +101,18 @@ return cursors and native handles: one controller, not another phase or queue.
101
101
  Normalize unresolved legacy sequence authority through its owning decision/
102
102
  phase. Positive budget, ambiguous prose or path disjointness grants nothing.
103
103
  A current invalid canonical map is an error, never a fallback to history.
104
- For controller mode at cap>1, before a new Build-wright wave writes claims,
105
- rounds or history, start preparation of that source's immediate recorded
106
- successor. Missing targets need native Spec → Clarify → Temper → Define/Plan →
107
- affected Vet; existing targets need completed native state, actual pending
108
- planning/review handles, current Build-ready binding, or a human/dependency hold.
109
- Completed live/archived successors need no reopening; retained actors still bind.
110
- A placeholder, prose claim, unopened wave or unrelated reviewer is insufficient.
111
- Pipeline one successor per admitted source; preparing the whole roadmap first
112
- is unnecessary. Opt-out, zero opening budget or source human/question holds
113
- prevent new openings, not already-created child planning or independent work.
104
+ At controller cap>1, resolve sequence authority and start actual immediate-
105
+ successor preparation before ordinary local Temper/Define/Plan/Vet context or
106
+ dispatch open, and retain the full Build gate before claims/rounds/history.
107
+ Follow [early preparation](../../rite-autocomplete/reference/loop.md#early-preparation-admission)
108
+ for native launch/start, internal markers and bounded preparatory-only routing.
109
+ Missing targets need native Spec → Clarify → Temper → Define/Plan → affected
110
+ Vet; existing targets need current completed/readiness state, registered pending
111
+ native preparation, or an existing human/dependency hold. Completed live/
112
+ archived successors need no reopening; valid finite tails discharge the
113
+ obligation. Placeholders, reports and unopened waves prove nothing.
114
+ Opt-out, zero opening budget or source human/question holds prevent new
115
+ openings, not existing child preparation or independent work.
114
116
  If preparation cannot start, retain `frontier-blocked: <successor> — <constraint>`
115
117
  in source `evidence.md`. `frontier-blocked: sequence — <constraint>` may defer
116
118
  unresolved historical normalization for valid independent local work. Each row
@@ -117,11 +117,13 @@ next sequence continuation through Vet in a second session, then stop.
117
117
  Temper → Define → Vet → Build → Prove → Polish → Review → Seal. Durable files
118
118
  carry state. Apply the mutable post-vet budget before Build. Consume fresh scheduling
119
119
  emitted by recorded `dispatch return`; rerun frontier after further changes
120
- and before waits. Start actual immediate-successor preparation before local
121
- writer admission, or disclose the narrow deferral in the shared global pass.
122
- A placeholder or report is not preparation; the entire sequence need not be
123
- prepared at once. Preserve local cursors and protected validation windows;
124
- pass Build the resolved global cap and retain every admission/isolation gate.
120
+ and before waits. Before ordinary local Temper/Define/Plan/Vet context/dispatch,
121
+ resolve sequence authority and start actual immediate-successor preparation
122
+ under [early admission](reference/loop.md#early-preparation-admission),
123
+ or retain the global pass's concrete deferral; keep the full Build gate.
124
+ Derive initial preparatory-only routing before any marked wave; do not recurse
125
+ through the roadmap. Preserve local cursors, protected validation windows and
126
+ every admission/isolation gate; pass Build the resolved global cap.
125
127
  **Completion:** Seal GO or a durable valid stop precedes later phases.
126
128
  5. **Apply stops.** At every gate use
127
129
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
@@ -41,18 +41,41 @@ remaining. AFK configuration itself stays unchanged.
41
41
 
42
42
  ### Admit each unattended cycle
43
43
 
44
- Before each phase, fan-out, recovery or writer: run cheap readiness and reject
45
- overlap. Before Build admission, execute the shared immediate-successor
46
- preparation/deferral and global cohort rules; local readiness alone is insufficient.
47
- Count every leaf result. Explicit activations reset activation-local counters,
48
- not durable slice/recovery state. Pass resolved `--parallel N` to
49
- [Build](../../rite-build/reference/output.md#caller-owned-continuation).
50
- Ignored legacy budgets and local serial constraints are not whole-run stops.
51
- Invented ceilings on dispatches, waits, tool calls or turns cannot stop execution;
52
- human instructions to pause or limit scope still bind.
53
- Resolve ranked validating/blocking picks via `devrites-engine state resolve`;
54
- never hand `$rite-resolve` to the user. Escalating, irreversible-risk, access, blocking
55
- without recommendations, and Seal judgment (`slice: seal`) still pause.
44
+ Before each phase/fan-out/recovery/writer, check readiness/overlap and apply early
45
+ admission and the global pass below; local readiness is insufficient. Count every leaf.
46
+ Explicit activation resets only activation-local counters, not durable recovery.
47
+ Pass resolved `--parallel N` to [Build](../../rite-build/reference/output.md#caller-owned-continuation).
48
+ Legacy or invented execution ceilings never stop this controller; human limits bind.
49
+ Resolve ranked validating/blocking picks via `devrites-engine state resolve`, not
50
+ a user handoff. Escalating, irreversible-risk, access, unrecommended blocking picks
51
+ and Seal judgment (`slice: seal`) still pause.
52
+
53
+ ## Early preparation admission
54
+
55
+ Internal exclusive `context`/`dispatch open` flags:
56
+ - `--prepare-for <parent-source>`: permitted native non-Build preparation roles
57
+ (only controlling-root context may be roleless), exact existing immediate
58
+ successor/parent agreeing on canonical identity, binding, adjacency and chain.
59
+ Exempts the child's successor gate, never product writes.
60
+ - `--sequence-research`: only canonical `evidence-scout`, Spec/Clarify/Temper/Define/
61
+ Plan/Vet, exact existing source and normal path/role/ledger constraints. Exempts
62
+ authority/successor admission solely to investigate broken authority read-only:
63
+ no acceptance, scope/approval/phase advance, successor creation, writers,
64
+ readiness or preparation credit.
65
+
66
+ Context (`--skill rite-<phase>` too) checks before writes; no account required.
67
+ Use context → packet → open → native launch → `dispatch start` actual handles
68
+ before parent admission; openings alone do not count.
69
+
70
+ Derive preparatory-only B before any marked wave from nonterminal parent A:
71
+ until ordinary unmarked B Temper/Define/Plan/Vet or Build-wright admission
72
+ (checking C first), A becoming terminal or ordered handoff to B, C waits—even
73
+ explicit C `next`/`check continuation`. No C creation/rerouting before A's eligible
74
+ phase. Completed B history retains this bound; Spec/Clarify/research/read-only
75
+ Build do not release it. Independent work stays visible; all global-pass gates bind.
76
+
77
+ Shared registry edits alone do not serialize disjoint modules. Isolate their
78
+ writer; refusal-only tests never replace positive requirements or defer their band.
56
79
 
57
80
  ## Phase arc
58
81
 
@@ -72,12 +95,10 @@ Workspace files, not chat, carry state. Read/execute each phase skill:
72
95
  | 10 | `$rite-seal` | GO/NO-GO; no Git |
73
96
  | 11 | `$rite-ship` | only after GO; `--ship` never authorizes Git; stop at literal-GO/native approval |
74
97
 
75
- At phase entry, before local recovery or waits, execute the
98
+ At phase entry, before recovery/waits, execute the
76
99
  [global pass](../../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier).
77
- Consume the fresh frontier emitted after a recorded `dispatch return`; after
78
- landing, planning/artifact changes or capacity updates, rerun frontier. Execute
79
- authorized preparation/selection, preserving pending handles, local cursors and
80
- protected validation windows. Reporting or creating a placeholder is not progress.
100
+ Consume persisted return frontiers; rerun after landing/artifact/capacity changes.
101
+ Execute authorized routes, retaining handles, cursors and protected proof windows.
81
102
 
82
103
  Check [stop-conditions.md](stop-conditions.md) before advancing. Discard stale
83
104
  pass evidence after source edits. Re-read the selected source before each phase per [phase target binding](../../devrites-lib/reference/parallel-workspaces.md#phase-target-binding). On a cold resume or
@@ -90,14 +111,12 @@ floor; `--update` never excuses an unreconciled regression.
90
111
 
91
112
  ## Sequence continuation
92
113
 
93
- With a recorded successor, opening budget and no opt-out, Seal GO stays internal:
94
- leave the owner sealed/unshipped with `$rite-ship`, then resume the prepared child
95
- or invoke its authorized native Spec. Sequence authority follows the
96
- [shared grammar](../../devrites-lib/reference/workspace-artifact-schema.md#what-each-file-owns),
97
- not invented slugs. Charge an opening once; preparation may pipeline before Seal,
98
- one immediate successor per admitted source, not the whole roadmap at once.
99
- Reuse the child's durable cursor and controller. ACTIVE changes only at normal
100
- ordered handoff; early planning or isolated independent Build does not advance it.
114
+ With a recorded successor, budget and no opt-out, Seal GO stays internal:
115
+ leave the owner sealed/unshipped with `$rite-ship`; resume the child's cursor/
116
+ controller or authorized native Spec. Use the
117
+ [shared grammar](../../devrites-lib/reference/workspace-artifact-schema.md#what-each-file-owns).
118
+ Charge once; pipeline only immediate successors. ACTIVE changes at ordered handoff,
119
+ not early planning or isolated independent Build.
101
120
 
102
121
  Before invoking a continuation, require durable `state.md`
103
122
  `sequence_workspaces_remaining > 0`; if absent, first write
@@ -151,20 +170,14 @@ and park it after three escalations while independent work continues.
151
170
 
152
171
  ## Continuous caller obligation
153
172
 
154
- After a green slice or phase, execute its recorded `next_action` internally;
155
- reply only at completion or a genuine stop.
156
-
157
- Before replying, run `devrites-engine check continuation`: `required` means
158
- consume `invoke:` now; only `clear` permits a final reply. Under controller mode,
159
- actionable normalization, successor preparation or foreign work precedes local
160
- Build. Local-only reconciliation, repair, picks or discharged scheduling deferrals
161
- retain the owning phase edge, not recursive `$rite-autocomplete`.
162
- Agent-owned NEEDS_REPLAN, budgeted Critical/Important recovery, independent work
163
- or a recommended blocking answer stays internal. Invoke repair or `state resolve`
164
- unless the [resolver-failure stop](stop-conditions.md#other-stop-classes) applies.
165
- A distinct invariant is progress, not exhaustion; repeated failed resolver calls
166
- without correction are not progress.
167
-
168
- The number of completed repair/Vet cycles, context pressure, compaction, session
169
- duration, and nested completion never turn checkpoints into handoffs. Persist and
170
- resume to the requested rest point or shared human/safety/access/parked-recovery stop.
173
+ Execute each green slice/phase's `next_action` internally. Before replying, run
174
+ `devrites-engine check continuation`: consume `required`'s `invoke:`; only `clear`
175
+ permits reply. Controller normalization/preparation/foreign work precedes local
176
+ Build; local repair/picks/reconciliation/discharged deferrals keep their phase,
177
+ not recursive Autocomplete. Route agent-owned NEEDS_REPLAN, budgeted Critical/Important recovery,
178
+ independent work and recommended blocking answers internally; invoke repair or
179
+ `state resolve` unless the [resolver-failure stop](stop-conditions.md#other-stop-classes)
180
+ applies. Distinct invariants are progress; unchanged resolver retries are not.
181
+ Cycles, context pressure, compaction, duration and nested completion never create
182
+ handoffs. Persist/resume until requested completion or a shared human/safety/
183
+ access/parked-recovery stop.
@@ -38,6 +38,8 @@ lifecycle state from chat or optional `README.md`.
38
38
  completion states. The host renders the response normally.
39
39
  - [`reference/parallel-workspaces.md`](reference/parallel-workspaces.md): explicit
40
40
  phase targets, one isolated global controller, and source-owned proof.
41
+ - [Autocomplete loop](../rite-autocomplete/reference/loop.md#early-preparation-admission):
42
+ controller-only early preparation, bounded successor routing and normalization research.
41
43
  - [`reference/visual-playbooks/index.md`](reference/visual-playbooks/index.md): progressive
42
44
  visual HTML playbook router (load matching ids only; dual-read outline).
43
45
 
@@ -101,16 +101,18 @@ return cursors and native handles: one controller, not another phase or queue.
101
101
  Normalize unresolved legacy sequence authority through its owning decision/
102
102
  phase. Positive budget, ambiguous prose or path disjointness grants nothing.
103
103
  A current invalid canonical map is an error, never a fallback to history.
104
- For controller mode at cap>1, before a new Build-wright wave writes claims,
105
- rounds or history, start preparation of that source's immediate recorded
106
- successor. Missing targets need native Spec → Clarify → Temper → Define/Plan →
107
- affected Vet; existing targets need completed native state, actual pending
108
- planning/review handles, current Build-ready binding, or a human/dependency hold.
109
- Completed live/archived successors need no reopening; retained actors still bind.
110
- A placeholder, prose claim, unopened wave or unrelated reviewer is insufficient.
111
- Pipeline one successor per admitted source; preparing the whole roadmap first
112
- is unnecessary. Opt-out, zero opening budget or source human/question holds
113
- prevent new openings, not already-created child planning or independent work.
104
+ At controller cap>1, resolve sequence authority and start actual immediate-
105
+ successor preparation before ordinary local Temper/Define/Plan/Vet context or
106
+ dispatch open, and retain the full Build gate before claims/rounds/history.
107
+ Follow [early preparation](../../rite-autocomplete/reference/loop.md#early-preparation-admission)
108
+ for native launch/start, internal markers and bounded preparatory-only routing.
109
+ Missing targets need native Spec → Clarify → Temper → Define/Plan → affected
110
+ Vet; existing targets need current completed/readiness state, registered pending
111
+ native preparation, or an existing human/dependency hold. Completed live/
112
+ archived successors need no reopening; valid finite tails discharge the
113
+ obligation. Placeholders, reports and unopened waves prove nothing.
114
+ Opt-out, zero opening budget or source human/question holds prevent new
115
+ openings, not existing child preparation or independent work.
114
116
  If preparation cannot start, retain `frontier-blocked: <successor> — <constraint>`
115
117
  in source `evidence.md`. `frontier-blocked: sequence — <constraint>` may defer
116
118
  unresolved historical normalization for valid independent local work. Each row
@@ -116,11 +116,13 @@ next sequence continuation through Vet in a second session, then stop.
116
116
  Temper → Define → Vet → Build → Prove → Polish → Review → Seal. Durable files
117
117
  carry state. Apply the mutable post-vet budget before Build. Consume fresh scheduling
118
118
  emitted by recorded `dispatch return`; rerun frontier after further changes
119
- and before waits. Start actual immediate-successor preparation before local
120
- writer admission, or disclose the narrow deferral in the shared global pass.
121
- A placeholder or report is not preparation; the entire sequence need not be
122
- prepared at once. Preserve local cursors and protected validation windows;
123
- pass Build the resolved global cap and retain every admission/isolation gate.
119
+ and before waits. Before ordinary local Temper/Define/Plan/Vet context/dispatch,
120
+ resolve sequence authority and start actual immediate-successor preparation
121
+ under [early admission](reference/loop.md#early-preparation-admission),
122
+ or retain the global pass's concrete deferral; keep the full Build gate.
123
+ Derive initial preparatory-only routing before any marked wave; do not recurse
124
+ through the roadmap. Preserve local cursors, protected validation windows and
125
+ every admission/isolation gate; pass Build the resolved global cap.
124
126
  **Completion:** Seal GO or a durable valid stop precedes later phases.
125
127
  5. **Apply stops.** At every gate use
126
128
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
@@ -41,18 +41,41 @@ remaining. AFK configuration itself stays unchanged.
41
41
 
42
42
  ### Admit each unattended cycle
43
43
 
44
- Before each phase, fan-out, recovery or writer: run cheap readiness and reject
45
- overlap. Before Build admission, execute the shared immediate-successor
46
- preparation/deferral and global cohort rules; local readiness alone is insufficient.
47
- Count every leaf result. Explicit activations reset activation-local counters,
48
- not durable slice/recovery state. Pass resolved `--parallel N` to
49
- [Build](../../rite-build/reference/output.md#caller-owned-continuation).
50
- Ignored legacy budgets and local serial constraints are not whole-run stops.
51
- Invented ceilings on dispatches, waits, tool calls or turns cannot stop execution;
52
- human instructions to pause or limit scope still bind.
53
- Resolve ranked validating/blocking picks via `devrites-engine state resolve`;
54
- never hand `/rite-resolve` to the user. Escalating, irreversible-risk, access, blocking
55
- without recommendations, and Seal judgment (`slice: seal`) still pause.
44
+ Before each phase/fan-out/recovery/writer, check readiness/overlap and apply early
45
+ admission and the global pass below; local readiness is insufficient. Count every leaf.
46
+ Explicit activation resets only activation-local counters, not durable recovery.
47
+ Pass resolved `--parallel N` to [Build](../../rite-build/reference/output.md#caller-owned-continuation).
48
+ Legacy or invented execution ceilings never stop this controller; human limits bind.
49
+ Resolve ranked validating/blocking picks via `devrites-engine state resolve`, not
50
+ a user handoff. Escalating, irreversible-risk, access, unrecommended blocking picks
51
+ and Seal judgment (`slice: seal`) still pause.
52
+
53
+ ## Early preparation admission
54
+
55
+ Internal exclusive `context`/`dispatch open` flags:
56
+ - `--prepare-for <parent-source>`: permitted native non-Build preparation roles
57
+ (only controlling-root context may be roleless), exact existing immediate
58
+ successor/parent agreeing on canonical identity, binding, adjacency and chain.
59
+ Exempts the child's successor gate, never product writes.
60
+ - `--sequence-research`: only canonical `evidence-scout`, Spec/Clarify/Temper/Define/
61
+ Plan/Vet, exact existing source and normal path/role/ledger constraints. Exempts
62
+ authority/successor admission solely to investigate broken authority read-only:
63
+ no acceptance, scope/approval/phase advance, successor creation, writers,
64
+ readiness or preparation credit.
65
+
66
+ Context (`--skill rite-<phase>` too) checks before writes; no account required.
67
+ Use context → packet → open → native launch → `dispatch start` actual handles
68
+ before parent admission; openings alone do not count.
69
+
70
+ Derive preparatory-only B before any marked wave from nonterminal parent A:
71
+ until ordinary unmarked B Temper/Define/Plan/Vet or Build-wright admission
72
+ (checking C first), A becoming terminal or ordered handoff to B, C waits—even
73
+ explicit C `next`/`check continuation`. No C creation/rerouting before A's eligible
74
+ phase. Completed B history retains this bound; Spec/Clarify/research/read-only
75
+ Build do not release it. Independent work stays visible; all global-pass gates bind.
76
+
77
+ Shared registry edits alone do not serialize disjoint modules. Isolate their
78
+ writer; refusal-only tests never replace positive requirements or defer their band.
56
79
 
57
80
  ## Phase arc
58
81
 
@@ -72,12 +95,10 @@ Workspace files, not chat, carry state. Read/execute each phase skill:
72
95
  | 10 | `/rite-seal` | GO/NO-GO; no Git |
73
96
  | 11 | `/rite-ship` | only after GO; `--ship` never authorizes Git; stop at literal-GO/native approval |
74
97
 
75
- At phase entry, before local recovery or waits, execute the
98
+ At phase entry, before recovery/waits, execute the
76
99
  [global pass](../../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier).
77
- Consume the fresh frontier emitted after a recorded `dispatch return`; after
78
- landing, planning/artifact changes or capacity updates, rerun frontier. Execute
79
- authorized preparation/selection, preserving pending handles, local cursors and
80
- protected validation windows. Reporting or creating a placeholder is not progress.
100
+ Consume persisted return frontiers; rerun after landing/artifact/capacity changes.
101
+ Execute authorized routes, retaining handles, cursors and protected proof windows.
81
102
 
82
103
  Check [stop-conditions.md](stop-conditions.md) before advancing. Discard stale
83
104
  pass evidence after source edits. Re-read the selected source before each phase per [phase target binding](../../devrites-lib/reference/parallel-workspaces.md#phase-target-binding). On a cold resume or
@@ -90,14 +111,12 @@ floor; `--update` never excuses an unreconciled regression.
90
111
 
91
112
  ## Sequence continuation
92
113
 
93
- With a recorded successor, opening budget and no opt-out, Seal GO stays internal:
94
- leave the owner sealed/unshipped with `/rite-ship`, then resume the prepared child
95
- or invoke its authorized native Spec. Sequence authority follows the
96
- [shared grammar](../../devrites-lib/reference/workspace-artifact-schema.md#what-each-file-owns),
97
- not invented slugs. Charge an opening once; preparation may pipeline before Seal,
98
- one immediate successor per admitted source, not the whole roadmap at once.
99
- Reuse the child's durable cursor and controller. ACTIVE changes only at normal
100
- ordered handoff; early planning or isolated independent Build does not advance it.
114
+ With a recorded successor, budget and no opt-out, Seal GO stays internal:
115
+ leave the owner sealed/unshipped with `/rite-ship`; resume the child's cursor/
116
+ controller or authorized native Spec. Use the
117
+ [shared grammar](../../devrites-lib/reference/workspace-artifact-schema.md#what-each-file-owns).
118
+ Charge once; pipeline only immediate successors. ACTIVE changes at ordered handoff,
119
+ not early planning or isolated independent Build.
101
120
 
102
121
  Before invoking a continuation, require durable `state.md`
103
122
  `sequence_workspaces_remaining > 0`; if absent, first write
@@ -151,20 +170,14 @@ and park it after three escalations while independent work continues.
151
170
 
152
171
  ## Continuous caller obligation
153
172
 
154
- After a green slice or phase, execute its recorded `next_action` internally;
155
- reply only at completion or a genuine stop.
156
-
157
- Before replying, run `devrites-engine check continuation`: `required` means
158
- consume `invoke:` now; only `clear` permits a final reply. Under controller mode,
159
- actionable normalization, successor preparation or foreign work precedes local
160
- Build. Local-only reconciliation, repair, picks or discharged scheduling deferrals
161
- retain the owning phase edge, not recursive `/rite-autocomplete`.
162
- Agent-owned NEEDS_REPLAN, budgeted Critical/Important recovery, independent work
163
- or a recommended blocking answer stays internal. Invoke repair or `state resolve`
164
- unless the [resolver-failure stop](stop-conditions.md#other-stop-classes) applies.
165
- A distinct invariant is progress, not exhaustion; repeated failed resolver calls
166
- without correction are not progress.
167
-
168
- The number of completed repair/Vet cycles, context pressure, compaction, session
169
- duration, and nested completion never turn checkpoints into handoffs. Persist and
170
- resume to the requested rest point or shared human/safety/access/parked-recovery stop.
173
+ Execute each green slice/phase's `next_action` internally. Before replying, run
174
+ `devrites-engine check continuation`: consume `required`'s `invoke:`; only `clear`
175
+ permits reply. Controller normalization/preparation/foreign work precedes local
176
+ Build; local repair/picks/reconciliation/discharged deferrals keep their phase,
177
+ not recursive Autocomplete. Route agent-owned NEEDS_REPLAN, budgeted Critical/Important recovery,
178
+ independent work and recommended blocking answers internally; invoke repair or
179
+ `state resolve` unless the [resolver-failure stop](stop-conditions.md#other-stop-classes)
180
+ applies. Distinct invariants are progress; unchanged resolver retries are not.
181
+ Cycles, context pressure, compaction, duration and nested completion never create
182
+ handoffs. Persist/resume until requested completion or a shared human/safety/
183
+ access/parked-recovery stop.
@@ -39,6 +39,8 @@ lifecycle state from chat or optional `README.md`.
39
39
  completion states. The host renders the response normally.
40
40
  - [`reference/parallel-workspaces.md`](reference/parallel-workspaces.md): explicit
41
41
  phase targets, one isolated global controller, and source-owned proof.
42
+ - [Autocomplete loop](../rite-autocomplete/reference/loop.md#early-preparation-admission):
43
+ controller-only early preparation, bounded successor routing and normalization research.
42
44
  - [`reference/visual-playbooks/index.md`](reference/visual-playbooks/index.md): progressive
43
45
  visual HTML playbook router (load matching ids only; dual-read outline).
44
46