prizmkit 1.1.42 → 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.
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/claude/settings-adapter.js +4 -4
- package/bundled/adapters/codebuddy/settings-adapter.js +1 -1
- package/bundled/agents/prizm-dev-team-critic.md +9 -9
- package/bundled/agents/prizm-dev-team-dev.md +13 -13
- package/bundled/agents/prizm-dev-team-reviewer.md +2 -2
- package/bundled/dev-pipeline/.env.example +6 -6
- package/bundled/dev-pipeline/README.md +32 -32
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +6 -3
- package/bundled/dev-pipeline/launch-feature-daemon.sh +6 -3
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +6 -3
- package/bundled/dev-pipeline/lib/common.sh +36 -7
- package/bundled/dev-pipeline/reset-bug.sh +9 -7
- package/bundled/dev-pipeline/reset-feature.sh +9 -7
- package/bundled/dev-pipeline/reset-refactor.sh +9 -7
- package/bundled/dev-pipeline/run-bugfix.sh +25 -24
- package/bundled/dev-pipeline/run-feature.sh +29 -32
- package/bundled/dev-pipeline/run-recovery.sh +22 -4
- package/bundled/dev-pipeline/run-refactor.sh +27 -28
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +14 -14
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -4
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +18 -12
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -4
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
- package/bundled/dev-pipeline/scripts/update-bug-status.py +9 -1
- package/bundled/dev-pipeline/scripts/update-feature-status.py +13 -1
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +9 -1
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +8 -8
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +11 -11
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -9
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +5 -5
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +6 -6
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase0-init.md +1 -1
- package/bundled/dev-pipeline/tests/test-path-resolution.sh +100 -0
- package/bundled/rules/USAGE.md +2 -2
- package/bundled/rules/_rules-metadata.json +1 -1
- package/bundled/rules/prizm/prizm-commit-workflow.md +1 -1
- package/bundled/rules/prizm/prizm-documentation.md +4 -4
- package/bundled/rules/prizm/prizm-progressive-loading.md +3 -3
- package/bundled/skills/_metadata.json +4 -4
- package/bundled/skills/app-planner/SKILL.md +35 -7
- package/bundled/skills/bug-fix-workflow/SKILL.md +6 -6
- package/bundled/skills/bug-planner/SKILL.md +5 -5
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/feature-planner/SKILL.md +5 -5
- package/bundled/skills/feature-workflow/SKILL.md +8 -8
- package/bundled/skills/prizm-kit/SKILL.md +10 -10
- package/bundled/skills/prizmkit-committer/SKILL.md +2 -2
- package/bundled/skills/prizmkit-implement/SKILL.md +2 -2
- package/bundled/skills/prizmkit-init/SKILL.md +17 -18
- package/bundled/skills/prizmkit-plan/SKILL.md +3 -3
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +17 -17
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +45 -45
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +9 -9
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +1 -1
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +3 -3
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +10 -10
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -3
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +1 -1
- package/bundled/skills/recovery-workflow/SKILL.md +15 -15
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -1
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/refactor-planner/SKILL.md +6 -6
- package/bundled/skills/refactor-workflow/SKILL.md +9 -9
- package/bundled/team/prizm-dev-team.json +1 -1
- package/bundled/templates/hooks/commit-intent.json +2 -2
- package/bundled/templates/hooks/diff-prizm-docs.sh +8 -8
- package/bundled/templates/hooks/prizm-pre-commit.sh +4 -4
- package/bundled/templates/hooks/validate-prizm-docs.sh +4 -4
- package/bundled/templates/project-memory-template.md +4 -4
- package/package.json +1 -1
- package/src/clean.js +1 -3
- package/src/config.js +1 -1
- package/src/gitignore-template.js +4 -59
- package/src/scaffold.js +12 -11
- package/src/upgrade.js +3 -3
|
@@ -43,8 +43,11 @@ set -euo pipefail
|
|
|
43
43
|
# ============================================================
|
|
44
44
|
|
|
45
45
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
|
|
47
|
+
# Source shared common helpers (exports PIPELINE_DIR/PRIZMKIT_DIR/PROJECT_ROOT)
|
|
48
|
+
source "$SCRIPT_DIR/lib/common.sh"
|
|
49
|
+
|
|
50
|
+
STATE_DIR="${PRIZMKIT_DIR}/state/features"
|
|
48
51
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
49
52
|
|
|
50
53
|
# Colors
|
|
@@ -111,7 +114,7 @@ if [[ -z "$FEATURE_ID" && -z "$FEATURE_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
|
111
114
|
exit 1
|
|
112
115
|
fi
|
|
113
116
|
|
|
114
|
-
FEATURE_LIST="${FEATURE_LIST
|
|
117
|
+
FEATURE_LIST="${FEATURE_LIST:-$PRIZMKIT_DIR/plans/feature-list.json}"
|
|
115
118
|
|
|
116
119
|
# Resolve absolute path
|
|
117
120
|
if [[ ! "$FEATURE_LIST" = /* ]]; then
|
|
@@ -198,7 +201,6 @@ fi
|
|
|
198
201
|
# Process each feature
|
|
199
202
|
# ============================================================
|
|
200
203
|
|
|
201
|
-
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
202
204
|
RESET_COUNT=0
|
|
203
205
|
FAIL_COUNT=0
|
|
204
206
|
|
|
@@ -270,7 +272,7 @@ print('?')
|
|
|
270
272
|
log_info "Current status: $CURRENT_STATUS (no runtime state file)"
|
|
271
273
|
fi
|
|
272
274
|
|
|
273
|
-
SPECS_DIR="$
|
|
275
|
+
SPECS_DIR="$PRIZMKIT_DIR/specs/$FEATURE_SLUG"
|
|
274
276
|
SPECS_COUNT=0
|
|
275
277
|
if [[ -d "$SPECS_DIR" ]]; then
|
|
276
278
|
SPECS_COUNT=$(find "$SPECS_DIR" -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
@@ -396,9 +398,9 @@ if [[ "$DO_RUN" == true && ${#FEATURE_IDS[@]} -eq 1 ]]; then
|
|
|
396
398
|
echo ""
|
|
397
399
|
exec "$SCRIPT_DIR/run-feature.sh" run "${FEATURE_IDS[0]}" "$FEATURE_LIST"
|
|
398
400
|
else
|
|
399
|
-
log_info "
|
|
401
|
+
log_info " ./.prizmkit/dev-pipeline/run-feature.sh run .prizmkit/plans/feature-list.json # Resume pipeline from first pending"
|
|
400
402
|
if [[ ${#FEATURE_IDS[@]} -eq 1 ]]; then
|
|
401
|
-
log_info "
|
|
403
|
+
log_info " ./.prizmkit/dev-pipeline/run-feature.sh run ${FEATURE_IDS[0]} # Run single feature"
|
|
402
404
|
fi
|
|
403
405
|
fi
|
|
404
406
|
echo ""
|
|
@@ -33,8 +33,11 @@ set -euo pipefail
|
|
|
33
33
|
# ============================================================
|
|
34
34
|
|
|
35
35
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
|
|
37
|
+
# Source shared common helpers (exports PIPELINE_DIR/PRIZMKIT_DIR/PROJECT_ROOT)
|
|
38
|
+
source "$SCRIPT_DIR/lib/common.sh"
|
|
39
|
+
|
|
40
|
+
STATE_DIR="${PRIZMKIT_DIR}/state/refactor"
|
|
38
41
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
39
42
|
|
|
40
43
|
# Colors
|
|
@@ -101,7 +104,7 @@ if [[ -z "$REFACTOR_ID" && -z "$REFACTOR_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
|
101
104
|
exit 1
|
|
102
105
|
fi
|
|
103
106
|
|
|
104
|
-
REFACTOR_LIST="${REFACTOR_LIST
|
|
107
|
+
REFACTOR_LIST="${REFACTOR_LIST:-$PRIZMKIT_DIR/plans/refactor-list.json}"
|
|
105
108
|
|
|
106
109
|
# Resolve absolute path
|
|
107
110
|
if [[ ! "$REFACTOR_LIST" = /* ]]; then
|
|
@@ -188,7 +191,6 @@ fi
|
|
|
188
191
|
# Process each refactor
|
|
189
192
|
# ============================================================
|
|
190
193
|
|
|
191
|
-
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
192
194
|
RESET_COUNT=0
|
|
193
195
|
FAIL_COUNT=0
|
|
194
196
|
|
|
@@ -259,7 +261,7 @@ print('?')
|
|
|
259
261
|
log_info "Current status: $CURRENT_STATUS (no runtime state file)"
|
|
260
262
|
fi
|
|
261
263
|
|
|
262
|
-
SPECS_DIR="$
|
|
264
|
+
SPECS_DIR="$PRIZMKIT_DIR/specs/$REFACTOR_SLUG"
|
|
263
265
|
SPECS_COUNT=0
|
|
264
266
|
if [[ -d "$SPECS_DIR" ]]; then
|
|
265
267
|
SPECS_COUNT=$(find "$SPECS_DIR" -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
@@ -383,9 +385,9 @@ if [[ "$DO_RUN" == true && ${#REFACTOR_IDS[@]} -eq 1 ]]; then
|
|
|
383
385
|
echo ""
|
|
384
386
|
exec "$SCRIPT_DIR/run-refactor.sh" run "${REFACTOR_IDS[0]}" "$REFACTOR_LIST"
|
|
385
387
|
else
|
|
386
|
-
log_info "
|
|
388
|
+
log_info " ./.prizmkit/dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json # Resume pipeline from first pending"
|
|
387
389
|
if [[ ${#REFACTOR_IDS[@]} -eq 1 ]]; then
|
|
388
|
-
log_info "
|
|
390
|
+
log_info " ./.prizmkit/dev-pipeline/run-refactor.sh run ${REFACTOR_IDS[0]} # Run single refactor"
|
|
389
391
|
fi
|
|
390
392
|
fi
|
|
391
393
|
echo ""
|
|
@@ -32,8 +32,12 @@ set -euo pipefail
|
|
|
32
32
|
# ============================================================
|
|
33
33
|
|
|
34
34
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
|
|
36
|
+
# Source shared common helpers (exports PIPELINE_DIR/PRIZMKIT_DIR/PROJECT_ROOT,
|
|
37
|
+
# CLI/platform detection, logs, deps)
|
|
38
|
+
source "$SCRIPT_DIR/lib/common.sh"
|
|
39
|
+
|
|
40
|
+
STATE_DIR="${PRIZMKIT_DIR}/state/bugfix"
|
|
37
41
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
38
42
|
|
|
39
43
|
# Configuration
|
|
@@ -53,7 +57,6 @@ STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
|
|
|
53
57
|
ENABLE_DEPLOY=${ENABLE_DEPLOY:-0}
|
|
54
58
|
|
|
55
59
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
56
|
-
source "$SCRIPT_DIR/lib/common.sh"
|
|
57
60
|
prizm_detect_cli_and_platform
|
|
58
61
|
|
|
59
62
|
# Source shared heartbeat library
|
|
@@ -190,7 +193,7 @@ spawn_and_wait_session() {
|
|
|
190
193
|
# ── Determine session outcome from observable signals ──────────────
|
|
191
194
|
local session_status
|
|
192
195
|
local project_root
|
|
193
|
-
project_root="$
|
|
196
|
+
project_root="$PROJECT_ROOT"
|
|
194
197
|
local default_branch="$base_branch"
|
|
195
198
|
|
|
196
199
|
if [[ $exit_code -eq 124 ]]; then
|
|
@@ -274,9 +277,7 @@ spawn_and_wait_session() {
|
|
|
274
277
|
|
|
275
278
|
# Validate checkpoint completeness after successful session
|
|
276
279
|
if [[ "$session_status" == "success" ]]; then
|
|
277
|
-
local
|
|
278
|
-
_ckpt_root="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
279
|
-
local checkpoint_file="$_ckpt_root/.prizmkit/bugfix/${bug_id}/workflow-checkpoint.json"
|
|
280
|
+
local checkpoint_file="$PRIZMKIT_DIR/bugfix/${bug_id}/workflow-checkpoint.json"
|
|
280
281
|
if [[ -f "$checkpoint_file" ]]; then
|
|
281
282
|
local checkpoint_result
|
|
282
283
|
checkpoint_result=$(python3 -c "
|
|
@@ -379,7 +380,7 @@ for bug in data.get('bugs', []):
|
|
|
379
380
|
fi
|
|
380
381
|
|
|
381
382
|
# GUARANTEED: always return to original branch (save WIP on dev branch first)
|
|
382
|
-
branch_ensure_return "$
|
|
383
|
+
branch_ensure_return "$PROJECT_ROOT" "$_ORIGINAL_BRANCH" "$_DEV_BRANCH_NAME"
|
|
383
384
|
|
|
384
385
|
log_info "Bug fix pipeline paused. Run './run-bugfix.sh run' to resume."
|
|
385
386
|
exit 130
|
|
@@ -393,7 +394,7 @@ trap cleanup SIGINT SIGTERM
|
|
|
393
394
|
check_dependencies() {
|
|
394
395
|
prizm_check_common_dependencies "$CLI_CMD"
|
|
395
396
|
local _project_root
|
|
396
|
-
_project_root="$
|
|
397
|
+
_project_root="$PROJECT_ROOT"
|
|
397
398
|
prizm_ensure_git_repo "$_project_root"
|
|
398
399
|
}
|
|
399
400
|
|
|
@@ -466,7 +467,7 @@ run_one() {
|
|
|
466
467
|
fi
|
|
467
468
|
|
|
468
469
|
if [[ -z "$bug_list" ]]; then
|
|
469
|
-
bug_list="
|
|
470
|
+
bug_list="$PRIZMKIT_DIR/plans/bug-fix-list.json"
|
|
470
471
|
fi
|
|
471
472
|
if [[ ! "$bug_list" = /* ]]; then
|
|
472
473
|
bug_list="$(pwd)/$bug_list"
|
|
@@ -519,9 +520,9 @@ run_one() {
|
|
|
519
520
|
|
|
520
521
|
# Ensure state directory is gitignored
|
|
521
522
|
local _gitignore_path
|
|
522
|
-
_gitignore_path="$
|
|
523
|
+
_gitignore_path="$PROJECT_ROOT/.gitignore"
|
|
523
524
|
local _state_rel
|
|
524
|
-
_state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$
|
|
525
|
+
_state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$PROJECT_ROOT'))" 2>/dev/null || echo ".prizmkit/state/bugfix")
|
|
525
526
|
if [[ -f "$_gitignore_path" ]]; then
|
|
526
527
|
if ! grep -qF "$_state_rel" "$_gitignore_path" 2>/dev/null; then
|
|
527
528
|
printf '\n# Pipeline runtime state (auto-added by dev-pipeline)\n%s/\n' "$_state_rel" >> "$_gitignore_path"
|
|
@@ -567,9 +568,9 @@ sys.exit(1)
|
|
|
567
568
|
log_info "Cleaning artifacts for $bug_id..."
|
|
568
569
|
|
|
569
570
|
local project_root
|
|
570
|
-
project_root="$
|
|
571
|
+
project_root="$PROJECT_ROOT"
|
|
571
572
|
|
|
572
|
-
local bugfix_dir="$
|
|
573
|
+
local bugfix_dir="$PRIZMKIT_DIR/bugfix/$bug_id"
|
|
573
574
|
if [[ -d "$bugfix_dir" ]]; then
|
|
574
575
|
rm -rf "$bugfix_dir"
|
|
575
576
|
log_info "Removed $bugfix_dir"
|
|
@@ -746,7 +747,7 @@ else:
|
|
|
746
747
|
fi
|
|
747
748
|
|
|
748
749
|
# GUARANTEED: always return to original branch (save WIP on dev branch first)
|
|
749
|
-
branch_ensure_return "$
|
|
750
|
+
branch_ensure_return "$PROJECT_ROOT" "$_ORIGINAL_BRANCH" "$_DEV_BRANCH_NAME"
|
|
750
751
|
exit 130
|
|
751
752
|
}
|
|
752
753
|
trap cleanup_single_bug SIGINT SIGTERM
|
|
@@ -755,7 +756,7 @@ else:
|
|
|
755
756
|
|
|
756
757
|
# Branch lifecycle: create and checkout bugfix branch
|
|
757
758
|
local _proj_root
|
|
758
|
-
_proj_root="$
|
|
759
|
+
_proj_root="$PROJECT_ROOT"
|
|
759
760
|
local _source_branch
|
|
760
761
|
_source_branch=$(git -C "$_proj_root" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "main")
|
|
761
762
|
_ORIGINAL_BRANCH="$_source_branch"
|
|
@@ -823,7 +824,7 @@ else:
|
|
|
823
824
|
# ============================================================
|
|
824
825
|
|
|
825
826
|
main() {
|
|
826
|
-
local bug_list="${1
|
|
827
|
+
local bug_list="${1:-$PRIZMKIT_DIR/plans/bug-fix-list.json}"
|
|
827
828
|
|
|
828
829
|
if [[ ! "$bug_list" = /* ]]; then
|
|
829
830
|
bug_list="$(pwd)/$bug_list"
|
|
@@ -878,9 +879,9 @@ main() {
|
|
|
878
879
|
|
|
879
880
|
# Ensure state directory is gitignored
|
|
880
881
|
local _gitignore_path
|
|
881
|
-
_gitignore_path="$
|
|
882
|
+
_gitignore_path="$PROJECT_ROOT/.gitignore"
|
|
882
883
|
local _state_rel
|
|
883
|
-
_state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$
|
|
884
|
+
_state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$PROJECT_ROOT'))" 2>/dev/null || echo ".prizmkit/state/bugfix")
|
|
884
885
|
if [[ -f "$_gitignore_path" ]]; then
|
|
885
886
|
if ! grep -qF "$_state_rel" "$_gitignore_path" 2>/dev/null; then
|
|
886
887
|
printf '\n# Pipeline runtime state (auto-added by dev-pipeline)\n%s/\n' "$_state_rel" >> "$_gitignore_path"
|
|
@@ -916,7 +917,7 @@ main() {
|
|
|
916
917
|
|
|
917
918
|
# Branch lifecycle: per-bug branches (like feature pipeline)
|
|
918
919
|
local _proj_root
|
|
919
|
-
_proj_root="$
|
|
920
|
+
_proj_root="$PROJECT_ROOT"
|
|
920
921
|
local _source_branch
|
|
921
922
|
_source_branch=$(git -C "$_proj_root" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "main")
|
|
922
923
|
_ORIGINAL_BRANCH="$_source_branch"
|
|
@@ -1208,7 +1209,7 @@ DEPLOY_PROMPT_EOF
|
|
|
1208
1209
|
|
|
1209
1210
|
# Completion notes propagation (on success)
|
|
1210
1211
|
if [ "$_SPAWN_RESULT" = "success" ]; then
|
|
1211
|
-
local _summary_path="$
|
|
1212
|
+
local _summary_path="$PRIZMKIT_DIR/bugfix/${bug_id}/completion-summary.json"
|
|
1212
1213
|
if [ -f "$_summary_path" ]; then
|
|
1213
1214
|
python3 "$SCRIPTS_DIR/patch-completion-notes.py" \
|
|
1214
1215
|
--bug-list "$bug_list" \
|
|
@@ -1277,7 +1278,7 @@ case "${1:-run}" in
|
|
|
1277
1278
|
if [[ "${1:-}" =~ ^[Bb]-[0-9]+ ]]; then
|
|
1278
1279
|
run_one "$@"
|
|
1279
1280
|
else
|
|
1280
|
-
main "${1
|
|
1281
|
+
main "${1:-$PRIZMKIT_DIR/plans/bug-fix-list.json}"
|
|
1281
1282
|
fi
|
|
1282
1283
|
;;
|
|
1283
1284
|
status)
|
|
@@ -1287,7 +1288,7 @@ case "${1:-run}" in
|
|
|
1287
1288
|
exit 1
|
|
1288
1289
|
fi
|
|
1289
1290
|
python3 "$SCRIPTS_DIR/update-bug-status.py" \
|
|
1290
|
-
--bug-list "${2
|
|
1291
|
+
--bug-list "${2:-$PRIZMKIT_DIR/plans/bug-fix-list.json}" \
|
|
1291
1292
|
--state-dir "$STATE_DIR" \
|
|
1292
1293
|
--action status
|
|
1293
1294
|
;;
|
|
@@ -1302,7 +1303,7 @@ case "${1:-run}" in
|
|
|
1302
1303
|
log_error "No bugfix pipeline state found. Run './run-bugfix.sh run' first."
|
|
1303
1304
|
exit 1
|
|
1304
1305
|
fi
|
|
1305
|
-
_unskip_bug_list="
|
|
1306
|
+
_unskip_bug_list="$PRIZMKIT_DIR/plans/bug-fix-list.json"
|
|
1306
1307
|
_unskip_bug_id=""
|
|
1307
1308
|
shift || true
|
|
1308
1309
|
# Parse arguments: optional bug-id and bug-list path
|
|
@@ -35,8 +35,12 @@ set -euo pipefail
|
|
|
35
35
|
# ============================================================
|
|
36
36
|
|
|
37
37
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
|
|
39
|
+
# Source shared common helpers (exports PIPELINE_DIR/PRIZMKIT_DIR/PROJECT_ROOT,
|
|
40
|
+
# CLI/platform detection, logs, deps)
|
|
41
|
+
source "$SCRIPT_DIR/lib/common.sh"
|
|
42
|
+
|
|
43
|
+
STATE_DIR="${PRIZMKIT_DIR}/state/features"
|
|
40
44
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
41
45
|
|
|
42
46
|
# Configuration (override via environment variables)
|
|
@@ -56,7 +60,6 @@ STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
|
|
|
56
60
|
ENABLE_DEPLOY=${ENABLE_DEPLOY:-0}
|
|
57
61
|
|
|
58
62
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
59
|
-
source "$SCRIPT_DIR/lib/common.sh"
|
|
60
63
|
prizm_detect_cli_and_platform
|
|
61
64
|
|
|
62
65
|
# Source shared heartbeat library
|
|
@@ -206,7 +209,7 @@ spawn_and_wait_session() {
|
|
|
206
209
|
# and working tree cleanliness as the single source of truth.
|
|
207
210
|
local session_status
|
|
208
211
|
local project_root
|
|
209
|
-
project_root="$
|
|
212
|
+
project_root="$PROJECT_ROOT"
|
|
210
213
|
local default_branch="$base_branch"
|
|
211
214
|
|
|
212
215
|
if [[ $exit_code -eq 124 ]]; then
|
|
@@ -319,10 +322,8 @@ sys.exit(1)
|
|
|
319
322
|
|
|
320
323
|
# Validate key artifacts exist after successful session
|
|
321
324
|
if [[ "$session_status" == "success" && -n "$feature_slug" ]]; then
|
|
322
|
-
local
|
|
323
|
-
|
|
324
|
-
local context_snapshot="$project_root_for_artifacts/.prizmkit/specs/${feature_slug}/context-snapshot.md"
|
|
325
|
-
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"
|
|
326
327
|
|
|
327
328
|
if [[ ! -f "$context_snapshot" ]]; then
|
|
328
329
|
log_warn "ARTIFACT_MISSING: context-snapshot.md not found at $context_snapshot"
|
|
@@ -332,7 +333,7 @@ sys.exit(1)
|
|
|
332
333
|
fi
|
|
333
334
|
|
|
334
335
|
# Validate checkpoint completeness
|
|
335
|
-
local checkpoint_file="$
|
|
336
|
+
local checkpoint_file="$PRIZMKIT_DIR/specs/${feature_slug}/workflow-checkpoint.json"
|
|
336
337
|
if [[ -f "$checkpoint_file" ]]; then
|
|
337
338
|
local checkpoint_result
|
|
338
339
|
checkpoint_result=$(python3 -c "
|
|
@@ -374,9 +375,7 @@ sys.exit(0)
|
|
|
374
375
|
|
|
375
376
|
# Check if session produced a failure-log for future retries
|
|
376
377
|
if [[ "$session_status" != "success" && -n "$feature_slug" ]]; then
|
|
377
|
-
local
|
|
378
|
-
project_root_for_failure="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
379
|
-
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"
|
|
380
379
|
if [[ -f "$failure_log" ]]; then
|
|
381
380
|
log_info "FAILURE_LOG: Session wrote failure-log.md — will be available to next retry"
|
|
382
381
|
else
|
|
@@ -386,7 +385,7 @@ sys.exit(0)
|
|
|
386
385
|
|
|
387
386
|
# Propagate completion notes for dependency context (only on success)
|
|
388
387
|
if [[ "$session_status" == "success" && -n "$feature_slug" ]]; then
|
|
389
|
-
local summary_path="$
|
|
388
|
+
local summary_path="$PRIZMKIT_DIR/specs/$feature_slug/completion-summary.json"
|
|
390
389
|
if [[ -f "$summary_path" ]]; then
|
|
391
390
|
python3 "$SCRIPTS_DIR/patch-completion-notes.py" \
|
|
392
391
|
--feature-list "$feature_list" \
|
|
@@ -468,7 +467,7 @@ for feat in data.get('features', []):
|
|
|
468
467
|
fi
|
|
469
468
|
|
|
470
469
|
# GUARANTEED: always return to original branch (save WIP on dev branch first)
|
|
471
|
-
branch_ensure_return "$
|
|
470
|
+
branch_ensure_return "$PROJECT_ROOT" "$_ORIGINAL_BRANCH" "$_DEV_BRANCH_NAME"
|
|
472
471
|
|
|
473
472
|
log_info "Pipeline paused. Run './run-feature.sh run' to resume."
|
|
474
473
|
exit 130
|
|
@@ -482,7 +481,7 @@ trap cleanup SIGINT SIGTERM
|
|
|
482
481
|
check_dependencies() {
|
|
483
482
|
prizm_check_common_dependencies "$CLI_CMD"
|
|
484
483
|
local _project_root
|
|
485
|
-
_project_root="$
|
|
484
|
+
_project_root="$PROJECT_ROOT"
|
|
486
485
|
prizm_ensure_git_repo "$_project_root"
|
|
487
486
|
}
|
|
488
487
|
|
|
@@ -602,7 +601,7 @@ run_one() {
|
|
|
602
601
|
|
|
603
602
|
# Default feature list
|
|
604
603
|
if [[ -z "$feature_list" ]]; then
|
|
605
|
-
feature_list="
|
|
604
|
+
feature_list="$PRIZMKIT_DIR/plans/feature-list.json"
|
|
606
605
|
fi
|
|
607
606
|
|
|
608
607
|
# Resolve to absolute path
|
|
@@ -710,10 +709,10 @@ sys.exit(1)
|
|
|
710
709
|
}
|
|
711
710
|
|
|
712
711
|
local project_root
|
|
713
|
-
project_root="$
|
|
712
|
+
project_root="$PROJECT_ROOT"
|
|
714
713
|
|
|
715
714
|
if [[ -n "$feature_slug" ]]; then
|
|
716
|
-
local specs_dir="$
|
|
715
|
+
local specs_dir="$PRIZMKIT_DIR/specs/$feature_slug"
|
|
717
716
|
if [[ -d "$specs_dir" ]]; then
|
|
718
717
|
rm -rf "$specs_dir"
|
|
719
718
|
log_info "Removed $specs_dir"
|
|
@@ -910,7 +909,7 @@ else:
|
|
|
910
909
|
fi
|
|
911
910
|
|
|
912
911
|
# GUARANTEED: always return to original branch (save WIP on dev branch first)
|
|
913
|
-
branch_ensure_return "$
|
|
912
|
+
branch_ensure_return "$PROJECT_ROOT" "$_ORIGINAL_BRANCH" "$_DEV_BRANCH_NAME"
|
|
914
913
|
exit 130
|
|
915
914
|
}
|
|
916
915
|
trap cleanup_single_feature SIGINT SIGTERM
|
|
@@ -919,7 +918,7 @@ else:
|
|
|
919
918
|
|
|
920
919
|
# Branch lifecycle: create and checkout feature branch
|
|
921
920
|
local _proj_root
|
|
922
|
-
_proj_root="$
|
|
921
|
+
_proj_root="$PROJECT_ROOT"
|
|
923
922
|
local _source_branch
|
|
924
923
|
_source_branch=$(git -C "$_proj_root" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "main")
|
|
925
924
|
_ORIGINAL_BRANCH="$_source_branch"
|
|
@@ -987,7 +986,7 @@ else:
|
|
|
987
986
|
# ============================================================
|
|
988
987
|
|
|
989
988
|
main() {
|
|
990
|
-
local feature_list="${1
|
|
989
|
+
local feature_list="${1:-$PRIZMKIT_DIR/plans/feature-list.json}"
|
|
991
990
|
local features_filter="${2:-}"
|
|
992
991
|
|
|
993
992
|
# Resolve to absolute path
|
|
@@ -1008,11 +1007,9 @@ main() {
|
|
|
1008
1007
|
# Validate .prizmkit/plans/feature-list.json is under project root
|
|
1009
1008
|
local fl_dir
|
|
1010
1009
|
fl_dir="$(cd "$(dirname "$feature_list")" && pwd)"
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
log_warn "feature-list.json is not under project root ($project_root), found at $fl_dir"
|
|
1015
|
-
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."
|
|
1016
1013
|
fi
|
|
1017
1014
|
|
|
1018
1015
|
check_dependencies
|
|
@@ -1057,9 +1054,9 @@ main() {
|
|
|
1057
1054
|
|
|
1058
1055
|
# Ensure state directory is gitignored (prevents branch-switch state loss)
|
|
1059
1056
|
local _gitignore_path
|
|
1060
|
-
_gitignore_path="$
|
|
1057
|
+
_gitignore_path="$PROJECT_ROOT/.gitignore"
|
|
1061
1058
|
local _state_rel
|
|
1062
|
-
_state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$
|
|
1059
|
+
_state_rel=$(python3 -c "import os; print(os.path.relpath('$STATE_DIR', '$PROJECT_ROOT'))" 2>/dev/null || echo ".prizmkit/state/features")
|
|
1063
1060
|
if [[ -f "$_gitignore_path" ]]; then
|
|
1064
1061
|
if ! grep -qF "$_state_rel" "$_gitignore_path" 2>/dev/null; then
|
|
1065
1062
|
printf '\n# Pipeline runtime state (auto-added by dev-pipeline)\n%s/\n' "$_state_rel" >> "$_gitignore_path"
|
|
@@ -1100,7 +1097,7 @@ main() {
|
|
|
1100
1097
|
|
|
1101
1098
|
# Branch lifecycle: each feature gets its own dev branch (created per-iteration below)
|
|
1102
1099
|
local _proj_root
|
|
1103
|
-
_proj_root="$
|
|
1100
|
+
_proj_root="$PROJECT_ROOT"
|
|
1104
1101
|
local _source_branch
|
|
1105
1102
|
_source_branch=$(git -C "$_proj_root" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "main")
|
|
1106
1103
|
_ORIGINAL_BRANCH="$_source_branch"
|
|
@@ -1503,7 +1500,7 @@ case "${1:-run}" in
|
|
|
1503
1500
|
run_one "$@"
|
|
1504
1501
|
else
|
|
1505
1502
|
# Parse positional and --features flag
|
|
1506
|
-
_run_feature_list="
|
|
1503
|
+
_run_feature_list="$PRIZMKIT_DIR/plans/feature-list.json"
|
|
1507
1504
|
_run_features_filter=""
|
|
1508
1505
|
while [[ $# -gt 0 ]]; do
|
|
1509
1506
|
case "$1" in
|
|
@@ -1532,7 +1529,7 @@ case "${1:-run}" in
|
|
|
1532
1529
|
exit 1
|
|
1533
1530
|
fi
|
|
1534
1531
|
python3 "$SCRIPTS_DIR/update-feature-status.py" \
|
|
1535
|
-
--feature-list "${2
|
|
1532
|
+
--feature-list "${2:-$PRIZMKIT_DIR/plans/feature-list.json}" \
|
|
1536
1533
|
--state-dir "$STATE_DIR" \
|
|
1537
1534
|
--action status
|
|
1538
1535
|
;;
|
|
@@ -1605,7 +1602,7 @@ case "${1:-run}" in
|
|
|
1605
1602
|
log_error "No pipeline state found. Run './run-feature.sh run' first."
|
|
1606
1603
|
exit 1
|
|
1607
1604
|
fi
|
|
1608
|
-
_unskip_feature_list="
|
|
1605
|
+
_unskip_feature_list="$PRIZMKIT_DIR/plans/feature-list.json"
|
|
1609
1606
|
_unskip_feature_id=""
|
|
1610
1607
|
shift || true
|
|
1611
1608
|
# Parse arguments: optional feature-id and feature-list path
|
|
@@ -34,10 +34,29 @@ set -euo pipefail
|
|
|
34
34
|
# ============================================================
|
|
35
35
|
|
|
36
36
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
|
|
38
|
+
# Source shared common helpers (exports PIPELINE_DIR/PRIZMKIT_DIR/PROJECT_ROOT,
|
|
39
|
+
# CLI/platform detection, logs, deps)
|
|
40
|
+
source "$SCRIPT_DIR/lib/common.sh"
|
|
41
|
+
|
|
42
|
+
RECOVERY_STATE_DIR="${PRIZMKIT_DIR}/state/recovery"
|
|
39
43
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
40
|
-
|
|
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
|
|
41
60
|
|
|
42
61
|
# Configuration
|
|
43
62
|
SESSION_TIMEOUT=${SESSION_TIMEOUT:-0}
|
|
@@ -48,7 +67,6 @@ MODEL=${MODEL:-""}
|
|
|
48
67
|
AUTO_PUSH=${AUTO_PUSH:-0}
|
|
49
68
|
|
|
50
69
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
51
|
-
source "$SCRIPT_DIR/lib/common.sh"
|
|
52
70
|
prizm_detect_cli_and_platform
|
|
53
71
|
|
|
54
72
|
# Source shared heartbeat library
|