devrites 7.0.17 → 7.1.1
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.
- package/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/engine/help.go +4 -3
- package/engine/internal/lib/affected.go +233 -0
- package/engine/internal/lib/cli_observe.go +25 -3
- package/engine/internal/lib/taskgraph.go +79 -12
- package/engine/main.go +19 -2
- package/pack/.claude/agents/devrites-upgrade-planner.md +2 -1
- package/pack/.claude/skills/rite-autocomplete/SKILL.md +7 -7
- package/pack/.claude/skills/rite-autocomplete/reference/loop.md +9 -10
- package/pack/.claude/skills/rite-build/SKILL.md +10 -10
- package/pack/.claude/skills/rite-build/reference/afk-discipline.md +9 -11
- package/pack/.claude/skills/rite-build/reference/anti-patterns.md +2 -2
- package/pack/.claude/skills/rite-build/reference/checkpoint.md +10 -5
- package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +6 -4
- package/pack/.claude/skills/rite-build/reference/output.md +15 -21
- package/pack/.claude/skills/rite-build/reference/parallel-batch.md +23 -17
- package/pack/.claude/skills/rite-build/reference/phase-contract.md +15 -3
- package/pack/.claude/skills/rite-define/SKILL.md +4 -2
- package/pack/.claude/skills/rite-plan/reference/slicing.md +6 -2
- package/pack/generated/claude/agents/devrites-upgrade-planner.md +2 -1
- package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +7 -7
- package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +9 -10
- package/pack/generated/claude/skills/rite-build/SKILL.md +10 -10
- package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +9 -11
- package/pack/generated/claude/skills/rite-build/reference/anti-patterns.md +2 -2
- package/pack/generated/claude/skills/rite-build/reference/checkpoint.md +10 -5
- package/pack/generated/claude/skills/rite-build/reference/one-slice-cycle.md +6 -4
- package/pack/generated/claude/skills/rite-build/reference/output.md +15 -21
- package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +23 -17
- package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +15 -3
- package/pack/generated/claude/skills/rite-define/SKILL.md +4 -2
- package/pack/generated/claude/skills/rite-plan/reference/slicing.md +6 -2
- package/pack/generated/codex/agents/devrites-upgrade-planner.toml +2 -1
- package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +7 -7
- package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +9 -10
- package/pack/generated/codex/skills/rite-build/SKILL.md +10 -10
- package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +9 -11
- package/pack/generated/codex/skills/rite-build/reference/anti-patterns.md +2 -2
- package/pack/generated/codex/skills/rite-build/reference/checkpoint.md +10 -5
- package/pack/generated/codex/skills/rite-build/reference/one-slice-cycle.md +6 -4
- package/pack/generated/codex/skills/rite-build/reference/output.md +15 -21
- package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +23 -17
- package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +15 -3
- package/pack/generated/codex/skills/rite-define/SKILL.md +4 -2
- package/pack/generated/codex/skills/rite-plan/reference/slicing.md +6 -2
- package/pack/generated/devin/agents/devrites-upgrade-planner.md +2 -1
- package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +7 -7
- package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +9 -10
- package/pack/generated/devin/skills/rite-build/SKILL.md +10 -10
- package/pack/generated/devin/skills/rite-build/reference/afk-discipline.md +9 -11
- package/pack/generated/devin/skills/rite-build/reference/anti-patterns.md +2 -2
- package/pack/generated/devin/skills/rite-build/reference/checkpoint.md +10 -5
- package/pack/generated/devin/skills/rite-build/reference/one-slice-cycle.md +6 -4
- package/pack/generated/devin/skills/rite-build/reference/output.md +15 -21
- package/pack/generated/devin/skills/rite-build/reference/parallel-batch.md +23 -17
- package/pack/generated/devin/skills/rite-build/reference/phase-contract.md +15 -3
- package/pack/generated/devin/skills/rite-define/SKILL.md +4 -2
- package/pack/generated/devin/skills/rite-plan/reference/slicing.md +6 -2
- package/pack/generated/omp/agents/devrites-upgrade-planner.md +2 -1
- package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +7 -7
- package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +9 -10
- package/pack/generated/omp/skills/rite-build/SKILL.md +10 -10
- package/pack/generated/omp/skills/rite-build/reference/afk-discipline.md +9 -11
- package/pack/generated/omp/skills/rite-build/reference/anti-patterns.md +2 -2
- package/pack/generated/omp/skills/rite-build/reference/checkpoint.md +10 -5
- package/pack/generated/omp/skills/rite-build/reference/one-slice-cycle.md +6 -4
- package/pack/generated/omp/skills/rite-build/reference/output.md +15 -21
- package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +23 -17
- package/pack/generated/omp/skills/rite-build/reference/phase-contract.md +15 -3
- package/pack/generated/omp/skills/rite-define/SKILL.md +4 -2
- package/pack/generated/omp/skills/rite-plan/reference/slicing.md +6 -2
- package/pack/generated/pi/agents/devrites-upgrade-planner.md +2 -1
- package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +7 -7
- package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +9 -10
- package/pack/generated/pi/skills/rite-build/SKILL.md +10 -10
- package/pack/generated/pi/skills/rite-build/reference/afk-discipline.md +9 -11
- package/pack/generated/pi/skills/rite-build/reference/anti-patterns.md +2 -2
- package/pack/generated/pi/skills/rite-build/reference/checkpoint.md +10 -5
- package/pack/generated/pi/skills/rite-build/reference/one-slice-cycle.md +6 -4
- package/pack/generated/pi/skills/rite-build/reference/output.md +15 -21
- package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +23 -17
- package/pack/generated/pi/skills/rite-build/reference/phase-contract.md +15 -3
- package/pack/generated/pi/skills/rite-define/SKILL.md +4 -2
- package/pack/generated/pi/skills/rite-plan/reference/slicing.md +6 -2
- package/package.json +1 -1
|
@@ -46,15 +46,14 @@ readiness check first; reject overlap. Do not stop on `max_agents`,
|
|
|
46
46
|
`max_minutes`, or `max_review_queue`. Count every leaf result. A new activation
|
|
47
47
|
gets fresh activation-local counters but retains durable slice/recovery state.
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`--
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
`devrites-engine state resolve
|
|
55
|
-
`/rite-resolve` to the user. Escalating, irreversible-risk, access,
|
|
56
|
-
|
|
57
|
-
validating question (`slice: seal`).
|
|
49
|
+
[Build return](../../rite-build/reference/output.md#caller-owned-continuation).
|
|
50
|
+
Pass `--parallel N`; ignore leftover cap/headroom, remaining-0,
|
|
51
|
+
and `--max-slices` stops. Agent-invented dispatch, wait, tool-call, or turn budgets are not stop conditions.
|
|
52
|
+
An explicit human request to pause or run only a bounded subset still wins.
|
|
53
|
+
Path collisions serialize work; they do not end the run.
|
|
54
|
+
Resolve ranked validating/blocking picks via `devrites-engine state resolve`;
|
|
55
|
+
never hand `/rite-resolve` to the user. Escalating, irreversible-risk, access, blocking
|
|
56
|
+
without recommendations, and Seal judgment (`slice: seal`) still pause.
|
|
58
57
|
|
|
59
58
|
## Phase arc
|
|
60
59
|
|
|
@@ -67,7 +66,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
|
|
|
67
66
|
| 3 | `/rite-temper` | harden or reduce; `expand` and extra acceptance stop for a human; irreversible risk still pauses |
|
|
68
67
|
| 4 | `/rite-define` | approved plan/tasks/traceability |
|
|
69
68
|
| 5 | `/rite-vet` | every plan; derive mutable budget after READY |
|
|
70
|
-
| 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10;
|
|
69
|
+
| 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10; serial if <2 eligible); refill per landing; charge once per landed slice |
|
|
71
70
|
| 7 | `/rite-prove` | all slices built except deferred (`Satisfies: none`); approved proof; recovery on red |
|
|
72
71
|
| 8 | `/rite-polish` | re-prove after code edits |
|
|
73
72
|
| 9 | `/rite-review` | in-scope correction then fresh proof |
|
|
@@ -10,10 +10,10 @@ argument-hint: "[--parallel N] [slice number or name]"
|
|
|
10
10
|
|
|
11
11
|
# /rite-build: one verified slice
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
**
|
|
13
|
+
Active caller takes precedence per [output.md](reference/output.md#caller-owned-continuation).
|
|
14
|
+
Standalone HITL stops; standalone AFK chains under green proof, caps and pause
|
|
15
|
+
rules. Every wright returns after one slice.
|
|
16
|
+
**HITL:** `/rite-build --parallel N` (2≤N≤10; N=1≡serial) follows
|
|
17
17
|
[`reference/parallel-batch.md`](reference/parallel-batch.md)
|
|
18
18
|
([`one-slice-cycle.md`](reference/one-slice-cycle.md)).
|
|
19
19
|
|
|
@@ -44,8 +44,8 @@ Wright applies anti-slop; root verifies returns and never patches source. Refuse
|
|
|
44
44
|
|
|
45
45
|
## Invariants
|
|
46
46
|
|
|
47
|
-
-
|
|
48
|
-
|
|
47
|
+
- Standalone HITL default: serial on control (core.md #5). AFK/`--parallel N`
|
|
48
|
+
uses [`parallel-batch.md`](reference/parallel-batch.md).
|
|
49
49
|
Same-worktree multi-writer / root-emulated concurrency forbidden.
|
|
50
50
|
Native-worktree pilot = single-slice isolation when `wright-dispatch.md`
|
|
51
51
|
preflight + reconcile hold.
|
|
@@ -79,7 +79,8 @@ Wright applies anti-slop; root verifies returns and never patches source. Refuse
|
|
|
79
79
|
<!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"Vet-ready admitted bytes require root authorship outside product wright","action":"ROOT_TRANSACTION; root writes only admitted .devrites/** targets","return":"saved Build slice cursor; wright product allowlist unchanged"} -->
|
|
80
80
|
## `--parallel N` (opt-in)
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
HITL default/explicit `1` ≡ serial; AFK inherits cap.
|
|
83
|
+
`2`–`10` is a **cap** — the root runs an eligible
|
|
83
84
|
path-disjoint set it can start now (`N_eff`, from `parallel select --from-plan`), takes fewer when the cap cannot be
|
|
84
85
|
filled, and refills a slot per landing (serial slice or one sibling) until
|
|
85
86
|
no pending slice remains
|
|
@@ -107,10 +108,9 @@ AFK charges per landed sibling only. Running lease blocks another
|
|
|
107
108
|
|
|
108
109
|
Run every step in `reference/phase-contract.md`: readiness, one target, dispatch
|
|
109
110
|
or canonical transaction, return inspection, independent code/doubt/test analysis,
|
|
110
|
-
approved fail-on-red proof, record,
|
|
111
|
+
approved fail-on-red proof, record, and applicable accounting. Continue/reply via
|
|
111
112
|
[`reference/output.md`](reference/output.md) plus the shared
|
|
112
|
-
[`reply contract`](../devrites-lib/reference/reply-contract.md).
|
|
113
|
-
the next slice automatically; AFK obeys remaining budget; Prove requires every slice built except a
|
|
113
|
+
[`reply contract`](../devrites-lib/reference/reply-contract.md). Standalone AFK obeys remaining budget; Prove requires every slice built except a
|
|
114
114
|
[deferred slice](../rite-plan/reference/slicing.md#deferred-slice).
|
|
115
115
|
|
|
116
116
|
## Phase exit
|
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
> Root-only: not inlined in --role bundles.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
without per-slice user input. The rules below limit that unattended work.
|
|
7
|
-
|
|
8
|
-
Load the shared
|
|
5
|
+
`.devrites/AFK` enables unattended slice chaining. Load the shared
|
|
9
6
|
[`afk-hitl.md`](../../devrites-lib/reference/standards/afk-hitl.md#the-sentinel-devritesafk)
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
for sentinel schema, defaults, gate ceiling, and mutable-counter ownership.
|
|
8
|
+
This file owns Build dispatch, charging, and red paths.
|
|
12
9
|
|
|
13
|
-
Rules: green before `built`;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`dispatch abandon --reason`.
|
|
10
|
+
Rules: green before `built`; gates before their action; irreversible work
|
|
11
|
+
(destructive/auth/public API) pauses; no tick ends with an open/sealed wave —
|
|
12
|
+
wait for returns or `dispatch abandon --reason`.
|
|
17
13
|
|
|
18
14
|
## Iteration cap
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
Under active `/rite-autocomplete`, skip the slice-cap checks, charges, and cap-stop message below;
|
|
17
|
+
use its [admission rules](../../rite-autocomplete/reference/loop.md#admit-each-unattended-cycle).
|
|
18
|
+
Otherwise root owns cap:
|
|
21
19
|
|
|
22
20
|
1. **Before every dispatch**, re-read `.devrites/AFK`, `state.md`, and the
|
|
23
21
|
selected slice. This invocation's `--parallel N` is the cap when present;
|
|
@@ -10,12 +10,12 @@ Pack-wide rationalizations and red flags live in
|
|
|
10
10
|
|
|
11
11
|
| Excuse | Rebuttal |
|
|
12
12
|
|---|---|
|
|
13
|
-
| "Slices 1 and 2 are related; let me do both." |
|
|
13
|
+
| "Slices 1 and 2 are related; let me do both." | Caller first: [output.md](output.md#caller-owned-continuation). Standalone HITL stops; standalone AFK chains after green proof and cap/pause gates; each wright returns after one. |
|
|
14
14
|
| "It's faster to skip `devrites-doubt` for this small change." | Doubt is cheapest *before* the decision is standing. After is debugging. |
|
|
15
15
|
|
|
16
16
|
## Red Flags
|
|
17
17
|
|
|
18
|
-
-
|
|
18
|
+
- Next slice violates caller/standalone routing or proof/cap/pause gates.
|
|
19
19
|
- Skipping `devrites-doubt` on a branching, boundary, data-model, auth, public-API, or migration decision.
|
|
20
20
|
- Adding a dependency or a second design system without recording rationale in `decisions.md`.
|
|
21
21
|
- Writing a `try/catch` block wider than what you handle.
|
|
@@ -54,11 +54,16 @@ BODY
|
|
|
54
54
|
|
|
55
55
|
**Local-only:** never push or let scratch work trigger CI.
|
|
56
56
|
|
|
57
|
-
After
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
After green landing (parallel: successful integrate), check `state.md`
|
|
58
|
+
outside fences before reselecting:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
- [x] SLICE-004 built — <proof/checkpoint reference>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
A cursor `built_slices` value or a tasks.md `Status: built` field is not a substitute.
|
|
65
|
+
After landing: `devrites-engine check regression <slug> --update`. Before landing,
|
|
66
|
+
restore or route `BLOCKED` lost facts.
|
|
62
67
|
|
|
63
68
|
## Restore
|
|
64
69
|
After a crash, a fresh session may read the last `WIP(<slug>)` body as crash context.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# One-slice cycle
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Each wright returns after one proven slice. Root follows
|
|
4
|
+
[`output.md`](output.md#caller-owned-continuation); standalone AFK uses
|
|
5
|
+
`afk-discipline.md`.
|
|
6
6
|
This serial cycle is the default `/rite-build`. Opt-in fan-out: [`parallel-batch.md`](parallel-batch.md) (`--parallel N`).
|
|
7
7
|
|
|
8
8
|
## The cycle
|
|
@@ -31,7 +31,9 @@ RECORD → orchestrator: after green verification, update state.md/evidence.m
|
|
|
31
31
|
upsert the authoritative candidate manifest from the actual scoped diff
|
|
32
32
|
(CHECKPOINT) → only now, with review+proof green: local WIP(<slug>): <imperative summary>
|
|
33
33
|
on the control branch (no slice id) → checkpoint.md
|
|
34
|
-
NEXT
|
|
34
|
+
NEXT → controlling caller first: return internally via output.md; no user-facing reply.
|
|
35
|
+
HITL stops. Standalone AFK with parallel cap>1:
|
|
36
|
+
return to parallel-batch selection to refill; otherwise repeat under afk-discipline.md
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
## Why the boundary matters
|
|
@@ -2,34 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
> Root-only: not inlined in --role bundles.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Caller-owned continuation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
7
|
+
Before standalone replies, return internally to active `/rite-autocomplete` or
|
|
8
|
+
another controlling rite after green proof, checkpoint, and accounting:
|
|
9
|
+
- Slices remain: re-read durable state and reselect/refill; no user-facing reply.
|
|
10
|
+
- All built: return internally to the caller to invoke `/rite-prove` under its own contract.
|
|
11
|
+
|
|
12
|
+
Human/safety/access/Git stops still use the shared reply contract.
|
|
13
|
+
|
|
14
|
+
## Standalone response
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
HITL returns after one green slice; AFK chains per `afk-discipline.md`.
|
|
17
|
+
Every wright returns after one slice. Build alone never invokes Prove.
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
|
-
Done: built slice <n> — <name
|
|
20
|
+
Done: built slice <n> — <name>[; all slices built].
|
|
21
21
|
Changed: <files>; state.md, touched-files.md, evidence.md
|
|
22
22
|
Evidence: acceptance met; tests <cmd> → pass; browser <summary|n/a>; drift <none|handled>
|
|
23
23
|
Open: <none|blockers|questions>
|
|
24
|
-
Next: /rite-prove
|
|
24
|
+
Next: /rite-build [all built: /rite-prove]
|
|
25
25
|
Record: .devrites/work/<slug>/evidence.md
|
|
26
|
-
↻ Hygiene: /clear
|
|
26
|
+
↻ Hygiene: /clear between slices (none in `orient` `inflight_waves`); /rite-handoff if away > a few hours
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
controlling root chain another pending slice after green-proof, cap, and pause
|
|
31
|
-
gates. Every `devrites-slice-wright` returns after exactly one slice.
|
|
32
|
-
|
|
33
|
-
At all built, Build never enters `/rite-prove` automatically; a higher-level
|
|
34
|
-
orchestrator may invoke it only under its own contract. Awaiting-human or
|
|
35
|
-
stopped states use the shared reply contract.
|
|
29
|
+
Awaiting-human or stopped states use the shared reply contract.
|
|
@@ -37,13 +37,15 @@ Select **greedily in plan order** with
|
|
|
37
37
|
reads the ready set (tasks.md dependencies checked `built` in `state.md`, minus
|
|
38
38
|
running-lease slices) and each slice's Writer allowlist (else `Files likely
|
|
39
39
|
touched`), plus its manifest/lockfile when `External dependencies:` is not none;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
`next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
|
|
41
|
+
With a running lease, a single new pick still uses `parallel add`;
|
|
42
|
+
`n_eff=0` with a running lease waits for siblings, not Prove. Without one:
|
|
43
|
+
≥2 → parallel batch, 1 → serial, none pending → Prove.
|
|
44
|
+
Serial is this round only; a cap need not be filled.
|
|
43
45
|
|
|
44
46
|
**Refill per landing; never wait for the batch.** Each sibling lands alone when
|
|
45
|
-
green ([Lifecycle](#lifecycle) step 6).
|
|
46
|
-
|
|
47
|
+
green ([Lifecycle](#lifecycle) step 6). Re-read state, pending slices, and the
|
|
48
|
+
tree; reselect: unlanded siblings hold
|
|
47
49
|
their slots and paths, landed ones count as built, and only new picks print;
|
|
48
50
|
`parallel add` starts each from the control tip and its wright dispatches at once.
|
|
49
51
|
No lease → plain `select` + `create`. AFK/autocomplete is one run; HITL stops after
|
|
@@ -116,6 +118,10 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
|
|
|
116
118
|
full inventory, then bounded owning-role rechecks after repairs. Run approved
|
|
117
119
|
proof in the same window as that review. Gap or Critical/Important → `gap`;
|
|
118
120
|
else proof → `green|red|gap`.
|
|
121
|
+
|
|
122
|
+
A recheck round is one dispatch per changed surface, not one per checklist: the
|
|
123
|
+
recheck agent carries every open checklist (code, test, doubt) for that diff and
|
|
124
|
+
answers each by name. Merging cuts dispatches; dropping a checklist does not.
|
|
119
125
|
Reviewer fan-out for a batch is itself batched under
|
|
120
126
|
[`parallel-dispatch.md`](../../devrites-lib/reference/parallel-dispatch.md#scale-limits)
|
|
121
127
|
(≈4 concurrent read-only reviewers, 8 only with disjoint paths), and `max_agents`
|
|
@@ -137,11 +143,11 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
|
|
|
137
143
|
7. Each landing: FF control (the branch that held `HEAD` when the batch started —
|
|
138
144
|
often `main`/`master`, otherwise whatever the user was on) by one local commit,
|
|
139
145
|
never pushed; union that sibling's paths into `touched-files.md`; update
|
|
140
|
-
state/evidence; AFK +1
|
|
141
|
-
refill ([Dynamic selection](#dynamic-selection-and-re-batching))
|
|
142
|
-
feature gates
|
|
143
|
-
([Proof tiers](phase-contract.md#proof-tiers)); the next
|
|
144
|
-
|
|
146
|
+
state/evidence; AFK +1; optional `check candidate`. Land every green sibling,
|
|
147
|
+
refill ([Dynamic selection](#dynamic-selection-and-re-batching)), then run the
|
|
148
|
+
feature gates once for the train
|
|
149
|
+
([Proof tiers](phase-contract.md#proof-tiers)); the next train waits, the
|
|
150
|
+
refilled wrights do not.
|
|
145
151
|
8. Cleanup runs only after the last landing marks the lease `complete` — work
|
|
146
152
|
landed in control, so `parallel cleanup` removes worktrees/branches.
|
|
147
153
|
Blocked/human-stopped batches keep lease, worktrees, branches — nothing is
|
|
@@ -223,13 +229,13 @@ devrites-engine parallel lease-write|lease-read|lease-clear --root <repo> --slug
|
|
|
223
229
|
# parallel cleanup --root <repo> --slug <slug> --force (salvages, prints retained refs)
|
|
224
230
|
```
|
|
225
231
|
|
|
226
|
-
`integrate` without `--apply-to-control` stages
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
`integrate` without `--apply-to-control` stages commits; lease stays `running`,
|
|
233
|
+
control stays at its expected tip, cleanup refuses. `record-green` and `integrate`
|
|
234
|
+
accept `integrate-failed` for retry. Applied landings advance `control_tip`
|
|
235
|
+
(initially `B`), permitting landings/refill. External control movement or
|
|
236
|
+
uncommitted slice-path edits with `--apply-to-control` cause refusal:
|
|
237
|
+
stop for the human (never stash or commit their work); the batch is untouched.
|
|
238
|
+
Go is SSOT; never ad-hoc git/bash orchestration.
|
|
233
239
|
|
|
234
240
|
## Runtime isolation
|
|
235
241
|
|
|
@@ -73,13 +73,25 @@ One contract builds one slice: preserve TDD, exact paths and independent judgmen
|
|
|
73
73
|
## Proof tiers
|
|
74
74
|
|
|
75
75
|
With a `test-plan.md` `## Feature gates` section, step 6 runs `Tests/proof` and every
|
|
76
|
-
other row; feature gates run once per
|
|
77
|
-
wrights continue
|
|
78
|
-
|
|
76
|
+
other row; feature gates run once per landing train, on control, while worktree
|
|
77
|
+
wrights continue: land every green sibling together, run the suite once, and bisect only
|
|
78
|
+
on red. The next train and Prove wait for them; red is a fingerprint against slices
|
|
79
|
+
landed since the last green run. Serial same-worktree mode, and plans
|
|
79
80
|
without the section, run every row each round. Run gate, benchmark and proof commands
|
|
80
81
|
through the host's shell tool, never a code-evaluation subprocess, whose environment
|
|
81
82
|
can lack the owner's exported variables.
|
|
82
83
|
|
|
84
|
+
Wrights run only the tests their changed paths reach, resolved from the merge base
|
|
85
|
+
against the plan's baseline rather than the last commit; Prove and Seal always run the
|
|
86
|
+
full suite. Resolve that narrow set with
|
|
87
|
+
`devrites-engine check affected <changed path...>`, which expands a changed package to its
|
|
88
|
+
dependent packages and widens on its own when a path is a module manifest, a generated
|
|
89
|
+
artifact, CI config, shared testdata, or one it cannot classify. Widen to the full suite
|
|
90
|
+
inside Build the moment a slice touches `go.mod` or a
|
|
91
|
+
lockfile, generated artifacts, CI config, a shared test harness, or whenever no test can
|
|
92
|
+
be named for a changed path. When selection is uncertain, run the full suite: the narrow
|
|
93
|
+
set is an optimisation, never a substitute.
|
|
94
|
+
|
|
83
95
|
## Independent Build review
|
|
84
96
|
|
|
85
97
|
After inspection, freeze full slice scope and cumulative baseline diff with
|
|
@@ -174,9 +174,11 @@ Pull these via `Read` when shaping the plan:
|
|
|
174
174
|
buildable AC/REQ maps to an existing slice/proof, every slice maps to real
|
|
175
175
|
acceptance, and names/prose agree. Missing, duplicate, contradictory, or
|
|
176
176
|
meaning-changing mappings block. Then run
|
|
177
|
-
`devrites-engine check task-graph <slug
|
|
177
|
+
`devrites-engine check task-graph <slug> --strict`; a malformed dependency graph, or a
|
|
178
|
+
shared path written by `hubAdvisoryMin`+ slices with no `Serial rationale:`, blocks
|
|
178
179
|
before Vet rather than spending a reviewer context on invalid tasks. Resolve each
|
|
179
|
-
`ADVISORY size:`/`hub:` line now (split or seam slice, or a rationale);
|
|
180
|
+
`ADVISORY size:`/`hub:`/`chain:` line now (split or seam slice, or a rationale);
|
|
181
|
+
`--strict` refuses the contended plan, the default run only advises.
|
|
180
182
|
7. **Readiness gate** (`plan-template.md`): require CLEAR coverage; complete acceptance,
|
|
181
183
|
wiring, shared-contract proof, applicable outputs, and rollback; risk-first acyclic order;
|
|
182
184
|
justified deviations; and every horizon item present, with blockers resolved, planning
|
|
@@ -172,8 +172,12 @@ cannot name what crosses, drop the edge; a shallow, wide graph runs in parallel.
|
|
|
172
172
|
|
|
173
173
|
Slices sharing a file never build side by side: put a hub file's shared edit
|
|
174
174
|
(registry, command table, test harness) in one seam slice the others depend on.
|
|
175
|
-
`check task-graph` prints the `schedule:` and `ADVISORY
|
|
176
|
-
|
|
175
|
+
`check task-graph` prints the `schedule:`, `ADVISORY hub:` and `ADVISORY chain:` lines.
|
|
176
|
+
A `chain` line means only one slice was ever ready, so the DAG rather than the cap
|
|
177
|
+
serializes: cut a slice that stands alone, or record `Serial rationale: <why>`.
|
|
178
|
+
`check task-graph <slug> --strict` refuses a plan whose shared path carries `ADVISORY hub:`
|
|
179
|
+
writers, so a contended plan must split disjointly instead of widening the cap.
|
|
180
|
+
Never merge slices or drop acceptance to widen it.
|
|
177
181
|
|
|
178
182
|
## Deferred slice
|
|
179
183
|
A slice with `Satisfies: none` is an optional follow-up: plan-invented hardening or
|
|
@@ -22,7 +22,8 @@ Read named paths only. Accept released v1/v2 bullet or v3 table `state.md` under
|
|
|
22
22
|
`.devrites/work/<slug>/`. Reject aliases, release scripts/markers, and conversion.
|
|
23
23
|
|
|
24
24
|
Cite current rule plus workspace evidence for each applicable axis: cursor/topology,
|
|
25
|
-
phase artifacts, decisions, planning/traceability/proof
|
|
25
|
+
phase artifacts, decisions, planning/traceability/proof (including a `check task-graph`
|
|
26
|
+
`ADVISORY chain:` schedule that no parallel cap can widen), built-code/intent, protected
|
|
26
27
|
history, artifact budgets/feature ceiling (the supplied `devrites-engine orient`
|
|
27
28
|
`artifact_budgets`/`bulk_files` and `task_graph.slice_count` against
|
|
28
29
|
[`workspace-artifact-schema.md`](skill://devrites-lib/reference/workspace-artifact-schema.md) and [`slicing.md`](skill://rite-plan/reference/slicing.md) § Feature ceiling),
|
|
@@ -118,13 +118,13 @@ next sequence continuation through Vet in a second session, then stop.
|
|
|
118
118
|
`/rite-build` batch loop → `/rite-prove` → `/rite-polish` →
|
|
119
119
|
`/rite-review` → `/rite-seal`. Read and execute each skill; durable files, not
|
|
120
120
|
chat, carry state. Apply the mutable post-vet budget before first Build.
|
|
121
|
-
Build
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
Build uses `parallel select --from-plan` (cap: explicit `--parallel N`, else
|
|
122
|
+
sentinel `max_parallel`, else 10), refilling per landing until none pending;
|
|
123
|
+
a one-slice round is serial for that round only; reselect afterward. Host
|
|
124
|
+
isolation may force serial. If `--parallel N` is explicit,
|
|
125
|
+
pass it into `/rite-build` and ignore leftover sentinel `max_parallel`.
|
|
126
|
+
Otherwise pass the resolved sentinel/default cap into `/rite-build` as
|
|
127
|
+
`--parallel N`, never bare `/rite-build`.
|
|
128
128
|
**Completion:** loop reaches Seal GO or persists a valid stop before any later phase.
|
|
129
129
|
5. **Apply stops.** At every gate use
|
|
130
130
|
[stop-conditions.md](reference/stop-conditions.md). A `blocked` label alone is not a stop condition:
|
|
@@ -46,15 +46,14 @@ readiness check first; reject overlap. Do not stop on `max_agents`,
|
|
|
46
46
|
`max_minutes`, or `max_review_queue`. Count every leaf result. A new activation
|
|
47
47
|
gets fresh activation-local counters but retains durable slice/recovery state.
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`--
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
`devrites-engine state resolve
|
|
55
|
-
`/rite-resolve` to the user. Escalating, irreversible-risk, access,
|
|
56
|
-
|
|
57
|
-
validating question (`slice: seal`).
|
|
49
|
+
[Build return](skill://rite-build/reference/output.md#caller-owned-continuation).
|
|
50
|
+
Pass `--parallel N`; ignore leftover cap/headroom, remaining-0,
|
|
51
|
+
and `--max-slices` stops. Agent-invented dispatch, wait, tool-call, or turn budgets are not stop conditions.
|
|
52
|
+
An explicit human request to pause or run only a bounded subset still wins.
|
|
53
|
+
Path collisions serialize work; they do not end the run.
|
|
54
|
+
Resolve ranked validating/blocking picks via `devrites-engine state resolve`;
|
|
55
|
+
never hand `/rite-resolve` to the user. Escalating, irreversible-risk, access, blocking
|
|
56
|
+
without recommendations, and Seal judgment (`slice: seal`) still pause.
|
|
58
57
|
|
|
59
58
|
## Phase arc
|
|
60
59
|
|
|
@@ -67,7 +66,7 @@ Workspace files carry state; chat does not. Read and execute each phase skill:
|
|
|
67
66
|
| 3 | `/rite-temper` | harden or reduce; `expand` and extra acceptance stop for a human; irreversible risk still pauses |
|
|
68
67
|
| 4 | `/rite-define` | approved plan/tasks/traceability |
|
|
69
68
|
| 5 | `/rite-vet` | every plan; derive mutable budget after READY |
|
|
70
|
-
| 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10;
|
|
69
|
+
| 6 | `/rite-build` batch loop | largest eligible path-disjoint set (cap: this invocation's `--parallel N`, else sentinel `max_parallel`, else 10; serial if <2 eligible); refill per landing; charge once per landed slice |
|
|
71
70
|
| 7 | `/rite-prove` | all slices built except deferred (`Satisfies: none`); approved proof; recovery on red |
|
|
72
71
|
| 8 | `/rite-polish` | re-prove after code edits |
|
|
73
72
|
| 9 | `/rite-review` | in-scope correction then fresh proof |
|
|
@@ -11,10 +11,10 @@ user-invocable: true
|
|
|
11
11
|
|
|
12
12
|
# /rite-build: one verified slice
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
**
|
|
14
|
+
Active caller takes precedence per [output.md](reference/output.md#caller-owned-continuation).
|
|
15
|
+
Standalone HITL stops; standalone AFK chains under green proof, caps and pause
|
|
16
|
+
rules. Every wright returns after one slice.
|
|
17
|
+
**HITL:** `/rite-build --parallel N` (2≤N≤10; N=1≡serial) follows
|
|
18
18
|
[`reference/parallel-batch.md`](reference/parallel-batch.md)
|
|
19
19
|
([`one-slice-cycle.md`](reference/one-slice-cycle.md)).
|
|
20
20
|
|
|
@@ -45,8 +45,8 @@ Wright applies anti-slop; root verifies returns and never patches source. Refuse
|
|
|
45
45
|
|
|
46
46
|
## Invariants
|
|
47
47
|
|
|
48
|
-
-
|
|
49
|
-
|
|
48
|
+
- Standalone HITL default: serial on control (core.md #5). AFK/`--parallel N`
|
|
49
|
+
uses [`parallel-batch.md`](reference/parallel-batch.md).
|
|
50
50
|
Same-worktree multi-writer / root-emulated concurrency forbidden.
|
|
51
51
|
Native-worktree pilot = single-slice isolation when `wright-dispatch.md`
|
|
52
52
|
preflight + reconcile hold.
|
|
@@ -80,7 +80,8 @@ Wright applies anti-slop; root verifies returns and never patches source. Refuse
|
|
|
80
80
|
<!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"Vet-ready admitted bytes require root authorship outside product wright","action":"ROOT_TRANSACTION; root writes only admitted .devrites/** targets","return":"saved Build slice cursor; wright product allowlist unchanged"} -->
|
|
81
81
|
## `--parallel N` (opt-in)
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
HITL default/explicit `1` ≡ serial; AFK inherits cap.
|
|
84
|
+
`2`–`10` is a **cap** — the root runs an eligible
|
|
84
85
|
path-disjoint set it can start now (`N_eff`, from `parallel select --from-plan`), takes fewer when the cap cannot be
|
|
85
86
|
filled, and refills a slot per landing (serial slice or one sibling) until
|
|
86
87
|
no pending slice remains
|
|
@@ -108,10 +109,9 @@ AFK charges per landed sibling only. Running lease blocks another
|
|
|
108
109
|
|
|
109
110
|
Run every step in `reference/phase-contract.md`: readiness, one target, dispatch
|
|
110
111
|
or canonical transaction, return inspection, independent code/doubt/test analysis,
|
|
111
|
-
approved fail-on-red proof, record,
|
|
112
|
+
approved fail-on-red proof, record, and applicable accounting. Continue/reply via
|
|
112
113
|
[`reference/output.md`](reference/output.md) plus the shared
|
|
113
|
-
[`reply contract`](skill://devrites-lib/reference/reply-contract.md).
|
|
114
|
-
the next slice automatically; AFK obeys remaining budget; Prove requires every slice built except a
|
|
114
|
+
[`reply contract`](skill://devrites-lib/reference/reply-contract.md). Standalone AFK obeys remaining budget; Prove requires every slice built except a
|
|
115
115
|
[deferred slice](skill://rite-plan/reference/slicing.md#deferred-slice).
|
|
116
116
|
|
|
117
117
|
## Phase exit
|
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
> Root-only: not inlined in --role bundles.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
without per-slice user input. The rules below limit that unattended work.
|
|
7
|
-
|
|
8
|
-
Load the shared
|
|
5
|
+
`.devrites/AFK` enables unattended slice chaining. Load the shared
|
|
9
6
|
[`afk-hitl.md`](skill://devrites-lib/reference/standards/afk-hitl.md#the-sentinel-devritesafk)
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
for sentinel schema, defaults, gate ceiling, and mutable-counter ownership.
|
|
8
|
+
This file owns Build dispatch, charging, and red paths.
|
|
12
9
|
|
|
13
|
-
Rules: green before `built`;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`dispatch abandon --reason`.
|
|
10
|
+
Rules: green before `built`; gates before their action; irreversible work
|
|
11
|
+
(destructive/auth/public API) pauses; no tick ends with an open/sealed wave —
|
|
12
|
+
wait for returns or `dispatch abandon --reason`.
|
|
17
13
|
|
|
18
14
|
## Iteration cap
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
Under active `/rite-autocomplete`, skip the slice-cap checks, charges, and cap-stop message below;
|
|
17
|
+
use its [admission rules](skill://rite-autocomplete/reference/loop.md#admit-each-unattended-cycle).
|
|
18
|
+
Otherwise root owns cap:
|
|
21
19
|
|
|
22
20
|
1. **Before every dispatch**, re-read `.devrites/AFK`, `state.md`, and the
|
|
23
21
|
selected slice. This invocation's `--parallel N` is the cap when present;
|
|
@@ -10,12 +10,12 @@ Pack-wide rationalizations and red flags live in
|
|
|
10
10
|
|
|
11
11
|
| Excuse | Rebuttal |
|
|
12
12
|
|---|---|
|
|
13
|
-
| "Slices 1 and 2 are related; let me do both." |
|
|
13
|
+
| "Slices 1 and 2 are related; let me do both." | Caller first: [output.md](output.md#caller-owned-continuation). Standalone HITL stops; standalone AFK chains after green proof and cap/pause gates; each wright returns after one. |
|
|
14
14
|
| "It's faster to skip `devrites-doubt` for this small change." | Doubt is cheapest *before* the decision is standing. After is debugging. |
|
|
15
15
|
|
|
16
16
|
## Red Flags
|
|
17
17
|
|
|
18
|
-
-
|
|
18
|
+
- Next slice violates caller/standalone routing or proof/cap/pause gates.
|
|
19
19
|
- Skipping `devrites-doubt` on a branching, boundary, data-model, auth, public-API, or migration decision.
|
|
20
20
|
- Adding a dependency or a second design system without recording rationale in `decisions.md`.
|
|
21
21
|
- Writing a `try/catch` block wider than what you handle.
|
|
@@ -54,11 +54,16 @@ BODY
|
|
|
54
54
|
|
|
55
55
|
**Local-only:** never push or let scratch work trigger CI.
|
|
56
56
|
|
|
57
|
-
After
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
After green landing (parallel: successful integrate), check `state.md`
|
|
58
|
+
outside fences before reselecting:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
- [x] SLICE-004 built — <proof/checkpoint reference>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
A cursor `built_slices` value or a tasks.md `Status: built` field is not a substitute.
|
|
65
|
+
After landing: `devrites-engine check regression <slug> --update`. Before landing,
|
|
66
|
+
restore or route `BLOCKED` lost facts.
|
|
62
67
|
|
|
63
68
|
## Restore
|
|
64
69
|
After a crash, a fresh session may read the last `WIP(<slug>)` body as crash context.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# One-slice cycle
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Each wright returns after one proven slice. Root follows
|
|
4
|
+
[`output.md`](output.md#caller-owned-continuation); standalone AFK uses
|
|
5
|
+
`afk-discipline.md`.
|
|
6
6
|
This serial cycle is the default `/rite-build`. Opt-in fan-out: [`parallel-batch.md`](parallel-batch.md) (`--parallel N`).
|
|
7
7
|
|
|
8
8
|
## The cycle
|
|
@@ -31,7 +31,9 @@ RECORD → orchestrator: after green verification, update state.md/evidence.m
|
|
|
31
31
|
upsert the authoritative candidate manifest from the actual scoped diff
|
|
32
32
|
(CHECKPOINT) → only now, with review+proof green: local WIP(<slug>): <imperative summary>
|
|
33
33
|
on the control branch (no slice id) → checkpoint.md
|
|
34
|
-
NEXT
|
|
34
|
+
NEXT → controlling caller first: return internally via output.md; no user-facing reply.
|
|
35
|
+
HITL stops. Standalone AFK with parallel cap>1:
|
|
36
|
+
return to parallel-batch selection to refill; otherwise repeat under afk-discipline.md
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
## Why the boundary matters
|