devrites 7.2.4 → 7.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -1
  3. package/docs/cli.md +8 -0
  4. package/docs/command-map.md +2 -2
  5. package/docs/engine/commands.md +4 -3
  6. package/docs/usage.md +3 -1
  7. package/engine/commands.go +1 -1
  8. package/engine/help.go +5 -1
  9. package/engine/internal/lib/cli_observe.go +1 -1
  10. package/engine/internal/lib/continuation.go +131 -0
  11. package/engine/internal/lib/handoff.go +6 -0
  12. package/engine/internal/lib/taskgraph.go +70 -6
  13. package/engine/main.go +4 -0
  14. package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +3 -0
  15. package/pack/.claude/skills/rite-autocomplete/SKILL.md +9 -5
  16. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +1 -0
  17. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  18. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +5 -5
  19. package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +3 -0
  20. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +9 -5
  21. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +1 -0
  22. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  23. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +5 -5
  24. package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +3 -0
  25. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +9 -5
  26. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +1 -0
  27. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  28. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +5 -5
  29. package/pack/generated/devin/skills/devrites-lib/reference/reply-contract.md +3 -0
  30. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +9 -5
  31. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +1 -0
  32. package/pack/generated/devin/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  33. package/pack/generated/devin/skills/rite-build/reference/parallel-batch.md +5 -5
  34. package/pack/generated/dsh/skills/devrites-lib/reference/reply-contract.md +3 -0
  35. package/pack/generated/dsh/skills/rite-autocomplete/SKILL.md +9 -5
  36. package/pack/generated/dsh/skills/rite-autocomplete/reference/loop.md +1 -0
  37. package/pack/generated/dsh/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  38. package/pack/generated/dsh/skills/rite-build/reference/parallel-batch.md +5 -5
  39. package/pack/generated/omp/skills/devrites-lib/reference/reply-contract.md +3 -0
  40. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +9 -5
  41. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +1 -0
  42. package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  43. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +5 -5
  44. package/pack/generated/pi/skills/devrites-lib/reference/reply-contract.md +3 -0
  45. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +9 -5
  46. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +1 -0
  47. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  48. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +5 -5
  49. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
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.2.6](https://github.com/ViktorsBaikers/DevRites/compare/v7.2.5...v7.2.6) (2026-10-31)
6
+
7
+ ### Fixed
8
+
9
+ * **devrites:** count reserved manifests in task-graph schedule ([#191](https://github.com/ViktorsBaikers/DevRites/issues/191)) ([499014b](https://github.com/ViktorsBaikers/DevRites/commit/499014b00d3313fd6f8722715e9cdf8b155dabf5))
10
+ * **no-release:** stop reserving go.mod for existing-only deps ([#190](https://github.com/ViktorsBaikers/DevRites/issues/190)) ([4a8844c](https://github.com/ViktorsBaikers/DevRites/commit/4a8844cb8eaa53c29e46b5122b40827e9522c56a))
11
+
12
+ ## [7.2.5](https://github.com/ViktorsBaikers/DevRites/compare/v7.2.4...v7.2.5) (2026-10-30)
13
+
14
+ ### Fixed
15
+
16
+ * **devrites:** block autocomplete handoff of an internal phase edge ([#189](https://github.com/ViktorsBaikers/DevRites/issues/189)) ([5655fa7](https://github.com/ViktorsBaikers/DevRites/commit/5655fa7efdb8cbbbb0612fb603b170a4affa7fbf))
17
+
5
18
  ## [7.2.4](https://github.com/ViktorsBaikers/DevRites/compare/v7.2.3...v7.2.4) (2026-10-30)
6
19
 
7
20
  ### Fixed
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.2.4`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v7.2.4): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
34
+ **Status:** [`v7.2.6`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v7.2.6): 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
 
package/docs/cli.md CHANGED
@@ -29,6 +29,7 @@ devrites-engine check diff-scope <slug> --allow <csv>|--allow-file <path> [--wor
29
29
  devrites-engine check perturb <slug> --patch <file> --expect <test-name> --gate <G-ID> [--timeout N] [--worktree <path> --slice <SLICE-ID>]
30
30
  devrites-engine check task-graph <slug>
31
31
  devrites-engine check regression <slug> [--update]
32
+ devrites-engine check continuation [slug]
32
33
  devrites-engine check drift <slug> [--record]
33
34
  devrites-engine check windows <slug> [--worktree|--staged|--base <ref>|--since-dispatch <wave>]
34
35
  devrites-engine check dup [slug] [--all|--worktree|--staged|--base <ref>]
@@ -147,6 +148,13 @@ self-contained updater.
147
148
  scheduled wake before acting on durable state, ratchet after a landed slice
148
149
  checkpoint or phase advance, and treat `BLOCKED` at Seal as NO-GO; `--update`
149
150
  never excuses an unreconciled regression.
151
+ - `check continuation [slug]` prints `continuation: required` and
152
+ `invoke: <next_action>` when `.devrites/AFK` is present, `status` is
153
+ `running`, no question cursor is set, no blocking or escalating question is
154
+ open, and `next_action` is an internal phase command (`/rite-vet`,
155
+ `/rite-build`, not `/rite-ship`). Otherwise it prints `continuation: clear`.
156
+ Exit `0` either way: `required` means invoke that command, not pause for a
157
+ human. `handoff` prints the same lines.
150
158
  - `check drift <slug>` attributes readiness-input drift to the exact artifact.
151
159
  `--record` snapshots per-input SHA-256 digests into `readiness-inputs.json`
152
160
  under the feature lock after Vet records the aggregate binding; a later
@@ -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 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 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) — 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. `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. |
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. |
@@ -17,10 +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 <slug>] [--from-plan \| <json-file> \| -]` | Choose the greedy path-disjoint subset ≤ cap from supplied ready slices, or with `--from-plan` (needs `--slug`) from the plan: tasks.md slices whose dependencies state.md checks `built`, with Writer allowlist (else Files likely touched) paths plus the nearest manifest/lockfile when `External dependencies:` is not none. With `--slug` and a running lease, the lease's not-yet-landed slices hold cap slots and paths, slices it names are never picked, and only new picks print. |
20
+ | `parallel select --cap <1-10> [--root <dir>] [--slug <slug>] [--from-plan \| <json-file> \| -]` | Choose the greedy path-disjoint subset ≤ cap from supplied ready slices, or with `--from-plan` (needs `--slug`) from the plan: tasks.md slices whose dependencies state.md checks `built`, with Writer allowlist (else Files likely touched) paths plus the nearest manifest/lockfile when `External dependencies:` names a package (`none*`, existing, or no-new prose without a coordinate). With `--slug` and a running lease, the lease's not-yet-landed slices hold cap slots and paths, slices it names are never picked, and only new picks print. |
21
21
  | `parallel <create\|add\|integrate\|cleanup\|status\|abort\|lease-read\|lease-write\|lease-clear\|record-green>` | Deterministic parallel worktree leases, integration, and cleanup for parallel writer batches. A lease is a pipeline: `integrate --slice <id> --apply-to-control` lands one green sibling onto control (refusing if anything but this lease moved control), and `add` starts new path-disjoint siblings from the current control tip while others still run. |
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; 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. |
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]` | 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; `--update` ratchets the baseline forward under the feature lock and prints each blessed 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
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. |
25
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. |
26
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`. |
@@ -34,7 +35,7 @@ workflow strategy.
34
35
  | `orient <slug>` | Alias for `observe summary`. |
35
36
  | `observe slice <slug> <SLICE-ID>` | Print one `SLICE-###` section of `tasks.md` so Build reads a slice, not the file. |
36
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. |
37
- | `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, and the canonical read-next order. 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. |
38
+ | `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. |
38
39
  | `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. |
39
40
  | `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) ...`); `--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. |
40
41
  | `dispatch <slug> <open\|start\|seal\|return\|status\|abandon\|attribute>` | Launch-wave barrier for parallel dispatch: seal needs a handle per role, return needs seal; the start that gives the last role its handle seals the wave, and an explicit seal on a sealed wave is a no-op; `open --claim-session <id> --claim <path>... [--claim-ttl <minutes>]` records one file claim for the wave in claims.jsonl and exits `3`, creating no wave and no claim, while a live foreign session holds an overlapping path; the return that completes the wave releases that claim; `abandon --release` releases it on any other host-confirmed terminal path (a stop or a refused launch); re-opening an abandoned wave inherits its kept claim or, with new claim flags, replaces and releases it; claim flags apply to open only and `--release` to abandon only; start/return auto-record metrics, `return --outcome findings|no-findings|gap` records the role's Outcome line, and `abandon` records its reason, so `metrics summary` shows per-role yield and lost waves. Bare `status` prints every open, sealed, or abandoned wave and folds complete waves into one `N complete wave(s) (use --all)` line; `--all` lists every wave; it still exits nonzero while any wave is open or sealed. For a reviewer, auditor, or test-analyst role, `return --result <file>` stores the return verbatim as `packets/<wave>-<role>.return.md` (exit `3` if that file exists), derives the outcome from its `Outcome:`/`Counts:` head (a malformed or inconsistent head records `gap` with a warning, never `no-findings`), exits `3` when an explicit `--outcome` disagrees, and records each `Finding:` row's `role|slice|file|section|severity` key, so `metrics summary` adds per-role `resolution: resolved re-raised open late` counts. A `--result` file that already is that `packets/` path is kept as the stored return. A build wave with a wright role needs `--slice <SLICE-ID>` per slice, and a slice-bound vet wave takes it too; a reviewer-only wave (for example a Build slice review) may take it, uncapped, so its `Finding:` keys name that slice; a reviewer, auditor, or test-analyst wave needs `--packet <file>` and `open` exits `3` on a packet that seeds a conclusion (gate `*-PASS` token, `no-findings`, an `Outcome:`/`Counts:` line, an "already passed" claim, or zero Critical/Important counts) or tells the agent to read an installed `agents/devrites-*.md`/`.toml` role contract (on the line or under a "Read …" heading or label; canonical `pack/` paths excepted), and a wright wave's `--contract` gets the same role-contract check; a Review or Seal reviewer wave also exits `3` unless the packet names an existing non-empty `.diff`/`.patch` file and the manifest covers every checkpointed path; every 5 rounds of either kind on one slice, `open` exits `3` until `--reslice-review <DRIFT-ID>` names an unused `drift.md` `## <DRIFT-ID>` heading for that slice. `open` also warns when an earlier wave for the same slice never returned. Under `.devrites/AFK` max_parallel >= 2, a first-round build wright wave narrower than the `parallel select --from-plan` batch exits `3` (printing the batch, the command and the parallel-batch lifecycle) until evidence.md records `serial: <skipped ids> — <reason>`; repair rounds, lease siblings and HITL runs are never refused. A build wright `--contract` must name `gates precheck` under `Writer-safe checks:` when gates.md has a `RUN: writer` gate. `open` exits `3` when a `--role` names no pack agent in a project-level install (a `.<lane>` suffix is allowed), and lints a reviewer packet against the wave's roles, so a recheck may name its own role's fingerprint. Root-edit tripwire (ADR-0038): the first `open` records `<feature>/tree-baseline.json`, which maps dirty product paths outside `.devrites/` and `.scratch/` to their mode plus SHA-256, accepted as user work. The return that completes a wright wave (any phase) adds its slice write sets and claim paths. `open` exits `3` with `unattributed root edit: <paths>` while a dirty product path differs from that baseline and no live claim or in-flight wright wave covers it, unless the new wright wave covers the path through `--claim` or a slice write set. `attribute --reason <evidence> --path <path>...` records owner work, gate output, a standalone wright, or a sanctioned root write for flagged paths only. Each finding writes an `unattributed-edit` metrics row. The engine never reverts a file, and a workspace without the baseline is never blocked. |
package/docs/usage.md CHANGED
@@ -389,7 +389,9 @@ Autocomplete discloses the exact Git plan, then still stops for a fresh literal
389
389
  `GO` and native host approval. It also pauses for irreversible risk, human-only access/actions, escalating
390
390
  gates, unanswered blocking with no recommended option, a remaining NO-GO, or low confidence — not for recommended-option blocking questions, temper expand, validating
391
391
  gates, `--max-slices`, or default slice/agent/time/review-queue caps.
392
- Objective red checks use bounded recovery instead. Args:
392
+ Objective red checks use bounded recovery instead. A not-READY vet under AFK is
393
+ not a pause: `devrites-engine check continuation` prints `continuation: required`
394
+ and the phase command to invoke; `clear` is the only time autocomplete may reply. Args:
393
395
  `[idea] [--ship|--yolo] [--max-slices N] [--parallel N] [--full] [--cross-model] [--lookahead]`.
394
396
  Optional flags are inactive unless their exact token occurs in the invocation;
395
397
  `--max-slices` requires one positive base-10 integer and does not cap this run.
@@ -42,7 +42,7 @@ func rootModeFor(command string, args []string) rootMode {
42
42
  return rootStrictUsage
43
43
  case "check":
44
44
  switch subcommand {
45
- case "candidate", "readiness", "preconditions", "seal", "task-graph", "diff-scope", "slice", "regression", "windows", "drift", "anchors", "perturb":
45
+ case "candidate", "readiness", "preconditions", "seal", "task-graph", "diff-scope", "slice", "regression", "continuation", "windows", "drift", "anchors", "perturb":
46
46
  return rootStrictUsage
47
47
  case "indexes", "dup":
48
48
  return rootLenient
package/engine/help.go CHANGED
@@ -12,7 +12,7 @@ import (
12
12
  )
13
13
 
14
14
  const (
15
- checkUsage = `usage: devrites-engine check <candidate|readiness|preconditions|seal|path-disjoint|task-graph|affected|slice|diff-scope|skill-trust|indexes|regression|drift|windows|dup|anchors|perturb> ...
15
+ checkUsage = `usage: devrites-engine check <candidate|readiness|preconditions|seal|path-disjoint|task-graph|affected|slice|diff-scope|skill-trust|indexes|regression|continuation|drift|windows|dup|anchors|perturb> ...
16
16
 
17
17
  check candidate <slug>
18
18
  check readiness <slug>
@@ -29,6 +29,7 @@ const (
29
29
  check skill-trust <path>
30
30
  check indexes [--root <dir>]
31
31
  check regression <slug> [--update]
32
+ check continuation [slug]
32
33
  check drift <slug> [--record]
33
34
  check windows <slug> [--worktree|--staged|--base <ref>|--since-dispatch <wave>] [--cwd <dir>]
34
35
  check dup [slug] [--all|--worktree|--staged|--base <ref>]
@@ -90,6 +91,7 @@ const (
90
91
  skillTrustUsage = "usage: devrites-engine check skill-trust <path>"
91
92
  indexesUsage = "usage: devrites-engine check indexes [--root <dir>]"
92
93
  regressionUsageLine = "usage: devrites-engine check regression <slug> [--update]"
94
+ continuationUsage = "usage: devrites-engine check continuation [slug]"
93
95
  driftUsageLine = "usage: devrites-engine check drift <slug> [--record]"
94
96
  detectUsageLine = "usage: devrites-engine detect commands [--root <dir>] [--json]"
95
97
  windowsUsageLine = "usage: devrites-engine check windows <slug> [--worktree|--staged|--base <ref>|--since-dispatch <wave>] [--cwd <dir>]"
@@ -292,6 +294,8 @@ func helpCheck(rest []string) string {
292
294
  return indexesUsage
293
295
  case "regression":
294
296
  return regressionUsageLine
297
+ case "continuation":
298
+ return continuationUsage
295
299
  case "drift":
296
300
  return driftUsageLine
297
301
  case "windows":
@@ -49,7 +49,7 @@ func runTaskGraphCheck(root, slug string, strict bool, stdout, stderr io.Writer)
49
49
  if over > 0 {
50
50
  recordMetric(root, slug, "define", "size-advisory", "", int64(over))
51
51
  }
52
- paths, serial := sliceWritePaths(raw, graph)
52
+ paths, serial := schedulePaths(raw, graph, root)
53
53
  if plan, idle, maxReady := schedulePlan(graph, paths, root); len(plan) > 0 {
54
54
  fmt.Fprintf(stdout, "task-graph: schedule: %d slices in %d build rounds at cap %d, width %d, idle-eligible %d\n", len(graph.Slices), len(plan), parallel.MaxParallelSlices, scheduleWidth(plan), idle)
55
55
  if chain := chainAdvisories(graph, serial, len(plan), maxReady); len(chain) > 0 {
@@ -0,0 +1,131 @@
1
+ package lib
2
+
3
+ import (
4
+ "fmt"
5
+ "io"
6
+ "os"
7
+ "path/filepath"
8
+ "strings"
9
+
10
+ "github.com/devrites/devrites/internal/devritespaths"
11
+ "github.com/devrites/devrites/internal/gate"
12
+ "github.com/devrites/devrites/internal/state"
13
+ )
14
+
15
+ // ContinuationUsage is the help text for `check continuation`.
16
+ const ContinuationUsage = "usage: devrites-engine check continuation [slug]"
17
+
18
+ // internalPhaseVerbs are autocomplete phase edges. /rite-ship and
19
+ // /rite-autocomplete stay user-facing (fresh GO, parked reopen).
20
+ var internalPhaseVerbs = map[string]bool{
21
+ "/rite-spec": true,
22
+ "/rite-clarify": true,
23
+ "/rite-temper": true,
24
+ "/rite-define": true,
25
+ "/rite-plan": true,
26
+ "/rite-vet": true,
27
+ "/rite-build": true,
28
+ "/rite-prove": true,
29
+ "/rite-polish": true,
30
+ "/rite-review": true,
31
+ "/rite-converge": true,
32
+ "/rite-seal": true,
33
+ }
34
+
35
+ // continuationVerdict is the cursor-shaped answer to "may autocomplete reply?".
36
+ // Required is an internal phase edge, not a human pause (exit stays 0).
37
+ // shortcut: a host that ends the turn without running this check still stops; no Stop hook (ADR-0015). Upgrade if a host can block stop without a DevRites hook payload.
38
+ type continuationVerdict struct {
39
+ Required bool
40
+ Invoke string
41
+ Reason string
42
+ }
43
+
44
+ // RunCheckContinuation prints whether an armed AFK run must invoke its
45
+ // next_action instead of replying. Exit 0 either way; exit 2 on usage or
46
+ // an unreadable workspace.
47
+ func RunCheckContinuation(root string, args []string, stdout, stderr io.Writer) int {
48
+ slug, code, err := ActiveSlug(root, args)
49
+ if err != nil {
50
+ fmt.Fprintf(stderr, "check continuation: %v\n", err)
51
+ if code == 0 {
52
+ code = 2
53
+ }
54
+ return code
55
+ }
56
+ verdict, err := classifyContinuation(root, slug)
57
+ if err != nil {
58
+ fmt.Fprintf(stderr, "check continuation: %v\n", err)
59
+ return 2
60
+ }
61
+ writeContinuation(stdout, verdict)
62
+ return 0
63
+ }
64
+
65
+ func classifyContinuation(root, slug string) (continuationVerdict, error) {
66
+ featureDir, err := devritespaths.ExistingFeatureDirChecked(root, slug)
67
+ if err != nil {
68
+ return continuationVerdict{}, err
69
+ }
70
+ report, err := state.Status(root, slug)
71
+ if err != nil {
72
+ return continuationVerdict{}, err
73
+ }
74
+ if !afkPresent(root) {
75
+ return continuationVerdict{Reason: "no AFK sentinel"}, nil
76
+ }
77
+ if report.Status != "running" {
78
+ if report.Status == "" {
79
+ return continuationVerdict{Reason: "status unset"}, nil
80
+ }
81
+ return continuationVerdict{Reason: "status=" + report.Status}, nil
82
+ }
83
+ // #nosec G304 -- state.md inside the checked feature workspace
84
+ data, err := os.ReadFile(filepath.Join(featureDir, "state.md"))
85
+ if err != nil {
86
+ return continuationVerdict{}, err
87
+ }
88
+ if qid, ok := state.CursorField(strings.Split(string(data), "\n"), state.CursorQuestionID); ok && strings.TrimSpace(qid) != "" {
89
+ return continuationVerdict{Reason: "question cursor set"}, nil
90
+ }
91
+ // #nosec G304 -- questions.md inside the checked feature workspace
92
+ qdata, err := os.ReadFile(filepath.Join(featureDir, "questions.md"))
93
+ if err != nil && !os.IsNotExist(err) {
94
+ return continuationVerdict{}, err
95
+ }
96
+ if err == nil {
97
+ for _, kind := range gate.OpenBlockingQuestionGates(qdata) {
98
+ if kind == "blocking" || kind == "escalating" {
99
+ return continuationVerdict{Reason: "open " + kind + " question"}, nil
100
+ }
101
+ }
102
+ }
103
+ invoke, ok := internalPhaseEdge(report.NextAction)
104
+ if !ok {
105
+ return continuationVerdict{Reason: "next_action is not an internal phase edge"}, nil
106
+ }
107
+ return continuationVerdict{Required: true, Invoke: invoke, Reason: "AFK status=running internal phase edge"}, nil
108
+ }
109
+
110
+ func afkPresent(root string) bool {
111
+ info, err := os.Stat(filepath.Join(root, "AFK")) // #nosec G304 -- .devrites/AFK sentinel
112
+ return err == nil && info.Mode().IsRegular()
113
+ }
114
+
115
+ func internalPhaseEdge(action string) (string, bool) {
116
+ fields := strings.Fields(action)
117
+ if len(fields) == 0 || !internalPhaseVerbs[strings.ToLower(fields[0])] {
118
+ return "", false
119
+ }
120
+ return strings.Join(fields, " "), true
121
+ }
122
+
123
+ func writeContinuation(stdout io.Writer, verdict continuationVerdict) {
124
+ if verdict.Required {
125
+ fmt.Fprintln(stdout, "continuation: required")
126
+ fmt.Fprintf(stdout, "invoke: %s\n", verdict.Invoke)
127
+ } else {
128
+ fmt.Fprintln(stdout, "continuation: clear")
129
+ }
130
+ fmt.Fprintf(stdout, "reason: %s\n", verdict.Reason)
131
+ }
@@ -89,6 +89,12 @@ func RunHandoff(root string, args []string, stdout, stderr io.Writer) int {
89
89
  fmt.Fprintf(stdout, "missing_required: %s\n", strings.Join(report.MissingFiles, ", "))
90
90
  }
91
91
  fmt.Fprintf(stdout, "read_next: %s\n", strings.Join(readNext(featureDir), ", "))
92
+ verdict, err := classifyContinuation(root, slug)
93
+ if err != nil {
94
+ fmt.Fprintf(stderr, "handoff: continuation: %v\n", err)
95
+ return 2
96
+ }
97
+ writeContinuation(stdout, verdict)
92
98
  if resume {
93
99
  recordMetric(root, slug, string(report.Phase), "resume", "root", 0)
94
100
  }
@@ -66,6 +66,21 @@ func sliceWritePaths(tasksMarkdown []byte, graph TaskGraphResult) (map[string][]
66
66
  return paths, serial
67
67
  }
68
68
 
69
+ // schedulePaths is the write set the task-graph schedule and hub check use.
70
+ // It adds the manifest withManifests reserves so printed rounds match
71
+ // `parallel select --from-plan`, not the allowlist alone. devritesRoot is the
72
+ // .devrites directory.
73
+ func schedulePaths(tasksMarkdown []byte, graph TaskGraphResult, devritesRoot string) (map[string][]string, map[string]bool) {
74
+ paths, serial := sliceWritePaths(tasksMarkdown, graph)
75
+ project := filepath.Dir(devritesRoot)
76
+ for _, s := range graph.Slices {
77
+ block, _ := state.ExtractTaskSlice(tasksMarkdown, s.ID)
78
+ external, _ := fieldValue(sliceFields(block), "external dependencies")
79
+ paths[s.ID] = withManifests(project, paths[s.ID], external)
80
+ }
81
+ return paths, serial
82
+ }
83
+
69
84
  // pathTokens keeps the list entries that can be paths; prose and Markdown links
70
85
  // (anything with whitespace) are not write paths.
71
86
  func pathTokens(raw string) []string {
@@ -241,14 +256,63 @@ func builtSlices(root, slug string) (map[string]bool, error) {
241
256
  return built, nil
242
257
  }
243
258
 
244
- // withManifests adds, when external names dependencies (not empty or none),
245
- // the manifest and lockfiles of the nearest directory above each write path
246
- // that holds one, so two dependency-adding slices never share a round. A lone
247
- // lockfile is always claimed (adding a dependency writes it); of several, only
248
- // those present are.
249
- func withManifests(project string, paths []string, external string) []string {
259
+ // manifestDenialRe is prose that says the slice adds no dependency.
260
+ var manifestDenialRe = regexp.MustCompile(`(?i)\b(?:no new|no product|existing|already-admitted|already admitted|stdlib)\b`)
261
+
262
+ // A backtick name, module path, npm scope, or x.y.z pin. go.mod/go.sum is not a module path.
263
+ var (
264
+ backtickPkgRe = regexp.MustCompile("`([^`]+)`")
265
+ modulePathRe = regexp.MustCompile(`(?i)(?:[a-z0-9-]+\.)+[a-z]{2,}/[a-z0-9._@~+-]+`)
266
+ npmScopeRe = regexp.MustCompile(`(?i)@[a-z0-9._-]+/[a-z0-9._-]+`)
267
+ versionPinRe = regexp.MustCompile(`(?i)\bv?\d+\.\d+\.\d+\b`)
268
+ manifestHostRe = regexp.MustCompile(`(?i)\.(?:mod|sum|json|toml|yaml|yml|lock|lockb)$`)
269
+ )
270
+
271
+ // externalClaimsManifest reports whether External dependencies names a package
272
+ // add, so parallel select reserves the nearest manifest. A none prefix does
273
+ // not. shortcut: existing/no-new prose with no package coordinate does not
274
+ // either; name the module, version, scope, or `package` when the slice edits one.
275
+ func externalClaimsManifest(external string) bool {
250
276
  ext := strings.ToLower(strings.Trim(strings.TrimSpace(external), "`"))
251
277
  if ext == "" || ext == "-" || ext == "n/a" || strings.HasPrefix(ext, "none") {
278
+ return false
279
+ }
280
+ raw := strings.TrimSpace(external)
281
+ if manifestDenialRe.MatchString(raw) && !namesPackage(raw) {
282
+ return false
283
+ }
284
+ return true
285
+ }
286
+
287
+ // namesPackage reports a module path, version pin, npm scope, or `package`
288
+ // name. Manifest filenames mentioned only to deny an edit do not count.
289
+ func namesPackage(raw string) bool {
290
+ for _, m := range backtickPkgRe.FindAllStringSubmatch(raw, -1) {
291
+ base := path.Base(strings.TrimSpace(m[1]))
292
+ if base != "" && base != "." && !manifestHostRe.MatchString(base) {
293
+ return true
294
+ }
295
+ }
296
+ if npmScopeRe.MatchString(raw) || versionPinRe.MatchString(raw) {
297
+ return true
298
+ }
299
+ for _, loc := range modulePathRe.FindAllStringIndex(raw, -1) {
300
+ token := raw[loc[0]:loc[1]]
301
+ host := token[:strings.IndexByte(token, '/')]
302
+ if !manifestHostRe.MatchString(host) {
303
+ return true
304
+ }
305
+ }
306
+ return false
307
+ }
308
+
309
+ // withManifests adds, when external names a package add, the manifest and
310
+ // lockfiles of the nearest directory above each write path that holds one,
311
+ // so two dependency-adding slices never share a round. A lone lockfile is
312
+ // always claimed (adding a dependency writes it); of several, only those
313
+ // present are.
314
+ func withManifests(project string, paths []string, external string) []string {
315
+ if !externalClaimsManifest(external) {
252
316
  return paths
253
317
  }
254
318
  isFile := func(rel string) bool {
package/engine/main.go CHANGED
@@ -41,6 +41,8 @@ Usage:
41
41
  devrites-engine check skill-trust <path> Scan one skill/agent Markdown for trust violations
42
42
  devrites-engine check regression <slug> [--update]
43
43
  Compare workspace progress against the recorded baseline; --update ratchets it
44
+ devrites-engine check continuation [slug]
45
+ AFK + running internal phase edge must be invoked, not replied to
44
46
  devrites-engine check drift <slug> [--record]
45
47
  Attribute readiness-input changes to the exact artifact since the Vet baseline
46
48
  devrites-engine check windows <slug> [--worktree|--staged|--base <ref>|--since-dispatch <wave>]
@@ -241,6 +243,8 @@ func cmdCheck(root string, args []string, stdin io.Reader, stdout, stderr io.Wri
241
243
  return lib.RunEnvironmentCheck(root, rest, stdout, stderr)
242
244
  case "regression":
243
245
  return lib.RunCheckRegression(root, rest, stdout, stderr)
246
+ case "continuation":
247
+ return lib.RunCheckContinuation(root, rest, stdout, stderr)
244
248
  case "windows":
245
249
  return lib.RunCheckWindows(root, rest, stdout, stderr)
246
250
  case "dup":
@@ -26,6 +26,9 @@ individually or in one named group, so reviewers can `git diff` those paths.
26
26
 
27
27
  Active `/rite-autocomplete` consumes green checkpoints/`next_action` internally.
28
28
  Continue execution or tool progress; never end with a text-only final reply between green phases.
29
+ Before that reply, `devrites-engine check continuation` must say `continuation: clear`.
30
+ `required` means invoke `invoke:` now; exit 0 is not a pause. **Failing case:**
31
+ `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
29
32
 
30
33
  Standalone HITL mid-flight replies follow the same economy:
31
34
 
@@ -153,13 +153,17 @@ pending slices. Each Autocomplete invocation owns internal backtracking. Context
153
153
  not create a stop; persist and resume the cursor.
154
154
 
155
155
  Reply only at final state: text-only turns end the run. Keep
156
- calling tools after compaction or phase changes. Use one line:
156
+ calling tools after compaction or phase changes. Before any user-visible reply,
157
+ `devrites-engine check continuation` must print `continuation: clear`
158
+ (`handoff` prints the same lines). `required` means invoke `invoke:` now.
159
+ `stopped` is not a phase token. Print this card only after `clear`:
157
160
 
158
161
  ```text
159
162
  Autocomplete: <slug>
160
- spec <done|stopped> · clarify <clear|stopped> · temper <done|stopped> · define <done|stopped> · vet <ready|stopped> · build <n/N|stopped> · prove <done|stopped> · polish <done|stopped> · review <done|stopped> · seal <GO|NO-GO|stopped>
163
+ spec done · clarify clear · temper done · define done · vet ready · build n/N · prove — · polish — · review — · seal —
161
164
  ```
162
165
 
163
- Final state: `Shipped`, `Stopped`, `Awaiting human`, `NO-GO`, or `GO`; no narrative
164
- recap. Require clean or accepted baseline; land local unpushed checkpoints after
165
- each green check; never auto-pass red gates.
166
+ Final state, only after `clear`: `Shipped`, `Stopped`, `Awaiting human`,
167
+ `NO-GO`, or `GO`; no narrative recap. Require clean or accepted baseline; land
168
+ local unpushed checkpoints after each green check; never auto-pass red gates.
169
+ **Failing case:** `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
@@ -147,6 +147,7 @@ and park it after three escalations while independent work continues.
147
147
 
148
148
  Green slice/phase checkpoints consume their recorded `next_action` internally;
149
149
  only the caller replies finally at completion or a genuine stop.
150
+ Before a reply, `devrites-engine check continuation` must print `continuation: clear`; `required` means invoke `invoke:` now.
150
151
  No user-facing reply is permitted while durable state contains agent-owned
151
152
  `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
152
153
  Critical/Important fingerprint below its cap or with an escalation left, runnable
@@ -26,6 +26,8 @@ Fully escalated fingerprints park unless remaining owner is human.
26
26
 
27
27
  ## Not stops: internal technical routing
28
28
 
29
+ AFK + `status=running` + an internal phase `next_action` is not a stop. `devrites-engine check continuation` prints `required` for that cursor and `clear` for `/rite-ship`, `awaiting_human`, a question cursor, or an open blocking or escalating question.
30
+
29
31
  `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
30
32
  forward work, persists the return cursor, and invokes Plan repair plus Recovery
31
33
  Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
@@ -33,10 +33,10 @@ N_eff = min(
33
33
  ```
34
34
 
35
35
  Select **greedily in plan order** with
36
- `devrites-engine parallel select --slug <slug> --cap N --from-plan`: the engine
37
- reads the ready set (tasks.md dependencies checked `built` in `state.md`, minus
38
- running-lease slices) and each slice's Writer allowlist (else `Files likely
39
- touched`), plus its manifest/lockfile when `External dependencies:` is not none;
36
+ `devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
37
+ (dependencies `built`, minus running-lease slices), Writer allowlist
38
+ (else Files likely touched), plus manifest/lockfile when `External dependencies:`
39
+ names a package (`none*`, existing, or no-new prose without a coordinate);
40
40
  `next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
41
41
  With a running lease, a single new pick still uses `parallel add`;
42
42
  `n_eff=0` with a running lease waits for siblings, not Prove. Without one:
@@ -73,7 +73,7 @@ Before `parallel select`, add each slice's hidden write surfaces (list owner:
73
73
  [repository-topology.md § Ownership rules](../../devrites-lib/reference/standards/repository-topology.md#ownership-rules))
74
74
  — lockfile/manifest, the generated target of an edited source, migration chain,
75
75
  snapshot directory, formatter sweep — and compare paths case-folded
76
- (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile itself.
76
+ (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
77
77
  Slices colliding on either run serially; the rest
78
78
  stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
79
79
  with `max_parallel ≥ 2`, `dispatch open` refuses a first-round build wright wave
@@ -26,6 +26,9 @@ individually or in one named group, so reviewers can `git diff` those paths.
26
26
 
27
27
  Active `/rite-autocomplete` consumes green checkpoints/`next_action` internally.
28
28
  Continue execution or tool progress; never end with a text-only final reply between green phases.
29
+ Before that reply, `devrites-engine check continuation` must say `continuation: clear`.
30
+ `required` means invoke `invoke:` now; exit 0 is not a pause. **Failing case:**
31
+ `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
29
32
 
30
33
  Standalone HITL mid-flight replies follow the same economy:
31
34
 
@@ -155,13 +155,17 @@ pending slices. Each Autocomplete invocation owns internal backtracking. Context
155
155
  not create a stop; persist and resume the cursor.
156
156
 
157
157
  Reply only at final state: text-only turns end the run. Keep
158
- calling tools after compaction or phase changes. Use one line:
158
+ calling tools after compaction or phase changes. Before any user-visible reply,
159
+ `devrites-engine check continuation` must print `continuation: clear`
160
+ (`handoff` prints the same lines). `required` means invoke `invoke:` now.
161
+ `stopped` is not a phase token. Print this card only after `clear`:
159
162
 
160
163
  ```text
161
164
  Autocomplete: <slug>
162
- spec <done|stopped> · clarify <clear|stopped> · temper <done|stopped> · define <done|stopped> · vet <ready|stopped> · build <n/N|stopped> · prove <done|stopped> · polish <done|stopped> · review <done|stopped> · seal <GO|NO-GO|stopped>
165
+ spec done · clarify clear · temper done · define done · vet ready · build n/N · prove — · polish — · review — · seal —
163
166
  ```
164
167
 
165
- Final state: `Shipped`, `Stopped`, `Awaiting human`, `NO-GO`, or `GO`; no narrative
166
- recap. Require clean or accepted baseline; land local unpushed checkpoints after
167
- each green check; never auto-pass red gates.
168
+ Final state, only after `clear`: `Shipped`, `Stopped`, `Awaiting human`,
169
+ `NO-GO`, or `GO`; no narrative recap. Require clean or accepted baseline; land
170
+ local unpushed checkpoints after each green check; never auto-pass red gates.
171
+ **Failing case:** `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
@@ -149,6 +149,7 @@ and park it after three escalations while independent work continues.
149
149
 
150
150
  Green slice/phase checkpoints consume their recorded `next_action` internally;
151
151
  only the caller replies finally at completion or a genuine stop.
152
+ Before a reply, `devrites-engine check continuation` must print `continuation: clear`; `required` means invoke `invoke:` now.
152
153
  No user-facing reply is permitted while durable state contains agent-owned
153
154
  `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
154
155
  Critical/Important fingerprint below its cap or with an escalation left, runnable
@@ -28,6 +28,8 @@ Fully escalated fingerprints park unless remaining owner is human.
28
28
 
29
29
  ## Not stops: internal technical routing
30
30
 
31
+ AFK + `status=running` + an internal phase `next_action` is not a stop. `devrites-engine check continuation` prints `required` for that cursor and `clear` for `/rite-ship`, `awaiting_human`, a question cursor, or an open blocking or escalating question.
32
+
31
33
  `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
32
34
  forward work, persists the return cursor, and invokes Plan repair plus Recovery
33
35
  Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
@@ -33,10 +33,10 @@ N_eff = min(
33
33
  ```
34
34
 
35
35
  Select **greedily in plan order** with
36
- `devrites-engine parallel select --slug <slug> --cap N --from-plan`: the engine
37
- reads the ready set (tasks.md dependencies checked `built` in `state.md`, minus
38
- running-lease slices) and each slice's Writer allowlist (else `Files likely
39
- touched`), plus its manifest/lockfile when `External dependencies:` is not none;
36
+ `devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
37
+ (dependencies `built`, minus running-lease slices), Writer allowlist
38
+ (else Files likely touched), plus manifest/lockfile when `External dependencies:`
39
+ names a package (`none*`, existing, or no-new prose without a coordinate);
40
40
  `next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
41
41
  With a running lease, a single new pick still uses `parallel add`;
42
42
  `n_eff=0` with a running lease waits for siblings, not Prove. Without one:
@@ -73,7 +73,7 @@ Before `parallel select`, add each slice's hidden write surfaces (list owner:
73
73
  [repository-topology.md § Ownership rules](../../devrites-lib/reference/standards/repository-topology.md#ownership-rules))
74
74
  — lockfile/manifest, the generated target of an edited source, migration chain,
75
75
  snapshot directory, formatter sweep — and compare paths case-folded
76
- (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile itself.
76
+ (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
77
77
  Slices colliding on either run serially; the rest
78
78
  stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
79
79
  with `max_parallel ≥ 2`, `dispatch open` refuses a first-round build wright wave
@@ -26,6 +26,9 @@ individually or in one named group, so reviewers can `git diff` those paths.
26
26
 
27
27
  Active `$rite-autocomplete` consumes green checkpoints/`next_action` internally.
28
28
  Continue execution or tool progress; never end with a text-only final reply between green phases.
29
+ Before that reply, `devrites-engine check continuation` must say `continuation: clear`.
30
+ `required` means invoke `invoke:` now; exit 0 is not a pause. **Failing case:**
31
+ `vet stopped` plus `Resume: $rite-vet` while the check says `required`.
29
32
 
30
33
  Standalone HITL mid-flight replies follow the same economy:
31
34
 
@@ -155,13 +155,17 @@ pending slices. Each Autocomplete invocation owns internal backtracking. Context
155
155
  not create a stop; persist and resume the cursor.
156
156
 
157
157
  Reply only at final state: text-only turns end the run. Keep
158
- calling tools after compaction or phase changes. Use one line:
158
+ calling tools after compaction or phase changes. Before any user-visible reply,
159
+ `devrites-engine check continuation` must print `continuation: clear`
160
+ (`handoff` prints the same lines). `required` means invoke `invoke:` now.
161
+ `stopped` is not a phase token. Print this card only after `clear`:
159
162
 
160
163
  ```text
161
164
  Autocomplete: <slug>
162
- spec <done|stopped> · clarify <clear|stopped> · temper <done|stopped> · define <done|stopped> · vet <ready|stopped> · build <n/N|stopped> · prove <done|stopped> · polish <done|stopped> · review <done|stopped> · seal <GO|NO-GO|stopped>
165
+ spec done · clarify clear · temper done · define done · vet ready · build n/N · prove — · polish — · review — · seal —
163
166
  ```
164
167
 
165
- Final state: `Shipped`, `Stopped`, `Awaiting human`, `NO-GO`, or `GO`; no narrative
166
- recap. Require clean or accepted baseline; land local unpushed checkpoints after
167
- each green check; never auto-pass red gates.
168
+ Final state, only after `clear`: `Shipped`, `Stopped`, `Awaiting human`,
169
+ `NO-GO`, or `GO`; no narrative recap. Require clean or accepted baseline; land
170
+ local unpushed checkpoints after each green check; never auto-pass red gates.
171
+ **Failing case:** `vet stopped` plus `Resume: $rite-vet` while the check says `required`.
@@ -149,6 +149,7 @@ and park it after three escalations while independent work continues.
149
149
 
150
150
  Green slice/phase checkpoints consume their recorded `next_action` internally;
151
151
  only the caller replies finally at completion or a genuine stop.
152
+ Before a reply, `devrites-engine check continuation` must print `continuation: clear`; `required` means invoke `invoke:` now.
152
153
  No user-facing reply is permitted while durable state contains agent-owned
153
154
  `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
154
155
  Critical/Important fingerprint below its cap or with an escalation left, runnable
@@ -28,6 +28,8 @@ Fully escalated fingerprints park unless remaining owner is human.
28
28
 
29
29
  ## Not stops: internal technical routing
30
30
 
31
+ AFK + `status=running` + an internal phase `next_action` is not a stop. `devrites-engine check continuation` prints `required` for that cursor and `clear` for `$rite-ship`, `awaiting_human`, a question cursor, or an open blocking or escalating question.
32
+
31
33
  `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
32
34
  forward work, persists the return cursor, and invokes Plan repair plus Recovery
33
35
  Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
@@ -33,10 +33,10 @@ N_eff = min(
33
33
  ```
34
34
 
35
35
  Select **greedily in plan order** with
36
- `devrites-engine parallel select --slug <slug> --cap N --from-plan`: the engine
37
- reads the ready set (tasks.md dependencies checked `built` in `state.md`, minus
38
- running-lease slices) and each slice's Writer allowlist (else `Files likely
39
- touched`), plus its manifest/lockfile when `External dependencies:` is not none;
36
+ `devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
37
+ (dependencies `built`, minus running-lease slices), Writer allowlist
38
+ (else Files likely touched), plus manifest/lockfile when `External dependencies:`
39
+ names a package (`none*`, existing, or no-new prose without a coordinate);
40
40
  `next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
41
41
  With a running lease, a single new pick still uses `parallel add`;
42
42
  `n_eff=0` with a running lease waits for siblings, not Prove. Without one:
@@ -73,7 +73,7 @@ Before `parallel select`, add each slice's hidden write surfaces (list owner:
73
73
  [repository-topology.md § Ownership rules](../../devrites-lib/reference/standards/repository-topology.md#ownership-rules))
74
74
  — lockfile/manifest, the generated target of an edited source, migration chain,
75
75
  snapshot directory, formatter sweep — and compare paths case-folded
76
- (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile itself.
76
+ (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
77
77
  Slices colliding on either run serially; the rest
78
78
  stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
79
79
  with `max_parallel ≥ 2`, `dispatch open` refuses a first-round build wright wave
@@ -26,6 +26,9 @@ individually or in one named group, so reviewers can `git diff` those paths.
26
26
 
27
27
  Active `/rite-autocomplete` consumes green checkpoints/`next_action` internally.
28
28
  Continue execution or tool progress; never end with a text-only final reply between green phases.
29
+ Before that reply, `devrites-engine check continuation` must say `continuation: clear`.
30
+ `required` means invoke `invoke:` now; exit 0 is not a pause. **Failing case:**
31
+ `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
29
32
 
30
33
  Standalone HITL mid-flight replies follow the same economy:
31
34
 
@@ -154,13 +154,17 @@ pending slices. Each Autocomplete invocation owns internal backtracking. Context
154
154
  not create a stop; persist and resume the cursor.
155
155
 
156
156
  Reply only at final state: text-only turns end the run. Keep
157
- calling tools after compaction or phase changes. Use one line:
157
+ calling tools after compaction or phase changes. Before any user-visible reply,
158
+ `devrites-engine check continuation` must print `continuation: clear`
159
+ (`handoff` prints the same lines). `required` means invoke `invoke:` now.
160
+ `stopped` is not a phase token. Print this card only after `clear`:
158
161
 
159
162
  ```text
160
163
  Autocomplete: <slug>
161
- spec <done|stopped> · clarify <clear|stopped> · temper <done|stopped> · define <done|stopped> · vet <ready|stopped> · build <n/N|stopped> · prove <done|stopped> · polish <done|stopped> · review <done|stopped> · seal <GO|NO-GO|stopped>
164
+ spec done · clarify clear · temper done · define done · vet ready · build n/N · prove — · polish — · review — · seal —
162
165
  ```
163
166
 
164
- Final state: `Shipped`, `Stopped`, `Awaiting human`, `NO-GO`, or `GO`; no narrative
165
- recap. Require clean or accepted baseline; land local unpushed checkpoints after
166
- each green check; never auto-pass red gates.
167
+ Final state, only after `clear`: `Shipped`, `Stopped`, `Awaiting human`,
168
+ `NO-GO`, or `GO`; no narrative recap. Require clean or accepted baseline; land
169
+ local unpushed checkpoints after each green check; never auto-pass red gates.
170
+ **Failing case:** `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
@@ -149,6 +149,7 @@ and park it after three escalations while independent work continues.
149
149
 
150
150
  Green slice/phase checkpoints consume their recorded `next_action` internally;
151
151
  only the caller replies finally at completion or a genuine stop.
152
+ Before a reply, `devrites-engine check continuation` must print `continuation: clear`; `required` means invoke `invoke:` now.
152
153
  No user-facing reply is permitted while durable state contains agent-owned
153
154
  `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
154
155
  Critical/Important fingerprint below its cap or with an escalation left, runnable
@@ -28,6 +28,8 @@ Fully escalated fingerprints park unless remaining owner is human.
28
28
 
29
29
  ## Not stops: internal technical routing
30
30
 
31
+ AFK + `status=running` + an internal phase `next_action` is not a stop. `devrites-engine check continuation` prints `required` for that cursor and `clear` for `/rite-ship`, `awaiting_human`, a question cursor, or an open blocking or escalating question.
32
+
31
33
  `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
32
34
  forward work, persists the return cursor, and invokes Plan repair plus Recovery
33
35
  Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
@@ -33,10 +33,10 @@ N_eff = min(
33
33
  ```
34
34
 
35
35
  Select **greedily in plan order** with
36
- `devrites-engine parallel select --slug <slug> --cap N --from-plan`: the engine
37
- reads the ready set (tasks.md dependencies checked `built` in `state.md`, minus
38
- running-lease slices) and each slice's Writer allowlist (else `Files likely
39
- touched`), plus its manifest/lockfile when `External dependencies:` is not none;
36
+ `devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
37
+ (dependencies `built`, minus running-lease slices), Writer allowlist
38
+ (else Files likely touched), plus manifest/lockfile when `External dependencies:`
39
+ names a package (`none*`, existing, or no-new prose without a coordinate);
40
40
  `next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
41
41
  With a running lease, a single new pick still uses `parallel add`;
42
42
  `n_eff=0` with a running lease waits for siblings, not Prove. Without one:
@@ -73,7 +73,7 @@ Before `parallel select`, add each slice's hidden write surfaces (list owner:
73
73
  [repository-topology.md § Ownership rules](../../devrites-lib/reference/standards/repository-topology.md#ownership-rules))
74
74
  — lockfile/manifest, the generated target of an edited source, migration chain,
75
75
  snapshot directory, formatter sweep — and compare paths case-folded
76
- (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile itself.
76
+ (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
77
77
  Slices colliding on either run serially; the rest
78
78
  stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
79
79
  with `max_parallel ≥ 2`, `dispatch open` refuses a first-round build wright wave
@@ -26,6 +26,9 @@ individually or in one named group, so reviewers can `git diff` those paths.
26
26
 
27
27
  Active `/rite-autocomplete` consumes green checkpoints/`next_action` internally.
28
28
  Continue execution or tool progress; never end with a text-only final reply between green phases.
29
+ Before that reply, `devrites-engine check continuation` must say `continuation: clear`.
30
+ `required` means invoke `invoke:` now; exit 0 is not a pause. **Failing case:**
31
+ `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
29
32
 
30
33
  Standalone HITL mid-flight replies follow the same economy:
31
34
 
@@ -155,13 +155,17 @@ pending slices. Each Autocomplete invocation owns internal backtracking. Context
155
155
  not create a stop; persist and resume the cursor.
156
156
 
157
157
  Reply only at final state: text-only turns end the run. Keep
158
- calling tools after compaction or phase changes. Use one line:
158
+ calling tools after compaction or phase changes. Before any user-visible reply,
159
+ `devrites-engine check continuation` must print `continuation: clear`
160
+ (`handoff` prints the same lines). `required` means invoke `invoke:` now.
161
+ `stopped` is not a phase token. Print this card only after `clear`:
159
162
 
160
163
  ```text
161
164
  Autocomplete: <slug>
162
- spec <done|stopped> · clarify <clear|stopped> · temper <done|stopped> · define <done|stopped> · vet <ready|stopped> · build <n/N|stopped> · prove <done|stopped> · polish <done|stopped> · review <done|stopped> · seal <GO|NO-GO|stopped>
165
+ spec done · clarify clear · temper done · define done · vet ready · build n/N · prove — · polish — · review — · seal —
163
166
  ```
164
167
 
165
- Final state: `Shipped`, `Stopped`, `Awaiting human`, `NO-GO`, or `GO`; no narrative
166
- recap. Require clean or accepted baseline; land local unpushed checkpoints after
167
- each green check; never auto-pass red gates.
168
+ Final state, only after `clear`: `Shipped`, `Stopped`, `Awaiting human`,
169
+ `NO-GO`, or `GO`; no narrative recap. Require clean or accepted baseline; land
170
+ local unpushed checkpoints after each green check; never auto-pass red gates.
171
+ **Failing case:** `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
@@ -149,6 +149,7 @@ and park it after three escalations while independent work continues.
149
149
 
150
150
  Green slice/phase checkpoints consume their recorded `next_action` internally;
151
151
  only the caller replies finally at completion or a genuine stop.
152
+ Before a reply, `devrites-engine check continuation` must print `continuation: clear`; `required` means invoke `invoke:` now.
152
153
  No user-facing reply is permitted while durable state contains agent-owned
153
154
  `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
154
155
  Critical/Important fingerprint below its cap or with an escalation left, runnable
@@ -28,6 +28,8 @@ Fully escalated fingerprints park unless remaining owner is human.
28
28
 
29
29
  ## Not stops: internal technical routing
30
30
 
31
+ AFK + `status=running` + an internal phase `next_action` is not a stop. `devrites-engine check continuation` prints `required` for that cursor and `clear` for `/rite-ship`, `awaiting_human`, a question cursor, or an open blocking or escalating question.
32
+
31
33
  `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
32
34
  forward work, persists the return cursor, and invokes Plan repair plus Recovery
33
35
  Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
@@ -33,10 +33,10 @@ N_eff = min(
33
33
  ```
34
34
 
35
35
  Select **greedily in plan order** with
36
- `devrites-engine parallel select --slug <slug> --cap N --from-plan`: the engine
37
- reads the ready set (tasks.md dependencies checked `built` in `state.md`, minus
38
- running-lease slices) and each slice's Writer allowlist (else `Files likely
39
- touched`), plus its manifest/lockfile when `External dependencies:` is not none;
36
+ `devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
37
+ (dependencies `built`, minus running-lease slices), Writer allowlist
38
+ (else Files likely touched), plus manifest/lockfile when `External dependencies:`
39
+ names a package (`none*`, existing, or no-new prose without a coordinate);
40
40
  `next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
41
41
  With a running lease, a single new pick still uses `parallel add`;
42
42
  `n_eff=0` with a running lease waits for siblings, not Prove. Without one:
@@ -73,7 +73,7 @@ Before `parallel select`, add each slice's hidden write surfaces (list owner:
73
73
  [repository-topology.md § Ownership rules](../../devrites-lib/reference/standards/repository-topology.md#ownership-rules))
74
74
  — lockfile/manifest, the generated target of an edited source, migration chain,
75
75
  snapshot directory, formatter sweep — and compare paths case-folded
76
- (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile itself.
76
+ (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
77
77
  Slices colliding on either run serially; the rest
78
78
  stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
79
79
  with `max_parallel ≥ 2`, `dispatch open` refuses a first-round build wright wave
@@ -26,6 +26,9 @@ individually or in one named group, so reviewers can `git diff` those paths.
26
26
 
27
27
  Active `/rite-autocomplete` consumes green checkpoints/`next_action` internally.
28
28
  Continue execution or tool progress; never end with a text-only final reply between green phases.
29
+ Before that reply, `devrites-engine check continuation` must say `continuation: clear`.
30
+ `required` means invoke `invoke:` now; exit 0 is not a pause. **Failing case:**
31
+ `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
29
32
 
30
33
  Standalone HITL mid-flight replies follow the same economy:
31
34
 
@@ -155,13 +155,17 @@ pending slices. Each Autocomplete invocation owns internal backtracking. Context
155
155
  not create a stop; persist and resume the cursor.
156
156
 
157
157
  Reply only at final state: text-only turns end the run. Keep
158
- calling tools after compaction or phase changes. Use one line:
158
+ calling tools after compaction or phase changes. Before any user-visible reply,
159
+ `devrites-engine check continuation` must print `continuation: clear`
160
+ (`handoff` prints the same lines). `required` means invoke `invoke:` now.
161
+ `stopped` is not a phase token. Print this card only after `clear`:
159
162
 
160
163
  ```text
161
164
  Autocomplete: <slug>
162
- spec <done|stopped> · clarify <clear|stopped> · temper <done|stopped> · define <done|stopped> · vet <ready|stopped> · build <n/N|stopped> · prove <done|stopped> · polish <done|stopped> · review <done|stopped> · seal <GO|NO-GO|stopped>
165
+ spec done · clarify clear · temper done · define done · vet ready · build n/N · prove — · polish — · review — · seal —
163
166
  ```
164
167
 
165
- Final state: `Shipped`, `Stopped`, `Awaiting human`, `NO-GO`, or `GO`; no narrative
166
- recap. Require clean or accepted baseline; land local unpushed checkpoints after
167
- each green check; never auto-pass red gates.
168
+ Final state, only after `clear`: `Shipped`, `Stopped`, `Awaiting human`,
169
+ `NO-GO`, or `GO`; no narrative recap. Require clean or accepted baseline; land
170
+ local unpushed checkpoints after each green check; never auto-pass red gates.
171
+ **Failing case:** `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
@@ -149,6 +149,7 @@ and park it after three escalations while independent work continues.
149
149
 
150
150
  Green slice/phase checkpoints consume their recorded `next_action` internally;
151
151
  only the caller replies finally at completion or a genuine stop.
152
+ Before a reply, `devrites-engine check continuation` must print `continuation: clear`; `required` means invoke `invoke:` now.
152
153
  No user-facing reply is permitted while durable state contains agent-owned
153
154
  `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
154
155
  Critical/Important fingerprint below its cap or with an escalation left, runnable
@@ -28,6 +28,8 @@ Fully escalated fingerprints park unless remaining owner is human.
28
28
 
29
29
  ## Not stops: internal technical routing
30
30
 
31
+ AFK + `status=running` + an internal phase `next_action` is not a stop. `devrites-engine check continuation` prints `required` for that cursor and `clear` for `/rite-ship`, `awaiting_human`, a question cursor, or an open blocking or escalating question.
32
+
31
33
  `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
32
34
  forward work, persists the return cursor, and invokes Plan repair plus Recovery
33
35
  Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
@@ -33,10 +33,10 @@ N_eff = min(
33
33
  ```
34
34
 
35
35
  Select **greedily in plan order** with
36
- `devrites-engine parallel select --slug <slug> --cap N --from-plan`: the engine
37
- reads the ready set (tasks.md dependencies checked `built` in `state.md`, minus
38
- running-lease slices) and each slice's Writer allowlist (else `Files likely
39
- touched`), plus its manifest/lockfile when `External dependencies:` is not none;
36
+ `devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
37
+ (dependencies `built`, minus running-lease slices), Writer allowlist
38
+ (else Files likely touched), plus manifest/lockfile when `External dependencies:`
39
+ names a package (`none*`, existing, or no-new prose without a coordinate);
40
40
  `next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
41
41
  With a running lease, a single new pick still uses `parallel add`;
42
42
  `n_eff=0` with a running lease waits for siblings, not Prove. Without one:
@@ -73,7 +73,7 @@ Before `parallel select`, add each slice's hidden write surfaces (list owner:
73
73
  [repository-topology.md § Ownership rules](skill://devrites-lib/reference/standards/repository-topology.md#ownership-rules))
74
74
  — lockfile/manifest, the generated target of an edited source, migration chain,
75
75
  snapshot directory, formatter sweep — and compare paths case-folded
76
- (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile itself.
76
+ (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
77
77
  Slices colliding on either run serially; the rest
78
78
  stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
79
79
  with `max_parallel ≥ 2`, `dispatch open` refuses a first-round build wright wave
@@ -26,6 +26,9 @@ individually or in one named group, so reviewers can `git diff` those paths.
26
26
 
27
27
  Active `/rite-autocomplete` consumes green checkpoints/`next_action` internally.
28
28
  Continue execution or tool progress; never end with a text-only final reply between green phases.
29
+ Before that reply, `devrites-engine check continuation` must say `continuation: clear`.
30
+ `required` means invoke `invoke:` now; exit 0 is not a pause. **Failing case:**
31
+ `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
29
32
 
30
33
  Standalone HITL mid-flight replies follow the same economy:
31
34
 
@@ -155,13 +155,17 @@ pending slices. Each Autocomplete invocation owns internal backtracking. Context
155
155
  not create a stop; persist and resume the cursor.
156
156
 
157
157
  Reply only at final state: text-only turns end the run. Keep
158
- calling tools after compaction or phase changes. Use one line:
158
+ calling tools after compaction or phase changes. Before any user-visible reply,
159
+ `devrites-engine check continuation` must print `continuation: clear`
160
+ (`handoff` prints the same lines). `required` means invoke `invoke:` now.
161
+ `stopped` is not a phase token. Print this card only after `clear`:
159
162
 
160
163
  ```text
161
164
  Autocomplete: <slug>
162
- spec <done|stopped> · clarify <clear|stopped> · temper <done|stopped> · define <done|stopped> · vet <ready|stopped> · build <n/N|stopped> · prove <done|stopped> · polish <done|stopped> · review <done|stopped> · seal <GO|NO-GO|stopped>
165
+ spec done · clarify clear · temper done · define done · vet ready · build n/N · prove — · polish — · review — · seal —
163
166
  ```
164
167
 
165
- Final state: `Shipped`, `Stopped`, `Awaiting human`, `NO-GO`, or `GO`; no narrative
166
- recap. Require clean or accepted baseline; land local unpushed checkpoints after
167
- each green check; never auto-pass red gates.
168
+ Final state, only after `clear`: `Shipped`, `Stopped`, `Awaiting human`,
169
+ `NO-GO`, or `GO`; no narrative recap. Require clean or accepted baseline; land
170
+ local unpushed checkpoints after each green check; never auto-pass red gates.
171
+ **Failing case:** `vet stopped` plus `Resume: /rite-vet` while the check says `required`.
@@ -149,6 +149,7 @@ and park it after three escalations while independent work continues.
149
149
 
150
150
  Green slice/phase checkpoints consume their recorded `next_action` internally;
151
151
  only the caller replies finally at completion or a genuine stop.
152
+ Before a reply, `devrites-engine check continuation` must print `continuation: clear`; `required` means invoke `invoke:` now.
152
153
  No user-facing reply is permitted while durable state contains agent-owned
153
154
  `NEEDS_REPLAN`, an intermediate Plan/Vet action, a distinct retained
154
155
  Critical/Important fingerprint below its cap or with an escalation left, runnable
@@ -28,6 +28,8 @@ Fully escalated fingerprints park unless remaining owner is human.
28
28
 
29
29
  ## Not stops: internal technical routing
30
30
 
31
+ AFK + `status=running` + an internal phase `next_action` is not a stop. `devrites-engine check continuation` prints `required` for that cursor and `clear` for `/rite-ship`, `awaiting_human`, a question cursor, or an open blocking or escalating question.
32
+
31
33
  `NEEDS_REPLAN` is not a stop condition under active Autocomplete. It blocks
32
34
  forward work, persists the return cursor, and invokes Plan repair plus Recovery
33
35
  Vet inline. The same applies to nested `STOP`/`Next step` when its decision is
@@ -33,10 +33,10 @@ N_eff = min(
33
33
  ```
34
34
 
35
35
  Select **greedily in plan order** with
36
- `devrites-engine parallel select --slug <slug> --cap N --from-plan`: the engine
37
- reads the ready set (tasks.md dependencies checked `built` in `state.md`, minus
38
- running-lease slices) and each slice's Writer allowlist (else `Files likely
39
- touched`), plus its manifest/lockfile when `External dependencies:` is not none;
36
+ `devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
37
+ (dependencies `built`, minus running-lease slices), Writer allowlist
38
+ (else Files likely touched), plus manifest/lockfile when `External dependencies:`
39
+ names a package (`none*`, existing, or no-new prose without a coordinate);
40
40
  `next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
41
41
  With a running lease, a single new pick still uses `parallel add`;
42
42
  `n_eff=0` with a running lease waits for siblings, not Prove. Without one:
@@ -73,7 +73,7 @@ Before `parallel select`, add each slice's hidden write surfaces (list owner:
73
73
  [repository-topology.md § Ownership rules](../../devrites-lib/reference/standards/repository-topology.md#ownership-rules))
74
74
  — lockfile/manifest, the generated target of an edited source, migration chain,
75
75
  snapshot directory, formatter sweep — and compare paths case-folded
76
- (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile itself.
76
+ (`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
77
77
  Slices colliding on either run serially; the rest
78
78
  stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
79
79
  with `max_parallel ≥ 2`, `dispatch open` refuses a first-round build wright wave
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devrites",
3
- "version": "7.2.4",
3
+ "version": "7.2.6",
4
4
  "description": "DevRites: a disciplined senior-engineer workflow pack for Claude Code, Codex, omp, pi, and Devin CLI",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://github.com/ViktorsBaikers/DevRites#readme",