prizmkit 1.1.154 → 1.1.156
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/codex/skill-adapter.js +1 -1
- package/bundled/adapters/pi/skill-adapter.js +2 -1
- package/bundled/dev-pipeline/.env.example +2 -6
- package/bundled/dev-pipeline/README.md +21 -27
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +341 -15
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +0 -3
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +1 -15
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +48 -14
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +50 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -9
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +120 -22
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +482 -0
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +64 -11
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +145 -367
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +91 -62
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +105 -69
- package/bundled/dev-pipeline/scripts/prompt_framework.py +36 -41
- package/bundled/dev-pipeline/scripts/update-bug-status.py +1 -4
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +61 -13
- package/bundled/dev-pipeline/scripts/update-feature-status.py +1 -4
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +1 -4
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +22 -27
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +71 -104
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +59 -111
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +37 -72
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +39 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +3 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +8 -25
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +3 -3
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +4 -4
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +7 -4
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +14 -27
- package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +20 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -71
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +7 -7
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +4 -4
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +5 -17
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +3 -1
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +10 -23
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +7 -7
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/retrospective.md +12 -0
- package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +35 -0
- package/bundled/dev-pipeline/templates/session-status-schema.json +45 -62
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +469 -18
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +262 -175
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +62 -23
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +76 -28
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +168 -18
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +111 -0
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +0 -2
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +608 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +167 -25
- package/bundled/skills/_metadata.json +9 -9
- package/bundled/skills/app-planner/SKILL.md +3 -3
- package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
- package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +56 -64
- package/bundled/skills/app-planner/references/rules/backend/fixed-rules.md +85 -240
- package/bundled/skills/app-planner/references/rules/backend/question-bank.md +25 -25
- package/bundled/skills/app-planner/references/rules/backend/question-manifest.json +16 -7
- package/bundled/skills/app-planner/references/rules/backend/template.md +74 -92
- package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +93 -93
- package/bundled/skills/app-planner/references/rules/database/fixed-rules.md +66 -173
- package/bundled/skills/app-planner/references/rules/database/question-bank.md +31 -26
- package/bundled/skills/app-planner/references/rules/database/question-manifest.json +13 -4
- package/bundled/skills/app-planner/references/rules/database/template.md +76 -98
- package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +68 -95
- package/bundled/skills/app-planner/references/rules/frontend/fixed-rules.md +93 -166
- package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +46 -36
- package/bundled/skills/app-planner/references/rules/frontend/question-manifest.json +11 -2
- package/bundled/skills/app-planner/references/rules/frontend/template.md +79 -257
- package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +91 -99
- package/bundled/skills/app-planner/references/rules/mobile/fixed-rules.md +73 -246
- package/bundled/skills/app-planner/references/rules/mobile/question-bank.md +17 -17
- package/bundled/skills/app-planner/references/rules/mobile/question-manifest.json +17 -2
- package/bundled/skills/app-planner/references/rules/mobile/template.md +73 -85
- package/bundled/skills/app-planner/references/rules-configuration.md +133 -65
- package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +291 -0
- package/bundled/skills/prizmkit/SKILL.md +17 -18
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +22 -18
- package/bundled/skills/prizmkit-code-review/SKILL.md +22 -58
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +6 -6
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +2 -2
- package/bundled/skills/prizmkit-committer/SKILL.md +82 -132
- package/bundled/skills/prizmkit-deploy/SKILL.md +27 -11
- package/bundled/skills/prizmkit-deploy/assets/deploy-document-template.md +89 -0
- package/bundled/skills/prizmkit-deploy/references/ci-cd-workflows.md +44 -14
- package/bundled/skills/prizmkit-deploy/references/cloud-platform-deploy.md +19 -3
- package/bundled/skills/prizmkit-deploy/references/database-setup.md +22 -12
- package/bundled/skills/prizmkit-deploy/references/deploy-config-schema.md +3 -1
- package/bundled/skills/prizmkit-deploy/references/deploy-history-schema.md +22 -6
- package/bundled/skills/prizmkit-deploy/references/deploy-metadata-schema.json +49 -0
- package/bundled/skills/prizmkit-deploy/references/live-validation-notes.md +1 -1
- package/bundled/skills/prizmkit-deploy/references/pending-input-schema.json +164 -0
- package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +9 -8
- package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +6 -6
- package/bundled/skills/prizmkit-implement/SKILL.md +30 -66
- package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +4 -4
- package/bundled/skills/prizmkit-init/SKILL.md +4 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +21 -64
- package/bundled/skills/prizmkit-plan/references/artifact-identity.md +38 -0
- package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +4 -4
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +5 -5
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +75 -11
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +191 -56
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +18 -18
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +14 -8
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +12 -5
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +23 -12
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +13 -9
- package/bundled/skills/prizmkit-retrospective/SKILL.md +94 -97
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +79 -37
- package/bundled/skills/prizmkit-retrospective/references/retrospective-result-schema.json +138 -0
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +111 -54
- package/bundled/skills/prizmkit-test/SKILL.md +64 -51
- package/bundled/skills/prizmkit-test/references/boundary-contract-and-test-double-guidance.md +206 -0
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +17 -9
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +45 -21
- package/bundled/skills/prizmkit-test/references/test-report-template.md +20 -13
- package/bundled/skills/prizmkit-workflow/SKILL.md +35 -37
- package/bundled/skills/prizmkit-workflow/references/artifact-identity.md +34 -0
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +22 -18
- package/bundled/skills/recovery-workflow/SKILL.md +2 -1
- package/bundled/skills/recovery-workflow/references/detection.md +4 -3
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +15 -5
- package/bundled/templates/hooks/validate-prizm-docs.py +124 -12
- package/package.json +1 -1
- package/src/scaffold.js +33 -22
- package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +0 -16
- package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +0 -31
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -7
- package/bundled/dev-pipeline/templates/sections/critical-paths-lite.md +0 -7
- package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +0 -9
- package/bundled/dev-pipeline/templates/sections/directory-convention-lite.md +0 -6
- package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +0 -15
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +0 -61
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +0 -24
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +0 -12
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +0 -44
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +0 -25
- package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +0 -20
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +0 -20
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +0 -20
- package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +0 -17
- package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +0 -28
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +0 -52
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +0 -52
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-test/references/external-contract-mock-guidance.md +0 -119
|
@@ -41,24 +41,30 @@ You are the **bug fix session agent**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}".
|
|
|
41
41
|
{{GLOBAL_CONTEXT}}
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
##
|
|
44
|
+
## Context and Execution Rules
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
5. **No intermediate commits** — All changes committed once at the end via `/prizmkit-committer`.
|
|
46
|
+
- Resolve safe uncertainty from the task contract, current code, and project docs; otherwise record a truthful blocker.
|
|
47
|
+
- Use `context-snapshot.md` for navigation, not as a substitute for current source, diffs, or authoritative artifacts.
|
|
48
|
+
- Avoid repeated full reads, but reread bounded changed/stale ranges and verify every modification.
|
|
49
|
+
- Keep scope tied to the bug, concrete coupling, and mandatory gates. Bound command output with host-appropriate temporary locations.
|
|
50
|
+
- `/prizmkit-test` exclusively owns the complete test and repair loop.
|
|
51
|
+
- Do not stage, commit, amend, merge, push, reset, clean, or hand-edit runner-owned state.
|
|
53
52
|
|
|
54
|
-
## Bug Fix
|
|
53
|
+
## Bug Fix Artifact Manifest
|
|
55
54
|
|
|
56
55
|
```
|
|
57
56
|
.prizmkit/bugfix/{{BUG_ID}}/
|
|
58
|
-
├── spec.md
|
|
59
|
-
├── plan.md
|
|
60
|
-
├── context-snapshot.md
|
|
61
|
-
|
|
57
|
+
├── spec.md
|
|
58
|
+
├── plan.md
|
|
59
|
+
├── context-snapshot.md
|
|
60
|
+
├── review-report.md
|
|
61
|
+
├── test-report.md
|
|
62
|
+
├── test-result.json
|
|
63
|
+
├── fix-report.md
|
|
64
|
+
├── retrospective-result.json
|
|
65
|
+
├── failure-log.md
|
|
66
|
+
├── workflow-checkpoint.json
|
|
67
|
+
└── runtime-commit-request.json
|
|
62
68
|
```
|
|
63
69
|
|
|
64
70
|
{{CHECKPOINT_SYSTEM}}
|
|
@@ -116,13 +122,13 @@ Use this protocol only when the bug is UI/frontend-reproducible. Evidence must c
|
|
|
116
122
|
|
|
117
123
|
Write `.prizmkit/bugfix/{{BUG_ID}}/context-snapshot.md`:
|
|
118
124
|
- **Section 1 — Bug Brief**: bug description + acceptance criteria + root cause analysis
|
|
119
|
-
- **Section 2 — Affected Files**:
|
|
120
|
-
- **Section 3 — Existing Tests**:
|
|
125
|
+
- **Section 2 — Affected Files**: paths, relevant interfaces, and why each file matters
|
|
126
|
+
- **Section 3 — Existing Tests**: relevant test paths, behavior covered, and gaps; do not copy full files
|
|
121
127
|
- **Section 4 — Prizm Context**: relevant TRAPS, RULES from .prizmkit/prizm-docs/
|
|
122
128
|
|
|
123
129
|
**Step 3 — Plan the fix**:
|
|
124
130
|
|
|
125
|
-
|
|
131
|
+
Invoke `/prizmkit-plan` once with the exact artifact root, bug requirement, and diagnosis context. It returns only `PLAN_READY` or `PLAN_BLOCKED`:
|
|
126
132
|
- The spec.md should capture: root cause, impact scope, behavior that must be preserved
|
|
127
133
|
- The plan.md Tasks section **MUST start with a reproduction test task** — a test that FAILS with current code (RED state), proving the bug exists
|
|
128
134
|
- Subsequent tasks implement the minimal fix to make the test pass (GREEN state)
|
|
@@ -136,7 +142,7 @@ Run `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
|
|
|
136
142
|
|
|
137
143
|
**CP-1**: spec.md and plan.md exist with Tasks section.
|
|
138
144
|
|
|
139
|
-
**Checkpoint update**:
|
|
145
|
+
**Checkpoint update**: This injected session sets `bug-diagnosis-and-plan` completed with `stage_result=PLAN_READY` only after artifact validation; `PLAN_BLOCKED` is recorded as failed.
|
|
140
146
|
|
|
141
147
|
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
142
148
|
**NOTE**: verification_type is '{{VERIFICATION_TYPE}}'. The plan.md MUST also include:
|
|
@@ -150,27 +156,20 @@ Run `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
|
|
|
150
156
|
|
|
151
157
|
**Goal**: Execute the fix plan. Reproduction test goes from RED → GREEN.
|
|
152
158
|
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
- Uses convergence-based test failure recovery (keep fixing while progress is being made)
|
|
158
|
-
|
|
159
|
-
{{IF_BROWSER_INTERACTION}}
|
|
160
|
-
|
|
161
|
-
**Browser Verification During Implementation**: If the bug is UI-reproducible, apply the Browser Verification Protocol above and document evidence in the implementation notes.
|
|
162
|
-
|
|
163
|
-
{{END_IF_BROWSER_INTERACTION}}
|
|
159
|
+
Invoke `/prizmkit-implement` with the exact artifact root, reviewed plan, and any explicit repair findings. It returns only `IMPLEMENTED` or `IMPLEMENT_BLOCKED`:
|
|
160
|
+
- Execute plan.md tasks in order (TDD: first task creates a failing test, subsequent tasks fix the code)
|
|
161
|
+
- Mark each task `[x]` on completion
|
|
162
|
+
- Use only focused implementation checks; the authoritative test gate runs after review
|
|
164
163
|
|
|
165
164
|
After implement completes, verify:
|
|
166
165
|
1. All tasks in plan.md are `[x]`
|
|
167
166
|
2. Reproduction test passes (GREEN)
|
|
168
|
-
3.
|
|
169
|
-
4. Each acceptance criterion
|
|
167
|
+
3. Focused implementation checks pass
|
|
168
|
+
4. Each acceptance criterion has implementation evidence
|
|
170
169
|
|
|
171
170
|
**CP-2**: All tasks complete, reproduction test passes, no regression.
|
|
172
171
|
|
|
173
|
-
**Checkpoint update**:
|
|
172
|
+
**Checkpoint update**: This injected session maps `IMPLEMENTED` to completed after validation and stops on `IMPLEMENT_BLOCKED`.
|
|
174
173
|
|
|
175
174
|
---
|
|
176
175
|
|
|
@@ -178,8 +177,8 @@ After implement completes, verify:
|
|
|
178
177
|
|
|
179
178
|
Code review is mandatory for every committable Bugfix. Do not skip this phase for small or obvious fixes.
|
|
180
179
|
|
|
181
|
-
|
|
182
|
-
- The
|
|
180
|
+
Invoke `/prizmkit-code-review` with the exact artifact root, spec, plan, and complete current change. It returns only `PASS` or `NEEDS_FIXES`:
|
|
181
|
+
- The Skill runs up to ten Main-Agent review rounds, directly repairs accepted findings, and verifies each repair
|
|
183
182
|
- Missing required evidence, unsafe repair, failed verification, or round-ten non-convergence produces `NEEDS_FIXES`
|
|
184
183
|
- The skill appends Main-Agent review and repair progress to `review-report.md`
|
|
185
184
|
|
|
@@ -187,7 +186,7 @@ Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
|
|
|
187
186
|
```bash
|
|
188
187
|
{{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/bugfix/{{BUG_ID}}/review-report.md
|
|
189
188
|
```
|
|
190
|
-
|
|
189
|
+
This injected session maps Skill `PASS`/`NEEDS_FIXES` to `REVIEW_PASS`/`REVIEW_NEEDS_FIXES`. For `NEEDS_FIXES`, classify concrete findings into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper, while unknown/unsafe scope blocks. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, write `failure-log.md`, and stop. Do not accept stale verdict text or replace required independent review with Main-Agent self-review.
|
|
191
190
|
|
|
192
191
|
{{IF_BROWSER_INTERACTION}}
|
|
193
192
|
|
|
@@ -195,21 +194,33 @@ Handle `REVIEW_PASS` and `REVIEW_NEEDS_FIXES` according to task policy. `REVIEW_
|
|
|
195
194
|
|
|
196
195
|
{{END_IF_BROWSER_INTERACTION}}
|
|
197
196
|
|
|
198
|
-
**CP-3**: Code review
|
|
197
|
+
**CP-3**: Code review returned `PASS`, `review-report.md` is valid, and review-local verification is recorded.
|
|
199
198
|
|
|
200
199
|
**Checkpoint update**: Set step `prizmkit-code-review` to `"completed"` only for an accepted valid Final Result.
|
|
201
200
|
|
|
202
201
|
---
|
|
203
202
|
|
|
203
|
+
{{IF_BROWSER_INTERACTION}}
|
|
204
|
+
### Phase 4: Configured Browser Verification
|
|
205
|
+
|
|
206
|
+
After valid code-review PASS and before Test, execute the configured Browser Verification Protocol above. Record evidence and cleanup. A blocking failure stops before Test; a non-blocking unavailable check is recorded and may continue according to task policy.
|
|
207
|
+
|
|
208
|
+
{{END_IF_BROWSER_INTERACTION}}
|
|
209
|
+
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
210
|
+
### Phase 4: Manual / Hybrid Verification
|
|
211
|
+
|
|
212
|
+
Complete the declared UAT checklist automatically with available browser, CLI, API, fixture, and test evidence. Record the evidence before Test. If required evidence cannot be established, write `failure-log.md` and stop truthfully.
|
|
213
|
+
|
|
214
|
+
{{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
204
215
|
### Phase 4: Post-Review Test Gate — PrizmKit Test
|
|
205
216
|
|
|
206
|
-
After
|
|
217
|
+
After valid code-review PASS and all configured Browser/Manual verification, run the mandatory test gate against the same artifact root:
|
|
207
218
|
|
|
208
219
|
```text
|
|
209
220
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/
|
|
210
221
|
```
|
|
211
222
|
|
|
212
|
-
Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to
|
|
223
|
+
Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to the fix report and retrospective. For `TEST_NEEDS_FIXES`, classify the concrete correction into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper and requires fresh Review, configured verification, and Test, while unknown/unsafe scope or exhausted budget blocks. `TEST_BLOCKED` preserves its blocker and records `WORKFLOW_BLOCKED`. Do not require a manifest/attestation package, reinterpret the testing result as a runtime crash, or recreate the skill's internal loops.
|
|
213
224
|
|
|
214
225
|
Only `TEST_PASS` may proceed to commit.
|
|
215
226
|
|
|
@@ -220,87 +231,25 @@ Only `TEST_PASS` may proceed to commit.
|
|
|
220
231
|
|
|
221
232
|
---
|
|
222
233
|
|
|
223
|
-
### Phase 4:
|
|
234
|
+
### Phase 4: Report, Retrospective & Runtime Commit Handoff
|
|
224
235
|
|
|
225
|
-
|
|
236
|
+
**a. Fix report before commit preparation**
|
|
226
237
|
|
|
227
|
-
|
|
238
|
+
Write `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` after `TEST_PASS`. Include the resolution summary, changed behavior, reproduction before/after, regression and review results, configured Browser/Manual evidence, durable knowledge captured, and acceptance-criteria checklist. Do not require a commit hash because the report must exist before the local commit.
|
|
228
239
|
|
|
229
|
-
|
|
230
|
-
- **DEFAULT**: Run `/prizmkit-retrospective` with structural sync only (Job 1). Skip knowledge injection.
|
|
231
|
-
- **Full retrospective** (Job 1 + Job 2): Only when the fix causes interface signature changes, dependency additions/removals, observable behavior changes, or reveals new TRAPs.
|
|
240
|
+
Mark `bug-report` completed only after the report is valid.
|
|
232
241
|
|
|
233
|
-
**
|
|
234
|
-
- Update the affected module's TRAPS section in `.prizmkit/prizm-docs/`
|
|
235
|
-
- Format: `- [LOW|HIGH|CRITICAL] <description> | FIX: <approach>`
|
|
236
|
-
- Do not add dates.
|
|
242
|
+
**b. Retrospective**
|
|
237
243
|
|
|
238
|
-
|
|
239
|
-
Stage doc changes explicitly when `.prizmkit/prizm-docs/` changed.
|
|
244
|
+
Invoke `/prizmkit-retrospective` with the exact artifact root, exact non-`.prizmkit/` `change_paths`, and a concise `change_summary`. Validate `outcome=RETRO_COMPLETE`; do not stage or commit.
|
|
240
245
|
|
|
241
|
-
**c
|
|
242
|
-
```bash
|
|
243
|
-
git add <specific-files-modified>
|
|
244
|
-
git add .prizmkit/prizm-docs/
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
**d.** Run `/prizmkit-committer`:
|
|
248
|
-
- Commit message prefix: `fix({{FIX_SCOPE}}): {{BUG_TITLE}}`
|
|
249
|
-
- Include both fix code and reproduction test
|
|
250
|
-
- The runtime controls any optional remote publication after the local commit; do not make a publication decision in this session
|
|
251
|
-
|
|
252
|
-
**e.** Final verification:
|
|
253
|
-
```bash
|
|
254
|
-
git status --short
|
|
255
|
-
```
|
|
256
|
-
Working tree MUST be clean. If any files remain, amend the commit.
|
|
257
|
-
|
|
258
|
-
**f.** Write fix report to `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md`:
|
|
246
|
+
**c. Runtime commit preparation**
|
|
259
247
|
|
|
260
|
-
|
|
261
|
-
- **Bug Resolution Summary**: ID, title, status, phases completed
|
|
262
|
-
- **What Was Fixed**: changes made, diff summary, commit hash
|
|
263
|
-
- **Verification Results**: reproduction test before/after, regression tests, review findings
|
|
264
|
-
|
|
265
|
-
{{IF_BROWSER_INTERACTION}}
|
|
266
|
-
- **Browser Verification Results**: UI flows tested, browser tool used (if any), manual verification steps completed
|
|
267
|
-
{{END_IF_BROWSER_INTERACTION}}
|
|
268
|
-
|
|
269
|
-
- **Knowledge Captured**: TRAPS updated (if any), prevention recommendation
|
|
270
|
-
- **Acceptance Criteria Verification**: checklist with pass/fail for each criterion
|
|
271
|
-
|
|
272
|
-
- **Checkpoint update**: Set `prizmkit-retrospective`, `prizmkit-committer`, and `bug-report` to `completed` as each finishes.
|
|
248
|
+
After this injected session validates every required artifact, invoke `/prizmkit-committer operation=prepare-runtime-commit artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/ evidence_paths=<exact paths> excluded_paths=.prizmkit/bugfix/{{BUG_ID}}/workflow-checkpoint.json request_path=.prizmkit/bugfix/{{BUG_ID}}/runtime-commit-request.json`. Require `COMMIT_REQUEST_READY`; this session records `COMMIT_PENDING` and stops. The Python runtime validates the request, executes/verifies the local commit, finalizes checkpoint `COMMITTED`, and controls any later publication.
|
|
273
249
|
|
|
274
250
|
---
|
|
275
251
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
**CRITICAL**: Before exiting, write the session status file.
|
|
279
|
-
|
|
280
|
-
Write to: `{{SESSION_STATUS_PATH}}`
|
|
281
|
-
|
|
282
|
-
```json
|
|
283
|
-
{
|
|
284
|
-
"session_id": "{{SESSION_ID}}",
|
|
285
|
-
"bug_id": "{{BUG_ID}}",
|
|
286
|
-
"status": "<success|partial|failed>",
|
|
287
|
-
"completed_phases": [1, 2, 3, 4],
|
|
288
|
-
"current_phase": 4,
|
|
289
|
-
"checkpoint_reached": "CP-4",
|
|
290
|
-
"fast_path": false,
|
|
291
|
-
"errors": [],
|
|
292
|
-
"can_resume": false,
|
|
293
|
-
"resume_from_phase": null,
|
|
294
|
-
"artifacts": {
|
|
295
|
-
"spec_path": ".prizmkit/bugfix/{{BUG_ID}}/spec.md",
|
|
296
|
-
"plan_path": ".prizmkit/bugfix/{{BUG_ID}}/plan.md",
|
|
297
|
-
"fix_report_path": ".prizmkit/bugfix/{{BUG_ID}}/fix-report.md"
|
|
298
|
-
},
|
|
299
|
-
"git_commit": "<commit hash>",
|
|
300
|
-
"traps_updated": false,
|
|
301
|
-
"timestamp": "{{TIMESTAMP}}"
|
|
302
|
-
}
|
|
303
|
-
```
|
|
252
|
+
Runtime session status is written by the Python runtime. Do not write or edit `session-status.json`.
|
|
304
253
|
|
|
305
254
|
## Critical Paths
|
|
306
255
|
|
|
@@ -310,7 +259,6 @@ Write to: `{{SESSION_STATUS_PATH}}`
|
|
|
310
259
|
| Spec | `.prizmkit/bugfix/{{BUG_ID}}/spec.md` |
|
|
311
260
|
| Plan | `.prizmkit/bugfix/{{BUG_ID}}/plan.md` |
|
|
312
261
|
| Fix Report | `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` |
|
|
313
|
-
| Session Status Output | {{SESSION_STATUS_PATH}} |
|
|
314
262
|
| Project Root | {{PROJECT_ROOT}} |
|
|
315
263
|
|
|
316
264
|
## Reminders
|
|
@@ -321,5 +269,5 @@ Write to: `{{SESSION_STATUS_PATH}}`
|
|
|
321
269
|
- plan.md first task MUST be reproduction test (RED → GREEN TDD)
|
|
322
270
|
- Commit with `fix(<scope>):` prefix, NOT `feat:`
|
|
323
271
|
- DEFAULT: `/prizmkit-retrospective` structural sync only (Job 1). Full retrospective when fix changes interfaces/dependencies/behavior
|
|
324
|
-
-
|
|
325
|
-
- Do NOT run `git add`/`git commit
|
|
272
|
+
- Runtime owns session-status.json; never hand-edit it
|
|
273
|
+
- Do NOT run `git add`/`git commit`; the Python runtime executes the prepared local commit
|
|
@@ -7,13 +7,12 @@
|
|
|
7
7
|
- **Refactor Type**: {{REFACTOR_TYPE}}
|
|
8
8
|
- **Priority**: {{PRIORITY}}
|
|
9
9
|
- **Complexity**: {{COMPLEXITY}}
|
|
10
|
-
- **Pipeline Mode**: {{PIPELINE_MODE}}
|
|
11
10
|
|
|
12
11
|
## Your Mission
|
|
13
12
|
|
|
14
13
|
You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}: "{{REFACTOR_TITLE}}".
|
|
15
14
|
|
|
16
|
-
**CRITICAL SESSION LIFECYCLE RULE**:
|
|
15
|
+
**CRITICAL SESSION LIFECYCLE RULE**: Do not claim success until all refactor work and authoritative artifacts are complete. The Python runtime exclusively writes session status.
|
|
17
16
|
|
|
18
17
|
**NON-INTERACTIVE MODE**: You are running in headless non-interactive mode. There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input, and NEVER use interactive prompts. Resolve uncertainty from existing code, project docs, and conservative behavior-preserving defaults.
|
|
19
18
|
|
|
@@ -54,19 +53,28 @@ You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}:
|
|
|
54
53
|
|
|
55
54
|
{{GLOBAL_CONTEXT}}
|
|
56
55
|
|
|
57
|
-
## Refactor
|
|
56
|
+
## Refactor Artifact Manifest
|
|
58
57
|
|
|
59
|
-
Always use
|
|
58
|
+
Always use `.prizmkit/refactor/{{REFACTOR_ID}}/`:
|
|
60
59
|
|
|
61
60
|
```
|
|
62
61
|
.prizmkit/refactor/{{REFACTOR_ID}}/
|
|
63
62
|
├── spec.md
|
|
64
63
|
├── plan.md
|
|
64
|
+
├── context-snapshot.md
|
|
65
65
|
├── review-report.md
|
|
66
|
+
├── test-report.md
|
|
67
|
+
├── test-result.json
|
|
66
68
|
├── refactor-report.md
|
|
67
|
-
|
|
69
|
+
├── completion-summary.json
|
|
70
|
+
├── retrospective-result.json
|
|
71
|
+
├── failure-log.md
|
|
72
|
+
├── workflow-checkpoint.json
|
|
73
|
+
└── runtime-commit-request.json
|
|
68
74
|
```
|
|
69
75
|
|
|
76
|
+
Use `context-snapshot.md` for navigation, not as a substitute for current source, diffs, or authoritative artifacts. Verify writes with bounded reads/diffs/checks. `/prizmkit-test` exclusively owns the complete test repair loop. Do not stage, commit, amend, merge, push, reset, clean, or hand-edit runner-owned state.
|
|
77
|
+
|
|
70
78
|
{{CHECKPOINT_SYSTEM}}
|
|
71
79
|
|
|
72
80
|
## Execution
|
|
@@ -85,7 +93,7 @@ Create refactor artifacts directory:
|
|
|
85
93
|
|
|
86
94
|
### Phase 1: Plan — Specification & Plan Generation
|
|
87
95
|
|
|
88
|
-
|
|
96
|
+
Invoke `/prizmkit-plan` once with the exact artifact root, refactor requirement, and behavior-preservation context. It returns only `PLAN_READY` or `PLAN_BLOCKED`.
|
|
89
97
|
|
|
90
98
|
The generated `spec.md` MUST include:
|
|
91
99
|
- goals with acceptance criteria;
|
|
@@ -114,32 +122,28 @@ If `DEV_PORT` is unknown, discover it from project config; do not guess port 300
|
|
|
114
122
|
|
|
115
123
|
{{END_IF_BROWSER_INTERACTION}}
|
|
116
124
|
|
|
117
|
-
**Checkpoint update**:
|
|
125
|
+
**Checkpoint update**: this injected session maps `PLAN_READY` to a completed planning step after artifact validation and stops on `PLAN_BLOCKED`.
|
|
118
126
|
|
|
119
127
|
---
|
|
120
128
|
|
|
121
129
|
### Phase 3: Implement — Behavior-Preserving Refactoring
|
|
122
130
|
|
|
123
|
-
|
|
131
|
+
Invoke `/prizmkit-implement` with the exact artifact root, reviewed spec/plan, and any explicit repair findings. It returns only `IMPLEMENTED` or `IMPLEMENT_BLOCKED`.
|
|
124
132
|
|
|
125
133
|
Implementation requirements:
|
|
126
134
|
1. Establish a green baseline before changes when tests exist.
|
|
127
135
|
2. Execute plan tasks in order.
|
|
128
136
|
3. Preserve existing behavior; do not mix unrelated feature work or bug fixes into the refactor.
|
|
129
|
-
4. Run focused
|
|
137
|
+
4. Run the smallest focused checks needed during implementation; the authoritative affected-module test gate runs only after review and configured Browser verification.
|
|
130
138
|
5. Mark each completed task `[x]` in plan.md.
|
|
131
139
|
|
|
132
|
-
|
|
133
|
-
Apply the browser behavior preservation protocol where UI behavior can be affected. Document evidence in implementation notes.
|
|
134
|
-
{{END_IF_BROWSER_INTERACTION}}
|
|
135
|
-
|
|
136
|
-
**Checkpoint update**: set step `prizmkit-implement` to `completed` in `{{CHECKPOINT_PATH}}`.
|
|
140
|
+
**Checkpoint update**: this injected session maps `IMPLEMENTED` to completed after artifact/evidence validation and stops on `IMPLEMENT_BLOCKED`.
|
|
137
141
|
|
|
138
142
|
---
|
|
139
143
|
|
|
140
144
|
### Phase 4: Review — Code Review & Behavior Verification
|
|
141
145
|
|
|
142
|
-
|
|
146
|
+
Invoke `/prizmkit-code-review` with the exact artifact root, spec, plan, and complete current change. It returns only `PASS` or `NEEDS_FIXES`. The Skill runs up to ten Main-Agent review rounds, directly repairs accepted findings, and verifies each repair. Missing required evidence, unsafe repair, failed verification, or round-ten non-convergence produces `NEEDS_FIXES`.
|
|
143
147
|
|
|
144
148
|
Review requirements:
|
|
145
149
|
- verify refactor quality against spec.md and plan.md;
|
|
@@ -151,30 +155,16 @@ Review requirements:
|
|
|
151
155
|
```bash
|
|
152
156
|
{{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/refactor/{{REFACTOR_ID}}/review-report.md
|
|
153
157
|
```
|
|
154
|
-
|
|
158
|
+
This injected session maps Skill `PASS`/`NEEDS_FIXES` to `REVIEW_PASS`/`REVIEW_NEEDS_FIXES`. `REVIEW_PASS` proceeds to configured verification. For `REVIEW_NEEDS_FIXES`, classify concrete findings into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper, while unknown/unsafe scope or exhausted budget records `WORKFLOW_BLOCKED`. It must never proceed as a pass. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, write `failure-log.md`, and stop. Do not accept stale verdict text or replace required independent review with Main-Agent self-review.
|
|
155
159
|
|
|
156
160
|
**Checkpoint update**: set step `prizmkit-code-review` to `completed` only for an accepted valid Final Result. Do not complete it for incomplete or invalid reports.
|
|
157
161
|
|
|
158
162
|
---
|
|
159
163
|
|
|
160
|
-
### Phase 5: Post-Review Test Gate — PrizmKit Test
|
|
161
|
-
|
|
162
|
-
After a valid code-review PASS, run the mandatory test gate against the same artifact root:
|
|
163
|
-
|
|
164
|
-
```text
|
|
165
|
-
/prizmkit-test scope=this-change artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Behavior-preservation context remains supporting input. Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to browser verification or retrospective. `TEST_NEEDS_FIXES` preserves the known correction or delta-review requirement and stops truthfully. `TEST_BLOCKED` preserves its blocker and records `WORKFLOW_BLOCKED`. Do not require a manifest/attestation package, reinterpret the testing result as a runtime crash, or recreate the skill's internal loops.
|
|
169
|
-
|
|
170
|
-
Only `TEST_PASS` may proceed to browser verification or commit.
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
164
|
{{IF_BROWSER_INTERACTION}}
|
|
175
165
|
### Phase 5: Browser Verification
|
|
176
166
|
|
|
177
|
-
|
|
167
|
+
After valid code-review PASS and before the authoritative Test stage, attempt browser verification for affected UI behavior. If no usable browser tool/server/port can be found and browser verification is non-blocking, mark browser verification `skipped` and continue. If explicit policy marks browser verification as blocking, mark it `failed`, write `failure-log.md`, and stop before Test.
|
|
178
168
|
|
|
179
169
|
Record tool choice, URL, steps, screenshot path if available, result, and cleanup status in `.prizmkit/refactor/{{REFACTOR_ID}}/context-snapshot.md`.
|
|
180
170
|
|
|
@@ -183,25 +173,24 @@ Record tool choice, URL, steps, screenshot path if available, result, and cleanu
|
|
|
183
173
|
---
|
|
184
174
|
|
|
185
175
|
{{END_IF_BROWSER_INTERACTION}}
|
|
186
|
-
### Phase
|
|
176
|
+
### Phase 5: Post-Review Test Gate — PrizmKit Test
|
|
187
177
|
|
|
188
|
-
|
|
178
|
+
After valid code-review PASS and configured Browser verification, run the mandatory test gate against the same artifact root:
|
|
189
179
|
|
|
190
|
-
|
|
180
|
+
```text
|
|
181
|
+
/prizmkit-test scope=this-change artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/
|
|
182
|
+
```
|
|
191
183
|
|
|
192
|
-
|
|
184
|
+
Behavior-preservation context remains supporting input. Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to reports and retrospective. For `TEST_NEEDS_FIXES`, classify the concrete correction into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper and requires fresh Review, configured verification, and Test, while unknown/unsafe scope or exhausted budget blocks. `TEST_BLOCKED` preserves its blocker and records `WORKFLOW_BLOCKED`. Do not require a manifest/attestation package, reinterpret the testing result as a runtime crash, or recreate the skill's internal loops.
|
|
193
185
|
|
|
194
|
-
|
|
186
|
+
Only `TEST_PASS` may proceed to reports, retrospective, or commit preparation.
|
|
195
187
|
|
|
196
|
-
|
|
188
|
+
---
|
|
197
189
|
|
|
198
|
-
```text
|
|
199
|
-
refactor({{REFACTOR_ID}}): {{REFACTOR_TITLE}}
|
|
200
|
-
```
|
|
201
190
|
|
|
202
|
-
|
|
191
|
+
### Phase 6: Reports, Retrospective & Runtime Commit Handoff
|
|
203
192
|
|
|
204
|
-
|
|
193
|
+
After `TEST_PASS`, write `.prizmkit/refactor/{{REFACTOR_ID}}/refactor-report.md` with:
|
|
205
194
|
- refactor summary;
|
|
206
195
|
- files/modules changed;
|
|
207
196
|
- behavior-preservation evidence before/after;
|
|
@@ -219,36 +208,13 @@ Write `.prizmkit/refactor/{{REFACTOR_ID}}/completion-summary.json` for downstrea
|
|
|
219
208
|
}
|
|
220
209
|
```
|
|
221
210
|
|
|
222
|
-
|
|
211
|
+
Complete `refactor-report` and `completion-summary` before retrospective. Then invoke `/prizmkit-retrospective` with the exact artifact root, exact non-`.prizmkit/` `change_paths`, and a concise `change_summary`. Validate `outcome=RETRO_COMPLETE`; do not stage or commit.
|
|
223
212
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
### Final: Report Session Status
|
|
213
|
+
After this injected session validates every required artifact, invoke `/prizmkit-committer operation=prepare-runtime-commit artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/ evidence_paths=<exact paths> excluded_paths=.prizmkit/refactor/{{REFACTOR_ID}}/workflow-checkpoint.json request_path=.prizmkit/refactor/{{REFACTOR_ID}}/runtime-commit-request.json`. Require `COMMIT_REQUEST_READY`; this session records `COMMIT_PENDING` and stops. The Python runtime executes/verifies the local commit, finalizes checkpoint `COMMITTED`, and controls any later publication.
|
|
227
214
|
|
|
228
|
-
|
|
215
|
+
---
|
|
229
216
|
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
"session_id": "{{SESSION_ID}}",
|
|
233
|
-
"refactor_id": "{{REFACTOR_ID}}",
|
|
234
|
-
"status": "<success|partial|failed>",
|
|
235
|
-
"completed_phases": [1, 2, 3, 4, 5, 6],
|
|
236
|
-
"current_phase": 6,
|
|
237
|
-
"checkpoint_reached": "completion-summary",
|
|
238
|
-
"errors": [],
|
|
239
|
-
"can_resume": false,
|
|
240
|
-
"resume_from_phase": null,
|
|
241
|
-
"artifacts": {
|
|
242
|
-
"spec_path": ".prizmkit/refactor/{{REFACTOR_ID}}/spec.md",
|
|
243
|
-
"plan_path": ".prizmkit/refactor/{{REFACTOR_ID}}/plan.md",
|
|
244
|
-
"review_report_path": ".prizmkit/refactor/{{REFACTOR_ID}}/review-report.md",
|
|
245
|
-
"report_path": ".prizmkit/refactor/{{REFACTOR_ID}}/refactor-report.md",
|
|
246
|
-
"completion_summary_path": ".prizmkit/refactor/{{REFACTOR_ID}}/completion-summary.json"
|
|
247
|
-
},
|
|
248
|
-
"git_commit": "<commit hash>",
|
|
249
|
-
"behavior_preserved": true
|
|
250
|
-
}
|
|
251
|
-
```
|
|
217
|
+
Runtime session status is written by the Python runtime. Do not write or edit `session-status.json`.
|
|
252
218
|
|
|
253
219
|
## Critical Paths
|
|
254
220
|
|
|
@@ -260,16 +226,15 @@ Before exiting, write `{{SESSION_STATUS_PATH}}`:
|
|
|
260
226
|
| Review Report | `.prizmkit/refactor/{{REFACTOR_ID}}/review-report.md` |
|
|
261
227
|
| Refactor Report | `.prizmkit/refactor/{{REFACTOR_ID}}/refactor-report.md` |
|
|
262
228
|
| Completion Summary | `.prizmkit/refactor/{{REFACTOR_ID}}/completion-summary.json` |
|
|
263
|
-
| Session Status Output | {{SESSION_STATUS_PATH}} |
|
|
264
229
|
| Workflow Checkpoint | {{CHECKPOINT_PATH}} |
|
|
265
230
|
| Project Root | {{PROJECT_ROOT}} |
|
|
266
231
|
|
|
267
232
|
## Reminders
|
|
268
233
|
|
|
269
|
-
- Use
|
|
234
|
+
- Use every formal atomic stage: `/prizmkit-plan`, `/prizmkit-implement`, `/prizmkit-code-review`, `/prizmkit-test`, `/prizmkit-retrospective`, `/prizmkit-committer` preparation.
|
|
270
235
|
- Follow the active skills and runtime contracts; they determine execution topology, review ownership, and delegation boundaries
|
|
271
236
|
- On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path
|
|
272
237
|
- Behavior preservation is the first priority.
|
|
273
238
|
- Browser verification is a mandatory attempt by default; it blocks only when explicitly required.
|
|
274
239
|
- If `DEV_PORT` is unknown, discover it from project config; do not guess port 3000.
|
|
275
|
-
-
|
|
240
|
+
- Runtime owns session-status.json; never hand-edit it.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
## Requirement Artifact Manifest
|
|
2
|
+
|
|
3
|
+
Use one artifact root for the complete lifecycle: `{{ARTIFACT_DIR}}/`.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
{{ARTIFACT_DIR}}/
|
|
7
|
+
├── spec.md
|
|
8
|
+
├── plan.md
|
|
9
|
+
├── context-snapshot.md
|
|
10
|
+
├── review-report.md
|
|
11
|
+
├── test-report.md
|
|
12
|
+
├── test-result.json
|
|
13
|
+
├── retrospective-result.json
|
|
14
|
+
├── failure-log.md
|
|
15
|
+
├── workflow-checkpoint.json
|
|
16
|
+
├── runtime-commit-request.json
|
|
17
|
+
{{FAMILY_ARTIFACTS}}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Artifact ownership:
|
|
21
|
+
|
|
22
|
+
- `/prizmkit-plan` owns `spec.md` and `plan.md`.
|
|
23
|
+
- The active implementation flow owns `context-snapshot.md` and implementation notes.
|
|
24
|
+
- `/prizmkit-code-review` owns `review-report.md`.
|
|
25
|
+
- `/prizmkit-test` owns the sibling `test-report.md` and `test-result.json` pair.
|
|
26
|
+
- `/prizmkit-retrospective` owns `retrospective-result.json` and any justified `.prizmkit/prizm-docs/` updates.
|
|
27
|
+
- The family orchestrator writes the family-specific reports/summaries listed above before retrospective and commit preparation.
|
|
28
|
+
- `/prizmkit-committer` prepares `runtime-commit-request.json`; the Python runtime consumes it and executes the local commit.
|
|
29
|
+
- `failure-log.md` records truthful blockers or incomplete exits.
|
|
30
|
+
|
|
31
|
+
Runtime-state boundary:
|
|
32
|
+
|
|
33
|
+
- Atomic Skills write only their stage-owned artifacts and domain results; they never read or mutate orchestration/checkpoint state.
|
|
34
|
+
- This injected session orchestrator maps stage results and updates `workflow-checkpoint.json` through the declared helper.
|
|
35
|
+
- Browser/process helpers may manage their declared PID files only through the runtime helper contract.
|
|
36
|
+
- Never hand-edit family task state, session status, heartbeat, progress, retry, checkout, daemon, PID, or log files under `.prizmkit/state/`.
|
|
37
|
+
- `session-status.json` is runtime-owned and is not part of this artifact manifest.
|
|
38
|
+
|
|
39
|
+
Do not create duplicate lifecycle artifacts in another Feature, Bugfix, or Refactor directory.
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
| Plan | `.prizmkit/bugfix/{{BUG_ID}}/plan.md` |
|
|
8
8
|
| Review Report | `.prizmkit/bugfix/{{BUG_ID}}/review-report.md` |
|
|
9
9
|
| Fix Report | `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` |
|
|
10
|
+
| Test Result | `.prizmkit/bugfix/{{BUG_ID}}/test-result.json` |
|
|
11
|
+
| Retrospective Result | `.prizmkit/bugfix/{{BUG_ID}}/retrospective-result.json` |
|
|
12
|
+
| Runtime Commit Request | `.prizmkit/bugfix/{{BUG_ID}}/runtime-commit-request.json` |
|
|
10
13
|
| Workflow Checkpoint | `{{CHECKPOINT_PATH}}` |
|
|
11
|
-
| Session Status Output | `{{SESSION_STATUS_PATH}}` |
|
|
12
14
|
| Project Root | `{{PROJECT_ROOT}}` |
|
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
###
|
|
1
|
+
### Bug Fix Report
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
After `TEST_PASS`, write `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` before retrospective and runtime commit preparation.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- Default: run `/prizmkit-retrospective` with structural sync only.
|
|
7
|
-
- Full architecture knowledge capture only when the fix changes interfaces, dependencies, observable behavior, or reveals a durable TRAP.
|
|
8
|
-
- TRAPS must use Prizm docs format: `- [LOW|HIGH|CRITICAL] <description> | FIX: <approach>`. Do not add dates.
|
|
5
|
+
Include:
|
|
9
6
|
|
|
10
|
-
Run `/prizmkit-retrospective` using the current working tree and staged changes as input context. Do not rely only on `git diff --cached`.
|
|
11
|
-
|
|
12
|
-
Stage changed files explicitly; never use `git add -A` or `git add .`.
|
|
13
|
-
|
|
14
|
-
Run `/prizmkit-committer` with commit prefix:
|
|
15
|
-
|
|
16
|
-
```text
|
|
17
|
-
fix({{FIX_SCOPE}}): {{BUG_TITLE}}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The runtime controls any optional remote publication after this local commit; do not make a publication decision in this session.
|
|
21
|
-
|
|
22
|
-
Write `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` with:
|
|
23
7
|
- root cause summary;
|
|
24
8
|
- reproduction evidence;
|
|
25
|
-
- fix summary;
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
- acceptance criteria checklist.
|
|
9
|
+
- fix summary and files changed;
|
|
10
|
+
- Code Review and Test results;
|
|
11
|
+
- configured browser/manual/hybrid verification evidence and limitations;
|
|
12
|
+
- final acceptance-criteria checklist.
|
|
30
13
|
|
|
31
|
-
|
|
14
|
+
Do not stage or commit. Mark `bug-report` completed only after the report is current and complete.
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
- Affected Files and Key Interfaces
|
|
15
15
|
- Existing/Reproduction Tests
|
|
16
16
|
- Relevant TRAPS/RULES
|
|
17
|
-
4.
|
|
18
|
-
5.
|
|
17
|
+
4. Invoke `/prizmkit-plan` once with the exact `artifact_dir`, bug requirement, diagnosis context, and project context. It returns only `PLAN_READY` or `PLAN_BLOCKED`.
|
|
18
|
+
5. On `PLAN_READY`, validate that `plan.md` starts with a reproduction test task that would fail before the fix. On `PLAN_BLOCKED`, record the blocker and stop.
|
|
19
19
|
6. Do not create a FAST_PATH that bypasses code review or the mandatory post-review test gate; all committable Bugfixes use the same atomic stages.
|
|
20
20
|
|
|
21
21
|
**CP-BF-1**: `spec.md` and `plan.md` exist, and the first plan task is a reproduction test.
|
|
22
22
|
|
|
23
|
-
**Checkpoint update**:
|
|
23
|
+
**Checkpoint update**: This injected session sets `bug-diagnosis-and-plan` to `completed` with `stage_result=PLAN_READY` only after artifact validation. Record `PLAN_BLOCKED` as the failed planning result.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Goal**: execute the fix plan with RED → GREEN evidence.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Invoke `/prizmkit-implement` with the exact `artifact_dir`, reviewed spec/plan, and any explicit repair findings. It returns only `IMPLEMENTED` or `IMPLEMENT_BLOCKED`:
|
|
6
6
|
|
|
7
7
|
- Execute plan tasks in order.
|
|
8
8
|
- First task creates or identifies a reproduction test that fails before the fix.
|
|
@@ -17,4 +17,4 @@ After implementation, verify:
|
|
|
17
17
|
3. no in-scope regression remains unexplained;
|
|
18
18
|
4. acceptance criteria have evidence.
|
|
19
19
|
|
|
20
|
-
**Checkpoint update**:
|
|
20
|
+
**Checkpoint update**: This injected session maps `IMPLEMENTED` to a completed step only after the checks above. `IMPLEMENT_BLOCKED` records the blocker and stops.
|