devrites 3.0.3 → 3.0.5
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 +31 -0
- package/README.md +55 -43
- package/SECURITY.md +72 -58
- package/docs/adr/0001-go-engine-as-control-plane.md +43 -0
- package/docs/adr/0002-dual-host-harness.md +34 -0
- package/docs/adr/0003-gate-model-hitl-pause.md +38 -0
- package/docs/adr/0004-state-schema-phases-sections.md +6 -3
- package/docs/adr/0005-hooks-as-engine-subcommands.md +39 -0
- package/docs/adr/0006-clock-seam-and-engine-ci-gates.md +50 -0
- package/docs/adr/0007-canonical-live-workspace-filenames.md +36 -0
- package/docs/adr/0008-sanctioned-engine-network-boundary.md +33 -0
- package/docs/adr/README.md +58 -0
- package/docs/agents/issue-driven-rites.md +5 -5
- package/docs/architecture.md +61 -45
- package/docs/capability-surface-selection.md +3 -1
- package/docs/cli.md +9 -2
- package/docs/command-map.md +6 -2
- package/docs/engine/agent-contract.md +5 -3
- package/docs/engine/commands.md +27 -14
- package/docs/engine/state-schema.md +14 -9
- package/docs/engine/workspace-schema.md +5 -4
- package/docs/flow.md +18 -7
- package/docs/porting-to-a-new-harness.md +6 -2
- package/docs/release.md +10 -9
- package/docs/skills.md +1 -1
- package/docs/templates/CRITIC_REVIEW_PACKET_TEMPLATE.md +35 -0
- package/docs/usage.md +26 -16
- package/engine/internal/lib/packageexistence.go +729 -52
- package/engine/internal/lib/packageexistence_test.go +343 -0
- package/engine/internal/lib/util.go +1 -1
- package/engine/internal/migrate/migrate.go +16 -11
- package/engine/internal/migrate/migrate_test.go +26 -4
- package/engine/internal/state/feature.go +28 -14
- package/engine/internal/state/schema.go +20 -8
- package/engine/internal/state/state_test.go +6 -6
- package/engine/tests/budget_test.go +2 -2
- package/engine/tests/meta_test.go +3 -3
- package/engine/tests/migrate_cli_test.go +24 -22
- package/pack/.claude/skills/devrites-lib/SKILL.md +7 -9
- package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +11 -3
- package/pack/.claude/skills/devrites-lib/reference/standards/development-workflow.md +2 -3
- package/pack/.claude/skills/rite/SKILL.md +6 -7
- package/pack/.claude/skills/rite/reference/menu.md +5 -5
- package/pack/.claude/skills/rite-adopt/SKILL.md +2 -3
- package/pack/generated/claude/skills/devrites-lib/SKILL.md +7 -9
- package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +11 -3
- package/pack/generated/claude/skills/devrites-lib/reference/standards/development-workflow.md +2 -3
- package/pack/generated/claude/skills/rite/SKILL.md +6 -7
- package/pack/generated/claude/skills/rite/reference/menu.md +5 -5
- package/pack/generated/claude/skills/rite-adopt/SKILL.md +2 -3
- package/pack/generated/codex/skills/devrites-lib/SKILL.md +7 -9
- package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +11 -3
- package/pack/generated/codex/skills/devrites-lib/reference/standards/development-workflow.md +2 -3
- package/pack/generated/codex/skills/rite/SKILL.md +6 -7
- package/pack/generated/codex/skills/rite/reference/menu.md +5 -5
- package/pack/generated/codex/skills/rite-adopt/SKILL.md +2 -3
- package/package.json +2 -1
- package/scripts/skills-inventory.mjs +18 -0
- package/scripts/validate-workflow-security.py +3 -8
|
@@ -58,25 +58,26 @@ func TestMigrateNormalizesCanonicalWorkSchema(t *testing.T) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
feat := filepath.Join(root, "work", slug)
|
|
61
|
-
//
|
|
62
|
-
for _, want := range []string{"
|
|
61
|
+
// Current canonical files stay canonical; migration adds only the missing map.
|
|
62
|
+
for _, want := range []string{"README.md", "state.md", "spec.md", "plan.md", "decisions.md", "tasks.md", "evidence.md"} {
|
|
63
63
|
if _, err := os.Stat(filepath.Join(feat, want)); err != nil {
|
|
64
64
|
t.Errorf("missing new-schema file %s: %v", want, err)
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
readme, err := os.ReadFile(filepath.Join(feat, "README.md"))
|
|
68
68
|
if err != nil {
|
|
69
69
|
t.Fatal(err)
|
|
70
70
|
}
|
|
71
|
-
if !strings.Contains(string(
|
|
72
|
-
t.Errorf("
|
|
71
|
+
if !strings.Contains(string(readme), "phase: temper") {
|
|
72
|
+
t.Errorf("README.md phase not derived from state.md\n%s", readme)
|
|
73
73
|
}
|
|
74
|
-
if !strings.Contains(string(
|
|
75
|
-
t.Errorf("
|
|
74
|
+
if !strings.Contains(string(readme), "schemaVersion: 1") {
|
|
75
|
+
t.Errorf("README.md missing schemaVersion\n%s", readme)
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
for _, unwanted := range []string{"feature.md", "proof.md", "status.md"} {
|
|
78
|
+
if _, err := os.Stat(filepath.Join(feat, unwanted)); !os.IsNotExist(err) {
|
|
79
|
+
t.Errorf("migration created legacy alias %s: %v", unwanted, err)
|
|
80
|
+
}
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
// A backup of the pre-migration state must exist.
|
|
@@ -127,11 +128,12 @@ func TestMigrateNormalizesLiveFeatureInPlace(t *testing.T) {
|
|
|
127
128
|
t.Fatal(err)
|
|
128
129
|
}
|
|
129
130
|
files := map[string]string{
|
|
130
|
-
"
|
|
131
|
+
"feature.md": "# Legacy feature map\n",
|
|
132
|
+
"status.md": "# State\n\n- Phase: prove\n- Status: running\n",
|
|
131
133
|
"spec.md": "# Spec\n\nRotate tokens.\n",
|
|
132
134
|
"plan.md": "# Plan\n\nStep 1, step 2.\n",
|
|
133
135
|
"tasks.md": "# Tasks\n\n- [x] one\n",
|
|
134
|
-
"
|
|
136
|
+
"proof.md": "# Evidence\n\nTests green.\n",
|
|
135
137
|
"decisions.md": "# Decisions\n\nUse HMAC.\n",
|
|
136
138
|
}
|
|
137
139
|
for name, body := range files {
|
|
@@ -147,25 +149,25 @@ func TestMigrateNormalizesLiveFeatureInPlace(t *testing.T) {
|
|
|
147
149
|
if !strings.Contains(out, "migrated 1 feature(s)") {
|
|
148
150
|
t.Errorf("unexpected migrate output\n%s", out)
|
|
149
151
|
}
|
|
150
|
-
for _, want := range []string{"feature.md", "proof.md", "status.md", "state.md", "evidence.md"} {
|
|
152
|
+
for _, want := range []string{"README.md", "feature.md", "proof.md", "status.md", "state.md", "evidence.md"} {
|
|
151
153
|
if _, err := os.Stat(filepath.Join(feat, want)); err != nil {
|
|
152
154
|
t.Errorf("missing normalized file %s: %v", want, err)
|
|
153
155
|
}
|
|
154
156
|
}
|
|
155
|
-
|
|
157
|
+
readme, err := os.ReadFile(filepath.Join(feat, "README.md"))
|
|
156
158
|
if err != nil {
|
|
157
159
|
t.Fatal(err)
|
|
158
160
|
}
|
|
159
|
-
if !strings.Contains(string(
|
|
160
|
-
t.Errorf("
|
|
161
|
+
if !strings.Contains(string(readme), "Legacy feature map") {
|
|
162
|
+
t.Errorf("README.md did not carry feature.md content\n%s", readme)
|
|
161
163
|
}
|
|
162
|
-
|
|
163
|
-
if !strings.Contains(string(
|
|
164
|
-
t.Errorf("
|
|
164
|
+
stateFile, _ := os.ReadFile(filepath.Join(feat, "state.md"))
|
|
165
|
+
if !strings.Contains(string(stateFile), "running") {
|
|
166
|
+
t.Errorf("state.md did not carry status.md content\n%s", stateFile)
|
|
165
167
|
}
|
|
166
|
-
|
|
167
|
-
if !strings.Contains(string(
|
|
168
|
-
t.Errorf("
|
|
168
|
+
evidence, _ := os.ReadFile(filepath.Join(feat, "evidence.md"))
|
|
169
|
+
if !strings.Contains(string(evidence), "Tests green") {
|
|
170
|
+
t.Errorf("evidence.md did not carry proof.md content\n%s", evidence)
|
|
169
171
|
}
|
|
170
172
|
if got := backupDirs(t, root); len(got) != 1 {
|
|
171
173
|
t.Errorf("want exactly one backup dir, got %v", got)
|
|
@@ -7,14 +7,13 @@ disable-model-invocation: true
|
|
|
7
7
|
|
|
8
8
|
# devrites-lib — internal shared helpers (not a command)
|
|
9
9
|
|
|
10
|
-
This is **not** a skill you run. It is
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
any workspace, with no install layout or script path to resolve.
|
|
10
|
+
This is **not** a skill you run. It is DevRites' manifest for shared references
|
|
11
|
+
and control-plane operations. Skills call `devrites-engine <command>` from any
|
|
12
|
+
workspace; no pack script path is required.
|
|
14
13
|
|
|
15
14
|
## Operations
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
These are selected `devrites-engine` contracts; `devrites-engine help` is exhaustive.
|
|
18
17
|
|
|
19
18
|
**Read-only — orient / gate (never mutate the workspace):**
|
|
20
19
|
|
|
@@ -76,7 +75,6 @@ devrites-engine progress
|
|
|
76
75
|
|
|
77
76
|
**Unified entrypoint (tool-agnostic):**
|
|
78
77
|
|
|
79
|
-
-
|
|
80
|
-
`
|
|
81
|
-
|
|
82
|
-
prose. See [`docs/cli.md`](../../../../docs/cli.md).
|
|
78
|
+
- `devrites-engine` is the shared CLI for agents, CI, and humans. The npm
|
|
79
|
+
`devrites` shim acquires it, owns install/update/uninstall bootstrap, and
|
|
80
|
+
proxies other commands.
|
|
@@ -59,9 +59,17 @@ Rules:
|
|
|
59
59
|
|
|
60
60
|
```text
|
|
61
61
|
Awaiting human: <qid> · <gate> · <slice/phase>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
|
|
63
|
+
Question
|
|
64
|
+
<question>
|
|
65
|
+
|
|
66
|
+
Recommended
|
|
67
|
+
1. <option 1 + short reason>
|
|
68
|
+
|
|
69
|
+
Other options
|
|
70
|
+
2. <option 2>
|
|
71
|
+
3. <option 3 if any>
|
|
72
|
+
|
|
65
73
|
Resume: /rite-resolve <qid> "<answer>"
|
|
66
74
|
Record: .devrites/work/<slug>/questions.md
|
|
67
75
|
↻ Hygiene: no /clear until the answer is persisted
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Development workflow
|
|
2
2
|
|
|
3
|
-
Ship small, integrate often, keep the main branch releasable.
|
|
4
|
-
|
|
5
|
-
review → seal → ship) runs on top of.
|
|
3
|
+
Ship small, integrate often, keep the main branch releasable. DevRites runs this
|
|
4
|
+
lifecycle atop that loop: spec → define → vet → build → prove → polish → review → seal → ship.
|
|
6
5
|
|
|
7
6
|
## Work in small batches
|
|
8
7
|
- Break work into thin, independently shippable slices and integrate them frequently —
|
|
@@ -70,12 +70,10 @@ Both forms hit the same skill — the menu form for discovery, the `/rite-<verb>
|
|
|
70
70
|
the now-active feature. It is cheap context-switching only — no re-spec, no phase run. If
|
|
71
71
|
the workspace is missing, list the slugs under `.devrites/work/` and stop.
|
|
72
72
|
|
|
73
|
-
`guide` is
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
every phase — the small change is what makes the full ceremony affordable to watch. Pause
|
|
78
|
-
at each boundary for the user's go-ahead. Teach without lecturing.
|
|
73
|
+
`guide` is an inline first-feature walkthrough. Agree on one **real, genuinely small**
|
|
74
|
+
change, then run spec → temper → define → vet → build → prove → polish → review → seal →
|
|
75
|
+
ship. Before each phase, say what it decides; after, name what it wrote and why. Pause at
|
|
76
|
+
every boundary. Teach without lecturing.
|
|
79
77
|
|
|
80
78
|
Specialist triggers (model-invoked inside the above):
|
|
81
79
|
`devrites-frontend-craft` (UI) · `devrites-browser-proof` (UI verify) ·
|
|
@@ -106,9 +104,10 @@ SPEC /rite spec ≡ /rite-spec investigate deep
|
|
|
106
104
|
ADOPT /rite adopt ≡ /rite-adopt onboard existing code → reverse-derive spec.md + seed conventions
|
|
107
105
|
TEMPER /rite temper ≡ /rite-temper optional — strategic review: scope mode + pre-mortem, harden the spec
|
|
108
106
|
PLAN /rite define ≡ /rite-define turn the spec into plan + task slices + state
|
|
109
|
-
VET /rite vet ≡ /rite-vet
|
|
107
|
+
VET /rite vet ≡ /rite-vet mandatory every plan — light/full engineering review by stakes
|
|
110
108
|
REPLAN /rite plan ≡ /rite-plan decompose / reslice / repair an active plan
|
|
111
109
|
BUILD /rite build ≡ /rite-build implement exactly one verified vertical slice, then stop
|
|
110
|
+
CONVERGE /rite converge ≡ /rite-converge recovery — append work needed to meet intent
|
|
112
111
|
PROVE /rite prove ≡ /rite-prove tests + build + runtime + browser evidence
|
|
113
112
|
POLISH /rite polish ≡ /rite-polish code polish always; UI normalize + polish if UI
|
|
114
113
|
REVIEW /rite review ≡ /rite-review feature-scoped multi-axis review
|
|
@@ -7,11 +7,11 @@ what each command does or how phases connect.
|
|
|
7
7
|
|
|
8
8
|
| Phase | Command | Use when |
|
|
9
9
|
|---|---|---|
|
|
10
|
-
| Spec | `/rite-spec <feature>` | **
|
|
10
|
+
| Spec | `/rite-spec <feature>` | **New feature.** Investigate deeply → write spec.md. Asks with options; gathers attached design references (optional). |
|
|
11
11
|
| Adopt | `/rite-adopt` | Onboard an existing codebase instead of starting fresh — reverse-derive spec.md + seed the conventions ledger. |
|
|
12
12
|
| Temper | `/rite-temper` | _Optional, before define._ Strategic review of the spec — scope mode (expand/selective/hold-rigor/reduce) + pre-mortem; hardens the spec. Best on big/risky features; mandatory in `/rite-autocomplete`. |
|
|
13
13
|
| Plan | `/rite-define` | Turn the approved spec into plan + vertical task slices + state. |
|
|
14
|
-
| Vet | `/rite-vet` |
|
|
14
|
+
| Vet | `/rite-vet` | _Required before build._ Review every plan — scope · architecture · tests · perf; light for simple/reversible, full for high stakes. |
|
|
15
15
|
| Re-plan | `/rite-plan` | The active plan is too big, wrong, stale, ambiguous, or blocked. |
|
|
16
16
|
| Build | `/rite-build` | Implement the next single vertical slice. Stops after one slice. |
|
|
17
17
|
| Converge | `/rite-converge` | _Recovery._ Code drifted from / falls short of intent (resumed cold, adopted, stalled build) — assess live code vs spec/plan/tasks and append the remaining work as new slices for `/rite-build`. |
|
|
@@ -27,10 +27,10 @@ what each command does or how phases connect.
|
|
|
27
27
|
## Typical orderings
|
|
28
28
|
|
|
29
29
|
- **Every feature**: `/rite-spec` (spec) → *(big feature? `/rite-temper` — strategic review)* →
|
|
30
|
-
`/rite-define` (plan) →
|
|
30
|
+
`/rite-define` (plan) → `/rite-vet` (engineering review; light or full) →
|
|
31
31
|
`/rite-build` ×N (all slices) → `/rite-prove` (once all built) →
|
|
32
32
|
`/rite-polish` (always: code + UI if UI) → `/rite-review` → `/rite-seal` → `/rite-ship`.
|
|
33
|
-
- **Existing codebase**: `/rite-adopt`
|
|
33
|
+
- **Existing codebase**: `/rite-adopt` → `/rite-define` → `/rite-vet` → build.
|
|
34
34
|
- **Drift mid-build**: stop → drift question → `/rite-plan` (repair) → resume build.
|
|
35
35
|
- **Resumed / adopted / stalled**: `/rite-converge` (assess live code vs intent → append the
|
|
36
36
|
remaining slices) → `/rite-build` ×N → continue at `/rite-prove`.
|
|
@@ -38,5 +38,5 @@ what each command does or how phases connect.
|
|
|
38
38
|
## Rules this menu obeys
|
|
39
39
|
|
|
40
40
|
- `/rite` never edits code or runs a phase workflow.
|
|
41
|
-
-
|
|
41
|
+
- Menu mode runs `devrites-engine first-task`; `/rite-status` owns workspace status.
|
|
42
42
|
- It suggests; the user (or Claude, when appropriate) invokes the real skill.
|
|
@@ -79,9 +79,8 @@ upholds invariants worth proposing as project principles (step 4a).
|
|
|
79
79
|
([`principles.md`](../devrites-lib/reference/standards/principles.md)). Propose, don't impose — an unratified candidate
|
|
80
80
|
stays a convention, not a gate. Skip cleanly when nothing rises to an invariant (common — a
|
|
81
81
|
fresh adopt may declare zero principles, and that's valid).
|
|
82
|
-
5. **Hand off.**
|
|
83
|
-
|
|
84
|
-
plan or build here.
|
|
82
|
+
5. **Hand off.** Spec and ledger are ready. Next: `/rite-temper` if big/risky,
|
|
83
|
+
else `/rite-define`; every plan then runs `/rite-vet` before build. Do not plan/build here.
|
|
85
84
|
**Completion:** one next rite is reported and no plan or application code was written.
|
|
86
85
|
|
|
87
86
|
> **Mid-flight discipline.** Don't invent conventions the code doesn't actually follow, don't
|
|
@@ -7,14 +7,13 @@ disable-model-invocation: true
|
|
|
7
7
|
|
|
8
8
|
# devrites-lib — internal shared helpers (not a command)
|
|
9
9
|
|
|
10
|
-
This is **not** a skill you run. It is
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
any workspace, with no install layout or script path to resolve.
|
|
10
|
+
This is **not** a skill you run. It is DevRites' manifest for shared references
|
|
11
|
+
and control-plane operations. Skills call `devrites-engine <command>` from any
|
|
12
|
+
workspace; no pack script path is required.
|
|
14
13
|
|
|
15
14
|
## Operations
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
These are selected `devrites-engine` contracts; `devrites-engine help` is exhaustive.
|
|
18
17
|
|
|
19
18
|
**Read-only — orient / gate (never mutate the workspace):**
|
|
20
19
|
|
|
@@ -76,7 +75,6 @@ devrites-engine progress
|
|
|
76
75
|
|
|
77
76
|
**Unified entrypoint (tool-agnostic):**
|
|
78
77
|
|
|
79
|
-
-
|
|
80
|
-
`
|
|
81
|
-
|
|
82
|
-
prose. See [`docs/cli.md`](../../../../docs/cli.md).
|
|
78
|
+
- `devrites-engine` is the shared CLI for agents, CI, and humans. The npm
|
|
79
|
+
`devrites` shim acquires it, owns install/update/uninstall bootstrap, and
|
|
80
|
+
proxies other commands.
|
|
@@ -59,9 +59,17 @@ Rules:
|
|
|
59
59
|
|
|
60
60
|
```text
|
|
61
61
|
Awaiting human: <qid> · <gate> · <slice/phase>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
|
|
63
|
+
Question
|
|
64
|
+
<question>
|
|
65
|
+
|
|
66
|
+
Recommended
|
|
67
|
+
1. <option 1 + short reason>
|
|
68
|
+
|
|
69
|
+
Other options
|
|
70
|
+
2. <option 2>
|
|
71
|
+
3. <option 3 if any>
|
|
72
|
+
|
|
65
73
|
Resume: /rite-resolve <qid> "<answer>"
|
|
66
74
|
Record: .devrites/work/<slug>/questions.md
|
|
67
75
|
↻ Hygiene: no /clear until the answer is persisted
|
package/pack/generated/claude/skills/devrites-lib/reference/standards/development-workflow.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Development workflow
|
|
2
2
|
|
|
3
|
-
Ship small, integrate often, keep the main branch releasable.
|
|
4
|
-
|
|
5
|
-
review → seal → ship) runs on top of.
|
|
3
|
+
Ship small, integrate often, keep the main branch releasable. DevRites runs this
|
|
4
|
+
lifecycle atop that loop: spec → define → vet → build → prove → polish → review → seal → ship.
|
|
6
5
|
|
|
7
6
|
## Work in small batches
|
|
8
7
|
- Break work into thin, independently shippable slices and integrate them frequently —
|
|
@@ -70,12 +70,10 @@ Both forms hit the same skill — the menu form for discovery, the `/rite-<verb>
|
|
|
70
70
|
the now-active feature. It is cheap context-switching only — no re-spec, no phase run. If
|
|
71
71
|
the workspace is missing, list the slugs under `.devrites/work/` and stop.
|
|
72
72
|
|
|
73
|
-
`guide` is
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
every phase — the small change is what makes the full ceremony affordable to watch. Pause
|
|
78
|
-
at each boundary for the user's go-ahead. Teach without lecturing.
|
|
73
|
+
`guide` is an inline first-feature walkthrough. Agree on one **real, genuinely small**
|
|
74
|
+
change, then run spec → temper → define → vet → build → prove → polish → review → seal →
|
|
75
|
+
ship. Before each phase, say what it decides; after, name what it wrote and why. Pause at
|
|
76
|
+
every boundary. Teach without lecturing.
|
|
79
77
|
|
|
80
78
|
Specialist triggers (model-invoked inside the above):
|
|
81
79
|
`devrites-frontend-craft` (UI) · `devrites-browser-proof` (UI verify) ·
|
|
@@ -106,9 +104,10 @@ SPEC /rite spec ≡ /rite-spec investigate deep
|
|
|
106
104
|
ADOPT /rite adopt ≡ /rite-adopt onboard existing code → reverse-derive spec.md + seed conventions
|
|
107
105
|
TEMPER /rite temper ≡ /rite-temper optional — strategic review: scope mode + pre-mortem, harden the spec
|
|
108
106
|
PLAN /rite define ≡ /rite-define turn the spec into plan + task slices + state
|
|
109
|
-
VET /rite vet ≡ /rite-vet
|
|
107
|
+
VET /rite vet ≡ /rite-vet mandatory every plan — light/full engineering review by stakes
|
|
110
108
|
REPLAN /rite plan ≡ /rite-plan decompose / reslice / repair an active plan
|
|
111
109
|
BUILD /rite build ≡ /rite-build implement exactly one verified vertical slice, then stop
|
|
110
|
+
CONVERGE /rite converge ≡ /rite-converge recovery — append work needed to meet intent
|
|
112
111
|
PROVE /rite prove ≡ /rite-prove tests + build + runtime + browser evidence
|
|
113
112
|
POLISH /rite polish ≡ /rite-polish code polish always; UI normalize + polish if UI
|
|
114
113
|
REVIEW /rite review ≡ /rite-review feature-scoped multi-axis review
|
|
@@ -7,11 +7,11 @@ what each command does or how phases connect.
|
|
|
7
7
|
|
|
8
8
|
| Phase | Command | Use when |
|
|
9
9
|
|---|---|---|
|
|
10
|
-
| Spec | `/rite-spec <feature>` | **
|
|
10
|
+
| Spec | `/rite-spec <feature>` | **New feature.** Investigate deeply → write spec.md. Asks with options; gathers attached design references (optional). |
|
|
11
11
|
| Adopt | `/rite-adopt` | Onboard an existing codebase instead of starting fresh — reverse-derive spec.md + seed the conventions ledger. |
|
|
12
12
|
| Temper | `/rite-temper` | _Optional, before define._ Strategic review of the spec — scope mode (expand/selective/hold-rigor/reduce) + pre-mortem; hardens the spec. Best on big/risky features; mandatory in `/rite-autocomplete`. |
|
|
13
13
|
| Plan | `/rite-define` | Turn the approved spec into plan + vertical task slices + state. |
|
|
14
|
-
| Vet | `/rite-vet` |
|
|
14
|
+
| Vet | `/rite-vet` | _Required before build._ Review every plan — scope · architecture · tests · perf; light for simple/reversible, full for high stakes. |
|
|
15
15
|
| Re-plan | `/rite-plan` | The active plan is too big, wrong, stale, ambiguous, or blocked. |
|
|
16
16
|
| Build | `/rite-build` | Implement the next single vertical slice. Stops after one slice. |
|
|
17
17
|
| Converge | `/rite-converge` | _Recovery._ Code drifted from / falls short of intent (resumed cold, adopted, stalled build) — assess live code vs spec/plan/tasks and append the remaining work as new slices for `/rite-build`. |
|
|
@@ -27,10 +27,10 @@ what each command does or how phases connect.
|
|
|
27
27
|
## Typical orderings
|
|
28
28
|
|
|
29
29
|
- **Every feature**: `/rite-spec` (spec) → *(big feature? `/rite-temper` — strategic review)* →
|
|
30
|
-
`/rite-define` (plan) →
|
|
30
|
+
`/rite-define` (plan) → `/rite-vet` (engineering review; light or full) →
|
|
31
31
|
`/rite-build` ×N (all slices) → `/rite-prove` (once all built) →
|
|
32
32
|
`/rite-polish` (always: code + UI if UI) → `/rite-review` → `/rite-seal` → `/rite-ship`.
|
|
33
|
-
- **Existing codebase**: `/rite-adopt`
|
|
33
|
+
- **Existing codebase**: `/rite-adopt` → `/rite-define` → `/rite-vet` → build.
|
|
34
34
|
- **Drift mid-build**: stop → drift question → `/rite-plan` (repair) → resume build.
|
|
35
35
|
- **Resumed / adopted / stalled**: `/rite-converge` (assess live code vs intent → append the
|
|
36
36
|
remaining slices) → `/rite-build` ×N → continue at `/rite-prove`.
|
|
@@ -38,5 +38,5 @@ what each command does or how phases connect.
|
|
|
38
38
|
## Rules this menu obeys
|
|
39
39
|
|
|
40
40
|
- `/rite` never edits code or runs a phase workflow.
|
|
41
|
-
-
|
|
41
|
+
- Menu mode runs `devrites-engine first-task`; `/rite-status` owns workspace status.
|
|
42
42
|
- It suggests; the user (or Claude, when appropriate) invokes the real skill.
|
|
@@ -79,9 +79,8 @@ upholds invariants worth proposing as project principles (step 4a).
|
|
|
79
79
|
([`principles.md`](../devrites-lib/reference/standards/principles.md)). Propose, don't impose — an unratified candidate
|
|
80
80
|
stays a convention, not a gate. Skip cleanly when nothing rises to an invariant (common — a
|
|
81
81
|
fresh adopt may declare zero principles, and that's valid).
|
|
82
|
-
5. **Hand off.**
|
|
83
|
-
|
|
84
|
-
plan or build here.
|
|
82
|
+
5. **Hand off.** Spec and ledger are ready. Next: `/rite-temper` if big/risky,
|
|
83
|
+
else `/rite-define`; every plan then runs `/rite-vet` before build. Do not plan/build here.
|
|
85
84
|
**Completion:** one next rite is reported and no plan or application code was written.
|
|
86
85
|
|
|
87
86
|
> **Mid-flight discipline.** Don't invent conventions the code doesn't actually follow, don't
|
|
@@ -19,14 +19,13 @@ This is the Codex mirror of a DevRites skill. In Codex:
|
|
|
19
19
|
|
|
20
20
|
# devrites-lib — internal shared helpers (not a command)
|
|
21
21
|
|
|
22
|
-
This is **not** a skill you run. It is
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
any workspace, with no install layout or script path to resolve.
|
|
22
|
+
This is **not** a skill you run. It is DevRites' manifest for shared references
|
|
23
|
+
and control-plane operations. Skills call `devrites-engine <command>` from any
|
|
24
|
+
workspace; no pack script path is required.
|
|
26
25
|
|
|
27
26
|
## Operations
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
These are selected `devrites-engine` contracts; `devrites-engine help` is exhaustive.
|
|
30
29
|
|
|
31
30
|
**Read-only — orient / gate (never mutate the workspace):**
|
|
32
31
|
|
|
@@ -88,7 +87,6 @@ devrites-engine progress
|
|
|
88
87
|
|
|
89
88
|
**Unified entrypoint (tool-agnostic):**
|
|
90
89
|
|
|
91
|
-
-
|
|
92
|
-
`
|
|
93
|
-
|
|
94
|
-
prose. See [`docs/cli.md`](../../../../docs/cli.md).
|
|
90
|
+
- `devrites-engine` is the shared CLI for agents, CI, and humans. The npm
|
|
91
|
+
`devrites` shim acquires it, owns install/update/uninstall bootstrap, and
|
|
92
|
+
proxies other commands.
|
|
@@ -59,9 +59,17 @@ Rules:
|
|
|
59
59
|
|
|
60
60
|
```text
|
|
61
61
|
Awaiting human: <qid> · <gate> · <slice/phase>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
|
|
63
|
+
Question
|
|
64
|
+
<question>
|
|
65
|
+
|
|
66
|
+
Recommended
|
|
67
|
+
1. <option 1 + short reason>
|
|
68
|
+
|
|
69
|
+
Other options
|
|
70
|
+
2. <option 2>
|
|
71
|
+
3. <option 3 if any>
|
|
72
|
+
|
|
65
73
|
Resume: $rite-resolve <qid> "<answer>"
|
|
66
74
|
Record: .devrites/work/<slug>/questions.md
|
|
67
75
|
↻ Hygiene: no /clear until the answer is persisted
|
package/pack/generated/codex/skills/devrites-lib/reference/standards/development-workflow.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Development workflow
|
|
2
2
|
|
|
3
|
-
Ship small, integrate often, keep the main branch releasable.
|
|
4
|
-
|
|
5
|
-
review → seal → ship) runs on top of.
|
|
3
|
+
Ship small, integrate often, keep the main branch releasable. DevRites runs this
|
|
4
|
+
lifecycle atop that loop: spec → define → vet → build → prove → polish → review → seal → ship.
|
|
6
5
|
|
|
7
6
|
## Work in small batches
|
|
8
7
|
- Break work into thin, independently shippable slices and integrate them frequently —
|
|
@@ -82,12 +82,10 @@ Both forms hit the same skill — the menu form for discovery, the `/rite-<verb>
|
|
|
82
82
|
the now-active feature. It is cheap context-switching only — no re-spec, no phase run. If
|
|
83
83
|
the workspace is missing, list the slugs under `.devrites/work/` and stop.
|
|
84
84
|
|
|
85
|
-
`guide` is
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
every phase — the small change is what makes the full ceremony affordable to watch. Pause
|
|
90
|
-
at each boundary for the user's go-ahead. Teach without lecturing.
|
|
85
|
+
`guide` is an inline first-feature walkthrough. Agree on one **real, genuinely small**
|
|
86
|
+
change, then run spec → temper → define → vet → build → prove → polish → review → seal →
|
|
87
|
+
ship. Before each phase, say what it decides; after, name what it wrote and why. Pause at
|
|
88
|
+
every boundary. Teach without lecturing.
|
|
91
89
|
|
|
92
90
|
Specialist triggers (model-invoked inside the above):
|
|
93
91
|
`devrites-frontend-craft` (UI) · `devrites-browser-proof` (UI verify) ·
|
|
@@ -118,9 +116,10 @@ SPEC $rite spec ≡ $rite-spec investigate deep
|
|
|
118
116
|
ADOPT $rite adopt ≡ $rite-adopt onboard existing code → reverse-derive spec.md + seed conventions
|
|
119
117
|
TEMPER $rite temper ≡ $rite-temper optional — strategic review: scope mode + pre-mortem, harden the spec
|
|
120
118
|
PLAN $rite define ≡ $rite-define turn the spec into plan + task slices + state
|
|
121
|
-
VET $rite vet ≡ $rite-vet
|
|
119
|
+
VET $rite vet ≡ $rite-vet mandatory every plan — light/full engineering review by stakes
|
|
122
120
|
REPLAN $rite plan ≡ $rite-plan decompose / reslice / repair an active plan
|
|
123
121
|
BUILD $rite build ≡ $rite-build implement exactly one verified vertical slice, then stop
|
|
122
|
+
CONVERGE $rite converge ≡ $rite-converge recovery — append work needed to meet intent
|
|
124
123
|
PROVE $rite prove ≡ $rite-prove tests + build + runtime + browser evidence
|
|
125
124
|
POLISH $rite polish ≡ $rite-polish code polish always; UI normalize + polish if UI
|
|
126
125
|
REVIEW $rite review ≡ $rite-review feature-scoped multi-axis review
|
|
@@ -7,11 +7,11 @@ what each command does or how phases connect.
|
|
|
7
7
|
|
|
8
8
|
| Phase | Command | Use when |
|
|
9
9
|
|---|---|---|
|
|
10
|
-
| Spec | `$rite-spec <feature>` | **
|
|
10
|
+
| Spec | `$rite-spec <feature>` | **New feature.** Investigate deeply → write spec.md. Asks with options; gathers attached design references (optional). |
|
|
11
11
|
| Adopt | `$rite-adopt` | Onboard an existing codebase instead of starting fresh — reverse-derive spec.md + seed the conventions ledger. |
|
|
12
12
|
| Temper | `$rite-temper` | _Optional, before define._ Strategic review of the spec — scope mode (expand/selective/hold-rigor/reduce) + pre-mortem; hardens the spec. Best on big/risky features; mandatory in `$rite-autocomplete`. |
|
|
13
13
|
| Plan | `$rite-define` | Turn the approved spec into plan + vertical task slices + state. |
|
|
14
|
-
| Vet | `$rite-vet` |
|
|
14
|
+
| Vet | `$rite-vet` | _Required before build._ Review every plan — scope · architecture · tests · perf; light for simple/reversible, full for high stakes. |
|
|
15
15
|
| Re-plan | `$rite-plan` | The active plan is too big, wrong, stale, ambiguous, or blocked. |
|
|
16
16
|
| Build | `$rite-build` | Implement the next single vertical slice. Stops after one slice. |
|
|
17
17
|
| Converge | `$rite-converge` | _Recovery._ Code drifted from / falls short of intent (resumed cold, adopted, stalled build) — assess live code vs spec/plan/tasks and append the remaining work as new slices for `$rite-build`. |
|
|
@@ -27,10 +27,10 @@ what each command does or how phases connect.
|
|
|
27
27
|
## Typical orderings
|
|
28
28
|
|
|
29
29
|
- **Every feature**: `$rite-spec` (spec) → *(big feature? `$rite-temper` — strategic review)* →
|
|
30
|
-
`$rite-define` (plan) →
|
|
30
|
+
`$rite-define` (plan) → `$rite-vet` (engineering review; light or full) →
|
|
31
31
|
`$rite-build` ×N (all slices) → `$rite-prove` (once all built) →
|
|
32
32
|
`$rite-polish` (always: code + UI if UI) → `$rite-review` → `$rite-seal` → `$rite-ship`.
|
|
33
|
-
- **Existing codebase**: `$rite-adopt`
|
|
33
|
+
- **Existing codebase**: `$rite-adopt` → `$rite-define` → `$rite-vet` → build.
|
|
34
34
|
- **Drift mid-build**: stop → drift question → `$rite-plan` (repair) → resume build.
|
|
35
35
|
- **Resumed / adopted / stalled**: `$rite-converge` (assess live code vs intent → append the
|
|
36
36
|
remaining slices) → `$rite-build` ×N → continue at `$rite-prove`.
|
|
@@ -38,5 +38,5 @@ what each command does or how phases connect.
|
|
|
38
38
|
## Rules this menu obeys
|
|
39
39
|
|
|
40
40
|
- `$rite` never edits code or runs a phase workflow.
|
|
41
|
-
-
|
|
41
|
+
- Menu mode runs `devrites-engine first-task`; `$rite-status` owns workspace status.
|
|
42
42
|
- It suggests; the user (or Claude, when appropriate) invokes the real skill.
|
|
@@ -91,9 +91,8 @@ upholds invariants worth proposing as project principles (step 4a).
|
|
|
91
91
|
([`principles.md`](../devrites-lib/reference/standards/principles.md)). Propose, don't impose — an unratified candidate
|
|
92
92
|
stays a convention, not a gate. Skip cleanly when nothing rises to an invariant (common — a
|
|
93
93
|
fresh adopt may declare zero principles, and that's valid).
|
|
94
|
-
5. **Hand off.**
|
|
95
|
-
|
|
96
|
-
plan or build here.
|
|
94
|
+
5. **Hand off.** Spec and ledger are ready. Next: `$rite-temper` if big/risky,
|
|
95
|
+
else `$rite-define`; every plan then runs `$rite-vet` before build. Do not plan/build here.
|
|
97
96
|
**Completion:** one next rite is reported and no plan or application code was written.
|
|
98
97
|
|
|
99
98
|
> **Mid-flight discipline.** Don't invent conventions the code doesn't actually follow, don't
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devrites",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "DevRites — disciplined senior-engineer workflow skills pack for Claude Code and Codex",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://github.com/ViktorsBaikers/DevRites#readme",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"test:fast": "node scripts/run-tests.mjs --fast",
|
|
55
55
|
"test:parallel": "node scripts/run-tests.mjs",
|
|
56
56
|
"test:serial": "node scripts/run-tests.mjs --serial",
|
|
57
|
+
"audit": "npm audit --audit-level=moderate",
|
|
57
58
|
"size:baseline": "node scripts/check-instruction-size-baseline.mjs --write",
|
|
58
59
|
"release": "semantic-release",
|
|
59
60
|
"release:dry": "semantic-release --dry-run --no-ci"
|
|
@@ -7,6 +7,7 @@ const root = new URL('..', import.meta.url).pathname.replace(/\/$/, '');
|
|
|
7
7
|
const skillsDir = join(root, 'pack', '.claude', 'skills');
|
|
8
8
|
const docsSkills = join(root, 'docs', 'skills.md');
|
|
9
9
|
const docsCommandMap = join(root, 'docs', 'command-map.md');
|
|
10
|
+
const docsFlow = join(root, 'docs', 'flow.md');
|
|
10
11
|
const readme = join(root, 'README.md');
|
|
11
12
|
const arch = join(root, 'docs', 'architecture.md');
|
|
12
13
|
|
|
@@ -82,6 +83,17 @@ function assertPublicSkillLinks(path, label) {
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
function assertPublicSkillMentions(path, label) {
|
|
87
|
+
const text = readFileSync(path, 'utf8');
|
|
88
|
+
for (const skill of skills.filter((s) => s.invocable === 'true')) {
|
|
89
|
+
const escaped = skill.name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
90
|
+
const token = new RegExp(`(^|[^a-z0-9-])${escaped}([^a-z0-9-]|$)`, 'im');
|
|
91
|
+
if (!token.test(text)) {
|
|
92
|
+
fail(`${relative(root, path)}: missing ${label} entry for ${skill.name}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
85
97
|
assertDocContains(docsSkills, `# All ${total} skills`, 'total skill heading');
|
|
86
98
|
assertDocContains(docsSkills, `**${total} skills total**`, 'total skill prose');
|
|
87
99
|
assertDocContains(docsSkills, `${publicRiteCount} user-invocable \`rite-*\``, 'public rite-* count');
|
|
@@ -90,9 +102,15 @@ assertDocContains(docsSkills, 'npx devrites', 'npx distribution contract');
|
|
|
90
102
|
assertDocContains(docsCommandMap, 'npx devrites', 'npx distribution contract');
|
|
91
103
|
assertDocContains(readme, `**${total} skills total**`, 'README total skill prose');
|
|
92
104
|
assertDocContains(readme, `# skills/ ${total} skills`, 'README layout total count');
|
|
105
|
+
assertDocContains(readme, `— ${publicCount} public + ${internalCount} internal`, 'README public/internal count');
|
|
93
106
|
assertDocContains(arch, `${publicRiteCount} public \`rite-*\` skills (${total} total)`, 'architecture surface count');
|
|
107
|
+
assertDocContains(docsFlow, `— ${publicCount} skills`, 'flow public count');
|
|
108
|
+
assertDocContains(docsFlow, `— ${internalCount} skills`, 'flow internal count');
|
|
94
109
|
assertPublicSkillLinks(docsSkills, 'skills catalogue');
|
|
95
110
|
assertPublicSkillLinks(docsCommandMap, 'command map');
|
|
111
|
+
assertPublicSkillMentions(readme, 'README catalogue');
|
|
112
|
+
assertPublicSkillMentions(docsFlow, 'flow namespace');
|
|
113
|
+
assertPublicSkillMentions(arch, 'architecture surface');
|
|
96
114
|
|
|
97
115
|
console.log(`skills total: ${total}`);
|
|
98
116
|
console.log(`public skills: ${publicCount}`);
|