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
@@ -1,9 +1,11 @@
1
1
  # DevRites Architecture
2
2
 
3
- DevRites is a **distributed but coordinated** set of project-local Claude Code skills
4
- that make an AI coding agent behave like a disciplined senior engineer: clarify
5
- spec+plan build one verified slice prove with evidence polishreview → seal →
6
- ship.
3
+ DevRites is a **distributed but coordinated** set of project-local Claude Code
4
+ and Codex skill surfaces backed by one Go control plane. It makes an AI coding
5
+ agent behave like a disciplined senior engineer: framespecoptional temper
6
+ → define → mandatory vet → build one verified slice → prove with evidence →
7
+ polish → review → seal → ship. `converge` is the recovery state when live code
8
+ and recorded intent need to meet again.
7
9
 
8
10
  For the `.devrites/` load order, file budgets, artifact schema, aliases,
9
11
  traceability rules, and phase-relative completeness model, see
@@ -11,20 +13,25 @@ traceability rules, and phase-relative completeness model, see
11
13
 
12
14
  ## Layers
13
15
 
14
- 1. **Public workflow skills** — `.claude/skills/rite-*`, `user-invocable: true`. Each
15
- owns exactly one phase and reads/writes the `.devrites/` workspace.
16
- Sequence: `rite-spec`, `rite-define`, `rite-plan`, `rite-build`,
17
- `rite-prove`, `rite-polish`, `rite-review`, `rite-seal`, `rite-ship`,
18
- plus the read-only `rite-status`, the resume verb `rite-resolve` (answer
19
- a HITL gate and clear `Awaiting human`), and the thin `/rite` menu.
16
+ 1. **Public lifecycle and workspace skills** — `.claude/skills/rite-*`,
17
+ `user-invocable: true`. Each owns one bounded phase or workspace transition.
18
+ Sequence: `rite-spec`, optional `rite-temper`, `rite-define`, mandatory
19
+ `rite-vet`, `rite-build`, recovery `rite-converge`, `rite-prove`,
20
+ `rite-polish`, `rite-review`, `rite-seal`, `rite-ship`; `rite-plan` repairs
21
+ or reslices an active plan,
22
+ plus the resume verb `rite-resolve` (answer a HITL gate and clear
23
+ `Awaiting human`). The thin `/rite` menu and read-only `rite-status` live in
24
+ the public utility layer below.
20
25
  `/rite-seal` **decides** GO/NO-GO and writes the verdict to `seal.md`;
21
- `/rite-ship` is the eighth lifecycle phase that **executes** the
26
+ `/rite-ship` is the eighth core lifecycle rite that **executes** the
22
27
  irreversible git ladder and **closes** the task (archives the workspace,
23
28
  clears `ACTIVE`). Keeping the decision and the irreversible action as two
24
29
  separately-auditable steps is the point.
25
- 2. **Public utility skills** — `.claude/skills/rite-zoom-out`,
26
- `rite-prototype`, `rite-handoff`, `rite-pressure-test`, `rite-pov`,
27
- `rite-dogfood`, `rite-pr-feedback`, and `rite-autocomplete` — public commands. `rite-autocomplete` is the
30
+ 2. **Public utility and on-ramp skills** — `rite-adopt`, `rite-quick`,
31
+ `rite-frame`, `rite-status`, `rite-doctor`, `rite-learn`, `rite-explain`,
32
+ `rite-customize`, `rite-zoom-out`, `rite-prototype`, `rite-handoff`,
33
+ `rite-pressure-test`, `rite-pov`, `rite-dogfood`, `rite-pr-feedback`, and
34
+ `rite-autocomplete` — public commands. `rite-autocomplete` is the
28
35
  unattended orchestrator: it drives the whole lifecycle (spec → … → seal →
29
36
  ship) end-to-end, choosing the best option at each soft gate, pausing only
30
37
  on hard irreversible-risk / blocking / escalating gates or a NO-GO. The
@@ -37,16 +44,17 @@ traceability rules, and phase-relative completeness model, see
37
44
  `-doubt`, `-ux-shape` (plans UX/UI into `design-brief.md` at `/rite-spec`),
38
45
  `-frontend-craft`, `-browser-proof`, `-debug-recovery`,
39
46
  `-api-interface`, `-audit` (dispatches the security / perf / simplify
40
- reviewer subagent on an axis argument). Model-invoked by public skills
41
- or Claude's auto-selection; not menu noise. Whether a skill is public or
47
+ reviewer subagent on an axis argument), `-prose-craft`, and
48
+ `-refresh-indexes`. These 11 specialists are model-invoked by public skills
49
+ or host auto-selection; not menu noise. Whether a skill is public or
42
50
  internal is governed by the `user-invocable:` flag, not by the name
43
51
  prefix.
44
52
 
45
53
  Engineering rules live at `.claude/skills/devrites-lib/reference/standards/`.
46
54
  Workspace-operating lifecycle rites load `core.md` first and disclose phase-specific
47
- files on demand; compact utilities keep a narrower local contract. Parallel reviewer fan-out at
48
- `/rite-seal` is a reference file
49
- (`rite-seal/reference/parallel-dispatch.md`), not a skill.
55
+ files on demand; compact utilities keep a narrower local contract. Parallel
56
+ reviewer fan-out at `/rite-seal` is the shared reference file
57
+ `devrites-lib/reference/parallel-dispatch.md`, not a skill.
50
58
  4. **Supporting references** — `reference/*.md` inside each skill. Long checklists,
51
59
  templates, and anti-rationalization tables loaded on demand (progressive
52
60
  disclosure) so `SKILL.md` bodies stay small.
@@ -131,17 +139,19 @@ Built-in / bundled Claude Code commands include `/plan`, `/review`, `/run`, `/ve
131
139
  `rite-` prefix avoids all of them. (Collision audit: `research/claude-code-skills-notes.md`.)
132
140
 
133
141
  ### Why a thin menu skill, not a mega-router
134
- `/rite` is **only** an entrypoint: it shows a compact phase-grouped menu, prints live
135
- `.devrites/ACTIVE` status via `` !`cmd` `` injection, and suggests the next command.
136
- It deliberately does **not** execute workflows or duplicate skill logic that would
137
- recreate the mega-command problem. DevRites keeps selection thin and lets each phase
138
- own its context, rather than centralizing every workflow behind one command.
142
+ `/rite` is **only** an entrypoint: it shows a compact phase-grouped menu, prints
143
+ recommended-start guidance from `devrites-engine first-task`, and dispatches a
144
+ named verb to its owning skill. Menu mode does not read raw workspace state;
145
+ `/rite-status` owns detailed status. `/rite` deliberately does **not** duplicate
146
+ workflow logic that would recreate the mega-command problem. DevRites keeps
147
+ selection thin and lets each phase own its context.
139
148
 
140
149
  ### Why internal skills exist
141
150
  Specialist processes (doubt, source-driven, frontend craft, browser proof, audits)
142
- are **disciplines**, not user commands. As `user-invocable: false` skills they:
151
+ are **disciplines**, not user commands. As `user-invocable: false` specialist
152
+ skills they:
143
153
  - stay out of the command menu (less cognitive load);
144
- - are invoked automatically by Claude or explicitly by a public skill when their
154
+ - are invoked automatically by the host model or explicitly by a public skill when their
145
155
  trigger conditions hit;
146
156
  - keep each public `SKILL.md` small by housing the heavy process elsewhere.
147
157
 
@@ -165,8 +175,8 @@ and `rite-polish-ui` sub-skills, but a skill-on-skill dispatch is fragile
165
175
  (the caller has to re-discover the callee by description) and the two halves
166
176
  share the same operating rules. They now live as `reference/code.md` and
167
177
  `reference/ui.md` inside the same skill, loaded only when their phase
168
- trigger fires — the canonical progressive-disclosure pattern from
169
- <https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices>.
178
+ trigger fires — the supporting-files pattern from Claude Code's current
179
+ [skills reference](https://code.claude.com/docs/en/slash-commands#add-supporting-files).
170
180
  `/rite-polish` is the orchestrator: always reads `reference/code.md`
171
181
  (Phase 1 + 2), detects UI scope from the diff and reads `reference/ui.md`
172
182
  (Phase 3 + 4) when needed. The orchestrator accepts mode tokens (`bolder`,
@@ -182,7 +192,7 @@ Deciding "is this safe to ship" and *actually shipping* are different acts with
182
192
  different blast radii. `/rite-seal` is a **pure decision gate**: it walks acceptance
183
193
  against evidence, fans out the fresh-context reviewers, and writes the GO / NO-GO
184
194
  verdict to `seal.md` — it runs no git. On GO it sets `state.md` `Next step:
185
- /rite-ship` and stops. `/rite-ship` is the eighth lifecycle phase: it refuses to run
195
+ /rite-ship` and stops. `/rite-ship` is the eighth core lifecycle rite: it refuses to run
186
196
  without a GO recorded in `seal.md`, renders the type-`GO` prompt, runs the irreversible
187
197
  git ladder (commit → push → tag/PR per the project's convention), writes `ship.md`,
188
198
  then **closes the task** — sets phase `done` and archives `.devrites/work/<slug>/` →
@@ -192,8 +202,9 @@ decision and the irreversible action as two separately-auditable steps is the po
192
202
 
193
203
  ### Why `/rite-autocomplete` exists (the unattended orchestrator)
194
204
  Some features are routine enough to run end-to-end without per-phase human iteration.
195
- `/rite-autocomplete` drives the whole lifecycle (spec → definebuild×Nprove
196
- polish → review → seal → ship) by reading each phase's `SKILL.md` and executing its
205
+ `/rite-autocomplete` drives the whole lifecycle (spec → temperdefinevet
206
+ build×N → prove → polish → review → seal → ship) by reading each phase's
207
+ `SKILL.md` and executing its
197
208
  workflow, carrying state through the workspace files rather than chat. A vague prompt
198
209
  triggers an up-front `devrites-interview` — the only interactive window — after which it
199
210
  runs unattended, choosing the best option at each soft gate and recording the rationale
@@ -247,15 +258,18 @@ contract.
247
258
  lens + `rite-adopt` (onboard an existing codebase) + `rite-learn` (cross-feature
248
259
  lessons) + `rite-status` + `rite-doctor` (install health) +
249
260
  `rite-customize` (project-local overrides/extensions) +
261
+ `rite-explain` (grounded concept/diff/idea/recap explanation) +
250
262
  `rite-pov` (external-option verdicts) + `rite-dogfood` (browser QA) +
251
263
  `rite-pr-feedback` (review-thread closure) +
252
- the `rite-plan` replan verb + the `rite-resolve` resume verb + 4 ideation /
264
+ the `rite-plan` replan verb + `rite-converge` recovery + the `rite-resolve`
265
+ resume verb + 4 ideation /
253
266
  handoff utilities (`rite-zoom-out`, `rite-prototype`, `rite-handoff`,
254
267
  `rite-pressure-test`) + `rite-autocomplete` (the unattended full-lifecycle
255
268
  orchestrator) — plus 11 internal model-invoked `devrites-*` specialists and the
256
269
  `devrites-lib` library, not one mega-command. The `devrites-` prefix is a
257
270
  namespace (collision avoidance), not a public/internal marker —
258
- `user-invocable:` is. All `devrites-*` skills are model-invoked.
271
+ `user-invocable:` is. The 11 specialists are model-invoked;
272
+ `devrites-lib` explicitly disables model invocation.
259
273
  - **Selection**: the `/rite` menu skill carries the routing table; every
260
274
  workflow skill enforces a "right skill, right time" rule in its body.
261
275
  - **State**: durable `.devrites/` Markdown that survives compaction and new sessions.
@@ -267,21 +281,22 @@ contract.
267
281
  - **Slice rule**: build **one vertical slice, then stop** — no auto-continue.
268
282
  - **Drift**: an explicit **Spec Drift Guard** in build/prove/polish/review/seal.
269
283
  - **Design**: `devrites-frontend-craft` + a four-phase `/rite-polish` orchestrator (code + backend always; UI normalize + polish when UI is in scope).
270
- - **Review**: **feature-scoped** five-axis review with severity labels + fresh-context
271
- subagents at the seal.
284
+ - **Review**: **feature-scoped** multi-axis review with severity labels +
285
+ fresh-context subagents at the seal.
272
286
  - **Scope**: clarify → seal (decide) → ship (the irreversible git ladder —
273
287
  commit → push → tag/PR — per the project's own convention) → close; the CI
274
288
  pipeline stays with the project.
275
- - **Install**: project-local, manifest-managed; ships DevRites' own engineering rules.
289
+ - **Install**: project-local, manifest-managed host artifacts; the optional
290
+ shared engine binary is the sole sanctioned global artifact.
276
291
 
277
292
  ## Deviations from the original build brief (and why)
278
293
 
279
- 1. **`user-invocable` semantics corrected from the docs.** The brief said set
280
- `user-invocable: true` for public and `false` for internal. That is exactly right
281
- for internal skills. For public skills we keep them model-invocable (no
282
- `disable-model-invocation`) so phases can hand off and the selector can route;
283
- per-phase side-effect discipline (e.g. "stop after one slice") is enforced in the
284
- skill **body**, which is the correct mechanism (invocation flags can't express it).
294
+ 1. **Invocation semantics are explicit in frontmatter.** `user-invocable`
295
+ controls whether a skill is a public command; `disable-model-invocation`
296
+ independently marks explicit-only public utilities and the internal
297
+ `devrites-lib` library. Model-invocable phases can still hand off and route;
298
+ per-phase side-effect discipline (for example, "stop after one slice") is
299
+ enforced in the skill **body**, because invocation flags cannot express it.
285
300
  2. **`context: fork` used selectively.** Verified it is a real field (isolated
286
301
  subagent, body-as-prompt, no conversation history). It is applied only to the three
287
302
  self-contained read-only audit skills (`devrites-audit simplify`,
@@ -298,6 +313,7 @@ acceptance criteria.
298
313
  ## Repository layout
299
314
 
300
315
  See the top-level tree in `README.md` and the installed-target tree in `usage.md`.
301
- Source pack lives under `pack/.claude/` (skills, agents, and rules); the installer copies
302
- it into a target project's `.claude/`, including DevRites' engineering rules in
303
- `.claude/skills/devrites-lib/reference/standards/`.
316
+ The canonical source pack lives under `pack/.claude/` (skills, agents, rules,
317
+ and Claude hook wiring). The build renders `pack/generated/` host artifacts;
318
+ the installer writes Claude assets under project `.claude/` and Codex assets
319
+ under `.agents/`, `.codex/`, and the managed `AGENTS.md` block.
@@ -12,7 +12,9 @@ Pick the smallest surface that keeps the behavior deterministic:
12
12
 
13
13
  Rules:
14
14
 
15
- - Install and update through npm: `npx devrites ...`. No Claude/Codex plugin path.
15
+ - npm (`npx devrites ...`) is the canonical distribution path. The supported
16
+ `curl | bash` bootstrap exists for environments without Node; neither path is
17
+ a Claude/Codex plugin or marketplace install.
16
18
  - Prefer the engine for gates; prompts may call gates, not reimplement them.
17
19
  - Prefer scripts for repo-local release/build glue that is not part of the user contract.
18
20
  - Do not add a dependency for what the Go engine or shell can do in a few lines.
package/docs/cli.md CHANGED
@@ -9,6 +9,9 @@ project root.
9
9
 
10
10
  Install DevRites normally, then run the engine from the project root:
11
11
 
12
+ The examples below are a curated working set. `devrites-engine help` is the
13
+ exhaustive current command and hook inventory.
14
+
12
15
  ```bash
13
16
  devrites-engine preamble # workspace digest for the active feature
14
17
  devrites-engine snapshot [slug] # machine-readable workspace/status snapshot
@@ -19,8 +22,10 @@ devrites-engine ledger sync <dir> # fold a feature's spec deltas into the
19
22
  devrites-engine ledger list|show <cap> # read the ledger — what the system already does
20
23
  devrites-engine context show --json # report root, active workspace, and host command forms
21
24
  devrites-engine timeline log|list # append/list session events, decisions, and state moves
22
- devrites-engine health record|list # append/list compact workspace health history
25
+ devrites-engine health run # run known project checks + record a code-health dashboard
26
+ devrites-engine health record|list # append/list manual or dashboard health history
23
27
  devrites-engine review-fingerprints [slug] # stable IDs for review findings; --write saves JSONL
28
+ devrites-engine reviewer-stats report --json # direct structured reviewer-dispatch verdicts
24
29
  devrites-engine progress [slug] # compact phase/slice footer
25
30
  devrites-engine resolve <qid> "<answer>" # answer a HITL gate
26
31
  devrites-engine close-out <slug> # archive a shipped feature and clear ACTIVE
@@ -34,7 +39,9 @@ The AFK-parsed read commands (`status`, `readiness`, `seal`, `spec-validate`,
34
39
  structured JSON contract and emits `schemaVersion: devrites.workspace.v1`
35
40
  directly rather than wrapping human text. Snapshot consumers should read
36
41
  `nextCommands.claude` or `nextCommands.codex` for the current host instead of
37
- hardcoding a `/rite-*` or `$rite-*` command form.
42
+ hardcoding a `/rite-*` or `$rite-*` command form. `context show --json` and
43
+ `reviewer-stats report --json` are also direct structured reports rather than
44
+ envelopes.
38
45
 
39
46
  The npm `devrites` shim remains the installer/updater/uninstaller entry point and
40
47
  proxies these engine subcommands when `devrites-engine` is installed. Install and
@@ -54,7 +54,7 @@ must say who runs them.
54
54
  | Command | Phase | Argument | What it does | Reads | Writes |
55
55
  |---|---|---|---|---|---|
56
56
  | [`/rite`](../pack/.claude/skills/rite/SKILL.md) | menu | `[subcommand]` | Compact menu + suggested next command. Pure router; does **not** read state — that's `/rite-status`. | — | — |
57
- | [`/rite-spec`](../pack/.claude/skills/rite-spec/SKILL.md) | spec | `<feature>` | **Start here.** Deep investigation → writes a product-focused `spec.md` (WHAT/WHY, requirements, ACs, boundaries, gaps closed with options, design references). Checks the shipped archive for prior art before speccing. Creates the workspace map. | codebase + codegraph/graphify + shipped archive (`devrites-engine archive-search`) | `README.md`/`feature.md`, `brief.md`, `spec.md`, `references/`, `references.md`, `questions.md`, `decisions.md`, `assumptions.md`, `state.md` |
57
+ | [`/rite-spec`](../pack/.claude/skills/rite-spec/SKILL.md) | spec | `<feature>` | **New feature.** Deep investigation → writes a product-focused `spec.md` (WHAT/WHY, requirements, ACs, boundaries, gaps closed with options, design references). Checks the shipped archive for prior art before speccing. Creates the workspace map. | codebase + codegraph/graphify + shipped archive (`devrites-engine archive-search`) | `README.md`/`feature.md`, `brief.md`, `spec.md`, `references/`, `references.md`, `questions.md`, `decisions.md`, `assumptions.md`, `state.md` |
58
58
  | [`/rite-temper`](../pack/.claude/skills/rite-temper/SKILL.md) | temper | `[slug] [--mode]` | **Optional, before define.** Strategic review of the readied spec: scope mode (expand / selective / hold-rigor / reduce-to-MVP) + pre-mortem + 9-dimension floor-gate; folds decisions into the spec via the Spec Drift Guard. Significance-gated; **mandatory in `/rite-autocomplete`**. Reviewer: `devrites-strategy-reviewer`. | `spec.md` + decisions/assumptions + design-brief | `strategy.md`, `spec.md`, `decisions.md`, `assumptions.md` |
59
59
  | [`/rite-define`](../pack/.claude/skills/rite-define/SKILL.md) | plan | `[slug]` | Turns the approved `spec.md` into architecture, plan, vertical `SLICE-###` task slices, traceability, and state. Reads `strategy.md` if present. | `spec.md` (+ `strategy.md`) + references | `architecture.md`, `plan.md`, `tasks.md`, `traceability.md`, `state.md`, `decisions.md` |
60
60
  | [`/rite-vet`](../pack/.claude/skills/rite-vet/SKILL.md) | vet | `[slug] [--cross-model] [--full]` | **Before build — every feature.** Engineering review of the defined plan: scope challenge (reuse / minimum-diff / complexity smell) + architecture / plan code-quality / test-coverage design / performance, confidence-banded with a quote-the-source verification gate; failure-mode + parallelization map. Hardens `plan.md` / `tasks.md` in place; writes the build-readable `test-plan.md`; acceptance-changing deltas route via the Spec Drift Guard. Runs on every plan — depth scales to stakes (light pass on simple plans, full on big/risky), never skipped; **always in `/rite-autocomplete`**. Reviewer: `devrites-plan-reviewer` (+ optional `--cross-model`). | `plan.md` + `tasks.md` + `spec.md` (+ `strategy.md`) | `eng-review.md`, `test-plan.md`, `plan.md`, `tasks.md`, `decisions.md`, `state.md` |
@@ -84,7 +84,11 @@ must say who runs them.
84
84
  | [`/rite-pressure-test`](../pack/.claude/skills/rite-pressure-test/SKILL.md) | utility | `[idea]` | Pressure-test a rough idea: 3–5 genuinely different options → converge on one with trade-off + hinge. | spec / surrounding code | `decisions.md` (optional) |
85
85
  | [`/rite-doctor`](../pack/.claude/skills/rite-doctor/SKILL.md) | diagnostic | `[--code \| --reindex]` | Diagnose DevRites install, workspace, and optional index health. `--reindex` explicitly runs the internal synchronous refresh. Triggers: "rite doctor", "is DevRites healthy", "reindex". | install + workspace + optional indexes | — |
86
86
 
87
- ## Internal skills (`user-invocable: false`, model-invoked)
87
+ ## Internal specialist skills (`user-invocable: false`, model-invoked)
88
+
89
+ The 11 specialist skills below are model-invoked. `devrites-lib` is the twelfth
90
+ internal skill, but it sets `disable-model-invocation: true` and serves only as
91
+ the shared reference library.
88
92
 
89
93
  | Skill | Triggered by | Role | Notable |
90
94
  |---|---|---|---|
@@ -16,9 +16,11 @@ Other subcommands (hooks, `footprint`, `tick-afk`, mutating commands) do not acc
16
16
  `--json` — they are not parsed for a decision. This is deliberate scope, not an
17
17
  oversight; the flag is added where a machine reads the result.
18
18
 
19
- Exception: `snapshot` and `context show --json` are already direct structured reports, not
20
- envelopes. `context show --json` emits `root`, `project`, `activeWorkspace`, `source`,
21
- `hostCommands`, and `status` so wrappers can tell where DevRites will act.
19
+ Exception: `snapshot`, `context show --json`, and
20
+ `reviewer-stats report --json` are already direct structured reports, not
21
+ envelopes. `context show --json` emits `root`, `project`, `activeWorkspace`,
22
+ `source`, `hostCommands`, and `status` so wrappers can tell where DevRites will
23
+ act; reviewer stats emits the deterministic per-reviewer dispatch verdicts.
22
24
 
23
25
  ## Envelope
24
26
 
@@ -1,11 +1,14 @@
1
1
  # `devrites-engine` commands (engine core)
2
2
 
3
3
  The `devrites-engine` binary is the deterministic control plane over a project's
4
- `.devrites/` state. It makes **zero model or network calls** the in-session
5
- LLM stays the judgment data plane; the engine only sequences, gates, and reads.
4
+ `.devrites/` state. Workspace state, gate, and derivation commands make no model
5
+ calls and are network-free; explicit install/update/source-cache I/O is isolated under
6
+ `engine/internal/iohooks` (ADR-0008). The in-session LLM remains the judgment
7
+ data plane.
6
8
 
7
- This covers the commands added in issues 03–07, on top of `status`
8
- (see [state-schema.md](state-schema.md)).
9
+ This page expands selected contracts. Run `devrites-engine help` for the
10
+ exhaustive current command and hook inventory; see
11
+ [state-schema.md](state-schema.md) for `status` and the underlying state model.
9
12
 
10
13
  ## Exit codes
11
14
 
@@ -49,8 +52,8 @@ $ echo $?
49
52
  one legible verdict:
50
53
 
51
54
  ```
52
- binary: 2.6.1
53
- pack: 2.6.1
55
+ binary: X.Y.Z
56
+ pack: X.Y.Z
54
57
  state-schema: v1 (binary supports v1)
55
58
  verdict: ok: binary, pack, and state schema are compatible
56
59
  ```
@@ -90,7 +93,8 @@ readable, and the migration path is:
90
93
  timestamped `.migrate-backup-*` directory before anything changes;
91
94
  - **lossless** — canonical files are added without deleting aliases. `README.md`
92
95
  is the preferred workspace map while `feature.md` / `index.md` remain readable;
93
- `evidence.md` is preferred while `proof.md` remains a proof alias.
96
+ `state.md` is preferred while `status.md` remains a cursor alias; `evidence.md`
97
+ is preferred while `proof.md` remains a proof alias.
94
98
 
95
99
  The phase is derived from the legacy `state.md`, defaulting to `build` when it
96
100
  can't be read.
@@ -199,14 +203,22 @@ Records are JSONL, append-only, and safe for concurrent short-lived engine calls
199
203
  update DevRites through the npm flow (`npx devrites ...`); this command is part of the installed
200
204
  engine, not a Claude/Codex plugin distribution path.
201
205
 
202
- ## `health` — compact quality history
206
+ ## `health` — code-health dashboard and history
203
207
 
204
- `devrites-engine health record|list` keeps `.devrites/health-history.jsonl`, a small longitudinal
205
- quality signal for the workspace. The score is intentionally caller-owned: an agent, CI job, or
206
- human can record the observed health after a review, quality gate, or cleanup pass without the
207
- engine pretending to infer a universal metric.
208
+ `devrites-engine health`, `health run`, and `health check` run the known project
209
+ checks (available npm test/lint/typecheck/build scripts, `go test`, `pytest`, and
210
+ DevRites scans where present), print a PASS/WARN/FAIL dashboard, and append the
211
+ result to `.devrites/health.jsonl`. These commands execute project checks; they
212
+ are not a substitute for reviewing those scripts before use.
213
+
214
+ The legacy `health record|list` surface remains available for manual scores.
215
+ `record` appends `.devrites/health-history.jsonl`; `list` tails
216
+ `.devrites/health.jsonl` when dashboard history exists, otherwise the legacy file.
217
+ Manual scores are intentionally caller-owned: name the observed evidence rather
218
+ than asking the engine to infer a universal metric.
208
219
 
209
220
  ```bash
221
+ devrites-engine health run
210
222
  devrites-engine health record 8.5 "tests green; one follow-up" --note "review-fingerprints stable"
211
223
  devrites-engine health list --limit 10
212
224
  ```
@@ -240,8 +252,9 @@ outcome to `.devrites/reviewer-stats.jsonl` (cross-feature, append-only).
240
252
  - `run (insurance — never gated)` — `security-auditor` and `doubt-reviewer`: a dry streak is
241
253
  success, never a reason to skip.
242
254
  - `gate-candidate` — a conditional reviewer with zero surviving findings in its last 10+
243
- dispatches; the fan-out may skip it as a *recorded* skip (see
244
- `parallel-dispatch.md § Hit-rate gating`).
255
+ dispatches; the fan-out may skip it as a *recorded* skip (see the shared
256
+ `pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md` contract,
257
+ § Hit-rate gating).
245
258
  - `run` — everything else.
246
259
 
247
260
  ```bash
@@ -52,7 +52,8 @@ proven contract is shared, not per-clone. Grammar and delta rules:
52
52
 
53
53
  Backward compatibility: `.devrites/features/<slug>/` remains readable as a legacy
54
54
  workspace location. `feature.md` / `index.md` may stand in for `README.md`, and
55
- `proof.md` may stand in for `evidence.md`.
55
+ `status.md` may stand in for `state.md`, while `proof.md` may stand in for
56
+ `evidence.md`.
56
57
 
57
58
  ### Workspace maps
58
59
 
@@ -128,9 +129,12 @@ result: incomplete (missing: tasks)
128
129
  does not gate — gating is issue 04).
129
130
  - Unknown or missing slug → non-zero exit with a clear message on stderr.
130
131
 
131
- The engine makes **zero model or network calls**; `status` is a pure read of the
132
- files under `DEVRITES_ROOT` (or the nearest `.devrites/` above the working
133
- directory). A hand edit wins immediately because there is no status cache.
132
+ `status` makes no model or network calls; it is a pure read of the files under
133
+ `DEVRITES_ROOT` (or the nearest `.devrites/` above the working directory). A
134
+ hand edit wins immediately because there is no status cache. Other workspace
135
+ control-plane commands share that deterministic boundary; explicit
136
+ install/update/source-cache I/O is isolated under `engine/internal/iohooks` as
137
+ defined by ADR-0008.
134
138
 
135
139
  `.devrites/` is ignored **except** the capability ledger at `specs/`, which is
136
140
  committed shared truth — the recommended pattern is `.devrites/*` +
@@ -34,7 +34,7 @@ Canonical live workspace:
34
34
  plan.md # technical approach and slice strategy
35
35
  tasks.md # vertical slices
36
36
  traceability.md # AC/REQ -> slices -> tests/evidence/files matrix
37
- state.md # compact cursor
37
+ state.md # compact cursor; status.md alias allowed
38
38
  evidence.md # command/action proof; proof.md alias allowed
39
39
  browser-evidence.md # optional UI/runtime browser proof
40
40
  drift.md # optional spec/plan drift register
@@ -49,8 +49,9 @@ Canonical live workspace:
49
49
 
50
50
  Backward compatibility: `.devrites/features/<slug>/` remains readable as an alias
51
51
  for `.devrites/work/<slug>/`; `feature.md` and `index.md` remain valid workspace
52
- maps; `proof.md` remains a proof alias for `evidence.md`. Migration should add the
53
- canonical files without deleting aliases.
52
+ maps; `status.md` remains a cursor alias for `state.md`; `proof.md` remains a
53
+ proof alias for `evidence.md`. Migration should add the canonical files without
54
+ deleting aliases.
54
55
 
55
56
  ## Read Order
56
57
 
@@ -80,7 +81,7 @@ canonical files without deleting aliases.
80
81
  | `plan.md` | required from plan | `/rite-define` | implementation approach | 220 lines | Approach, Slice strategy, Validation strategy, Rollback | HOW lives here, not in `spec.md`. `Validation strategy` names the Key links — cross-slice wiring `/rite-prove` walks (or `none` for single-slice features). |
81
82
  | `tasks.md` | required from plan | `/rite-define` | build one slice | 280 lines | Slice index | Each `SLICE-###` has goal, AC IDs, likely files, tests/proof, mode, gate, dependencies, done condition. |
82
83
  | `traceability.md` | required from plan | `/rite-define` | coverage/review/seal | 220 lines | Coverage matrix | Matrix maps AC/REQ ID, slice IDs, test/proof, evidence ID, touched files, status. |
83
- | `state.md` | required | all phases | current cursor | 120 lines | Cursor | Compact table/key-value cursor; not an append-only narrative. |
84
+ | `state.md` / `status.md` | required | all phases | current cursor | 120 lines | Cursor | `state.md` is canonical; `status.md` is a compatibility alias. Compact table/key-value cursor; not an append-only narrative. |
84
85
  | `evidence.md` / `proof.md` | required from prove | `/rite-build`, `/rite-prove` | proof and seal | 280 lines | Evidence log | `EVID-###`, command/action, result, related AC/slice IDs, limitations. Each acceptance criterion carries a proof class — `test` / `command` / `browser` / `judgment` (untagged reads `judgment`; `judgment` needs its one-line why). |
85
86
  | `browser-evidence.md` | UI only | `/rite-prove`, `/rite-polish` | UI/browser proof | 220 lines | Browser evidence, Visual Verdict | Must reference real route/viewports/actions and related IDs. |
86
87
  | `drift.md` | drift only | Spec Drift Guard | spec/plan reality mismatch | 160 lines | Drift register | `DRIFT-###`, status, evidence found, resolution, related IDs. |
package/docs/flow.md CHANGED
@@ -10,22 +10,26 @@ For the full per-skill table, see [`command-map.md`](command-map.md). For the
10
10
 
11
11
  The happy path. Every arrow assumes the readiness gate of the previous phase
12
12
  passed; failures route through `/rite-plan repair` or `devrites-debug-recovery`.
13
- HITL slices pause before code is written; `/rite-resolve` is the resume verb.
13
+ `/rite-temper` is the optional strategic branch; `/rite-vet` runs on every
14
+ defined plan, with depth scaled to risk. HITL slices pause before code is
15
+ written; `/rite-resolve` is the resume verb.
14
16
 
15
17
  ```mermaid
16
18
  flowchart LR
17
19
  Start([user has an idea]) --> Spec[/rite-spec/]
18
20
  Spec -.->|UI detected| Shape[devrites-ux-shape<br/>plan UX/UI → design-brief.md]
19
21
  Shape -.->|brief confirmed| Spec
22
+ Spec -.->|big / risky| Temper[/rite-temper/] -.->|strategy.md| Define
20
23
  Spec -->|spec.md ready| Define[/rite-define/]
21
- Define -->|plan.md + tasks.md<br/>each slice tagged AFK/HITL| Build[/rite-build/]
24
+ Define -->|plan.md + tasks.md<br/>each slice tagged AFK/HITL| Vet[/rite-vet/]
25
+ Vet -->|every plan; light or full<br/>eng-review.md + test-plan.md| Build[/rite-build/]
22
26
  Build -->|one slice done<br/>+ evidence| Build
23
27
  Build -.->|"Forge: yes slice"| Forge[forge: K candidates<br/>→ devrites-forge-judge → 1 winner]
24
28
  Forge -.->|winner lands<br/>forge-report.md| Build
25
29
  Build -->|HITL gate fires| Await{{Awaiting human<br/>state.md + questions.md}}
26
30
  Await -->|"/rite-resolve &lt;qid&gt; &lt;answer&gt;"| Build
27
31
  Build -->|all slices built| Prove[/rite-prove/]
28
- Define -.->|resumed / adopted / stalled<br/>code vs intent| Converge[/rite-converge/]
32
+ Build -.->|resumed / adopted / stalled<br/>code vs intent| Converge[/rite-converge/]
29
33
  Converge -.->|appends remaining slices| Build
30
34
  Prove -->|evidence captured| Polish[/rite-polish/]
31
35
  Polish -->|polish-report.md| Review[/rite-review/]
@@ -45,7 +49,7 @@ flowchart LR
45
49
  classDef repair fill:#4c1d95,stroke:#a78bfa,color:#f5f3ff
46
50
  classDef gate fill:#4c1d95,stroke:#a78bfa,color:#f5f3ff
47
51
  classDef internal fill:#0f172a,stroke:#9ca3af,color:#f9fafb
48
- class Spec,Define,Build,Prove,Polish,Review,Seal,Ship2 phase
52
+ class Spec,Temper,Define,Vet,Build,Prove,Polish,Review,Seal,Ship2 phase
49
53
  class Shipped done
50
54
  class Repair repair
51
55
  class Await gate
@@ -291,11 +295,12 @@ The exact list of files per workspace and what each holds is in
291
295
 
292
296
  The `devrites-` prefix is collision-avoidance against bundled Claude Code
293
297
  skills (`prototype`, `handoff`, `triage`, `diagnose`). Visibility is the
294
- `user-invocable:` flag, not the prefix.
298
+ `user-invocable:` flag, not the prefix; automatic model loading is controlled
299
+ separately by `disable-model-invocation`.
295
300
 
296
301
  ```mermaid
297
302
  flowchart TB
298
- subgraph Public["Public (user-invocable: true) — 24 skills"]
303
+ subgraph Public["Public (user-invocable: true) — 30 skills"]
299
304
  direction TB
300
305
  R1[/rite/]
301
306
  R2[/rite-spec/]
@@ -304,6 +309,7 @@ flowchart TB
304
309
  RV[/rite-vet/]
305
310
  R4[/rite-plan/]
306
311
  R5[/rite-build/]
312
+ RC[/rite-converge/]
307
313
  R6[/rite-prove/]
308
314
  R7[/rite-polish/]
309
315
  R8[/rite-review/]
@@ -317,6 +323,11 @@ flowchart TB
317
323
  RA[/rite-adopt/]
318
324
  RL[/rite-learn/]
319
325
  RD[/rite-doctor/]
326
+ RE[/rite-explain/]
327
+ RCU[/rite-customize/]
328
+ RDO[/rite-dogfood/]
329
+ RPOV[/rite-pov/]
330
+ RPF[/rite-pr-feedback/]
320
331
  IPT[/rite-pressure-test/]
321
332
  D1[/rite-zoom-out/]
322
333
  D2[/rite-prototype/]
@@ -340,7 +351,7 @@ flowchart TB
340
351
 
341
352
  classDef pub fill:#064e3b,stroke:#34d399,color:#ecfdf5
342
353
  classDef int fill:#1f2937,stroke:#9ca3af,color:#f9fafb
343
- class R1,R2,RT,R3,RV,R4,R5,R6,R7,R8,R9,R12,R13,R10,R11,RQ,RF,RA,RL,RD,IPT,D1,D2,D3 pub
354
+ class R1,R2,RT,R3,RV,R4,R5,RC,R6,R7,R8,R9,R12,R13,R10,R11,RQ,RF,RA,RL,RD,RE,RCU,RDO,RPOV,RPF,IPT,D1,D2,D3 pub
344
355
  class I1,I2,I3,I4,I5,I6,I7,I8,I9,I10,I11,I12 int
345
356
  ```
346
357
 
@@ -1,6 +1,8 @@
1
1
  # Porting DevRites to a new harness
2
2
 
3
- DevRites is distributed through `npx devrites` and installs project-local artifacts. Do not add a harness through a Claude/Codex plugin or marketplace path.
3
+ DevRites' canonical distribution path is `npx devrites` (with the documented
4
+ Bash bootstrap as a Node-free alternative), and host artifacts install into the
5
+ target project. Do not add a harness through a Claude/Codex plugin or marketplace path.
4
6
 
5
7
  Before adding a host, add its thin adapter to `engine/internal/harness/harness.go`,
6
8
  update the frozen matrix in `compliance.go`, and prove the host can run DevRites
@@ -20,7 +22,9 @@ The harness must invoke DevRites and route to `/rite-spec` (or the host's explic
20
22
  - Session/project orientation runs automatically at startup/compact/resume, or the missing surface is recorded in `docs/harness-compliance.md`.
21
23
  - `devrites-engine` hooks/gates are wired, or each degraded gate has an honest fallback and confidence label.
22
24
  - Subagent support is mapped; if unavailable, reviewers/wrights use the documented inline fallback and label it.
23
- - Install, update, and uninstall paths stay project-local; no global writes.
25
+ - Skills, agents, standards, hooks, and harness guidance stay project-local;
26
+ the optional shared `devrites-engine` executable is the sole sanctioned
27
+ global artifact and must remain skippable with `--no-binary`.
24
28
  - Generated artifacts and `docs/harness-compliance.md` are updated from the same source of truth.
25
29
  - Routing eval includes the React todo-list acceptance prompt.
26
30
 
package/docs/release.md CHANGED
@@ -1,15 +1,16 @@
1
1
  # Release pipeline
2
2
 
3
- Releases are **fully automated** via [semantic-release](https://semantic-release.gitbook.io/): every push to `main` is analyzed; if the merged commits carry a `feat:`, `fix:`, `perf:`, `refactor:`, `build:`, `docs(README):` (or a `BREAKING CHANGE:` footer) the `.github/workflows/release.yml` job determines the next SemVer version and:
3
+ Releases are **fully automated** via [semantic-release](https://semantic-release.gitbook.io/): every push to `main` is analyzed; if the merged commits carry a `feat:`, `fix:`, `perf:`, `refactor:`, `build:`, `docs(README):` (or a `BREAKING CHANGE:` footer), the `release` job in [`.github/workflows/ci.yml`](../.github/workflows/ci.yml) determines the next SemVer version and:
4
4
 
5
- 1. Runs `scripts/validate.sh` + install / uninstall smoke tests.
6
- 2. Syncs the new version into `package.json` and the README status line (`scripts/sync-version.sh`).
7
- 3. Builds a `dist/devrites-v<version>.tar.gz` release artifact via `scripts/build-release-tarball.sh` the extractable bundle end-users get from the `curl | bash` installer. The bundle includes `pack/generated/` host-native Claude/Codex artifacts rendered from the canonical pack.
8
- 4. Regenerates `CHANGELOG.md` from the commits.
9
- 5. Publishes the `devrites` package to the npm registry (`@semantic-release/npm`, needs the `NPM_TOKEN` secret) this is what `npx devrites@latest` resolves. `npm pack` renders the same `pack/generated/` artifacts during `prepack`; there is no `postpack` cleanup step.
10
- 6. Commits the version bump + changelog as `chore(release): <version> [skip ci]`, creates a git tag `v<version>`, and publishes a GitHub Release with the tarball attached.
5
+ 1. Waits for the workflow's validation, full shell suite, strict Go-engine checks, Linux cross-compile smoke, and Windows Go tests.
6
+ 2. Regenerates `CHANGELOG.md` from the commits.
7
+ 3. Syncs the new version into `package.json` and the README status line (`scripts/sync-version.sh`).
8
+ 4. Builds `dist/devrites-v<version>.tar.gz` plus its SHA-256 sidecar via `scripts/build-release-tarball.sh`. The extractable bundle used by `curl | bash` includes host-native Claude/Codex artifacts regenerated from `pack/.claude/` into `pack/generated/`.
9
+ 5. Cross-compiles five `devrites-engine` release binaries (macOS arm64/amd64, Linux arm64/amd64, Windows amd64) plus a SHA-256 sidecar for each.
10
+ 6. Publishes the `devrites` package to npm (`@semantic-release/npm`, requiring `NPM_TOKEN`) this is what `npx devrites@latest` resolves. `npm pack` regenerates the same `pack/generated/` artifacts during `prepack`; there is no `postpack` cleanup step.
11
+ 7. Commits the version bump + changelog as `chore(release): <version> [skip ci]`, creates tag `v<version>`, and publishes a GitHub Release with the tarball, checksum, binaries, and binary checksum sidecars attached.
11
12
 
12
- Local dry-run: `npm run release:dry` (shows the version bump + draft notes without publishing). Before publishing, `scripts/release-check.sh` builds the evidence packet: generated pack freshness, tarball checksum presence, `npx-pack-smoke`, install/update/uninstall, `validate-pack`, behavioral eval schema, and a README/docs check that install instructions stay `npx devrites ...` only. DevRites is not shipped through Claude or Codex plugin stores. The release job is gated by passing CI — a broken `main` won't ship.
13
+ Local dry-run: `npm run release:dry` (shows the proposed version + notes without publishing). For a manual preflight, `bash scripts/release-check.sh` builds an evidence packet covering generated-pack freshness, tarball checksum presence, `npx-pack-smoke`, install/update/uninstall, `validate-pack`, behavioral-eval schema, and the documented npm distribution path. This preflight is available to maintainers but is not a hidden semantic-release step. DevRites is not shipped through Claude or Codex plugin stores. The release job is gated by passing CI — a broken `main` won't ship.
13
14
 
14
15
  ## Authoring commits that trigger releases
15
16
 
@@ -25,6 +26,6 @@ Husky + commitlint reject non-conventional messages at commit time, so you can't
25
26
 
26
27
  ## Dependency updates
27
28
 
28
- Dependabot watches the `npm` and `github-actions` ecosystems and opens a **weekly grouped PR** with all patch + minor bumps (see [`.github/dependabot.yml`](../.github/dependabot.yml)). The [`dependabot-auto-merge.yml`](../.github/workflows/dependabot-auto-merge.yml) workflow auto-approves + enables auto-merge (squash) on those PRs so they land the instant CI is green — no manual click. Major-version bumps stay open with a `needs-review` label so a human can scan the changelog before merging.
29
+ Dependabot watches the `npm` and `github-actions` ecosystems and opens **weekly grouped PRs** for routine patch + minor bumps (see [`.github/dependabot.yml`](../.github/dependabot.yml)). The [`dependabot-auto-merge.yml`](../.github/workflows/dependabot-auto-merge.yml) workflow auto-approves + enables auto-merge (squash) on those PRs so they land when required checks are green. Major-version bumps stay open with a `needs-review` label so a human can scan the changelog before merging.
29
30
 
30
31
  > GitHub does not allow Dependabot to push directly to `main` — a PR is always opened. Auto-merge is the closest equivalent. Required CI checks still gate the merge.
package/docs/skills.md CHANGED
@@ -132,7 +132,7 @@ blocks obvious multi-command `Next:` wording.
132
132
  |---|---|---|
133
133
  | [`rite-review`](../pack/.claude/skills/rite-review/SKILL.md) | Multi-axis feature-scoped review. Parallel **Spec axis** (`devrites-spec-reviewer`) + **Standards axis** (`devrites-code-reviewer`) sub-agents; severity-labeled findings. | Polish done; ready for a final pass. |
134
134
  | [`devrites-doubt`](../pack/.claude/skills/devrites-doubt/SKILL.md) | In-flight adversarial review of risky decisions — branching logic, boundaries, data/auth/API changes, migrations. | About to stand a "this is safe / scales / matches spec" claim. |
135
- | [`devrites-audit`](../pack/.claude/skills/devrites-audit/SKILL.md) | Read-only audit dispatch — picks the right reviewer subagent on the requested axis (`security` / `perf` / `simplify`). Single-axis only; multi-axis parallel fan-out lives inline in `/rite-seal` (see `rite-seal/reference/parallel-dispatch.md`). | Polish Phase 1 (`simplify`); review involves user input / auth / data / external integrations / secrets / permissions (`security`); performance is relevant or regression risk visible (`perf`). |
135
+ | [`devrites-audit`](../pack/.claude/skills/devrites-audit/SKILL.md) | Read-only audit dispatch — picks the right reviewer subagent on the requested axis (`security` / `perf` / `simplify`). Single-axis only; multi-axis parallel fan-out lives inline in `/rite-seal` (see the [shared dispatch contract](../pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md)). | Polish Phase 1 (`simplify`); review involves user input / auth / data / external integrations / secrets / permissions (`security`); performance is relevant or regression risk visible (`perf`). |
136
136
 
137
137
  ### Seal — GO / NO-GO decision
138
138