prizmkit 1.1.110 → 1.1.112
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/agents/prizm-dev-team-reviewer.md +15 -0
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +55 -76
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +283 -421
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +259 -481
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -0
- package/bundled/dev-pipeline/scripts/init-pipeline.py +12 -0
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +24 -1
- package/bundled/dev-pipeline/scripts/prompt_framework.py +312 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +87 -20
- package/bundled/dev-pipeline/scripts/update-feature-status.py +82 -16
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +68 -28
- package/bundled/dev-pipeline/scripts/utils.py +171 -0
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +10 -18
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +14 -25
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +9 -1
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +11 -8
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +122 -182
- package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +16 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +12 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-mission.md +9 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +31 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-critic.md +22 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +23 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +20 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-init.md +9 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +15 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +29 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +11 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +7 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +31 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +40 -0
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -1
- package/bundled/dev-pipeline/templates/sections/failure-capture.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +17 -0
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +13 -0
- package/bundled/dev-pipeline/templates/sections/refactor-mission.md +9 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +37 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-critic.md +22 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +16 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +9 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +22 -0
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +19 -0
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +11 -0
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +7 -0
- package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +28 -0
- package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +52 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +122 -5
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +122 -0
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +124 -0
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +197 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +7 -3
- package/bundled/dev-pipeline/tests/test_utils.py +66 -1
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +8 -7
- package/bundled/skills/app-planner/references/project-brief-guide.md +2 -2
- package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +1 -1
- package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +1 -1
- package/bundled/skills/app-planner/references/rules-configuration.md +53 -26
- package/bundled/skills/bug-fix-workflow/SKILL.md +191 -336
- package/bundled/skills/bug-planner/SKILL.md +6 -5
- package/bundled/skills/bug-planner/references/critic-and-verification.md +3 -3
- package/bundled/skills/bug-planner/references/schema-validation.md +2 -1
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +30 -1
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +16 -16
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +2 -2
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +19 -11
- package/bundled/skills/feature-planner/SKILL.md +9 -11
- package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
- package/bundled/skills/feature-planner/references/decomposition-patterns.md +1 -1
- package/bundled/skills/feature-planner/references/error-recovery.md +2 -1
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +2 -2
- package/bundled/skills/feature-planner/references/new-project-planning.md +35 -39
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -1
- package/bundled/skills/feature-workflow/SKILL.md +169 -298
- package/bundled/skills/prizmkit/SKILL.md +103 -57
- package/bundled/skills/prizmkit-code-review/SKILL.md +97 -94
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +1 -0
- package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +13 -1
- package/bundled/skills/prizmkit-committer/SKILL.md +59 -47
- package/bundled/skills/prizmkit-deploy/SKILL.md +162 -381
- package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +220 -0
- package/bundled/skills/prizmkit-implement/SKILL.md +51 -40
- package/bundled/skills/prizmkit-init/SKILL.md +4 -3
- package/bundled/skills/prizmkit-plan/SKILL.md +85 -70
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +94 -73
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +20 -18
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +18 -14
- package/bundled/skills/prizmkit-retrospective/SKILL.md +56 -48
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +79 -27
- package/bundled/skills/prizmkit-test/SKILL.md +138 -141
- package/bundled/skills/prizmkit-test/references/examples.md +10 -8
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +1 -1
- package/bundled/skills/prizmkit-test/references/test-report-template.md +2 -2
- package/bundled/skills/recovery-workflow/SKILL.md +195 -256
- package/bundled/skills/recovery-workflow/evals/evals.json +21 -13
- package/bundled/skills/recovery-workflow/references/detection.md +48 -39
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +258 -322
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +29 -11
- package/bundled/skills/refactor-planner/SKILL.md +2 -2
- package/bundled/skills/refactor-planner/references/behavior-preservation.md +24 -19
- package/bundled/skills/refactor-planner/references/fast-path.md +2 -4
- package/bundled/skills/refactor-planner/references/planning-phases.md +2 -2
- package/bundled/skills/refactor-workflow/SKILL.md +173 -307
- package/package.json +1 -1
- package/src/scaffold.js +5 -0
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +0 -6
- package/bundled/skills/feature-workflow/references/brainstorm-guide.md +0 -137
- package/bundled/skills/refactor-workflow/references/brainstorm-guide.md +0 -116
|
@@ -12,7 +12,7 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
12
12
|
|
|
13
13
|
**CRITICAL**: You MUST NOT exit until ALL work is complete and committed. When you spawn Critic or Reviewer agents, wait for each to finish (run_in_background=false). Do NOT spawn agents in background and exit — that kills the session.
|
|
14
14
|
|
|
15
|
-
**Tier 3 — Orchestrator + Critic
|
|
15
|
+
**Tier 3 — Orchestrator + Critic**: For complex features, the main orchestrator handles context, planning, and implementation directly. Critic challenges the plan. Do not spawn top-level Dev or Reviewer subagents; code review runs later through `/prizmkit-code-review`.
|
|
16
16
|
|
|
17
17
|
**Agent spawn failure policy (all Agent tool calls)**:
|
|
18
18
|
- If spawning Reviewer or Critic fails with team/config/lock errors, retry at most once.
|
|
@@ -180,23 +180,16 @@ Before proceeding past CP-1, verify:
|
|
|
180
180
|
|
|
181
181
|
**CP-1**: Both spec.md and plan.md exist.
|
|
182
182
|
|
|
183
|
-
### Phase 3:
|
|
183
|
+
### Phase 3: Plan Self-Check — Orchestrator Direct
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
Do not spawn a top-level Reviewer subagent for planning analysis. Perform a bounded self-check before implementation:
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
1. Re-read only `context-snapshot.md`, `spec.md`, and `plan.md`.
|
|
188
|
+
2. Cross-check spec.md and plan.md Tasks against the feature description and acceptance criteria.
|
|
189
|
+
3. Verify the plan references the File Manifest and avoids unrelated work.
|
|
190
|
+
4. If you find CRITICAL issues, fix ONLY those issues in spec.md/plan.md before continuing.
|
|
188
191
|
|
|
189
|
-
|
|
190
|
-
> "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
191
|
-
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has TRAPS/RULES, Section 4 has file manifest.
|
|
192
|
-
> 2. Cross-check `spec.md` and `plan.md` (including Tasks section) for consistency.
|
|
193
|
-
> 3. Before flagging CRITICAL or HIGH issues, read the relevant source files listed in the File Manifest to verify.
|
|
194
|
-
> Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
|
|
195
|
-
|
|
196
|
-
Wait for Reviewer to return.
|
|
197
|
-
- If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in spec.md/plan.md. Then re-run analyze (max 1 round).
|
|
198
|
-
|
|
199
|
-
**CP-2**: No CRITICAL issues.
|
|
192
|
+
**CP-2**: Plan self-check complete; no CRITICAL plan issues remain.
|
|
200
193
|
|
|
201
194
|
{{IF_CRITIC_ENABLED}}
|
|
202
195
|
### Phase 3.5: Plan Challenge — Critic Agent(s)
|
|
@@ -495,12 +488,10 @@ If verification fails, log the failure details but continue to commit. Failures
|
|
|
495
488
|
|
|
496
489
|
### Phase 6: Retrospective & Commit (SINGLE COMMIT) — DO NOT SKIP
|
|
497
490
|
|
|
498
|
-
**
|
|
499
|
-
-
|
|
500
|
-
-
|
|
501
|
-
-
|
|
502
|
-
- Complex bugs (multi-module, cascading): Use `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/<BUG_ID>/`.
|
|
503
|
-
- Commit prefix: `fix(<scope>):` (not `feat:`).
|
|
491
|
+
**Feature Documentation Policy**:
|
|
492
|
+
- Run `/prizmkit-retrospective` before commit to update `.prizmkit/prizm-docs/` with durable structural knowledge from this feature.
|
|
493
|
+
- Capture architecture knowledge when the feature adds interfaces, dependencies, observable behavior, modules, or durable TRAPS/RULES/DECISIONS.
|
|
494
|
+
- Commit prefix: `feat({{FEATURE_ID}}):`.
|
|
504
495
|
|
|
505
496
|
**6a.** Check if feature already committed by inspecting recent git history for `{{FEATURE_ID}}`:
|
|
506
497
|
```bash
|
|
@@ -515,7 +506,6 @@ git log --oneline
|
|
|
515
506
|
- **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
|
|
516
507
|
- Stage doc changes: `git add .prizmkit/prizm-docs/`
|
|
517
508
|
⚠️ Do NOT commit here. Only stage.
|
|
518
|
-
- **For bug-fix sessions**: structural sync (Job 1) by default. Run knowledge injection (Job 2) when the fix causes interface signature changes, dependency additions/removals, observable behavior changes, or reveals new TRAPs
|
|
519
509
|
|
|
520
510
|
**6c.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
|
|
521
511
|
```bash
|
|
@@ -566,7 +556,6 @@ Rules for writing completion notes:
|
|
|
566
556
|
| Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
|
|
567
557
|
| Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
|
|
568
558
|
| Team Config | `{{TEAM_CONFIG_PATH}}` |
|
|
569
|
-
| Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
|
|
570
559
|
{{IF_CRITIC_ENABLED}}
|
|
571
560
|
| Critic Agent Def | {{CRITIC_SUBAGENT_PATH}} |
|
|
572
561
|
{{END_IF_CRITIC_ENABLED}}
|
|
@@ -592,10 +581,10 @@ If you encounter an unrecoverable error, context overflow, or are about to exit
|
|
|
592
581
|
|
|
593
582
|
## Reminders
|
|
594
583
|
|
|
595
|
-
- Tier 3: orchestrator implements directly; Critic challenges plan;
|
|
584
|
+
- Tier 3: orchestrator implements directly; Critic challenges plan; `/prizmkit-code-review` handles review later
|
|
596
585
|
- context-snapshot.md is append-only: orchestrator writes Sections 1-4 + Implementation Log, Reviewer appends Review Notes
|
|
597
586
|
- Gate checks enforce Implementation Log and Review Notes are written before proceeding
|
|
598
|
-
- Do NOT use `run_in_background=true` when spawning Critic
|
|
587
|
+
- Do NOT use `run_in_background=true` when spawning Critic agents
|
|
599
588
|
- Commit phase must use `/prizmkit-committer`; do NOT replace with manual git commit commands
|
|
600
589
|
- **NEVER delete, modify, or touch any file under `.prizmkit/state/`** — those are pipeline runtime files managed by the runner
|
|
601
590
|
- NEVER run `rm -rf`, `git clean`, or any destructive filesystem operations
|
|
@@ -75,7 +75,15 @@
|
|
|
75
75
|
"medium",
|
|
76
76
|
"low"
|
|
77
77
|
],
|
|
78
|
-
"description": "Fix priority.
|
|
78
|
+
"description": "Fix priority. Planner should order bugs by severity/priority before runtime execution. Runtime preserves stable list order subject to dependency constraints. Both critical and high severity map to high priority."
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"pattern": "^B-\\d{3}$"
|
|
85
|
+
},
|
|
86
|
+
"description": "IDs of bugs that must be completed before this one"
|
|
79
87
|
},
|
|
80
88
|
"error_source": {
|
|
81
89
|
"type": "object",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
You are the **bug fix session agent**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}".
|
|
13
13
|
|
|
14
|
-
**CRITICAL**: You MUST NOT exit until ALL work is complete and committed.
|
|
14
|
+
**CRITICAL**: You MUST NOT exit until ALL automated work is complete and committed, unless a fresh manual/hybrid verification gate requires stopping as `partial` before commit.
|
|
15
15
|
|
|
16
16
|
**SUBAGENT LIFECYCLE**: Any normal work subagent must be awaited with `run_in_background=false`. Do not spawn persistent background subagents for headless recovery.
|
|
17
17
|
|
|
@@ -177,7 +177,7 @@ After implement completes, verify:
|
|
|
177
177
|
|
|
178
178
|
### Phase 3: Review
|
|
179
179
|
|
|
180
|
-
If `FAST_PATH=true` (≤ 2 tasks, obvious root cause), skip this phase entirely.
|
|
180
|
+
If `FAST_PATH=true` (≤ 2 tasks, obvious root cause), skip this phase entirely and mark checkpoint step `prizmkit-code-review` as `skipped` before continuing.
|
|
181
181
|
|
|
182
182
|
Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
|
|
183
183
|
- The skill runs an internal review-fix loop (Reviewer → filter → orchestrator fix, max 3 rounds) and writes `review-report.md`
|
|
@@ -209,8 +209,10 @@ Read `review-report.md` and check the Verdict:
|
|
|
209
209
|
|
|
210
210
|
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
211
211
|
**MANUAL VERIFICATION GATE**:
|
|
212
|
-
-
|
|
213
|
-
-
|
|
212
|
+
- Fresh manual/hybrid bugfix sessions stop after automated review and before commit.
|
|
213
|
+
- Write session-status.json with status="partial", resume_from_phase=4, and STOP — manual UAT is required before commit.
|
|
214
|
+
- Recovery/retry/continuation sessions may substitute automated verification for manual/hybrid UAT only when evidence is documented in fix-report.md and session-status.json.
|
|
215
|
+
- Do not write `verifying` to the external bug-list status field; fine-grained verification is session/checkpoint metadata, while the external list status remains one of `pending`, `in_progress`, `completed`, `failed`, `skipped`, or `needs_info`.
|
|
214
216
|
{{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
215
217
|
|
|
216
218
|
---
|
|
@@ -223,10 +225,11 @@ Read `review-report.md` and check the Verdict:
|
|
|
223
225
|
|
|
224
226
|
**a.** If a new pitfall was discovered (not previously in TRAPS):
|
|
225
227
|
- Update the affected module's TRAPS section in `.prizmkit/prizm-docs/`
|
|
226
|
-
- Format: `-
|
|
228
|
+
- Format: `- [LOW|HIGH|CRITICAL] <description> | FIX: <approach>`
|
|
229
|
+
- Do not add dates.
|
|
227
230
|
|
|
228
231
|
**b.** Run `/prizmkit-retrospective` following the policy above.
|
|
229
|
-
Stage doc changes
|
|
232
|
+
Stage doc changes explicitly when `.prizmkit/prizm-docs/` changed.
|
|
230
233
|
|
|
231
234
|
**c.** Stage all changed files explicitly (NEVER use `git add -A` or `git add .`):
|
|
232
235
|
```bash
|
|
@@ -234,7 +237,7 @@ git add <specific-files-modified>
|
|
|
234
237
|
git add .prizmkit/prizm-docs/
|
|
235
238
|
```
|
|
236
239
|
|
|
237
|
-
**d.** Run `/prizmkit-committer
|
|
240
|
+
**d.** Run `/prizmkit-committer`:
|
|
238
241
|
- Commit message prefix: `fix({{FIX_SCOPE}}): {{BUG_TITLE}}`
|
|
239
242
|
- Include both fix code and reproduction test
|
|
240
243
|
- Do NOT push
|
|
@@ -259,7 +262,7 @@ The fix-report.md MUST contain:
|
|
|
259
262
|
- **Knowledge Captured**: TRAPS updated (if any), prevention recommendation
|
|
260
263
|
- **Acceptance Criteria Verification**: checklist with pass/fail for each criterion
|
|
261
264
|
|
|
262
|
-
**Checkpoint update**: Set
|
|
265
|
+
- **Checkpoint update**: Set `prizmkit-retrospective`, `prizmkit-committer`, and `bug-report` to `completed` as each finishes.
|
|
263
266
|
|
|
264
267
|
---
|
|
265
268
|
|
|
@@ -7,25 +7,22 @@
|
|
|
7
7
|
- **Refactor Type**: {{REFACTOR_TYPE}}
|
|
8
8
|
- **Priority**: {{PRIORITY}}
|
|
9
9
|
- **Complexity**: {{COMPLEXITY}}
|
|
10
|
+
- **Pipeline Mode**: {{PIPELINE_MODE}}
|
|
10
11
|
|
|
11
12
|
## Your Mission
|
|
12
13
|
|
|
13
14
|
You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}: "{{REFACTOR_TITLE}}".
|
|
14
15
|
|
|
15
|
-
**CRITICAL SESSION LIFECYCLE RULE**: You MUST NOT exit until
|
|
16
|
+
**CRITICAL SESSION LIFECYCLE RULE**: You MUST NOT exit until all refactor work is complete, checkpoint state is updated, and session-status.json is written.
|
|
16
17
|
|
|
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, NEVER use interactive prompts
|
|
18
|
+
**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.
|
|
18
19
|
|
|
19
|
-
**
|
|
20
|
+
**ORCHESTRATOR-DIRECT RULE**: Do not spawn top-level Dev or Reviewer subagents. The main orchestrator plans, implements via `/prizmkit-implement`, and runs `/prizmkit-code-review` directly.
|
|
20
21
|
|
|
21
22
|
**REFACTOR DOCUMENTATION POLICY**:
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
- Commit with `refactor(<scope>)
|
|
25
|
-
|
|
26
|
-
### Team Definition Reference
|
|
27
|
-
|
|
28
|
-
- **Team config**: `{{TEAM_CONFIG_PATH}}`
|
|
23
|
+
- Default: run `/prizmkit-retrospective` with full sync because refactoring changes structure and interfaces.
|
|
24
|
+
- Skip architecture knowledge injection only for a pure rename with no interface or dependency changes.
|
|
25
|
+
- Commit with `refactor(<scope>):`, not `feat:` or `fix:`.
|
|
29
26
|
|
|
30
27
|
### Refactor Description
|
|
31
28
|
|
|
@@ -43,11 +40,7 @@ You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}:
|
|
|
43
40
|
|
|
44
41
|
### Behavior Preservation
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
- **Existing Tests**:
|
|
48
|
-
{{EXISTING_TESTS}}
|
|
49
|
-
- **New Tests Needed**:
|
|
50
|
-
{{NEW_TESTS_NEEDED}}
|
|
43
|
+
{{BEHAVIOR_PRESERVATION}}
|
|
51
44
|
|
|
52
45
|
### Acceptance Criteria
|
|
53
46
|
|
|
@@ -61,268 +54,215 @@ You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}:
|
|
|
61
54
|
|
|
62
55
|
{{GLOBAL_CONTEXT}}
|
|
63
56
|
|
|
64
|
-
|
|
65
57
|
## Refactor Artifacts Directory
|
|
66
58
|
|
|
67
|
-
|
|
59
|
+
Always use per-refactor subdirectory `.prizmkit/refactor/{{REFACTOR_ID}}/`:
|
|
68
60
|
|
|
69
61
|
```
|
|
70
62
|
.prizmkit/refactor/{{REFACTOR_ID}}/
|
|
71
|
-
├── spec.md
|
|
72
|
-
├── plan.md
|
|
73
|
-
|
|
63
|
+
├── spec.md
|
|
64
|
+
├── plan.md
|
|
65
|
+
├── review-report.md
|
|
66
|
+
├── refactor-report.md
|
|
67
|
+
└── completion-summary.json
|
|
74
68
|
```
|
|
75
69
|
|
|
76
|
-
## Execution Instructions
|
|
77
|
-
|
|
78
|
-
**YOU are the orchestrator. Execute each phase by spawning the appropriate team agent with run_in_background=false.**
|
|
79
|
-
|
|
80
|
-
**Agent spawn failure policy (all Agent tool calls)**:
|
|
81
|
-
- If spawning Dev or Reviewer fails with team/config/lock errors, retry at most once.
|
|
82
|
-
- If the second attempt fails, do not keep spawning variants and do not enter artifact polling for Implementation Log, review-report, or refactor-report markers.
|
|
83
|
-
- Recovery exception: complete remaining refactor work directly in the orchestrator only when the action is safe and bounded; otherwise write `failure-log.md` with the spawn error and last observable state before stopping for recovery.
|
|
84
|
-
- Any recovery exception must be recorded in the required report or session status so downstream runs know the normal team path was unavailable.
|
|
85
|
-
- Apply the same cap to any re-spawn for report repair or resume prompts; do not burn multiple minutes on identical team/config/lock failures.
|
|
86
|
-
|
|
87
70
|
{{CHECKPOINT_SYSTEM}}
|
|
88
71
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
#### Agent Setup
|
|
72
|
+
## Execution
|
|
92
73
|
|
|
93
|
-
|
|
94
|
-
- Dev: `{{DEV_SUBAGENT_PATH}}`
|
|
95
|
-
- Reviewer: `{{REVIEWER_SUBAGENT_PATH}}`
|
|
74
|
+
### Phase 0: Initialize
|
|
96
75
|
|
|
97
76
|
Create refactor artifacts directory:
|
|
77
|
+
|
|
98
78
|
```bash
|
|
99
79
|
{{RUNTIME_HELPER_CMD}} artifact ensure-dir .prizmkit/refactor/{{REFACTOR_ID}}
|
|
100
80
|
```
|
|
101
81
|
|
|
102
|
-
|
|
82
|
+
**Checkpoint update**: set step `prizmkit-init` to `completed` in `{{CHECKPOINT_PATH}}`.
|
|
103
83
|
|
|
104
|
-
|
|
84
|
+
---
|
|
105
85
|
|
|
106
|
-
|
|
86
|
+
### Phase 1: Plan — Specification & Plan Generation
|
|
107
87
|
|
|
108
|
-
Run `/prizmkit-plan` with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}
|
|
109
|
-
- Description: "{{REFACTOR_TITLE}} — {{REFACTOR_DESCRIPTION}}"
|
|
110
|
-
- The spec.md MUST include:
|
|
111
|
-
- Goals with acceptance criteria (from the acceptance criteria above)
|
|
112
|
-
- Scope (files and modules from above)
|
|
113
|
-
- Behavior Preservation section (strategy: {{BEHAVIOR_STRATEGY}}, existing tests, what must not change)
|
|
114
|
-
- The plan.md MUST include:
|
|
115
|
-
- Change approach with behavior preservation strategy
|
|
116
|
-
- Tasks ordered by safety: safe renames first → extractions → structural changes
|
|
117
|
-
- Every task ends with "run test suite to verify behavior preserved"
|
|
118
|
-
- Rollback strategy
|
|
88
|
+
Run `/prizmkit-plan` with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/`.
|
|
119
89
|
|
|
120
|
-
|
|
90
|
+
The generated `spec.md` MUST include:
|
|
91
|
+
- goals with acceptance criteria;
|
|
92
|
+
- scope files/modules;
|
|
93
|
+
- behavior preservation strategy;
|
|
94
|
+
- interfaces or observable behavior that must not change.
|
|
121
95
|
|
|
122
|
-
|
|
96
|
+
The generated `plan.md` MUST include:
|
|
97
|
+
- behavior-preserving task order;
|
|
98
|
+
- test strategy before, during, and after refactor;
|
|
99
|
+
- rollback strategy;
|
|
100
|
+
- explicit risks and mitigations.
|
|
123
101
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
The refactor may affect UI behavior. Use this single browser protocol for planning, implementation, review, and final reporting:
|
|
102
|
+
Resolve uncertain refactor details from existing code and conservative existing-project patterns.
|
|
127
103
|
|
|
128
|
-
{{
|
|
129
|
-
- **Browser Tool**: Auto-select at runtime based on dev server and feature complexity.
|
|
130
|
-
{{END_IF_BROWSER_TOOL_AUTO}}
|
|
104
|
+
{{IF_BROWSER_INTERACTION}}
|
|
131
105
|
|
|
132
|
-
|
|
133
|
-
- **Browser Tool**: playwright-cli — local isolated browser instance for dev server verification.
|
|
134
|
-
{{END_IF_BROWSER_TOOL_PLAYWRIGHT}}
|
|
106
|
+
#### Browser Behavior Preservation Protocol
|
|
135
107
|
|
|
136
|
-
|
|
137
|
-
- **Browser Tool**: opencli — Chrome session with existing login for OAuth/third-party integrations.
|
|
138
|
-
{{END_IF_BROWSER_TOOL_OPENCLI}}
|
|
108
|
+
The refactor may affect UI behavior. Browser verification is a mandatory attempt by default, but it blocks only when the task explicitly marks browser verification as blocking.
|
|
139
109
|
|
|
140
|
-
**Verification Goals**:
|
|
110
|
+
**Browser Verification Goals**:
|
|
141
111
|
{{BROWSER_VERIFY_STEPS}}
|
|
142
112
|
|
|
143
|
-
|
|
113
|
+
If `DEV_PORT` is unknown, discover it from project config; do not guess port 3000.
|
|
144
114
|
|
|
145
115
|
{{END_IF_BROWSER_INTERACTION}}
|
|
146
116
|
|
|
147
|
-
|
|
148
|
-
- **Checkpoint update**: set step `prizmkit-plan` to `"completed"` in `{{CHECKPOINT_PATH}}`
|
|
117
|
+
**Checkpoint update**: set step `prizmkit-plan` to `completed` in `{{CHECKPOINT_PATH}}`.
|
|
149
118
|
|
|
150
119
|
---
|
|
151
120
|
|
|
152
|
-
|
|
121
|
+
{{IF_CRITIC_ENABLED}}
|
|
122
|
+
### Phase 2: Critic — Behavior Preservation Review
|
|
153
123
|
|
|
154
|
-
|
|
124
|
+
Challenge the plan before implementation. Focus on:
|
|
125
|
+
- behavior preservation gaps;
|
|
126
|
+
- unsafe task ordering;
|
|
127
|
+
- missing rollback strategy;
|
|
128
|
+
- insufficient test evidence.
|
|
155
129
|
|
|
156
|
-
|
|
157
|
-
Apply the all-agent spawn failure policy above for this Dev spawn: for team/config/lock errors, retry at most once; if the second attempt fails, do not poll for `## Implementation Log`; use the bounded recovery exception.
|
|
158
|
-
Prompt: "Read {{DEV_SUBAGENT_PATH}}. For refactor {{REFACTOR_ID}} ('{{REFACTOR_TITLE}}'):
|
|
159
|
-
1. Read `.prizmkit/refactor/{{REFACTOR_ID}}/spec.md` and `.prizmkit/refactor/{{REFACTOR_ID}}/plan.md`
|
|
160
|
-
2. Read `.prizmkit/prizm-docs/` for affected modules (TRAPS, RULES, PATTERNS)
|
|
161
|
-
3. Before making any changes, run the existing test suite to establish a green baseline
|
|
162
|
-
4. Run `/prizmkit-implement` with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/` — this handles the full implementation cycle:
|
|
163
|
-
- Reads plan.md Tasks section
|
|
164
|
-
- Implements task-by-task, marking each `[x]` immediately
|
|
165
|
-
- Runs tests after EVERY task — all tests MUST pass (behavior preservation)
|
|
166
|
-
- If tests fail: revert the task, analyze why, try alternative approach
|
|
167
|
-
- Writes '## Implementation Log' to context-snapshot.md (or equivalent)
|
|
168
|
-
5. Do NOT change behavior — only improve structure
|
|
130
|
+
Write the critic result into `.prizmkit/refactor/{{REFACTOR_ID}}/context-snapshot.md` or the plan notes, then update any unsafe plan details before implementation.
|
|
169
131
|
|
|
170
|
-
{{
|
|
132
|
+
**Checkpoint update**: set step `critic-plan-review` to `completed` in `{{CHECKPOINT_PATH}}`.
|
|
171
133
|
|
|
172
|
-
|
|
134
|
+
---
|
|
173
135
|
|
|
174
|
-
{{
|
|
136
|
+
{{END_IF_CRITIC_ENABLED}}
|
|
137
|
+
### Phase 3: Implement — Behavior-Preserving Refactoring
|
|
175
138
|
|
|
176
|
-
|
|
177
|
-
8. After all tasks complete, run the full test suite one final time
|
|
178
|
-
"
|
|
179
|
-
- **Wait for Dev to return**
|
|
180
|
-
- If Dev reports test failures that cannot be resolved after 3 attempts: escalate, write status="failed"
|
|
181
|
-
- **CP-RF-2**: All tasks completed, all tests green
|
|
182
|
-
- **Checkpoint update**: set step `prizmkit-implement` to `"completed"` in `{{CHECKPOINT_PATH}}`
|
|
139
|
+
Run `/prizmkit-implement` with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/`.
|
|
183
140
|
|
|
184
|
-
|
|
141
|
+
Implementation requirements:
|
|
142
|
+
1. Establish a green baseline before changes when tests exist.
|
|
143
|
+
2. Execute plan tasks in order.
|
|
144
|
+
3. Preserve existing behavior; do not mix unrelated feature work or bug fixes into the refactor.
|
|
145
|
+
4. Run focused tests after each risky task and full relevant tests before review.
|
|
146
|
+
5. Mark each completed task `[x]` in plan.md.
|
|
185
147
|
|
|
186
|
-
|
|
148
|
+
{{IF_BROWSER_INTERACTION}}
|
|
149
|
+
Apply the browser behavior preservation protocol where UI behavior can be affected. Document evidence in implementation notes.
|
|
150
|
+
{{END_IF_BROWSER_INTERACTION}}
|
|
187
151
|
|
|
188
|
-
**
|
|
152
|
+
**Checkpoint update**: set step `prizmkit-implement` to `completed` in `{{CHECKPOINT_PATH}}`.
|
|
189
153
|
|
|
190
|
-
|
|
191
|
-
Apply the all-agent spawn failure policy above for this Reviewer spawn.
|
|
192
|
-
Prompt: "Read {{REVIEWER_SUBAGENT_PATH}}. For refactor {{REFACTOR_ID}}:
|
|
193
|
-
1. Read `.prizmkit/refactor/{{REFACTOR_ID}}/spec.md` for goals and behavior preservation contracts
|
|
194
|
-
2. Read `.prizmkit/refactor/{{REFACTOR_ID}}/plan.md` for architecture decisions and completed tasks
|
|
195
|
-
3. Run `/prizmkit-code-review` with artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/. The skill runs an internal review-fix loop (Reviewer → filter → orchestrator fix, max 3 rounds) and writes review-report.md.
|
|
196
|
-
4. Run full test suite and verify ALL tests pass
|
|
154
|
+
---
|
|
197
155
|
|
|
198
|
-
|
|
156
|
+
### Phase 4: Review — Code Review & Behavior Verification
|
|
199
157
|
|
|
200
|
-
|
|
158
|
+
Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/` directly from the main orchestrator.
|
|
201
159
|
|
|
202
|
-
|
|
160
|
+
Review requirements:
|
|
161
|
+
- verify refactor quality against spec.md and plan.md;
|
|
162
|
+
- verify behavior preservation evidence;
|
|
163
|
+
- run or confirm relevant tests;
|
|
164
|
+
- write `.prizmkit/refactor/{{REFACTOR_ID}}/review-report.md` with `## Verdict`.
|
|
165
|
+
|
|
166
|
+
If the report is missing after one bounded status check, write `failure-log.md` and either perform a safe inline fallback review or stop with a clear recovery failure.
|
|
203
167
|
|
|
204
|
-
|
|
205
|
-
7. Report: verdict (PASS/NEEDS_FIXES), number of rounds, findings fixed/rejected
|
|
206
|
-
"
|
|
207
|
-
- **Wait for Reviewer to return**
|
|
208
|
-
- **Gate Check — Review Report**:
|
|
209
|
-
After Reviewer returns, verify the review report contains a verdict:
|
|
210
|
-
```bash
|
|
211
|
-
{{RUNTIME_HELPER_CMD}} text contains .prizmkit/refactor/{{REFACTOR_ID}}/review-report.md --pattern "## Verdict"
|
|
212
|
-
```
|
|
213
|
-
If GATE:MISSING:
|
|
214
|
-
- Do not enter an unbounded report-repair loop and do not repeatedly re-spawn Reviewer.
|
|
215
|
-
- Perform one bounded status check; retry at most once: inspect the Reviewer output, `review-report.md` path, and any internal Reviewer agent spawn messages from `/prizmkit-code-review`.
|
|
216
|
-
- If the missing report is caused by team/config/lock errors from the Reviewer or internal Reviewer agent spawn, retry the Reviewer agent at most once only if it appears transient.
|
|
217
|
-
- If the report is still missing after that single check/retry, write `.prizmkit/refactor/{{REFACTOR_ID}}/failure-log.md` with the spawn/skill error and last observable state, then either perform a safe inline fallback review (spec/plan/diff/tests → write `review-report.md` with `## Verdict`) or stop with a clear recovery failure.
|
|
218
|
-
|
|
219
|
-
Read `review-report.md` and check the Verdict:
|
|
220
|
-
- `PASS` → proceed to next phase
|
|
221
|
-
- `NEEDS_FIXES` → log remaining findings and proceed (do not retry externally)
|
|
222
|
-
- **CP-RF-3**: Code review complete, tests pass, behavior preserved
|
|
223
|
-
- **Checkpoint update**: set step `prizmkit-code-review` to `"completed"` in `{{CHECKPOINT_PATH}}`
|
|
168
|
+
**Checkpoint update**: set step `prizmkit-code-review` to `completed` in `{{CHECKPOINT_PATH}}`.
|
|
224
169
|
|
|
225
170
|
---
|
|
226
171
|
|
|
227
|
-
|
|
172
|
+
{{IF_BROWSER_INTERACTION}}
|
|
173
|
+
### Phase 5: Browser Verification
|
|
228
174
|
|
|
229
|
-
|
|
175
|
+
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` and write `failure-log.md`.
|
|
230
176
|
|
|
231
|
-
|
|
177
|
+
Record tool choice, URL, steps, screenshot path if available, result, and cleanup status in `.prizmkit/refactor/{{REFACTOR_ID}}/context-snapshot.md`.
|
|
232
178
|
|
|
233
|
-
|
|
179
|
+
**Checkpoint update**: set step `browser-verification` to `completed`, `skipped`, or `failed` according to the evidence.
|
|
234
180
|
|
|
235
|
-
|
|
236
|
-
- Commit message: `refactor({{REFACTOR_ID}}): {{REFACTOR_TITLE}}`
|
|
237
|
-
- Include all refactored files and any new/updated tests
|
|
238
|
-
- Do NOT push (user will push manually)
|
|
181
|
+
---
|
|
239
182
|
|
|
240
|
-
|
|
183
|
+
{{END_IF_BROWSER_INTERACTION}}
|
|
184
|
+
### Phase 6: Commit, Report & Completion Summary
|
|
241
185
|
|
|
242
|
-
|
|
243
|
-
- Refactor Summary (ID, title, type, status, phases completed)
|
|
244
|
-
- What Changed (files modified, structural changes made, diff summary)
|
|
245
|
-
- Behavior Verification (test suite results before/after, specific tests exercised)
|
|
186
|
+
Run `/prizmkit-retrospective` using the current working tree and staged changes as input context. Do not rely only on `git diff --cached`.
|
|
246
187
|
|
|
247
|
-
|
|
188
|
+
Stage changed files explicitly; never use `git add -A` or `git add .`.
|
|
248
189
|
|
|
249
|
-
|
|
190
|
+
Run `/prizmkit-committer` with commit prefix:
|
|
250
191
|
|
|
251
|
-
|
|
192
|
+
```text
|
|
193
|
+
refactor({{REFACTOR_ID}}): {{REFACTOR_TITLE}}
|
|
194
|
+
```
|
|
252
195
|
|
|
253
|
-
|
|
254
|
-
- Acceptance Criteria Verification (checklist with pass/fail for each criterion)
|
|
196
|
+
Do not push.
|
|
255
197
|
|
|
256
|
-
|
|
198
|
+
Write `.prizmkit/refactor/{{REFACTOR_ID}}/refactor-report.md` with:
|
|
199
|
+
- refactor summary;
|
|
200
|
+
- files/modules changed;
|
|
201
|
+
- behavior-preservation evidence before/after;
|
|
202
|
+
- review findings;
|
|
203
|
+
- browser evidence when applicable;
|
|
204
|
+
- acceptance criteria checklist.
|
|
257
205
|
|
|
258
|
-
|
|
259
|
-
```json
|
|
260
|
-
{
|
|
261
|
-
"completion_notes": [
|
|
262
|
-
"<each item: one key structural change that downstream refactors may need to know>",
|
|
263
|
-
"Example: Extracted shared validation logic into src/utils/validation.ts",
|
|
264
|
-
"Example: Renamed UserService → AuthService, moved from src/services/ to src/auth/",
|
|
265
|
-
"Example: Decoupled payment module from user module via PaymentGateway interface"
|
|
266
|
-
]
|
|
267
|
-
}
|
|
268
|
-
```
|
|
269
|
-
Rules: focus on structural changes, new module boundaries, renamed/moved files, changed interfaces. 3-8 notes, each under 120 chars.
|
|
206
|
+
Write `.prizmkit/refactor/{{REFACTOR_ID}}/completion-summary.json` for downstream refactor context:
|
|
270
207
|
|
|
271
|
-
|
|
272
|
-
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"completion_notes": [
|
|
211
|
+
"<key structural change, moved/renamed interface, or new module boundary>"
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Checkpoint update**: set `prizmkit-retrospective`, `prizmkit-committer`, `refactor-report`, and `completion-summary` to `completed` as each finishes.
|
|
273
217
|
|
|
274
|
-
|
|
218
|
+
---
|
|
275
219
|
|
|
276
|
-
|
|
220
|
+
### Final: Report Session Status
|
|
277
221
|
|
|
278
|
-
|
|
222
|
+
Before exiting, write `{{SESSION_STATUS_PATH}}`:
|
|
279
223
|
|
|
280
224
|
```json
|
|
281
225
|
{
|
|
282
226
|
"session_id": "{{SESSION_ID}}",
|
|
283
227
|
"refactor_id": "{{REFACTOR_ID}}",
|
|
284
228
|
"status": "<success|partial|failed>",
|
|
285
|
-
"completed_phases": [1, 2, 3, 4],
|
|
286
|
-
"current_phase":
|
|
287
|
-
"checkpoint_reached": "
|
|
229
|
+
"completed_phases": [1, 2, 3, 4, 5, 6],
|
|
230
|
+
"current_phase": 6,
|
|
231
|
+
"checkpoint_reached": "completion-summary",
|
|
288
232
|
"errors": [],
|
|
289
233
|
"can_resume": false,
|
|
290
234
|
"resume_from_phase": null,
|
|
291
235
|
"artifacts": {
|
|
292
236
|
"spec_path": ".prizmkit/refactor/{{REFACTOR_ID}}/spec.md",
|
|
293
237
|
"plan_path": ".prizmkit/refactor/{{REFACTOR_ID}}/plan.md",
|
|
294
|
-
"
|
|
238
|
+
"review_report_path": ".prizmkit/refactor/{{REFACTOR_ID}}/review-report.md",
|
|
239
|
+
"report_path": ".prizmkit/refactor/{{REFACTOR_ID}}/refactor-report.md",
|
|
240
|
+
"completion_summary_path": ".prizmkit/refactor/{{REFACTOR_ID}}/completion-summary.json"
|
|
295
241
|
},
|
|
296
242
|
"git_commit": "<commit hash>",
|
|
297
|
-
"behavior_preserved": true
|
|
298
|
-
"timestamp": "{{TIMESTAMP}}"
|
|
243
|
+
"behavior_preserved": true
|
|
299
244
|
}
|
|
300
245
|
```
|
|
301
246
|
|
|
302
|
-
**Status values**: `success` (all phases done) | `partial` (can resume) | `failed` (unrecoverable)
|
|
303
|
-
|
|
304
247
|
## Critical Paths
|
|
305
248
|
|
|
306
249
|
| Resource | Path |
|
|
307
250
|
|----------|------|
|
|
308
|
-
| Team Definition (source of truth) | `{{TEAM_CONFIG_PATH}}` |
|
|
309
251
|
| Refactor Artifacts Dir | `.prizmkit/refactor/{{REFACTOR_ID}}/` |
|
|
310
252
|
| Spec | `.prizmkit/refactor/{{REFACTOR_ID}}/spec.md` |
|
|
311
253
|
| Plan | `.prizmkit/refactor/{{REFACTOR_ID}}/plan.md` |
|
|
254
|
+
| Review Report | `.prizmkit/refactor/{{REFACTOR_ID}}/review-report.md` |
|
|
312
255
|
| Refactor Report | `.prizmkit/refactor/{{REFACTOR_ID}}/refactor-report.md` |
|
|
313
|
-
|
|
|
314
|
-
| Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
|
|
256
|
+
| Completion Summary | `.prizmkit/refactor/{{REFACTOR_ID}}/completion-summary.json` |
|
|
315
257
|
| Session Status Output | {{SESSION_STATUS_PATH}} |
|
|
316
258
|
| Workflow Checkpoint | {{CHECKPOINT_PATH}} |
|
|
317
259
|
| Project Root | {{PROJECT_ROOT}} |
|
|
318
260
|
|
|
319
261
|
## Reminders
|
|
320
262
|
|
|
321
|
-
-
|
|
322
|
-
-
|
|
323
|
-
-
|
|
324
|
-
-
|
|
325
|
-
-
|
|
326
|
-
-
|
|
327
|
-
- ALWAYS write session-status.json before exiting
|
|
328
|
-
- Do NOT use `run_in_background=true` when spawning normal work agents
|
|
263
|
+
- Use L1 skills: `/prizmkit-plan`, `/prizmkit-implement`, `/prizmkit-code-review`, `/prizmkit-retrospective`, `/prizmkit-committer`.
|
|
264
|
+
- Do not spawn top-level Dev or Reviewer subagents.
|
|
265
|
+
- Behavior preservation is the first priority.
|
|
266
|
+
- Browser verification is a mandatory attempt by default; it blocks only when explicitly required.
|
|
267
|
+
- If `DEV_PORT` is unknown, discover it from project config; do not guess port 3000.
|
|
268
|
+
- Always write session-status.json before exiting.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Bug Fix Artifacts Directory
|
|
2
|
+
|
|
3
|
+
Use only this durable artifact directory for this bug fix:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
.prizmkit/bugfix/{{BUG_ID}}/
|
|
7
|
+
├── spec.md
|
|
8
|
+
├── plan.md
|
|
9
|
+
├── context-snapshot.md
|
|
10
|
+
├── review-report.md
|
|
11
|
+
├── fix-report.md
|
|
12
|
+
├── failure-log.md
|
|
13
|
+
└── workflow-checkpoint.json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Do not write bugfix artifacts under feature or refactor artifact directories.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Critical Paths
|
|
2
|
+
|
|
3
|
+
| Resource | Path |
|
|
4
|
+
|----------|------|
|
|
5
|
+
| Bug Fix Artifacts Dir | `.prizmkit/bugfix/{{BUG_ID}}/` |
|
|
6
|
+
| Spec | `.prizmkit/bugfix/{{BUG_ID}}/spec.md` |
|
|
7
|
+
| Plan | `.prizmkit/bugfix/{{BUG_ID}}/plan.md` |
|
|
8
|
+
| Review Report | `.prizmkit/bugfix/{{BUG_ID}}/review-report.md` |
|
|
9
|
+
| Fix Report | `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` |
|
|
10
|
+
| Workflow Checkpoint | `{{CHECKPOINT_PATH}}` |
|
|
11
|
+
| Session Status Output | `{{SESSION_STATUS_PATH}}` |
|
|
12
|
+
| Project Root | `{{PROJECT_ROOT}}` |
|