prizmkit 1.1.107 → 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.
Files changed (78) hide show
  1. package/bin/create-prizmkit.js +4 -0
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/dev-pipeline/prizmkit_runtime/config.py +81 -14
  4. package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +19 -8
  5. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +0 -1
  6. package/bundled/dev-pipeline/prizmkit_runtime/launch_profiles.py +18 -0
  7. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +22 -2
  8. package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +3 -1
  9. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +20 -1
  10. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +151 -30
  11. package/bundled/dev-pipeline/scripts/continuation.py +0 -1
  12. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +6 -46
  13. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +7 -34
  14. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +40 -33
  15. package/bundled/dev-pipeline/scripts/utils.py +123 -0
  16. package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +4 -3
  17. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
  18. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +8 -7
  19. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +25 -36
  20. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +16 -31
  21. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +4 -16
  22. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -15
  23. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +14 -48
  24. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +7 -13
  25. package/bundled/dev-pipeline/templates/sections/feature-context.md +0 -4
  26. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +0 -7
  27. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +0 -7
  28. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +0 -7
  29. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +0 -14
  30. package/bundled/dev-pipeline/templates/sections/phase-commit.md +0 -14
  31. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +0 -7
  32. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +0 -2
  33. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +0 -7
  34. package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +6 -8
  35. package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +3 -7
  36. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +0 -7
  37. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +0 -7
  38. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +0 -7
  39. package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +2 -9
  40. package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +1 -8
  41. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +15 -16
  42. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +0 -7
  43. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +0 -7
  44. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +2 -9
  45. package/bundled/dev-pipeline/templates/sections/phase0-init.md +0 -7
  46. package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +2 -15
  47. package/bundled/dev-pipeline/tests/conftest.py +0 -1
  48. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +350 -23
  49. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +36 -17
  50. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +117 -14
  51. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +79 -2
  52. package/bundled/dev-pipeline/tests/test_unified_cli.py +658 -13
  53. package/bundled/skills/_metadata.json +4 -4
  54. package/bundled/skills/app-planner/SKILL.md +1 -1
  55. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
  56. package/bundled/skills/bug-fix-workflow/SKILL.md +174 -128
  57. package/bundled/skills/bug-planner/SKILL.md +101 -15
  58. package/bundled/skills/bug-planner/references/severity-rules.md +20 -8
  59. package/bundled/skills/feature-planner/SKILL.md +87 -8
  60. package/bundled/skills/feature-planner/assets/planning-guide.md +34 -10
  61. package/bundled/skills/feature-workflow/SKILL.md +100 -81
  62. package/bundled/skills/{prizm-kit → prizmkit}/SKILL.md +1 -1
  63. package/bundled/skills/prizmkit-code-review/SKILL.md +1 -1
  64. package/bundled/skills/refactor-planner/SKILL.md +88 -7
  65. package/bundled/skills/refactor-planner/references/fast-path.md +2 -1
  66. package/bundled/skills/refactor-planner/references/planning-phases.md +29 -11
  67. package/bundled/skills/refactor-workflow/SKILL.md +116 -57
  68. package/bundled/templates/project-memory-template.md +1 -1
  69. package/package.json +1 -1
  70. package/src/ai-cli-launch.js +194 -0
  71. package/src/config.js +26 -14
  72. package/src/index.js +11 -44
  73. package/src/platforms.js +10 -3
  74. package/src/prompts.js +60 -2
  75. package/src/scaffold.js +26 -14
  76. package/bundled/dev-pipeline/scripts/prizmkit-test-gate.py +0 -446
  77. package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +0 -20
  78. package/bundled/dev-pipeline/tests/test_prizmkit_test_gate.py +0 -107
@@ -1,75 +1,88 @@
1
1
  ---
2
2
  name: "feature-workflow"
3
- description: "One-stop entry point for feature development. Brainstorms requirements with the user until fully clarified, then orchestrates feature-planner feature-pipeline-launcher execution. Handles multi-feature batch development from a single request. Use this skill whenever the user wants to build an app, develop multiple features at once, or go from idea to running code in one step. Trigger on: 'build an app', 'develop features', 'implement all features', 'one-stop development', 'batch implement', 'build a new application', 'build a system', 'one-click complete', 'batch implement'."
3
+ description: "Triage-based feature workflow. Clarifies requirements, then lets the user choose Fast Path for simple current-session/current-workspace implementation or Pipeline Path for complex/batch features via feature-planner feature-pipeline-launcher. Use when the user wants to develop features from idea to running code with the right execution path for the task difficulty. Trigger on: 'build an app', 'develop features', 'implement all features', 'one-stop development', 'batch implement', 'build a new application', 'build a system', 'one-click complete'."
4
4
  ---
5
5
 
6
6
  # Feature Workflow
7
7
 
8
- One-stop entry point for feature development. Covers the complete journey from a vague idea to running code: deep requirement brainstorming structured planning autonomous pipeline execution.
8
+ Triage-based entry point for feature development. The workflow clarifies requirements, assesses task difficulty, asks the user to choose an approach, then follows one of two paths:
9
+
10
+ - **Fast Path** — simple feature work is implemented directly in the **current session** and **current workspace** with the normal PrizmKit lifecycle commands.
11
+ - **Pipeline Path** — complex or batch features are planned with `feature-planner`, launched with `feature-pipeline-launcher`, then monitored.
12
+
13
+ This skill keeps Fast Path and Pipeline Path separate. Pipeline monitoring only happens after the user selects Pipeline Path and the launcher starts execution.
9
14
 
10
15
  ## When to Use
11
16
 
12
17
  User says:
13
18
  - "Build a new application", "Build XXX system", "Create a project"
19
+ - "Implement this feature now", "Add this simple feature", "Build one small workflow"
14
20
  - "One-click complete these features", "Batch implement these requirements"
15
- - "Build a task management App from scratch"
16
21
  - "Help me implement user login, registration, and avatar upload features"
17
- - After receiving a batch of related feature requests
22
+ - After receiving either one scoped feature request or a batch of related feature requests
18
23
 
19
24
  **Do NOT use this skill when:**
20
- - User only wants to plan features (use `feature-planner` directly)
21
- - User only wants to launch pipeline for existing .prizmkit/plans/feature-list.json (use `feature-pipeline-launcher`)
22
- - User wants to fix bugs (use `bug-planner` + `bugfix-pipeline-launcher`)
23
- - User wants to refactor code (use `refactor-workflow`)
25
+ - User only wants to plan features without execution → use `feature-planner` directly
26
+ - User only wants to launch an existing `.prizmkit/plans/feature-list.json` use `feature-pipeline-launcher`
27
+ - User wants to fix bugs use `bug-fix-workflow` or `bug-planner` + `bugfix-pipeline-launcher`
28
+ - User wants to refactor code use `refactor-workflow`
24
29
 
25
30
  ---
26
31
 
27
32
  ## Overview
28
33
 
29
- Given an idea or requirements, the workflow runs four phases:
34
+ The shared contract is:
35
+
36
+ 1. **Brainstorm** — collect reference materials, deep read relevant code/docs, and clarify requirements.
37
+ 2. **Assess difficulty** — decide whether the request is simple enough for Fast Path or should use Pipeline Path.
38
+ 3. **AskUserQuestion approach selection** — present selectable options; never silently choose the path.
39
+ 4. **Execute selected path**:
40
+ - **Fast Path**: `/prizmkit-plan` → `/prizmkit-implement` → `/prizmkit-code-review` → `/prizmkit-retrospective` → `/prizmkit-committer` in the current workspace.
41
+ - **Pipeline Path**: `feature-planner` → `feature-pipeline-launcher` → monitoring.
30
42
 
31
- 1. **Brainstorm** — collect reference materials, parallel deep read code & docs, discuss requirements grounded in real context → fully clarified requirements
32
- 2. **Plan** — call `feature-planner` with clarified requirements → `.prizmkit/plans/feature-list.json` with N features
33
- 3. **Launch** — call `feature-pipeline-launcher` → pipeline started (execution mode chosen by user via launcher)
34
- 4. **Monitor** — track progress → status updates, completion report
43
+ ### Terminology
35
44
 
36
- The value: the user starts from a rough idea, the skill brainstorms to fill the gaps, and planning + execution happen automatically — no need to manually invoke each planner/launcher and poll for progress.
45
+ | Term | Meaning |
46
+ |------|---------|
47
+ | **Fast Path** | Current-session/current-workspace feature implementation for simple, scoped work. It does not create or consume `.prizmkit/plans/feature-list.json` and does not start the dev-pipeline. |
48
+ | **Pipeline Path** | Complex or batch feature execution. Planner handoff goes to `feature-planner`; launcher handoff goes to `feature-pipeline-launcher`; monitoring follows only after launch. |
49
+ | **Current session** | The interactive AI CLI session that is already talking with the user. |
50
+ | **Current workspace** | The current git checkout and working tree, not a background pipeline worktree/session. |
51
+ | **Monitoring** | Status/log follow-up for a launched pipeline; it is not part of the Fast Path. |
37
52
 
38
- ### Branch Management
53
+ ### Workspace and Branch Model
39
54
 
40
- The dev-pipeline handles branch management per-feature automatically:
41
- - Each feature is implemented on its own branch by the pipeline
42
- - Branches are created, committed, and managed by the pipeline session
43
- - This workflow does NOT create a top-level branch — the pipeline manages granular per-feature branches
55
+ - **Fast Path**: work happens in the current workspace and current interactive session. Use the current branch unless the project policy or user explicitly asks to create a branch.
56
+ - **Pipeline Path**: `feature-pipeline-launcher` and the dev-pipeline manage per-feature branches/worktrees. This workflow does not create a top-level branch before handing off to the launcher.
44
57
 
45
58
  ---
46
59
 
47
60
  ## Input Modes
48
61
 
49
- **Mode A: From natural language requirements** (default)
62
+ **Mode A: Natural language requirements** (default)
50
63
 
51
- Natural language description of the project or features. Can be:
64
+ Natural language description of the project or feature(s). Can be:
65
+ - A single simple feature: "Add CSV export to the reports page"
52
66
  - A project vision: "Build a task management App with user login, task CRUD, and task categories"
53
- - A batch of features: "Implement user registration, login, and password recovery features"
67
+ - A batch of features: "Implement user registration, login, and password recovery"
54
68
  - An incremental request: "Add user avatar upload and nickname modification to the existing system"
55
69
 
56
- Flow: brainstorm → feature-plannerfeature-pipeline-launchermonitor
70
+ Flow: brainstorm → complexity assessment AskUserQuestionFast Path or Pipeline Path.
57
71
 
58
- **Mode B: From existing .prizmkit/plans/feature-list.json**
72
+ **Mode B: Existing `.prizmkit/plans/feature-list.json`**
59
73
 
60
- When user says "run pipeline from existing file" or .prizmkit/plans/feature-list.json already exists:
61
- - Skip brainstorm and `feature-planner` (file already exists)
74
+ When the user says "run pipeline from existing file" or `.prizmkit/plans/feature-list.json` already exists and should be executed:
75
+ - Skip brainstorm and `feature-planner`
62
76
  - Invoke `feature-pipeline-launcher` directly
63
77
  - Monitor and report progress
64
78
 
65
- **Mode C: Incremental (add to existing project)**
79
+ **Mode C: Incremental feature request**
66
80
 
67
81
  When user says "add features to existing project" or the project already has features:
68
- - Brainstorm new feature requirements with the user
69
- - Invoke `feature-planner` in incremental mode (reads existing .prizmkit/plans/feature-list.json)
70
- - Append new features to existing list
71
- - Invoke `feature-pipeline-launcher`
72
- - Monitor and report progress
82
+ - Brainstorm only the new feature requirements
83
+ - Assess whether the new scope is simple enough for Fast Path
84
+ - For simple work: use Fast Path in the current workspace
85
+ - For complex or batch work: invoke `feature-planner` in incremental mode, then `feature-pipeline-launcher`
73
86
 
74
87
  ---
75
88
 
@@ -77,7 +90,7 @@ When user says "add features to existing project" or the project already has fea
77
90
 
78
91
  **Goal**: Through interactive Q&A and deep context reading, transform the user's rough idea into fully clarified, implementation-ready requirements. This phase is the foundation for high-quality code generation — vague requirements produce vague code.
79
92
 
80
- 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. The framework strives for perfect code generation, which requires perfect understanding of requirements.
93
+ 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. The framework strives for high-quality code generation, which requires strong requirement understanding.
81
94
 
82
95
  ### Step 1.1: Understand the User's Vision
83
96
 
@@ -133,66 +146,69 @@ Once brainstorming is complete, produce a structured requirements summary. Read
133
146
 
134
147
  ### Step 1.7: Complexity Assessment & Approach Selection
135
148
 
136
- After confirming requirements, assess whether this feature needs the full pipeline or can be done directly in the current session.
149
+ After confirming requirements, assess whether this feature needs the Pipeline Path or can be done directly in the current session/current workspace.
137
150
 
138
- **Simple feature** (Fast Path candidate ALL must be true):
151
+ **Simple feature work → Fast Path candidate** (ALL must be true):
139
152
  - Single module, no cross-module architectural impact
140
153
  - ≤2 new files to create
141
154
  - No new external dependencies or infrastructure changes
142
- - Straightforward implementation (CRUD, utility, simple UI component)
155
+ - Straightforward implementation (CRUD endpoint, utility, simple UI component, small workflow)
143
156
  - Clear acceptance criteria with existing patterns to follow
144
157
  - No dependency on other unbuilt features
145
158
 
146
- **Complex feature** (Planning Path ANY is true):
159
+ **Complex or batch features → Pipeline Path candidate** (ANY is true):
160
+ - Multiple features or batch implementation request
147
161
  - Cross-module impact (>2 modules affected)
148
162
  - New infrastructure, dependencies, or architectural patterns required
149
163
  - Multiple interrelated features with dependency ordering
150
164
  - Data model or API design decisions needed
151
165
  - Requires integration with external services
152
166
 
153
- User choice is required (mandatory) — use `AskUserQuestion` to present interactive selectable options. Adjust the question framing to the assessment: for a simple feature, "This feature appears straightforward."; for a complex feature, "This feature is complex and will benefit from structured planning."
167
+ **User choice required (mandatory)**Use `AskUserQuestion` to present interactive selectable options. Adjust the question framing to the assessment: for a simple feature, "This feature appears straightforward and can use the current-session Fast Path." For a complex or batch request, "This feature set is complex or batch-oriented and should use the Pipeline Path."
154
168
 
155
169
  ```
156
170
  AskUserQuestion:
157
- question: "How would you like to proceed?" # prefix with the framing note above
171
+ question: "How would you like to proceed?"
158
172
  header: "Approach"
159
173
  options:
160
- - label: "Implement now (fast path)"
161
- description: "Plan and implement directly in this session using /prizmkit-plan + /prizmkit-implement"
162
- - label: "Add to feature list (pipeline)"
163
- description: "Generate .prizmkit/plans/feature-list.json via feature-planner, then launch pipeline for autonomous execution"
174
+ - label: "Implement now (Fast Path — current session/current workspace)"
175
+ description: "Run /prizmkit-plan → /prizmkit-implement /prizmkit-code-review /prizmkit-retrospective /prizmkit-committer directly in this workspace"
176
+ - label: "Use Pipeline Path (feature-planner feature-pipeline-launcher)"
177
+ description: "Generate .prizmkit/plans/feature-list.json with feature-planner, then launch autonomous execution with feature-pipeline-launcher"
164
178
  ```
165
179
 
166
- - **Implement now** Fast Path Workflow:
180
+ - **Implement now (Fast Path)**:
167
181
  1. Invoke `/prizmkit-plan` with the requirements summary → generates `spec.md` + `plan.md`
168
- 2. Invoke `/prizmkit-implement` to execute the plan
169
- 3. After implementation, run `/prizmkit-code-review` for quality check
170
- 4. Commit via `/prizmkit-committer` with `feat(<scope>):` prefix
171
- 5. Run `/prizmkit-retrospective` to sync `.prizmkit/prizm-docs/`
172
- 6. End workflow — skip Phase 2/3/4
173
- - **Add to feature list** → Continue to Phase 2 (Plan via pipeline)
182
+ 2. Invoke `/prizmkit-implement` to execute the plan in the current workspace
183
+ 3. Run `/prizmkit-code-review` for quality check
184
+ 4. Run `/prizmkit-retrospective` to sync `.prizmkit/prizm-docs/`
185
+ 5. Commit via `/prizmkit-committer` with `feat(<scope>):` prefix
186
+ 6. End workflow — do not call `feature-planner`, do not call `feature-pipeline-launcher`, and do not enter monitoring
187
+ - **Use Pipeline Path** → Continue to Phase 2 (Planner handoff)
174
188
 
175
189
  Never proceed without explicit user confirmation via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.
176
190
 
177
- **CHECKPOINT CP-FW-0.5**: Approach selected by user (fast path or pipeline).
191
+ **CHECKPOINT CP-FW-0.5**: Approach selected by user (Fast Path or Pipeline Path).
178
192
 
179
193
  ---
180
194
 
181
- ## Phase 2: Plan
195
+ ## Phase 2: Plan — Pipeline Path Only
196
+
197
+ **Goal**: Generate structured `.prizmkit/plans/feature-list.json` from the clarified requirements.
182
198
 
183
- **Goal**: Generate structured .prizmkit/plans/feature-list.json from the clarified requirements.
199
+ Run this phase only when the user selected Pipeline Path or provided a batch/complex request that they chose to send through the pipeline.
184
200
 
185
201
  **STEPS**:
186
202
 
187
- 1. **Invoke `feature-planner` skill** with the full requirements summary from Phase 1:
203
+ 1. **Planner handoff — invoke `feature-planner`** with the full requirements summary from Phase 1:
188
204
  - Pass the structured requirements summary as input — NOT the raw user conversation
189
205
  - For new projects: standard planning mode
190
206
  - For existing projects with `--incremental`: incremental planning mode
191
207
  - **Input**: Markdown requirements summary (feature descriptions, goals, constraints)
192
208
  - **Output**: `.prizmkit/plans/feature-list.json` (schema: `dev-pipeline-feature-list-v1`) containing `project_name`, `features[]` with id (F-NNN), title, description, priority, dependencies, acceptance_criteria, status
193
209
 
194
- 2. **Interactive planning** (if feature-planner requires clarification):
195
- - Because Phase 1 was thorough, feature-planner should need minimal clarification
210
+ 2. **Interactive planning** (if `feature-planner` requires clarification):
211
+ - Because Phase 1 was thorough, `feature-planner` should need minimal clarification
196
212
  - If questions arise, answer from the Phase 1 context or pass through to user
197
213
 
198
214
  3. **Validate output**:
@@ -201,19 +217,19 @@ Never proceed without explicit user confirmation via `AskUserQuestion`. Do NOT r
201
217
 
202
218
  **CHECKPOINT CP-FW-1**: `.prizmkit/plans/feature-list.json` generated and validated.
203
219
 
204
- **If user says `--from <file>`**: Skip Phase 1 and Phase 2 entirely.
220
+ **If user says `--from <file>`**: Skip Phase 1 and Phase 2 entirely and go to Phase 3.
205
221
 
206
222
  ---
207
223
 
208
- ## Phase 3: Launch
224
+ ## Phase 3: Launch — Pipeline Path Only
209
225
 
210
- **Goal**: Start the development pipeline.
226
+ **Goal**: Start the development pipeline after planner handoff has produced a validated feature list.
211
227
 
212
228
  **STEPS**:
213
229
 
214
230
  1. **Show feature summary** before launching:
215
231
  ```
216
- Ready to launch pipeline with N features:
232
+ Ready to launch Pipeline Path with N features:
217
233
  F-001: User authentication (high complexity)
218
234
  F-002: Task CRUD (medium complexity)
219
235
  F-003: Task categories (low complexity)
@@ -221,9 +237,9 @@ Never proceed without explicit user confirmation via `AskUserQuestion`. Do NOT r
221
237
  Proceed? (Y/n)
222
238
  ```
223
239
 
224
- 2. **Invoke `feature-pipeline-launcher` skill**:
240
+ 2. **Launcher handoff — invoke `feature-pipeline-launcher`**:
225
241
  - **Input**: Path to validated `.prizmkit/plans/feature-list.json`
226
- - The launcher handles all prerequisites checks
242
+ - The launcher handles all prerequisite checks
227
243
  - The launcher presents execution mode choices to the user (foreground/background/manual)
228
244
  - The launcher asks whether to enable Critic Agent (adversarial review) — passes `--critic` flag if chosen
229
245
  - Do NOT duplicate execution mode or critic selection here — let the launcher handle it
@@ -237,9 +253,9 @@ Never proceed without explicit user confirmation via `AskUserQuestion`. Do NOT r
237
253
 
238
254
  ---
239
255
 
240
- ## Phase 4: Monitor
256
+ ## Phase 4: Monitor — Pipeline Path Only
241
257
 
242
- **Goal**: Track pipeline progress and report to user.
258
+ **Goal**: Track pipeline progress and report to user. Monitoring applies only after `feature-pipeline-launcher` has started a pipeline.
243
259
 
244
260
  **STEPS**:
245
261
 
@@ -282,13 +298,14 @@ Never proceed without explicit user confirmation via `AskUserQuestion`. Do NOT r
282
298
  The workflow supports resuming by detecting existing state:
283
299
 
284
300
  | State Found | Resume From |
285
- |-------------|------------|
286
- | No `.prizmkit/plans/feature-list.json` | Phase 1: Brainstorm |
301
+ |-------------|-------------|
302
+ | Fast Path `spec.md` + `plan.md` exist, code not committed | Resume `/prizmkit-implement` / review / retrospective / commit based on current state |
303
+ | No `.prizmkit/plans/feature-list.json` and no Fast Path artifacts | Phase 1: Brainstorm |
287
304
  | `.prizmkit/plans/feature-list.json` exists, no pipeline state | Phase 3: Launch |
288
305
  | `.prizmkit/plans/feature-list.json` + pipeline state exists | Phase 4: Monitor (check status) |
289
306
  | All features completed | Report completion, suggest next steps |
290
307
 
291
- **Resume**: If `.prizmkit/plans/feature-list.json` exists, ask user: "Existing feature plan found with N features. Resume pipeline or re-plan?"
308
+ **Resume**: If `.prizmkit/plans/feature-list.json` exists, ask user: "Existing feature plan found with N features. Resume Pipeline Path or re-plan?" If Fast Path artifacts exist, ask whether to continue the current-workspace implementation or discard/re-plan.
292
309
 
293
310
  ---
294
311
 
@@ -311,6 +328,7 @@ While the pipeline runs, the user can continue the conversation:
311
328
  |-------|--------|
312
329
  | User's idea is too vague to brainstorm | Ask for more context: "Can you describe the main problem this solves?" |
313
330
  | Brainstorming stalls | Offer concrete options: "Would you prefer A or B?" |
331
+ | Fast Path starts looking complex | Pause and ask whether to switch to Pipeline Path (`feature-planner` → `feature-pipeline-launcher`) |
314
332
  | `feature-planner` cannot parse requirements | Refine the requirements summary and retry |
315
333
  | `.prizmkit/plans/feature-list.json` generation failed | Show error, retry with refined input |
316
334
  | Pipeline launch failed | Show daemon log, suggest manual start with `python3 ./.prizmkit/dev-pipeline/cli.py feature run .prizmkit/plans/feature-list.json` or `python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json` |
@@ -319,15 +337,18 @@ While the pipeline runs, the user can continue the conversation:
319
337
 
320
338
  ---
321
339
 
322
- ## Relationship to Other Skills
340
+ ## HANDOFF
323
341
 
324
- | Skill | Relationship |
325
- |-------|-------------|
326
- | `feature-planner` | **Called by Phase 2** generates .prizmkit/plans/feature-list.json from clarified requirements |
327
- | `feature-pipeline-launcher` | **Called by Phase 3** starts pipeline (handles execution mode selection) |
328
- | `bug-planner` | **Alternative** for bug fix workflows |
329
- | `bugfix-pipeline-launcher` | **Alternative** for bug fix pipelines |
330
- | `refactor-workflow` | **Alternative** for code restructuring |
342
+ | From | To | Condition |
343
+ |------|----|-----------|
344
+ | **this skill** | `/prizmkit-plan` | User selects Fast Path for simple feature work in the current workspace |
345
+ | **this skill** | `/prizmkit-implement` | Fast Path plan is ready for current-session implementation |
346
+ | **this skill** | `/prizmkit-code-review` | Fast Path implementation is complete and needs quality review |
347
+ | **this skill** | `/prizmkit-retrospective` | Fast Path feature changes need `.prizmkit/prizm-docs/` sync before commit |
348
+ | **this skill** | `/prizmkit-committer` | Fast Path feature changes are reviewed and docs are synced |
349
+ | **this skill** | `feature-planner` | User selects Pipeline Path for complex or batch features |
350
+ | `feature-planner` | `feature-pipeline-launcher` | Planner handoff produced validated `.prizmkit/plans/feature-list.json` |
351
+ | `feature-pipeline-launcher` | **this skill** | Launcher handoff completed and monitoring/status follow-up is needed |
331
352
 
332
353
  ---
333
354
 
@@ -343,9 +364,7 @@ All internal asset paths use `${SKILL_DIR}` placeholder for cross-IDE compatibil
343
364
 
344
365
  ## Output
345
366
 
346
- - Structured requirements summary (Phase 1 artifact)
347
- - `.prizmkit/plans/feature-list.json` (Phase 2 artifact)
348
- - Pipeline execution (Phase 3)
349
- - Progress updates (Phase 4)
350
- - Multiple git commits with `feat(<scope>):` prefix
351
- - Updated `.prizmkit/prizm-docs/` (via prizmkit-retrospective per feature)
367
+ Output depends on the selected path:
368
+
369
+ - **Fast Path**: `spec.md` + `plan.md`, current-workspace code changes, `/prizmkit-code-review` result, updated `.prizmkit/prizm-docs/`, and one `feat(<scope>):` commit from `/prizmkit-committer`.
370
+ - **Pipeline Path**: structured requirements summary, `.prizmkit/plans/feature-list.json`, pipeline execution via `feature-pipeline-launcher`, monitoring updates, and per-feature commits managed by the dev-pipeline.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: "prizm-kit"
2
+ name: "prizmkit"
3
3
  description: "Full-lifecycle dev toolkit index. Routes to the right PrizmKit skill for spec-driven development, Prizm docs, code quality, deployment, and knowledge management. Use when the user asks 'which command?', 'help', 'how do I start a feature', 'get started', 'what tools', 'dev workflow', 'lifecycle', or '/prizmkit'. Use this as the entry point for the full PrizmKit development lifecycle. (project)"
4
4
  ---
5
5
 
@@ -115,7 +115,7 @@ When Python is unavailable, apply these rules exactly — they match the script'
115
115
 
116
116
  ### Step 1: Spawn Reviewer Agent
117
117
 
118
- Include the dev rules read in Phase 0 step 4 and the workspace diff/status captured in Phase 0 step 5 in the Reviewer prompt. In Claude Code, spawn the dedicated PrizmKit Reviewer with `subagent_type: prizm-dev-team-reviewer` and `run_in_background=false`. Do not route the PrizmKit reviewer flow through `Explore` or a generic code-explorer agent. If the current platform has no dedicated Reviewer agent, perform the review pass in the Main Agent without editing files during that pass. Read `${SKILL_DIR}/references/reviewer-agent-prompt.md` for the full prompt template — fill `{goals}`, `{plan decisions}`, `{scoped test report}`, `{workspace context}`, `{dev rules}`, `{round N}`, and `{round_context}` before spawning.
118
+ Include the dev rules read in Phase 0 step 4 and the workspace diff/status captured in Phase 0 step 5 in the Reviewer prompt. In Claude Code, spawn the dedicated PrizmKit Reviewer with `subagent_type: prizm-dev-team-reviewer`, `run_in_background=false`, and default/no worktree isolation. Do not request worktree isolation; this prevents AI tool-created `.claude/worktrees/...` subagent worktrees. PrizmKit pipeline-managed linked git worktrees under `.prizmkit/state/worktrees/...` are separate and controlled by `USE_WORKTREE`. Do not route the PrizmKit reviewer flow through `Explore` or a generic code-explorer agent. If the current platform has no dedicated Reviewer agent, perform the review pass in the Main Agent without editing files during that pass. Read `${SKILL_DIR}/references/reviewer-agent-prompt.md` for the full prompt template — fill `{goals}`, `{plan decisions}`, `{scoped test report}`, `{workspace context}`, `{dev rules}`, `{round N}`, and `{round_context}` before spawning.
119
119
 
120
120
  Round context varies by round:
121
121
  - Round 1: "This is the first review. Examine all changes comprehensively."
@@ -51,9 +51,22 @@ When the user provides detailed specifications, rules, or implementation require
51
51
  1. **Verbatim preservation**: The user's exact wording MUST be preserved in `description` and `acceptance_criteria` fields. Do NOT paraphrase, summarize, abstract, or simplify.
52
52
  2. **No autonomous simplification**: A 200-word user specification must NOT become a 30-word description. Match the detail level of the user's input.
53
53
  3. **Clarify, don't assume**: If any user-provided rule is ambiguous or potentially conflicts with another, ASK the user to clarify. No limit on clarification rounds. Do NOT proceed with unresolved ambiguities.
54
- 4. **Populate `user_context`**: ALL user-provided materials (supplementary content, rules, file path references) MUST be written into the `user_context` array of each refactor item in the generated `.prizmkit/plans/refactor-list.json`. Format:
55
- - Supplementary content or rules store as-is (verbatim text)
56
- - File references store as path string, e.g. `src/auth/login.ts:42-78` or `src/utils/validate.ts — focus on validateEmail function`
54
+ 4. **Task-scoped `user_context`**: In single-refactor planning, write the relevant user-provided materials into that refactor item's `user_context`. In multi-refactor planning, multi-refactor `user_context` must contain only the user text, file references, goals, and constraints relevant to that specific refactor item.
55
+ - Preserve the matching user wording verbatim, but scope it to the item it belongs to.
56
+ - Do NOT copy the full multi-refactor request into every item.
57
+ - Ensure there are no unrelated sibling refactor goals, target files, constraints, desired end states, or supplementary materials in a refactor item's `user_context`.
58
+ - Shared global context may be copied to every item only when it is explicitly applicable to all generated items.
59
+ - If a goal, constraint, target file, or architecture note applies to only one refactor item, attach it only to that matching item.
60
+ - If applicability is unclear, ask the user to map the material to the correct refactor item before generating the final list.
61
+ 5. **`user_context` format**:
62
+ - Refactor-specific supplementary content, goals, or constraints → store as-is (verbatim text) on the matching refactor item only
63
+ - Refactor-specific file references → store as path string, e.g. `src/auth/login.ts:42-78` or `src/utils/validate.ts — focus on validateEmail function`
64
+ - Truly shared global constraints → repeat only when they apply to every generated refactor item
65
+
66
+ **Multi-refactor isolation example:**
67
+ - User request includes: `Refactor A: extract auth validation into middleware`, `Refactor B: split dashboard chart utilities`, and `Shared: preserve all public APIs`.
68
+ - The auth middleware refactor `user_context` includes `Refactor A: extract auth validation into middleware` and the shared API constraint; it MUST NOT include `Refactor B: split dashboard chart utilities`.
69
+ - The chart utilities refactor `user_context` includes `Refactor B: split dashboard chart utilities` and the shared API constraint; it MUST NOT include `Refactor A: extract auth validation into middleware`.
57
70
 
58
71
  ## When to Use
59
72
  - "Plan refactoring", "Scope a restructuring"
@@ -252,10 +265,13 @@ See `${SKILL_DIR}/references/planning-phases.md` for the full 5-step review chec
252
265
  ```
253
266
  The script fills in defaults (`$schema`, `created_at`, `created_by`), validates all fields, and writes the final file only if validation passes.
254
267
  3. If validation fails -> fix the draft and retry (max 3 attempts)
255
- 4. If validation passes -> present final summary
268
+ 4. If validation passes -> run the mandatory Post-Generation Plan Review Gate (see §Post-Generation Plan Review Gate below); apply accepted fixes to the draft/source plan, regenerate, and revalidate until pass
269
+ 5. If review and validation pass -> present final summary
256
270
 
257
271
  **CHECKPOINT CP-RP-6**: `.prizmkit/plans/refactor-list.json` generated and validated.
258
272
 
273
+ **CHECKPOINT CP-RP-7**: `/prizmkit-code-review` reviewed only newly added/changed refactor entries; accepted fixes were regenerated and revalidated.
274
+
259
275
  ## Checkpoints (Mandatory Gates)
260
276
 
261
277
  | Checkpoint | Artifact/State | Criteria | Phase |
@@ -267,6 +283,32 @@ See `${SKILL_DIR}/references/planning-phases.md` for the full 5-step review chec
267
283
  | **CP-RP-4** | Items Confirmed | User confirmed/modified/skipped each item | 5 |
268
284
  | **CP-RP-5** | Completeness OK | DAG valid, preservation strategies declared, no gaps | 6 |
269
285
  | **CP-RP-6** | Output Valid | `.prizmkit/plans/refactor-list.json` passes validation script | 7 |
286
+ | **CP-RP-7** | Plan Review Passed | `/prizmkit-code-review` reviewed only newly added/changed refactor entries; accepted fixes were regenerated and revalidated | 7 |
287
+
288
+ ## Post-Generation Plan Review Gate
289
+
290
+ User requirement preserved verbatim: `每次完成任务规划的时候,应该调用/prizmkit-code-review 对新增的计划内容进行review,确保生成新增的计划的正确行和完整性。`
291
+
292
+ Run this gate **after** `.prizmkit/plans/refactor-list.json` passes the validation/generate script and **before** the final handoff summary recommends `refactor-pipeline-launcher`. This gate applies to full workflow, Mode B from analysis, and fast-path refactor planning.
293
+
294
+ 1. **Identify review scope**: compare the final validated refactor list against the pre-session list when one existed. Review only newly added or changed refactor entries. Do not re-review unchanged historical entries except when needed to verify dependency references or behavior-preservation interactions.
295
+ 2. **Invoke `/prizmkit-code-review` as a planning-quality gate** with an explicit prompt that this is a refactor-plan-entry review, not an implementation review. The review must check:
296
+ - schema correctness and compatibility with `dev-pipeline-refactor-list-v1`
297
+ - dependency/DAG soundness, including safe behavior-preserving order
298
+ - description completeness and headless execution readiness
299
+ - acceptance criteria specificity and measurable behavior-preservation verification
300
+ - `behavior_preservation` strategy quality and target scope consistency
301
+ - preservation of user-provided wording in `description`, `acceptance_criteria`, and `user_context`
302
+ - task-scoped `user_context` isolation: no unrelated sibling refactor goals, target files, constraints, or supplementary materials, and shared context appears on multiple items only when explicitly global
303
+ - priority/complexity calibration: every reviewed refactor has a short priority rationale and complexity rationale, medium/low assignments are allowed when criteria fit, and high/high is not used merely because the work is cleanup, framework-related, multi-file, or user-requested
304
+ 3. **Keep the review planning-only**: do NOT start `refactor-pipeline-launcher`, do NOT run the refactor pipeline, do NOT run tests/builds/installs, and do NOT implement source-code refactors.
305
+ 4. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/refactor-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
306
+ ```bash
307
+ python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py generate --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
308
+ ```
309
+ Do not hand-patch the final JSON as the source of truth; map final-output findings back to draft entries before regeneration.
310
+ 5. **Revalidate after every accepted fix batch**: the generate script must pass again before the planner can proceed. If validation fails, fix the draft and rerun until pass.
311
+ 6. **Report the gate outcome** in the final summary: include `/prizmkit-code-review` verdict, reviewed refactor IDs, accepted fixes (or "none"), and final validation result.
270
312
 
271
313
  ## Output Rules
272
314
 
@@ -307,6 +349,44 @@ Browser verification is a feature-pipeline capability only. Refactors use `behav
307
349
 
308
350
  ---
309
351
 
352
+ ## Priority and Complexity Calibration (Mandatory)
353
+
354
+ Refactor planning must not collapse into uniform `Priority: high` and `Complexity: high`. Refactoring work can be low or medium priority even when it touches several files. Do not use high/high merely because code needs cleanup, the user cares about maintainability, the target is framework code, or multiple files are involved.
355
+
356
+ ### Priority Rubric
357
+
358
+ | Priority | Use When | Do NOT Use Merely Because |
359
+ |----------|----------|---------------------------|
360
+ | `critical` | Behavior-preserving restructure is required to unblock an imminent release, security/compliance fix, or safe migration with no acceptable workaround. | The refactor is large or architectural in wording. |
361
+ | `high` | Current structure blocks core feature delivery, creates ongoing correctness/security/data-risk, prevents supported runtime upgrades, or many downstream tasks cannot proceed. | The code is messy, multi-file, or important to the user. |
362
+ | `medium` | Refactor improves maintainability, testability, or dependency boundaries for planned work but does not block current operation. | Medium is the normal default for useful refactors. |
363
+ | `low` | Local cleanup, rename, simplification, documentation-oriented organization, or isolated code-health improvement with low behavior risk. | Small scope alone does not make it low if it blocks a high-impact outcome. |
364
+
365
+ ### Complexity Rationale Rules
366
+
367
+ Assign complexity from concrete refactor scope indicators and include a short rationale:
368
+ - file count and expected import/update sites
369
+ - cross-module scope and dependency depth
370
+ - public API/interface or import-path change
371
+ - existing test coverage and behavior-preservation strategy
372
+ - behavior-preservation risk and snapshot/manual verification needs
373
+ - migration impact, rollout phases, or compatibility shims
374
+
375
+ Use `low` for 1-3 files in one module with good tests and no public API/import-path change. Use `medium` for 4-8 files or two modules with bounded public impact and clear behavior-preservation tests. Use `high` only for 9+ files, 3+ modules, public API/import-path migration, weak test coverage, manual preservation risk, or cross-module migration impact.
376
+
377
+ ### Required Planning Review Summary
378
+
379
+ Before writing `.prizmkit/plans/refactor-list.json`, show a calibration table with rationale columns:
380
+
381
+ ```
382
+ ID | Title | Priority | Priority Rationale | Complexity | Complexity Rationale
383
+ R-001 | Break auth/user cycle | high | Blocks feature work; core risk | high | 3 modules + public imports + weak tests
384
+ R-002 | Extract chart format helpers | medium | Maintainability for planned UI | medium | 5 files; bounded helper API; tests exist
385
+ R-003 | Rename local temp variable | low | Local readability only | low | One file; no interface or behavior change
386
+ ```
387
+
388
+ Anti-pattern rule: do not assign every generated item `Priority: high` and `Complexity: high` unless each item independently satisfies the documented high-priority and high-complexity criteria and the rationale names those criteria.
389
+
310
390
  ## Refactoring-Specific Features
311
391
 
312
392
  ### Behavior Preservation Check
@@ -319,7 +399,7 @@ Auto-detect inter-item dependencies and enforce safe ordering. Read `${SKILL_DIR
319
399
 
320
400
  ### Complexity Assessment
321
401
 
322
- Assess each item's complexity based on file count, cross-module scope, test coverage, and pattern familiarity. Read `${SKILL_DIR}/references/planning-phases.md` for the full complexity assessment criteria and scoring rules.
402
+ Assess each item's complexity from concrete indicators: file count, cross-module scope, public API/import-path changes, dependency depth, test coverage, behavior-preservation risk, and migration impact. Read `${SKILL_DIR}/references/planning-phases.md` for the full complexity assessment criteria and scoring rules. Every confirmation/review summary must include a short complexity rationale.
323
403
 
324
404
  ## Next-Step Execution Policy (after planning)
325
405
 
@@ -364,9 +444,10 @@ Prevent accidental session exit without deliverable completion.
364
444
 
365
445
  ## Handoff Message Template
366
446
 
367
- After successful validation, report:
447
+ After successful validation and the Post-Generation Plan Review Gate, report:
368
448
  1. Output file path
369
449
  2. Total refactor items
370
450
  3. Dependency ordering highlights (which items must run first)
371
451
  4. Behavior preservation strategy distribution (N items with test-gate, M with snapshot, etc.)
372
- 5. Recommended next action: `refactor-pipeline-launcher`
452
+ 5. Review result: `/prizmkit-code-review` verdict, reviewed refactor IDs, accepted fixes (or "none"), and final validation result
453
+ 6. Recommended next action: `refactor-pipeline-launcher`
@@ -36,7 +36,7 @@ For simple refactoring with minimal scope.
36
36
  ```bash
37
37
  python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py generate --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
38
38
  ```
39
- 5. If valid -> summarize and recommend next step
39
+ 5. If valid -> run the mandatory Post-Generation Plan Review Gate from the main `refactor-planner` skill before summarizing or recommending `refactor-pipeline-launcher`.
40
40
  6. If invalid -> apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
41
41
 
42
42
  ## When NOT to Use Fast Path
@@ -55,5 +55,6 @@ AI: [Uses AskUserQuestion with options: "Fast-path", "Full workflow", "Implement
55
55
  User: [Selects "Fast-path"]
56
56
  AI: "Drafting R-001..."
57
57
  AI: [Validates immediately]
58
+ AI: [Runs the Post-Generation Plan Review Gate on R-001 only]
58
59
  AI: "Ready to proceed to dev-pipeline."
59
60
  ```
@@ -11,8 +11,9 @@ Read `${SKILL_DIR}/assets/planning-guide.md` for decomposition patterns and depe
11
11
  For each refactoring goal:
12
12
  1. Identify atomic refactoring operations
13
13
  2. Determine inter-item dependencies (safe renames first, structural changes later)
14
- 3. Assess complexity per item (file count, cross-module scope, test coverage)
15
- 4. Assign behavior preservation strategy per item (read `${SKILL_DIR}/references/behavior-preservation.md`)
14
+ 3. Assess complexity per item from concrete indicators (file count, cross-module scope, public API/import-path impact, dependency depth, test coverage, behavior-preservation risk, migration impact)
15
+ 4. Assign priority from concrete impact (blocked delivery, correctness/security/data risk, maintainability value, or local cleanup), not from size or user urgency alone
16
+ 5. Assign behavior preservation strategy per item (read `${SKILL_DIR}/references/behavior-preservation.md`)
16
17
 
17
18
  ---
18
19
 
@@ -26,7 +27,9 @@ Refactor Item R-001:
26
27
  Type: [extract/rename/restructure/simplify/decouple/migrate]
27
28
  Scope: [files list]
28
29
  Priority: [critical/high/medium/low]
30
+ Priority Rationale: [short concrete impact reason]
29
31
  Complexity: [low/medium/high]
32
+ Complexity Rationale: [short scope/risk reason]
30
33
  Behavior Preservation: [test-gate/snapshot/manual]
31
34
  Acceptance Criteria:
32
35
  - [criterion 1]
@@ -63,11 +66,11 @@ Continue until all items are confirmed or skipped.
63
66
  Present review summary:
64
67
 
65
68
  ```
66
- Item | Deps Valid | Preservation | Gaps | Status
67
- R-001 | OK | test-gate | - | Ready
68
- R-002 | OK | test-gate | - | Ready
69
- R-003 | OK | manual | No test coverage| Needs attention
70
- R-004 | OK | snapshot | - | Ready
69
+ Item | Priority | Priority Rationale | Complexity | Complexity Rationale | Deps Valid | Preservation | Gaps | Status
70
+ R-001 | high | Blocks core feature work | high | 3 modules + public imports | OK | test-gate | - | Ready
71
+ R-002 | medium | Planned maintainability | medium | 5 files + tests exist | OK | test-gate | - | Ready
72
+ R-003 | low | Local readability only | low | One file, no API change | OK | manual | No test coverage| Needs attention
73
+ R-004 | medium | Reduces bounded coupling | medium | 2 modules + snapshot check | OK | snapshot | - | Ready
71
74
  ```
72
75
 
73
76
  If issues found, discuss with user and resolve before proceeding.
@@ -100,13 +103,28 @@ Auto-detect inter-item dependencies and enforce safe ordering:
100
103
 
101
104
  ## Complexity Assessment
102
105
 
106
+ Complexity is a behavior-preserving execution risk estimate, not a measure of how much the user wants the refactor. Do not default to high because a refactor spans multiple files, targets framework code, or improves maintainability.
107
+
103
108
  Assess each item's complexity based on:
104
- - **File count**: 1-2 files = low, 3-5 files = medium, 6+ files = high
109
+ - **File count**: 1-3 files = low, 4-8 files = medium, 9+ files = high
105
110
  - **Cross-module scope**: same module = low, 2 modules = medium, 3+ modules = high
106
- - **Test coverage**: high coverage = reduces complexity, low coverage = increases complexity
107
- - **Pattern familiarity**: well-known pattern = low, novel restructuring = high
111
+ - **Public API/import-path impact**: no public change = low, bounded internal interface = medium, public API/import migration = high
112
+ - **Dependency depth**: 0-2 import/update sites = low, 3-5 = medium, 6+ = high
113
+ - **Test coverage**: strong existing tests can keep complexity lower; weak/missing tests increase complexity
114
+ - **Behavior-preservation risk**: test-gate with clear assertions = lower, snapshot/manual verification = higher
115
+ - **Migration impact**: no rollout = low, compatibility shim = medium, cross-module migration or phased rollout = high
116
+
117
+ Take the highest well-supported individual assessment as the item's complexity, then record the rationale in the confirmation table.
118
+
119
+ ### Mixed Calibration Examples
120
+
121
+ | Refactor | Priority | Complexity | Rationale |
122
+ |----------|----------|------------|-----------|
123
+ | Break circular dependency blocking auth feature work | high | high | Blocks core delivery; 3 modules, public imports, and weak tests. |
124
+ | Extract chart formatting helpers from dashboard files | medium | medium | Improves planned maintainability; 5 files with bounded helper API and existing tests. |
125
+ | Rename local variable in parser for readability | low | low | Local cleanup only; one file, no interface or behavior change. |
108
126
 
109
- Take the highest of these individual assessments as the item's complexity.
127
+ Anti-pattern: do not generate an all-high refactor list unless every item independently satisfies documented high-priority and high-complexity criteria.
110
128
 
111
129
  ---
112
130