prizmkit 1.1.36 → 1.1.38
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/run-bugfix.sh +17 -0
- package/bundled/dev-pipeline/run-feature.sh +17 -0
- package/bundled/dev-pipeline/run-refactor.sh +17 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/bug-fix-workflow/SKILL.md +17 -27
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +1 -0
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +1 -0
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +1 -0
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -28,6 +28,7 @@ set -euo pipefail
|
|
|
28
28
|
# LOG_MAX_TOTAL_MB Keep total logs under N MB via oldest-first cleanup (default: 1024)
|
|
29
29
|
# DEV_BRANCH Custom dev branch name (default: auto-generated bugfix/pipeline-{run_id})
|
|
30
30
|
# AUTO_PUSH Auto-push to remote after successful bug fix (default: 0). Set to 1 to enable.
|
|
31
|
+
# STOP_ON_FAILURE Stop pipeline after a task exhausts all retries (default: 0). Set to 1 to stop.
|
|
31
32
|
# ============================================================
|
|
32
33
|
|
|
33
34
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
@@ -48,6 +49,7 @@ VERBOSE=${VERBOSE:-0}
|
|
|
48
49
|
MODEL=${MODEL:-""}
|
|
49
50
|
DEV_BRANCH=${DEV_BRANCH:-""}
|
|
50
51
|
AUTO_PUSH=${AUTO_PUSH:-0}
|
|
52
|
+
STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
|
|
51
53
|
|
|
52
54
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
53
55
|
source "$SCRIPT_DIR/lib/common.sh"
|
|
@@ -905,6 +907,9 @@ main() {
|
|
|
905
907
|
if [[ -n "${MODEL:-}" ]]; then
|
|
906
908
|
log_info "Default Model: $MODEL"
|
|
907
909
|
fi
|
|
910
|
+
if [[ "$STOP_ON_FAILURE" == "1" ]]; then
|
|
911
|
+
log_info "Stop on failure: enabled"
|
|
912
|
+
fi
|
|
908
913
|
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
909
914
|
echo ""
|
|
910
915
|
|
|
@@ -1106,6 +1111,17 @@ main() {
|
|
|
1106
1111
|
session_count=$((session_count + 1))
|
|
1107
1112
|
total_subagent_calls=$((total_subagent_calls + _SUBAGENT_COUNT))
|
|
1108
1113
|
|
|
1114
|
+
# Stop-on-failure: abort pipeline if task failed and STOP_ON_FAILURE is enabled
|
|
1115
|
+
if [[ "$session_status" != "success" && "$STOP_ON_FAILURE" == "1" ]]; then
|
|
1116
|
+
echo ""
|
|
1117
|
+
log_error "════════════════════════════════════════════════════"
|
|
1118
|
+
log_error " STOP_ON_FAILURE: Pipeline halted after $bug_id failed."
|
|
1119
|
+
log_error " Total sessions completed: $session_count"
|
|
1120
|
+
log_error " Set STOP_ON_FAILURE=0 to continue past failures."
|
|
1121
|
+
log_error "════════════════════════════════════════════════════"
|
|
1122
|
+
break
|
|
1123
|
+
fi
|
|
1124
|
+
|
|
1109
1125
|
# Stuck detection
|
|
1110
1126
|
if python3 "$SCRIPTS_DIR/detect-stuck.py" \
|
|
1111
1127
|
--state-dir "$STATE_DIR" \
|
|
@@ -1165,6 +1181,7 @@ show_help() {
|
|
|
1165
1181
|
echo " VERBOSE Set to 1 for verbose AI CLI output"
|
|
1166
1182
|
echo " HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)"
|
|
1167
1183
|
echo " STALE_KILL_THRESHOLD Auto-kill session after N seconds of no progress (default: 900)"
|
|
1184
|
+
echo " STOP_ON_FAILURE Stop pipeline when a task exhausts retries: 0|1 (default: 0)"
|
|
1168
1185
|
echo " LOG_CLEANUP_ENABLED Run log cleanup before execution (default: 1)"
|
|
1169
1186
|
echo " LOG_RETENTION_DAYS Delete logs older than N days (default: 14)"
|
|
1170
1187
|
echo " LOG_MAX_TOTAL_MB Keep total logs under N MB (default: 1024)"
|
|
@@ -31,6 +31,7 @@ set -euo pipefail
|
|
|
31
31
|
# PIPELINE_MODE Override mode for all features: lite|standard|full (used by daemon)
|
|
32
32
|
# DEV_BRANCH Custom dev branch name (default: auto-generated dev/{feature_id}-YYYYMMDDHHmm)
|
|
33
33
|
# AUTO_PUSH Auto-push to remote after successful feature (default: 0). Set to 1 to enable.
|
|
34
|
+
# STOP_ON_FAILURE Stop pipeline after a task exhausts all retries (default: 0). Set to 1 to stop.
|
|
34
35
|
# ============================================================
|
|
35
36
|
|
|
36
37
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
@@ -51,6 +52,7 @@ VERBOSE=${VERBOSE:-0}
|
|
|
51
52
|
MODEL=${MODEL:-""}
|
|
52
53
|
DEV_BRANCH=${DEV_BRANCH:-""}
|
|
53
54
|
AUTO_PUSH=${AUTO_PUSH:-0}
|
|
55
|
+
STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
|
|
54
56
|
|
|
55
57
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
56
58
|
source "$SCRIPT_DIR/lib/common.sh"
|
|
@@ -1089,6 +1091,9 @@ main() {
|
|
|
1089
1091
|
if [[ -n "${MODEL:-}" ]]; then
|
|
1090
1092
|
log_info "Default Model: $MODEL"
|
|
1091
1093
|
fi
|
|
1094
|
+
if [[ "$STOP_ON_FAILURE" == "1" ]]; then
|
|
1095
|
+
log_info "Stop on failure: enabled"
|
|
1096
|
+
fi
|
|
1092
1097
|
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
1093
1098
|
echo ""
|
|
1094
1099
|
|
|
@@ -1338,6 +1343,17 @@ print(count)
|
|
|
1338
1343
|
session_count=$((session_count + 1))
|
|
1339
1344
|
total_subagent_calls=$((total_subagent_calls + _SUBAGENT_COUNT))
|
|
1340
1345
|
|
|
1346
|
+
# Stop-on-failure: abort pipeline if task failed and STOP_ON_FAILURE is enabled
|
|
1347
|
+
if [[ "$session_status" != "success" && "$STOP_ON_FAILURE" == "1" ]]; then
|
|
1348
|
+
echo ""
|
|
1349
|
+
log_error "════════════════════════════════════════════════════"
|
|
1350
|
+
log_error " STOP_ON_FAILURE: Pipeline halted after $feature_id failed."
|
|
1351
|
+
log_error " Total sessions completed: $session_count"
|
|
1352
|
+
log_error " Set STOP_ON_FAILURE=0 to continue past failures."
|
|
1353
|
+
log_error "════════════════════════════════════════════════════"
|
|
1354
|
+
break
|
|
1355
|
+
fi
|
|
1356
|
+
|
|
1341
1357
|
# Brief pause before next iteration
|
|
1342
1358
|
log_info "Pausing 5s before next feature..."
|
|
1343
1359
|
sleep 5
|
|
@@ -1388,6 +1404,7 @@ show_help() {
|
|
|
1388
1404
|
echo " LOG_MAX_TOTAL_MB Keep total logs under N MB (default: 1024)"
|
|
1389
1405
|
echo " PIPELINE_MODE Override mode for all features: lite|standard|full"
|
|
1390
1406
|
echo " ENABLE_CRITIC Enable critic review for all features: true|false"
|
|
1407
|
+
echo " STOP_ON_FAILURE Stop pipeline when a task exhausts retries: 0|1 (default: 0)"
|
|
1391
1408
|
echo ""
|
|
1392
1409
|
echo "Examples:"
|
|
1393
1410
|
echo " ./run-feature.sh run # Run all features"
|
|
@@ -28,6 +28,7 @@ set -euo pipefail
|
|
|
28
28
|
# LOG_MAX_TOTAL_MB Keep total logs under N MB via oldest-first cleanup (default: 1024)
|
|
29
29
|
# DEV_BRANCH Custom dev branch name (default: auto-generated refactor/pipeline-{run_id})
|
|
30
30
|
# AUTO_PUSH Auto-push to remote after successful refactor (default: 0). Set to 1 to enable.
|
|
31
|
+
# STOP_ON_FAILURE Stop pipeline after a task exhausts all retries (default: 0). Set to 1 to stop.
|
|
31
32
|
# STRICT_BEHAVIOR_CHECK Force full test suite after each refactor item (default: 1)
|
|
32
33
|
# ============================================================
|
|
33
34
|
|
|
@@ -49,6 +50,7 @@ VERBOSE=${VERBOSE:-0}
|
|
|
49
50
|
MODEL=${MODEL:-""}
|
|
50
51
|
DEV_BRANCH=${DEV_BRANCH:-""}
|
|
51
52
|
AUTO_PUSH=${AUTO_PUSH:-0}
|
|
53
|
+
STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
|
|
52
54
|
STRICT_BEHAVIOR_CHECK=${STRICT_BEHAVIOR_CHECK:-1}
|
|
53
55
|
|
|
54
56
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
@@ -940,6 +942,9 @@ main() {
|
|
|
940
942
|
else
|
|
941
943
|
log_info "Strict behavior check: disabled"
|
|
942
944
|
fi
|
|
945
|
+
if [[ "$STOP_ON_FAILURE" == "1" ]]; then
|
|
946
|
+
log_info "Stop on failure: enabled"
|
|
947
|
+
fi
|
|
943
948
|
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
944
949
|
echo ""
|
|
945
950
|
|
|
@@ -1164,6 +1169,17 @@ main() {
|
|
|
1164
1169
|
session_count=$((session_count + 1))
|
|
1165
1170
|
total_subagent_calls=$((total_subagent_calls + _SUBAGENT_COUNT))
|
|
1166
1171
|
|
|
1172
|
+
# Stop-on-failure: abort pipeline if task failed and STOP_ON_FAILURE is enabled
|
|
1173
|
+
if [[ "$session_status" != "success" && "$STOP_ON_FAILURE" == "1" ]]; then
|
|
1174
|
+
echo ""
|
|
1175
|
+
log_error "════════════════════════════════════════════════════"
|
|
1176
|
+
log_error " STOP_ON_FAILURE: Pipeline halted after $refactor_id failed."
|
|
1177
|
+
log_error " Total sessions completed: $session_count"
|
|
1178
|
+
log_error " Set STOP_ON_FAILURE=0 to continue past failures."
|
|
1179
|
+
log_error "════════════════════════════════════════════════════"
|
|
1180
|
+
break
|
|
1181
|
+
fi
|
|
1182
|
+
|
|
1167
1183
|
log_info "Pausing 5s before next refactor..."
|
|
1168
1184
|
sleep 5
|
|
1169
1185
|
done
|
|
@@ -1203,6 +1219,7 @@ show_help() {
|
|
|
1203
1219
|
echo " STRICT_BEHAVIOR_CHECK Force full test suite after each refactor (default: 1)"
|
|
1204
1220
|
echo " HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)"
|
|
1205
1221
|
echo " STALE_KILL_THRESHOLD Auto-kill session after N seconds of no progress (default: 900)"
|
|
1222
|
+
echo " STOP_ON_FAILURE Stop pipeline when a task exhausts retries: 0|1 (default: 0)"
|
|
1206
1223
|
echo " LOG_CLEANUP_ENABLED Run log cleanup before execution (default: 1)"
|
|
1207
1224
|
echo " LOG_RETENTION_DAYS Delete logs older than N days (default: 14)"
|
|
1208
1225
|
echo " LOG_MAX_TOTAL_MB Keep total logs under N MB (default: 1024)"
|
|
@@ -48,11 +48,12 @@ For trivial bugs with clear root cause and minimal scope:
|
|
|
48
48
|
1. Branch Setup → `fix/<BUG_ID>-<short-desc>`
|
|
49
49
|
2. Write reproduction test → confirm failing
|
|
50
50
|
3. Apply fix → confirm test passes + full suite green
|
|
51
|
-
4.
|
|
52
|
-
5.
|
|
53
|
-
6.
|
|
51
|
+
4. Run `/prizmkit-code-review` for quality check
|
|
52
|
+
5. Ask user: "Quick fix applied. Verify before commit? (Y/skip)"
|
|
53
|
+
6. Commit with `fix(<scope>):` prefix
|
|
54
|
+
7. Ask merge preference
|
|
54
55
|
|
|
55
|
-
**Fast Path still requires**: fix branch, reproduction test, full test suite pass, user merge decision.
|
|
56
|
+
**Fast Path still requires**: fix branch, reproduction test, full test suite pass, code review, user merge decision.
|
|
56
57
|
|
|
57
58
|
---
|
|
58
59
|
|
|
@@ -196,9 +197,11 @@ AskUserQuestion:
|
|
|
196
197
|
```
|
|
197
198
|
|
|
198
199
|
- **Plan and fix now** → Invoke `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/<BUG_ID>/`:
|
|
199
|
-
1. prizmkit-plan generates `spec.md` + `plan.md` under `.prizmkit/bugfix/<BUG_ID>/`
|
|
200
|
-
2. Invoke `/prizmkit-implement` to execute the plan
|
|
201
|
-
3.
|
|
200
|
+
1. `/prizmkit-plan` generates `spec.md` (bug description + acceptance criteria) + `plan.md` (fix strategy + test specifications) under `.prizmkit/bugfix/<BUG_ID>/`
|
|
201
|
+
2. Invoke `/prizmkit-implement` to execute the plan (TDD: write failing reproduction test → implement fix → tests pass)
|
|
202
|
+
3. Run `/prizmkit-code-review` for quality check
|
|
203
|
+
4. Commit via `/prizmkit-committer` with `fix(<scope>):` prefix
|
|
204
|
+
5. **End workflow** — skip Phase 2-7. No `/prizmkit-retrospective` (bug fixes are incomplete features, not new architecture)
|
|
202
205
|
- **Add to bug-fix-list.json** → Invoke `bug-planner` to add this bug to `.prizmkit/plans/bug-fix-list.json`, then suggest user run `bugfix-pipeline-launcher` to start the pipeline. End this workflow.
|
|
203
206
|
|
|
204
207
|
**NEVER proceed with direct code changes without explicit user confirmation via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
|
|
@@ -276,22 +279,12 @@ If the fix causes test regressions:
|
|
|
276
279
|
|
|
277
280
|
**Goal**: Verify fix quality before committing.
|
|
278
281
|
|
|
279
|
-
1. **
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
3. **Present review summary**:
|
|
286
|
-
```
|
|
287
|
-
Fix Review:
|
|
288
|
-
- Root cause addressed: Yes (null check added at auth service level)
|
|
289
|
-
- Edge cases: Covered (401, 403, network error)
|
|
290
|
-
- Regression: None (48/48 tests pass)
|
|
291
|
-
- Code quality: Clean, follows existing patterns
|
|
292
|
-
|
|
293
|
-
Ready to commit.
|
|
294
|
-
```
|
|
282
|
+
1. **Run `/prizmkit-code-review`** to review the fix:
|
|
283
|
+
- Reviews git diff against the bug context (root cause, fix approach, affected areas)
|
|
284
|
+
- Iterative Reviewer Agent + Dev Agent loop (max 3 rounds)
|
|
285
|
+
- Checks: root cause addressed (not just symptom), edge cases covered, reproduction test thoroughness, project conventions
|
|
286
|
+
2. **If PASS**: Proceed to Phase 6
|
|
287
|
+
3. **If NEEDS_FIXES after max rounds**: Present unresolved findings to user, ask whether to proceed or revise
|
|
295
288
|
|
|
296
289
|
**CHECKPOINT CP-BFW-5**: Code review completed and quality verified.
|
|
297
290
|
|
|
@@ -323,11 +316,8 @@ If user reports the fix is NOT working:
|
|
|
323
316
|
- Commit message: `fix(<scope>): <description>`
|
|
324
317
|
- Include both fix code and reproduction test
|
|
325
318
|
- Do NOT push (user decides when to push)
|
|
326
|
-
- **Bug Fix Documentation Policy**:
|
|
327
|
-
- DEFAULT: Run `/prizmkit-retrospective` with structural sync only (update file counts, interfaces, dependencies). Skip knowledge injection.
|
|
328
|
-
- UPDATE DOCS when bug fix causes: interface signature changes, dependency additions/removals, observable behavior changes to existing features, or newly discovered TRAPs (gotchas/pitfalls)
|
|
329
|
-
- When any of the above apply, run full `/prizmkit-retrospective` (Job 1 + Job 2)
|
|
330
319
|
- `/prizmkit-committer` is a pure commit tool — it does NOT modify `.prizm-docs/` or any project files
|
|
320
|
+
- No `/prizmkit-retrospective` — bug fixes are incomplete features, not new architecture worth documenting
|
|
331
321
|
2. **Ask merge preference**:
|
|
332
322
|
```
|
|
333
323
|
Fix committed on branch `fix/<BUG_ID>-<short-desc>`.
|
|
@@ -156,6 +156,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
156
156
|
| `LOG_CLEANUP_ENABLED` | `1` | Run periodic log cleanup (`0` to disable) |
|
|
157
157
|
| `LOG_RETENTION_DAYS` | `14` | Delete logs older than N days |
|
|
158
158
|
| `LOG_MAX_TOTAL_MB` | `1024` | Keep total logs under N MB via oldest-first cleanup |
|
|
159
|
+
| `STOP_ON_FAILURE` | `0` | Stop pipeline when a task exhausts all retries (`1` to stop immediately) |
|
|
159
160
|
|
|
160
161
|
⚠️ STOP HERE and wait for user response before continuing to step 6.
|
|
161
162
|
|
|
@@ -183,6 +183,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
183
183
|
| `LOG_CLEANUP_ENABLED` | `1` | Run periodic log cleanup (`0` to disable) |
|
|
184
184
|
| `LOG_RETENTION_DAYS` | `14` | Delete logs older than N days |
|
|
185
185
|
| `LOG_MAX_TOTAL_MB` | `1024` | Keep total logs under N MB via oldest-first cleanup |
|
|
186
|
+
| `STOP_ON_FAILURE` | `0` | Stop pipeline when a task exhausts all retries (`1` to stop immediately) |
|
|
186
187
|
|
|
187
188
|
⚠️ STOP HERE and wait for user response before continuing to step 7.
|
|
188
189
|
|
|
@@ -179,6 +179,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
179
179
|
| `LOG_CLEANUP_ENABLED` | `1` | Run periodic log cleanup (`0` to disable) |
|
|
180
180
|
| `LOG_RETENTION_DAYS` | `14` | Delete logs older than N days |
|
|
181
181
|
| `LOG_MAX_TOTAL_MB` | `1024` | Keep total logs under N MB via oldest-first cleanup |
|
|
182
|
+
| `STOP_ON_FAILURE` | `0` | Stop pipeline when a task exhausts all retries (`1` to stop immediately) |
|
|
182
183
|
|
|
183
184
|
⚠️ STOP HERE and wait for user response before continuing to step 7.
|
|
184
185
|
|