prizmkit 1.1.57 → 1.1.60
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/bin/create-prizmkit.js +8 -6
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/codex/agent-adapter.js +38 -0
- package/bundled/adapters/codex/paths.js +27 -0
- package/bundled/adapters/codex/rules-adapter.js +30 -0
- package/bundled/adapters/codex/settings-adapter.js +27 -0
- package/bundled/adapters/codex/skill-adapter.js +65 -0
- package/bundled/adapters/codex/team-adapter.js +37 -0
- package/bundled/dev-pipeline/.env.example +2 -1
- package/bundled/dev-pipeline/README.md +10 -7
- package/bundled/dev-pipeline/lib/common.sh +278 -37
- package/bundled/dev-pipeline/run-bugfix.sh +10 -61
- package/bundled/dev-pipeline/run-feature.sh +10 -78
- package/bundled/dev-pipeline/run-recovery.sh +10 -46
- package/bundled/dev-pipeline/run-refactor.sh +10 -61
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +17 -7
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/utils.py +6 -4
- package/bundled/dev-pipeline-windows/.env.example +28 -0
- package/bundled/dev-pipeline-windows/README.md +30 -0
- package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +525 -0
- package/bundled/dev-pipeline-windows/assets/feature-list-example.json +146 -0
- package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +138 -0
- package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/lib/common.ps1 +432 -0
- package/bundled/dev-pipeline-windows/lib/daemon.ps1 +140 -0
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +446 -0
- package/bundled/dev-pipeline-windows/lib/reset.ps1 +87 -0
- package/bundled/dev-pipeline-windows/reset-bug.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-bugfix.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-recovery.ps1 +76 -0
- package/bundled/dev-pipeline-windows/run-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/scripts/check-session-status.py +228 -0
- package/bundled/dev-pipeline-windows/scripts/cleanup-logs.py +192 -0
- package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +530 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +1737 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +685 -0
- package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +805 -0
- package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +763 -0
- package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +316 -0
- package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +134 -0
- package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +380 -0
- package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +399 -0
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +388 -0
- package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +864 -0
- package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +173 -0
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +1501 -0
- package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +1073 -0
- package/bundled/dev-pipeline-windows/scripts/utils.py +542 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +30 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +5 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +7 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +46 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +263 -0
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +320 -0
- package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +237 -0
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +331 -0
- package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +270 -0
- package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +91 -0
- package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +33 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +10 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +7 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +8 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +9 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +21 -0
- package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +31 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +72 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +63 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +62 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +71 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +64 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +24 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +53 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +32 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +37 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +50 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +52 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +29 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +77 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/session-context.md +5 -0
- package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +67 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +58 -0
- package/bundled/dev-pipeline-windows/templates/session-status-schema.json +83 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +26 -18
- package/bundled/skills/app-planner/references/architecture-decisions.md +9 -5
- package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
- package/bundled/skills/feature-planner/SKILL.md +9 -2
- package/bundled/skills/prizmkit-init/SKILL.md +7 -6
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +2 -0
- package/bundled/skills-windows/app-planner/SKILL.md +639 -0
- package/bundled/skills-windows/app-planner/assets/app-design-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/architecture-decisions.md +52 -0
- package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +71 -0
- package/bundled/skills-windows/app-planner/references/project-brief-guide.md +82 -0
- package/bundled/skills-windows/app-planner/references/red-team-checklist.md +40 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +609 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +285 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +249 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/template.md +173 -0
- package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +373 -0
- package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +211 -0
- package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +184 -0
- package/bundled/skills-windows/app-planner/references/rules/database/template.md +158 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +810 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +188 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +302 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +320 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +639 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +290 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +232 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +175 -0
- package/bundled/skills-windows/bug-fix-workflow/SKILL.md +415 -0
- package/bundled/skills-windows/bug-planner/SKILL.md +395 -0
- package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills-windows/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills-windows/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills-windows/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills-windows/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +322 -0
- package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +380 -0
- package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +441 -0
- package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +462 -0
- package/bundled/skills-windows/feature-planner/SKILL.md +401 -0
- package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +64 -0
- package/bundled/skills-windows/feature-planner/assets/planning-guide.md +214 -0
- package/bundled/skills-windows/feature-planner/references/browser-interaction.md +59 -0
- package/bundled/skills-windows/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +75 -0
- package/bundled/skills-windows/feature-planner/references/error-recovery.md +90 -0
- package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +112 -0
- package/bundled/skills-windows/feature-planner/references/new-project-planning.md +85 -0
- package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +1029 -0
- package/bundled/skills-windows/feature-workflow/SKILL.md +531 -0
- package/bundled/skills-windows/prizmkit-init/SKILL.md +356 -0
- package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills-windows/prizmkit-init/references/config-schema.md +68 -0
- package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +41 -0
- package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +13 -0
- package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +9 -0
- package/bundled/skills-windows/recovery-workflow/SKILL.md +456 -0
- package/bundled/skills-windows/recovery-workflow/evals/evals.json +46 -0
- package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +544 -0
- package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +406 -0
- package/bundled/skills-windows/refactor-planner/SKILL.md +540 -0
- package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +292 -0
- package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +301 -0
- package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +221 -0
- package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +858 -0
- package/bundled/skills-windows/refactor-workflow/SKILL.md +503 -0
- package/package.json +3 -2
- package/src/clean.js +73 -2
- package/src/config.js +159 -50
- package/src/detect-platform.js +16 -8
- package/src/external-skills.js +26 -19
- package/src/index.js +31 -9
- package/src/manifest.js +6 -2
- package/src/metadata.js +43 -5
- package/src/platforms.js +36 -0
- package/src/prompts.js +31 -6
- package/src/runtimes.js +20 -0
- package/src/scaffold.js +314 -110
- package/src/upgrade.js +81 -41
|
@@ -24,8 +24,8 @@ set -euo pipefail
|
|
|
24
24
|
#
|
|
25
25
|
# Environment Variables:
|
|
26
26
|
# SESSION_TIMEOUT Session timeout in seconds (default: 0 = no limit)
|
|
27
|
-
# AI_CLI AI CLI command name (auto-detected: cbc or
|
|
28
|
-
# PRIZMKIT_PLATFORM
|
|
27
|
+
# AI_CLI AI CLI command name (auto-detected: cbc, claude, or codex)
|
|
28
|
+
# PRIZMKIT_PLATFORM Platform hint for custom AI_CLI wrappers: codebuddy, claude, or codex
|
|
29
29
|
# MODEL AI model to use (e.g. claude-opus-4.6)
|
|
30
30
|
# VERBOSE Set to 1 to enable --verbose on AI CLI
|
|
31
31
|
# HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)
|
|
@@ -41,8 +41,10 @@ source "$SCRIPT_DIR/lib/common.sh"
|
|
|
41
41
|
|
|
42
42
|
RECOVERY_STATE_DIR="${PRIZMKIT_DIR}/state/recovery"
|
|
43
43
|
SCRIPTS_DIR="$SCRIPT_DIR/scripts"
|
|
44
|
-
# detect-recovery-state.py lives in the installed skill assets
|
|
45
|
-
if [[ -f "${PROJECT_ROOT}/.
|
|
44
|
+
# detect-recovery-state.py lives in the installed skill assets for the active platform.
|
|
45
|
+
if [[ -f "${PROJECT_ROOT}/.agents/skills/recovery-workflow/scripts/detect-recovery-state.py" ]]; then
|
|
46
|
+
RECOVERY_DETECT_SCRIPT="${PROJECT_ROOT}/.agents/skills/recovery-workflow/scripts/detect-recovery-state.py"
|
|
47
|
+
elif [[ -f "${PROJECT_ROOT}/.claude/command-assets/recovery-workflow/scripts/detect-recovery-state.py" ]]; then
|
|
46
48
|
RECOVERY_DETECT_SCRIPT="${PROJECT_ROOT}/.claude/command-assets/recovery-workflow/scripts/detect-recovery-state.py"
|
|
47
49
|
elif [[ -f "${PROJECT_ROOT}/.codebuddy/skills/recovery-workflow/scripts/detect-recovery-state.py" ]]; then
|
|
48
50
|
RECOVERY_DETECT_SCRIPT="${PROJECT_ROOT}/.codebuddy/skills/recovery-workflow/scripts/detect-recovery-state.py"
|
|
@@ -51,7 +53,8 @@ else
|
|
|
51
53
|
fi
|
|
52
54
|
|
|
53
55
|
if [[ -z "$RECOVERY_DETECT_SCRIPT" ]]; then
|
|
54
|
-
log_error "Recovery detection script not found in
|
|
56
|
+
log_error "Recovery detection script not found in any platform location:"
|
|
57
|
+
log_error " ${PROJECT_ROOT}/.agents/skills/recovery-workflow/scripts/detect-recovery-state.py"
|
|
55
58
|
log_error " ${PROJECT_ROOT}/.claude/command-assets/recovery-workflow/scripts/detect-recovery-state.py"
|
|
56
59
|
log_error " ${PROJECT_ROOT}/.codebuddy/skills/recovery-workflow/scripts/detect-recovery-state.py"
|
|
57
60
|
log_error "Ensure PrizmKit is installed (npx prizmkit install) before running recovery."
|
|
@@ -260,54 +263,15 @@ spawn_recovery_session() {
|
|
|
260
263
|
local session_log="$session_dir/logs/session.log"
|
|
261
264
|
local progress_json="$session_dir/logs/progress.json"
|
|
262
265
|
|
|
263
|
-
local verbose_flag=""
|
|
264
|
-
if [[ "$VERBOSE" == "1" ]]; then
|
|
265
|
-
verbose_flag="--verbose"
|
|
266
|
-
fi
|
|
267
|
-
|
|
268
|
-
local stream_json_flag=""
|
|
269
|
-
if [[ "$USE_STREAM_JSON" == "true" ]]; then
|
|
270
|
-
stream_json_flag="--output-format stream-json"
|
|
271
|
-
verbose_flag="--verbose"
|
|
272
|
-
fi
|
|
273
|
-
|
|
274
|
-
local model_flag=""
|
|
275
266
|
local effective_model="${session_model:-$MODEL}"
|
|
276
|
-
if [[ -n "$effective_model" ]]; then
|
|
277
|
-
model_flag="--model $effective_model"
|
|
278
|
-
fi
|
|
279
|
-
|
|
280
|
-
# Unset CLAUDECODE to prevent "nested session" error
|
|
281
|
-
unset CLAUDECODE 2>/dev/null || true
|
|
282
267
|
|
|
283
268
|
log_info "Spawning AI CLI session..."
|
|
284
269
|
log_info "CLI: $CLI_CMD"
|
|
285
270
|
[[ -n "$effective_model" ]] && log_info "Model: $effective_model"
|
|
286
271
|
log_info "Prompt: $bootstrap_prompt"
|
|
287
272
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
"$CLI_CMD" \
|
|
291
|
-
-p "$(cat "$bootstrap_prompt")" \
|
|
292
|
-
--dangerously-skip-permissions \
|
|
293
|
-
$verbose_flag \
|
|
294
|
-
$stream_json_flag \
|
|
295
|
-
$model_flag \
|
|
296
|
-
> "$session_log" 2>&1 &
|
|
297
|
-
;;
|
|
298
|
-
*)
|
|
299
|
-
# CodeBuddy (cbc) and others: prompt via stdin
|
|
300
|
-
"$CLI_CMD" \
|
|
301
|
-
--print \
|
|
302
|
-
-y \
|
|
303
|
-
$verbose_flag \
|
|
304
|
-
$stream_json_flag \
|
|
305
|
-
$model_flag \
|
|
306
|
-
< "$bootstrap_prompt" \
|
|
307
|
-
> "$session_log" 2>&1 &
|
|
308
|
-
;;
|
|
309
|
-
esac
|
|
310
|
-
_SESSION_PID=$!
|
|
273
|
+
prizm_start_ai_session "$bootstrap_prompt" "$session_log" "$effective_model"
|
|
274
|
+
_SESSION_PID="$PRIZM_AI_PID"
|
|
311
275
|
|
|
312
276
|
# Start progress parser
|
|
313
277
|
start_progress_parser "$session_log" "$progress_json" "$SCRIPTS_DIR"
|
|
@@ -16,9 +16,9 @@ set -euo pipefail
|
|
|
16
16
|
# Environment Variables:
|
|
17
17
|
# MAX_RETRIES Max retries per refactor (default: 3)
|
|
18
18
|
# SESSION_TIMEOUT Session timeout in seconds (default: 0 = no limit)
|
|
19
|
-
# AI_CLI AI CLI command name (auto-detected: cbc or
|
|
19
|
+
# AI_CLI AI CLI command name (auto-detected: cbc, claude, or codex)
|
|
20
20
|
# CODEBUDDY_CLI Legacy alias for AI_CLI (deprecated, use AI_CLI instead)
|
|
21
|
-
# PRIZMKIT_PLATFORM
|
|
21
|
+
# PRIZMKIT_PLATFORM Platform hint for custom AI_CLI wrappers: codebuddy, claude, or codex
|
|
22
22
|
# VERBOSE Set to 1 to enable --verbose on AI CLI
|
|
23
23
|
# HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)
|
|
24
24
|
# STALE_KILL_THRESHOLD Auto-kill session after N seconds of no progress (default: 900)
|
|
@@ -94,56 +94,19 @@ spawn_and_wait_session() {
|
|
|
94
94
|
local session_log="$session_dir/logs/session.log"
|
|
95
95
|
local progress_json="$session_dir/logs/progress.json"
|
|
96
96
|
|
|
97
|
-
local
|
|
98
|
-
if [[ "$VERBOSE" == "1" ]]; then
|
|
99
|
-
verbose_flag="--verbose"
|
|
100
|
-
fi
|
|
101
|
-
|
|
102
|
-
local stream_json_flag=""
|
|
103
|
-
if [[ "$USE_STREAM_JSON" == "true" ]]; then
|
|
104
|
-
stream_json_flag="--output-format stream-json"
|
|
105
|
-
# claude-internal requires --verbose when using stream-json with -p/--print
|
|
106
|
-
verbose_flag="--verbose"
|
|
107
|
-
fi
|
|
108
|
-
|
|
109
|
-
local model_flag=""
|
|
97
|
+
local effective_model=""
|
|
110
98
|
if [[ -n "$item_model" ]]; then
|
|
111
|
-
|
|
99
|
+
effective_model="$item_model"
|
|
112
100
|
elif [[ -n "${MODEL:-}" ]]; then
|
|
113
|
-
|
|
101
|
+
effective_model="$MODEL"
|
|
114
102
|
fi
|
|
115
103
|
|
|
116
|
-
# Unset CLAUDECODE to prevent "nested session" error when launched from
|
|
117
|
-
# within an existing Claude Code session (e.g. via launch-refactor-daemon.sh).
|
|
118
|
-
unset CLAUDECODE 2>/dev/null || true
|
|
119
|
-
|
|
120
104
|
# Log bootstrap prompt in test mode
|
|
121
105
|
prizm_log_bootstrap_prompt "$bootstrap_prompt" "$refactor_id"
|
|
122
106
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"$CLI_CMD" \
|
|
127
|
-
-p "$(cat "$bootstrap_prompt")" \
|
|
128
|
-
--dangerously-skip-permissions \
|
|
129
|
-
$verbose_flag \
|
|
130
|
-
$stream_json_flag \
|
|
131
|
-
$model_flag \
|
|
132
|
-
> "$session_log" 2>&1 &
|
|
133
|
-
;;
|
|
134
|
-
*)
|
|
135
|
-
# CodeBuddy (cbc) and others: prompt via stdin, -y for auto-accept
|
|
136
|
-
"$CLI_CMD" \
|
|
137
|
-
--print \
|
|
138
|
-
-y \
|
|
139
|
-
$verbose_flag \
|
|
140
|
-
$stream_json_flag \
|
|
141
|
-
$model_flag \
|
|
142
|
-
< "$bootstrap_prompt" \
|
|
143
|
-
> "$session_log" 2>&1 &
|
|
144
|
-
;;
|
|
145
|
-
esac
|
|
146
|
-
local cli_pid=$!
|
|
107
|
+
local cli_pid
|
|
108
|
+
prizm_start_ai_session "$bootstrap_prompt" "$session_log" "$effective_model"
|
|
109
|
+
cli_pid="$PRIZM_AI_PID"
|
|
147
110
|
|
|
148
111
|
# Start progress parser (no-op if stream-json not supported)
|
|
149
112
|
start_progress_parser "$session_log" "$progress_json" "$SCRIPTS_DIR"
|
|
@@ -1039,21 +1002,7 @@ DEPLOY_PROMPT_EOF
|
|
|
1039
1002
|
log_info "Deploy prompt: $deploy_prompt"
|
|
1040
1003
|
log_info "Deploy log: $deploy_session_dir/logs/session.log"
|
|
1041
1004
|
|
|
1042
|
-
|
|
1043
|
-
*claude*)
|
|
1044
|
-
"$CLI_CMD" \
|
|
1045
|
-
-p "$(cat "$deploy_prompt")" \
|
|
1046
|
-
--dangerously-skip-permissions \
|
|
1047
|
-
> "$deploy_session_dir/logs/session.log" 2>&1
|
|
1048
|
-
;;
|
|
1049
|
-
*)
|
|
1050
|
-
"$CLI_CMD" \
|
|
1051
|
-
--print \
|
|
1052
|
-
-y \
|
|
1053
|
-
< "$deploy_prompt" \
|
|
1054
|
-
> "$deploy_session_dir/logs/session.log" 2>&1
|
|
1055
|
-
;;
|
|
1056
|
-
esac
|
|
1005
|
+
prizm_run_ai_session "$deploy_prompt" "$deploy_session_dir/logs/session.log"
|
|
1057
1006
|
local deploy_exit=$?
|
|
1058
1007
|
|
|
1059
1008
|
if [[ $deploy_exit -eq 0 ]]; then
|
|
@@ -1287,7 +1236,7 @@ show_help() {
|
|
|
1287
1236
|
echo " MODEL Default AI model (overridden by per-refactor model in refactor list)"
|
|
1288
1237
|
echo " PIPELINE_MODE Default pipeline mode: lite|standard|full (overridden by --mode)"
|
|
1289
1238
|
echo " ENABLE_CRITIC Enable/disable critic: true|false|1|0 (overridden by --critic/--no-critic)"
|
|
1290
|
-
echo " AI_CLI AI CLI command name (auto-detected: cbc or
|
|
1239
|
+
echo " AI_CLI AI CLI command name (auto-detected: cbc, claude, or codex)"
|
|
1291
1240
|
echo " VERBOSE Set to 1 for verbose AI CLI output"
|
|
1292
1241
|
echo " STRICT_BEHAVIOR_CHECK Force full test suite after each refactor (default: 1)"
|
|
1293
1242
|
echo " HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)"
|
|
@@ -1190,16 +1190,19 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1190
1190
|
|
|
1191
1191
|
# Auto-detect platform if not set
|
|
1192
1192
|
if not platform:
|
|
1193
|
+
has_codex = os.path.isdir(os.path.join(project_root, ".codex", "agents"))
|
|
1193
1194
|
has_claude = os.path.isdir(os.path.join(project_root, ".claude", "agents"))
|
|
1194
1195
|
has_codebuddy = os.path.isdir(os.path.join(project_root, ".codebuddy", "agents"))
|
|
1195
|
-
if
|
|
1196
|
+
if has_codex:
|
|
1197
|
+
platform = "codex"
|
|
1198
|
+
elif has_claude:
|
|
1196
1199
|
platform = "claude"
|
|
1197
1200
|
elif has_codebuddy:
|
|
1198
1201
|
platform = "codebuddy"
|
|
1199
1202
|
else:
|
|
1200
1203
|
raise RuntimeError(
|
|
1201
|
-
"PrizmKit agents not found.
|
|
1202
|
-
"Run `npx prizmkit install` first, or set PRIZMKIT_PLATFORM=claude|codebuddy explicitly."
|
|
1204
|
+
"PrizmKit agents not found. None of .codex/agents/, .claude/agents/, or .codebuddy/agents/ exists. "
|
|
1205
|
+
"Run `npx prizmkit install` first, or set PRIZMKIT_PLATFORM=codex|claude|codebuddy explicitly."
|
|
1203
1206
|
)
|
|
1204
1207
|
|
|
1205
1208
|
if platform == "claude":
|
|
@@ -1208,6 +1211,12 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1208
1211
|
team_config_path = os.path.join(
|
|
1209
1212
|
project_root, ".claude", "team-info.json",
|
|
1210
1213
|
)
|
|
1214
|
+
elif platform == "codex":
|
|
1215
|
+
# Codex: agents and team metadata are project-local references.
|
|
1216
|
+
agents_dir = os.path.join(project_root, ".codex", "agents")
|
|
1217
|
+
team_config_path = os.path.join(
|
|
1218
|
+
project_root, ".codex", "team-info.json",
|
|
1219
|
+
)
|
|
1211
1220
|
else:
|
|
1212
1221
|
# CodeBuddy: agents in .codebuddy/agents/, team in ~/.codebuddy/teams/
|
|
1213
1222
|
agents_dir = os.path.join(project_root, ".codebuddy", "agents")
|
|
@@ -1215,15 +1224,16 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
1215
1224
|
home_dir, ".codebuddy", "teams", "prizm-dev-team", "config.json",
|
|
1216
1225
|
)
|
|
1217
1226
|
|
|
1218
|
-
# Agent definitions are .
|
|
1227
|
+
# Agent definitions are native .toml for Codex and .md for Claude/CodeBuddy.
|
|
1228
|
+
agent_ext = ".toml" if platform == "codex" else ".md"
|
|
1219
1229
|
dev_subagent = os.path.join(
|
|
1220
|
-
agents_dir, "prizm-dev-team-dev
|
|
1230
|
+
agents_dir, f"prizm-dev-team-dev{agent_ext}",
|
|
1221
1231
|
)
|
|
1222
1232
|
reviewer_subagent = os.path.join(
|
|
1223
|
-
agents_dir, "prizm-dev-team-reviewer
|
|
1233
|
+
agents_dir, f"prizm-dev-team-reviewer{agent_ext}",
|
|
1224
1234
|
)
|
|
1225
1235
|
critic_subagent = os.path.join(
|
|
1226
|
-
agents_dir, "prizm-dev-team-critic
|
|
1236
|
+
agents_dir, f"prizm-dev-team-critic{agent_ext}",
|
|
1227
1237
|
)
|
|
1228
1238
|
|
|
1229
1239
|
# Verify agent files actually exist — missing files cause confusing
|
|
@@ -228,7 +228,9 @@ def build_replacements(args, bug, global_context, script_dir):
|
|
|
228
228
|
home_dir = os.path.expanduser("~")
|
|
229
229
|
|
|
230
230
|
if not platform:
|
|
231
|
-
if os.path.isdir(os.path.join(project_root, ".
|
|
231
|
+
if os.path.isdir(os.path.join(project_root, ".codex", "agents")):
|
|
232
|
+
platform = "codex"
|
|
233
|
+
elif os.path.isdir(os.path.join(project_root, ".claude", "agents")):
|
|
232
234
|
platform = "claude"
|
|
233
235
|
else:
|
|
234
236
|
platform = "codebuddy"
|
|
@@ -236,14 +238,18 @@ def build_replacements(args, bug, global_context, script_dir):
|
|
|
236
238
|
if platform == "claude":
|
|
237
239
|
agents_dir = os.path.join(project_root, ".claude", "agents")
|
|
238
240
|
team_config_path = os.path.join(project_root, ".claude", "team-info.json")
|
|
241
|
+
elif platform == "codex":
|
|
242
|
+
agents_dir = os.path.join(project_root, ".codex", "agents")
|
|
243
|
+
team_config_path = os.path.join(project_root, ".codex", "team-info.json")
|
|
239
244
|
else:
|
|
240
245
|
agents_dir = os.path.join(project_root, ".codebuddy", "agents")
|
|
241
246
|
team_config_path = os.path.join(
|
|
242
247
|
home_dir, ".codebuddy", "teams", "prizm-dev-team", "config.json"
|
|
243
248
|
)
|
|
244
249
|
|
|
245
|
-
|
|
246
|
-
|
|
250
|
+
agent_ext = ".toml" if platform == "codex" else ".md"
|
|
251
|
+
dev_subagent = os.path.join(agents_dir, f"prizm-dev-team-dev{agent_ext}")
|
|
252
|
+
reviewer_subagent = os.path.join(agents_dir, f"prizm-dev-team-reviewer{agent_ext}")
|
|
247
253
|
|
|
248
254
|
# Session status path
|
|
249
255
|
session_status_path = os.path.join(
|
|
@@ -377,7 +377,9 @@ def build_replacements(args, refactor, refactors, global_context, script_dir):
|
|
|
377
377
|
home_dir = os.path.expanduser("~")
|
|
378
378
|
|
|
379
379
|
if not platform:
|
|
380
|
-
if os.path.isdir(os.path.join(project_root, ".
|
|
380
|
+
if os.path.isdir(os.path.join(project_root, ".codex", "agents")):
|
|
381
|
+
platform = "codex"
|
|
382
|
+
elif os.path.isdir(os.path.join(project_root, ".claude", "agents")):
|
|
381
383
|
platform = "claude"
|
|
382
384
|
else:
|
|
383
385
|
platform = "codebuddy"
|
|
@@ -385,14 +387,18 @@ def build_replacements(args, refactor, refactors, global_context, script_dir):
|
|
|
385
387
|
if platform == "claude":
|
|
386
388
|
agents_dir = os.path.join(project_root, ".claude", "agents")
|
|
387
389
|
team_config_path = os.path.join(project_root, ".claude", "team-info.json")
|
|
390
|
+
elif platform == "codex":
|
|
391
|
+
agents_dir = os.path.join(project_root, ".codex", "agents")
|
|
392
|
+
team_config_path = os.path.join(project_root, ".codex", "team-info.json")
|
|
388
393
|
else:
|
|
389
394
|
agents_dir = os.path.join(project_root, ".codebuddy", "agents")
|
|
390
395
|
team_config_path = os.path.join(
|
|
391
396
|
home_dir, ".codebuddy", "teams", "prizm-dev-team", "config.json"
|
|
392
397
|
)
|
|
393
398
|
|
|
394
|
-
|
|
395
|
-
|
|
399
|
+
agent_ext = ".toml" if platform == "codex" else ".md"
|
|
400
|
+
dev_subagent = os.path.join(agents_dir, f"prizm-dev-team-dev{agent_ext}")
|
|
401
|
+
reviewer_subagent = os.path.join(agents_dir, f"prizm-dev-team-reviewer{agent_ext}")
|
|
396
402
|
|
|
397
403
|
# Session status path
|
|
398
404
|
session_status_path = os.path.join(
|
|
@@ -521,20 +521,22 @@ def enrich_global_context(global_context, project_root):
|
|
|
521
521
|
|
|
522
522
|
|
|
523
523
|
def read_platform_conventions(project_root):
|
|
524
|
-
"""Resolve the
|
|
524
|
+
"""Resolve the platform-specific project conventions file.
|
|
525
525
|
|
|
526
526
|
Returns a path reference for the AI agent to read at runtime,
|
|
527
527
|
rather than inlining the full file content into the prompt.
|
|
528
528
|
"""
|
|
529
529
|
platform = os.environ.get("PRIZMKIT_PLATFORM", "claude")
|
|
530
530
|
if platform == "codebuddy":
|
|
531
|
-
candidates = ["CODEBUDDY.md", "CLAUDE.md"]
|
|
531
|
+
candidates = ["CODEBUDDY.md", "CLAUDE.md", "AGENTS.md"]
|
|
532
|
+
elif platform == "codex":
|
|
533
|
+
candidates = ["AGENTS.md", "CLAUDE.md", "CODEBUDDY.md"]
|
|
532
534
|
else:
|
|
533
|
-
candidates = ["CLAUDE.md", "CODEBUDDY.md"]
|
|
535
|
+
candidates = ["CLAUDE.md", "CODEBUDDY.md", "AGENTS.md"]
|
|
534
536
|
|
|
535
537
|
for filename in candidates:
|
|
536
538
|
filepath = os.path.join(project_root, filename)
|
|
537
539
|
if os.path.isfile(filepath):
|
|
538
540
|
return "`{}`".format(filename)
|
|
539
541
|
|
|
540
|
-
return "(No project conventions file found — CLAUDE.md or CODEBUDDY.md)"
|
|
542
|
+
return "(No project conventions file found — AGENTS.md, CLAUDE.md, or CODEBUDDY.md)"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# PrizmKit Dev-Pipeline Environment Configuration
|
|
2
|
+
# ================================================
|
|
3
|
+
# Copy this file to .prizmkit/.env and uncomment the variables you want to set.
|
|
4
|
+
# All pipeline scripts (run-feature.ps1, run-bugfix.ps1, etc.) automatically
|
|
5
|
+
# load .prizmkit/.env via lib/common.ps1.
|
|
6
|
+
#
|
|
7
|
+
# Priority: Environment variables set before script execution ALWAYS take
|
|
8
|
+
# precedence over values in .prizmkit/.env. In PowerShell, use:
|
|
9
|
+
# $env:MODEL = "gpt-5.1-codex"; .\.prizmkit\dev-pipeline\run-feature.ps1 run
|
|
10
|
+
# and it will override the .prizmkit/.env value.
|
|
11
|
+
#
|
|
12
|
+
# If .prizmkit/.env does not exist, all defaults apply — no error is raised.
|
|
13
|
+
|
|
14
|
+
# ─── AI CLI ───────────────────────────────────────────────────────────
|
|
15
|
+
# AI_CLI=codex # AI CLI command. If unset, PrizmKit prefers the installed
|
|
16
|
+
# project platform, then PATH order: codex > claude > cbc
|
|
17
|
+
# MODEL= # AI model override (e.g. gpt-5.1-codex)
|
|
18
|
+
# Per-task model in *-list.json overrides this
|
|
19
|
+
|
|
20
|
+
# ─── Pipeline Execution ──────────────────────────────────────────────
|
|
21
|
+
# MAX_RETRIES=3 # Max retry attempts per task before marking failed
|
|
22
|
+
# SESSION_TIMEOUT=0 # Session timeout in seconds (0 = no limit)
|
|
23
|
+
# VERBOSE=1 # Verbose logging (1=on, 0=off)
|
|
24
|
+
|
|
25
|
+
# ─── Feature Pipeline Only ────────────────────────────────────────────
|
|
26
|
+
# ENABLE_CRITIC=false # Enable adversarial critic review (true/false)
|
|
27
|
+
# PIPELINE_MODE= # Override pipeline mode for all features: lite|standard|full
|
|
28
|
+
# Unset = auto-detect from estimated_complexity
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# PrizmKit Dev Pipeline for Windows PowerShell
|
|
2
|
+
|
|
3
|
+
This directory is the Windows-native PowerShell runtime installed by `npx prizmkit install` when you select **Windows PowerShell**.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Windows PowerShell 5.1+ or PowerShell 7+
|
|
8
|
+
- Python 3 available as `python` or `py -3`
|
|
9
|
+
- Git
|
|
10
|
+
- One AI CLI in PATH: `codex`, `claude`, or `cbc`
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
```powershell
|
|
15
|
+
.\.prizmkit\dev-pipeline\run-feature.ps1 run
|
|
16
|
+
.\.prizmkit\dev-pipeline\run-feature.ps1 status
|
|
17
|
+
.\.prizmkit\dev-pipeline\run-feature.ps1 run F-001 --dry-run
|
|
18
|
+
|
|
19
|
+
.\.prizmkit\dev-pipeline\run-bugfix.ps1 run
|
|
20
|
+
.\.prizmkit\dev-pipeline\run-refactor.ps1 run
|
|
21
|
+
.\.prizmkit\dev-pipeline\run-recovery.ps1 --dry-run
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If PowerShell blocks local scripts for the current session, run:
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
Set-ExecutionPolicy -Scope Process Bypass
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The Windows runner keeps the same user-facing install target as macOS/Linux: `.prizmkit/dev-pipeline/`. The source implementation is separate so the existing Bash pipeline remains unchanged.
|