prizmkit 1.1.106 → 1.1.108
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/bin/create-prizmkit.js +4 -0
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +81 -14
- package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +19 -8
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/launch_profiles.py +18 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +22 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +56 -5
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -8
- package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +11 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +298 -63
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +243 -37
- package/bundled/dev-pipeline/scripts/continuation.py +0 -5
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +10 -82
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +7 -64
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +40 -63
- package/bundled/dev-pipeline/scripts/utils.py +123 -0
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +4 -3
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +5 -6
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +36 -35
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +53 -80
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +43 -78
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +5 -17
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +6 -18
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +14 -48
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +7 -14
- package/bundled/dev-pipeline/templates/sections/feature-context.md +0 -4
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +0 -7
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +0 -7
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +0 -7
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +0 -14
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +0 -14
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +0 -7
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +0 -2
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +0 -7
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +6 -8
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +3 -7
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +4 -16
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +4 -17
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +0 -7
- package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +2 -9
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +1 -8
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +15 -16
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +3 -10
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +3 -10
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +2 -9
- package/bundled/dev-pipeline/templates/sections/phase0-init.md +0 -7
- package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +2 -15
- package/bundled/dev-pipeline/tests/conftest.py +0 -1
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +395 -21
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +50 -14
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +154 -2
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +431 -3
- package/bundled/dev-pipeline/tests/test_unified_cli.py +857 -5
- package/bundled/skills/_metadata.json +4 -4
- package/bundled/skills/app-planner/SKILL.md +1 -1
- package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
- package/bundled/skills/bug-fix-workflow/SKILL.md +174 -128
- package/bundled/skills/bug-planner/SKILL.md +101 -15
- package/bundled/skills/bug-planner/references/severity-rules.md +20 -8
- package/bundled/skills/feature-planner/SKILL.md +87 -8
- package/bundled/skills/feature-planner/assets/planning-guide.md +34 -10
- package/bundled/skills/feature-workflow/SKILL.md +100 -81
- package/bundled/skills/{prizm-kit → prizmkit}/SKILL.md +1 -1
- package/bundled/skills/prizmkit-code-review/SKILL.md +12 -13
- package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +10 -10
- package/bundled/skills/refactor-planner/SKILL.md +88 -7
- package/bundled/skills/refactor-planner/references/fast-path.md +2 -1
- package/bundled/skills/refactor-planner/references/planning-phases.md +29 -11
- package/bundled/skills/refactor-workflow/SKILL.md +116 -57
- package/bundled/templates/project-memory-template.md +1 -1
- package/package.json +1 -1
- package/src/ai-cli-launch.js +194 -0
- package/src/config.js +26 -14
- package/src/index.js +11 -44
- package/src/platforms.js +10 -3
- package/src/prompts.js +60 -2
- package/src/scaffold.js +26 -14
- package/bundled/dev-pipeline/scripts/prizmkit-test-gate.py +0 -446
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +0 -7
- package/bundled/dev-pipeline/templates/agent-prompts/dev-resume.md +0 -5
- package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +0 -20
- package/bundled/dev-pipeline/tests/test_prizmkit_test_gate.py +0 -107
- package/bundled/skills/prizmkit-code-review/references/dev-agent-prompt.md +0 -30
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.
|
|
2
|
+
"version": "1.1.108",
|
|
3
3
|
"skills": {
|
|
4
|
-
"
|
|
4
|
+
"prizmkit": {
|
|
5
5
|
"description": "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management.",
|
|
6
6
|
"tier": "foundation",
|
|
7
7
|
"category": "prizmkit-skill",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"core": {
|
|
165
165
|
"description": "All skills: full spec-driven cycle + orchestration + planning + recovery",
|
|
166
166
|
"skills": [
|
|
167
|
-
"
|
|
167
|
+
"prizmkit",
|
|
168
168
|
"prizmkit-init",
|
|
169
169
|
"prizmkit-prizm-docs",
|
|
170
170
|
"prizmkit-plan",
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"minimal": {
|
|
191
191
|
"description": "Minimal closed-loop workflow: full spec-driven cycle with .prizmkit/prizm-docs/ architecture sync and code review",
|
|
192
192
|
"skills": [
|
|
193
|
-
"
|
|
193
|
+
"prizmkit",
|
|
194
194
|
"prizmkit-init",
|
|
195
195
|
"prizmkit-prizm-docs",
|
|
196
196
|
"prizmkit-plan",
|
|
@@ -46,7 +46,7 @@ If you believe the task is better suited for a different workflow, you MUST:
|
|
|
46
46
|
- Claude Code → `CLAUDE.md`
|
|
47
47
|
- CodeBuddy → `CODEBUDDY.md`
|
|
48
48
|
- `all` → all three files.
|
|
49
|
-
- Only when the manifest is missing, fall back to installed PrizmKit-owned platform files such as `.codex/agents/*.toml`, `.claude/commands/
|
|
49
|
+
- Only when the manifest is missing, fall back to installed PrizmKit-owned platform files such as `.codex/agents/*.toml`, `.claude/commands/prizmkit.md`, or `.codebuddy/skills/prizmkit/SKILL.md`. Do not treat a generic `.agents/` directory as Codex.
|
|
50
50
|
|
|
51
51
|
**After planning is complete**, you MUST:
|
|
52
52
|
1. Present the summary of captured project-level context (vision, conventions, architecture decisions, project brief)
|
|
@@ -30,7 +30,7 @@ After Phase 2 (Confirm constraints and tech assumptions), before Phase 3 (Captur
|
|
|
30
30
|
- `claude` → append to `CLAUDE.md`
|
|
31
31
|
- `codebuddy` → append to `CODEBUDDY.md`
|
|
32
32
|
- `all` → append to all three files. Legacy manifests may contain `both`; treat it as read-only compatibility and append to `CLAUDE.md` and `CODEBUDDY.md` only when encountered.
|
|
33
|
-
- Only when the manifest is missing, fall back to PrizmKit-owned install artifacts: `.codex/agents/*.toml`, `.claude/commands/
|
|
33
|
+
- Only when the manifest is missing, fall back to PrizmKit-owned install artifacts: `.codex/agents/*.toml`, `.claude/commands/prizmkit.md`, `.codebuddy/skills/prizmkit/SKILL.md`.
|
|
34
34
|
- Do not treat a generic `.agents/` directory as Codex; it may contain unrelated third-party skills.
|
|
35
35
|
- If no platform can be determined, skip (no project instruction file).
|
|
36
36
|
|
|
@@ -1,23 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "bug-fix-workflow"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Triage-based bug-fix workflow. Clarifies and diagnoses bug reports, then lets the user choose Fast Path for a simple single-bug fix in the current session/current workspace or Pipeline Path for complex/batch bugs via bug-planner → bugfix-pipeline-launcher. Preserves bug-specific rules: ordinary bug fixes skip retrospective unless structural docs change. Trigger on: 'fix this bug', 'debug this', 'fix B-001', 'help me fix', 'interactive fix', 'manually fix bug', 'batch bug fix'."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Bug Fix Workflow
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Triage-based entry point for bug fixing. The workflow clarifies the bug, assesses difficulty, asks the user to choose an approach, then follows one of two paths:
|
|
9
|
+
|
|
10
|
+
- **Fast Path** — a simple single-bug fix is implemented interactively in the **current session** and **current workspace**.
|
|
11
|
+
- **Pipeline Path** — complex or batch bug work is planned with `bug-planner`, launched with `bugfix-pipeline-launcher`, then monitored.
|
|
12
|
+
|
|
13
|
+
Bug fixes are incomplete features, so ordinary bug fixes do **not** run `/prizmkit-retrospective`. Run `/prizmkit-retrospective` only when the fix intentionally changes architecture or structural `.prizmkit/prizm-docs/` content.
|
|
9
14
|
|
|
10
15
|
## When to Use
|
|
11
16
|
|
|
12
17
|
- User wants to fix **one specific bug** right now, with full visibility
|
|
13
18
|
- User has a stack trace or error and wants interactive debugging
|
|
14
|
-
- User
|
|
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
|
|
15
21
|
|
|
16
22
|
**Do NOT use when:**
|
|
17
|
-
- User
|
|
18
|
-
- User wants to
|
|
19
|
-
- User wants background autonomous fixing → `bugfix-pipeline-launcher`
|
|
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`
|
|
20
25
|
- User wants to build features → `feature-workflow`
|
|
26
|
+
- User wants to refactor code → `refactor-workflow`
|
|
27
|
+
|
|
28
|
+
## Overview
|
|
29
|
+
|
|
30
|
+
The shared contract is:
|
|
31
|
+
|
|
32
|
+
1. **Diagnose** — understand the bug through evidence, Q&A, reproduction context, and relevant code/docs.
|
|
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.
|
|
38
|
+
|
|
39
|
+
### Terminology
|
|
40
|
+
|
|
41
|
+
| Term | Meaning |
|
|
42
|
+
|------|---------|
|
|
43
|
+
| **Fast Path** | Current-session/current-workspace fix for a simple single bug. It does not start the bugfix pipeline. |
|
|
44
|
+
| **Pipeline Path** | Complex or batch bug execution. Planner handoff goes to `bug-planner`; launcher handoff goes to `bugfix-pipeline-launcher`; monitoring follows only after launch. |
|
|
45
|
+
| **Current session** | The interactive AI CLI session that is already diagnosing the bug with the user. |
|
|
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. |
|
|
21
48
|
|
|
22
49
|
## Input
|
|
23
50
|
|
|
@@ -29,38 +56,70 @@ Fix a single bug interactively within the current AI CLI session. This is the in
|
|
|
29
56
|
| Stack trace / error message | User pastes error directly | `TypeError: Cannot read property...` |
|
|
30
57
|
| Natural language description | User describes the problem | "login page crashes on submit" |
|
|
31
58
|
| Failed test | User references a failing test file | `src/auth/__tests__/login.test.ts` |
|
|
59
|
+
| Batch or complex bug set | User provides many bugs, failing logs, or interrelated symptoms | "These 7 tests fail after the upgrade" |
|
|
32
60
|
|
|
33
61
|
At least one input source must be provided. If none is clear, ask the user to describe the bug.
|
|
34
62
|
|
|
63
|
+
---
|
|
64
|
+
|
|
35
65
|
## Fast Path
|
|
36
66
|
|
|
37
|
-
|
|
67
|
+
Fast Path is for a simple single bug fixed interactively in the current session/current workspace.
|
|
38
68
|
|
|
39
69
|
### Eligibility Criteria (ALL must be true)
|
|
40
|
-
|
|
41
|
-
-
|
|
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)
|
|
42
74
|
- No cross-module impact
|
|
43
|
-
-
|
|
44
|
-
-
|
|
75
|
+
- No data model or public API changes
|
|
76
|
+
- Existing tests cover the affected path, or a focused reproduction test can be added quickly
|
|
45
77
|
|
|
46
78
|
### Fast Path Workflow
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
|
50
85
|
4. Run `/prizmkit-code-review` for quality check
|
|
51
|
-
5.
|
|
52
|
-
6. Commit with `fix(<scope>):` prefix
|
|
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
|
|
53
88
|
7. Ask merge preference
|
|
54
89
|
|
|
55
|
-
**Fast Path still requires**: fix branch,
|
|
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
|
|
56
115
|
|
|
57
116
|
---
|
|
58
117
|
|
|
59
118
|
## Execution
|
|
60
119
|
|
|
61
|
-
### Phase 0: Branch Setup
|
|
120
|
+
### Phase 0: Branch Setup — Fast Path Only
|
|
62
121
|
|
|
63
|
-
**Goal**: Create an isolated working branch
|
|
122
|
+
**Goal**: Create an isolated working branch while staying in the current workspace.
|
|
64
123
|
|
|
65
124
|
1. **Check current branch**:
|
|
66
125
|
```bash
|
|
@@ -74,7 +133,7 @@ For trivial bugs with clear root cause and minimal scope:
|
|
|
74
133
|
3. **If already on a fix branch**: Confirm with user: "Continue on current branch `<branch-name>`, or create a new one?"
|
|
75
134
|
4. **Record the original branch name** for later merge.
|
|
76
135
|
|
|
77
|
-
**CHECKPOINT CP-BFW-0**: On a dedicated fix branch, not main/shared branch.
|
|
136
|
+
**CHECKPOINT CP-BFW-0**: On a dedicated fix branch in the current workspace, not main/shared branch.
|
|
78
137
|
|
|
79
138
|
---
|
|
80
139
|
|
|
@@ -82,8 +141,6 @@ For trivial bugs with clear root cause and minimal scope:
|
|
|
82
141
|
|
|
83
142
|
**Goal**: Fully understand the bug before touching any code. Vague bug reports lead to incorrect fixes that mask the real issue or introduce new bugs.
|
|
84
143
|
|
|
85
|
-
**Fast Path Decision Point**: After initial information gathering (Step 1.1), evaluate the Fast Path Eligibility Criteria in Step 1.4. If ALL simple bug criteria are met, use `AskUserQuestion` to let the user choose the execution approach. Only proceed with fast path implementation if the user explicitly selects "Fix now". Never guess the user's intent from text — always present the interactive selection.
|
|
86
|
-
|
|
87
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.
|
|
88
145
|
|
|
89
146
|
#### Step 1.1: Initial Bug Information Gathering
|
|
@@ -91,6 +148,7 @@ For trivial bugs with clear root cause and minimal scope:
|
|
|
91
148
|
- If bug ID given (e.g. B-001): read entry from `.prizmkit/plans/bug-fix-list.json` — but DO NOT assume the description is complete
|
|
92
149
|
- If raw error/stack trace: extract error message, affected files, line numbers
|
|
93
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
|
|
94
152
|
|
|
95
153
|
#### Step 1.2: Systematic Bug Clarification
|
|
96
154
|
|
|
@@ -116,64 +174,38 @@ Ask the user: "Is this summary accurate? Any details to add?"
|
|
|
116
174
|
|
|
117
175
|
---
|
|
118
176
|
|
|
119
|
-
#### Step 1.4: Complexity Assessment
|
|
177
|
+
#### Step 1.4: Complexity Assessment & Approach Selection
|
|
120
178
|
|
|
121
|
-
After confirming bug understanding, assess whether this
|
|
179
|
+
After confirming bug understanding, assess whether this belongs on Fast Path or Pipeline Path.
|
|
122
180
|
|
|
123
|
-
**Simple bug → Fast Path candidate**: meets ALL
|
|
181
|
+
**Simple single bug → Fast Path candidate**: meets ALL Fast Path eligibility criteria above.
|
|
124
182
|
|
|
125
|
-
**
|
|
183
|
+
**Complex or batch bug work → Pipeline Path candidate**: meets ANY Pipeline Path criteria above.
|
|
126
184
|
|
|
127
|
-
|
|
128
|
-
AskUserQuestion:
|
|
129
|
-
question: "This bug appears straightforward. How would you like to proceed?"
|
|
130
|
-
header: "Approach"
|
|
131
|
-
options:
|
|
132
|
-
- label: "Fix now (fast path)"
|
|
133
|
-
description: "Implement the fix directly in this session — branch → test → fix → review → commit"
|
|
134
|
-
- label: "Add to bug-fix-list.json (pipeline)"
|
|
135
|
-
description: "Add this bug to .prizmkit/plans/bug-fix-list.json via bug-planner, then use bugfix-pipeline-launcher to launch autonomous pipeline execution"
|
|
136
|
-
- label: "Full diagnosis"
|
|
137
|
-
description: "Continue with in-depth analysis before deciding"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
- **Fix now** → Proceed with Fast Path Workflow (Phase 0 branch already set up)
|
|
141
|
-
- **Add to bug-fix-list.json** → Invoke `bug-planner` to add this bug to `.prizmkit/plans/bug-fix-list.json`, then suggest user run `bugfix-pipeline-launcher` to start the pipeline. End this workflow.
|
|
142
|
-
- **Full diagnosis** → Continue with full diagnosis (Phase 2 Triage)
|
|
143
|
-
|
|
144
|
-
**Complex bug → Planning Path** (ANY is true):
|
|
145
|
-
- Cross-module impact (>2 files affected)
|
|
146
|
-
- Data model or API changes required
|
|
147
|
-
- Root cause is uncertain or multi-layered
|
|
148
|
-
- Fix requires structural changes
|
|
149
|
-
- Multiple interrelated symptoms
|
|
150
|
-
|
|
151
|
-
**User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options:
|
|
185
|
+
**User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options. Tailor the question text to the assessment, but keep the path names and handoffs explicit.
|
|
152
186
|
|
|
153
187
|
```
|
|
154
188
|
AskUserQuestion:
|
|
155
|
-
question: "
|
|
189
|
+
question: "How would you like to proceed?"
|
|
156
190
|
header: "Approach"
|
|
157
191
|
options:
|
|
158
|
-
- label: "
|
|
159
|
-
description: "
|
|
160
|
-
- label: "
|
|
161
|
-
description: "
|
|
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"
|
|
162
198
|
```
|
|
163
199
|
|
|
164
|
-
- **
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
3. Run `/prizmkit-code-review` for quality check
|
|
168
|
-
4. Commit via `/prizmkit-committer` with `fix(<scope>):` prefix
|
|
169
|
-
5. **End workflow** — skip Phase 2-7. No `/prizmkit-retrospective` (bug fixes are incomplete features, not new architecture)
|
|
170
|
-
- **Add to bug-fix-list.json** → Invoke `bug-planner` to add this bug to `.prizmkit/plans/bug-fix-list.json`, then suggest user run `bugfix-pipeline-launcher` to start the pipeline. End this workflow.
|
|
200
|
+
- **Fix now (Fast Path)** → Continue to Phase 2 Triage, then Phase 3-7.
|
|
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.
|
|
171
203
|
|
|
172
204
|
**NEVER proceed with direct code changes without explicit user confirmation via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
|
|
173
205
|
|
|
174
206
|
---
|
|
175
207
|
|
|
176
|
-
### Phase 2: Triage
|
|
208
|
+
### Phase 2: Triage — Fast Path Only
|
|
177
209
|
|
|
178
210
|
**Goal**: Locate affected code, identify root cause, classify severity.
|
|
179
211
|
|
|
@@ -198,26 +230,24 @@ AskUserQuestion:
|
|
|
198
230
|
|
|
199
231
|
**CHECKPOINT CP-BFW-2**: Root cause identified and diagnosis confirmed by user.
|
|
200
232
|
|
|
201
|
-
### Phase 3: Reproduce
|
|
233
|
+
### Phase 3: Reproduce — Fast Path Only
|
|
202
234
|
|
|
203
|
-
**Goal**: Create a failing test that proves the bug exists.
|
|
235
|
+
**Goal**: Create a failing test or reproduction check that proves the bug exists.
|
|
204
236
|
|
|
205
|
-
> **Reproduce**: For API bugs: generate curl/HTTP request sequence with assertions. For UI bugs: generate step-by-step interaction guide. For logic bugs: generate unit test (arrange/act/assert). For data bugs: generate seed data + query sequence. The reproduction must FAIL with current behavior and be designed to PASS after the fix is applied
|
|
237
|
+
> **Reproduce**: For API bugs: generate curl/HTTP request sequence with assertions. For UI bugs: generate step-by-step interaction guide. For logic bugs: generate unit test (arrange/act/assert). For data bugs: generate seed data + query sequence. The reproduction must FAIL with current behavior and be designed to PASS after the fix is applied.
|
|
206
238
|
|
|
207
|
-
1. **Write a reproduction test** that demonstrates the bug
|
|
208
|
-
|
|
209
|
-
- The test captures the exact failure condition
|
|
210
|
-
2. **Run the test** → confirm it **fails** (red)
|
|
239
|
+
1. **Write a reproduction test/check** that demonstrates the bug.
|
|
240
|
+
2. **Run the test/check** → confirm it **fails** when practical.
|
|
211
241
|
3. **Show result to user**: "Reproduction test written and confirmed failing."
|
|
212
242
|
|
|
213
|
-
If the bug is hard to reproduce automatically
|
|
243
|
+
If the bug is hard to reproduce automatically:
|
|
214
244
|
- Ask the user for reproduction steps
|
|
215
245
|
- Write a manual reproduction checklist instead
|
|
216
246
|
- Proceed to Phase 4 with the manual checklist
|
|
217
247
|
|
|
218
|
-
**CHECKPOINT CP-BFW-3**: Bug reproduction test written and confirmed failing.
|
|
248
|
+
**CHECKPOINT CP-BFW-3**: Bug reproduction test/check written and confirmed failing, or manual checklist recorded.
|
|
219
249
|
|
|
220
|
-
### Phase 4: Fix
|
|
250
|
+
### Phase 4: Fix — Fast Path Only
|
|
221
251
|
|
|
222
252
|
**Goal**: Implement the minimal fix. Red test → green.
|
|
223
253
|
|
|
@@ -226,64 +256,65 @@ If the bug is hard to reproduce automatically (e.g. environment-specific):
|
|
|
226
256
|
- Do NOT refactor or add unrelated improvements — fix the bug only
|
|
227
257
|
- Follow existing code conventions (read from `.prizmkit/prizm-docs/` RULES/PATTERNS)
|
|
228
258
|
- If the fix involves database changes: read existing schema first, follow existing naming/constraint conventions
|
|
229
|
-
2. **Run the reproduction test** → must **pass** (green)
|
|
230
|
-
3. **Run the
|
|
259
|
+
2. **Run the reproduction test/check** → must **pass** (green)
|
|
260
|
+
3. **Run the relevant module test suite** → must pass (no regressions)
|
|
231
261
|
4. **Show the fix to user**:
|
|
232
262
|
- Summary of changes made
|
|
233
263
|
- Test results (reproduction + regression)
|
|
234
264
|
- Ask: "Fix looks good? Any concerns?"
|
|
235
265
|
|
|
236
|
-
**CHECKPOINT CP-BFW-4**: Fix implemented and
|
|
266
|
+
**CHECKPOINT CP-BFW-4**: Fix implemented and relevant tests passing.
|
|
237
267
|
|
|
238
268
|
If the fix causes test regressions:
|
|
239
269
|
- Show which tests broke and why
|
|
240
270
|
- Revise the fix (max 3 attempts)
|
|
241
|
-
- If still failing after 3 attempts,
|
|
271
|
+
- If still failing after 3 attempts, ask whether to switch to Pipeline Path for structured autonomous fixing
|
|
242
272
|
|
|
243
|
-
### Phase 5: Review
|
|
273
|
+
### Phase 5: Review — Fast Path Only
|
|
244
274
|
|
|
245
275
|
**Goal**: Verify fix quality before committing.
|
|
246
276
|
|
|
247
277
|
1. **Run `/prizmkit-code-review`** to review the fix:
|
|
248
278
|
- Reviews git diff against the bug context (root cause, fix approach, affected areas)
|
|
249
|
-
- Iterative Reviewer Agent + Dev Agent loop (max 3 rounds)
|
|
250
279
|
- Checks: root cause addressed (not just symptom), edge cases covered, reproduction test thoroughness, project conventions
|
|
251
280
|
2. **If PASS**: Proceed to Phase 6
|
|
252
|
-
3. **If NEEDS_FIXES after max rounds**: Present unresolved findings to user, ask whether to proceed or
|
|
281
|
+
3. **If NEEDS_FIXES after max rounds**: Present unresolved findings to user, ask whether to proceed, revise, or switch to Pipeline Path
|
|
253
282
|
|
|
254
283
|
**CHECKPOINT CP-BFW-5**: Code review completed and quality verified.
|
|
255
284
|
|
|
256
|
-
### Phase 6: User Verification
|
|
285
|
+
### Phase 6: User Verification — Fast Path Only
|
|
257
286
|
|
|
258
287
|
**Goal**: Let the user verify the fix works as expected before committing.
|
|
259
288
|
|
|
260
|
-
1. **Ask user**: "Fix passes
|
|
289
|
+
1. **Ask user**: "Fix passes tests. Would you like to verify before committing?"
|
|
261
290
|
- **(a) Run the app** — Start the dev server so you can manually test the fix scenario
|
|
262
291
|
- **(b) Run a specific command** — Specify a test or script to run
|
|
263
292
|
- **(c) Skip verification** — Proceed directly to commit (automated tests already pass)
|
|
264
|
-
2. **If (a)**: Detect and suggest dev server command
|
|
293
|
+
2. **If (a)**: Detect and suggest dev server command, start it, wait for user confirmation: "Fix verified? (yes/no)"
|
|
265
294
|
3. **If (b)**: Run the specified command, show results, ask confirmation
|
|
266
295
|
4. **If (c)**: Proceed to Phase 7
|
|
267
296
|
|
|
268
297
|
If user reports the fix is NOT working:
|
|
269
298
|
- Return to Phase 4 (max 2 more attempts)
|
|
270
|
-
- If still failing:
|
|
299
|
+
- If still failing: ask whether to switch to Pipeline Path
|
|
271
300
|
|
|
272
|
-
**CHECKPOINT CP-BFW-6**: Fix manually verified by user
|
|
301
|
+
**CHECKPOINT CP-BFW-6**: Fix manually verified by user or verification explicitly skipped.
|
|
273
302
|
|
|
274
303
|
---
|
|
275
304
|
|
|
276
|
-
### Phase 7: Commit & Merge
|
|
305
|
+
### Phase 7: Retrospective, Commit & Merge — Fast Path Only
|
|
277
306
|
|
|
278
307
|
**Goal**: Commit the fix and offer to merge back to the original branch.
|
|
279
308
|
|
|
280
|
-
1. **Run `/prizmkit-
|
|
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`**:
|
|
281
313
|
- Commit message: `fix(<scope>): <description>`
|
|
282
|
-
- Include both fix code and reproduction test
|
|
314
|
+
- Include both fix code and reproduction test/check artifacts
|
|
283
315
|
- Do NOT push (user decides when to push)
|
|
284
316
|
- `/prizmkit-committer` is a pure commit tool — it does NOT modify `.prizmkit/prizm-docs/` or any project files
|
|
285
|
-
|
|
286
|
-
2. **Ask merge preference**:
|
|
317
|
+
3. **Ask merge preference**:
|
|
287
318
|
```
|
|
288
319
|
Fix committed on branch `fix/<BUG_ID>-<short-desc>`.
|
|
289
320
|
What would you like to do?
|
|
@@ -291,72 +322,84 @@ If user reports the fix is NOT working:
|
|
|
291
322
|
(b) Keep fix branch (for PR review workflow)
|
|
292
323
|
(c) Decide later
|
|
293
324
|
```
|
|
294
|
-
|
|
325
|
+
4. **If (a)**:
|
|
295
326
|
```bash
|
|
296
327
|
git checkout <original-branch>
|
|
297
328
|
git merge fix/<BUG_ID>-<short-description>
|
|
298
329
|
git branch -d fix/<BUG_ID>-<short-description>
|
|
299
330
|
```
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
```
|
|
303
|
-
Bug B-001 fixed and committed.
|
|
304
|
-
To update the bug list: manually set B-001 status to "fixed" in .prizmkit/plans/bug-fix-list.json
|
|
305
|
-
Or retry the pipeline to pick up remaining bugs.
|
|
306
|
-
```
|
|
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.
|
|
307
333
|
|
|
308
334
|
**CHECKPOINT CP-BFW-7**: Fix committed and merge decision made.
|
|
309
335
|
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Monitor — Pipeline Path Only
|
|
339
|
+
|
|
340
|
+
After `bugfix-pipeline-launcher` starts the pipeline, monitor status/logs when the user asks. Monitoring applies only after `bugfix-pipeline-launcher` has started a pipeline.
|
|
341
|
+
|
|
342
|
+
| User says | Action |
|
|
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 |
|
|
348
|
+
|
|
349
|
+
Use the Python runtime command surface exposed by `bugfix-pipeline-launcher`; do not use retired platform-specific wrappers.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
310
353
|
## Resume — Interruption Recovery
|
|
311
354
|
|
|
312
355
|
The workflow supports resuming from the last completed phase by detecting existing artifacts.
|
|
313
356
|
|
|
314
|
-
**Detection logic**: Resume from git branch state plus, for the complex "Plan and fix now" path, the planning docs under `.prizmkit/bugfix/<BUG_ID>/`:
|
|
315
|
-
|
|
316
357
|
| State Found | Resume From |
|
|
317
|
-
|
|
318
|
-
| Not on a `fix/<BUG_ID>-*` branch | Phase 0: Branch Setup |
|
|
358
|
+
|-------------|-------------|
|
|
359
|
+
| Not on a `fix/<BUG_ID>-*` branch and Fast Path selected | Phase 0: Branch Setup |
|
|
319
360
|
| On `fix/<BUG_ID>-*` branch, no diagnosis done | Phase 1: Deep Bug Diagnosis |
|
|
320
|
-
|
|
|
321
|
-
| Reproduction test written, fix not yet green | Phase 4: Fix |
|
|
361
|
+
| Reproduction test/check written, fix not yet green | Phase 4: Fix |
|
|
322
362
|
| Fix code + passing tests, not yet reviewed | Phase 5: Review |
|
|
323
363
|
| Review passed, not committed | Phase 6: User Verification |
|
|
324
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 |
|
|
325
366
|
|
|
326
|
-
**Resume**: If
|
|
367
|
+
**Resume**: If both Fast Path branch state and pipeline list state exist, ask whether to continue the current-workspace Fast Path or resume Pipeline Path monitoring.
|
|
327
368
|
|
|
328
369
|
---
|
|
329
370
|
|
|
330
371
|
## Artifacts
|
|
331
372
|
|
|
332
|
-
This workflow favors code + tests over documents
|
|
373
|
+
This workflow favors code + tests over documents. What gets produced depends on the selected path:
|
|
333
374
|
|
|
334
|
-
- **Fast
|
|
335
|
-
- **
|
|
375
|
+
- **Fast Path**: fix code, reproduction test/check, optional structural `.prizmkit/prizm-docs/` update only when needed, and one `fix(<scope>):` commit from `/prizmkit-committer` on the dedicated fix branch.
|
|
376
|
+
- **Pipeline Path**: `.prizmkit/plans/bug-fix-list.json` from `bug-planner`, pipeline execution via `bugfix-pipeline-launcher`, monitoring updates, and pipeline-managed commits.
|
|
336
377
|
|
|
337
378
|
## Comparison with Pipeline Bug Fix
|
|
338
379
|
|
|
339
|
-
| Dimension |
|
|
340
|
-
|
|
341
|
-
| Scope | One bug
|
|
342
|
-
| Execution | Interactive,
|
|
343
|
-
| Diagnosis | Deep interactive Q&A with user | Automated from bug
|
|
344
|
-
| Branch |
|
|
380
|
+
| Dimension | Fast Path in this skill | Pipeline Path (`bug-planner` → `bugfix-pipeline-launcher`) |
|
|
381
|
+
|-----------|-------------------------|-------------------------------------------------------------|
|
|
382
|
+
| Scope | One simple bug | Complex single bug or many bugs in batch |
|
|
383
|
+
| Execution | Interactive, current session/current workspace | Foreground or background pipeline |
|
|
384
|
+
| Diagnosis | Deep interactive Q&A with user | Automated from bug descriptions and planner output |
|
|
385
|
+
| Branch | Dedicated `fix/<BUG_ID>-*` branch in current workspace | Pipeline manages per-item branches/worktrees |
|
|
345
386
|
| Visibility | Full user interaction at each phase | Async, check status periodically |
|
|
346
|
-
| User verification | Yes
|
|
347
|
-
| Best for |
|
|
348
|
-
| Artifacts | Code + test
|
|
387
|
+
| User verification | Yes before commit | No by default; automated checks per item |
|
|
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 |
|
|
349
391
|
| Commit prefix | `fix(<scope>):` | `fix(<scope>):` |
|
|
350
392
|
|
|
351
393
|
## Error Handling
|
|
352
394
|
|
|
353
395
|
| Scenario | Action |
|
|
354
396
|
|----------|--------|
|
|
355
|
-
| Bug ID not found in
|
|
397
|
+
| Bug ID not found in `.prizmkit/plans/bug-fix-list.json` | Ask user to provide bug details directly |
|
|
356
398
|
| User's bug description is too vague | Ask systematic clarification questions (Phase 1) |
|
|
399
|
+
| Many bugs provided to Fast Path | Recommend Pipeline Path and hand off to `bug-planner` → `bugfix-pipeline-launcher` after AskUserQuestion |
|
|
357
400
|
| Cannot reproduce the bug | Ask for more context, try alternative reproduction |
|
|
358
|
-
| Fix causes regressions | Revert, analyze, retry (max 3 rounds) |
|
|
359
|
-
| Root cause unclear after investigation | Present findings
|
|
401
|
+
| Fix causes regressions | Revert, analyze, retry (max 3 rounds), then consider Pipeline Path |
|
|
402
|
+
| Root cause unclear after investigation | Present findings and ask whether to continue diagnosis or use Pipeline Path |
|
|
360
403
|
| Affected files are in unfamiliar module | Read `.prizmkit/prizm-docs/` L1/L2 for that module first |
|
|
361
404
|
| Branch conflict during merge | Show conflict, ask user to resolve or keep branch |
|
|
362
405
|
|
|
@@ -364,13 +407,16 @@ This workflow favors code + tests over documents — a bug fix is an incomplete
|
|
|
364
407
|
|
|
365
408
|
| From | To | Condition |
|
|
366
409
|
|------|----|-----------|
|
|
367
|
-
| `bug-planner` | **this skill** | User picks one bug to fix interactively |
|
|
368
|
-
| `bugfix-pipeline-launcher` | **this skill** | User wants to
|
|
369
|
-
| **this skill** |
|
|
370
|
-
| **this skill** |
|
|
410
|
+
| `bug-planner` | **this skill** | User picks one planned bug to inspect or fix interactively |
|
|
411
|
+
| `bugfix-pipeline-launcher` | **this skill** | User wants to manually diagnose a stuck pipeline bug |
|
|
412
|
+
| **this skill** | `/prizmkit-code-review` | Fast Path fix is implemented in the current workspace |
|
|
413
|
+
| **this skill** | `/prizmkit-retrospective` | Fast Path bug fix changed durable architecture/docs and structural sync is needed |
|
|
414
|
+
| **this skill** | `/prizmkit-committer` | Fast Path fix is reviewed and ready to commit |
|
|
415
|
+
| **this skill** | `bug-planner` | User selects Pipeline Path for complex or batch bug work |
|
|
416
|
+
| `bug-planner` | `bugfix-pipeline-launcher` | Planner handoff produced validated `.prizmkit/plans/bug-fix-list.json` |
|
|
417
|
+
| `bugfix-pipeline-launcher` | **this skill** | Launcher handoff completed and monitoring/status follow-up is needed |
|
|
371
418
|
|
|
372
419
|
## Output
|
|
373
420
|
|
|
374
|
-
-
|
|
375
|
-
-
|
|
376
|
-
- Git commit with `fix(<scope>):` prefix on dedicated fix branch
|
|
421
|
+
- **Fast Path**: fixed code with reproduction test/check, optional structural doc sync only when warranted, and a git commit with `fix(<scope>):` prefix on a dedicated fix branch.
|
|
422
|
+
- **Pipeline Path**: `.prizmkit/plans/bug-fix-list.json`, bugfix pipeline execution, monitoring updates, and pipeline-managed fix commits.
|