prizmkit 1.1.24 → 1.1.26

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.1.24",
3
- "bundledAt": "2026-04-12T01:13:39.954Z",
4
- "bundledFrom": "626fbf5"
2
+ "frameworkVersion": "1.1.26",
3
+ "bundledAt": "2026-04-12T02:27:49.522Z",
4
+ "bundledFrom": "c191f35"
5
5
  }
@@ -330,6 +330,8 @@ print('?')
330
330
  fi
331
331
 
332
332
  # -- Execute reset --
333
+ local _reset_tmpstderr _reset_stderr
334
+ _reset_tmpstderr=$(mktemp)
333
335
  if [[ "$DO_CLEAN" == true ]]; then
334
336
  log_info "Cleaning $CUR_BUG_ID (reset + delete artifacts)..."
335
337
  RESULT=$(python3 "$SCRIPTS_DIR/update-bug-status.py" \
@@ -337,14 +339,19 @@ print('?')
337
339
  --state-dir "$STATE_DIR" \
338
340
  --bug-id "$CUR_BUG_ID" \
339
341
  --project-root "$PROJECT_ROOT" \
340
- --action clean 2>&1)
342
+ --action clean 2>"$_reset_tmpstderr")
341
343
  else
342
344
  log_info "Resetting $CUR_BUG_ID status..."
343
345
  RESULT=$(python3 "$SCRIPTS_DIR/update-bug-status.py" \
344
346
  --bug-list "$BUG_LIST" \
345
347
  --state-dir "$STATE_DIR" \
346
348
  --bug-id "$CUR_BUG_ID" \
347
- --action reset 2>&1)
349
+ --action reset 2>"$_reset_tmpstderr")
350
+ fi
351
+ _reset_stderr=$(cat "$_reset_tmpstderr" 2>/dev/null || true)
352
+ rm -f "$_reset_tmpstderr"
353
+ if [[ -n "$_reset_stderr" ]]; then
354
+ log_warn "$_reset_stderr"
348
355
  fi
349
356
 
350
357
  # Check for errors
@@ -340,6 +340,8 @@ print('?')
340
340
  fi
341
341
 
342
342
  # ── Execute reset ──
343
+ local _reset_tmpstderr _reset_stderr
344
+ _reset_tmpstderr=$(mktemp)
343
345
  if [[ "$DO_CLEAN" == true ]]; then
344
346
  log_info "Cleaning $CUR_FEATURE_ID (reset + delete artifacts)..."
345
347
  RESULT=$(python3 "$SCRIPTS_DIR/update-feature-status.py" \
@@ -348,14 +350,19 @@ print('?')
348
350
  --feature-id "$CUR_FEATURE_ID" \
349
351
  --feature-slug "$FEATURE_SLUG" \
350
352
  --project-root "$PROJECT_ROOT" \
351
- --action clean 2>&1)
353
+ --action clean 2>"$_reset_tmpstderr")
352
354
  else
353
355
  log_info "Resetting $CUR_FEATURE_ID status..."
354
356
  RESULT=$(python3 "$SCRIPTS_DIR/update-feature-status.py" \
355
357
  --feature-list "$FEATURE_LIST" \
356
358
  --state-dir "$STATE_DIR" \
357
359
  --feature-id "$CUR_FEATURE_ID" \
358
- --action reset 2>&1)
360
+ --action reset 2>"$_reset_tmpstderr")
361
+ fi
362
+ _reset_stderr=$(cat "$_reset_tmpstderr" 2>/dev/null || true)
363
+ rm -f "$_reset_tmpstderr"
364
+ if [[ -n "$_reset_stderr" ]]; then
365
+ log_warn "$_reset_stderr"
359
366
  fi
360
367
 
361
368
  # Check for errors
@@ -328,6 +328,8 @@ print('?')
328
328
  fi
329
329
 
330
330
  # -- Execute reset --
331
+ local _reset_tmpstderr _reset_stderr
332
+ _reset_tmpstderr=$(mktemp)
331
333
  if [[ "$DO_CLEAN" == true ]]; then
332
334
  log_info "Cleaning $CUR_REFACTOR_ID (reset + delete artifacts)..."
333
335
  RESULT=$(python3 "$SCRIPTS_DIR/update-refactor-status.py" \
@@ -335,14 +337,19 @@ print('?')
335
337
  --state-dir "$STATE_DIR" \
336
338
  --refactor-id "$CUR_REFACTOR_ID" \
337
339
  --project-root "$PROJECT_ROOT" \
338
- --action clean 2>&1)
340
+ --action clean 2>"$_reset_tmpstderr")
339
341
  else
340
342
  log_info "Resetting $CUR_REFACTOR_ID status..."
341
343
  RESULT=$(python3 "$SCRIPTS_DIR/update-refactor-status.py" \
342
344
  --refactor-list "$REFACTOR_LIST" \
343
345
  --state-dir "$STATE_DIR" \
344
346
  --refactor-id "$CUR_REFACTOR_ID" \
345
- --action reset 2>&1)
347
+ --action reset 2>"$_reset_tmpstderr")
348
+ fi
349
+ _reset_stderr=$(cat "$_reset_tmpstderr" 2>/dev/null || true)
350
+ rm -f "$_reset_tmpstderr"
351
+ if [[ -n "$_reset_stderr" ]]; then
352
+ log_warn "$_reset_stderr"
346
353
  fi
347
354
 
348
355
  # Check for errors
@@ -481,12 +481,38 @@ run_one() {
481
481
  # Initialize state if needed
482
482
  if [[ ! -f "$STATE_DIR/pipeline.json" ]]; then
483
483
  log_info "Initializing bugfix pipeline state..."
484
- python3 "$SCRIPTS_DIR/init-bugfix-pipeline.py" \
484
+ local init_result init_stderr init_tmpstderr
485
+ init_tmpstderr=$(mktemp)
486
+ if ! init_result=$(python3 "$SCRIPTS_DIR/init-bugfix-pipeline.py" \
485
487
  --bug-list "$bug_list" \
486
- --state-dir "$STATE_DIR" >/dev/null 2>&1 || {
487
- log_error "Failed to initialize bugfix pipeline state"
488
+ --state-dir "$STATE_DIR" 2>"$init_tmpstderr"); then
489
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
490
+ rm -f "$init_tmpstderr"
491
+ if [[ -n "$init_stderr" ]]; then
492
+ log_warn "$init_stderr"
493
+ fi
494
+ log_error "Bugfix pipeline initialization failed (script error)"
488
495
  exit 1
489
- }
496
+ fi
497
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
498
+ rm -f "$init_tmpstderr"
499
+
500
+ if [[ -n "$init_stderr" ]]; then
501
+ log_warn "$init_stderr"
502
+ fi
503
+
504
+ local init_valid
505
+ init_valid=$(echo "$init_result" | python3 -c "import sys,json; print(json.load(sys.stdin).get('valid', False))" 2>/dev/null || echo "False")
506
+
507
+ if [[ "$init_valid" != "True" ]]; then
508
+ log_error "Bugfix pipeline initialization failed:"
509
+ echo "$init_result"
510
+ exit 1
511
+ fi
512
+
513
+ local bugs_count
514
+ bugs_count=$(echo "$init_result" | python3 -c "import sys,json; print(json.load(sys.stdin).get('bugs_count', 0))" 2>/dev/null || echo "0")
515
+ log_success "Bugfix pipeline initialized with $bugs_count bugs"
490
516
 
491
517
  # Ensure state directory is gitignored
492
518
  local _gitignore_path
@@ -819,10 +845,25 @@ main() {
819
845
  # Initialize pipeline state if needed
820
846
  if [[ ! -f "$STATE_DIR/pipeline.json" ]]; then
821
847
  log_info "Initializing bugfix pipeline state..."
822
- local init_result
823
- init_result=$(python3 "$SCRIPTS_DIR/init-bugfix-pipeline.py" \
848
+ local init_result init_stderr init_tmpstderr
849
+ init_tmpstderr=$(mktemp)
850
+ if ! init_result=$(python3 "$SCRIPTS_DIR/init-bugfix-pipeline.py" \
824
851
  --bug-list "$bug_list" \
825
- --state-dir "$STATE_DIR" 2>&1)
852
+ --state-dir "$STATE_DIR" 2>"$init_tmpstderr"); then
853
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
854
+ rm -f "$init_tmpstderr"
855
+ if [[ -n "$init_stderr" ]]; then
856
+ log_warn "$init_stderr"
857
+ fi
858
+ log_error "Bugfix pipeline initialization failed (script error)"
859
+ exit 1
860
+ fi
861
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
862
+ rm -f "$init_tmpstderr"
863
+
864
+ if [[ -n "$init_stderr" ]]; then
865
+ log_warn "$init_stderr"
866
+ fi
826
867
 
827
868
  local init_valid
828
869
  init_valid=$(echo "$init_result" | python3 -c "import sys,json; print(json.load(sys.stdin).get('valid', False))" 2>/dev/null || echo "False")
@@ -626,13 +626,26 @@ run_one() {
626
626
  # Initialize pipeline state if needed (same logic as run_all)
627
627
  if [[ ! -f "$STATE_DIR/pipeline.json" ]]; then
628
628
  log_info "Initializing pipeline state for single-feature run..."
629
- local init_result
629
+ local init_result init_stderr init_tmpstderr
630
+ init_tmpstderr=$(mktemp)
630
631
  if ! init_result=$(python3 "$SCRIPTS_DIR/init-pipeline.py" \
631
632
  --feature-list "$feature_list" \
632
- --state-dir "$STATE_DIR" 2>&1); then
633
+ --state-dir "$STATE_DIR" 2>"$init_tmpstderr"); then
634
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
635
+ rm -f "$init_tmpstderr"
636
+ if [[ -n "$init_stderr" ]]; then
637
+ log_warn "$init_stderr"
638
+ fi
633
639
  log_error "Pipeline initialization failed (script error)"
634
640
  exit 1
635
641
  fi
642
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
643
+ rm -f "$init_tmpstderr"
644
+
645
+ # Show any stderr warnings without corrupting JSON
646
+ if [[ -n "$init_stderr" ]]; then
647
+ log_warn "$init_stderr"
648
+ fi
636
649
 
637
650
  local init_valid
638
651
  init_valid=$(echo "$init_result" | python3 -c "import sys,json; print(json.load(sys.stdin).get('valid', False))" 2>/dev/null || echo "False")
@@ -1010,10 +1023,26 @@ main() {
1010
1023
  # Initialize pipeline state if needed
1011
1024
  if [[ ! -f "$STATE_DIR/pipeline.json" ]]; then
1012
1025
  log_info "Initializing pipeline state..."
1013
- local init_result
1014
- init_result=$(python3 "$SCRIPTS_DIR/init-pipeline.py" \
1026
+ local init_result init_stderr init_tmpstderr
1027
+ init_tmpstderr=$(mktemp)
1028
+ if ! init_result=$(python3 "$SCRIPTS_DIR/init-pipeline.py" \
1015
1029
  --feature-list "$feature_list" \
1016
- --state-dir "$STATE_DIR" 2>&1)
1030
+ --state-dir "$STATE_DIR" 2>"$init_tmpstderr"); then
1031
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
1032
+ rm -f "$init_tmpstderr"
1033
+ if [[ -n "$init_stderr" ]]; then
1034
+ log_warn "$init_stderr"
1035
+ fi
1036
+ log_error "Pipeline initialization failed (script error)"
1037
+ exit 1
1038
+ fi
1039
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
1040
+ rm -f "$init_tmpstderr"
1041
+
1042
+ # Show any stderr warnings (e.g. project root detection) without corrupting JSON
1043
+ if [[ -n "$init_stderr" ]]; then
1044
+ log_warn "$init_stderr"
1045
+ fi
1017
1046
 
1018
1047
  local init_valid
1019
1048
  init_valid=$(echo "$init_result" | python3 -c "import sys,json; print(json.load(sys.stdin).get('valid', False))" 2>/dev/null || echo "False")
@@ -508,12 +508,38 @@ run_one() {
508
508
  # Initialize state if needed
509
509
  if [[ ! -f "$STATE_DIR/pipeline.json" ]]; then
510
510
  log_info "Initializing refactor pipeline state..."
511
- python3 "$SCRIPTS_DIR/init-refactor-pipeline.py" \
511
+ local init_result init_stderr init_tmpstderr
512
+ init_tmpstderr=$(mktemp)
513
+ if ! init_result=$(python3 "$SCRIPTS_DIR/init-refactor-pipeline.py" \
512
514
  --refactor-list "$refactor_list" \
513
- --state-dir "$STATE_DIR" >/dev/null 2>&1 || {
514
- log_error "Failed to initialize refactor pipeline state"
515
+ --state-dir "$STATE_DIR" 2>"$init_tmpstderr"); then
516
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
517
+ rm -f "$init_tmpstderr"
518
+ if [[ -n "$init_stderr" ]]; then
519
+ log_warn "$init_stderr"
520
+ fi
521
+ log_error "Refactor pipeline initialization failed (script error)"
515
522
  exit 1
516
- }
523
+ fi
524
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
525
+ rm -f "$init_tmpstderr"
526
+
527
+ if [[ -n "$init_stderr" ]]; then
528
+ log_warn "$init_stderr"
529
+ fi
530
+
531
+ local init_valid
532
+ init_valid=$(echo "$init_result" | python3 -c "import sys,json; print(json.load(sys.stdin).get('valid', False))" 2>/dev/null || echo "False")
533
+
534
+ if [[ "$init_valid" != "True" ]]; then
535
+ log_error "Refactor pipeline initialization failed:"
536
+ echo "$init_result"
537
+ exit 1
538
+ fi
539
+
540
+ local refactors_count
541
+ refactors_count=$(echo "$init_result" | python3 -c "import sys,json; print(json.load(sys.stdin).get('refactors_count', 0))" 2>/dev/null || echo "0")
542
+ log_success "Refactor pipeline initialized with $refactors_count refactors"
517
543
 
518
544
  # Ensure state directory is gitignored
519
545
  local _gitignore_path
@@ -849,10 +875,25 @@ main() {
849
875
  # Initialize pipeline state if needed
850
876
  if [[ ! -f "$STATE_DIR/pipeline.json" ]]; then
851
877
  log_info "Initializing refactor pipeline state..."
852
- local init_result
853
- init_result=$(python3 "$SCRIPTS_DIR/init-refactor-pipeline.py" \
878
+ local init_result init_stderr init_tmpstderr
879
+ init_tmpstderr=$(mktemp)
880
+ if ! init_result=$(python3 "$SCRIPTS_DIR/init-refactor-pipeline.py" \
854
881
  --refactor-list "$refactor_list" \
855
- --state-dir "$STATE_DIR" 2>&1)
882
+ --state-dir "$STATE_DIR" 2>"$init_tmpstderr"); then
883
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
884
+ rm -f "$init_tmpstderr"
885
+ if [[ -n "$init_stderr" ]]; then
886
+ log_warn "$init_stderr"
887
+ fi
888
+ log_error "Refactor pipeline initialization failed (script error)"
889
+ exit 1
890
+ fi
891
+ init_stderr=$(cat "$init_tmpstderr" 2>/dev/null || true)
892
+ rm -f "$init_tmpstderr"
893
+
894
+ if [[ -n "$init_stderr" ]]; then
895
+ log_warn "$init_stderr"
896
+ fi
856
897
 
857
898
  local init_valid
858
899
  init_valid=$(echo "$init_result" | python3 -c "import sys,json; print(json.load(sys.stdin).get('valid', False))" 2>/dev/null || echo "False")
@@ -311,13 +311,27 @@ def main():
311
311
  print(json.dumps(output, indent=2, ensure_ascii=False))
312
312
  sys.exit(1)
313
313
 
314
- # Warn if .prizmkit/plans/feature-list.json is not at project root
314
+ # Warn if feature-list.json is not under a recognizable project root.
315
+ # Walk up from the feature list directory to find a project root indicator.
315
316
  feature_list_dir = os.path.dirname(os.path.abspath(args.feature_list))
316
317
  indicators = ['.git', 'package.json', '.prizmkit']
317
- is_at_root = any(os.path.exists(os.path.join(feature_list_dir, i)) for i in indicators)
318
- if not is_at_root:
318
+
319
+ def _find_project_root(start_dir):
320
+ d = start_dir
321
+ while True:
322
+ if any(os.path.exists(os.path.join(d, ind)) for ind in indicators):
323
+ return d
324
+ parent = os.path.dirname(d)
325
+ if parent == d:
326
+ return None
327
+ d = parent
328
+
329
+ project_root = _find_project_root(feature_list_dir)
330
+ if project_root is None:
319
331
  sys.stderr.write(
320
- "Warning: .prizmkit/plans/feature-list.json may not be at project root: {}\n".format(feature_list_dir)
332
+ "Warning: Could not find project root (no .git, package.json, or .prizmkit) above: {}\n".format(
333
+ feature_list_dir
334
+ )
321
335
  )
322
336
 
323
337
  # Validate schema
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.24",
2
+ "version": "1.1.26",
3
3
  "skills": {
4
4
  "prizm-kit": {
5
5
  "description": "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management.",
@@ -164,15 +164,15 @@ AskUserQuestion:
164
164
  header: "Approach"
165
165
  options:
166
166
  - label: "Fix now (fast path)"
167
- description: "Implement the fix directly in this session"
168
- - label: "Add to bug list"
169
- description: "Add to .prizmkit/plans/bug-fix-list.json for pipeline execution later"
167
+ description: "Implement the fix directly in this session — branch → test → fix → review → commit"
168
+ - label: "Add to bug-fix-list.json (pipeline)"
169
+ description: "Add this bug to .prizmkit/plans/bug-fix-list.json via bug-planner, then use bugfix-pipeline-launcher to launch autonomous pipeline execution"
170
170
  - label: "Full diagnosis"
171
171
  description: "Continue with in-depth analysis before deciding"
172
172
  ```
173
173
 
174
174
  - **Fix now** → Proceed with Fast Path Workflow (Phase 0 branch already set up)
175
- - **Add to bug list** → Invoke `bug-planner` to add this bug to the list, then end this workflow
175
+ - **Add to bug-fix-list.json** → Invoke `bug-planner` to add this bug to `.prizmkit/plans/bug-fix-list.json`, then suggest user run `bugfix-pipeline-launcher` to start the pipeline. End this workflow.
176
176
  - **Full diagnosis** → Continue with full diagnosis (Phase 2 Triage)
177
177
 
178
178
  **Complex bug → Planning Path** (ANY is true):
@@ -191,15 +191,15 @@ AskUserQuestion:
191
191
  options:
192
192
  - label: "Plan and fix now"
193
193
  description: "Create a plan and fix it in this session using /prizmkit-plan + /prizmkit-implement"
194
- - label: "Add to bug list"
195
- description: "Add to .prizmkit/plans/bug-fix-list.json for pipeline execution later"
194
+ - label: "Add to bug-fix-list.json (pipeline)"
195
+ description: "Add this bug to .prizmkit/plans/bug-fix-list.json via bug-planner, then use bugfix-pipeline-launcher to launch autonomous pipeline execution"
196
196
  ```
197
197
 
198
198
  - **Plan and fix now** → Invoke `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/<BUG_ID>/`:
199
199
  1. prizmkit-plan generates `spec.md` + `plan.md` under `.prizmkit/bugfix/<BUG_ID>/`
200
200
  2. Invoke `/prizmkit-implement` to execute the plan
201
201
  3. After implementation, resume this workflow at Phase 5 (Review)
202
- - **Add to bug list** → Invoke `bug-planner` to add this bug to the list, then end this workflow
202
+ - **Add to bug-fix-list.json** → Invoke `bug-planner` to add this bug to `.prizmkit/plans/bug-fix-list.json`, then suggest user run `bugfix-pipeline-launcher` to start the pipeline. End this workflow.
203
203
 
204
204
  **NEVER proceed with direct code changes without explicit user confirmation via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
205
205
 
@@ -250,12 +250,75 @@ Once brainstorming is complete, produce a structured requirements summary:
250
250
  ### Confirmed by user: ✓
251
251
  ```
252
252
 
253
- Present this summary to the user and get explicit confirmation before proceeding to Phase 2.
253
+ Present this summary to the user and get explicit confirmation before proceeding.
254
254
 
255
255
  **CHECKPOINT CP-FW-0**: Requirements fully clarified and confirmed by user.
256
256
 
257
257
  ---
258
258
 
259
+ ### Step 1.7: Complexity Assessment & Approach Selection
260
+
261
+ After confirming requirements, assess whether this feature needs the full pipeline or can be done directly in the current session.
262
+
263
+ **Simple feature → Fast Path candidate** (ALL must be true):
264
+ - Single module, no cross-module architectural impact
265
+ - ≤2 new files to create
266
+ - No new external dependencies or infrastructure changes
267
+ - Straightforward implementation (CRUD, utility, simple UI component)
268
+ - Clear acceptance criteria with existing patterns to follow
269
+ - No dependency on other unbuilt features
270
+
271
+ **User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options:
272
+
273
+ ```
274
+ AskUserQuestion:
275
+ question: "This feature appears straightforward. How would you like to proceed?"
276
+ header: "Approach"
277
+ options:
278
+ - label: "Implement now (fast path)"
279
+ description: "Plan and implement directly in this session using /prizmkit-plan + /prizmkit-implement"
280
+ - label: "Add to feature list (pipeline)"
281
+ description: "Generate .prizmkit/plans/feature-list.json via feature-planner, then launch pipeline for autonomous execution"
282
+ ```
283
+
284
+ - **Implement now** → Fast Path Workflow:
285
+ 1. Invoke `/prizmkit-plan` with the requirements summary → generates `spec.md` + `plan.md`
286
+ 2. Invoke `/prizmkit-implement` to execute the plan
287
+ 3. After implementation, run `/prizmkit-code-review` for quality check
288
+ 4. Commit via `/prizmkit-committer` with `feat(<scope>):` prefix
289
+ 5. Run `/prizmkit-retrospective` to sync `.prizm-docs/`
290
+ 6. **End workflow** — skip Phase 2/3/4
291
+ - **Add to feature list** → Continue to Phase 2 (Plan via pipeline)
292
+
293
+ **Complex feature → Planning Path** (ANY is true):
294
+ - Cross-module impact (>2 modules affected)
295
+ - New infrastructure, dependencies, or architectural patterns required
296
+ - Multiple interrelated features with dependency ordering
297
+ - Data model or API design decisions needed
298
+ - Requires integration with external services
299
+
300
+ **User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options:
301
+
302
+ ```
303
+ AskUserQuestion:
304
+ question: "This feature is complex and will benefit from structured planning. How would you like to proceed?"
305
+ header: "Approach"
306
+ options:
307
+ - label: "Plan and implement now"
308
+ description: "Create a plan and implement in this session using /prizmkit-plan + /prizmkit-implement"
309
+ - label: "Add to feature list (pipeline)"
310
+ description: "Generate .prizmkit/plans/feature-list.json via feature-planner, then launch pipeline for autonomous execution"
311
+ ```
312
+
313
+ - **Plan and implement now** → Invoke `/prizmkit-plan` with requirements → `/prizmkit-implement` → `/prizmkit-code-review` → `/prizmkit-committer` → `/prizmkit-retrospective`. **End workflow** — skip Phase 2/3/4.
314
+ - **Add to feature list** → Continue to Phase 2 (Plan via pipeline)
315
+
316
+ **NEVER proceed without explicit user confirmation via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
317
+
318
+ **CHECKPOINT CP-FW-0.5**: Approach selected by user (fast path or pipeline).
319
+
320
+ ---
321
+
259
322
  ## Phase 2: Plan
260
323
 
261
324
  **Goal**: Generate structured .prizmkit/plans/feature-list.json from the clarified requirements.
@@ -251,12 +251,76 @@ Once brainstorming is complete, produce a structured goals summary:
251
251
  ### Confirmed by user: ✓
252
252
  ```
253
253
 
254
- Present this summary to the user and get explicit confirmation before proceeding to Phase 2.
254
+ Present this summary to the user and get explicit confirmation before proceeding.
255
255
 
256
256
  **CHECKPOINT CP-RW-0**: Refactoring goals fully clarified and confirmed by user.
257
257
 
258
258
  ---
259
259
 
260
+ ### Step 1.7: Complexity Assessment & Approach Selection
261
+
262
+ After confirming refactoring goals, assess whether this refactor needs the full pipeline or can be done directly in the current session.
263
+
264
+ **Simple refactor → Fast Path candidate** (ALL must be true):
265
+ - Single module, no cross-module impact
266
+ - ≤3 files affected
267
+ - No public API or interface changes
268
+ - Straightforward transformation (extract method, rename, move file, simplify logic)
269
+ - Existing tests fully cover the affected code paths
270
+ - No risk of behavior change
271
+
272
+ **User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options:
273
+
274
+ ```
275
+ AskUserQuestion:
276
+ question: "This refactoring appears straightforward. How would you like to proceed?"
277
+ header: "Approach"
278
+ options:
279
+ - label: "Refactor now (fast path)"
280
+ description: "Plan and refactor directly in this session using /prizmkit-plan + /prizmkit-implement"
281
+ - label: "Add to refactor list (pipeline)"
282
+ description: "Generate .prizmkit/plans/refactor-list.json via refactor-planner, then launch pipeline for autonomous execution"
283
+ ```
284
+
285
+ - **Refactor now** → Fast Path Workflow:
286
+ 1. Invoke `/prizmkit-plan` with the refactoring goals → generates `spec.md` + `plan.md`
287
+ 2. Invoke `/prizmkit-implement` to execute the plan (behavior preservation verified by tests)
288
+ 3. After implementation, run `/prizmkit-code-review` for quality check
289
+ 4. Commit via `/prizmkit-committer` with `refactor(<scope>):` prefix
290
+ 5. Run `/prizmkit-retrospective` to sync `.prizm-docs/`
291
+ 6. **End workflow** — skip Phase 2/3/4
292
+ - **Add to refactor list** → Continue to Phase 2 (Plan via pipeline)
293
+
294
+ **Complex refactor → Planning Path** (ANY is true):
295
+ - Cross-module impact (>2 modules affected)
296
+ - Public API or interface changes required
297
+ - Multiple interrelated refactoring steps with dependency ordering
298
+ - Comprehensive rewrite of a module
299
+ - Insufficient test coverage in target area (risk of hidden behavior changes)
300
+ - Requires coordination with other ongoing work
301
+
302
+ **User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options:
303
+
304
+ ```
305
+ AskUserQuestion:
306
+ question: "This refactoring is complex and will benefit from structured planning. How would you like to proceed?"
307
+ header: "Approach"
308
+ options:
309
+ - label: "Plan and refactor now"
310
+ description: "Create a plan and refactor in this session using /prizmkit-plan + /prizmkit-implement"
311
+ - label: "Add to refactor list (pipeline)"
312
+ description: "Generate .prizmkit/plans/refactor-list.json via refactor-planner, then launch pipeline for autonomous execution"
313
+ ```
314
+
315
+ - **Plan and refactor now** → Invoke `/prizmkit-plan` with goals → `/prizmkit-implement` → `/prizmkit-code-review` → `/prizmkit-committer` → `/prizmkit-retrospective`. **End workflow** — skip Phase 2/3/4.
316
+ - **Add to refactor list** → Continue to Phase 2 (Plan via pipeline)
317
+
318
+ **NEVER proceed without explicit user confirmation via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
319
+
320
+ **CHECKPOINT CP-RW-0.5**: Approach selected by user (fast path or pipeline).
321
+
322
+ ---
323
+
260
324
  ## Phase 2: Plan
261
325
 
262
326
  **Goal**: Generate structured .prizmkit/plans/refactor-list.json from the clarified refactoring goals.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.24",
3
+ "version": "1.1.26",
4
4
  "description": "Create a new PrizmKit-powered project with clean initialization — no framework dev files, just what you need.",
5
5
  "type": "module",
6
6
  "bin": {