@kiwidata/grimoire 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/AGENTS.md +56 -4
  2. package/README.md +107 -59
  3. package/dist/cli/index.js +7 -7
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/check.js +1 -1
  6. package/dist/commands/check.js.map +1 -1
  7. package/dist/commands/configure.d.ts +3 -0
  8. package/dist/commands/configure.d.ts.map +1 -0
  9. package/dist/commands/configure.js +19 -0
  10. package/dist/commands/configure.js.map +1 -0
  11. package/dist/commands/init.d.ts.map +1 -1
  12. package/dist/commands/init.js +2 -0
  13. package/dist/commands/init.js.map +1 -1
  14. package/dist/core/check.d.ts.map +1 -1
  15. package/dist/core/check.js +165 -111
  16. package/dist/core/check.js.map +1 -1
  17. package/dist/core/ci.d.ts.map +1 -1
  18. package/dist/core/ci.js +50 -69
  19. package/dist/core/ci.js.map +1 -1
  20. package/dist/core/configure.d.ts +14 -0
  21. package/dist/core/configure.d.ts.map +1 -0
  22. package/dist/core/configure.js +434 -0
  23. package/dist/core/configure.js.map +1 -0
  24. package/dist/core/detect.d.ts.map +1 -1
  25. package/dist/core/detect.js +153 -26
  26. package/dist/core/detect.js.map +1 -1
  27. package/dist/core/diff.d.ts.map +1 -1
  28. package/dist/core/diff.js +62 -93
  29. package/dist/core/diff.js.map +1 -1
  30. package/dist/core/doc-style.d.ts +0 -4
  31. package/dist/core/doc-style.d.ts.map +1 -1
  32. package/dist/core/doc-style.js +103 -22
  33. package/dist/core/doc-style.js.map +1 -1
  34. package/dist/core/docs.js +202 -170
  35. package/dist/core/docs.js.map +1 -1
  36. package/dist/core/health.d.ts +6 -0
  37. package/dist/core/health.d.ts.map +1 -1
  38. package/dist/core/health.js +133 -96
  39. package/dist/core/health.js.map +1 -1
  40. package/dist/core/hooks.d.ts +0 -3
  41. package/dist/core/hooks.d.ts.map +1 -1
  42. package/dist/core/hooks.js +11 -16
  43. package/dist/core/hooks.js.map +1 -1
  44. package/dist/core/init.d.ts +2 -0
  45. package/dist/core/init.d.ts.map +1 -1
  46. package/dist/core/init.js +230 -406
  47. package/dist/core/init.js.map +1 -1
  48. package/dist/core/list.d.ts.map +1 -1
  49. package/dist/core/list.js +55 -65
  50. package/dist/core/list.js.map +1 -1
  51. package/dist/core/risk-register.d.ts +17 -0
  52. package/dist/core/risk-register.d.ts.map +1 -0
  53. package/dist/core/risk-register.js +73 -0
  54. package/dist/core/risk-register.js.map +1 -0
  55. package/dist/core/shared-setup.d.ts +0 -40
  56. package/dist/core/shared-setup.d.ts.map +1 -1
  57. package/dist/core/shared-setup.js +92 -56
  58. package/dist/core/shared-setup.js.map +1 -1
  59. package/dist/core/status.d.ts.map +1 -1
  60. package/dist/core/status.js +42 -52
  61. package/dist/core/status.js.map +1 -1
  62. package/dist/core/test-quality.d.ts +0 -8
  63. package/dist/core/test-quality.d.ts.map +1 -1
  64. package/dist/core/test-quality.js +24 -30
  65. package/dist/core/test-quality.js.map +1 -1
  66. package/dist/core/trace.d.ts.map +1 -1
  67. package/dist/core/trace.js +67 -75
  68. package/dist/core/trace.js.map +1 -1
  69. package/dist/core/update.d.ts.map +1 -1
  70. package/dist/core/update.js +61 -11
  71. package/dist/core/update.js.map +1 -1
  72. package/dist/core/validate.d.ts +1 -4
  73. package/dist/core/validate.d.ts.map +1 -1
  74. package/dist/core/validate.js +126 -148
  75. package/dist/core/validate.js.map +1 -1
  76. package/dist/index.d.ts +0 -3
  77. package/dist/index.d.ts.map +1 -1
  78. package/dist/index.js +0 -3
  79. package/dist/index.js.map +1 -1
  80. package/dist/utils/config.d.ts +15 -5
  81. package/dist/utils/config.d.ts.map +1 -1
  82. package/dist/utils/config.js +63 -42
  83. package/dist/utils/config.js.map +1 -1
  84. package/dist/utils/fs.d.ts +0 -12
  85. package/dist/utils/fs.d.ts.map +1 -1
  86. package/dist/utils/fs.js +0 -12
  87. package/dist/utils/fs.js.map +1 -1
  88. package/dist/utils/paths.d.ts +0 -6
  89. package/dist/utils/paths.d.ts.map +1 -1
  90. package/dist/utils/paths.js +0 -6
  91. package/dist/utils/paths.js.map +1 -1
  92. package/dist/utils/spawn.d.ts +0 -3
  93. package/dist/utils/spawn.d.ts.map +1 -1
  94. package/dist/utils/spawn.js +0 -3
  95. package/dist/utils/spawn.js.map +1 -1
  96. package/package.json +1 -1
  97. package/skills/grimoire-apply/SKILL.md +89 -25
  98. package/skills/grimoire-audit/SKILL.md +21 -1
  99. package/skills/grimoire-bug/SKILL.md +48 -9
  100. package/skills/grimoire-commit/SKILL.md +3 -2
  101. package/skills/grimoire-design/SKILL.md +259 -0
  102. package/skills/grimoire-design-consult/SKILL.md +200 -0
  103. package/skills/grimoire-discover/SKILL.md +139 -109
  104. package/skills/grimoire-draft/SKILL.md +131 -15
  105. package/skills/grimoire-plan/SKILL.md +119 -46
  106. package/skills/grimoire-pr/SKILL.md +7 -10
  107. package/skills/grimoire-pr-review/SKILL.md +46 -115
  108. package/skills/grimoire-precommit-review/SKILL.md +205 -0
  109. package/skills/grimoire-refactor/SKILL.md +6 -6
  110. package/skills/grimoire-review/SKILL.md +95 -156
  111. package/skills/grimoire-verify/SKILL.md +40 -7
  112. package/skills/grimoire-vuln-remediate/SKILL.md +107 -0
  113. package/skills/grimoire-vuln-triage/SKILL.md +109 -0
  114. package/skills/references/adversarial-personas.md +225 -0
  115. package/skills/references/brand-tokens-format.md +186 -0
  116. package/skills/references/code-quality.md +172 -0
  117. package/skills/references/container-scan-triage.md +102 -0
  118. package/skills/references/dependency-vuln-triage.md +236 -0
  119. package/skills/references/design-heuristics.md +138 -0
  120. package/skills/references/design-input-formats.md +190 -0
  121. package/skills/references/pattern-guard.md +180 -0
  122. package/skills/references/principles.md +82 -0
  123. package/skills/references/refactor-scan-categories.md +154 -2
  124. package/skills/references/review-personas.md +406 -0
  125. package/skills/references/security-compliance.md +22 -1
  126. package/skills/references/testing-contracts.md +1 -1
  127. package/skills/references/visual-fidelity.md +206 -0
  128. package/templates/accepted-risks.yml +47 -0
  129. package/templates/brand-tokens-example.json +13 -0
  130. package/templates/brand-voice-example.md +22 -0
  131. package/templates/constraints.md +25 -0
  132. package/templates/design-tool-setup-stub.md +59 -0
  133. package/dist/commands/archive.d.ts +0 -3
  134. package/dist/commands/archive.d.ts.map +0 -1
  135. package/dist/commands/archive.js +0 -22
  136. package/dist/commands/archive.js.map +0 -1
  137. package/dist/commands/log.d.ts +0 -3
  138. package/dist/commands/log.d.ts.map +0 -1
  139. package/dist/commands/log.js +0 -15
  140. package/dist/commands/log.js.map +0 -1
  141. package/dist/commands/map.d.ts +0 -3
  142. package/dist/commands/map.d.ts.map +0 -1
  143. package/dist/commands/map.js +0 -17
  144. package/dist/commands/map.js.map +0 -1
  145. package/dist/core/archive.d.ts +0 -9
  146. package/dist/core/archive.d.ts.map +0 -1
  147. package/dist/core/archive.js +0 -92
  148. package/dist/core/archive.js.map +0 -1
  149. package/dist/core/log.d.ts +0 -8
  150. package/dist/core/log.d.ts.map +0 -1
  151. package/dist/core/log.js +0 -150
  152. package/dist/core/log.js.map +0 -1
  153. package/dist/core/map.d.ts +0 -9
  154. package/dist/core/map.d.ts.map +0 -1
  155. package/dist/core/map.js +0 -302
  156. package/dist/core/map.js.map +0 -1
  157. package/templates/dupignore +0 -93
  158. package/templates/mapignore +0 -58
  159. package/templates/mapkeys +0 -65
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: grimoire-precommit-review
3
+ description: Multi-persona code review of your own staged (or unstaged) local diff before you commit. Same engine as grimoire-pr-review and grimoire-review, applied to `git diff --cached`. Catches blockers in the dev loop instead of after a teammate opens the PR.
4
+ compatibility: Designed for Claude Code (or similar products)
5
+ metadata:
6
+ author: kiwi-data
7
+ version: "0.1"
8
+ ---
9
+
10
+ # grimoire-precommit-review
11
+
12
+ Review your own uncommitted diff before you commit. Applies the shared persona engine in `../references/review-personas.md` to the staged diff (or, on request, all unstaged changes), cross-referenced with the active grimoire change.
13
+
14
+ This is the dev-loop counterpart to `grimoire-pr-review`. Run it before `grimoire-commit`. If it returns blockers, fix them; if only suggestions, decide which to address. Designed to be fast — default scope is the senior engineer + security quick scan + code style, with the full persona stack opt-in.
15
+
16
+ ## Triggers
17
+ - User asks to review their own change before committing
18
+ - Loose match: "review my changes", "review staged", "review before commit", "precommit review", "check my diff", "review what I'm about to commit"
19
+ - Implicit: user about to run `grimoire-commit` on a non-trivial diff and asks for a sanity check
20
+
21
+ ## Routing
22
+ - Reviewing a teammate's PR → `grimoire-pr-review`
23
+ - Reviewing the spec / design before any code exists → `grimoire-review`
24
+ - Writing the commit message itself (no review) → `grimoire-commit`
25
+ - Verifying scenarios pass after merge → `grimoire-verify`
26
+ - Reviewing your own change post-push, pre-merge → `grimoire-pr` (post-impl review section)
27
+
28
+ ## Prerequisites
29
+ - Working directory is a git repo
30
+ - Some staged or unstaged changes exist (`git diff --cached` non-empty, or user opts in to unstaged)
31
+ - Optional: `.grimoire/` directory with `config.yaml`, active change in `.grimoire/changes/<id>/`, and decisions / docs
32
+
33
+ ## Workflow
34
+
35
+ ### 1. Resolve the Diff
36
+
37
+ Default scope: **staged only**.
38
+
39
+ ```sh
40
+ git diff --cached
41
+ git diff --cached --stat
42
+ git diff --cached --name-only
43
+ ```
44
+
45
+ If staged is empty:
46
+ - Check unstaged: `git diff` and `git diff --stat`
47
+ - If unstaged exists, ask: "Nothing staged. Review unstaged changes (`git diff`), or review staged + unstaged combined? Or stage first?"
48
+ - If both empty, stop: "Nothing to review."
49
+
50
+ If both staged and unstaged exist, ask which to review (default: staged only — that's what's about to be committed).
51
+
52
+ If the diff is very large (>2000 lines changed), ask: review full diff, focus on a subset of files, or review file-by-file?
53
+
54
+ Record: scope (staged | unstaged | both), file list, +adds / -dels, base commit (`git rev-parse HEAD`).
55
+
56
+ ### 2. Find Active Grimoire Change
57
+
58
+ ```sh
59
+ ls .grimoire/changes/
60
+ ```
61
+
62
+ - Zero changes → no linked artifacts; proceed using diff alone
63
+ - One change → load it as the linked change
64
+ - Multiple changes → list them and ask the user which (if any) the diff belongs to. User can answer "none" if this is a config / dep / formatting change
65
+
66
+ For the linked change, read:
67
+ - `manifest.md` (Why, Non-goals, complexity)
68
+ - All `.feature` files in the change
69
+ - Decision records
70
+ - `tasks.md`
71
+ - `data.yml` (if present)
72
+
73
+ Cross-check filenames in the diff against `tasks.md` references — surface mismatches as a senior-engineer finding.
74
+
75
+ ### 3. Gather Project Context
76
+ - `.grimoire/config.yaml` — language, tools, `commit_style`, `comment_style`, `project.compliance`, `dep_audit`, `precommit_review` (if set)
77
+ - `.grimoire/docs/context.yml` — deployment env, related services
78
+ - `.grimoire/docs/data/schema.yml` — current data baseline
79
+ - Relevant `.grimoire/docs/<area>.md` for directories touched by the diff
80
+ - Repo root: `AGENTS.md`, `CLAUDE.md`, `.editorconfig`, lint/format config files (for the code-style persona)
81
+
82
+ **Doc freshness check:** For each area doc loaded, check its `last_updated` date against `git log -1 --format=%ci <directory>`. Collect all stale docs (doc older than the directory's most recent commit).
83
+
84
+ If stale docs exist: invoke `grimoire-discover` in **targeted refresh** mode for those directories before continuing. Pass the directory list directly — discover will update only those area docs and their `last_updated` entries in `index.yml`. Do not skip this step or defer it to the user — stale docs produce wrong findings in the review (e.g., flagging a utility as missing when it was added last week).
85
+
86
+ In hook mode (`GRIMOIRE_HOOK=1`): skip the refresh (too slow for a blocking hook). Log stale doc names to `.grimoire/.stale-docs` and continue with existing docs.
87
+
88
+ **Coverage gap scan:** After loading area docs (and after any refresh), scan the diff for new behaviors with no Gherkin coverage:
89
+ - New routes, URL patterns, or endpoints added (`urlpatterns`, `router.add`, `app.get`, etc.)
90
+ - New views, controllers, or actions
91
+ - New background tasks or job handlers
92
+ - New permission checks or auth gates
93
+
94
+ For each, check `features/**/*.feature` for a scenario that covers it. Missing coverage → record as a documentation gap (not a blocker). Include in the review report under a **Documentation Gaps** section with a suggestion to run `grimoire-audit` for the affected area.
95
+
96
+ ### 4. Build Project Briefing
97
+ Follow `../references/review-personas.md` §1 (Project Briefing). README fallback: note `Product framing: unknown` and proceed silently — pre-commit review is fast-path; don't block on prompts.
98
+
99
+ Inject as preface to every persona run below.
100
+
101
+ ### 5. Pick Depth — Pre-Commit Default
102
+
103
+ Pre-commit review is in the dev loop, so default is lighter than PR review. Read `complexity` from the linked manifest if present; otherwise infer from the diff.
104
+
105
+ | Signal | Default depth |
106
+ |---|---|
107
+ | Docs / config / formatter only, ≤50 lines | Code Style only |
108
+ | Diff <200 lines, no security/auth/data files touched, complexity ≤2 | Senior Engineer + Security quick scan + Code Style |
109
+ | Diff touches auth / models / migrations / external API / >200 lines | Senior Engineer + Security (full STRIDE + code-level scan) + Code Style + relevant of QA/Data |
110
+ | Complexity 4 OR diff >500 lines OR multi-domain | All personas mandatory |
111
+
112
+ Read `precommit_review.depth` from `.grimoire/config.yaml` if set (`quick` | `full`) — that overrides the inference.
113
+
114
+ User can override per-run: "full review", "just security", "just style", "skip product".
115
+
116
+ ### 6. Run Personas
117
+ For each selected persona, follow its evaluation criteria in `../references/review-personas.md` §4 against the **diff** (with linked artifacts as cross-reference). Apply the materiality gate (§2) — every finding cites a briefing axis or feature-inventory gap, or is dropped.
118
+
119
+ Persona scope for pre-commit review:
120
+ - 4.1 Product Manager — only when the diff touches user-facing behavior AND a feature file exists in the linked change. Otherwise skip.
121
+ - 4.2 Senior Engineer — always
122
+ - 4.3 Security Engineer — always; STRIDE only on hunks introducing new entry points / trust boundaries; full code-level scan
123
+ - 4.4 QA Engineer — only when diff touches user-facing behavior or adds/removes tests
124
+ - 4.5 Data Engineer — only when diff touches migrations / models / schema / external API client
125
+ - 4.6 Code Style Reviewer — always (the highest-value, lowest-cost persona for pre-commit)
126
+ - 4.7 Adversarial User — engage per matrix in `../references/adversarial-personas.md` when the diff touches a user-facing surface
127
+ - 4.8 Contrarian — runs last when any persona produced a blocker; calibrates other personas' findings post-hoc
128
+
129
+ ### 6.5 Visual Fidelity (cheap tier)
130
+
131
+ Follow `../references/visual-fidelity.md` for the code-phase invocation (staged diff scope, auto-invoked when `.grimoire/brand/tokens.json` exists). Skip silently when tokens.json is absent and the diff has no styling-surface changes. Fold the engine's output under the "Visual Fidelity" section of the report.
132
+
133
+ ### 7. Present Findings
134
+
135
+ Compile into the standard report layout (§5 of the personas reference). If documentation gaps were found in step 3, append a **Documentation Gaps** section after the persona findings — these are not blockers but should be addressed via `grimoire-audit` before the PR is merged.
136
+
137
+ ```markdown
138
+ # Pre-Commit Review
139
+
140
+ **Scope:** <staged | unstaged | both>
141
+ **Linked change:** <change-id or "none">
142
+ **Complexity:** <1-4 or "inferred: low">
143
+ **Files changed:** <N> **Lines:** +<add> / -<del>
144
+ **Depth:** <quick | full>
145
+
146
+ ## Project Briefing
147
+ <briefing block, condensed if quick depth>
148
+
149
+ ## Senior Engineer
150
+ - ...
151
+
152
+ ## Security Engineer
153
+ ### STRIDE
154
+ - ...
155
+ ### Findings
156
+ - ...
157
+
158
+ ## Code Style
159
+ - **[blocker]** `eslint.config.js` rule `no-unused-vars` violated at `src/foo.ts:42`
160
+ - **[suggestion]** Comment at `src/bar.ts:88` describes what the code does — remove (per `AGENTS.md` "Default to writing no comments")
161
+
162
+ (Other personas if selected.)
163
+
164
+ ## Summary
165
+ - **N blockers** — fix before commit
166
+ - **M suggestions** — consider addressing
167
+
168
+ Recommendation: <fix blockers, then proceed to grimoire-commit / approve, ready to commit>
169
+
170
+ ## Documentation Gaps
171
+ <Only present if coverage gaps were found in step 3. Otherwise omit this section entirely.>
172
+ - `<file>:<line>` — `<route/endpoint/action>` has no Gherkin scenario. Run `grimoire-audit` for `<area>`.
173
+ ```
174
+
175
+ ### 8. Decide Next Step
176
+
177
+ Read `precommit_review.block_on` from `.grimoire/config.yaml` if set (`blocker` | `none`). Default: `blocker`.
178
+
179
+ - **Blockers exist + `block_on: blocker`**: tell the user to fix and re-run; do NOT call `grimoire-commit` automatically. Offer to walk through the blockers one by one.
180
+ - **Only suggestions**: present them; ask whether to address before committing or proceed.
181
+ - **Clean**: confirm "Ready to commit." and suggest `grimoire-commit`.
182
+
183
+ Never run `git commit` from this skill. Commit message generation lives in `grimoire-commit`.
184
+
185
+ ### 9. Optional: Hook Mode
186
+
187
+ If invoked from a git pre-commit hook (env var `GRIMOIRE_HOOK=1` or argument `--hook`):
188
+ - Suppress the briefing block (too noisy for hook output)
189
+ - Print only blockers (suggestions to a side file: `.grimoire/.last-precommit-suggestions.md`)
190
+ - Exit code 1 if blockers exist and `block_on: blocker`; exit 0 otherwise
191
+ - Wire-up is manual: user adds `grimoire precommit-review --hook` to `.git/hooks/pre-commit`. Don't auto-install — the existing `grimoire init` already wires `grimoire check --changed`, and LLM-driven review is opt-in (slower, costs tokens)
192
+
193
+ This skill does not currently ship a CLI command; hook mode is provided as a convention so a future CLI wrapper can implement it without breaking the skill contract.
194
+
195
+ ## Important
196
+ - This is a code review against an uncommitted diff — reference specific files and line numbers for every finding.
197
+ - Be direct. Blockers stop the commit; suggestions are advisory.
198
+ - Findings describe the code, not the author.
199
+ - If the diff is too large or sprawling for a meaningful review, say so — offer to focus on a subset rather than a shallow full-pass.
200
+ - Never `git commit`, `git add`, or `git stash` from this skill.
201
+ - The Code Style persona MUST cite a project anchor for every finding (config rule, `AGENTS.md` / `CLAUDE.md` line, area doc, or visible neighbor convention). General taste is dropped.
202
+ - All persona evaluation criteria, the materiality gate, the briefing structure, and the complexity-depth table live in `../references/review-personas.md`. Don't duplicate them here — read that file when running a persona.
203
+
204
+ ## Done
205
+ When the report is presented, the workflow is complete. If clean, suggest `grimoire-commit`. If blockers exist, suggest the user fix them and re-run.
@@ -26,7 +26,7 @@ Systematically find, prioritize, and plan tech debt reduction. Combines automate
26
26
  ## Prerequisites
27
27
  - A grimoire-initialized project (`.grimoire/` exists)
28
28
  - Git history available (hotspot analysis needs `git log`)
29
- - Ideally: `grimoire map` + `/grimoire:discover` already run (area docs help contextualize findings)
29
+ - Ideally: codebase-memory-mcp indexed (live structure/duplication intelligence) + `/grimoire:discover` run (area intent docs help contextualize findings)
30
30
 
31
31
  ## Debt Item Format
32
32
 
@@ -34,7 +34,7 @@ Each debt item in the register follows a structured format influenced by the Cod
34
34
 
35
35
  **Required fields:**
36
36
  - `id` — unique identifier (debt-NNN, monotonically increasing)
37
- - `category` — one of: `hotspot`, `structural_bloat`, `data_structure`, `circular_dependency`, `dependency_staleness`, `broken_promise`, `duplication`, `dead_code`, `test_debt`
37
+ - `category` — one of: `hotspot`, `structural_bloat`, `data_structure`, `circular_dependency`, `dependency_staleness`, `broken_promise`, `duplication`, `dead_code`, `test_debt`, `pattern_divergence`, `comment_noise`
38
38
  - `severity` — `high`, `medium`, or `low`
39
39
  - `location` — file path (with optional `:line`), or `path ↔ path` for relationships
40
40
  - `title` — short human-readable summary
@@ -108,14 +108,16 @@ Run applicable scans from the categories in `../references/refactor-scan-categor
108
108
 
109
109
  **Key categories** (details in reference):
110
110
  - **Hotspots** (churn x complexity) — highest ROI, uses `git log` + `config.tools.complexity`
111
- - **Structural bloat** — oversized files/functions/classes
111
+ - **Structural bloat** — oversized files/functions/classes; plus graph-powered checks for single-subclass bases, single-caller wrappers, zero-caller exports, single-implementation interfaces (requires `codebase-memory-mcp`)
112
112
  - **Data structure complexity** — over-engineered models, deep nesting
113
113
  - **Circular dependencies** — tight coupling between modules
114
114
  - **Dependency staleness** — uses `config.tools.dep_audit` or package manager outdated commands
115
115
  - **Broken promises** — aged TODO/FIXME/HACK comments via `grep` + `git blame`
116
- - **Duplication** — uses `.snapshot.json` duplicates or `config.tools.duplicates`
116
+ - **Duplication** — textual clones via `config.tools.duplicates` or `grimoire health` (config-driven duplicates metric); plus semantic duplicate detection via `search_graph(semantic_query=[...])` to find re-implementations under different names (requires `codebase-memory-mcp`)
117
117
  - **Dead code** — uses `config.tools.dead_code` or `codebase-memory-mcp` graph queries
118
118
  - **Test debt** — high complexity + low coverage
119
+ - **Pattern divergence** — code that contradicts established codebase patterns; uses `codebase-memory-mcp` peer group analysis + hallucinated reference detection (skip if graph not indexed)
120
+ - **Comment noise** — restatement comments, task/PR references, high comment density, multi-line docstrings on private functions; grep-based, no graph required
119
121
 
120
122
  ### 3. Load Exceptions
121
123
 
@@ -233,11 +235,9 @@ The debt register is a living document. Recommend:
233
235
 
234
236
  ## Integration with Other Skills
235
237
 
236
- - **grimoire-health** — the health score reflects some debt dimensions (coverage, complexity, duplicates). Refactoring should improve health scores.
237
238
  - **grimoire-audit** — audit finds undocumented features/decisions. Refactor finds code quality issues. They're complementary — run audit first to understand what the code does, then refactor to improve how it does it.
238
239
  - **grimoire-discover** — area docs provide context for refactoring. After refactoring, run discover to update docs.
239
240
  - **grimoire-review** — the senior engineer persona already checks for simplicity and reuse. Refactor findings can inform review criteria.
240
- - **grimoire-check** — the commit-time checks prevent new debt. Refactor addresses existing debt.
241
241
 
242
242
  ## Important
243
243
  - **Don't boil the ocean.** Tech debt reduction is incremental. Pick the highest-impact items and make measurable progress. A codebase with zero debt is not the goal — a codebase where debt doesn't slow you down is.
@@ -4,12 +4,12 @@ description: Multi-perspective design review before coding begins. Expert person
4
4
  compatibility: Designed for Claude Code (or similar products)
5
5
  metadata:
6
6
  author: kiwi-data
7
- version: "0.1"
7
+ version: "0.2"
8
8
  ---
9
9
 
10
10
  # grimoire-review
11
11
 
12
- Multi-perspective LLM review of a completed design before coding begins. Expert personas validate the change for completeness, feasibility, security, and data integrity.
12
+ Multi-perspective LLM review of a completed design before coding begins. Applies the shared persona engine in `../references/review-personas.md` to the specs (manifest, features, decisions, tasks) no diff exists yet.
13
13
 
14
14
  ## Triggers
15
15
  - User has a grimoire change with approved features, decisions, and tasks
@@ -21,7 +21,9 @@ Multi-perspective LLM review of a completed design before coding begins. Expert
21
21
  - No tasks.md exists → `grimoire-plan` first
22
22
  - Level 1 change → skip review entirely, proceed to `grimoire-apply`
23
23
  - User says "skip review" → proceed to `grimoire-apply`
24
- - Post-implementation review → `grimoire-pr` (has optional post-impl review)
24
+ - Reviewing the diff after coding (own change) → `grimoire-pr` post-impl review
25
+ - Reviewing a teammate's PR → `grimoire-pr-review`
26
+ - Reviewing your own staged but uncommitted diff → `grimoire-precommit-review`
25
27
 
26
28
  ## Prerequisites
27
29
  - A change exists in `.grimoire/changes/<change-id>/` with:
@@ -32,18 +34,6 @@ Multi-perspective LLM review of a completed design before coding begins. Expert
32
34
  ## Skipping
33
35
  This step is optional. The user can skip it by saying "skip review" or "go straight to apply". Not every change needs a full review — small or low-risk changes can go directly from plan to apply.
34
36
 
35
- ## Complexity-Gated Review
36
- Read `complexity` from `manifest.md` frontmatter to determine review depth:
37
-
38
- | Complexity | Review Depth |
39
- |------------|-------------|
40
- | **1 (Trivial)** | Skip review entirely — suggest proceeding to apply |
41
- | **2 (Simple)** | Senior Engineer only. Skip other personas unless the change touches security or data. |
42
- | **3 (Moderate)** | All relevant personas (skip Data Engineer if no data changes, skip QA if no user-facing behavior) |
43
- | **4 (Complex)** | All personas mandatory. No skipping. |
44
-
45
- The user can always override: "run full review" on a level 2, or "just senior engineer" on a level 4.
46
-
47
37
  ## Workflow
48
38
 
49
39
  ### 1. Select Change
@@ -58,149 +48,73 @@ Read all artifacts for the change:
58
48
  - All decision records — architectural choices
59
49
  - `tasks.md` — implementation plan
60
50
  - `data.yml` — proposed schema changes (if present)
61
- - Read `.grimoire/config.yaml` for project context (language, tools, conventions)
62
- - Read `.grimoire/docs/data/schema.yml` for current data baseline (if it exists)
63
- - Read `.grimoire/docs/context.yml` for deployment environment, related services, and infrastructure (if it exists) — this informs security review (cross-service auth), engineering review (deployment constraints), and data review (infrastructure availability)
64
- - Read relevant `.grimoire/docs/` area docs if they exist
51
+ - `.grimoire/config.yaml` for project context (language, tools, conventions, `comment_style`, `compliance`)
52
+ - `.grimoire/docs/data/schema.yml` for current data baseline (if exists)
53
+ - `.grimoire/docs/context.yml` for deployment environment, related services, infrastructure (if exists) — informs security review (cross-service auth), engineering review (deployment constraints), and data review (infrastructure availability)
54
+ - Relevant `.grimoire/docs/` area docs if they exist
65
55
  - Skim the areas of the codebase the tasks reference
66
56
 
67
- ### 3. Product Manager Review
68
-
69
- Adopt the perspective of a **product manager** focused on completeness and user value.
70
-
71
- Evaluate:
72
- - **Outcome**: Does the manifest's Why clearly state the problem being solved and how success is measured? If it describes a mechanism ("add an endpoint") instead of an outcome ("users can reset passwords"), flag it — the team will argue about scope later.
73
- - **Coverage**: Do the feature scenarios cover all user-facing behaviors? Are there missing edge cases, error states, or alternate flows that a user would encounter?
74
- - **Clarity**: Are the feature descriptions and user stories clear enough that a non-technical stakeholder could validate them? Would QA know exactly what to test?
75
- - **Scope**: Is the change well-bounded? Are there implicit requirements hiding in the scenarios that aren't spelled out? Do any scenarios or tasks stray into the manifest's Non-goals? Scope creep into non-goals is a **blocker**.
76
- - **Acceptance**: Could you ship this and confidently say the feature is "done"? What would a user complain about?
77
-
78
- Output a short list of findings — flag issues as **blocker** (must fix before coding) or **suggestion** (nice to have).
79
-
80
- ### 4. Senior Engineer Review
81
-
82
- Adopt the perspective of a **senior software engineer** reviewing the technical design.
83
-
84
- Evaluate:
85
- - **Build vs Buy**: Was the prior art research thorough? Check the manifest's Prior Art section. If the change builds custom code, is the justification for not adopting an existing library convincing? Do a quick sanity check — search for obvious libraries the research may have missed. If a well-maintained library exists that the manifest doesn't mention, flag it as a **blocker**. If the research was done but the build decision is debatable, flag as **suggestion** with the alternative.
86
- - **Simplicity**: Is this the simplest design that solves the problem? Could any task be done with less code, fewer files, or fewer moving parts? Flag anything that looks over-engineered — new abstractions without justification, premature generalization, unnecessary indirection layers, config-driven behavior where a direct call would do.
87
- - **Architecture**: Do the decisions make sense for this codebase? Are there simpler alternatives? Will this paint us into a corner?
88
- - **Task quality**: Are the tasks specific enough to execute without re-planning? Do they reference real files, real patterns, real conventions from the codebase?
89
- - **Dependencies**: Are tasks ordered correctly? Are there missing dependencies or implicit assumptions between tasks?
90
- - **Integration**: How does this change interact with existing code? Are there areas that will break or need updating that the tasks don't cover?
91
- - **Contract compatibility**: Does this change alter the request/response shape for any external API documented in `schema.yml`? If fields are added, removed, renamed, or re-typed in `data.yml`, flag it — the client code and any downstream consumers need contract tests updated. A contract change without updated contract tests is a **blocker**.
92
- - **Reuse**: Are there existing utilities, patterns, or modules that should be used instead of writing new code? Check `.grimoire/docs/` area docs if available. The goal is less new code, not more.
93
- - **Surface area**: Does the change introduce new public APIs, exports, or interfaces beyond what's needed? Fewer public functions with fewer parameters is better.
94
- - **Quality attributes**: If decision records have a Quality Attributes table, are the targets measurable and realistic? For performance-sensitive changes (new endpoints, data pipelines, search), flag blank targets as a **blocker** — you can't verify what you haven't defined. For non-performance-sensitive changes, blank targets are fine.
95
- - **Testing**: Is the test strategy sound? Are there gaps between what the features describe and what the step definitions will actually verify?
96
-
97
- Output a short list of findings — flag issues as **blocker** or **suggestion**.
98
-
99
- ### 5. Security Engineer Review
100
-
101
- Adopt the perspective of a **security engineer** reviewing the design for vulnerabilities.
102
-
103
- #### 5a. STRIDE Threat Analysis
104
-
105
- For each new endpoint, data flow, or trust boundary the change introduces, evaluate using STRIDE:
106
-
107
- | Threat | Question |
108
- |--------------------|----------------------------------------------------------------------------------------------|
109
- | **S**poofing | Can an attacker impersonate a user or service? Are auth checks present at every entry point? |
110
- | **T**ampering | Can input or data in transit be modified? Is integrity validated (checksums, signatures, CSRF)?|
111
- | **R**epudiation | Are security-relevant actions logged? Could an attacker act without leaving a trace? |
112
- | **I**nfo Disclosure| Could error messages, logs, or responses leak sensitive data (stack traces, PII, tokens)? |
113
- | **D**enial of Service| Are there unbounded operations (large uploads, expensive queries, no rate limits)? |
114
- | **E**levation of Privilege| Can a user escalate to admin? Are role/permission checks at the right layer? |
115
-
116
- Skip STRIDE categories that don't apply to the change. Don't manufacture threats.
117
-
118
- #### 5b. Detailed Security Evaluation
119
-
120
- - **Input validation**: Do the features involve user input? Are there scenarios covering malicious or malformed input?
121
- - **Authentication/authorization**: Does the change touch auth boundaries? Are there missing access control checks?
122
- - **Data handling**: Does the change introduce new data storage, transmission, or processing? Are there privacy or compliance concerns?
123
- - **Dependencies**: Do the tasks introduce new dependencies? Are there known vulnerability concerns? Check that package names are real and correctly spelled — hallucinated or typosquatted package names are a supply chain attack vector.
124
- - **Vulnerable packages**: If the tasks add or upgrade dependencies, check for known vulnerabilities. Cross-reference against the project's dependency audit tool (configured in `.grimoire/config.yaml` under `dep_audit`). Flag any package without a clear provenance or with a very low download count.
125
- - **Attack surface**: Does this change expose new endpoints, APIs, or interfaces? What could an attacker target?
126
- - **Cross-service security**: If `context.yml` lists related services, does the change properly authenticate when calling them? Are service-to-service auth boundaries maintained? Is data from sibling services validated at the boundary?
127
- - **Secrets**: Are there hardcoded credentials, tokens, or keys in the design? Check that API keys, database credentials, and tokens are loaded from environment variables or secret stores, never inline.
128
-
129
- If the change has no security-relevant surface (e.g., a pure UI text change), say so briefly and move on. Not every change needs a deep security review.
130
-
131
- #### 5c. Compliance Review
132
-
133
- Check `.grimoire/config.yaml` under `project.compliance`. If configured, evaluate per `../references/security-compliance.md` (section "Compliance Framework Verification"). Missing compliance coverage on a tagged scenario is a **blocker**. If no compliance frameworks configured, skip.
134
-
135
- #### 5d. OWASP / CWE Classification
136
-
137
- Tag every security finding with:
138
- - **OWASP Top 10 (2021)** category — e.g., `A01:2021-Broken Access Control`, `A03:2021-Injection`
139
- - **CWE ID** — e.g., `CWE-89` (SQL Injection), `CWE-79` (XSS), `CWE-798` (Hardcoded Credentials)
140
-
141
- This makes findings actionable, searchable, and traceable to compliance frameworks.
57
+ ### 3. Build Project Briefing
58
+ Follow `../references/review-personas.md` §1 (Project Briefing). README fallback: if missing or <200 chars, prompt user once: "README thin — add 3 lines on product / users / stage, or proceed with what exists?" If user proceeds, mark `Product framing: unknown`.
142
59
 
143
- Tag findings with OWASP category and CWE ID. See `../references/security-compliance.md` for the CWE quick reference table.
60
+ Inject as preface to every persona run below.
144
61
 
145
- Output format:
146
- ```markdown
147
- ## Security Engineer
148
- ### STRIDE Summary
149
- - **Spoofing**: [relevant finding or "N/A"]
150
- - **Tampering**: [relevant finding or "N/A"]
151
- - ... (only categories that apply)
152
-
153
- ### Findings
154
- - **[blocker]** [A03:2021 / CWE-89] User search query is concatenated into SQL string in tasks — must use parameterized query
155
- - **[suggestion]** [A01:2021 / CWE-862] Add rate limiting scenario for login endpoint
156
- - No other security concerns for this change.
157
- ```
158
-
159
- ### 6. QA Engineer Review (Optional)
160
-
161
- **Skip this review if the change is purely internal (no user-facing behavior, no new inputs, no observable state changes).**
162
-
163
- If the change has user-facing behavior, adopt the perspective of a **QA engineer** focused on testability and real-world failure modes.
164
-
165
- Evaluate:
166
- - **Testability**: Can every scenario be verified automatically? Are there behaviors that require manual testing — and if so, is that documented? Are the Given/When/Then steps specific enough to implement as real tests?
167
- - **Edge cases**: What inputs, states, or timing conditions are not covered by the current scenarios? Think about empty states, concurrent users, interruptions, and boundary values.
168
- - **Negative scenarios**: For every happy path, is there at least one scenario covering what happens when things go wrong? Missing error scenarios are the #1 source of bug reports.
169
- - **Observability**: When this feature breaks in production, how will anyone know? Are there logs, metrics, or alerts? Can a tester distinguish between "feature is broken" and "feature is slow"?
170
- - **Regression risk**: What existing behavior could this change break? Are there integration points with other features that need cross-feature testing?
171
- - **Accessibility**: Does the change introduce new UI? If so, are there scenarios covering keyboard navigation, screen readers, or contrast requirements?
172
-
173
- Output a short list of findings — flag issues as **blocker** or **suggestion**.
174
-
175
- ### 7. Data Engineer Review (Optional)
176
-
177
- **Skip this review if the change has no `data.yml` and doesn't touch data models, schemas, migrations, or external API integrations.**
178
-
179
- If the change touches data, adopt the perspective of a **data engineer** reviewing the schema design.
62
+ ### 4. Pick Personas — Design Review Gating
63
+ Use the **Design review** table in `../references/review-personas.md` §3 (Complexity Gating). Read `complexity` from `manifest.md` frontmatter.
180
64
 
181
- Read:
182
- - `.grimoire/changes/<change-id>/data.yml` — proposed schema changes
183
- - `.grimoire/docs/data/schema.yml`current schema baseline (if it exists)
184
-
185
- Evaluate:
186
- - **Schema design**: Are field types appropriate? Are there missing constraints (not_null, unique, indexes) that will cause problems at scale? Are enums used where they should be?
187
- - **Migrations**: Will the proposed changes require a data migration? Is it safe to run on a live database (e.g., adding a nullable column is safe, renaming a column is not)?
188
- - **Relationships**: Are foreign keys and references correct? Are there missing indexes on foreign keys? Could any relationships create N+1 query problems?
189
- - **Naming**: Do new fields/models follow the existing naming conventions in schema.yml?
190
- - **Backwards compatibility**: Will the schema change break existing API consumers, queries, or reports? Are there downstream dependencies?
191
- - **External APIs**: If adding a new external API dependency, is the `schema_ref` pointing to a stable spec? Is there a fallback if the API is unavailable? Is the client wrapper in the right place?
192
- - **Contract breaking changes**: Compare `data.yml` against `schema.yml` for any external API with `action: modify`. If the change removes a required response field, changes a field type, renames a field, or adds a new required request field — it's a **breaking contract change**. Flag as **blocker** unless the change documents a migration path (versioned endpoint, fallback handling, or coordinated deployment). Adding optional response fields is safe. Adding optional request fields is safe if the API has a default.
193
- - **Data integrity**: Are there edge cases where data could end up in an inconsistent state? Should any changes be wrapped in a transaction?
194
-
195
- Output a short list of findings flag issues as **blocker** or **suggestion**.
196
-
197
- ### 8. Present Findings
198
-
199
- Compile all reviews into a single summary:
65
+ | Complexity | Review Depth |
66
+ |---|---|
67
+ | 1 (Trivial) | Skip review suggest proceeding to apply |
68
+ | 2 (Simple) | Senior Engineer only; skip others unless touching security or data |
69
+ | 3 (Moderate) | All relevant personas (skip Data Engineer if no data changes, skip QA if no user-facing behavior) |
70
+ | 4 (Complex) | All personas mandatory |
71
+
72
+ User can always override: "run full review" on a level 2, or "just senior engineer" on a level 4.
73
+
74
+ #### Surface-conditional personas
75
+
76
+ After complexity gating, filter the adversarial-persona set by project surface:
77
+
78
+ - Read `project.surface` from `.grimoire/config.yaml`. If absent, default to `mixed` (better to over-engage than silently skip).
79
+ - Apply the activation matrix in `../references/adversarial-personas.md` §Activation Matrix. Engage only the modes whose row matches the surface; skip the rest by default.
80
+ - Example: `surface: tui` engages keyboard-only and hostile-actor; skips screen-reader, low-vision, touch-target, responsive-breakpoint, low-bandwidth.
81
+ - Example: `surface: web` engages keyboard-only, screen-reader, low-vision, responsive-breakpoint, low-bandwidth, hostile-actor; skips touch-target.
82
+ - Example: `surface: api` engages api-conventions and hostile-actor; skips the UI-shaped personas.
83
+ - **Conditional** rows (e.g., RTL / i18n) engage only when a briefing axis flags them — `i18n=N` count > 0 in the feature inventory, or `project.compliance` lists a region requiring RTL.
84
+ - **User override** is always available via conversational invocation: "skip <persona>" drops a default-engaged persona; "just keyboard" engages only that persona; "add <persona>" force-engages a default-skipped one; `--personas=keyboard,low-vision` syntax also accepted. Per ADR-0010 these are AI-interpreted from natural language, not CLI flags.
85
+
86
+ ### 5. Run Personas
87
+ For each selected persona, follow its evaluation criteria in `../references/review-personas.md` §4 against the **specs and tasks** (no diff exists yet). Apply the materiality gate (§2) — every finding cites a briefing axis or feature-inventory gap, or is dropped.
88
+
89
+ Persona scope for design review:
90
+ - 4.1 Product Manager — completeness and user value
91
+ - 4.2 Senior Engineer — feasibility, simplicity, build-vs-buy, contract compatibility, quality attributes
92
+ - 4.3 Security Engineer — STRIDE on the design + compliance (skip §4.3 "Code-level scan" — no code yet)
93
+ - 4.4 QA Engineer — testability and edge cases (skip if purely internal)
94
+ - 4.5 Data Engineer — schema/migration design (skip if no data.yml and no models touched)
95
+ - 4.6 Code Style Reviewer — **skip** (no code yet; runs only on diff reviews)
96
+ - 4.7 Adversarial User — engage per matrix; criteria in `../references/adversarial-personas.md`
97
+ - 4.8 Contrarian — runs last when any persona produced a blocker; calibrates other personas' findings post-hoc
98
+ - 4.9 Principles Auditor — **runs on every review (complexity ≥ 2), always.** Audits the design against the four principles in `../references/principles.md` and raises a finding for each violation lacking a stated reason:
99
+ - **One right way** — does any artifact introduce a second way to do something the codebase already does? Does a spec leave two approaches open ("X or Y")? → blocker until one is chosen.
100
+ - **DRY** — is any fact given a second home (a capability in feature + MADR + constraint; a constant/rule duplicated)? Does any task store something derivable from code/mcp? → blocker.
101
+ - **Don't reinvent the wheel** — does any task build a mechanism that an existing tool/library/proven pattern already provides (custom crypto/auth, a bespoke change-tracking/diff/staging process where git suffices)? → blocker.
102
+ - **Keep it simple** — any abstraction, indirection, new dependency, or new file justified only by a hypothetical, or scope reaching past a non-goal? → suggestion (blocker if it adds a maintained surface).
103
+ - Also enforce the **artifact-jurisdiction** rule: any `.feature` scenario that is really a constraint (security/NFR/observability), an internal technical detail, or a non-functional concern is a blocker — it belongs in `constraints.md` or a MADR, not Gherkin.
104
+
105
+ ### 5.5 Visual Fidelity (cheap tier)
106
+
107
+ Engage when `.grimoire/brand/tokens.json` exists OR the change has design artifacts under `.grimoire/changes/<change-id>/designs/`. Follow `../references/visual-fidelity.md` for the design-phase invocation (HTML preview scope — `designs/preview.html` and any `variant-{n}.html`). Skip silently when neither condition holds.
108
+
109
+ ### 6. Present Findings
110
+ Compile into the standard report layout (§5 of the personas reference):
200
111
 
201
112
  ```markdown
202
113
  # Design Review: <change-id>
203
114
 
115
+ ## Project Briefing
116
+ <briefing block>
117
+
204
118
  ## Product Manager
205
119
  - **[blocker]** Missing error scenario for invalid email format in registration feature
206
120
  - **[suggestion]** Add a scenario for password strength feedback
@@ -210,27 +124,51 @@ Compile all reviews into a single summary:
210
124
  - **[suggestion]** Reuse `validate_email()` from `utils/validators.py` instead of writing a new one
211
125
 
212
126
  ## Security Engineer
127
+ ### STRIDE
128
+ - ...
129
+ ### Findings
213
130
  - **[suggestion]** Add rate limiting scenario for login attempts
214
- - No other security concerns for this change.
215
131
 
216
132
  ## QA Engineer
217
133
  - **[blocker]** No negative scenario for expired TOTP codes — testers can't verify error handling
218
- - **[suggestion]** Add scenario for what happens when 2FA service is unreachable
219
134
  (or: "No user-facing behavior changes — skipped.")
220
135
 
221
136
  ## Data Engineer
222
137
  - **[blocker]** Missing index on `profiles.user_id` — will cause full table scans on join queries
223
- - **[suggestion]** `avatar_url` should have a max_length constraint
224
138
  (or: "No data changes in this design — skipped.")
225
139
 
226
- ## Summary
227
- - **3 blockers** must be addressed before coding
228
- - **3 suggestions** — consider addressing
140
+ ## Adversarial User <!-- omit when no surface-matched personas engaged -->
141
+ - **[blocker]** [keyboard-only] Submit button in `designs/variant-2.html:84` is `<div onclick>` — not focusable
142
+ - **[suggestion]** [low-vision] Body text contrast 4.2:1 in `designs/variant-2.html:120` below WCAG AA 4.5:1
143
+
144
+ ## Visual Fidelity <!-- omit when not engaged (no tokens.json + no design artifacts) -->
145
+ ### Token Compliance
146
+ - **[suggestion]** `designs/preview.html:42` hardcoded `#0066ff` — replace with `var(--color-primary)`
147
+ (or: "No brand drift detected across N files scanned.")
148
+
149
+ ### Accessibility (axe-core)
150
+ - **[suggestion]** [axe-color-contrast] `designs/preview.html` — Element has insufficient color contrast 3.8. Impact: serious.
151
+ (or: "axe-core: no violations." / "axe-core not installed — install `@axe-core/cli` for accessibility checks.")
152
+
153
+ ## Principles Auditor
154
+ - **[blocker]** [DRY] PII-scrubbing behavior is specified in both `features/pii-log-scrubbing.feature` and ADR-0008 — one authoritative home. Move to `constraints.md`, link the MADR.
155
+ - **[blocker]** [jurisdiction] `features/logging-observability.feature` describes internal log structure (no external actor) — belongs in `constraints.md`, not a `.feature`.
156
+ - **[suggestion]** [KISS] Task 3.2 adds a `BaseExtractor` for a single caller — inline until a second extractor exists.
157
+ (or: "No principle violations found.")
158
+
159
+ ## Contrarian <!-- omit when zero findings from all personas -->
160
+ - **[blocker upheld]** ...
161
+ - **[blocker → suggestion]** ...
162
+ - **[finding dropped]** ...
163
+
164
+ ## Summary <!-- counts are post-Contrarian -->
165
+ - **N blockers** — must be addressed before coding
166
+ - **M suggestions** — consider addressing
229
167
 
230
168
  Recommendation: Fix blockers, then proceed to apply.
231
169
  ```
232
170
 
233
- ### 9. Iterate
171
+ ### 7. Iterate
234
172
  - If there are **blockers**, tell the user which artifacts need updating (features, decisions, or tasks) and offer to help fix them
235
173
  - If only **suggestions**, present them and let the user decide which to address
236
174
  - If **no issues**, confirm the design is ready and suggest proceeding to `grimoire-apply`
@@ -242,6 +180,7 @@ Recommendation: Fix blockers, then proceed to apply.
242
180
  - A blocker means "if we code this as-is, we'll have to come back and redo work." A suggestion means "this would improve the design but isn't blocking."
243
181
  - Keep each persona's review focused and short. Three bullet points that matter are better than ten that don't.
244
182
  - If the change is trivial (e.g., rename a field, fix a typo in a feature), say so and don't manufacture issues.
183
+ - All persona evaluation criteria, the materiality gate, the briefing structure, and the complexity-depth table live in `../references/review-personas.md`. Don't duplicate them here — read that file when running a persona.
245
184
 
246
185
  ## Done
247
186
  When findings are presented and blockers resolved (or accepted), the review is complete. Suggest proceeding to `grimoire-apply`.