devrites 7.2.3 → 7.2.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 (93) hide show
  1. package/CHANGELOG.md +12 -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 +2 -1
  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/gate/gate.go +6 -0
  10. package/engine/internal/gate/workflow_only.go +335 -0
  11. package/engine/internal/lib/continuation.go +131 -0
  12. package/engine/internal/lib/handoff.go +6 -0
  13. package/engine/internal/state/taskgraph.go +19 -4
  14. package/engine/main.go +4 -0
  15. package/pack/.claude/agents/devrites-plan-drafter.md +5 -1
  16. package/pack/.claude/agents/devrites-plan-reviewer.md +7 -0
  17. package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +3 -0
  18. package/pack/.claude/skills/devrites-lib/reference/standards/workflow-artifacts.md +37 -7
  19. package/pack/.claude/skills/rite-autocomplete/SKILL.md +9 -5
  20. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +1 -0
  21. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  22. package/pack/.claude/skills/rite-define/SKILL.md +7 -0
  23. package/pack/.claude/skills/rite-define/reference/plan-template.md +6 -0
  24. package/pack/.claude/skills/rite-vet/SKILL.md +9 -2
  25. package/pack/.claude/skills/rite-vet/reference/artifacts.md +7 -0
  26. package/pack/generated/claude/agents/devrites-plan-drafter.md +5 -1
  27. package/pack/generated/claude/agents/devrites-plan-reviewer.md +7 -0
  28. package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +3 -0
  29. package/pack/generated/claude/skills/devrites-lib/reference/standards/workflow-artifacts.md +37 -7
  30. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +9 -5
  31. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +1 -0
  32. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  33. package/pack/generated/claude/skills/rite-define/SKILL.md +7 -0
  34. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +6 -0
  35. package/pack/generated/claude/skills/rite-vet/SKILL.md +9 -2
  36. package/pack/generated/claude/skills/rite-vet/reference/artifacts.md +7 -0
  37. package/pack/generated/codex/agents/devrites-plan-drafter.toml +5 -1
  38. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +7 -0
  39. package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +3 -0
  40. package/pack/generated/codex/skills/devrites-lib/reference/standards/workflow-artifacts.md +37 -7
  41. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +9 -5
  42. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +1 -0
  43. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  44. package/pack/generated/codex/skills/rite-define/SKILL.md +7 -0
  45. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +6 -0
  46. package/pack/generated/codex/skills/rite-vet/SKILL.md +9 -2
  47. package/pack/generated/codex/skills/rite-vet/reference/artifacts.md +7 -0
  48. package/pack/generated/devin/agents/devrites-plan-drafter.md +5 -1
  49. package/pack/generated/devin/agents/devrites-plan-reviewer.md +7 -0
  50. package/pack/generated/devin/skills/devrites-lib/reference/reply-contract.md +3 -0
  51. package/pack/generated/devin/skills/devrites-lib/reference/standards/workflow-artifacts.md +37 -7
  52. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +9 -5
  53. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +1 -0
  54. package/pack/generated/devin/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  55. package/pack/generated/devin/skills/rite-define/SKILL.md +7 -0
  56. package/pack/generated/devin/skills/rite-define/reference/plan-template.md +6 -0
  57. package/pack/generated/devin/skills/rite-vet/SKILL.md +9 -2
  58. package/pack/generated/devin/skills/rite-vet/reference/artifacts.md +7 -0
  59. package/pack/generated/dsh/agents/devrites-plan-drafter.md +5 -1
  60. package/pack/generated/dsh/agents/devrites-plan-reviewer.md +7 -0
  61. package/pack/generated/dsh/runtime/cordis.patch.yml +2 -2
  62. package/pack/generated/dsh/skills/devrites-lib/reference/reply-contract.md +3 -0
  63. package/pack/generated/dsh/skills/devrites-lib/reference/standards/workflow-artifacts.md +37 -7
  64. package/pack/generated/dsh/skills/rite-autocomplete/SKILL.md +9 -5
  65. package/pack/generated/dsh/skills/rite-autocomplete/reference/loop.md +1 -0
  66. package/pack/generated/dsh/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  67. package/pack/generated/dsh/skills/rite-define/SKILL.md +7 -0
  68. package/pack/generated/dsh/skills/rite-define/reference/plan-template.md +6 -0
  69. package/pack/generated/dsh/skills/rite-vet/SKILL.md +9 -2
  70. package/pack/generated/dsh/skills/rite-vet/reference/artifacts.md +7 -0
  71. package/pack/generated/omp/agents/devrites-plan-drafter.md +5 -1
  72. package/pack/generated/omp/agents/devrites-plan-reviewer.md +7 -0
  73. package/pack/generated/omp/skills/devrites-lib/reference/reply-contract.md +3 -0
  74. package/pack/generated/omp/skills/devrites-lib/reference/standards/workflow-artifacts.md +37 -7
  75. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +9 -5
  76. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +1 -0
  77. package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  78. package/pack/generated/omp/skills/rite-define/SKILL.md +7 -0
  79. package/pack/generated/omp/skills/rite-define/reference/plan-template.md +6 -0
  80. package/pack/generated/omp/skills/rite-vet/SKILL.md +9 -2
  81. package/pack/generated/omp/skills/rite-vet/reference/artifacts.md +7 -0
  82. package/pack/generated/pi/agents/devrites-plan-drafter.md +5 -1
  83. package/pack/generated/pi/agents/devrites-plan-reviewer.md +7 -0
  84. package/pack/generated/pi/skills/devrites-lib/reference/reply-contract.md +3 -0
  85. package/pack/generated/pi/skills/devrites-lib/reference/standards/workflow-artifacts.md +37 -7
  86. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +9 -5
  87. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +1 -0
  88. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +2 -0
  89. package/pack/generated/pi/skills/rite-define/SKILL.md +7 -0
  90. package/pack/generated/pi/skills/rite-define/reference/plan-template.md +6 -0
  91. package/pack/generated/pi/skills/rite-vet/SKILL.md +9 -2
  92. package/pack/generated/pi/skills/rite-vet/reference/artifacts.md +7 -0
  93. package/package.json +1 -1
@@ -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
  }
@@ -21,10 +21,11 @@ type TaskSlice struct {
21
21
 
22
22
  // TaskGraphResult is the deterministic outcome of parsing a tasks.md slice graph.
23
23
  type TaskGraphResult struct {
24
- Slices []TaskSlice
25
- Cycle []string // empty when acyclic
26
- Unknown []string // dependency ids with no defining slice
27
- Problems []string // human-readable blockers
24
+ WorkflowOnly bool // explicit work scope, never inferred from an empty graph
25
+ Slices []TaskSlice
26
+ Cycle []string // empty when acyclic
27
+ Unknown []string // dependency ids with no defining slice
28
+ Problems []string // human-readable blockers
28
29
  }
29
30
 
30
31
  var (
@@ -72,6 +73,20 @@ func ParseTaskGraph(tasksMarkdown []byte) TaskGraphResult {
72
73
  }
73
74
 
74
75
  headers := sliceHeaderRE.FindAllStringSubmatchIndex(text, -1)
76
+ markers := 0
77
+ for _, line := range strings.Split(strings.ReplaceAll(text, "\r\n", "\n"), "\n") {
78
+ if line == "Work scope: workflow-only" {
79
+ markers++
80
+ }
81
+ }
82
+ if markers > 0 {
83
+ if markers != 1 || len(headers) != 0 {
84
+ result.Problems = append(result.Problems, "workflow-only scope requires exactly one marker and zero SLICE-### sections")
85
+ return result
86
+ }
87
+ result.WorkflowOnly = true
88
+ return result
89
+ }
75
90
  if len(headers) == 0 {
76
91
  result.Problems = append(result.Problems, "no SLICE-### sections found")
77
92
  return result
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":
@@ -23,7 +23,11 @@ seams supplied by the orchestrator.
23
23
  Reuse existing seams and dependencies before proposing new ones. Per
24
24
  `.claude/skills/devrites-lib/reference/standards/code-navigation.md`, map seams with `get_architecture`, find reuse
25
25
  with `search_graph`, and size blast radius with `trace_path` (`direction: "inbound"`). Build vertical
26
- slices in dependency order; put a hub file's shared edit in one seam slice
26
+ slices in dependency order for product work. For explicit workflow-only scope,
27
+ follow [workflow-artifacts.md](../skills/devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning):
28
+ map every REQ/AC to WA behavior and proof, retain zero product slices and empty
29
+ product candidate, never fabricate slices. Product slice rules below apply only
30
+ to product work; put a hub file's shared edit in one seam slice
27
31
  ([slicing.md](../skills/rite-plan/reference/slicing.md#slice-independence)). Map every REQ and AC to a slice and executable proof,
28
32
  name rollback and failure paths; keep acceptance-changing proposals separate. Each proof
29
33
  row quotes the spec line or standard rule it proves (`Proves`); proof that proves none
@@ -32,6 +32,13 @@ Per `.claude/skills/devrites-lib/reference/standards/code-navigation.md`, check
32
32
  placement with `get_architecture`, reuse with `search_graph`, and blast radius with
33
33
  `trace_path` (`direction: "inbound"`); fall back to Read/Grep/Glob.
34
34
 
35
+ For explicit workflow-only tasks, also read `test-plan.md` and follow
36
+ [workflow-artifacts.md](../skills/devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning).
37
+ Review REQ/AC → admitted WA behavior/proof, admission completeness and root ownership
38
+ instead of product slice writer/closure checks. Zero product slices and empty
39
+ candidate are valid; do not demand fabricated slices or Build dispatch. Apply
40
+ all seven dimensions to the workflow behaviors and proof.
41
+
35
42
  ## Score the seven dimensions
36
43
  For each dimension, **cite the evidence first**, including an absent plan or spec
37
44
  line, and then assign the band. Do not choose a score and justify it afterward:
@@ -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
 
@@ -4,9 +4,37 @@
4
4
 
5
5
  > Applies when: a plan declares root-authored executable workflow files.
6
6
 
7
- Workflow Artifact plans/isolates/proves; never enters product candidate/readiness/
8
- built count or authorizes consumption. Module owns semantics; callers retain only
9
- link and entry/return.
7
+ Workflow Artifact plans/isolates/proves; never enters the product candidate or
8
+ built count and never authorizes consumption. Workspace planning readiness binds
9
+ its admission and proof references, not executable bytes as product changes.
10
+ Module owns semantics; callers retain only link and entry/return.
11
+
12
+ ## Workflow-only planning
13
+
14
+ For exclusively root-owned executable workflow work, put the exact standalone
15
+ line `Work scope: workflow-only` outside fences in `tasks.md`, with zero
16
+ `## SLICE-###` sections. Empty tasks never imply this scope; mixed marker plus
17
+ product slices is invalid. Keep ordinary spec AC IDs. In both `tasks.md` and
18
+ `test-plan.md`, map every AC in two-cell rows `| AC-001 | WA-BEH-ID |` (backticks
19
+ around the behavior ID are optional); `traceability.md` maps REQ/AC → that same
20
+ behavior → proof → evidence. Define may name the planned behaviors before Vet
21
+ admits them; Vet requires every mapped behavior in the admission below.
22
+
23
+ Use the existing empty product representation in `touched-files.md`:
24
+ `## Candidate manifest`, then `No project files.`, plus required `## Touched files`.
25
+ Do not add workflow targets to the product manifest or invent slices. Define
26
+ retains architecture/plan/tasks/traceability; Vet checks Workflow Artifact
27
+ admission instead of product slice writer/closure checks. No Build/wright dispatch,
28
+ built checkpoint, or ACTIVE switch. Product and mixed product work keep ordinary
29
+ slice contracts; product writers still cannot write `.devrites`.
30
+
31
+ Readiness at Vet and later checks admission structure, bounds, workspace-relative
32
+ paths, ownership namespace, and referenced behavior/interface/fixtures. Ordinary
33
+ `Readiness inputs SHA-256` binds current tasks and test-plan; editing admission or
34
+ references makes READY stale. Do not embed that digest into its own bound inputs.
35
+ This planning check does not open targets or authorize execution: native preflight
36
+ still validates resolved paths, symlinks, trusted bytes, content limits and all
37
+ transaction safety before mutation.
10
38
 
11
39
  ## Contents
12
40
 
@@ -72,12 +100,14 @@ configuration,performance`; positive `setup,action,expected`; failure
72
100
  mutation reject placeholders, missing/extra/reordered fields, duplicates, and
73
101
  referenced-empty blocks.
74
102
 
75
- Proof command=one unchanged trusted Vet-approved repository command; exclude `;`,
76
- `&&`, `||`, newline, unescaped/list-separator `|`. Cwd=`repository-root` or
103
+ Proof command=one unchanged trusted Vet-approved repository command; exclude newline
104
+ and unquoted/unescaped `;|&`. Planning permits quoted/escaped operators;
105
+ substitutions reject all `;|&` data. Cwd=`repository-root` or
77
106
  `active-workspace`. Signal=fixed printable ASCII without CR/LF, 1..128 bytes.
78
107
  Rollback=`restore-preimage-or-absence`. Evidence=unique comma-separated lowercase
79
- identifiers. `return_phase`=lifecycle phase; `return_next_action`=exact slash action
80
- bound to `active_slug`. Malformed admission/reference routes Plan/Vet before mutation.
108
+ identifiers. `return_phase`=lifecycle phase;
109
+ `return_next_action`=`/rite-[a-z0-9-]+ <active_slug>` exactly.
110
+ Malformed admission/reference routes Plan/Vet before mutation.
81
111
 
82
112
  Checked nonnegative arithmetic rejects overflow. Bounds: rows
83
113
  `1..target_count_limit`; per-target/aggregate content; `transaction_file_limit >=
@@ -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
@@ -34,6 +34,13 @@ Pull these via `Read` when shaping the plan:
34
34
  - Author one `architecture.md`/`plan.md` section at a time. Before slicing, use
35
35
  [`elicitation.md`](../devrites-lib/reference/standards/elicitation.md) Tournament for open
36
36
  designs and Delphi for uncertain estimates.
37
+ - **Workflow-only exception.** Follow
38
+ [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning)
39
+ before applying product slice rules below: explicit scope, zero product slices,
40
+ existing empty candidate, AC/REQ → WA behavior/proof mapping in tasks, traceability
41
+ and test-plan. Keep every AC; never fabricate a slice or dispatch Build for
42
+ root-owned workflow artifacts. Slice-count, slice-format, writer and cross-slice
43
+ requirements below apply only when product slices exist.
37
44
  - **Derive the slice count from the work.**
38
45
  One per independently-shippable increment, sized by [`slicing.md`](../rite-plan/reference/slicing.md); map every acceptance
39
46
  criterion. User counts are hints: explain honest differences, never pad/compress.
@@ -40,6 +40,12 @@ State strategy and rationale. For costly/hard-to-reverse boundaries, models, con
40
40
  or dependencies compare ≥2 `Option · Drivers · Trade-offs · Consequence`.
41
41
 
42
42
  ## Slice strategy
43
+ For explicit workflow-only scope, use zero product slices and the existing empty
44
+ candidate manifest (`No project files.` plus `## Touched files`). Map AC/REQ to
45
+ Workflow Artifact behaviors and proof, not invented slices; follow
46
+ [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning).
47
+ The following slice strategy applies to product work.
48
+
43
49
  List vertical `SLICE-###` increments, AC coverage, and risk-first order within dependency
44
50
  tiers. Wide refactors use expand → green migrate batches → contract, or an integration
45
51
  branch + final verify slice.
@@ -138,7 +138,14 @@ plan declares a root-authored executable workflow file, read
138
138
  `devrites-engine check preconditions <slug>` (rows with `Run at` `vet`, including each
139
139
  `dependency-dry-run` and preserve-baseline row). A failure folds into Plan repair; only an
140
140
  owner-owned decision becomes a question, batched under the afk-hitl decision-chain rule.
141
- 4. **Audit readiness.** Goal-backward map every requirement, criterion, NFR,
141
+ 4. **Audit readiness.** For explicit workflow-only tasks, follow
142
+ [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning):
143
+ check AC/REQ → admitted WA behavior and executable proof, all admission fields,
144
+ fixtures, bounds and root ownership, not product slice writer/closure checks.
145
+ Keep empty product candidate and zero built slices; no Build/wright dispatch.
146
+ Missing/malformed admission routes Plan; stale admission requires fresh Vet and
147
+ ordinary readiness SHA binding. Never switch ACTIVE for a named workspace.
148
+ Otherwise goal-backward map every requirement, criterion, NFR,
142
149
  interaction, edge/prohibition, and decision row to one slice and executable
143
150
  proof. Verify UX/spec/architecture alignment, contracts, dependency order,
144
151
  slice independence/wiring, prerequisites, failure/observability/rollback, and
@@ -208,7 +215,7 @@ plan declares a root-authored executable workflow file, read
208
215
  `marker sweep:` line is recorded in `eng-review.md`; a kept hit blocks READY. Write phase/next step and emit one
209
216
  `Readiness inputs SHA-256` with
210
217
  `devrites-engine check readiness --emit-binding <slug>`; normal readiness check
211
- must pass, and it replays Build-entry `check slice` on every unbuilt slice, so
218
+ must pass; workflow-only checks admission instead. For product work it replays Build-entry `check slice` on every unbuilt slice, so
212
219
  READY needs each to pass (fix failures in `/rite-plan`). READY also needs every
213
220
  unbuilt slice's write set closed against the live tree (plan-reviewer
214
221
  dimension 6), so frontier gaps fold in one Plan repair, not one per slice; an
@@ -9,6 +9,13 @@ Authority: `.claude/skills/devrites-lib/reference/standards/acceptance-preservin
9
9
  <!-- include:../../devrites-lib/reference/_shared/reslice-vet.md -->
10
10
  <!-- END RESLICE ROUTE-TO-ACTION -->
11
11
 
12
+ For explicit workflow-only tasks, use
13
+ [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning):
14
+ AC → admitted WA behavior rows in tasks/test-plan; root-owned admission/proof
15
+ instead of product writer/slice rows. Keep readiness SHA binding, empty product
16
+ candidate and built counts unchanged. No Build dispatch. Product templates below
17
+ remain unchanged for product work.
18
+
12
19
  ## `eng-review.md`: the record
13
20
 
14
21
  Write/update `.devrites/work/<slug>/eng-review.md`; never clobber.
@@ -23,7 +23,11 @@ seams supplied by the orchestrator.
23
23
  Reuse existing seams and dependencies before proposing new ones. Per
24
24
  `.claude/skills/devrites-lib/reference/standards/code-navigation.md`, map seams with `get_architecture`, find reuse
25
25
  with `search_graph`, and size blast radius with `trace_path` (`direction: "inbound"`). Build vertical
26
- slices in dependency order; put a hub file's shared edit in one seam slice
26
+ slices in dependency order for product work. For explicit workflow-only scope,
27
+ follow [workflow-artifacts.md](../skills/devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning):
28
+ map every REQ/AC to WA behavior and proof, retain zero product slices and empty
29
+ product candidate, never fabricate slices. Product slice rules below apply only
30
+ to product work; put a hub file's shared edit in one seam slice
27
31
  ([slicing.md](../skills/rite-plan/reference/slicing.md#slice-independence)). Map every REQ and AC to a slice and executable proof,
28
32
  name rollback and failure paths; keep acceptance-changing proposals separate. Each proof
29
33
  row quotes the spec line or standard rule it proves (`Proves`); proof that proves none
@@ -38,6 +38,13 @@ Per `.claude/skills/devrites-lib/reference/standards/code-navigation.md`, check
38
38
  placement with `get_architecture`, reuse with `search_graph`, and blast radius with
39
39
  `trace_path` (`direction: "inbound"`); fall back to Read/Grep/Glob.
40
40
 
41
+ For explicit workflow-only tasks, also read `test-plan.md` and follow
42
+ [workflow-artifacts.md](../skills/devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning).
43
+ Review REQ/AC → admitted WA behavior/proof, admission completeness and root ownership
44
+ instead of product slice writer/closure checks. Zero product slices and empty
45
+ candidate are valid; do not demand fabricated slices or Build dispatch. Apply
46
+ all seven dimensions to the workflow behaviors and proof.
47
+
41
48
  ## Score the seven dimensions
42
49
  For each dimension, **cite the evidence first**, including an absent plan or spec
43
50
  line, and then assign the band. Do not choose a score and justify it afterward:
@@ -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
 
@@ -4,9 +4,37 @@
4
4
 
5
5
  > Applies when: a plan declares root-authored executable workflow files.
6
6
 
7
- Workflow Artifact plans/isolates/proves; never enters product candidate/readiness/
8
- built count or authorizes consumption. Module owns semantics; callers retain only
9
- link and entry/return.
7
+ Workflow Artifact plans/isolates/proves; never enters the product candidate or
8
+ built count and never authorizes consumption. Workspace planning readiness binds
9
+ its admission and proof references, not executable bytes as product changes.
10
+ Module owns semantics; callers retain only link and entry/return.
11
+
12
+ ## Workflow-only planning
13
+
14
+ For exclusively root-owned executable workflow work, put the exact standalone
15
+ line `Work scope: workflow-only` outside fences in `tasks.md`, with zero
16
+ `## SLICE-###` sections. Empty tasks never imply this scope; mixed marker plus
17
+ product slices is invalid. Keep ordinary spec AC IDs. In both `tasks.md` and
18
+ `test-plan.md`, map every AC in two-cell rows `| AC-001 | WA-BEH-ID |` (backticks
19
+ around the behavior ID are optional); `traceability.md` maps REQ/AC → that same
20
+ behavior → proof → evidence. Define may name the planned behaviors before Vet
21
+ admits them; Vet requires every mapped behavior in the admission below.
22
+
23
+ Use the existing empty product representation in `touched-files.md`:
24
+ `## Candidate manifest`, then `No project files.`, plus required `## Touched files`.
25
+ Do not add workflow targets to the product manifest or invent slices. Define
26
+ retains architecture/plan/tasks/traceability; Vet checks Workflow Artifact
27
+ admission instead of product slice writer/closure checks. No Build/wright dispatch,
28
+ built checkpoint, or ACTIVE switch. Product and mixed product work keep ordinary
29
+ slice contracts; product writers still cannot write `.devrites`.
30
+
31
+ Readiness at Vet and later checks admission structure, bounds, workspace-relative
32
+ paths, ownership namespace, and referenced behavior/interface/fixtures. Ordinary
33
+ `Readiness inputs SHA-256` binds current tasks and test-plan; editing admission or
34
+ references makes READY stale. Do not embed that digest into its own bound inputs.
35
+ This planning check does not open targets or authorize execution: native preflight
36
+ still validates resolved paths, symlinks, trusted bytes, content limits and all
37
+ transaction safety before mutation.
10
38
 
11
39
  ## Contents
12
40
 
@@ -72,12 +100,14 @@ configuration,performance`; positive `setup,action,expected`; failure
72
100
  mutation reject placeholders, missing/extra/reordered fields, duplicates, and
73
101
  referenced-empty blocks.
74
102
 
75
- Proof command=one unchanged trusted Vet-approved repository command; exclude `;`,
76
- `&&`, `||`, newline, unescaped/list-separator `|`. Cwd=`repository-root` or
103
+ Proof command=one unchanged trusted Vet-approved repository command; exclude newline
104
+ and unquoted/unescaped `;|&`. Planning permits quoted/escaped operators;
105
+ substitutions reject all `;|&` data. Cwd=`repository-root` or
77
106
  `active-workspace`. Signal=fixed printable ASCII without CR/LF, 1..128 bytes.
78
107
  Rollback=`restore-preimage-or-absence`. Evidence=unique comma-separated lowercase
79
- identifiers. `return_phase`=lifecycle phase; `return_next_action`=exact slash action
80
- bound to `active_slug`. Malformed admission/reference routes Plan/Vet before mutation.
108
+ identifiers. `return_phase`=lifecycle phase;
109
+ `return_next_action`=`/rite-[a-z0-9-]+ <active_slug>` exactly.
110
+ Malformed admission/reference routes Plan/Vet before mutation.
81
111
 
82
112
  Checked nonnegative arithmetic rejects overflow. Bounds: rows
83
113
  `1..target_count_limit`; per-target/aggregate content; `transaction_file_limit >=
@@ -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
@@ -34,6 +34,13 @@ Pull these via `Read` when shaping the plan:
34
34
  - Author one `architecture.md`/`plan.md` section at a time. Before slicing, use
35
35
  [`elicitation.md`](../devrites-lib/reference/standards/elicitation.md) Tournament for open
36
36
  designs and Delphi for uncertain estimates.
37
+ - **Workflow-only exception.** Follow
38
+ [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning)
39
+ before applying product slice rules below: explicit scope, zero product slices,
40
+ existing empty candidate, AC/REQ → WA behavior/proof mapping in tasks, traceability
41
+ and test-plan. Keep every AC; never fabricate a slice or dispatch Build for
42
+ root-owned workflow artifacts. Slice-count, slice-format, writer and cross-slice
43
+ requirements below apply only when product slices exist.
37
44
  - **Derive the slice count from the work.**
38
45
  One per independently-shippable increment, sized by [`slicing.md`](../rite-plan/reference/slicing.md); map every acceptance
39
46
  criterion. User counts are hints: explain honest differences, never pad/compress.
@@ -40,6 +40,12 @@ State strategy and rationale. For costly/hard-to-reverse boundaries, models, con
40
40
  or dependencies compare ≥2 `Option · Drivers · Trade-offs · Consequence`.
41
41
 
42
42
  ## Slice strategy
43
+ For explicit workflow-only scope, use zero product slices and the existing empty
44
+ candidate manifest (`No project files.` plus `## Touched files`). Map AC/REQ to
45
+ Workflow Artifact behaviors and proof, not invented slices; follow
46
+ [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning).
47
+ The following slice strategy applies to product work.
48
+
43
49
  List vertical `SLICE-###` increments, AC coverage, and risk-first order within dependency
44
50
  tiers. Wide refactors use expand → green migrate batches → contract, or an integration
45
51
  branch + final verify slice.
@@ -140,7 +140,14 @@ plan declares a root-authored executable workflow file, read
140
140
  `devrites-engine check preconditions <slug>` (rows with `Run at` `vet`, including each
141
141
  `dependency-dry-run` and preserve-baseline row). A failure folds into Plan repair; only an
142
142
  owner-owned decision becomes a question, batched under the afk-hitl decision-chain rule.
143
- 4. **Audit readiness.** Goal-backward map every requirement, criterion, NFR,
143
+ 4. **Audit readiness.** For explicit workflow-only tasks, follow
144
+ [`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning):
145
+ check AC/REQ → admitted WA behavior and executable proof, all admission fields,
146
+ fixtures, bounds and root ownership, not product slice writer/closure checks.
147
+ Keep empty product candidate and zero built slices; no Build/wright dispatch.
148
+ Missing/malformed admission routes Plan; stale admission requires fresh Vet and
149
+ ordinary readiness SHA binding. Never switch ACTIVE for a named workspace.
150
+ Otherwise goal-backward map every requirement, criterion, NFR,
144
151
  interaction, edge/prohibition, and decision row to one slice and executable
145
152
  proof. Verify UX/spec/architecture alignment, contracts, dependency order,
146
153
  slice independence/wiring, prerequisites, failure/observability/rollback, and
@@ -210,7 +217,7 @@ plan declares a root-authored executable workflow file, read
210
217
  `marker sweep:` line is recorded in `eng-review.md`; a kept hit blocks READY. Write phase/next step and emit one
211
218
  `Readiness inputs SHA-256` with
212
219
  `devrites-engine check readiness --emit-binding <slug>`; normal readiness check
213
- must pass, and it replays Build-entry `check slice` on every unbuilt slice, so
220
+ must pass; workflow-only checks admission instead. For product work it replays Build-entry `check slice` on every unbuilt slice, so
214
221
  READY needs each to pass (fix failures in `/rite-plan`). READY also needs every
215
222
  unbuilt slice's write set closed against the live tree (plan-reviewer
216
223
  dimension 6), so frontier gaps fold in one Plan repair, not one per slice; an
@@ -11,6 +11,13 @@ Authority: `.claude/skills/devrites-lib/reference/standards/acceptance-preservin
11
11
  - `BLOCKED_INPUT` → no planning writes; exact diagnostic; recover input; reclassify.
12
12
  <!-- END RESLICE ROUTE-TO-ACTION -->
13
13
 
14
+ For explicit workflow-only tasks, use
15
+ [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning):
16
+ AC → admitted WA behavior rows in tasks/test-plan; root-owned admission/proof
17
+ instead of product writer/slice rows. Keep readiness SHA binding, empty product
18
+ candidate and built counts unchanged. No Build dispatch. Product templates below
19
+ remain unchanged for product work.
20
+
14
21
  ## `eng-review.md`: the record
15
22
 
16
23
  Write/update `.devrites/work/<slug>/eng-review.md`; never clobber.
@@ -21,7 +21,11 @@ seams supplied by the orchestrator.
21
21
  Reuse existing seams and dependencies before proposing new ones. Per
22
22
  `.agents/skills/devrites-lib/reference/standards/code-navigation.md`, map seams with `get_architecture`, find reuse
23
23
  with `search_graph`, and size blast radius with `trace_path` (`direction: "inbound"`). Build vertical
24
- slices in dependency order; put a hub file's shared edit in one seam slice
24
+ slices in dependency order for product work. For explicit workflow-only scope,
25
+ follow [workflow-artifacts.md](.agents/skills/devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning):
26
+ map every REQ/AC to WA behavior and proof, retain zero product slices and empty
27
+ product candidate, never fabricate slices. Product slice rules below apply only
28
+ to product work; put a hub file's shared edit in one seam slice
25
29
  ([slicing.md](.agents/skills/rite-plan/reference/slicing.md#slice-independence)). Map every REQ and AC to a slice and executable proof,
26
30
  name rollback and failure paths; keep acceptance-changing proposals separate. Each proof
27
31
  row quotes the spec line or standard rule it proves (`Proves`); proof that proves none
@@ -36,6 +36,13 @@ Per `.agents/skills/devrites-lib/reference/standards/code-navigation.md`, check
36
36
  placement with `get_architecture`, reuse with `search_graph`, and blast radius with
37
37
  `trace_path` (`direction: "inbound"`); fall back to Read/Grep/Glob.
38
38
 
39
+ For explicit workflow-only tasks, also read `test-plan.md` and follow
40
+ [workflow-artifacts.md](.agents/skills/devrites-lib/reference/standards/workflow-artifacts.md#workflow-only-planning).
41
+ Review REQ/AC → admitted WA behavior/proof, admission completeness and root ownership
42
+ instead of product slice writer/closure checks. Zero product slices and empty
43
+ candidate are valid; do not demand fabricated slices or Build dispatch. Apply
44
+ all seven dimensions to the workflow behaviors and proof.
45
+
39
46
  ## Score the seven dimensions
40
47
  For each dimension, **cite the evidence first**, including an absent plan or spec
41
48
  line, and then assign the band. Do not choose a score and justify it afterward:
@@ -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
 
@@ -4,9 +4,37 @@
4
4
 
5
5
  > Applies when: a plan declares root-authored executable workflow files.
6
6
 
7
- Workflow Artifact plans/isolates/proves; never enters product candidate/readiness/
8
- built count or authorizes consumption. Module owns semantics; callers retain only
9
- link and entry/return.
7
+ Workflow Artifact plans/isolates/proves; never enters the product candidate or
8
+ built count and never authorizes consumption. Workspace planning readiness binds
9
+ its admission and proof references, not executable bytes as product changes.
10
+ Module owns semantics; callers retain only link and entry/return.
11
+
12
+ ## Workflow-only planning
13
+
14
+ For exclusively root-owned executable workflow work, put the exact standalone
15
+ line `Work scope: workflow-only` outside fences in `tasks.md`, with zero
16
+ `## SLICE-###` sections. Empty tasks never imply this scope; mixed marker plus
17
+ product slices is invalid. Keep ordinary spec AC IDs. In both `tasks.md` and
18
+ `test-plan.md`, map every AC in two-cell rows `| AC-001 | WA-BEH-ID |` (backticks
19
+ around the behavior ID are optional); `traceability.md` maps REQ/AC → that same
20
+ behavior → proof → evidence. Define may name the planned behaviors before Vet
21
+ admits them; Vet requires every mapped behavior in the admission below.
22
+
23
+ Use the existing empty product representation in `touched-files.md`:
24
+ `## Candidate manifest`, then `No project files.`, plus required `## Touched files`.
25
+ Do not add workflow targets to the product manifest or invent slices. Define
26
+ retains architecture/plan/tasks/traceability; Vet checks Workflow Artifact
27
+ admission instead of product slice writer/closure checks. No Build/wright dispatch,
28
+ built checkpoint, or ACTIVE switch. Product and mixed product work keep ordinary
29
+ slice contracts; product writers still cannot write `.devrites`.
30
+
31
+ Readiness at Vet and later checks admission structure, bounds, workspace-relative
32
+ paths, ownership namespace, and referenced behavior/interface/fixtures. Ordinary
33
+ `Readiness inputs SHA-256` binds current tasks and test-plan; editing admission or
34
+ references makes READY stale. Do not embed that digest into its own bound inputs.
35
+ This planning check does not open targets or authorize execution: native preflight
36
+ still validates resolved paths, symlinks, trusted bytes, content limits and all
37
+ transaction safety before mutation.
10
38
 
11
39
  ## Contents
12
40
 
@@ -72,12 +100,14 @@ configuration,performance`; positive `setup,action,expected`; failure
72
100
  mutation reject placeholders, missing/extra/reordered fields, duplicates, and
73
101
  referenced-empty blocks.
74
102
 
75
- Proof command=one unchanged trusted Vet-approved repository command; exclude `;`,
76
- `&&`, `||`, newline, unescaped/list-separator `|`. Cwd=`repository-root` or
103
+ Proof command=one unchanged trusted Vet-approved repository command; exclude newline
104
+ and unquoted/unescaped `;|&`. Planning permits quoted/escaped operators;
105
+ substitutions reject all `;|&` data. Cwd=`repository-root` or
77
106
  `active-workspace`. Signal=fixed printable ASCII without CR/LF, 1..128 bytes.
78
107
  Rollback=`restore-preimage-or-absence`. Evidence=unique comma-separated lowercase
79
- identifiers. `return_phase`=lifecycle phase; `return_next_action`=exact slash action
80
- bound to `active_slug`. Malformed admission/reference routes Plan/Vet before mutation.
108
+ identifiers. `return_phase`=lifecycle phase;
109
+ `return_next_action`=`/rite-[a-z0-9-]+ <active_slug>` exactly.
110
+ Malformed admission/reference routes Plan/Vet before mutation.
81
111
 
82
112
  Checked nonnegative arithmetic rejects overflow. Bounds: rows
83
113
  `1..target_count_limit`; per-target/aggregate content; `transaction_file_limit >=