devrites 5.3.0 → 5.5.0

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 (213) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/docs/command-map.md +2 -2
  4. package/docs/engine/state-schema.md +12 -0
  5. package/docs/flow.md +4 -0
  6. package/docs/orchestration.md +5 -2
  7. package/engine/commands.go +2 -2
  8. package/engine/internal/devritespaths/paths.go +15 -0
  9. package/engine/internal/gate/gate.go +78 -0
  10. package/engine/internal/gate/gate_test.go +118 -0
  11. package/engine/internal/lib/candidate.go +7 -3
  12. package/engine/internal/lib/manifest_union.go +326 -0
  13. package/engine/internal/lib/manifest_union_test.go +214 -0
  14. package/engine/internal/lib/observe_budgets.go +73 -0
  15. package/engine/internal/lib/observe_budgets_test.go +142 -0
  16. package/engine/internal/lib/observe_summary.go +74 -13
  17. package/engine/internal/lib/workspace_read.go +11 -6
  18. package/engine/internal/state/budgets.go +163 -0
  19. package/engine/internal/state/budgets_test.go +42 -0
  20. package/engine/internal/state/cursor.go +16 -10
  21. package/engine/internal/state/observation.go +50 -4
  22. package/engine/internal/state/status.go +38 -26
  23. package/engine/internal/state/taskgraph.go +23 -0
  24. package/engine/main.go +32 -13
  25. package/engine/root_routing_test.go +3 -1
  26. package/pack/.claude/agents/devrites-code-reviewer.md +9 -6
  27. package/pack/.claude/agents/devrites-doubt-reviewer.md +6 -0
  28. package/pack/.claude/agents/devrites-plan-reviewer.md +7 -1
  29. package/pack/.claude/agents/devrites-slice-wright.md +42 -46
  30. package/pack/.claude/agents/devrites-test-analyst.md +9 -4
  31. package/pack/.claude/agents/devrites-upgrade-planner.md +9 -1
  32. package/pack/.claude/settings.json +17 -0
  33. package/pack/.claude/skills/devrites-api-interface/SKILL.md +2 -2
  34. package/pack/.claude/skills/devrites-doubt/SKILL.md +9 -17
  35. package/pack/.claude/skills/devrites-lib/reference/candidate-integrity.md +34 -35
  36. package/pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md +11 -12
  37. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +104 -51
  38. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +1 -0
  39. package/pack/.claude/skills/devrites-lib/reference/standards/context-hygiene.md +45 -25
  40. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +1 -1
  41. package/pack/.claude/skills/devrites-lib/reference/workspace-artifact-schema.md +80 -41
  42. package/pack/.claude/skills/rite-autocomplete/SKILL.md +19 -8
  43. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +33 -1
  44. package/pack/.claude/skills/rite-build/SKILL.md +26 -17
  45. package/pack/.claude/skills/rite-build/reference/afk-discipline.md +1 -1
  46. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +101 -39
  47. package/pack/.claude/skills/rite-build/reference/phase-contract.md +79 -59
  48. package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +14 -15
  49. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +8 -8
  50. package/pack/.claude/skills/rite-define/SKILL.md +4 -1
  51. package/pack/.claude/skills/rite-plan/SKILL.md +4 -1
  52. package/pack/.claude/skills/rite-plan/reference/replan-and-repair.md +21 -0
  53. package/pack/.claude/skills/rite-plan/reference/slicing.md +117 -15
  54. package/pack/.claude/skills/rite-prove/SKILL.md +20 -22
  55. package/pack/.claude/skills/rite-review/SKILL.md +23 -16
  56. package/pack/.claude/skills/rite-seal/SKILL.md +8 -8
  57. package/pack/.claude/skills/rite-seal/reference/final-evidence.md +6 -5
  58. package/pack/.claude/skills/rite-seal/reference/phase-contract.md +13 -13
  59. package/pack/.claude/skills/rite-ship/SKILL.md +3 -0
  60. package/pack/.claude/skills/rite-ship/reference/close-out.md +16 -2
  61. package/pack/.claude/skills/rite-ship/reference/git-ship.md +14 -5
  62. package/pack/.claude/skills/rite-spec/SKILL.md +6 -0
  63. package/pack/.claude/skills/rite-spec/reference/state-workspace.md +6 -0
  64. package/pack/.claude/skills/rite-status/SKILL.md +4 -1
  65. package/pack/.claude/skills/rite-temper/SKILL.md +14 -11
  66. package/pack/.claude/skills/rite-temper/reference/anti-patterns.md +14 -13
  67. package/pack/.claude/skills/rite-temper/reference/review-dimensions.md +3 -4
  68. package/pack/.claude/skills/rite-upgrade/SKILL.md +11 -2
  69. package/pack/.claude/skills/rite-vet/SKILL.md +22 -15
  70. package/pack/.claude/skills/rite-vet/reference/anti-patterns.md +11 -9
  71. package/pack/.claude/skills/rite-vet/reference/depth.md +6 -7
  72. package/pack/.claude/skills/rite-vet/reference/review-axes.md +39 -14
  73. package/pack/generated/claude/agents/devrites-code-reviewer.md +9 -6
  74. package/pack/generated/claude/agents/devrites-doubt-reviewer.md +6 -0
  75. package/pack/generated/claude/agents/devrites-plan-reviewer.md +7 -1
  76. package/pack/generated/claude/agents/devrites-slice-wright.md +42 -46
  77. package/pack/generated/claude/agents/devrites-test-analyst.md +9 -4
  78. package/pack/generated/claude/agents/devrites-upgrade-planner.md +9 -1
  79. package/pack/generated/claude/settings.json +17 -0
  80. package/pack/generated/claude/skills/devrites-api-interface/SKILL.md +2 -2
  81. package/pack/generated/claude/skills/devrites-doubt/SKILL.md +9 -17
  82. package/pack/generated/claude/skills/devrites-lib/reference/candidate-integrity.md +34 -35
  83. package/pack/generated/claude/skills/devrites-lib/reference/parallel-dispatch.md +11 -12
  84. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +104 -51
  85. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +1 -0
  86. package/pack/generated/claude/skills/devrites-lib/reference/standards/context-hygiene.md +45 -25
  87. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +1 -1
  88. package/pack/generated/claude/skills/devrites-lib/reference/workspace-artifact-schema.md +80 -41
  89. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +19 -8
  90. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +33 -1
  91. package/pack/generated/claude/skills/rite-build/SKILL.md +26 -17
  92. package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +1 -1
  93. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +101 -39
  94. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +79 -59
  95. package/pack/generated/claude/skills/rite-build/reference/spec-drift-guard.md +14 -15
  96. package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +8 -8
  97. package/pack/generated/claude/skills/rite-define/SKILL.md +4 -1
  98. package/pack/generated/claude/skills/rite-plan/SKILL.md +4 -1
  99. package/pack/generated/claude/skills/rite-plan/reference/replan-and-repair.md +21 -0
  100. package/pack/generated/claude/skills/rite-plan/reference/slicing.md +117 -15
  101. package/pack/generated/claude/skills/rite-prove/SKILL.md +20 -22
  102. package/pack/generated/claude/skills/rite-review/SKILL.md +23 -16
  103. package/pack/generated/claude/skills/rite-seal/SKILL.md +8 -8
  104. package/pack/generated/claude/skills/rite-seal/reference/final-evidence.md +6 -5
  105. package/pack/generated/claude/skills/rite-seal/reference/phase-contract.md +13 -13
  106. package/pack/generated/claude/skills/rite-ship/SKILL.md +3 -0
  107. package/pack/generated/claude/skills/rite-ship/reference/close-out.md +16 -2
  108. package/pack/generated/claude/skills/rite-ship/reference/git-ship.md +14 -5
  109. package/pack/generated/claude/skills/rite-spec/SKILL.md +6 -0
  110. package/pack/generated/claude/skills/rite-spec/reference/state-workspace.md +6 -0
  111. package/pack/generated/claude/skills/rite-status/SKILL.md +4 -1
  112. package/pack/generated/claude/skills/rite-temper/SKILL.md +14 -11
  113. package/pack/generated/claude/skills/rite-temper/reference/anti-patterns.md +14 -13
  114. package/pack/generated/claude/skills/rite-temper/reference/review-dimensions.md +3 -4
  115. package/pack/generated/claude/skills/rite-upgrade/SKILL.md +11 -2
  116. package/pack/generated/claude/skills/rite-vet/SKILL.md +22 -15
  117. package/pack/generated/claude/skills/rite-vet/reference/anti-patterns.md +11 -9
  118. package/pack/generated/claude/skills/rite-vet/reference/depth.md +6 -7
  119. package/pack/generated/claude/skills/rite-vet/reference/review-axes.md +39 -14
  120. package/pack/generated/codex/agents/devrites-code-reviewer.toml +9 -6
  121. package/pack/generated/codex/agents/devrites-doubt-reviewer.toml +6 -0
  122. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +7 -1
  123. package/pack/generated/codex/agents/devrites-slice-wright.toml +42 -46
  124. package/pack/generated/codex/agents/devrites-test-analyst.toml +9 -4
  125. package/pack/generated/codex/agents/devrites-upgrade-planner.toml +9 -1
  126. package/pack/generated/codex/skills/devrites-api-interface/SKILL.md +2 -2
  127. package/pack/generated/codex/skills/devrites-doubt/SKILL.md +9 -17
  128. package/pack/generated/codex/skills/devrites-lib/reference/candidate-integrity.md +34 -35
  129. package/pack/generated/codex/skills/devrites-lib/reference/parallel-dispatch.md +11 -12
  130. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +104 -51
  131. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +1 -0
  132. package/pack/generated/codex/skills/devrites-lib/reference/standards/context-hygiene.md +45 -25
  133. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +1 -1
  134. package/pack/generated/codex/skills/devrites-lib/reference/workspace-artifact-schema.md +80 -41
  135. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +19 -8
  136. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +33 -1
  137. package/pack/generated/codex/skills/rite-build/SKILL.md +26 -17
  138. package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +1 -1
  139. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +101 -39
  140. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +79 -59
  141. package/pack/generated/codex/skills/rite-build/reference/spec-drift-guard.md +14 -15
  142. package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +8 -8
  143. package/pack/generated/codex/skills/rite-define/SKILL.md +4 -1
  144. package/pack/generated/codex/skills/rite-plan/SKILL.md +4 -1
  145. package/pack/generated/codex/skills/rite-plan/reference/replan-and-repair.md +21 -0
  146. package/pack/generated/codex/skills/rite-plan/reference/slicing.md +117 -15
  147. package/pack/generated/codex/skills/rite-prove/SKILL.md +20 -22
  148. package/pack/generated/codex/skills/rite-review/SKILL.md +23 -16
  149. package/pack/generated/codex/skills/rite-seal/SKILL.md +8 -8
  150. package/pack/generated/codex/skills/rite-seal/reference/final-evidence.md +6 -5
  151. package/pack/generated/codex/skills/rite-seal/reference/phase-contract.md +13 -13
  152. package/pack/generated/codex/skills/rite-ship/SKILL.md +3 -0
  153. package/pack/generated/codex/skills/rite-ship/reference/close-out.md +16 -2
  154. package/pack/generated/codex/skills/rite-ship/reference/git-ship.md +14 -5
  155. package/pack/generated/codex/skills/rite-spec/SKILL.md +6 -0
  156. package/pack/generated/codex/skills/rite-spec/reference/state-workspace.md +6 -0
  157. package/pack/generated/codex/skills/rite-status/SKILL.md +4 -1
  158. package/pack/generated/codex/skills/rite-temper/SKILL.md +14 -11
  159. package/pack/generated/codex/skills/rite-temper/reference/anti-patterns.md +14 -13
  160. package/pack/generated/codex/skills/rite-temper/reference/review-dimensions.md +3 -4
  161. package/pack/generated/codex/skills/rite-upgrade/SKILL.md +11 -2
  162. package/pack/generated/codex/skills/rite-vet/SKILL.md +22 -15
  163. package/pack/generated/codex/skills/rite-vet/reference/anti-patterns.md +11 -9
  164. package/pack/generated/codex/skills/rite-vet/reference/depth.md +6 -7
  165. package/pack/generated/codex/skills/rite-vet/reference/review-axes.md +39 -14
  166. package/pack/generated/omp/agents/devrites-code-reviewer.md +9 -6
  167. package/pack/generated/omp/agents/devrites-doubt-reviewer.md +6 -0
  168. package/pack/generated/omp/agents/devrites-plan-reviewer.md +7 -1
  169. package/pack/generated/omp/agents/devrites-slice-wright.md +42 -46
  170. package/pack/generated/omp/agents/devrites-test-analyst.md +9 -4
  171. package/pack/generated/omp/agents/devrites-upgrade-planner.md +9 -1
  172. package/pack/generated/omp/skills/devrites-api-interface/SKILL.md +2 -2
  173. package/pack/generated/omp/skills/devrites-doubt/SKILL.md +9 -17
  174. package/pack/generated/omp/skills/devrites-lib/reference/candidate-integrity.md +34 -35
  175. package/pack/generated/omp/skills/devrites-lib/reference/parallel-dispatch.md +11 -12
  176. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +104 -51
  177. package/pack/generated/omp/skills/devrites-lib/reference/standards/agents.md +1 -0
  178. package/pack/generated/omp/skills/devrites-lib/reference/standards/context-hygiene.md +45 -25
  179. package/pack/generated/omp/skills/devrites-lib/reference/standards/core.md +1 -1
  180. package/pack/generated/omp/skills/devrites-lib/reference/workspace-artifact-schema.md +80 -41
  181. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +19 -8
  182. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +33 -1
  183. package/pack/generated/omp/skills/rite-build/SKILL.md +26 -17
  184. package/pack/generated/omp/skills/rite-build/reference/afk-discipline.md +1 -1
  185. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +101 -39
  186. package/pack/generated/omp/skills/rite-build/reference/phase-contract.md +79 -59
  187. package/pack/generated/omp/skills/rite-build/reference/spec-drift-guard.md +14 -15
  188. package/pack/generated/omp/skills/rite-build/reference/wright-dispatch.md +8 -8
  189. package/pack/generated/omp/skills/rite-define/SKILL.md +4 -1
  190. package/pack/generated/omp/skills/rite-plan/SKILL.md +4 -1
  191. package/pack/generated/omp/skills/rite-plan/reference/replan-and-repair.md +21 -0
  192. package/pack/generated/omp/skills/rite-plan/reference/slicing.md +117 -15
  193. package/pack/generated/omp/skills/rite-prove/SKILL.md +20 -22
  194. package/pack/generated/omp/skills/rite-review/SKILL.md +23 -16
  195. package/pack/generated/omp/skills/rite-seal/SKILL.md +8 -8
  196. package/pack/generated/omp/skills/rite-seal/reference/final-evidence.md +6 -5
  197. package/pack/generated/omp/skills/rite-seal/reference/phase-contract.md +13 -13
  198. package/pack/generated/omp/skills/rite-ship/SKILL.md +3 -0
  199. package/pack/generated/omp/skills/rite-ship/reference/close-out.md +16 -2
  200. package/pack/generated/omp/skills/rite-ship/reference/git-ship.md +14 -5
  201. package/pack/generated/omp/skills/rite-spec/SKILL.md +6 -0
  202. package/pack/generated/omp/skills/rite-spec/reference/state-workspace.md +6 -0
  203. package/pack/generated/omp/skills/rite-status/SKILL.md +4 -1
  204. package/pack/generated/omp/skills/rite-temper/SKILL.md +14 -11
  205. package/pack/generated/omp/skills/rite-temper/reference/anti-patterns.md +14 -13
  206. package/pack/generated/omp/skills/rite-temper/reference/review-dimensions.md +3 -4
  207. package/pack/generated/omp/skills/rite-upgrade/SKILL.md +11 -2
  208. package/pack/generated/omp/skills/rite-vet/SKILL.md +22 -15
  209. package/pack/generated/omp/skills/rite-vet/reference/anti-patterns.md +11 -9
  210. package/pack/generated/omp/skills/rite-vet/reference/depth.md +6 -7
  211. package/pack/generated/omp/skills/rite-vet/reference/review-axes.md +39 -14
  212. package/package.json +1 -1
  213. package/scripts/codex-generate.sh +6 -0
@@ -27,7 +27,7 @@ code · claiming "this is safe", "this scales", or "this matches the spec".
27
27
  issues but classify **zero** as actionable, the review is too agreeable. Sharpen the
28
28
  prompt or use a fresh reviewer. Accept a clean pass only after a genuine attempt to
29
29
  disprove the claim.
30
- - [ ] **5. STOP**: met a stop condition (only trivial findings, no open fingerprint has budget left, the distinct-findings ceiling, or user override). Emit a **binary gate verdict** the orchestrator must clear: **accept** (no valid-&-actionable findings remain) or **reject + the specific required changes**. On reject, the orchestrator loops the wright on those changes before the slice is accepted. Account per finding, not per round: a reject citing a genuinely new defect is progress and the loop continues; a reject re-citing a fingerprint the wright already failed on is no-progress and burns that fingerprint's budget. A finding that only refines a clause a prior cycle already pinned may close as an explicit bounded declared residual. Ceiling: three distinct actionable findings on one decision mean the decision resists repair classify by decision ownership: human-owned product/risk uncertainty escalates; objective required changes become a technical blocker, never a retry-authorization question.
30
+ - [ ] **5. RETURN**: emit a binary gate verdict: **accept** only when no valid-&-actionable findings remain, otherwise **reject + every supported required change**. The caller folds the complete inventory before one bounded correction and owning-reviewer recheck, including affected dependencies and correction-created regressions. Recovery and stops follow only [the canonical retry contract](../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve). A distinct evidenced Critical/Important is progress; refining or renaming the same failed mechanism is not. An explicit bounded residual may close a refinement only when the accepted contract permits it and no actionable failure remains; never waive a new failure mode.
31
31
 
32
32
  ## Deletion-test lens (for "is this abstraction load-bearing?" doubts)
33
33
 
@@ -60,22 +60,14 @@ Wait for a second real caller before keeping a pass-through that fails this test
60
60
 
61
61
  ## AFK exception
62
62
 
63
- When `.devrites/AFK` exists and the user is away, `escalated to user` is unavailable in
64
- real time. Map the verdict to a `questions.md` entry instead of a synchronous prompt:
65
-
66
- - **Findings classified `valid trade-off`, `noise`, or `contract misread`**: append a
67
- `questions.md` entry with `gate: advisory`, record the trade-off in `decisions.md`, and
68
- proceed with the best inference. The advisory is surfaced by `/rite-status` so the user
69
- sees it on return.
70
- - **Any `valid & actionable` finding, OR the claim touches destructive migration,
71
- auth/authz boundaries, public APIs, irreversible data writes**: append a
72
- `questions.md` entry with `gate: blocking`, set `state.md` `Status: awaiting_human`,
73
- fire the `notify:` hook, and STOP. AFK never silently accepts irreversible risk.
74
-
75
- The same bounds apply in AFK. Once no open fingerprint has budget left or the
76
- distinct-findings ceiling trips, human-owned uncertainty becomes a blocking
77
- question; an unresolved objective technical finding becomes `Status: blocked` with its exact
78
- required changes and `/rite-plan unblock`, regardless of AFK config.
63
+ Apply [decision ownership and AFK gates](../devrites-lib/reference/standards/afk-hitl.md#afk-exception-for-discretionary-pauses).
64
+ Accepted in-scope technical findings return to the caller for authorized repair;
65
+ they block acceptance until verified, not continuation by themselves. Record
66
+ trade-offs and rejected findings with reasons in the existing decision record.
67
+ Human-owned uncertainty, missing authority/access, and irreversible-risk choices
68
+ retain their blocking question and pause. Exhausted technical recovery preserves
69
+ the reproduction and blocked cursor prescribed by the canonical retry contract;
70
+ it never becomes a request for permission to retry.
79
71
 
80
72
  ## Output
81
73
  ```
@@ -1,43 +1,42 @@
1
1
  # Candidate integrity
2
2
 
3
- This file owns the Build-to-Ship lifecycle for one content-bound candidate. The
4
- exact `touched-files.md` and binding grammar remain in
5
- [`workspace-artifact-schema.md`](workspace-artifact-schema.md); phase skills link
6
- here and state only their phase action.
7
-
8
- `devrites-engine check candidate <slug>` is the only candidate hash authority.
9
- A missing, duplicate, malformed, or mismatched binding stops the lifecycle.
3
+ Manifest and binding grammar remain in
4
+ [`workspace-artifact-schema.md`](workspace-artifact-schema.md).
5
+ `devrites-engine check candidate <slug>` alone hashes candidates.
6
+ Missing/duplicate/malformed/mismatched bindings block.
10
7
 
11
8
  ## Lifecycle
12
9
 
13
- - **Build maintains** the authoritative manifest from each green slice's actual
14
- scoped diff. It may change until Polish closes the candidate.
15
- - **Prove binds** approved real proof to one digest. Check the candidate before
16
- commands and again after them; the digest must be identical and proof must not
17
- mutate candidate sources. Record it in evidence and browser evidence when present.
18
- - **Polish closes** the candidate only after every code/UI correction, capability
19
- fold, optional design-memory update, and durable ADR promotion. Update the
20
- manifest for every such path; a digest change requires affected real re-proof
21
- and refreshed evidence/browser bindings before Review.
22
- - **Review binds** all immutable reviewers and `review.md` to the same closed
23
- digest. A candidate correction updates the manifest and returns through affected
24
- Prove, then a fresh Review.
25
- - **Seal binds** `seal.md` to that reviewed digest, rechecks every binding, then
26
- runs `devrites-engine check seal <slug>`. A correction returns through Prove and
27
- Review before Seal runs again.
28
- - **Ship is candidate-read-only.** It may update workspace ship/state/archive
29
- bookkeeping, but any project or manifest mutation returns through Prove,
30
- Review, and Seal. Git integrity uses the canonical digest; it never implements
31
- another candidate hash.
10
+ - Build maintains actual scoped `present`/`deleted` manifest rows.
11
+ - Prove binds approved real proof in evidence/browser artifacts; candidate checks
12
+ before/after commands match; no source mutation.
13
+ - Polish closes only after code/UI corrections, capability folds, design-memory
14
+ updates and ADR promotion; update manifest/affected proof for every path.
15
+ - Review binds reconciled coverage to that closed digest; corrections return
16
+ through affected Prove and fresh affected reviewers.
17
+ - Seal binds the reviewed digest, rechecks bindings, runs `devrites-engine check seal <slug>`.
18
+ - Ship is candidate-read-only; bookkeeping only; source/manifest changes return through Prove,
19
+ Review, Seal. No alternate hash implementation.
32
20
 
33
- ## Existing workspaces
21
+ ## Evidence validity
22
+
23
+ Verify evidence, scope/criterion, source, dependencies, configuration, environment, toolchain, command/cwd,
24
+ prerequisites, and decisive result as applicable. Unknown provenance blocks; source
25
+ hash alone is insufficient. External or time-sensitive observations rerun under
26
+ current authority. Required feature proof cannot substitute slice results.
34
27
 
35
- An older unfinished workspace must refresh the manifest and rerun real proof before
36
- continuing. Upgrade routes a released-workspace candidate defect to Prove only after its
37
- read-only assessment cites the current contract and exact defect. Prove may refresh from
38
- unambiguous legacy scope and currently observed project bytes, then writes fresh bindings.
39
- Never synthesize a historical pass or infer old bytes. There is no legacy fallback.
28
+ Same-candidate accounts may be cited when permitted. Corrections require
29
+ new candidate checks, affected real proof and fresh affected exact reviewers for
30
+ all open findings and dependency/regression closure, including newly triggered roles.
31
+ Changed contracts or uncertain closure require a full applicable pass.
32
+ Unchanged sub-scope needs explicit unchanged-input/dependency justification and a
33
+ link to original evidence. Never relabel an old candidate-bound account.
34
+ Keep one current aggregate binding; never copy a historical binding line, even quoted. Root reconciles complete coverage and binds
35
+ it anew. Missing coverage blocks; required roles, criteria, proof and authority remain.
36
+
37
+ ## Existing workspaces
40
38
 
41
- Normal Polish rollups and re-proof, Review, and Seal follow when their current gates
42
- apply. Upgrade re-audits afterward; a failed candidate, seal, or readiness check remains
43
- a gap. Exact manifest and binding grammar stays in the workspace schema above.
39
+ Upgrade routes a released-workspace candidate defect to Prove with a cited
40
+ current-contract defect and unambiguous legacy scope/bytes: refresh the manifest and rerun real proof.
41
+ Never synthesize a historical pass or bytes; no legacy fallback. Unknown bindings
42
+ require full refresh. Apply Polish/Review/Seal; Upgrade re-audits. Failed gates block.
@@ -1,6 +1,6 @@
1
1
  # Native review dispatch
2
2
 
3
- Host dispatches; DevRites governs.
3
+ Host dispatch; DevRites governs.
4
4
 
5
5
  ## Roster
6
6
 
@@ -29,6 +29,10 @@ If the candidate diff has no matching surfaces, record
29
29
  Parallelize only when writes/state/locks/tool sessions/scarce resources
30
30
  (ports/processes/quotas/FDs/browsers/MCP) are compatible. Frozen read-only
31
31
  usually is; pressure requires batches or serial work.
32
+ One fresh-context preflight before fan-out checks host configuration/evidence for
33
+ inherited history/memory/sibling summaries. Use supported clean-context settings;
34
+ unverified independence is a gap. Do not launch a probe agent per task;
35
+ still validate each result's context and candidate.
32
36
  2. Ask for each exact named agent in fresh context; omit native syntax and
33
37
  `agent_type`/`task_name`/`fork_turns` from the instruction.
34
38
  3. Every dispatch reaches a terminal classification before reconciliation:
@@ -41,8 +45,8 @@ If the candidate diff has no matching surfaces, record
41
45
  4. Apply [`agents.md` § Result admission](standards/agents.md#result-admission)
42
46
  and dedupe by evidence/root cause. Account for all seven in
43
47
  `review.md`/`seal.md`: `Outcome:` plus admitted account, or
44
- `Not-applicable: <inspected-scope reason>`. Spec/Code may cite unchanged
45
- `review.md`; persist no dispatch telemetry.
48
+ `Not-applicable: <inspected-scope reason>`. Spec/Code may cite valid unchanged
49
+ `review.md` under [evidence validity](candidate-integrity.md#evidence-validity); persist no dispatch telemetry.
46
50
  5. Missing profile, null/failure, or malformed output is a `gap`; never
47
51
  infer approval or substitute inline review.
48
52
 
@@ -53,15 +57,10 @@ Capacity rejection is backpressure: retry batches; never shrink a roster.
53
57
 
54
58
  ## Scale limits
55
59
 
56
- Review rosters are bounded by the role table above, not by agent count. Beyond
57
- roughly four concurrent read-only reviewers (eight only when each owns disjoint
58
- paths and resources), added reviewers re-read the same material, return
59
- overlapping findings, and make reconciliation the bottleneck: cost grows linearly,
60
- discriminable signal does not. DevRites therefore refuses unbounded swarms — more
61
- agents never substitute for a required role, and a task needing "more reviewers"
62
- needs a sharper scope or a second bounded pass instead. **Failing case:** an
63
- eight-agent mesh with no per-agent path ownership returns conflicting edits and
64
- duplicated findings that no roster can reconcile.
60
+ The role table bounds rosters. Use roughly four concurrent read-only reviewers;
61
+ eight only with disjoint paths/resources. Refuse unbounded swarms and role
62
+ substitution: sharpen scope or use a bounded second pass when coverage is missing.
63
+ Overlapping reviewers increase duplicate findings and reconciliation work.
65
64
 
66
65
  ## Children are tools, not peers
67
66
 
@@ -59,6 +59,9 @@ expires_at: "<ISO-8601 UTC timestamp>" # absolute unattended-authority expiry
59
59
  # max_cost_usd: 10 # optional stricter host-observed cost cap
60
60
  notify: "ntfy.sh/my-topic" # shell command; examples: rite-build/reference/afk-discipline.md
61
61
  allow_gates: [advisory, validating] # gate severities AFK auto-handles (auto-picks the recommended option)
62
+ continue_sequence: true # after Seal GO, open the next recorded continuation
63
+ max_workspaces: 5 # workspaces one armed sequence may open
64
+ max_parallel: 10 # cap on eligible path-disjoint Build batches (1 = serial)
62
65
  ```
63
66
 
64
67
  The file is **read-only config**: never rewritten in place. `max_slices` is the initial
@@ -79,6 +82,49 @@ existing counter may be lowered but never increased or reinitialized. Once prese
79
82
  counter is the effective remaining budget even when the read-only sentinel omits
80
83
  `max_slices`.
81
84
 
85
+ ### Sequence continuation (`continue_sequence`, `max_workspaces`)
86
+
87
+ `continue_sequence: true` lets one armed run open the next **recorded** continuation
88
+ after a `Seal GO` instead of stopping. Absent means `1` — the current workspace only;
89
+ an existing sentinel never receives the default implicitly. `max_workspaces` is the
90
+ sequence budget (nonnegative decimal, fail closed): spend one when a new workspace is
91
+ opened, never when resuming the current one. `max_slices` stays **per workspace** —
92
+ each new workspace's `state.md` seeds its own `afk_slices_remaining`.
93
+
94
+ The chain lives in root-owned `state.md` cursor fields, not in chat:
95
+ `sequence_parent` (the immediately preceding workspace slug), `sequence_position`
96
+ (1-based ordinal), `sequence_workspaces_remaining` (slots the chain may still
97
+ open after this workspace), and — on the release milestone only —
98
+ `sequence_role: release`. Seeding is exactly-once because the values are
99
+ derived, not remembered: a continuation's fields are computed from its recorded
100
+ parent and the parent's counter at creation, and a resumed run that finds a
101
+ continuation workspace missing the fields re-derives the same values from its
102
+ `brief.md` parent/position plus the parent's counter — never a second charge. A
103
+ workspace without a recorded parent/position is not a sequence member; the
104
+ counter only decreases, malformed values fail closed, and `0` opens nothing.
105
+ `sequence_role: release` makes `check candidate` and `check seal` require the
106
+ candidate manifest to cover the whole recorded chain — run
107
+ `devrites-engine state merge-manifest <slug>` before Prove.
108
+
109
+ - Only continuations recorded in the parent's `decisions.md` sequence
110
+ ([slicing.md § Continuation workspaces](../../../rite-plan/reference/slicing.md#continuation-workspaces))
111
+ qualify; no recorded next entry, or the cap/expiry/review-queue bound reached, stops
112
+ with the winning reason.
113
+ - Milestones are **not** shipped: they stay sealed and unarchived in `.devrites/work/`
114
+ with `Next step: /rite-ship` preserved. Per-slice `WIP(<slug>)` checkpoints still
115
+ land locally ([checkpoint.md](../../../rite-build/reference/checkpoint.md)), so the tree
116
+ stays clean and crash-safe.
117
+ - Git stays human-gated. The release ship is one disclosed plan, one literal `GO`, and
118
+ one native approval; it collapses the sequence's `WIP` commits into the single
119
+ release commit and may archive the sealed predecessors.
120
+ - Every human-owned, safety, access, exhaustion, and `NO-GO` condition still stops the
121
+ run exactly as without this field.
122
+
123
+ `max_parallel` caps a Build batch for unattended runs; `1` forces the serial cycle.
124
+ Unattended runs take the largest eligible set ≤ cap and recompute after every integrate
125
+ ([parallel-batch.md § Dynamic selection and re-batching](../../../rite-build/reference/parallel-batch.md#dynamic-selection-and-re-batching));
126
+ an explicit `/rite-build --parallel N` cap wins for that invocation.
127
+
82
128
  ## Unattended resource envelope
83
129
 
84
130
  AFK writer admission needs a bounded input queue, effective slice cap, and valid
@@ -258,65 +304,72 @@ When `/rite-resolve` does resume a stopped session, the skill does **not** auto-
258
304
 
259
305
  ## AFK exception for discretionary pauses
260
306
 
261
- `devrites-doubt` and similar skills that "ask the user" follow this rule when
262
- `.devrites/AFK` exists:
307
+ With `.devrites/AFK`, apply decision ownership first. Accepted in-scope technical
308
+ corrections return to the caller for repair/verification; severity blocks acceptance,
309
+ not authorized repair. Never silently accept a defect or broaden existing approval.
263
310
 
264
- Ceiling comparison order: Suggestion/Nit/FYI < Important < Critical; gates advisory <
265
- validating < blocking < escalating; a finding is the ceiling when its severity's gate
266
- class (Suggestion/Nit/FYI→advisory, Important→validating, Critical→blocking) is at or
267
- below the slice's gate.
311
+ Discretionary ceilings apply only to
312
+ human-owned trade-off/risk decisions; accepted technical corrections do not enter
313
+ these branches. Compare Suggestion/Nit/FYI→advisory, Important→validating,
314
+ Critical→blocking against advisory < validating < blocking < escalating:
268
315
 
269
- - Finding severity slice's gate ceiling (slice's `Gate:` plus `.devrites/AFK`
270
- `allow_gates`) → log to `questions.md` as `gate: advisory`, record the trade-off in
271
- `decisions.md`, proceed.
272
- - Finding severity > gate ceiling, OR finding touches the irreversible-risk list →
273
- log to `questions.md` as `gate: blocking`, set `state.md` `Status: awaiting_human`,
274
- fire `notify:`, STOP.
316
+ - Within the slice's `Gate:` and `.devrites/AFK` `allow_gates`: record advisory in
317
+ `questions.md`, trade-off in `decisions.md`, proceed.
318
+ - Above ceiling, missing authority, or unapproved irreversible risk: record blocking
319
+ question, `Status: awaiting_human`, fire `notify:`, STOP.
275
320
 
276
- The loop limits of the calling skill still apply. At the limit, classify the unresolved
277
- finding by the decision-ownership rule above: human-owned uncertainty becomes a blocking
278
- question; an objective technical finding becomes a recorded blocker with its required
279
- changes, not a request for permission to retry.
321
+ Recovery uses only the [retry contract](#retry-cap-no-progress-loops-and-self-resolve).
280
322
 
281
323
  ## Retry cap, no-progress loops, and self-resolve
282
324
 
283
- - **Fingerprint the failed invariant, not the review round.** An exact causal
284
- fingerprint is the owning gate/invariant plus its minimal reproduction and
285
- decisive failure signal. A new DEC/DRIFT number, changed line number, reviewer
286
- wording, or splitting one finding does not create a new fingerprint.
325
+ Owns all phase recovery, including Doubt/Vet/serial/parallel Build. Resource,
326
+ access, safety and irreversible-action boundaries independently stop work.
327
+
328
+ - **Fingerprint the failed invariant, not the review round.** Identify owning
329
+ invariant + defect mechanism + minimal reproduction/decisive failure signal.
330
+ DEC/DRIFT IDs, line numbers, wording and splitting one cause create no new budget.
287
331
  - **Cap no-progress retries:** three no-progress attempts per exact causal fingerprint
288
- across wright and recovery is a hard cap. Only a repair whose narrow recheck
289
- leaves that fingerprint open or reproduces the same decisive failure consumes
290
- an attempt. Closing a prior finding with discriminating evidence is progress:
291
- mark that fingerprint resolved and do not charge it as no-progress. A genuinely
292
- new Critical or Important finding with a different failed invariant and exact
293
- evidence gets its own fingerprint and budget; Suggestion, Nit, FYI, or renamed
294
- evidence cannot open, reset, or extend recovery.
295
- - **Separate consumptive authority from recovery.** Spending a one-shot action's
296
- authorization forbids another real execution but does not consume the offline
297
- recovery budget for a newly evidenced fingerprint. The retained artifact starts
298
- caller-owned diagnosis and correction immediately; only the next consumptive
299
- execution waits for fresh authorization.
300
- - **Persist accounting in existing records.** Record each fingerprint,
301
- reproduction, attempted correction, `progress: resolved|no-progress`, and
302
- decisive result in `drift.md` and `evidence.md`. Cold resume derives the count
303
- from those records. There is no recovery counter file or command.
304
- - **Reconcile before honoring a terminal cursor.** A persisted distinct
305
- Critical/Important fingerprint with retained evidence and fewer than three
306
- recorded no-progress corrections still has recovery budget, even when an older
307
- `state.md` says `Next step: none`. Resume it; do not treat session age or the
308
- prior action's spent authorization as exhaustion.
332
+ across wright/recovery. Only a correction whose narrow recheck leaves that cause
333
+ open or reproduces its failure consumes an attempt.
334
+ Closing a prior finding with discriminating evidence is progress: resolve it,
335
+ do not charge. A new Critical or Important finding gets its own budget only for
336
+ a distinct evidenced cause. The same invariant with a different evidenced mechanism qualifies;
337
+ renaming/splitting an unchanged cause does not. Suggestion/Nit/FYI cannot extend
338
+ recovery. Initial discovery and expected test-first RED are not corrections;
339
+ total rounds, re-batches and distinct-finding counts never exhaust recovery.
340
+ - **Rechecks are scoped; late findings never reopen the round.** *Late* applies only
341
+ from a phase's **second** review pass (Vet 1b, Build's recheck after the first repair,
342
+ Review step 7); an initial pass has no late findings and every supported finding is
343
+ folded normally. A recheck packet
344
+ names the open fingerprints, the correction diff, and the dependents of each
345
+ changed clause/hunk; the owning reviewer's verdict covers exactly that. A finding
346
+ on text/code unchanged since that role's previous pass is *late*: Critical with a
347
+ concrete failure path new fingerprint under this budget; otherwise recorded
348
+ (Plan/Vet: `eng-review.md` `## Deferred findings`; Build: `touched-files.md`
349
+ `## Review trail`) with severity · site · role · kind · round, and consumed by the
350
+ next full-inventory gate (Vet `mechanism` one `test-plan.md` proof row; Build →
351
+ the `/rite-review` roster) never by another repair round in this phase. Review
352
+ closes every deferred row with a labeled verdict; Seal blocks on any without one.
353
+ **Failing case:** round 4 finds three Important items on clauses untouched since
354
+ round 1 and dispatches another repair.
355
+ - **Separate consumptive authority from recovery.** Spent one-shot authorization
356
+ blocks another execution, not offline recovery. Retained evidence starts caller-owned
357
+ diagnosis/correction immediately; the next consumptive execution needs fresh authority.
358
+ - **Persist existing records.** Put fingerprint, reproduction, correction,
359
+ `progress: resolved|no-progress` and decisive result in `drift.md` and `evidence.md`.
360
+ Cold resume derives counts there; no new counter file/command.
361
+ - **Reconcile terminal cursors.** Retained distinct Critical/Important evidence below
362
+ cap resumes despite stale `Next step: none`; age/spent action authority is not exhaustion.
309
363
  <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"unattended root reaches current admitted Workflow Artifact work","action":"invoke classifier; execute returned route without wright/slice charge","return":"saved lifecycle phase/action; no intermediate reply"} -->
310
- - **Classify exhaustion:** human-owned contract/risk/access gaps open their gate. Otherwise
311
- preserve reproduction/dead ends, set `Status: blocked` and `Next step: none — technical recovery exhausted; requires new evidence or changed failure conditions`.
312
- Do not emit `/rite-plan unblock`, another phase command, a question, or
313
- `/rite-resolve`. Reinvocation with the unchanged fingerprint remains blocked
314
- and never resets the retry cap.
315
- - **Resolve agent-owned questions first.** Before raising a question, try to answer it from the code, the docs,
316
- or `decisions.md`. Communicate only for a blocked environment, a deliverable to hand over,
317
- critical info you genuinely can't access, or a credential / permission you lack — never for
318
- writing code, writing tests, or reviewing; the agent's own work is not a valid human gate.
319
- This narrows needless pauses and never weakens the blocking / escalating / irreversible gates.
364
+ - **Classify exhaustion:** human-owned contract/risk/access gaps open their gate.
365
+ Otherwise preserve reproduction/dead ends, set `Status: blocked` and
366
+ `Next step: none technical recovery exhausted; requires new evidence or changed failure conditions`.
367
+ Emit no phase command, retry-permission question or `/rite-resolve`.
368
+ Reinvocation with unchanged cause stays blocked; it never resets the cap.
369
+ - **Resolve agent-owned questions first** from code/docs/decisions. Human communication
370
+ is for blocked environment, handover, inaccessible critical information or missing
371
+ credentials/permission—not writing, testing or review. Blocking/escalating/
372
+ irreversible gates remain.
320
373
 
321
374
  ## What the rule does NOT cover
322
375
 
@@ -51,6 +51,7 @@ Each job gets objective/exclusions, exact paths/immutable candidate, rubric/resu
51
51
  ## Independence
52
52
 
53
53
  - A fresh result sees scope/paths-diff/rubric only — never another result's or the root's conclusions, severities, expected verdicts, or edited context; seeding voids the packet.
54
+ - **Verify the packet is clean before admitting the account.** Confirm the returned packet/trace carries no host-injected context: an automatic memory/summary banner naming an earlier phase verdict (e.g. `past Temper PASS … next is /rite-define`) or harness reminder text seeds the pass and voids it. Cancel that account — never admit it — name the lost coverage, and re-dispatch with the host's context injection disabled for that child. Tool config changes that do not stop native child auto-injection are not a fix; verify on the next spawn instead of assuming.
54
55
  - A parent-context pass contributes attributed evidence but is not independent: exclude it from independent accounting and name the lost coverage.
55
56
  - Final severity is set at reconciliation after re-verifying the claimed consequence at the cited site (reviewer severity advisory); dismissals record a reason, and true facts about neighboring code route elsewhere instead of being dismissed.
56
57
  - Conflicting required results are arbitrated by re-verifying evidence at the site; the deciding evidence is recorded, truly unresolved conflicts stay open blockers. Two results describing the same defect merge only when both defect and fix path match; otherwise the more conservative classification stands, and severity never widens without new site evidence — an overridden or demoted finding stays visible with the reason, never silently merged away.
@@ -1,25 +1,52 @@
1
1
  # Context hygiene
2
2
 
3
- Long conversations degrade an agent's reasoning. End phases cleanly, persist important
4
- state to disk, and start the next phase in a fresh context.
5
-
6
- The feature workspace stores the next session's authority; chat memory does not.
3
+ Persist phase results before starting fresh. The feature workspace, not chat memory,
4
+ stores continuity.
7
5
 
8
6
  ## Working-set rule
9
7
 
10
- Long tool histories can displace important facts and retain failed attempts. Act at 50%
11
- to 70% context use, keep one task's working set small, and load only what the current
12
- step needs. The workspace, not a summary, is the source of truth.
8
+ Act at 50% to 70% context use; load only the current task's working set. The
9
+ workspace, not a summary, is the source of truth.
13
10
 
14
11
  - **Count before viewing:** on a search hit list, read match counts first (`grep -c`,
15
- match summaries) and open only the files a one-line answer needs; dumping whole
16
- files for a one-line question is common waste.
12
+ match summaries), then open relevant files.
17
13
  - **Cut before load, not after.** Drop low-signal files, prior-turn dumps, and
18
- duplicate index queries before they enter context. Truncating a bloated window
19
- after the fact is not an efficiency strategy — the cost is already paid.
14
+ duplicate index queries before loading; later truncation cannot undo that cost.
20
15
  **Failing case:** five whole-file reads, then `/compact`, treated as cost control.
21
16
 
22
- **Compaction-preservation directive.** If the harness compacts mid-feature, read `.devrites/ACTIVE`, then reload the `state.md` cursor, open `questions.md` gates, durable `decisions.md`, and `test-plan.md`/`evidence.md` proof pointers. Session hooks normally restore these; this is the fallback when no hook fires.
17
+ ## Dispatch packets
18
+
19
+ Give each role the exact candidate identity, scope, applicable contract/decision IDs,
20
+ all open findings, relevant tests/evidence, and anchored/hashed read-next paths. Read
21
+ owning text and dependencies: IDs/digests are not semantic evidence. Exclude whole
22
+ histories, duplicates, and raw transcripts from initial packets. Inspect serialized byte size
23
+ and long lines; line counts alone are insufficient. Within the host budget
24
+ and working-set rule, split retrieval rather than truncate active obligations.
25
+ Broaden retrieval when dependency boundaries are unknown.
26
+
27
+ Packets are **by reference**: project-relative path + SHA-256 + line anchors
28
+ (`path:start-end`) for every input; the reviewer reads the live file. Inline only the
29
+ excerpt a finding or claim needs, ≤ 4 KiB each. Never inline whole workspace artifacts,
30
+ standards/skill files (name the path; the role reads it), foreign documents, prior
31
+ packets, or another role's account. A serialized packet stays ≤ 64 KiB; larger means
32
+ the scope is wrong — split by anchor-disjoint cluster, never truncate. Persist packets
33
+ and admitted accounts under `.devrites/work/<slug>/packets/`; once a round's account
34
+ is recorded in its owning artifact, packets older than the last closed round may be
35
+ deleted. Never persist agent transcripts, traces, or
36
+ `session_init` dumps anywhere in `.devrites/`. Bulk raw proof output stays outside
37
+ `.devrites/work/`; `evidence.md` records the command, decisive lines, and that path.
38
+ **Failing case:** a 4 MiB `vet-review-input.json` embedding `tasks.md`, the spec, six
39
+ standards files, and a 2 MiB source document as `entries`, plus a 10 MiB
40
+ `vet-review-audit.json` of agent traces beside it.
41
+
42
+ Keep closed findings in immutable history/regressions; recheck those affected by
43
+ changed contracts, implementation, proof, or dependencies, not every prior generation.
44
+ Required review rosters and final proof remain. Preserve protected history unchanged;
45
+ a compact current view references originals without omitting active requirements.
46
+
47
+ **Compaction fallback:** when hooks do not restore context, read `.devrites/ACTIVE`,
48
+ then the `state.md` cursor, open `questions.md` gates, `decisions.md`, and
49
+ `test-plan.md`/`evidence.md` proof pointers.
23
50
 
24
51
  ## Authority and trust
25
52
 
@@ -39,15 +66,11 @@ Apply [`core.md` § Precedence](core.md#precedence); authority and evidence diff
39
66
 
40
67
  | Use `/clear` (default) when | Use `/compact` when |
41
68
  |---|---|
42
- | The current phase is done and its outputs are on disk (the common DevRites case). | You need to keep mid-flight reasoning that hasn't yet been written to the workspace. |
43
- | Next phase reads workspace files anyway (every `rite-*` does). | The remaining work is small and continuation beats restart. |
44
- | The chat is dominated by tool outputs (file reads, diffs, test logs, browser snapshots). | A drift or doubt loop is mid-flight and the trade-off discussion isn't yet recorded. |
45
- | You hit a wrong path that needs unwinding: fresh start beats arguing with stale context. | A user clarification just landed that materially changes the next phase. |
69
+ | Phase results are persisted; the next phase reads them. | Important mid-flight reasoning is not yet persisted. |
70
+ | Tool output or a wrong path dominates context. | Small remaining work, unrecorded drift/doubt discussion, or fresh clarification favors continuity. |
46
71
 
47
- **Default to `/clear`.** Use `/compact` only when the workspace does not capture
48
- important continuity. When in doubt, write the missing decision /
49
- assumption / question to the canonical file (`/rite-handoff` does this in one step),
50
- then `/clear`.
72
+ **Default to `/clear`.** First persist missing decisions, assumptions, or questions
73
+ to their owners (`/rite-handoff`); `/compact` preserves unrecorded continuity.
51
74
 
52
75
  ## The "Session hygiene" footer (every rite-* output)
53
76
 
@@ -82,8 +105,5 @@ handoff.
82
105
 
83
106
  ## The handoff bridge
84
107
 
85
- When the user is leaving for a long break rather than moving directly between phases, `/rite-handoff`
86
- is safer than `/clear` alone because it syncs chat-only context into the canonical
87
- workspace files **before** the reset, then the user can `/clear` (or even close the
88
- session) without losing anything. The session-hygiene footer points at `/rite-handoff`
89
- when the gap to the next session is likely > a few hours.
108
+ For a break longer than a few hours, point the footer at `/rite-handoff`: persist
109
+ chat-only context to canonical files before clearing or closing the session.
@@ -42,7 +42,7 @@ Repository conventions follow [Precedence](#precedence).
42
42
 
43
43
  ## Lifecycle rest points
44
44
 
45
- Before advancing a phase, run `devrites-engine check readiness <slug>` for structure (semantics belong to exact agents/checklists). Standalone rites persist and stop on block; under a controlling caller, agent-owned technical blocks return backward as a nested phase boundary, not a user-facing handoff. `/rite-seal` runs `devrites-engine check seal <slug>` for structure/freshness, not prose. HITL/blocked stops follow [Persistence before stopping](#persistence-before-stopping-handoff-discipline).
45
+ Before advancing a phase, run `devrites-engine check readiness <slug>` for structure, including artifact budgets (semantics belong to exact agents/checklists). Standalone rites persist and stop on block; under a controlling caller, agent-owned technical blocks return backward as a nested phase boundary, not a user-facing handoff. `/rite-seal` runs `devrites-engine check seal <slug>` for structure/freshness, not prose. HITL/blocked stops follow [Persistence before stopping](#persistence-before-stopping-handoff-discipline).
46
46
 
47
47
  ### Gate contract
48
48