devrites 7.0.0 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/docs/command-map.md +1 -1
  4. package/docs/usage.md +7 -2
  5. package/engine/internal/gate/gate.go +7 -0
  6. package/engine/internal/gate/predecessor.go +67 -0
  7. package/engine/internal/lib/claims.go +57 -7
  8. package/engine/internal/lib/resolve.go +11 -2
  9. package/pack/.claude/skills/devrites-lib/reference/standards/performance.md +14 -0
  10. package/pack/.claude/skills/rite-autocomplete/SKILL.md +7 -3
  11. package/pack/.claude/skills/rite-autocomplete/reference/lookahead.md +50 -0
  12. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +7 -0
  13. package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +4 -0
  14. package/pack/.claude/skills/rite-spec/SKILL.md +2 -1
  15. package/pack/.claude/skills/rite-vet/SKILL.md +3 -1
  16. package/pack/generated/claude/skills/devrites-lib/reference/standards/performance.md +14 -0
  17. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +7 -3
  18. package/pack/generated/claude/skills/rite-autocomplete/reference/lookahead.md +50 -0
  19. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +7 -0
  20. package/pack/generated/claude/skills/rite-build/reference/spec-drift-guard.md +4 -0
  21. package/pack/generated/claude/skills/rite-spec/SKILL.md +2 -1
  22. package/pack/generated/claude/skills/rite-vet/SKILL.md +3 -1
  23. package/pack/generated/codex/skills/devrites-lib/reference/standards/performance.md +14 -0
  24. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +7 -3
  25. package/pack/generated/codex/skills/rite-autocomplete/reference/lookahead.md +50 -0
  26. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +7 -0
  27. package/pack/generated/codex/skills/rite-build/reference/spec-drift-guard.md +4 -0
  28. package/pack/generated/codex/skills/rite-spec/SKILL.md +2 -1
  29. package/pack/generated/codex/skills/rite-vet/SKILL.md +3 -1
  30. package/pack/generated/devin/skills/devrites-lib/reference/standards/performance.md +14 -0
  31. package/pack/generated/devin/skills/rite-autocomplete/SKILL.md +7 -3
  32. package/pack/generated/devin/skills/rite-autocomplete/reference/lookahead.md +50 -0
  33. package/pack/generated/devin/skills/rite-autocomplete/reference/loop.md +7 -0
  34. package/pack/generated/devin/skills/rite-build/reference/spec-drift-guard.md +4 -0
  35. package/pack/generated/devin/skills/rite-spec/SKILL.md +2 -1
  36. package/pack/generated/devin/skills/rite-vet/SKILL.md +3 -1
  37. package/pack/generated/omp/commands/rite-autocomplete.md +1 -1
  38. package/pack/generated/omp/skills/devrites-lib/reference/standards/performance.md +14 -0
  39. package/pack/generated/omp/skills/rite-autocomplete/SKILL.md +7 -3
  40. package/pack/generated/omp/skills/rite-autocomplete/reference/lookahead.md +50 -0
  41. package/pack/generated/omp/skills/rite-autocomplete/reference/loop.md +7 -0
  42. package/pack/generated/omp/skills/rite-build/reference/spec-drift-guard.md +4 -0
  43. package/pack/generated/omp/skills/rite-spec/SKILL.md +2 -1
  44. package/pack/generated/omp/skills/rite-vet/SKILL.md +3 -1
  45. package/pack/generated/pi/prompts/rite-autocomplete.md +1 -1
  46. package/pack/generated/pi/skills/devrites-lib/reference/standards/performance.md +14 -0
  47. package/pack/generated/pi/skills/rite-autocomplete/SKILL.md +7 -3
  48. package/pack/generated/pi/skills/rite-autocomplete/reference/lookahead.md +50 -0
  49. package/pack/generated/pi/skills/rite-autocomplete/reference/loop.md +7 -0
  50. package/pack/generated/pi/skills/rite-build/reference/spec-drift-guard.md +4 -0
  51. package/pack/generated/pi/skills/rite-spec/SKILL.md +2 -1
  52. package/pack/generated/pi/skills/rite-vet/SKILL.md +3 -1
  53. package/package.json +1 -1
@@ -0,0 +1,50 @@
1
+ # Sequence lookahead (`--lookahead`)
2
+
3
+ > Root-only: not inlined in --role bundles.
4
+
5
+ A second session plans the next sequence continuation while the active
6
+ workspace builds, so the child's Spec → Vet overlaps its predecessor's
7
+ Build → Seal. The main loop later resumes the planned child instead of
8
+ specifying it again.
9
+
10
+ ## Start and target
11
+
12
+ The operator starts the second host session with `/rite-autocomplete
13
+ --lookahead` once the `.devrites/ACTIVE` workspace is in Build or later. The
14
+ agent never launches a session itself. The target is the next recorded
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.
19
+
20
+ ## Lease
21
+
22
+ Before any write, take the workspace lease:
23
+ `devrites-engine claim add --session lookahead-<target> --ttl 240 --workspace <target> --reason lookahead`.
24
+ Exit 3 means another session holds the target: stop. Re-add the lease with the
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.
27
+
28
+ ## Rules
29
+
30
+ - Never read or write `.devrites/ACTIVE`. Pass the target slug explicitly to every
31
+ skill and engine command, including `/rite-spec <target> "<objective>"` and
32
+ `devrites-engine handoff <target> --resume`.
33
+ - After the workspace exists, run `devrites-engine state set <target> sequence_lookahead=yes`.
34
+ - Run Spec → Clarify → Temper → Define → Plan → Vet as the main loop does.
35
+ Define and Plan read the predecessor's current tree and plan. Record an
36
+ assumption for each predecessor interface the plan relies on.
37
+ - At Vet, beside the readiness binding, record exactly one line
38
+ `Predecessor readiness: <active-slug> <digest>` in `eng-review.md`. `<digest>`
39
+ is the hex that `devrites-engine check readiness --emit-binding <active-slug>`
40
+ prints. When the predecessor later changes its planning inputs, the child's
41
+ readiness check blocks with `DRV-GATE-READINESS-STALE` and the main loop
42
+ re-vets the child before Build.
43
+ - Never Build, never write product source or tests, never commit, and never
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.
@@ -93,6 +93,13 @@ step 10 does not end the run: leave the sealed workspace unshipped with its
93
93
  (`/rite-spec <parent>-<n> "<objective>"` from the parent's `decisions.md` sequence)
94
94
  and re-enter step 1. Spend one workspace per opened continuation.
95
95
 
96
+ When that workspace already exists because a [lookahead](lookahead.md) session
97
+ planned it, do not specify it again. Wait while `devrites-engine claim check
98
+ --workspace <child>` exits 3 (a live lookahead holds it), then set
99
+ `.devrites/ACTIVE` to the child and resume from its cursor at step 1. A
100
+ predecessor replan since its Vet blocks the child's readiness with
101
+ `DRV-GATE-READINESS-STALE`; route that to `/rite-vet` before Build.
102
+
96
103
  Spend accounting is durable in `state.md` cursors, not chat. Before invoking the
97
104
  continuation, ensure the current workspace's `sequence_workspaces_remaining` is
98
105
  set — absent, write `max_workspaces - 1` and `sequence_position: 1` first — and
@@ -12,6 +12,10 @@ phases. Never silently code against a known-wrong plan.
12
12
  - the design system / existing UX pattern contradicts the planned UI;
13
13
  - a missing user decision that affects product behavior surfaces.
14
14
 
15
+ A timing gate that fails with no code cause is a protocol or environment defect
16
+ ([performance.md § Performance gate protocol](../../devrites-lib/reference/standards/performance.md#performance-gate-protocol)),
17
+ never another wright round.
18
+
15
19
  ## Workflow
16
20
  ```
17
21
  1. STOP coding.
@@ -124,7 +124,8 @@ load a routed standard to discover required behavior, not to prescribe implement
124
124
  owned prerequisites. Keep a build checkpoint only for unavailable pre-code evidence or a
125
125
  mandatory action-time approval. **Completion:** no foreseeable human choice is deferred.
126
126
  5. **Create or update the workspace** + set `.devrites/ACTIVE` from
127
- [state-workspace](reference/state-workspace.md). If the slug already exists,
127
+ [state-workspace](reference/state-workspace.md); a `--lookahead` run
128
+ leaves `.devrites/ACTIVE` unchanged. If the slug already exists,
128
129
  update the existing workspace rather than overwrite it; preserve history and
129
130
  unrelated settled content. Write every required artifact and conditional
130
131
  annex exactly from [spec-template](reference/spec-template.md)
@@ -211,7 +211,9 @@ plan declares a root-authored executable workflow file, read
211
211
  `marker sweep:` line is recorded in `eng-review.md`; a kept hit blocks READY. Write phase/next step and emit one
212
212
  `Readiness inputs SHA-256` with
213
213
  `devrites-engine check readiness --emit-binding <slug>`; normal readiness check
214
- must pass. Record the per-input drift baseline alongside it:
214
+ must pass. A `sequence_lookahead: yes` workspace also records one
215
+ `Predecessor readiness: <predecessor> <digest>` line from the predecessor's
216
+ `--emit-binding` hex; readiness re-checks it. Record the per-input drift baseline alongside it:
215
217
  `devrites-engine check drift <slug> --record` — a later stale binding then
216
218
  names the exact artifact that moved instead of "something changed". An `ADVISORY
217
219
  proportion:` line names a slice whose proof outgrew its ACs: move its rows without a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devrites",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
4
4
  "description": "DevRites: a disciplined senior-engineer workflow pack for Claude Code, Codex, omp, pi, and Devin CLI",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://github.com/ViktorsBaikers/DevRites#readme",