devrites 5.7.2 → 5.9.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.
- package/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/docs/architecture.md +4 -4
- package/docs/command-map.md +3 -3
- package/docs/engine/commands.md +1 -0
- package/docs/engine/workspace-schema.md +1 -1
- package/docs/flow.md +4 -2
- package/docs/orchestration.md +2 -2
- package/docs/skills.md +1 -1
- package/docs/usage.md +11 -10
- package/engine/internal/parallel/cli.go +69 -0
- package/engine/internal/parallel/git.go +8 -0
- package/engine/internal/parallel/ops.go +40 -12
- package/engine/internal/parallel/ops_test.go +29 -1
- package/engine/internal/parallel/parallel_test.go +26 -14
- package/engine/internal/parallel/select.go +76 -0
- package/engine/internal/parallel/select_test.go +95 -0
- package/pack/.claude/agents/devrites-slice-wright.md +18 -9
- package/pack/.claude/settings.json +1 -0
- package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +4 -3
- package/pack/.claude/skills/rite-autocomplete/SKILL.md +18 -18
- package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +2 -3
- package/pack/.claude/skills/rite-autocomplete/reference/loop.md +18 -25
- package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
- package/pack/.claude/skills/rite-build/SKILL.md +13 -8
- package/pack/.claude/skills/rite-build/reference/afk-discipline.md +3 -1
- package/pack/.claude/skills/rite-build/reference/anti-patterns.md +4 -0
- package/pack/.claude/skills/rite-build/reference/checkpoint.md +33 -21
- package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +5 -4
- package/pack/.claude/skills/rite-build/reference/parallel-batch.md +30 -23
- package/pack/.claude/skills/rite-build/reference/phase-contract.md +4 -2
- package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +16 -9
- package/pack/.claude/skills/rite-plan/reference/slicing.md +4 -3
- package/pack/.claude/skills/rite-polish/SKILL.md +3 -1
- package/pack/.claude/skills/rite-prove/SKILL.md +3 -0
- package/pack/.claude/skills/rite-review/SKILL.md +3 -1
- package/pack/.claude/skills/rite-temper/SKILL.md +6 -6
- package/pack/.claude/skills/rite-temper/reference/significance.md +3 -3
- package/pack/generated/claude/agents/devrites-slice-wright.md +18 -9
- package/pack/generated/claude/settings.json +1 -0
- package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +4 -3
- package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +18 -18
- package/pack/generated/claude/skills/rite-autocomplete/reference/decision-policy.md +2 -3
- package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +18 -25
- package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
- package/pack/generated/claude/skills/rite-build/SKILL.md +13 -8
- package/pack/generated/claude/skills/rite-build/reference/afk-discipline.md +3 -1
- package/pack/generated/claude/skills/rite-build/reference/anti-patterns.md +4 -0
- package/pack/generated/claude/skills/rite-build/reference/checkpoint.md +33 -21
- package/pack/generated/claude/skills/rite-build/reference/one-slice-cycle.md +5 -4
- package/pack/generated/claude/skills/rite-build/reference/parallel-batch.md +30 -23
- package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +4 -2
- package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +16 -9
- package/pack/generated/claude/skills/rite-plan/reference/slicing.md +4 -3
- package/pack/generated/claude/skills/rite-polish/SKILL.md +3 -1
- package/pack/generated/claude/skills/rite-prove/SKILL.md +3 -0
- package/pack/generated/claude/skills/rite-review/SKILL.md +3 -1
- package/pack/generated/claude/skills/rite-temper/SKILL.md +6 -6
- package/pack/generated/claude/skills/rite-temper/reference/significance.md +3 -3
- package/pack/generated/codex/agents/devrites-slice-wright.toml +18 -9
- package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +4 -3
- package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +18 -18
- package/pack/generated/codex/skills/rite-autocomplete/reference/decision-policy.md +2 -3
- package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +18 -25
- package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
- package/pack/generated/codex/skills/rite-build/SKILL.md +13 -8
- package/pack/generated/codex/skills/rite-build/reference/afk-discipline.md +3 -1
- package/pack/generated/codex/skills/rite-build/reference/anti-patterns.md +4 -0
- package/pack/generated/codex/skills/rite-build/reference/checkpoint.md +33 -21
- package/pack/generated/codex/skills/rite-build/reference/one-slice-cycle.md +5 -4
- package/pack/generated/codex/skills/rite-build/reference/parallel-batch.md +30 -23
- package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +4 -2
- package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +16 -9
- package/pack/generated/codex/skills/rite-plan/reference/slicing.md +4 -3
- package/pack/generated/codex/skills/rite-polish/SKILL.md +3 -1
- package/pack/generated/codex/skills/rite-prove/SKILL.md +3 -0
- package/pack/generated/codex/skills/rite-review/SKILL.md +3 -1
- package/pack/generated/codex/skills/rite-temper/SKILL.md +6 -6
- package/pack/generated/codex/skills/rite-temper/reference/significance.md +3 -3
- package/pack/generated/omp/agents/devrites-slice-wright.md +18 -9
- package/pack/generated/omp/skills/devrites-lib/reference/standards/afk-hitl.md +4 -3
- package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +18 -18
- package/pack/generated/omp/skills/rite-autocomplete/reference/decision-policy.md +2 -3
- package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +18 -25
- package/pack/generated/omp/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
- package/pack/generated/omp/skills/rite-build/SKILL.md +13 -8
- package/pack/generated/omp/skills/rite-build/reference/afk-discipline.md +3 -1
- package/pack/generated/omp/skills/rite-build/reference/anti-patterns.md +4 -0
- package/pack/generated/omp/skills/rite-build/reference/checkpoint.md +33 -21
- package/pack/generated/omp/skills/rite-build/reference/one-slice-cycle.md +5 -4
- package/pack/generated/omp/skills/rite-build/reference/parallel-batch.md +30 -23
- package/pack/generated/omp/skills/rite-build/reference/phase-contract.md +4 -2
- package/pack/generated/omp/skills/rite-build/reference/wright-dispatch.md +16 -9
- package/pack/generated/omp/skills/rite-plan/reference/slicing.md +4 -3
- package/pack/generated/omp/skills/rite-polish/SKILL.md +3 -1
- package/pack/generated/omp/skills/rite-prove/SKILL.md +3 -0
- package/pack/generated/omp/skills/rite-review/SKILL.md +3 -1
- package/pack/generated/omp/skills/rite-temper/SKILL.md +6 -6
- package/pack/generated/omp/skills/rite-temper/reference/significance.md +3 -3
- package/pack/generated/pi/agents/devrites-code-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-devex-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-doubt-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-evidence-scout.md +1 -1
- package/pack/generated/pi/agents/devrites-frontend-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-performance-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-plan-drafter.md +1 -1
- package/pack/generated/pi/agents/devrites-plan-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-proof-runner.md +1 -1
- package/pack/generated/pi/agents/devrites-retrospector.md +1 -1
- package/pack/generated/pi/agents/devrites-security-auditor.md +1 -1
- package/pack/generated/pi/agents/devrites-simplifier-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-slice-wright.md +19 -10
- package/pack/generated/pi/agents/devrites-spec-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-strategy-reviewer.md +1 -1
- package/pack/generated/pi/agents/devrites-test-analyst.md +1 -1
- package/pack/generated/pi/agents/devrites-upgrade-planner.md +1 -1
- package/pack/generated/pi/skills/devrites-lib/reference/standards/afk-hitl.md +4 -3
- package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +18 -18
- package/pack/generated/pi/skills/rite-autocomplete/reference/decision-policy.md +2 -3
- package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +18 -25
- package/pack/generated/pi/skills/rite-autocomplete/reference/stop-conditions.md +10 -11
- package/pack/generated/pi/skills/rite-build/SKILL.md +13 -8
- package/pack/generated/pi/skills/rite-build/reference/afk-discipline.md +3 -1
- package/pack/generated/pi/skills/rite-build/reference/anti-patterns.md +4 -0
- package/pack/generated/pi/skills/rite-build/reference/checkpoint.md +33 -21
- package/pack/generated/pi/skills/rite-build/reference/one-slice-cycle.md +5 -4
- package/pack/generated/pi/skills/rite-build/reference/parallel-batch.md +30 -23
- package/pack/generated/pi/skills/rite-build/reference/phase-contract.md +4 -2
- package/pack/generated/pi/skills/rite-build/reference/wright-dispatch.md +16 -9
- package/pack/generated/pi/skills/rite-plan/reference/slicing.md +4 -3
- package/pack/generated/pi/skills/rite-polish/SKILL.md +3 -1
- package/pack/generated/pi/skills/rite-prove/SKILL.md +3 -0
- package/pack/generated/pi/skills/rite-review/SKILL.md +3 -1
- package/pack/generated/pi/skills/rite-temper/SKILL.md +6 -6
- package/pack/generated/pi/skills/rite-temper/reference/significance.md +3 -3
- package/package.json +1 -1
- package/scripts/pi-generate.sh +52 -1
|
@@ -1,28 +1,46 @@
|
|
|
1
|
-
# Checkpoint:
|
|
1
|
+
# Checkpoint: land local WIP only after the check loop is green
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
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>): <
|
|
34
|
+
git commit -m "WIP(<slug>): <imperative summary>" -m "$(cat <<'BODY'
|
|
15
35
|
[devrites-context]
|
|
16
|
-
decisions: <one-line delta this
|
|
17
|
-
remaining: <pending
|
|
18
|
-
dead-ends: <approaches ruled out
|
|
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
|
-
|
|
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,16 +17,17 @@ 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) →
|
|
28
|
-
|
|
29
|
-
NEXT → HITL root reports and stops
|
|
28
|
+
(CHECKPOINT) → only now, with review+proof green: local WIP(<slug>): <imperative summary>
|
|
29
|
+
on the control branch (no slice id) → checkpoint.md
|
|
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
|
|
|
32
33
|
## Why the boundary matters
|
|
@@ -28,18 +28,20 @@ N_eff = min(
|
|
|
28
28
|
)
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Select **greedily in plan order**:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
nothing pending → Prove. A cap that cannot be filled
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
Select **greedily in plan order**: pass every currently dependency-ready pending slice
|
|
32
|
+
(plan order, `Files likely touched`) to
|
|
33
|
+
`devrites-engine parallel select --cap N [--root <dir>]`. `N_eff ≥ 2` → parallel batch;
|
|
34
|
+
`N_eff = 1` → one serial round; nothing pending → Prove. A cap that cannot be filled
|
|
35
|
+
is normal: take fewer. Serial is this round's size, not the rest of the run.
|
|
36
|
+
|
|
37
|
+
**Re-batch automatically after every completed round** (parallel integrate+cleanup or
|
|
38
|
+
a serial slice). Re-read `state.md`, pending slices, and the tree, then run
|
|
39
|
+
`parallel select` again: finished work leaves the pending set, and satisfied
|
|
40
|
+
dependencies unlock new slices. Under `.devrites/AFK` and `/rite-autocomplete` the
|
|
41
|
+
repeat is the same run — HITL stops after each batch. `--parallel 5` with one eligible
|
|
42
|
+
slice runs that one; when two to five then become eligible, the next round takes that
|
|
43
|
+
many. **Failing case:** the run stays one-by-one after a serial round even though more
|
|
44
|
+
slices are now eligible under the same cap.
|
|
43
45
|
|
|
44
46
|
## Path-disjoint
|
|
45
47
|
|
|
@@ -71,7 +73,8 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
|
|
|
71
73
|
1. Orient/gate; parse the cap; compute `N_eff` and select the eligible set
|
|
72
74
|
([Dynamic selection and re-batching](#dynamic-selection-and-re-batching)) —
|
|
73
75
|
candidates from `orient` `task_graph.slices` + built list, each candidate's
|
|
74
|
-
`Files likely touched` via `observe slice`,
|
|
76
|
+
`Files likely touched` via `observe slice`, then
|
|
77
|
+
`parallel select --cap N` (pairwise disjointness is inside that verb).
|
|
75
78
|
2. Write lease; freeze `B=HEAD`; `parallel create` worktrees.
|
|
76
79
|
3. Dispatch ≤10 wrights in parallel (cwd=worktree; allowlist; prove `HEAD==B`).
|
|
77
80
|
4. Inspect each returned path list, cumulative diff from `B`, transfer identity,
|
|
@@ -91,13 +94,16 @@ Lease: `batch_id`, `created_at`, `base_sha`, `n`,
|
|
|
91
94
|
Expected test-first RED is not a terminal gate failure. Cancel only for a shared
|
|
92
95
|
invalid foundation, safety/access failure, resource boundary, or explicit stop;
|
|
93
96
|
preserve completed and in-progress recoverable work and classify each result.
|
|
94
|
-
6.
|
|
95
|
-
`
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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`.
|
|
101
107
|
8. Cleanup runs only after `integrate` marks the lease `complete` — work
|
|
102
108
|
landed in control, so `parallel cleanup` removes worktrees/branches.
|
|
103
109
|
Blocked/human-stopped batches keep lease, worktrees, branches — nothing is
|
|
@@ -163,6 +169,7 @@ Repair rejected work in place; never discard/rebuild while budget remains.
|
|
|
163
169
|
## Engine verbs
|
|
164
170
|
|
|
165
171
|
```text
|
|
172
|
+
devrites-engine parallel select --cap <1-10> [--root <dir>] [<json-file>|-]
|
|
166
173
|
devrites-engine parallel create --root <repo> --slug <slug> --batch <id> --base <B> --json <file>|-
|
|
167
174
|
devrites-engine parallel record-green --root <repo> --slug <slug> --slice <id> --commit <sha>
|
|
168
175
|
devrites-engine parallel integrate --root <repo> --slug <slug> --apply-to-control
|
|
@@ -174,9 +181,9 @@ devrites-engine parallel lease-write|lease-read|lease-clear --root <repo> --slug
|
|
|
174
181
|
# parallel cleanup --root <repo> --slug <slug> --force (salvages, prints retained refs)
|
|
175
182
|
```
|
|
176
183
|
|
|
177
|
-
`integrate` without `--apply-to-control` stages the
|
|
178
|
-
lease `running` and control at `B`; cleanup still refuses — the
|
|
179
|
-
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`
|
|
180
187
|
lease, so a failed integrate retries after repair. `--apply-to-control`
|
|
181
188
|
refuses when control moved past `B` or holds uncommitted changes on slice
|
|
182
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.
|
|
48
|
-
|
|
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
|
|
29
|
-
|
|
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.
|
|
33
|
-
|
|
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,
|
|
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.
|
|
79
|
-
|
|
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
|
-
|
|
110
|
-
|
|
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;
|
|
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.
|
|
31
|
-
|
|
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) —
|
|
93
|
-
|
|
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
|
-
|
|
114
|
-
|
|
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`](.pi/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
|
|
45
|
-
`
|
|
46
|
-
|
|
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devrites",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.0",
|
|
4
4
|
"description": "DevRites: a disciplined senior-engineer workflow pack for Claude Code, Codex, omp, and pi",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://github.com/ViktorsBaikers/DevRites#readme",
|
package/scripts/pi-generate.sh
CHANGED
|
@@ -111,6 +111,57 @@ _pi_map_tools() {
|
|
|
111
111
|
printf '%s' "$_out"
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
# pi-subagents treats frontmatter tools: as a strict allowlist, so ambient
|
|
115
|
+
# pi-lean-ctx / pi-lens tools are dropped unless named. Append those names
|
|
116
|
+
# after the mapped builtins (preserve base order). Unknown names are pruned
|
|
117
|
+
# non-fatally by pi-subagents. Read-only agents stay read-only: ctx_edit /
|
|
118
|
+
# ctx_patch only when the base already has edit or write; ctx_shell only
|
|
119
|
+
# when the base already has bash.
|
|
120
|
+
_PI_EXTENSION_NAV_TOOLS="ctx_read, ctx_ls, ctx_find, ctx_grep, ctx_glob, ctx_search, ctx_compose, ctx_callgraph, ctx_tree, symbol_search, project_report, module_report, read_symbol, read_enclosing, lens_diagnostics"
|
|
121
|
+
|
|
122
|
+
_pi_csv_has() {
|
|
123
|
+
case ", ${1}, " in
|
|
124
|
+
*", ${2}, "*) return 0 ;;
|
|
125
|
+
*) return 1 ;;
|
|
126
|
+
esac
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
_pi_csv_append() {
|
|
130
|
+
local _list="$1" _name="$2"
|
|
131
|
+
if [ -z "$_name" ]; then
|
|
132
|
+
printf '%s' "$_list"
|
|
133
|
+
return
|
|
134
|
+
fi
|
|
135
|
+
if [ -z "$_list" ]; then
|
|
136
|
+
printf '%s' "$_name"
|
|
137
|
+
return
|
|
138
|
+
fi
|
|
139
|
+
if _pi_csv_has "$_list" "$_name"; then
|
|
140
|
+
printf '%s' "$_list"
|
|
141
|
+
return
|
|
142
|
+
fi
|
|
143
|
+
printf '%s, %s' "$_list" "$_name"
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
_pi_append_extension_tools() {
|
|
147
|
+
local _base="$1"
|
|
148
|
+
local _out="$_base" _tok
|
|
149
|
+
while IFS= read -r _tok; do
|
|
150
|
+
_tok="${_tok#"${_tok%%[![:space:]]*}"}"
|
|
151
|
+
_tok="${_tok%"${_tok##*[![:space:]]}"}"
|
|
152
|
+
[ -z "$_tok" ] && continue
|
|
153
|
+
_out="$(_pi_csv_append "$_out" "$_tok")"
|
|
154
|
+
done < <(printf '%s\n' "$_PI_EXTENSION_NAV_TOOLS" | tr ',' '\n')
|
|
155
|
+
if _pi_csv_has "$_base" "edit" || _pi_csv_has "$_base" "write"; then
|
|
156
|
+
_out="$(_pi_csv_append "$_out" "ctx_edit")"
|
|
157
|
+
_out="$(_pi_csv_append "$_out" "ctx_patch")"
|
|
158
|
+
fi
|
|
159
|
+
if _pi_csv_has "$_base" "bash"; then
|
|
160
|
+
_out="$(_pi_csv_append "$_out" "ctx_shell")"
|
|
161
|
+
fi
|
|
162
|
+
printf '%s' "$_out"
|
|
163
|
+
}
|
|
164
|
+
|
|
114
165
|
# Generate a pi-subagents Markdown agent from a Claude Code markdown agent.
|
|
115
166
|
# pi-subagents loads project agents from .pi/agents/**/*.md (YAML frontmatter +
|
|
116
167
|
# body). The tools allowlist carries the Claude permission boundary: only
|
|
@@ -126,7 +177,7 @@ gen_pi_agent() {
|
|
|
126
177
|
_skills="$(awk 'NR==1 && $0=="---"{fm=1; next} fm && $0=="---"{exit} fm && /^skills:[[:space:]]*$/{list=1; next} list && /^[[:space:]]*-[[:space:]]*/{sub(/^[[:space:]]*-[[:space:]]*/, ""); print; next} list{exit}' "$_src" | tr '\n' ' ' | sed 's/ $//; s/ /, /g')"
|
|
127
178
|
[ -n "$_name" ] || _name="$(basename "$_src" .md)"
|
|
128
179
|
[ -n "$_desc" ] || _desc="DevRites custom agent."
|
|
129
|
-
_tools="$(_pi_map_tools "$_tools_raw" "$_name")"
|
|
180
|
+
_tools="$(_pi_append_extension_tools "$(_pi_map_tools "$_tools_raw" "$_name")")"
|
|
130
181
|
_desc_tmp="$TMP_GEN_DIR/pi-agent-desc-$(basename "$_src").txt"
|
|
131
182
|
_desc_pi="$TMP_GEN_DIR/pi-agent-desc-$(basename "$_src").pi.txt"
|
|
132
183
|
printf '%s' "$_desc" >"$_desc_tmp"
|