prizmkit 1.1.7 → 1.1.9
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/codebuddy/skill-adapter.js +21 -7
- package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
- package/bundled/dev-pipeline/.env.example +45 -0
- package/bundled/dev-pipeline/README.md +64 -64
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
- package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +64 -18
- package/bundled/dev-pipeline/launch-feature-daemon.sh +15 -12
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +64 -18
- package/bundled/dev-pipeline/lib/branch.sh +6 -1
- package/bundled/dev-pipeline/lib/common.sh +71 -0
- package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
- package/bundled/dev-pipeline/reset-bug.sh +10 -9
- package/bundled/dev-pipeline/reset-feature.sh +9 -8
- package/bundled/dev-pipeline/reset-refactor.sh +10 -9
- package/bundled/dev-pipeline/retry-bugfix.sh +67 -29
- package/bundled/dev-pipeline/retry-feature.sh +54 -18
- package/bundled/dev-pipeline/retry-refactor.sh +112 -29
- package/bundled/dev-pipeline/run-bugfix.sh +281 -59
- package/bundled/dev-pipeline/run-feature.sh +53 -18
- package/bundled/dev-pipeline/run-refactor.sh +392 -66
- package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
- package/bundled/dev-pipeline/scripts/cleanup-logs.py +2 -2
- package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +57 -33
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +25 -9
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +104 -17
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +34 -9
- package/bundled/dev-pipeline/scripts/init-pipeline.py +10 -10
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +19 -8
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
- package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +167 -22
- package/bundled/dev-pipeline/scripts/update-feature-status.py +104 -62
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +351 -21
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +6 -15
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
- package/bundled/dev-pipeline/templates/feature-list-schema.json +109 -31
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +11 -3
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
- package/bundled/skills/_metadata.json +5 -22
- package/bundled/skills/app-planner/SKILL.md +98 -72
- package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
- package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
- package/bundled/skills/bug-fix-workflow/SKILL.md +52 -9
- package/bundled/skills/bug-planner/SKILL.md +139 -197
- package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +4 -8
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +34 -39
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +49 -36
- package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +3 -3
- package/bundled/skills/feature-planner/SKILL.md +53 -142
- package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
- package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
- package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
- package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills/feature-planner/references/error-recovery.md +16 -35
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +19 -20
- package/bundled/skills/feature-workflow/SKILL.md +24 -25
- package/bundled/skills/prizm-kit/SKILL.md +39 -49
- package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
- package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
- package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
- package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
- package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
- package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
- package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
- package/bundled/skills/prizmkit-init/SKILL.md +112 -65
- package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
- package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
- package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
- package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
- package/bundled/skills/recovery-workflow/SKILL.md +22 -22
- package/bundled/skills/recovery-workflow/evals/evals.json +5 -5
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +43 -10
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +48 -40
- package/bundled/skills/refactor-planner/SKILL.md +43 -61
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +17 -17
- package/bundled/skills/refactor-workflow/SKILL.md +23 -24
- package/bundled/team/prizm-dev-team.json +1 -1
- package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
- package/package.json +1 -1
- package/src/clean.js +3 -4
- package/src/gitignore-template.js +7 -9
- package/src/scaffold.js +14 -5
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
- package/bundled/skills/app-planner/references/project-conventions.md +0 -93
- package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
- package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
- package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
- package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
- package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
- package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
- package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
|
@@ -8,7 +8,7 @@ set -euo pipefail
|
|
|
8
8
|
# re-executed from scratch by the pipeline.
|
|
9
9
|
#
|
|
10
10
|
# Usage:
|
|
11
|
-
# ./reset-bug.sh <bug-id|range> [options] [bug-fix-list.json]
|
|
11
|
+
# ./reset-bug.sh <bug-id|range> [options] [.prizmkit/plans/bug-fix-list.json]
|
|
12
12
|
#
|
|
13
13
|
# Bug selection:
|
|
14
14
|
# B-007 Single bug
|
|
@@ -33,7 +33,8 @@ set -euo pipefail
|
|
|
33
33
|
# ============================================================
|
|
34
34
|
|
|
35
35
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
36
|
-
|
|
36
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
37
|
+
STATE_DIR="${PROJECT_ROOT}/.prizmkit/state/bugfix"
|
|
37
38
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
38
39
|
|
|
39
40
|
# Colors
|
|
@@ -68,7 +69,7 @@ for arg in "$@"; do
|
|
|
68
69
|
--failed) FILTER_MODE="failed" ;;
|
|
69
70
|
--stalled) FILTER_MODE="stalled" ;;
|
|
70
71
|
-h|--help)
|
|
71
|
-
echo "Usage: $0 <bug-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [bug-fix-list.json]"
|
|
72
|
+
echo "Usage: $0 <bug-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [.prizmkit/plans/bug-fix-list.json]"
|
|
72
73
|
echo ""
|
|
73
74
|
echo " bug-id Single bug (e.g. B-007)"
|
|
74
75
|
echo " B-008:B-013 Range of bugs (inclusive)"
|
|
@@ -77,7 +78,7 @@ for arg in "$@"; do
|
|
|
77
78
|
echo " --stalled Reset all non-completed (failed + auto_skipped)"
|
|
78
79
|
echo " --clean Delete session history and .prizmkit artifacts"
|
|
79
80
|
echo " --run Retry immediately after reset (single bug only)"
|
|
80
|
-
echo " bug-fix-list.json Path to bug fix list (default: bug-fix-list.json)"
|
|
81
|
+
echo " .prizmkit/plans/bug-fix-list.json Path to bug fix list (default: .prizmkit/plans/bug-fix-list.json)"
|
|
81
82
|
exit 0
|
|
82
83
|
;;
|
|
83
84
|
B-*:B-*|b-*:b-*) BUG_RANGE="$arg" ;;
|
|
@@ -87,7 +88,7 @@ for arg in "$@"; do
|
|
|
87
88
|
done
|
|
88
89
|
|
|
89
90
|
if [[ -z "$BUG_ID" && -z "$BUG_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
90
|
-
echo "Usage: $0 <bug-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [bug-fix-list.json]"
|
|
91
|
+
echo "Usage: $0 <bug-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [.prizmkit/plans/bug-fix-list.json]"
|
|
91
92
|
echo ""
|
|
92
93
|
echo " bug-id Single bug (e.g. B-007)"
|
|
93
94
|
echo " B-008:B-013 Range of bugs (inclusive)"
|
|
@@ -96,11 +97,11 @@ if [[ -z "$BUG_ID" && -z "$BUG_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
|
96
97
|
echo " --stalled Reset all non-completed (failed + auto_skipped)"
|
|
97
98
|
echo " --clean Delete session history and .prizmkit artifacts"
|
|
98
99
|
echo " --run Retry immediately after reset (single bug only)"
|
|
99
|
-
echo " bug-fix-list.json Path to bug fix list (default: bug-fix-list.json)"
|
|
100
|
+
echo " .prizmkit/plans/bug-fix-list.json Path to bug fix list (default: .prizmkit/plans/bug-fix-list.json)"
|
|
100
101
|
exit 1
|
|
101
102
|
fi
|
|
102
103
|
|
|
103
|
-
BUG_LIST="${BUG_LIST
|
|
104
|
+
BUG_LIST="${BUG_LIST:-.prizmkit/plans/bug-fix-list.json}"
|
|
104
105
|
|
|
105
106
|
# Resolve absolute path
|
|
106
107
|
if [[ ! "$BUG_LIST" = /* ]]; then
|
|
@@ -128,7 +129,7 @@ fi
|
|
|
128
129
|
BUG_IDS=()
|
|
129
130
|
|
|
130
131
|
if [[ -n "$FILTER_MODE" ]]; then
|
|
131
|
-
# Filter by status from
|
|
132
|
+
# Filter by status from .prizmkit/state/bugfix/bugs/*/status.json
|
|
132
133
|
while IFS= read -r bid; do
|
|
133
134
|
[[ -n "$bid" ]] && BUG_IDS+=("$bid")
|
|
134
135
|
done < <(python3 -c "
|
|
@@ -296,7 +297,7 @@ if [[ "$DO_RUN" == true && ${#BUG_IDS[@]} -eq 1 ]]; then
|
|
|
296
297
|
echo ""
|
|
297
298
|
exec "$SCRIPT_DIR/retry-bugfix.sh" "${BUG_IDS[0]}" "$BUG_LIST"
|
|
298
299
|
else
|
|
299
|
-
log_info " ./dev-pipeline/run-bugfix.sh run bug-fix-list.json # Resume pipeline from first pending"
|
|
300
|
+
log_info " ./dev-pipeline/run-bugfix.sh run .prizmkit/plans/bug-fix-list.json # Resume pipeline from first pending"
|
|
300
301
|
if [[ ${#BUG_IDS[@]} -eq 1 ]]; then
|
|
301
302
|
log_info " ./dev-pipeline/retry-bugfix.sh ${BUG_IDS[0]} # Retry single bug"
|
|
302
303
|
fi
|
|
@@ -8,7 +8,7 @@ set -euo pipefail
|
|
|
8
8
|
# re-executed from scratch by the pipeline.
|
|
9
9
|
#
|
|
10
10
|
# Usage:
|
|
11
|
-
# ./reset-feature.sh <feature-id|range> [options] [feature-list.json]
|
|
11
|
+
# ./reset-feature.sh <feature-id|range> [options] [.prizmkit/plans/feature-list.json]
|
|
12
12
|
#
|
|
13
13
|
# Feature selection:
|
|
14
14
|
# F-007 Single feature
|
|
@@ -33,7 +33,8 @@ set -euo pipefail
|
|
|
33
33
|
# ============================================================
|
|
34
34
|
|
|
35
35
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
36
|
-
|
|
36
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
37
|
+
STATE_DIR="${PROJECT_ROOT}/.prizmkit/state/features"
|
|
37
38
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
38
39
|
|
|
39
40
|
# Colors
|
|
@@ -68,7 +69,7 @@ for arg in "$@"; do
|
|
|
68
69
|
--failed) FILTER_MODE="failed" ;;
|
|
69
70
|
--stalled) FILTER_MODE="stalled" ;;
|
|
70
71
|
-h|--help)
|
|
71
|
-
echo "Usage: $0 <feature-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [feature-list.json]"
|
|
72
|
+
echo "Usage: $0 <feature-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [.prizmkit/plans/feature-list.json]"
|
|
72
73
|
echo ""
|
|
73
74
|
echo " feature-id Single feature (e.g. F-007)"
|
|
74
75
|
echo " F-008:F-013 Range of features (inclusive)"
|
|
@@ -77,7 +78,7 @@ for arg in "$@"; do
|
|
|
77
78
|
echo " --stalled Reset all non-completed (failed + auto_skipped)"
|
|
78
79
|
echo " --clean Delete session history and .prizmkit artifacts"
|
|
79
80
|
echo " --run Retry immediately after reset (single feature only)"
|
|
80
|
-
echo " feature-list.json Path to feature list (default: feature-list.json)"
|
|
81
|
+
echo " .prizmkit/plans/feature-list.json Path to feature list (default: .prizmkit/plans/feature-list.json)"
|
|
81
82
|
exit 0
|
|
82
83
|
;;
|
|
83
84
|
F-*:F-*|f-*:f-*) FEATURE_RANGE="$arg" ;;
|
|
@@ -87,7 +88,7 @@ for arg in "$@"; do
|
|
|
87
88
|
done
|
|
88
89
|
|
|
89
90
|
if [[ -z "$FEATURE_ID" && -z "$FEATURE_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
90
|
-
echo "Usage: $0 <feature-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [feature-list.json]"
|
|
91
|
+
echo "Usage: $0 <feature-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [.prizmkit/plans/feature-list.json]"
|
|
91
92
|
echo ""
|
|
92
93
|
echo " feature-id Single feature (e.g. F-007)"
|
|
93
94
|
echo " F-008:F-013 Range of features (inclusive)"
|
|
@@ -96,11 +97,11 @@ if [[ -z "$FEATURE_ID" && -z "$FEATURE_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
|
96
97
|
echo " --stalled Reset all non-completed (failed + auto_skipped)"
|
|
97
98
|
echo " --clean Delete session history and .prizmkit artifacts"
|
|
98
99
|
echo " --run Retry immediately after reset (single feature only)"
|
|
99
|
-
echo " feature-list.json Path to feature list (default: feature-list.json)"
|
|
100
|
+
echo " .prizmkit/plans/feature-list.json Path to feature list (default: .prizmkit/plans/feature-list.json)"
|
|
100
101
|
exit 1
|
|
101
102
|
fi
|
|
102
103
|
|
|
103
|
-
FEATURE_LIST="${FEATURE_LIST
|
|
104
|
+
FEATURE_LIST="${FEATURE_LIST:-.prizmkit/plans/feature-list.json}"
|
|
104
105
|
|
|
105
106
|
# Resolve absolute path
|
|
106
107
|
if [[ ! "$FEATURE_LIST" = /* ]]; then
|
|
@@ -305,7 +306,7 @@ if [[ "$DO_RUN" == true && ${#FEATURE_IDS[@]} -eq 1 ]]; then
|
|
|
305
306
|
echo ""
|
|
306
307
|
exec "$SCRIPT_DIR/retry-feature.sh" "${FEATURE_IDS[0]}" "$FEATURE_LIST"
|
|
307
308
|
else
|
|
308
|
-
log_info " ./dev-pipeline/run-feature.sh run feature-list.json # Resume pipeline from first pending"
|
|
309
|
+
log_info " ./dev-pipeline/run-feature.sh run .prizmkit/plans/feature-list.json # Resume pipeline from first pending"
|
|
309
310
|
if [[ ${#FEATURE_IDS[@]} -eq 1 ]]; then
|
|
310
311
|
log_info " ./dev-pipeline/retry-feature.sh ${FEATURE_IDS[0]} # Retry single feature"
|
|
311
312
|
fi
|
|
@@ -8,7 +8,7 @@ set -euo pipefail
|
|
|
8
8
|
# re-executed from scratch by the pipeline.
|
|
9
9
|
#
|
|
10
10
|
# Usage:
|
|
11
|
-
# ./reset-refactor.sh <refactor-id|range> [options] [refactor-list.json]
|
|
11
|
+
# ./reset-refactor.sh <refactor-id|range> [options] [.prizmkit/plans/refactor-list.json]
|
|
12
12
|
#
|
|
13
13
|
# Refactor selection:
|
|
14
14
|
# R-007 Single refactor
|
|
@@ -33,7 +33,8 @@ set -euo pipefail
|
|
|
33
33
|
# ============================================================
|
|
34
34
|
|
|
35
35
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
36
|
-
|
|
36
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
37
|
+
STATE_DIR="${PROJECT_ROOT}/.prizmkit/state/refactor"
|
|
37
38
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
38
39
|
|
|
39
40
|
# Colors
|
|
@@ -68,7 +69,7 @@ for arg in "$@"; do
|
|
|
68
69
|
--failed) FILTER_MODE="failed" ;;
|
|
69
70
|
--stalled) FILTER_MODE="stalled" ;;
|
|
70
71
|
-h|--help)
|
|
71
|
-
echo "Usage: $0 <refactor-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [refactor-list.json]"
|
|
72
|
+
echo "Usage: $0 <refactor-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [.prizmkit/plans/refactor-list.json]"
|
|
72
73
|
echo ""
|
|
73
74
|
echo " refactor-id Single refactor (e.g. R-007)"
|
|
74
75
|
echo " R-008:R-013 Range of refactors (inclusive)"
|
|
@@ -77,7 +78,7 @@ for arg in "$@"; do
|
|
|
77
78
|
echo " --stalled Reset all non-completed (failed + auto_skipped)"
|
|
78
79
|
echo " --clean Delete session history and .prizmkit artifacts"
|
|
79
80
|
echo " --run Retry immediately after reset (single refactor only)"
|
|
80
|
-
echo " refactor-list.json Path to refactor list (default: refactor-list.json)"
|
|
81
|
+
echo " .prizmkit/plans/refactor-list.json Path to refactor list (default: .prizmkit/plans/refactor-list.json)"
|
|
81
82
|
exit 0
|
|
82
83
|
;;
|
|
83
84
|
R-*:R-*|r-*:r-*) REFACTOR_RANGE="$arg" ;;
|
|
@@ -87,7 +88,7 @@ for arg in "$@"; do
|
|
|
87
88
|
done
|
|
88
89
|
|
|
89
90
|
if [[ -z "$REFACTOR_ID" && -z "$REFACTOR_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
90
|
-
echo "Usage: $0 <refactor-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [refactor-list.json]"
|
|
91
|
+
echo "Usage: $0 <refactor-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [.prizmkit/plans/refactor-list.json]"
|
|
91
92
|
echo ""
|
|
92
93
|
echo " refactor-id Single refactor (e.g. R-007)"
|
|
93
94
|
echo " R-008:R-013 Range of refactors (inclusive)"
|
|
@@ -96,11 +97,11 @@ if [[ -z "$REFACTOR_ID" && -z "$REFACTOR_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
|
96
97
|
echo " --stalled Reset all non-completed (failed + auto_skipped)"
|
|
97
98
|
echo " --clean Delete session history and .prizmkit artifacts"
|
|
98
99
|
echo " --run Retry immediately after reset (single refactor only)"
|
|
99
|
-
echo " refactor-list.json Path to refactor list (default: refactor-list.json)"
|
|
100
|
+
echo " .prizmkit/plans/refactor-list.json Path to refactor list (default: .prizmkit/plans/refactor-list.json)"
|
|
100
101
|
exit 1
|
|
101
102
|
fi
|
|
102
103
|
|
|
103
|
-
REFACTOR_LIST="${REFACTOR_LIST
|
|
104
|
+
REFACTOR_LIST="${REFACTOR_LIST:-.prizmkit/plans/refactor-list.json}"
|
|
104
105
|
|
|
105
106
|
# Resolve absolute path
|
|
106
107
|
if [[ ! "$REFACTOR_LIST" = /* ]]; then
|
|
@@ -128,7 +129,7 @@ fi
|
|
|
128
129
|
REFACTOR_IDS=()
|
|
129
130
|
|
|
130
131
|
if [[ -n "$FILTER_MODE" ]]; then
|
|
131
|
-
# Filter by status from
|
|
132
|
+
# Filter by status from .prizmkit/state/refactor/refactors/*/status.json
|
|
132
133
|
while IFS= read -r rid; do
|
|
133
134
|
[[ -n "$rid" ]] && REFACTOR_IDS+=("$rid")
|
|
134
135
|
done < <(python3 -c "
|
|
@@ -304,7 +305,7 @@ if [[ "$DO_RUN" == true && ${#REFACTOR_IDS[@]} -eq 1 ]]; then
|
|
|
304
305
|
echo ""
|
|
305
306
|
exec "$SCRIPT_DIR/retry-refactor.sh" "${REFACTOR_IDS[0]}" "$REFACTOR_LIST"
|
|
306
307
|
else
|
|
307
|
-
log_info " ./dev-pipeline/run-refactor.sh run refactor-list.json # Resume pipeline from first pending"
|
|
308
|
+
log_info " ./dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json # Resume pipeline from first pending"
|
|
308
309
|
if [[ ${#REFACTOR_IDS[@]} -eq 1 ]]; then
|
|
309
310
|
log_info " ./dev-pipeline/retry-refactor.sh ${REFACTOR_IDS[0]} # Retry single refactor"
|
|
310
311
|
fi
|
|
@@ -9,16 +9,17 @@ set -euo pipefail
|
|
|
9
9
|
# the full bugfix pipeline.
|
|
10
10
|
#
|
|
11
11
|
# Usage:
|
|
12
|
-
# ./retry-bugfix.sh <bug-id> [bug-fix-list.json]
|
|
12
|
+
# ./retry-bugfix.sh <bug-id> [.prizmkit/plans/bug-fix-list.json]
|
|
13
13
|
#
|
|
14
14
|
# Examples:
|
|
15
15
|
# ./retry-bugfix.sh B-001
|
|
16
|
-
# ./retry-bugfix.sh B-001 bug-fix-list.json
|
|
16
|
+
# ./retry-bugfix.sh B-001 .prizmkit/plans/bug-fix-list.json
|
|
17
17
|
# SESSION_TIMEOUT=3600 ./retry-bugfix.sh B-001
|
|
18
18
|
# ============================================================
|
|
19
19
|
|
|
20
20
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
21
|
-
|
|
21
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
22
|
+
STATE_DIR="${PROJECT_ROOT}/.prizmkit/state/bugfix"
|
|
22
23
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
23
24
|
|
|
24
25
|
SESSION_TIMEOUT=${SESSION_TIMEOUT:-0}
|
|
@@ -44,10 +45,10 @@ detect_stream_json_support "$CLI_CMD"
|
|
|
44
45
|
# ============================================================
|
|
45
46
|
|
|
46
47
|
if [[ $# -lt 1 ]]; then
|
|
47
|
-
echo "Usage: $0 <bug-id> [bug-fix-list.json]"
|
|
48
|
+
echo "Usage: $0 <bug-id> [.prizmkit/plans/bug-fix-list.json]"
|
|
48
49
|
echo ""
|
|
49
50
|
echo " bug-id Bug to retry (e.g. B-001)"
|
|
50
|
-
echo " bug-fix-list.json Path to bug fix list (default: bug-fix-list.json)"
|
|
51
|
+
echo " bug-fix-list.json Path to bug fix list (default: .prizmkit/plans/bug-fix-list.json)"
|
|
51
52
|
echo ""
|
|
52
53
|
echo "Environment Variables:"
|
|
53
54
|
echo " SESSION_TIMEOUT Timeout in seconds (default: 0 = no limit)"
|
|
@@ -59,7 +60,7 @@ if [[ $# -lt 1 ]]; then
|
|
|
59
60
|
fi
|
|
60
61
|
|
|
61
62
|
BUG_ID="$1"
|
|
62
|
-
BUG_LIST="${2
|
|
63
|
+
BUG_LIST="${2:-.prizmkit/plans/bug-fix-list.json}"
|
|
63
64
|
|
|
64
65
|
if [[ ! "$BUG_LIST" = /* ]]; then
|
|
65
66
|
BUG_LIST="$(pwd)/$BUG_LIST"
|
|
@@ -126,15 +127,28 @@ ORIGINAL_BRANCH=$(git -C "$PROJECT_ROOT" rev-parse --abbrev-ref HEAD 2>/dev/null
|
|
|
126
127
|
# Branch tracking (for cleanup on interrupt)
|
|
127
128
|
_DEV_BRANCH_NAME=""
|
|
128
129
|
|
|
129
|
-
log_info "
|
|
130
|
-
python3
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
130
|
+
log_info "Reading retry state for $BUG_ID..."
|
|
131
|
+
RETRY_COUNT=$(python3 -c "
|
|
132
|
+
import json, os
|
|
133
|
+
status_path = os.path.join('$STATE_DIR', 'bugs', '$BUG_ID', 'status.json')
|
|
134
|
+
if os.path.isfile(status_path):
|
|
135
|
+
with open(status_path) as f:
|
|
136
|
+
d = json.load(f)
|
|
137
|
+
print(d.get('retry_count', 0))
|
|
138
|
+
else:
|
|
139
|
+
print(0)
|
|
140
|
+
" 2>/dev/null || echo "0")
|
|
141
|
+
RESUME_PHASE=$(python3 -c "
|
|
142
|
+
import json, os
|
|
143
|
+
status_path = os.path.join('$STATE_DIR', 'bugs', '$BUG_ID', 'status.json')
|
|
144
|
+
if os.path.isfile(status_path):
|
|
145
|
+
with open(status_path) as f:
|
|
146
|
+
d = json.load(f)
|
|
147
|
+
print(d.get('resume_from_phase') or 'null')
|
|
148
|
+
else:
|
|
149
|
+
print('null')
|
|
150
|
+
" 2>/dev/null || echo "null")
|
|
151
|
+
log_info "Retry count: $RETRY_COUNT, Resume phase: $RESUME_PHASE"
|
|
138
152
|
|
|
139
153
|
# ============================================================
|
|
140
154
|
# Generate bootstrap prompt
|
|
@@ -148,15 +162,34 @@ mkdir -p "$SESSION_DIR/logs"
|
|
|
148
162
|
BOOTSTRAP_PROMPT="$SESSION_DIR/bootstrap-prompt.md"
|
|
149
163
|
|
|
150
164
|
log_info "Generating bugfix bootstrap prompt..."
|
|
151
|
-
|
|
152
|
-
--bug-list "$BUG_LIST"
|
|
153
|
-
--bug-id "$BUG_ID"
|
|
154
|
-
--session-id "$SESSION_ID"
|
|
155
|
-
--run-id "$RUN_ID"
|
|
156
|
-
--retry-count
|
|
157
|
-
--resume-phase "
|
|
158
|
-
--state-dir "$STATE_DIR"
|
|
159
|
-
--output "$BOOTSTRAP_PROMPT"
|
|
165
|
+
GEN_ARGS=(
|
|
166
|
+
--bug-list "$BUG_LIST"
|
|
167
|
+
--bug-id "$BUG_ID"
|
|
168
|
+
--session-id "$SESSION_ID"
|
|
169
|
+
--run-id "$RUN_ID"
|
|
170
|
+
--retry-count "$RETRY_COUNT"
|
|
171
|
+
--resume-phase "$RESUME_PHASE"
|
|
172
|
+
--state-dir "$STATE_DIR"
|
|
173
|
+
--output "$BOOTSTRAP_PROMPT"
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
# Support PIPELINE_MODE env var
|
|
177
|
+
if [[ -n "${PIPELINE_MODE:-}" ]]; then
|
|
178
|
+
GEN_ARGS+=(--mode "$PIPELINE_MODE")
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
# Support ENABLE_CRITIC env var
|
|
182
|
+
if [[ "${ENABLE_CRITIC:-}" == "true" || "${ENABLE_CRITIC:-}" == "1" ]]; then
|
|
183
|
+
GEN_ARGS+=(--critic "true")
|
|
184
|
+
elif [[ "${ENABLE_CRITIC:-}" == "false" || "${ENABLE_CRITIC:-}" == "0" ]]; then
|
|
185
|
+
GEN_ARGS+=(--critic "false")
|
|
186
|
+
fi
|
|
187
|
+
|
|
188
|
+
GEN_OUTPUT=$(python3 "$SCRIPTS_DIR/generate-bugfix-prompt.py" "${GEN_ARGS[@]}" 2>/dev/null) || {
|
|
189
|
+
log_error "Failed to generate bootstrap prompt"
|
|
190
|
+
exit 1
|
|
191
|
+
}
|
|
192
|
+
BUG_MODEL=$(echo "$GEN_OUTPUT" | python3 -c "import json,sys; print(json.load(sys.stdin).get('model',''))" 2>/dev/null || echo "")
|
|
160
193
|
|
|
161
194
|
# ============================================================
|
|
162
195
|
# Run single AI CLI session
|
|
@@ -177,8 +210,9 @@ echo -e "${BOLD} Retry Bug Fix: $BUG_ID — $BUG_TITLE${NC}"
|
|
|
177
210
|
echo -e "${BOLD} Severity: $BUG_SEVERITY${NC}"
|
|
178
211
|
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
179
212
|
log_info "CLI: $CLI_CMD (platform: $PLATFORM)"
|
|
180
|
-
|
|
181
|
-
|
|
213
|
+
EFFECTIVE_MODEL="${BUG_MODEL:-${MODEL:-}}"
|
|
214
|
+
if [[ -n "$EFFECTIVE_MODEL" ]]; then
|
|
215
|
+
log_info "Model: $EFFECTIVE_MODEL"
|
|
182
216
|
else
|
|
183
217
|
log_info "Model: (CLI default)"
|
|
184
218
|
fi
|
|
@@ -207,14 +241,18 @@ if [[ "$USE_STREAM_JSON" == "true" ]]; then
|
|
|
207
241
|
VERBOSE_FLAG="--verbose"
|
|
208
242
|
fi
|
|
209
243
|
|
|
210
|
-
# Spawn AI CLI session
|
|
244
|
+
# Spawn AI CLI session — model priority: bug.model > $MODEL env > none
|
|
245
|
+
EFFECTIVE_MODEL="${BUG_MODEL:-${MODEL:-}}"
|
|
211
246
|
MODEL_FLAG=""
|
|
212
|
-
if [[ -n "$
|
|
213
|
-
MODEL_FLAG="--model $
|
|
247
|
+
if [[ -n "$EFFECTIVE_MODEL" ]]; then
|
|
248
|
+
MODEL_FLAG="--model $EFFECTIVE_MODEL"
|
|
214
249
|
fi
|
|
215
250
|
|
|
216
251
|
unset CLAUDECODE 2>/dev/null || true
|
|
217
252
|
|
|
253
|
+
# Log bootstrap prompt in test mode
|
|
254
|
+
prizm_log_bootstrap_prompt "$BOOTSTRAP_PROMPT" "$BUG_ID"
|
|
255
|
+
|
|
218
256
|
case "$CLI_CMD" in
|
|
219
257
|
*claude*)
|
|
220
258
|
# Claude Code: prompt via -p argument, --dangerously-skip-permissions for auto-accept
|
|
@@ -9,16 +9,17 @@ set -euo pipefail
|
|
|
9
9
|
# the full pipeline.
|
|
10
10
|
#
|
|
11
11
|
# Usage:
|
|
12
|
-
# ./retry-feature.sh <feature-id> [feature-list.json]
|
|
12
|
+
# ./retry-feature.sh <feature-id> [.prizmkit/plans/feature-list.json]
|
|
13
13
|
#
|
|
14
14
|
# Examples:
|
|
15
15
|
# ./retry-feature.sh F-007
|
|
16
|
-
# ./retry-feature.sh F-007 feature-list.json
|
|
16
|
+
# ./retry-feature.sh F-007 .prizmkit/plans/feature-list.json
|
|
17
17
|
# SESSION_TIMEOUT=3600 ./retry-feature.sh F-007 # with 1h timeout
|
|
18
18
|
# ============================================================
|
|
19
19
|
|
|
20
20
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
21
|
-
|
|
21
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
22
|
+
STATE_DIR="${PROJECT_ROOT}/.prizmkit/state/features"
|
|
22
23
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
23
24
|
|
|
24
25
|
SESSION_TIMEOUT=${SESSION_TIMEOUT:-0}
|
|
@@ -47,10 +48,10 @@ AUTO_PUSH=${AUTO_PUSH:-0}
|
|
|
47
48
|
# ============================================================
|
|
48
49
|
|
|
49
50
|
if [[ $# -lt 1 ]]; then
|
|
50
|
-
echo "Usage: $0 <feature-id> [feature-list.json]"
|
|
51
|
+
echo "Usage: $0 <feature-id> [.prizmkit/plans/feature-list.json]"
|
|
51
52
|
echo ""
|
|
52
53
|
echo " feature-id Feature to retry (e.g. F-007)"
|
|
53
|
-
echo " feature-list.json Path to feature list (default: feature-list.json)"
|
|
54
|
+
echo " feature-list.json Path to feature list (default: .prizmkit/plans/feature-list.json)"
|
|
54
55
|
echo ""
|
|
55
56
|
echo "Environment Variables:"
|
|
56
57
|
echo " SESSION_TIMEOUT Timeout in seconds (default: 0 = no limit)"
|
|
@@ -60,7 +61,7 @@ if [[ $# -lt 1 ]]; then
|
|
|
60
61
|
fi
|
|
61
62
|
|
|
62
63
|
FEATURE_ID="$1"
|
|
63
|
-
FEATURE_LIST="${2
|
|
64
|
+
FEATURE_LIST="${2:-.prizmkit/plans/feature-list.json}"
|
|
64
65
|
|
|
65
66
|
# Resolve absolute path
|
|
66
67
|
if [[ ! "$FEATURE_LIST" = /* ]]; then
|
|
@@ -118,16 +119,28 @@ title = re.sub(r'-+', '-', title).strip('-') or 'feature'
|
|
|
118
119
|
print(f'{fid}-{title}')
|
|
119
120
|
" 2>/dev/null)
|
|
120
121
|
|
|
121
|
-
log_info "
|
|
122
|
-
python3
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
log_info "Reading retry state for $FEATURE_ID..."
|
|
123
|
+
RETRY_COUNT=$(python3 -c "
|
|
124
|
+
import json, os
|
|
125
|
+
status_path = os.path.join('$STATE_DIR', 'features', '$FEATURE_ID', 'status.json')
|
|
126
|
+
if os.path.isfile(status_path):
|
|
127
|
+
with open(status_path) as f:
|
|
128
|
+
d = json.load(f)
|
|
129
|
+
print(d.get('retry_count', 0))
|
|
130
|
+
else:
|
|
131
|
+
print(0)
|
|
132
|
+
" 2>/dev/null || echo "0")
|
|
133
|
+
RESUME_PHASE=$(python3 -c "
|
|
134
|
+
import json, os
|
|
135
|
+
status_path = os.path.join('$STATE_DIR', 'features', '$FEATURE_ID', 'status.json')
|
|
136
|
+
if os.path.isfile(status_path):
|
|
137
|
+
with open(status_path) as f:
|
|
138
|
+
d = json.load(f)
|
|
139
|
+
print(d.get('resume_from_phase') or 'null')
|
|
140
|
+
else:
|
|
141
|
+
print('null')
|
|
142
|
+
" 2>/dev/null || echo "null")
|
|
143
|
+
log_info "Retry count: $RETRY_COUNT, Resume phase: $RESUME_PHASE"
|
|
131
144
|
|
|
132
145
|
# ============================================================
|
|
133
146
|
# Generate bootstrap prompt
|
|
@@ -146,12 +159,17 @@ GEN_ARGS=(
|
|
|
146
159
|
--feature-id "$FEATURE_ID"
|
|
147
160
|
--session-id "$SESSION_ID"
|
|
148
161
|
--run-id "$RUN_ID"
|
|
149
|
-
--retry-count
|
|
150
|
-
--resume-phase "
|
|
162
|
+
--retry-count "$RETRY_COUNT"
|
|
163
|
+
--resume-phase "$RESUME_PHASE"
|
|
151
164
|
--state-dir "$STATE_DIR"
|
|
152
165
|
--output "$BOOTSTRAP_PROMPT"
|
|
153
166
|
)
|
|
154
167
|
|
|
168
|
+
# Support PIPELINE_MODE env var
|
|
169
|
+
if [[ -n "${PIPELINE_MODE:-}" ]]; then
|
|
170
|
+
GEN_ARGS+=(--mode "$PIPELINE_MODE")
|
|
171
|
+
fi
|
|
172
|
+
|
|
155
173
|
# Support ENABLE_CRITIC env var
|
|
156
174
|
if [[ "${ENABLE_CRITIC:-}" == "true" || "${ENABLE_CRITIC:-}" == "1" ]]; then
|
|
157
175
|
GEN_ARGS+=(--critic "true")
|
|
@@ -232,6 +250,9 @@ fi
|
|
|
232
250
|
|
|
233
251
|
unset CLAUDECODE 2>/dev/null || true
|
|
234
252
|
|
|
253
|
+
# Log bootstrap prompt in test mode
|
|
254
|
+
prizm_log_bootstrap_prompt "$BOOTSTRAP_PROMPT" "$FEATURE_ID"
|
|
255
|
+
|
|
235
256
|
case "$CLI_CMD" in
|
|
236
257
|
*claude*)
|
|
237
258
|
# Claude Code: prompt via -p argument, --dangerously-skip-permissions for auto-accept
|
|
@@ -366,6 +387,21 @@ if [[ "$SESSION_STATUS" == "success" ]]; then
|
|
|
366
387
|
fi
|
|
367
388
|
fi
|
|
368
389
|
|
|
390
|
+
# ── Propagate completion notes for dependency context ─────────────────
|
|
391
|
+
if [[ "$SESSION_STATUS" == "success" && -n "$FEATURE_SLUG" ]]; then
|
|
392
|
+
SUMMARY_PATH="$PROJECT_ROOT/.prizmkit/specs/$FEATURE_SLUG/completion-summary.json"
|
|
393
|
+
if [[ -f "$SUMMARY_PATH" ]]; then
|
|
394
|
+
python3 "$SCRIPTS_DIR/patch-completion-notes.py" \
|
|
395
|
+
--feature-list "$FEATURE_LIST" \
|
|
396
|
+
--feature-id "$FEATURE_ID" \
|
|
397
|
+
--summary "$SUMMARY_PATH" >/dev/null 2>&1 && {
|
|
398
|
+
log_info "Propagated completion notes for $FEATURE_ID"
|
|
399
|
+
} || {
|
|
400
|
+
log_warn "Failed to propagate completion notes for $FEATURE_ID"
|
|
401
|
+
}
|
|
402
|
+
fi
|
|
403
|
+
fi
|
|
404
|
+
|
|
369
405
|
# Update feature status
|
|
370
406
|
python3 "$SCRIPTS_DIR/update-feature-status.py" \
|
|
371
407
|
--feature-list "$FEATURE_LIST" \
|