devrites 7.3.3 → 7.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +44 -3
  2. package/README.md +21 -1
  3. package/docs/adr/0039-autocomplete-structural-admission.md +87 -0
  4. package/docs/adr/README.md +1 -0
  5. package/docs/cli.md +182 -7
  6. package/docs/command-map.md +2 -2
  7. package/docs/engine/commands.md +53 -3
  8. package/engine/commands.go +1 -1
  9. package/engine/help.go +3 -1
  10. package/engine/internal/lib/claims.go +65 -8
  11. package/engine/internal/lib/continuation.go +38 -4
  12. package/engine/internal/lib/dispatch.go +124 -63
  13. package/engine/internal/lib/frontier.go +864 -0
  14. package/engine/internal/lib/frontier_controller.go +652 -0
  15. package/engine/internal/lib/frontier_roadmap.go +168 -0
  16. package/engine/internal/lib/handoff.go +2 -5
  17. package/engine/internal/lib/next.go +19 -0
  18. package/engine/internal/parallel/cli.go +16 -5
  19. package/engine/internal/parallel/ops.go +7 -5
  20. package/engine/internal/parallel/repository.go +23 -0
  21. package/engine/internal/release/release.go +96 -5
  22. package/engine/main.go +4 -0
  23. package/pack/.claude/skills/devrites-lib/reference/parallel-workspaces.md +106 -114
  24. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +18 -17
  25. package/pack/.claude/skills/devrites-lib/reference/workspace-artifact-schema.md +41 -38
  26. package/pack/.claude/skills/rite-autocomplete/SKILL.md +33 -38
  27. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +46 -52
  28. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +28 -28
  29. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +19 -17
  30. package/pack/generated/claude/skills/devrites-lib/reference/parallel-workspaces.md +106 -114
  31. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +18 -17
  32. package/pack/generated/claude/skills/devrites-lib/reference/workspace-artifact-schema.md +41 -38
  33. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +33 -38
  34. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +46 -52
  35. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +28 -28
  36. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +19 -17
  37. package/pack/generated/codex/skills/devrites-lib/reference/parallel-workspaces.md +106 -114
  38. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +18 -17
  39. package/pack/generated/codex/skills/devrites-lib/reference/workspace-artifact-schema.md +41 -38
  40. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +33 -38
  41. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +46 -52
  42. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +28 -28
  43. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +19 -17
  44. package/pack/generated/devin/skills/devrites-lib/reference/parallel-workspaces.md +106 -114
  45. package/pack/generated/devin/skills/devrites-lib/reference/standards/afk-hitl.md +18 -17
  46. package/pack/generated/devin/skills/devrites-lib/reference/workspace-artifact-schema.md +41 -38
  47. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +33 -38
  48. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +46 -52
  49. package/pack/generated/devin/skills/rite-autocomplete/reference/stop-conditions.md +28 -28
  50. package/pack/generated/devin/skills/rite-build/reference/parallel-batch.md +19 -17
  51. package/pack/generated/dsh/skills/devrites-lib/reference/parallel-workspaces.md +106 -114
  52. package/pack/generated/dsh/skills/devrites-lib/reference/standards/afk-hitl.md +18 -17
  53. package/pack/generated/dsh/skills/devrites-lib/reference/workspace-artifact-schema.md +41 -38
  54. package/pack/generated/dsh/skills/rite-autocomplete/SKILL.md +33 -38
  55. package/pack/generated/dsh/skills/rite-autocomplete/reference/loop.md +46 -52
  56. package/pack/generated/dsh/skills/rite-autocomplete/reference/stop-conditions.md +28 -28
  57. package/pack/generated/dsh/skills/rite-build/reference/parallel-batch.md +19 -17
  58. package/pack/generated/omp/skills/devrites-lib/reference/parallel-workspaces.md +106 -114
  59. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +18 -17
  60. package/pack/generated/omp/skills/devrites-lib/reference/workspace-artifact-schema.md +41 -38
  61. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +33 -38
  62. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +46 -52
  63. package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +28 -28
  64. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +19 -17
  65. package/pack/generated/pi/skills/devrites-lib/reference/parallel-workspaces.md +106 -114
  66. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +18 -17
  67. package/pack/generated/pi/skills/devrites-lib/reference/workspace-artifact-schema.md +41 -38
  68. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +33 -38
  69. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +46 -52
  70. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +28 -28
  71. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +19 -17
  72. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
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.5](https://github.com/ViktorsBaikers/DevRites/compare/v7.3.4...v7.3.5) (2026-11-05)
6
+
7
+ ### Fixed
8
+
9
+ * **devrites:** enforce global autocomplete scheduling ([#208](https://github.com/ViktorsBaikers/DevRites/issues/208)) ([2e4fdb5](https://github.com/ViktorsBaikers/DevRites/commit/2e4fdb5178f2aa507ba565a70b3c2c86810cc5f7))
10
+
11
+ ## [7.3.4](https://github.com/ViktorsBaikers/DevRites/compare/v7.3.3...v7.3.4) (2026-11-03)
12
+
13
+ ### Fixed
14
+
15
+ * **devrites:** restore global frontier and authenticated updates ([#207](https://github.com/ViktorsBaikers/DevRites/issues/207)) ([05cb719](https://github.com/ViktorsBaikers/DevRites/commit/05cb7198330b7ffa4d7176fc8398ff5a86b13f45))
16
+
5
17
  ## [7.3.3](https://github.com/ViktorsBaikers/DevRites/compare/v7.3.2...v7.3.3) (2026-11-02)
6
18
 
7
19
  ### Fixed
@@ -34,9 +46,38 @@ All notable changes to DevRites are documented here. The format follows [Keep a
34
46
  parallel controller, with rolling landings and refills across workspace sources.
35
47
  - Prune clean integrated worker checkouts without discarding transfer branches,
36
48
  proof identities, retained lease rows, or running siblings.
37
-
38
- ### Fixed
39
-
49
+ - Add read-only `frontier [slug]` reporting across recorded live and archived
50
+ sequence workspaces, with scoped preparation/repair/wait actions, explicit
51
+ mixed-workspace selection, and ambiguous-source refusal. Source-local selection
52
+ exposes the frontier without silently admitting other workspaces.
53
+
54
+ ### Fixed
55
+
56
+ - Give an explicitly identified Autocomplete controller structural writer-admission
57
+ checks for actual successor preparation and source-qualified mixed reservations.
58
+ Surface fresh global scheduling after returns and prioritize unresolved global
59
+ work over local Build cursors, while preserving narrow disclosed deferrals,
60
+ standalone AFK, native review/proof, isolation and Ship approval.
61
+ - Accept one explicit decision-bound canonical sequence roadmap without rewriting
62
+ historical tables; reject ambiguous owners, stale identities and unsafe paths.
63
+ - Keep writer admission bound to immutable pending-lane paths, current controller
64
+ identity, disjoint active reservations and the effective global cap. Check the
65
+ complete writer allowlist against live foreign claims, including symlink
66
+ aliases, even when optional claim flags are absent or name unrelated paths.
67
+
68
+ - Use `GH_TOKEN`, then `GITHUB_TOKEN`, then optional bounded noninteractive GitHub
69
+ CLI credential lookup for release API requests. Keep credentials off release
70
+ assets and off-origin redirects, fail explicit invalid credentials, and document
71
+ headless login and rate-limit recovery without exposing tokens.
72
+ - Continue AFK from the narrow Vet-ready state and from actionable global native
73
+ preparation, preserving human gates, source cursors, and separate Ship approval.
74
+ - Allow independent refill and capacity reconciliation after a parallel integration
75
+ failure without clearing its failure status or weakening pending-landing,
76
+ control-tip, overlap, capacity, or proof guards.
77
+ - Enforce wright fanout and wider-batch guards even when a reslice review admits
78
+ another round window.
79
+ - Recover a completed dispatch wave's retained claim through an exact recorded
80
+ return handle after claim-release failure, without replaying result admission.
40
81
  - Confine question resolution to checked workspaces and restore question/cursor
41
82
  files together when publication fails. Bundle rollback now includes the failing
42
83
  target and reports incomplete restoration.
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.3`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v7.3.3): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
34
+ **Status:** [`v7.3.5`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v7.3.5): 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
 
@@ -273,6 +273,15 @@ no-recommendation questions still pause. When bounded recovery runs out,
273
273
  agents record a technical blocker instead of asking you. The full contract is
274
274
  in [`afk-hitl.md`](pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md).
275
275
 
276
+ `devrites-engine frontier [slug]` reports the recorded sequence across live and
277
+ archived workspaces without changing `ACTIVE`, creating workspaces, or launching
278
+ agents. It distinguishes preparation, repair, waiting, and completed work, and
279
+ prints an explicit mixed-workspace selection command when available. A source-local
280
+ `parallel select --from-plan` exposes that frontier but still selects only its own
281
+ workspace unless `--workspaces` is supplied. Native Autocomplete owns preparation
282
+ and semantic admission; the report is neither Build readiness nor Ship approval.
283
+ See the [frontier contract](docs/cli.md#sequence-frontier).
284
+
276
285
  ## Install, update, and remove
277
286
 
278
287
  ```bash
@@ -419,6 +428,17 @@ release assets. If an older engine reports `missing codex/hooks.json` or asks
419
428
  for `--source-dir`, use the npm or verified shell route once to reach a
420
429
  release with the self-contained updater.
421
430
 
431
+ GitHub release API authentication uses `GH_TOKEN`, then `GITHUB_TOKEN`, then an
432
+ optional, bounded, noninteractive `gh auth token --hostname github.com` lookup.
433
+ GitHub CLI is not required. Credentials go only to the exact GitHub API origin,
434
+ never release assets or off-origin redirects. Explicit invalid credentials fail
435
+ instead of silently falling back to another identity. For a headless machine,
436
+ run `gh auth login --hostname github.com --web` and complete its device-code flow
437
+ in a browser on another device. Do not paste credentials into commands, logs, or
438
+ support reports. `--force` controls managed-file replacement; it does not bypass
439
+ GitHub authentication or rate limits. If authentication does not clear a rate
440
+ limit, wait before retrying.
441
+
422
442
  `/rite-upgrade` is the separate, preservation-first route for reconciling an
423
443
  unfinished workspace; it never migrates cursor format or invents historical
424
444
  proof. `devrites-engine migrate` owns deterministic v5 schema normalization.
@@ -0,0 +1,87 @@
1
+ # ADR-0039: Structural admission for the native Autocomplete controller
2
+
3
+ - **Status:** Accepted
4
+ - **Date:** 2026-11-05
5
+
6
+ ## Context
7
+
8
+ Consumer traces showed a native Autocomplete controller repeatedly completing one
9
+ workspace while leaving recorded continuation preparation unstarted. A global
10
+ frontier report alone did not prevent subsequent local writer admission. The
11
+ controller also recognized a historical workspace rename without resolving the
12
+ conflict between the old roadmap table and current sequence identities.
13
+
14
+ ADR-0022 and ADR-0024 leave semantic scheduling and model dispatch with native
15
+ hosts. Replacing them with an engine agent bridge, persistent queue, scheduling
16
+ receipts, or heuristic interpretation of reviewer prose would create a second
17
+ orchestration authority. Existing dispatch and lease primitives already retain
18
+ observable preparation accounts, source-qualified reservations and write claims.
19
+
20
+ ## Decision
21
+
22
+ Narrow ADR-0022's native-scheduling boundary and ADR-0024's policy boundary only
23
+ for structural Autocomplete writer admission:
24
+
25
+ - Explicit native Autocomplete invocation records `mode: autocomplete` in AFK.
26
+ This identifies the controller; it grants no readiness, independence or Ship
27
+ permission. Standalone AFK without this mode retains its existing contract.
28
+ - Before admitting a new Build-wright wave at capacity greater than one, the
29
+ engine checks immediate successor preparation and the eligible mixed cohort.
30
+ Preparation is
31
+ represented by an actual pending native preparation account, current native
32
+ readiness, or a concrete retained hold. Creating a placeholder or printing a
33
+ frontier does not satisfy this boundary.
34
+ - A source may disclose a target-specific preparation constraint through
35
+ `frontier-blocked: <workspace> — <reason>` in its existing evidence ledger.
36
+ `sequence` names only unresolved historical sequence normalization. These rows
37
+ defer scheduling obligations; they never waive malformed authority, source
38
+ readiness, trust boundaries, writer claims, path/capacity limits or proof.
39
+ - An already-ready foreign slice requires an existing mixed lease reservation
40
+ or an exact source-qualified `serial:` rationale for ordered handoff. A local
41
+ serial reason or preparation deferral does not discharge foreign admission.
42
+ - A fresh global observation follows a committed dispatch return after mutation
43
+ and locks settle, even if later claim release fails; its nonzero failure and
44
+ claim exclusion remain. Rejected/unpersisted returns do not refresh. Global
45
+ obligations take continuation priority without rewriting local phase cursors
46
+ or recursively routing local-only work.
47
+ - One explicit canonical `roadmap.md`, bound to the actual sequence root and a
48
+ unique owner-local decision, may replace historical tables for scheduling.
49
+ History stays unchanged; duplicate authorities, malformed inputs, conflicting
50
+ current identities and invalid references fail closed. Native owners decide
51
+ whether the decision and scope are substantively approved.
52
+ - Initial admission freezes each pending writer lane's normalized allowlist in
53
+ existing dispatch metadata. Mutable tasks, reused batch labels or replacement
54
+ lease rows cannot move a retained actor's authority. Exact claim identity and
55
+ session remain required; claim release or expiry does not prove actor exit.
56
+ Returned/integrated siblings may free slots for rolling refill.
57
+
58
+ The engine does not invoke a model, create a native workspace, infer semantic
59
+ independence, judge a rationale's truth, bind a handle to an execution checkout,
60
+ or authorize publishing. Native hosts still execute preparation, dispatch exact
61
+ profiles, reconcile results and obey human and protected-validation gates.
62
+
63
+ ## Alternatives considered
64
+
65
+ | Option | Why rejected |
66
+ | --- | --- |
67
+ | More reminders and frontier reports only | The observed controller already had that guidance and still skipped preparation. |
68
+ | Automatically accept the newest table or rename prose | Recency and prose do not establish canonical identity or supersession. |
69
+ | Rewrite archived maps to match the current run | Destroys the historical decision rather than recording current authority. |
70
+ | Require every future workspace READY before any writer | Serializes preparation and creates cycles when future plans depend on current repair. |
71
+ | Engine-owned model scheduling, receipts or persistent queue | Duplicates host authority and exceeds the deterministic local boundary. |
72
+
73
+ ## Consequences
74
+
75
+ Skipping required preparation now refuses an observable writer-admission step
76
+ rather than remaining a narrative warning. Independent work can continue with a
77
+ disclosed specific constraint, without disguising deferred work as completed.
78
+ Canonical normalization has one machine-readable owner and does not require
79
+ altering old evidence or guessing workspace names.
80
+
81
+ This cannot prove that an arbitrary host obeys every instruction or that a native
82
+ account represents real semantic progress. Runtime claims therefore distinguish
83
+ structural admission, recorded native launches, and actual host behavior.
84
+
85
+ Guard tests: `engine/internal/lib/frontier_controller_test.go`,
86
+ `engine/internal/lib/frontier_roadmap_test.go`, and
87
+ `engine/tests/autocomplete_global_test.go`.
@@ -84,3 +84,4 @@ architecture; per-feature `decisions.md` files stay scoped to that feature.
84
84
  | [0036](0036-archive-recall-is-a-read-time-query.md) | Archive recall is a read-time query | Accepted; consistent with 0014/0022 (no engine index or store) | `engine/internal/lib/recall_test.go` |
85
85
  | [0037](0037-autocomplete-lands-local-checkpoints.md) | Autocomplete lands local checkpoints and self-resolves own scratch | Accepted; supersedes the ADR-0022 local-commit approval clause | `tests/authority-drift-test.sh` |
86
86
  | [0038](0038-engine-flags-unattributed-root-edits.md) | The engine flags unattributed root edits | Accepted; narrows the ADR-0018 no-replacement-enforcement clause for root-edit attribution | `engine/internal/lib/treebaseline_test.go` |
87
+ | [0039](0039-autocomplete-structural-admission.md) | Structural admission for native Autocomplete | Accepted; narrowly amends 0022/0024 for observable writer admission, retains native dispatch and semantic authority | `engine/internal/lib/frontier_controller_test.go`, `engine/internal/lib/frontier_roadmap_test.go`, `engine/tests/autocomplete_global_test.go` |
package/docs/cli.md CHANGED
@@ -43,6 +43,7 @@ devrites-engine observe summary <slug>
43
43
  devrites-engine orient <slug>
44
44
  devrites-engine observe slice <slug> <SLICE-ID>
45
45
  devrites-engine next [slug]
46
+ devrites-engine frontier [slug]
46
47
  devrites-engine handoff [slug] [--resume]
47
48
  devrites-engine recall --paths <p1,p2,...> [--limit n]
48
49
  devrites-engine context [slug] (--phase <p>|--skill <name>) [--role <r>] [--whole]
@@ -90,6 +91,21 @@ downloading assets. `--source-dir` and `--payload-dir` remain the advanced local
90
91
  update path for npm, shell, source-checkout, and test callers; a local `--check`
91
92
  needs only `--source-dir`.
92
93
 
94
+ Release metadata requests to the exact HTTPS `api.github.com` origin use the
95
+ first available credential: `GH_TOKEN`, then `GITHUB_TOKEN`, then optional
96
+ `gh auth token --hostname github.com`. The helper is noninteractive, bounded to
97
+ three seconds and 4 KiB of output; missing, failed, timed-out, or oversized helper
98
+ output does not prevent an unauthenticated request. GitHub CLI is not required.
99
+ An explicitly supplied invalid credential fails; the updater does not silently
100
+ retry under another identity. Credentials are never sent to release assets or
101
+ off-origin redirects. Same-origin GitHub API redirects may retain them.
102
+
103
+ On a headless machine, run `gh auth login --hostname github.com --web`, then use
104
+ the displayed device code in a browser on another device. Do not put credential
105
+ values in commands, examples, logs, or support reports. `--force` permits
106
+ managed-file replacement, not authentication or rate-limit bypass. Authenticated
107
+ requests can still be rate-limited; wait before retrying when necessary.
108
+
93
109
  ## npm adapter
94
110
 
95
111
  The `npx devrites` adapter accepts `add` as an alias for `install`, `upgrade` for
@@ -153,12 +169,17 @@ self-contained updater.
153
169
  slice checkpoint or phase advance, and treat `BLOCKED` at Seal as NO-GO.
154
170
  Never use automatic updates to hide an unreconciled regression.
155
171
  - `check continuation [slug]` prints `continuation: required` and
156
- `invoke: <next_action>` when `.devrites/AFK` is present, `status` is
157
- `running`, no question cursor is set, no blocking or escalating question is
158
- open, and `next_action` is an internal phase command (`/rite-vet`,
159
- `/rite-build`, not `/rite-ship`). Otherwise it prints `continuation: clear`.
160
- Exit `0` either way: `required` means invoke that command, not pause for a
161
- human. `handoff` prints the same lines.
172
+ `invoke: <next_action>` when `.devrites/AFK` is a regular file, `status` is
173
+ `running` (or specifically `phase=vet,status=ready`), no question cursor is
174
+ set, no blocking or escalating question is open, and `next_action` is a valid
175
+ internal phase command, not `/rite-ship`. Other ready statuses do not inherit
176
+ this exception. It also reports the sequence frontier: when the local cursor
177
+ is clear but related work needs native preparation, it can print
178
+ `continuation: required` with `invoke: /rite-autocomplete` and the original
179
+ source identity. Waiting, human-blocked, or completed work alone does not
180
+ require continuation. Neither result authorizes Ship, overrides a human gate,
181
+ or declares an unvetted workspace Build-ready. Successful verdicts exit `0`;
182
+ malformed or ambiguous state fails visibly. `handoff` prints the same lines.
162
183
  - `check drift <slug>` attributes readiness-input drift to the exact artifact.
163
184
  `--record` snapshots per-input SHA-256 digests into `readiness-inputs.json`
164
185
  under the feature lock after Vet records the aggregate binding; a later
@@ -192,7 +213,9 @@ self-contained updater.
192
213
  and exits `3` naming the holder when a live claim by another session covers a
193
214
  path; `release --session <id> --id <claim>` frees it; `list [--all]` shows
194
215
  live (or all) claims; `check [--session <id>] <path>...` is the read-only
195
- preflight. Each claim records its host and the claiming session's long-lived
216
+ preflight. Conflict checks cover logical paths and physical symlink aliases;
217
+ unresolved physical paths fail closed. Same-session allocation stays exempt.
218
+ Each claim records its host and the claiming session's long-lived
196
219
  processes; when all of them have exited on this host, `list` shows the claim
197
220
  `dead` and it no longer conflicts. Other hosts or an unavailable `ps` never
198
221
  prove exit. Claims coordinate concurrent same-tree sessions; they never
@@ -231,6 +254,158 @@ checked by the root's explicit native re-read checklist. Repository build,
231
254
  test, lint, typecheck, schema, and release commands belong to that repository
232
255
  or CI.
233
256
 
257
+ ## Sequence frontier
258
+
259
+ `devrites-engine frontier [slug]` is a read-only structural report across the
260
+ source's recorded sequence. An explicit slug may name a live or archived
261
+ workspace. Without one, the command uses the selected source; if `ACTIVE` is
262
+ absent, recovery requires a unique archived terminal sequence tip with an exact
263
+ recorded native `/rite-spec <next>` edge. Multiple possible sources fail as ambiguous;
264
+ folder names and numeric suffixes are not authority.
265
+
266
+ The report emits:
267
+
268
+ - `frontier: actionable|waiting|blocked|clear`, or `frontier: none` for a
269
+ non-sequence source.
270
+ - `frontier-source: <slug>` and `frontier-workspace:` rows naming each related
271
+ workspace's `location=live|archive|missing`, `action=inspect|prepare|repair|wait|complete`,
272
+ and reason. Archived intermediaries do not hide live descendants, and archived
273
+ workspaces never become writer candidates.
274
+ Running or execution-unknown dispatch roles wait; completed writer returns
275
+ without durable acceptance require native inspection, not another writer launch.
276
+ - `frontier-select-command:` with an explicit `parallel select --from-plan
277
+ --workspaces ...` command when a live controller is available. Selection still
278
+ enforces current readiness, recorded dependencies and independence, retained
279
+ leases, path conflicts, and the repository-wide capacity. `frontier-picks:`
280
+ names eligible source-qualified slices; `frontier-selection: blocked` names a
281
+ selection refusal. These are observations, not writer launches.
282
+ The explicit pool excludes retained dispatch and human/question/scope-held
283
+ sources; their workspace rows remain visible. `--workspaces` is the exact
284
+ candidate list; `--slug` identifies the controller, not an implicit candidate.
285
+ Legacy per-source slice counters never reduce the global writer cap or exclude
286
+ independent children; recorded workspace-opening limits still apply.
287
+ - `frontier-prepare:` for a recorded next Spec cursor or an unambiguous next entry
288
+ in an exact position/workspace table, or `frontier-review-sequence:` artifact
289
+ paths when remaining work or conflicting sequence maps require native review.
290
+ - `frontier-authority: <artifact-path>,...` identifies actual files supplying a
291
+ valid nonempty scheduling map. For explicit canonical authority it names the
292
+ owning `roadmap.md` and same-owner `decisions.md`; legacy maps list their actual
293
+ artifacts without claiming canonical status.
294
+
295
+ Relations come from exact recorded `sequence_parent` edges, not name prefixes.
296
+ Conflicting identities, cycles, malformed related state, or invalid declared
297
+ sequence positions are refused. Missing or stale planning is a repair action,
298
+ not permission to build. Continuation flags and remaining counts constrain new
299
+ workspace preparation without silently discarding existing children.
300
+ Conflicting or amended sequence maps suppress missing-workspace preparation even
301
+ with a recorded Spec cursor until native authority normalization resolves them;
302
+ valid existing live descendants remain visible and eligible for guarded selection.
303
+
304
+ An optional `roadmap.md` becomes current scheduling authority when it contains
305
+ either `Sequence root:` or `Decision:`. Both headers are then required:
306
+
307
+ ```markdown
308
+ Sequence root: actual-anchor-slug
309
+ Decision: DEC-017
310
+
311
+ | Position | Workspace |
312
+ | --- | --- |
313
+ | 1 | actual-anchor-slug |
314
+ | 2 | actual-renamed-child |
315
+ ```
316
+
317
+ Exactly one related live or archived workspace may own this explicit map.
318
+ `Decision: DEC-NNN` must identify exactly one `## DEC-NNN` heading in that
319
+ owner's `decisions.md`; the root must match the actual chain anchor. Exactly
320
+ one table must have contiguous positions from 1 and unique valid workspace
321
+ slugs, matching every related recorded position and exact successor. Folder
322
+ numbering, prose amendments, and unenrolled workspaces confer no authority.
323
+ A valid explicit map supersedes historical tables in `decisions.md`, `spec.md`,
324
+ and headerless `roadmap.md` for scheduling only; preserve those historical bytes.
325
+ Without either header, `roadmap.md` retains conservative legacy parsing.
326
+ Partial/malformed headers, multiple owners, invalid root/decision/table, or a
327
+ symlink/unreadable explicit map fail closed without legacy fallback. Use native
328
+ authority normalization to record the approved actual identities while retaining
329
+ history. Structural validation establishes identity, not semantic approval,
330
+ independence, Build readiness, or Ship permission.
331
+
332
+ Under AFK, `next`, `handoff`, and `check continuation` expose the same frontier.
333
+ A source-local `parallel select --from-plan` without `--workspaces` also prints
334
+ the report to stderr, preserving its machine-readable selection on stdout and
335
+ source-local picks: reporting another workspace never silently admits it.
336
+ Native Autocomplete must inspect returned preparation/review actions and read
337
+ the exact `frontier-authority:` paths plus recorded restrictions before invoking
338
+ Spec/Plan/Vet or mixed selection. This read is required even when the owner is an
339
+ archived ancestor or another related workspace outside the local read-next bundle.
340
+ Path disjointness alone establishes neither semantic independence nor permission
341
+ to lift a planning-only restriction.
342
+
343
+ ### Autocomplete controller admission
344
+
345
+ The existing `/rite-autocomplete` invocation writes or upserts `mode: autocomplete`
346
+ in `.devrites/AFK`; no extra flag is needed. It preserves other sentinel fields
347
+ unless an explicit `--parallel N` changes capacity. Mode identifies the native
348
+ controller, not authorization. Standalone AFK without mode retains its behavior;
349
+ duplicate or invalid mode requires normalization rather than silently disabling
350
+ the controller gate.
351
+
352
+ With controller mode and global capacity above one, a new Build wright
353
+ `dispatch open` checks structural global scheduling before writing claims, history,
354
+ or a round. It checks one immediate recorded successor per admitted source, not
355
+ the whole future sequence:
356
+
357
+ - Missing permitted successor: start its native Spec/Plan/Vet preparation and
358
+ retain actual launched planning/review handles before admitting the writer.
359
+ - Existing successor: require pending preparation handles, a current native
360
+ Build-ready binding, or its concrete human/dependency hold. A placeholder
361
+ state/spec or a prose claim that preparation happened is insufficient.
362
+ - Opted-out or exhausted future opening and source human/question holds do not
363
+ invent new preparation obligations. Unresolved sequence authority requires
364
+ native normalization.
365
+
366
+ For a concrete preparation constraint, retain
367
+ `frontier-blocked: <successor-slug> — <specific constraint>` in the source's
368
+ `evidence.md`. For unresolved historical normalization on otherwise-valid local
369
+ work use `frontier-blocked: sequence — <specific constraint>`. These deferrals
370
+ remain visible for native review; they grant no approval, readiness, or claim
371
+ that normalization succeeded. Neither waives malformed canonical authority,
372
+ invalid AFK/path/readiness/security checks, or already-ready foreign Build.
373
+ A generic local `serial: SLICE-002 — <reason>` does not waive cross-workspace
374
+ preparation. A discharged deferral does not repeatedly trigger controller work.
375
+
376
+ Ready independent foreign sources must participate in explicit repository-wide
377
+ mixed selection and lease capacity/path reservations. Reserve the cohort with
378
+ `parallel create/add`; source waves may then open separately. A concrete
379
+ `serial: other-workspace/SLICE-001 — <constraint>` can retain an ordered handoff
380
+ for that exact foreign pick; an unqualified local serial reason cannot silently
381
+ omit it. This does not waive successor preparation or readiness, dependencies,
382
+ runtime/path isolation, actor claims, or reviewer/proof windows.
383
+ Dispatch `controller_batch` is an opaque cohort-instance admission identity,
384
+ recording initial whole-wave, source-qualified live-lease admission, never proof
385
+ of actor checkout, cwd, or runtime profile. Immutable `admitted_paths` snapshots
386
+ retain each pending writer lane's normalized allowlist. Missing snapshots or
387
+ changed reservations require actor reconciliation; mutable tasks cannot backfill
388
+ authority. Returned/integrated siblings may release slots for rolling refill.
389
+ Exact claim identity/session remains required; release or expiry does not stop
390
+ an actor. Retained unbound or other-cohort writers hold new actors; later lease
391
+ IDs cannot retrofit them. Native exact cwd/profile checks remain required.
392
+ Unsupported isolation permits truthful local-owner serial work and normal
393
+ ordered handoff, never an early same-tree foreign writer.
394
+
395
+ Controller continuation prioritizes actionable global normalization, preparation,
396
+ and foreign work over a direct local Build invocation while preserving the local
397
+ phase cursor. Local-only ready work does not recursively invoke Autocomplete.
398
+ After a committed dispatch return, a fresh global scheduling result resurfaces
399
+ the next obligation—even if later claim release fails; its nonzero failure and
400
+ claim exclusion remain. Rejected or unpersisted returns do not refresh.
401
+ Ordinary status reads remain read-only. Protected reviewer/proof windows defer
402
+ unsafe landing, not independent planning. No such transition invokes Ship or
403
+ launches a model through the engine.
404
+
405
+ The engine does not invoke models, create workspaces, change `ACTIVE`, resolve
406
+ semantic authority, or grant Ship approval. These outputs guide the native host;
407
+ they cannot guarantee that an arbitrary host follows the workflow.
408
+
234
409
  ## Acceptance ledger
235
410
 
236
411
  `gates` operates the `gates.md` ledger inside a feature workspace: one gate per
@@ -41,8 +41,8 @@ The Go surface is intentionally closed and deterministic:
41
41
 
42
42
  | Lane | Commands | Owner |
43
43
  |---|---|---|
44
- | Candidate and deterministic checks | `check candidate`, `check readiness [--emit-binding]`, `check preconditions <slug> [--slice <SLICE-ID>]`, `check seal`, `check slice <slug> <SLICE-ID>`, `check task-graph`, `check regression <slug> [--update]`, `check continuation [slug]`, `check drift <slug> [--record]`, `check windows <slug>`, `check dup`, `check path-disjoint`, `parallel select`, `check skill-trust`, `check indexes`, `detect commands [--root <dir>] [--json]` | Candidate validates/hashes the strict project manifest; readiness checks phase files, the required `tasks.md` slice graph, or emits the vetted Build-input binding; `check preconditions` runs the `test-plan.md` preflight rows whose `Run at` is `vet` (or `pre-dispatch <SLICE>`) with candidate-bound transcripts; seal checks final files/open gates, that graph and binding, then exact candidate bindings. `check slice` preflights one slice before wright dispatch — contract present, exact Writer allowlist paths, `Satisfies` AC ids resolvable, bounded scope — so a malformed slice fails before a writer context is spent. `check indexes` reports install manifest and optional code-index directory presence as JSON. `parallel select` returns the greedy path-disjoint subset ≤ cap from the supplied ready slices, or with `--from-plan` from tasks.md slices whose dependencies state.md checks built. `check regression` compares current workspace progress against the durable `regression-baseline.json` high-water mark and `--update` ratchets it at a checkpoint, so a lost slice, unchecked criterion, or reopened question fails closed instead of passing silently. `check continuation` prints `required` and the phase command to invoke when AFK, `status=running`, and `next_action` is an internal phase edge; `clear` otherwise. Exit 0 either way. `handoff` prints the same lines. `check windows` scans the feature diff for newly introduced deferral markers (TODO/FIXME/skipped test/stub idioms) and fails when any lacks a `windows.md` waiver row — silent deferrals block the seal. `check dup` reports advisory near-duplicate clusters that survive renaming (normalized token shingles, transitive clusters, distance-boosted rank, `*`-marked diff overlap, stable content hashes, `.devrites/dup-ignore` dismissal ledger) — leads for reviewer triage, never a gate. `check drift` attributes readiness-input drift to the exact artifact: `--record` snapshots per-input SHA-256 digests into `readiness-inputs.json` under the feature lock, and a later compare names each `changed`/`missing`/`added` input (falling back to the aggregate `eng-review.md` binding plus mtime candidates when no baseline exists) so a stale-binding repair starts at the right file — advisory, never a gate. `detect commands` resolves the repository's own test/lint/vet/build commands (Makefile targets, then `package.json` scripts, then language-manifest fallbacks, plus the lockfile-derived package manager) so `gates.md` `CHECK` lines and proof steps cite real wiring instead of invented commands — read-only, no installs, no execution. |
45
- | Workspace observation | `observe summary`, `orient`, `observe slice <slug> <SLICE-ID>`, `next`, `handoff` | JSON workspace snapshot for agents (cursor, task graph, `artifact_budgets`, `bulk_files`); `orient` is an alias for `observe summary`. `observe slice` prints one `SLICE-###` section of `tasks.md` so Build reads a slice, not the file. `next` prints the minimal remaining lifecycle path plus advisory skips (e.g. clarify at zero open questions). `handoff` emits the deterministic resume record (cursor, `awaiting_human`, blocking question gates, ledger reduction with unmet/stale ids, dead ends, read-next order, continuation verdict) — the `/rite-handoff` spine and compaction-fallback entry. |
44
+ | Candidate and deterministic checks | `check candidate`, `check readiness [--emit-binding]`, `check preconditions <slug> [--slice <SLICE-ID>]`, `check seal`, `check slice <slug> <SLICE-ID>`, `check task-graph`, `check regression <slug> [--update]`, `check continuation [slug]`, `check drift <slug> [--record]`, `check windows <slug>`, `check dup`, `check path-disjoint`, `parallel select`, `check skill-trust`, `check indexes`, `detect commands [--root <dir>] [--json]` | Candidate validates/hashes the strict project manifest; readiness checks phase files, the required `tasks.md` slice graph, or emits the vetted Build-input binding; `check preconditions` runs the `test-plan.md` preflight rows whose `Run at` is `vet` (or `pre-dispatch <SLICE>`) with candidate-bound transcripts; seal checks final files/open gates, that graph and binding, then exact candidate bindings. `check slice` preflights one slice before wright dispatch — contract present, exact Writer allowlist paths, `Satisfies` AC ids resolvable, bounded scope — so a malformed slice fails before a writer context is spent. `check indexes` reports install manifest and optional code-index directory presence as JSON. `parallel select` returns the greedy path-disjoint subset ≤ cap from the supplied ready slices, or with `--from-plan` from tasks.md slices whose dependencies state.md checks built; source-local selection reports the sequence frontier without silently admitting other workspaces. `check regression` compares current workspace progress against the durable `regression-baseline.json` high-water mark and `--update` ratchets it at a checkpoint, so a lost slice, unchecked criterion, or reopened question fails closed instead of passing silently. `check continuation` prints `required` and the phase command when AFK, `status=running` (or specifically `phase=vet,status=ready`), and an internal phase edge passes human/question guards; actionable global preparation may instead require `/rite-autocomplete`, never Ship authorization. Successful `required`/`clear` verdicts exit 0; malformed or ambiguous state fails visibly. `handoff` prints the same lines. `check windows` scans the feature diff for newly introduced deferral markers (TODO/FIXME/skipped test/stub idioms) and fails when any lacks a `windows.md` waiver row — silent deferrals block the seal. `check dup` reports advisory near-duplicate clusters that survive renaming (normalized token shingles, transitive clusters, distance-boosted rank, `*`-marked diff overlap, stable content hashes, `.devrites/dup-ignore` dismissal ledger) — leads for reviewer triage, never a gate. `check drift` attributes readiness-input drift to the exact artifact: `--record` snapshots per-input SHA-256 digests into `readiness-inputs.json` under the feature lock, and a later compare names each `changed`/`missing`/`added` input (falling back to the aggregate `eng-review.md` binding plus mtime candidates when no baseline exists) so a stale-binding repair starts at the right file — advisory, never a gate. `detect commands` resolves the repository's own test/lint/vet/build commands (Makefile targets, then `package.json` scripts, then language-manifest fallbacks, plus the lockfile-derived package manager) so `gates.md` `CHECK` lines and proof steps cite real wiring instead of invented commands — read-only, no installs, no execution. |
45
+ | Workspace observation | `observe summary`, `orient`, `observe slice <slug> <SLICE-ID>`, `next`, `frontier [slug]`, `handoff` | JSON workspace snapshot for agents (cursor, task graph, `artifact_budgets`, `bulk_files`); `orient` is an alias for `observe summary`. `observe slice` prints one `SLICE-###` section of `tasks.md` so Build reads a slice, not the file. `next` prints the minimal remaining lifecycle path plus advisory skips (e.g. clarify at zero open questions). `frontier` reports recorded live/archive sequence relations, scoped actions, explicit mixed selection, and native preparation/review needs without changing ACTIVE or admitting writers; ambiguous source recovery refuses. Under AFK, `next` and `handoff` expose the same frontier while retaining the source cursor. `handoff` emits the deterministic resume record (cursor, `awaiting_human`, blocking question gates, ledger reduction with unmet/stale ids, dead ends, read-next order, continuation verdict) — the `/rite-handoff` spine and compaction-fallback entry. |
46
46
  | Context packets, dispatch waves, metrics, claims, notes | `context [slug] (--phase <p> \| --skill <name>) [--role <r>] [--trigger a,b]`, `dispatch <slug> <open\|start\|seal\|return\|status\|abandon>`, `candidate freeze`, `packet`, `metrics record`, `metrics summary`, `claim <add\|release\|list\|check>`, `note <add\|list\|check\|rm>` | `context` emits one deduplicated read-set bundle per phase/role/skill from each skill's `loads:` manifest — a dispatch target reads it instead of selecting files; `--skill` works without a workspace when `--out` is given. `dispatch` owns the launch-wave barrier (seal needs a handle per role; return needs seal; the last start seals; open --claim-session/--claim takes the wave's file claim, released by the completing return or abandon --release) and auto-records dispatch/return metrics. `candidate freeze` writes a wave's frozen `packets/<w>.diff` + `.sha256`; `packet` renders and lints one role's by-reference packet. `metrics` owns the append-only `metrics.jsonl` ledger. `claim` owns the append-only `.devrites/claims.jsonl` ledger — advisory, session-scoped file claims with TTL so concurrent same-tree sessions see each other's write intent before edits collide (conflict exits 3; never a substitute for one-writer-per-worktree). `note` owns the anchored `notes.md` ledger — notes bound to verbatim code quotes, regraded `exact`/`moved`/`stale`/`ambiguous`/`lost` as the code drifts; `check seal` refuses non-`exact` anchors. `check diff-scope` is the mechanical changed-paths ⊆ allowlist gate run before reviewer dispatch. |
47
47
  | Atomic workspace state | `state resolve`, `state merge-manifest`, `state apply-bundle <slug> <bundle.json>... [--dry-run]`, `state set <slug> key=value... [--unset key]`, `state append <slug> <ledger.md> --heading <text> --body-file <path\|->`, `state close`, `migrate [--dry-run] [--answer id=choice]` | Go owns answer/drop/batch resolution, the recorded predecessor-chain manifest union for a release milestone, the all-or-nothing apply of plan-drafter hunk bundles (base-hash pins, unique non-overlapping anchors, no lost IDs, no new task-graph or budget defect, no appended dated delta section), cursor writes (known phase, engine-owned schema, no return-cursor overwrite; an AFK pause names auto-pickable questions), append-only ledger sections that refuse a duplicate heading, transactional close, and fail-closed v5 schema normalization. |
48
48
  | Acceptance ledger | `gates scaffold`, `gates status`, `gates run [--timeout N]`, `gates reverify [--timeout N]`, `gates lint [--strict]`, `gates precheck <slug> --worktree <path> [--slice <SLICE-ID>]`, `gates attest <id> <note>`, `gates abandon <id> <why>` | Go owns the `gates.md` ledger: per-outcome gates whose runnable `CHECK`/`CWD` must exactly match a `test-plan.md` Build-entry preflight row, evidence bound to the gate definition digest (stale = unmet), `ABANDON:` handoffs, oracle lint, and the wright's never-evidence `precheck` of `RUN: writer` gates. Readiness/seal require a parse-clean, all-met ledger whenever `gates.md` is a required artifact. |
@@ -9,7 +9,7 @@ workflow strategy.
9
9
  | Command | Deterministic responsibility |
10
10
  | --- | --- |
11
11
  | `install [flags]` | Install manifest-owned host artifacts and the optional shared binary. |
12
- | `update [flags]` | Refresh an existing managed installation. |
12
+ | `update [flags]` | Refresh an existing managed installation. Release API authentication uses `GH_TOKEN`, then `GITHUB_TOKEN`, then optional bounded noninteractive `gh auth token --hostname github.com`; explicit invalid credentials fail. Never sends credentials to assets or off-origin redirects. `--force` does not bypass rate limits. See [release authentication](../cli.md#updates). |
13
13
  | `uninstall [flags]` | Remove managed artifacts while preserving runtime workspace state. |
14
14
  | `check candidate <slug>` | Validate the strict manifest and compute the content-bound project-candidate identity. Exits `3` when the manifest omits a path the feature's `WIP(<slug>):` checkpoint commits changed (net from the feature base to HEAD). Also exits `3` with `unattributed root edit: <paths>` while the feature's `tree-baseline.json` tripwire flags a product path (ADR-0038; see `dispatch`). |
15
15
  | `check readiness <slug>` | Check target-Phase files, open human gates from Clarify onward, the `tasks.md` slice graph when that artifact is required, canonical `AC-###` presence in `tasks.md`/`test-plan.md` when those artifacts are required, and the current stable Build-input binding when applicable. Leaving Vet with a `Run at` column, a slice whose `Files likely touched`/`Writer allowlist` names a dependency manifest or lockfile needs a `dependency-dry-run SLICE-###` row at `vet` with a passing transcript. Leaving Vet, every slice `state.md` does not check built (a deferred `Satisfies: none` slice excepted) must also pass the Build-entry `check slice` contract; each failure prints one `invariant: slice-check:` line naming the slice and its exact `check slice` reason, to fix in `/rite-plan` before READY. |
@@ -17,11 +17,11 @@ workflow strategy.
17
17
  | `check preconditions <slug> [--slice SLICE-###] [--timeout N]` | Run the `test-plan.md` Build-entry preflight rows whose optional `Run at` cell is `vet` (with `--slice`, `pre-dispatch <SLICE>`); `action` rows and rows without the cell never run. Writes one candidate-bound transcript per row under `references/gates/preflight-*/`; a row passes on exit 0. A `pre-dispatch` row whose newest transcript passed is kept, not re-run: it is a pre-edit baseline, so a re-dispatch never runs it against the slice's own edits; changing its command or cwd retires the pass. Exit `3` on any failure or an invalid `Run at` value. |
18
18
  | `check seal <slug>` | Check files required by target Phase `seal`, open human gates, the `tasks.md` slice graph, canonical `AC-###` presence when `tasks.md`/`test-plan.md` are required, the stable Build-input binding, and exact candidate bindings. `check readiness` and `check seal` also block a `scripts/` test driver that a tasks.md Writer allowlist plans or touched-files.md lists when no gates.md `CHECK` runs it and no `Driver waiver: <path> — DEC-### <reason>` line cites a recorded decision; waived drivers print as `note: unexecuted driver (waived by DEC-###): <path>` lines, on pass or block. |
19
19
  | `check path-disjoint [--root <dir>] [<json-file> | -]` | Verify slice path sets are pairwise disjoint. |
20
- | `parallel select --cap <1-10> [--root <dir>] [--slug <controller>] [--from-plan [--workspaces <slug,...>] \| <json-file> \| -]` | Choose a plan-order path-disjoint ready subset, seeded by all retained repository-controller slots and paths. `--from-plan` uses canonical built checkpoints, local and declared workspace producer dependencies, exact write sets and required dependency manifests. The internal `--workspaces` data-source parameter pools recorded forward continuations with current readiness and explicit native-vetted per-slice declarations; blocked/stale/missing candidates print scoped notices without hiding other ready work. Foreign identities print `<workspace>/<slice>`. |
20
+ | `parallel select --cap <1-10> [--root <dir>] [--slug <controller>] [--from-plan [--workspaces <slug,...>] \| <json-file> \| -]` | Choose a plan-order path-disjoint ready subset, seeded by all retained repository-controller slots and paths. `--from-plan` uses canonical built checkpoints, local and declared workspace producer dependencies, exact write sets and required dependency manifests. Without `--workspaces`, it also reports the full recorded sequence frontier but keeps source-local picks; other workspaces are never silently admitted. The explicit `--workspaces` data-source parameter pools recorded forward continuations with current readiness and explicit native-vetted per-slice declarations; blocked/stale/missing candidates print scoped notices without hiding other ready work. Foreign identities print `<workspace>/<slice>`. |
21
21
  | `parallel <create\|add\|integrate\|prune\|cleanup\|status\|abort\|lease-read\|lease-write\|lease-clear\|record-green>` | One repository controller owns isolated workers across source workspaces. `create` accepts a single initial worker; `create`/`add --cap N` persist the global admission capacity. Explicit `add --cap N --json -` with stdin `[]` updates capacity only; lowering below active count refuses without canceling workers. A completed retained lease can refill at unchanged control tip. `record-green` and per-slice `integrate --slice <workspace/id> --apply-to-control` target source-qualified lanes (bare IDs mean controller lanes); integration keeps exact ancestry/path/dirty-work checks and lands `WIP(<source>):`. `prune` removes only verified clean integrated checkouts, retaining branches, proof identities, lease rows and controller. Status exposes the retained controller and pending landing; cleanup preserves salvage/unknown work. |
22
22
  | `check task-graph <slug>` | Validate `tasks.md` slice dependency graph for cycles, unknown deps, malformed tokens, duplicate IDs, missing `Dependencies`, and `depends_on` mismatch. Prints a non-blocking `ADVISORY size:` line (and records a `size-advisory` metric) for each slice with 12+ Writer allowlist files and no `Size rationale:`. A `Dependencies` ID may carry a `(via <interface>)` suffix (empty or unclosed is a malformed token); prints a non-blocking `ADVISORY edge:` line (and records an `edge-advisory` metric) for each edge with no via, or whose via text is not a case-insensitive substring of the dependency's `Consumes / Produces:`. Prints `schedule: <n> slices in <r> build rounds at cap 10` (the `/rite-build` batch selection replayed over each slice's Writer allowlist, else Files likely touched, plus the manifest parallel select reserves; omitted when a slice has no path) and a non-blocking `ADVISORY hub:` line (top five; records a `hub-advisory` metric) for each path, compared case-folded, that three or more slices without `Serial rationale:` write. Advisories print only when the graph is valid. |
23
23
  | `check regression <slug> [--update [--allow-empty]]` | Compare the workspace's structural progress facts (phase ordinal, checked ACs, met/abandoned gates, done slices, resolved questions, present artifacts) against the recorded `regression-baseline.json` high-water mark. Ordinary checks block lost facts without changing the baseline. `--update` records the current facts under the feature lock and prints each blessed regression; a deliberate owner-authorized repair checkpoint can accept a backward phase as the new baseline. Removing every checked AC and met gate also requires `--allow-empty`. Never automatically bless an unreconciled regression. |
24
- | `check continuation [slug]` | Print whether an armed AFK run must invoke its cursor instead of replying. `continuation: required` plus `invoke: <next_action>` when `.devrites/AFK` is a regular file, `status` is `running`, `question_id` is empty, no blocking or escalating question is open, and `next_action` is an internal phase command (`/rite-spec` through `/rite-seal`, including `/rite-plan`, not `/rite-ship` or `/rite-autocomplete`). Otherwise `continuation: clear` with a one-line `reason`. Exit `0` either way. `handoff` prints the same lines. |
24
+ | `check continuation [slug]` | Print whether an armed AFK run must invoke its cursor instead of replying. `continuation: required` plus `invoke: <next_action>` requires a regular `.devrites/AFK`, `status=running` or specifically `phase=vet,status=ready`, empty `question_id`, no blocking/escalating question, and a valid internal phase command (`/rite-spec` through `/rite-seal`, including `/rite-plan`, not `/rite-ship` or `/rite-autocomplete`). Also emits the sequence frontier; a clear local cursor with actionable global preparation can require `invoke: /rite-autocomplete` while preserving the source identity. Waiting, human-blocked, or completed work alone does not require continuation. Neither route authorizes Ship or bypasses human/readiness gates. Successful `required`/`clear` verdicts exit `0`; malformed or ambiguous state fails visibly. `handoff` prints the same lines. |
25
25
  | `check drift <slug> [--record]` | Attribute readiness-input changes to the exact artifact. `--record` writes the per-input `readiness-inputs.json` digest baseline under the feature lock; without it the workspace diffs current inputs against that baseline (or falls back to the aggregate binding recorded in `eng-review.md`). Advisory: exit `0` on drift; a corrupt baseline exits `3`. A `test-plan.md` change limited to exact `Workflow Artifact reviewed identity: <64hex>` lines is reported as `reviewed-identity-only` (ADR-0034). `--record` also stores each slice's proof bytes (its `tasks.md` block plus the `test-plan.md` lines naming it); both modes print `ADVISORY proportion:` for a slice whose proof grew over 2x since that baseline or carries over 3x the median proof per AC. |
26
26
  | `check windows <slug> [--worktree\|--staged\|--base <ref>\|--since-dispatch <wave>]` | Fail on deferral and bar-lowering markers the change introduces without a waiver row in the workspace's `windows.md`: added TODO/FIXME/XXX/HACK, skipped/focused-test and stub idioms, checker suppressions, one-line empty catch; removed `deleted-test` files and net `removed-assertion` lines in remaining test files. `--since-dispatch <wave>` reports only `deleted-test`/`removed-assertion` against the work-tree snapshot (`tree` in `dispatch.json`) recorded when that build wright wave opened, untracked files included; it takes no `--cwd` and records the `windows-since` metric. |
27
27
  | `check dup [slug] [--all\|--worktree\|--staged\|--base <ref>] [--min-lines n] [--threshold f] [--ignore-file <path>] [--limit n] [--exclude <csv>]` | Report near-duplicate code clusters that survive comment stripping, literal collapsing, and identifier renaming — token-shingle matches chained into segments, clustered transitively, ranked with bounded path/line-distance boosts. Diff modes mark units overlapping changed hunks with `*`; stable content-derived cluster hashes let `.devrites/dup-ignore` dismissals survive line moves but resurface on structural edits. Staged mode reads index blobs and excludes untracked files. Bounded heuristic: successful scans/leads exit `0`; usage, unavailable input, and partial scans exit `2`. |
@@ -35,6 +35,7 @@ workflow strategy.
35
35
  | `orient <slug>` | Alias for `observe summary`. |
36
36
  | `observe slice <slug> <SLICE-ID>` | Print one `SLICE-###` section of `tasks.md` so Build reads a slice, not the file. |
37
37
  | `next [slug]` | Print the minimal remaining lifecycle path plus advisory skips; in Build also `eligible_now:`, `batch:` and the `select-command:` (`parallel select --root <project> --slug <slug> --cap N --from-plan`, N = AFK max_parallel else 10) that reproduces the batch. Prints `blocked: unattributed root edit: ...` after `open-questions:` and exits `3` while the ADR-0038 tripwire flags a product path; the rest of the output still prints. |
38
+ | `frontier [slug]` | Read-only report across exact recorded sequence relations, including archived intermediaries and live descendants. Emits `frontier: actionable\|waiting\|blocked\|clear` (`none` for a non-sequence source), `frontier-source:`, and `frontier-workspace:` rows with location, `inspect\|prepare\|repair\|wait\|complete` action, and reason. Emits `frontier-select-command:`, `frontier-picks:`, `frontier-selection: blocked`, `frontier-prepare:`, or `frontier-review-sequence:` where applicable. Explicit slug may be archived; absent ACTIVE recovery requires a unique archived terminal tip with a recorded native Spec edge, otherwise refuses ambiguity. One explicit `roadmap.md` owner anywhere in the related live/archive chain may supersede historical maps for scheduling: both `Sequence root:` and `Decision:` headers, a unique owner-local decision heading, and one contiguous position/workspace table must match recorded identities and successors. Either header claims this format; invalid authority fails closed without legacy fallback. Headerless maps retain legacy parsing. Native normalization preserves historical bytes; structural identity is not semantic approval. Never changes ACTIVE, restores archives, creates workspaces, or launches writers. Native preparation and semantic admission remain required; see [sequence frontier](../cli.md#sequence-frontier). |
38
39
  | `handoff [slug] [--resume]` | Emit the deterministic resume record: cursor fields, `awaiting_human`, open `questions.md` gate kinds, the `gates.md` reduction with unmet/stale/abandoned ids, `decisions.md` dead ends, in-flight dispatch waves (`inflight_wave:` lines: phase, state, pending roles, slices), missing required files, the canonical read-next order, and the same `continuation:` lines as `check continuation`. Read-only unless `--resume`, which appends one `resume` event (role root) to `metrics.jsonl`; `metrics summary` then reports minutes from each resume to the next dispatch. The `/rite-handoff` spine and the compaction-fallback entry point. |
39
40
  | `recall --paths <p1,p2,...> [--limit n]` | Read-time query over `.devrites/archive/`: list archived features whose `touched-files.md` candidate manifest covers a queried project-relative path (exact or directory prefix, case-folded), ranked by overlap count, then newest archive-directory mtime, then slug (default 10 features). Each feature prints up to 8 `archive/<slug>/<file>:<line>` pointers, then `+N more`: `decisions.md` `DEC-###` entries and `## Carry-forward constraints` bullets whose `Files:` overlap (or a constraint naming no files), plus `review.md`/`seal.md`/`drift.md` lines that mention a queried path; fenced examples are ignored. Never writes, caches, or indexes (no metric either); symlinked archive entries are refused. An unreadable archive file prints `unreadable:` and the scan continues. Exit `0` (including `recall: no archive`), `1` invalid archive directory, `2` usage. |
40
41
  | `context [slug] (--phase <p>\|--skill <name>) [--role <r>] [--slice <SLICE-ID>] [--recheck <inventory>] [--trigger a,b] [--inline-contract] [--whole]` | Emit one deduplicated read-set bundle per phase/role/skill from each skill's `loads:` manifest; `--skill` works without a workspace when `--out` is given. A root `--phase build\|autocomplete` bundle (no `--role`, no `--slice`) defaults to `--slice <active_slice>` while the state.md cursor phase is `build` and active_slice names a slice present in tasks.md (prints `scope: slice SLICE-### (auto from state.md) ...`), unless `.devrites/AFK` `max_parallel` is 2 or more or a parallel lease is `running` (the bundle stays whole); `--whole` opts out. Every bundle opens, after its header comments, with a table of contents: one `L<start>-<end> <section label>` line per `===== label =====` section, giving its exact line range in the bundle file. A bundle without `--role` (the root's own read) gives over-budget artifacts as by-reference indexes; a `--role` bundle leads with the role's agent contract and names the manifest's `rootOnly` paths instead of inlining them. When the contract resolves under `.claude/agents`, `.omp/agents`, or `.codex/agents` (the host loads it as the agent's system prompt), the bundle writes one header line naming its path, size, and SHA-256 instead of the body; other layouts (pi, devin, unknown) and `--inline-contract` (only with `--role`) inline the body, and a missing contract still exits `3`. Inside inlined files, a `--role` bundle replaces each `<!-- root-only -->`…`<!-- /root-only -->` block with a one-line stub naming the omitted heading, and does the same for each `<!-- model-surface -->` block unless the role is `security-auditor`, the feature has an `ai-spec.md`, or `spec.md`/`plan.md`/`tasks.md`/`design-brief.md` are absent or (outside the spec template's `AI-SPEC annex`) name a model, agent, RAG, or tool surface; an unbalanced or headingless marker exits `2`. `--slice` inlines that slice's `tasks.md` block and turns each over-budget artifact, and each artifact over 16 KiB except `spec.md`, into a by-reference index (path, SHA-256, headings, line hits for every ID the block cites); repeat `--slice` for several slices; an unknown slice exits `3`. In phase `build`, a `--role` bundle other than `slice-wright` without `--slice` exits `3` (`unscoped build reviewer bundle`). `--recheck <inventory>` (phase `build`, with `--role` and `--slice`; path relative to the workspace) writes `<phase>-<role>.<slice>.recheck.bundle.md`: the inventory file and `core.md` inline whole, every other non-`rootOnly` pack file becomes a by-reference index (path, SHA-256, headings with line numbers) followed by each section the inventory cites as `<file>.md § <heading>`; workspace handling matches `--slice`. A missing or empty inventory exits `2`. First reviews, full-inventory rechecks, Vet, `/rite-review`, and Seal do not use it. |
@@ -58,6 +59,55 @@ workflow strategy.
58
59
  | `overhaul <records\|admit\|snapshot\|score\|bench\|render> ...` | Deterministic tools behind the standalone `/overhaul` skill: run-record generations and cross-record validation, worker-receipt admission and quote anchoring, index-safe baseline snapshots and per-attempt deltas, exact-rational readiness scoring, benchmark ratio intervals, and escaped offline review/report views. Operates only on explicit run-area and repository paths. See [Overhaul tools](#overhaul-tools). |
59
60
  | `version` | Print the engine version. |
60
61
 
62
+ Under AFK, `next`, `handoff`, and `check continuation` include the sequence
63
+ frontier without replacing the source-local cursor. Reporting actionable work
64
+ does not authorize Build or Ship, and cannot guarantee native-host compliance.
65
+ For a valid nonempty map, `frontier-authority: <artifact-path>,...` exposes actual
66
+ authority files. Canonical maps name owner `roadmap.md` and owner-local
67
+ `decisions.md`; valid legacy maps name their artifacts without a canonical claim.
68
+ Native preparation must read those exact paths and restrictions, including
69
+ archived/related owners absent from the local context read-next bundle.
70
+
71
+ Native `/rite-autocomplete` automatically upserts AFK `mode: autocomplete`
72
+ (no new flag), preserving other fields except an explicit `--parallel N` capacity
73
+ update. Missing mode retains standalone AFK behavior; invalid/duplicate mode
74
+ fails closed. With mode and global cap >1, Build wright `dispatch open` checks
75
+ global scheduling before claims/history/round writes: prepare one immediate
76
+ recorded successor per source, with actual pending planning/review handles,
77
+ current native readiness, or a concrete human/dependency hold; placeholders do
78
+ not count. Opt-out, exhausted opening budgets, and source human/question holds
79
+ remain binding. Unresolved authority requires native normalization.
80
+
81
+ Source `evidence.md` may retain `frontier-blocked: <successor-slug> — <specific constraint>`
82
+ or `frontier-blocked: sequence — <specific constraint>` as a visible scheduling
83
+ deferral, never approval or completed normalization. Generic local `serial:`
84
+ does not waive preparation. Ready foreign picks require mixed selection and
85
+ global lease capacity/path reservations, or an exact qualified
86
+ `serial: other-workspace/SLICE-001 — <constraint>` ordered handoff. Cohort waves
87
+ need not open atomically. Opaque `controller_batch` identifies admission to an
88
+ existing lease cohort instance; reusing a batch label creates no actor entitlement.
89
+ It proves no actor checkout/cwd/runtime isolation and cannot retrofit a retained
90
+ writer. Immutable per-slice `admitted_paths` retain only each pending actor lane;
91
+ missing snapshots or changed reservations require actor reconciliation, not
92
+ backfill from mutable tasks. Returned/integrated siblings may release slots for
93
+ refill. Exact claim identity/session remains required even after release/expiry.
94
+ Readiness, dependencies, actor claims and proof windows still apply.
95
+ Target-specific blocking defers preparation, not ready foreign Build. Sequence
96
+ blocking covers historical normalization only for otherwise-valid local work;
97
+ malformed canonical authority and invalid AFK/path/readiness/security still fail.
98
+ Discharged deferrals do not repeatedly trigger controller work. Native reviews
99
+ constraint substance and verifies exact actor cwd/profile. Retained unbound or
100
+ other-cohort writers hold new actors; unsupported isolation requires local-owner
101
+ serial work and ordered handoff, never early same-tree foreign writing.
102
+
103
+ Controller continuation prioritizes actionable global work over direct local
104
+ Build without replacing the local cursor or looping on local-only ready work.
105
+ Committed dispatch returns emit fresh scheduling after locks release even if
106
+ later claim release fails; preserve that nonzero failure and claim exclusion.
107
+ Rejected/unpersisted returns do not refresh; status reads stay read-only.
108
+ Protected reviewer/proof windows constrain landing, not independent planning.
109
+ See [controller admission](../cli.md#autocomplete-controller-admission).
110
+
61
111
  For `context --role`, optional `devrites-` prefixes and `.lane` suffixes resolve
62
112
  the base specialist's contract, workspace read-set, and role-specific rules.
63
113
  The full label remains in bundle filenames and attribution. Reviewer
@@ -48,7 +48,7 @@ func rootModeFor(command string, args []string) rootMode {
48
48
  return rootLenient
49
49
  }
50
50
  return rootUnused
51
- case "orient", "next", "context", "metrics", "dispatch", "handoff", "note", "packet":
51
+ case "orient", "next", "frontier", "context", "metrics", "dispatch", "handoff", "note", "packet":
52
52
  return rootStrictUsage
53
53
  case "candidate":
54
54
  if subcommand == "freeze" {
package/engine/help.go CHANGED
@@ -189,7 +189,7 @@ func shouldPrintHelp(args []string) bool {
189
189
  return true
190
190
  }
191
191
  switch args[0] {
192
- case "check", "state", "observe", "parallel", "gates", "claim", "detect", "note", "metrics", "handoff", "context", "orient", "migrate", "overhaul", "next", "dispatch", "secret-scan", "open-visual", "recall", "packet", "candidate":
192
+ case "check", "state", "observe", "parallel", "gates", "claim", "detect", "note", "metrics", "handoff", "context", "orient", "migrate", "overhaul", "next", "frontier", "dispatch", "secret-scan", "open-visual", "recall", "packet", "candidate":
193
193
  return len(args) >= 2 && args[1] == "help"
194
194
  default:
195
195
  return false
@@ -231,6 +231,8 @@ func commandHelp(args []string) (string, bool) {
231
231
  return orientUsage, true
232
232
  case "next":
233
233
  return nextUsage, true
234
+ case "frontier":
235
+ return "usage: devrites-engine frontier [slug]", true
234
236
  case "handoff":
235
237
  return handoffUsage, true
236
238
  case "recall":