devrites 7.3.0 → 7.3.1

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 (48) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -1
  3. package/docs/engine/commands.md +6 -0
  4. package/engine/internal/gate/readiness_binding.go +4 -3
  5. package/engine/internal/state/observation.go +49 -2
  6. package/pack/.claude/skills/devrites-lib/reference/parallel-workspaces.md +46 -12
  7. package/pack/.claude/skills/rite-autocomplete/SKILL.md +9 -10
  8. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +8 -1
  9. package/pack/.claude/skills/rite-prove/SKILL.md +15 -7
  10. package/pack/.claude/skills/rite-review/SKILL.md +7 -0
  11. package/pack/.claude/skills/rite-vet/SKILL.md +10 -1
  12. package/pack/generated/claude/skills/devrites-lib/reference/parallel-workspaces.md +46 -12
  13. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +9 -10
  14. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +8 -1
  15. package/pack/generated/claude/skills/rite-prove/SKILL.md +15 -7
  16. package/pack/generated/claude/skills/rite-review/SKILL.md +7 -0
  17. package/pack/generated/claude/skills/rite-vet/SKILL.md +10 -1
  18. package/pack/generated/codex/skills/devrites-lib/reference/parallel-workspaces.md +46 -12
  19. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +9 -10
  20. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +8 -1
  21. package/pack/generated/codex/skills/rite-prove/SKILL.md +15 -7
  22. package/pack/generated/codex/skills/rite-review/SKILL.md +7 -0
  23. package/pack/generated/codex/skills/rite-vet/SKILL.md +10 -1
  24. package/pack/generated/devin/skills/devrites-lib/reference/parallel-workspaces.md +46 -12
  25. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +9 -10
  26. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +8 -1
  27. package/pack/generated/devin/skills/rite-prove/SKILL.md +15 -7
  28. package/pack/generated/devin/skills/rite-review/SKILL.md +7 -0
  29. package/pack/generated/devin/skills/rite-vet/SKILL.md +10 -1
  30. package/pack/generated/dsh/skills/devrites-lib/reference/parallel-workspaces.md +46 -12
  31. package/pack/generated/dsh/skills/rite-autocomplete/SKILL.md +9 -10
  32. package/pack/generated/dsh/skills/rite-autocomplete/reference/loop.md +8 -1
  33. package/pack/generated/dsh/skills/rite-prove/SKILL.md +15 -7
  34. package/pack/generated/dsh/skills/rite-review/SKILL.md +7 -0
  35. package/pack/generated/dsh/skills/rite-vet/SKILL.md +10 -1
  36. package/pack/generated/omp/skills/devrites-lib/reference/parallel-workspaces.md +46 -12
  37. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +9 -10
  38. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +8 -1
  39. package/pack/generated/omp/skills/rite-prove/SKILL.md +15 -7
  40. package/pack/generated/omp/skills/rite-review/SKILL.md +7 -0
  41. package/pack/generated/omp/skills/rite-vet/SKILL.md +10 -1
  42. package/pack/generated/pi/skills/devrites-lib/reference/parallel-workspaces.md +46 -12
  43. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +9 -10
  44. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +8 -1
  45. package/pack/generated/pi/skills/rite-prove/SKILL.md +15 -7
  46. package/pack/generated/pi/skills/rite-review/SKILL.md +7 -0
  47. package/pack/generated/pi/skills/rite-vet/SKILL.md +10 -1
  48. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to DevRites are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and DevRites adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Releases are generated automatically by [semantic-release](https://semantic-release.gitbook.io/) from Conventional Commits on `main`.
4
4
 
5
+ ## [7.3.1](https://github.com/ViktorsBaikers/DevRites/compare/v7.3.0...v7.3.1) (2026-11-01)
6
+
7
+ ### Fixed
8
+
9
+ * **devrites:** keep workspace frontier active across phase waits ([#204](https://github.com/ViktorsBaikers/DevRites/issues/204)) ([56006f4](https://github.com/ViktorsBaikers/DevRites/commit/56006f4ca0545b4ede1ed81b0373e61b7cd7ce7d))
10
+
5
11
  ## [7.3.0](https://github.com/ViktorsBaikers/DevRites/compare/v7.2.8...v7.3.0) (2026-11-01)
6
12
 
7
13
  ### Added
@@ -33,6 +39,10 @@ All notable changes to DevRites are documented here. The format follows [Keep a
33
39
  - Audit underfilled parallel frontiers through acceptance-preserving Plan/Vet;
34
40
  separate independently provable capabilities without dropping producer, proof
35
41
  or authority gates.
42
+ - Recompute archived predecessor readiness in place without restoring historical
43
+ workspaces or reviving their controller leases.
44
+ - Execute Autocomplete's global frontier at cold Prove/Vet/Review and native wait
45
+ boundaries; preserve frozen candidates, standalone scope, and non-green gates.
36
46
 
37
47
  ## [7.2.8](https://github.com/ViktorsBaikers/DevRites/compare/v7.2.7...v7.2.8) (2026-10-31)
38
48
 
package/README.md CHANGED
@@ -31,7 +31,7 @@ history can't lose it. After you clear the conversation, switch hosts, or hand
31
31
  the feature to another engineer, the next session reads the same plan,
32
32
  decisions, and evidence before it continues.
33
33
 
34
- **Status:** [`v7.3.0`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v7.3.0): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
34
+ **Status:** [`v7.3.1`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v7.3.1): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
35
35
 
36
36
  This is the latest published release; `main` may contain unreleased work.
37
37
 
@@ -82,6 +82,12 @@ command namespace.
82
82
  Awaiting-human section. Resolving another question leaves the live wait intact.
83
83
  - `state close` reads the physical `ACTIVE` pointer under the feature lock;
84
84
  `DEVRITES_WORKSPACE` cannot make it clear another feature's pointer.
85
+ - Read-only readiness bindings and input introspection resolve explicit sources
86
+ live first, then safely archived bytes only when the live workspace is absent.
87
+ `check readiness --emit-binding <slug>` recomputes archived inputs in place;
88
+ cached binding records do not establish freshness. Active workspace commands
89
+ remain live-only. Never restore an archive merely to hash it: copied historical
90
+ leases can become live controllers.
85
91
  - `gates run` and `reverify` snapshot every declared `INPUTS` dependency around
86
92
  the actual shared CHECK execution, recheck during locked writeback, and
87
93
  invalidate earlier passes if later checks move their inputs.
@@ -40,8 +40,9 @@ var readinessInputs = [...]readinessInput{
40
40
  }
41
41
 
42
42
  // ReadinessBinding returns the exact line Vet records in eng-review.md.
43
+ // Explicit sources resolve live first, then safely archived planning bytes.
43
44
  func ReadinessBinding(root, slug string) (string, error) {
44
- observation, err := state.ObserveWorkspace(root, slug)
45
+ observation, err := state.ObserveReferencedWorkspace(root, slug)
45
46
  if err != nil {
46
47
  return "", err
47
48
  }
@@ -180,9 +181,9 @@ func withoutReviewedIdentity(content []byte) []byte {
180
181
  // ReadinessInputDigests returns each readiness input's content digest plus the
181
182
  // aggregate binding line Vet records in eng-review.md. A required input that
182
183
  // is missing, or any unreadable input, is an error — the same refusal the
183
- // readiness gate applies.
184
+ // readiness gate applies. Source selection matches ReadinessBinding.
184
185
  func ReadinessInputDigests(root, slug string) ([]ReadinessInputDigest, string, error) {
185
- observation, err := state.ObserveWorkspace(root, slug)
186
+ observation, err := state.ObserveReferencedWorkspace(root, slug)
186
187
  if err != nil {
187
188
  return nil, "", err
188
189
  }
@@ -244,11 +244,40 @@ func ObserveWorkspace(root, slug string) (*WorkspaceObservation, error) {
244
244
  return observeWorkspace(root, slug, nil)
245
245
  }
246
246
 
247
+ // ObserveReferencedWorkspace acquires a read-only planning source, live first
248
+ // and archived only when its canonical live directory is absent. A different
249
+ // valid active-workspace override never redirects this explicit source.
250
+ func ObserveReferencedWorkspace(root, slug string) (*WorkspaceObservation, error) {
251
+ return observeWorkspaceSource(root, slug, true, nil)
252
+ }
253
+
247
254
  func observeWorkspace(root, slug string, callback observationCallback) (*WorkspaceObservation, error) {
248
- if !observationWorkspaceOverrideValid(root, slug) {
255
+ return observeWorkspaceSource(root, slug, false, callback)
256
+ }
257
+
258
+ func observeWorkspaceSource(root, slug string, allowArchive bool, callback observationCallback) (*WorkspaceObservation, error) {
259
+ override := os.Getenv("DEVRITES_WORKSPACE")
260
+ overrideSlug := slug
261
+ if allowArchive && override != "" {
262
+ overrideSlug = filepath.Base(filepath.Clean(override))
263
+ }
264
+ if !observationWorkspaceOverrideValid(root, overrideSlug) {
249
265
  return nil, ObservationWorkspaceInvalid
250
266
  }
251
- workspacePath, err := devritespaths.ExistingFeatureDirChecked(root, slug)
267
+ workspacePath, err := devritespaths.ExistingFeatureDirChecked(root, overrideSlug)
268
+ canArchive := allowArchive && override == ""
269
+ if overrideSlug != slug {
270
+ if err != nil {
271
+ return nil, ObservationWorkspaceInvalid
272
+ }
273
+ workspacePath, err = devritespaths.ExistingCanonicalFeatureDirChecked(root, slug)
274
+ canArchive = allowArchive
275
+ }
276
+ archived := false
277
+ if err != nil && canArchive && errors.Is(err, fs.ErrNotExist) {
278
+ workspacePath, err = devritespaths.ExistingArchivedFeatureDirChecked(root, slug)
279
+ archived = err == nil
280
+ }
252
281
  if err != nil {
253
282
  return nil, ObservationWorkspaceInvalid
254
283
  }
@@ -270,6 +299,9 @@ func observeWorkspace(root, slug string, callback observationCallback) (*Workspa
270
299
  }
271
300
  defer func() { _ = roots.devrites.Close() }()
272
301
  defer func() { _ = roots.workspace.Close() }()
302
+ if archived && !liveWorkspaceAbsent(roots.devrites, slug) {
303
+ return nil, ObservationWorkspaceInvalid
304
+ }
273
305
 
274
306
  inventory := observationInventory()
275
307
  facts := make([]ArtifactFact, 0, len(inventory))
@@ -315,9 +347,24 @@ func observeWorkspace(root, slug string, callback observationCallback) (*Workspa
315
347
  if err != nil {
316
348
  return nil, ObservationWorkspaceInvalid
317
349
  }
350
+ if archived && !liveWorkspaceAbsent(roots.devrites, slug) {
351
+ return nil, ObservationConcurrentChange
352
+ }
318
353
  return &WorkspaceObservation{slug: slug, facts: facts, index: index, rootFiles: rootFiles}, nil
319
354
  }
320
355
 
356
+ func liveWorkspaceAbsent(root *os.Root, slug string) bool {
357
+ work := inspectEntry(root, "work")
358
+ if work.state == entryAbsent {
359
+ return true
360
+ }
361
+ if work.state != entryPresent || work.info.Mode()&os.ModeSymlink != 0 || !work.info.IsDir() {
362
+ return false
363
+ }
364
+ workspace := inspectEntry(root, filepath.Join("work", slug))
365
+ return workspace.state == entryAbsent && sameObservedEntry(work, inspectEntry(root, "work"))
366
+ }
367
+
321
368
  // readRootFiles lists the workspace directory's regular entries through the
322
369
  // already-verified root handle, so the list describes the same snapshot as the
323
370
  // artifact facts.
@@ -69,6 +69,9 @@ incomplete, stale or human-blocked future work is a planning/repair/blocked
69
69
  opportunity, not a fatal pool failure. Retain every readiness reason: fixing stale
70
70
  bindings does not waive a coexisting human/access/safety gate. Re-Vet affected
71
71
  predecessor assumptions, then record current bindings; never auto-refresh a digest.
72
+ Read archived predecessors in place through the engine's referenced read-only
73
+ readiness lookup. Never copy an archive into live `work/` merely to read/hash it:
74
+ that can resurrect stale controller leases and claims.
72
75
 
73
76
  ## Recover avoidable serialization
74
77
 
@@ -106,13 +109,28 @@ reslicing unchanged work.
106
109
 
107
110
  ## Continuous global frontier
108
111
 
109
- At entry, each landing, planning/review return and before any wait or final reply:
112
+ Autocomplete executes this bounded pass at every phase entry (including cold
113
+ Prove/Vet/Review), before phase-local recovery, on each landing/planning/review
114
+ return, and immediately before a native wait or final reply. A nested phase
115
+ returns scheduling to Autocomplete; its source-local phase/recovery return cursor
116
+ and pending native reviewer handles remain intact. This is not a second phase
117
+ controller or a persistent frontier artifact.
110
118
 
111
119
  1. Re-read controller lease, per-source state/questions/readiness and authorized
112
- sequence. Scan all stages, not only the owner's next local slice. While writers
113
- run, root advances authorized Spec → Clarify → Temper → Define/Plan → Vet,
114
- including narrow repair/re-Vet of prepared targets, under unchanged approval
115
- and safety rules. Missing human authority blocks that target, not safe siblings.
120
+ sequence. Examine every recorded authorized source once per pass, not only
121
+ the owner's next local slice or first blocked child. Prepare absent targets
122
+ through authorized native Spec → Clarify → Temper → Define/Plan → Vet; repair
123
+ and re-Vet current readiness of prepared targets now, not after owner Seal.
124
+ Assess actual source gates, claims and explicit planning/Build restrictions
125
+ before routing. Owner-local red/human/access gates withhold that owner or its
126
+ actual consumers, not independent authorized planning; true whole-run safety,
127
+ access and claim constraints still bind. Retain concrete actions or blockers
128
+ in existing source artifacts under normal write authority.
129
+ Yield a child at its pending reviewer/phase boundary back to this controller;
130
+ never recursively wait for child completion while parent returns are pending.
131
+ Reconcile available parent returns before another pass. A native wait is
132
+ justified only after concrete authorized actions/blockers across the pool
133
+ have been examined; reading later phase skills is not pending Plan/Vet work.
116
134
  If an explicit/AFK capacity change differs from retained capacity, reconcile it
117
135
  before selection using `parallel add --root <repo> --slug <controller> --cap N --json -`
118
136
  with stdin `[]`. This changes capacity only, not workers or a complete lease's
@@ -137,11 +155,14 @@ At entry, each landing, planning/review return and before any wait or final repl
137
155
  Unsupported isolation uses truthful serial owner dispatch and ordinary ordered
138
156
  handoff, never early same-tree foreign Build or concurrent same-worktree writers.
139
157
  4. Launch every selected native writer before waiting on any; keep scheduling
140
- planning and independent review while they run. Land each individually green
141
- sibling through Build review/proof and `parallel integrate --slice <key>`;
142
- refill immediately from the whole authorized pool. A red sibling repairs in
143
- place and holds its slot/paths; it does not delay independent green landings.
144
- Never satisfy a producer edge on writer return or green-but-unlanded work.
158
+ planning and independent review while they run, including while the owner
159
+ awaits Prove/Vet/Review accounts. Apply the protected window below before any
160
+ landing: defer control mutations while frozen validation is pending. Outside
161
+ that window, land each individually green sibling through Build review/proof
162
+ and `parallel integrate --slice <key>`; refill immediately from the whole pool.
163
+ A red sibling repairs in place and holds its slot/paths; it does not delay
164
+ independent safe landings. Never satisfy a producer edge on writer return or
165
+ green-but-unlanded work.
145
166
  After worker-bound review/proof and source bookkeeping finish, prune only
146
167
  verified clean integrated checkouts with `parallel prune --root <repo>
147
168
  --slug <controller>`. Retain transfer refs/lease identities; dirty or ignored
@@ -182,8 +203,17 @@ controller bookkeeping nor sibling proof closes a child's acceptance.
182
203
 
183
204
  Prove/Polish/Review/Seal remain per workspace with fresh candidate bindings. Shared
184
205
  durable Polish outputs serialize; source changes invalidate affected evidence.
185
- Before any non-lease product correction, shared durable Polish write or control
186
- checkpoint, freeze new writer admissions, drain/reconcile retained writers, land
206
+ From candidate freeze/validator dispatch through account admission, preserve the
207
+ exact candidate, control tip and all consumed metadata/validator inputs. Independent
208
+ authorized planning and isolated writers may proceed only without changing those
209
+ inputs or shared runtime resources. Defer integration, checkpoints, cross-source
210
+ corrections and consumed-artifact edits until the window closes; retained green
211
+ workers keep their identities/slots. Recheck candidate, control-tip identity and
212
+ consumed inputs before accepting each account; drift invalidates affected accounts
213
+ and requires native fresh validation, never acceptance against a moving tip.
214
+ After any protected validation window closes, before a non-lease product correction,
215
+ shared durable Polish write or control checkpoint, freeze new writer admissions,
216
+ drain/reconcile retained writers, land
187
217
  safe green work and cleanup the lease. Preserve blocked work; never force-clean
188
218
  it merely to advance a phase. Perform phase-owned correction/proof/checkpoint,
189
219
  then resume the pool from new HEAD. Never accept unrelated commits as expected
@@ -192,6 +222,10 @@ ControlTip or invent phase slices. Read-only frozen proof/review and planning-on
192
222
  Normal ordered handoff reuses the same controller and prepared child cursor.
193
223
  Never archive controller/source while retained lease owns it; clean up owned
194
224
  workers first, preserving salvage and unknown outcomes.
225
+ Global scheduling is not global gating or ordered handoff. Unmet or abandoned
226
+ owner gates remain non-green: an owner request to defer obligations routes Spec
227
+ Drift Guard → Plan → affected Vet under existing authority, or retains the blocked
228
+ source. It never becomes Prove green or Seal GO merely to reach another source.
195
229
 
196
230
  Early child WIPs can interleave with parent WIPs. Parent-only Ship must not absorb
197
231
  those commits as if parent alone were sealed. Deferred release waits for every
@@ -86,6 +86,9 @@ next sequence continuation through Vet in a second session, then stop.
86
86
 
87
87
  1. **Orient and parse.** Resolve source per [phase target binding](../devrites-lib/reference/parallel-workspaces.md#phase-target-binding); when a workspace exists,
88
88
  require its `state.md` and read its cursor; a fresh idea starts empty at step 2.
89
+ Before phase-local cold recovery, execute the bounded
90
+ [global frontier pass](../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier);
91
+ retain this source's return cursor and pending reviewer handles.
89
92
  Before honoring `blocked` with terminal `next_action`,
90
93
  reconcile retained consumptive evidence and fingerprint attempts from
91
94
  `drift.md`/`evidence.md`; a retained fingerprint below its cap resumes offline
@@ -116,16 +119,12 @@ next sequence continuation through Vet in a second session, then stop.
116
119
  `/rite-build` batch loop → `/rite-prove` → `/rite-polish` →
117
120
  `/rite-review` → `/rite-seal`. Read and execute each skill; durable files, not
118
121
  chat, carry state. Apply the mutable post-vet budget before first Build.
119
- Execute [`parallel-workspaces.md`](../devrites-lib/reference/parallel-workspaces.md):
120
- continuously scan the authorized recorded sequence across stages, preparing
121
- and re-Vetting future targets while writers run. Build queries the global
122
- pool with `parallel select --from-plan --slug <controller> --workspaces
123
- <controller,authorized-source,...> --cap N`; N is explicit `--parallel N`, else
124
- sentinel `max_parallel`, else 10 — one global writer cap, including explicit 1.
125
- Always pass resolved `--parallel N` to Build. Cap>1 uses an isolated first
126
- writer even when initially alone; refill globally per landing and planning/
127
- review return. Unsupported host stays serial. No local ready slice is not
128
- completion while authorized planning, repair/re-Vet or independent work remains.
122
+ Execute the shared [global frontier pass](../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier)
123
+ at phase entry, before recovery, on returns and before native waits, not only
124
+ during Build or after Seal. Preserve source-local phase cursors; Autocomplete
125
+ retains repository scheduling. Apply its protected validation window before
126
+ landings/checkpoints and account admission. Pass resolved `--parallel N` to
127
+ Build under its one global cap and existing admission/isolation gates.
129
128
  **Completion:** loop reaches Seal GO or persists a valid stop before any later phase.
130
129
  5. **Apply stops.** At every gate use
131
130
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
@@ -65,13 +65,20 @@ Workspace files, not chat, carry state. Read/execute each phase skill:
65
65
  | 3 | `/rite-temper` | harden or reduce; `expand` and extra acceptance stop for a human; irreversible risk still pauses |
66
66
  | 4 | `/rite-define` | approved plan/tasks/traceability |
67
67
  | 5 | `/rite-vet` | every plan; derive mutable budget after READY |
68
- | 6 | `/rite-build` global frontier | execute [shared controller workflow](../../devrites-lib/reference/parallel-workspaces.md); scan authorized stages and repair/re-Vet while writers run, refill per landing under one global cap; charge each source once per landed slice |
68
+ | 6 | `/rite-build` | execute shared controller selection/admission; charge each source once per landed slice |
69
69
  | 7 | `/rite-prove` | all slices built except deferred (`Satisfies: none`); approved proof; recovery on red |
70
70
  | 8 | `/rite-polish` | re-prove after code edits |
71
71
  | 9 | `/rite-review` | in-scope correction then fresh proof |
72
72
  | 10 | `/rite-seal` | GO/NO-GO; no Git |
73
73
  | 11 | `/rite-ship` | only after GO; `--ship` never authorizes Git; stop at literal-GO/native approval |
74
74
 
75
+ At every phase entry, before cold/local recovery, on reviewer/planning returns and
76
+ before native waits, Autocomplete executes the bounded
77
+ [global frontier pass](../../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier).
78
+ Keep source-local return cursors and pending handles; apply its protected
79
+ validation window before accepting accounts or landing work. This scheduling
80
+ precedes owner Seal and does not change ordered handoff below.
81
+
75
82
  Check [stop-conditions.md](stop-conditions.md) before advancing. Discard stale
76
83
  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
77
84
  new activation, run `devrites-engine check regression <slug>`: `BLOCKED` names a
@@ -35,8 +35,9 @@ TTHW, and exact signal-bearing errors; never assert DX (trigger `devex`).
35
35
  grammar/hashing. Spec Drift Guard owns revealed contract drift.
36
36
  - Root runs vetted gates/browser and records immutable evidence; proof runner
37
37
  validates it. Only the bounded wright fixes product source/tests.
38
- - **Prove remains the controlling caller** during technical backtracking. Save
39
- its cursor; run Plan repair, Recovery Vet, remediation, and re-proof inline;
38
+ - **Prove remains the source-local controlling caller** during technical backtracking;
39
+ under Autocomplete, repository scheduling stays with Autocomplete. Save
40
+ Prove's cursor; run Plan repair, Recovery Vet, remediation, and re-proof inline;
40
41
  consume nested boundaries; resume the failed rung. A strategy is spent after
41
42
  three no-progress attempts on the exact same fingerprint; escalate it per the
42
43
  [retry contract](../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve)
@@ -60,12 +61,15 @@ test changes.
60
61
  ## Workflow
61
62
 
62
63
  1. **Orient.** Read core, resolve source per [phase target binding](../devrites-lib/reference/parallel-workspaces.md#phase-target-binding), require `state.md`, and read its
63
- cursor. On blocked Prove cold resume, reconcile retained consumptive evidence
64
- and no-progress corrections before accepting terminal none; a distinct
65
- fingerprint below cap resumes offline triage without another real action.
64
+ cursor. Under Autocomplete, return scheduling for its
65
+ [global frontier pass](../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier)
66
+ before cold/local recovery; preserve Prove's source-local return cursor.
67
+ On blocked Prove cold resume, reconcile retained consumptive evidence and
68
+ no-progress corrections before accepting terminal none; a distinct fingerprint
69
+ below cap resumes offline triage without another real action.
66
70
  2. **Freeze scope.** Read spec, tasks, state, test plan, and full diff. Require
67
- every slice built except a [deferred slice](../rite-plan/reference/slicing.md#deferred-slice). Missing `test-plan.md` returns to Vet inline (Prove stays the controlling
68
- caller) and resumes here; it never authorizes ad hoc proof.
71
+ every slice built except a [deferred slice](../rite-plan/reference/slicing.md#deferred-slice). Missing `test-plan.md` returns to Vet inline (Prove stays the source-local
72
+ controlling caller) and resumes here; it never authorizes ad hoc proof.
69
73
  3. **Approve commands.** If absent, use
70
74
  [test-command-discovery](reference/test-command-discovery.md) over repository
71
75
  manifests/CI. Discovery is evidence only: `test-plan.md` is the sole approved runtime
@@ -119,6 +123,10 @@ test changes.
119
123
  7. **Independent validation.** Fresh read-only `devrites-proof-runner` and
120
124
  `devrites-spec-reviewer`, in one parallel wave, judge the same candidate/commands/evidence/acceptance map.
121
125
  Neither runs commands; reject missing/stale, invented-ID, label-only or self-attested reports.
126
+ Under Autocomplete, before native wait return scheduling to its global frontier
127
+ pass, retaining both validator handles. Standalone Prove stays source-local.
128
+ Apply the shared protected validation window and recheck identities before
129
+ admitting accounts.
122
130
  8. **Map proof.** Reconcile verdicts under [acceptance-proof.md](reference/acceptance-proof.md).
123
131
  Every criterion/scenario/interaction/key link needs discriminating evidence or a
124
132
  blocker, including critical-path, observability, developer and wiring branches.
@@ -62,6 +62,9 @@ Pull these via `Read` when the diff demands them:
62
62
  0. Read `.claude/skills/devrites-lib/reference/standards/core.md` first (the always-on operating rules); pull the
63
63
  on-demand rules above as the diff demands them.
64
64
  Resolve source per [phase target binding](../devrites-lib/reference/parallel-workspaces.md#phase-target-binding) before loading workspace artifacts.
65
+ Under Autocomplete, return scheduling for its
66
+ [global frontier pass](../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier)
67
+ before cold/local recovery, preserving Review's source-local return cursor.
65
68
  1. Read `spec.md`, `tasks.md`, `state.md`, `decisions.md`,
66
69
  `touched-files.md`, `.devrites/principles.md` (if present: the binding invariants to score
67
70
  the diff against), and the `git diff`. For "what would this change break"
@@ -127,6 +130,10 @@ Pull these via `Read` when the diff demands them:
127
130
  [[`agents.md`](../devrites-lib/reference/standards/agents.md) § Result admission](../devrites-lib/reference/standards/agents.md#result-admission).
128
131
  Either `Outcome: gap` stops Review; silence, failure, or malformed output never
129
132
  becomes an empty findings list.
133
+ Under Autocomplete, before native wait return scheduling to its global frontier
134
+ pass with cohort handles retained; standalone Review stays source-local. Apply
135
+ the shared protected validation window and identity recheck before account
136
+ admission.
130
137
  4. **Reconcile, don't re-review.** With the two parallel reports in hand, the inline
131
138
  lead reconciles. It does **not** re-run the code-review axes over correctness /
132
139
  readability / architecture / maintainability that `devrites-code-reviewer` already
@@ -76,6 +76,9 @@ plan declares a root-authored executable workflow file, read
76
76
  assumptions, and state. Require approved Plan and `Decision coverage: CLEAR`;
77
77
  otherwise stop for Define or Clarify. Check placement (`get_architecture`),
78
78
  blast radius (`trace_path`), and reuse (`search_graph`) per [`code-navigation.md`](../devrites-lib/reference/standards/code-navigation.md).
79
+ Under Autocomplete, return scheduling for its
80
+ [global frontier pass](../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier)
81
+ before cold/local recovery; preserve Vet's source-local return cursor.
79
82
  1. **Select depth.** Apply `reference/depth.md` exactly; never skip. Initial passes
80
83
  record engineering verdict and test-plan coverage. Valid Recovery rechecks
81
84
  retain prior depth; enter 1b.
@@ -85,12 +88,18 @@ plan declares a root-authored executable workflow file, read
85
88
  parallel under `../devrites-lib/reference/parallel-dispatch.md`: independent
86
89
  read-only passes on one frozen candidate. Missing required account blocks.
87
90
  Meanwhile run root steps 2–4, including step 3 preflight commands, on that
88
- candidate; reconcile returned accounts.
91
+ candidate. Under Autocomplete, before native wait return scheduling to its
92
+ global frontier pass with reviewer handles retained; standalone Vet stays
93
+ source-local. Apply the shared protected validation window and identity
94
+ recheck before reconciling returned accounts.
89
95
  1b. **Recovery recheck.** Require valid return cursor, accepted prior finding,
90
96
  exact fingerprint/reproduction, repaired candidate identity, changed
91
97
  paths/criteria, affected drift/evidence, and the recorded delta self-check.
92
98
  Freeze that packet and dispatch each exact owning reviewer once,
93
99
  fresh/read-only, limited to it — all its open fingerprints in that dispatch.
100
+ Under Autocomplete, before native wait use the same controller pass and retained
101
+ handles as step 1a; standalone Vet stays source-local. Apply the same
102
+ protected-window account admission.
94
103
  Do not rerun broad inventory or unaffected reviewers. Close the prior
95
104
  fingerprint only with discriminating evidence plus an explicit
96
105
  correction-created regression verdict on the touched invariants (acyclic
@@ -69,6 +69,9 @@ incomplete, stale or human-blocked future work is a planning/repair/blocked
69
69
  opportunity, not a fatal pool failure. Retain every readiness reason: fixing stale
70
70
  bindings does not waive a coexisting human/access/safety gate. Re-Vet affected
71
71
  predecessor assumptions, then record current bindings; never auto-refresh a digest.
72
+ Read archived predecessors in place through the engine's referenced read-only
73
+ readiness lookup. Never copy an archive into live `work/` merely to read/hash it:
74
+ that can resurrect stale controller leases and claims.
72
75
 
73
76
  ## Recover avoidable serialization
74
77
 
@@ -106,13 +109,28 @@ reslicing unchanged work.
106
109
 
107
110
  ## Continuous global frontier
108
111
 
109
- At entry, each landing, planning/review return and before any wait or final reply:
112
+ Autocomplete executes this bounded pass at every phase entry (including cold
113
+ Prove/Vet/Review), before phase-local recovery, on each landing/planning/review
114
+ return, and immediately before a native wait or final reply. A nested phase
115
+ returns scheduling to Autocomplete; its source-local phase/recovery return cursor
116
+ and pending native reviewer handles remain intact. This is not a second phase
117
+ controller or a persistent frontier artifact.
110
118
 
111
119
  1. Re-read controller lease, per-source state/questions/readiness and authorized
112
- sequence. Scan all stages, not only the owner's next local slice. While writers
113
- run, root advances authorized Spec → Clarify → Temper → Define/Plan → Vet,
114
- including narrow repair/re-Vet of prepared targets, under unchanged approval
115
- and safety rules. Missing human authority blocks that target, not safe siblings.
120
+ sequence. Examine every recorded authorized source once per pass, not only
121
+ the owner's next local slice or first blocked child. Prepare absent targets
122
+ through authorized native Spec → Clarify → Temper → Define/Plan → Vet; repair
123
+ and re-Vet current readiness of prepared targets now, not after owner Seal.
124
+ Assess actual source gates, claims and explicit planning/Build restrictions
125
+ before routing. Owner-local red/human/access gates withhold that owner or its
126
+ actual consumers, not independent authorized planning; true whole-run safety,
127
+ access and claim constraints still bind. Retain concrete actions or blockers
128
+ in existing source artifacts under normal write authority.
129
+ Yield a child at its pending reviewer/phase boundary back to this controller;
130
+ never recursively wait for child completion while parent returns are pending.
131
+ Reconcile available parent returns before another pass. A native wait is
132
+ justified only after concrete authorized actions/blockers across the pool
133
+ have been examined; reading later phase skills is not pending Plan/Vet work.
116
134
  If an explicit/AFK capacity change differs from retained capacity, reconcile it
117
135
  before selection using `parallel add --root <repo> --slug <controller> --cap N --json -`
118
136
  with stdin `[]`. This changes capacity only, not workers or a complete lease's
@@ -137,11 +155,14 @@ At entry, each landing, planning/review return and before any wait or final repl
137
155
  Unsupported isolation uses truthful serial owner dispatch and ordinary ordered
138
156
  handoff, never early same-tree foreign Build or concurrent same-worktree writers.
139
157
  4. Launch every selected native writer before waiting on any; keep scheduling
140
- planning and independent review while they run. Land each individually green
141
- sibling through Build review/proof and `parallel integrate --slice <key>`;
142
- refill immediately from the whole authorized pool. A red sibling repairs in
143
- place and holds its slot/paths; it does not delay independent green landings.
144
- Never satisfy a producer edge on writer return or green-but-unlanded work.
158
+ planning and independent review while they run, including while the owner
159
+ awaits Prove/Vet/Review accounts. Apply the protected window below before any
160
+ landing: defer control mutations while frozen validation is pending. Outside
161
+ that window, land each individually green sibling through Build review/proof
162
+ and `parallel integrate --slice <key>`; refill immediately from the whole pool.
163
+ A red sibling repairs in place and holds its slot/paths; it does not delay
164
+ independent safe landings. Never satisfy a producer edge on writer return or
165
+ green-but-unlanded work.
145
166
  After worker-bound review/proof and source bookkeeping finish, prune only
146
167
  verified clean integrated checkouts with `parallel prune --root <repo>
147
168
  --slug <controller>`. Retain transfer refs/lease identities; dirty or ignored
@@ -182,8 +203,17 @@ controller bookkeeping nor sibling proof closes a child's acceptance.
182
203
 
183
204
  Prove/Polish/Review/Seal remain per workspace with fresh candidate bindings. Shared
184
205
  durable Polish outputs serialize; source changes invalidate affected evidence.
185
- Before any non-lease product correction, shared durable Polish write or control
186
- checkpoint, freeze new writer admissions, drain/reconcile retained writers, land
206
+ From candidate freeze/validator dispatch through account admission, preserve the
207
+ exact candidate, control tip and all consumed metadata/validator inputs. Independent
208
+ authorized planning and isolated writers may proceed only without changing those
209
+ inputs or shared runtime resources. Defer integration, checkpoints, cross-source
210
+ corrections and consumed-artifact edits until the window closes; retained green
211
+ workers keep their identities/slots. Recheck candidate, control-tip identity and
212
+ consumed inputs before accepting each account; drift invalidates affected accounts
213
+ and requires native fresh validation, never acceptance against a moving tip.
214
+ After any protected validation window closes, before a non-lease product correction,
215
+ shared durable Polish write or control checkpoint, freeze new writer admissions,
216
+ drain/reconcile retained writers, land
187
217
  safe green work and cleanup the lease. Preserve blocked work; never force-clean
188
218
  it merely to advance a phase. Perform phase-owned correction/proof/checkpoint,
189
219
  then resume the pool from new HEAD. Never accept unrelated commits as expected
@@ -192,6 +222,10 @@ ControlTip or invent phase slices. Read-only frozen proof/review and planning-on
192
222
  Normal ordered handoff reuses the same controller and prepared child cursor.
193
223
  Never archive controller/source while retained lease owns it; clean up owned
194
224
  workers first, preserving salvage and unknown outcomes.
225
+ Global scheduling is not global gating or ordered handoff. Unmet or abandoned
226
+ owner gates remain non-green: an owner request to defer obligations routes Spec
227
+ Drift Guard → Plan → affected Vet under existing authority, or retains the blocked
228
+ source. It never becomes Prove green or Seal GO merely to reach another source.
195
229
 
196
230
  Early child WIPs can interleave with parent WIPs. Parent-only Ship must not absorb
197
231
  those commits as if parent alone were sealed. Deferred release waits for every
@@ -88,6 +88,9 @@ next sequence continuation through Vet in a second session, then stop.
88
88
 
89
89
  1. **Orient and parse.** Resolve source per [phase target binding](../devrites-lib/reference/parallel-workspaces.md#phase-target-binding); when a workspace exists,
90
90
  require its `state.md` and read its cursor; a fresh idea starts empty at step 2.
91
+ Before phase-local cold recovery, execute the bounded
92
+ [global frontier pass](../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier);
93
+ retain this source's return cursor and pending reviewer handles.
91
94
  Before honoring `blocked` with terminal `next_action`,
92
95
  reconcile retained consumptive evidence and fingerprint attempts from
93
96
  `drift.md`/`evidence.md`; a retained fingerprint below its cap resumes offline
@@ -118,16 +121,12 @@ next sequence continuation through Vet in a second session, then stop.
118
121
  `/rite-build` batch loop → `/rite-prove` → `/rite-polish` →
119
122
  `/rite-review` → `/rite-seal`. Read and execute each skill; durable files, not
120
123
  chat, carry state. Apply the mutable post-vet budget before first Build.
121
- Execute [`parallel-workspaces.md`](../devrites-lib/reference/parallel-workspaces.md):
122
- continuously scan the authorized recorded sequence across stages, preparing
123
- and re-Vetting future targets while writers run. Build queries the global
124
- pool with `parallel select --from-plan --slug <controller> --workspaces
125
- <controller,authorized-source,...> --cap N`; N is explicit `--parallel N`, else
126
- sentinel `max_parallel`, else 10 — one global writer cap, including explicit 1.
127
- Always pass resolved `--parallel N` to Build. Cap>1 uses an isolated first
128
- writer even when initially alone; refill globally per landing and planning/
129
- review return. Unsupported host stays serial. No local ready slice is not
130
- completion while authorized planning, repair/re-Vet or independent work remains.
124
+ Execute the shared [global frontier pass](../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier)
125
+ at phase entry, before recovery, on returns and before native waits, not only
126
+ during Build or after Seal. Preserve source-local phase cursors; Autocomplete
127
+ retains repository scheduling. Apply its protected validation window before
128
+ landings/checkpoints and account admission. Pass resolved `--parallel N` to
129
+ Build under its one global cap and existing admission/isolation gates.
131
130
  **Completion:** loop reaches Seal GO or persists a valid stop before any later phase.
132
131
  5. **Apply stops.** At every gate use
133
132
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
@@ -67,13 +67,20 @@ Workspace files, not chat, carry state. Read/execute each phase skill:
67
67
  | 3 | `/rite-temper` | harden or reduce; `expand` and extra acceptance stop for a human; irreversible risk still pauses |
68
68
  | 4 | `/rite-define` | approved plan/tasks/traceability |
69
69
  | 5 | `/rite-vet` | every plan; derive mutable budget after READY |
70
- | 6 | `/rite-build` global frontier | execute [shared controller workflow](../../devrites-lib/reference/parallel-workspaces.md); scan authorized stages and repair/re-Vet while writers run, refill per landing under one global cap; charge each source once per landed slice |
70
+ | 6 | `/rite-build` | execute shared controller selection/admission; charge each source once per landed slice |
71
71
  | 7 | `/rite-prove` | all slices built except deferred (`Satisfies: none`); approved proof; recovery on red |
72
72
  | 8 | `/rite-polish` | re-prove after code edits |
73
73
  | 9 | `/rite-review` | in-scope correction then fresh proof |
74
74
  | 10 | `/rite-seal` | GO/NO-GO; no Git |
75
75
  | 11 | `/rite-ship` | only after GO; `--ship` never authorizes Git; stop at literal-GO/native approval |
76
76
 
77
+ At every phase entry, before cold/local recovery, on reviewer/planning returns and
78
+ before native waits, Autocomplete executes the bounded
79
+ [global frontier pass](../../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier).
80
+ Keep source-local return cursors and pending handles; apply its protected
81
+ validation window before accepting accounts or landing work. This scheduling
82
+ precedes owner Seal and does not change ordered handoff below.
83
+
77
84
  Check [stop-conditions.md](stop-conditions.md) before advancing. Discard stale
78
85
  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
79
86
  new activation, run `devrites-engine check regression <slug>`: `BLOCKED` names a
@@ -35,8 +35,9 @@ TTHW, and exact signal-bearing errors; never assert DX (trigger `devex`).
35
35
  grammar/hashing. Spec Drift Guard owns revealed contract drift.
36
36
  - Root runs vetted gates/browser and records immutable evidence; proof runner
37
37
  validates it. Only the bounded wright fixes product source/tests.
38
- - **Prove remains the controlling caller** during technical backtracking. Save
39
- its cursor; run Plan repair, Recovery Vet, remediation, and re-proof inline;
38
+ - **Prove remains the source-local controlling caller** during technical backtracking;
39
+ under Autocomplete, repository scheduling stays with Autocomplete. Save
40
+ Prove's cursor; run Plan repair, Recovery Vet, remediation, and re-proof inline;
40
41
  consume nested boundaries; resume the failed rung. A strategy is spent after
41
42
  three no-progress attempts on the exact same fingerprint; escalate it per the
42
43
  [retry contract](../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve)
@@ -60,12 +61,15 @@ test changes.
60
61
  ## Workflow
61
62
 
62
63
  1. **Orient.** Read core, resolve source per [phase target binding](../devrites-lib/reference/parallel-workspaces.md#phase-target-binding), require `state.md`, and read its
63
- cursor. On blocked Prove cold resume, reconcile retained consumptive evidence
64
- and no-progress corrections before accepting terminal none; a distinct
65
- fingerprint below cap resumes offline triage without another real action.
64
+ cursor. Under Autocomplete, return scheduling for its
65
+ [global frontier pass](../devrites-lib/reference/parallel-workspaces.md#continuous-global-frontier)
66
+ before cold/local recovery; preserve Prove's source-local return cursor.
67
+ On blocked Prove cold resume, reconcile retained consumptive evidence and
68
+ no-progress corrections before accepting terminal none; a distinct fingerprint
69
+ below cap resumes offline triage without another real action.
66
70
  2. **Freeze scope.** Read spec, tasks, state, test plan, and full diff. Require
67
- every slice built except a [deferred slice](../rite-plan/reference/slicing.md#deferred-slice). Missing `test-plan.md` returns to Vet inline (Prove stays the controlling
68
- caller) and resumes here; it never authorizes ad hoc proof.
71
+ every slice built except a [deferred slice](../rite-plan/reference/slicing.md#deferred-slice). Missing `test-plan.md` returns to Vet inline (Prove stays the source-local
72
+ controlling caller) and resumes here; it never authorizes ad hoc proof.
69
73
  3. **Approve commands.** If absent, use
70
74
  [test-command-discovery](reference/test-command-discovery.md) over repository
71
75
  manifests/CI. Discovery is evidence only: `test-plan.md` is the sole approved runtime
@@ -119,6 +123,10 @@ test changes.
119
123
  7. **Independent validation.** Fresh read-only `devrites-proof-runner` and
120
124
  `devrites-spec-reviewer`, in one parallel wave, judge the same candidate/commands/evidence/acceptance map.
121
125
  Neither runs commands; reject missing/stale, invented-ID, label-only or self-attested reports.
126
+ Under Autocomplete, before native wait return scheduling to its global frontier
127
+ pass, retaining both validator handles. Standalone Prove stays source-local.
128
+ Apply the shared protected validation window and recheck identities before
129
+ admitting accounts.
122
130
  8. **Map proof.** Reconcile verdicts under [acceptance-proof.md](reference/acceptance-proof.md).
123
131
  Every criterion/scenario/interaction/key link needs discriminating evidence or a
124
132
  blocker, including critical-path, observability, developer and wiring branches.