prizmkit 1.1.46 → 1.1.47

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.46",
3
- "bundledAt": "2026-05-20T14:21:52.729Z",
4
- "bundledFrom": "f552940"
2
+ "frameworkVersion": "1.1.47",
3
+ "bundledAt": "2026-05-21T00:55:32.225Z",
4
+ "bundledFrom": "59d8ec1"
5
5
  }
@@ -126,7 +126,7 @@ cmd_start() {
126
126
  done
127
127
 
128
128
  if [[ -z "$bug_list" ]]; then
129
- bug_list=".prizmkit/plans/bug-fix-list.json"
129
+ bug_list="$PRIZMKIT_DIR/plans/bug-fix-list.json"
130
130
  fi
131
131
  if [[ ! "$bug_list" = /* ]]; then
132
132
  bug_list="$(cd "$(dirname "$bug_list")" 2>/dev/null && pwd)/$(basename "$bug_list")"
@@ -155,7 +155,7 @@ cmd_start() {
155
155
 
156
156
  # Default feature list
157
157
  if [[ -z "$feature_list" ]]; then
158
- feature_list=".prizmkit/plans/feature-list.json"
158
+ feature_list="$PRIZMKIT_DIR/plans/feature-list.json"
159
159
  fi
160
160
 
161
161
  # Resolve to absolute path
@@ -126,7 +126,7 @@ cmd_start() {
126
126
  done
127
127
 
128
128
  if [[ -z "$refactor_list" ]]; then
129
- refactor_list=".prizmkit/plans/refactor-list.json"
129
+ refactor_list="$PRIZMKIT_DIR/plans/refactor-list.json"
130
130
  fi
131
131
  if [[ ! "$refactor_list" = /* ]]; then
132
132
  refactor_list="$(cd "$(dirname "$refactor_list")" 2>/dev/null && pwd)/$(basename "$refactor_list")"
@@ -136,11 +136,11 @@ prizm_detect_cli_and_platform() {
136
136
 
137
137
  if [[ -n "${AI_CLI:-}" ]]; then
138
138
  _raw_cli="$AI_CLI"
139
- elif [[ -f ".prizmkit/config.json" ]]; then
139
+ elif [[ -f "$PRIZMKIT_DIR/config.json" ]]; then
140
140
  _config_ai_cli=$(python3 -c "
141
141
  import json, sys
142
142
  try:
143
- with open('.prizmkit/config.json') as f:
143
+ with open('$PRIZMKIT_DIR/config.json') as f:
144
144
  d = json.load(f)
145
145
  v = d.get('ai_cli', '')
146
146
  if not v:
@@ -114,7 +114,7 @@ if [[ -z "$BUG_ID" && -z "$BUG_RANGE" && -z "$FILTER_MODE" ]]; then
114
114
  exit 1
115
115
  fi
116
116
 
117
- BUG_LIST="${BUG_LIST:-.prizmkit/plans/bug-fix-list.json}"
117
+ BUG_LIST="${BUG_LIST:-$PRIZMKIT_DIR/plans/bug-fix-list.json}"
118
118
 
119
119
  # Resolve absolute path
120
120
  if [[ ! "$BUG_LIST" = /* ]]; then
@@ -263,7 +263,7 @@ print('?')
263
263
  log_info "Current status: $CURRENT_STATUS (no runtime state file)"
264
264
  fi
265
265
 
266
- BUGFIX_DIR="$PROJECT_ROOT/.prizmkit/bugfix/$CUR_BUG_ID"
266
+ BUGFIX_DIR="$PRIZMKIT_DIR/bugfix/$CUR_BUG_ID"
267
267
  BUGFIX_COUNT=0
268
268
  if [[ -d "$BUGFIX_DIR" ]]; then
269
269
  BUGFIX_COUNT=$(find "$BUGFIX_DIR" -type f 2>/dev/null | wc -l | tr -d ' ')
@@ -114,7 +114,7 @@ if [[ -z "$FEATURE_ID" && -z "$FEATURE_RANGE" && -z "$FILTER_MODE" ]]; then
114
114
  exit 1
115
115
  fi
116
116
 
117
- FEATURE_LIST="${FEATURE_LIST:-.prizmkit/plans/feature-list.json}"
117
+ FEATURE_LIST="${FEATURE_LIST:-$PRIZMKIT_DIR/plans/feature-list.json}"
118
118
 
119
119
  # Resolve absolute path
120
120
  if [[ ! "$FEATURE_LIST" = /* ]]; then
@@ -272,7 +272,7 @@ print('?')
272
272
  log_info "Current status: $CURRENT_STATUS (no runtime state file)"
273
273
  fi
274
274
 
275
- SPECS_DIR="$PROJECT_ROOT/.prizmkit/specs/$FEATURE_SLUG"
275
+ SPECS_DIR="$PRIZMKIT_DIR/specs/$FEATURE_SLUG"
276
276
  SPECS_COUNT=0
277
277
  if [[ -d "$SPECS_DIR" ]]; then
278
278
  SPECS_COUNT=$(find "$SPECS_DIR" -type f 2>/dev/null | wc -l | tr -d ' ')
@@ -104,7 +104,7 @@ if [[ -z "$REFACTOR_ID" && -z "$REFACTOR_RANGE" && -z "$FILTER_MODE" ]]; then
104
104
  exit 1
105
105
  fi
106
106
 
107
- REFACTOR_LIST="${REFACTOR_LIST:-.prizmkit/plans/refactor-list.json}"
107
+ REFACTOR_LIST="${REFACTOR_LIST:-$PRIZMKIT_DIR/plans/refactor-list.json}"
108
108
 
109
109
  # Resolve absolute path
110
110
  if [[ ! "$REFACTOR_LIST" = /* ]]; then
@@ -261,7 +261,7 @@ print('?')
261
261
  log_info "Current status: $CURRENT_STATUS (no runtime state file)"
262
262
  fi
263
263
 
264
- SPECS_DIR="$PROJECT_ROOT/.prizmkit/specs/$REFACTOR_SLUG"
264
+ SPECS_DIR="$PRIZMKIT_DIR/specs/$REFACTOR_SLUG"
265
265
  SPECS_COUNT=0
266
266
  if [[ -d "$SPECS_DIR" ]]; then
267
267
  SPECS_COUNT=$(find "$SPECS_DIR" -type f 2>/dev/null | wc -l | tr -d ' ')
@@ -277,9 +277,7 @@ spawn_and_wait_session() {
277
277
 
278
278
  # Validate checkpoint completeness after successful session
279
279
  if [[ "$session_status" == "success" ]]; then
280
- local _ckpt_root
281
- _ckpt_root="$PROJECT_ROOT"
282
- local checkpoint_file="$_ckpt_root/.prizmkit/bugfix/${bug_id}/workflow-checkpoint.json"
280
+ local checkpoint_file="$PRIZMKIT_DIR/bugfix/${bug_id}/workflow-checkpoint.json"
283
281
  if [[ -f "$checkpoint_file" ]]; then
284
282
  local checkpoint_result
285
283
  checkpoint_result=$(python3 -c "
@@ -469,7 +467,7 @@ run_one() {
469
467
  fi
470
468
 
471
469
  if [[ -z "$bug_list" ]]; then
472
- bug_list=".prizmkit/plans/bug-fix-list.json"
470
+ bug_list="$PRIZMKIT_DIR/plans/bug-fix-list.json"
473
471
  fi
474
472
  if [[ ! "$bug_list" = /* ]]; then
475
473
  bug_list="$(pwd)/$bug_list"
@@ -522,9 +520,9 @@ run_one() {
522
520
 
523
521
  # Ensure state directory is gitignored
524
522
  local _gitignore_path
525
- _gitignore_path="$(cd "$SCRIPT_DIR/.." && pwd)/.gitignore"
523
+ _gitignore_path="$PROJECT_ROOT/.gitignore"
526
524
  local _state_rel
527
- _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$(cd "$SCRIPT_DIR/.." && pwd)'))" 2>/dev/null || echo ".prizmkit/state/bugfix")
525
+ _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$PROJECT_ROOT'))" 2>/dev/null || echo ".prizmkit/state/bugfix")
528
526
  if [[ -f "$_gitignore_path" ]]; then
529
527
  if ! grep -qF "$_state_rel" "$_gitignore_path" 2>/dev/null; then
530
528
  printf '\n# Pipeline runtime state (auto-added by dev-pipeline)\n%s/\n' "$_state_rel" >> "$_gitignore_path"
@@ -572,7 +570,7 @@ sys.exit(1)
572
570
  local project_root
573
571
  project_root="$PROJECT_ROOT"
574
572
 
575
- local bugfix_dir="$project_root/.prizmkit/bugfix/$bug_id"
573
+ local bugfix_dir="$PRIZMKIT_DIR/bugfix/$bug_id"
576
574
  if [[ -d "$bugfix_dir" ]]; then
577
575
  rm -rf "$bugfix_dir"
578
576
  log_info "Removed $bugfix_dir"
@@ -826,7 +824,7 @@ else:
826
824
  # ============================================================
827
825
 
828
826
  main() {
829
- local bug_list="${1:-.prizmkit/plans/bug-fix-list.json}"
827
+ local bug_list="${1:-$PRIZMKIT_DIR/plans/bug-fix-list.json}"
830
828
 
831
829
  if [[ ! "$bug_list" = /* ]]; then
832
830
  bug_list="$(pwd)/$bug_list"
@@ -881,9 +879,9 @@ main() {
881
879
 
882
880
  # Ensure state directory is gitignored
883
881
  local _gitignore_path
884
- _gitignore_path="$(cd "$SCRIPT_DIR/.." && pwd)/.gitignore"
882
+ _gitignore_path="$PROJECT_ROOT/.gitignore"
885
883
  local _state_rel
886
- _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$(cd "$SCRIPT_DIR/.." && pwd)'))" 2>/dev/null || echo ".prizmkit/state/bugfix")
884
+ _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$PROJECT_ROOT'))" 2>/dev/null || echo ".prizmkit/state/bugfix")
887
885
  if [[ -f "$_gitignore_path" ]]; then
888
886
  if ! grep -qF "$_state_rel" "$_gitignore_path" 2>/dev/null; then
889
887
  printf '\n# Pipeline runtime state (auto-added by dev-pipeline)\n%s/\n' "$_state_rel" >> "$_gitignore_path"
@@ -1211,7 +1209,7 @@ DEPLOY_PROMPT_EOF
1211
1209
 
1212
1210
  # Completion notes propagation (on success)
1213
1211
  if [ "$_SPAWN_RESULT" = "success" ]; then
1214
- local _summary_path="$_proj_root/.prizmkit/bugfix/${bug_id}/completion-summary.json"
1212
+ local _summary_path="$PRIZMKIT_DIR/bugfix/${bug_id}/completion-summary.json"
1215
1213
  if [ -f "$_summary_path" ]; then
1216
1214
  python3 "$SCRIPTS_DIR/patch-completion-notes.py" \
1217
1215
  --bug-list "$bug_list" \
@@ -1280,7 +1278,7 @@ case "${1:-run}" in
1280
1278
  if [[ "${1:-}" =~ ^[Bb]-[0-9]+ ]]; then
1281
1279
  run_one "$@"
1282
1280
  else
1283
- main "${1:-.prizmkit/plans/bug-fix-list.json}"
1281
+ main "${1:-$PRIZMKIT_DIR/plans/bug-fix-list.json}"
1284
1282
  fi
1285
1283
  ;;
1286
1284
  status)
@@ -1290,7 +1288,7 @@ case "${1:-run}" in
1290
1288
  exit 1
1291
1289
  fi
1292
1290
  python3 "$SCRIPTS_DIR/update-bug-status.py" \
1293
- --bug-list "${2:-.prizmkit/plans/bug-fix-list.json}" \
1291
+ --bug-list "${2:-$PRIZMKIT_DIR/plans/bug-fix-list.json}" \
1294
1292
  --state-dir "$STATE_DIR" \
1295
1293
  --action status
1296
1294
  ;;
@@ -1305,7 +1303,7 @@ case "${1:-run}" in
1305
1303
  log_error "No bugfix pipeline state found. Run './run-bugfix.sh run' first."
1306
1304
  exit 1
1307
1305
  fi
1308
- _unskip_bug_list=".prizmkit/plans/bug-fix-list.json"
1306
+ _unskip_bug_list="$PRIZMKIT_DIR/plans/bug-fix-list.json"
1309
1307
  _unskip_bug_id=""
1310
1308
  shift || true
1311
1309
  # Parse arguments: optional bug-id and bug-list path
@@ -322,10 +322,8 @@ sys.exit(1)
322
322
 
323
323
  # Validate key artifacts exist after successful session
324
324
  if [[ "$session_status" == "success" && -n "$feature_slug" ]]; then
325
- local project_root_for_artifacts
326
- project_root_for_artifacts="$PROJECT_ROOT"
327
- local context_snapshot="$project_root_for_artifacts/.prizmkit/specs/${feature_slug}/context-snapshot.md"
328
- local plan_file="$project_root_for_artifacts/.prizmkit/specs/${feature_slug}/plan.md"
325
+ local context_snapshot="$PRIZMKIT_DIR/specs/${feature_slug}/context-snapshot.md"
326
+ local plan_file="$PRIZMKIT_DIR/specs/${feature_slug}/plan.md"
329
327
 
330
328
  if [[ ! -f "$context_snapshot" ]]; then
331
329
  log_warn "ARTIFACT_MISSING: context-snapshot.md not found at $context_snapshot"
@@ -335,7 +333,7 @@ sys.exit(1)
335
333
  fi
336
334
 
337
335
  # Validate checkpoint completeness
338
- local checkpoint_file="$project_root_for_artifacts/.prizmkit/specs/${feature_slug}/workflow-checkpoint.json"
336
+ local checkpoint_file="$PRIZMKIT_DIR/specs/${feature_slug}/workflow-checkpoint.json"
339
337
  if [[ -f "$checkpoint_file" ]]; then
340
338
  local checkpoint_result
341
339
  checkpoint_result=$(python3 -c "
@@ -377,9 +375,7 @@ sys.exit(0)
377
375
 
378
376
  # Check if session produced a failure-log for future retries
379
377
  if [[ "$session_status" != "success" && -n "$feature_slug" ]]; then
380
- local project_root_for_failure
381
- project_root_for_failure="$PROJECT_ROOT"
382
- local failure_log="$project_root_for_failure/.prizmkit/specs/${feature_slug}/failure-log.md"
378
+ local failure_log="$PRIZMKIT_DIR/specs/${feature_slug}/failure-log.md"
383
379
  if [[ -f "$failure_log" ]]; then
384
380
  log_info "FAILURE_LOG: Session wrote failure-log.md — will be available to next retry"
385
381
  else
@@ -389,7 +385,7 @@ sys.exit(0)
389
385
 
390
386
  # Propagate completion notes for dependency context (only on success)
391
387
  if [[ "$session_status" == "success" && -n "$feature_slug" ]]; then
392
- local summary_path="$project_root/.prizmkit/specs/$feature_slug/completion-summary.json"
388
+ local summary_path="$PRIZMKIT_DIR/specs/$feature_slug/completion-summary.json"
393
389
  if [[ -f "$summary_path" ]]; then
394
390
  python3 "$SCRIPTS_DIR/patch-completion-notes.py" \
395
391
  --feature-list "$feature_list" \
@@ -605,7 +601,7 @@ run_one() {
605
601
 
606
602
  # Default feature list
607
603
  if [[ -z "$feature_list" ]]; then
608
- feature_list=".prizmkit/plans/feature-list.json"
604
+ feature_list="$PRIZMKIT_DIR/plans/feature-list.json"
609
605
  fi
610
606
 
611
607
  # Resolve to absolute path
@@ -716,7 +712,7 @@ sys.exit(1)
716
712
  project_root="$PROJECT_ROOT"
717
713
 
718
714
  if [[ -n "$feature_slug" ]]; then
719
- local specs_dir="$project_root/.prizmkit/specs/$feature_slug"
715
+ local specs_dir="$PRIZMKIT_DIR/specs/$feature_slug"
720
716
  if [[ -d "$specs_dir" ]]; then
721
717
  rm -rf "$specs_dir"
722
718
  log_info "Removed $specs_dir"
@@ -990,7 +986,7 @@ else:
990
986
  # ============================================================
991
987
 
992
988
  main() {
993
- local feature_list="${1:-.prizmkit/plans/feature-list.json}"
989
+ local feature_list="${1:-$PRIZMKIT_DIR/plans/feature-list.json}"
994
990
  local features_filter="${2:-}"
995
991
 
996
992
  # Resolve to absolute path
@@ -1011,11 +1007,9 @@ main() {
1011
1007
  # Validate .prizmkit/plans/feature-list.json is under project root
1012
1008
  local fl_dir
1013
1009
  fl_dir="$(cd "$(dirname "$feature_list")" && pwd)"
1014
- local project_root
1015
- project_root="$(pwd)"
1016
- if [[ "$fl_dir" != "$project_root"/.prizmkit/plans && "$fl_dir" != "$project_root" ]]; then
1017
- log_warn "feature-list.json is not under project root ($project_root), found at $fl_dir"
1018
- log_warn "Pipeline expects feature-list.json at <project-root>/.prizmkit/plans/feature-list.json. Proceeding but results may be unstable."
1010
+ if [[ "$fl_dir" != "$PRIZMKIT_DIR/plans" && "$fl_dir" != "$PROJECT_ROOT" ]]; then
1011
+ log_warn "feature-list.json is not under project root ($PROJECT_ROOT), found at $fl_dir"
1012
+ log_warn "Pipeline expects feature-list.json at ${PRIZMKIT_DIR}/plans/feature-list.json. Proceeding but results may be unstable."
1019
1013
  fi
1020
1014
 
1021
1015
  check_dependencies
@@ -1060,9 +1054,9 @@ main() {
1060
1054
 
1061
1055
  # Ensure state directory is gitignored (prevents branch-switch state loss)
1062
1056
  local _gitignore_path
1063
- _gitignore_path="$(cd "$SCRIPT_DIR/.." && pwd)/.gitignore"
1057
+ _gitignore_path="$PROJECT_ROOT/.gitignore"
1064
1058
  local _state_rel
1065
- _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$(cd "$SCRIPT_DIR/.." && pwd)'))" 2>/dev/null || echo ".prizmkit/state/features")
1059
+ _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$PROJECT_ROOT'))" 2>/dev/null || echo ".prizmkit/state/features")
1066
1060
  if [[ -f "$_gitignore_path" ]]; then
1067
1061
  if ! grep -qF "$_state_rel" "$_gitignore_path" 2>/dev/null; then
1068
1062
  printf '\n# Pipeline runtime state (auto-added by dev-pipeline)\n%s/\n' "$_state_rel" >> "$_gitignore_path"
@@ -1506,7 +1500,7 @@ case "${1:-run}" in
1506
1500
  run_one "$@"
1507
1501
  else
1508
1502
  # Parse positional and --features flag
1509
- _run_feature_list=".prizmkit/plans/feature-list.json"
1503
+ _run_feature_list="$PRIZMKIT_DIR/plans/feature-list.json"
1510
1504
  _run_features_filter=""
1511
1505
  while [[ $# -gt 0 ]]; do
1512
1506
  case "$1" in
@@ -1535,7 +1529,7 @@ case "${1:-run}" in
1535
1529
  exit 1
1536
1530
  fi
1537
1531
  python3 "$SCRIPTS_DIR/update-feature-status.py" \
1538
- --feature-list "${2:-.prizmkit/plans/feature-list.json}" \
1532
+ --feature-list "${2:-$PRIZMKIT_DIR/plans/feature-list.json}" \
1539
1533
  --state-dir "$STATE_DIR" \
1540
1534
  --action status
1541
1535
  ;;
@@ -1608,7 +1602,7 @@ case "${1:-run}" in
1608
1602
  log_error "No pipeline state found. Run './run-feature.sh run' first."
1609
1603
  exit 1
1610
1604
  fi
1611
- _unskip_feature_list=".prizmkit/plans/feature-list.json"
1605
+ _unskip_feature_list="$PRIZMKIT_DIR/plans/feature-list.json"
1612
1606
  _unskip_feature_id=""
1613
1607
  shift || true
1614
1608
  # Parse arguments: optional feature-id and feature-list path
@@ -41,7 +41,22 @@ source "$SCRIPT_DIR/lib/common.sh"
41
41
 
42
42
  RECOVERY_STATE_DIR="${PRIZMKIT_DIR}/state/recovery"
43
43
  SCRIPTS_DIR="$SCRIPT_DIR/scripts"
44
- RECOVERY_DETECT_SCRIPT="${PROJECT_ROOT}/core/skills/orchestration-skill/workflows/recovery-workflow/scripts/detect-recovery-state.py"
44
+ # detect-recovery-state.py lives in the installed skill assets (.claude or .codebuddy)
45
+ if [[ -f "${PROJECT_ROOT}/.claude/command-assets/recovery-workflow/scripts/detect-recovery-state.py" ]]; then
46
+ RECOVERY_DETECT_SCRIPT="${PROJECT_ROOT}/.claude/command-assets/recovery-workflow/scripts/detect-recovery-state.py"
47
+ elif [[ -f "${PROJECT_ROOT}/.codebuddy/skills/recovery-workflow/scripts/detect-recovery-state.py" ]]; then
48
+ RECOVERY_DETECT_SCRIPT="${PROJECT_ROOT}/.codebuddy/skills/recovery-workflow/scripts/detect-recovery-state.py"
49
+ else
50
+ RECOVERY_DETECT_SCRIPT=""
51
+ fi
52
+
53
+ if [[ -z "$RECOVERY_DETECT_SCRIPT" ]]; then
54
+ log_error "Recovery detection script not found in either platform location:"
55
+ log_error " ${PROJECT_ROOT}/.claude/command-assets/recovery-workflow/scripts/detect-recovery-state.py"
56
+ log_error " ${PROJECT_ROOT}/.codebuddy/skills/recovery-workflow/scripts/detect-recovery-state.py"
57
+ log_error "Ensure PrizmKit is installed (npx prizmkit install) before running recovery."
58
+ exit 1
59
+ fi
45
60
 
46
61
  # Configuration
47
62
  SESSION_TIMEOUT=${SESSION_TIMEOUT:-0}
@@ -279,15 +279,13 @@ spawn_and_wait_session() {
279
279
 
280
280
  # Validate key artifacts exist after successful session
281
281
  if [[ "$session_status" == "success" ]]; then
282
- local _artifact_root
283
- _artifact_root="$PROJECT_ROOT"
284
- local plan_file="$_artifact_root/.prizmkit/refactor/$refactor_id/plan.md"
282
+ local plan_file="$PRIZMKIT_DIR/refactor/$refactor_id/plan.md"
285
283
  if [[ ! -f "$plan_file" ]]; then
286
284
  log_warn "ARTIFACT_MISSING: plan.md not found at $plan_file"
287
285
  fi
288
286
 
289
287
  # Validate checkpoint completeness
290
- local checkpoint_file="$_artifact_root/.prizmkit/refactor/$refactor_id/workflow-checkpoint.json"
288
+ local checkpoint_file="$PRIZMKIT_DIR/refactor/$refactor_id/workflow-checkpoint.json"
291
289
  if [[ -f "$checkpoint_file" ]]; then
292
290
  local checkpoint_result
293
291
  checkpoint_result=$(python3 -c "
@@ -332,7 +330,7 @@ sys.exit(0)
332
330
 
333
331
  # Propagate completion notes for dependency context (only on success)
334
332
  if [[ "$session_status" == "success" ]]; then
335
- local summary_path="$project_root/.prizmkit/refactor/$refactor_id/completion-summary.json"
333
+ local summary_path="$PRIZMKIT_DIR/refactor/$refactor_id/completion-summary.json"
336
334
  if [[ -f "$summary_path" ]]; then
337
335
  python3 "$SCRIPTS_DIR/patch-completion-notes.py" \
338
336
  --refactor-list "$refactor_list" \
@@ -496,7 +494,7 @@ run_one() {
496
494
  fi
497
495
 
498
496
  if [[ -z "$refactor_list" ]]; then
499
- refactor_list=".prizmkit/plans/refactor-list.json"
497
+ refactor_list="$PRIZMKIT_DIR/plans/refactor-list.json"
500
498
  fi
501
499
  if [[ ! "$refactor_list" = /* ]]; then
502
500
  refactor_list="$(pwd)/$refactor_list"
@@ -549,9 +547,9 @@ run_one() {
549
547
 
550
548
  # Ensure state directory is gitignored
551
549
  local _gitignore_path
552
- _gitignore_path="$(cd "$SCRIPT_DIR/.." && pwd)/.gitignore"
550
+ _gitignore_path="$PROJECT_ROOT/.gitignore"
553
551
  local _state_rel
554
- _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$(cd "$SCRIPT_DIR/.." && pwd)'))" 2>/dev/null || echo ".prizmkit/state/refactor")
552
+ _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$PROJECT_ROOT'))" 2>/dev/null || echo ".prizmkit/state/refactor")
555
553
  if [[ -f "$_gitignore_path" ]]; then
556
554
  if ! grep -qF "$_state_rel" "$_gitignore_path" 2>/dev/null; then
557
555
  printf '\n# Pipeline runtime state (auto-added by dev-pipeline)\n%s/\n' "$_state_rel" >> "$_gitignore_path"
@@ -599,7 +597,7 @@ sys.exit(1)
599
597
  local project_root
600
598
  project_root="$PROJECT_ROOT"
601
599
 
602
- local refactor_dir="$project_root/.prizmkit/refactor/$refactor_id"
600
+ local refactor_dir="$PRIZMKIT_DIR/refactor/$refactor_id"
603
601
  if [[ -d "$refactor_dir" ]]; then
604
602
  rm -rf "$refactor_dir"
605
603
  log_info "Removed $refactor_dir"
@@ -856,7 +854,7 @@ else:
856
854
  # ============================================================
857
855
 
858
856
  main() {
859
- local refactor_list="${1:-.prizmkit/plans/refactor-list.json}"
857
+ local refactor_list="${1:-$PRIZMKIT_DIR/plans/refactor-list.json}"
860
858
 
861
859
  if [[ ! "$refactor_list" = /* ]]; then
862
860
  refactor_list="$(pwd)/$refactor_list"
@@ -911,9 +909,9 @@ main() {
911
909
 
912
910
  # Ensure state directory is gitignored
913
911
  local _gitignore_path
914
- _gitignore_path="$(cd "$SCRIPT_DIR/.." && pwd)/.gitignore"
912
+ _gitignore_path="$PROJECT_ROOT/.gitignore"
915
913
  local _state_rel
916
- _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$(cd "$SCRIPT_DIR/.." && pwd)'))" 2>/dev/null || echo ".prizmkit/state/refactor")
914
+ _state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$PROJECT_ROOT'))" 2>/dev/null || echo ".prizmkit/state/refactor")
917
915
  if [[ -f "$_gitignore_path" ]]; then
918
916
  if ! grep -qF "$_state_rel" "$_gitignore_path" 2>/dev/null; then
919
917
  printf '\n# Pipeline runtime state (auto-added by dev-pipeline)\n%s/\n' "$_state_rel" >> "$_gitignore_path"
@@ -1197,9 +1195,7 @@ DEPLOY_PROMPT_EOF
1197
1195
 
1198
1196
  # Validate key artifacts after successful session
1199
1197
  if [[ "$_SPAWN_RESULT" == "success" ]]; then
1200
- local _artifact_root
1201
- _artifact_root="$PROJECT_ROOT"
1202
- local plan_file="$_artifact_root/.prizmkit/refactor/$refactor_id/plan.md"
1198
+ local plan_file="$PRIZMKIT_DIR/refactor/$refactor_id/plan.md"
1203
1199
  if [[ ! -f "$plan_file" ]]; then
1204
1200
  log_warn "ARTIFACT_MISSING: plan.md not found at $plan_file"
1205
1201
  else
@@ -1317,7 +1313,7 @@ case "${1:-run}" in
1317
1313
  if [[ "${1:-}" =~ ^[Rr]-[0-9]+ ]]; then
1318
1314
  run_one "$@"
1319
1315
  else
1320
- main "${1:-.prizmkit/plans/refactor-list.json}"
1316
+ main "${1:-$PRIZMKIT_DIR/plans/refactor-list.json}"
1321
1317
  fi
1322
1318
  ;;
1323
1319
  status)
@@ -1327,7 +1323,7 @@ case "${1:-run}" in
1327
1323
  exit 1
1328
1324
  fi
1329
1325
  python3 "$SCRIPTS_DIR/update-refactor-status.py" \
1330
- --refactor-list "${2:-.prizmkit/plans/refactor-list.json}" \
1326
+ --refactor-list "${2:-$PRIZMKIT_DIR/plans/refactor-list.json}" \
1331
1327
  --state-dir "$STATE_DIR" \
1332
1328
  --action status
1333
1329
  ;;
@@ -1342,7 +1338,7 @@ case "${1:-run}" in
1342
1338
  log_error "No refactor pipeline state found. Run './run-refactor.sh run' first."
1343
1339
  exit 1
1344
1340
  fi
1345
- _unskip_refactor_list=".prizmkit/plans/refactor-list.json"
1341
+ _unskip_refactor_list="$PRIZMKIT_DIR/plans/refactor-list.json"
1346
1342
  _unskip_refactor_id=""
1347
1343
  shift || true
1348
1344
  # Parse arguments: optional refactor-id and refactor-list path
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.46",
2
+ "version": "1.1.47",
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.",
@@ -71,7 +71,7 @@ BROWNFIELD WORKFLOW (existing project):
71
71
  - TOP-LEVEL modules: directories directly under project root that contain source files or sub-directories with source files (e.g. `src/`, `internal/`, `lib/`)
72
72
  - SUB-MODULES: directories INSIDE a top-level module (e.g. `src/routes/`, `src/models/`)
73
73
  - A sub-module maps to `.prizmkit/prizm-docs/<M>/<S>.prizm`, never to `.prizmkit/prizm-docs/<S>.prizm` — flattening would create ambiguous paths when two modules have identically-named sub-modules
74
- - Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.claude/`, `.codebuddy/`, `.prizmkit/`, `.prizmkit/prizm-docs/`, `dev-pipeline/`
74
+ - Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.claude/`, `.codebuddy/`, `.prizmkit/`
75
75
  - **Scan command** — run this to get a 2-level directory tree (excludes noise directories):
76
76
  ```bash
77
77
  find . -maxdepth 2 -type d \
@@ -79,8 +79,7 @@ BROWNFIELD WORKFLOW (existing project):
79
79
  -not -path '*/dist/*' -not -path '*/build/*' \
80
80
  -not -path '*/__pycache__/*' -not -path '*/vendor/*' \
81
81
  -not -path '*/.claude/*' -not -path '*/.codebuddy/*' \
82
- -not -path '*/.prizmkit/*' -not -path '*/.prizmkit/prizm-docs/*' \
83
- -not -path '*/dev-pipeline/*' -not -path '*/target/*' \
82
+ -not -path '*/.prizmkit/*' -not -path '*/target/*' \
84
83
  | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
85
84
  ```
86
85
  3. Identify entry points by language convention
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.46",
3
+ "version": "1.1.47",
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": {
@@ -11,44 +11,9 @@
11
11
  export function generateGitignore(options = {}) {
12
12
  void options;
13
13
  const lines = [
14
- '# ===========================',
15
- '# PrizmKit Runtime Artifacts',
16
- '# ===========================',
17
- '',
18
14
  '# PrizmKit 运行时全部产物(state/、prizm-docs/、.env、logs 等)',
19
15
  '.prizmkit/*',
20
- '',
21
- '# 多 Agent 协作临时工作区',
22
- '.dev-team/',
23
- '',
24
- '# Playwright CLI 快照和截图',
25
- '.playwright-cli/',
26
- '',
27
16
  ];
28
17
 
29
- lines.push(
30
- '# ===========================',
31
- '# Common',
32
- '# ===========================',
33
- '',
34
- '# Dependencies',
35
- 'node_modules/',
36
- '',
37
- '# OS files',
38
- '.DS_Store',
39
- 'Thumbs.db',
40
- '',
41
- '# IDE',
42
- '.idea/',
43
- '.vscode/',
44
- '*.swp',
45
- '*.swo',
46
- '',
47
- '# Environment',
48
- '.env',
49
- '.env.local',
50
- '',
51
- );
52
-
53
18
  return lines.join('\n');
54
- }
19
+ }