prizmkit 1.1.72 → 1.1.76

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.
Files changed (62) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/agents/prizm-dev-team-dev.md +11 -1
  3. package/bundled/dev-pipeline/.env.example +1 -0
  4. package/bundled/dev-pipeline/lib/common.sh +53 -0
  5. package/bundled/dev-pipeline/lib/heartbeat.sh +94 -42
  6. package/bundled/dev-pipeline/run-bugfix.sh +5 -0
  7. package/bundled/dev-pipeline/run-feature.sh +5 -0
  8. package/bundled/dev-pipeline/run-recovery.sh +6 -0
  9. package/bundled/dev-pipeline/run-refactor.sh +5 -0
  10. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +265 -5
  11. package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +21 -0
  12. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +1 -1
  13. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -9
  14. package/bundled/dev-pipeline/templates/sections/feature-context.md +3 -18
  15. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +1 -1
  16. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +6 -12
  17. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +10 -3
  18. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +1 -0
  19. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +4 -8
  20. package/bundled/dev-pipeline-windows/lib/common.ps1 +23 -0
  21. package/bundled/dev-pipeline-windows/lib/heartbeat.sh +439 -0
  22. package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +33 -2
  23. package/bundled/dev-pipeline-windows/run-recovery.ps1 +11 -0
  24. package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +265 -5
  25. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +21 -0
  26. package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +1 -1
  27. package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +27 -0
  28. package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +543 -14
  29. package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +664 -14
  30. package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +741 -14
  31. package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +2 -2
  32. package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +1 -1
  33. package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +1 -1
  34. package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +1 -1
  35. package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +3 -3
  36. package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +1 -1
  37. package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +3 -18
  38. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +239 -40
  39. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +75 -26
  40. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +142 -36
  41. package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +2 -2
  42. package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +1 -1
  43. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +1 -1
  44. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +7 -17
  45. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +10 -3
  46. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +1 -1
  47. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +1 -1
  48. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +3 -1
  49. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +7 -3
  50. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +1 -3
  51. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +1 -1
  52. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +1 -1
  53. package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +1 -1
  54. package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +2 -2
  55. package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +13 -17
  56. package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +2 -4
  57. package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +1 -1
  58. package/bundled/skills/_metadata.json +1 -1
  59. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +1 -0
  60. package/bundled/skills/feature-pipeline-launcher/SKILL.md +1 -0
  61. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +1 -0
  62. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.1.72",
3
- "bundledAt": "2026-06-11T12:58:26.870Z",
4
- "bundledFrom": "099177b"
2
+ "frameworkVersion": "1.1.76",
3
+ "bundledAt": "2026-06-13T04:58:49.240Z",
4
+ "bundledFrom": "17f8257"
5
5
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: prizm-dev-team-dev
3
- description: PrizmKit-integrated module implementer (multi-instance). Follows /prizmkit-implement workflow with TDD, marks tasks [x] in plan.md Tasks section, works within assigned Git worktrees. Use when implementing specific feature modules.
3
+ description: PrizmKit-integrated module implementer (multi-instance). Follows /prizmkit-implement workflow with TDD, marks tasks [x] in plan.md Tasks section. Works directly in the repository; uses git worktree only if explicitly instructed. Use when implementing specific feature modules.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskGet, TaskUpdate, TaskList, SendMessage
5
5
  disallowedTools: Agent
6
6
  model: inherit
@@ -86,6 +86,16 @@ DEV-17: DO NOT re-read source files already listed in context-snapshot.md Sectio
86
86
  DEV-18: When tests fail, run `$TEST_CMD 2>&1 | tee /tmp/test-out.txt` ONCE, then grep `/tmp/test-out.txt` for failure details. Never re-run the full test suite just to apply a different grep filter to its output.
87
87
  DEV-19: Before writing any `.prizmkit/prizm-docs/` file, check if it exists. If it exists: only update durable fields (KEY_FILES, INTERFACES, DEPENDENCIES, file counts, RULES, TRAPS, DECISIONS) — never overwrite the full file. Never add CHANGELOG, UPDATED/date fields, or workflow metadata. Only create new L2 docs for sub-modules you are actively creating in this session.
88
88
  DEV-20: Internal tracking IDs are not product copy. Before writing UI text or UI-copy assertions, translate references like `F-003 guard` into product-language behavior such as `the high-risk guard`. Add regression coverage when a feature touches user-visible text.
89
+ DEV-21: Before any Read with offset + limit, compute offset + limit. If the last tool_result for this file shows it has N lines, offset MUST be < N. Never request an offset >= known file length.
90
+ DEV-22: When Edit fails with 'String to replace not found':
91
+ 1. STOP editing immediately — do NOT retry the same Edit.
92
+ 2. Run `grep -n` to locate the exact line of the target text.
93
+ 3. Read with offset = max(grep_line - 20, 0), limit = 50.
94
+ 4. Copy the exact text from the Read result into the Edit old_string.
95
+ 5. Never guess or extrapolate an offset — grep first, then read, then edit.
96
+ DEV-23: If 3 consecutive Read calls to the same file return 'shorter than provided offset' or 'Wasted call', STOP all work on that file. Send ESCALATION with the file path, current line count, and the offsets you attempted. The orchestrator will provide the correct content.
97
+ DEV-24: Before editing a large file (>1000 lines), verify you know its current line count from the most recent tool_result. Old line counts from earlier turns may be stale if you have since edited the file.
98
+ DEV-25: After every 3 successful Edit operations on a file, run the relevant test command for that file once to validate your changes compile and behave correctly. Do not defer all testing to the end.
89
99
  ```
90
100
 
91
101
  ### Workflow
@@ -44,6 +44,7 @@
44
44
  # STALE_KILL_THRESHOLD=900 # Auto-kill after N seconds without parent log progress (0 = disabled)
45
45
  # CODEX_WAIT_STALE_KILL_THRESHOLD=3600 # Longer no-log window while Codex waits on subagents
46
46
  # CODEX_SUBAGENT_TIMEOUT_SECONDS=3300 # Codex subagent max runtime; defaults to wait threshold - 300
47
+ # CB_SUBAGENT_STALE_KILL_THRESHOLD=3600 # Longer no-log window while CodeBuddy sub-agents are running
47
48
  # LOG_CLEANUP_ENABLED=1 # Periodic log cleanup (1=on, 0=off)
48
49
  # LOG_RETENTION_DAYS=14 # Delete logs older than N days
49
50
  # LOG_MAX_TOTAL_MB=1024 # Keep total logs under N MB via oldest-first cleanup
@@ -338,6 +338,41 @@ prizm_detect_cli_and_platform() {
338
338
  export PRIZMKIT_PLATFORM="$PLATFORM"
339
339
  }
340
340
 
341
+ # Validate PRIZMKIT_EFFORT against the detected platform's supported values.
342
+ # Exits with a friendly error if the value is unsupported.
343
+ prizm_validate_effort() {
344
+ [[ -n "${PRIZMKIT_EFFORT:-}" ]] || return 0
345
+
346
+ local session_platform
347
+ session_platform="$(_prizm_session_platform)"
348
+
349
+ local allowed_values
350
+ case "$session_platform" in
351
+ claude) allowed_values="low, medium, high, xhigh, max" ;;
352
+ codex) allowed_values="low, medium, high, xhigh" ;;
353
+ *) allowed_values="low, medium, high, xhigh" ;;
354
+ esac
355
+
356
+ local valid=0
357
+ local val
358
+ for val in $allowed_values; do
359
+ val="${val%,}"
360
+ [[ "$val" == "$PRIZMKIT_EFFORT" ]] && valid=1 && break
361
+ done
362
+
363
+ if [[ "$valid" -ne 1 ]]; then
364
+ local platform_label="$session_platform"
365
+ [[ "$session_platform" == "claude" ]] && platform_label="Claude Code"
366
+ [[ "$session_platform" == "codebuddy" ]] && platform_label="CodeBuddy"
367
+ [[ "$session_platform" == "codex" ]] && platform_label="Codex"
368
+
369
+ log_error "PRIZMKIT_EFFORT='$PRIZMKIT_EFFORT' is not supported by the detected CLI ($platform_label)."
370
+ log_error " Supported values for $platform_label: $allowed_values"
371
+ log_error " Set PRIZMKIT_EFFORT to one of the above, or unset it to use the CLI default."
372
+ exit 1
373
+ fi
374
+ }
375
+
341
376
  # Start an AI CLI session in the background.
342
377
  # Usage: prizm_start_ai_session <prompt_path> <log_path> <model>
343
378
  # Sets PRIZM_AI_PID to the spawned process PID. Do not call this function via
@@ -380,6 +415,9 @@ prizm_start_ai_session() {
380
415
  if [[ "$USE_STREAM_JSON" == "true" ]]; then
381
416
  claude_args+=(--output-format stream-json)
382
417
  fi
418
+ if [[ -n "${PRIZMKIT_EFFORT:-}" ]]; then
419
+ claude_args+=(--effort "$PRIZMKIT_EFFORT")
420
+ fi
383
421
  if [[ -n "$model" ]]; then
384
422
  claude_args+=(--model "$model")
385
423
  fi
@@ -399,6 +437,9 @@ prizm_start_ai_session() {
399
437
  if [[ -n "$model" ]]; then
400
438
  codex_args+=(--model "$model")
401
439
  fi
440
+ if [[ -n "${PRIZMKIT_EFFORT:-}" ]]; then
441
+ codex_args+=(--config "model_reasoning_effort=$PRIZMKIT_EFFORT")
442
+ fi
402
443
  "$CLI_CMD" "${codex_args[@]}" - < "$prompt_path" > "$log_path" 2>&1 &
403
444
  ;;
404
445
  *)
@@ -409,6 +450,9 @@ prizm_start_ai_session() {
409
450
  if [[ "$USE_STREAM_JSON" == "true" ]]; then
410
451
  cb_args+=(--output-format stream-json)
411
452
  fi
453
+ if [[ -n "${PRIZMKIT_EFFORT:-}" ]]; then
454
+ cb_args+=(--effort "$PRIZMKIT_EFFORT")
455
+ fi
412
456
  if [[ -n "$model" ]]; then
413
457
  cb_args+=(--model "$model")
414
458
  fi
@@ -900,6 +944,9 @@ prizm_run_ai_session() {
900
944
  case "$session_platform" in
901
945
  claude)
902
946
  local claude_args=(-p "$(cat "$prompt_path")" --dangerously-skip-permissions)
947
+ if [[ -n "${PRIZMKIT_EFFORT:-}" ]]; then
948
+ claude_args+=(--effort "$PRIZMKIT_EFFORT")
949
+ fi
903
950
  if [[ -n "$model" ]]; then
904
951
  claude_args+=(--model "$model")
905
952
  fi
@@ -919,10 +966,16 @@ prizm_run_ai_session() {
919
966
  if [[ -n "$model" ]]; then
920
967
  codex_args+=(--model "$model")
921
968
  fi
969
+ if [[ -n "${PRIZMKIT_EFFORT:-}" ]]; then
970
+ codex_args+=(--config "model_reasoning_effort=$PRIZMKIT_EFFORT")
971
+ fi
922
972
  "$CLI_CMD" "${codex_args[@]}" - < "$prompt_path" > "$log_path" 2>&1
923
973
  ;;
924
974
  *)
925
975
  local cb_args=(--print -y)
976
+ if [[ -n "${PRIZMKIT_EFFORT:-}" ]]; then
977
+ cb_args+=(--effort "$PRIZMKIT_EFFORT")
978
+ fi
926
979
  if [[ -n "$model" ]]; then
927
980
  cb_args+=(--model "$model")
928
981
  fi
@@ -90,9 +90,102 @@ PY
90
90
  fi
91
91
  prev_child_activity_signature="$child_activity_signature"
92
92
 
93
+ local effective_stale_kill_threshold="$stale_kill_threshold"
94
+ if [[ $stale_kill_threshold -gt 0 && -f "$progress_json" ]]; then
95
+ local extended_threshold
96
+ extended_threshold=$(python3 - "$progress_json" "$stale_kill_threshold" <<'PY' 2>/dev/null || true
97
+ import json
98
+ import os
99
+ import sys
100
+
101
+ progress_path = sys.argv[1]
102
+ base_threshold = int(sys.argv[2])
103
+
104
+ with open(progress_path, "r", encoding="utf-8") as fh:
105
+ progress = json.load(fh)
106
+
107
+ spawn_count = 0
108
+ for tool in progress.get("tool_calls", []):
109
+ if isinstance(tool, dict) and tool.get("name") in ("spawn_agent", "Agent", "TaskCreate"):
110
+ try:
111
+ spawn_count += int(tool.get("count", 0))
112
+ except (TypeError, ValueError):
113
+ pass
114
+
115
+ # Also check the subagent_spawn_count field (set by _record_cb_agent_tool_call)
116
+ if not spawn_count:
117
+ spawn_count = int(progress.get("subagent_spawn_count", 0))
118
+
119
+ fmt = progress.get("event_format", "")
120
+
121
+ # Codex: current_tool == "wait" means parent is blocked on spawn_agent completion
122
+ if (
123
+ fmt == "codex-json"
124
+ and progress.get("current_tool") == "wait"
125
+ and spawn_count > 0
126
+ ):
127
+ configured = os.environ.get("CODEX_WAIT_STALE_KILL_THRESHOLD", "")
128
+ try:
129
+ wait_threshold = int(configured)
130
+ except ValueError:
131
+ wait_threshold = max(base_threshold * 4, 3600)
132
+ if wait_threshold > base_threshold:
133
+ print(wait_threshold)
134
+
135
+ # CodeBuddy: Agent tool blocks synchronously; Task* tools imply bg agents.
136
+ # Extend the stale window when sub-agents have been spawned so the heartbeat
137
+ # doesn't kill the parent while children are still running.
138
+ if (
139
+ fmt == "stream-json"
140
+ and spawn_count > 0
141
+ and progress.get("cb_session_id", "")
142
+ ):
143
+ configured = os.environ.get("CB_SUBAGENT_STALE_KILL_THRESHOLD", "")
144
+ try:
145
+ cb_threshold = int(configured)
146
+ except ValueError:
147
+ cb_threshold = max(base_threshold * 4, 3600)
148
+ if cb_threshold > base_threshold:
149
+ print(cb_threshold)
150
+ PY
151
+ )
152
+ if [[ "$extended_threshold" =~ ^[0-9]+$ && "$extended_threshold" -gt "$stale_kill_threshold" ]]; then
153
+ effective_stale_kill_threshold="$extended_threshold"
154
+ fi
155
+ fi
156
+
157
+ # Check for error-loop: agent is actively producing output but results are
158
+ # all read-offset errors or wasted calls. This is a stuck agent that appears
159
+ # "active" by log growth but is accomplishing nothing.
160
+ local error_loop_detected=false
161
+ if [[ $effective_stale_kill_threshold -gt 0 && $growth -gt 0 && -f "$progress_json" ]]; then
162
+ local error_loop_flag
163
+ error_loop_flag=$(python3 - "$progress_json" <<'PY' 2>/dev/null || true
164
+ import json, sys
165
+ try:
166
+ with open(sys.argv[1], encoding="utf-8") as fh:
167
+ progress = json.load(fh)
168
+ except Exception:
169
+ raise SystemExit(0)
170
+ errors = progress.get("errors", [])
171
+ if isinstance(errors, list) and len(errors) >= 5:
172
+ recent = errors[-5:]
173
+ if all(isinstance(e, dict) and e.get("type") in ("read_offset_overflow", "wasted_call") for e in recent):
174
+ print("error_loop")
175
+ PY
176
+ )
177
+ if [[ "$error_loop_flag" == "error_loop" ]]; then
178
+ error_loop_detected=true
179
+ fi
180
+ fi
181
+
93
182
  # Track progress staleness. Parent sessions can sit in a wait/polling
94
183
  # tool while child transcripts keep growing, so child activity counts.
95
- if [[ $growth -eq 0 && $child_growth -eq 0 ]]; then
184
+ # Error loops bypass normal growth-as-progress because the log is only
185
+ # growing with repeated failed reads or wasted calls.
186
+ if [[ "$error_loop_detected" == "true" ]]; then
187
+ stale_seconds=$effective_stale_kill_threshold
188
+ elif [[ $growth -eq 0 && $child_growth -eq 0 ]]; then
96
189
  stale_seconds=$((stale_seconds + heartbeat_interval))
97
190
  else
98
191
  stale_seconds=0
@@ -132,47 +225,6 @@ PY
132
225
  status_icon="${YELLOW}⏸${NC}"
133
226
  fi
134
227
 
135
- local effective_stale_kill_threshold="$stale_kill_threshold"
136
- if [[ $stale_kill_threshold -gt 0 && -f "$progress_json" ]]; then
137
- local codex_wait_threshold
138
- codex_wait_threshold=$(python3 - "$progress_json" "$stale_kill_threshold" <<'PY' 2>/dev/null || true
139
- import json
140
- import os
141
- import sys
142
-
143
- progress_path = sys.argv[1]
144
- base_threshold = int(sys.argv[2])
145
-
146
- with open(progress_path, "r", encoding="utf-8") as fh:
147
- progress = json.load(fh)
148
-
149
- spawn_count = 0
150
- for tool in progress.get("tool_calls", []):
151
- if isinstance(tool, dict) and tool.get("name") == "spawn_agent":
152
- try:
153
- spawn_count += int(tool.get("count", 0))
154
- except (TypeError, ValueError):
155
- pass
156
-
157
- if (
158
- progress.get("event_format") == "codex-json"
159
- and progress.get("current_tool") == "wait"
160
- and spawn_count > 0
161
- ):
162
- configured = os.environ.get("CODEX_WAIT_STALE_KILL_THRESHOLD", "")
163
- try:
164
- wait_threshold = int(configured)
165
- except ValueError:
166
- wait_threshold = max(base_threshold * 4, 3600)
167
- if wait_threshold > base_threshold:
168
- print(wait_threshold)
169
- PY
170
- )
171
- if [[ "$codex_wait_threshold" =~ ^[0-9]+$ && "$codex_wait_threshold" -gt "$stale_kill_threshold" ]]; then
172
- effective_stale_kill_threshold="$codex_wait_threshold"
173
- fi
174
- fi
175
-
176
228
  # Fatal provider/runtime errors are terminal; do not wait for the
177
229
  # stale window when progress.json already proves the model cannot
178
230
  # continue (for example context_too_large).
@@ -51,6 +51,7 @@ LOG_RETENTION_DAYS=${LOG_RETENTION_DAYS:-14}
51
51
  LOG_MAX_TOTAL_MB=${LOG_MAX_TOTAL_MB:-1024}
52
52
  VERBOSE=${VERBOSE:-0}
53
53
  MODEL=${MODEL:-""}
54
+ PRIZMKIT_EFFORT=${PRIZMKIT_EFFORT:-""}
54
55
  DEV_BRANCH=${DEV_BRANCH:-""}
55
56
  AUTO_PUSH=${AUTO_PUSH:-0}
56
57
  STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
@@ -59,6 +60,9 @@ ENABLE_DEPLOY=${ENABLE_DEPLOY:-0}
59
60
  # Source shared common helpers (CLI/platform detection + logs + deps)
60
61
  prizm_detect_cli_and_platform
61
62
 
63
+ # Validate PRIZMKIT_EFFORT early (fail-fast before any sessions are spawned)
64
+ prizm_validate_effort
65
+
62
66
  # Source shared heartbeat library
63
67
  source "$SCRIPT_DIR/lib/heartbeat.sh"
64
68
 
@@ -1197,6 +1201,7 @@ show_help() {
1197
1201
  echo " MAX_RETRIES Max retries per bug (default: 3)"
1198
1202
  echo " SESSION_TIMEOUT Session timeout in seconds (default: 0 = no limit)"
1199
1203
  echo " MODEL Default AI model (overridden by per-bug model in bug list)"
1204
+ echo " PRIZMKIT_EFFORT AI reasoning effort (low|medium|high|xhigh|max; max is Claude Code only)"
1200
1205
  echo " PIPELINE_MODE Default pipeline mode: lite|standard|full (overridden by --mode)"
1201
1206
  echo " ENABLE_CRITIC Enable/disable critic: true|false|1|0 (overridden by --critic/--no-critic)"
1202
1207
  echo " AI_CLI AI CLI command name (auto-detected: cbc, claude, or codex)"
@@ -54,6 +54,7 @@ LOG_RETENTION_DAYS=${LOG_RETENTION_DAYS:-14}
54
54
  LOG_MAX_TOTAL_MB=${LOG_MAX_TOTAL_MB:-1024}
55
55
  VERBOSE=${VERBOSE:-0}
56
56
  MODEL=${MODEL:-""}
57
+ PRIZMKIT_EFFORT=${PRIZMKIT_EFFORT:-""}
57
58
  DEV_BRANCH=${DEV_BRANCH:-""}
58
59
  AUTO_PUSH=${AUTO_PUSH:-0}
59
60
  STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
@@ -62,6 +63,9 @@ ENABLE_DEPLOY=${ENABLE_DEPLOY:-0}
62
63
  # Source shared common helpers (CLI/platform detection + logs + deps)
63
64
  prizm_detect_cli_and_platform
64
65
 
66
+ # Validate PRIZMKIT_EFFORT early (fail-fast before any sessions are spawned)
67
+ prizm_validate_effort
68
+
65
69
  # Source shared heartbeat library
66
70
  source "$SCRIPT_DIR/lib/heartbeat.sh"
67
71
 
@@ -1483,6 +1487,7 @@ show_help() {
1483
1487
  echo " SESSION_TIMEOUT Session timeout in seconds (default: 0 = no limit)"
1484
1488
  echo " AI_CLI AI CLI command name (auto-detected: cbc, claude, or codex)"
1485
1489
  echo " MODEL AI model ID (e.g. claude-opus-4.6, claude-sonnet-4.6, claude-haiku-4.5)"
1490
+ echo " PRIZMKIT_EFFORT AI reasoning effort (low|medium|high|xhigh|max; max is Claude Code only)"
1486
1491
  echo " HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)"
1487
1492
  echo " STALE_KILL_THRESHOLD Auto-kill session after N seconds of no progress (default: 900)"
1488
1493
  echo " HEARTBEAT_STALE_THRESHOLD Heartbeat stale threshold in seconds (default: 600)"
@@ -67,11 +67,15 @@ HEARTBEAT_INTERVAL=${HEARTBEAT_INTERVAL:-30}
67
67
  STALE_KILL_THRESHOLD=${STALE_KILL_THRESHOLD:-900}
68
68
  VERBOSE=${VERBOSE:-0}
69
69
  MODEL=${MODEL:-""}
70
+ PRIZMKIT_EFFORT=${PRIZMKIT_EFFORT:-""}
70
71
  AUTO_PUSH=${AUTO_PUSH:-0}
71
72
 
72
73
  # Source shared common helpers (CLI/platform detection + logs + deps)
73
74
  prizm_detect_cli_and_platform
74
75
 
76
+ # Validate PRIZMKIT_EFFORT early (fail-fast before any sessions are spawned)
77
+ prizm_validate_effort
78
+
75
79
  # Source shared heartbeat library
76
80
  source "$SCRIPT_DIR/lib/heartbeat.sh"
77
81
 
@@ -106,6 +110,7 @@ Options (for 'run' command):
106
110
  Environment Variables:
107
111
  SESSION_TIMEOUT Session timeout in seconds (default: 0 = no limit)
108
112
  MODEL AI model to use
113
+ PRIZMKIT_EFFORT AI reasoning effort (low|medium|high|xhigh|max; max is Claude Code only)
109
114
  VERBOSE Set to 1 for verbose AI CLI output
110
115
  HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)
111
116
  STALE_KILL_THRESHOLD Auto-kill after N seconds no progress (default: 900)
@@ -117,6 +122,7 @@ Examples:
117
122
  ./run-recovery.sh run --dry-run # Generate prompt, don't execute
118
123
  ./run-recovery.sh run --yes # Skip confirmation prompt
119
124
  ./run-recovery.sh run --model claude-opus-4.6
125
+ PRIZMKIT_EFFORT=high ./run-recovery.sh # Use high reasoning effort
120
126
  HELP
121
127
  }
122
128
 
@@ -52,6 +52,7 @@ LOG_RETENTION_DAYS=${LOG_RETENTION_DAYS:-14}
52
52
  LOG_MAX_TOTAL_MB=${LOG_MAX_TOTAL_MB:-1024}
53
53
  VERBOSE=${VERBOSE:-0}
54
54
  MODEL=${MODEL:-""}
55
+ PRIZMKIT_EFFORT=${PRIZMKIT_EFFORT:-""}
55
56
  DEV_BRANCH=${DEV_BRANCH:-""}
56
57
  AUTO_PUSH=${AUTO_PUSH:-0}
57
58
  STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
@@ -61,6 +62,9 @@ ENABLE_DEPLOY=${ENABLE_DEPLOY:-0}
61
62
  # Source shared common helpers (CLI/platform detection + logs + deps)
62
63
  prizm_detect_cli_and_platform
63
64
 
65
+ # Validate PRIZMKIT_EFFORT early (fail-fast before any sessions are spawned)
66
+ prizm_validate_effort
67
+
64
68
  # Source shared heartbeat library
65
69
  source "$SCRIPT_DIR/lib/heartbeat.sh"
66
70
 
@@ -1232,6 +1236,7 @@ show_help() {
1232
1236
  echo " MAX_RETRIES Max retries per refactor (default: 3)"
1233
1237
  echo " SESSION_TIMEOUT Session timeout in seconds (default: 0 = no limit)"
1234
1238
  echo " MODEL Default AI model (overridden by per-refactor model in refactor list)"
1239
+ echo " PRIZMKIT_EFFORT AI reasoning effort (low|medium|high|xhigh|max; max is Claude Code only)"
1235
1240
  echo " PIPELINE_MODE Default pipeline mode: lite|standard|full (overridden by --mode)"
1236
1241
  echo " ENABLE_CRITIC Enable/disable critic: true|false|1|0 (overridden by --critic/--no-critic)"
1237
1242
  echo " AI_CLI AI CLI command name (auto-detected: cbc, claude, or codex)"