prizmkit 1.0.96 → 1.0.99

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.0.96",
3
- "bundledAt": "2026-03-23T12:42:15.546Z",
4
- "bundledFrom": "e29472c"
2
+ "frameworkVersion": "1.0.99",
3
+ "bundledAt": "2026-03-23T13:30:18.410Z",
4
+ "bundledFrom": "df41166"
5
5
  }
@@ -10,7 +10,6 @@ export const COMMANDS_DIR = '.claude/commands';
10
10
  export const AGENTS_DIR = '.claude/agents';
11
11
  export const SETTINGS_FILE = '.claude/settings.json';
12
12
  export const RULES_DIR = '.claude/rules';
13
- export const PROJECT_MEMORY_FILE = 'CLAUDE.md';
14
13
  export const MCP_CONFIG_FILE = '.mcp.json';
15
14
 
16
15
  // Global paths (relative to home directory)
@@ -1,24 +1,26 @@
1
1
  ---
2
2
  name: prizm-dev-team-reviewer
3
- description: PrizmKit-integrated quality reviewer. Uses /prizmkit-analyze for cross-document consistency, /prizmkit-code-review for spec compliance and code quality, and writes integration tests. Use when performing analysis, testing, or code review.
3
+ description: PrizmKit-integrated quality reviewer and technical advisor. Uses /prizmkit-analyze for cross-document consistency, /prizmkit-code-review for diagnosis and fix strategy formulation, and writes integration tests. Produces structured Fix Instructions that Dev can follow precisely. Use when performing analysis, testing, or code review.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
5
5
  model: inherit
6
6
  skills: prizmkit-code-review, prizmkit-analyze, prizmkit-prizm-docs
7
7
  ---
8
8
 
9
- You are the **Reviewer Agent**, the quality reviewer of the PrizmKit-integrated Multi-Agent software development collaboration team.
9
+ You are the **Reviewer Agent**, the quality reviewer and technical advisor of the PrizmKit-integrated Multi-Agent software development collaboration team.
10
10
 
11
11
  ### Core Identity
12
12
 
13
- You are the team's "quality inspector + proofreader" — you do not produce the product but ensure its quality. You are responsible for two phases:
13
+ You are the team's "senior engineer doing code review" — you diagnose problems, analyze root causes, formulate precise fix strategies, and deliver actionable feedback. You do not write implementation code yourself, but your Fix Instructions are detailed enough that Dev can follow them as a recipe. You are responsible for two phases:
14
14
  1. **Cross-validation (Phase 4)**: Before implementation, use `/prizmkit-analyze` to check consistency across spec/plan/tasks
15
- 2. **Review (Phase 6)**: After implementation, use `/prizmkit-code-review` to check code quality, and write and execute integration tests
15
+ 2. **Review & Fix Strategy (Phase 6)**: After implementation, use `/prizmkit-code-review` for diagnosis + fix strategy formulation, and write and execute integration tests
16
16
 
17
17
  ### Project Context
18
18
 
19
19
  Project documentation is in `.prizm-docs/`. Before review, read `context-snapshot.md` (if it exists in `.prizmkit/specs/###-feature-name/`); its Section 3 contains Prizm Context (RULES, PATTERNS, TRAPS). Section 4 contains a File Manifest. The '## Implementation Log' section (if present) describes what Dev changed and key decisions.
20
20
 
21
- **⚠️ File Reading Rule**: Do NOT re-read source files that are already covered by the Implementation Log or Section 4 File Manifest unless you need to verify a specific code detail for a finding. Read ONLY the files listed in the Implementation Log — do not explore files unrelated to what Dev changed. If the snapshot does not exist, read `root.prizm` to understand project rules.
21
+ **File Reading Rule**: Do NOT re-read source files that are already covered by the Implementation Log or Section 4 File Manifest unless you need to verify a specific code detail for a finding. Read ONLY the files listed in the Implementation Log — do not explore files unrelated to what Dev changed. If the snapshot does not exist, read `root.prizm` to understand project rules.
22
+
23
+ **Exception**: During Fix Strategy Formulation (Phase 2 of code-review), you MAY read additional files to trace impact (callers, dependents, shared patterns) — this is necessary for accurate Impact Analysis and Fix Strategy.
22
24
 
23
25
  ### Artifact Paths
24
26
 
@@ -30,16 +32,19 @@ Project documentation is in `.prizm-docs/`. Before review, read `context-snapsho
30
32
  ### Must Do (MUST)
31
33
 
32
34
  1. In Phase 4, run `/prizmkit-analyze` for cross-consistency validation
33
- 2. In Phase 6, run `/prizmkit-code-review` for spec compliance and code quality review
35
+ 2. In Phase 6, run `/prizmkit-code-review` for diagnosis and fix strategy formulation
34
36
  3. In Phase 6, write and execute integration tests to verify cross-module interactions
35
37
  4. Verify that actual implementation conforms to interface designs in plan.md
36
38
  5. Verify the integrity and correctness of cross-module data flows
37
39
  6. Test boundary conditions and exception paths
38
40
  7. Check that code conforms to `.prizm-docs/` RULES and PATTERNS
39
- 8. Review is a **read-only operation** (the review portions of Phase 4 and Phase 6 do not modify code files)
40
- 9. Integration test cases must cover all user stories defined in spec.md
41
- 10. After completing review, append '## Review Notes' to context-snapshot.md: issues found (severity), test results, final verdict
42
- 11. During review, read the '## Implementation Log' section of context-snapshot.md to understand Dev's changes and decisions
41
+ 8. Diagnostic Review (Phase 1 of code-review) is a **read-only operation** no code modifications
42
+ 9. Fix Strategy Formulation (Phase 2 of code-review) is a **read + analyze operation** — read additional files for impact analysis but do not modify code
43
+ 10. Integration test cases must cover all user stories defined in spec.md
44
+ 11. Every finding CRITICAL/HIGH must include: Root Cause, Impact, Fix Strategy, Code Guidance, Verification Criteria
45
+ 12. After completing review, write structured '## Review Notes' with Fix Instructions to context-snapshot.md
46
+ 13. During review, read the '## Implementation Log' section of context-snapshot.md to understand Dev's changes and decisions
47
+ 14. Group related findings and order Fix Instructions by dependency → severity
43
48
 
44
49
  ### Never Do (NEVER)
45
50
 
@@ -48,24 +53,27 @@ Project documentation is in `.prizm-docs/`. Before review, read `context-snapsho
48
53
  - Do not perform task scheduling (that is the Orchestrator's responsibility)
49
54
  - **Do not execute any git operations** (git commit / git add / git reset / git push are all prohibited)
50
55
  - Do not use TaskCreate/TaskUpdate to create or modify Orchestrator-level tasks (Task tools are for internal progress tracking only, and task IDs are not shared across agent sub-sessions)
56
+ - Do not modify source files to fix issues — produce Fix Instructions for Dev instead
51
57
 
52
58
  ### Behavioral Rules
53
59
 
54
60
  ```
55
61
  REV-01: In Phase 4, use /prizmkit-analyze for cross-validation
56
- REV-02: In Phase 6, use /prizmkit-code-review for code review
62
+ REV-02: In Phase 6, use /prizmkit-code-review for diagnosis + fix strategy
57
63
  REV-03: Every finding must reference a specific file path and line number
58
- REV-04: CRITICAL-level findings must include a specific fix recommendation
64
+ REV-04: CRITICAL/HIGH findings must include Root Cause, Impact, Fix Strategy, Code Guidance, and Verification Criteria
59
65
  REV-05: Maximum 30 findings (maintain actionability)
60
66
  REV-06: Spec compliance failures are always HIGH or CRITICAL
61
67
  REV-07: Security findings are always HIGH or CRITICAL
62
68
  REV-08: Integration tests must cover all user stories in spec.md
63
69
  REV-09: Review code for conformance to .prizm-docs/ PATTERNS and RULES
64
70
  REV-10: Do not use the timeout command (incompatible with macOS). Run tests directly with node --test or npm test without a timeout prefix
65
- REV-11: After review, append '## Review Notes' to context-snapshot.md (issues, severity, test results, verdict)
71
+ REV-11: Write structured Review Notes with Fix Instructions to context-snapshot.md
66
72
  REV-12: Read Implementation Log in context-snapshot.md to understand Dev's decisions; reference relevant decisions in the review report
67
73
  REV-13: DO NOT re-run the full test suite if the Implementation Log already confirms passing tests — trust Dev's result. Only re-run when: (a) log is absent, or (b) the log does not explicitly state test results
68
74
  REV-14: When running the test suite, run it ONCE with `tee /tmp/review-test-out.txt`, then grep the file — never re-run the suite just to apply a different filter
75
+ REV-15: On re-review (iteration > 1), check only the Verification Criteria from previous Fix Instructions + scan for regressions — do NOT re-run the full 6-dimension review
76
+ REV-16: Group related findings that share root cause or code path — provide a unified fix strategy for the group
69
77
  ```
70
78
 
71
79
  ### Phase 4 Workflow: Cross-Validation
@@ -80,31 +88,89 @@ REV-14: When running the test suite, run it ONCE with `tee /tmp/review-test-out.
80
88
  2. If CRITICAL issues are found, report to the Orchestrator for rollback and fix
81
89
  3. Send COMPLETION_SIGNAL (with analysis results)
82
90
 
83
- ### Phase 6 Workflow: Review
91
+ ### Phase 6 Workflow: Review & Fix Strategy
84
92
 
85
93
  **Precondition**: Dev has completed implementation; all tasks are marked `[x]`
86
94
 
95
+ **Step 1 — Context Loading**:
87
96
  1. Read `context-snapshot.md` (if it exists); its Section 3 contains RULES and PATTERNS. If the snapshot does not exist, read `.prizm-docs/root.prizm`
88
97
  2. Read '## Implementation Log' in context-snapshot.md to understand Dev's changes and decisions
89
- 3. Run `/prizmkit-code-review` (read-only)
90
- - 6 review dimensions: spec compliance, plan adherence, code quality, security, consistency, test coverage
91
- - Verdict: PASS | PASS WITH WARNINGS | NEEDS FIXES
92
- 3. Run the full test suite **ONLY if the '## Implementation Log' does not already confirm all tests passing**. If the log states tests passed, trust it and skip the full re-run. When running: `$TEST_CMD 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep the file for details — do NOT re-run the suite multiple times. Write and execute integration tests:
98
+
99
+ **Step 2 Diagnostic Review** (read-only):
100
+ 3. Run `/prizmkit-code-review` Phase 1 diagnose across 6 dimensions:
101
+ - spec compliance, plan adherence, code quality, security, consistency, test coverage
102
+ - Generate findings with severity ratings
103
+
104
+ **Step 3 — Integration Testing**:
105
+ 4. Run the full test suite — **ONLY if the '## Implementation Log' does not already confirm all tests passing**. If the log states tests passed, trust it and skip the full re-run. When running: `$TEST_CMD 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep the file for details — do NOT re-run the suite multiple times.
106
+ 5. Write and execute integration tests:
93
107
  - Interface compliance (request format, response format)
94
108
  - Cross-module data flow integrity
95
109
  - User story acceptance criteria (from spec.md)
96
110
  - Boundary conditions and exception paths
97
- 4. Generate a unified review report
98
- 5. Append '## Review Notes' to context-snapshot.md (issues found, severity, test results, verdict)
99
- 6. Send COMPLETION_SIGNAL (with verdict)
111
+
112
+ **Step 4 Fix Strategy Formulation** (for NEEDS_FIXES or PASS_WITH_WARNINGS):
113
+ 6. For each finding (CRITICAL/HIGH mandatory, MEDIUM/LOW when actionable):
114
+ - **Root Cause Analysis**: trace the issue to its origin — why does this problem exist?
115
+ - **Impact Analysis**: search the codebase for callers/dependents of affected code. List concrete file:line locations. You MAY read additional files beyond the Implementation Log for this step.
116
+ - **Fix Strategy**: step-by-step modification plan with order and dependencies
117
+ - **Code Guidance**: before/after code snippets for the key change
118
+ - **Verification Criteria**: specific commands/checks to confirm the fix works
119
+ 7. Group related findings, establish fix ordering (dependencies → severity)
120
+
121
+ **Step 5 — Structured Output**:
122
+ 8. Write '## Review Notes' to context-snapshot.md using the structured Fix Instructions format:
123
+
124
+ ```markdown
125
+ ## Review Notes
126
+
127
+ ### Verdict: NEEDS_FIXES
128
+ ### Review Iteration: 1/5
129
+ ### Summary: 5 findings (1 critical, 2 high, 1 medium, 1 low)
130
+
131
+ ### Fix Instructions (ordered by priority)
132
+
133
+ #### FIX-1: [CRITICAL] Title
134
+ - Location: file:line
135
+ - Root Cause: ...
136
+ - Impact: ...
137
+ - Fix Strategy: ...
138
+ - Code Guidance: ...
139
+ - Verification: ...
140
+ - Related: FIX-3
141
+ - Depends On: (none)
142
+ - Blocks: FIX-3
143
+
144
+ #### FIX-2: [HIGH] Title
145
+ ...
146
+
147
+ ### Re-Review Expectations
148
+ After fixes are applied, the reviewer expects:
149
+ 1. (specific verification commands)
150
+ 2. (behavioral checks)
151
+ 3. All existing tests pass
152
+ ```
153
+
154
+ 9. Send COMPLETION_SIGNAL (with verdict)
155
+
156
+ ### Re-Review Workflow (iteration > 1)
157
+
158
+ When Dev has applied fixes and returns for re-review:
159
+
160
+ 1. Read the **previous** '## Review Notes' in context-snapshot.md to get the Verification Criteria
161
+ 2. Read the **updated** '## Implementation Log' to understand what Dev changed
162
+ 3. **Focused check**: run only the Verification Criteria from previous Fix Instructions — do NOT re-run the full 6-dimension diagnostic
163
+ 4. **Regression scan**: run the test suite to check for regressions introduced by fixes
164
+ 5. If new issues are found, formulate new Fix Instructions. If previous fixes introduced new problems, note this in the review and adjust fix strategy
165
+ 6. Update '## Review Notes' with new iteration results
100
166
 
101
167
  ### Verdict Criteria
102
168
 
103
169
  | Verdict | Condition | Follow-up Action |
104
170
  |---------|-----------|-----------------|
105
171
  | **PASS** | No CRITICAL or HIGH findings | Proceed to the next phase |
106
- | **PASS_WITH_WARNINGS** | No CRITICAL, but HIGH findings exist | Record items for improvement; may proceed to the next phase |
107
- | **NEEDS_FIXES** | CRITICAL findings exist | Return to Dev for fixes, then re-review |
172
+ | **PASS_WITH_WARNINGS** | No CRITICAL, but HIGH findings exist | Record Fix Instructions for improvement; may proceed |
173
+ | **NEEDS_FIXES** | CRITICAL findings exist | Dev fixes following Fix Instructions, then re-review |
108
174
 
109
175
  ### Severity Levels
110
176
 
@@ -120,15 +186,15 @@ REV-14: When running the test suite, run it ONCE with `tee /tmp/review-test-out.
120
186
  | Scenario | Strategy |
121
187
  |----------|----------|
122
188
  | Analyze finds CRITICAL | Report to Orchestrator → rollback for fix |
123
- | Code-review finds CRITICAL | Report to Orchestratorreturn to Dev for fix |
124
- | Integration test failure | Classify severity → ISSUE_REPORT → Orchestrator assigns to Dev |
189
+ | Code-review finds CRITICAL | Produce Fix InstructionsOrchestrator assigns to Dev |
190
+ | Integration test failure | Classify severity → include in Fix Instructions → Orchestrator assigns to Dev |
125
191
  | Findings exceed 30 | Keep only the 30 most severe |
126
192
  | Prizm RULES violation | Automatically classify as CRITICAL |
127
193
 
128
194
  ### Communication Rules
129
195
 
130
196
  Direct communication between Agents is allowed, but key messages and conclusions must be reported to the Orchestrator.
131
- - Send COMPLETION_SIGNAL (with verdict) to indicate completion
197
+ - Send COMPLETION_SIGNAL (with verdict + Fix Instructions summary) to indicate completion
132
198
  - Send ISSUE_REPORT to report CRITICAL findings
133
199
  - Receive TASK_ASSIGNMENT to get assigned work
134
200
 
@@ -160,9 +160,9 @@ Prompt:
160
160
  > - Section 3: Prizm Context (RULES, PATTERNS to check against)
161
161
  > - Section 4: File Manifest (original file structure)
162
162
  > - '## Implementation Log': what Dev changed, key decisions, discoveries
163
- > 2. Run prizmkit-code-review: spec compliance (against spec.md), code quality, correctness. Read ONLY files listed in Implementation Log.
163
+ > 2. Run prizmkit-code-review (both phases): Phase 1 diagnostic review (spec compliance, code quality, correctness), then Phase 2 fix strategy formulation for any findings. Read ONLY files listed in Implementation Log for diagnosis; MAY read additional files for impact analysis.
164
164
  > 3. Run the full test suite — **ONLY if the Implementation Log does not already confirm all tests passing**. If the log states tests passed, trust it and skip the re-run. When running: `$TEST_CMD 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep the file for details — do NOT re-run the suite multiple times. Write and execute integration tests covering all user stories.
165
- > 4. Append '## Review Notes' to context-snapshot.md: issues found (with severity), test results, final verdict.
165
+ > 4. Write structured '## Review Notes' to context-snapshot.md with Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification for each finding) and Re-Review Expectations.
166
166
  > Report verdict: PASS, PASS_WITH_WARNINGS, or NEEDS_FIXES."
167
167
 
168
168
  Wait for Reviewer to return.
@@ -172,9 +172,9 @@ After Reviewer agent returns, verify the Review Notes were written:
172
172
  ```bash
173
173
  grep -q "## Review Notes" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md && echo "GATE:PASS" || echo "GATE:MISSING"
174
174
  ```
175
- If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '## Review Notes' section to context-snapshot.md. Include: issues found (severity), test results, final verdict."
175
+ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '## Review Notes' section to context-snapshot.md with structured Fix Instructions. Include: verdict, findings with Root Cause/Impact/Fix Strategy/Code Guidance/Verification, and Re-Review Expectations."
176
176
 
177
- - If NEEDS_FIXES: spawn Dev to fix (Dev reads updated snapshot), re-run Review (max 3 rounds)
177
+ - If NEEDS_FIXES: spawn Dev to fix (Dev reads Fix Instructions in snapshot), re-run Review (max 3 rounds)
178
178
 
179
179
  **CP-2**: Tests pass, verdict is not NEEDS_FIXES.
180
180
 
@@ -303,9 +303,9 @@ Prompt:
303
303
  > - Section 3: Prizm Context (RULES, PATTERNS to check against)
304
304
  > - Section 4: File Manifest (original file structure)
305
305
  > - '## Implementation Log': what Dev changed, key decisions, discoveries
306
- > 2. Run prizmkit-code-review: spec compliance (against spec.md), code quality, correctness. Read ONLY files listed in Implementation Log.
306
+ > 2. Run prizmkit-code-review (both phases): Phase 1 diagnostic review (spec compliance, code quality, correctness), then Phase 2 fix strategy formulation for any findings. Read ONLY files listed in Implementation Log for diagnosis; MAY read additional files for impact analysis.
307
307
  > 3. Run the full test suite using `TEST_CMD=<TEST_CMD>` — **ONLY if the Implementation Log does not already confirm all tests passing**. If Implementation Log states tests passed, trust it and skip the re-run. When running tests: `$TEST_CMD 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep `/tmp/review-test-out.txt` for details — do NOT re-run the suite multiple times. Write and execute integration tests covering all user stories from spec.md.
308
- > 4. Append '## Review Notes' to context-snapshot.md: issues found (with severity), test results, final verdict.
308
+ > 4. Write structured '## Review Notes' to context-snapshot.md with Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification for each finding) and Re-Review Expectations.
309
309
  > Report verdict: PASS, PASS_WITH_WARNINGS, or NEEDS_FIXES."
310
310
 
311
311
  Wait for Reviewer to return.
@@ -315,15 +315,16 @@ After Reviewer agent returns, verify the Review Notes were written:
315
315
  ```bash
316
316
  grep -q "## Review Notes" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md && echo "GATE:PASS" || echo "GATE:MISSING"
317
317
  ```
318
- If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '## Review Notes' section to context-snapshot.md. Include: issues found (severity), test results, final verdict."
318
+ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '## Review Notes' section to context-snapshot.md with structured Fix Instructions. Include: verdict, findings with Root Cause/Impact/Fix Strategy/Code Guidance/Verification, and Re-Review Expectations."
319
319
 
320
320
  - If NEEDS_FIXES: spawn Dev to fix with this prompt:
321
321
  > "Read {{DEV_SUBAGENT_PATH}}. Fix NEEDS_FIXES issues for feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
322
- > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — '## Review Notes' section lists the exact issues to fix.
323
- > 2. Fix ONLY the issues listed in 'Review Notes'. Do NOT refactor unrelated code.
324
- > 3. Use `TEST_CMD=<TEST_CMD>` to verify fixes.
325
- > 4. Append fix summary to '## Implementation Log' in context-snapshot.md.
326
- > 5. Do NOT execute any git commands."
322
+ > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — '## Review Notes' section contains structured Fix Instructions with exact steps.
323
+ > 2. Follow Fix Instructions in order (respect Depends On / Blocks dependencies). Each FIX-N has: Root Cause, Fix Strategy, Code Guidance, and Verification criteria.
324
+ > 3. After each fix, run the Verification command listed in that FIX-N to confirm it works.
325
+ > 4. Use `TEST_CMD=<TEST_CMD>` to verify no regressions.
326
+ > 5. Append fix summary to '## Implementation Log' in context-snapshot.md.
327
+ > 6. Do NOT execute any git commands."
327
328
  Then re-run Review (max 3 rounds).
328
329
 
329
330
  **CP-3**: Integration tests pass, verdict is not NEEDS_FIXES.
@@ -173,17 +173,18 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
173
173
 
174
174
  - Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false)
175
175
  Prompt: "Read {{REVIEWER_SUBAGENT_PATH}}. For bug {{BUG_ID}}:
176
- 1. Run `/prizmkit-code-review` scoped to CHANGED FILES ONLY
176
+ 1. Run `/prizmkit-code-review` scoped to CHANGED FILES ONLY (both phases: diagnostic + fix strategy)
177
177
  2. Review dimensions (adjusted for bug fix):
178
178
  - Fix correctness: Does it address the root cause?
179
179
  - Regression safety: Does it break existing behavior?
180
180
  - Code quality: Is the fix clean and maintainable?
181
181
  - Test coverage: Is the reproduction test adequate?
182
182
  3. Run full test suite and verify ALL tests pass
183
- 4. Report verdict: PASS / PASS_WITH_WARNINGS / NEEDS_FIXES
183
+ 4. If findings exist, produce Fix Instructions with Root Cause, Impact, Fix Strategy, Code Guidance, and Verification criteria
184
+ 5. Report verdict: PASS / PASS_WITH_WARNINGS / NEEDS_FIXES
184
185
  "
185
186
  - **Wait for Reviewer to return**
186
- - If NEEDS_FIXES: return to Phase 3 for refinement (max 2 review rounds)
187
+ - If NEEDS_FIXES: return to Phase 3 for refinement following Fix Instructions (max 2 review rounds)
187
188
  - **CP-BF-4**: Code review passes, all tests green
188
189
 
189
190
  {{IF_VERIFICATION_MANUAL_OR_HYBRID}}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.96",
2
+ "version": "1.0.99",
3
3
  "skills": {
4
4
  "prizm-kit": {
5
5
  "description": "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management.",
@@ -51,7 +51,7 @@
51
51
  "hasScripts": false
52
52
  },
53
53
  "prizmkit-code-review": {
54
- "description": "Code review against spec, plan, and best practices.",
54
+ "description": "Code review with fix strategy formulation. Diagnoses issues, then produces structured Fix Instructions with root cause, impact analysis, and verification criteria.",
55
55
  "tier": "1",
56
56
  "category": "prizmkit-skill",
57
57
  "hasAssets": false,
@@ -7,20 +7,11 @@ description: "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm
7
7
 
8
8
  PrizmKit is a comprehensive, independent AI development toolkit that covers the complete development lifecycle from project inception to delivery and maintenance. It can take over any project and keep documentation in sync with code.
9
9
 
10
- ## Quick Start Command
11
- ```
12
- /prizmkit-init # Take over a project (scan, assess, generate docs)
13
- /prizmkit-specify # Create feature specification
14
- /prizmkit-plan # Generate implementation plan and task breakdown
15
- /prizmkit-analyze # Cross-document consistency check (recommended)
16
- /prizmkit-implement # Execute implementation
17
- /prizmkit-committer # Commit with auto doc update
18
- ```
19
10
 
20
11
  ## When to Use the Full Workflow
21
12
 
22
13
  **Use full workflow (specify -> plan -> implement):**
23
- - New features or user-facing capabilities
14
+ - Difficult features or user-facing capabilities
24
15
  - Multi-file coordinated changes
25
16
  - Architectural decisions
26
17
  - Data model or API changes
@@ -29,7 +20,6 @@ The full workflow generates spec, plan, and task artifacts that create a traceab
29
20
 
30
21
  **Use fast path (plan → implement → commit):**
31
22
  - Bug fixes with clear root cause
32
- - Single-file config or typo fixes
33
23
  - Simple refactors (rename, extract)
34
24
  - Documentation-only changes
35
25
  - Test additions for existing code
@@ -46,7 +36,7 @@ For fast-path changes, you can directly generate a simplified plan.md, then use
46
36
  /prizmkit-plan → writes plan.md with tasks (architecture, data model, API, UI)
47
37
  /prizmkit-analyze → checks spec↔plan consistency, finds gaps
48
38
  /prizmkit-implement → executes tasks in order, marks [x] as done
49
- /prizmkit-code-review → reviews against spec, outputs PASS/NEEDS FIXES
39
+ /prizmkit-code-review → diagnoses issues + produces Fix Instructions
50
40
  /prizmkit-retrospective → syncs .prizm-docs/ with code changes
51
41
  /prizmkit-committer → commits feat(avatar): add upload
52
42
  ```
@@ -84,69 +74,6 @@ PrizmKit produces two complementary knowledge layers:
84
74
  **Reading guide**:
85
75
  - Need code structure/modules/interfaces/traps/decisions? → `.prizm-docs/`
86
76
 
87
- ## Skill Inventory
88
-
89
- ### Foundation (3)
90
- - **prizm-kit** — Full-lifecycle dev toolkit entry point
91
- - **prizmkit-init** — Project takeover: scan → assess → generate docs → initialize
92
- - **prizmkit-prizm-docs** — Prizm documentation framework with 6 operations: init, update, status, rebuild, validate, migrate
93
-
94
- ### Spec-Driven Workflow (8)
95
- - **prizmkit-specify** — Create structured feature specifications from natural language
96
- - **prizmkit-clarify** — Interactive requirement clarification
97
- - **prizmkit-plan** — Generate technical plan with data model, API contracts, and executable task breakdown (all in one plan.md)
98
- - **prizmkit-analyze** — Cross-document consistency analysis (spec ↔ plan ↔ tasks)
99
- - **prizmkit-implement** — Execute tasks following TDD approach
100
- - **prizmkit-code-review** — Review code against spec and plan
101
- - **prizmkit-retrospective** — Sole .prizm-docs/ maintainer: structural sync + TRAPS/RULES/DECISIONS injection
102
- - **prizmkit-committer** — Pure git commit: diff analysis, safety checks, Conventional Commits
103
-
104
- ### Quality Assurance (5)
105
- - **prizmkit-tool-tech-debt-tracker** — [Tier 1] Technical debt identification and tracking via code pattern analysis
106
- - **prizmkit-tool-bug-reproducer** — [Tier 1] Generate minimal reproduction scripts and test cases
107
- - **prizmkit-tool-adr-manager** — [Tier 1] Architecture Decision Records management
108
- - **prizmkit-tool-security-audit** — [Tier 2] AI-assisted security review checklist via static analysis
109
- - **prizmkit-tool-dependency-health** — [Tier 2] Dependency review based on manifest files
110
-
111
- ### Operations & Deployment (4)
112
- - **prizmkit-tool-ci-cd-generator** — [Tier 2] Generate CI/CD pipeline config templates
113
- - **prizmkit-tool-deployment-strategy** — [Tier 2] Deployment planning with rollback procedures
114
- - **prizmkit-tool-db-migration** — [Tier 2] Database migration script generation
115
- - **prizmkit-tool-monitoring-setup** — [Tier 2] Generate monitoring config templates
116
-
117
- ### Debugging & Troubleshooting (3)
118
- - **prizmkit-tool-error-triage** — [Tier 2] Error categorization and root cause analysis
119
- - **prizmkit-tool-log-analyzer** — [Tier 2] Log pattern recognition via text analysis
120
- - **prizmkit-tool-perf-profiler** — [Tier 2] Static analysis for performance issues
121
-
122
- ### Documentation (2)
123
- - **prizmkit-tool-onboarding-generator** — [Tier 2] Generate developer onboarding guides
124
- - **prizmkit-tool-api-doc-generator** — [Tier 2] Extract API documentation from source code
125
-
126
- ### Pipeline & Companion (7)
127
- - **feature-workflow** — One-stop feature development: plan → launch pipeline → monitor
128
- - **refactor-workflow** — End-to-end refactor: analyze → plan → implement → review → commit
129
- - **app-planner** — Interactive app planning that produces feature-list.json for dev-pipeline
130
- - **bug-planner** — Interactive bug planning that produces bug-fix-list.json for bugfix-pipeline
131
- - **bug-fix-workflow** — Interactive single-bug fix in current session (triage → reproduce → fix → review → commit)
132
- - **dev-pipeline-launcher** — Launch and manage the feature dev-pipeline (background daemon)
133
- - **bugfix-pipeline-launcher** — Launch and manage the bugfix pipeline (background daemon)
134
-
135
- ### Scenario Decision Tree
136
-
137
- Not sure which skill to use? Follow this:
138
-
139
- | I want to... | Use this |
140
- |---|---|
141
- | Build a new app or batch of features from scratch | `feature-workflow` (one-stop) |
142
- | Plan features first, then decide when to build | `app-planner` → `dev-pipeline-launcher` |
143
- | Launch pipeline for an existing feature-list.json | `dev-pipeline-launcher` |
144
- | Fix multiple bugs in batch | `bug-planner` → `bugfix-pipeline-launcher` |
145
- | Fix one specific bug right now, interactively | `bug-fix-workflow` |
146
- | Refactor/restructure code without changing behavior | `refactor-workflow` |
147
- | Add a single small feature (spec → plan → implement) | `/prizmkit-specify` → `/prizmkit-plan` → `/prizmkit-implement` |
148
- | Quick bug fix or config change | Fast path: `/prizmkit-plan` → `/prizmkit-implement` → `/prizmkit-committer` |
149
-
150
77
  ### Tier Definitions
151
78
 
152
79
  - **Tier 1**: AI can perform well independently — these tasks align with AI's core strengths (documentation, code pattern analysis, test generation)
@@ -1,11 +1,16 @@
1
1
  ---
2
2
  name: "prizmkit-code-review"
3
- description: "Code review against spec, plan, and best practices. Read-only analysis with severity ratings. Use this skill after implementation to catch spec compliance gaps, security issues, and pattern violations before committing. Trigger on: 'review', 'check code', 'review my implementation', 'code review', 'is it ready to commit'. (project)"
3
+ description: "Code review with fix strategy formulation. Diagnoses issues across 6 dimensions, then produces structured Fix Instructions with root cause, impact analysis, and verification criteria. Use after implementation as quality gate before committing. Trigger on: 'review', 'check code', 'review my implementation', 'code review', 'is it ready to commit'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Code Review
7
7
 
8
- Perform a comprehensive code review against the feature spec, implementation plan, and project best practices. Produces a structured review report with severity ratings. This skill is strictly read-only — it surfaces issues without auto-fixing them, so you can decide what actually needs changing.
8
+ Perform a comprehensive code review against the feature spec, implementation plan, and project best practices. This skill has two phases:
9
+
10
+ 1. **Diagnostic Review** — read-only analysis across 6 dimensions, producing findings with severity ratings
11
+ 2. **Fix Strategy Formulation** — for each finding, analyze root cause, impact, and produce actionable Fix Instructions with verification criteria
12
+
13
+ The review itself is read-only. Fix Instructions are structured guidance for the developer — the reviewer does not modify code.
9
14
 
10
15
  ### When to Use
11
16
  - After `/prizmkit-implement` to verify code quality before commit
@@ -18,7 +23,7 @@ Perform a comprehensive code review against the feature spec, implementation pla
18
23
  - **Bugfix mode**: `fix-plan.md` exists in `.prizmkit/bugfix/<BUG_ID>/` with completed tasks. Review against the bug description and reproduction test.
19
24
  - **Auto-detect**: Check which artifact directory was passed by the calling workflow, or scan `.prizmkit/` for the most recently modified feature/refactor/bugfix directory.
20
25
 
21
- ## Execution Steps
26
+ ## Phase 1: Diagnostic Review
22
27
 
23
28
  1. **Detect mode and load review baseline**:
24
29
  - If `spec.md` exists → **Feature mode**: read `spec.md` + `plan.md` as baseline. Review dimensions: spec compliance, plan adherence, code quality, security, consistency, test coverage.
@@ -29,16 +34,41 @@ Perform a comprehensive code review against the feature spec, implementation pla
29
34
  3. Read **past decisions**: check DECISIONS sections in relevant `.prizm-docs/` L1/L2 files — helps verify implementation respects established conventions
30
35
  4. Read '## Implementation Log' section of context-snapshot.md in the feature directory (if exists) — understand Dev's implementation decisions, trade-offs, and notable discoveries. This context helps distinguish intentional design choices from accidental patterns during review.
31
36
  5. Scan all code files referenced in completed tasks
32
- 4. Review across 6 dimensions:
37
+ 6. Review across 6 dimensions:
33
38
  - **Spec compliance**: Does code implement all acceptance criteria? Missing criteria are the #1 source of "it works but it's wrong" bugs
34
39
  - **Plan adherence**: Does implementation follow architectural decisions in plan.md? Deviations may be improvements or may break assumptions other components depend on
35
40
  - **Code quality**: Naming, structure, complexity, DRY. Focus on maintainability — will someone understand this code in 6 months?
36
41
  - **Security**: Injection (SQL, XSS, command), auth/authz gaps, sensitive data exposure, insecure defaults. Security issues are always HIGH+ because they're the hardest to catch later
37
42
  - **Consistency**: Follows project patterns from `.prizm-docs/` PATTERNS section. Inconsistent patterns increase cognitive load for every future reader
38
43
  - **Test coverage**: Are critical paths tested? Focus on paths that handle user input, money, or state transitions
39
- 5. Generate findings with severity: `CRITICAL` > `HIGH` > `MEDIUM` > `LOW`
40
- 6. Determine verdict (see criteria below)
41
- 7. Output structured review report to conversation only
44
+ 7. Generate findings with severity: `CRITICAL` > `HIGH` > `MEDIUM` > `LOW`
45
+
46
+ ## Phase 2: Fix Strategy Formulation
47
+
48
+ For each finding from Phase 1 (CRITICAL and HIGH are mandatory; MEDIUM/LOW when actionable):
49
+
50
+ 1. **Root Cause Analysis** — identify WHY the problem exists, not just WHAT is wrong. Trace the issue to its origin (wrong assumption? missing context? copy-paste error?)
51
+ 2. **Impact Analysis** — search the codebase for all callers/dependents of the affected code. List concrete file:line locations that will be affected by the fix
52
+ 3. **Fix Strategy** — concrete step-by-step modification plan:
53
+ - What to change, where, and in what order
54
+ - Which project conventions to follow (reference `.prizm-docs/` RULES)
55
+ - Dependencies between fixes (FIX-1 must be done before FIX-3)
56
+ 4. **Code Guidance** — show before/after code snippets for the key change. Keep minimal — enough to unambiguate the approach, not a full implementation
57
+ 5. **Verification Criteria** — how to confirm the fix works:
58
+ - Specific commands to run (grep patterns, test commands)
59
+ - What the output should look like
60
+ - Edge cases to verify
61
+
62
+ ### Finding Grouping
63
+
64
+ Group related findings that should be fixed together. If FIX-1 and FIX-3 share the same root cause or affect the same code path, mark them as a group with a shared fix strategy. This prevents Dev from fixing symptoms individually only to have the underlying cause persist.
65
+
66
+ ### Fix Priority Ordering
67
+
68
+ Order Fix Instructions by:
69
+ 1. **Dependencies first** — if FIX-2 depends on FIX-1, FIX-1 comes first
70
+ 2. **CRITICAL before HIGH** — severity determines priority within independent fixes
71
+ 3. **Grouped fixes together** — related findings are adjacent
42
72
 
43
73
  ## Severity & Verdict
44
74
 
@@ -49,27 +79,96 @@ Spec compliance failures are always HIGH or CRITICAL — if the code doesn't mat
49
79
  - `PASS WITH WARNINGS`: No CRITICAL findings, some HIGH findings
50
80
  - `NEEDS FIXES`: Any CRITICAL findings present
51
81
 
52
- Cap findings at 30 to keep the review actionable. If there are more, summarize the overflow with counts by dimension. Every CRITICAL finding includes a specific fix suggestion — telling someone "this is broken" without saying how to fix it wastes their time.
82
+ Cap findings at 30 to keep the review actionable. If there are more, summarize the overflow with counts by dimension.
53
83
 
54
84
  If you're unsure whether something is a bug or intentional design, flag it as MEDIUM with a note asking the developer to confirm. Don't silently skip uncertain findings.
55
85
 
56
- ## Example Finding
86
+ ## Finding Format
57
87
 
58
88
  ```
59
- #### [CRITICAL] SQL Injection in User Search
60
- - File: src/services/userService.ts:47
89
+ #### FIX-1: [CRITICAL] SQL Injection in User Search
90
+ - Location: src/services/userService.ts:47
61
91
  - Dimension: security
62
- - Description: User input `searchTerm` is interpolated directly into SQL query string without parameterization
63
- - Suggestion: Use parameterized query: `db.query('SELECT * FROM users WHERE name LIKE $1', [`%${searchTerm}%`])`
64
-
65
- #### [HIGH] Missing Acceptance Criterion
66
- - File: src/routes/upload.ts
92
+ - Root Cause: User input `searchTerm` is interpolated directly into SQL query
93
+ string. The `buildQuery()` helper (line 12) accepts raw strings without
94
+ sanitization, and all callers trust it blindly.
95
+ - Impact: All callers of `searchUsers()` are affected — found 3 call sites:
96
+ routes/api.ts:89, routes/admin.ts:34, services/reportService.ts:112
97
+ - Fix Strategy:
98
+ 1. Replace string interpolation with parameterized query at line 47
99
+ 2. Update `buildQuery()` helper to accept params array
100
+ 3. Update all 3 call sites to pass params
101
+ Note: project uses `pg` client directly (not ORM), follow the pattern
102
+ established in `orderService.ts:23` per .prizm-docs/ RULES
103
+ - Code Guidance:
104
+ ```ts
105
+ // line 47: change from
106
+ const result = await db.query(`SELECT * FROM users WHERE name LIKE '%${searchTerm}%'`);
107
+ // to
108
+ const result = await db.query('SELECT * FROM users WHERE name LIKE $1', [`%${searchTerm}%`]);
109
+ ```
110
+ - Verification:
111
+ - `grep -rn "\${.*}" src/ --include="*.ts"` returns no SQL-context matches
112
+ - Test `user.search.test.ts` covers parameterized path
113
+ - Existing test suite passes
114
+ - Related: FIX-3 (same pattern in reportService)
115
+ - Depends On: (none)
116
+ - Blocks: FIX-3
117
+
118
+ #### FIX-2: [HIGH] Missing Acceptance Criterion AC-3
119
+ - Location: src/routes/upload.ts
67
120
  - Dimension: spec-compliance
68
- - Description: spec.md §AC-3 requires "display progress bar during upload" but no progress tracking is implemented
69
- - Suggestion: Add upload progress callback using xhr.upload.onprogress or fetch with ReadableStream
121
+ - Root Cause: spec.md §AC-3 requires "display progress bar during upload" but
122
+ the upload handler uses a simple fetch() without progress tracking.
123
+ Implementation Log does not mention this criterion — likely overlooked.
124
+ - Impact: Upload route only — no cross-module impact
125
+ - Fix Strategy:
126
+ 1. Replace fetch() with XMLHttpRequest or fetch + ReadableStream
127
+ 2. Add progress callback that emits percentage events
128
+ 3. Wire progress events to the UI component (if frontend exists)
129
+ - Code Guidance:
130
+ ```ts
131
+ // Replace simple fetch with progress-aware upload
132
+ const xhr = new XMLHttpRequest();
133
+ xhr.upload.onprogress = (e) => {
134
+ if (e.lengthComputable) onProgress(Math.round(e.loaded / e.total * 100));
135
+ };
136
+ ```
137
+ - Verification:
138
+ - Upload a file > 1MB and verify progress callback fires
139
+ - Test covers progress event emission
140
+ - Related: (none)
141
+ - Depends On: (none)
142
+ - Blocks: (none)
143
+ ```
144
+
145
+ ## Review Notes Format
146
+
147
+ When writing to context-snapshot.md, use this structured format:
148
+
149
+ ```markdown
150
+ ## Review Notes
151
+
152
+ ### Verdict: PASS | PASS_WITH_WARNINGS | NEEDS_FIXES
153
+ ### Review Iteration: 1/5
154
+ ### Summary: X findings (N critical, N high, N medium, N low)
155
+
156
+ ### Fix Instructions (ordered by priority)
157
+
158
+ #### FIX-1: [SEVERITY] Title
159
+ (full finding format as above)
160
+
161
+ #### FIX-2: [SEVERITY] Title
162
+ ...
163
+
164
+ ### Re-Review Expectations
165
+ After fixes are applied, the reviewer expects:
166
+ 1. (specific grep/test commands that should pass)
167
+ 2. (behavioral checks)
168
+ 3. All existing tests pass
70
169
  ```
71
170
 
72
- **HANDOFF:** `/prizmkit-retrospective` (if PASS) or `/prizmkit-implement` (if NEEDS FIXES)
171
+ **HANDOFF:** `/prizmkit-retrospective` (if PASS) or Dev fixes following Fix Instructions (if NEEDS FIXES)
73
172
 
74
173
  ## Loop Protection
75
174
 
@@ -78,8 +177,8 @@ In unattended pipeline mode, the review→fix→review cycle can loop indefinite
78
177
  - Track a `review_iteration` counter starting at 1. Each review-fix-review cycle increments the counter.
79
178
  - **max_iterations = 5**: If `review_iteration >= 5`, you MUST proceed to `/prizmkit-retrospective` regardless of remaining findings. Log remaining issues as known technical debt: "Loop protection triggered — proceeding to retrospective with N unresolved findings (iterations: 5/5)."
80
179
  - Unresolved findings should be recorded in the review report so they can be tracked as follow-up work.
81
- - This guard exists because some review cycles oscillate (fixing one issue introduces another) and blocking forever is worse than shipping with documented known issues.
180
+ - On re-review (iteration > 1): only check the specific Verification Criteria from previous Fix Instructions + scan for regressions. Do NOT re-run the full 6-dimension review unless new code was added beyond the fix scope.
82
181
 
83
182
  ## Output
84
183
 
85
- Review report is output to conversation only. No files are created or modified.
184
+ Review report with Fix Instructions is output to conversation and written to the '## Review Notes' section of context-snapshot.md. No source code files are created or modified.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "prizmkit-retrospective"
3
- description: "Incremental .prizm-docs/ maintainer. Performs two jobs: (1) structural sync — update .prizm-docs/ KEY_FILES/INTERFACES/DEPENDENCIES, (2) architecture knowledge — inject TRAPS/RULES/DECISIONS into .prizm-docs/. All project knowledge lives in .prizm-docs/ — no writes to CLAUDE.md/CODEBUDDY.md/memory/MEMORY.md. Run after code review passes and before committing. Trigger on: 'retrospective', 'retro', 'update docs', 'sync docs', 'wrap up', 'done with feature', 'feature complete'. (project)"
3
+ description: "Incremental .prizm-docs/ maintainer. Performs two jobs: (1) structural sync — update .prizm-docs/ KEY_FILES/INTERFACES/DEPENDENCIES, (2) architecture knowledge — inject TRAPS/RULES/DECISIONS into .prizm-docs/. All project knowledge lives in .prizm-docs/ . Run after code review passes and before committing. Trigger on: 'retrospective', 'retro', 'update docs', 'sync docs', 'wrap up', 'done with feature', 'feature complete'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Retrospective
@@ -14,16 +14,14 @@ All project knowledge is maintained in a single store:
14
14
  **This skill performs two jobs in one pass:**
15
15
 
16
16
  1. **Structural Sync** — reflect what changed in code → `.prizm-docs/` (KEY_FILES, INTERFACES, DEPENDENCIES, file counts)
17
- 2. **Architecture Knowledge** — inject TRAPS, RULES, and DECISIONS → `.prizm-docs/`
18
-
19
- **Important**: This skill does NOT write to `CLAUDE.md`, `CODEBUDDY.md`, or `memory/MEMORY.md`. All knowledge is consolidated in `.prizm-docs/`.
17
+ 2. **Architecture Knowledge** — inject TRAPS, RULES, and DECISIONS → `.prizm-docs/`. All knowledge is consolidated in `.prizm-docs/`.
20
18
 
21
19
  No other skill writes to `.prizm-docs/`. This is the sole writer during ongoing development. For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` instead.
22
20
 
23
21
  ## When to Use
24
22
 
25
23
  - **Before every commit** (mandatory in pipeline) — ensures docs and code are in sync
26
- - After completing a feature (spec, plan, implementation all done)
24
+ - After completing a feature
27
25
  - After code review passes (PASS or PASS WITH WARNINGS)
28
26
  - User says "retrospective", "retro", "update docs", "sync docs", "wrap up"
29
27
  - After refactoring or bugfix cycles (structural sync + optional TRAPS update)
@@ -33,7 +31,6 @@ No other skill writes to `.prizm-docs/`. This is the sole writer during ongoing
33
31
  - Only comments, whitespace, or formatting changed — no structural/knowledge change
34
32
  - Only test files changed — no module-level impact
35
33
  - Only .prizm files changed — avoid circular updates
36
- - User just wants to commit without doc update — use `/prizmkit-committer` directly (but pipeline will flag `docs_missing`)
37
34
 
38
35
  ---
39
36
 
@@ -129,7 +126,7 @@ Extract TRAPS, RULES, and DECISIONS from development work and inject into `.priz
129
126
  ## Final: Changelog + Stage
130
127
 
131
128
  **3a.** Append to `.prizm-docs/changelog.prizm`:
132
- - Format: `- YYYY-MM-DD | <module-path> | <verb>: <one-line description>`
129
+ - Format: `<module-path> | <verb>: <one-line description>`
133
130
  - Verbs: add, update, fix, remove, refactor, rename, deprecate
134
131
  - One entry per meaningful change, not one per file
135
132
 
@@ -146,17 +146,18 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
146
146
 
147
147
  **STEPS:**
148
148
 
149
- 1. **Invoke `/prizmkit-code-review`** (scoped to changed files):
149
+ 1. **Invoke `/prizmkit-code-review`** (scoped to changed files, both phases):
150
150
  - Review dimensions for refactoring:
151
151
  - **Behavior preservation**: Does observable behavior remain identical?
152
152
  - **Structural improvement**: Is the code measurably better? (complexity, coupling, readability)
153
153
  - **Test integrity**: Are all tests still meaningful and passing?
154
154
  - **Code quality**: Does refactored code follow project conventions?
155
+ - If findings exist, produce Fix Instructions with Root Cause, Fix Strategy, and Verification criteria
155
156
  - Verdict: PASS / PASS_WITH_WARNINGS / NEEDS_FIXES
156
157
  2. **Run full test suite one final time**: All tests must pass
157
158
  3. **Handle review results**:
158
159
  - **PASS / PASS_WITH_WARNINGS**: Proceed to Phase 5
159
- - **NEEDS_FIXES**: Return to Phase 3 (max 2 review rounds)
160
+ - **NEEDS_FIXES**: Return to Phase 3 following Fix Instructions (max 2 review rounds)
160
161
 
161
162
  **CHECKPOINT CP-RW-4**: Code review passes, all tests green.
162
163
 
@@ -26,7 +26,7 @@
26
26
  "name": "reviewer",
27
27
  "role": "reviewer",
28
28
  "agentDefinition": "prizm-dev-team-reviewer",
29
- "prompt": "You are the Reviewer Agent of the prizm-dev-team. In Phase 4: run /prizmkit-analyze for cross-document consistency. In Phase 6: run /prizmkit-code-review for spec compliance and code quality, write and execute integration tests.",
29
+ "prompt": "You are the Reviewer Agent of the prizm-dev-team. In Phase 4: run /prizmkit-analyze for cross-document consistency. In Phase 6: run /prizmkit-code-review for diagnosis + fix strategy formulation, write and execute integration tests. Produce structured Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification) so Dev can follow them precisely. Write Fix Instructions to context-snapshot.md '## Review Notes' section.",
30
30
  "subscriptions": ["*"]
31
31
  }
32
32
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.0.96",
3
+ "version": "1.0.99",
4
4
  "description": "Create a new PrizmKit-powered project with clean initialization — no framework dev files, just what you need.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/upgrade.js CHANGED
@@ -27,7 +27,6 @@ import {
27
27
  installPipeline,
28
28
  installPrizmkitScripts,
29
29
  installGitHook,
30
- installPostMergeHook,
31
30
  installGitignore,
32
31
  resolvePipelineFileList,
33
32
  } from './scaffold.js';
@@ -363,7 +362,6 @@ export async function runUpgrade(directory, options = {}) {
363
362
  // Git hook
364
363
  console.log(chalk.blue(' Git Hook:'));
365
364
  await installGitHook(projectRoot, dryRun);
366
- await installPostMergeHook(projectRoot, dryRun);
367
365
 
368
366
  // .gitignore
369
367
  console.log(chalk.blue(' Gitignore:'));