prizmkit 1.0.127 → 1.0.129

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.
@@ -111,61 +111,100 @@ Detect user intent from their message, then follow the corresponding workflow:
111
111
  --action status 2>/dev/null
112
112
  ```
113
113
 
114
- 4. **Ask execution mode**: Present the user with a choice before launching:
115
- - **(1) Foreground in session (recommended)**: Pipeline runs in the current session via `run-bugfix.sh run`. Visible output and direct error feedback.
116
- - **(2) Background daemon**: Pipeline runs fully detached via `launch-bugfix-daemon.sh`. Survives session closure. Use only when user explicitly requests background execution.
117
- - **(3) Manual — show commands**: Display the exact commands the user can run themselves. No execution.
114
+ 4. **Present all runtime options**: Show the user a complete options summary before launching. Present each option with its default, so the user can confirm or override.
118
115
 
119
- Default to option 1 if user says "just run it" or doesn't specify. Default to option 2 only if user explicitly says "background", "detached", or "run in background".
116
+ **Runtime Options:**
120
117
 
121
- **If option 1 (foreground)**:
118
+ | Option | Default | Description |
119
+ |--------|---------|-------------|
120
+ | **Execution mode** | Foreground | (1) Foreground — visible output (2) Background daemon — survives session closure (3) Manual — show commands only |
121
+ | **Verbose logging** | On | Detailed AI session logs including tool calls and subagent activity |
122
+ | **Max retries** | 3 | Max retry attempts per failed bug |
123
+ | **Session timeout** | None | Per-bug timeout in seconds (e.g. `3600` = 1 hour) |
124
+ | **Bug filter** | All | Run specific bugs: `B-001:B-005` (range), `B-001,B-003` (list), or mixed `B-001,B-005:B-010` |
125
+
126
+ Default to Foreground + Verbose On if user doesn't specify.
127
+
128
+ **Environment variable mapping** (for natural language → env var translation):
129
+
130
+ | User says | Environment variable |
131
+ |-----------|---------------------|
132
+ | "timeout 2 hours" | `SESSION_TIMEOUT=7200` |
133
+ | "max 5 retries" | `MAX_RETRIES=5` |
134
+ | "no verbose" / "quiet" | `VERBOSE=0` |
135
+ | "heartbeat every 60s" | `HEARTBEAT_INTERVAL=60` |
136
+
137
+ Example presentation to user:
138
+ ```
139
+ Bugfix pipeline will process N bugs with these settings:
140
+ - Execution: Foreground (recommended)
141
+ - Verbose: On (subagent detection enabled)
142
+ - Max retries: 3
143
+ - Timeout: none
144
+ - Bugs: all (by severity order)
145
+
146
+ Want to change any options, or launch with these defaults?
147
+ ```
148
+
149
+ **Execution mode details:**
150
+
151
+ **Foreground (recommended)**: Pipeline runs in the current session via `run-bugfix.sh run`. Provides visible output and direct error feedback.
152
+ ```bash
153
+ VERBOSE=1 dev-pipeline/run-bugfix.sh run bug-fix-list.json
154
+ ```
155
+ With all options:
122
156
  ```bash
123
- dev-pipeline/run-bugfix.sh run bug-fix-list.json
157
+ VERBOSE=1 MAX_RETRIES=5 SESSION_TIMEOUT=3600 \
158
+ dev-pipeline/run-bugfix.sh run bug-fix-list.json
124
159
  ```
125
160
 
126
- **If option 2 (background)**:
161
+ **Background daemon**: Pipeline runs fully detached via `launch-bugfix-daemon.sh`. Survives session closure. Use only when user explicitly requests background execution.
127
162
  ```bash
128
- dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json
163
+ dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json --env "VERBOSE=1"
129
164
  ```
130
- After launch, **record the decision** for traceability:
165
+ With all options:
131
166
  ```bash
132
- echo "[$(date -u +%Y-%m-%dT%H:%M:%S)] MODE=daemon PID=$(cat dev-pipeline/bugfix-state/daemon.pid 2>/dev/null) BUG_LIST=bug-fix-list.json BUGS=$(python3 -c "import json; print(len(json.load(open('bug-fix-list.json')).get('bugs',[])))")" >> .prizmkit/bugfix-pipeline-run.log
167
+ dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json \
168
+ --env "VERBOSE=1 MAX_RETRIES=5"
133
169
  ```
134
- Note: Pipeline runs fully detached. Survives session closure.
135
170
 
136
- **If option 3 (manual)**: Print commands and stop. Do not execute anything.
171
+ **Manual show commands**: Display the exact commands the user can run themselves. Print commands and stop. Do not execute anything.
137
172
  ```
138
173
  # To run in foreground (recommended):
139
- dev-pipeline/run-bugfix.sh run bug-fix-list.json
174
+ VERBOSE=1 dev-pipeline/run-bugfix.sh run bug-fix-list.json
140
175
 
141
176
  # To run in background (detached):
142
- dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json
177
+ dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json --env "VERBOSE=1"
143
178
 
144
179
  # To check status:
145
180
  dev-pipeline/run-bugfix.sh status bug-fix-list.json
146
181
  ```
147
182
 
148
- 5. **Ask user to confirm**: "Ready to launch the bugfix pipeline? It will process N bugs (by severity order)."
183
+ 5. **Ask user to confirm**: "Ready to launch the bugfix pipeline with the above settings?"
149
184
 
150
- 6. **Launch** (based on chosen mode see step 4).
185
+ 6. **Launch** with the assembled command from step 4.
151
186
 
152
- 7. **Verify launch**:
153
- ```bash
154
- dev-pipeline/launch-bugfix-daemon.sh status
155
- ```
187
+ 7. **Post-launch** (depends on execution mode):
156
188
 
157
- 8. **Start log monitoring** (daemon mode only) -- Use the Bash tool with `run_in_background: true`:
158
- ```bash
159
- tail -f dev-pipeline/bugfix-state/pipeline-daemon.log
160
- ```
161
- This runs in background so you can continue interacting with the user.
189
+ **If foreground**: Pipeline runs to completion in the terminal. After it finishes:
190
+ - Summarize results: total bugs, fixed, failed, skipped
191
+ - If all fixed: each bug session has already run `prizmkit-retrospective` (structural sync) internally. Ask user what's next.
192
+ - If some failed: show failed bug IDs and suggest `retry-bug.sh <B-XXX>` or `reset-bug.sh <B-XXX> --clean --run`
162
193
 
163
- 9. **Report to user**:
164
- - Execution mode chosen
165
- - Pipeline PID (daemon mode) or session status (foreground)
166
- - Log file location
167
- - "You can ask me 'bugfix status' or 'show fix logs' at any time"
168
- - (daemon mode only) "Closing this session will NOT stop the pipeline"
194
+ **If background daemon**:
195
+ 1. Verify launch:
196
+ ```bash
197
+ dev-pipeline/launch-bugfix-daemon.sh status
198
+ ```
199
+ 2. Start log monitoring Use the Bash tool with `run_in_background: true`:
200
+ ```bash
201
+ tail -f dev-pipeline/bugfix-state/pipeline-daemon.log
202
+ ```
203
+ 3. Report to user:
204
+ - Pipeline PID
205
+ - Log file location
206
+ - "You can ask me 'bugfix status' or 'show fix logs' at any time"
207
+ - "Closing this session will NOT stop the pipeline"
169
208
 
170
209
  ---
171
210
 
@@ -236,25 +275,7 @@ Detect user intent from their message, then follow the corresponding workflow:
236
275
 
237
276
  ---
238
277
 
239
- #### Intent E: Custom Parameters
240
-
241
- When user specifies custom settings, map to environment variables:
242
-
243
- | User says | Environment variable |
244
- |-----------|---------------------|
245
- | "timeout 2 hours" | `SESSION_TIMEOUT=7200` |
246
- | "max 5 retries" | `MAX_RETRIES=5` |
247
- | "verbose mode" | `VERBOSE=1` |
248
- | "heartbeat every 60s" | `HEARTBEAT_INTERVAL=60` |
249
-
250
- Pass via `--env`:
251
- ```bash
252
- dev-pipeline/launch-bugfix-daemon.sh start bug-fix-list.json --env "SESSION_TIMEOUT=7200 MAX_RETRIES=5 VERBOSE=1"
253
- ```
254
-
255
- ---
256
-
257
- #### Intent F: Retry Single Bug
278
+ #### Intent E: Retry Single Bug
258
279
 
259
280
  When user says "retry B-001":
260
281
 
@@ -57,10 +57,13 @@ Before any action, validate:
57
57
  2. **For start**: `feature-list.json` must exist in project root (or user-specified path)
58
58
  3. **Dependencies**: `jq`, `python3`, AI CLI (`cbc` or `claude`) must be in PATH
59
59
  4. **Python version**: Requires Python 3.8+ for dev-pipeline scripts
60
+ 5. **playwright-cli** (optional): If any feature has `browser_interaction` field, check `playwright-cli` is available
60
61
 
61
62
  Quick check:
62
63
  ```bash
63
64
  command -v jq && command -v python3 && (command -v cbc || command -v claude) && echo "All dependencies OK"
65
+ # Optional: browser interaction support
66
+ command -v playwright-cli && echo "playwright-cli OK" || echo "playwright-cli not found (browser verification will be skipped)"
64
67
  ```
65
68
 
66
69
  If `feature-list.json` is missing, inform user:
@@ -105,80 +108,107 @@ Detect user intent from their message, then follow the corresponding workflow:
105
108
  --action status 2>/dev/null
106
109
  ```
107
110
 
108
- 4. **Ask execution mode**: Present the user with a choice before launching:
109
- - **(1) Foreground in session (recommended)**: Pipeline runs in the current session via `run.sh run`. Visible output and direct error feedback.
110
- - **(2) Background daemon**: Pipeline runs fully detached via `launch-daemon.sh`. Survives session closure. Use only when user explicitly requests background execution.
111
- - **(3) Manual — show commands**: Display the exact commands the user can run themselves. No execution.
111
+ 4. **Present all runtime options**: Show the user a complete options summary before launching. Present each option with its default, so the user can confirm or override.
112
112
 
113
- Default to option 1 if user says "just run it" or doesn't specify. Default to option 2 only if user explicitly says "background", "detached", or "run in background".
113
+ **Runtime Options:**
114
114
 
115
- **If option 1 (foreground)**:
115
+ | Option | Default | Description |
116
+ |--------|---------|-------------|
117
+ | **Execution mode** | Foreground | (1) Foreground — visible output (2) Background daemon — survives session closure (3) Manual — show commands only |
118
+ | **Critic review** | Off | Adversarial review after planning & implementation. Increases time ~5-10 min/feature |
119
+ | **Verbose logging** | On | Detailed AI session logs including tool calls and subagent activity |
120
+ | **Max retries** | 3 | Max retry attempts per failed feature |
121
+ | **Session timeout** | None | Per-feature timeout in seconds (e.g. `3600` = 1 hour) |
122
+ | **Feature filter** | All | Run specific features: `F-001:F-005` (range), `F-001,F-003` (list), or mixed `F-001,F-005:F-010` |
123
+ | **Browser verify** | Auto | Run playwright-cli verification for features with `browser_interaction`. Auto = run if playwright-cli installed and features have the field |
124
+
125
+ Default to Foreground + Verbose On if user doesn't specify. Default Critic to Off unless features have `estimated_complexity: "high"` or above.
126
+
127
+ **Environment variable mapping** (for natural language → env var translation):
128
+
129
+ | User says | Environment variable |
130
+ |-----------|---------------------|
131
+ | "timeout 2 hours" | `SESSION_TIMEOUT=7200` |
132
+ | "max 5 retries" | `MAX_RETRIES=5` |
133
+ | "no verbose" / "quiet" | `VERBOSE=0` |
134
+ | "heartbeat every 60s" | `HEARTBEAT_INTERVAL=60` |
135
+ | "enable critic review" | `ENABLE_CRITIC=true` |
136
+ | "skip browser verify" | `BROWSER_VERIFY=false` |
137
+ | "enable browser verify" | `BROWSER_VERIFY=true` |
138
+
139
+ Example presentation to user:
140
+ ```
141
+ Pipeline will process N features with these settings:
142
+ - Execution: Foreground (recommended)
143
+ - Critic: Off
144
+ - Verbose: On (subagent detection enabled)
145
+ - Max retries: 3
146
+ - Timeout: none
147
+ - Features: all
148
+
149
+ Want to change any options, or launch with these defaults?
150
+ ```
151
+
152
+ **Execution mode details:**
153
+
154
+ **Foreground (recommended)**: Pipeline runs in the current session via `run.sh run`. Provides visible output and direct error feedback.
116
155
  ```bash
117
- dev-pipeline/run.sh run feature-list.json
156
+ VERBOSE=1 dev-pipeline/run.sh run feature-list.json
118
157
  ```
119
- If user wants to run only specific features:
158
+ With all options:
120
159
  ```bash
121
- dev-pipeline/run.sh run feature-list.json --features F-001:F-005
122
- dev-pipeline/run.sh run feature-list.json --features F-001,F-003,F-007
160
+ VERBOSE=1 ENABLE_CRITIC=true MAX_RETRIES=5 SESSION_TIMEOUT=3600 \
161
+ dev-pipeline/run.sh run feature-list.json --features F-001:F-005
123
162
  ```
124
163
 
125
- **If option 2 (background)**:
164
+ **Background daemon**: Pipeline runs fully detached via `launch-daemon.sh`. Survives session closure. Use only when user explicitly requests background execution.
126
165
  ```bash
127
- dev-pipeline/launch-daemon.sh start feature-list.json
166
+ dev-pipeline/launch-daemon.sh start feature-list.json --env "VERBOSE=1"
128
167
  ```
129
- With feature filter:
168
+ With all options:
130
169
  ```bash
131
- dev-pipeline/launch-daemon.sh start feature-list.json --features F-001:F-005
170
+ dev-pipeline/launch-daemon.sh start feature-list.json --features F-001:F-005 \
171
+ --env "VERBOSE=1 ENABLE_CRITIC=true MAX_RETRIES=5"
132
172
  ```
133
- Note: Pipeline runs fully detached. Survives session closure.
134
173
 
135
- **If option 3 (manual)**: Print commands and stop. Do not execute anything.
174
+ **Manual show commands**: Display the exact commands the user can run themselves. Print commands and stop. Do not execute anything.
136
175
  ```
137
176
  # To run in foreground (recommended):
138
- dev-pipeline/run.sh run feature-list.json
177
+ VERBOSE=1 dev-pipeline/run.sh run feature-list.json
139
178
 
140
179
  # To run in background (detached):
141
- dev-pipeline/launch-daemon.sh start feature-list.json
180
+ dev-pipeline/launch-daemon.sh start feature-list.json --env "VERBOSE=1"
142
181
 
143
182
  # To check status:
144
183
  dev-pipeline/run.sh status feature-list.json
145
184
  ```
146
185
 
147
- 5. **Ask whether to enable Critic Agent** (adversarial review):
148
- Present the choice:
149
- - **(a) No standard pipeline (default)**: No adversarial review. Faster execution, lower token cost.
150
- - **(b) Yes — enable Critic review**: Adds adversarial challenge after planning and implementation. Challenges plan fitness and code integration quality. Increases pipeline time by ~5-10 minutes per feature.
151
-
152
- Default to (a). Only suggest (b) if features have `estimated_complexity: "high"` or above.
153
-
154
- If user chooses (b), prepend `ENABLE_CRITIC=true` to the launch command in step 6.
155
-
156
- 6. **Ask user to confirm**: "Ready to launch the pipeline? It will process N features."
157
-
158
- 7. **Launch** (based on chosen mode from step 4, with `ENABLE_CRITIC=true` env var if chosen in step 5):
159
- - Foreground: `ENABLE_CRITIC=true dev-pipeline/run.sh run feature-list.json`
160
- - Background: `dev-pipeline/launch-daemon.sh start feature-list.json --env "ENABLE_CRITIC=true"`
161
- - If user specified environment overrides:
162
- ```bash
163
- dev-pipeline/launch-daemon.sh start feature-list.json --env "SESSION_TIMEOUT=7200 MAX_RETRIES=5"
164
- ```
165
-
166
- 8. **Verify launch**:
167
- ```bash
168
- dev-pipeline/launch-daemon.sh status
169
- ```
170
-
171
- 9. **Start log monitoring** -- Use the Bash tool with `run_in_background: true`:
172
- ```bash
173
- tail -f dev-pipeline/state/pipeline-daemon.log
174
- ```
175
- This runs in background so you can continue interacting with the user.
176
-
177
- 10. **Report to user**:
178
- - Pipeline PID
179
- - Log file location
180
- - "You can ask me 'pipeline status' or 'show logs' at any time"
181
- - "Closing this session will NOT stop the pipeline"
186
+ 5. **Ask user to confirm**: "Ready to launch the pipeline with the above settings?"
187
+
188
+ 6. **Launch** with the assembled command from step 4.
189
+
190
+ 7. **Post-launch** (depends on execution mode):
191
+
192
+ **If foreground**: Pipeline runs to completion in the terminal. After it finishes:
193
+ - Summarize results: total features, succeeded, failed, skipped
194
+ - If all succeeded: each feature session has already run `prizmkit-retrospective` internally. Ask user what's next.
195
+ - If some failed: show failed feature IDs and suggest `retry-feature.sh <F-XXX>` or `reset-feature.sh <F-XXX> --clean --run`
196
+ - **Browser verification**: If any completed features have `browser_interaction` and `playwright-cli` is installed, offer to run browser verification (see §Post-Pipeline Browser Verification)
197
+
198
+ **If background daemon**:
199
+ 1. Verify launch:
200
+ ```bash
201
+ dev-pipeline/launch-daemon.sh status
202
+ ```
203
+ 2. Start log monitoring — Use the Bash tool with `run_in_background: true`:
204
+ ```bash
205
+ tail -f dev-pipeline/state/pipeline-daemon.log
206
+ ```
207
+ 3. Report to user:
208
+ - Pipeline PID
209
+ - Log file location
210
+ - "You can ask me 'pipeline status' or 'show logs' at any time"
211
+ - "Closing this session will NOT stop the pipeline"
182
212
 
183
213
  ---
184
214
 
@@ -249,76 +279,87 @@ Detect user intent from their message, then follow the corresponding workflow:
249
279
 
250
280
  ---
251
281
 
252
- #### Intent E: Custom Parameters
253
-
254
- When user specifies custom settings, map to environment variables:
282
+ #### Intent E: Retry Single Feature Node
255
283
 
256
- | User says | Environment variable |
257
- |-----------|---------------------|
258
- | "timeout 2 hours" | `SESSION_TIMEOUT=7200` |
259
- | "max 5 retries" | `MAX_RETRIES=5` |
260
- | "verbose mode" | `VERBOSE=1` |
261
- | "heartbeat every 60s" | `HEARTBEAT_INTERVAL=60` |
262
- | "enable critic review" | `ENABLE_CRITIC=true` env var (or `--critic` for single feature) |
284
+ When user says "retry F-003":
263
285
 
264
- Pass via `--env`:
265
286
  ```bash
266
- dev-pipeline/launch-daemon.sh start feature-list.json --env "SESSION_TIMEOUT=7200 MAX_RETRIES=5 VERBOSE=1"
287
+ dev-pipeline/retry-feature.sh F-003 feature-list.json
267
288
  ```
268
289
 
269
- ---
270
-
271
- #### Intent F: Run Subset of Features
272
-
273
- When user says "run only F-001 to F-005", "only build features 1 through 5":
290
+ When user says "clean retry F-003" or "retry F-003 from scratch":
274
291
 
275
292
  ```bash
276
- dev-pipeline/run.sh run feature-list.json --features F-001:F-005
293
+ dev-pipeline/reset-feature.sh F-003 --clean --run feature-list.json
277
294
  ```
278
295
 
279
- When user says "run F-001, F-003, and F-007", "only build these three features":
280
-
296
+ Environment variables (optional):
281
297
  ```bash
282
- dev-pipeline/run.sh run feature-list.json --features F-001,F-003,F-007
298
+ SESSION_TIMEOUT=3600 dev-pipeline/retry-feature.sh F-003 feature-list.json
283
299
  ```
284
300
 
285
- Mixed format (IDs + ranges):
301
+ Notes:
302
+ - `retry-feature.sh` runs exactly one feature session and exits.
303
+ - `reset-feature.sh --clean --run` clears the feature state before retrying (fresh start).
304
+ - Keep pipeline daemon mode for main run management (`launch-daemon.sh`).
286
305
 
287
- ```bash
288
- dev-pipeline/run.sh run feature-list.json --features F-001,F-005:F-010
289
- ```
306
+ ---
290
307
 
291
- Background daemon with feature filter:
308
+ #### Post-Pipeline Browser Verification
292
309
 
293
- ```bash
294
- dev-pipeline/launch-daemon.sh start feature-list.json --features F-001:F-005
295
- ```
310
+ After pipeline completion, if features have `browser_interaction` fields and `playwright-cli` is installed:
296
311
 
297
- ---
312
+ 1. **Check which features qualify**:
313
+ ```bash
314
+ python3 -c "
315
+ import json
316
+ with open('feature-list.json') as f:
317
+ data = json.load(f)
318
+ for feat in data.get('features', []):
319
+ bi = feat.get('browser_interaction')
320
+ if bi and feat.get('status') == 'completed':
321
+ print(f\" {feat['id']}: {feat.get('title','')} → {bi['url']}\")
322
+ " 2>/dev/null
323
+ ```
298
324
 
299
- #### Intent G: Retry Single Feature Node
325
+ 2. **Ask user**: "N features have browser verification configured. Run playwright-cli verification now? (Y/n)"
300
326
 
301
- When user says "retry F-003":
327
+ 3. **If yes**, first learn the available commands:
328
+ ```bash
329
+ playwright-cli --help
330
+ ```
331
+ Then read `dev-pipeline/assets/playwright-cli-reference.md` for snapshot format and workflow patterns. For each qualifying feature:
332
+ ```bash
333
+ # Start dev server if setup_command is specified
334
+ # (run in background, wait for port to be ready)
302
335
 
303
- ```bash
304
- dev-pipeline/retry-feature.sh F-003 feature-list.json
305
- ```
336
+ # Open browser and navigate
337
+ playwright-cli open <url>
306
338
 
307
- When user says "clean retry F-003" or "retry F-003 from scratch":
339
+ # Take initial snapshot
340
+ playwright-cli snapshot
308
341
 
309
- ```bash
310
- dev-pipeline/reset-feature.sh F-003 --clean --run feature-list.json
311
- ```
342
+ # Execute verify_steps (if specified) — these are descriptive;
343
+ # map them to actual refs from the snapshot
344
+ # e.g., "click login button" → find button ref in snapshot → playwright-cli click <ref>
312
345
 
313
- Environment variables (optional):
314
- ```bash
315
- SESSION_TIMEOUT=3600 dev-pipeline/retry-feature.sh F-003 feature-list.json
316
- ```
346
+ # Take final screenshot
347
+ playwright-cli screenshot
317
348
 
318
- Notes:
319
- - `retry-feature.sh` runs exactly one feature session and exits.
320
- - `reset-feature.sh --clean --run` clears the feature state before retrying (fresh start).
321
- - Keep pipeline daemon mode for main run management (`launch-daemon.sh`).
349
+ # Close browser
350
+ playwright-cli close
351
+ ```
352
+
353
+ 4. **Report results**:
354
+ - For each feature: URL opened, steps executed, screenshot path
355
+ - If any step fails (element not found, page error): flag as verification failure
356
+ - Screenshots are saved to `.playwright-cli/` for user review
357
+
358
+ 5. **Cleanup**: Stop any dev servers started by `setup_command`
359
+
360
+ **Important**: Browser verification is best-effort — failures here do NOT change the feature's pipeline status. They serve as visual confirmation aids for the user.
361
+
362
+ ---
322
363
 
323
364
  ### Error Handling
324
365
 
@@ -332,6 +373,7 @@ Notes:
332
373
  | Launch failed (process died immediately) | Show last 20 lines of log: `tail -20 dev-pipeline/state/pipeline-daemon.log` |
333
374
  | Feature stuck/blocked | Use `retry-feature.sh <F-XXX>` to retry; use `reset-feature.sh <F-XXX> --clean --run` for fresh start |
334
375
  | All features blocked/failed | Show status, suggest daemon-safe recovery: `dev-pipeline/reset-feature.sh <F-XXX> --clean --run feature-list.json` |
376
+ | `playwright-cli` not installed | Browser verification skipped (non-blocking). Suggest: `npm install -g @playwright/cli@latest` |
335
377
  | Permission denied on script | Run `chmod +x dev-pipeline/launch-daemon.sh dev-pipeline/run.sh` |
336
378
 
337
379
  ### Integration Notes
@@ -341,4 +383,4 @@ Notes:
341
383
  - **Single instance**: Only one pipeline can run at a time. The PID file prevents duplicates.
342
384
  - **Pipeline coexistence**: Feature and bugfix pipelines use separate state directories (`state/` vs `bugfix-state/`), so they can run simultaneously without conflict.
343
385
  - **State preservation**: Stopping and restarting the pipeline resumes from where it left off -- completed features are not re-run.
344
- - **HANDOFF**: After pipeline completes all features, suggest running `prizmkit-retrospective` for `.prizm-docs/` architecture sync, or ask user what's next.
386
+ - **HANDOFF**: After pipeline completes all features, each session has already run `prizmkit-retrospective` internally. Ask user what's next.
@@ -1,16 +1,17 @@
1
1
  ---
2
2
  name: "prizmkit-clarify"
3
- description: "Interactive requirement clarification. Resolves ambiguities in feature specs by asking sequential questions with recommended answers. Use when spec has unclear parts or you're unsure about requirements before planning. Use this skill whenever a spec has [NEEDS CLARIFICATION] markers, vague requirements, or the user wants to refine their feature definition before planning. Trigger on: 'clarify', 'refine spec', 'resolve ambiguities', 'spec has questions', 'unsure about requirements', 'spec is unclear'. (project)"
3
+ description: "Interactive requirement clarification. Resolves ALL ambiguities in feature specs through unlimited rounds of questions until full understanding is reached. Use when spec has unclear parts, you're unsure about requirements, or before planning to ensure nothing is ambiguous. Trigger on: 'clarify', 'refine spec', 'resolve ambiguities', 'spec has questions', 'unsure about requirements', 'spec is unclear'. (project)"
4
4
  ---
5
5
 
6
6
  # PrizmKit Clarify
7
7
 
8
- Interactive requirement clarification that resolves ambiguities in feature specifications. Asks focused questions one at a time, updating the spec atomically after each answer.
8
+ Exhaustive interactive requirement clarification. Resolves **every** ambiguity in a feature specification by asking questions one at a time no limit on rounds or number of questions. The goal is **complete understanding**: do not stop until every unclear aspect is resolved and you are fully confident about the requirements.
9
9
 
10
10
  ### When to Use
11
11
  - After `/prizmkit-specify` when spec has `[NEEDS CLARIFICATION]` markers
12
12
  - User says "clarify", "resolve ambiguities", "refine spec"
13
13
  - Before `/prizmkit-plan` to ensure spec is unambiguous
14
+ - Whenever you encounter any uncertainty about what the user wants — proactively ask rather than assume
14
15
 
15
16
  **PRECONDITION:**
16
17
 
@@ -21,21 +22,38 @@ Interactive requirement clarification that resolves ambiguities in feature speci
21
22
  ## Execution Steps
22
23
 
23
24
  1. Read `spec.md` from `.prizmkit/specs/###-feature-name/`
24
- 2. Scan for `[NEEDS CLARIFICATION]` markers and underspecified areas
25
+ 2. Scan for ALL ambiguities — not just `[NEEDS CLARIFICATION]` markers but also:
26
+ - Vague terms without measurable criteria (e.g., "fast", "user-friendly", "secure")
27
+ - Missing edge cases that would affect implementation
28
+ - Implicit assumptions not stated explicitly
29
+ - Scope boundaries that could be interpreted multiple ways
30
+ - Data model gaps (entities, relationships, constraints undefined)
25
31
  3. Categorize ambiguities by dimension and prioritize — address the ones that would most affect architecture and data model first, since those are hardest to change later:
26
32
  - Data model (what entities, relationships, constraints?) — **highest priority when DB changes are involved**: field types, nullability, naming conventions, relationships, and constraint patterns must all be resolved before plan finalization. Unresolved DB design decisions during implementation lead to expensive rework.
27
33
  - Functional scope (what does it do?)
28
- - Data model (what entities, relationships?)
29
34
  - UX flow (what does the user see?)
30
35
  - Error handling (what happens when things fail?)
31
36
  - Non-functional requirements (performance, security)
32
37
  - Edge cases, integration points, accessibility
33
- 4. Ask questions one at a time (max 5 per session) — batch questions overwhelm users and produce lower-quality answers because they rush through without thinking deeply about each one
38
+ 4. Ask questions **one at a time** — batch questions overwhelm users and produce lower-quality answers because they rush through without thinking deeply about each one
34
39
  5. For each question: provide a recommended answer with rationale. The recommendation gives users a concrete starting point to accept, modify, or reject — this is much faster than open-ended questions
35
40
  6. After each answer: immediately update `spec.md` (not batched at the end). Atomic updates mean the spec is always in a consistent state, even if the session is interrupted
36
- 7. Support early termination: user says "done" or "stop" — end immediately
37
- 8. Remove resolved `[NEEDS CLARIFICATION]` markers
38
- 9. After all questions resolved or user terminates: output summary of changes made
41
+ 7. Remove resolved `[NEEDS CLARIFICATION]` markers as they are addressed
42
+ 8. **Continue asking** after each answer, re-evaluate the spec for remaining ambiguities. Each user answer may reveal new questions. Keep going until:
43
+ - All `[NEEDS CLARIFICATION]` markers are removed, AND
44
+ - No vague or underspecified areas remain, AND
45
+ - You are fully confident about the requirements
46
+ 9. Support early termination: user says "done", "stop", or "enough" — end immediately and summarize what was resolved vs what remains unclear
47
+ 10. After all questions resolved or user terminates: output summary of all changes made
48
+
49
+ ## No Limits Policy
50
+
51
+ **There is NO cap on the number of questions or rounds.** Ask as many questions as needed to achieve complete understanding. A half-understood spec leads to wrong implementations, which cost far more than thorough clarification upfront.
52
+
53
+ - If you've asked 10 questions and there are still ambiguities — keep asking
54
+ - If the user's answer raises new questions — ask those too
55
+ - If you realize a previously-resolved item needs revisiting because of new context — go back and ask again
56
+ - Only stop when you genuinely have no more uncertainties, or the user explicitly terminates
39
57
 
40
58
  ## Example Session
41
59
 
@@ -54,11 +72,19 @@ File upload: accepts JPEG, PNG, PDF, SVG. Max size: 25MB per file.
54
72
  ```
55
73
  Remove `[NEEDS CLARIFICATION]` marker from §3.2.
56
74
 
75
+ **Question 2** (new question triggered by user's answer):
76
+ > You mentioned SVG files. SVGs can contain embedded scripts which pose XSS risks. Should uploaded SVGs be sanitized (strip `<script>` tags and event handlers), or should SVG upload be restricted to trusted users only?
77
+ >
78
+ > **Recommended answer:** Sanitize all SVG uploads by stripping scripts and event handlers. This allows all users to upload SVGs safely.
79
+
80
+ *(Continue until all ambiguities are resolved...)*
81
+
57
82
  ## Guidelines
58
83
 
59
84
  - Keep questions at the WHAT/WHY level — do not introduce implementation details (HOW). The spec describes the problem space; implementation choices belong in plan.md
60
- - 5-question limit per session keeps clarification focused. If more questions remain, tell the user and suggest running clarify again after they've had time to think
61
85
  - If the user's answer contradicts an existing requirement, point out the conflict and ask which one should change
86
+ - Group related follow-up questions naturally — if a user's answer opens 3 related sub-questions, ask the most impactful one first, then proceed to the others
87
+ - If the user seems fatigued, acknowledge it: "I have N more questions. Want to continue now or come back later?" — but never silently stop with unresolved ambiguities
62
88
 
63
89
  **HANDOFF:** `/prizmkit-plan`
64
90
 
@@ -38,7 +38,7 @@ Create structured feature specifications from natural language descriptions. Thi
38
38
  - Acceptance criteria (Given/When/Then)
39
39
  - Scope boundaries (In scope / Out of scope)
40
40
  - Dependencies and constraints
41
- - `[NEEDS CLARIFICATION]` markers for ambiguous items (max 3)
41
+ - `[NEEDS CLARIFICATION]` markers for all ambiguous items
42
42
  7. **Database design detection**: If the feature involves data persistence (new entities, new fields, schema changes), add a `## Data Model` section to spec.md (see template):
43
43
  - Scan for existing database schema files to understand current conventions:
44
44
  ```bash
@@ -51,7 +51,7 @@ Create structured feature specifications from natural language descriptions. Thi
51
51
  8. Run internal quality validation loop (max 3 iterations):
52
52
  - Check: All user stories have acceptance criteria?
53
53
  - Check: Scope boundaries clearly defined?
54
- - Check: No more than 3 `[NEEDS CLARIFICATION]` markers?
54
+ - Check: All `[NEEDS CLARIFICATION]` markers have recommended defaults?
55
55
  - Check: If Data Model section exists, are existing schema conventions documented?
56
56
  9. Output: `spec.md` path and summary
57
57
 
@@ -60,7 +60,7 @@ Create structured feature specifications from natural language descriptions. Thi
60
60
  - **Focus on WHAT and WHY, never HOW** — the spec describes the problem space; implementation choices belong in plan.md. Mixing in tech stack details couples the spec to a specific solution and makes it harder to explore alternatives during planning.
61
61
  - **Every user story needs acceptance criteria** in Given/When/Then format — without them, the implementer has no way to verify the feature works correctly, and the code reviewer has no baseline to check against.
62
62
  - **Scope boundaries must be explicit** — without "Out of scope" boundaries, implementers tend to gold-plate features with capabilities nobody asked for, wasting time and adding complexity.
63
- - **Max 3 `[NEEDS CLARIFICATION]` markers** more than 3 means the feature idea isn't mature enough to spec. Suggest the user think through the concept further and return, or use `/prizmkit-clarify` to resolve them interactively.
63
+ - **Mark all unclear areas with `[NEEDS CLARIFICATION]`**do not limit the number of markers. Every genuine ambiguity should be surfaced. After spec generation, suggest running `/prizmkit-clarify` to resolve them all interactively.
64
64
  - **Feature numbers are zero-padded to 3 digits** (e.g., `001`, `012`) with a `-MMDD` timestamp suffix — ensures consistent sorting and prevents collisions when multiple sessions run concurrently.
65
65
 
66
66
  ## Handling Vague Inputs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.0.127",
3
+ "version": "1.0.129",
4
4
  "description": "Create a new PrizmKit-powered project with clean initialization — no framework dev files, just what you need.",
5
5
  "type": "module",
6
6
  "bin": {