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,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rite-resolve
|
|
3
|
+
description: Resolve open `questions.md` entries on the active feature — answer one, drop one, or batch-resolve from a file — and clear `state.md` `Awaiting human` so the workflow resumes. Use when the user says "answer that question", "drop that question", or a HITL checkpoint / AFK blocking question needs an answer. Not for raising new questions or editing answered ones.
|
|
4
|
+
argument-hint: "<qid> \"<answer>\" | --drop <qid> [\"<reason>\"] | --batch <path-to-yaml>"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /rite-resolve — answer the human gate
|
|
9
|
+
|
|
10
|
+
`/rite-resolve` is the canonical resume verb for **async** human gates — a checkpoint that
|
|
11
|
+
already paused and **stopped the session** (an AFK blocking/escalating/irreversible queue, or a
|
|
12
|
+
HITL pause the human walked away from), plus `--batch`. When `/rite-build` asks a gap **inline**
|
|
13
|
+
via `AskUserQuestion` and the human is present, that pick resolves the gate **in place** through
|
|
14
|
+
the same `resolve.sh` writer — you don't type `/rite-resolve` for it. For the async case this
|
|
15
|
+
skill takes the human's answer (or `--drop` / `--batch`), writes it to `questions.md`, updates
|
|
16
|
+
`state.md` (clears `Awaiting human`, sets `Status: running`), and recommends the next command.
|
|
17
|
+
|
|
18
|
+
It is **deliberately small**: one verb, one source of truth (`questions.md`), one cursor
|
|
19
|
+
(`state.md`). The full AFK / HITL contract lives in
|
|
20
|
+
[`afk-hitl.md`](../../rules/afk-hitl.md).
|
|
21
|
+
|
|
22
|
+
## Rules consulted (read on demand from `.claude/rules/`)
|
|
23
|
+
|
|
24
|
+
Read `.claude/rules/core.md` first. Then pull these via `Read` when shaping the resolve:
|
|
25
|
+
|
|
26
|
+
- `afk-hitl.md` — gate taxonomy, `questions.md` schema, AFK exception rules.
|
|
27
|
+
- `documentation.md` — record decisions and rationale where the answer changes scope.
|
|
28
|
+
|
|
29
|
+
## Operating rules
|
|
30
|
+
|
|
31
|
+
- **Requires an active workspace.** Read `.devrites/ACTIVE` first; if empty or the slug
|
|
32
|
+
has no `questions.md`, **STOP** and tell the user to run `/rite-spec <feature>` first.
|
|
33
|
+
- **One mutation per call.** A single qid (or `--batch` file) per invocation; never
|
|
34
|
+
silently coalesce multiple human decisions into one log entry.
|
|
35
|
+
- **Never overwrite an answered question.** If the qid's `status` is `answered` or
|
|
36
|
+
`dropped`, refuse with the existing answer; ask the user to open a new qid that
|
|
37
|
+
references the old one (the file is the audit trail).
|
|
38
|
+
- **If the answer materially changes scope, architecture, or acceptance**, route it
|
|
39
|
+
through the Spec Drift Guard (`/rite-plan repair`) **after** writing the answer — do
|
|
40
|
+
not modify `spec.md` / `plan.md` inside this skill.
|
|
41
|
+
- **The script is the source of truth.** Always invoke
|
|
42
|
+
`devrites-lib/scripts/resolve.sh` — it keeps `questions.md` + `state.md` consistent and emits the
|
|
43
|
+
next-action recommendation. The one `state.md` field this skill may write by hand is the
|
|
44
|
+
unblocked slice's `Slice mode` (step 4, the named exception); everything else goes through
|
|
45
|
+
the script, never by hand.
|
|
46
|
+
- **Human gates are for human-only decisions, not the agent's work.** A `questions.md` entry the
|
|
47
|
+
human must answer is a genuine *decision* (a scope / design / risk call only the human can make)
|
|
48
|
+
— not a task the agent can do itself. If a question is really agent-doable ("should I write the
|
|
49
|
+
test?", "go implement X"), don't record a human answer that punts the agent's own job back to it:
|
|
50
|
+
flag the mis-tag and route it to the right skill (`/rite-build`, `/rite-plan unblock`,
|
|
51
|
+
`devrites-debug-recovery`). The human resolves decisions; the agent does the work.
|
|
52
|
+
|
|
53
|
+
## Workflow
|
|
54
|
+
|
|
55
|
+
0. **Read `.claude/rules/core.md`** (operating rules + persistence discipline) before
|
|
56
|
+
touching the workspace.
|
|
57
|
+
Then **run the shared orientation preamble** — it prints `state.md`, the artifacts present,
|
|
58
|
+
the run mode (HITL/AFK), and the open-question tally by gate, so you orient deterministically
|
|
59
|
+
instead of re-deriving state from raw Markdown:
|
|
60
|
+
```bash
|
|
61
|
+
P=.claude/skills/devrites-lib/scripts/preamble.sh
|
|
62
|
+
[ -f "$P" ] || P="${CLAUDE_SKILL_DIR:-}/../devrites-lib/scripts/preamble.sh"
|
|
63
|
+
[ -f "$P" ] || P=pack/.claude/skills/devrites-lib/scripts/preamble.sh
|
|
64
|
+
[ -f "$P" ] && bash "$P" || echo "(orientation preamble unavailable on this install — read state.md directly to orient)"
|
|
65
|
+
```
|
|
66
|
+
1. **Parse arguments.** `$ARGUMENTS` is one of:
|
|
67
|
+
- `<qid> "<answer>"` — answer the single open question.
|
|
68
|
+
- `--drop <qid>` (optional `"<reason>"`) — mark the question `dropped`; record
|
|
69
|
+
the reason inline.
|
|
70
|
+
- `--batch <path-to-yaml>` — bulk resolve, one entry per qid (see
|
|
71
|
+
[`reference/answer-protocol.md`](reference/answer-protocol.md) for the batch
|
|
72
|
+
format).
|
|
73
|
+
2. **Load context.** Read `state.md`, `questions.md`, and the relevant slice from
|
|
74
|
+
`tasks.md`. Confirm the qid is `status: open`. If `state.md` `Status` is not
|
|
75
|
+
`awaiting_human` and the question's `gate` is `blocking`, surface the inconsistency
|
|
76
|
+
before proceeding (don't auto-repair — flag it).
|
|
77
|
+
3. **Render preview.** Echo the qid, the question, the proposed answer (if any), the
|
|
78
|
+
user's answer, and which slice unblocks. Stop here and ask `confirm? (y/N)` **unless**
|
|
79
|
+
the answer was provided non-interactively via `--batch`.
|
|
80
|
+
4. **Mutate.** Run `bash .claude/skills/devrites-lib/scripts/resolve.sh` with the same
|
|
81
|
+
arguments. The script:
|
|
82
|
+
- flips the qid's `status` to `answered` / `dropped` and stamps `answered_at` + `answer`;
|
|
83
|
+
- if the qid is in `state.md`'s `Awaiting human` block (single-question pause), clears
|
|
84
|
+
that block and sets `Status: running`;
|
|
85
|
+
- appends a `Log` line to `state.md`.
|
|
86
|
+
|
|
87
|
+
On resume, also clear or update the unblocked slice's `Slice mode` in `state.md`: if
|
|
88
|
+
the answer lets the slice proceed, drop the pause-time `Slice mode` so `/rite-build`
|
|
89
|
+
re-derives it on the next selection; if the answer re-shapes how the slice should be
|
|
90
|
+
built, set `Slice mode` to match.
|
|
91
|
+
5. **Post-resolve hand-off.** If the answer changes product behavior or acceptance →
|
|
92
|
+
recommend `/rite-plan repair`. Otherwise → recommend the slice's natural next action
|
|
93
|
+
(typically `/rite-build` for the slice that was awaiting).
|
|
94
|
+
6. **STOP.** This skill does not run `/rite-build` itself — the user re-enters the
|
|
95
|
+
workflow explicitly.
|
|
96
|
+
|
|
97
|
+
> **Mid-flight discipline.** Don't edit `spec.md` / `plan.md` to "incorporate" the
|
|
98
|
+
> answer — that's `/rite-plan repair`. Don't silently retry a build after the answer
|
|
99
|
+
> lands — the user types the next command. Don't merge two open questions into one
|
|
100
|
+
> answered entry — each question is independently auditable.
|
|
101
|
+
|
|
102
|
+
## Output
|
|
103
|
+
|
|
104
|
+
**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:
|
|
105
|
+
```
|
|
106
|
+
Resolved: <qid> (<gate>, slice <N>)
|
|
107
|
+
Answer: <one-line summary>
|
|
108
|
+
Workspace updates:
|
|
109
|
+
- questions.md: q-... status open → answered
|
|
110
|
+
- state.md: Awaiting human cleared; Status running
|
|
111
|
+
Next: <recommended command — usually /rite-build or /rite-plan repair>
|
|
112
|
+
↻ Hygiene: no /clear needed (read-only on code; the answer is now persisted).
|
|
113
|
+
```
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Answer protocol — how `/rite-resolve` mutates the workspace
|
|
2
|
+
|
|
3
|
+
`/rite-resolve` is the single canonical writer for `questions.md` `status` flips and
|
|
4
|
+
`state.md` `Awaiting human` clearance. This file is the reference for the three input
|
|
5
|
+
shapes, the batch file format, and the rules the underlying `devrites-lib/scripts/resolve.sh` obeys.
|
|
6
|
+
|
|
7
|
+
## Three input shapes
|
|
8
|
+
|
|
9
|
+
### 1. Single answer
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/rite-resolve q-2026-05-28-001 "composite index — single key is fine for now, revisit at 1M rows"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- The qid must be `status: open`. Re-answering is refused (see "Never overwrite").
|
|
16
|
+
- The answer is recorded verbatim. Use straight quotes around the answer so the shell
|
|
17
|
+
preserves whitespace.
|
|
18
|
+
|
|
19
|
+
### 2. Drop
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/rite-resolve --drop q-2026-05-28-002 "merged into q-...-003 after we narrowed the scope"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- A drop is **not** an answer — it removes the question from the active queue without
|
|
26
|
+
recording a decision. Use it when the question is obsolete, a duplicate, or absorbed
|
|
27
|
+
by a re-plan.
|
|
28
|
+
- The reason is required as a single trailing string. "obsolete" / "duplicate" /
|
|
29
|
+
"absorbed by Slice N" are sufficient — but never blank.
|
|
30
|
+
|
|
31
|
+
### 3. Batch
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
/rite-resolve --batch .devrites/work/<slug>/answers.batch
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The batch file is plain text, one resolution per line. Two line shapes:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
q-2026-05-28-001: composite index, revisit at 1M rows
|
|
41
|
+
q-2026-05-28-002: clinician sign-off required at runtime, not at plan time
|
|
42
|
+
--drop q-2026-05-28-003: merged into q-...-004
|
|
43
|
+
# Lines starting with # are comments. Blank lines ignored.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- One qid per line. The first colon is the separator; the rest of the line is the value.
|
|
47
|
+
- Order matters only for `state.md` clearance — the script processes top-to-bottom and
|
|
48
|
+
flushes `Awaiting human` after each match.
|
|
49
|
+
- Errors abort the batch at the first failing line so partial state is small and
|
|
50
|
+
diagnosable. (Re-run after fixing the offending line; already-applied lines refuse to
|
|
51
|
+
re-apply because their `status` is no longer `open`.)
|
|
52
|
+
|
|
53
|
+
## Never overwrite
|
|
54
|
+
|
|
55
|
+
A qid that is already `answered` or `dropped` refuses to be re-resolved. The audit trail
|
|
56
|
+
is the file — you do not edit history. If the original answer was wrong:
|
|
57
|
+
|
|
58
|
+
1. Open a new qid (the agent will, during the next `/rite-build` if the bad answer
|
|
59
|
+
re-surfaces; or you write it manually).
|
|
60
|
+
2. Reference the old qid in the new question's body (`supersedes: q-...-001`).
|
|
61
|
+
3. Resolve the new qid.
|
|
62
|
+
|
|
63
|
+
The same rule applies to `--drop`: a dropped question is not undropped. Re-raise it as
|
|
64
|
+
a new qid if it turns out to matter after all.
|
|
65
|
+
|
|
66
|
+
## State machine
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
open ──answer──▶ answered (terminal)
|
|
70
|
+
│
|
|
71
|
+
└──drop────▶ dropped (terminal)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Both terminals stamp `answered_at: <iso>` and write the answer/reason to `answer:`.
|
|
75
|
+
|
|
76
|
+
## `state.md` clearance rules
|
|
77
|
+
|
|
78
|
+
`state.md`'s `Awaiting human` block is **single-question by default** — `/rite-build`
|
|
79
|
+
writes one block at a time and pauses. When `/rite-resolve` matches the block's qid:
|
|
80
|
+
|
|
81
|
+
- the entire `Awaiting human` block is removed (header + fields);
|
|
82
|
+
- `- Status: running` is set;
|
|
83
|
+
- a `Log` line is appended: `- <iso> build: resolved <qid>`.
|
|
84
|
+
|
|
85
|
+
If `state.md`'s `Status` is `awaiting_human` but no `Awaiting human` block matches the
|
|
86
|
+
qid (drift between the two files), `/rite-resolve` flags the inconsistency and refuses
|
|
87
|
+
to silently fix it. Use `/rite-plan repair` to reconcile.
|
|
88
|
+
|
|
89
|
+
If the answer materially changes spec/plan, **do not** edit `spec.md` or `plan.md` inside
|
|
90
|
+
`/rite-resolve` — that's `/rite-plan repair`'s job. The skill's post-resolve hand-off
|
|
91
|
+
recommends `/rite-plan repair` whenever the answer touches acceptance criteria, scope,
|
|
92
|
+
or architecture.
|
|
93
|
+
|
|
94
|
+
## Multi-question awaiting
|
|
95
|
+
|
|
96
|
+
If a future evolution lets `/rite-build` queue multiple questions per pause, the
|
|
97
|
+
`Awaiting human` block becomes a YAML list. `/rite-resolve` will:
|
|
98
|
+
|
|
99
|
+
- match the qid in the list and remove only that entry;
|
|
100
|
+
- leave the rest of the list intact;
|
|
101
|
+
- flip `Status: running` only when the list is empty.
|
|
102
|
+
|
|
103
|
+
This shape is reserved — current `/rite-build` writes one question per pause.
|
|
104
|
+
|
|
105
|
+
## Why no auto-`/rite-build` after resolve
|
|
106
|
+
|
|
107
|
+
The user types the next command explicitly. Reasons:
|
|
108
|
+
|
|
109
|
+
1. The answer may need a `/rite-plan repair` first; auto-continuing would build against
|
|
110
|
+
a stale plan.
|
|
111
|
+
2. The user may want to `/rite-status` before resuming.
|
|
112
|
+
3. Atomicity: one verb, one mutation. Chaining is a hidden side-effect that hides bugs.
|
|
113
|
+
|
|
114
|
+
The output's `Next:` line is a recommendation, not an auto-run.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rite-review
|
|
3
|
+
description: Feature-scoped multi-axis review of the polished diff — Spec + Code-review axes fan out as parallel subagents; findings under one severity scale. Use when the user says "review this", "audit my diff", "final review before seal", "check this against the spec". Not for whole-project refactors or single-slice review.
|
|
4
|
+
argument-hint: "[scope: slice N | feature]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /rite-review — feature-scoped review
|
|
9
|
+
|
|
10
|
+
Senior review of the **active feature scope only**. **Read the active workspace first**;
|
|
11
|
+
if none, tell the user to run `/rite-spec <feature>`.
|
|
12
|
+
|
|
13
|
+
> **Differs from built-in `/code-review` in:** `/code-review` is a generic
|
|
14
|
+
> diff review with no workspace context. `/rite-review` reads
|
|
15
|
+
> `.devrites/work/<slug>/spec.md` first, runs Spec ↔ Code-review axes as
|
|
16
|
+
> parallel subagents (see [`reference/parallel-dispatch.md`](reference/parallel-dispatch.md)), and gates feeding
|
|
17
|
+
> into `/rite-seal`. Use `/code-review` for a one-off diff; use
|
|
18
|
+
> `/rite-review` for a DevRites feature where the spec is the contract.
|
|
19
|
+
|
|
20
|
+
## Rules consulted (read on demand from `.claude/rules/`)
|
|
21
|
+
**Step 0:** Read `.claude/rules/core.md` first. The other rule files load on demand;
|
|
22
|
+
pull these via `Read` when the diff demands them:
|
|
23
|
+
- `code-review.md` — small PRs, severity labels, tests-first review focus.
|
|
24
|
+
- `testing.md` — confirm the tests prove the spec, not just pass.
|
|
25
|
+
- `agents.md` — when to fan out to which review subagent.
|
|
26
|
+
- `security.md` — when input / auth / data / integrations / secrets are in scope.
|
|
27
|
+
- `performance.md` — only when perf is relevant or a regression risk is visible.
|
|
28
|
+
|
|
29
|
+
## Operating rules
|
|
30
|
+
- **Feature scope only.** Review touched files + the diff. **NO whole-project refactors,
|
|
31
|
+
NO drive-by cleanup.** DO NOT delete suspected dead code outside this feature without
|
|
32
|
+
asking. Spec Drift Guard applies.
|
|
33
|
+
- **Reviews the finished product.** `/rite-polish` has already done **code simplification**
|
|
34
|
+
+ UI normalize/polish. Review judges; if it reveals a real complexity issue polish
|
|
35
|
+
missed, flag it as a finding — don't re-run a simplification sweep here.
|
|
36
|
+
- Findings are labeled (below). Re-prove after any change you make.
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
0. Read `.claude/rules/core.md` first (the always-on operating rules); pull the
|
|
40
|
+
on-demand rules above as the diff demands them.
|
|
41
|
+
Then **run the shared orientation preamble** — it prints `state.md`, the artifacts present,
|
|
42
|
+
the run mode (HITL/AFK), and the open-question tally by gate, so you orient deterministically
|
|
43
|
+
instead of re-deriving state from raw Markdown:
|
|
44
|
+
```bash
|
|
45
|
+
P=.claude/skills/devrites-lib/scripts/preamble.sh
|
|
46
|
+
[ -f "$P" ] || P="${CLAUDE_SKILL_DIR:-}/../devrites-lib/scripts/preamble.sh"
|
|
47
|
+
[ -f "$P" ] || P=pack/.claude/skills/devrites-lib/scripts/preamble.sh
|
|
48
|
+
[ -f "$P" ] && bash "$P" || echo "(orientation preamble unavailable on this install — read state.md directly to orient)"
|
|
49
|
+
```
|
|
50
|
+
1. Read `spec.md`, `tasks.md`, `state.md`, `decisions.md`, `evidence.md`,
|
|
51
|
+
`touched-files.md`, and the `git diff`. For "what would this change break"
|
|
52
|
+
questions, prefer a code-intelligence index if available — codebase-memory-mcp first,
|
|
53
|
+
cross-checked with codegraph + graphify, else standard methods (LSP / Read/Grep/Glob); see
|
|
54
|
+
`.claude/rules/tooling.md` — over file reads;
|
|
55
|
+
they answer impact/callers in one call. When a finding hinges on an external library's
|
|
56
|
+
current API, context7 if available can confirm the signature.
|
|
57
|
+
2. **Review tests first** — do they actually prove the acceptance criteria? Missing,
|
|
58
|
+
weak, or wrong tests are the first findings.
|
|
59
|
+
3. **Spec ↔ Code-review split (parallel sub-agents, fresh context).** A change can pass
|
|
60
|
+
one axis and fail the other — code that follows every project standard but
|
|
61
|
+
implements the wrong thing (Code-review pass, Spec fail), or code that does exactly
|
|
62
|
+
what the spec asked but breaks project conventions (Spec pass, Code-review fail).
|
|
63
|
+
Running them serially in one context lets one mask the other. So:
|
|
64
|
+
- Dispatch **two** read-only reviewers in **parallel** via the `Task` tool, each
|
|
65
|
+
with its own narrow brief and no cross-pollination:
|
|
66
|
+
- **Spec axis** → `devrites-spec-reviewer`: "Apply your documented discipline on
|
|
67
|
+
the active feature workspace + diff. Report (a) criteria the spec asked for that
|
|
68
|
+
are missing or partial, (b) behaviour in the diff the spec did not ask for
|
|
69
|
+
(scope creep / drift), (c) criteria implemented incorrectly. Quote the spec
|
|
70
|
+
line per finding."
|
|
71
|
+
- **Code-review axis** → `devrites-code-reviewer`: "Apply your full documented
|
|
72
|
+
discipline (tests-first, correctness, readability, architecture, maintainability,
|
|
73
|
+
standards) on the active feature workspace + diff. Cite file:line per finding;
|
|
74
|
+
skip what tooling already enforces. Also flag the AI-codegen smells (silent/empty
|
|
75
|
+
catch, defensive try-catch bloat + redundant logging, single-use factory / needless
|
|
76
|
+
indirection, dependency creep where an in-repo option exists, a 100-line function
|
|
77
|
+
where 20 would do) and the silent-failure bugs (a missing value coerced to 0/''/[],
|
|
78
|
+
a dropped Result/err return, off-by-one / boundary, logic that contradicts the
|
|
79
|
+
comment/docstring/name). Per hunk, check whether working code was deleted that the
|
|
80
|
+
task did not ask to remove."
|
|
81
|
+
- **Do NOT merge or re-rank** their findings. Present them under separate
|
|
82
|
+
`## Spec` and `## Code review` sub-sections in `review.md`. Surface contradictions
|
|
83
|
+
between the axes explicitly (e.g. "Spec axis says complete, Code-review axis says
|
|
84
|
+
untestable") — `/rite-seal` decides what blocks.
|
|
85
|
+
4. **Reconcile, don't re-review.** With the two parallel reports in hand, the inline
|
|
86
|
+
lead reconciles — it does **not** re-run a five-axis pass over correctness /
|
|
87
|
+
readability / architecture / maintainability that `devrites-code-reviewer` already
|
|
88
|
+
covered. Stay in scope ([feature-scoped-review](reference/feature-scoped-review.md)).
|
|
89
|
+
Add only what the dispatched agents could not, then resolve overlaps and
|
|
90
|
+
contradictions before labeling. ([five-axis-review](reference/five-axis-review.md)
|
|
91
|
+
documents the axes the code-review agent applies.)
|
|
92
|
+
- **UI feature?** Apply the **UX rubric**
|
|
93
|
+
([nielsen-heuristics](reference/nielsen-heuristics.md)) and the
|
|
94
|
+
**cognitive-load lens** ([cognitive-load](reference/cognitive-load.md)) on the
|
|
95
|
+
UX axis — surface heuristics scoring ≤ 2 and any cognitive-load findings
|
|
96
|
+
(extraneous noise, missing progressive disclosure, vocabulary drift) at the
|
|
97
|
+
appropriate severity.
|
|
98
|
+
5. **Security** — apply `devrites-audit security`
|
|
99
|
+
([security-review](reference/security-review.md)) when user input, auth, data
|
|
100
|
+
storage, external integrations, secrets, or permissions are involved.
|
|
101
|
+
6. **Performance** — apply `devrites-audit perf`
|
|
102
|
+
([performance-review](reference/performance-review.md)) only when performance is
|
|
103
|
+
relevant or a regression risk is visible (measure first).
|
|
104
|
+
7. Apply only in-scope fixes; **run verification after changes** (`/rite-prove` logic).
|
|
105
|
+
8. Update `review.md`, `evidence.md`, and `state.md`.
|
|
106
|
+
|
|
107
|
+
## Finding labels
|
|
108
|
+
- **Critical** — must fix before seal (correctness/security/data loss).
|
|
109
|
+
- **Important** — should fix before seal (likely bug, real maintainability risk).
|
|
110
|
+
- **Suggestion** — worth doing, not blocking.
|
|
111
|
+
- **Nit** — trivial/style.
|
|
112
|
+
- **FYI** — context, no action implied.
|
|
113
|
+
|
|
114
|
+
**Action decoration (orthogonal to severity).** Also tag each finding with how to act on it:
|
|
115
|
+
`blocking` (fix before seal), `non-blocking` (fix when convenient), or `if-minor` (fix only if the
|
|
116
|
+
change is already small — a pure noise-economics lever). Only a **`blocking` Critical** gates the
|
|
117
|
+
seal; a `non-blocking` / `if-minor` finding is recorded, not a stop.
|
|
118
|
+
|
|
119
|
+
## Confidence + signal-to-noise
|
|
120
|
+
Borrow `/rite-vet`'s discipline so review stays **trusted, not noisy** — a reviewer that posts
|
|
121
|
+
18 comments per PR teaches the team to ignore every one (below ~10% false-positive rate devs
|
|
122
|
+
investigate each finding; past ~30% they label the tool noisy and skip it):
|
|
123
|
+
- **Confidence-band each finding** (1–10) and state the band. A low-confidence finding (≤4)
|
|
124
|
+
you can't verify against the code is **suppressed** — roll it into one `Suppressed
|
|
125
|
+
(low-confidence): n` line, never raised as Critical/Important.
|
|
126
|
+
- **Verify before you escalate.** Every Critical/Important quotes the spec line or cites the
|
|
127
|
+
`file:line` that proves it — no unverified blockers.
|
|
128
|
+
- **Budget the noise.** Roll up trivia ("N style nits") into a single line; tooling already
|
|
129
|
+
catches style. Review's job is correctness + spec fidelity, not a lint dump.
|
|
130
|
+
|
|
131
|
+
## Severity orientation (labels, not score)
|
|
132
|
+
|
|
133
|
+
After labeling, summarize findings as `Critical / Important / Suggestion / Nit /
|
|
134
|
+
FYI` counts. There is no composite number — `/rite-seal` gates on
|
|
135
|
+
`Critical == 0` and on acceptance + drift. Inventing a number invites gaming;
|
|
136
|
+
the labels do the work.
|
|
137
|
+
|
|
138
|
+
> **Mid-flight discipline.** When tempted to demote a Critical, hide a finding, fix without re-verification, or wander out of scope — see [`anti-patterns`](reference/anti-patterns.md). Load it the moment you reach for the excuse.
|
|
139
|
+
|
|
140
|
+
## Output → `review.md`
|
|
141
|
+
|
|
142
|
+
**Footer first (to chat, not into the report file)** — 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`). Then write the report:
|
|
143
|
+
```
|
|
144
|
+
Reviewed: <slice N | feature>
|
|
145
|
+
Tests: <adequate? gaps>
|
|
146
|
+
Kept (≤1, specific): <one concrete decision worth protecting from later churn | omit>
|
|
147
|
+
|
|
148
|
+
## Spec (from devrites-spec-reviewer sub-agent, verbatim)
|
|
149
|
+
- <quoted spec line> — <missing / partial / wrong / scope-creep> — <where>
|
|
150
|
+
- ...
|
|
151
|
+
|
|
152
|
+
## Code review (from devrites-code-reviewer sub-agent, verbatim)
|
|
153
|
+
- <file:line> — <violation / correctness / readability / architecture / maintainability> — <fix>
|
|
154
|
+
- ...
|
|
155
|
+
|
|
156
|
+
## Cross-axis contradictions (if any)
|
|
157
|
+
- Spec axis: ... | Code-review axis: ... | who decides at seal: ...
|
|
158
|
+
|
|
159
|
+
Findings (combined, after the parallel pass):
|
|
160
|
+
[Critical] <n> — <file:line — problem — fix>
|
|
161
|
+
[Important] <n> — <file:line — problem — fix>
|
|
162
|
+
[Suggestion] <n> — <file:line — problem — fix>
|
|
163
|
+
[Nit] <n> — <file:line — problem — fix>
|
|
164
|
+
[FYI] <n> — <file:line — note>
|
|
165
|
+
Fixes applied (in scope): ...
|
|
166
|
+
Re-verification: <cmd → pass/fail>
|
|
167
|
+
Re-prove: <if review changed code, run a scoped `/rite-prove` so evidence post-dates the fix | n/a — no code changed>
|
|
168
|
+
Next: /rite-seal (or fix Criticals first)
|
|
169
|
+
↻ Hygiene: /compact (review findings) if fixing Criticals/Importants this session; /clear if review is clean — see rules/context-hygiene.md.
|
|
170
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# rite-review — anti-patterns
|
|
2
|
+
|
|
3
|
+
Load this when standing a non-trivial review decision, when tempted to
|
|
4
|
+
demote severity to hide a finding, or when crossing out of feature scope.
|
|
5
|
+
|
|
6
|
+
Pack-wide rationalizations + red flags: see
|
|
7
|
+
[rules/anti-patterns.md](../../../rules/anti-patterns.md).
|
|
8
|
+
|
|
9
|
+
## Phase-specific rationalizations
|
|
10
|
+
|
|
11
|
+
| Excuse | Rebuttal |
|
|
12
|
+
|---|---|
|
|
13
|
+
| "Polish already cleaned this up; nothing to flag." | Polish finishes; review judges. If review still spots a real issue, flag it — don't re-run polish here. |
|
|
14
|
+
| "Tests pass, so they're adequate." | Adequacy = do they prove acceptance, including failure / boundary / empty paths? A passing test is not automatically a good test. |
|
|
15
|
+
| "Security audit isn't needed for this feature." | If the feature touches user input, auth, data storage, external integrations, secrets, or permissions — yes it is. |
|
|
16
|
+
| "I'll just fix everything I find in scope." | Some fixes belong in `/rite-plan` as drift, not as smuggled redesigns inside review. |
|
|
17
|
+
| "Performance is fine without measuring." | No claim without a number or a specified measurement. "Feels fast" is not a finding. |
|
|
18
|
+
|
|
19
|
+
## Severity gaming
|
|
20
|
+
|
|
21
|
+
| Excuse | Rebuttal |
|
|
22
|
+
|---|---|
|
|
23
|
+
| "Demoting a Critical to Important keeps the review clean." | Severity reflects the actual risk to ship — not the review you'd like. |
|
|
24
|
+
| "I won't surface this Critical; user can find it later." | Hidden Criticals are the worst-case play. The seal blocks anyway, and now you've burned trust. |
|
|
25
|
+
|
|
26
|
+
## Red Flags
|
|
27
|
+
|
|
28
|
+
- A finding without `file:line`.
|
|
29
|
+
- A finding without a severity label (Critical / Important / Suggestion / Nit / FYI).
|
|
30
|
+
- A Critical recorded but silently fixed instead of surfaced to the seal.
|
|
31
|
+
- A fix applied without re-verification afterwards.
|
|
32
|
+
- Review crossing into out-of-scope files because they "looked wrong".
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Cognitive load — a UX review lens
|
|
2
|
+
|
|
3
|
+
Cognitive load is the total mental effort the interface demands. Overloaded users
|
|
4
|
+
hesitate, misclick, abandon. Reviewing UI without this lens misses a whole class of
|
|
5
|
+
defects that no a11y checker or perf tool will flag.
|
|
6
|
+
|
|
7
|
+
DevRites' `/rite-review` uses this reference when the feature touches UI. It is
|
|
8
|
+
descriptive (helps you spot defects) rather than scored — findings raised here
|
|
9
|
+
roll up under the UX axis of the multi-axis review with the usual severity labels.
|
|
10
|
+
|
|
11
|
+
## Three kinds of load
|
|
12
|
+
|
|
13
|
+
| Type | Source | Reviewer's job |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| **Intrinsic** | The task itself — its inherent steps, decisions, and required knowledge. | Can't be eliminated, only **structured**: step the user through it, provide defaults, group related decisions, defer what isn't needed yet. |
|
|
16
|
+
| **Extraneous** | Bad design — friction the task doesn't require: noisy hierarchy, redundant choices, jargon, layout that hides the next step. | **Eliminate it ruthlessly.** It's pure waste, and the easiest class of finding to land. |
|
|
17
|
+
| **Germane** | Effort the user spends *forming a mental model* of the product. | **Invest deliberately.** Consistent flows, shared vocabulary, predictable affordances — anything that lets the user re-use what they already learned. |
|
|
18
|
+
|
|
19
|
+
A surface can be intrinsic-heavy *and* extraneously-fine — that's a hard task done
|
|
20
|
+
right. A simple surface that still feels heavy is extraneous load disguised as
|
|
21
|
+
"complexity."
|
|
22
|
+
|
|
23
|
+
## Symptoms reviewers should flag
|
|
24
|
+
|
|
25
|
+
Treat each as a finding when present; classify by load type so the fix is obvious.
|
|
26
|
+
|
|
27
|
+
### Extraneous (reduce / remove)
|
|
28
|
+
- **Visual noise** that doesn't earn its place: redundant borders, shadows,
|
|
29
|
+
dividers, gratuitous icons next to every label, colour used decoratively.
|
|
30
|
+
- **Competing primary actions** — two or three buttons of equal weight when one
|
|
31
|
+
is clearly the next step.
|
|
32
|
+
- **Jargon and abbreviations** the user doesn't share — names from the codebase
|
|
33
|
+
or internal team that leaked into the UI.
|
|
34
|
+
- **Restated headings** (the body of a section repeats the section title in
|
|
35
|
+
long-form).
|
|
36
|
+
- **Decision paralysis** — too many options when one default + a "more options"
|
|
37
|
+
toggle would do.
|
|
38
|
+
- **Form fields without obvious priority** — required vs optional, primary vs
|
|
39
|
+
secondary mixed in a single column with no rhythm.
|
|
40
|
+
- **Premature error messaging** (validation that fires before the user has
|
|
41
|
+
finished typing).
|
|
42
|
+
|
|
43
|
+
### Intrinsic (structure, don't try to eliminate)
|
|
44
|
+
- **No progressive disclosure** on a genuinely complex task — every field
|
|
45
|
+
visible at once because "the user might need it".
|
|
46
|
+
- **No safe defaults** on multi-step flows — the user has to choose at every step
|
|
47
|
+
even when one path is the obvious answer.
|
|
48
|
+
- **Decisions grouped wrong** — "billing address" sandwiched between two
|
|
49
|
+
unrelated sections rather than next to "shipping address".
|
|
50
|
+
- **No scaffolding** (no template, no example input, no recently-used value)
|
|
51
|
+
for tasks that have a high blank-page cost.
|
|
52
|
+
|
|
53
|
+
### Germane (invest in)
|
|
54
|
+
- **Inconsistent vocabulary** across the feature — same concept named two ways
|
|
55
|
+
(e.g. "member" in one screen, "user" in the next).
|
|
56
|
+
- **Flow-shape divergence** from neighbouring features (modal where the project
|
|
57
|
+
uses inline; route-change where the project uses an overlay).
|
|
58
|
+
- **Affordances that look interactive but aren't** (and vice versa) — destroys
|
|
59
|
+
the mental model the user is trying to build.
|
|
60
|
+
|
|
61
|
+
## Reviewing a flow — three-pass discipline
|
|
62
|
+
|
|
63
|
+
1. **First pass: silent.** Walk the flow without reading any explainer copy.
|
|
64
|
+
Anything that stops you cold without copy is a finding — either extraneous
|
|
65
|
+
load you can't dismiss, or a germane-load problem (the user is missing a
|
|
66
|
+
mental model the UI assumes).
|
|
67
|
+
2. **Second pass: with copy.** Read every label, helper, and error. Does the
|
|
68
|
+
copy resolve the friction the first pass surfaced, or just paper over it?
|
|
69
|
+
"Tooltip explaining a confusing button" is rarely the right fix — usually
|
|
70
|
+
the button needs a different label.
|
|
71
|
+
3. **Third pass: empty + error.** Run the flow with no data, partial data, and
|
|
72
|
+
the worst inputs (offline / 500 / permission-denied). Most cognitive-load
|
|
73
|
+
defects hide in non-happy paths because nobody designs them.
|
|
74
|
+
|
|
75
|
+
## The cheap-fix test
|
|
76
|
+
|
|
77
|
+
If a finding would take more than 30 minutes to fix, classify it (token gap /
|
|
78
|
+
component miss / flow misalignment per `rite-polish/reference/ui.md`) and
|
|
79
|
+
route to the appropriate bucket. Cognitive-load review surfaces problems; it
|
|
80
|
+
doesn't decide the rewrite strategy.
|
|
81
|
+
|
|
82
|
+
## What this lens **doesn't** cover
|
|
83
|
+
|
|
84
|
+
- **Accessibility** — separate axis (WCAG 2.2; see `quality-standards.md`).
|
|
85
|
+
- **Performance** — separate axis (Core Web Vitals; see `quality-standards.md`).
|
|
86
|
+
- **Code quality** — covered by the simplification audit
|
|
87
|
+
(`devrites-audit simplify`).
|
|
88
|
+
- **Security** — covered by the security audit (`devrites-audit security`).
|
|
89
|
+
|
|
90
|
+
Cognitive-load findings live on the **UX axis** of the multi-axis review.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Feature-scoped review
|
|
2
|
+
|
|
3
|
+
The review boundary is the **active feature**: the files in `touched-files.md` and the
|
|
4
|
+
current diff. This is a hard rule, not a guideline.
|
|
5
|
+
|
|
6
|
+
## In scope
|
|
7
|
+
- Code added/changed by this feature.
|
|
8
|
+
- Tests for this feature.
|
|
9
|
+
- Files this feature intentionally inspected and depends on (read for context, but
|
|
10
|
+
don't refactor them).
|
|
11
|
+
|
|
12
|
+
## Out of scope (do NOT)
|
|
13
|
+
- Refactor unrelated modules because they're "nearby" or "while we're here".
|
|
14
|
+
- Delete suspected dead code outside this feature without asking the user.
|
|
15
|
+
- Restyle/upgrade dependencies or change project-wide config to suit this feature.
|
|
16
|
+
- Expand the review into a project audit.
|
|
17
|
+
|
|
18
|
+
## When you spot a real problem outside scope
|
|
19
|
+
Record it as an **[FYI] follow-up** in `review.md` (and suggest a separate feature/issue)
|
|
20
|
+
— don't fix it inline. Drive-by changes balloon the diff, dodge their own review, and
|
|
21
|
+
mix concerns the seal can't cleanly evaluate.
|
|
22
|
+
|
|
23
|
+
## Why scope discipline matters
|
|
24
|
+
A tight diff gets a real review; a sprawling one gets a rubber stamp. Scope creep is how
|
|
25
|
+
"a small fix" becomes an unreviewable, unprovable change. Keep the feature shippable and
|
|
26
|
+
the review honest.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Five-axis review
|
|
2
|
+
|
|
3
|
+
The axes the dispatched `devrites-code-reviewer` applies to the diff (tests first
|
|
4
|
+
— always), under one severity scale (Critical / Important / Suggestion / Nit / FYI).
|
|
5
|
+
The `/rite-review` inline lead **reconciles** the returned report against the Spec
|
|
6
|
+
axis — it does not re-run these axes itself. This file is the shared definition of
|
|
7
|
+
what "full code-review discipline" covers; use it to judge whether the agent's report
|
|
8
|
+
is complete, and to scope anything the agent could not (e.g. UI-only lenses below).
|
|
9
|
+
|
|
10
|
+
## 0. Tests (first)
|
|
11
|
+
- Do tests exist for the changed behavior, and do they prove the acceptance criteria?
|
|
12
|
+
- Would they fail if the code were wrong? (No assertion-free or tautological tests.)
|
|
13
|
+
- Edge cases: empty, boundary, error, permission-denied, concurrency.
|
|
14
|
+
|
|
15
|
+
## 1. Correctness
|
|
16
|
+
- Does it do what the spec says? Off-by-one, null/undefined, error paths, race
|
|
17
|
+
conditions, incorrect assumptions about inputs.
|
|
18
|
+
- Does it handle the states the slice promised (loading/empty/error for UI)?
|
|
19
|
+
|
|
20
|
+
## 2. Readability
|
|
21
|
+
- Can the next engineer understand it without the author? Naming, function length,
|
|
22
|
+
nesting depth, comments that explain *why* not *what*.
|
|
23
|
+
|
|
24
|
+
## 3. Architecture
|
|
25
|
+
- Right seam/boundary? Coupling and cohesion. Does it fit existing patterns or
|
|
26
|
+
introduce a competing one? Is the abstraction earned (not premature)?
|
|
27
|
+
|
|
28
|
+
## 4. Security
|
|
29
|
+
- Trust boundaries, input validation, authz checks, secrets handling. Hand off to
|
|
30
|
+
`devrites-audit security` when input/auth/data/integration is in scope.
|
|
31
|
+
|
|
32
|
+
## 5. Performance
|
|
33
|
+
- Obvious N+1s, unnecessary work in hot paths, payload sizes. Hand off to
|
|
34
|
+
`devrites-audit perf` when perf is relevant — **measure before claiming**.
|
|
35
|
+
|
|
36
|
+
## 6. Maintainability
|
|
37
|
+
- Tests, docs/comments where needed, no dead code added, no TODOs left, consistent
|
|
38
|
+
with project conventions.
|
|
39
|
+
|
|
40
|
+
## Frontend axes (if UI)
|
|
41
|
+
- UX flow matches neighbors; all interaction states; a11y (focus, labels, contrast,
|
|
42
|
+
keyboard); responsive; design-system alignment (no drift, no anti-AI-slop).
|
|
43
|
+
|
|
44
|
+
## Sizing & speed
|
|
45
|
+
Prefer reviewing roughly one slice / ~100 lines of meaningful change at a time. Larger
|
|
46
|
+
diffs hide defects — recommend splitting rather than rubber-stamping.
|