prizmkit 1.1.24 → 1.1.25

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.25",
3
+ "bundledAt": "2026-04-12T02:12:31.973Z",
4
+ "bundledFrom": "b63b063"
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.25",
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.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
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": {