devrites 3.0.4 → 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.
Files changed (41) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/README.md +55 -43
  3. package/SECURITY.md +72 -58
  4. package/docs/agents/issue-driven-rites.md +5 -5
  5. package/docs/architecture.md +61 -45
  6. package/docs/capability-surface-selection.md +3 -1
  7. package/docs/cli.md +9 -2
  8. package/docs/command-map.md +6 -2
  9. package/docs/engine/agent-contract.md +5 -3
  10. package/docs/engine/commands.md +27 -14
  11. package/docs/engine/state-schema.md +8 -4
  12. package/docs/engine/workspace-schema.md +5 -4
  13. package/docs/flow.md +18 -7
  14. package/docs/porting-to-a-new-harness.md +6 -2
  15. package/docs/release.md +10 -9
  16. package/docs/skills.md +1 -1
  17. package/docs/templates/CRITIC_REVIEW_PACKET_TEMPLATE.md +35 -0
  18. package/docs/usage.md +26 -16
  19. package/engine/internal/lib/packageexistence.go +729 -52
  20. package/engine/internal/lib/packageexistence_test.go +343 -0
  21. package/engine/internal/lib/util.go +1 -1
  22. package/pack/.claude/skills/devrites-lib/SKILL.md +7 -9
  23. package/pack/.claude/skills/devrites-lib/reference/reply-contract.md +11 -3
  24. package/pack/.claude/skills/devrites-lib/reference/standards/development-workflow.md +2 -3
  25. package/pack/.claude/skills/rite/SKILL.md +6 -7
  26. package/pack/.claude/skills/rite/reference/menu.md +5 -5
  27. package/pack/.claude/skills/rite-adopt/SKILL.md +2 -3
  28. package/pack/generated/claude/skills/devrites-lib/SKILL.md +7 -9
  29. package/pack/generated/claude/skills/devrites-lib/reference/reply-contract.md +11 -3
  30. package/pack/generated/claude/skills/devrites-lib/reference/standards/development-workflow.md +2 -3
  31. package/pack/generated/claude/skills/rite/SKILL.md +6 -7
  32. package/pack/generated/claude/skills/rite/reference/menu.md +5 -5
  33. package/pack/generated/claude/skills/rite-adopt/SKILL.md +2 -3
  34. package/pack/generated/codex/skills/devrites-lib/SKILL.md +7 -9
  35. package/pack/generated/codex/skills/devrites-lib/reference/reply-contract.md +11 -3
  36. package/pack/generated/codex/skills/devrites-lib/reference/standards/development-workflow.md +2 -3
  37. package/pack/generated/codex/skills/rite/SKILL.md +6 -7
  38. package/pack/generated/codex/skills/rite/reference/menu.md +5 -5
  39. package/pack/generated/codex/skills/rite-adopt/SKILL.md +2 -3
  40. package/package.json +1 -1
  41. package/scripts/skills-inventory.mjs +18 -0
@@ -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 the manifest for DevRites'
23
- cross-cutting helper operations, each exposed as a subcommand of the global
24
- `devrites` binary. A skill invokes one as `devrites <op>` — the same call from
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
- Each is a subcommand of the global `devrites` binary, run as `devrites <op>`.
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
- - The `devrites` binary is that unified CLI, dispatching to all of the above (`orient` / `ready` /
92
- `evidence-fresh` / `acceptance` / `spec-validate` / `tick-afk` / `resolve` / `close` /
93
- `active` / `list` / `use`), so any agent or human can drive `.devrites/` without the skill
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
- Question: <one-line question>
63
- Recommended: <option 1 + short reason>
64
- Options: <2-4 compact choices, if already generated>
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. This is the general
4
- engineering loop the DevRites feature lifecycle (spec → define → build → prove → polish →
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 also inline — a first-feature walkthrough that teaches the lifecycle by running
86
- it. Agree on one **real, genuinely small** change, then dispatch the normal phases in order
87
- (spec define build prove seal ship). Per phase, exactly two narration beats:
88
- before, what it will decide; after, what it wrote in `.devrites/work/<slug>/` and why. Walk
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 optional engineering plan review: scope · architecture · tests · perf, harden the plan
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>` | **Start here.** Investigate deeply → write spec.md. Asks you with options; gathers any design references you attach (optional). |
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` | _Optional, before build._ Engineering review of the plan — scope · architecture · tests · perf; hardens the plan. Best on big/risky features; mandatory in `$rite-autocomplete`. |
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) → *(big feature? `$rite-vet` engineering review)*
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` (onboard spec.md + conventions) continue at `$rite-define`.
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
- - It reads `.devrites/ACTIVE` and `state.md` for status only.
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.** The project is now in the lifecycle with a spec and a head-start ledger.
95
- Point the user at `$rite-temper` (big/risky) or `$rite-define` (straightforward) do not
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.4",
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",
@@ -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}`);