devrites 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +24 -0
- package/.claude-plugin/plugin.json +43 -0
- package/CHANGELOG.md +391 -0
- package/LICENSE +56 -0
- package/NOTICE.md +18 -0
- package/README.md +582 -0
- package/SECURITY.md +193 -0
- package/bin/devrites.mjs +100 -0
- package/docs/architecture.md +272 -0
- package/docs/cli-mcp.md +57 -0
- package/docs/command-map.md +143 -0
- package/docs/flow.md +360 -0
- package/docs/release.md +29 -0
- package/docs/skills.md +214 -0
- package/docs/usage.md +325 -0
- package/install.sh +359 -0
- package/mcp/devrites-mcp.mjs +103 -0
- package/pack/.claude/agents/devrites-code-reviewer.md +50 -0
- package/pack/.claude/agents/devrites-doubt-reviewer.md +55 -0
- package/pack/.claude/agents/devrites-frontend-reviewer.md +52 -0
- package/pack/.claude/agents/devrites-performance-reviewer.md +47 -0
- package/pack/.claude/agents/devrites-plan-reviewer.md +79 -0
- package/pack/.claude/agents/devrites-security-auditor.md +53 -0
- package/pack/.claude/agents/devrites-simplifier-reviewer.md +75 -0
- package/pack/.claude/agents/devrites-slice-wright.md +181 -0
- package/pack/.claude/agents/devrites-spec-reviewer.md +72 -0
- package/pack/.claude/agents/devrites-strategy-reviewer.md +62 -0
- package/pack/.claude/agents/devrites-test-analyst.md +47 -0
- package/pack/.claude/hooks/devrites-a1-guard.sh +81 -0
- package/pack/.claude/hooks/devrites-allow.sh +44 -0
- package/pack/.claude/hooks/devrites-cursor.sh +28 -0
- package/pack/.claude/hooks/devrites-orient.sh +53 -0
- package/pack/.claude/hooks/devrites-redwatch.sh +39 -0
- package/pack/.claude/hooks/devrites-refresh-indexes.sh +127 -0
- package/pack/.claude/hooks/devrites-reviewer-readonly.sh +28 -0
- package/pack/.claude/hooks/devrites-statusline.sh +18 -0
- package/pack/.claude/hooks/devrites-stop-gate.sh +45 -0
- package/pack/.claude/hooks/devrites-wright-scope.sh +35 -0
- package/pack/.claude/hooks/hooks.json +52 -0
- package/pack/.claude/rules/README.md +48 -0
- package/pack/.claude/rules/afk-hitl.md +245 -0
- package/pack/.claude/rules/agents.md +98 -0
- package/pack/.claude/rules/anti-patterns.md +48 -0
- package/pack/.claude/rules/code-review.md +38 -0
- package/pack/.claude/rules/coding-style.md +55 -0
- package/pack/.claude/rules/context-hygiene.md +97 -0
- package/pack/.claude/rules/core.md +119 -0
- package/pack/.claude/rules/development-workflow.md +40 -0
- package/pack/.claude/rules/documentation.md +27 -0
- package/pack/.claude/rules/error-handling.md +33 -0
- package/pack/.claude/rules/git-workflow.md +35 -0
- package/pack/.claude/rules/hooks.md +38 -0
- package/pack/.claude/rules/patterns.md +45 -0
- package/pack/.claude/rules/performance.md +27 -0
- package/pack/.claude/rules/prose-style.md +101 -0
- package/pack/.claude/rules/security.md +63 -0
- package/pack/.claude/rules/testing.md +88 -0
- package/pack/.claude/rules/tooling.md +72 -0
- package/pack/.claude/settings.json +53 -0
- package/pack/.claude/skills/devrites-api-interface/SKILL.md +45 -0
- package/pack/.claude/skills/devrites-audit/SKILL.md +73 -0
- package/pack/.claude/skills/devrites-browser-proof/SKILL.md +38 -0
- package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +50 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/build-the-loop.md +47 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/cleanup-and-classify.md +17 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/hypotheses.md +17 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/instrumentation.md +21 -0
- package/pack/.claude/skills/devrites-debug-recovery/reference/regression-test.md +31 -0
- package/pack/.claude/skills/devrites-doubt/SKILL.md +75 -0
- package/pack/.claude/skills/devrites-frontend-craft/SKILL.md +96 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/craft.md +59 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/design-references.md +116 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/fullstack.md +45 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/quality-standards.md +215 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/reuse-first.md +59 -0
- package/pack/.claude/skills/devrites-frontend-craft/reference/shape.md +60 -0
- package/pack/.claude/skills/devrites-interview/SKILL.md +81 -0
- package/pack/.claude/skills/devrites-lib/SKILL.md +76 -0
- package/pack/.claude/skills/devrites-lib/scripts/analyze.sh +78 -0
- package/pack/.claude/skills/devrites-lib/scripts/check-acceptance.sh +75 -0
- package/pack/.claude/skills/devrites-lib/scripts/close-out.sh +47 -0
- package/pack/.claude/skills/devrites-lib/scripts/conventions.py +273 -0
- package/pack/.claude/skills/devrites-lib/scripts/coverage.sh +51 -0
- package/pack/.claude/skills/devrites-lib/scripts/devrites.sh +69 -0
- package/pack/.claude/skills/devrites-lib/scripts/doctor.sh +92 -0
- package/pack/.claude/skills/devrites-lib/scripts/evidence-fresh.sh +63 -0
- package/pack/.claude/skills/devrites-lib/scripts/footprint.sh +45 -0
- package/pack/.claude/skills/devrites-lib/scripts/learnings.sh +74 -0
- package/pack/.claude/skills/devrites-lib/scripts/mutation-gate.sh +52 -0
- package/pack/.claude/skills/devrites-lib/scripts/package-existence.sh +68 -0
- package/pack/.claude/skills/devrites-lib/scripts/preamble.sh +76 -0
- package/pack/.claude/skills/devrites-lib/scripts/progress.sh +103 -0
- package/pack/.claude/skills/devrites-lib/scripts/readiness.sh +62 -0
- package/pack/.claude/skills/devrites-lib/scripts/reconcile.sh +123 -0
- package/pack/.claude/skills/devrites-lib/scripts/resolve.sh +279 -0
- package/pack/.claude/skills/devrites-lib/scripts/stuck.sh +67 -0
- package/pack/.claude/skills/devrites-lib/scripts/test-integrity.sh +87 -0
- package/pack/.claude/skills/devrites-lib/scripts/tick-afk.sh +52 -0
- package/pack/.claude/skills/devrites-prose-craft/SKILL.md +105 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/banned-phrases.md +95 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/examples.md +88 -0
- package/pack/.claude/skills/devrites-prose-craft/reference/structures.md +134 -0
- package/pack/.claude/skills/devrites-refresh-indexes/SKILL.md +54 -0
- package/pack/.claude/skills/devrites-source-driven/SKILL.md +36 -0
- package/pack/.claude/skills/devrites-ux-shape/SKILL.md +121 -0
- package/pack/.claude/skills/devrites-ux-shape/reference/brief-template.md +93 -0
- package/pack/.claude/skills/devrites-ux-shape/reference/visual-direction-probe.md +48 -0
- package/pack/.claude/skills/rite/SKILL.md +135 -0
- package/pack/.claude/skills/rite/reference/menu.md +32 -0
- package/pack/.claude/skills/rite-adopt/SKILL.md +83 -0
- package/pack/.claude/skills/rite-adopt/reference/adoption.md +58 -0
- package/pack/.claude/skills/rite-adopt/reference/anti-patterns.md +19 -0
- package/pack/.claude/skills/rite-autocomplete/SKILL.md +96 -0
- package/pack/.claude/skills/rite-autocomplete/reference/decision-policy.md +35 -0
- package/pack/.claude/skills/rite-autocomplete/reference/loop.md +54 -0
- package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +59 -0
- package/pack/.claude/skills/rite-build/SKILL.md +261 -0
- package/pack/.claude/skills/rite-build/reference/afk-discipline.md +145 -0
- package/pack/.claude/skills/rite-build/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-build/reference/checkpoint-protocol.md +149 -0
- package/pack/.claude/skills/rite-build/reference/evidence-standard.md +32 -0
- package/pack/.claude/skills/rite-build/reference/frontend-trigger.md +39 -0
- package/pack/.claude/skills/rite-build/reference/one-slice-cycle.md +38 -0
- package/pack/.claude/skills/rite-build/reference/spec-drift-guard.md +43 -0
- package/pack/.claude/skills/rite-build/reference/tdd.md +26 -0
- package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +115 -0
- package/pack/.claude/skills/rite-define/SKILL.md +157 -0
- package/pack/.claude/skills/rite-define/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-define/reference/gates.md +152 -0
- package/pack/.claude/skills/rite-define/reference/plan-template.md +65 -0
- package/pack/.claude/skills/rite-doctor/SKILL.md +50 -0
- package/pack/.claude/skills/rite-frame/SKILL.md +116 -0
- package/pack/.claude/skills/rite-frame/reference/failure-modes.md +68 -0
- package/pack/.claude/skills/rite-handoff/SKILL.md +95 -0
- package/pack/.claude/skills/rite-handoff/reference/handoff-template.md +34 -0
- package/pack/.claude/skills/rite-learn/SKILL.md +82 -0
- package/pack/.claude/skills/rite-plan/SKILL.md +82 -0
- package/pack/.claude/skills/rite-plan/reference/anti-patterns.md +24 -0
- package/pack/.claude/skills/rite-plan/reference/dependency-graph.md +33 -0
- package/pack/.claude/skills/rite-plan/reference/replan-and-repair.md +42 -0
- package/pack/.claude/skills/rite-plan/reference/slicing.md +52 -0
- package/pack/.claude/skills/rite-plan/reference/task-breakdown.md +34 -0
- package/pack/.claude/skills/rite-polish/SKILL.md +90 -0
- package/pack/.claude/skills/rite-polish/reference/anti-ai-slop.md +177 -0
- package/pack/.claude/skills/rite-polish/reference/anti-patterns.md +27 -0
- package/pack/.claude/skills/rite-polish/reference/backend-polish.md +80 -0
- package/pack/.claude/skills/rite-polish/reference/browser-polish-evidence.md +31 -0
- package/pack/.claude/skills/rite-polish/reference/code.md +85 -0
- package/pack/.claude/skills/rite-polish/reference/design-system-discovery.md +35 -0
- package/pack/.claude/skills/rite-polish/reference/harden-checklist.md +109 -0
- package/pack/.claude/skills/rite-polish/reference/ui.md +136 -0
- package/pack/.claude/skills/rite-pressure-test/SKILL.md +43 -0
- package/pack/.claude/skills/rite-prototype/SKILL.md +87 -0
- package/pack/.claude/skills/rite-prove/SKILL.md +120 -0
- package/pack/.claude/skills/rite-prove/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-prove/reference/browser-proof.md +26 -0
- package/pack/.claude/skills/rite-prove/reference/failure-triage.md +25 -0
- package/pack/.claude/skills/rite-prove/reference/proof-ladder.md +26 -0
- package/pack/.claude/skills/rite-prove/reference/test-command-discovery.md +30 -0
- package/pack/.claude/skills/rite-quick/SKILL.md +81 -0
- package/pack/.claude/skills/rite-resolve/SKILL.md +113 -0
- package/pack/.claude/skills/rite-resolve/reference/answer-protocol.md +114 -0
- package/pack/.claude/skills/rite-review/SKILL.md +170 -0
- package/pack/.claude/skills/rite-review/reference/anti-patterns.md +32 -0
- package/pack/.claude/skills/rite-review/reference/cognitive-load.md +90 -0
- package/pack/.claude/skills/rite-review/reference/feature-scoped-review.md +26 -0
- package/pack/.claude/skills/rite-review/reference/five-axis-review.md +46 -0
- package/pack/.claude/skills/rite-review/reference/nielsen-heuristics.md +130 -0
- package/pack/.claude/skills/rite-review/reference/parallel-dispatch.md +62 -0
- package/pack/.claude/skills/rite-review/reference/performance-review.md +28 -0
- package/pack/.claude/skills/rite-review/reference/security-review.md +32 -0
- package/pack/.claude/skills/rite-seal/SKILL.md +183 -0
- package/pack/.claude/skills/rite-seal/reference/anti-patterns.md +27 -0
- package/pack/.claude/skills/rite-seal/reference/conventions-ledger.md +63 -0
- package/pack/.claude/skills/rite-seal/reference/final-evidence.md +72 -0
- package/pack/.claude/skills/rite-seal/reference/go-no-go.md +37 -0
- package/pack/.claude/skills/rite-seal/reference/parallel-dispatch.md +69 -0
- package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +30 -0
- package/pack/.claude/skills/rite-seal/reference/seal-template.md +36 -0
- package/pack/.claude/skills/rite-ship/SKILL.md +120 -0
- package/pack/.claude/skills/rite-ship/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-ship/reference/close-out.md +31 -0
- package/pack/.claude/skills/rite-ship/reference/design-memory.md +120 -0
- package/pack/.claude/skills/rite-ship/reference/git-ship.md +42 -0
- package/pack/.claude/skills/rite-ship/reference/ship-template.md +33 -0
- package/pack/.claude/skills/rite-spec/SKILL.md +126 -0
- package/pack/.claude/skills/rite-spec/reference/acceptance-criteria.md +31 -0
- package/pack/.claude/skills/rite-spec/reference/anti-patterns.md +25 -0
- package/pack/.claude/skills/rite-spec/reference/interview-patterns.md +56 -0
- package/pack/.claude/skills/rite-spec/reference/investigation.md +64 -0
- package/pack/.claude/skills/rite-spec/reference/question-protocol.md +61 -0
- package/pack/.claude/skills/rite-spec/reference/references-intake.md +57 -0
- package/pack/.claude/skills/rite-spec/reference/spec-checklists.md +73 -0
- package/pack/.claude/skills/rite-spec/reference/spec-template.md +124 -0
- package/pack/.claude/skills/rite-spec/reference/state-workspace.md +159 -0
- package/pack/.claude/skills/rite-status/SKILL.md +101 -0
- package/pack/.claude/skills/rite-temper/SKILL.md +119 -0
- package/pack/.claude/skills/rite-temper/reference/anti-patterns.md +29 -0
- package/pack/.claude/skills/rite-temper/reference/review-dimensions.md +65 -0
- package/pack/.claude/skills/rite-temper/reference/scope-modes.md +53 -0
- package/pack/.claude/skills/rite-temper/reference/significance.md +46 -0
- package/pack/.claude/skills/rite-temper/reference/strategy-template.md +90 -0
- package/pack/.claude/skills/rite-vet/SKILL.md +155 -0
- package/pack/.claude/skills/rite-vet/reference/anti-patterns.md +29 -0
- package/pack/.claude/skills/rite-vet/reference/artifacts.md +135 -0
- package/pack/.claude/skills/rite-vet/reference/cross-model.md +41 -0
- package/pack/.claude/skills/rite-vet/reference/depth.md +53 -0
- package/pack/.claude/skills/rite-vet/reference/eng-lenses.md +48 -0
- package/pack/.claude/skills/rite-vet/reference/review-axes.md +167 -0
- package/pack/.claude/skills/rite-zoom-out/SKILL.md +75 -0
- package/package.json +68 -0
- package/scripts/build-release-tarball.sh +74 -0
- package/scripts/check-cross-refs.py +121 -0
- package/scripts/check-no-global-writes.sh +44 -0
- package/scripts/check-rule-uniqueness.sh +73 -0
- package/scripts/devrites-detect.sh +175 -0
- package/scripts/eval-runner.py +273 -0
- package/scripts/grade-feature.sh +104 -0
- package/scripts/install-lib.sh +83 -0
- package/scripts/pin.sh +166 -0
- package/scripts/render-eval-summary.py +48 -0
- package/scripts/run-evals.sh +149 -0
- package/scripts/run-outcome-evals.sh +49 -0
- package/scripts/scan-pack-security.py +209 -0
- package/scripts/scan-supply-chain-iocs.py +127 -0
- package/scripts/supply-chain-iocs.json +11 -0
- package/scripts/sync-version.sh +56 -0
- package/scripts/validate-frontmatter.py +149 -0
- package/scripts/validate-workflow-security.py +86 -0
- package/scripts/validate.sh +234 -0
- package/uninstall.sh +137 -0
- package/update.sh +196 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# `strategy.md` template + fold-back rules
|
|
2
|
+
|
|
3
|
+
`/rite-temper` produces two kinds of output. The `strategy.md` artifact is the durable
|
|
4
|
+
**record** of the review; the **fold-back edits** are what the build actually follows. The
|
|
5
|
+
record without the fold-back is dead prose — the build reads `spec.md`, not `strategy.md`.
|
|
6
|
+
|
|
7
|
+
## `strategy.md` — the record
|
|
8
|
+
Write to `.devrites/work/<slug>/strategy.md`. If one exists for the slug, **update** it, don't
|
|
9
|
+
clobber.
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
# Strategy: <slug>
|
|
13
|
+
Tempered: <iso>
|
|
14
|
+
|
|
15
|
+
## 1. Significance
|
|
16
|
+
full | skipped — low stakes (<trigger>) # if skipped, stop here (see significance.md)
|
|
17
|
+
|
|
18
|
+
## 2. Scope mode
|
|
19
|
+
Mode: expand | selective | hold-rigor | reduce-to-MVP
|
|
20
|
+
Rationale: <why this mode>
|
|
21
|
+
Hinge: <what evidence/answer would change the call>
|
|
22
|
+
|
|
23
|
+
## 3. Forward pass (ambition)
|
|
24
|
+
10-star outcome (the deliberate overshoot): <one or two lines>
|
|
25
|
+
Premises challenged: <load-bearing assumption(s) + verdict>
|
|
26
|
+
Converged sweet spot: <where we landed and why — this, not the overshoot, is what folds in>
|
|
27
|
+
|
|
28
|
+
## 4. Pre-mortem (inversion)
|
|
29
|
+
| Failure mode (past tense) | Likelihood | Mitigation | Owning slice/criterion |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| It shipped and <…> | high/med/low | <mitigation> | <slice or FR it binds to> |
|
|
32
|
+
|
|
33
|
+
## 5. YAGNI ledger
|
|
34
|
+
| Candidate scope item | later-refactor cost | Verdict |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| <item> | trivial / large | build-now / defer (revisit: <trigger>) |
|
|
37
|
+
|
|
38
|
+
## 6. Cross-cutting coverage
|
|
39
|
+
| Concern | Addressed? |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Security / trust boundary | <how | N/A — why> |
|
|
42
|
+
| Data & migration | <… | N/A> |
|
|
43
|
+
| Observability | <… | N/A> |
|
|
44
|
+
| Modifiability | <… | N/A> |
|
|
45
|
+
|
|
46
|
+
## 7. Dimension scores (floor-gate)
|
|
47
|
+
| Dimension | Band | Evidence |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| Problem altitude & ambition | strong/adequate/thin/broken | <spec line / absence> |
|
|
50
|
+
| … (all 9) | … | … |
|
|
51
|
+
Floor verdict: <weakest band> on <dimension> → pass | blocked
|
|
52
|
+
|
|
53
|
+
## 8. Deferred / Won't-have-this-time
|
|
54
|
+
- <item> — <one-line reason> (revisit when: <trigger>)
|
|
55
|
+
|
|
56
|
+
## 9. Reviewer loop
|
|
57
|
+
- iter 1: <findings → resolution> · iter 2: … (≤3)
|
|
58
|
+
- Final: floor = <band>; unresolved → <none | blocking qid>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Fold-back — the part the build follows
|
|
62
|
+
Apply through the **Spec Drift Guard** (these are spec changes, not free edits). If a plan
|
|
63
|
+
already exists, record in `drift.md` and route via `/rite-plan repair` instead of editing
|
|
64
|
+
`spec.md` blind.
|
|
65
|
+
|
|
66
|
+
- **`spec.md`** (these are the spec template's actual section headings — edit each named one,
|
|
67
|
+
don't collapse pairs):
|
|
68
|
+
- *Success criteria* **and** *Acceptance criteria* (separate sections) — add to **both** for
|
|
69
|
+
every opt-in **expansion**; remove (via the Guard) from both for every **reduction**. Each
|
|
70
|
+
must stay measurable + technology-agnostic.
|
|
71
|
+
- *Non-goals* — append every deferred item (from the YAGNI ledger + the Deferred register), so
|
|
72
|
+
it is neither silently dropped nor silently re-injected mid-build.
|
|
73
|
+
- *Constraints* **and** *Risks* (separate sections) — tighten *Constraints* where the pre-mortem
|
|
74
|
+
demands; add the top failure modes + mitigations to *Risks*.
|
|
75
|
+
- *Gaps, issues & decisions* table — one row per scope call (options offered → decision → owner).
|
|
76
|
+
- **Re-run the Readiness gate** at the bottom of the spec after edits; it must still pass, and
|
|
77
|
+
**every folded scope delta must trace to a recorded decision** (a `questions.md` qid or a
|
|
78
|
+
`decisions.md` ADR) — an untraceable change is the batch-dump failure.
|
|
79
|
+
- **`decisions.md`** — one ADR-style entry per scope call and accepted trade-off:
|
|
80
|
+
`context · decision · why-not-the-alternative · what-would-change-it`.
|
|
81
|
+
- **`assumptions.md`** — every "we'll probably need X" demoted to an explicit
|
|
82
|
+
**assumption-to-verify**, never smuggled into scope as a fact.
|
|
83
|
+
|
|
84
|
+
## Write discipline
|
|
85
|
+
- **Single canonical writer.** The skill writes `strategy.md` and edits the canonical files; the
|
|
86
|
+
`devrites-strategy-reviewer` agent is **read-only** and only returns findings + bands.
|
|
87
|
+
- **No silent scope.** An expansion that the human didn't opt into, or a reduction that drops an
|
|
88
|
+
acceptance criterion without a recorded decision, is a defect — not a convenience.
|
|
89
|
+
- Add `strategy.md` to the workspace between `spec.md` and `plan.md`; `/rite-define`,
|
|
90
|
+
`/rite-review`, and `/rite-seal` read it.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rite-vet
|
|
3
|
+
description: Engineering review of a defined plan before any code — challenge implementation scope, then review architecture / code-quality / test-coverage / performance through senior-engineer lenses, confidence-banding each finding; harden `plan.md` / `tasks.md` and write `eng-review.md` + the build-readable `test-plan.md`. Use when the user says "vet the plan", "engineering review", "review the architecture", "lock in the plan", or before building a feature. Not for the spec's strategy (`/rite-temper`), a mid-build decision (`devrites-doubt`), a code diff (`/rite-review`), or the final gate (`/rite-seal`).
|
|
4
|
+
argument-hint: "[slug] [--cross-model] [--full]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /rite-vet — vet the plan before you build
|
|
9
|
+
|
|
10
|
+
Take a defined plan and **vet** it the way a senior staff engineer would in a plan review:
|
|
11
|
+
challenge the scope, walk architecture / plan code-quality / test-coverage / performance,
|
|
12
|
+
calibrate every finding by confidence (and refuse to emit one you can't trace to a quoted
|
|
13
|
+
line), design the test coverage the build will target, and map the failure modes and
|
|
14
|
+
parallel lanes — *before* `/rite-build` writes a line. The one DevRites step that hardens
|
|
15
|
+
the **implementation plan** at the engineering level and folds the result into the canonical
|
|
16
|
+
contract, so the build follows a reviewed plan. Runs on **every** plan (depth scales to
|
|
17
|
+
stakes; never skipped) and is always part of `/rite-autocomplete`; `--cross-model` adds a
|
|
18
|
+
different-model second opinion. **Read the active workspace first**; if there's no
|
|
19
|
+
`plan.md`, tell the user to run `/rite-define`.
|
|
20
|
+
|
|
21
|
+
This is the engineering counterpart to `/rite-temper` (which is strategic, on the *spec*).
|
|
22
|
+
Temper decides *the right thing*; vet decides *the right way to build it*.
|
|
23
|
+
|
|
24
|
+
## Rules consulted (read on demand from `.claude/rules/`)
|
|
25
|
+
**Step 0:** Read `.claude/rules/core.md` first. Pull on demand: `patterns.md` +
|
|
26
|
+
`coding-style.md` (the over-engineering / reuse-first / YAGNI rubric — reuse the pack's
|
|
27
|
+
standard), `testing.md` (the test-coverage axis), `performance.md` (the perf axis),
|
|
28
|
+
`error-handling.md` (failure-mode coverage), `development-workflow.md` (parallel lanes,
|
|
29
|
+
definition of done), `afk-hitl.md` (irreversible-risk list + gate ceiling).
|
|
30
|
+
|
|
31
|
+
## Operating rules
|
|
32
|
+
- **Review the plan, not the spec's ambition.** The spec's scope/ambition is `/rite-temper`'s
|
|
33
|
+
job and is treated as settled here. Vet asks *given this scope, is this the right, simplest,
|
|
34
|
+
best-tested, lowest-risk way to build it* — and challenges only implementation scope creep.
|
|
35
|
+
- **You harden the plan directly; the reviewer judges.** Vet *is* the plan-hardening phase, so
|
|
36
|
+
behavior-preserving plan refinements (test requirements, tightened scope boundaries, ordering,
|
|
37
|
+
parallel lanes, error-handling + failure-mode coverage) are written straight into
|
|
38
|
+
`plan.md` / `tasks.md` / `test-plan.md` — you are the single canonical writer. A finding that
|
|
39
|
+
changes **acceptance criteria or product behavior** is *not* a plan refinement: it routes
|
|
40
|
+
through the **Spec Drift Guard** (record in `drift.md`, recorded decision, then `/rite-plan
|
|
41
|
+
repair` for any structural reslice). Nothing that grows the build's scope lands without a
|
|
42
|
+
recorded human decision.
|
|
43
|
+
- **Confidence over assertion.** Every finding carries a confidence band; a finding you cannot
|
|
44
|
+
back by quoting the plan/spec line (or the code it references) is forced to low confidence and
|
|
45
|
+
suppressed from the main report — see the verification gate in [`reference/review-axes.md`](reference/review-axes.md).
|
|
46
|
+
- **Bound rigor by reversibility.** Auth / migration / public-API / data-model touches get
|
|
47
|
+
maximum conservatism and always pause (irreversible-risk list), regardless of run mode.
|
|
48
|
+
- **Honest verdict, gated on the floor.** Never round "thin" up to "ready"; the axis verdict is
|
|
49
|
+
the weakest finding, not an average. Record every call's *why*.
|
|
50
|
+
|
|
51
|
+
## Workflow
|
|
52
|
+
0. **Read `.claude/rules/core.md`** first.
|
|
53
|
+
Then **run the shared orientation preamble** — it prints `state.md`, the artifacts present,
|
|
54
|
+
the run mode (HITL/AFK), and the open-question tally by gate, so you orient deterministically
|
|
55
|
+
instead of re-deriving state from raw Markdown:
|
|
56
|
+
```bash
|
|
57
|
+
P=.claude/skills/devrites-lib/scripts/preamble.sh
|
|
58
|
+
[ -f "$P" ] || P="${CLAUDE_SKILL_DIR:-}/../devrites-lib/scripts/preamble.sh"
|
|
59
|
+
[ -f "$P" ] || P=pack/.claude/skills/devrites-lib/scripts/preamble.sh
|
|
60
|
+
[ -f "$P" ] && bash "$P" || echo "(orientation preamble unavailable on this install — read state.md directly to orient)"
|
|
61
|
+
```
|
|
62
|
+
Then the workspace: `plan.md`, `tasks.md`, `spec.md`
|
|
63
|
+
(for intent + acceptance), `strategy.md` (if `/rite-temper` ran), `decisions.md`,
|
|
64
|
+
`assumptions.md`, `design-brief.md` (if UI), `state.md`. Require a `plan.md` whose
|
|
65
|
+
Readiness gate passes (or `Plan approved`) — else STOP → `/rite-define`. Prefer a
|
|
66
|
+
code-intelligence index if available — codebase-memory-mcp first, cross-checked with codegraph + graphify, else standard methods (LSP / Read/Grep/Glob)
|
|
67
|
+
(see `.claude/rules/tooling.md`) — for placement / blast-radius / reuse checks.
|
|
68
|
+
1. **Calibrate depth — never skip** — [`reference/depth.md`](reference/depth.md). Every plan is
|
|
69
|
+
vetted; what scales is the *depth*. A simple, single-module, reversible plan with no
|
|
70
|
+
irreversible-risk / data-model / new-pattern trigger → **light pass** (brief scope check + a
|
|
71
|
+
one-line scan per axis + the acceptance→test map). Any full-pass trigger (or `--full`) → the
|
|
72
|
+
**full pass** below. There is no skip: every feature leaves a recorded engineering verdict and
|
|
73
|
+
a `test-plan.md` coverage map.
|
|
74
|
+
2. **Scope Challenge (blocking gate)** — [`reference/review-axes.md`](reference/review-axes.md)
|
|
75
|
+
§0. What already exists that solves a sub-problem (reuse vs rebuild)? The minimum diff for the
|
|
76
|
+
stated acceptance? Complexity smell (the plan touches **>8 files** or adds **>2 new
|
|
77
|
+
services/modules**) → **STOP and ask** before any axis. Verify each new pattern / infra choice
|
|
78
|
+
against a built-in (dispatch `devrites-source-driven`); completeness check (with AI, full
|
|
79
|
+
coverage is ~100× cheaper than the human-hours saved by a shortcut — prefer complete); and a
|
|
80
|
+
distribution check for any new artifact.
|
|
81
|
+
2a. **Cross-artifact analyze gate + charter/conventions gate.** Before the axes, run one read-only
|
|
82
|
+
consistency+coverage pass over `spec.md` + `plan.md` + `tasks.md` (+ `coverage.md` if present);
|
|
83
|
+
any **CRITICAL** — an acceptance criterion with no slice, a slice satisfying no criterion, a
|
|
84
|
+
contradiction across artifacts — **blocks `/rite-build`** until resolved. Then score the anti-slop
|
|
85
|
+
charter (`coding-style.md` + `prose-style.md`) and the conventions ledger
|
|
86
|
+
(`.devrites/conventions.md`) as an explicit **pass/fail** on the planned approach — a plan that
|
|
87
|
+
bakes in a god-module, a speculative abstraction with no second caller, or a dependency where an
|
|
88
|
+
in-repo option exists is a **top-severity** violation, walked first. **Re-check both after the
|
|
89
|
+
axes harden the plan** (post-design). Write the result to `analysis.md`.
|
|
90
|
+
```bash
|
|
91
|
+
A=.claude/skills/devrites-lib/scripts/analyze.sh
|
|
92
|
+
[ -f "$A" ] || A="${CLAUDE_SKILL_DIR:-}/../devrites-lib/scripts/analyze.sh"
|
|
93
|
+
[ -f "$A" ] || A=pack/.claude/skills/devrites-lib/scripts/analyze.sh
|
|
94
|
+
[ -f "$A" ] && { bash "$A"; echo "analyze rc=$?"; } || echo "(analyze.sh unavailable — do the cross-artifact pass by hand: every AC↔slice mapped, no contradiction across spec/plan/tasks)"
|
|
95
|
+
```
|
|
96
|
+
3. **Four-axis review** — [`reference/review-axes.md`](reference/review-axes.md), through the
|
|
97
|
+
senior-engineer lenses in [`reference/eng-lenses.md`](reference/eng-lenses.md): **Architecture
|
|
98
|
+
→ Plan code-quality → Test-coverage design → Performance**, ≤8 findings per axis, each
|
|
99
|
+
`[severity] (confidence: N/10) <ref> — finding`. **Walk findings WITH the human, one at a
|
|
100
|
+
time** via `AskUserQuestion` (best-guess + why + options with effort/risk/maintenance, mapped
|
|
101
|
+
to a rule) — the artifact is the *output* of the review, not a substitute for it. (AFK ceiling
|
|
102
|
+
single-sourced in [`reference/depth.md`](reference/depth.md): hardening /
|
|
103
|
+
coverage-increasing findings auto-apply; **anything that grows scope or changes acceptance is a
|
|
104
|
+
blocking pause**; irreversible-risk always pauses.)
|
|
105
|
+
4. **Required outputs** — the test-coverage diagram + per-gap test requirements (the **regression
|
|
106
|
+
rule** is mandatory, no question), failure-mode table, "NOT in scope", "What already exists",
|
|
107
|
+
and the worktree parallelization strategy. Shapes in [`reference/review-axes.md`](reference/review-axes.md).
|
|
108
|
+
Also a **PRP one-pass-implementable check** per slice brief (the build's pre-flight): confirm each
|
|
109
|
+
slice's Consumes/Produces, Known-Gotchas, validation commands, and reuse targets are present and
|
|
110
|
+
concrete — a brief that can't be built in one pass is a finding; harden the slice until it clears,
|
|
111
|
+
before `/rite-build`.
|
|
112
|
+
5. **Write `eng-review.md` + `test-plan.md`, fold back** — [`reference/artifacts.md`](reference/artifacts.md).
|
|
113
|
+
`eng-review.md` is the durable record; `test-plan.md` is the build-readable coverage target
|
|
114
|
+
(`/rite-build` and `/rite-prove` read it). Harden `plan.md` / `tasks.md` directly for
|
|
115
|
+
behavior-preserving refinements; route every acceptance/behavior-changing delta through the
|
|
116
|
+
**Spec Drift Guard** (`drift.md` + recorded decision + `/rite-plan repair`). Append
|
|
117
|
+
`decisions.md` (one ADR per material call) and `assumptions.md`. Update `state.md`:
|
|
118
|
+
`Phase: vet`, `Next step: /rite-build`; on a blocking pause write the `Awaiting human` block +
|
|
119
|
+
`Status: awaiting_human` before stopping.
|
|
120
|
+
6. **Adversarial verification loop (full pass)** — dispatch [`devrites-plan-reviewer`](../../agents/devrites-plan-reviewer.md)
|
|
121
|
+
(fresh context, **only** `plan.md` + `tasks.md` + `spec.md` + the rubric — no authoring
|
|
122
|
+
reasoning). Resolve actionable findings, re-dispatch; **cap ≤3 iterations**. An axis still
|
|
123
|
+
below bar after 3 → blocking question (HITL) or AFK gate-ceiling entry. On a **light pass**
|
|
124
|
+
the fresh-context loop is skipped — the per-axis scan + the `test-plan.md` coverage map are the
|
|
125
|
+
verdict (escalate to this loop if the light scan surfaces a real finding). With `--cross-model`,
|
|
126
|
+
add one genuinely different-model pass — [`reference/cross-model.md`](reference/cross-model.md)
|
|
127
|
+
(informational until the human approves each finding). If sub-agents are unavailable, do the
|
|
128
|
+
independent rubric pass yourself in a separate read, discarding the authoring reasoning (a
|
|
129
|
+
flagged fallback, not an independent review).
|
|
130
|
+
7. **STOP.** Report the scope verdict, the per-axis floor, the coverage gaps closed, and the
|
|
131
|
+
failure-mode criticals; recommend `/rite-build`.
|
|
132
|
+
|
|
133
|
+
> **Mid-flight discipline.** When tempted to batch-dump findings into `eng-review.md` and skip
|
|
134
|
+
> the walk-through, harden the plan past a finding that actually changes acceptance, score before
|
|
135
|
+
> quoting the source, or wave through a complexity smell "to keep moving" — see
|
|
136
|
+
> [`reference/anti-patterns.md`](reference/anti-patterns.md).
|
|
137
|
+
|
|
138
|
+
## Output
|
|
139
|
+
|
|
140
|
+
**Footer first** — render the slice meter + flow ribbon by running the progress footer (`progress.sh`, resolved like the step-0 preamble — canonical snippet in `devrites-lib/SKILL.md`); keep the fact lines below it terse (`key value · key value`). Then:
|
|
141
|
+
```
|
|
142
|
+
Vetted: <slug>
|
|
143
|
+
Depth: light | full (<trigger that escalated it>)
|
|
144
|
+
Scope: reuse <n found> / minimum-diff <ok|trimmed N> / complexity <ok|smell: N files, M new services → asked>
|
|
145
|
+
Axes (floor → verdict): Architecture <band> · Code-quality <band> · Tests <band> · Performance <band>
|
|
146
|
+
Findings: <Critical n / Important n / Suggestion n> (suppressed low-confidence: n)
|
|
147
|
+
Coverage: <x/y paths> planned · GAPS closed <n> · regressions flagged <n> → test-plan.md
|
|
148
|
+
Failure modes: <n> mapped (<n critical: no test + no handling + silent>)
|
|
149
|
+
Parallelization: <n lanes — n parallel / n sequential> | sequential (no opportunity)
|
|
150
|
+
Reviewer loop: <n> iter · cross-model: ran (codex) | off
|
|
151
|
+
Plan: hardened in place | <n> deltas routed via Spec Drift Guard → /rite-plan repair
|
|
152
|
+
Next: /rite-build (builds the vetted plan)
|
|
153
|
+
↻ Hygiene: /clear before /rite-build (eng-review.md + test-plan.md + plan edits + decisions.md captured). See rules/context-hygiene.md.
|
|
154
|
+
```
|
|
155
|
+
**DO NOT write code, slice, or run the build here** — that's `/rite-build`. Vet reviews and hardens the plan; it never implements.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# /rite-vet — anti-patterns
|
|
2
|
+
|
|
3
|
+
Universal rationalizations + red flags live in
|
|
4
|
+
[`../../../rules/anti-patterns.md`](../../../rules/anti-patterns.md) — read it when the
|
|
5
|
+
reluctance is broader than this phase. Below are the vet-specific ones.
|
|
6
|
+
|
|
7
|
+
## Phase rationalizations
|
|
8
|
+
|
|
9
|
+
| Excuse | Rebuttal |
|
|
10
|
+
|---|---|
|
|
11
|
+
| "I'll write all the findings into `eng-review.md` and let the user read it." | The artifact is the *output* of an interactive review, not a substitute for it. A material finding's path to "done" goes **through `AskUserQuestion`**, one at a time, with a recommendation + why. Dumping findings into one write and moving on is the exact failure this skill exists to prevent. |
|
|
12
|
+
| "The plan doesn't handle X — flag it." (without checking) | Quote the line first. If you can't quote where the plan handles X, you also can't be sure it doesn't — force confidence ≤4 and suppress. The "field/case doesn't exist" finding is the most common false positive; the verification gate exists to kill it. |
|
|
13
|
+
| "It's an obvious fix — I'll just edit the plan." | An obvious *plan refinement* (a test requirement, an error path, tighter scope) you write directly — that's vet's job. A fix that **changes an acceptance criterion or product behavior** is not obvious enough to skip the human: route it through the Spec Drift Guard with a recorded decision. |
|
|
14
|
+
| "This dimension is thin but the others are strong — net it's fine." | The gate is the **floor**, not the average. A plan `broken` on test-coverage does not pass because it's `strong` on architecture. |
|
|
15
|
+
| "I can see it's adequate — I'll note the band, the evidence is obvious." | Cite the quoted evidence **before** the band. Score-first-justify-later is how a reviewer waves through a plan it already likes. |
|
|
16
|
+
| "8+ files but it all needs to change — proceed." | The complexity smell is a **STOP-and-ask**, not a note. Name the overbuilt part, propose the smaller version that still meets acceptance, and let the human decide before any axis runs. Maybe it's justified — record *why* — but the gate fires first. |
|
|
17
|
+
| "There's no test for this, but the user can add one later." | Coverage is designed **now**, before the code, so the build writes tests alongside it. A deferred test is a test that misses the boundary cases writing-it-now would expose. Regressions are non-negotiable — Critical, no question. |
|
|
18
|
+
| "Performance looks fine." | "Looks fine" is not a measurement. A perf finding is "measure X against budget Y" or it's nothing — don't recommend speculative tuning, and don't wave past an N+1 you can quote. |
|
|
19
|
+
| "Cross-model agrees, so apply it." | Cross-model consensus is a strong *signal*, not an approval. Every cross-model finding is informational until the human approves it (or, in AFK, until the gate ceiling clears a hardening-only change). |
|
|
20
|
+
|
|
21
|
+
## Red flags
|
|
22
|
+
- `eng-review.md` / `test-plan.md` written but `plan.md` / `tasks.md` **not** hardened — the build
|
|
23
|
+
follows the plan, so the review changed nothing.
|
|
24
|
+
- A finding raised with confidence ≥7 but **no quoted source line** — that defeats the verification gate.
|
|
25
|
+
- A scope-growing finding auto-applied in AFK (it must pause), or any irreversible-risk touch that didn't pause.
|
|
26
|
+
- A failure-mode table with rows but no verdict column filled — a "no test + no handling + silent" row not marked Critical.
|
|
27
|
+
- The reviewer loop running past 3 iterations, or the reviewer / cross-model being handed the author's reasoning (defeats the fresh-context point).
|
|
28
|
+
- The skill writing code, implementing a slice, or running the build — that's `/rite-build`. Vet reviews and hardens the plan; it never implements.
|
|
29
|
+
- Re-litigating the **spec's** scope/ambition — that was `/rite-temper`. Vet challenges *implementation* scope only.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# `eng-review.md` + `test-plan.md` templates + fold-back rules
|
|
2
|
+
|
|
3
|
+
`/rite-vet` produces two artifacts and a set of fold-back edits. `eng-review.md` is the durable
|
|
4
|
+
**record** of the review; `test-plan.md` is the build-readable **coverage target**; the
|
|
5
|
+
fold-back edits to `plan.md` / `tasks.md` are what the build actually follows. The record
|
|
6
|
+
without the fold-back is dead prose — the build reads `plan.md` + `test-plan.md`, not `eng-review.md`.
|
|
7
|
+
|
|
8
|
+
## `eng-review.md` — the record
|
|
9
|
+
Write to `.devrites/work/<slug>/eng-review.md`. If one exists for the slug, **update** it, don't
|
|
10
|
+
clobber.
|
|
11
|
+
|
|
12
|
+
```markdown
|
|
13
|
+
# Eng review: <slug>
|
|
14
|
+
Vetted: <iso> Cross-model: ran (codex) | off
|
|
15
|
+
|
|
16
|
+
## 1. Depth
|
|
17
|
+
light | full (<trigger that escalated it>) # every plan is vetted — light or full, never skipped (see depth.md)
|
|
18
|
+
|
|
19
|
+
## 2. Scope challenge
|
|
20
|
+
- What already exists (reuse vs rebuild): <findings — each reuse the plan should adopt>
|
|
21
|
+
- Minimum diff: scope accepted as-is | trimmed <n items, listed in NOT-in-scope>
|
|
22
|
+
- Complexity: ok | smell (<n files, m new services) → asked → <reduce|proceed, why>
|
|
23
|
+
- Built-in / completeness / distribution: <flags, with source citations>
|
|
24
|
+
|
|
25
|
+
## 3. Axis findings (floor-gated)
|
|
26
|
+
| Axis | Floor band | Findings (sev · confidence) |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| Architecture | strong/adequate/thin/broken | [Critical](9) … |
|
|
29
|
+
| Plan code-quality | … | … |
|
|
30
|
+
| Test-coverage design | … | see test-plan.md |
|
|
31
|
+
| Performance | … | … |
|
|
32
|
+
Suppressed (confidence ≤4, unverified): <count — one line each>
|
|
33
|
+
|
|
34
|
+
## 4. Failure modes
|
|
35
|
+
| New codepath | Realistic failure | Test? | Handling? | Silent? | Verdict |
|
|
36
|
+
|---|---|---|---|---|---|
|
|
37
|
+
| <path> | timeout / nil / race / stale | y/n | y/n | y/n | ok / **CRITICAL gap** |
|
|
38
|
+
|
|
39
|
+
## 5. Parallelization
|
|
40
|
+
Sequential — no opportunity # OR the dependency table + lanes + order + conflict flags
|
|
41
|
+
|
|
42
|
+
## 6. Reviewer loop
|
|
43
|
+
- iter 1: <findings → resolution> · iter 2: … (≤3)
|
|
44
|
+
- Cross-model (if --cross-model): <overlap / unique findings — informational until approved>
|
|
45
|
+
- Final: floor = <band>; unresolved → <none | blocking qid>
|
|
46
|
+
|
|
47
|
+
## 7. Completion summary
|
|
48
|
+
- Scope: accepted | reduced · Architecture: <n> · Code-quality: <n>
|
|
49
|
+
- Coverage: <x/y> planned, <n> gaps, <n> regressions (Critical)
|
|
50
|
+
- Failure modes: <n> mapped, <n> critical gaps
|
|
51
|
+
- NOT in scope: written · What already exists: written
|
|
52
|
+
- Plan: hardened in place | <n> deltas via Spec Drift Guard
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## `test-plan.md` — the build-readable coverage target
|
|
56
|
+
Write to `.devrites/work/<slug>/test-plan.md`. `/rite-build` (the slice-wright) reads it to write
|
|
57
|
+
tests alongside the code; `/rite-prove` walks it against `evidence.md`. Keep it about *what to
|
|
58
|
+
test and where*, not implementation detail.
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
# Test plan: <slug>
|
|
62
|
+
From /rite-vet on <iso>. Runner + conventions: <detected framework + command>.
|
|
63
|
+
|
|
64
|
+
## Coverage diagram
|
|
65
|
+
<the ASCII code-paths + user-flows diagram from review-axes.md, with COVERAGE / GAPS / REGRESSIONS line>
|
|
66
|
+
|
|
67
|
+
## Per-gap test requirements
|
|
68
|
+
| ID | Path / flow | Test file (match conventions) | Asserts (input → expected) | Kind | Slice | Priority |
|
|
69
|
+
|---|---|---|---|---|---|---|
|
|
70
|
+
| T1 | <path> | <path/to.test> | <empty list → 200 + []> | unit / E2E / eval | <slice> | P1 / **Regression-Critical** |
|
|
71
|
+
|
|
72
|
+
## Interaction inventory (UI slices — every element + flow gets an asserting test)
|
|
73
|
+
Enumerate every interactive element and user flow the feature exposes; one row each, none
|
|
74
|
+
skipped. Level per `testing.md` "Completeness": elements/fields → unit/component, critical
|
|
75
|
+
journeys → one E2E (never one-per-field). `/rite-build` must cover every row; `/rite-prove`
|
|
76
|
+
fails any row with no passing result — an unverified element is a NO-GO, like an unproven criterion.
|
|
77
|
+
```markdown
|
|
78
|
+
| Element / flow | Kind (field/checkbox/select/radio/toggle/button/link/flow) | Level | Test file | Asserts (action → expected) |
|
|
79
|
+
|---|---|---|---|---|
|
|
80
|
+
| email field | field | unit | <form.test> | invalid → error shown; valid → accepted |
|
|
81
|
+
| 'remember me' | checkbox | unit | <form.test> | toggles the persisted flag |
|
|
82
|
+
| country | select | unit | <form.test> | options load; change fires handler |
|
|
83
|
+
| submit | button | component | <form.test> | disabled until valid; click → submits once |
|
|
84
|
+
| login | flow ★★★ | E2E | <login.e2e> | enter → submit → lands on dashboard |
|
|
85
|
+
```
|
|
86
|
+
Omit the whole section only for a slice with **no** interactive surface (pure backend/logic).
|
|
87
|
+
|
|
88
|
+
## Acceptance → test map
|
|
89
|
+
- <spec acceptance criterion> → <T1, T3> # every criterion maps to ≥1 test
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Parallelization table (in `eng-review.md` §5 when there's an opportunity)
|
|
93
|
+
```markdown
|
|
94
|
+
| Step / workstream | Modules touched (dir-level) | Depends on |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| API endpoints | controllers/, serializers/ | — |
|
|
97
|
+
| Worker | jobs/, lib/queue/ | API endpoints |
|
|
98
|
+
|
|
99
|
+
Lanes: A: API → Worker (sequential, shared lib/) · B: migration (independent)
|
|
100
|
+
Order: launch A + B in parallel worktrees → merge → C
|
|
101
|
+
Conflicts: Lanes A and B both touch models/ — sequential or coordinate.
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Fold-back — the part the build follows
|
|
105
|
+
Vet *is* the plan-hardening phase, so behavior-preserving refinements are written **directly**;
|
|
106
|
+
acceptance/behavior changes route through the **Spec Drift Guard**.
|
|
107
|
+
|
|
108
|
+
- **Write directly into `plan.md` / `tasks.md`** (single canonical writer — you, not the reviewer):
|
|
109
|
+
- `plan.md` §Scope boundaries ← "NOT in scope" items.
|
|
110
|
+
- `plan.md` §Architecture decisions ← reuse-over-rebuild calls + named failure scenarios.
|
|
111
|
+
- `plan.md` §Dependency graph / §Implementation order ← the parallel lanes + any ordering fix
|
|
112
|
+
(e.g. refactor-before-feature split).
|
|
113
|
+
- `plan.md` §Complexity & deviations gate ← any deviation the §0 challenge surfaced + its justification.
|
|
114
|
+
- `tasks.md` slices ← added test requirements (point at `test-plan.md`), added error-handling /
|
|
115
|
+
failure-mode coverage, tightened slice scope, a split of a refactor+behavior slice into two.
|
|
116
|
+
Adjust a slice's `Gate:` upward when vet reveals higher stakes (e.g. an unflagged migration).
|
|
117
|
+
- Re-run the `plan.md` Readiness gate after edits; it must still pass.
|
|
118
|
+
- **Route through the Spec Drift Guard** (record `drift.md` + a recorded decision, then `/rite-plan
|
|
119
|
+
repair` for any structural reslice) for anything that **changes an acceptance criterion, product
|
|
120
|
+
behavior, or the spec** — including a scope reduction that drops a criterion. A folded change with
|
|
121
|
+
no recorded decision is the batch-dump failure.
|
|
122
|
+
- **`decisions.md`** — one ADR per material call: `context · decision · why-not-the-alternative ·
|
|
123
|
+
what-would-change-it`.
|
|
124
|
+
- **`assumptions.md`** — every "we'll probably need X" demoted to an explicit assumption-to-verify,
|
|
125
|
+
never smuggled into scope as a fact.
|
|
126
|
+
|
|
127
|
+
## Write discipline
|
|
128
|
+
- **Single canonical writer.** The skill writes `eng-review.md` / `test-plan.md` and edits
|
|
129
|
+
`plan.md` / `tasks.md`; `devrites-plan-reviewer` is **read-only** and only returns findings + bands.
|
|
130
|
+
- **No silent scope.** A plan refinement that grows acceptance without a recorded decision, or a
|
|
131
|
+
deferral that drops a criterion without the Guard, is a defect — not a convenience.
|
|
132
|
+
- Add `eng-review.md` + `test-plan.md` to the workspace between `tasks.md` and `state.md`.
|
|
133
|
+
`/rite-build` (the slice-wright) and `/rite-prove` **read `test-plan.md`** as the coverage
|
|
134
|
+
target; `/rite-review` and `/rite-seal` may consult `eng-review.md` for the failure-mode +
|
|
135
|
+
scope record.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# `--cross-model` — the outside voice (a genuinely different model)
|
|
2
|
+
|
|
3
|
+
`devrites-plan-reviewer` gives an *independent* read (fresh context, no authoring reasoning) —
|
|
4
|
+
but it's still the same model family. `--cross-model` adds a second opinion from a **different**
|
|
5
|
+
AI system, because two models agreeing on a plan is stronger signal than one model reviewing it
|
|
6
|
+
thoroughly. It is **opt-in** for `/rite-vet` (the flag) and **off by default in
|
|
7
|
+
`/rite-autocomplete`** unless the flag was armed — it costs latency and a second runtime.
|
|
8
|
+
|
|
9
|
+
## When it runs
|
|
10
|
+
Only when `$ARGUMENTS` contains `--cross-model` **and** a different-model reviewer is available.
|
|
11
|
+
The default path (no flag) relies on `devrites-plan-reviewer` for independence — that is a
|
|
12
|
+
complete review on its own; cross-model is an enhancement, not a requirement.
|
|
13
|
+
|
|
14
|
+
## Dispatch
|
|
15
|
+
After the in-model reviewer loop converges (or in parallel with its final iteration), hand the
|
|
16
|
+
**same fresh inputs** to a different model — preferentially the `codex:codex-rescue` agent (it
|
|
17
|
+
runs Codex through the shared runtime). Give it only the contract, never the authoring reasoning:
|
|
18
|
+
|
|
19
|
+
> Independent engineering review of a defined implementation plan, before any code.
|
|
20
|
+
> Read only `.devrites/work/<slug>/plan.md`, `tasks.md`, and `spec.md`. Judge: architecture &
|
|
21
|
+
> boundaries, scope discipline & reuse, test-coverage design, performance, reversibility, and
|
|
22
|
+
> failure-mode coverage. For every finding, quote the line that motivates it and give a 1-10
|
|
23
|
+
> confidence; suppress anything you can't quote. Return labeled findings (Critical / Important /
|
|
24
|
+
> Suggestion) with a concrete fix. Do not edit anything. Do not approve — find what will cost a redo.
|
|
25
|
+
|
|
26
|
+
If the agent / runtime is unavailable, **skip and say so** in `eng-review.md` ("cross-model:
|
|
27
|
+
requested but unavailable — in-model review only"); do not block on it and do not silently treat
|
|
28
|
+
the absence as a pass.
|
|
29
|
+
|
|
30
|
+
## Integration rule (the important one)
|
|
31
|
+
Cross-model findings are **informational until the human approves each one** — even when you
|
|
32
|
+
agree with them, even when they overlap the in-model reviewer. Cross-model **consensus** is a
|
|
33
|
+
strong signal: surface it as such ("both reviewers flagged Slice 3's missing timeout test"), but
|
|
34
|
+
the human still makes the call via `AskUserQuestion`. In AFK, the same gate ceiling applies:
|
|
35
|
+
a cross-model finding that *hardens* the plan auto-applies and is recorded; one that *grows
|
|
36
|
+
scope* or changes acceptance is a blocking pause.
|
|
37
|
+
|
|
38
|
+
## Recording
|
|
39
|
+
In `eng-review.md` §6, note: which model ran, the overlap with the in-model reviewer (consensus
|
|
40
|
+
findings), and any **unique** findings the outside voice caught that the in-model pass missed —
|
|
41
|
+
those are the highest-value output of running it at all.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Depth calibration — always vet, scale the rigor (never skip)
|
|
2
|
+
|
|
3
|
+
`/rite-vet` runs on **every** plan — every feature deserves a correct engineering plan, not
|
|
4
|
+
just the big ones. What changes with stakes is the *depth*, never *whether* it runs: a simple,
|
|
5
|
+
reversible plan gets a fast **light pass**; a big or risky one gets the **full pass**. There is
|
|
6
|
+
no skip. This shared definition is used by both the standalone `/rite-vet` and the always-run
|
|
7
|
+
`/rite-autocomplete` step, so they agree on how deep to go.
|
|
8
|
+
|
|
9
|
+
A four-section deep-dive on a one-file reversible plan is wasteful; rubber-stamping a
|
|
10
|
+
migration-touching plan is dangerous. Match the effort to the stakes — but **always** leave a
|
|
11
|
+
recorded engineering verdict and a coverage plan.
|
|
12
|
+
|
|
13
|
+
## Full pass when ANY trips
|
|
14
|
+
- **Irreversible-risk contact** — the plan touches anything on the `afk-hitl.md` irreversible-risk
|
|
15
|
+
list: destructive data migration, auth/authz boundary, public-API break, external-service
|
|
16
|
+
contract, filesystem destruction outside the workspace.
|
|
17
|
+
- **Data model** — new/changed entities, relationships, or persistence shape.
|
|
18
|
+
- **Cross-module blast radius** — the impact (from a code-intelligence index if available — see
|
|
19
|
+
`../../../rules/tooling.md` — or an honest estimate) crosses
|
|
20
|
+
module/service boundaries or has many dependents.
|
|
21
|
+
- **Complexity** — `plan.md` touches **>8 files** or adds **>2 new services/modules/classes**.
|
|
22
|
+
- **Multi-slice / multi-day**, or a new dependency / pattern / second design system.
|
|
23
|
+
- **The user asked**, or `--full`.
|
|
24
|
+
|
|
25
|
+
Full pass = §0 scope challenge + all four axes (each walked finding-by-finding) + the failure-mode
|
|
26
|
+
table + parallelization + the reviewer loop. See [`review-axes.md`](review-axes.md).
|
|
27
|
+
|
|
28
|
+
## Light pass otherwise (the default for simple plans — still never a skip)
|
|
29
|
+
When none of the full-pass triggers fire, run the **light pass**: a fast but real engineering
|
|
30
|
+
check that still leaves a verdict and a coverage plan. In a handful of lines:
|
|
31
|
+
- **§0 scope challenge, in brief** — confirm minimum diff + reuse (one line each); if a complexity
|
|
32
|
+
smell or missed reuse appears, escalate that to the full treatment.
|
|
33
|
+
- **One-line scan per axis** (architecture / plan code-quality / test-coverage / performance) —
|
|
34
|
+
"No issues" is a valid result, but you must look and say so per axis, not assume.
|
|
35
|
+
- **Always** produce the acceptance→test map + any regression-Criticals in `test-plan.md`. This is
|
|
36
|
+
the part that makes "a correct engineering plan for *everything*" real — it never downgrades,
|
|
37
|
+
light or full.
|
|
38
|
+
- Write the short `eng-review.md` (`Depth: light`) and harden `tasks.md` with the test requirements.
|
|
39
|
+
|
|
40
|
+
A light-pass finding that turns out to be real **escalates that axis to full treatment** (walk it
|
|
41
|
+
with the human, confidence-banded). Light means *less ceremony*, never *less honesty*.
|
|
42
|
+
|
|
43
|
+
## In `/rite-autocomplete`
|
|
44
|
+
Autocomplete runs `/rite-vet` after `/rite-define` on **every** feature — light or full per the
|
|
45
|
+
triggers above, **never skipped**. Under the AFK gate ceiling:
|
|
46
|
+
- **Auto-apply (no pause):** hardening findings — added test requirements, error-handling /
|
|
47
|
+
failure-mode coverage, tightened scope, reuse-over-rebuild, dependency-order / parallel-lane fixes
|
|
48
|
+
(these never grow acceptance). Record the rationale in `decisions.md`.
|
|
49
|
+
- **Blocking pause:** any finding that **grows scope, adds a slice, changes an acceptance
|
|
50
|
+
criterion, or alters product behavior**.
|
|
51
|
+
- **Always pause:** irreversible-risk findings, and any axis still below bar after the
|
|
52
|
+
≤3-iteration reviewer loop.
|
|
53
|
+
- **Cross-model** is off by default; it runs only if `--cross-model` was explicitly armed.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Senior-engineer lenses — how to *see* the findings
|
|
2
|
+
|
|
3
|
+
These are not extra checklist items. They are the instincts an experienced staff engineer
|
|
4
|
+
applies while reading a plan — the pattern recognition that separates "read the plan" from
|
|
5
|
+
"caught the landmine". Apply them across all four axes in [`review-axes.md`](review-axes.md):
|
|
6
|
+
each lens turns a vague unease into a concrete, quotable finding.
|
|
7
|
+
|
|
8
|
+
## The lenses
|
|
9
|
+
|
|
10
|
+
1. **Boring by default.** A team gets a few innovation tokens; everything else should be proven
|
|
11
|
+
technology. When the plan introduces something novel (a new datastore, a hand-rolled queue, a
|
|
12
|
+
bespoke pattern), ask whether this is a wise token to spend or whether a boring built-in does
|
|
13
|
+
it. → Architecture / Scope axes.
|
|
14
|
+
2. **Blast radius.** For every decision: what's the worst case, and how many systems / callers /
|
|
15
|
+
users does it touch? A change with wide blast radius and no rollback is a different risk class
|
|
16
|
+
than a leaf change. → Architecture / Reversibility.
|
|
17
|
+
3. **Reversibility preference.** Prefer the choice that's cheap to undo — feature flag, additive
|
|
18
|
+
migration, incremental rollout — over the one that's right only if you're right the first time.
|
|
19
|
+
Make the cost of being wrong low. → Architecture / Reversibility.
|
|
20
|
+
4. **Incremental over revolutionary.** Strangler-fig, not big-bang rewrite; refactor first, then
|
|
21
|
+
change behavior — never both in one slice. If the plan does a structural rewrite and a behavior
|
|
22
|
+
change together, split them. → Plan code-quality / slice shape.
|
|
23
|
+
5. **Systems over heroes.** Design for a tired engineer at 3am, not your sharpest engineer on
|
|
24
|
+
their best day. A plan that only works if every step is done perfectly is fragile. Favor
|
|
25
|
+
guard rails, explicit errors, and obvious failure paths. → Code-quality / Failure modes.
|
|
26
|
+
6. **Essential vs accidental complexity.** Before anything the plan adds, ask Brooks's question:
|
|
27
|
+
is this solving a real problem, or one we created? Accidental complexity is the cheapest thing
|
|
28
|
+
to cut. → Scope / Code-quality.
|
|
29
|
+
7. **Make the change easy, then make the easy change.** If a slice is hard because the surrounding
|
|
30
|
+
structure fights it, the first move is a (separate, behavior-preserving) refactor — call it out
|
|
31
|
+
so the plan sequences it before the feature work, not tangled into it. → Plan code-quality.
|
|
32
|
+
8. **Failure is information.** Every new codepath fails *somehow* in production — timeout, nil,
|
|
33
|
+
race, stale data, partial write. The plan should name the failure and decide: test it, handle
|
|
34
|
+
it, or accept it loudly (never silently). → Failure-mode coverage.
|
|
35
|
+
9. **DX is product quality.** Slow CI, painful local dev, untestable seams → worse software over
|
|
36
|
+
time. If the plan makes the code harder to test or run locally, that's a real finding, not a nit.
|
|
37
|
+
→ Test-coverage / Code-quality.
|
|
38
|
+
10. **Trust boundary discipline.** Every untrusted input crosses an explicit validation + authz
|
|
39
|
+
boundary before it reaches trusted core logic. A plan that lets a value skip the boundary is a
|
|
40
|
+
security finding even pre-code. → Architecture / Security seam.
|
|
41
|
+
|
|
42
|
+
## Using them
|
|
43
|
+
- A lens is a *prompt*, not a verdict. It turns "something's off here" into a finding you can
|
|
44
|
+
quote and band. If a lens fires, follow it to the specific plan line, then run it through the
|
|
45
|
+
confidence + verification gate.
|
|
46
|
+
- Don't recite the lenses in the output — recite the *findings* they produced.
|
|
47
|
+
- When a plan is genuinely clean against a lens, that's worth one line of evidence ("Reversibility:
|
|
48
|
+
additive migration + flag — strong"), not silence; it shows the lens was applied.
|