devrites 5.8.0 → 5.10.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 (125) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -2
  3. package/docs/architecture.md +4 -4
  4. package/docs/command-map.md +2 -2
  5. package/docs/engine/workspace-schema.md +1 -1
  6. package/docs/flow.md +4 -2
  7. package/docs/skills.md +1 -1
  8. package/docs/usage.md +11 -10
  9. package/engine/internal/parallel/git.go +8 -0
  10. package/engine/internal/parallel/ops.go +40 -12
  11. package/engine/internal/parallel/ops_test.go +29 -1
  12. package/engine/internal/parallel/parallel_test.go +26 -14
  13. package/pack/.claude/agents/devrites-slice-wright.md +18 -9
  14. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +2 -2
  15. package/pack/.claude/skills/rite-autocomplete/SKILL.md +14 -15
  16. package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +2 -3
  17. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +17 -24
  18. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
  19. package/pack/.claude/skills/rite-build/SKILL.md +11 -7
  20. package/pack/.claude/skills/rite-build/reference/anti-patterns.md +4 -0
  21. package/pack/.claude/skills/rite-build/reference/checkpoint.md +33 -21
  22. package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +4 -3
  23. package/pack/.claude/skills/rite-build/reference/parallel-batch.md +13 -10
  24. package/pack/.claude/skills/rite-build/reference/phase-contract.md +4 -2
  25. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +16 -9
  26. package/pack/.claude/skills/rite-plan/reference/slicing.md +4 -3
  27. package/pack/.claude/skills/rite-polish/SKILL.md +3 -1
  28. package/pack/.claude/skills/rite-prove/SKILL.md +3 -0
  29. package/pack/.claude/skills/rite-review/SKILL.md +3 -1
  30. package/pack/.claude/skills/rite-temper/SKILL.md +6 -6
  31. package/pack/.claude/skills/rite-temper/reference/significance.md +3 -3
  32. package/pack/generated/claude/agents/devrites-slice-wright.md +18 -9
  33. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +2 -2
  34. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +14 -15
  35. package/pack/generated/claude/skills/rite-autocomplete/reference/decision-policy.md +2 -3
  36. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +17 -24
  37. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
  38. package/pack/generated/claude/skills/rite-build/SKILL.md +11 -7
  39. package/pack/generated/claude/skills/rite-build/reference/anti-patterns.md +4 -0
  40. package/pack/generated/claude/skills/rite-build/reference/checkpoint.md +33 -21
  41. package/pack/generated/claude/skills/rite-build/reference/one-slice-cycle.md +4 -3
  42. package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +13 -10
  43. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +4 -2
  44. package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +16 -9
  45. package/pack/generated/claude/skills/rite-plan/reference/slicing.md +4 -3
  46. package/pack/generated/claude/skills/rite-polish/SKILL.md +3 -1
  47. package/pack/generated/claude/skills/rite-prove/SKILL.md +3 -0
  48. package/pack/generated/claude/skills/rite-review/SKILL.md +3 -1
  49. package/pack/generated/claude/skills/rite-temper/SKILL.md +6 -6
  50. package/pack/generated/claude/skills/rite-temper/reference/significance.md +3 -3
  51. package/pack/generated/codex/agents/devrites-slice-wright.toml +18 -9
  52. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +2 -2
  53. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +14 -15
  54. package/pack/generated/codex/skills/rite-autocomplete/reference/decision-policy.md +2 -3
  55. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +17 -24
  56. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
  57. package/pack/generated/codex/skills/rite-build/SKILL.md +11 -7
  58. package/pack/generated/codex/skills/rite-build/reference/anti-patterns.md +4 -0
  59. package/pack/generated/codex/skills/rite-build/reference/checkpoint.md +33 -21
  60. package/pack/generated/codex/skills/rite-build/reference/one-slice-cycle.md +4 -3
  61. package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +13 -10
  62. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +4 -2
  63. package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +16 -9
  64. package/pack/generated/codex/skills/rite-plan/reference/slicing.md +4 -3
  65. package/pack/generated/codex/skills/rite-polish/SKILL.md +3 -1
  66. package/pack/generated/codex/skills/rite-prove/SKILL.md +3 -0
  67. package/pack/generated/codex/skills/rite-review/SKILL.md +3 -1
  68. package/pack/generated/codex/skills/rite-temper/SKILL.md +6 -6
  69. package/pack/generated/codex/skills/rite-temper/reference/significance.md +3 -3
  70. package/pack/generated/omp/agents/devrites-code-reviewer.md +1 -1
  71. package/pack/generated/omp/agents/devrites-devex-reviewer.md +1 -1
  72. package/pack/generated/omp/agents/devrites-doubt-reviewer.md +1 -1
  73. package/pack/generated/omp/agents/devrites-evidence-scout.md +1 -1
  74. package/pack/generated/omp/agents/devrites-frontend-reviewer.md +1 -1
  75. package/pack/generated/omp/agents/devrites-performance-reviewer.md +1 -1
  76. package/pack/generated/omp/agents/devrites-plan-drafter.md +1 -1
  77. package/pack/generated/omp/agents/devrites-plan-reviewer.md +1 -1
  78. package/pack/generated/omp/agents/devrites-proof-runner.md +1 -1
  79. package/pack/generated/omp/agents/devrites-retrospector.md +1 -1
  80. package/pack/generated/omp/agents/devrites-security-auditor.md +1 -1
  81. package/pack/generated/omp/agents/devrites-simplifier-reviewer.md +1 -1
  82. package/pack/generated/omp/agents/devrites-slice-wright.md +19 -10
  83. package/pack/generated/omp/agents/devrites-spec-reviewer.md +1 -1
  84. package/pack/generated/omp/agents/devrites-strategy-reviewer.md +1 -1
  85. package/pack/generated/omp/agents/devrites-test-analyst.md +1 -1
  86. package/pack/generated/omp/agents/devrites-upgrade-planner.md +1 -1
  87. package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +2 -2
  88. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +14 -15
  89. package/pack/generated/omp/skills/rite-autocomplete/reference/decision-policy.md +2 -3
  90. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +17 -24
  91. package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
  92. package/pack/generated/omp/skills/rite-build/SKILL.md +11 -7
  93. package/pack/generated/omp/skills/rite-build/reference/anti-patterns.md +4 -0
  94. package/pack/generated/omp/skills/rite-build/reference/checkpoint.md +33 -21
  95. package/pack/generated/omp/skills/rite-build/reference/one-slice-cycle.md +4 -3
  96. package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +13 -10
  97. package/pack/generated/omp/skills/rite-build/reference/phase-contract.md +4 -2
  98. package/pack/generated/omp/skills/rite-build/reference/wright-dispatch.md +16 -9
  99. package/pack/generated/omp/skills/rite-plan/reference/slicing.md +4 -3
  100. package/pack/generated/omp/skills/rite-polish/SKILL.md +3 -1
  101. package/pack/generated/omp/skills/rite-prove/SKILL.md +3 -0
  102. package/pack/generated/omp/skills/rite-review/SKILL.md +3 -1
  103. package/pack/generated/omp/skills/rite-temper/SKILL.md +6 -6
  104. package/pack/generated/omp/skills/rite-temper/reference/significance.md +3 -3
  105. package/pack/generated/pi/agents/devrites-slice-wright.md +18 -9
  106. package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +2 -2
  107. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +14 -15
  108. package/pack/generated/pi/skills/rite-autocomplete/reference/decision-policy.md +2 -3
  109. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +17 -24
  110. package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
  111. package/pack/generated/pi/skills/rite-build/SKILL.md +11 -7
  112. package/pack/generated/pi/skills/rite-build/reference/anti-patterns.md +4 -0
  113. package/pack/generated/pi/skills/rite-build/reference/checkpoint.md +33 -21
  114. package/pack/generated/pi/skills/rite-build/reference/one-slice-cycle.md +4 -3
  115. package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +13 -10
  116. package/pack/generated/pi/skills/rite-build/reference/phase-contract.md +4 -2
  117. package/pack/generated/pi/skills/rite-build/reference/wright-dispatch.md +16 -9
  118. package/pack/generated/pi/skills/rite-plan/reference/slicing.md +4 -3
  119. package/pack/generated/pi/skills/rite-polish/SKILL.md +3 -1
  120. package/pack/generated/pi/skills/rite-prove/SKILL.md +3 -0
  121. package/pack/generated/pi/skills/rite-review/SKILL.md +3 -1
  122. package/pack/generated/pi/skills/rite-temper/SKILL.md +6 -6
  123. package/pack/generated/pi/skills/rite-temper/reference/significance.md +3 -3
  124. package/package.json +1 -1
  125. package/scripts/omp-generate.sh +54 -1
@@ -9,7 +9,7 @@ user-invocable: true
9
9
 
10
10
  Run every phase after one clarification window. Irreversible-risk,
11
11
  blocking/escalating,<!-- pack-scan-ignore: negated statement: gates are NOT disabled -->
12
- NO-GO, resource, and human-owned gates still pause. Use the Standard native
12
+ and NO-GO still pause. Use the Standard native
13
13
  profile by default and Full for high-risk scope or explicit `--full`; see
14
14
  [`orchestration-profiles.md`](../devrites-lib/reference/orchestration-profiles.md).
15
15
 
@@ -48,20 +48,19 @@ executable controller/harness/bundle bytes or a missing writer, read
48
48
  - Every exact causal fingerprint gets at most three no-progress corrections.
49
49
  Closing one is progress; a distinct Critical/Important invariant has its own
50
50
  budget. Lower severity cannot prolong recovery.
51
- - Enforce `--max-slices`, the AFK sentinel, review queue, and native
52
- agent/token/cost/time limits before every phase or dispatch. Count failed,
53
- malformed, and unavailable leaf calls. At the review cap, permit only work
54
- that reduces the queue.
51
+ - Do not stop on `--max-slices`, sentinel `max_slices`, `max_agents`,
52
+ `max_minutes`, or `max_review_queue`. Count failed, malformed, and
53
+ unavailable leaf calls.
55
54
  - Parse flags only from this invocation. `--ship`, `--yolo`, `--max-slices`,
56
55
  `--parallel`, `--full`, and `--cross-model` activate only as exact standalone
57
56
  tokens in `$ARGUMENTS`; examples or earlier messages can never arm them.
58
57
  `--max-slices` must occur once and be followed by a positive base-10 integer;
59
58
  `--parallel` must occur once and be followed by a base-10 integer in `1`–`10`.
60
59
  Missing, repeated, malformed, or conflicting values stop before any write.
61
- - Temper always runs after Clarify. Unattended mode auto-applies only
62
- `hold-rigor` and `reduce-to-MVP`; any `expand` or added acceptance pauses.
60
+ - Temper always runs after Clarify. Auto-apply the recommended mode, including
61
+ `expand` and extra acceptance; record the ADR and fold via Spec Drift Guard.
62
+ Irreversible-risk still pauses.
63
63
  - Vet every plan. Cross-model is off unless the current invocation arms it.
64
- Never auto-grow accepted scope.
65
64
 
66
65
  ## Workflow
67
66
 
@@ -77,7 +76,7 @@ executable controller/harness/bundle bytes or a missing writer, read
77
76
  from chat. After compaction or a resumed session, read `.devrites/ACTIVE`, then
78
77
  the `state.md` cursor, `questions.md`, `decisions.md`, and `test-plan.md`/`evidence.md`.
79
78
  Normalize current arguments to idea, `ship_preflight: yes|no`,
80
- `max_slices: N|default`, `parallel: N|default`, `profile: standard|full`,
79
+ `max_slices: unlimited`, `parallel: N|default`, `profile: standard|full`,
81
80
  and `cross_model: yes|no`.
82
81
  **Completion:** normalized state is unambiguous and no sentinel or workspace file has been written.
83
82
  2. **Specify and clarify.** Run `devrites-interview`, `/rite-spec`, and
@@ -85,7 +84,7 @@ executable controller/harness/bundle bytes or a missing writer, read
85
84
  AFK. **Completion:** `Decision coverage: CLEAR` is durable.
86
85
  3. **Arm AFK once.** Apply the loop's
87
86
  [one-write AFK contract](reference/loop.md#arm-afk-once): preserve valid
88
- existing bytes or create the bounded advisory-only sentinel once; never
87
+ existing bytes or create the sentinel once (`allow_gates: [advisory, validating]`); never
89
88
  rewrite it after Vet. Preserve an existing sentinel byte-for-byte.
90
89
  **Completion:** a valid read-only AFK sentinel exists.
91
90
  4. **Drive phases.** Follow [the loop](reference/loop.md): `/rite-spec` →
@@ -103,7 +102,7 @@ executable controller/harness/bundle bytes or a missing writer, read
103
102
  [stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
104
103
  route agent-owned red results through bounded recovery.
105
104
  Red gates block forward advancement and enter caller-owned recovery. Stop on
106
- hard risk, human-owned blocking/escalating/NO-GO, resource exhaustion, or the
105
+ hard risk, human-owned blocking/escalating/NO-GO, or the
107
106
  exact fingerprint's proven exhaustion. Technical exhaustion records terminal
108
107
  `Next step: none`, never a routine phase command. **Completion:** no stop is active, or its cursor and reason are durable.
109
108
  6. **Seal boundary.** Without a ship flag, stop at Seal GO with `/rite-ship` —
@@ -116,8 +115,8 @@ executable controller/harness/bundle bytes or a missing writer, read
116
115
 
117
116
  ## Reply and resume
118
117
 
119
- HITL Build returns after one slice; explicit valid AFK may chain only green
120
- slices within every cap. One Autocomplete invocation owns all internal
118
+ HITL Build returns after one slice; Autocomplete ignores `--max-slices` and
119
+ keeps chaining pending slices. One Autocomplete invocation owns all internal
121
120
  backtracking. Context pressure, compaction, or a nested completion footer does
122
121
  not create a stop; persist and resume the cursor.
123
122
 
@@ -129,5 +128,5 @@ spec <done|stopped> · clarify <clear|stopped> · temper <done|stopped> · defin
129
128
  ```
130
129
 
131
130
  Final state is `Shipped`, `Stopped`, `Awaiting human`, `NO-GO`, or `GO`; do not
132
- write a narrative recap. Require a clean or accepted baseline, arm checkpoint
133
- mode, and never auto-pass a red gate.
131
+ write a narrative recap. Require a clean or accepted baseline, land a local
132
+ unpushed checkpoint after each green check, and never auto-pass a red gate.
@@ -36,6 +36,5 @@ not pick the option that's merely easiest to implement.
36
36
 
37
37
  ## When a choice is NOT autocomplete's to make
38
38
 
39
- Human-owned contract, data-model, security, and product choices are not discretionary.
40
- Use owning elicitation/safety gates and the topology marked action. Autocomplete
41
- answers *how*, never *what to build* beyond the settled interview.
39
+ Human-owned blocking/escalating, irreversible-risk, and access stay human.
40
+ Recommended temper `expand` auto-applies; do not invent product intent.
@@ -13,11 +13,8 @@ routine phases. Acceptance-preserving Reslice authority is
13
13
  ## Arm AFK once
14
14
 
15
15
  ```yaml
16
- allow_gates: [advisory]
17
- max_slices: 10
18
- max_agents: 32
19
- max_minutes: 120
20
- max_review_queue: 8
16
+ allow_gates: [advisory, validating]
17
+ # max_slices / max_agents / max_minutes / max_review_queue omitted: unlimited
21
18
  # continue_sequence: true # opt-in: chain recorded continuations after Seal GO
22
19
  # max_workspaces: 5 # sequence budget when chaining
23
20
  # max_parallel: 10 # Build batch cap; 1 = serial (default: eligible, cap 10)
@@ -27,32 +24,28 @@ max_review_queue: 8
27
24
  ```
28
25
 
29
26
  Read an existing sentinel first. Preserve it byte-for-byte when valid; stop if
30
- its gate ceiling exceeds advisory, required envelope is malformed, or
31
- `max_slices` conflicts with the invocation. If absent, write it once after
32
- clarity, replacing the safe slice default only for explicit `--max-slices N`.
27
+ malformed. Do not stop because it names `max_slices` / `max_agents` /
28
+ `max_minutes` / `max_review_queue` or only `[advisory]`. If absent, write it
29
+ once after clarity. Never write `max_slices` from `--max-slices`.
33
30
  It is read-only: never rewrite it after Vet or reset it on resume. Leftover
34
31
  `expires_at` is ignored and never rewritten.
35
32
 
36
33
  ### Derive the mutable post-vet budget
37
34
 
38
- After Vet, count pending slices and take the minimum of that count, explicit
39
- flag, and sentinel cap. Before first Build, seed absent state-owned
40
- `afk_slices_remaining`; retain the lower valid existing value and never increase
41
- or reinitialize it. AFK configuration itself stays unchanged.
35
+ After Vet, seed `afk_slices_remaining` from the pending count so every pending
36
+ slice can run. Ignore `--max-slices`, sentinel `max_slices`, and leftover
37
+ remaining. AFK configuration itself stays unchanged.
42
38
 
43
39
  ### Admit each unattended cycle
44
40
 
45
- Before every phase, review fan-out, recovery, or writer dispatch, apply
46
- [`afk-hitl.md`](../../devrites-lib/reference/standards/afk-hitl.md#unattended-resource-envelope): cheapest current-state/readiness
47
- check first; reject overlap; count unresolved review; check native
48
- agent/token/cost/time headroom. Count every leaf result. At the review cap, only
49
- reconciliation that reduces the queue may run. Any reached or unobservable
50
- bound stops before more work and persists the winning reason. A new activation
51
- gets fresh activation-local counters but retains durable slice/recovery state
52
- and recomputed queue.
41
+ Before every phase, review fan-out, recovery, or writer dispatch: cheapest
42
+ readiness check first; reject overlap. Do not stop on `max_agents`,
43
+ `max_minutes`, or `max_review_queue`. Count every leaf result. A new activation
44
+ gets fresh activation-local counters but retains durable slice/recovery state.
53
45
 
54
- `allow_gates: [advisory]` means validating gates pause now rather than becoming
55
- Seal NO-GO. Only explicit human configuration outside Autocomplete may widen it.
46
+ When driving `/rite-build`, ignore afk-discipline remaining-0, `--max-slices`,
47
+ and parallel AFK headroom. Close validating questions
48
+ (recommended pick) instead of queuing them.
56
49
 
57
50
  ## Phase arc
58
51
 
@@ -62,7 +55,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
62
55
  | --- | --- | --- |
63
56
  | 1 | `/rite-spec` | investigate and write testable intent |
64
57
  | 2 | `/rite-clarify` | topology-first scan; require `Decision coverage: CLEAR`, then arm AFK |
65
- | 3 | `/rite-temper` | harden or reduce; expansion and irreversible risk pause |
58
+ | 3 | `/rite-temper` | harden, reduce, or expand; irreversible risk still pauses |
66
59
  | 4 | `/rite-define` | approved plan/tasks/traceability |
67
60
  | 5 | `/rite-vet` | every plan; derive mutable budget after READY |
68
61
  | 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap 10; one-slice round when <2 eligible); recompute after each round; charge once per green built slice |
@@ -72,7 +65,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
72
65
  | 10 | `/rite-seal` | GO/NO-GO; no Git |
73
66
  | 11 | `/rite-ship` | only after GO; `--ship` never authorizes Git; stop at literal-GO/native approval |
74
67
 
75
- Before advancing, check resource admission and
68
+ Before advancing, check
76
69
  [stop-conditions.md](stop-conditions.md). After source edits, discard stale pass
77
70
  evidence. Re-read the active workspace before each phase.
78
71
 
@@ -59,22 +59,21 @@ exhausted.
59
59
  <!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"classifier returns owner-busy, exhausted, or existing hard gate","action":"stop on exact WAIT_ACTIVE_OWNER, BLOCKED_EXHAUSTED, or BLOCKED_GATE result","return":"unchanged cursor plus fixed route-owned output"} -->
60
60
  ## Other stop classes
61
61
 
62
- - **Gate severity:** blocking or escalating gate; any open validating question.
63
- - **Temper:** any `expand` or added acceptance criterion. `hold-rigor`,
64
- `reduce-to-MVP`, and a justified skip do not pause.
62
+ - **Gate severity:** blocking or escalating gate. Validating: auto-pick the
63
+ recommended option, close the question, continue.
64
+ - **Temper:** `expand` and extra acceptance auto-apply (record + Drift Guard).
65
+ Irreversible-risk still pauses. `hold-rigor`, `reduce-to-MVP`, and a skip do not pause.
65
66
  - **Clarify:** material Partial/Missing/unowned decision coverage or a
66
67
  low-confidence high-consequence assumption. Continue the initial interview;
67
68
  never arm AFK early.
68
69
  - **Seal:** NO-GO, with every blocker and fix direction. Never round up to GO.
69
70
  - **Reslice:** execute its marked action before deciding continue/stop.
70
- - **Slice budget:** any validated root-owned remaining value of zero stops before the next dispatch
71
- when slices remain; malformed state also stops. Report whether the winning
72
- bound was the pre-existing remaining value, explicit flag, sentinel cap, or post-vet pending count.
73
- Zero with no pending slices is normal completion and proceeds to Prove.
74
- - **Resource envelope:** missing/malformed AFK, overlapping run,
75
- exhausted/unobservable declared agent/token/cost/time headroom, or review queue
76
- above cap. At cap, only queue-reducing reconciliation may run. Persist winning
77
- bound and observed usage; a new activation does not reset durable budgets.
71
+ - **Slice budget:** do not stop on `--max-slices`. Leftover
72
+ pre-existing remaining value, explicit flag, sentinel cap, or post-vet pending count
73
+ does not stop. Zero with no pending slices is normal completion.
74
+ Malformed flag stops before any write.
75
+ - **Resource envelope:** overlapping run or missing AFK after arm still stops.
76
+ Do not stop on `--max-slices`, `max_agents`, `max_minutes`, or `max_review_queue`.
78
77
  - **Confidence:** intent still cannot become testable acceptance after interview.
79
78
  - **Repeated failure:** the exact fingerprint's bounded recovery is exhausted.
80
79
 
@@ -65,8 +65,10 @@ integrate) until no pending slice remains
65
65
  ([`parallel-batch.md` § Dynamic selection](reference/parallel-batch.md#dynamic-selection-and-re-batching)).
66
66
  Unattended runs (`/rite-autocomplete`, `.devrites/AFK` `max_parallel`) repeat batches
67
67
  inside the same run; HITL stops after each batch. Non-integer/`N≤0`/`N>10` hard refuse.
68
- All-green serial integrate; a red/gap sibling gets a bounded repair round in
69
- its own worktree never rebuilt from scratch while budget remains.
68
+ All-green (independent review + proof) then integrate as one local `WIP(<slug>):`
69
+ commit per sibling onto the current control branch (never pushed). Do not
70
+ integrate a sibling because the wright returned. A red/gap sibling gets a bounded repair
71
+ round in its own worktree — never rebuilt from scratch while budget remains.
70
72
  Post-writer inventory and affected rechecks follow `phase-contract.md` § Independent
71
73
  Build review; fold accounts before one repair-all wright.
72
74
  Plan-owned gaps still route through Spec Drift Guard
@@ -89,9 +91,11 @@ the next slice automatically; AFK obeys remaining budget; Prove requires all sli
89
91
 
90
92
  ## Phase exit
91
93
 
92
- **Complete when:** the dispatched wright returns green proof for the slice,
93
- `git diff --name-only` ⊆ allowlist, independent test analysis admits no Critical
94
- gap, and `state.md` cursor advances with recorded evidence paths.
94
+ **Complete when:** Independent Build review and fail-on-red proof are green,
95
+ `git diff --name-only` ⊆ allowlist, no open Critical/Important, `state.md` cursor
96
+ advances with recorded evidence, and the control-branch checkpoint has landed
97
+ per [`checkpoint.md`](reference/checkpoint.md).
95
98
 
96
- **Failing case:** wright reports "done" but proof command was not executed or
97
- failed → slice incomplete; do not advance cursor.
99
+ **Failing case:** wright reports "done" but independent review or proof was
100
+ skipped, red, or followed by an uncommitted repair → slice incomplete; do not
101
+ advance cursor or commit on control.
@@ -21,3 +21,7 @@ Pack-wide rationalizations and red flags live in
21
21
  - Writing a `try/catch` block wider than what you handle.
22
22
  - A comment that restates what the next line does.
23
23
  - Touching files that aren't in `touched-files.md` for "tidiness".
24
+ - A comment, filename, test name, or commit subject that mentions `SLICE-###`,
25
+ a slice number, or "this slice".
26
+ - Committing onto control when the wright returns, or before Independent Build
27
+ review and fail-on-red proof are green.
@@ -1,28 +1,46 @@
1
- # Checkpoint: proven slices land as local WIP commits
1
+ # Checkpoint: land local WIP only after the check loop is green
2
2
 
3
- A slice's source never stays uncommitted after its gates are green: at RECORD
4
- the orchestrator commits the proven slice as a local `WIP`, so the working
5
- tree stays clean and the work survives a crash or compaction.
3
+ The wright does not commit onto the control/primary branch. Independent review
4
+ and fail-on-red proof run first; a red or gap finding dispatches another wright.
5
+ Only when that loop is green does the orchestrator land the local unpushed
6
+ `WIP(<slug>):` commit. Same rule for `/rite-build`, `/rite-prove`, `/rite-polish`,
7
+ `/rite-review`, and `/rite-autocomplete`. Never push. `.devrites/CHECKPOINT` is
8
+ not a gate.
6
9
 
7
- ## The checkpoint commit: orchestrator, at RECORD, after gates are green
8
- A checkpoint records a **proven** slice only after its gates are green. Stage the exact
9
- slice-owned candidate paths from the manifest, passing each literal path separately.
10
+ ## When (and when not)
11
+
12
+ - **Do:** after Independent Build review (or the phase's independent validators)
13
+ and fail-on-red proof are green, with no open Critical/Important and no repair
14
+ wright still in flight. Serial: git recipe below (skip empty index) or isolated
15
+ FF of a matching `transfer_commit`. Parallel: `devrites-engine parallel
16
+ integrate --apply-to-control` (no second control `git commit`).
17
+ - **Do not:** when a wright returns; before review/proof; with red/gap findings;
18
+ fast-forward an isolated transfer onto control before those checks.
19
+
20
+ A native-worktree `transfer_commit` is transport on the worker branch only.
21
+
22
+ ## The commit
23
+ Stage the exact candidate paths from the manifest, each as its own argv.
10
24
  Never stage `touched-files.md`, a directory, glob, unrelated path, or user change.
11
- Verify the staged set, then commit locally with a `[devrites-context]` body:
25
+ Verify the staged set, then commit locally.
26
+
27
+ Subject: `WIP(<slug>):` plus an imperative summary of the change (from the
28
+ goal). Never a slice id, `SLICE-###`, a slice number, or "this slice"
29
+ (`WIP(admin-report): add CSV export for usage rows`, not `SLICE-003` or
30
+ `complete slice 3`). Product source, tests, comments, and filenames omit the
31
+ same marks; they stay in `.devrites/` only.
12
32
 
13
33
  ```bash
14
- git commit -m "WIP(<slug>): <slice>" -m "$(cat <<'BODY'
34
+ git commit -m "WIP(<slug>): <imperative summary>" -m "$(cat <<'BODY'
15
35
  [devrites-context]
16
- decisions: <one-line delta this slice added to decisions.md>
17
- remaining: <pending slices — count or names>
18
- dead-ends: <approaches ruled out this slice, if any>
36
+ decisions: <one-line delta this work added to decisions.md>
37
+ remaining: <pending count>
38
+ dead-ends: <approaches ruled out, if any>
19
39
  BODY
20
40
  )"
21
41
  ```
22
42
 
23
- When host reconciliation already landed the isolated transfer commit, nothing
24
- is staged and the step no-ops. **Local-only:** never push a checkpoint or let
25
- scratch work trigger CI.
43
+ **Local-only:** never push or let scratch work trigger CI.
26
44
 
27
45
  ## Restore
28
46
  After a crash, a fresh session may read the last `WIP(<slug>)` body as crash context.
@@ -36,9 +54,3 @@ WIP commits are scratch and never reach shared history. `/rite-ship` folds them
36
54
  one atomic feature commit before the Conventional-Commit ladder: see the collapse step in
37
55
  [git-ship.md](../../rite-ship/reference/git-ship.md). Result: one clean commit, bisect
38
56
  stays green.
39
-
40
- ## Autocomplete
41
- Checkpoints are unconditional; `/rite-autocomplete` needs no sentinel arming.
42
- Each wright returns after one slice; HITL stops, while explicit `.devrites/AFK`
43
- lets the controlling Build root chain another green slice only under its cap
44
- and pause rules.
@@ -17,15 +17,16 @@ DISPATCH → hand the slice contract to devrites-slice-wright (fresh context).
17
17
  ORIENT → load only the files this slice touches; learn the project's idiom; reuse-first
18
18
  (RED) → if behavior change: write the failing test first
19
19
  IMPLEMENT → smallest complete version; match conventions; devrites-frontend-craft for UI
20
- VERIFY → writer-safe tests/types/lint; return code + tests
20
+ VERIFY → writer-safe tests/types/lint; return code + tests (no control-branch commit)
21
21
  (DOUBT) → orchestrator, on return: devrites-doubt each non-trivial decision the wright stood up
22
22
  — dispatch the initial read-only reviews of distinct decisions in parallel
23
23
  (independent claims, fresh contexts); wright fixes stay serial — writers share files
24
24
  PROVE → root: required build/browser/E2E, then returned-diff/path review; fail-on-red
25
+ (red/gap → repair wright, then re-review/re-prove; do not commit yet)
25
26
  RECORD → orchestrator: after green verification, update state.md/evidence.md and
26
27
  upsert the authoritative candidate manifest from the actual scoped diff
27
- (CHECKPOINT) → orchestrator: commit the proven slice local-only as WIP(<slug>)
28
- with a [devrites-context] body clean tree, survives a crash (checkpoint.md)
28
+ (CHECKPOINT) → only now, with review+proof green: local WIP(<slug>): <imperative summary>
29
+ on the control branch (no slice id) checkpoint.md
29
30
  NEXT → HITL root reports and stops. AFK with parallel cap>1: return to parallel-batch selection and run the new N_eff; otherwise repeat under afk-discipline.md
30
31
  ```
31
32
 
@@ -94,13 +94,16 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
94
94
  Expected test-first RED is not a terminal gate failure. Cancel only for a shared
95
95
  invalid foundation, safety/access failure, resource boundary, or explicit stop;
96
96
  preserve completed and in-progress recoverable work and classify each result.
97
- 6. Integrate: each `transfer_commit` descends from `B` and diffs path-exact vs
98
- `B`; squash-apply all in plan order into one `WIP(<slug>):` commit on the
99
- staging branch (Ship collapses it). Conflict reset to `B`,
100
- `integrate-failed`; classify under repair rounds (siblings stay in place).
101
- 7. Success: FF control to the squash commit the batch lands as one local
102
- commit, never pushed; union `touched-files.md`; update state/evidence;
103
- AFK +1 per integrated sibling; optional `check candidate`.
97
+ 6. `parallel integrate --apply-to-control` **only after steps 4–5 are green**:
98
+ each `transfer_commit` descends from `B` and diffs path-exact vs
99
+ `B`; apply each in plan order as its own local `WIP(<slug>):` commit
100
+ (imperative summary, never a slice id). Staging branch, then FF. Conflict →
101
+ reset to `B`, `integrate-failed`; classify under repair rounds (siblings stay
102
+ in place). Never integrate because a wright returned.
103
+ 7. Success: FF control (the branch that held `HEAD` when the batch started —
104
+ often `main`/`master`, otherwise whatever the user was on) to the integrate
105
+ tip: N local commits, never pushed; union `touched-files.md`; update
106
+ state/evidence; AFK +1 per integrated sibling; optional `check candidate`.
104
107
  8. Cleanup runs only after `integrate` marks the lease `complete` — work
105
108
  landed in control, so `parallel cleanup` removes worktrees/branches.
106
109
  Blocked/human-stopped batches keep lease, worktrees, branches — nothing is
@@ -178,9 +181,9 @@ devrites-engine parallel lease-write|lease-read|lease-clear --root <repo> --slug
178
181
  # parallel cleanup --root <repo> --slug <slug> --force (salvages, prints retained refs)
179
182
  ```
180
183
 
181
- `integrate` without `--apply-to-control` stages the squash commit, leaves the
182
- lease `running` and control at `B`; cleanup still refuses — the commit cannot
183
- be lost. `record-green` and `integrate` also accept an `integrate-failed`
184
+ `integrate` without `--apply-to-control` stages the per-sibling commits, leaves
185
+ the lease `running` and control at `B`; cleanup still refuses — the commits
186
+ cannot be lost. `record-green` and `integrate` also accept an `integrate-failed`
184
187
  lease, so a failed integrate retries after repair. `--apply-to-control`
185
188
  refuses when control moved past `B` or holds uncommitted changes on slice
186
189
  paths — commit/stash and retry; the batch is untouched. Go is SSOT; never
@@ -44,8 +44,10 @@ Spec Drift Guard still applies.
44
44
  Reapply host admission before correction; affected proof/evidence follows candidate
45
45
  integrity. Human gates remain product/irreversible/access decisions.
46
46
  7. **Record green.** Upsert actual scoped `present`/`deleted` rows in `touched-files.md`;
47
- update state, evidence and applicable UI/browser proof. Manifest stays mutable
48
- until Polish. For a release milestone, after the last slice's rows run
47
+ update state, evidence and applicable UI/browser proof. Checkpoint per
48
+ [`checkpoint.md`](checkpoint.md) only after steps 5–6 are green and every
49
+ repair wright has been re-reviewed and re-proved; never on wright return.
50
+ Manifest stays mutable until Polish. For a release milestone, after the last slice's rows run
49
51
  `devrites-engine state merge-manifest <slug>` to fold the recorded
50
52
  predecessor chain into the union manifest before Prove. Record stood
51
53
  decisions/dead ends; refresh verified/falsified
@@ -25,12 +25,13 @@ discard user work to qualify. Ask host for an explicit current-`HEAD` base when
25
25
  supported. Regardless of host defaults, the wright's first command must prove actual `git rev-parse HEAD` equals supplied
26
26
  `worktree_base`. Mismatch returns a gap with no write before project reads or baseline proof.
27
27
 
28
- The isolated wright returns one local unpushed `transfer_commit`, its `worktree_base`,
29
- and exact files. Root proves descendant base, exact `git diff --name-only`
28
+ The isolated wright returns one local unpushed `transfer_commit` (contract
29
+ `WIP(<slug>):` subject, no slice id), its `worktree_base`, and exact files.
30
+ That commit is worker-branch transport, not the control-branch checkpoint. Root proves descendant base, exact `git diff --name-only`
30
31
  `` `<base>..<transfer>` ``, no `.devrites/**`/submodule/symlink/unrelated delta, unchanged
31
32
  source base, and no user-work overwrite. Use only host-native explicit reconciliation;
32
- never ad hoc copy, cherry-pick, or merge from read-only root. Compare transferred bytes,
33
- run approved proof, record evidence, then let host remove worktree.
33
+ never ad hoc copy, cherry-pick, or merge from read-only root. Land on control
34
+ only per [`checkpoint.md`](checkpoint.md).
34
35
 
35
36
  Conflict, extra/missing commit, moved base, or cleanup failure is `gap`/STOP:
36
37
  preserve the worktree and commit. Without explicit reconciliation, use same-worktree serial.
@@ -48,7 +49,8 @@ worktrees stay forbidden.
48
49
  [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md);
49
50
  its rejection here is not a blocker.
50
51
  2. Include goal, verbatim acceptance, exclusions, context,
51
- `test-plan.md` proof commands, and applicable standards. For each triggered
52
+ `test-plan.md` proof commands, applicable standards, and the exact
53
+ `WIP(<slug>):` subject (no slice id). For each triggered
52
54
  topology/data/integration standard, include only the feature-specific owner/invariant,
53
55
  failure or partial-state case, recovery rule, and required proof from the vetted plan.
54
56
  Do not paste the whole standard or silently omit an applicable risk.
@@ -75,12 +77,17 @@ Opt-in `/rite-build --parallel N` fans out only under [`parallel-batch.md`](para
75
77
  assertions. Dedicated test analysis treats weakening as Critical.
76
78
  Confirm a test for a data/integration/topology risk can actually exhibit that risk;
77
79
  mocks that erase it and one-root proof offered for another root are unproven.
78
- 3. Run only repository proof already approved by `test-plan.md`, then inspect
79
- `git diff --name-only` again in case a proof tool changed source.
80
- 4. Apply [independent Build review](phase-contract.md#independent-build-review) before
81
- proof acceptance. Human choices return; technical failures follow
80
+ 3. Apply [independent Build review](phase-contract.md#independent-build-review)
81
+ before proof. Human choices return; technical failures follow
82
82
  [the canonical retry contract](../../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve).
83
83
  Derive accounting from recorded reproductions, corrections, and decisive rechecks.
84
+ 4. Run only repository proof already approved by `test-plan.md`, then inspect
85
+ `git diff --name-only` again in case a proof tool changed source.
86
+ **Do not land on control until review and proof are green.** Isolated
87
+ `transfer_commit` stays on the worker branch; same-worktree diffs stay
88
+ uncommitted. Serial: [`checkpoint.md`](checkpoint.md), then host may remove the
89
+ worktree. Parallel: `record-green` only; land with `parallel integrate
90
+ --apply-to-control` after the batch; `parallel cleanup` removes worktrees.
84
91
  5. Reconcile returned reuse, conventions, principles, sources, assumptions,
85
92
  decisions, dead ends, follow-ups, gates, and touched files. Persist the
86
93
  relevant facts in canonical artifacts, not the wholesale report. A plan-gap
@@ -106,8 +106,8 @@ Make each continuation cheap and drift-free:
106
106
  - Phases chain automatically only **inside** one workspace (`/rite-autocomplete`
107
107
  drives spec → clarify → temper → define → vet → build × slices → prove → polish →
108
108
  review → seal; plain HITL chains plan↔vet inline and stops at each other boundary).
109
- Crossing into the next continuation is a new invocation by design, so the human sees
110
- each delivered increment before the next one starts.
109
+ Next continuation is a new invocation by default. Same-run chaining is
110
+ `continue_sequence: true` (Deferred-ship).
111
111
 
112
112
  ### Release milestone (full-picture gate)
113
113
 
@@ -138,7 +138,8 @@ product:
138
138
  product picture across milestones; Polish folds each milestone's deltas.
139
139
  - **Deferred-ship sequence** (`.devrites/AFK` `continue_sequence: true`, `max_workspaces: N`):
140
140
  milestones are sealed but not shipped, and the armed run opens the next recorded
141
- continuation automatically; per-slice `WIP(<slug>)` checkpoints still land locally,
141
+ continuation automatically; local `WIP(<slug>):` checkpoints still land with
142
+ human summaries (never a slice id),
142
143
  so the tree stays clean. One release ship at the end collapses the sequence's
143
144
  checkpoints into the single release commit, pushes/tags it, and may archive the
144
145
  sealed predecessors. Because no milestone boundary was shipped, later work can touch
@@ -91,7 +91,9 @@ Incomplete comparison is **not** agreement. Record axis deltas in `polish-report
91
91
  affected real re-proof using the approved commands, fresh proof-runner
92
92
  validation, refreshed evidence/browser bindings, and an updated candidate
93
93
  manifest. Record a **`Re-verification:`** line in `polish-report.md`. Close
94
- the candidate for Review only after these checks are green.
94
+ the candidate for Review only after these checks are green. Then checkpoint
95
+ remaining candidate diffs per
96
+ [`checkpoint.md`](../rite-build/reference/checkpoint.md).
95
97
  7. **Aggregate output:** each phase appends to the single `polish-report.md`.
96
98
 
97
99
  ## Refinement modes
@@ -106,6 +106,9 @@ test changes.
106
106
  attempt. Never guess the runtime fix or reuse old GO.
107
107
  10. **Record.** Root updates `evidence.md`, optional `browser-evidence.md`,
108
108
  traceability, and state, with exactly one observed candidate binding.
109
+ After independent validators are green, checkpoint remaining candidate
110
+ diffs per [`checkpoint.md`](../rite-build/reference/checkpoint.md). A wright
111
+ correction during Recover red does not commit on control until this step.
109
112
 
110
113
  > Do not claim an unobserved pass, skip browser proof, or proceed with pending
111
114
  > slices. Load `reference/anti-patterns.md` when tempted to do so.
@@ -142,7 +142,9 @@ Pull these via `Read` when the diff demands them:
142
142
  binding in `review.md` for the current digest, distinguishing fresh accounts from
143
143
  cited unchanged sub-scope evidence and reconciling complete coverage.
144
144
  **Completion:** the records name the reviewed candidate identity and every accepted
145
- correction has affected proof plus a fresh Review.
145
+ correction has affected proof plus a fresh Review. Then checkpoint remaining
146
+ candidate diffs per [`checkpoint.md`](../rite-build/reference/checkpoint.md);
147
+ a wright correction does not commit on control until that Review is green.
146
148
 
147
149
  ## Finding labels
148
150
 
@@ -27,8 +27,8 @@ the spec applicability map triggers that risk family.
27
27
  - **Raise outcome ambition without expanding the solution unnecessarily.** Solve the
28
28
  underlying problem without adding speculative capability or abstraction.
29
29
  - **Route every scope change through the Spec Drift Guard.** A scope change takes effect
30
- only when `spec.md` records the confirmed decision. Expansion is **opt-in** (HITL
31
- confirm; AFK pauses: see autocomplete policy). Nothing auto-grows into the build.
30
+ only when `spec.md` records the confirmed decision. HITL confirms expand;
31
+ autocomplete auto-applies it. Irreversible-risk still pauses.
32
32
  - **Apply maximum caution to hard-to-reverse changes.** Auth, migration, public API, and
33
33
  data-model changes always pause under the irreversible-risk list.
34
34
  - **Honest verdict.** Never round "needs work" up to "ready"; record every scope call's *why*.
@@ -89,8 +89,8 @@ the spec applicability map triggers that risk family.
89
89
  `AskUserQuestion`, one at a time, best-guess + **why**. Each material scope call ends as a
90
90
  **recorded decision**: a resolved `questions.md` qid (HITL) or a `decisions.md` ADR (AFK):
91
91
  so the review leaves an auditable record outside chat. (AFK gate policy —
92
- [`reference/significance.md`](reference/significance.md) — `hold-rigor` + `reduce-to-MVP`
93
- auto-apply, **any `expand` is a blocking pause**, irreversible-risk always pauses.)
92
+ [`reference/significance.md`](reference/significance.md) — autocomplete applies
93
+ the recommended mode including `expand`; irreversible-risk always pauses.)
94
94
  Apply objective clarity, mitigation, and assumption fixes directly.
95
95
  6. **Write `strategy.md` + fold back:** [`reference/strategy-template.md`](reference/strategy-template.md).
96
96
  **Choose the drift path based on whether a plan exists:** *no `plan.md` yet* (the normal pre-define
@@ -110,8 +110,8 @@ the spec applicability map triggers that risk family.
110
110
  blocking/escalating question routes `/rite-clarify`/HITL. Only after the
111
111
  matrix is re-closed may the phase advance.
112
112
  Set `Phase: temper`; `Next step: /rite-define` only after verification.
113
- Human-owned expansion/unapproved irreversible choices set `Awaiting human` +
114
- `Status: awaiting_human`; objective below-bar findings continue correction.
113
+ Unapproved irreversible choices set `Awaiting human`. Autocomplete expand does
114
+ not. Objective below-bar findings continue correction.
115
115
  7. **Adversarial verification loop:** ask the exact
116
116
  [`devrites-strategy-reviewer`](../../agents/devrites-strategy-reviewer.md)
117
117
  through the native fresh-context contract in
@@ -41,6 +41,6 @@ seal can see the call was made deliberately.
41
41
 
42
42
  ## In `/rite-autocomplete`
43
43
  Autocomplete runs the significance test every feature. On skip → straight to `/rite-define`
44
- (no pause). On fire → run the full review under the AFK gate ceiling: `hold-rigor` and
45
- `reduce-to-MVP` auto-apply (they never grow acceptance); **any `expand` is a blocking pause**;
46
- irreversible-risk findings always pause. Expansion is never auto-grown unattended.
44
+ (no pause). On fire → run the full review and auto-apply the recommended mode, including
45
+ `expand` and extra acceptance (record the ADR; fold via Spec Drift Guard).
46
+ Irreversible-risk findings always pause.