prizmkit 1.1.0 → 1.1.3
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/adapters/claude/agent-adapter.js +18 -0
- package/bundled/adapters/claude/command-adapter.js +1 -27
- package/bundled/agents/prizm-dev-team-critic.md +2 -0
- package/bundled/agents/prizm-dev-team-dev.md +2 -0
- package/bundled/agents/prizm-dev-team-reviewer.md +2 -0
- package/bundled/dev-pipeline/README.md +63 -63
- package/bundled/dev-pipeline/assets/feature-list-example.json +1 -1
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
- package/bundled/dev-pipeline/{launch-daemon.sh → launch-feature-daemon.sh} +33 -33
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +454 -0
- package/bundled/dev-pipeline/lib/branch.sh +1 -1
- package/bundled/dev-pipeline/reset-feature.sh +3 -3
- package/bundled/dev-pipeline/reset-refactor.sh +312 -0
- package/bundled/dev-pipeline/{retry-bug.sh → retry-bugfix.sh} +47 -59
- package/bundled/dev-pipeline/retry-feature.sh +41 -54
- package/bundled/dev-pipeline/retry-refactor.sh +358 -0
- package/bundled/dev-pipeline/run-bugfix.sh +6 -0
- package/bundled/dev-pipeline/{run.sh → run-feature.sh} +31 -31
- package/bundled/dev-pipeline/run-refactor.sh +787 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +177 -10
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +419 -0
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +393 -0
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +726 -0
- package/bundled/dev-pipeline/templates/agent-prompts/critic-code-challenge.md +13 -0
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +7 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +7 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +26 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-resume.md +5 -0
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +5 -0
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +12 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +29 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +8 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +11 -10
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +2 -3
- package/bundled/dev-pipeline/templates/feature-list-schema.json +1 -1
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +159 -0
- package/bundled/dev-pipeline/templates/sections/ac-verification-checklist.md +13 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +9 -8
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +9 -8
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +2 -1
- package/bundled/dev-pipeline/templates/sections/phase-critic-code.md +8 -10
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +9 -10
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +8 -9
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +7 -10
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +8 -15
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +7 -12
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +8 -19
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery.md +75 -0
- package/bundled/skills/_metadata.json +33 -6
- package/bundled/skills/app-planner/SKILL.md +105 -320
- package/bundled/skills/app-planner/assets/app-design-guide.md +101 -0
- package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +49 -80
- package/bundled/skills/bug-fix-workflow/SKILL.md +2 -2
- package/bundled/skills/bug-planner/SKILL.md +68 -5
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +3 -2
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +19 -5
- package/bundled/skills/{dev-pipeline-launcher → feature-pipeline-launcher}/SKILL.md +32 -32
- package/bundled/skills/feature-planner/SKILL.md +337 -0
- package/bundled/skills/{app-planner → feature-planner}/assets/evaluation-guide.md +4 -4
- package/bundled/skills/{app-planner → feature-planner}/assets/planning-guide.md +3 -171
- package/bundled/skills/{app-planner → feature-planner}/references/browser-interaction.md +6 -5
- package/bundled/skills/feature-planner/references/decomposition-patterns.md +75 -0
- package/bundled/skills/{app-planner → feature-planner}/references/error-recovery.md +8 -8
- package/bundled/skills/{app-planner → feature-planner}/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/{app-planner/references/new-app-planning.md → feature-planner/references/new-project-planning.md} +1 -1
- package/bundled/skills/{app-planner → feature-planner}/scripts/validate-and-generate.py +4 -4
- package/bundled/skills/feature-workflow/SKILL.md +23 -23
- package/bundled/skills/prizm-kit/SKILL.md +1 -3
- package/bundled/skills/prizmkit-analyze/SKILL.md +2 -5
- package/bundled/skills/prizmkit-code-review/SKILL.md +2 -2
- package/bundled/skills/prizmkit-committer/SKILL.md +4 -8
- package/bundled/skills/prizmkit-deploy/SKILL.md +1 -5
- package/bundled/skills/prizmkit-implement/SKILL.md +3 -50
- package/bundled/skills/prizmkit-init/SKILL.md +5 -77
- package/bundled/skills/prizmkit-plan/SKILL.md +1 -12
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +6 -24
- package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +21 -0
- package/bundled/skills/prizmkit-retrospective/SKILL.md +12 -117
- package/bundled/skills/recovery-workflow/SKILL.md +166 -316
- package/bundled/skills/recovery-workflow/evals/evals.json +29 -13
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +232 -274
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +352 -0
- package/bundled/skills/refactor-planner/SKILL.md +436 -0
- package/bundled/skills/refactor-planner/assets/planning-guide.md +292 -0
- package/bundled/skills/refactor-planner/references/behavior-preservation.md +301 -0
- package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +221 -0
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +786 -0
- package/bundled/skills/refactor-workflow/SKILL.md +299 -319
- package/package.json +1 -1
- package/src/clean.js +3 -3
- package/src/scaffold.js +6 -6
- /package/bundled/skills/{dev-pipeline-launcher → feature-pipeline-launcher}/scripts/preflight-check.py +0 -0
|
@@ -1,424 +1,404 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "refactor-workflow"
|
|
3
|
-
tier:
|
|
4
|
-
description: "
|
|
3
|
+
tier: companion
|
|
4
|
+
description: "One-stop entry point for code refactoring. Brainstorms refactoring goals with the user until fully clarified, then orchestrates refactor-planner → refactor-pipeline-launcher → execution. Handles multi-refactor batch development from a single request. 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', 'batch refactor'. (project)"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Refactor Workflow
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
One-stop entry point for code refactoring. Covers the complete journey from a rough refactoring idea to verified, behavior-preserving code changes: deep goal clarification → structured planning → autonomous pipeline execution.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
User says:
|
|
14
|
+
- "Refactor the auth module", "Clean up this code", "Restructure the payment service"
|
|
15
|
+
- "Extract shared logic into a separate module", "Optimize code structure"
|
|
16
|
+
- "Batch refactor these modules", "Code refactoring across multiple files"
|
|
13
17
|
- Code has accumulated tech debt that needs structural improvement
|
|
14
18
|
- Module needs to be split, merged, or reorganized
|
|
15
|
-
- When behavior must remain unchanged but internal quality needs improvement
|
|
16
19
|
|
|
17
|
-
**Do NOT use when:**
|
|
18
|
-
- User wants to
|
|
20
|
+
**Do NOT use this skill when:**
|
|
21
|
+
- User only wants to plan refactoring (use `refactor-planner` directly)
|
|
22
|
+
- User only wants to launch pipeline for existing refactor-list.json (use `refactor-pipeline-launcher`)
|
|
23
|
+
- User wants to add features (use `feature-workflow`)
|
|
19
24
|
- User wants to fix bugs (use `bug-planner` + `bugfix-pipeline-launcher`)
|
|
20
|
-
|
|
25
|
+
|
|
26
|
+
---
|
|
21
27
|
|
|
22
28
|
## Overview
|
|
23
29
|
|
|
24
30
|
```
|
|
25
|
-
refactor-workflow
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
refactor-workflow <target / goals>
|
|
32
|
+
│
|
|
33
|
+
├── Phase 1: Brainstorm → interactive Q&A until refactoring goals are clear
|
|
34
|
+
│
|
|
35
|
+
├── Phase 2: Plan → refactor-planner → refactor-list.json
|
|
36
|
+
│
|
|
37
|
+
├── Phase 3: Launch → refactor-pipeline-launcher → pipeline execution
|
|
38
|
+
│
|
|
39
|
+
└── Phase 4: Monitor → track progress → report results
|
|
32
40
|
```
|
|
33
41
|
|
|
34
|
-
###
|
|
35
|
-
|
|
36
|
-
| Phase | Name | Skill Used | Artifact |
|
|
37
|
-
|-------|------|-----------|----------|
|
|
38
|
-
| 0 | Branch Setup | git | → `refactor/<slug>` branch |
|
|
39
|
-
| 1 | Understand & Analyze | Interactive scoping + parallel Agent reading + code analysis | → Refactoring scope confirmed + `refactor-analysis.md` |
|
|
40
|
-
| 2 | Plan (Refactor Plan & Tasks) | `/prizmkit-plan` | → `plan.md` (with Tasks section) |
|
|
41
|
-
| 3 | Implement | `/prizmkit-implement` | (code changes) |
|
|
42
|
-
| 4 | Code Review | `/prizmkit-code-review` | (review report) |
|
|
43
|
-
| 5 | Verify & Commit | `/prizmkit-committer` | git commit + merge |
|
|
44
|
-
|
|
45
|
-
### Key Principles
|
|
46
|
-
|
|
47
|
-
| Principle | Description |
|
|
48
|
-
|-----------|-------------|
|
|
49
|
-
| **Structured scoping first** | Use structured choices (not open-ended Q&A) to quickly establish refactoring type, scope, and reference materials. |
|
|
50
|
-
| **Parallel understanding** | Dispatch multiple Agents concurrently to read code, docs, and knowledge files — don't read sequentially. |
|
|
51
|
-
| **Show findings, then collaborate** | Present what the Agents discovered, then work with the user to shape the refactoring plan — don't just ask questions without context. |
|
|
52
|
-
| **Behavior preservation** | Refactoring changes structure, not behavior. If tests pass before and after, behavior is preserved. |
|
|
53
|
-
| **Test gates** | Full test suite runs after every task — not just at checkpoints. |
|
|
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. |
|
|
55
|
-
| **Incremental safety** | Each task preserves all tests (green → green). If tests fail → stop and revert. |
|
|
56
|
-
|
|
57
|
-
### Artifacts
|
|
58
|
-
Refactor artifacts stored at `.prizmkit/refactor/<refactor-slug>/`:
|
|
59
|
-
- **`refactor-analysis.md`** — Scoping + code analysis (Phase 1)
|
|
60
|
-
- **`plan.md`** — Refactoring plan with Tasks section (Phase 2)
|
|
61
|
-
|
|
62
|
-
**PRECONDITION:**
|
|
63
|
-
|
|
64
|
-
| Required | Check | If Missing |
|
|
65
|
-
|---|---|---|
|
|
66
|
-
| Refactoring target (module path, file path, or natural language description) | User provides target in request | Ask: "What module or code do you want to refactor?" |
|
|
67
|
-
| Test suite exists for target module | Tests can be located and run | WARN user, recommend writing tests first before refactoring |
|
|
68
|
-
| No uncommitted changes on current branch | `git status` is clean | Ask user to commit or stash changes first |
|
|
69
|
-
|
|
70
|
-
**INPUT**: Target description. Can be:
|
|
71
|
-
- Module or file path (e.g., "src/auth/")
|
|
72
|
-
- Natural language description (e.g., "refactor the auth module, extract shared logic")
|
|
73
|
-
- Specific refactoring goal (e.g., "extract payment processing into separate service")
|
|
42
|
+
### What This Skill Does
|
|
74
43
|
|
|
75
|
-
|
|
44
|
+
| Phase | Action | Result |
|
|
45
|
+
|-------|--------|--------|
|
|
46
|
+
| 1 | **Brainstorm** — interactive Q&A with user | Fully clarified refactoring goals |
|
|
47
|
+
| 2 | Call `refactor-planner` with clarified goals | `refactor-list.json` with N refactor items |
|
|
48
|
+
| 3 | Call `refactor-pipeline-launcher` | Pipeline started (execution mode chosen by user via launcher) |
|
|
49
|
+
| 4 | Monitor progress | Status updates, completion report |
|
|
76
50
|
|
|
77
|
-
|
|
51
|
+
### Why This Skill Exists
|
|
78
52
|
|
|
79
|
-
|
|
53
|
+
Without this skill, users must:
|
|
54
|
+
1. Figure out all refactoring goals and scope themselves
|
|
55
|
+
2. Invoke `refactor-planner` → wait for refactor-list.json
|
|
56
|
+
3. Invoke `refactor-pipeline-launcher` → wait for pipeline start
|
|
57
|
+
4. Manually check progress
|
|
80
58
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
git checkout -b refactor/<refactor-slug>
|
|
88
|
-
```
|
|
89
|
-
Example: `git checkout -b refactor/extract-auth-middleware`
|
|
90
|
-
3. **If already on a refactor branch**: Confirm with user: "Continue on current branch `<branch-name>`, or create a new one?"
|
|
91
|
-
4. **Record the original branch name** for later merge.
|
|
59
|
+
With this skill, users can:
|
|
60
|
+
1. Say "Refactor the auth module to extract shared middleware" with a rough idea
|
|
61
|
+
2. The skill brainstorms to fill in all gaps (scope, risks, behavior contracts)
|
|
62
|
+
3. All planning + execution happens automatically
|
|
63
|
+
|
|
64
|
+
### Branch Management
|
|
92
65
|
|
|
93
|
-
|
|
66
|
+
The dev-pipeline handles branch management per-refactor automatically:
|
|
67
|
+
- Each refactor item is implemented on its own branch by the pipeline
|
|
68
|
+
- Branches are created, committed, and managed by the pipeline session
|
|
69
|
+
- This workflow does NOT create a top-level branch — the pipeline manages granular per-refactor branches
|
|
94
70
|
|
|
95
71
|
---
|
|
96
72
|
|
|
97
|
-
##
|
|
73
|
+
## Input Modes
|
|
98
74
|
|
|
99
|
-
**
|
|
75
|
+
**Mode A: From natural language description** (default)
|
|
100
76
|
|
|
101
|
-
|
|
77
|
+
Natural language description of the refactoring goals. Can be:
|
|
78
|
+
- A module target: "Refactor the auth module — extract shared middleware, simplify the token flow"
|
|
79
|
+
- A batch of refactors: "Clean up the payment service, decouple the notification module, and extract common utilities"
|
|
80
|
+
- An incremental request: "Also refactor the logging layer to use structured logging"
|
|
102
81
|
|
|
103
|
-
|
|
82
|
+
Flow: brainstorm → refactor-planner → refactor-pipeline-launcher → monitor
|
|
104
83
|
|
|
105
|
-
|
|
84
|
+
**Mode B: From existing refactor-list.json**
|
|
106
85
|
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
86
|
+
When user says "run pipeline from existing file" or refactor-list.json already exists:
|
|
87
|
+
- Skip brainstorm and `refactor-planner` (file already exists)
|
|
88
|
+
- Invoke `refactor-pipeline-launcher` directly
|
|
89
|
+
- Monitor and report progress
|
|
111
90
|
|
|
112
|
-
|
|
113
|
-
- If **(a)**: Ask which area to start with, and what the incremental milestones should be
|
|
114
|
-
- If **(b)**: Confirm the full scope boundary — what's included and what's explicitly excluded
|
|
115
|
-
- If **(c)**: Confirm the specific target and the expected outcome
|
|
91
|
+
**Mode C: Incremental (add to existing refactor plan)**
|
|
116
92
|
|
|
117
|
-
|
|
93
|
+
When user says "add more refactors" or the project already has a refactor-list.json:
|
|
94
|
+
- Brainstorm new refactoring goals with the user
|
|
95
|
+
- Invoke `refactor-planner` in incremental mode (reads existing refactor-list.json)
|
|
96
|
+
- Append new refactor items to existing list
|
|
97
|
+
- Invoke `refactor-pipeline-launcher`
|
|
98
|
+
- Monitor and report progress
|
|
118
99
|
|
|
119
|
-
|
|
100
|
+
---
|
|
120
101
|
|
|
121
|
-
|
|
122
|
-
- **Code paths** — Specific files or directories to focus on (e.g., `src/auth/`, `lib/payment.js`)
|
|
123
|
-
- **Refactoring-related documents** — Design docs, RFCs, architecture proposals, migration guides
|
|
124
|
-
- **Existing knowledge docs** — `.prizm-docs/`, ADRs, inline documentation, wiki pages, or team notes about the target area
|
|
125
|
-
- **None** — No additional materials, rely on code reading
|
|
102
|
+
## Phase 1: Brainstorm — Deep Refactoring Goal Clarification
|
|
126
103
|
|
|
127
|
-
|
|
104
|
+
**Goal**: Through interactive Q&A, transform the user's rough refactoring idea into fully clarified, implementation-ready refactoring goals. This phase is the foundation for safe, behavior-preserving code changes — vague goals produce risky refactors.
|
|
128
105
|
|
|
129
|
-
|
|
106
|
+
**CRITICAL RULE**: The number of questions is **unlimited**. Do NOT rush through this phase. Ask as many rounds as needed until every aspect is clear. Refactoring is inherently risky — thorough understanding prevents broken behavior.
|
|
130
107
|
|
|
131
|
-
|
|
108
|
+
### Step 1.1: Understand the User's Refactoring Goals
|
|
132
109
|
|
|
133
|
-
|
|
134
|
-
- **
|
|
135
|
-
- **
|
|
136
|
-
- **
|
|
110
|
+
Ask the user to describe what they want to refactor. Listen for:
|
|
111
|
+
- **What** code needs restructuring (modules, files, patterns)
|
|
112
|
+
- **Why** it needs refactoring (tech debt, coupling, complexity, readability, performance structure)
|
|
113
|
+
- **What outcome** they want (target architecture, desired structure, quality goals)
|
|
137
114
|
|
|
138
|
-
|
|
115
|
+
### Step 1.2: Context Gathering
|
|
139
116
|
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
117
|
+
Before asking detailed questions, gather existing project context:
|
|
118
|
+
- If `.prizm-docs/root.prizm` exists → read it to understand existing architecture, tech stack, patterns
|
|
119
|
+
- If `.prizmkit/config.json` exists → read tech stack preferences
|
|
120
|
+
- If existing source code exists → scan directory structure:
|
|
121
|
+
```bash
|
|
122
|
+
find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
|
123
|
+
```
|
|
124
|
+
- Check test suite existence and coverage for the target area:
|
|
125
|
+
```bash
|
|
126
|
+
find . -maxdepth 4 -type f \( -name "*.test.*" -o -name "*.spec.*" -o -name "test_*" -o -path "*/tests/*" -o -path "*/__tests__/*" \) -not -path '*/node_modules/*' -not -path '*/.git/*' | head -20
|
|
127
|
+
```
|
|
144
128
|
|
|
145
|
-
|
|
129
|
+
This context informs better questions — e.g., if the target module has no tests, the conversation must address test coverage before refactoring.
|
|
146
130
|
|
|
147
|
-
|
|
131
|
+
### Step 1.3: Adaptive Deep-Dive Questioning
|
|
148
132
|
|
|
149
|
-
|
|
150
|
-
## Refactoring Findings
|
|
151
|
-
|
|
152
|
-
### Code Structure (Agent A)
|
|
153
|
-
- [file inventory, dependency graph, complexity metrics]
|
|
154
|
-
- [identified code smells: long functions, deep nesting, duplication, coupling]
|
|
155
|
-
|
|
156
|
-
### Existing Knowledge (Agent B)
|
|
157
|
-
- [known traps and risks from docs]
|
|
158
|
-
- [relevant architectural decisions]
|
|
159
|
-
- [user-provided doc insights]
|
|
160
|
-
|
|
161
|
-
### Test Baseline (Agent C)
|
|
162
|
-
- [test suite status: X total, Y passing, Z failing]
|
|
163
|
-
- [coverage estimate]
|
|
164
|
-
- [behavior contracts to preserve]
|
|
165
|
-
|
|
166
|
-
### Recommended Refactoring Approach
|
|
167
|
-
- [based on findings, propose concrete refactoring strategy]
|
|
168
|
-
- [identify highest-impact opportunities]
|
|
169
|
-
- [flag risks and cross-module impacts]
|
|
170
|
-
```
|
|
133
|
+
Based on the user's description, ask questions across these dimensions. **Adapt question depth to the refactoring complexity** — a simple extract-method refactor needs fewer questions than a full module decomposition.
|
|
171
134
|
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
- If the scope needs adjustment based on findings, negotiate with the user
|
|
135
|
+
**Code Structure:**
|
|
136
|
+
- What's wrong with the current structure? What specific pain points exist?
|
|
137
|
+
- What's the target state? What should the code look like after refactoring?
|
|
138
|
+
- Are there specific code smells? (duplication, deep nesting, god classes, tight coupling)
|
|
139
|
+
- What are the dependency relationships between the target and other modules?
|
|
178
140
|
|
|
179
|
-
|
|
141
|
+
**Scope:**
|
|
142
|
+
- Which files/modules are in scope? Which are explicitly out of scope?
|
|
143
|
+
- Is this a single-module refactor or does it span multiple modules?
|
|
144
|
+
- Should the refactoring be incremental (piece by piece) or comprehensive?
|
|
180
145
|
|
|
181
|
-
|
|
146
|
+
**Behavior Preservation:**
|
|
147
|
+
- What behavior must stay identical? Are there contracts/APIs that must not change?
|
|
148
|
+
- What tests exist for the target area? Are they passing currently?
|
|
149
|
+
- Are there integration tests or end-to-end tests that cover this area?
|
|
150
|
+
- Any undocumented behavior that callers depend on?
|
|
182
151
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
152
|
+
**Risk Assessment:**
|
|
153
|
+
- What could break? Are there fragile or undocumented areas?
|
|
154
|
+
- Are there known gotchas or traps in this code? (check `.prizm-docs/` TRAPS)
|
|
155
|
+
- Does this code have external consumers (other teams, published APIs)?
|
|
156
|
+
- Any concurrent development happening in the target area?
|
|
186
157
|
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
- **Risk Assessment**: what could break, cross-module impact, fragile areas (from Agent B + discussion)
|
|
192
|
-
- **Baseline Tests**: test suite status, coverage estimate, behavior contracts to preserve (from Agent C)
|
|
193
|
-
- **Scope Boundary**: what IS in scope, what is explicitly OUT of scope — confirmed with user
|
|
194
|
-
- **Reference Materials**: list of docs/paths the user provided and key insights from each
|
|
158
|
+
**Constraints:**
|
|
159
|
+
- Timeline or urgency? (affects whether to do incremental vs comprehensive)
|
|
160
|
+
- Team coordination needed? (other developers working in the same area)
|
|
161
|
+
- Deployment concerns? (feature flags, backward compatibility, migration)
|
|
195
162
|
|
|
196
|
-
|
|
163
|
+
### Step 1.4: Iterative Clarification Loop
|
|
197
164
|
|
|
198
|
-
|
|
165
|
+
After the initial deep-dive:
|
|
199
166
|
|
|
200
|
-
|
|
167
|
+
1. **Summarize** what you've understood so far — present it back to the user
|
|
168
|
+
2. **Identify gaps** — explicitly list any areas that are still unclear or ambiguous
|
|
169
|
+
3. **Ask follow-up questions** for each gap
|
|
170
|
+
4. **Repeat** until the user confirms: "Yes, that covers everything" or "That's clear enough"
|
|
201
171
|
|
|
202
|
-
**
|
|
172
|
+
**Signs that brainstorming is complete:**
|
|
173
|
+
- All refactoring goals have concrete target state descriptions
|
|
174
|
+
- Scope boundaries are clearly defined (in/out)
|
|
175
|
+
- Behavior preservation contracts are identified
|
|
176
|
+
- Risk areas are acknowledged and mitigation is discussed
|
|
177
|
+
- The user has confirmed the summary is accurate
|
|
203
178
|
|
|
204
|
-
**
|
|
179
|
+
**Signs that more questions are needed:**
|
|
180
|
+
- User's answers contain vague terms ("clean it up", "make it better", "fix the structure")
|
|
181
|
+
- Scope is undefined ("refactor everything" without specifics)
|
|
182
|
+
- No awareness of test coverage for the target area
|
|
183
|
+
- Risk areas are handwaved ("it should be fine")
|
|
184
|
+
- User says "I'm not sure" — help them think through it with concrete options
|
|
205
185
|
|
|
206
|
-
|
|
207
|
-
2. **Invoke `/prizmkit-plan`** with refactor-analysis.md as input (in place of spec.md):
|
|
208
|
-
- Plan specifies: what changes, what stays the same, how behavior is preserved
|
|
209
|
-
- 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
|
|
210
|
-
- Artifact path: `.prizmkit/refactor/<refactor-slug>/plan.md`
|
|
211
|
-
3. **Verify plan constraints**:
|
|
212
|
-
- All public API contracts preserved (unless explicitly agreed in Phase 1 to change)
|
|
213
|
-
- Test strategy: how to verify behavior unchanged at each step
|
|
214
|
-
- Rollback strategy: how to revert if behavior breaks
|
|
215
|
-
- Tasks ordered to minimize risk (safe renames first, structural changes later)
|
|
216
|
-
- Every task ends with "run full test suite"
|
|
186
|
+
### Step 1.5: Requirements Summary
|
|
217
187
|
|
|
218
|
-
|
|
188
|
+
Once brainstorming is complete, produce a structured goals summary:
|
|
219
189
|
|
|
220
|
-
|
|
190
|
+
```markdown
|
|
191
|
+
## Refactoring Goals Summary
|
|
192
|
+
|
|
193
|
+
### Target: [Module/area name]
|
|
194
|
+
|
|
195
|
+
### Refactoring Objectives
|
|
196
|
+
- [Bullet list of what structural changes are needed and why]
|
|
197
|
+
|
|
198
|
+
### Current Problems
|
|
199
|
+
- [What's wrong with the current structure]
|
|
200
|
+
|
|
201
|
+
### Target State
|
|
202
|
+
- [What the code should look like after refactoring]
|
|
203
|
+
|
|
204
|
+
### Scope
|
|
205
|
+
- **In scope**: [files, modules, directories]
|
|
206
|
+
- **Out of scope**: [explicitly excluded areas]
|
|
221
207
|
|
|
222
|
-
|
|
208
|
+
### Behavior Preservation Contracts
|
|
209
|
+
- [What behavior must remain unchanged]
|
|
210
|
+
- [Key APIs/interfaces that must be preserved]
|
|
211
|
+
- [Existing test coverage status]
|
|
223
212
|
|
|
224
|
-
|
|
213
|
+
### Risk Assessment
|
|
214
|
+
- [Risk]: [Mitigation strategy]
|
|
225
215
|
|
|
226
|
-
|
|
216
|
+
### Constraints
|
|
217
|
+
- [Timeline, coordination, deployment concerns]
|
|
227
218
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
b. **Run FULL test suite** (not just affected tests) — refactoring can have surprising cross-module effects that targeted tests miss
|
|
231
|
-
c. Verify: all previously-passing tests still pass
|
|
232
|
-
d. If any test fails → stop, revert task, investigate
|
|
233
|
-
2. **Progress tracking**:
|
|
234
|
-
- Mark tasks complete in plan.md Tasks section as they finish
|
|
235
|
-
- Record test results after each task
|
|
219
|
+
### Confirmed by user: ✓
|
|
220
|
+
```
|
|
236
221
|
|
|
237
|
-
|
|
222
|
+
Present this summary to the user and get explicit confirmation before proceeding to Phase 2.
|
|
238
223
|
|
|
239
|
-
**
|
|
240
|
-
- Never skip the test gate between tasks — a broken intermediate state compounds into much harder debugging later
|
|
241
|
-
- Never allow temporary test failures ("we'll fix it in the next task") — this assumption is almost always wrong in refactoring
|
|
242
|
-
- If a task cannot be completed without breaking tests → split it into smaller tasks
|
|
243
|
-
- Max 3 attempts per task before escalating to user
|
|
224
|
+
**CHECKPOINT CP-RW-0**: Refactoring goals fully clarified and confirmed by user.
|
|
244
225
|
|
|
245
226
|
---
|
|
246
227
|
|
|
247
|
-
## Phase
|
|
228
|
+
## Phase 2: Plan
|
|
229
|
+
|
|
230
|
+
**Goal**: Generate structured refactor-list.json from the clarified refactoring goals.
|
|
231
|
+
|
|
232
|
+
**STEPS**:
|
|
248
233
|
|
|
249
|
-
**
|
|
234
|
+
1. **Invoke `refactor-planner` skill** with the full goals summary from Phase 1:
|
|
235
|
+
- Pass the structured goals summary as input — NOT the raw user conversation
|
|
236
|
+
- For new refactoring: standard planning mode
|
|
237
|
+
- For existing projects with `--incremental`: incremental planning mode
|
|
250
238
|
|
|
251
|
-
**
|
|
239
|
+
2. **Interactive planning** (if refactor-planner requires clarification):
|
|
240
|
+
- Because Phase 1 was thorough, refactor-planner should need minimal clarification
|
|
241
|
+
- If questions arise, answer from the Phase 1 context or pass through to user
|
|
252
242
|
|
|
253
|
-
|
|
254
|
-
-
|
|
255
|
-
|
|
256
|
-
- **Structural improvement**: Is the code measurably better? (complexity, coupling, readability)
|
|
257
|
-
- **Test integrity**: Are all tests still meaningful and passing?
|
|
258
|
-
- **Code quality**: Does refactored code follow project conventions?
|
|
259
|
-
- If findings exist, produce Fix Instructions with Root Cause, Fix Strategy, and Verification criteria
|
|
260
|
-
- Verdict: PASS / PASS_WITH_WARNINGS / NEEDS_FIXES
|
|
261
|
-
2. **Run full test suite one final time**: All tests must pass
|
|
262
|
-
3. **Handle review results**:
|
|
263
|
-
- **PASS / PASS_WITH_WARNINGS**: Proceed to Phase 5
|
|
264
|
-
- **NEEDS_FIXES**: Return to Phase 3 following Fix Instructions (max 2 review rounds)
|
|
243
|
+
3. **Validate output**:
|
|
244
|
+
- Confirm `refactor-list.json` exists
|
|
245
|
+
- Show summary: total refactor items, complexity distribution, dependencies
|
|
265
246
|
|
|
266
|
-
**CHECKPOINT CP-RW-
|
|
247
|
+
**CHECKPOINT CP-RW-1**: `refactor-list.json` generated and validated.
|
|
248
|
+
|
|
249
|
+
**If user says `--from <file>`**: Skip Phase 1 and Phase 2 entirely.
|
|
267
250
|
|
|
268
251
|
---
|
|
269
252
|
|
|
270
|
-
## Phase
|
|
271
|
-
|
|
272
|
-
**Goal**:
|
|
273
|
-
|
|
274
|
-
**STEPS
|
|
275
|
-
|
|
276
|
-
1. **
|
|
277
|
-
- Ask user: "Refactoring complete and all tests pass. Would you like to verify before committing?"
|
|
278
|
-
- **(a) Run the app** — Start dev server for manual verification
|
|
279
|
-
- **(b) Run a specific command** — Specify a test or script
|
|
280
|
-
- **(c) Skip** — Proceed to commit (tests already pass)
|
|
281
|
-
- If user reports issues: return to Phase 3
|
|
282
|
-
2. **Invoke `/prizmkit-retrospective`** (Job 1: structural sync only):
|
|
283
|
-
- Update KEY_FILES/INTERFACES/DEPENDENCIES in affected `.prizm-docs/` files
|
|
284
|
-
- Skip knowledge injection unless refactoring revealed a genuinely new pitfall (e.g. a non-obvious coupling)
|
|
285
|
-
- If structural changes are significant (module split/merge), update L1 doc
|
|
286
|
-
- Stage doc changes: `git add .prizm-docs/`
|
|
287
|
-
3. **Invoke `/prizmkit-committer`**:
|
|
288
|
-
- Commit message: `refactor(<scope>): <description>`
|
|
289
|
-
- Include all refactored code + any test updates
|
|
290
|
-
- Do NOT push
|
|
291
|
-
4. **Ask merge preference**:
|
|
253
|
+
## Phase 3: Launch
|
|
254
|
+
|
|
255
|
+
**Goal**: Start the refactoring pipeline.
|
|
256
|
+
|
|
257
|
+
**STEPS**:
|
|
258
|
+
|
|
259
|
+
1. **Show refactor summary** before launching:
|
|
292
260
|
```
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
261
|
+
Ready to launch pipeline with N refactor items:
|
|
262
|
+
R-001: Extract auth middleware (medium complexity)
|
|
263
|
+
R-002: Decouple notification service (high complexity)
|
|
264
|
+
R-003: Simplify token flow (low complexity)
|
|
265
|
+
|
|
266
|
+
Proceed? (Y/n)
|
|
298
267
|
```
|
|
299
|
-
|
|
268
|
+
|
|
269
|
+
2. **Invoke `refactor-pipeline-launcher` skill**:
|
|
270
|
+
- The launcher handles all prerequisites checks
|
|
271
|
+
- The launcher presents execution mode choices to the user (foreground/background/manual)
|
|
272
|
+
- Do NOT duplicate execution mode selection here — let the launcher handle it
|
|
273
|
+
- Returns PID/status and log file location
|
|
274
|
+
|
|
275
|
+
3. **Verify launch success**:
|
|
276
|
+
- Confirm pipeline is running
|
|
277
|
+
- Record PID and log path for Phase 4
|
|
278
|
+
|
|
279
|
+
**CHECKPOINT CP-RW-2**: Pipeline launched successfully.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Phase 4: Monitor
|
|
284
|
+
|
|
285
|
+
**Goal**: Track pipeline progress and report to user.
|
|
286
|
+
|
|
287
|
+
**STEPS**:
|
|
288
|
+
|
|
289
|
+
1. **Initial status check**:
|
|
300
290
|
```bash
|
|
301
|
-
|
|
302
|
-
git merge refactor/<slug>
|
|
303
|
-
git branch -d refactor/<slug>
|
|
291
|
+
dev-pipeline/launch-refactor-daemon.sh status
|
|
304
292
|
```
|
|
305
|
-
6. **If (b)**: Inform user: "Branch `refactor/<slug>` retained. Create a PR when ready."
|
|
306
293
|
|
|
307
|
-
|
|
294
|
+
2. **Offer monitoring options**:
|
|
295
|
+
- "I'll check progress periodically. Say 'status' anytime for an update."
|
|
296
|
+
- "Say 'logs' to see recent activity."
|
|
297
|
+
- "Say 'stop' to pause the pipeline."
|
|
308
298
|
|
|
309
|
-
|
|
299
|
+
3. **Periodic progress reports** (when user asks):
|
|
300
|
+
```bash
|
|
301
|
+
python3 dev-pipeline/scripts/update-refactor-status.py \
|
|
302
|
+
--refactor-list refactor-list.json \
|
|
303
|
+
--state-dir dev-pipeline/refactor-state \
|
|
304
|
+
--action status
|
|
305
|
+
```
|
|
310
306
|
|
|
311
|
-
|
|
307
|
+
4. **Completion report** (when pipeline finishes all refactor items):
|
|
308
|
+
```
|
|
309
|
+
Pipeline completed: 3/3 refactor items
|
|
312
310
|
|
|
313
|
-
|
|
311
|
+
Summary:
|
|
312
|
+
- R-001: Extract auth middleware → COMMITTED (refactor(auth): extract shared middleware)
|
|
313
|
+
- R-002: Decouple notification service → COMMITTED (refactor(notifications): decouple from core)
|
|
314
|
+
- R-003: Simplify token flow → COMMITTED (refactor(auth): simplify token refresh)
|
|
314
315
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
Next steps:
|
|
317
|
+
- Review changes: git log --oneline -5
|
|
318
|
+
- Run tests: npm test
|
|
319
|
+
- Push when ready: git push
|
|
320
|
+
```
|
|
318
321
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
**CRITERIA** (ALL must be true):
|
|
322
|
-
- Single file change
|
|
323
|
-
- Estimated change < 30 lines
|
|
324
|
-
- Well-known refactoring pattern (rename, extract method/class, inline, move)
|
|
325
|
-
- No cross-module impact
|
|
326
|
-
- No dependency changes
|
|
327
|
-
|
|
328
|
-
**Fast Path implementation differs from full path:**
|
|
329
|
-
- Phase 1 Steps 1.2-1.3 are skipped (no doc collection, no parallel Agents)
|
|
330
|
-
- Step 1.1 simplified to quick confirmation of refactoring goal
|
|
331
|
-
- Step 1.4 simplified to brief scope confirmation
|
|
332
|
-
- Phase 2 is simplified: generate a lightweight plan.md with 1-2 tasks directly from refactor-analysis.md
|
|
333
|
-
- Phase 3 still reads plan.md Tasks as normal, marks tasks `[x]` on completion
|
|
334
|
-
- Single-task refactors typically have just one task in plan.md
|
|
335
|
-
|
|
336
|
-
**Fast Path still requires:**
|
|
337
|
-
- Refactor branch (Phase 0)
|
|
338
|
-
- Scope confirmation (Phase 1, simplified)
|
|
339
|
-
- refactor-analysis.md (lightweight version with baseline)
|
|
340
|
-
- plan.md (simplified, 1-2 tasks)
|
|
341
|
-
- Full test suite run after implementation
|
|
342
|
-
- Code review
|
|
343
|
-
- `refactor(<scope>):` commit convention
|
|
344
|
-
- Merge decision
|
|
322
|
+
**CHECKPOINT CP-RW-3**: All refactor items completed or user stopped pipeline.
|
|
345
323
|
|
|
346
324
|
---
|
|
347
325
|
|
|
348
326
|
## Resume — Interruption Recovery
|
|
349
327
|
|
|
350
|
-
The
|
|
328
|
+
The workflow supports resuming by detecting existing state:
|
|
329
|
+
|
|
330
|
+
| State Found | Resume From |
|
|
331
|
+
|-------------|------------|
|
|
332
|
+
| No `refactor-list.json` | Phase 1: Brainstorm |
|
|
333
|
+
| `refactor-list.json` exists, no pipeline state | Phase 3: Launch |
|
|
334
|
+
| `refactor-list.json` + pipeline state exists | Phase 4: Monitor (check status) |
|
|
335
|
+
| All refactors completed | Report completion, suggest next steps |
|
|
351
336
|
|
|
352
|
-
**
|
|
337
|
+
**Resume**: If `refactor-list.json` exists, ask user: "Existing refactor plan found with N items. Resume pipeline or re-plan?"
|
|
353
338
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
| `refactor-analysis.md` + `plan.md` | Phase 3: Implement |
|
|
360
|
-
| All docs + code changes exist | Phase 4: Review |
|
|
361
|
-
| All docs + review passed | Phase 5: Verify & Commit |
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Interaction During Pipeline
|
|
342
|
+
|
|
343
|
+
While the pipeline runs, the user can continue the conversation:
|
|
362
344
|
|
|
363
|
-
|
|
345
|
+
| User says | Action |
|
|
346
|
+
|-----------|--------|
|
|
347
|
+
| "status" / "progress" | Show current progress |
|
|
348
|
+
| "logs" | Show recent log activity |
|
|
349
|
+
| "stop" | Stop the pipeline (state preserved) |
|
|
350
|
+
| "show R-002 logs" | Show specific refactor item's session log |
|
|
364
351
|
|
|
365
352
|
---
|
|
366
353
|
|
|
367
354
|
## Error Handling
|
|
368
355
|
|
|
369
|
-
|
|
|
370
|
-
|
|
371
|
-
|
|
|
372
|
-
|
|
|
373
|
-
| No tests exist for target module | WARN user, recommend writing tests first |
|
|
374
|
-
|
|
|
375
|
-
|
|
|
376
|
-
|
|
|
377
|
-
|
|
|
378
|
-
|
|
|
379
|
-
|
|
|
380
|
-
| Performance regression detected | STOP, investigate, revise approach |
|
|
381
|
-
| Branch conflict during merge | Show conflict, ask user to resolve or keep branch |
|
|
356
|
+
| Error | Action |
|
|
357
|
+
|-------|--------|
|
|
358
|
+
| User's refactoring goal is too vague | Ask for more context: "Can you describe what's wrong with the current code structure?" |
|
|
359
|
+
| Brainstorming stalls | Offer concrete options: "Would you prefer incremental or comprehensive refactoring?" |
|
|
360
|
+
| No tests exist for target module | WARN user, recommend writing tests first before refactoring |
|
|
361
|
+
| `refactor-planner` cannot parse goals | Refine the goals summary and retry |
|
|
362
|
+
| `refactor-list.json` generation failed | Show error, retry with refined input |
|
|
363
|
+
| Pipeline launch failed | Show daemon log, suggest manual start |
|
|
364
|
+
| All refactor items blocked/failed | Show status, suggest retrying specific items |
|
|
365
|
+
| User wants to cancel mid-brainstorming | Save conversation context, offer to resume later |
|
|
366
|
+
| Behavior regression detected during pipeline | Pipeline handles per-item — failed items are retried or reported |
|
|
382
367
|
|
|
383
368
|
---
|
|
384
369
|
|
|
385
370
|
## Relationship to Other Skills
|
|
386
371
|
|
|
387
|
-
| Skill |
|
|
388
|
-
|
|
389
|
-
|
|
|
390
|
-
|
|
|
391
|
-
|
|
|
392
|
-
|
|
|
393
|
-
| `/prizmkit-committer` | Phase 5: commit with `refactor()` convention |
|
|
394
|
-
| `/prizmkit-retrospective` | Phase 5: structural sync before commit (Job 1 only, skip knowledge injection unless new pitfall) |
|
|
395
|
-
| `feature-workflow` | Handoff target when new behavior is needed |
|
|
396
|
-
| `/prizmkit-plan` | NOT used (no user stories for refactoring) |
|
|
397
|
-
| `/prizmkit-analyze` | NOT used (no spec <-> plan consistency needed) |
|
|
372
|
+
| Skill | Relationship |
|
|
373
|
+
|-------|-------------|
|
|
374
|
+
| `refactor-planner` | **Called by Phase 2** — generates refactor-list.json from clarified goals |
|
|
375
|
+
| `refactor-pipeline-launcher` | **Called by Phase 3** — starts pipeline (handles execution mode selection) |
|
|
376
|
+
| `feature-workflow` | **Alternative** — for new feature development |
|
|
377
|
+
| `bug-fix-workflow` | **Alternative** — for bug fix workflows |
|
|
398
378
|
|
|
399
379
|
---
|
|
400
380
|
|
|
401
|
-
## Comparison with
|
|
402
|
-
|
|
403
|
-
| Dimension |
|
|
404
|
-
|
|
405
|
-
|
|
|
406
|
-
|
|
|
407
|
-
|
|
|
408
|
-
|
|
|
409
|
-
|
|
|
410
|
-
|
|
|
411
|
-
|
|
|
412
|
-
|
|
|
413
|
-
|
|
|
414
|
-
|
|
415
|
-
|
|
381
|
+
## Comparison with Alternative Workflows
|
|
382
|
+
|
|
383
|
+
| Dimension | refactor-workflow | feature-workflow | bug-fix-workflow |
|
|
384
|
+
|-----------|-------------------|-----------------|------------------|
|
|
385
|
+
| **Purpose** | Code restructuring (batch) | New features (batch) | Single bug fix (interactive) |
|
|
386
|
+
| **Brainstorming** | Yes — deep interactive Q&A on refactoring goals | Yes — deep interactive Q&A on requirements | No (bug report is input) |
|
|
387
|
+
| **Planning Skill** | `refactor-planner` | `feature-planner` | None (triage built-in) |
|
|
388
|
+
| **Branch** | Pipeline manages per-refactor | Pipeline manages per-feature | `fix/<BUG_ID>-*` |
|
|
389
|
+
| **Execution** | Foreground or background daemon | Foreground or background daemon | In-session, interactive |
|
|
390
|
+
| **Input** | Rough refactoring idea or target | Rough idea or requirements | Bug report / stack trace |
|
|
391
|
+
| **Output** | Multiple `refactor()` commits | Multiple `feat()` commits | Single `fix()` commit |
|
|
392
|
+
| **Behavior Change** | Forbidden (structure only) | Expected (new functionality) | Fix behavior |
|
|
393
|
+
| **Batch alternative** | (this is the batch flow) | (this is the batch flow) | `bug-planner` + `bugfix-pipeline-launcher` |
|
|
394
|
+
|
|
395
|
+
---
|
|
416
396
|
|
|
417
397
|
## Output
|
|
418
398
|
|
|
419
|
-
-
|
|
420
|
-
- `
|
|
421
|
-
-
|
|
422
|
-
-
|
|
423
|
-
-
|
|
424
|
-
- Updated `.prizm-docs/` (
|
|
399
|
+
- Structured refactoring goals summary (Phase 1 artifact)
|
|
400
|
+
- `refactor-list.json` (Phase 2 artifact)
|
|
401
|
+
- Pipeline execution (Phase 3)
|
|
402
|
+
- Progress updates (Phase 4)
|
|
403
|
+
- Multiple git commits with `refactor(<scope>):` prefix
|
|
404
|
+
- Updated `.prizm-docs/` (via prizmkit-retrospective per refactor item)
|