prizmkit 1.1.143 → 1.1.144
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/adapters/pi/paths.js +9 -0
- package/bundled/adapters/pi/rules-adapter.js +13 -0
- package/bundled/adapters/pi/settings-adapter.js +23 -0
- package/bundled/adapters/pi/skill-adapter.js +18 -0
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +15 -3
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +3 -1
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +10 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +1 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +1 -0
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +26 -2
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +61 -7
- package/bundled/dev-pipeline/tests/test_unified_cli.py +88 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/prizmkit-code-review/SKILL.md +3 -3
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +63 -58
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +8 -1
- package/bundled/skills/prizmkit-plan/SKILL.md +3 -3
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +3 -0
- package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +55 -52
- package/bundled/skills/prizmkit-test/SKILL.md +3 -3
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +68 -69
- package/bundled/skills/prizmkit-test/references/test-report-template.md +5 -1
- package/package.json +1 -1
- package/src/ai-cli-launch.js +1 -1
- package/src/clean.js +13 -4
- package/src/config.js +32 -5
- package/src/detect-platform.js +11 -7
- package/src/index.js +5 -0
- package/src/platforms.js +6 -2
- package/src/prompts.js +12 -4
- package/src/scaffold.js +72 -20
- package/src/upgrade.js +12 -5
|
@@ -15,58 +15,61 @@ Implementation complete
|
|
|
15
15
|
→ PASS or NEEDS_FIXES
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The independent budget does not replace, reduce, or extend the Main-Agent loop.
|
|
18
|
+
The independent budget does not replace, reduce, or extend the Main-Agent loop. Keep at most one Reviewer active, permit at most one replacement for this Code Review stage, and never reuse either unit in another stage.
|
|
19
19
|
|
|
20
20
|
## Host Capability Gate
|
|
21
21
|
|
|
22
|
-
The gate is all-or-nothing. Before creating a Reviewer, the host
|
|
22
|
+
The gate is all-or-nothing. Before creating a Reviewer, inspect the current host's actual execution-unit configuration and prove this semantic contract without relying on platform identity or implementation-specific parameters:
|
|
23
23
|
|
|
24
24
|
```yaml
|
|
25
25
|
execution_unit:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
mutation: unavailable
|
|
29
|
-
|
|
26
|
+
concurrency: at-most-one-active-reviewer
|
|
27
|
+
workspace_access: read-only-active-checkout
|
|
28
|
+
mutation: structurally-unavailable
|
|
29
|
+
command_execution: structurally-unavailable
|
|
30
|
+
network_access: structurally-unavailable
|
|
31
|
+
external_process_execution: structurally-unavailable
|
|
30
32
|
downstream_execution: structurally-unavailable
|
|
31
|
-
context_continuation: same-unit-native-resume
|
|
32
|
-
workspace_observation: bounded-active-checkout-input
|
|
33
33
|
model_configuration: inherit-current-session
|
|
34
|
+
scope_expansion: concrete-coupling-only
|
|
35
|
+
continuation: prefer-same-unit
|
|
36
|
+
replacement: compliant-replacement-allowed
|
|
34
37
|
```
|
|
35
38
|
|
|
36
39
|
Rules:
|
|
37
40
|
|
|
38
41
|
- Prompt instructions cannot satisfy a missing structural capability.
|
|
39
|
-
- The decision must not branch on platform identity, tool name, execution-unit type name, adapter output, or
|
|
40
|
-
-
|
|
41
|
-
- A general execution unit
|
|
42
|
-
- The Reviewer inherits the current session's model configuration.
|
|
42
|
+
- The decision must not branch on platform identity, provider, tool name, command name, execution-unit type name, adapter output, CLI parameter, or an allowlist.
|
|
43
|
+
- The Reviewer cannot create, modify, delete, rename, stage, or commit files; execute shell, Git, tests, builds, network calls, or external processes; or create, invoke, resume, or coordinate downstream execution units.
|
|
44
|
+
- A general execution unit that merely promises to remain read-only is ineligible while prohibited capabilities remain available.
|
|
45
|
+
- The Reviewer inherits the current session's model configuration.
|
|
46
|
+
- If any capability is missing or cannot be proven, create no Reviewer and use Strict Downgrade.
|
|
43
47
|
|
|
44
48
|
## Review Input
|
|
45
49
|
|
|
46
|
-
|
|
50
|
+
Resolve exact requirement identity from workflow state or explicit handoff on every response:
|
|
47
51
|
|
|
48
52
|
```text
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
artifact_dir: [EXACT_ARTIFACT_DIR]
|
|
54
|
+
spec_path: [EXACT_SPEC_PATH]
|
|
55
|
+
plan_path: [EXACT_PLAN_PATH]
|
|
56
|
+
checkout_root: [ACTIVE_CHECKOUT_ROOT]
|
|
53
57
|
```
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
These paths remain authoritative even when ignored by Git. Never ask the Reviewer to discover a latest artifact or guess among multiple `spec.md` and `plan.md` files.
|
|
56
60
|
|
|
57
|
-
|
|
58
|
-
- unstaged tracked changes;
|
|
59
|
-
- untracked files;
|
|
60
|
-
- deleted and renamed files;
|
|
61
|
-
- the exact changed-file manifest;
|
|
62
|
-
- requirement goals and acceptance criteria;
|
|
63
|
-
- relevant plan decisions;
|
|
64
|
-
- applicable project rules and Prizm traps;
|
|
65
|
-
- targeted unchanged callers, dependents, contracts, schemas, or tests implicated by changed interfaces.
|
|
61
|
+
The Main Agent supplies:
|
|
66
62
|
|
|
67
|
-
|
|
63
|
+
- original requirement and confirmed clarifications;
|
|
64
|
+
- exact artifact, spec, and plan paths plus current contents;
|
|
65
|
+
- current workspace status;
|
|
66
|
+
- staged and unstaged tracked changes;
|
|
67
|
+
- relevant untracked, deleted, and renamed content;
|
|
68
|
+
- implementation task completion and targeted verification results;
|
|
69
|
+
- response number and total budget;
|
|
70
|
+
- prior adjudication, actual repairs, and repair verification on continuation or replacement.
|
|
68
71
|
|
|
69
|
-
|
|
72
|
+
The Main Agent runs Git and captures authoritative current-change state. The Reviewer may use structurally read-only checkout access to inspect unchanged callers, consumers, contracts, schemas, types, configurations, fixtures, or tests only when concrete coupling to this requirement justifies it. It must not run commands or perform an unconditional repository-wide scan. Missing or inconsistent required input produces `REVIEW_BLOCKED`, never partial success.
|
|
70
73
|
|
|
71
74
|
## Initial Reviewer Prompt
|
|
72
75
|
|
|
@@ -80,11 +83,13 @@ Objectively determine whether the Main Agent's complete current implementation c
|
|
|
80
83
|
|
|
81
84
|
Response:
|
|
82
85
|
This is response [RESPONSE_NUMBER] of a maximum five responses.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
Artifact directory: [ARTIFACT_DIR]
|
|
87
|
+
Specification path and content: [SPEC_PATH_AND_CONTENT]
|
|
88
|
+
Plan path and content: [PLAN_PATH_AND_CONTENT]
|
|
89
|
+
Checkout root: [CHECKOUT_ROOT]
|
|
90
|
+
Requirement and clarifications: [REQUIREMENT_CONTEXT]
|
|
91
|
+
Complete current change: [CURRENT_CHANGE]
|
|
92
|
+
Implementation and verification context: [IMPLEMENTATION_CONTEXT]
|
|
88
93
|
|
|
89
94
|
Execution boundaries:
|
|
90
95
|
- Complete this review personally.
|
|
@@ -92,9 +97,9 @@ Execution boundaries:
|
|
|
92
97
|
- Do not ask the Main Agent to create a helper.
|
|
93
98
|
- Do not re-enter orchestration, delegation, another review workflow, or an equivalent process.
|
|
94
99
|
- Do not modify, create, delete, rename, stage, commit, or otherwise mutate files.
|
|
95
|
-
- Do not execute
|
|
96
|
-
-
|
|
97
|
-
- Do not perform
|
|
100
|
+
- Do not execute shell, Git, tests, builds, network calls, external processes, or any operation that can change state.
|
|
101
|
+
- Use read-only checkout access beyond changed files only for concrete module, caller, consumer, schema, type, configuration, fixture, or test coupling.
|
|
102
|
+
- Do not perform unconditional repository discovery or a full repository scan.
|
|
98
103
|
- Report only corrections supported by a concrete target and evidence.
|
|
99
104
|
- Do not invent an issue merely to return feedback.
|
|
100
105
|
- Return REVIEW_BLOCKED rather than delegate or provide an incomplete success result.
|
|
@@ -109,17 +114,20 @@ Return exactly one result using the Reviewer Output Protocol.
|
|
|
109
114
|
|
|
110
115
|
## Resume Prompt
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
Prefer native continuation of the same Reviewer. If unavailable, use this complete prompt for one compliant replacement under the replacement rules below. Instantiate the bracketed fields.
|
|
113
118
|
|
|
114
119
|
```text
|
|
115
120
|
Continue as the same independent Code Reviewer.
|
|
116
121
|
|
|
117
122
|
Response:
|
|
118
123
|
This is response [RESPONSE_NUMBER] of a maximum five responses.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
124
|
+
Continuation mode: [NATIVE_OR_REPLACEMENT]
|
|
125
|
+
Artifact directory: [ARTIFACT_DIR]
|
|
126
|
+
Specification path and content: [SPEC_PATH_AND_CONTENT]
|
|
127
|
+
Plan path and content: [PLAN_PATH_AND_CONTENT]
|
|
128
|
+
Checkout root: [CHECKOUT_ROOT]
|
|
129
|
+
Requirement and clarifications: [REQUIREMENT_CONTEXT]
|
|
130
|
+
Complete current change: [CURRENT_CHANGE]
|
|
123
131
|
Previously accepted corrections: [ACCEPTED_CORRECTIONS_OR_NONE]
|
|
124
132
|
Repairs actually made: [REPAIRS_OR_NONE]
|
|
125
133
|
Main-Agent targeted verification: [VERIFICATION]
|
|
@@ -206,28 +214,24 @@ Independent review converges normally when:
|
|
|
206
214
|
4. Validate the result against the Reviewer Output Protocol and append an independent-review round event.
|
|
207
215
|
5. Adjudicate every correction and append independent-adjudication events. Any unresolved item returns `NEEDS_FIXES`.
|
|
208
216
|
6. For accepted corrections, the Main Agent repairs the active checkout, runs targeted verification, and inspects the complete resulting change.
|
|
209
|
-
7. If
|
|
210
|
-
8.
|
|
211
|
-
9.
|
|
212
|
-
10.
|
|
217
|
+
7. If responses remain, prepare the complete latest Code input and prefer native continuation. If unavailable or failed and no replacement has been used in this stage, create one compliant replacement only after the prior Reviewer is no longer active; reapply the full gate and continue with the next response number. Do not restart the complete ten-round Main-Agent loop after every ordinary independent correction.
|
|
218
|
+
8. A replacement receives complete current state and all prior adjudication, never only a conversation summary. Replacement does not reset the five-response budget. At most one replacement may be created in the stage, and only one Reviewer may be active.
|
|
219
|
+
9. If the fifth response causes a repair, no sixth response is allowed. Run targeted verification, inspect the complete final change, record final-budget handling and `Final State Independently Rechecked: no`, and do not exceed the response budget.
|
|
220
|
+
10. End the Reviewer when review converges, reaches the response limit, fails irrecoverably, or the stage becomes blocked. Explicitly terminate it when the host safely supports that operation; otherwise stop sending messages.
|
|
221
|
+
11. Complete the existing final verification and append exactly one `## Final Result` with `PASS` or `NEEDS_FIXES`.
|
|
213
222
|
|
|
214
223
|
## Strict Downgrade
|
|
215
224
|
|
|
216
|
-
Use
|
|
217
|
-
|
|
218
|
-
- a required capability is unavailable or unproven before creation;
|
|
219
|
-
- Reviewer creation fails;
|
|
220
|
-
- the exact same Reviewer cannot be resumed or resume fails;
|
|
221
|
-
- execution-unit integrity becomes uncertain.
|
|
225
|
+
Use Strict Downgrade when a required capability is unavailable or unproven, creation fails before a valid response, prohibited capability appears, the prior Reviewer may still be active, or no compliant continuation/replacement can be established.
|
|
222
226
|
|
|
223
227
|
Behavior:
|
|
224
228
|
|
|
225
|
-
1. Never create a weaker
|
|
226
|
-
2.
|
|
229
|
+
1. Never create a weaker Reviewer whose prohibited capabilities remain available.
|
|
230
|
+
2. Prefer native continuation, but permit a fresh compliant replacement with the complete latest input and prior adjudication; a summary alone is insufficient.
|
|
227
231
|
3. When no Reviewer is created, record the downgrade and continue from the completed Main-Agent review if it remains valid.
|
|
228
|
-
4.
|
|
229
|
-
5. When
|
|
230
|
-
6. Reviewer input problems may be corrected
|
|
232
|
+
4. Creation failure without a response does not consume response budget; a produced malformed response follows the existing response-budget rule.
|
|
233
|
+
5. When continuation and compliant replacement both fail after a repair, rerun Main-Agent review over the repair within the existing ten-round safety fuse, record downgrade and fallback, and return `NEEDS_FIXES` if convergence cannot be established.
|
|
234
|
+
6. Reviewer input problems may be corrected within remaining shared budget using native continuation or a compliant replacement.
|
|
231
235
|
7. Report temporary input-cleanup failures honestly; cleanup failure does not change an otherwise verified review result.
|
|
232
236
|
|
|
233
237
|
Strict downgrade is visible reduced assurance, not a new lifecycle verdict and not permission to weaken the gate.
|
|
@@ -238,6 +242,7 @@ Use the existing append-only `review-report.md` lifecycle and renderer events:
|
|
|
238
242
|
|
|
239
243
|
- `independent-review-round`: response number `1..5`, result, correction count, adjudication counts, and next action;
|
|
240
244
|
- `independent-adjudication`: correction summary, `accepted | rejected | unresolved`, evidence, and actual modification;
|
|
241
|
-
- `independent-review-downgrade`: reason, Main-Agent fallback, and whether the final state was independently rechecked
|
|
245
|
+
- `independent-review-downgrade`: reason, Main-Agent fallback, and whether the final state was independently rechecked;
|
|
246
|
+
- capability basis, continuation mode (`native`, `replacement`, `mixed`, or `not-applicable`), and replacement count.
|
|
242
247
|
|
|
243
248
|
The report remains the only persisted Code Review artifact. It ends with exactly one `## Final Result`; valid final verdicts remain `PASS | NEEDS_FIXES`.
|
|
@@ -44,6 +44,10 @@ Within that execution, append sections only. Never edit or replace an earlier pr
|
|
|
44
44
|
```markdown
|
|
45
45
|
## Independent Review Round <N>
|
|
46
46
|
|
|
47
|
+
- Capability Gate: ENABLED
|
|
48
|
+
- Capability Basis: <platform-neutral structural evidence>
|
|
49
|
+
- Continuation Mode: <native | replacement>
|
|
50
|
+
- Reviewer Replacements: <0..1>
|
|
47
51
|
- Result: <NO_CORRECTION_NEEDED | CORRECTION_NEEDED | REVIEW_BLOCKED>
|
|
48
52
|
- Corrections: <count>
|
|
49
53
|
- Accepted: <count>
|
|
@@ -70,7 +74,10 @@ Repeat this section once per proposed correction.
|
|
|
70
74
|
```markdown
|
|
71
75
|
## Independent Review Downgrade
|
|
72
76
|
|
|
73
|
-
- Reason: <missing capability, creation failure, or
|
|
77
|
+
- Reason: <missing capability, creation failure, or unavailable compliant continuation/replacement>
|
|
78
|
+
- Capability Basis: <platform-neutral structural evidence or unavailable>
|
|
79
|
+
- Continuation Mode: <native | replacement | mixed | not-applicable>
|
|
80
|
+
- Reviewer Replacements: <0..1>
|
|
74
81
|
- Fallback: <completed Main-Agent review or Main-Agent re-review of repair>
|
|
75
82
|
- Final State Independently Rechecked: <yes | no | not applicable>
|
|
76
83
|
```
|
|
@@ -121,10 +121,10 @@ Run only after the Main-Agent Plan/Spec review converges. This optional check ne
|
|
|
121
121
|
|
|
122
122
|
1. Read `${SKILL_DIR}/references/independent-plan-review.md` and follow its complete contract.
|
|
123
123
|
2. Apply its all-or-nothing semantic Host Capability Gate. If any required structural capability is unavailable or unproven, create no Reviewer and record strict downgrade in `plan.md`.
|
|
124
|
-
3. When the gate passes,
|
|
124
|
+
3. When the gate passes, provide the original requirement, confirmed clarifications, exact `artifact_dir`/`spec_path`/`plan_path`, and current spec/plan contents to one active Plan Reviewer with the reference's Initial Reviewer Prompt.
|
|
125
125
|
4. Use maximum two Reviewer responses. Adjudicate every correction as `accepted`, `rejected`, or `unresolved`; the Main Agent alone modifies artifacts.
|
|
126
|
-
5. After an accepted correction, perform targeted Plan/Spec verification and
|
|
127
|
-
6. If
|
|
126
|
+
5. After an accepted correction, perform targeted Plan/Spec verification and prefer native continuation when one response remains. If unavailable, the reference permits one compliant replacement with complete latest planning state and the same remaining budget.
|
|
127
|
+
6. If neither compliant continuation nor replacement is available after modification, record downgrade and rerun the Main-Agent local Plan/Spec review over that modification as specified by the reference.
|
|
128
128
|
7. If the final allowed response causes a modification, run targeted verification, record that the final state was not independently rechecked, and do not exceed the response budget.
|
|
129
129
|
8. Append the terminal `## Independent Plan Review` record. Appending that audit record does not trigger another response.
|
|
130
130
|
9. Any unresolved correction produces `PLAN_BLOCKED`; otherwise independent convergence or strict downgrade may continue to handoff from the valid completed Main-Agent review.
|
|
@@ -119,8 +119,11 @@
|
|
|
119
119
|
<!-- Appending this terminal record does not trigger another Reviewer response and does not add an implementation task. -->
|
|
120
120
|
|
|
121
121
|
- Capability Gate: <ENABLED | DOWNGRADED>
|
|
122
|
+
- Capability Basis: <platform-neutral structural evidence or unavailable>
|
|
122
123
|
- Downgrade Reason: <reason or none>
|
|
123
124
|
- Reviewer Responses: <0..2>
|
|
125
|
+
- Continuation Mode: <native | replacement | mixed | not-applicable>
|
|
126
|
+
- Reviewer Replacements: <0..1>
|
|
124
127
|
- Convergence: <no correction | all rejected | final-budget verification | local-review fallback | strict downgrade>
|
|
125
128
|
- Final State Independently Rechecked: <yes | no | not applicable>
|
|
126
129
|
- Unresolved Corrections: <none for PLAN_READY>
|
|
@@ -15,54 +15,57 @@ Draft spec.md and plan.md
|
|
|
15
15
|
→ PLAN_READY or PLAN_BLOCKED
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The independent budget does not replace, reduce, or extend the local review budget.
|
|
18
|
+
The independent budget does not replace, reduce, or extend the local review budget. Keep at most one Reviewer active, permit at most one replacement for the Plan stage, and never reuse either unit in another stage.
|
|
19
19
|
|
|
20
20
|
## Host Capability Gate
|
|
21
21
|
|
|
22
|
-
The gate is all-or-nothing. Before creating a Reviewer, the host
|
|
22
|
+
The gate is all-or-nothing. Before creating a Reviewer, inspect the current host's actual execution-unit configuration and prove this semantic contract without relying on platform identity or implementation-specific parameters:
|
|
23
23
|
|
|
24
24
|
```yaml
|
|
25
25
|
execution_unit:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
mutation: unavailable
|
|
29
|
-
|
|
26
|
+
concurrency: at-most-one-active-reviewer
|
|
27
|
+
workspace_access: planning-input-read-only
|
|
28
|
+
mutation: structurally-unavailable
|
|
29
|
+
command_execution: structurally-unavailable
|
|
30
|
+
network_access: structurally-unavailable
|
|
31
|
+
external_process_execution: structurally-unavailable
|
|
30
32
|
downstream_execution: structurally-unavailable
|
|
31
|
-
context_continuation: same-unit-native-resume
|
|
32
|
-
workspace_observation: bounded-active-checkout-input
|
|
33
33
|
model_configuration: inherit-current-session
|
|
34
|
+
continuation: prefer-same-unit
|
|
35
|
+
replacement: compliant-replacement-allowed
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
Rules:
|
|
37
39
|
|
|
38
40
|
- Prompt instructions cannot satisfy a missing structural capability.
|
|
39
|
-
- The decision must not branch on platform identity, tool name, execution-unit type name, adapter output, or
|
|
41
|
+
- The decision must not branch on platform identity, provider, tool name, command name, execution-unit type name, adapter output, CLI parameter, or an allowlist.
|
|
42
|
+
- The Reviewer cannot create, modify, delete, rename, stage, or commit files; execute shell, Git, tests, builds, network calls, or external processes; or create, invoke, resume, or coordinate downstream execution units.
|
|
40
43
|
- If any capability is missing or cannot be proven, do not create a Reviewer. Use Strict Downgrade.
|
|
41
|
-
- A general execution unit
|
|
44
|
+
- A general execution unit that merely promises to stay read-only is ineligible while prohibited capabilities remain available.
|
|
42
45
|
- The Reviewer inherits the current session's model configuration. Do not add a separate model-selection contract.
|
|
43
46
|
|
|
44
47
|
## Review Input
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
Resolve and provide exact requirement identity on every response:
|
|
47
50
|
|
|
48
51
|
```text
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
└── payload: current spec.md, current plan.md, and only targeted supporting material
|
|
52
|
+
artifact_dir: [EXACT_ARTIFACT_DIR]
|
|
53
|
+
spec_path: [EXACT_SPEC_PATH]
|
|
54
|
+
plan_path: [EXACT_PLAN_PATH]
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
The
|
|
57
|
+
The paths come from the current workflow state or explicit handoff even when ignored by Git. Never ask the Reviewer to discover a latest artifact or guess among multiple `spec.md` and `plan.md` files.
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
- current `plan.md`, including tasks;
|
|
59
|
-
- original requirement and confirmed clarification decisions;
|
|
60
|
-
- relevant project rules and Prizm documentation;
|
|
61
|
-
- only the source or contract paths needed to verify concrete planning assumptions.
|
|
59
|
+
The Plan Reviewer receives only:
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
- original requirement and confirmed clarifications;
|
|
62
|
+
- exact artifact, spec, and plan paths;
|
|
63
|
+
- current `spec.md` content;
|
|
64
|
+
- current `plan.md` content, including tasks;
|
|
65
|
+
- response number and total response budget;
|
|
66
|
+
- prior planning adjudication and actual planning modifications on continuation or replacement.
|
|
64
67
|
|
|
65
|
-
|
|
68
|
+
It does not receive or inspect implementation diffs, production changes, test results, or unrelated checkout content. Missing or inconsistent required content produces `REVIEW_BLOCKED`, never partial success.
|
|
66
69
|
|
|
67
70
|
## Initial Reviewer Prompt
|
|
68
71
|
|
|
@@ -76,11 +79,12 @@ Objectively determine whether the Main Agent's current specification and impleme
|
|
|
76
79
|
|
|
77
80
|
Response:
|
|
78
81
|
This is response [RESPONSE_NUMBER] of a maximum two responses.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
Artifact directory: [ARTIFACT_DIR]
|
|
83
|
+
Specification path: [SPEC_PATH]
|
|
84
|
+
Plan path: [PLAN_PATH]
|
|
85
|
+
Original requirement and confirmed clarifications: [REQUIREMENT_CONTEXT]
|
|
86
|
+
Current specification: [SPEC_CONTENT]
|
|
87
|
+
Current plan: [PLAN_CONTENT]
|
|
84
88
|
|
|
85
89
|
Execution boundaries:
|
|
86
90
|
- Complete this review personally.
|
|
@@ -88,9 +92,9 @@ Execution boundaries:
|
|
|
88
92
|
- Do not ask the Main Agent to create a helper.
|
|
89
93
|
- Do not re-enter orchestration, delegation, another review workflow, or an equivalent process.
|
|
90
94
|
- Do not modify, create, delete, rename, stage, commit, or otherwise mutate files.
|
|
91
|
-
- Do not execute
|
|
92
|
-
- Read only the
|
|
93
|
-
- Do not
|
|
95
|
+
- Do not execute shell, Git, tests, builds, network calls, external processes, or any operation that can change state.
|
|
96
|
+
- Read only the supplied planning input at the exact paths and contents identified above.
|
|
97
|
+
- Do not inspect implementation code or perform repository discovery.
|
|
94
98
|
- Report only corrections supported by a concrete target and evidence.
|
|
95
99
|
- Do not invent an issue merely to return feedback.
|
|
96
100
|
- Return REVIEW_BLOCKED rather than delegate or provide an incomplete success result.
|
|
@@ -105,17 +109,20 @@ Return exactly one result using the Reviewer Output Protocol.
|
|
|
105
109
|
|
|
106
110
|
## Resume Prompt
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
Prefer native continuation of the same Reviewer. If unavailable, use this complete prompt to create one compliant replacement under the replacement rules below. Instantiate the bracketed fields.
|
|
109
113
|
|
|
110
114
|
```text
|
|
111
115
|
Continue as the same independent Plan Reviewer.
|
|
112
116
|
|
|
113
117
|
Response:
|
|
114
118
|
This is response [RESPONSE_NUMBER] of a maximum two responses.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
Continuation mode: [NATIVE_OR_REPLACEMENT]
|
|
120
|
+
Artifact directory: [ARTIFACT_DIR]
|
|
121
|
+
Specification path: [SPEC_PATH]
|
|
122
|
+
Plan path: [PLAN_PATH]
|
|
123
|
+
Original requirement and confirmed clarifications: [REQUIREMENT_CONTEXT]
|
|
124
|
+
Current specification: [SPEC_CONTENT]
|
|
125
|
+
Current plan: [PLAN_CONTENT]
|
|
119
126
|
Previously accepted corrections: [ACCEPTED_CORRECTIONS_OR_NONE]
|
|
120
127
|
Modifications actually made: [MODIFICATIONS_OR_NONE]
|
|
121
128
|
Previously rejected corrections and rejection evidence: [REJECTIONS_OR_NONE]
|
|
@@ -201,29 +208,24 @@ Independent review converges normally when:
|
|
|
201
208
|
4. Validate the result against the Reviewer Output Protocol.
|
|
202
209
|
5. Adjudicate every correction. Any unresolved item returns `PLAN_BLOCKED`.
|
|
203
210
|
6. For accepted corrections, the Main Agent modifies `spec.md` and/or `plan.md` and applies the relevant part of the existing verification checklist.
|
|
204
|
-
7. If one response remains,
|
|
205
|
-
8.
|
|
206
|
-
9.
|
|
207
|
-
10.
|
|
211
|
+
7. If one response remains, prepare the complete latest Plan input and prefer native continuation. If native continuation is unavailable or fails and no replacement has been used in this stage, create one compliant replacement only after the prior Reviewer is no longer active; reapply the full gate and continue with the next response number.
|
|
212
|
+
8. A replacement receives complete current content and all prior adjudication, never only a conversation summary. Replacement does not reset the two-response budget. At most one replacement may be created in the stage, and only one Reviewer may be active.
|
|
213
|
+
9. If the second response causes a modification, no third response is allowed. Perform targeted Plan/Spec verification, record final-budget handling, and set `Final State Independently Rechecked` to `no`.
|
|
214
|
+
10. Append the terminal `## Independent Plan Review` record. Appending the record itself never triggers another response.
|
|
215
|
+
11. End the Reviewer when review converges, reaches the response limit, fails irrecoverably, or the stage becomes blocked. Explicitly terminate it when the host safely supports that operation; otherwise stop sending messages.
|
|
208
216
|
|
|
209
217
|
## Strict Downgrade
|
|
210
218
|
|
|
211
|
-
Use strict downgrade
|
|
212
|
-
|
|
213
|
-
- a required capability is unavailable or unproven before creation;
|
|
214
|
-
- Reviewer creation fails;
|
|
215
|
-
- the exact same Reviewer cannot be resumed or resume fails;
|
|
216
|
-
- execution-unit integrity becomes uncertain.
|
|
219
|
+
Use strict downgrade when a required capability is unavailable or unproven, creation fails before a valid response, prohibited capability appears, the previous Reviewer may still be active, or no compliant continuation/replacement can be established.
|
|
217
220
|
|
|
218
221
|
Behavior:
|
|
219
222
|
|
|
220
|
-
1. Never create a weaker
|
|
221
|
-
2.
|
|
223
|
+
1. Never create a weaker Reviewer whose prohibited capabilities remain available.
|
|
224
|
+
2. Prefer native continuation, but permit a fresh compliant replacement with the complete latest input and prior adjudication; a summary alone is insufficient.
|
|
222
225
|
3. When no Reviewer is created, record the downgrade and continue from the completed Main-Agent review if it remains valid.
|
|
223
|
-
4.
|
|
224
|
-
5. When
|
|
225
|
-
6.
|
|
226
|
-
7. Report temporary input-cleanup failures honestly; cleanup failure does not change an otherwise verified planning result.
|
|
226
|
+
4. Creation failure without a response does not consume response budget; a produced malformed response follows the existing response-budget rule.
|
|
227
|
+
5. When continuation and compliant replacement both fail after a modification, rerun the local Plan/Spec review over that modification, record the downgrade and fallback, and return `PLAN_BLOCKED` if readiness cannot be established.
|
|
228
|
+
6. Report temporary input-cleanup failures honestly; cleanup failure does not change an otherwise verified planning result.
|
|
227
229
|
|
|
228
230
|
Strict downgrade is visible reduced assurance, not an error verdict and not permission to weaken the gate.
|
|
229
231
|
|
|
@@ -234,6 +236,7 @@ Append the terminal record shape from `${SKILL_DIR}/assets/plan-template.md` aft
|
|
|
234
236
|
- `Capability Gate: ENABLED | DOWNGRADED`;
|
|
235
237
|
- a concrete downgrade reason or `none`;
|
|
236
238
|
- Reviewer responses used, from `0` through `2`;
|
|
239
|
+
- continuation mode (`native`, `replacement`, `mixed`, or `not-applicable`) and replacement count;
|
|
237
240
|
- convergence or fallback mode;
|
|
238
241
|
- whether the final state received an independent recheck;
|
|
239
242
|
- every proposed correction, Main-Agent decision, evidence, and actual modification;
|
|
@@ -234,11 +234,11 @@ All evidence-based rejections with no unresolved item are normal convergence. An
|
|
|
234
234
|
|
|
235
235
|
Only after Main-Agent review converges, read `${SKILL_DIR}/references/independent-test-review.md` and follow its complete contract.
|
|
236
236
|
|
|
237
|
-
-
|
|
237
|
+
- Keep at most one Reviewer active for this invocation and permit at most one compliant replacement.
|
|
238
238
|
- Permit at most five responses.
|
|
239
|
-
-
|
|
239
|
+
- Prefer native continuation after an accepted correction; when unavailable, permit one compliant replacement with complete latest Test state, prior adjudication, exact artifact/spec/plan paths, and the same remaining response budget.
|
|
240
240
|
- The Reviewer is optional and available only when every structural capability in the reference is proven.
|
|
241
|
-
- If capability is unavailable or unproven, create no weaker
|
|
241
|
+
- If capability is unavailable or unproven, create no weaker Reviewer; record a visible strict downgrade and preserve the converged mandatory Main-Agent review.
|
|
242
242
|
- The Main Agent retains adjudication, mutation, execution, final result, and reporting authority.
|
|
243
243
|
- If response five still contains an accepted correction, return `TEST_NEEDS_FIXES`.
|
|
244
244
|
- If response five still contains unresolved truth, input, or safety, return `TEST_BLOCKED`.
|