prizmkit 1.1.125 → 1.1.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +49 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +75 -14
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +37 -0
- package/bundled/dev-pipeline/prizmkit_runtime/task_checkout.py +267 -0
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +3 -2
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +6 -18
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -15
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +8 -9
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +9 -9
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +15 -18
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +11 -17
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +9 -9
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +8 -5
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +1 -1
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +1 -1
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +206 -3
- package/bundled/dev-pipeline/tests/test_runtime_helper.py +36 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +10 -7
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/prizmkit-code-review/SKILL.md +128 -95
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +89 -25
- package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +246 -114
- package/package.json +1 -1
|
@@ -811,7 +811,7 @@ def test_session_preamble_writes_redacted_start_command_for_all_launch_profiles(
|
|
|
811
811
|
assert str(prompt) not in "\n".join(lines[:6])
|
|
812
812
|
|
|
813
813
|
|
|
814
|
-
def
|
|
814
|
+
def test_headless_review_guidance_uses_risk_routed_dual_layer_loop():
|
|
815
815
|
headless_guidance_files = [
|
|
816
816
|
REPO_ROOT / "dev-pipeline" / "templates" / "sections" / "phase-review-full.md",
|
|
817
817
|
REPO_ROOT / "dev-pipeline" / "templates" / "bootstrap-tier3.md",
|
|
@@ -827,10 +827,10 @@ def test_headless_review_guidance_uses_minimal_reviewer_loop():
|
|
|
827
827
|
|
|
828
828
|
for path in headless_guidance_files:
|
|
829
829
|
text = path.read_text(encoding="utf-8")
|
|
830
|
-
assert "platform-supported" in text, path
|
|
831
|
-
assert "active checkout" in text, path
|
|
832
|
-
assert "platform-forced worktree" in text, path
|
|
833
830
|
assert "Main-Agent self-review" in text, path
|
|
831
|
+
assert "low=0" in text and "medium=1" in text and "high=2" in text, path
|
|
832
|
+
assert "Reviewer 3 is forbidden" in text, path
|
|
833
|
+
assert "text final-verdict" in text, path
|
|
834
834
|
assert "workspace-equivalent" not in text, path
|
|
835
835
|
assert "workspace protocol" not in text, path
|
|
836
836
|
assert "current-workspace / active-checkout / no-worktree" not in text, path
|
|
@@ -838,16 +838,17 @@ def test_headless_review_guidance_uses_minimal_reviewer_loop():
|
|
|
838
838
|
assert ".prizmkit/state/worktrees/..." not in text, path
|
|
839
839
|
assert "USE_WORKTREE" not in text, path
|
|
840
840
|
assert "isolation:" not in text, path
|
|
841
|
-
assert "Read existing source files in the modules this plan touches" not in text, path
|
|
842
841
|
|
|
843
842
|
skill_text = skill_path.read_text(encoding="utf-8")
|
|
844
843
|
assert "staged and unstaged tracked changes" in skill_text
|
|
845
844
|
assert "untracked files" in skill_text
|
|
846
845
|
assert "accepted = 0" in skill_text
|
|
847
|
-
assert "
|
|
846
|
+
assert "low: 0" in skill_text and "medium: 1" in skill_text and "high: 2" in skill_text
|
|
847
|
+
assert "accepted high-severity finding" in skill_text
|
|
848
|
+
assert "Do not launch Reviewer 3" in skill_text
|
|
849
|
+
assert "## Final Result" in skill_text
|
|
848
850
|
assert "BLOCKED" in skill_text
|
|
849
851
|
assert "Do not substitute Main-Agent self-review" in skill_text
|
|
850
|
-
assert "platform forces an isolated worktree" in skill_text
|
|
851
852
|
assert "reviewer-workspace-protocol.md" not in skill_text
|
|
852
853
|
assert "reviewer-execution-protocol.md" not in skill_text
|
|
853
854
|
assert "WORKSPACE_MISMATCH" not in skill_text
|
|
@@ -2233,6 +2234,7 @@ def test_materialize_worktree_support_assets_copies_ignored_assets_without_retir
|
|
|
2233
2234
|
(repo / ".prizmkit" / "dev-pipeline" / "prizmkit_runtime").mkdir(parents=True)
|
|
2234
2235
|
(repo / ".prizmkit" / "dev-pipeline" / "prizmkit_runtime" / "__init__.py").write_text("", encoding="utf-8")
|
|
2235
2236
|
(repo / ".prizmkit" / "dev-pipeline" / "prizmkit_runtime" / "runtime_helper.py").write_text("# helper", encoding="utf-8")
|
|
2237
|
+
(repo / ".prizmkit" / "dev-pipeline" / "prizmkit_runtime" / "task_checkout.py").write_text("# checkout", encoding="utf-8")
|
|
2236
2238
|
(repo / ".prizmkit" / "dev-pipeline" / "run-feature.sh").write_text("retired", encoding="utf-8")
|
|
2237
2239
|
|
|
2238
2240
|
runtime = worktree_runtime_context(
|
|
@@ -2253,6 +2255,7 @@ def test_materialize_worktree_support_assets_copies_ignored_assets_without_retir
|
|
|
2253
2255
|
assert (runtime.worktree_path / ".prizmkit" / "dev-pipeline" / "scripts" / "update-checkpoint.py").is_file()
|
|
2254
2256
|
assert (runtime.worktree_path / ".prizmkit" / "dev-pipeline" / "prizmkit_runtime" / "__init__.py").is_file()
|
|
2255
2257
|
assert (runtime.worktree_path / ".prizmkit" / "dev-pipeline" / "prizmkit_runtime" / "runtime_helper.py").is_file()
|
|
2258
|
+
assert (runtime.worktree_path / ".prizmkit" / "dev-pipeline" / "prizmkit_runtime" / "task_checkout.py").is_file()
|
|
2256
2259
|
assert not (runtime.worktree_path / ".prizmkit" / "dev-pipeline" / "run-feature.sh").exists()
|
|
2257
2260
|
|
|
2258
2261
|
assert guarded_worktree_remove(runtime, delete_branch=False).ok
|
|
@@ -1,169 +1,202 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-code-review"
|
|
3
|
-
description: "Run a
|
|
3
|
+
description: "Run a risk-routed dual-layer code review against the current spec, plan, workspace changes, applicable rules, contracts, and test evidence. The Main Agent first self-reviews and repairs for up to ten rounds, then semantic risk determines whether zero, one, or two fresh read-only independent Reviewers are required. Findings remain Main-Agent adjudicated, Reviewer 3 is forbidden, and one append-only progress report records the execution through PASS, NEEDS_FIXES, or BLOCKED. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Code Review
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Use a dual-layer review loop: the Main Agent owns iterative review and repair, while fresh independent Reviewers act only as semantic-risk gates.
|
|
9
9
|
|
|
10
10
|
## When to Use
|
|
11
11
|
|
|
12
12
|
- After `/prizmkit-implement` as the Full path quality gate
|
|
13
|
-
- For Fast path when
|
|
14
|
-
- When the user asks to
|
|
15
|
-
- Before `/prizmkit-committer` when the selected lifecycle requires review
|
|
16
|
-
|
|
17
|
-
## When Not to Use
|
|
18
|
-
|
|
19
|
-
- Direct edit or low-risk Fast path where review is intentionally skipped
|
|
20
|
-
- No task goal, specification, plan, or other review contract can be identified
|
|
21
|
-
- Trivial changes the user explicitly wants committed without review
|
|
13
|
+
- For Fast path when behavior, risk, or the user warrants review
|
|
14
|
+
- When the user asks to validate implementation, find defects, assess regressions, or decide commit readiness
|
|
22
15
|
|
|
23
16
|
## Input
|
|
24
17
|
|
|
25
18
|
| Parameter | Required | Description |
|
|
26
19
|
|---|---|---|
|
|
27
|
-
| `artifact_dir` | No | Directory containing `spec.md` and `plan.md`. Reuse a caller-provided directory
|
|
20
|
+
| `artifact_dir` | No | Directory containing `spec.md` and `plan.md`. Reuse a caller-provided directory; otherwise locate the current completed change artifact. |
|
|
28
21
|
|
|
29
22
|
## Required Assets
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- `${SKILL_DIR}/
|
|
34
|
-
- `${SKILL_DIR}/references/review-report-template.md`: final report contract
|
|
35
|
-
- `${SKILL_DIR}/assets/reviewer-role.json`: semantic read-only and non-delegating Reviewer boundary used by platform adapters
|
|
24
|
+
- `${SKILL_DIR}/references/reviewer-agent-prompt.md`: independent Reviewer input and output contract
|
|
25
|
+
- `${SKILL_DIR}/references/review-report-template.md`: report lifecycle and append contract
|
|
26
|
+
- `${SKILL_DIR}/assets/reviewer-role.json`: semantic read-only and non-delegating Reviewer boundary
|
|
36
27
|
|
|
37
|
-
The
|
|
28
|
+
Do not weaken or summarize the Reviewer prompt. The protocol specifies semantic capabilities rather than platform-specific tool names.
|
|
38
29
|
|
|
39
|
-
## Phase 0: Collect
|
|
30
|
+
## Phase 0: Initialize Report and Collect Context
|
|
40
31
|
|
|
41
|
-
1.
|
|
42
|
-
2.
|
|
43
|
-
3. Read
|
|
44
|
-
4.
|
|
45
|
-
5. Inspect and capture the complete current Git change:
|
|
32
|
+
1. Resolve `{artifact_dir}` and `{artifact_dir}/review-report.md`.
|
|
33
|
+
2. replace any prior report with a new execution header using the report template. The new report begins with `## Status: IN_PROGRESS` and contains no prior Final Result.
|
|
34
|
+
3. Read `spec.md`, `plan.md`, relevant `/prizmkit-test` evidence, `.prizmkit/prizm-docs/root.prizm`, applicable progressive docs, and project rules.
|
|
35
|
+
4. Inspect and capture the complete current Git change:
|
|
46
36
|
- staged and unstaged tracked changes;
|
|
47
37
|
- untracked files;
|
|
48
38
|
- deleted and renamed files;
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
- relevant unchanged callers, dependents, contracts, and tests.
|
|
40
|
+
5. Preserve the existing Reviewer input behavior: staged and unstaged Git diffs, full content of every untracked file, and explicit deleted/renamed states.
|
|
41
|
+
6. If no changes exist, append risk `low` and exactly one final result with `PASS`, then finish without a Reviewer.
|
|
52
42
|
|
|
53
43
|
### Checkout Access
|
|
54
44
|
|
|
55
|
-
Prefer
|
|
45
|
+
Prefer direct access to the active checkout. If the platform forces an isolated worktree, provide the same staged and unstaged diffs, untracked file contents, and changed-path states; use the worktree only for baseline and surrounding-context reads. Do not require workspace-equivalence proof.
|
|
46
|
+
|
|
47
|
+
## Phase 1: Semantic Risk Assessment
|
|
48
|
+
|
|
49
|
+
Classify the current change from behavior and failure impact, not changed-file count or a fixed path allowlist:
|
|
56
50
|
|
|
57
|
-
|
|
51
|
+
- `low: 0` independent Reviewers — documentation, test text, mechanical change, local low-impact configuration, or trivially verifiable behavior.
|
|
52
|
+
- `medium: 1` independent Reviewer — general business behavior, internal interface changes, or non-critical data processing with user-visible regression potential.
|
|
53
|
+
- `high: 2` independent Reviewers maximum — payments, financial ledgers, authentication, authorization, security, migration, concurrent transactions, irreversible data operations, or public contracts.
|
|
58
54
|
|
|
59
|
-
|
|
60
|
-
2. tell the Reviewer to use the worktree only for baseline and surrounding-context reads;
|
|
61
|
-
3. clearly label supplied changed content separately from unchanged context;
|
|
62
|
-
4. do not require the Reviewer to prove that the two physical checkouts are identical.
|
|
55
|
+
Mixed risks use the highest applicable level. A large mechanical diff is not automatically high; a small money or authorization change is high.
|
|
63
56
|
|
|
64
|
-
|
|
57
|
+
Append `## Risk Assessment` with the selected risk and concrete reasons before review begins.
|
|
65
58
|
|
|
66
|
-
## Phase
|
|
59
|
+
## Phase 2: Main-Agent Self-Review Loop
|
|
67
60
|
|
|
68
|
-
Track
|
|
61
|
+
The Main Agent reviews and repairs in the current context. Track Main-Agent rounds independently from Reviewer launch attempts:
|
|
69
62
|
|
|
70
63
|
```yaml
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
findings: []
|
|
64
|
+
main_review_rounds: 0
|
|
65
|
+
independent_reviewers_started: 0
|
|
66
|
+
reviewer_1_accepted_high: false
|
|
75
67
|
```
|
|
76
68
|
|
|
77
|
-
|
|
69
|
+
Every Reviewer Agent launch attempt increments `independent_reviewers_started`, including a retry that starts a new Agent. The total may never exceed the semantic-risk limit.
|
|
78
70
|
|
|
79
|
-
###
|
|
71
|
+
### Main-Agent Self-Review Loop
|
|
72
|
+
|
|
73
|
+
Each round examines the complete current change against goals, contracts, rules, callers, dependents, regression risks, and test evidence.
|
|
74
|
+
|
|
75
|
+
1. Identify concrete candidate findings.
|
|
76
|
+
2. Classify each as:
|
|
77
|
+
- `accepted`: evidence supports the failure scenario;
|
|
78
|
+
- `rejected`: code or governing evidence disproves it or its regression path.
|
|
79
|
+
3. Append `## Main Review Round N` with findings, accepted, rejected, and next action.
|
|
80
|
+
4. Apply these rules:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
accepted = 0 -> self-review converged
|
|
84
|
+
accepted > 0 and round < 10 -> Main Agent directly repairs, verifies, and continues
|
|
85
|
+
accepted > 0 at ten completed Main-Agent rounds -> NEEDS_FIXES
|
|
86
|
+
repair cannot be completed safely -> NEEDS_FIXES
|
|
87
|
+
unresolved new in-scope test failure -> NEEDS_FIXES
|
|
88
|
+
```
|
|
80
89
|
|
|
81
|
-
|
|
82
|
-
2. Launch exactly one fresh foreground Reviewer for this round.
|
|
83
|
-
3. Provide the complete current review input using `${SKILL_DIR}/references/reviewer-agent-prompt.md`.
|
|
84
|
-
4. Do not provide previous-round findings, verdicts, filtering decisions, rejection reasons, or repair explanations.
|
|
90
|
+
When all findings are rejected, `accepted = 0` and the phase converges. Main-Agent rounds never increase the independent Reviewer counter. The fixed limit is ten completed Main-Agent rounds.
|
|
85
91
|
|
|
86
|
-
|
|
92
|
+
After each repair batch, append `## Repair Verification` with fixed findings, verification evidence, and next phase.
|
|
87
93
|
|
|
88
|
-
|
|
94
|
+
## Phase 3: Independent Reviewer 1
|
|
89
95
|
|
|
90
|
-
|
|
96
|
+
After Main-Agent self-review and required tests converge:
|
|
91
97
|
|
|
92
|
-
|
|
98
|
+
- low risk: skip all independent Reviewers and proceed to final verification;
|
|
99
|
+
- medium or high risk: launch Reviewer 1.
|
|
93
100
|
|
|
94
|
-
|
|
101
|
+
Before launch, append:
|
|
95
102
|
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
```markdown
|
|
104
|
+
## Independent Reviewer 1
|
|
98
105
|
|
|
99
|
-
|
|
106
|
+
- Status: RUNNING
|
|
107
|
+
- Risk Trigger: <medium|high>
|
|
108
|
+
```
|
|
100
109
|
|
|
101
|
-
|
|
110
|
+
Launch exactly one fresh foreground Reviewer using the unchanged prompt and role. Do not provide previous review findings, filtering decisions, rejection reasons, or repair explanations.
|
|
102
111
|
|
|
103
|
-
|
|
112
|
+
### Reviewer Infrastructure Failure
|
|
104
113
|
|
|
105
|
-
|
|
114
|
+
If the Reviewer cannot start, exits abnormally, returns unusable output, or lacks essential context:
|
|
106
115
|
|
|
107
|
-
|
|
108
|
-
|
|
116
|
+
1. append the observable failure;
|
|
117
|
+
2. count the failed launch attempt against the semantic-risk Reviewer limit;
|
|
118
|
+
3. allow at most one infrastructure retry at this same Reviewer position only when the risk limit still has an unused launch;
|
|
119
|
+
4. append a new RUNNING retry section before retrying and increment the Reviewer launch counter;
|
|
120
|
+
5. if the retry fails or the risk limit is exhausted, append Final Result `BLOCKED` and stop;
|
|
121
|
+
6. do not convert infrastructure failure into a code finding;
|
|
122
|
+
7. Do not substitute Main-Agent self-review for a required independent result.
|
|
109
123
|
|
|
110
|
-
|
|
124
|
+
### Finding Adjudication
|
|
111
125
|
|
|
112
|
-
|
|
126
|
+
For a usable Reviewer result, append `## Independent Reviewer 1 Result`, then classify every finding as accepted or rejected with evidence.
|
|
113
127
|
|
|
114
128
|
```text
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
Reviewer returns findings and accepted > 0 -> repair or stop
|
|
129
|
+
accepted = 0 -> Reviewer 1 converged
|
|
130
|
+
accepted > 0 -> Main Agent repairs, verifies, and reruns its self-review loop
|
|
118
131
|
```
|
|
119
132
|
|
|
120
|
-
|
|
133
|
+
Accepted findings do not automatically trigger another independent Reviewer.
|
|
121
134
|
|
|
122
|
-
|
|
135
|
+
## Phase 4: Reviewer 2 Eligibility
|
|
123
136
|
|
|
124
|
-
|
|
137
|
+
Reviewer 2 is allowed only when every condition is true:
|
|
125
138
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
139
|
+
- risk is `high`;
|
|
140
|
+
- Reviewer 1 contained at least one accepted high-severity finding;
|
|
141
|
+
- all accepted high findings were repaired;
|
|
142
|
+
- targeted verification passed;
|
|
143
|
+
- Main-Agent self-review reconverged.
|
|
131
144
|
|
|
132
|
-
|
|
145
|
+
Accepted medium or low findings alone never trigger Reviewer 2. Medium risk never starts Reviewer 2.
|
|
133
146
|
|
|
134
|
-
|
|
147
|
+
When eligible, append a RUNNING section and launch one fresh Reviewer 2 with the unchanged complete-review prompt and current change input.
|
|
135
148
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
149
|
+
After Reviewer 2:
|
|
150
|
+
|
|
151
|
+
- accepted = 0: proceed to final verification;
|
|
152
|
+
- accepted > 0: Main Agent repairs, verifies, and runs its final self-review loop;
|
|
153
|
+
- unresolved repair: `NEEDS_FIXES`;
|
|
154
|
+
- Do not launch Reviewer 3 under any condition.
|
|
155
|
+
|
|
156
|
+
## Phase 5: Append-Only Reporting
|
|
157
|
+
|
|
158
|
+
`{artifact_dir}/review-report.md` is the only required persisted review artifact.
|
|
159
|
+
|
|
160
|
+
Within one execution, append new sections only. Do not rewrite an earlier progress section. Append after:
|
|
161
|
+
|
|
162
|
+
- risk assessment;
|
|
163
|
+
- every Main-Agent review round;
|
|
164
|
+
- every repair and verification batch;
|
|
165
|
+
- every Reviewer launch;
|
|
166
|
+
- every Reviewer result and adjudication;
|
|
167
|
+
- every infrastructure retry;
|
|
168
|
+
- final verification.
|
|
139
169
|
|
|
140
|
-
|
|
170
|
+
A RUNNING section is not edited after completion; append a separate result section. An interrupted execution remains `IN_PROGRESS` and shows its latest running or completed phase.
|
|
141
171
|
|
|
142
|
-
|
|
143
|
-
- completed round count;
|
|
144
|
-
- findings and their `fixed`, `rejected`, or `unresolved` disposition;
|
|
145
|
-
- a concise final summary;
|
|
146
|
-
- an infrastructure reason when blocked.
|
|
172
|
+
## Phase 6: Final Result
|
|
147
173
|
|
|
148
|
-
|
|
174
|
+
Append exactly one final result:
|
|
149
175
|
|
|
150
|
-
|
|
176
|
+
```markdown
|
|
177
|
+
## Final Result
|
|
151
178
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
179
|
+
- Verdict: PASS | NEEDS_FIXES | BLOCKED
|
|
180
|
+
- Risk: low | medium | high
|
|
181
|
+
- Main Review Rounds: <count>
|
|
182
|
+
- Independent Reviewers Started: <count>
|
|
183
|
+
- Accepted Findings: <count>
|
|
184
|
+
- Fixed Findings: <count>
|
|
185
|
+
- Rejected Findings: <count>
|
|
186
|
+
- Unresolved Findings: <count>
|
|
187
|
+
- Summary: <concise conclusion>
|
|
155
188
|
```
|
|
156
189
|
|
|
157
|
-
|
|
190
|
+
Final outcomes:
|
|
158
191
|
|
|
159
|
-
|
|
192
|
+
- `PASS`: Main-Agent review converged, every required independent review completed, and no accepted finding remains unresolved.
|
|
193
|
+
- `NEEDS_FIXES`: Main-Agent round ten still has accepted findings, a repair is unsafe, or verification remains unresolved.
|
|
194
|
+
- `BLOCKED`: a required independent Reviewer position failed and either its one permitted retry failed or the semantic-risk launch limit left no retry capacity; essential independent-review context is unavailable.
|
|
160
195
|
|
|
161
|
-
|
|
162
|
-
- `NEEDS_FIXES`: accepted findings remain unresolved or the tenth completed round still has accepted findings.
|
|
163
|
-
- `BLOCKED`: Reviewer execution or essential review input failed before a usable result was obtained.
|
|
196
|
+
Exactly one final result is allowed. Do not append progress after Final Result.
|
|
164
197
|
|
|
165
198
|
Completion handoff:
|
|
166
199
|
|
|
167
200
|
- `PASS`: run `/prizmkit-retrospective` when structural docs or durable knowledge changed; otherwise proceed to `/prizmkit-committer`.
|
|
168
|
-
- `NEEDS_FIXES`: report unresolved
|
|
169
|
-
- `BLOCKED`: report
|
|
201
|
+
- `NEEDS_FIXES`: report unresolved findings and stop.
|
|
202
|
+
- `BLOCKED`: report infrastructure evidence and permit recovery.
|
|
@@ -1,40 +1,104 @@
|
|
|
1
|
-
# Review Report
|
|
1
|
+
# Review Report Lifecycle Template
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`{artifact_dir}/review-report.md` is the only required persisted review artifact.
|
|
4
|
+
|
|
5
|
+
## Execution Start
|
|
6
|
+
|
|
7
|
+
Every `/prizmkit-code-review` execution replaces any prior report with:
|
|
4
8
|
|
|
5
9
|
```markdown
|
|
6
10
|
# Review Report
|
|
7
11
|
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
## Status: IN_PROGRESS
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Within that execution, append sections only. Never edit or replace an earlier progress section.
|
|
16
|
+
|
|
17
|
+
## Progress Sections
|
|
18
|
+
|
|
19
|
+
### Risk Assessment
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
## Risk Assessment
|
|
23
|
+
|
|
24
|
+
- Risk: <low|medium|high>
|
|
25
|
+
- Independent Reviewer Limit: <0|1|2>
|
|
26
|
+
- Reasons:
|
|
27
|
+
- <concrete behavioral reason>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Main-Agent Review Round
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
## Main Review Round <N>
|
|
34
|
+
|
|
35
|
+
- Status: COMPLETED
|
|
36
|
+
- Findings: <count>
|
|
37
|
+
- Accepted: <count>
|
|
38
|
+
- Rejected: <count>
|
|
39
|
+
- Next: <next action>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Repair Verification
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
## Repair Verification
|
|
46
|
+
|
|
47
|
+
- Source: <main|reviewer-1|reviewer-2>
|
|
48
|
+
- Fixed Findings: <count>
|
|
49
|
+
- Verification: <evidence summary>
|
|
50
|
+
- Next: <next action>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Independent Reviewer Running
|
|
11
54
|
|
|
12
|
-
|
|
55
|
+
```markdown
|
|
56
|
+
## Independent Reviewer <N>
|
|
13
57
|
|
|
14
|
-
|
|
58
|
+
- Status: RUNNING
|
|
59
|
+
- Risk Trigger: <medium|high>
|
|
60
|
+
- Attempt: <1|2>
|
|
61
|
+
```
|
|
15
62
|
|
|
16
|
-
|
|
17
|
-
- Location: <filepath:line|project-level>
|
|
18
|
-
- Problem: <what was wrong and why it mattered>
|
|
19
|
-
- Failure Scenario: <concrete input or state>
|
|
20
|
-
- Disposition: <fixed in round N|rejected — concrete evidence|unresolved — reason>
|
|
63
|
+
### Independent Reviewer Result
|
|
21
64
|
|
|
22
|
-
|
|
65
|
+
```markdown
|
|
66
|
+
## Independent Reviewer <N> Result
|
|
23
67
|
|
|
24
|
-
|
|
68
|
+
- Status: <COMPLETED|BLOCKED>
|
|
69
|
+
- Result: <PASS|FINDINGS|BLOCKED>
|
|
70
|
+
- Findings: <count>
|
|
71
|
+
- Accepted: <count>
|
|
72
|
+
- Rejected: <count>
|
|
73
|
+
- Accepted High: <count>
|
|
74
|
+
- Next: <next action>
|
|
75
|
+
```
|
|
25
76
|
|
|
26
|
-
##
|
|
77
|
+
## Final Result
|
|
78
|
+
|
|
79
|
+
Exactly one Final Result terminates a completed execution:
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
## Final Result
|
|
27
83
|
|
|
28
|
-
|
|
84
|
+
- Verdict: <PASS|NEEDS_FIXES|BLOCKED>
|
|
85
|
+
- Risk: <low|medium|high>
|
|
86
|
+
- Main Review Rounds: <count>
|
|
87
|
+
- Independent Reviewers Started: <count>
|
|
88
|
+
- Accepted Findings: <count>
|
|
89
|
+
- Fixed Findings: <count>
|
|
90
|
+
- Rejected Findings: <count>
|
|
91
|
+
- Unresolved Findings: <count>
|
|
92
|
+
- Summary: <concise conclusion>
|
|
29
93
|
```
|
|
30
94
|
|
|
31
|
-
##
|
|
95
|
+
## Rules
|
|
32
96
|
|
|
33
|
-
-
|
|
34
|
-
- A
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- Do not persist a separate review
|
|
97
|
+
- Start of a new execution removes stale progress and terminal results from prior executions.
|
|
98
|
+
- A phase appends its result before the next phase starts.
|
|
99
|
+
- Append RUNNING before each independent Reviewer launch or retry.
|
|
100
|
+
- Do not modify a RUNNING section after completion; append its Result section.
|
|
101
|
+
- An IN_PROGRESS report without Final Result is incomplete.
|
|
102
|
+
- Generic or incidental verdict text outside the last Final Result does not prove completion.
|
|
103
|
+
- Do not append any section after Final Result.
|
|
104
|
+
- Do not persist a separate review-state JSON file.
|