prizmkit 1.1.129 → 1.1.131

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.
Files changed (88) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/.env.example +1 -1
  3. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +445 -8
  4. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +87 -66
  5. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +53 -3
  6. package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +55 -25
  7. package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +4 -0
  8. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +15 -1
  9. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +398 -6
  10. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +61 -3
  11. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +64 -4
  12. package/bundled/dev-pipeline/scripts/prompt_framework.py +156 -7
  13. package/bundled/dev-pipeline/scripts/update-bug-status.py +53 -0
  14. package/bundled/dev-pipeline/scripts/update-checkpoint.py +294 -69
  15. package/bundled/dev-pipeline/scripts/update-feature-status.py +57 -0
  16. package/bundled/dev-pipeline/scripts/update-refactor-status.py +53 -0
  17. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
  18. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +20 -14
  19. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +21 -4
  20. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +18 -0
  21. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +1 -1
  22. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +5 -15
  23. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +21 -0
  24. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +10 -10
  25. package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +16 -0
  26. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +26 -23
  27. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +12 -8
  28. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +1 -1
  29. package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +21 -0
  30. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +362 -3
  31. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +404 -24
  32. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +132 -0
  33. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +91 -0
  34. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +411 -18
  35. package/bundled/dev-pipeline/tests/test_unified_cli.py +3 -3
  36. package/bundled/skills/_metadata.json +62 -25
  37. package/bundled/skills/app-planner/SKILL.md +4 -3
  38. package/bundled/skills/bug-fix-workflow/SKILL.md +89 -180
  39. package/bundled/skills/bug-planner/SKILL.md +12 -27
  40. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +131 -220
  41. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +36 -90
  42. package/bundled/skills/feature-pipeline-launcher/SKILL.md +129 -271
  43. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +35 -76
  44. package/bundled/skills/feature-planner/SKILL.md +27 -22
  45. package/bundled/skills/feature-planner/assets/planning-guide.md +4 -4
  46. package/bundled/skills/feature-workflow/SKILL.md +94 -121
  47. package/bundled/skills/prizmkit/SKILL.md +130 -94
  48. package/bundled/skills/prizmkit/references/workflow-state-protocol.md +181 -0
  49. package/bundled/skills/prizmkit-code-review/SKILL.md +114 -84
  50. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +1 -1
  51. package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +181 -0
  52. package/bundled/skills/prizmkit-committer/SKILL.md +131 -47
  53. package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +181 -0
  54. package/bundled/skills/prizmkit-implement/SKILL.md +99 -73
  55. package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +1 -1
  56. package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +181 -0
  57. package/bundled/skills/prizmkit-init/SKILL.md +5 -5
  58. package/bundled/skills/prizmkit-plan/SKILL.md +132 -105
  59. package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +181 -0
  60. package/bundled/skills/prizmkit-retrospective/SKILL.md +111 -53
  61. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +7 -6
  62. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +5 -4
  63. package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +181 -0
  64. package/bundled/skills/prizmkit-test/SKILL.md +28 -6
  65. package/bundled/skills/prizmkit-test/references/examples.md +1 -1
  66. package/bundled/skills/prizmkit-test/references/test-report-template.md +1 -1
  67. package/bundled/skills/prizmkit-test/references/workflow-state-protocol.md +181 -0
  68. package/bundled/skills/prizmkit-workflow/SKILL.md +266 -0
  69. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +181 -0
  70. package/bundled/skills/recovery-workflow/SKILL.md +62 -241
  71. package/bundled/skills/recovery-workflow/evals/evals.json +17 -33
  72. package/bundled/skills/recovery-workflow/references/detection.md +28 -52
  73. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +105 -439
  74. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +136 -275
  75. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +53 -88
  76. package/bundled/skills/refactor-planner/SKILL.md +12 -57
  77. package/bundled/skills/refactor-planner/references/behavior-preservation.md +111 -230
  78. package/bundled/skills/refactor-planner/references/error-recovery.md +37 -0
  79. package/bundled/skills/refactor-planner/references/planning-phases.md +11 -17
  80. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +1 -1
  81. package/bundled/skills/refactor-workflow/SKILL.md +98 -139
  82. package/bundled/templates/project-memory-template.md +4 -4
  83. package/package.json +1 -1
  84. package/src/index.js +4 -0
  85. package/src/prompts.js +10 -3
  86. package/src/scaffold.js +1 -1
  87. package/bundled/dev-pipeline/tests/test-deploy-safety.sh +0 -223
  88. package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +0 -462
@@ -1,88 +1,82 @@
1
1
  ---
2
2
  name: "bug-fix-workflow"
3
- description: "Triage-based bug-fix workflow for interactive single-bug repair or pipeline handoff. Diagnoses enough to choose Fast Path, Pipeline Path, continue diagnosis, or existing-list launch; keeps a thicker Fast Path for one bug with reproduction, fix, review, user verification, commit, and merge choice. Use for 'fix this bug', 'debug this', stack traces, failed tests, bug IDs, manual bug fixes, or batch bugs that may need bug-planner -> bugfix-pipeline-launcher. Ordinary bug fixes skip retrospective unless structural docs or architecture change."
3
+ description: "Thin bug-fix scenario router. Performs lightweight diagnosis only to choose direct single-requirement guidance, complex or batch bug planning, or existing-list command construction; hands planning to bug-planner and runtime command construction to bugfix-pipeline-launcher. It never starts coding or owns the requirement lifecycle."
4
4
  ---
5
5
 
6
6
  # Bug Fix Workflow
7
7
 
8
- Triage-based entry point for bug fixing. Unlike feature/refactor workflows, this workflow intentionally keeps a thicker Fast Path because high-quality single-bug repair depends on interactive diagnosis, reproduction, verification, and commit decisions.
8
+ Collect enough evidence to classify a reported problem, then route planned work without implementing a fix or duplicating planner/launcher responsibilities.
9
9
 
10
10
  ## Responsibility Boundary
11
11
 
12
12
  This workflow owns:
13
- - Single-bug interactive diagnosis and repair in the current workspace.
14
- - Lightweight routing between Fast Path, Pipeline Path, existing-list launch, and continued diagnosis.
15
- - User confirmation before workspace mutation.
16
- - Reproduction evidence, root-cause fix, code review, user verification, commit, and merge decision for Fast Path.
13
+ - Lightweight diagnosis: symptom, expected/actual behavior, reproduction evidence, impact, and affected area when readily available.
14
+ - Scenario classification: direct single-requirement guidance, Pipeline Path, existing-list command construction, or continued diagnosis.
15
+ - User route selection through `AskUserQuestion`.
16
+ - Prompt brief handoff to `bug-planner` or `bugfix-pipeline-launcher`.
17
17
 
18
18
  This workflow does not own:
19
- - Batch bug list generation, headless execution readiness, severity/priority calibration, schema validation, or plan review gates — those belong to `bug-planner`.
20
- - Pipeline execution mode, runtime configuration, command assembly, status/log/stop/retry details — those belong to `bugfix-pipeline-launcher`.
19
+ - Creating branches, editing source/tests, running a fix, reviewing code, testing a completed change, committing, or merging.
20
+ - Batch bug list generation, severity/priority calibration, schema validation, or planner-local review gates — those belong to `bug-planner`.
21
+ - Runtime option selection, command construction, prerequisite checks, or status/log/stop/retry syntax — those belong to `bugfix-pipeline-launcher`.
22
+ - The independent direct requirement lifecycle.
21
23
 
22
- Ordinary bug fixes do not run `/prizmkit-retrospective`. Run retrospective only when the fix intentionally changes durable architecture, module boundaries, public interfaces, or `.prizmkit/prizm-docs/` structure.
24
+ ## Execution Topology
25
+
26
+ ```text
27
+ Direct single requirement:
28
+ User → prizmkit-workflow → atomic lifecycle skills
29
+
30
+ Planned bug execution:
31
+ User → bug-fix-workflow → bug-planner → bugfix-pipeline-launcher → returned CLI command → runtime → atomic lifecycle skills
32
+ ```
33
+
34
+ The routes are independent. This workflow may identify that one confirmed bug fits the Direct Path, but it ends before the user enters that path and never invokes the direct workflow.
23
35
 
24
36
  ## When to Use
25
37
 
26
38
  Use this workflow when:
27
- - The user wants to fix one specific bug interactively.
28
- - The user provides a stack trace, error message, failing test, or bug ID and wants diagnosis.
29
- - The user wants to decide whether a bug is simple enough for current-session repair.
30
- - The user provides multiple or complex bugs and wants routing to the bug-fix pipeline.
39
+ - A bug report needs lightweight diagnosis before choosing a path.
40
+ - The user provides a stack trace, error message, failing test, or bug ID and wants routing.
41
+ - The user provides complex or multiple bugs that may need planning.
42
+ - The user wants a command for an existing `.prizmkit/plans/bug-fix-list.json`.
31
43
 
32
44
  Do not use this workflow when:
33
- - The user only wants to collect or plan bugs -> use `bug-planner`.
34
- - The user only wants launch/status/logs/retry for an existing bug list -> use `bugfix-pipeline-launcher`.
45
+ - The user already chose the direct single-requirement lifecycle -> enter it independently.
46
+ - The user only wants to collect, append, validate, or summarize bugs -> use `bug-planner`.
47
+ - The user only wants a runtime command for an existing bug list -> use `bugfix-pipeline-launcher`.
35
48
  - The user wants feature development -> use `feature-workflow`.
36
49
  - The user wants behavior-preserving restructuring -> use `refactor-workflow`.
37
50
 
38
51
  ## Input Sources
39
52
 
40
- Accept any of these sources:
41
-
42
- | Source | Example | Route implication |
43
- |---|---|---|
44
- | Bug ID from `.prizmkit/plans/bug-fix-list.json` | `fix B-001` | Can use Fast Path for one bug or launcher for pipeline |
45
- | Stack trace / error message | `TypeError: ...` | Diagnose before route selection |
46
- | Natural-language report | `login crashes on submit` | Diagnose before route selection |
47
- | Failed test | `src/auth/login.test.ts fails` | Use test as reproduction evidence |
48
- | Multiple bugs/logs | `these 7 tests fail` | Usually Pipeline Path through `bug-planner` |
53
+ | Source | Route implication |
54
+ |---|---|
55
+ | One bug ID or focused report | Diagnose enough to offer Direct Path or planning |
56
+ | Stack trace / error message | Capture evidence before route selection |
57
+ | Failed test | Treat the failure as reproduction evidence |
58
+ | Multiple reports/logs/tests | Usually Pipeline Path through `bug-planner` |
59
+ | Existing validated bug list plus command intent | `bugfix-pipeline-launcher` |
49
60
 
50
- If no input source is clear, ask the user to describe the bug before proceeding.
61
+ If no input source is clear, ask the user to describe the problem.
51
62
 
52
63
  ## Route Selection
53
64
 
54
- ### Step 1: Diagnose enough to choose a path
55
-
56
- Do not create a branch or modify files before path selection.
65
+ ### Step 1: Diagnose enough to classify
57
66
 
58
- Gather enough information to decide whether this is:
59
- - One bug suitable for interactive Fast Path.
60
- - A complex single bug or batch bug set better suited for `bug-planner`.
61
- - An existing bug list operation better suited for `bugfix-pipeline-launcher`.
62
- - Still too unclear and needs continued diagnosis.
67
+ Do not create a branch or modify files. Gather only enough evidence to decide whether this is:
68
+ - One confirmed formal bug requirement suited to independent Direct Path execution.
69
+ - A broad/complex bug or batch better suited to `bug-planner`.
70
+ - An existing bug-list command suited to `bugfix-pipeline-launcher`.
71
+ - Too unclear and still needs diagnosis.
63
72
 
64
- For systematic clarification, read `${SKILL_DIR}/references/bug-diagnosis.md` when the report lacks reproduction, expected vs actual behavior, affected scope, data/state trigger, or error details.
73
+ Read `${SKILL_DIR}/references/bug-diagnosis.md` when reproduction, expected/actual behavior, scope, data/state trigger, or error detail is missing. Stop once the route can be chosen; root-cause proof belongs to the eventual execution owner.
65
74
 
66
- ### Step 2: Confirm bug understanding
75
+ ### Step 2: Confirm understanding
67
76
 
68
- Before asking for an execution path, summarize:
69
-
70
- ```markdown
71
- ## Bug Understanding
72
-
73
- - Symptom:
74
- - Reproduction:
75
- - Environment:
76
- - Expected behavior:
77
- - Actual behavior:
78
- - Impact:
79
- - Suspected affected area:
80
- - Unknowns:
81
- ```
77
+ Summarize symptom, reproduction, environment, expected/actual behavior, impact, affected area, and unknowns. Ask whether the summary is accurate. If material unknowns remain, keep `Continue diagnosis` available.
82
78
 
83
- Ask whether the summary is accurate. If key fields are still unknown, include `Continue diagnosis` as an approach option.
84
-
85
- ### Step 3: Ask for approach selection
79
+ ### Step 3: Ask for approach
86
80
 
87
81
  Use `AskUserQuestion`; do not render path options as plain text.
88
82
 
@@ -90,35 +84,21 @@ Use `AskUserQuestion`; do not render path options as plain text.
90
84
  Question: How would you like to proceed?
91
85
  Header: Approach
92
86
  Options:
93
- - Fix now (Fast Path)create/use a fix branch in this workspace, reproduce, fix, review, verify, commit, and choose merge behavior
94
- - Use Pipeline Path — bug-planner creates/reviews bug-fix-list.json, then bugfix-pipeline-launcher configures execution
95
- - Continue diagnosis — inspect or ask more before choosing a path
96
- ```
97
-
98
- For an auto-discovered existing bug list:
99
-
100
- ```text
101
- Question: Existing bug-fix-list.json found. What should we do with it?
102
- Header: Bug list
103
- Options:
104
- - Launch existing list — hand off to bugfix-pipeline-launcher
105
- - Inspect summary first — show bug count/status, then ask again
106
- - Update/re-plan — hand off to bug-planner in append/update mode
107
- - Fix one bug interactively — choose a single bug for Fast Path
87
+ - Use Direct Path — leave this router and invoke the direct single-requirement workflow independently with the confirmed bug evidence
88
+ - Use Pipeline Path — bug-planner creates/reviews bug-fix-list.json, then bugfix-pipeline-launcher constructs the runtime command
89
+ - Continue diagnosis — collect more route-level evidence before choosing
108
90
  ```
109
91
 
110
- If the user explicitly asked to run an existing list, that explicit request counts as path selection; hand off directly to `bugfix-pipeline-launcher`.
92
+ For an auto-discovered bug list, offer construct command, inspect summary, update/re-plan, or select one report for direct-path guidance. An explicit request for a list command counts as route selection.
111
93
 
112
94
  ## Workflow Handoff Brief
113
95
 
114
- When handing off to `bug-planner`, `bugfix-pipeline-launcher`, or Fast Path L1 skills, include this prompt brief. Do not write the brief to disk.
96
+ When handing off to a planner or launcher, include this prompt brief; do not write it to disk.
115
97
 
116
98
  ```markdown
117
- ## Workflow Handoff Brief
118
-
119
99
  ### Source
120
100
  - workflow: bug-fix-workflow
121
- - selected_path: fast_path | pipeline_path | existing_list_launch | continue_diagnosis
101
+ - selected_path: pipeline_path | existing_list_command | continue_diagnosis
122
102
 
123
103
  ### Bug Goal
124
104
  - original_request: <preserve the user's wording>
@@ -127,151 +107,80 @@ When handing off to `bug-planner`, `bugfix-pipeline-launcher`, or Fast Path L1 s
127
107
  ### Evidence
128
108
  - reproduction: <known steps or failing test>
129
109
  - error_output: <stack trace, logs, console output, or omitted>
130
- - affected_paths: <files/modules/tests mentioned by user or discovered during diagnosis>
110
+ - affected_paths: <paths/modules/tests mentioned or found during lightweight diagnosis>
131
111
  - environment: <runtime/browser/OS/data state if known>
132
112
 
133
113
  ### Scope
134
- - included: <bug behavior to fix>
135
- - excluded: <unrelated cleanup, refactor, feature work>
114
+ - included: <bug behavior to plan>
115
+ - excluded: <unrelated cleanup, refactor, or feature work>
136
116
 
137
117
  ### Decision
138
118
  - route_reason: <why this path was selected>
139
119
  - user_confirmed: yes
140
120
 
141
121
  ### Next Skill Instruction
142
- - For bug-planner: Use this brief as input; perform your own required clarification, validation, generation, and review gate.
143
- - For Fast Path: Fix only the root cause for this bug and preserve unrelated behavior.
144
- ```
145
-
146
- ## Fast Path — Single Bug Interactive Repair
147
-
148
- Fast Path starts only after the user selects `Fix now`.
149
-
150
- ### Phase 1: Branch setup
151
-
152
- 1. Check current branch.
153
- 2. If on `main` or a shared branch, create a dedicated `fix/<BUG_ID-or-short-desc>` branch.
154
- 3. If already on a fix branch, ask whether to continue on it or create a new one.
155
- 4. Record the original branch for the merge decision.
156
-
157
- This phase occurs after path selection so Pipeline Path users do not receive unnecessary workspace mutations.
158
-
159
- ### Phase 2: Root-cause triage
160
-
161
- 1. Read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs for affected modules.
162
- 2. Read files from the error, stack trace, failing test, or bug summary.
163
- 3. Check relevant TRAPS in `.prizmkit/prizm-docs/`.
164
- 4. Identify root cause, blast radius, and fix complexity.
165
- 5. Present diagnosis and ask whether to proceed.
166
-
167
- ### Phase 3: Reproduce
168
-
169
- 1. Write or identify a focused reproduction test/check when practical.
170
- 2. Confirm the reproduction fails before the fix when practical.
171
- 3. If automatic reproduction is impractical, record a manual checklist and explain the limitation.
172
-
173
- ### Phase 4: Fix
174
-
175
- 1. Make the smallest root-cause fix.
176
- 2. Avoid unrelated refactoring or feature work.
177
- 3. Run the reproduction test/check.
178
- 4. Run the relevant regression tests.
179
- 5. If regressions appear, revise up to three attempts, then ask whether to continue, switch to Pipeline Path, or stop.
180
-
181
- If the fix requires a written implementation plan, invoke `/prizmkit-plan` with the handoff brief, then `/prizmkit-implement`. Do not switch to Pipeline Path solely because a current-session plan is useful.
182
-
183
- ### Phase 5: Review
184
-
185
- Run `/prizmkit-code-review` against the bug context and current diff. The review should check root-cause coverage, reproduction strength, edge cases, regressions, and project conventions.
186
-
187
- If review needs fixes, apply accepted fixes directly in the current workspace and rerun the review loop according to `/prizmkit-code-review` rules.
188
-
189
- ### Phase 6: User verification
190
-
191
- Use `AskUserQuestion` for the verification decision:
192
-
193
- ```text
194
- Question: Fix passes the available checks. Would you like to verify before committing?
195
- Header: Verify
196
- Options:
197
- - Run the app — start the relevant dev command and manually check the scenario
198
- - Run a command — user provides a test/check command
199
- - Skip verification — automated checks are enough for now
122
+ - Planner: perform required clarification, severity/priority calibration, validation, generation, and planner-local review; return the validated list without starting a fix.
123
+ - Launcher: own runtime configuration and command construction; do not re-plan, implement the bug, or execute the command.
200
124
  ```
201
125
 
202
- If the user reports the fix still fails, return to Phase 4. After two additional failed attempts, ask whether to continue or switch to Pipeline Path.
126
+ The direct path has no planner/launcher handoff. Preserve the confirmed bug evidence in the exit guidance so the user can enter the independent direct workflow.
203
127
 
204
- ### Phase 7: Retrospective, commit, and merge decision
128
+ ## Selected Path Execution
205
129
 
206
- 1. Run `/prizmkit-retrospective` only if the fix changed durable architecture/docs or structural interfaces.
207
- 2. Run `/prizmkit-committer` with a `fix(<scope>):` message.
208
- 3. Use `AskUserQuestion` for merge behavior:
130
+ ### Direct Path guidance
209
131
 
210
- ```text
211
- Question: Fix committed on the fix branch. What would you like to do next?
212
- Header: Merge
213
- Options:
214
- - Merge back — merge to the original branch and delete the fix branch
215
- - Keep branch — retain it for PR/review workflow
216
- - Decide later — leave the branch as-is
217
- ```
132
+ 1. Confirm one formal bug requirement and summarize the available evidence.
133
+ 2. Explain the independent direct topology in §Execution Topology.
134
+ 3. Provide one concise next-entry instruction containing the original report and evidence.
135
+ 4. End `bug-fix-workflow`. Do not create a branch, start coding, invoke lifecycle skills, or later own merge behavior.
218
136
 
219
- Do not push unless the user explicitly asks.
137
+ If the problem expands into multiple requirements or remains too broad, keep control here and offer Pipeline Path.
220
138
 
221
- ## Pipeline Path
222
-
223
- Use Pipeline Path for multiple bugs, uncertain/broad root cause, structural fix planning, or background autonomous execution.
139
+ ### Pipeline Path
224
140
 
225
141
  1. Invoke `bug-planner` with the handoff brief.
226
- 2. `bug-planner` performs bug collection, severity/priority calibration, headless readiness checks, validation, and plan review.
227
- 3. After `bug-planner` reports a validated `.prizmkit/plans/bug-fix-list.json`, show a concise summary: bug count, severity distribution, and review/validation outcome.
228
- 4. Ask whether to proceed to launch.
142
+ 2. The planner owns bug collection, severity/priority calibration, headless readiness, validation, and plan review.
143
+ 3. After a validated `.prizmkit/plans/bug-fix-list.json` returns, show bug count, severity distribution, and review/validation outcome.
144
+ 4. Ask whether to construct the runtime command.
229
145
  5. If yes, invoke `bugfix-pipeline-launcher`.
230
146
 
231
- Do not duplicate launcher execution-mode or configuration questions in this workflow; the launcher owns them.
232
-
233
- ## Existing List Operations
147
+ Do not duplicate launcher configuration questions.
234
148
 
235
- If the user explicitly requests launch/status/logs/retry/stop for an existing bug list, invoke `bugfix-pipeline-launcher` with the user's intent and list path.
149
+ ### Existing list operations
236
150
 
237
- If the user wants to add, edit, deduplicate, or validate bugs, invoke `bug-planner`.
151
+ - Run/status/logs/retry/stop command construction -> `bugfix-pipeline-launcher`.
152
+ - Add/edit/deduplicate/validate -> `bug-planner`.
238
153
 
239
154
  ## Resume Guidance
240
155
 
241
156
  | State found | Action |
242
157
  |---|---|
243
- | On fix branch with uncommitted code changes | Resume Fast Path at review or verification depending on test/review status |
244
- | Fast Path `spec.md` / `plan.md` exists | Ask whether to continue implementation, review, or re-plan |
245
- | Fix committed on fix branch | Ask merge preference |
246
- | Valid `.prizmkit/plans/bug-fix-list.json` exists and user wants execution | Invoke `bugfix-pipeline-launcher` |
247
- | Bug list exists but intent is unclear | Ask launch / inspect / update / fix one bug interactively |
248
- | Recovery is ambiguous after interruption | Use `recovery-workflow` |
158
+ | Direct workflow state exists | Exit this router and tell the user to resume its recorded requirement workflow |
159
+ | Valid bug list with command intent | Invoke `bugfix-pipeline-launcher` |
160
+ | Valid bug list with planning intent | Invoke `bug-planner` |
161
+ | Interrupted bugfix task branch exists | Route to `recovery-workflow` for the exact continuation command |
162
+ | Only diagnosis evidence exists | Resume lightweight diagnosis and route selection |
249
163
 
250
164
  ## Error Handling
251
165
 
252
166
  | Situation | Action |
253
167
  |---|---|
254
- | Bug report is too vague | Ask systematic clarification questions from `references/bug-diagnosis.md` |
255
- | Bug ID missing from bug list | Ask user for details or route to `bug-planner` to update the list |
256
- | Many bugs provided to Fast Path | Recommend Pipeline Path and ask via `AskUserQuestion` |
257
- | Cannot reproduce automatically | Record manual reproduction and proceed only with user awareness |
258
- | Fix causes regressions | Revise up to three attempts, then ask whether to continue or switch paths |
259
- | Root cause remains unclear | Continue diagnosis or switch to Pipeline Path based on user choice |
260
- | Merge conflict occurs | Stop and report the conflict; ask whether user wants manual resolution or to keep the branch |
168
+ | Report is vague | Ask focused route-level questions from `references/bug-diagnosis.md` |
169
+ | Bug ID is missing from list | Route to `bug-planner` to update the list |
170
+ | Many reports are provided | Recommend Pipeline Path and ask via `AskUserQuestion` |
171
+ | Evidence cannot establish a route | Continue diagnosis; do not guess or start implementation |
172
+ | Planner cannot produce a valid list | Keep resolution inside `bug-planner` |
173
+ | Launcher finds configuration issues | Keep remediation inside `bugfix-pipeline-launcher` |
261
174
 
262
175
  ## Handoff Map
263
176
 
264
177
  | From | To | Condition |
265
178
  |---|---|---|
266
- | `bug-fix-workflow` | `/prizmkit-plan` / `/prizmkit-implement` | Fast Path needs a written current-session plan |
267
- | `bug-fix-workflow` | `/prizmkit-code-review` | Fast Path fix is implemented |
268
- | `bug-fix-workflow` | `/prizmkit-retrospective` | Structural docs/architecture changed |
269
- | `bug-fix-workflow` | `/prizmkit-committer` | Fast Path fix is reviewed and ready |
270
- | `bug-fix-workflow` | `bug-planner` | User selects Pipeline Path or wants bug-list planning |
271
- | `bug-planner` | `bug-fix-workflow` | Planner completed from workflow-origin Pipeline Path |
272
- | `bug-fix-workflow` | `bugfix-pipeline-launcher` | User confirms launch after planner completion or explicitly requests existing-list execution |
179
+ | `bug-fix-workflow` | `bug-planner` | User selects Pipeline Path or bug-list planning |
180
+ | `bug-planner` | `bug-fix-workflow` | Planning completed from this workflow's Pipeline Path |
181
+ | `bug-fix-workflow` | `bugfix-pipeline-launcher` | User requests command construction or an existing-list operation |
273
182
 
274
183
  ## Output
275
184
 
276
- - Fast Path: root-cause fix, reproduction evidence, relevant tests/checks, review result, optional structural doc sync, one fix commit, and merge decision.
277
- - Pipeline Path: handoff brief, validated `.prizmkit/plans/bug-fix-list.json` from `bug-planner`, and pipeline launch/status handled by `bugfix-pipeline-launcher`.
185
+ - Direct guidance: confirmed diagnosis summary, independent direct-entry topology, and preserved bug evidence; no code change or implementation result.
186
+ - Pipeline Path: handoff brief, validated `.prizmkit/plans/bug-fix-list.json`, and a command returned by `bugfix-pipeline-launcher`.
@@ -5,7 +5,7 @@ description: "Interactive bug planning that produces, validates, appends, and su
5
5
 
6
6
  # Bug Planner
7
7
 
8
- Interactive skill that collects bug information from various input formats and generates a standardized `.prizmkit/plans/bug-fix-list.json` for the Bug Fix Pipeline.
8
+ Interactive planning skill that creates, updates, validates, and summarizes the standardized `.prizmkit/plans/bug-fix-list.json` for later autonomous bug-fix execution. It never fixes source code.
9
9
 
10
10
  ## Invocation Commitment (Hard Rule)
11
11
 
@@ -23,7 +23,7 @@ The user chose this skill intentionally. Respect that choice.
23
23
 
24
24
  ## Scope Boundary (Hard Rule)
25
25
 
26
- This skill is PLANNING ONLY. You must NEVER:
26
+ This skill is PLANNING ONLY. It may create, append, validate, and review bug planning artifacts, but it must never implement a fix or start execution. You must NEVER:
27
27
  - Create, modify, or delete source code files (*.js, *.ts, *.py, *.go, *.html, *.css, etc.)
28
28
  - Run build/install/test commands
29
29
  - Execute any bug fix action
@@ -37,7 +37,8 @@ After planning is complete, you MUST:
37
37
  1. Present the summary and recommended next step (invoking `bugfix-pipeline-launcher`)
38
38
  2. Ask the user explicitly whether they want to proceed to execution
39
39
  3. If the user wants to adjust → continue refining the bug list
40
- 4. NEVER auto-execute the pipeline, launcher, or any fix step
40
+ 4. NEVER auto-execute the pipeline, launcher, composite workflow, or any fix step
41
+ 5. Return the validated bug list to the caller; only `bugfix-pipeline-launcher` prepares the runtime command
41
42
 
42
43
  ## User-Provided Content Priority (Hard Rule)
43
44
 
@@ -292,22 +293,9 @@ Only proceed to Phase 5 after user confirms.
292
293
 
293
294
  ## Local Generated-Plan Review Gate
294
295
 
295
- User requirement preserved verbatim: `there is a litter bug for prizm-code-review will to check git diff in working space and staged space , however the .prizmkit will be gitignored in most situation. so do you think the content should be change to inline a new reference file instead of use prizmkit-code-review`
296
+ Run this gate after `.prizmkit/plans/bug-fix-list.json` passes generation and validation, and before the final handoff. It applies whenever this session added or changed final bug entries. For validate-only, summary-only, or draft-save flows with no final content change, report that the gate is not applicable.
296
297
 
297
- Run this gate **after** `.prizmkit/plans/bug-fix-list.json` passes the validation/generate script and **before** any success output or next-step summary recommends `bugfix-pipeline-launcher`. This gate applies to Interactive Planning, From Log, From Tests, and append-to-existing bug list flows when the current session generated, appended, or rewrote final bug planning content. For Validate, Summary, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable no new final planning content written.`
298
-
299
- 1. **Load the local reference**: read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the source of truth for this planner-output review loop.
300
- 2. **Read actual planning artifacts directly**: inspect `.prizmkit/plans/bug-fix-list.json`, `.prizmkit/plans/bug-fix-list.draft.json` when present, and any pre-session or in-memory draft snapshot. Do not rely on `git status`, `git diff`, or `git diff --cached`, because `.prizmkit` planning artifacts are often gitignored or untracked.
301
- 3. **Identify review scope**: compare by stable bug IDs and item fields against the pre-session list when one existed. Ignore root generator metadata such as `$schema`, `created_at`, and `created_by`. Review only newly added or changed bug entries; preserve unchanged historical entries except when needed to verify duplicate/root-cause overlap or dependency references.
302
- 4. **Run the local checklist** from the reference: schema compatibility, dependency/DAG consistency, duplicate handling, root-cause overlap, description completeness, expected vs actual behavior, reproduction path, code-location hints, acceptance criteria measurability, user-provided wording preservation, task-scoped `user_context` isolation, and severity/priority calibration.
303
- 5. **Keep the review planning-only**: do NOT start `bugfix-pipeline-launcher`, do NOT run the bugfix pipeline, do NOT run tests/builds/installs, and do NOT implement source-code fixes.
304
- 6. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/bug-fix-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
305
- ```bash
306
- python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
307
- ```
308
- Do not hand-patch the final JSON as the source of truth; map final-output findings back to draft entries before regeneration.
309
- 7. **Revalidate after every accepted fix batch**: the generate script must pass again before the planner can proceed. If validation fails, fix the draft and rerun until pass.
310
- 8. **Report the gate outcome** in the final summary: include local generated-plan review verdict, reviewed bug IDs, accepted fixes (or "none"), and final validation result.
298
+ Read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the single source of truth. Review the actual draft and final artifacts directly because `.prizmkit` files may be gitignored. Keep the review planning-only, apply accepted findings to the draft/source representation, regenerate the final JSON, and require validation to pass again before reporting the review result.
311
299
 
312
300
  #### Success Output
313
301
 
@@ -382,16 +370,13 @@ Batch-parse failed test output:
382
370
 
383
371
  Triggers: "validate bug list", "check .prizmkit/plans/bug-fix-list.json".
384
372
 
385
- Validate existing `.prizmkit/plans/bug-fix-list.json`:
373
+ Run the deterministic validator so this operation uses the same contract as generation:
374
+
375
+ ```bash
376
+ python3 ${SKILL_DIR}/scripts/validate-bug-list.py validate .prizmkit/plans/bug-fix-list.json
377
+ ```
386
378
 
387
- 1. Check JSON syntax
388
- 2. Validate against `.prizmkit/dev-pipeline/templates/bug-fix-list-schema.json`
389
- 3. Check for:
390
- - Duplicate IDs
391
- - Missing required fields
392
- - Invalid status values
393
- - Invalid priority values (must be 'high', 'medium', or 'low')
394
- 4. Output: validation result with specific errors/warnings
379
+ Report the validator's errors and warnings without modifying source code. If the file needs correction, update the planning draft or final planning artifact only, then rerun the validator.
395
380
 
396
381
  ## Operation: Summary
397
382