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
|
@@ -1,422 +1,277 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "bug-fix-workflow"
|
|
3
|
-
description: "Triage-based 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."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Bug Fix Workflow
|
|
7
7
|
|
|
8
|
-
Triage-based entry point for bug fixing.
|
|
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.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
- **Pipeline Path** — complex or batch bug work is planned with `bug-planner`, launched with `bugfix-pipeline-launcher`, then monitored.
|
|
10
|
+
## Responsibility Boundary
|
|
12
11
|
|
|
13
|
-
|
|
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.
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
- User has a stack trace or error and wants interactive debugging
|
|
19
|
-
- User wants the workflow to triage whether the bug is simple enough for current-session Fast Path
|
|
20
|
-
- User has multiple or complex bugs and wants this workflow to hand off to the bug-fix pipeline
|
|
21
|
-
|
|
22
|
-
**Do NOT use when:**
|
|
23
|
-
- User only wants to plan/collect bugs without fixing → `bug-planner`
|
|
24
|
-
- User only wants to launch an existing `.prizmkit/plans/bug-fix-list.json` → `bugfix-pipeline-launcher`
|
|
25
|
-
- User wants to build features → `feature-workflow`
|
|
26
|
-
- User wants to refactor code → `refactor-workflow`
|
|
27
|
-
|
|
28
|
-
## Overview
|
|
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`.
|
|
29
21
|
|
|
30
|
-
|
|
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.
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
2. **Assess difficulty** — decide whether it is a simple single-bug Fast Path candidate or complex/batch Pipeline Path candidate.
|
|
34
|
-
3. **AskUserQuestion approach selection** — present selectable options; never silently choose the path.
|
|
35
|
-
4. **Execute selected path**:
|
|
36
|
-
- **Fast Path**: dedicated fix branch in the current workspace → reproduce → fix → tests → `/prizmkit-code-review` → optional `/prizmkit-retrospective` only for structural docs → `/prizmkit-committer` → merge choice.
|
|
37
|
-
- **Pipeline Path**: `bug-planner` → `bugfix-pipeline-launcher` → monitoring.
|
|
24
|
+
## When to Use
|
|
38
25
|
|
|
39
|
-
|
|
26
|
+
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.
|
|
40
31
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
| **Current workspace** | The current git checkout and working tree. For bug fixes, this still includes creating/using the dedicated `fix/<BUG_ID>-*` branch in that same workspace. |
|
|
47
|
-
| **Monitoring** | Status/log follow-up for a launched bugfix pipeline; it is not part of the Fast Path. |
|
|
32
|
+
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`.
|
|
35
|
+
- The user wants feature development -> use `feature-workflow`.
|
|
36
|
+
- The user wants behavior-preserving restructuring -> use `refactor-workflow`.
|
|
48
37
|
|
|
49
|
-
## Input
|
|
38
|
+
## Input Sources
|
|
50
39
|
|
|
51
|
-
|
|
40
|
+
Accept any of these sources:
|
|
52
41
|
|
|
53
|
-
|
|
|
42
|
+
| Source | Example | Route implication |
|
|
54
43
|
|---|---|---|
|
|
55
|
-
| Bug
|
|
56
|
-
| Stack trace / error message |
|
|
57
|
-
| Natural
|
|
58
|
-
| Failed test |
|
|
59
|
-
|
|
|
60
|
-
|
|
61
|
-
At least one input source must be provided. If none is clear, ask the user to describe the bug.
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Fast Path
|
|
66
|
-
|
|
67
|
-
Fast Path is for a simple single bug fixed interactively in the current session/current workspace.
|
|
68
|
-
|
|
69
|
-
### Eligibility Criteria (ALL must be true)
|
|
70
|
-
|
|
71
|
-
- Exactly one bug is in scope
|
|
72
|
-
- Root cause is immediately obvious or quickly confirmed (typo, missing null check, wrong variable name, off-by-one, narrow logic bug)
|
|
73
|
-
- Fix is small and localized (normally one file, minimal code)
|
|
74
|
-
- No cross-module impact
|
|
75
|
-
- No data model or public API changes
|
|
76
|
-
- Existing tests cover the affected path, or a focused reproduction test can be added quickly
|
|
77
|
-
|
|
78
|
-
### Fast Path Workflow
|
|
79
|
-
|
|
80
|
-
1. Branch Setup → use/create `fix/<BUG_ID>-<short-desc>` in the current workspace
|
|
81
|
-
2. Write or confirm reproduction test/check → confirm failing when practical
|
|
82
|
-
3. Choose the current-session implementation depth:
|
|
83
|
-
- **Obvious tiny fix**: apply the minimal fix directly, then confirm reproduction passes + relevant regression tests pass
|
|
84
|
-
- **Planned current-session fix**: run `/prizmkit-plan` to create bug-focused `spec.md` + `plan.md`, then run `/prizmkit-implement` to execute that plan in the current workspace
|
|
85
|
-
4. Run `/prizmkit-code-review` for quality check
|
|
86
|
-
5. Run `/prizmkit-retrospective` only if the fix intentionally changes architecture or structural `.prizmkit/prizm-docs/`
|
|
87
|
-
6. Commit via `/prizmkit-committer` with `fix(<scope>):` prefix
|
|
88
|
-
7. Ask merge preference
|
|
89
|
-
|
|
90
|
-
**Fast Path still requires**: fix branch, root-cause-based fix, regression evidence, code review, commit through `/prizmkit-committer`, and user merge decision. When the current-session fix needs a written plan, Fast Path uses `/prizmkit-plan` and `/prizmkit-implement` instead of switching to the background pipeline.
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Pipeline Path
|
|
95
|
-
|
|
96
|
-
Pipeline Path is for complex or batch bug work.
|
|
97
|
-
|
|
98
|
-
### Pipeline Path Criteria (ANY is true)
|
|
99
|
-
|
|
100
|
-
- Multiple bugs need coordinated or batch execution
|
|
101
|
-
- Cross-module impact (>2 files or >1 module affected)
|
|
102
|
-
- Data model or public API changes required
|
|
103
|
-
- Root cause is uncertain or multi-layered
|
|
104
|
-
- Fix requires structural changes
|
|
105
|
-
- Multiple interrelated symptoms need dependency ordering
|
|
106
|
-
- User wants background autonomous fixing
|
|
107
|
-
|
|
108
|
-
### Pipeline Path Workflow
|
|
109
|
-
|
|
110
|
-
1. Planner handoff — invoke `bug-planner` with the bug evidence, diagnosis summary, and batch context
|
|
111
|
-
2. `bug-planner` writes/updates `.prizmkit/plans/bug-fix-list.json`
|
|
112
|
-
3. Launcher handoff — invoke `bugfix-pipeline-launcher` with the validated bug list
|
|
113
|
-
4. `bugfix-pipeline-launcher` handles execution mode and starts foreground/background pipeline execution
|
|
114
|
-
5. Monitor status/logs only after the launcher has started the pipeline
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## Execution
|
|
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` |
|
|
119
49
|
|
|
120
|
-
|
|
50
|
+
If no input source is clear, ask the user to describe the bug before proceeding.
|
|
121
51
|
|
|
122
|
-
|
|
52
|
+
## Route Selection
|
|
123
53
|
|
|
124
|
-
1
|
|
125
|
-
```bash
|
|
126
|
-
git branch --show-current
|
|
127
|
-
```
|
|
128
|
-
2. **If on `main` or a shared branch**: Create and switch to fix branch:
|
|
129
|
-
```bash
|
|
130
|
-
git checkout -b fix/<BUG_ID>-<short-description>
|
|
131
|
-
```
|
|
132
|
-
Example: `git checkout -b fix/B-001-login-null-crash`
|
|
133
|
-
3. **If already on a fix branch**: Confirm with user: "Continue on current branch `<branch-name>`, or create a new one?"
|
|
134
|
-
4. **Record the original branch name** for later merge.
|
|
54
|
+
### Step 1: Diagnose enough to choose a path
|
|
135
55
|
|
|
136
|
-
|
|
56
|
+
Do not create a branch or modify files before path selection.
|
|
137
57
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
**CRITICAL RULE**: Ask as many questions as needed until the bug is fully understood. Do NOT rush into code. A misdiagnosed bug leads to a wrong fix, which is worse than no fix.
|
|
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.
|
|
145
63
|
|
|
146
|
-
|
|
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.
|
|
147
65
|
|
|
148
|
-
|
|
149
|
-
- If raw error/stack trace: extract error message, affected files, line numbers
|
|
150
|
-
- If natural language description: start the deep-dive Q&A below
|
|
151
|
-
- If multiple bugs/logs are provided: keep batch context intact for possible Pipeline Path
|
|
66
|
+
### Step 2: Confirm bug understanding
|
|
152
67
|
|
|
153
|
-
|
|
68
|
+
Before asking for an execution path, summarize:
|
|
154
69
|
|
|
155
|
-
|
|
70
|
+
```markdown
|
|
71
|
+
## Bug Understanding
|
|
156
72
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
- Environment: [where it occurs]
|
|
166
|
-
- Expected: [correct behavior]
|
|
167
|
-
- Impact: [who/what is affected]
|
|
168
|
-
- Data trigger: [what data/state causes it]
|
|
73
|
+
- Symptom:
|
|
74
|
+
- Reproduction:
|
|
75
|
+
- Environment:
|
|
76
|
+
- Expected behavior:
|
|
77
|
+
- Actual behavior:
|
|
78
|
+
- Impact:
|
|
79
|
+
- Suspected affected area:
|
|
80
|
+
- Unknowns:
|
|
169
81
|
```
|
|
170
82
|
|
|
171
|
-
Ask the
|
|
83
|
+
Ask whether the summary is accurate. If key fields are still unknown, include `Continue diagnosis` as an approach option.
|
|
172
84
|
|
|
173
|
-
|
|
85
|
+
### Step 3: Ask for approach selection
|
|
174
86
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
#### Step 1.4: Complexity Assessment & Approach Selection
|
|
178
|
-
|
|
179
|
-
After confirming bug understanding, assess whether this belongs on Fast Path or Pipeline Path.
|
|
180
|
-
|
|
181
|
-
**Simple single bug → Fast Path candidate**: meets ALL Fast Path eligibility criteria above.
|
|
87
|
+
Use `AskUserQuestion`; do not render path options as plain text.
|
|
182
88
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
header: "Approach"
|
|
191
|
-
options:
|
|
192
|
-
- label: "Fix now (Fast Path — current session/current workspace)"
|
|
193
|
-
description: "Use the dedicated fix branch in this workspace, reproduce, fix, review, optionally sync docs if structural, and commit"
|
|
194
|
-
- label: "Use Pipeline Path (bug-planner → bugfix-pipeline-launcher)"
|
|
195
|
-
description: "Generate .prizmkit/plans/bug-fix-list.json with bug-planner, then launch autonomous execution with bugfix-pipeline-launcher"
|
|
196
|
-
- label: "Continue diagnosis"
|
|
197
|
-
description: "Ask more questions and inspect more context before choosing an approach"
|
|
89
|
+
```text
|
|
90
|
+
Question: How would you like to proceed?
|
|
91
|
+
Header: Approach
|
|
92
|
+
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
|
|
198
96
|
```
|
|
199
97
|
|
|
200
|
-
|
|
201
|
-
- **Use Pipeline Path** → Invoke `bug-planner` to create/update `.prizmkit/plans/bug-fix-list.json`, then invoke `bugfix-pipeline-launcher` to launch pipeline execution. After launch, monitor status/logs. End Fast Path phases.
|
|
202
|
-
- **Continue diagnosis** → Continue investigation before asking for approach selection again.
|
|
98
|
+
For an auto-discovered existing bug list:
|
|
203
99
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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
|
|
108
|
+
```
|
|
209
109
|
|
|
210
|
-
|
|
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`.
|
|
211
111
|
|
|
212
|
-
|
|
112
|
+
## Workflow Handoff Brief
|
|
213
113
|
|
|
214
|
-
|
|
215
|
-
2. **Locate affected code**: read the files mentioned in the error/stack trace or identified during diagnosis
|
|
216
|
-
3. **Check known issues**: search `.prizmkit/prizm-docs/` TRAPS sections for matching patterns
|
|
217
|
-
4. **If database-related**: read existing schema/model files to understand the data layer
|
|
218
|
-
```bash
|
|
219
|
-
find . -maxdepth 4 -type f \( -name "*.prisma" -o -name "*.sql" -o -path "*/migrations/*" -o -path "*/models/*" -o -name "schema.*" -o -name "*.entity.*" \) -not -path '*/node_modules/*' -not -path '*/.git/*' | head -20
|
|
220
|
-
```
|
|
221
|
-
5. **Classify**: root cause (confirmed/suspected), blast radius, fix complexity
|
|
222
|
-
6. **Present diagnosis to user**:
|
|
223
|
-
```
|
|
224
|
-
Bug: Login page crash on submit
|
|
225
|
-
Root Cause: AuthService.handleLogin() receives null token when API returns 401
|
|
226
|
-
Affected Files: src/services/auth.ts (L42), src/pages/login.tsx (L28)
|
|
227
|
-
Fix Complexity: Low (null check + error handling)
|
|
228
|
-
```
|
|
229
|
-
Ask: "Does this diagnosis look right? Should I proceed with the fix?"
|
|
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.
|
|
230
115
|
|
|
231
|
-
|
|
116
|
+
```markdown
|
|
117
|
+
## Workflow Handoff Brief
|
|
232
118
|
|
|
233
|
-
###
|
|
119
|
+
### Source
|
|
120
|
+
- workflow: bug-fix-workflow
|
|
121
|
+
- selected_path: fast_path | pipeline_path | existing_list_launch | continue_diagnosis
|
|
234
122
|
|
|
235
|
-
|
|
123
|
+
### Bug Goal
|
|
124
|
+
- original_request: <preserve the user's wording>
|
|
125
|
+
- normalized_bug_summary: <symptom, expected/actual, impact>
|
|
236
126
|
|
|
237
|
-
|
|
127
|
+
### Evidence
|
|
128
|
+
- reproduction: <known steps or failing test>
|
|
129
|
+
- error_output: <stack trace, logs, console output, or omitted>
|
|
130
|
+
- affected_paths: <files/modules/tests mentioned by user or discovered during diagnosis>
|
|
131
|
+
- environment: <runtime/browser/OS/data state if known>
|
|
238
132
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
133
|
+
### Scope
|
|
134
|
+
- included: <bug behavior to fix>
|
|
135
|
+
- excluded: <unrelated cleanup, refactor, feature work>
|
|
242
136
|
|
|
243
|
-
|
|
244
|
-
-
|
|
245
|
-
-
|
|
246
|
-
- Proceed to Phase 4 with the manual checklist
|
|
137
|
+
### Decision
|
|
138
|
+
- route_reason: <why this path was selected>
|
|
139
|
+
- user_confirmed: yes
|
|
247
140
|
|
|
248
|
-
|
|
141
|
+
### 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
|
+
```
|
|
249
145
|
|
|
250
|
-
|
|
146
|
+
## Fast Path — Single Bug Interactive Repair
|
|
251
147
|
|
|
252
|
-
|
|
148
|
+
Fast Path starts only after the user selects `Fix now`.
|
|
253
149
|
|
|
254
|
-
1
|
|
255
|
-
- Change the minimum amount of code to fix the root cause
|
|
256
|
-
- Do NOT refactor or add unrelated improvements — fix the bug only
|
|
257
|
-
- Follow existing code conventions (read from `.prizmkit/prizm-docs/` RULES/PATTERNS)
|
|
258
|
-
- If the fix involves database changes: read existing schema first, follow existing naming/constraint conventions
|
|
259
|
-
2. **Run the reproduction test/check** → must **pass** (green)
|
|
260
|
-
3. **Run the relevant module test suite** → must pass (no regressions)
|
|
261
|
-
4. **Show the fix to user**:
|
|
262
|
-
- Summary of changes made
|
|
263
|
-
- Test results (reproduction + regression)
|
|
264
|
-
- Ask: "Fix looks good? Any concerns?"
|
|
150
|
+
### Phase 1: Branch setup
|
|
265
151
|
|
|
266
|
-
|
|
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.
|
|
267
156
|
|
|
268
|
-
|
|
269
|
-
- Show which tests broke and why
|
|
270
|
-
- Revise the fix (max 3 attempts)
|
|
271
|
-
- If still failing after 3 attempts, ask whether to switch to Pipeline Path for structured autonomous fixing
|
|
157
|
+
This phase occurs after path selection so Pipeline Path users do not receive unnecessary workspace mutations.
|
|
272
158
|
|
|
273
|
-
### Phase
|
|
159
|
+
### Phase 2: Root-cause triage
|
|
274
160
|
|
|
275
|
-
|
|
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.
|
|
276
166
|
|
|
277
|
-
|
|
278
|
-
- Reviews git diff against the bug context (root cause, fix approach, affected areas)
|
|
279
|
-
- Checks: root cause addressed (not just symptom), edge cases covered, reproduction test thoroughness, project conventions
|
|
280
|
-
2. **If PASS**: Proceed to Phase 6
|
|
281
|
-
3. **If NEEDS_FIXES after max rounds**: Present unresolved findings to user, ask whether to proceed, revise, or switch to Pipeline Path
|
|
167
|
+
### Phase 3: Reproduce
|
|
282
168
|
|
|
283
|
-
|
|
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.
|
|
284
172
|
|
|
285
|
-
### Phase
|
|
173
|
+
### Phase 4: Fix
|
|
286
174
|
|
|
287
|
-
|
|
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.
|
|
288
180
|
|
|
289
|
-
|
|
290
|
-
- **(a) Run the app** — Start the dev server so you can manually test the fix scenario
|
|
291
|
-
- **(b) Run a specific command** — Specify a test or script to run
|
|
292
|
-
- **(c) Skip verification** — Proceed directly to commit (automated tests already pass)
|
|
293
|
-
2. **If (a)**: Detect and suggest dev server command, start it, wait for user confirmation: "Fix verified? (yes/no)"
|
|
294
|
-
3. **If (b)**: Run the specified command, show results, ask confirmation
|
|
295
|
-
4. **If (c)**: Proceed to Phase 7
|
|
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.
|
|
296
182
|
|
|
297
|
-
|
|
298
|
-
- Return to Phase 4 (max 2 more attempts)
|
|
299
|
-
- If still failing: ask whether to switch to Pipeline Path
|
|
183
|
+
### Phase 5: Review
|
|
300
184
|
|
|
301
|
-
|
|
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.
|
|
302
186
|
|
|
303
|
-
|
|
187
|
+
If review needs fixes, apply accepted fixes directly in the current workspace and rerun the review loop according to `/prizmkit-code-review` rules.
|
|
304
188
|
|
|
305
|
-
### Phase
|
|
306
|
-
|
|
307
|
-
**Goal**: Commit the fix and offer to merge back to the original branch.
|
|
308
|
-
|
|
309
|
-
1. **Run `/prizmkit-retrospective` only when structurally needed**:
|
|
310
|
-
- Skip for ordinary bug fixes with no architecture/doc structure change
|
|
311
|
-
- Run only if the fix changes durable architecture, module boundaries, public interfaces that should be reflected in `.prizmkit/prizm-docs/`, or the docs themselves
|
|
312
|
-
2. **Run `/prizmkit-committer`**:
|
|
313
|
-
- Commit message: `fix(<scope>): <description>`
|
|
314
|
-
- Include both fix code and reproduction test/check artifacts
|
|
315
|
-
- Do NOT push (user decides when to push)
|
|
316
|
-
- `/prizmkit-committer` is a pure commit tool — it does NOT modify `.prizmkit/prizm-docs/` or any project files
|
|
317
|
-
3. **Ask merge preference**:
|
|
318
|
-
```
|
|
319
|
-
Fix committed on branch `fix/<BUG_ID>-<short-desc>`.
|
|
320
|
-
What would you like to do?
|
|
321
|
-
(a) Merge to <original-branch> and delete fix branch
|
|
322
|
-
(b) Keep fix branch (for PR review workflow)
|
|
323
|
-
(c) Decide later
|
|
324
|
-
```
|
|
325
|
-
4. **If (a)**:
|
|
326
|
-
```bash
|
|
327
|
-
git checkout <original-branch>
|
|
328
|
-
git merge fix/<BUG_ID>-<short-description>
|
|
329
|
-
git branch -d fix/<BUG_ID>-<short-description>
|
|
330
|
-
```
|
|
331
|
-
5. **If (b)**: Inform user: "Branch `fix/<BUG_ID>-<short-desc>` retained. Create a PR when ready."
|
|
332
|
-
6. **If bug came from `.prizmkit/plans/bug-fix-list.json`**: inform user to update bug status or rerun the pipeline for remaining bugs.
|
|
333
|
-
|
|
334
|
-
**CHECKPOINT CP-BFW-7**: Fix committed and merge decision made.
|
|
189
|
+
### Phase 6: User verification
|
|
335
190
|
|
|
336
|
-
|
|
191
|
+
Use `AskUserQuestion` for the verification decision:
|
|
337
192
|
|
|
338
|
-
|
|
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
|
|
200
|
+
```
|
|
339
201
|
|
|
340
|
-
|
|
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.
|
|
341
203
|
|
|
342
|
-
|
|
343
|
-
|-----------|--------|
|
|
344
|
-
| "status" / "progress" | Show bugfix pipeline progress |
|
|
345
|
-
| "logs" | Show recent bugfix log activity |
|
|
346
|
-
| "stop" | Stop the bugfix pipeline (state preserved) |
|
|
347
|
-
| "show B-002 logs" | Show specific bug item's session log |
|
|
204
|
+
### Phase 7: Retrospective, commit, and merge decision
|
|
348
205
|
|
|
349
|
-
|
|
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:
|
|
350
209
|
|
|
351
|
-
|
|
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
|
+
```
|
|
352
218
|
|
|
353
|
-
|
|
219
|
+
Do not push unless the user explicitly asks.
|
|
354
220
|
|
|
355
|
-
|
|
221
|
+
## Pipeline Path
|
|
356
222
|
|
|
357
|
-
|
|
358
|
-
|-------------|-------------|
|
|
359
|
-
| Not on a `fix/<BUG_ID>-*` branch and Fast Path selected | Phase 0: Branch Setup |
|
|
360
|
-
| On `fix/<BUG_ID>-*` branch, no diagnosis done | Phase 1: Deep Bug Diagnosis |
|
|
361
|
-
| Reproduction test/check written, fix not yet green | Phase 4: Fix |
|
|
362
|
-
| Fix code + passing tests, not yet reviewed | Phase 5: Review |
|
|
363
|
-
| Review passed, not committed | Phase 6: User Verification |
|
|
364
|
-
| Committed on fix branch | Phase 7: Merge decision |
|
|
365
|
-
| `.prizmkit/plans/bug-fix-list.json` exists and Pipeline Path selected | `bugfix-pipeline-launcher` or pipeline monitoring |
|
|
223
|
+
Use Pipeline Path for multiple bugs, uncertain/broad root cause, structural fix planning, or background autonomous execution.
|
|
366
224
|
|
|
367
|
-
|
|
225
|
+
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.
|
|
229
|
+
5. If yes, invoke `bugfix-pipeline-launcher`.
|
|
368
230
|
|
|
369
|
-
|
|
231
|
+
Do not duplicate launcher execution-mode or configuration questions in this workflow; the launcher owns them.
|
|
370
232
|
|
|
371
|
-
##
|
|
233
|
+
## Existing List Operations
|
|
372
234
|
|
|
373
|
-
|
|
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.
|
|
374
236
|
|
|
375
|
-
|
|
376
|
-
- **Pipeline Path**: `.prizmkit/plans/bug-fix-list.json` from `bug-planner`, pipeline execution via `bugfix-pipeline-launcher`, monitoring updates, and pipeline-managed commits.
|
|
237
|
+
If the user wants to add, edit, deduplicate, or validate bugs, invoke `bug-planner`.
|
|
377
238
|
|
|
378
|
-
##
|
|
239
|
+
## Resume Guidance
|
|
379
240
|
|
|
380
|
-
|
|
|
381
|
-
|
|
382
|
-
|
|
|
383
|
-
|
|
|
384
|
-
|
|
|
385
|
-
|
|
|
386
|
-
|
|
|
387
|
-
|
|
|
388
|
-
| Best for | Simple bug needing immediate focused fix | Complex/batch bugs needing planner + launcher execution |
|
|
389
|
-
| Artifacts | Code + reproduction test/check + commit | `.prizmkit/plans/bug-fix-list.json` + pipeline-managed outputs |
|
|
390
|
-
| Retrospective | Skip unless structural docs/architecture changed | Pipeline items handle their own lifecycle rules |
|
|
391
|
-
| Commit prefix | `fix(<scope>):` | `fix(<scope>):` |
|
|
241
|
+
| State found | Action |
|
|
242
|
+
|---|---|
|
|
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` |
|
|
392
249
|
|
|
393
250
|
## Error Handling
|
|
394
251
|
|
|
395
|
-
|
|
|
396
|
-
|
|
397
|
-
| Bug
|
|
398
|
-
|
|
|
399
|
-
| Many bugs provided to Fast Path | Recommend Pipeline Path and
|
|
400
|
-
| Cannot reproduce
|
|
401
|
-
| Fix causes regressions |
|
|
402
|
-
| Root cause unclear
|
|
403
|
-
|
|
|
404
|
-
| Branch conflict during merge | Show conflict, ask user to resolve or keep branch |
|
|
252
|
+
| Situation | Action |
|
|
253
|
+
|---|---|
|
|
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 |
|
|
405
261
|
|
|
406
|
-
##
|
|
262
|
+
## Handoff Map
|
|
407
263
|
|
|
408
264
|
| From | To | Condition |
|
|
409
|
-
|
|
410
|
-
| `bug-
|
|
411
|
-
| `
|
|
412
|
-
|
|
|
413
|
-
|
|
|
414
|
-
|
|
|
415
|
-
|
|
|
416
|
-
| `bug-
|
|
417
|
-
| `bugfix-pipeline-launcher` | **this skill** | Launcher handoff completed and monitoring/status follow-up is needed |
|
|
265
|
+
|---|---|---|
|
|
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 |
|
|
418
273
|
|
|
419
274
|
## Output
|
|
420
275
|
|
|
421
|
-
-
|
|
422
|
-
-
|
|
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`.
|