devrites 7.2.6 → 7.2.7
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 +6 -0
- package/README.md +1 -1
- package/SECURITY.md +11 -7
- package/docs/engine/commands.md +3 -3
- package/engine/internal/lib/context.go +7 -4
- package/engine/internal/lib/dispatch.go +77 -21
- package/engine/internal/lib/taskgraph.go +94 -21
- package/pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md +3 -3
- package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +3 -6
- package/pack/.claude/skills/devrites-lib/reference/standards/principles.md +5 -6
- package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +3 -1
- package/pack/.claude/skills/rite-autocomplete/reference/lookahead.md +18 -35
- package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +7 -8
- package/pack/.claude/skills/rite-build/reference/parallel-batch.md +23 -13
- package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +5 -5
- package/pack/.claude/skills/rite-spec/SKILL.md +2 -2
- package/pack/.claude/skills/rite-temper/SKILL.md +4 -5
- package/pack/generated/claude/skills/devrites-lib/reference/parallel-dispatch.md +3 -3
- package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +3 -6
- package/pack/generated/claude/skills/devrites-lib/reference/standards/principles.md +5 -6
- package/pack/generated/claude/skills/rite-autocomplete/reference/decision-policy.md +3 -1
- package/pack/generated/claude/skills/rite-autocomplete/reference/lookahead.md +18 -35
- package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +7 -8
- package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +23 -13
- package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +5 -5
- package/pack/generated/claude/skills/rite-spec/SKILL.md +2 -2
- package/pack/generated/claude/skills/rite-temper/SKILL.md +4 -5
- package/pack/generated/codex/skills/devrites-lib/reference/parallel-dispatch.md +3 -3
- package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +3 -6
- package/pack/generated/codex/skills/devrites-lib/reference/standards/principles.md +5 -6
- package/pack/generated/codex/skills/rite-autocomplete/reference/decision-policy.md +3 -1
- package/pack/generated/codex/skills/rite-autocomplete/reference/lookahead.md +18 -35
- package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +7 -8
- package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +23 -13
- package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +5 -5
- package/pack/generated/codex/skills/rite-spec/SKILL.md +2 -2
- package/pack/generated/codex/skills/rite-temper/SKILL.md +4 -5
- package/pack/generated/devin/skills/devrites-lib/reference/parallel-dispatch.md +3 -3
- package/pack/generated/devin/skills/devrites-lib/reference/standards/agents.md +3 -6
- package/pack/generated/devin/skills/devrites-lib/reference/standards/principles.md +5 -6
- package/pack/generated/devin/skills/rite-autocomplete/reference/decision-policy.md +3 -1
- package/pack/generated/devin/skills/rite-autocomplete/reference/lookahead.md +18 -35
- package/pack/generated/devin/skills/rite-autocomplete/reference/stop-conditions.md +7 -8
- package/pack/generated/devin/skills/rite-build/reference/parallel-batch.md +23 -13
- package/pack/generated/devin/skills/rite-build/reference/wright-dispatch.md +5 -5
- package/pack/generated/devin/skills/rite-spec/SKILL.md +2 -2
- package/pack/generated/devin/skills/rite-temper/SKILL.md +4 -5
- package/pack/generated/dsh/skills/devrites-lib/reference/parallel-dispatch.md +3 -3
- package/pack/generated/dsh/skills/devrites-lib/reference/standards/agents.md +3 -6
- package/pack/generated/dsh/skills/devrites-lib/reference/standards/principles.md +5 -6
- package/pack/generated/dsh/skills/rite-autocomplete/reference/decision-policy.md +3 -1
- package/pack/generated/dsh/skills/rite-autocomplete/reference/lookahead.md +18 -35
- package/pack/generated/dsh/skills/rite-autocomplete/reference/stop-conditions.md +7 -8
- package/pack/generated/dsh/skills/rite-build/reference/parallel-batch.md +23 -13
- package/pack/generated/dsh/skills/rite-build/reference/wright-dispatch.md +5 -5
- package/pack/generated/dsh/skills/rite-spec/SKILL.md +2 -2
- package/pack/generated/dsh/skills/rite-temper/SKILL.md +4 -5
- package/pack/generated/omp/skills/devrites-lib/reference/parallel-dispatch.md +3 -3
- package/pack/generated/omp/skills/devrites-lib/reference/standards/agents.md +3 -6
- package/pack/generated/omp/skills/devrites-lib/reference/standards/principles.md +5 -6
- package/pack/generated/omp/skills/rite-autocomplete/reference/decision-policy.md +3 -1
- package/pack/generated/omp/skills/rite-autocomplete/reference/lookahead.md +18 -35
- package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +7 -8
- package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +23 -13
- package/pack/generated/omp/skills/rite-build/reference/wright-dispatch.md +5 -5
- package/pack/generated/omp/skills/rite-spec/SKILL.md +2 -2
- package/pack/generated/omp/skills/rite-temper/SKILL.md +4 -5
- package/pack/generated/pi/skills/devrites-lib/reference/parallel-dispatch.md +3 -3
- package/pack/generated/pi/skills/devrites-lib/reference/standards/agents.md +3 -6
- package/pack/generated/pi/skills/devrites-lib/reference/standards/principles.md +5 -6
- package/pack/generated/pi/skills/rite-autocomplete/reference/decision-policy.md +3 -1
- package/pack/generated/pi/skills/rite-autocomplete/reference/lookahead.md +18 -35
- package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +7 -8
- package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +23 -13
- package/pack/generated/pi/skills/rite-build/reference/wright-dispatch.md +5 -5
- package/pack/generated/pi/skills/rite-spec/SKILL.md +2 -2
- package/pack/generated/pi/skills/rite-temper/SKILL.md +4 -5
- package/package.json +3 -3
|
@@ -59,14 +59,13 @@ Without a safe seam, escalate or park; only a real human/risk/scope gate stops f
|
|
|
59
59
|
## Other stop classes
|
|
60
60
|
|
|
61
61
|
- **Gate severity:** escalating always stops. Blocking with a ranked recommended
|
|
62
|
-
option (`proposed` or option 1 labelled Recommended)
|
|
63
|
-
`devrites-engine state resolve
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
(`slice: seal`), which only a human answers; it stops.
|
|
62
|
+
option (`proposed` or option 1 labelled Recommended) auto-picks via
|
|
63
|
+
`devrites-engine state resolve` and continues, Spec Drift Guard included when
|
|
64
|
+
the answer changes ownership or acceptance. Added acceptance or scope is never
|
|
65
|
+
auto-picked. No recommended option still stops. An avoidable principle conflict
|
|
66
|
+
complies: change the spec and resolve it. Re-read on entry. `continuation: clear`
|
|
67
|
+
with `awaiting_human` still folds resolved decisions. Do not report a stop from chat.
|
|
68
|
+
Validating auto-picks, except Seal `slice: seal`, which a human answers.
|
|
70
69
|
- **Temper:** `expand` and extra acceptance stop: ask through `AskUserQuestion`, hold the
|
|
71
70
|
fold, and continue only after a human resolves the qid (an ADR is not that answer).
|
|
72
71
|
Irreversible-risk still pauses. `hold-rigor`, `reduce-to-MVP`, and a skip do not pause.
|
|
@@ -27,16 +27,21 @@ N_eff = min(
|
|
|
27
27
|
cap -- this invocation's --parallel N (wins over leftover sentinel max_parallel)
|
|
28
28
|
| else sentinel max_parallel | else 10 (autocomplete default)
|
|
29
29
|
eligible set -- dependency-satisfied pending slices, pairwise path-disjoint
|
|
30
|
-
AFK headroom --
|
|
30
|
+
AFK headroom -- outside /rite-autocomplete only (max_slices, max_agents,
|
|
31
|
+
max_minutes, review queue). Autocomplete ignores those;
|
|
32
|
+
do not shrink this batch for them
|
|
31
33
|
host capacity -- concurrent worktree writers + the runtime isolation table
|
|
32
34
|
)
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
Select **greedily in plan order** with
|
|
36
38
|
`devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
|
|
37
|
-
(dependencies
|
|
39
|
+
(dependencies built — state.md checkbox, or an evidence.md heading that says that slice was checkpointed plus a `Checkpoint: <sha>` line — minus running-lease slices), Writer allowlist
|
|
38
40
|
(else Files likely touched), plus manifest/lockfile when `External dependencies:`
|
|
39
|
-
names a package (
|
|
41
|
+
names a package (module path, npm scope, backticked name, or a non-toolchain version).
|
|
42
|
+
`context --phase build` with no `--slice` stays on `active_slice` unless AFK
|
|
43
|
+
`max_parallel` is at least 2 or a lease is running; a HITL `--parallel N` run
|
|
44
|
+
passes `--whole` so the other slices stay visible.
|
|
40
45
|
`next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
|
|
41
46
|
With a running lease, a single new pick still uses `parallel add`;
|
|
42
47
|
`n_eff=0` with a running lease waits for siblings, not Prove. Without one:
|
|
@@ -76,10 +81,11 @@ snapshot directory, formatter sweep — and compare paths case-folded
|
|
|
76
81
|
(`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
|
|
77
82
|
Slices colliding on either run serially; the rest
|
|
78
83
|
stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
|
|
79
|
-
with `max_parallel ≥ 2`, `dispatch open` refuses a
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
with `max_parallel ≥ 2`, `dispatch open` refuses a build wright wave narrower
|
|
85
|
+
than the from-plan batch until that wave holds the other picks or `serial:`
|
|
86
|
+
names each skipped one. Repairing a slice, or a slice already in the lease,
|
|
87
|
+
does not waive them. A `serial:` reason that only says the skipped slice is
|
|
88
|
+
repairing, already started, or in a wave does not count. HITL is never refused. **Failing
|
|
83
89
|
case:** two slices each add a dependency, run in parallel, and integrate fails or
|
|
84
90
|
lands a broken lockfile.
|
|
85
91
|
|
|
@@ -106,8 +112,11 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
|
|
|
106
112
|
`pre-dispatch <id>` preflight row; a malformed contract or non-zero
|
|
107
113
|
precondition is dropped from the batch and recorded as a gap, not dispatched.
|
|
108
114
|
2. Write lease; freeze `B=HEAD`; `parallel create` worktrees.
|
|
109
|
-
3. Dispatch ≤10 wrights in parallel (cwd=worktree; allowlist; prove `HEAD==B
|
|
110
|
-
one
|
|
115
|
+
3. Dispatch ≤10 wrights in parallel (cwd=worktree; allowlist; prove `HEAD==B`).
|
|
116
|
+
One wave, one role per sibling: `--role slice-wright.<SLICE-ID> --slice <SLICE-ID>`
|
|
117
|
+
for each. `start` every role before waiting on any. One shared `slice-wright`
|
|
118
|
+
role is refused: it has one handle, so the other slices never start.
|
|
119
|
+
A linked worktree has no `.devrites`:
|
|
111
120
|
tell each wright to run `gates precheck` with `DEVRITES_ROOT=<control>/.devrites`.
|
|
112
121
|
4. Inspect each returned path list, cumulative diff from `B`, transfer identity,
|
|
113
122
|
and required result fields against the immutable contract. Reject malformed,
|
|
@@ -122,10 +131,11 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
|
|
|
122
131
|
A recheck round is one dispatch per changed surface, not one per checklist: the
|
|
123
132
|
recheck agent carries every open checklist (code, test, doubt) for that diff and
|
|
124
133
|
answers each by name. Merging cuts dispatches; dropping a checklist does not.
|
|
125
|
-
Reviewer fan-out
|
|
126
|
-
|
|
127
|
-
(
|
|
128
|
-
|
|
134
|
+
Reviewer fan-out does not shrink the writer batch. Reviewers queue at the
|
|
135
|
+
same cap as writers (10; see
|
|
136
|
+
[`parallel-dispatch.md`](../../devrites-lib/reference/parallel-dispatch.md#scale-limits)).
|
|
137
|
+
`max_agents` does not shrink it under autocomplete. Past that cap, queue a
|
|
138
|
+
second pass — a batch never assumes unbounded reviewers.
|
|
129
139
|
5. Non-green siblings → **repair round** (below) in the same worktrees; lease
|
|
130
140
|
stays `running` — no abort while repair budget remains. A green sibling →
|
|
131
141
|
`parallel record-green`, then step 6 for it alone.
|
|
@@ -129,11 +129,11 @@ open findings move to the new slice owning their paths), or record
|
|
|
129
129
|
`## <DRIFT-ID> — <SLICE-ID> reslice review` with why no smaller split exists and
|
|
130
130
|
a spec trace of the slice's obligations (hardening no AC/INV/PROH requires moves to
|
|
131
131
|
a sibling slice dependents do not need, still gated before Seal), and
|
|
132
|
-
reopen with `--reslice-review <DRIFT-ID>`.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
[`parallel-batch.md`](parallel-batch.md).
|
|
132
|
+
reopen with `--reslice-review <DRIFT-ID>`. Same-worktree stays one writer.
|
|
133
|
+
Never run two writers in one worktree, mix isolated and same-worktree writers,
|
|
134
|
+
or substitute a generic agent. Opt-in `/rite-build --parallel N` is the
|
|
135
|
+
exception: one wright per worktree, each its own `slice-wright.<SLICE-ID>` role
|
|
136
|
+
on one wave ([`parallel-batch.md`](parallel-batch.md)).
|
|
137
137
|
|
|
138
138
|
The `return` that completes the wave releases its claim; `dispatch abandon --release`
|
|
139
139
|
releases it on any other host-confirmed terminal path (a stop, a launch refused with no
|
|
@@ -117,8 +117,8 @@ load a routed standard to discover required behavior, not to prescribe implement
|
|
|
117
117
|
and [`interview-patterns.md`](reference/interview-patterns.md) for a vague ask. Every
|
|
118
118
|
material dimension is resolved by a human pick or explicitly deferred as non-blocking;
|
|
119
119
|
only genuinely reversible, low-impact details go to `assumptions.md`. A paper-only
|
|
120
|
-
uncertainty may take one scoped `/rite-prototype` detour. A
|
|
121
|
-
|
|
120
|
+
uncertainty may take one scoped `/rite-prototype` detour. A principle conflict
|
|
121
|
+
complies by changing the spec. Only an unavoidable violation blocks for a human.
|
|
122
122
|
4a. **Build-interruption forecast.** Search first, then list and close foreseeable human needs:
|
|
123
123
|
product/acceptance ambiguity, irreversible/external approval, or human-only access. Record
|
|
124
124
|
owned prerequisites. Keep a build checkpoint only for unavailable pre-code evidence or a
|
|
@@ -123,12 +123,11 @@ the spec applicability map triggers that risk family.
|
|
|
123
123
|
[`devrites-strategy-reviewer`](../../agents/devrites-strategy-reviewer.md)
|
|
124
124
|
through the native fresh-context contract in
|
|
125
125
|
[`agents.md`](../devrites-lib/reference/standards/agents.md), with **only** its `--role strategy-reviewer` read-set
|
|
126
|
-
(hardened spec, `strategy.md`, claim-check artifacts) + rubric, no authoring reasoning. Fold
|
|
127
|
-
exact strategy reviewer rechecks open findings and affected coverage/regressions under
|
|
126
|
+
(hardened spec, `strategy.md`, claim-check artifacts) + rubric, no authoring reasoning. Fold findings once and recheck them under
|
|
128
127
|
[the canonical retry contract](../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve):
|
|
129
|
-
Product/scope
|
|
130
|
-
|
|
131
|
-
If the named agent is unavailable, stop for HITL. After an accepted edit to a
|
|
128
|
+
Product/scope and unapproved irreversible risk stay human gates;
|
|
129
|
+
exhaustion keeps the blocker.
|
|
130
|
+
If the named agent is unavailable, stop for HITL. Except `sequence_lookahead: yes` and no spawn tool: record the review pending, stay `running`, continue Define. Not access. After an accepted edit to a
|
|
132
131
|
coverage-bound input, repeat step 6's native coverage revalidation before handoff.
|
|
133
132
|
8. **STOP.** Report the mode, the scope deltas, and the floor verdict; recommend `/rite-define`.
|
|
134
133
|
|
|
@@ -169,9 +169,9 @@ named in the re-dispatch contract; changes outside task paths stop for the human
|
|
|
169
169
|
|
|
170
170
|
## Scale limits
|
|
171
171
|
|
|
172
|
-
The role table bounds rosters. Use
|
|
173
|
-
counting children any leaf spawned
|
|
174
|
-
Refuse
|
|
172
|
+
The role table bounds rosters. Use up to ten concurrent read-only reviewers,
|
|
173
|
+
the same cap as a writer batch, counting children any leaf spawned.
|
|
174
|
+
Refuse a larger swarm and role substitution: sharpen scope or use a bounded second pass when coverage is missing.
|
|
175
175
|
Overlapping reviewers increase duplicate findings and reconciliation work.
|
|
176
176
|
|
|
177
177
|
## Children are tools, not peers
|
|
@@ -8,7 +8,7 @@ Follow DevRites policy and [`depth profiles`](../orchestration-profiles.md).
|
|
|
8
8
|
|
|
9
9
|
<!-- root-only -->
|
|
10
10
|
- Root owns scope, questions/decisions/results, `.devrites/**`, phase transitions — not product source/tests; vetted executable workflow artifacts follow [`workflow-artifacts.md`](workflow-artifacts.md).
|
|
11
|
-
- Every named role runs; unavailable → HITL, never skip/substitute.
|
|
11
|
+
- Every named role runs; unavailable → HITL, never skip/substitute. `sequence_lookahead: yes` with no spawn tool defers the role, records the gap, and keeps planning. Not gate `access`, not a verdict. Admit the role before Build.
|
|
12
12
|
<!-- /root-only -->
|
|
13
13
|
- Among lifecycle `devrites-*` specialists, only bounded wright writes product
|
|
14
14
|
source/tests; others inspect an immutable candidate. The independent `/rite-fast`
|
|
@@ -145,11 +145,8 @@ Basis: <files read · commands run to reach this finding>
|
|
|
145
145
|
asks for is a Suggestion, however plausible. The `when` must also be reachable:
|
|
146
146
|
a hostile actor enters only through a trust boundary the feature really has
|
|
147
147
|
(users, network, external systems, untrusted files). A trigger that needs one it
|
|
148
|
-
never faces —
|
|
149
|
-
|
|
150
|
-
is a Suggestion too. So is an environment state the feature's declared
|
|
151
|
-
environment does not have (a mount option, kernel setting or daemon location
|
|
152
|
-
absent from the target host): guard against it only when the spec names it.
|
|
148
|
+
never faces — forged test evidence, a second user on a single-owner host, or a swapped local daemon —
|
|
149
|
+
is a Suggestion too. So is an undeclared host setting (mount, kernel, daemon path): guard it only when the spec names it.
|
|
153
150
|
A finding never pulls a deferred slice's scope forward.
|
|
154
151
|
- **`no-findings`:** `No-findings:` names checks and inspected evidence. Bare
|
|
155
152
|
pass, empty list, or “looks good” is malformed.
|
|
@@ -47,10 +47,9 @@ unaudited.
|
|
|
47
47
|
|
|
48
48
|
## Gate
|
|
49
49
|
|
|
50
|
-
At plan, build, review, and seal, compare the
|
|
51
|
-
|
|
52
|
-
phase. A missing or empty principles file passes silently.
|
|
50
|
+
At plan, build, review, and seal, compare the change with each in-scope principle.
|
|
51
|
+
An unexcepted violation is Critical and blocks. A missing or empty file passes.
|
|
53
52
|
|
|
54
|
-
Adding, changing, retiring, or excepting a principle is
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
Adding, changing, retiring, or excepting a principle is human-owned. Date it in
|
|
54
|
+
the governance history. Agents do not ratify it. Comply by changing the spec.
|
|
55
|
+
Ask for an exception only when the objective cannot be met without the violation.
|
|
@@ -41,4 +41,6 @@ recommended option stay human. A blocking question that already names option 1
|
|
|
41
41
|
`(Recommended)` or `proposed:` is autocomplete's to resolve: pick that option
|
|
42
42
|
via `devrites-engine state resolve` and continue. Recommended temper
|
|
43
43
|
`expand` and extra acceptance are never auto-picked: they stop for a human through
|
|
44
|
-
`AskUserQuestion`; do not invent product intent.
|
|
44
|
+
`AskUserQuestion`; do not invent product intent. A principle
|
|
45
|
+
conflict complies by changing the spec. Except a principle when the
|
|
46
|
+
objective cannot be met without the violation.
|
|
@@ -2,49 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
> Root-only: not inlined in --role bundles.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Build → Seal. The main loop later resumes the planned child instead of
|
|
8
|
-
specifying it again.
|
|
5
|
+
Plans the next continuation while the active workspace builds. Spec → Vet
|
|
6
|
+
overlaps the predecessor's Build → Seal.
|
|
9
7
|
|
|
10
8
|
## Start and target
|
|
11
9
|
|
|
12
|
-
The
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
continuation after the active workspace: the entry
|
|
16
|
-
[sequence continuation](loop.md#sequence-continuation) would open. Stop with
|
|
17
|
-
nothing to do when the active workspace is before Build, no entry remains,
|
|
18
|
-
`continue_sequence: false`, or the sequence budget is spent.
|
|
10
|
+
Start `/rite-autocomplete --lookahead` once `.devrites/ACTIVE` is in Build or later. The agent never launches a session. Target: the next continuation
|
|
11
|
+
([sequence continuation](loop.md#sequence-continuation)). Stop when that workspace
|
|
12
|
+
is before Build, no entry remains, `continue_sequence: false`, or the budget is spent.
|
|
19
13
|
|
|
20
14
|
## Lease
|
|
21
15
|
|
|
22
|
-
Before any write
|
|
16
|
+
Before any write:
|
|
23
17
|
`devrites-engine claim add --session lookahead-<target> --ttl 240 --workspace <target> --reason lookahead`.
|
|
24
|
-
Exit 3
|
|
25
|
-
same session at each phase start, and release it with `devrites-engine claim
|
|
26
|
-
release` on every stop. A crashed session's lease reads `dead` and frees itself.
|
|
18
|
+
Exit 3: held, stop. Re-add the same session each phase. Release with `devrites-engine claim release` on stop. A `dead` lease frees itself.
|
|
27
19
|
|
|
28
20
|
## Rules
|
|
29
21
|
|
|
30
|
-
- Never read or write `.devrites/ACTIVE`. Pass the target
|
|
31
|
-
skill and engine command, including `/rite-spec <target> "<objective>"` and
|
|
32
|
-
`devrites-engine handoff <target> --resume`.
|
|
22
|
+
- Never read or write `.devrites/ACTIVE`. Pass the slug to `/rite-spec <target> "<objective>"` and `devrites-engine handoff <target> --resume`.
|
|
33
23
|
- After the workspace exists, run `devrites-engine state set <target> sequence_lookahead=yes`.
|
|
34
|
-
- Run Spec → Clarify → Temper → Define → Plan → Vet
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
arm or rewrite `.devrites/AFK`. Owner questions go to the target's
|
|
45
|
-
`questions.md` and stop the lookahead.
|
|
46
|
-
- Stop at Vet `READY` with `next_action: build after predecessor Seal GO`, at a
|
|
47
|
-
human gate, or when the target's lease is lost.
|
|
48
|
-
|
|
49
|
-
**Failing case:** the lookahead passes Vet and starts Build while the
|
|
50
|
-
predecessor is still sealing, so two root sessions write one tree.
|
|
24
|
+
- Run Spec → Clarify → Temper → Define → Plan → Vet. Define and Plan read the predecessor tree and plan. Record one assumption per predecessor interface used.
|
|
25
|
+
- At Vet record `Predecessor readiness: <active-slug> <digest>` in `eng-review.md` (the `--emit-binding` hex). A later planning change blocks `DRV-GATE-READINESS-STALE`; re-vet before Build.
|
|
26
|
+
- Predecessor still in Build or later forbids only Build, product source, tests, commits, and `.devrites/AFK`. It does not skip Define, Plan, or Vet, and is not `awaiting_human`. Acceptance, scope, and irreversible risk still stop.
|
|
27
|
+
- No spawn tool is not gate `access` or `awaiting_human`. Root writes Define and Plan. No Vet `READY` until those roles are admitted; else stop `running`, `next_action: /rite-vet`.
|
|
28
|
+
- On every entry, re-read `state.md` and `questions.md`. Do not report a stop from chat. `continuation: clear` with `awaiting_human` is not done: fold resolved decisions into the spec, then continue. An except-principle or change-the-spec question complies: change the spec and resolve it. Ask only when the approved objective cannot comply.
|
|
29
|
+
- Stop at Vet `READY` with `next_action: build after predecessor Seal GO`, at a real human gate, or when the lease is lost.
|
|
30
|
+
|
|
31
|
+
**Failing case:** Vet then Build while the predecessor is still sealing, so two sessions write one tree. Or Define, Plan, and Vet skipped because the predecessor is still Build, or a missing strategy-reviewer spawn recorded as gate `access`.
|
|
32
|
+
|
|
33
|
+
**Failing case:** stops to except a principle the spec can avoid.
|
|
@@ -61,14 +61,13 @@ Without a safe seam, escalate or park; only a real human/risk/scope gate stops f
|
|
|
61
61
|
## Other stop classes
|
|
62
62
|
|
|
63
63
|
- **Gate severity:** escalating always stops. Blocking with a ranked recommended
|
|
64
|
-
option (`proposed` or option 1 labelled Recommended)
|
|
65
|
-
`devrites-engine state resolve
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(`slice: seal`), which only a human answers; it stops.
|
|
64
|
+
option (`proposed` or option 1 labelled Recommended) auto-picks via
|
|
65
|
+
`devrites-engine state resolve` and continues, Spec Drift Guard included when
|
|
66
|
+
the answer changes ownership or acceptance. Added acceptance or scope is never
|
|
67
|
+
auto-picked. No recommended option still stops. An avoidable principle conflict
|
|
68
|
+
complies: change the spec and resolve it. Re-read on entry. `continuation: clear`
|
|
69
|
+
with `awaiting_human` still folds resolved decisions. Do not report a stop from chat.
|
|
70
|
+
Validating auto-picks, except Seal `slice: seal`, which a human answers.
|
|
72
71
|
- **Temper:** `expand` and extra acceptance stop: ask through `AskUserQuestion`, hold the
|
|
73
72
|
fold, and continue only after a human resolves the qid (an ADR is not that answer).
|
|
74
73
|
Irreversible-risk still pauses. `hold-rigor`, `reduce-to-MVP`, and a skip do not pause.
|
|
@@ -27,16 +27,21 @@ N_eff = min(
|
|
|
27
27
|
cap -- this invocation's --parallel N (wins over leftover sentinel max_parallel)
|
|
28
28
|
| else sentinel max_parallel | else 10 (autocomplete default)
|
|
29
29
|
eligible set -- dependency-satisfied pending slices, pairwise path-disjoint
|
|
30
|
-
AFK headroom --
|
|
30
|
+
AFK headroom -- outside /rite-autocomplete only (max_slices, max_agents,
|
|
31
|
+
max_minutes, review queue). Autocomplete ignores those;
|
|
32
|
+
do not shrink this batch for them
|
|
31
33
|
host capacity -- concurrent worktree writers + the runtime isolation table
|
|
32
34
|
)
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
Select **greedily in plan order** with
|
|
36
38
|
`devrites-engine parallel select --slug <slug> --cap N --from-plan`: ready set
|
|
37
|
-
(dependencies
|
|
39
|
+
(dependencies built — state.md checkbox, or an evidence.md heading that says that slice was checkpointed plus a `Checkpoint: <sha>` line — minus running-lease slices), Writer allowlist
|
|
38
40
|
(else Files likely touched), plus manifest/lockfile when `External dependencies:`
|
|
39
|
-
names a package (
|
|
41
|
+
names a package (module path, npm scope, backticked name, or a non-toolchain version).
|
|
42
|
+
`context --phase build` with no `--slice` stays on `active_slice` unless AFK
|
|
43
|
+
`max_parallel` is at least 2 or a lease is running; a HITL `--parallel N` run
|
|
44
|
+
passes `--whole` so the other slices stay visible.
|
|
40
45
|
`next` prints `eligible_now:`/`batch:`. `n_eff` counts new picks only.
|
|
41
46
|
With a running lease, a single new pick still uses `parallel add`;
|
|
42
47
|
`n_eff=0` with a running lease waits for siblings, not Prove. Without one:
|
|
@@ -76,10 +81,11 @@ snapshot directory, formatter sweep — and compare paths case-folded
|
|
|
76
81
|
(`src/Api.ts` = `src/api.ts`); `--from-plan` adds the manifest/lockfile for a package.
|
|
77
82
|
Slices colliding on either run serially; the rest
|
|
78
83
|
stay eligible. Record `serial: <ids> — <surface>` in `evidence.md`. Under AFK
|
|
79
|
-
with `max_parallel ≥ 2`, `dispatch open` refuses a
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
with `max_parallel ≥ 2`, `dispatch open` refuses a build wright wave narrower
|
|
85
|
+
than the from-plan batch until that wave holds the other picks or `serial:`
|
|
86
|
+
names each skipped one. Repairing a slice, or a slice already in the lease,
|
|
87
|
+
does not waive them. A `serial:` reason that only says the skipped slice is
|
|
88
|
+
repairing, already started, or in a wave does not count. HITL is never refused. **Failing
|
|
83
89
|
case:** two slices each add a dependency, run in parallel, and integrate fails or
|
|
84
90
|
lands a broken lockfile.
|
|
85
91
|
|
|
@@ -106,8 +112,11 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
|
|
|
106
112
|
`pre-dispatch <id>` preflight row; a malformed contract or non-zero
|
|
107
113
|
precondition is dropped from the batch and recorded as a gap, not dispatched.
|
|
108
114
|
2. Write lease; freeze `B=HEAD`; `parallel create` worktrees.
|
|
109
|
-
3. Dispatch ≤10 wrights in parallel (cwd=worktree; allowlist; prove `HEAD==B
|
|
110
|
-
one
|
|
115
|
+
3. Dispatch ≤10 wrights in parallel (cwd=worktree; allowlist; prove `HEAD==B`).
|
|
116
|
+
One wave, one role per sibling: `--role slice-wright.<SLICE-ID> --slice <SLICE-ID>`
|
|
117
|
+
for each. `start` every role before waiting on any. One shared `slice-wright`
|
|
118
|
+
role is refused: it has one handle, so the other slices never start.
|
|
119
|
+
A linked worktree has no `.devrites`:
|
|
111
120
|
tell each wright to run `gates precheck` with `DEVRITES_ROOT=<control>/.devrites`.
|
|
112
121
|
4. Inspect each returned path list, cumulative diff from `B`, transfer identity,
|
|
113
122
|
and required result fields against the immutable contract. Reject malformed,
|
|
@@ -122,10 +131,11 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
|
|
|
122
131
|
A recheck round is one dispatch per changed surface, not one per checklist: the
|
|
123
132
|
recheck agent carries every open checklist (code, test, doubt) for that diff and
|
|
124
133
|
answers each by name. Merging cuts dispatches; dropping a checklist does not.
|
|
125
|
-
Reviewer fan-out
|
|
126
|
-
|
|
127
|
-
(
|
|
128
|
-
|
|
134
|
+
Reviewer fan-out does not shrink the writer batch. Reviewers queue at the
|
|
135
|
+
same cap as writers (10; see
|
|
136
|
+
[`parallel-dispatch.md`](../../devrites-lib/reference/parallel-dispatch.md#scale-limits)).
|
|
137
|
+
`max_agents` does not shrink it under autocomplete. Past that cap, queue a
|
|
138
|
+
second pass — a batch never assumes unbounded reviewers.
|
|
129
139
|
5. Non-green siblings → **repair round** (below) in the same worktrees; lease
|
|
130
140
|
stays `running` — no abort while repair budget remains. A green sibling →
|
|
131
141
|
`parallel record-green`, then step 6 for it alone.
|
|
@@ -129,11 +129,11 @@ open findings move to the new slice owning their paths), or record
|
|
|
129
129
|
`## <DRIFT-ID> — <SLICE-ID> reslice review` with why no smaller split exists and
|
|
130
130
|
a spec trace of the slice's obligations (hardening no AC/INV/PROH requires moves to
|
|
131
131
|
a sibling slice dependents do not need, still gated before Seal), and
|
|
132
|
-
reopen with `--reslice-review <DRIFT-ID>`.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
[`parallel-batch.md`](parallel-batch.md).
|
|
132
|
+
reopen with `--reslice-review <DRIFT-ID>`. Same-worktree stays one writer.
|
|
133
|
+
Never run two writers in one worktree, mix isolated and same-worktree writers,
|
|
134
|
+
or substitute a generic agent. Opt-in `/rite-build --parallel N` is the
|
|
135
|
+
exception: one wright per worktree, each its own `slice-wright.<SLICE-ID>` role
|
|
136
|
+
on one wave ([`parallel-batch.md`](parallel-batch.md)).
|
|
137
137
|
|
|
138
138
|
The `return` that completes the wave releases its claim; `dispatch abandon --release`
|
|
139
139
|
releases it on any other host-confirmed terminal path (a stop, a launch refused with no
|
|
@@ -117,8 +117,8 @@ load a routed standard to discover required behavior, not to prescribe implement
|
|
|
117
117
|
and [`interview-patterns.md`](reference/interview-patterns.md) for a vague ask. Every
|
|
118
118
|
material dimension is resolved by a human pick or explicitly deferred as non-blocking;
|
|
119
119
|
only genuinely reversible, low-impact details go to `assumptions.md`. A paper-only
|
|
120
|
-
uncertainty may take one scoped `/rite-prototype` detour. A
|
|
121
|
-
|
|
120
|
+
uncertainty may take one scoped `/rite-prototype` detour. A principle conflict
|
|
121
|
+
complies by changing the spec. Only an unavoidable violation blocks for a human.
|
|
122
122
|
4a. **Build-interruption forecast.** Search first, then list and close foreseeable human needs:
|
|
123
123
|
product/acceptance ambiguity, irreversible/external approval, or human-only access. Record
|
|
124
124
|
owned prerequisites. Keep a build checkpoint only for unavailable pre-code evidence or a
|
|
@@ -123,12 +123,11 @@ the spec applicability map triggers that risk family.
|
|
|
123
123
|
[`devrites-strategy-reviewer`](../../agents/devrites-strategy-reviewer.md)
|
|
124
124
|
through the native fresh-context contract in
|
|
125
125
|
[`agents.md`](../devrites-lib/reference/standards/agents.md), with **only** its `--role strategy-reviewer` read-set
|
|
126
|
-
(hardened spec, `strategy.md`, claim-check artifacts) + rubric, no authoring reasoning. Fold
|
|
127
|
-
exact strategy reviewer rechecks open findings and affected coverage/regressions under
|
|
126
|
+
(hardened spec, `strategy.md`, claim-check artifacts) + rubric, no authoring reasoning. Fold findings once and recheck them under
|
|
128
127
|
[the canonical retry contract](../devrites-lib/reference/standards/afk-hitl.md#retry-cap-no-progress-loops-and-self-resolve):
|
|
129
|
-
Product/scope
|
|
130
|
-
|
|
131
|
-
If the named agent is unavailable, stop for HITL. After an accepted edit to a
|
|
128
|
+
Product/scope and unapproved irreversible risk stay human gates;
|
|
129
|
+
exhaustion keeps the blocker.
|
|
130
|
+
If the named agent is unavailable, stop for HITL. Except `sequence_lookahead: yes` and no spawn tool: record the review pending, stay `running`, continue Define. Not access. After an accepted edit to a
|
|
132
131
|
coverage-bound input, repeat step 6's native coverage revalidation before handoff.
|
|
133
132
|
8. **STOP.** Report the mode, the scope deltas, and the floor verdict; recommend `/rite-define`.
|
|
134
133
|
|
|
@@ -169,9 +169,9 @@ named in the re-dispatch contract; changes outside task paths stop for the human
|
|
|
169
169
|
|
|
170
170
|
## Scale limits
|
|
171
171
|
|
|
172
|
-
The role table bounds rosters. Use
|
|
173
|
-
counting children any leaf spawned
|
|
174
|
-
Refuse
|
|
172
|
+
The role table bounds rosters. Use up to ten concurrent read-only reviewers,
|
|
173
|
+
the same cap as a writer batch, counting children any leaf spawned.
|
|
174
|
+
Refuse a larger swarm and role substitution: sharpen scope or use a bounded second pass when coverage is missing.
|
|
175
175
|
Overlapping reviewers increase duplicate findings and reconciliation work.
|
|
176
176
|
|
|
177
177
|
## Children are tools, not peers
|
|
@@ -8,7 +8,7 @@ Follow DevRites policy and [`depth profiles`](../orchestration-profiles.md).
|
|
|
8
8
|
|
|
9
9
|
<!-- root-only -->
|
|
10
10
|
- Root owns scope, questions/decisions/results, `.devrites/**`, phase transitions — not product source/tests; vetted executable workflow artifacts follow [`workflow-artifacts.md`](workflow-artifacts.md).
|
|
11
|
-
- Every named role runs; unavailable → HITL, never skip/substitute.
|
|
11
|
+
- Every named role runs; unavailable → HITL, never skip/substitute. `sequence_lookahead: yes` with no spawn tool defers the role, records the gap, and keeps planning. Not gate `access`, not a verdict. Admit the role before Build.
|
|
12
12
|
<!-- /root-only -->
|
|
13
13
|
- Among lifecycle `devrites-*` specialists, only bounded wright writes product
|
|
14
14
|
source/tests; others inspect an immutable candidate. The independent `$rite-fast`
|
|
@@ -145,11 +145,8 @@ Basis: <files read · commands run to reach this finding>
|
|
|
145
145
|
asks for is a Suggestion, however plausible. The `when` must also be reachable:
|
|
146
146
|
a hostile actor enters only through a trust boundary the feature really has
|
|
147
147
|
(users, network, external systems, untrusted files). A trigger that needs one it
|
|
148
|
-
never faces —
|
|
149
|
-
|
|
150
|
-
is a Suggestion too. So is an environment state the feature's declared
|
|
151
|
-
environment does not have (a mount option, kernel setting or daemon location
|
|
152
|
-
absent from the target host): guard against it only when the spec names it.
|
|
148
|
+
never faces — forged test evidence, a second user on a single-owner host, or a swapped local daemon —
|
|
149
|
+
is a Suggestion too. So is an undeclared host setting (mount, kernel, daemon path): guard it only when the spec names it.
|
|
153
150
|
A finding never pulls a deferred slice's scope forward.
|
|
154
151
|
- **`no-findings`:** `No-findings:` names checks and inspected evidence. Bare
|
|
155
152
|
pass, empty list, or “looks good” is malformed.
|
|
@@ -47,10 +47,9 @@ unaudited.
|
|
|
47
47
|
|
|
48
48
|
## Gate
|
|
49
49
|
|
|
50
|
-
At plan, build, review, and seal, compare the
|
|
51
|
-
|
|
52
|
-
phase. A missing or empty principles file passes silently.
|
|
50
|
+
At plan, build, review, and seal, compare the change with each in-scope principle.
|
|
51
|
+
An unexcepted violation is Critical and blocks. A missing or empty file passes.
|
|
53
52
|
|
|
54
|
-
Adding, changing, retiring, or excepting a principle is
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
Adding, changing, retiring, or excepting a principle is human-owned. Date it in
|
|
54
|
+
the governance history. Agents do not ratify it. Comply by changing the spec.
|
|
55
|
+
Ask for an exception only when the objective cannot be met without the violation.
|
|
@@ -41,4 +41,6 @@ recommended option stay human. A blocking question that already names option 1
|
|
|
41
41
|
`(Recommended)` or `proposed:` is autocomplete's to resolve: pick that option
|
|
42
42
|
via `devrites-engine state resolve` and continue. Recommended temper
|
|
43
43
|
`expand` and extra acceptance are never auto-picked: they stop for a human through
|
|
44
|
-
`AskUserQuestion`; do not invent product intent.
|
|
44
|
+
`AskUserQuestion`; do not invent product intent. A principle
|
|
45
|
+
conflict complies by changing the spec. Except a principle when the
|
|
46
|
+
objective cannot be met without the violation.
|
|
@@ -2,49 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
> Root-only: not inlined in --role bundles.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Build → Seal. The main loop later resumes the planned child instead of
|
|
8
|
-
specifying it again.
|
|
5
|
+
Plans the next continuation while the active workspace builds. Spec → Vet
|
|
6
|
+
overlaps the predecessor's Build → Seal.
|
|
9
7
|
|
|
10
8
|
## Start and target
|
|
11
9
|
|
|
12
|
-
The
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
continuation after the active workspace: the entry
|
|
16
|
-
[sequence continuation](loop.md#sequence-continuation) would open. Stop with
|
|
17
|
-
nothing to do when the active workspace is before Build, no entry remains,
|
|
18
|
-
`continue_sequence: false`, or the sequence budget is spent.
|
|
10
|
+
Start `$rite-autocomplete --lookahead` once `.devrites/ACTIVE` is in Build or later. The agent never launches a session. Target: the next continuation
|
|
11
|
+
([sequence continuation](loop.md#sequence-continuation)). Stop when that workspace
|
|
12
|
+
is before Build, no entry remains, `continue_sequence: false`, or the budget is spent.
|
|
19
13
|
|
|
20
14
|
## Lease
|
|
21
15
|
|
|
22
|
-
Before any write
|
|
16
|
+
Before any write:
|
|
23
17
|
`devrites-engine claim add --session lookahead-<target> --ttl 240 --workspace <target> --reason lookahead`.
|
|
24
|
-
Exit 3
|
|
25
|
-
same session at each phase start, and release it with `devrites-engine claim
|
|
26
|
-
release` on every stop. A crashed session's lease reads `dead` and frees itself.
|
|
18
|
+
Exit 3: held, stop. Re-add the same session each phase. Release with `devrites-engine claim release` on stop. A `dead` lease frees itself.
|
|
27
19
|
|
|
28
20
|
## Rules
|
|
29
21
|
|
|
30
|
-
- Never read or write `.devrites/ACTIVE`. Pass the target
|
|
31
|
-
skill and engine command, including `$rite-spec <target> "<objective>"` and
|
|
32
|
-
`devrites-engine handoff <target> --resume`.
|
|
22
|
+
- Never read or write `.devrites/ACTIVE`. Pass the slug to `$rite-spec <target> "<objective>"` and `devrites-engine handoff <target> --resume`.
|
|
33
23
|
- After the workspace exists, run `devrites-engine state set <target> sequence_lookahead=yes`.
|
|
34
|
-
- Run Spec → Clarify → Temper → Define → Plan → Vet
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
arm or rewrite `.devrites/AFK`. Owner questions go to the target's
|
|
45
|
-
`questions.md` and stop the lookahead.
|
|
46
|
-
- Stop at Vet `READY` with `next_action: build after predecessor Seal GO`, at a
|
|
47
|
-
human gate, or when the target's lease is lost.
|
|
48
|
-
|
|
49
|
-
**Failing case:** the lookahead passes Vet and starts Build while the
|
|
50
|
-
predecessor is still sealing, so two root sessions write one tree.
|
|
24
|
+
- Run Spec → Clarify → Temper → Define → Plan → Vet. Define and Plan read the predecessor tree and plan. Record one assumption per predecessor interface used.
|
|
25
|
+
- At Vet record `Predecessor readiness: <active-slug> <digest>` in `eng-review.md` (the `--emit-binding` hex). A later planning change blocks `DRV-GATE-READINESS-STALE`; re-vet before Build.
|
|
26
|
+
- Predecessor still in Build or later forbids only Build, product source, tests, commits, and `.devrites/AFK`. It does not skip Define, Plan, or Vet, and is not `awaiting_human`. Acceptance, scope, and irreversible risk still stop.
|
|
27
|
+
- No spawn tool is not gate `access` or `awaiting_human`. Root writes Define and Plan. No Vet `READY` until those roles are admitted; else stop `running`, `next_action: $rite-vet`.
|
|
28
|
+
- On every entry, re-read `state.md` and `questions.md`. Do not report a stop from chat. `continuation: clear` with `awaiting_human` is not done: fold resolved decisions into the spec, then continue. An except-principle or change-the-spec question complies: change the spec and resolve it. Ask only when the approved objective cannot comply.
|
|
29
|
+
- Stop at Vet `READY` with `next_action: build after predecessor Seal GO`, at a real human gate, or when the lease is lost.
|
|
30
|
+
|
|
31
|
+
**Failing case:** Vet then Build while the predecessor is still sealing, so two sessions write one tree. Or Define, Plan, and Vet skipped because the predecessor is still Build, or a missing strategy-reviewer spawn recorded as gate `access`.
|
|
32
|
+
|
|
33
|
+
**Failing case:** stops to except a principle the spec can avoid.
|