prizmkit 1.0.122 → 1.0.124
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-critic.md +177 -0
- package/bundled/dev-pipeline/README.md +7 -6
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +3 -2
- package/bundled/dev-pipeline/launch-daemon.sh +21 -6
- package/bundled/dev-pipeline/retry-feature.sh +19 -9
- package/bundled/dev-pipeline/run.sh +30 -54
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +70 -31
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +13 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +95 -17
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +96 -75
- package/bundled/dev-pipeline/templates/feature-list-schema.json +10 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +17 -13
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +8 -4
- package/bundled/skills/app-planner/assets/evaluation-guide.md +2 -2
- package/bundled/skills/app-planner/scripts/validate-and-generate.py +12 -0
- package/bundled/skills/bug-fix-workflow/SKILL.md +94 -26
- package/bundled/skills/dev-pipeline-launcher/SKILL.md +17 -7
- package/bundled/skills/feature-workflow/SKILL.md +181 -38
- package/bundled/skills/prizm-kit/SKILL.md +1 -1
- package/bundled/skills/refactor-workflow/SKILL.md +118 -55
- package/bundled/team/prizm-dev-team.json +8 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "refactor-workflow"
|
|
3
3
|
tier: 1
|
|
4
|
-
description: "End-to-end refactor workflow: analyze → plan → implement → review → commit.
|
|
4
|
+
description: "End-to-end refactor workflow: deep requirement Q&A → analyze → plan → implement → review → commit. 7-phase behavior-preserving pipeline with mandatory test gates. Use this skill whenever the user wants to restructure, clean up, or optimize code without changing behavior. Trigger on: 'refactor', 'clean up code', 'restructure', 'optimize code structure', 'extract module', 'code refactoring'. (project)"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# PrizmKit Refactor Workflow
|
|
8
8
|
|
|
9
|
-
End-to-end orchestration skill for code refactoring and optimization. Chains existing PrizmKit skills into a
|
|
9
|
+
End-to-end orchestration skill for code refactoring and optimization. Chains existing PrizmKit skills into a 7-phase behavior-preserving pipeline with mandatory test gates after each task.
|
|
10
10
|
|
|
11
11
|
### When to Use
|
|
12
12
|
- User says "refactor", "clean up code", "restructure", "extract module", "code refactoring", "optimize code structure"
|
|
@@ -24,11 +24,12 @@ End-to-end orchestration skill for code refactoring and optimization. Chains exi
|
|
|
24
24
|
```
|
|
25
25
|
refactor-workflow
|
|
26
26
|
→ Phase 0: Branch → refactor/<slug> branch
|
|
27
|
-
→ Phase 1:
|
|
28
|
-
→ Phase 2:
|
|
29
|
-
→ Phase 3:
|
|
30
|
-
→ Phase 4:
|
|
31
|
-
→ Phase 5:
|
|
27
|
+
→ Phase 1: Understand → deep interactive Q&A with user
|
|
28
|
+
→ Phase 2: Analyze → refactor-analysis.md
|
|
29
|
+
→ Phase 3: Plan → plan.md (including Tasks section)
|
|
30
|
+
→ Phase 4: Implement → (code)
|
|
31
|
+
→ Phase 5: Review → (review report)
|
|
32
|
+
→ Phase 6: Verify & Commit → git commit + merge decision
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
### Pipeline Phases
|
|
@@ -36,16 +37,18 @@ refactor-workflow
|
|
|
36
37
|
| Phase | Name | Skill Used | Artifact |
|
|
37
38
|
|-------|------|-----------|----------|
|
|
38
39
|
| 0 | Branch Setup | git | → `refactor/<slug>` branch |
|
|
39
|
-
| 1 |
|
|
40
|
-
| 2 |
|
|
41
|
-
| 3 |
|
|
42
|
-
| 4 |
|
|
43
|
-
| 5 |
|
|
40
|
+
| 1 | Understand (Deep Q&A) | Interactive clarification | → Refactoring requirements confirmed |
|
|
41
|
+
| 2 | Analyze (Code Analysis) | Built-in code analysis + code reading | → `refactor-analysis.md` |
|
|
42
|
+
| 3 | Plan (Refactor Plan & Tasks) | `/prizmkit-plan` | → `plan.md` (with Tasks section) |
|
|
43
|
+
| 4 | Implement | `/prizmkit-implement` | (code changes) |
|
|
44
|
+
| 5 | Code Review | `/prizmkit-code-review` | (review report) |
|
|
45
|
+
| 6 | Verify & Commit | `/prizmkit-committer` | git commit + merge |
|
|
44
46
|
|
|
45
47
|
### Key Principles
|
|
46
48
|
|
|
47
49
|
| Principle | Description |
|
|
48
50
|
|-----------|-------------|
|
|
51
|
+
| **Deep understanding first** | Before analyzing code, fully understand the user's motivation, goals, and constraints. Refactoring without clear goals leads to churn. |
|
|
49
52
|
| **Behavior preservation** | Refactoring changes structure, not behavior. If tests pass before and after, behavior is preserved. Acceptance criteria = "behavior unchanged + structure improved". |
|
|
50
53
|
| **Test gates** | Full test suite runs after every task — not just at checkpoints. A refactoring that breaks tests mid-way is much harder to debug than catching it immediately. |
|
|
51
54
|
| **Structural sync only** | Refactoring triggers `/prizmkit-retrospective` Job 1 (structural sync) — update `.prizm-docs/` to reflect file/interface changes. Skip knowledge injection unless a genuinely new pitfall was discovered during refactoring. |
|
|
@@ -53,8 +56,8 @@ refactor-workflow
|
|
|
53
56
|
|
|
54
57
|
### Artifacts
|
|
55
58
|
Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
56
|
-
- **`refactor-analysis.md`** — Code analysis (Phase
|
|
57
|
-
- **`plan.md`** — Refactoring plan with Tasks section (Phase
|
|
59
|
+
- **`refactor-analysis.md`** — Code analysis (Phase 2)
|
|
60
|
+
- **`plan.md`** — Refactoring plan with Tasks section (Phase 3)
|
|
58
61
|
|
|
59
62
|
**PRECONDITION:**
|
|
60
63
|
|
|
@@ -91,7 +94,62 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
91
94
|
|
|
92
95
|
---
|
|
93
96
|
|
|
94
|
-
## Phase 1:
|
|
97
|
+
## Phase 1: Understand — Deep Refactoring Q&A
|
|
98
|
+
|
|
99
|
+
**Goal**: Fully understand the user's refactoring motivation, goals, constraints, and expectations before analyzing code. Refactoring without clear goals leads to aimless restructuring.
|
|
100
|
+
|
|
101
|
+
**CRITICAL RULE**: Ask as many questions as needed until the refactoring scope and goals are crystal clear. Do NOT jump into code analysis. A misunderstood refactoring goal leads to wasted effort or, worse, breaking the architecture in an unintended direction.
|
|
102
|
+
|
|
103
|
+
### Step 1.1: Motivation and Goals
|
|
104
|
+
|
|
105
|
+
Ask the user to explain why they want to refactor:
|
|
106
|
+
|
|
107
|
+
- **What's the pain point?** What specific problem does the current code cause? (Hard to add features? Hard to test? Confusing to read? Performance issues?)
|
|
108
|
+
- **What's the desired outcome?** What should the code look like after refactoring? (Better separation of concerns? Reduced coupling? Clearer interfaces?)
|
|
109
|
+
- **What triggered this?** Did a recent feature attempt expose the debt? Is it proactive cleanup?
|
|
110
|
+
|
|
111
|
+
### Step 1.2: Scope and Boundaries
|
|
112
|
+
|
|
113
|
+
Establish clear boundaries for what will and won't change:
|
|
114
|
+
|
|
115
|
+
- **Which modules/files are in scope?** (specific paths, or "everything under src/auth/")
|
|
116
|
+
- **What is explicitly OUT of scope?** (e.g., "don't touch the API layer", "leave the database schema as-is")
|
|
117
|
+
- **Are there any behavior changes allowed?** (Usually no for refactoring, but sometimes the user wants to combine refactoring with a minor behavior change — clarify this upfront)
|
|
118
|
+
- **Should the public API/interface stay the same?** (Or is renaming/restructuring the API acceptable?)
|
|
119
|
+
|
|
120
|
+
### Step 1.3: Constraints and Risks
|
|
121
|
+
|
|
122
|
+
Understand what the user is concerned about:
|
|
123
|
+
|
|
124
|
+
- **Which behaviors absolutely must NOT change?** (critical paths, user-facing behavior, external integrations)
|
|
125
|
+
- **Are there performance requirements?** (e.g., "the refactored code must not be slower")
|
|
126
|
+
- **Are there any code areas that are particularly fragile?** (known tricky sections, undocumented behavior)
|
|
127
|
+
- **Is there a deadline or time constraint?** (affects how aggressive the refactoring can be)
|
|
128
|
+
- **If database/schema changes are involved**: read existing schema files first and confirm scope with user
|
|
129
|
+
```bash
|
|
130
|
+
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
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Step 1.4: Confirmation
|
|
134
|
+
|
|
135
|
+
Summarize the refactoring scope:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Refactoring Scope:
|
|
139
|
+
- Target: [modules/files in scope]
|
|
140
|
+
- Goal: [desired structural improvement]
|
|
141
|
+
- Out of scope: [what won't change]
|
|
142
|
+
- Behavior contract: [what must remain unchanged]
|
|
143
|
+
- Constraints: [performance, API stability, etc.]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Ask the user: "Is this scope accurate? Anything to adjust?"
|
|
147
|
+
|
|
148
|
+
**CHECKPOINT CP-RW-1**: Refactoring scope and goals confirmed by user.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Phase 2: Analyze — Code Analysis
|
|
95
153
|
|
|
96
154
|
**Goal**: Assess current code state, identify refactoring targets, establish baseline.
|
|
97
155
|
|
|
@@ -114,16 +172,16 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
114
172
|
4. **Generate `refactor-analysis.md`** at `.prizmkit/refactor/<refactor-slug>/refactor-analysis.md`:
|
|
115
173
|
Required sections:
|
|
116
174
|
- **Current State**: module overview, file inventory, dependency graph, complexity metrics
|
|
117
|
-
- **Refactoring Goals**: what structural improvements are targeted, why (debt items, complexity, maintainability)
|
|
175
|
+
- **Refactoring Goals**: what structural improvements are targeted, why (debt items, complexity, maintainability) — aligned with user's confirmed goals from Phase 1
|
|
118
176
|
- **Risk Assessment**: what could break, cross-module impact, data migration needs
|
|
119
177
|
- **Baseline Tests**: test suite status (total, passing, failing), coverage estimate, behavior contracts to preserve
|
|
120
|
-
- **Scope Boundary**: what IS in scope, what is explicitly OUT of scope
|
|
178
|
+
- **Scope Boundary**: what IS in scope, what is explicitly OUT of scope — carried from Phase 1 confirmation
|
|
121
179
|
|
|
122
|
-
**CHECKPOINT CP-RW-
|
|
180
|
+
**CHECKPOINT CP-RW-2**: `refactor-analysis.md` exists with baseline test results.
|
|
123
181
|
|
|
124
182
|
---
|
|
125
183
|
|
|
126
|
-
## Phase
|
|
184
|
+
## Phase 3: Plan — Refactor Plan & Tasks
|
|
127
185
|
|
|
128
186
|
**Goal**: Generate technical refactoring plan that preserves behavior, including task breakdown.
|
|
129
187
|
|
|
@@ -135,17 +193,17 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
135
193
|
- plan.md Tasks section: each task is independently testable and preserves all tests (green → green) — this ensures any failure is immediately traceable to the task that caused it
|
|
136
194
|
- Artifact path: `.prizmkit/refactor/<refactor-slug>/plan.md`
|
|
137
195
|
3. **Verify plan constraints**:
|
|
138
|
-
- All public API contracts preserved
|
|
196
|
+
- All public API contracts preserved (unless explicitly agreed in Phase 1 to change)
|
|
139
197
|
- Test strategy: how to verify behavior unchanged at each step
|
|
140
198
|
- Rollback strategy: how to revert if behavior breaks
|
|
141
199
|
- Tasks ordered to minimize risk (safe renames first, structural changes later)
|
|
142
200
|
- Every task ends with "run full test suite"
|
|
143
201
|
|
|
144
|
-
**CHECKPOINT CP-RW-
|
|
202
|
+
**CHECKPOINT CP-RW-3**: `plan.md` exists with behavior preservation strategy and Tasks section.
|
|
145
203
|
|
|
146
204
|
---
|
|
147
205
|
|
|
148
|
-
## Phase
|
|
206
|
+
## Phase 4: Implement
|
|
149
207
|
|
|
150
208
|
**Goal**: Execute refactoring tasks with mandatory test verification after each task.
|
|
151
209
|
|
|
@@ -160,9 +218,9 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
160
218
|
- Mark tasks complete in plan.md Tasks section as they finish
|
|
161
219
|
- Record test results after each task
|
|
162
220
|
|
|
163
|
-
**CHECKPOINT CP-RW-
|
|
221
|
+
**CHECKPOINT CP-RW-4**: All tasks complete, full test suite green.
|
|
164
222
|
|
|
165
|
-
**Important constraints for Phase
|
|
223
|
+
**Important constraints for Phase 4:**
|
|
166
224
|
- Never skip the test gate between tasks — a broken intermediate state compounds into much harder debugging later
|
|
167
225
|
- Never allow temporary test failures ("we'll fix it in the next task") — this assumption is almost always wrong in refactoring
|
|
168
226
|
- If a task cannot be completed without breaking tests → split it into smaller tasks
|
|
@@ -170,7 +228,7 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
170
228
|
|
|
171
229
|
---
|
|
172
230
|
|
|
173
|
-
## Phase
|
|
231
|
+
## Phase 5: Code Review
|
|
174
232
|
|
|
175
233
|
**Goal**: Verify refactoring quality and behavior preservation.
|
|
176
234
|
|
|
@@ -186,14 +244,14 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
186
244
|
- Verdict: PASS / PASS_WITH_WARNINGS / NEEDS_FIXES
|
|
187
245
|
2. **Run full test suite one final time**: All tests must pass
|
|
188
246
|
3. **Handle review results**:
|
|
189
|
-
- **PASS / PASS_WITH_WARNINGS**: Proceed to Phase
|
|
190
|
-
- **NEEDS_FIXES**: Return to Phase
|
|
247
|
+
- **PASS / PASS_WITH_WARNINGS**: Proceed to Phase 6
|
|
248
|
+
- **NEEDS_FIXES**: Return to Phase 4 following Fix Instructions (max 2 review rounds)
|
|
191
249
|
|
|
192
|
-
**CHECKPOINT CP-RW-
|
|
250
|
+
**CHECKPOINT CP-RW-5**: Code review passes, all tests green.
|
|
193
251
|
|
|
194
252
|
---
|
|
195
253
|
|
|
196
|
-
## Phase
|
|
254
|
+
## Phase 6: Verify, Commit & Merge
|
|
197
255
|
|
|
198
256
|
**Goal**: Let user verify, commit with refactor convention, and merge back.
|
|
199
257
|
|
|
@@ -204,7 +262,7 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
204
262
|
- **(a) Run the app** — Start dev server for manual verification
|
|
205
263
|
- **(b) Run a specific command** — Specify a test or script
|
|
206
264
|
- **(c) Skip** — Proceed to commit (tests already pass)
|
|
207
|
-
- If user reports issues: return to Phase
|
|
265
|
+
- If user reports issues: return to Phase 4
|
|
208
266
|
2. **Invoke `/prizmkit-retrospective`** (Job 1: structural sync only):
|
|
209
267
|
- Update KEY_FILES/INTERFACES/DEPENDENCIES in affected `.prizm-docs/` files
|
|
210
268
|
- Skip knowledge injection unless refactoring revealed a genuinely new pitfall (e.g. a non-obvious coupling)
|
|
@@ -230,7 +288,7 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
230
288
|
```
|
|
231
289
|
6. **If (b)**: Inform user: "Branch `refactor/<slug>` retained. Create a PR when ready."
|
|
232
290
|
|
|
233
|
-
**CHECKPOINT CP-RW-
|
|
291
|
+
**CHECKPOINT CP-RW-6**: Commit recorded with `refactor()` prefix. Merge decision made.
|
|
234
292
|
|
|
235
293
|
---
|
|
236
294
|
|
|
@@ -239,10 +297,10 @@ Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
|
239
297
|
For single-file refactoring (rename, extract method, <30 lines changed):
|
|
240
298
|
|
|
241
299
|
```
|
|
242
|
-
Phase 0 (Branch) → Phase 1 (
|
|
300
|
+
Phase 0 (Branch) → Phase 1 (Simplified Q&A) → Phase 2 (Analyze) → Phase 3 (Simplified Plan) → Phase 4 (Implement) → Phase 5 (Review) → Phase 6 (Commit & Merge)
|
|
243
301
|
```
|
|
244
302
|
|
|
245
|
-
Skip Phase
|
|
303
|
+
Phase 1 is simplified to 2-3 quick confirmation questions instead of deep dive. Skip Phase 3's detailed planning process, but still generate a lightweight `plan.md` with a simplified Tasks section (typically 1-2 tasks).
|
|
246
304
|
|
|
247
305
|
**CRITERIA** (ALL must be true):
|
|
248
306
|
- Single file change
|
|
@@ -252,12 +310,14 @@ Skip Phase 2's detailed planning process, but still generate a lightweight `plan
|
|
|
252
310
|
- No dependency changes
|
|
253
311
|
|
|
254
312
|
**Fast Path implementation differs from full path:**
|
|
255
|
-
- Phase
|
|
256
|
-
- Phase 3
|
|
313
|
+
- Phase 1 is simplified: confirm goal and scope in 2-3 questions
|
|
314
|
+
- Phase 3 is simplified: generate a lightweight plan.md with 1-2 tasks directly from refactor-analysis.md, without deep architecture research
|
|
315
|
+
- Phase 4 still reads plan.md Tasks as normal, marks tasks `[x]` on completion
|
|
257
316
|
- Single-task refactors typically have just one task in plan.md
|
|
258
317
|
|
|
259
318
|
**Fast Path still requires:**
|
|
260
319
|
- Refactor branch (Phase 0)
|
|
320
|
+
- Scope confirmation (Phase 1, simplified)
|
|
261
321
|
- refactor-analysis.md (lightweight version with baseline)
|
|
262
322
|
- plan.md (simplified, 1-2 tasks)
|
|
263
323
|
- Full test suite run after implementation
|
|
@@ -276,11 +336,12 @@ The pipeline supports resuming from the last completed phase by detecting existi
|
|
|
276
336
|
| Artifact Found | Resume From |
|
|
277
337
|
|---------------|------------|
|
|
278
338
|
| (nothing) | Phase 0: Branch Setup |
|
|
279
|
-
| On `refactor/<slug>` branch, no artifacts | Phase 1:
|
|
280
|
-
|
|
|
281
|
-
| `refactor-analysis.md`
|
|
282
|
-
|
|
|
283
|
-
| All docs +
|
|
339
|
+
| On `refactor/<slug>` branch, no artifacts | Phase 1: Understand |
|
|
340
|
+
| Scope confirmed, no analysis | Phase 2: Analyze |
|
|
341
|
+
| `refactor-analysis.md` only | Phase 3: Plan |
|
|
342
|
+
| `refactor-analysis.md` + `plan.md` | Phase 4: Implement |
|
|
343
|
+
| All docs + code changes exist | Phase 5: Review |
|
|
344
|
+
| All docs + review passed | Phase 6: Verify & Commit |
|
|
284
345
|
|
|
285
346
|
**Resume**: If `<slug>` matches an existing `.prizmkit/refactor/<slug>/` directory, resume instead of starting fresh.
|
|
286
347
|
|
|
@@ -291,6 +352,7 @@ The pipeline supports resuming from the last completed phase by detecting existi
|
|
|
291
352
|
| Scenario | Action |
|
|
292
353
|
|----------|--------|
|
|
293
354
|
| Cannot identify target module | Ask user for clarification |
|
|
355
|
+
| User's refactoring goal is unclear | Ask systematic clarification questions (Phase 1) |
|
|
294
356
|
| No tests exist for target module | WARN user, recommend writing tests first |
|
|
295
357
|
| Baseline tests already failing | Isolate failures, document, proceed with caution |
|
|
296
358
|
| Test fails after a refactoring task | Revert task, investigate, retry or split |
|
|
@@ -305,13 +367,13 @@ The pipeline supports resuming from the last completed phase by detecting existi
|
|
|
305
367
|
## Relationship to Other Skills
|
|
306
368
|
|
|
307
369
|
| Skill | Role in Refactor Workflow |
|
|
308
|
-
|
|
309
|
-
| (built-in code analysis) | Phase
|
|
310
|
-
| `/prizmkit-plan` | Phase
|
|
311
|
-
| `/prizmkit-implement` | Phase
|
|
312
|
-
| `/prizmkit-code-review` | Phase
|
|
313
|
-
| `/prizmkit-committer` | Phase
|
|
314
|
-
| `/prizmkit-retrospective` | Phase
|
|
370
|
+
|-------|-----------------------------|
|
|
371
|
+
| (built-in code analysis) | Phase 2: identify debt and complexity |
|
|
372
|
+
| `/prizmkit-plan` | Phase 3: refactoring plan + task generation |
|
|
373
|
+
| `/prizmkit-implement` | Phase 4: execute refactoring tasks |
|
|
374
|
+
| `/prizmkit-code-review` | Phase 5: review quality and behavior preservation |
|
|
375
|
+
| `/prizmkit-committer` | Phase 6: commit with `refactor()` convention |
|
|
376
|
+
| `/prizmkit-retrospective` | Phase 6: structural sync before commit (Job 1 only, skip knowledge injection unless new pitfall) |
|
|
315
377
|
| `feature-workflow` | Handoff target when new behavior is needed |
|
|
316
378
|
| `/prizmkit-specify` | NOT used (no user stories for refactoring) |
|
|
317
379
|
| `/prizmkit-analyze` | NOT used (no spec <-> plan consistency needed) |
|
|
@@ -323,21 +385,22 @@ The pipeline supports resuming from the last completed phase by detecting existi
|
|
|
323
385
|
| Dimension | Feature Workflow | Refactor Workflow | Bug Fix Workflow |
|
|
324
386
|
|-----------|-----------------|-------------------|------------------|
|
|
325
387
|
| Input | Natural language requirement | Module/code target | Bug description |
|
|
388
|
+
| Deep Q&A | Yes (brainstorm) | Yes (scope & goals) | Yes (diagnosis) |
|
|
326
389
|
| Branch | Pipeline manages per-feature | `refactor/<slug>` | `fix/<BUG_ID>-*` |
|
|
327
|
-
| Pipeline Phases |
|
|
328
|
-
| Phase 1 |
|
|
390
|
+
| Pipeline Phases | 4 (brainstorm → plan → launch → monitor) | 7 (branch → understand → analyze → plan → implement → review → commit) | 8 (branch → diagnose → triage → reproduce → fix → review → verify → commit) |
|
|
391
|
+
| Phase 1 | Brainstorm (requirements Q&A) | Understand (scope & goals Q&A) | Deep Bug Diagnosis (symptom Q&A) |
|
|
329
392
|
| Artifact Path | `.prizmkit/specs/<slug>/` | `.prizmkit/refactor/<slug>/` | `.prizmkit/bugfix/<id>/` |
|
|
330
393
|
| Commit Prefix | `feat(<scope>):` | `refactor(<scope>):` | `fix(<scope>):` |
|
|
331
394
|
| Test Strategy | TDD per task | Full suite after EVERY task | Reproduction test |
|
|
332
395
|
| Scope Guard | N/A | Enforced | N/A |
|
|
333
396
|
| Behavior Change | Expected | Forbidden | Fix behavior |
|
|
334
|
-
| User Verification |
|
|
397
|
+
| User Verification | Yes (brainstorm confirmation) | Yes (Phase 6) | Yes (Phase 6) |
|
|
335
398
|
|
|
336
399
|
## Output
|
|
337
400
|
|
|
338
|
-
- `refactor-analysis.md` (Phase
|
|
339
|
-
- `plan.md` with Tasks section (Phase
|
|
340
|
-
- Refactored implementation code (Phase
|
|
341
|
-
- Code review report (Phase
|
|
342
|
-
- Git commit with `refactor(<scope>):` prefix on dedicated refactor branch (Phase
|
|
401
|
+
- `refactor-analysis.md` (Phase 2 artifact)
|
|
402
|
+
- `plan.md` with Tasks section (Phase 3 artifact)
|
|
403
|
+
- Refactored implementation code (Phase 4)
|
|
404
|
+
- Code review report (Phase 5, conversation only)
|
|
405
|
+
- Git commit with `refactor(<scope>):` prefix on dedicated refactor branch (Phase 6)
|
|
343
406
|
- Updated `.prizm-docs/` (if applicable)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prizm-dev-team",
|
|
3
3
|
"team_name": "prizm-dev-team",
|
|
4
|
-
"description": "PrizmKit-integrated Multi-Agent software development team.
|
|
4
|
+
"description": "PrizmKit-integrated Multi-Agent software development team. 3 specialized agents (Dev, Reviewer, Critic) following PrizmKit spec-driven workflow with pipeline and checkpoints.",
|
|
5
5
|
"lead": "team-lead",
|
|
6
6
|
"communication": {
|
|
7
7
|
"protocol": "SendMessage",
|
|
@@ -28,6 +28,13 @@
|
|
|
28
28
|
"agentDefinition": "prizm-dev-team-reviewer",
|
|
29
29
|
"prompt": "You are the Reviewer Agent of the prizm-dev-team. In Phase 4: run /prizmkit-analyze for cross-document consistency. In Phase 6: run /prizmkit-code-review for diagnosis + fix strategy formulation, write and execute integration tests. Produce structured Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification) so Dev can follow them precisely. Write Fix Instructions to context-snapshot.md '## Review Notes' section.",
|
|
30
30
|
"subscriptions": ["*"]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "critic",
|
|
34
|
+
"role": "critic",
|
|
35
|
+
"agentDefinition": "prizm-dev-team-critic",
|
|
36
|
+
"prompt": "You are the Critic Agent of the prizm-dev-team. Challenge plans and implementations for project fitness, style consistency, robustness, and integration quality. Do NOT verify correctness — that is the Reviewer's job. Write challenge-report.md with adversarial findings.",
|
|
37
|
+
"subscriptions": ["*"]
|
|
31
38
|
}
|
|
32
39
|
]
|
|
33
40
|
}
|