prizmkit 1.1.191 → 1.1.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/antigravity/skill-adapter.js +13 -4
- package/bundled/adapters/codex/skill-adapter.js +28 -8
- package/bundled/adapters/cursor/skill-adapter.js +13 -4
- package/bundled/adapters/pi/skill-adapter.js +28 -7
- package/bundled/dev-pipeline/.env.example +4 -12
- package/bundled/dev-pipeline/README.md +5 -10
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +3 -6
- package/bundled/dev-pipeline/prizmkit_runtime/atomic_io.py +48 -0
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +66 -23
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +10 -7
- package/bundled/dev-pipeline/prizmkit_runtime/commands.py +2 -21
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +24 -76
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +125 -67
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +77 -430
- package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +93 -49
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -3
- package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -6
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +36 -14
- package/bundled/dev-pipeline/prizmkit_runtime/processes.py +206 -151
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +2 -23
- package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +15 -134
- package/bundled/dev-pipeline/prizmkit_runtime/results.py +25 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +68 -83
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +15 -5
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -29
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +7 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +276 -217
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +124 -122
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +90 -9
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +183 -130
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +1 -3
- package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +2780 -0
- package/bundled/dev-pipeline/prizmkit_runtime/task_checkout.py +27 -101
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +58 -4
- package/bundled/dev-pipeline/scripts/check-session-status.py +43 -19
- package/bundled/dev-pipeline/scripts/continuation.py +6 -4
- package/bundled/dev-pipeline/scripts/detect-stuck.py +28 -28
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +7 -2
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +7 -2
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +10 -7
- package/bundled/dev-pipeline/scripts/init-change-artifact.py +8 -2
- package/bundled/dev-pipeline/scripts/init-pipeline.py +14 -69
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +31 -2616
- package/bundled/dev-pipeline/scripts/patch-completion-notes.py +4 -24
- package/bundled/dev-pipeline/scripts/prompt_framework.py +56 -9
- package/bundled/dev-pipeline/scripts/status_common.py +591 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +85 -463
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +227 -65
- package/bundled/dev-pipeline/scripts/update-feature-status.py +76 -509
- package/bundled/dev-pipeline/scripts/utils.py +5 -12
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +4 -4
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +7 -0
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -1
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -6
- package/bundled/dev-pipeline/templates/session-status-schema.json +2 -5
- package/bundled/dev-pipeline/tests/_helpers.py +418 -0
- package/bundled/dev-pipeline/tests/conftest.py +45 -1
- package/bundled/dev-pipeline/tests/test_auto_skip.py +4 -69
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +126 -1
- package/bundled/dev-pipeline/tests/test_daemon_and_scripts.py +257 -0
- package/bundled/dev-pipeline/tests/test_e2e_pipeline_run.py +500 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +59 -117
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +12 -10
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +431 -3099
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +7 -8
- package/bundled/dev-pipeline/tests/test_repository_bootstrap.py +0 -1
- package/bundled/dev-pipeline/tests/test_reset_modes.py +15 -27
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +54 -139
- package/bundled/dev-pipeline/tests/test_runner_bookkeeping.py +766 -0
- package/bundled/dev-pipeline/tests/test_runner_lifecycle.py +1257 -0
- package/bundled/dev-pipeline/tests/test_runtime_helper.py +97 -20
- package/bundled/dev-pipeline/tests/test_session_launch.py +1101 -0
- package/bundled/dev-pipeline/tests/test_stream_progress.py +585 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +155 -2034
- package/bundled/dev-pipeline/tests/test_utils.py +3 -3
- package/bundled/skills/_metadata.json +9 -63
- package/bundled/skills/app-planner/SKILL.md +32 -303
- package/bundled/skills/app-planner/references/app-design-guide.md +0 -4
- package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +14 -0
- package/bundled/skills/app-planner/references/project-conventions-discovery.md +4 -6
- package/bundled/skills/app-planner/references/project-state-detection.md +2 -3
- package/bundled/skills/bug-fix-workflow/SKILL.md +1 -2
- package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +4 -7
- package/bundled/skills/bug-planner/SKILL.md +54 -435
- package/bundled/skills/bug-planner/references/generated-plan-review.md +3 -2
- package/bundled/skills/bug-planner/references/input-formats.md +32 -0
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +4 -6
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +4 -28
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +4 -6
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +4 -28
- package/bundled/skills/feature-planner/SKILL.md +60 -439
- package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
- package/bundled/skills/feature-planner/references/completeness-review.md +34 -0
- package/bundled/skills/feature-planner/references/decomposition-patterns.md +2 -2
- package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
- package/bundled/skills/feature-planner/references/generated-plan-review.md +3 -2
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +3 -1
- package/bundled/skills/feature-workflow/SKILL.md +1 -2
- package/bundled/skills/prizmkit/SKILL.md +7 -1
- package/bundled/skills/prizmkit-code-review/SKILL.md +14 -6
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +7 -4
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +16 -0
- package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +58 -20
- package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
- package/bundled/skills/prizmkit-init/SKILL.md +24 -127
- package/bundled/skills/prizmkit-init/assets/project-brief-template.md +3 -3
- package/bundled/skills/prizmkit-plan/SKILL.md +6 -8
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +1 -1
- package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +5 -2
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +6 -5
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +1 -13
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +6 -4
- package/bundled/skills/prizmkit-test/SKILL.md +25 -133
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +5 -2
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +6 -0
- package/bundled/skills/prizmkit-workflow/SKILL.md +2 -3
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +4 -3
- package/bundled/skills/recovery-workflow/SKILL.md +7 -7
- package/bundled/skills/recovery-workflow/evals/evals.json +1 -1
- package/bundled/skills/recovery-workflow/references/detection.md +1 -3
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -6
- package/bundled/templates/project-memory-template.md +1 -2
- package/package.json +1 -1
- package/src/scaffold.js +28 -7
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +0 -53
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +0 -649
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +0 -463
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +0 -1512
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -240
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +0 -266
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +0 -15
- package/bundled/dev-pipeline/templates/sections/refactor-mission.md +0 -9
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +0 -24
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +0 -16
- package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +0 -9
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +0 -22
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +0 -19
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +0 -24
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +0 -12
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -6
- package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +0 -52
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +0 -478
- package/bundled/skills/feature-planner/assets/evaluation-guide.md +0 -44
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +0 -219
- package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +0 -78
- package/bundled/skills/refactor-planner/SKILL.md +0 -467
- package/bundled/skills/refactor-planner/assets/planning-guide.md +0 -291
- package/bundled/skills/refactor-planner/references/behavior-preservation.md +0 -187
- package/bundled/skills/refactor-planner/references/error-recovery.md +0 -45
- package/bundled/skills/refactor-planner/references/fast-path.md +0 -59
- package/bundled/skills/refactor-planner/references/generated-plan-review.md +0 -107
- package/bundled/skills/refactor-planner/references/planning-phases.md +0 -172
- package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +0 -230
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +0 -1120
- package/bundled/skills/refactor-workflow/SKILL.md +0 -205
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "refactor-pipeline-launcher"
|
|
3
|
-
description: "Build refactor-pipeline commands from a validated .prizmkit/plans/refactor-list.json without executing them. Produces foreground or background-daemon start commands plus status, logs, stop, and safe retry commands. Use whenever the user wants to start a prepared refactor list, construct a refactor command, configure strict behavior checks, inspect refactor status, view logs, stop a run, retry a refactor, or clean retry R-001. Trigger on: 'run refactor pipeline', 'start refactoring', 'refactor status', 'refactor logs', 'stop refactor pipeline', 'retry refactor'."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Refactor Pipeline Command Builder
|
|
7
|
-
|
|
8
|
-
Build commands for the autonomous refactor pipeline from within an AI CLI conversation. This skill reads configuration and planning inputs, asks only the choices needed to construct an accurate command, displays the command and its effects, then stops.
|
|
9
|
-
|
|
10
|
-
## Command-Only Boundary
|
|
11
|
-
|
|
12
|
-
This skill:
|
|
13
|
-
|
|
14
|
-
- reads a validated refactor list and relevant configuration;
|
|
15
|
-
- builds prerequisite-check, optional baseline-check, start, status, logs, stop, and retry commands;
|
|
16
|
-
- explains command effects and destructive options before returning them;
|
|
17
|
-
- never executes shell commands, starts processes, follows logs, changes pipeline state, refactors source code, runs tests, or performs verification.
|
|
18
|
-
|
|
19
|
-
Do not invoke another workflow or implementation skill from this command builder. The user decides where and when to run the returned command.
|
|
20
|
-
|
|
21
|
-
## When to Use
|
|
22
|
-
|
|
23
|
-
Use this skill for:
|
|
24
|
-
|
|
25
|
-
- constructing a foreground or background-daemon refactor pipeline command;
|
|
26
|
-
- selecting strict behavior-check configuration;
|
|
27
|
-
- constructing status, logs, stop, or retry commands;
|
|
28
|
-
- translating user-selected runtime options into environment variables.
|
|
29
|
-
|
|
30
|
-
Do not use it to:
|
|
31
|
-
|
|
32
|
-
- create or modify `.prizmkit/plans/refactor-list.json` — use `refactor-planner`;
|
|
33
|
-
- perform a refactor in the current conversation;
|
|
34
|
-
- execute a baseline test, monitor a run, or verify behavior preservation.
|
|
35
|
-
|
|
36
|
-
## Inputs
|
|
37
|
-
|
|
38
|
-
Default paths:
|
|
39
|
-
|
|
40
|
-
- Runtime CLI: `.prizmkit/dev-pipeline/cli.py`
|
|
41
|
-
- Refactor plan: `.prizmkit/plans/refactor-list.json`
|
|
42
|
-
|
|
43
|
-
Accept a user-specified refactor-list path when provided. Read the plan directly to summarize IDs, types, dependencies, preservation strategies, and current statuses. If the plan is missing or malformed, report that a valid refactor plan is required and stop without constructing a start command.
|
|
44
|
-
|
|
45
|
-
Read `${SKILL_DIR}/references/configuration.md` before constructing prerequisite, baseline, or runtime option fragments.
|
|
46
|
-
|
|
47
|
-
## Intent Routing
|
|
48
|
-
|
|
49
|
-
| Intent | Output |
|
|
50
|
-
|---|---|
|
|
51
|
-
| Start prepared refactors | Prerequisite/baseline command suggestions plus one start command |
|
|
52
|
-
| Check status | Daemon status and item-level status commands |
|
|
53
|
-
| Show logs | Recent or follow-log command |
|
|
54
|
-
| Stop | Daemon stop command plus optional status command |
|
|
55
|
-
| Retry failed refactor work | Preserve-runtime, standard, or clean reset plus a separate run command with safety disclosure |
|
|
56
|
-
|
|
57
|
-
Only the start intent uses the execution-mode and configuration rounds.
|
|
58
|
-
|
|
59
|
-
## Start Command Workflow
|
|
60
|
-
|
|
61
|
-
### Step 1: Resolve inputs
|
|
62
|
-
|
|
63
|
-
1. Resolve the refactor-list path.
|
|
64
|
-
2. Read the list and summarize total, eligible, blocked, and selected refactor IDs.
|
|
65
|
-
3. Summarize the declared behavior-preservation strategies without running them.
|
|
66
|
-
4. If an existing run is suspected from user context, include a status command in the output; do not run it.
|
|
67
|
-
|
|
68
|
-
### Step 2: Build optional baseline suggestions
|
|
69
|
-
|
|
70
|
-
Because refactoring depends on a known baseline, include commands the user can run before the pipeline command:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
git status --short
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
If the project instruction files or package metadata name a baseline test command, display that exact command. Otherwise state that no baseline command was discovered and ask the user whether they want to provide one. Do not infer and run a test command.
|
|
77
|
-
|
|
78
|
-
### Step 3: Ask execution mode
|
|
79
|
-
|
|
80
|
-
Use one `AskUserQuestion` call with exactly one question:
|
|
81
|
-
|
|
82
|
-
- **Foreground (Recommended)** — build `run refactor`; output remains attached to the user's terminal.
|
|
83
|
-
- **Background daemon** — build `daemon refactor start`; the runtime manages detached execution and logs.
|
|
84
|
-
|
|
85
|
-
Wait for the response before asking configuration.
|
|
86
|
-
|
|
87
|
-
### Step 4: Ask base configuration
|
|
88
|
-
|
|
89
|
-
Use a separate `AskUserQuestion` call with exactly four questions:
|
|
90
|
-
|
|
91
|
-
1. **Verbose logging** — On or Off.
|
|
92
|
-
2. **Max retries** — 3, 1, 5, or a user-provided non-negative integer.
|
|
93
|
-
3. **Strict behavior check** — On or Off.
|
|
94
|
-
4. **Advanced config** — No or Yes.
|
|
95
|
-
|
|
96
|
-
If Advanced config is Yes, load the advanced question set from `${SKILL_DIR}/references/configuration.md`. Advanced configuration contains only stop-on-failure and reasoning effort.
|
|
97
|
-
|
|
98
|
-
### Step 5: Build command fragments
|
|
99
|
-
|
|
100
|
-
Map confirmed choices to environment variables using `${SKILL_DIR}/references/configuration.md`.
|
|
101
|
-
|
|
102
|
-
Return this prerequisite-check command separately from the pipeline command:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
command -v python3 >/dev/null && command -v git >/dev/null && test -f .prizmkit/dev-pipeline/cli.py && python3 -c 'import sys; raise SystemExit(0 if sys.version_info >= (3, 10) else 1)'
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Also include the configured AI CLI check fragment from the reference. These are returned commands, not checks performed by this skill.
|
|
109
|
-
|
|
110
|
-
### Step 6: Return the start command
|
|
111
|
-
|
|
112
|
-
Foreground template:
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
VERBOSE=1 MAX_RETRIES=3 STRICT_BEHAVIOR_CHECK=1 \
|
|
116
|
-
python3 ./.prizmkit/dev-pipeline/cli.py run refactor .prizmkit/plans/refactor-list.json
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Background template:
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
python3 ./.prizmkit/dev-pipeline/cli.py daemon refactor start .prizmkit/plans/refactor-list.json \
|
|
123
|
-
--env "VERBOSE=1 MAX_RETRIES=3 STRICT_BEHAVIOR_CHECK=1"
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Return only the template matching the confirmed mode and options. Explain that the command has not been executed, then stop.
|
|
127
|
-
|
|
128
|
-
## Status Command
|
|
129
|
-
|
|
130
|
-
Return:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
python3 ./.prizmkit/dev-pipeline/cli.py daemon refactor status
|
|
134
|
-
python3 ./.prizmkit/dev-pipeline/cli.py status refactor .prizmkit/plans/refactor-list.json
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Do not infer completion from the plan file alone when runtime state may exist.
|
|
138
|
-
|
|
139
|
-
## Logs Command
|
|
140
|
-
|
|
141
|
-
Recent logs:
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
python3 ./.prizmkit/dev-pipeline/cli.py daemon refactor logs --lines 50
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Follow logs:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
python3 ./.prizmkit/dev-pipeline/cli.py daemon refactor logs --follow
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
When the user names a specific refactor, explain that its session path can be identified from `.prizmkit/state/refactor/<REFACTOR_ID>/status.json`; do not read or tail it from this skill.
|
|
154
|
-
|
|
155
|
-
## Stop Command
|
|
156
|
-
|
|
157
|
-
Return:
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
python3 ./.prizmkit/dev-pipeline/cli.py daemon refactor stop
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Optionally include the daemon status command for the user to run afterward. Do not claim the pipeline stopped until runtime output confirms it.
|
|
164
|
-
|
|
165
|
-
## Retry Command
|
|
166
|
-
|
|
167
|
-
Reset never starts execution and rejects `--run`. Every reset command must select exactly one mode: `--state-only`, `--fresh-checkout`, `--clean`, or `--preserve-runtime`. Always return reset and run as separate commands.
|
|
168
|
-
|
|
169
|
-
State-only recovery resets selected failed/skipped roots and only causal `auto_skipped` descendants whose complete blocker set is recovered. It resets retry/session/continuation state but never changes checkout identity, branches, worktrees, source changes, checkpoints, or artifact files. Selecting an auto-skipped refactor includes all of its transitive blocking roots; `--all` recovers all eligible chains. Fresh-checkout performs the former standard reset, can discard uncommitted changes on the active task branch, and records a new checkout boundary. Clean additionally deletes the task branch and clears task history/artifacts. Preserve-runtime scans the whole list for failed roots, retains runtime history and valid checkout/WIP, and alone may replace a missing branch from the recorded base and rewind implementation-and-later checkpoints. Never hide these effects behind the word “retry.”
|
|
170
|
-
|
|
171
|
-
Use `AskUserQuestion` before constructing retry commands:
|
|
172
|
-
|
|
173
|
-
- **State-only causal recovery** — recover one refactor closure, or all closures with `--all`, while preserving Git/checkouts/checkpoints/artifact files.
|
|
174
|
-
- **Preserve failed runtime (Recommended for continuing failed work)** — recover all failed chains without cleanup while retaining history and continuation evidence; disclose that this is whole-list failed-only recovery.
|
|
175
|
-
- **Fresh-checkout retry** — reset one refactor, then run it separately; warn that the active task branch can lose uncommitted changes.
|
|
176
|
-
- **Clean retry** — reset one refactor, delete its task branch/history/artifacts, then run it separately.
|
|
177
|
-
- **Cancel** — return no reset or run command.
|
|
178
|
-
|
|
179
|
-
State-only template:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
python3 ./.prizmkit/dev-pipeline/cli.py reset refactor R-001 --state-only .prizmkit/plans/refactor-list.json
|
|
183
|
-
python3 ./.prizmkit/dev-pipeline/cli.py run refactor R-001 .prizmkit/plans/refactor-list.json
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Preserve-runtime template:
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
python3 ./.prizmkit/dev-pipeline/cli.py reset refactor --failed --preserve-runtime .prizmkit/plans/refactor-list.json
|
|
190
|
-
python3 ./.prizmkit/dev-pipeline/cli.py run refactor .prizmkit/plans/refactor-list.json
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Fresh-checkout template:
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
python3 ./.prizmkit/dev-pipeline/cli.py reset refactor R-001 --fresh-checkout .prizmkit/plans/refactor-list.json
|
|
197
|
-
python3 ./.prizmkit/dev-pipeline/cli.py run refactor R-001 .prizmkit/plans/refactor-list.json
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
Clean template:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
python3 ./.prizmkit/dev-pipeline/cli.py reset refactor R-001 --clean .prizmkit/plans/refactor-list.json
|
|
204
|
-
python3 ./.prizmkit/dev-pipeline/cli.py run refactor R-001 .prizmkit/plans/refactor-list.json
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
State-only requires exactly one ID or explicit `--all` and rejects ranges/status filters. Fresh-checkout and clean accept one ID, range, or supported status filter. Preserve-runtime requires `--failed`, scans the whole list, and rejects IDs, ranges, `--all`, clean, other modes, and other filters. Retry-budget flags belong on the run command, never reset. For fresh-checkout or clean retry, require explicit acknowledgement of possible uncommitted-change loss; clean additionally requires acknowledgement of branch/history/artifact deletion.
|
|
208
|
-
|
|
209
|
-
## Output Contract
|
|
210
|
-
|
|
211
|
-
For every request, return:
|
|
212
|
-
|
|
213
|
-
1. Intent and resolved target.
|
|
214
|
-
2. Input plan path and selected IDs, when applicable.
|
|
215
|
-
3. Assumptions, optional baseline commands, and safety warnings.
|
|
216
|
-
4. Exact runtime command block.
|
|
217
|
-
5. `Command execution: not performed by this skill.`
|
|
218
|
-
|
|
219
|
-
Never report command success, process IDs, log locations, refactor completion, baseline results, verification results, or state changes unless the user later supplies authoritative runtime output for explanation.
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# Configuration Reference — Refactor Pipeline Command Builder
|
|
2
|
-
|
|
3
|
-
Use this reference only to translate confirmed user choices into command fragments. The skill returns commands; it does not execute them.
|
|
4
|
-
|
|
5
|
-
## Configured AI CLI Prerequisite Command
|
|
6
|
-
|
|
7
|
-
Runtime AI CLI selection is config-driven. Resolve the executable in this order:
|
|
8
|
-
|
|
9
|
-
1. `AI_CLI` environment variable.
|
|
10
|
-
2. `.prizmkit/config.json` `ai_cli`.
|
|
11
|
-
3. `claude` only when neither is configured.
|
|
12
|
-
|
|
13
|
-
Return this check command as part of start-command preparation:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
AI_CLI="$(
|
|
17
|
-
python3 - <<'PY'
|
|
18
|
-
import json, os, shlex
|
|
19
|
-
from pathlib import Path
|
|
20
|
-
cli = os.environ.get("AI_CLI", "").strip()
|
|
21
|
-
if not cli:
|
|
22
|
-
path = Path(".prizmkit/config.json")
|
|
23
|
-
if path.is_file():
|
|
24
|
-
try:
|
|
25
|
-
cli = str(json.loads(path.read_text(encoding="utf-8")).get("ai_cli") or "").strip()
|
|
26
|
-
except (OSError, json.JSONDecodeError):
|
|
27
|
-
cli = ""
|
|
28
|
-
cli = cli or "claude"
|
|
29
|
-
try:
|
|
30
|
-
print(shlex.split(cli)[0])
|
|
31
|
-
except ValueError:
|
|
32
|
-
print(cli.split()[0] if cli.split() else "claude")
|
|
33
|
-
PY
|
|
34
|
-
)"
|
|
35
|
-
printf 'Configured AI CLI: %s\n' "$AI_CLI"
|
|
36
|
-
command -v "$AI_CLI" >/dev/null
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Do not claim the configured executable exists until the user supplies successful command output.
|
|
40
|
-
|
|
41
|
-
## Base Configuration Mapping
|
|
42
|
-
|
|
43
|
-
| Choice | Command fragment |
|
|
44
|
-
|---|---|
|
|
45
|
-
| Verbose Off | `VERBOSE=0` |
|
|
46
|
-
| Verbose On | `VERBOSE=1` |
|
|
47
|
-
| Max retries N | `MAX_RETRIES=N` |
|
|
48
|
-
| Strict behavior On | `STRICT_BEHAVIOR_CHECK=1` |
|
|
49
|
-
| Strict behavior Off | `STRICT_BEHAVIOR_CHECK=0` |
|
|
50
|
-
|
|
51
|
-
## Advanced Configuration Questions
|
|
52
|
-
|
|
53
|
-
Ask only when the user selected Advanced config.
|
|
54
|
-
|
|
55
|
-
1. **Stop on failure**
|
|
56
|
-
- Off (default) — continue to other eligible tasks after a task exhausts retries.
|
|
57
|
-
- On — add `STOP_ON_FAILURE=1`.
|
|
58
|
-
2. **Reasoning effort**
|
|
59
|
-
- Default — omit `PRIZMKIT_EFFORT`.
|
|
60
|
-
- `low`, `medium`, `high`, `xhigh`, or `max` — add `PRIZMKIT_EFFORT=<value>` after confirming the configured AI CLI supports it.
|
|
61
|
-
|
|
62
|
-
These are the complete advanced choices for this command builder.
|
|
63
|
-
|
|
64
|
-
## Baseline Command Guidance
|
|
65
|
-
|
|
66
|
-
- Return `git status --short` as a suggested baseline cleanliness check.
|
|
67
|
-
- When the project already declares a test command, return that exact command as an optional baseline command.
|
|
68
|
-
- Do not infer a test command from framework names alone.
|
|
69
|
-
- Do not claim the baseline is green until the user supplies successful output.
|
|
70
|
-
|
|
71
|
-
## Command Construction Rules
|
|
72
|
-
|
|
73
|
-
- Foreground: place environment assignments before `python3`.
|
|
74
|
-
- Background daemon: place assignments inside one `--env "..."` value.
|
|
75
|
-
- Include only confirmed options.
|
|
76
|
-
- Preserve the user-provided list path.
|
|
77
|
-
- Shell-quote custom paths and values.
|
|
78
|
-
- Return one start command for the selected mode, never both.
|