prizmkit 1.1.6 → 1.1.8
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/dev-pipeline/README.md +65 -65
- package/bundled/dev-pipeline/assets/feature-list-example.json +2 -2
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +11 -10
- package/bundled/dev-pipeline/launch-feature-daemon.sh +12 -11
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +11 -10
- package/bundled/dev-pipeline/reset-bug.sh +305 -0
- 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 +7 -6
- package/bundled/dev-pipeline/retry-feature.sh +7 -6
- package/bundled/dev-pipeline/retry-refactor.sh +7 -6
- package/bundled/dev-pipeline/run-bugfix.sh +71 -23
- package/bundled/dev-pipeline/run-feature.sh +30 -21
- package/bundled/dev-pipeline/run-refactor.sh +21 -17
- package/bundled/dev-pipeline/scripts/cleanup-logs.py +2 -2
- package/bundled/dev-pipeline/scripts/detect-stuck.py +3 -3
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +26 -14
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +6 -6
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +6 -6
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +4 -4
- package/bundled/dev-pipeline/scripts/init-pipeline.py +26 -12
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +4 -4
- package/bundled/dev-pipeline/scripts/update-bug-status.py +10 -10
- package/bundled/dev-pipeline/scripts/update-feature-status.py +31 -31
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +8 -8
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +111 -31
- package/bundled/dev-pipeline/templates/feature-list-schema.json +91 -25
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +107 -28
- package/bundled/dev-pipeline/tests/test_auto_skip.py +1 -1
- package/bundled/skills/_metadata.json +10 -2
- package/bundled/skills/app-planner/SKILL.md +24 -13
- package/bundled/skills/app-planner/references/project-brief-guide.md +1 -1
- package/bundled/skills/bug-fix-workflow/SKILL.md +7 -5
- package/bundled/skills/bug-planner/SKILL.md +80 -25
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +3 -3
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +38 -33
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +33 -33
- package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +3 -3
- package/bundled/skills/feature-planner/SKILL.md +96 -24
- package/bundled/skills/feature-planner/references/error-recovery.md +9 -9
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +25 -24
- package/bundled/skills/feature-workflow/SKILL.md +23 -20
- package/bundled/skills/prizmkit-committer/SKILL.md +1 -0
- package/bundled/skills/prizmkit-deploy/SKILL.md +1 -0
- package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
- package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
- package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +4 -4
- package/bundled/skills/prizmkit-plan/SKILL.md +3 -3
- package/bundled/skills/prizmkit-retrospective/SKILL.md +40 -3
- package/bundled/skills/prizmkit-verify/SKILL.md +281 -0
- package/bundled/skills/prizmkit-verify/scripts/verify-light.py +402 -0
- package/bundled/skills/recovery-workflow/SKILL.md +15 -14
- 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 +38 -34
- package/bundled/skills/refactor-planner/SKILL.md +74 -24
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +17 -17
- package/bundled/skills/refactor-workflow/SKILL.md +24 -20
- package/package.json +1 -1
- package/src/clean.js +4 -4
- package/src/gitignore-template.js +7 -8
- package/src/scaffold.js +4 -2
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# ============================================================
|
|
5
|
+
# dev-pipeline/reset-bug.sh - Reset a failed/stuck bug fix
|
|
6
|
+
#
|
|
7
|
+
# Clears all state and artifacts for a bug so it can be
|
|
8
|
+
# re-executed from scratch by the pipeline.
|
|
9
|
+
#
|
|
10
|
+
# Usage:
|
|
11
|
+
# ./reset-bug.sh <bug-id|range> [options] [.prizmkit/plans/bug-fix-list.json]
|
|
12
|
+
#
|
|
13
|
+
# Bug selection:
|
|
14
|
+
# B-007 Single bug
|
|
15
|
+
# B-008:B-013 Range of bugs (inclusive)
|
|
16
|
+
# --auto-skipped All bugs with auto_skipped status
|
|
17
|
+
# --failed All bugs with failed status
|
|
18
|
+
# --stalled All non-completed bugs (failed + auto_skipped)
|
|
19
|
+
#
|
|
20
|
+
# Options:
|
|
21
|
+
# --clean Also delete session history and .prizmkit/bugfix/{BUG_ID}/ artifacts
|
|
22
|
+
# --run After reset, immediately retry via pipeline (only with single bug)
|
|
23
|
+
#
|
|
24
|
+
# Examples:
|
|
25
|
+
# ./reset-bug.sh B-007 # Reset status only
|
|
26
|
+
# ./reset-bug.sh B-007 --clean # Reset + delete artifacts
|
|
27
|
+
# ./reset-bug.sh B-008:B-013 --clean # Reset range
|
|
28
|
+
# ./reset-bug.sh --auto-skipped # Reset all auto_skipped
|
|
29
|
+
# ./reset-bug.sh --failed --clean # Reset all failed + clean
|
|
30
|
+
# ./reset-bug.sh --stalled --clean # Reset all non-completed
|
|
31
|
+
# ./reset-bug.sh B-007 --clean --run # Reset + delete + retry
|
|
32
|
+
# ./reset-bug.sh B-007 --clean my-bugs.json # Custom bug list
|
|
33
|
+
# ============================================================
|
|
34
|
+
|
|
35
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
36
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
37
|
+
STATE_DIR="${PROJECT_ROOT}/.prizmkit/state/bugfix"
|
|
38
|
+
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
39
|
+
|
|
40
|
+
# Colors
|
|
41
|
+
RED='\033[0;31m'
|
|
42
|
+
GREEN='\033[0;32m'
|
|
43
|
+
YELLOW='\033[1;33m'
|
|
44
|
+
BLUE='\033[0;34m'
|
|
45
|
+
BOLD='\033[1m'
|
|
46
|
+
NC='\033[0m'
|
|
47
|
+
|
|
48
|
+
log_info() { echo -e "${BLUE}[INFO]${NC} $*"; }
|
|
49
|
+
log_warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
|
|
50
|
+
log_error() { echo -e "${RED}[ERROR]${NC} $*"; }
|
|
51
|
+
log_success() { echo -e "${GREEN}[OK]${NC} $*"; }
|
|
52
|
+
|
|
53
|
+
# ============================================================
|
|
54
|
+
# Parse args
|
|
55
|
+
# ============================================================
|
|
56
|
+
|
|
57
|
+
BUG_ID=""
|
|
58
|
+
BUG_RANGE=""
|
|
59
|
+
BUG_LIST=""
|
|
60
|
+
DO_CLEAN=false
|
|
61
|
+
DO_RUN=false
|
|
62
|
+
FILTER_MODE=""
|
|
63
|
+
|
|
64
|
+
for arg in "$@"; do
|
|
65
|
+
case "$arg" in
|
|
66
|
+
--clean) DO_CLEAN=true ;;
|
|
67
|
+
--run) DO_RUN=true ;;
|
|
68
|
+
--auto-skipped) FILTER_MODE="auto_skipped" ;;
|
|
69
|
+
--failed) FILTER_MODE="failed" ;;
|
|
70
|
+
--stalled) FILTER_MODE="stalled" ;;
|
|
71
|
+
-h|--help)
|
|
72
|
+
echo "Usage: $0 <bug-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [.prizmkit/plans/bug-fix-list.json]"
|
|
73
|
+
echo ""
|
|
74
|
+
echo " bug-id Single bug (e.g. B-007)"
|
|
75
|
+
echo " B-008:B-013 Range of bugs (inclusive)"
|
|
76
|
+
echo " --auto-skipped Reset all auto_skipped bugs"
|
|
77
|
+
echo " --failed Reset all failed bugs"
|
|
78
|
+
echo " --stalled Reset all non-completed (failed + auto_skipped)"
|
|
79
|
+
echo " --clean Delete session history and .prizmkit artifacts"
|
|
80
|
+
echo " --run Retry immediately after reset (single bug only)"
|
|
81
|
+
echo " .prizmkit/plans/bug-fix-list.json Path to bug fix list (default: .prizmkit/plans/bug-fix-list.json)"
|
|
82
|
+
exit 0
|
|
83
|
+
;;
|
|
84
|
+
B-*:B-*|b-*:b-*) BUG_RANGE="$arg" ;;
|
|
85
|
+
B-*|b-*) BUG_ID="$arg" ;;
|
|
86
|
+
*) BUG_LIST="$arg" ;;
|
|
87
|
+
esac
|
|
88
|
+
done
|
|
89
|
+
|
|
90
|
+
if [[ -z "$BUG_ID" && -z "$BUG_RANGE" && -z "$FILTER_MODE" ]]; then
|
|
91
|
+
echo "Usage: $0 <bug-id|range> [--clean] [--run] [--auto-skipped|--failed|--stalled] [.prizmkit/plans/bug-fix-list.json]"
|
|
92
|
+
echo ""
|
|
93
|
+
echo " bug-id Single bug (e.g. B-007)"
|
|
94
|
+
echo " B-008:B-013 Range of bugs (inclusive)"
|
|
95
|
+
echo " --auto-skipped Reset all auto_skipped bugs"
|
|
96
|
+
echo " --failed Reset all failed bugs"
|
|
97
|
+
echo " --stalled Reset all non-completed (failed + auto_skipped)"
|
|
98
|
+
echo " --clean Delete session history and .prizmkit artifacts"
|
|
99
|
+
echo " --run Retry immediately after reset (single bug only)"
|
|
100
|
+
echo " .prizmkit/plans/bug-fix-list.json Path to bug fix list (default: .prizmkit/plans/bug-fix-list.json)"
|
|
101
|
+
exit 1
|
|
102
|
+
fi
|
|
103
|
+
|
|
104
|
+
BUG_LIST="${BUG_LIST:-.prizmkit/plans/bug-fix-list.json}"
|
|
105
|
+
|
|
106
|
+
# Resolve absolute path
|
|
107
|
+
if [[ ! "$BUG_LIST" = /* ]]; then
|
|
108
|
+
BUG_LIST="$(pwd)/$BUG_LIST"
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
# ============================================================
|
|
112
|
+
# Validation
|
|
113
|
+
# ============================================================
|
|
114
|
+
|
|
115
|
+
if [[ ! -f "$BUG_LIST" ]]; then
|
|
116
|
+
log_error "Bug fix list not found: $BUG_LIST"
|
|
117
|
+
exit 1
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
if [[ ! -f "$STATE_DIR/pipeline.json" ]]; then
|
|
121
|
+
log_error "No pipeline state found. Run './run-bugfix.sh run' first to initialize."
|
|
122
|
+
exit 1
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
# ============================================================
|
|
126
|
+
# Resolve bug IDs to process
|
|
127
|
+
# ============================================================
|
|
128
|
+
|
|
129
|
+
BUG_IDS=()
|
|
130
|
+
|
|
131
|
+
if [[ -n "$FILTER_MODE" ]]; then
|
|
132
|
+
# Filter by status from .prizmkit/state/bugfix/bugs/*/status.json
|
|
133
|
+
while IFS= read -r bid; do
|
|
134
|
+
[[ -n "$bid" ]] && BUG_IDS+=("$bid")
|
|
135
|
+
done < <(python3 -c "
|
|
136
|
+
import json, os, sys
|
|
137
|
+
state_dir = '$STATE_DIR'
|
|
138
|
+
filter_mode = '$FILTER_MODE'
|
|
139
|
+
bugs_dir = os.path.join(state_dir, 'bugs')
|
|
140
|
+
if not os.path.isdir(bugs_dir):
|
|
141
|
+
sys.exit(0)
|
|
142
|
+
for bid in sorted(os.listdir(bugs_dir)):
|
|
143
|
+
status_file = os.path.join(bugs_dir, bid, 'status.json')
|
|
144
|
+
if not os.path.isfile(status_file):
|
|
145
|
+
continue
|
|
146
|
+
with open(status_file) as f:
|
|
147
|
+
status = json.load(f).get('status', '')
|
|
148
|
+
if filter_mode == 'auto_skipped' and status == 'auto_skipped':
|
|
149
|
+
print(bid)
|
|
150
|
+
elif filter_mode == 'failed' and status == 'failed':
|
|
151
|
+
print(bid)
|
|
152
|
+
elif filter_mode == 'stalled' and status in ('failed', 'auto_skipped'):
|
|
153
|
+
print(bid)
|
|
154
|
+
" 2>/dev/null)
|
|
155
|
+
|
|
156
|
+
if [[ ${#BUG_IDS[@]} -eq 0 ]]; then
|
|
157
|
+
log_info "No bugs found with status: $FILTER_MODE"
|
|
158
|
+
exit 0
|
|
159
|
+
fi
|
|
160
|
+
log_info "Found ${#BUG_IDS[@]} bug(s) matching --$FILTER_MODE: ${BUG_IDS[*]}"
|
|
161
|
+
|
|
162
|
+
elif [[ -n "$BUG_RANGE" ]]; then
|
|
163
|
+
# Parse range B-NNN:B-MMM
|
|
164
|
+
RANGE_START="${BUG_RANGE%%:*}"
|
|
165
|
+
RANGE_END="${BUG_RANGE##*:}"
|
|
166
|
+
START_NUM=$(echo "$RANGE_START" | sed 's/[Bb]-//' | sed 's/^0*//')
|
|
167
|
+
END_NUM=$(echo "$RANGE_END" | sed 's/[Bb]-//' | sed 's/^0*//')
|
|
168
|
+
|
|
169
|
+
if [[ -z "$START_NUM" || -z "$END_NUM" || "$START_NUM" -gt "$END_NUM" ]]; then
|
|
170
|
+
log_error "Invalid range: $BUG_RANGE (start must be <= end)"
|
|
171
|
+
exit 1
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
for ((i=START_NUM; i<=END_NUM; i++)); do
|
|
175
|
+
BUG_IDS+=("B-$(printf '%03d' "$i")")
|
|
176
|
+
done
|
|
177
|
+
log_info "Range $BUG_RANGE -> ${BUG_IDS[*]}"
|
|
178
|
+
|
|
179
|
+
else
|
|
180
|
+
BUG_IDS=("$BUG_ID")
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
# --run only works with single bug
|
|
184
|
+
if [[ "$DO_RUN" == true && ${#BUG_IDS[@]} -gt 1 ]]; then
|
|
185
|
+
log_warn "--run is only supported for single bug reset. Use './run-bugfix.sh run' to resume pipeline after batch reset."
|
|
186
|
+
DO_RUN=false
|
|
187
|
+
fi
|
|
188
|
+
|
|
189
|
+
# ============================================================
|
|
190
|
+
# Process each bug
|
|
191
|
+
# ============================================================
|
|
192
|
+
|
|
193
|
+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
194
|
+
RESET_COUNT=0
|
|
195
|
+
FAIL_COUNT=0
|
|
196
|
+
|
|
197
|
+
for CUR_BUG_ID in "${BUG_IDS[@]}"; do
|
|
198
|
+
|
|
199
|
+
# Get bug info from bug fix list
|
|
200
|
+
BUG_INFO=$(python3 -c "
|
|
201
|
+
import json, sys
|
|
202
|
+
with open('$BUG_LIST') as f:
|
|
203
|
+
data = json.load(f)
|
|
204
|
+
for bug in data.get('bugs', []):
|
|
205
|
+
if bug.get('id') == '$CUR_BUG_ID':
|
|
206
|
+
title = bug.get('title', '')
|
|
207
|
+
print(json.dumps({'title': title, 'status': bug.get('status', 'unknown'), 'severity': bug.get('severity', 'medium')}))
|
|
208
|
+
sys.exit(0)
|
|
209
|
+
sys.exit(1)
|
|
210
|
+
" 2>/dev/null) || {
|
|
211
|
+
log_warn "Bug $CUR_BUG_ID not found in $BUG_LIST -- skipping"
|
|
212
|
+
FAIL_COUNT=$((FAIL_COUNT + 1))
|
|
213
|
+
continue
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
BUG_TITLE=$(echo "$BUG_INFO" | python3 -c "import sys,json; print(json.load(sys.stdin)['title'])")
|
|
217
|
+
|
|
218
|
+
# -- Show current state --
|
|
219
|
+
echo ""
|
|
220
|
+
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
221
|
+
echo -e "${BOLD} Reset: $CUR_BUG_ID — $BUG_TITLE${NC}"
|
|
222
|
+
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
223
|
+
|
|
224
|
+
STATUS_FILE="$STATE_DIR/bugs/$CUR_BUG_ID/status.json"
|
|
225
|
+
if [[ -f "$STATUS_FILE" ]]; then
|
|
226
|
+
CURRENT_STATUS=$(python3 -c "import json; d=json.load(open('$STATUS_FILE')); print(d.get('status','?'))")
|
|
227
|
+
CURRENT_RETRY=$(python3 -c "import json; d=json.load(open('$STATUS_FILE')); print(d.get('retry_count',0))")
|
|
228
|
+
SESSION_COUNT=$(python3 -c "import json; d=json.load(open('$STATUS_FILE')); print(len(d.get('sessions',[])))")
|
|
229
|
+
log_info "Current status: $CURRENT_STATUS (retry $CURRENT_RETRY, $SESSION_COUNT sessions)"
|
|
230
|
+
else
|
|
231
|
+
log_info "No status file found (never executed)"
|
|
232
|
+
fi
|
|
233
|
+
|
|
234
|
+
BUGFIX_DIR="$PROJECT_ROOT/.prizmkit/bugfix/$CUR_BUG_ID"
|
|
235
|
+
BUGFIX_COUNT=0
|
|
236
|
+
if [[ -d "$BUGFIX_DIR" ]]; then
|
|
237
|
+
BUGFIX_COUNT=$(find "$BUGFIX_DIR" -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
238
|
+
log_info "PrizmKit artifacts: $BUGFIX_COUNT files in .prizmkit/bugfix/$CUR_BUG_ID/"
|
|
239
|
+
fi
|
|
240
|
+
|
|
241
|
+
SESSIONS_DIR="$STATE_DIR/bugs/$CUR_BUG_ID/sessions"
|
|
242
|
+
SESSIONS_COUNT=0
|
|
243
|
+
if [[ -d "$SESSIONS_DIR" ]]; then
|
|
244
|
+
SESSIONS_COUNT=$(find "$SESSIONS_DIR" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')
|
|
245
|
+
log_info "Session history: $SESSIONS_COUNT session(s)"
|
|
246
|
+
fi
|
|
247
|
+
|
|
248
|
+
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
249
|
+
|
|
250
|
+
# -- Execute reset --
|
|
251
|
+
if [[ "$DO_CLEAN" == true ]]; then
|
|
252
|
+
log_info "Cleaning $CUR_BUG_ID (reset + delete artifacts)..."
|
|
253
|
+
RESULT=$(python3 "$SCRIPTS_DIR/update-bug-status.py" \
|
|
254
|
+
--bug-list "$BUG_LIST" \
|
|
255
|
+
--state-dir "$STATE_DIR" \
|
|
256
|
+
--bug-id "$CUR_BUG_ID" \
|
|
257
|
+
--project-root "$PROJECT_ROOT" \
|
|
258
|
+
--action clean 2>&1)
|
|
259
|
+
else
|
|
260
|
+
log_info "Resetting $CUR_BUG_ID status..."
|
|
261
|
+
RESULT=$(python3 "$SCRIPTS_DIR/update-bug-status.py" \
|
|
262
|
+
--bug-list "$BUG_LIST" \
|
|
263
|
+
--state-dir "$STATE_DIR" \
|
|
264
|
+
--bug-id "$CUR_BUG_ID" \
|
|
265
|
+
--action reset 2>&1)
|
|
266
|
+
fi
|
|
267
|
+
|
|
268
|
+
# Check for errors
|
|
269
|
+
if echo "$RESULT" | python3 -c "import sys,json; d=json.load(sys.stdin); sys.exit(0 if 'error' not in d else 1)" 2>/dev/null; then
|
|
270
|
+
RESET_COUNT=$((RESET_COUNT + 1))
|
|
271
|
+
if [[ "$DO_CLEAN" == true ]]; then
|
|
272
|
+
log_success "$CUR_BUG_ID cleaned: status -> pending, $SESSIONS_COUNT session(s) deleted, $BUGFIX_COUNT artifact(s) deleted"
|
|
273
|
+
else
|
|
274
|
+
log_success "$CUR_BUG_ID reset: status -> pending, retry count -> 0"
|
|
275
|
+
fi
|
|
276
|
+
else
|
|
277
|
+
ERROR_MSG=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin).get('error','unknown'))" 2>/dev/null || echo "$RESULT")
|
|
278
|
+
log_error "Reset $CUR_BUG_ID failed: $ERROR_MSG"
|
|
279
|
+
FAIL_COUNT=$((FAIL_COUNT + 1))
|
|
280
|
+
fi
|
|
281
|
+
|
|
282
|
+
done
|
|
283
|
+
|
|
284
|
+
# ============================================================
|
|
285
|
+
# Summary
|
|
286
|
+
# ============================================================
|
|
287
|
+
|
|
288
|
+
echo ""
|
|
289
|
+
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
290
|
+
echo -e "${BOLD} Reset complete: $RESET_COUNT succeeded, $FAIL_COUNT failed${NC}"
|
|
291
|
+
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
292
|
+
|
|
293
|
+
echo ""
|
|
294
|
+
echo -e "${BOLD}Next steps:${NC}"
|
|
295
|
+
if [[ "$DO_RUN" == true && ${#BUG_IDS[@]} -eq 1 ]]; then
|
|
296
|
+
log_info "Auto-retrying ${BUG_IDS[0]}..."
|
|
297
|
+
echo ""
|
|
298
|
+
exec "$SCRIPT_DIR/retry-bugfix.sh" "${BUG_IDS[0]}" "$BUG_LIST"
|
|
299
|
+
else
|
|
300
|
+
log_info " ./dev-pipeline/run-bugfix.sh run .prizmkit/plans/bug-fix-list.json # Resume pipeline from first pending"
|
|
301
|
+
if [[ ${#BUG_IDS[@]} -eq 1 ]]; then
|
|
302
|
+
log_info " ./dev-pipeline/retry-bugfix.sh ${BUG_IDS[0]} # Retry single bug"
|
|
303
|
+
fi
|
|
304
|
+
fi
|
|
305
|
+
echo ""
|
|
@@ -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"
|
|
@@ -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
|
|
@@ -9,16 +9,17 @@ set -euo pipefail
|
|
|
9
9
|
# the full refactor pipeline.
|
|
10
10
|
#
|
|
11
11
|
# Usage:
|
|
12
|
-
# ./retry-refactor.sh <refactor-id> [refactor-list.json]
|
|
12
|
+
# ./retry-refactor.sh <refactor-id> [.prizmkit/plans/refactor-list.json]
|
|
13
13
|
#
|
|
14
14
|
# Examples:
|
|
15
15
|
# ./retry-refactor.sh R-001
|
|
16
|
-
# ./retry-refactor.sh R-001 refactor-list.json
|
|
16
|
+
# ./retry-refactor.sh R-001 .prizmkit/plans/refactor-list.json
|
|
17
17
|
# SESSION_TIMEOUT=3600 ./retry-refactor.sh R-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/refactor"
|
|
22
23
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
23
24
|
|
|
24
25
|
SESSION_TIMEOUT=${SESSION_TIMEOUT:-0}
|
|
@@ -39,10 +40,10 @@ detect_stream_json_support "$CLI_CMD"
|
|
|
39
40
|
# ============================================================
|
|
40
41
|
|
|
41
42
|
if [[ $# -lt 1 ]]; then
|
|
42
|
-
echo "Usage: $0 <refactor-id> [refactor-list.json]"
|
|
43
|
+
echo "Usage: $0 <refactor-id> [.prizmkit/plans/refactor-list.json]"
|
|
43
44
|
echo ""
|
|
44
45
|
echo " refactor-id Refactor to retry (e.g. R-001)"
|
|
45
|
-
echo " refactor-list.json Path to refactor list (default: refactor-list.json)"
|
|
46
|
+
echo " refactor-list.json Path to refactor list (default: .prizmkit/plans/refactor-list.json)"
|
|
46
47
|
echo ""
|
|
47
48
|
echo "Environment Variables:"
|
|
48
49
|
echo " SESSION_TIMEOUT Timeout in seconds (default: 0 = no limit)"
|
|
@@ -51,7 +52,7 @@ if [[ $# -lt 1 ]]; then
|
|
|
51
52
|
fi
|
|
52
53
|
|
|
53
54
|
REFACTOR_ID="$1"
|
|
54
|
-
REFACTOR_LIST="${2
|
|
55
|
+
REFACTOR_LIST="${2:-.prizmkit/plans/refactor-list.json}"
|
|
55
56
|
|
|
56
57
|
if [[ ! "$REFACTOR_LIST" = /* ]]; then
|
|
57
58
|
REFACTOR_LIST="$(pwd)/$REFACTOR_LIST"
|