prizmkit 1.1.152 → 1.1.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/README.md +100 -87
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +14 -0
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +192 -110
- package/bundled/dev-pipeline/prizmkit_runtime/commands.py +146 -111
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +3 -5
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -3
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +122 -15
- package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +19 -52
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +106 -1
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +2 -2
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +10 -12
- package/bundled/dev-pipeline/scripts/update-bug-status.py +196 -67
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +16 -3
- package/bundled/dev-pipeline/scripts/update-feature-status.py +45 -117
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +45 -119
- package/bundled/dev-pipeline/scripts/utils.py +119 -0
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +3 -2
- package/bundled/dev-pipeline/tests/test_auto_skip.py +111 -32
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +148 -12
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +0 -19
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +113 -188
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +211 -0
- package/bundled/dev-pipeline/tests/test_reset_modes.py +935 -0
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +5 -5
- package/bundled/dev-pipeline/tests/test_unified_cli.py +544 -181
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/bug-planner/references/schema-validation.md +1 -1
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +1 -1
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +21 -13
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +22 -14
- package/bundled/skills/recovery-workflow/SKILL.md +7 -5
- package/bundled/skills/recovery-workflow/evals/evals.json +2 -2
- package/bundled/skills/recovery-workflow/references/detection.md +3 -3
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +1 -1
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +21 -13
- package/bundled/templates/project-memory-template.md +19 -11
- package/package.json +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +0 -228
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +0 -767
|
@@ -17,7 +17,7 @@ Use this checklist for manual validation when `validate-bug-list.py` is not avai
|
|
|
17
17
|
- [ ] `error_source.type`: one of `stack_trace`, `user_report`, `failed_test`, `log_pattern`, `monitoring_alert`
|
|
18
18
|
- [ ] `verification_type`: one of `automated`, `manual`, `hybrid`
|
|
19
19
|
- [ ] `acceptance_criteria`: non-empty array of strings
|
|
20
|
-
- [ ] `status`: one of `pending`, `in_progress`, `completed`, `failed`, `skipped`, `needs_info`; new bugs should start as `pending`
|
|
20
|
+
- [ ] `status`: one of `pending`, `in_progress`, `completed`, `failed`, `skipped`, `needs_info`, `auto_skipped`; new bugs should start as `pending`, while `auto_skipped` is runtime-managed for blocked descendants
|
|
21
21
|
- [ ] `dependencies` if present: array of existing `B-NNN` IDs; no self-dependencies
|
|
22
22
|
|
|
23
23
|
## Consistency Checks
|
|
@@ -29,7 +29,7 @@ from datetime import datetime, timezone
|
|
|
29
29
|
VALID_SEVERITIES = {"critical", "high", "medium", "low"}
|
|
30
30
|
VALID_SOURCE_TYPES = {"stack_trace", "user_report", "failed_test", "log_pattern", "monitoring_alert"}
|
|
31
31
|
VALID_VERIFICATION_TYPES = {"automated", "manual", "hybrid"}
|
|
32
|
-
VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "needs_info"}
|
|
32
|
+
VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "needs_info", "auto_skipped"}
|
|
33
33
|
BUG_ID_PATTERN = re.compile(r"^B-\d{3}$")
|
|
34
34
|
SCHEMA_VERSION = "dev-pipeline-bug-fix-list-v1"
|
|
35
35
|
|
|
@@ -67,7 +67,7 @@ Only the start intent uses the execution-mode and configuration rounds.
|
|
|
67
67
|
|
|
68
68
|
Use one `AskUserQuestion` call with exactly one question:
|
|
69
69
|
|
|
70
|
-
- **Foreground (Recommended)** — build `bugfix
|
|
70
|
+
- **Foreground (Recommended)** — build `run bugfix`; output remains attached to the user's terminal.
|
|
71
71
|
- **Background daemon** — build `daemon bugfix start`; the runtime manages detached execution and logs.
|
|
72
72
|
|
|
73
73
|
Wait for the response before asking configuration.
|
|
@@ -100,7 +100,7 @@ Foreground template:
|
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
102
|
VERBOSE=1 MAX_RETRIES=3 \
|
|
103
|
-
python3 ./.prizmkit/dev-pipeline/cli.py bugfix
|
|
103
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix .prizmkit/plans/bug-fix-list.json
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
Background template:
|
|
@@ -118,7 +118,7 @@ Return:
|
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
120
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon bugfix status
|
|
121
|
-
python3 ./.prizmkit/dev-pipeline/cli.py bugfix
|
|
121
|
+
python3 ./.prizmkit/dev-pipeline/cli.py status bugfix .prizmkit/plans/bug-fix-list.json
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
Do not infer completion from the plan file alone when runtime state may exist.
|
|
@@ -151,39 +151,47 @@ Optionally include the daemon status command for the user to run afterward. Do n
|
|
|
151
151
|
|
|
152
152
|
## Retry Command
|
|
153
153
|
|
|
154
|
-
Reset
|
|
154
|
+
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.
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
State-only recovery resets selected failed/skipped/needs-info 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 bug 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.”
|
|
157
157
|
|
|
158
158
|
Use `AskUserQuestion` before constructing retry commands:
|
|
159
159
|
|
|
160
|
-
- **
|
|
161
|
-
- **
|
|
160
|
+
- **State-only causal recovery** — recover one bug closure, or all closures with `--all`, while preserving Git/checkouts/checkpoints/artifact files.
|
|
161
|
+
- **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.
|
|
162
|
+
- **Fresh-checkout retry** — reset one bug, then run it separately; warn that the active task branch can lose uncommitted changes.
|
|
162
163
|
- **Clean retry** — reset one bug, delete its task branch/history/artifacts, then run it separately.
|
|
163
164
|
- **Cancel** — return no reset or run command.
|
|
164
165
|
|
|
166
|
+
State-only template:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
python3 ./.prizmkit/dev-pipeline/cli.py reset bugfix B-001 --state-only .prizmkit/plans/bug-fix-list.json
|
|
170
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix B-001 .prizmkit/plans/bug-fix-list.json
|
|
171
|
+
```
|
|
172
|
+
|
|
165
173
|
Preserve-runtime template:
|
|
166
174
|
|
|
167
175
|
```bash
|
|
168
176
|
python3 ./.prizmkit/dev-pipeline/cli.py reset bugfix --failed --preserve-runtime .prizmkit/plans/bug-fix-list.json
|
|
169
|
-
python3 ./.prizmkit/dev-pipeline/cli.py bugfix
|
|
177
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix .prizmkit/plans/bug-fix-list.json
|
|
170
178
|
```
|
|
171
179
|
|
|
172
|
-
|
|
180
|
+
Fresh-checkout template:
|
|
173
181
|
|
|
174
182
|
```bash
|
|
175
|
-
python3 ./.prizmkit/dev-pipeline/cli.py reset bugfix B-001 .prizmkit/plans/bug-fix-list.json
|
|
176
|
-
python3 ./.prizmkit/dev-pipeline/cli.py bugfix
|
|
183
|
+
python3 ./.prizmkit/dev-pipeline/cli.py reset bugfix B-001 --fresh-checkout .prizmkit/plans/bug-fix-list.json
|
|
184
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix B-001 .prizmkit/plans/bug-fix-list.json
|
|
177
185
|
```
|
|
178
186
|
|
|
179
187
|
Clean template:
|
|
180
188
|
|
|
181
189
|
```bash
|
|
182
190
|
python3 ./.prizmkit/dev-pipeline/cli.py reset bugfix B-001 --clean .prizmkit/plans/bug-fix-list.json
|
|
183
|
-
python3 ./.prizmkit/dev-pipeline/cli.py bugfix
|
|
191
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix B-001 .prizmkit/plans/bug-fix-list.json
|
|
184
192
|
```
|
|
185
193
|
|
|
186
|
-
|
|
194
|
+
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.
|
|
187
195
|
|
|
188
196
|
## Output Contract
|
|
189
197
|
|
|
@@ -71,7 +71,7 @@ Only the start intent uses the execution-mode and configuration rounds.
|
|
|
71
71
|
|
|
72
72
|
Use one `AskUserQuestion` call with exactly one question:
|
|
73
73
|
|
|
74
|
-
- **Foreground (Recommended)** — build `feature
|
|
74
|
+
- **Foreground (Recommended)** — build `run feature`; output remains attached to the user's terminal.
|
|
75
75
|
- **Background daemon** — build `daemon feature start`; the runtime manages detached execution and logs.
|
|
76
76
|
|
|
77
77
|
Wait for the response before asking configuration.
|
|
@@ -104,14 +104,14 @@ Foreground template:
|
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
106
|
VERBOSE=1 MAX_RETRIES=3 \
|
|
107
|
-
python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
107
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run feature .prizmkit/plans/feature-list.json
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
Foreground subset template:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
113
|
VERBOSE=1 MAX_RETRIES=3 \
|
|
114
|
-
python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
114
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run feature .prizmkit/plans/feature-list.json --features F-001:F-005
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
Background template:
|
|
@@ -136,7 +136,7 @@ Return both commands when the user asks for overall status:
|
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
138
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon feature status
|
|
139
|
-
python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
139
|
+
python3 ./.prizmkit/dev-pipeline/cli.py status feature .prizmkit/plans/feature-list.json
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
Do not infer completion from the plan file alone when runtime state may exist.
|
|
@@ -169,39 +169,47 @@ Optionally include the daemon status command for the user to run afterward. Do n
|
|
|
169
169
|
|
|
170
170
|
## Retry Command
|
|
171
171
|
|
|
172
|
-
Reset
|
|
172
|
+
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.
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
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 feature 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.”
|
|
175
175
|
|
|
176
176
|
Use `AskUserQuestion` before constructing retry commands:
|
|
177
177
|
|
|
178
|
-
- **
|
|
179
|
-
- **
|
|
178
|
+
- **State-only causal recovery** — recover one feature closure, or all closures with `--all`, while preserving Git/checkouts/checkpoints/artifact files.
|
|
179
|
+
- **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.
|
|
180
|
+
- **Fresh-checkout retry** — reset one feature, then run it separately; warn that the active task branch can lose uncommitted changes.
|
|
180
181
|
- **Clean retry** — reset one feature, delete its task branch/history/artifacts, then run it separately.
|
|
181
182
|
- **Cancel** — return no reset or run command.
|
|
182
183
|
|
|
184
|
+
State-only template:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
python3 ./.prizmkit/dev-pipeline/cli.py reset feature F-001 --state-only .prizmkit/plans/feature-list.json
|
|
188
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run feature F-001 .prizmkit/plans/feature-list.json
|
|
189
|
+
```
|
|
190
|
+
|
|
183
191
|
Preserve-runtime template:
|
|
184
192
|
|
|
185
193
|
```bash
|
|
186
194
|
python3 ./.prizmkit/dev-pipeline/cli.py reset feature --failed --preserve-runtime .prizmkit/plans/feature-list.json
|
|
187
|
-
python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
195
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run feature .prizmkit/plans/feature-list.json
|
|
188
196
|
```
|
|
189
197
|
|
|
190
|
-
|
|
198
|
+
Fresh-checkout template:
|
|
191
199
|
|
|
192
200
|
```bash
|
|
193
|
-
python3 ./.prizmkit/dev-pipeline/cli.py reset feature F-001 .prizmkit/plans/feature-list.json
|
|
194
|
-
python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
201
|
+
python3 ./.prizmkit/dev-pipeline/cli.py reset feature F-001 --fresh-checkout .prizmkit/plans/feature-list.json
|
|
202
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run feature F-001 .prizmkit/plans/feature-list.json
|
|
195
203
|
```
|
|
196
204
|
|
|
197
205
|
Clean template:
|
|
198
206
|
|
|
199
207
|
```bash
|
|
200
208
|
python3 ./.prizmkit/dev-pipeline/cli.py reset feature F-001 --clean .prizmkit/plans/feature-list.json
|
|
201
|
-
python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
209
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run feature F-001 .prizmkit/plans/feature-list.json
|
|
202
210
|
```
|
|
203
211
|
|
|
204
|
-
|
|
212
|
+
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.
|
|
205
213
|
|
|
206
214
|
## Output Contract
|
|
207
215
|
|
|
@@ -7,12 +7,14 @@ description: "Return the exact PrizmKit CLI command that continues an interrupte
|
|
|
7
7
|
|
|
8
8
|
Find an interrupted pipeline task's durable checkout record and return the existing runtime command that continues that task on its recorded branch. The runtime already owns branch reuse, checkpoint interpretation, session continuation, and task execution; this skill must not reproduce those mechanisms.
|
|
9
9
|
|
|
10
|
+
This skill invokes its own bundled detector. The canonical runtime exposes no separate Recovery command namespace, prompt generator, or Recovery AI-session launcher.
|
|
11
|
+
|
|
10
12
|
## Boundary
|
|
11
13
|
|
|
12
14
|
This workflow:
|
|
13
15
|
- Detects active feature, bugfix, and refactor task checkout records.
|
|
14
16
|
- Confirms that each recorded task branch still exists.
|
|
15
|
-
- Returns the exact item-specific `cli.py
|
|
17
|
+
- Returns the exact item-specific `cli.py run <family> <TASK_ID>` command.
|
|
16
18
|
- Shows the branch, task family, task ID, and checkout record that justify the command.
|
|
17
19
|
|
|
18
20
|
This workflow does not:
|
|
@@ -71,9 +73,9 @@ Report that no active interrupted pipeline task branch was found. Do not fall ba
|
|
|
71
73
|
Return the detector-provided command verbatim. The canonical forms are:
|
|
72
74
|
|
|
73
75
|
```bash
|
|
74
|
-
python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
75
|
-
python3 ./.prizmkit/dev-pipeline/cli.py bugfix
|
|
76
|
-
python3 ./.prizmkit/dev-pipeline/cli.py refactor
|
|
76
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run feature F-001
|
|
77
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix B-001
|
|
78
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run refactor R-001
|
|
77
79
|
```
|
|
78
80
|
|
|
79
81
|
Do not prepend `git checkout`. The runtime resolves the durable checkout identity and continues the task on its recorded branch or linked worktree.
|
|
@@ -91,7 +93,7 @@ task_id: <F-NNN | B-NNN | R-NNN>
|
|
|
91
93
|
branch: <recorded active_dev_branch>
|
|
92
94
|
checkout: <project-relative checkout.json path>
|
|
93
95
|
command:
|
|
94
|
-
python3 ./.prizmkit/dev-pipeline/cli.py <family>
|
|
96
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run <family> <TASK_ID>
|
|
95
97
|
|
|
96
98
|
execution: not performed
|
|
97
99
|
```
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"id": 1,
|
|
7
7
|
"name": "single-feature-interruption",
|
|
8
8
|
"prompt": "My feature pipeline process stopped. Give me the command to continue it.",
|
|
9
|
-
"expected_output": "Detect one active feature checkout record with an existing branch and return python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
9
|
+
"expected_output": "Detect one active feature checkout record with an existing branch and return python3 ./.prizmkit/dev-pipeline/cli.py run feature F-001 without executing it.",
|
|
10
10
|
"setup_description": "Create .prizmkit/state/features/F-001/checkout.json with state active and an existing dev/F-001-* local branch.",
|
|
11
11
|
"files": []
|
|
12
12
|
},
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"id": 2,
|
|
15
15
|
"name": "single-bugfix-interruption",
|
|
16
16
|
"prompt": "Resume the interrupted bugfix task.",
|
|
17
|
-
"expected_output": "Detect the active bugfix checkout and return python3 ./.prizmkit/dev-pipeline/cli.py bugfix
|
|
17
|
+
"expected_output": "Detect the active bugfix checkout and return python3 ./.prizmkit/dev-pipeline/cli.py run bugfix B-001 without reconstructing phases or executing the command.",
|
|
18
18
|
"setup_description": "Create .prizmkit/state/bugfix/B-001/checkout.json with state active and an existing bugfix/B-001-* local branch.",
|
|
19
19
|
"files": []
|
|
20
20
|
},
|
|
@@ -24,9 +24,9 @@ Ignore records whose state is `completed` or `reset`. Also ignore session logs,
|
|
|
24
24
|
The item-specific foreground command reloads the active checkout record and reuses its branch or linked worktree:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
python3 ./.prizmkit/dev-pipeline/cli.py feature
|
|
28
|
-
python3 ./.prizmkit/dev-pipeline/cli.py bugfix
|
|
29
|
-
python3 ./.prizmkit/dev-pipeline/cli.py refactor
|
|
27
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run feature <F-NNN>
|
|
28
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix <B-NNN>
|
|
29
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run refactor <R-NNN>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
The command does not need an explicit branch argument. Do not prepend `git checkout`, because the runtime owns checkout identity and branch/worktree reuse.
|
|
@@ -66,7 +66,7 @@ def current_branch(project_root: Path) -> str:
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
def command_for(family: dict[str, str], task_id: str) -> str:
|
|
69
|
-
return f"python3 ./.prizmkit/dev-pipeline/cli.py {family['name']}
|
|
69
|
+
return f"python3 ./.prizmkit/dev-pipeline/cli.py run {family['name']} {task_id}"
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
def detect_candidates(project_root: Path) -> list[dict[str, object]]:
|
|
@@ -79,7 +79,7 @@ If the project instruction files or package metadata name a baseline test comman
|
|
|
79
79
|
|
|
80
80
|
Use one `AskUserQuestion` call with exactly one question:
|
|
81
81
|
|
|
82
|
-
- **Foreground (Recommended)** — build `refactor
|
|
82
|
+
- **Foreground (Recommended)** — build `run refactor`; output remains attached to the user's terminal.
|
|
83
83
|
- **Background daemon** — build `daemon refactor start`; the runtime manages detached execution and logs.
|
|
84
84
|
|
|
85
85
|
Wait for the response before asking configuration.
|
|
@@ -113,7 +113,7 @@ Foreground template:
|
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
115
|
VERBOSE=1 MAX_RETRIES=3 STRICT_BEHAVIOR_CHECK=1 \
|
|
116
|
-
python3 ./.prizmkit/dev-pipeline/cli.py refactor
|
|
116
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run refactor .prizmkit/plans/refactor-list.json
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
Background template:
|
|
@@ -131,7 +131,7 @@ Return:
|
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
133
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon refactor status
|
|
134
|
-
python3 ./.prizmkit/dev-pipeline/cli.py refactor
|
|
134
|
+
python3 ./.prizmkit/dev-pipeline/cli.py status refactor .prizmkit/plans/refactor-list.json
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
Do not infer completion from the plan file alone when runtime state may exist.
|
|
@@ -164,39 +164,47 @@ Optionally include the daemon status command for the user to run afterward. Do n
|
|
|
164
164
|
|
|
165
165
|
## Retry Command
|
|
166
166
|
|
|
167
|
-
Reset
|
|
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
168
|
|
|
169
|
-
|
|
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
170
|
|
|
171
171
|
Use `AskUserQuestion` before constructing retry commands:
|
|
172
172
|
|
|
173
|
-
- **
|
|
174
|
-
- **
|
|
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.
|
|
175
176
|
- **Clean retry** — reset one refactor, delete its task branch/history/artifacts, then run it separately.
|
|
176
177
|
- **Cancel** — return no reset or run command.
|
|
177
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
|
+
|
|
178
186
|
Preserve-runtime template:
|
|
179
187
|
|
|
180
188
|
```bash
|
|
181
189
|
python3 ./.prizmkit/dev-pipeline/cli.py reset refactor --failed --preserve-runtime .prizmkit/plans/refactor-list.json
|
|
182
|
-
python3 ./.prizmkit/dev-pipeline/cli.py refactor
|
|
190
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run refactor .prizmkit/plans/refactor-list.json
|
|
183
191
|
```
|
|
184
192
|
|
|
185
|
-
|
|
193
|
+
Fresh-checkout template:
|
|
186
194
|
|
|
187
195
|
```bash
|
|
188
|
-
python3 ./.prizmkit/dev-pipeline/cli.py reset refactor R-001 .prizmkit/plans/refactor-list.json
|
|
189
|
-
python3 ./.prizmkit/dev-pipeline/cli.py refactor
|
|
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
|
|
190
198
|
```
|
|
191
199
|
|
|
192
200
|
Clean template:
|
|
193
201
|
|
|
194
202
|
```bash
|
|
195
203
|
python3 ./.prizmkit/dev-pipeline/cli.py reset refactor R-001 --clean .prizmkit/plans/refactor-list.json
|
|
196
|
-
python3 ./.prizmkit/dev-pipeline/cli.py refactor
|
|
204
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run refactor R-001 .prizmkit/plans/refactor-list.json
|
|
197
205
|
```
|
|
198
206
|
|
|
199
|
-
|
|
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.
|
|
200
208
|
|
|
201
209
|
## Output Contract
|
|
202
210
|
|
|
@@ -44,18 +44,22 @@ Placeholders: `<family> = feature | bugfix | refactor`; `<task-id> = F-NNN | B-N
|
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
# Run/resume the whole list or one task
|
|
47
|
-
python3 ./.prizmkit/dev-pipeline/cli.py <family>
|
|
48
|
-
python3 ./.prizmkit/dev-pipeline/cli.py <family>
|
|
47
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run <family> [<list>] [--max-retries N] [--max-infra-retries N]
|
|
48
|
+
python3 ./.prizmkit/dev-pipeline/cli.py run <family> <task-id> [<list>] [--max-retries N] [--max-infra-retries N]
|
|
49
49
|
|
|
50
|
-
# Inspect
|
|
51
|
-
python3 ./.prizmkit/dev-pipeline/cli.py <family>
|
|
52
|
-
python3 ./.prizmkit/dev-pipeline/cli.py
|
|
53
|
-
python3 ./.prizmkit/dev-pipeline/cli.py recovery detect
|
|
50
|
+
# Inspect task state
|
|
51
|
+
python3 ./.prizmkit/dev-pipeline/cli.py status <family> [<list>]
|
|
52
|
+
python3 ./.prizmkit/dev-pipeline/cli.py status all
|
|
54
53
|
|
|
55
|
-
#
|
|
56
|
-
python3 ./.prizmkit/dev-pipeline/cli.py
|
|
54
|
+
# Inspect runtime and AI CLI resolution
|
|
55
|
+
python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
|
|
56
|
+
|
|
57
|
+
# Reset state (exactly one explicit mode; never starts execution)
|
|
58
|
+
python3 ./.prizmkit/dev-pipeline/cli.py reset <family> <task-id> --state-only [<list>]
|
|
59
|
+
python3 ./.prizmkit/dev-pipeline/cli.py reset <family> --state-only --all [<list>]
|
|
60
|
+
python3 ./.prizmkit/dev-pipeline/cli.py reset <family> <task-id-or-range> --fresh-checkout [<list>]
|
|
61
|
+
python3 ./.prizmkit/dev-pipeline/cli.py reset <family> <task-id-or-range> --clean [<list>]
|
|
57
62
|
python3 ./.prizmkit/dev-pipeline/cli.py reset <family> --failed --preserve-runtime [<list>]
|
|
58
|
-
python3 ./.prizmkit/dev-pipeline/cli.py reset <family> <task-id> --clean [<list>]
|
|
59
63
|
|
|
60
64
|
# Background operation
|
|
61
65
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon <family> start [<list>]
|
|
@@ -64,10 +68,14 @@ python3 ./.prizmkit/dev-pipeline/cli.py daemon <family> logs [--lines N|--follow
|
|
|
64
68
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon <family> stop
|
|
65
69
|
```
|
|
66
70
|
|
|
71
|
+
Interrupted-task recovery: invoke `recovery-workflow`. Its read-only detector reports active checkout candidates and returns the ordinary `python3 ./.prizmkit/dev-pipeline/cli.py run <family> <task-id>` command without executing it.
|
|
72
|
+
|
|
67
73
|
Runtime boundaries:
|
|
68
74
|
- Reset and run are separate operations; reset rejects `--run`. Retry ceilings belong to `run`, not reset.
|
|
69
|
-
- `--
|
|
70
|
-
-
|
|
75
|
+
- Exactly one of `--state-only`, `--fresh-checkout`, `--clean`, or `--preserve-runtime` is required. Missing/conflicting modes fail before state or Git mutation.
|
|
76
|
+
- State-only accepts one ID or explicit `--all`; it resets causal dependency state while preserving checkout identity, branches/worktrees, source changes, checkpoints, and artifact files.
|
|
77
|
+
- Fresh-checkout and clean accept an ID, range, or supported status filter. Fresh-checkout publishes a new checkout boundary; clean additionally deletes branch/history/artifact resources.
|
|
78
|
+
- Preserve-runtime requires `--failed`, scans the whole list, and rejects IDs, ranges, `--all`, clean, other modes, and other filters. It retains runtime history and valid checkout/WIP; a missing branch is replaced from the recorded base with implementation-and-later checkpoint rewind.
|
|
71
79
|
- In zsh/Bash multiline commands, `\` must be the final character on the line with no trailing space.
|
|
72
80
|
|
|
73
81
|
### Lightweight Planning Path
|