prizmkit 1.1.38 → 1.1.40

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.
@@ -49,10 +49,14 @@ Before any action, validate:
49
49
  2. **For start**: `.prizmkit/plans/refactor-list.json` must exist in `.prizmkit/plans/` (or user-specified path)
50
50
  3. **Dependencies**: `jq`, `python3`, AI CLI (`cbc` or `claude`) must be in PATH
51
51
  4. **Python version**: Requires Python 3.8+ for dev-pipeline scripts
52
+ 5. **Browser tools** (optional): If any refactor has `browser_interaction` field, check the corresponding tool is available. Refactors may specify `tool: "playwright-cli"`, `tool: "opencli"`, or `tool: "auto"` (AI chooses at runtime).
52
53
 
53
54
  Quick check:
54
55
  ```bash
55
56
  command -v jq && command -v python3 && (command -v cbc || command -v claude) && echo "All dependencies OK"
57
+ # Optional: browser interaction support (check both tools — refactors may use either)
58
+ command -v playwright-cli && echo "playwright-cli OK" || echo "playwright-cli not found (playwright browser verification will be skipped)"
59
+ command -v opencli && echo "opencli OK" || echo "opencli not found (opencli browser verification will be skipped)"
56
60
  ```
57
61
 
58
62
  If `.prizmkit/plans/refactor-list.json` is missing, inform user:
@@ -66,6 +70,8 @@ Detect user intent from their message, then follow the corresponding workflow:
66
70
 
67
71
  #### Intent A: Start Pipeline
68
72
 
73
+ > **Execution model**: The pipeline processes refactor tasks **sequentially** (one at a time, in priority order). The `dependencies` field in refactor-list.json is reserved for future parallel execution support and does NOT affect current execution order.
74
+
69
75
  1. **Check prerequisites**:
70
76
  ```bash
71
77
  ls .prizmkit/plans/refactor-list.json 2>/dev/null && echo "Found" || echo "Missing"
@@ -144,17 +150,33 @@ Detect user intent from their message, then follow the corresponding workflow:
144
150
  - 1
145
151
  - 5
146
152
 
147
- **Question 3 — Session timeout** (multiSelect: false):
153
+ **Question 3 — Strict behavior check** (multiSelect: false):
154
+ - On (default) — Run full test suite after each refactor task to verify behavior preservation
155
+ - Off — Skip post-task test verification (faster but riskier)
156
+
157
+ **Question 4 — Advanced config?** (multiSelect: false):
158
+ - No (default) — Use defaults for critic review, session timeout, and failure behavior
159
+ - Yes — Configure critic review, session timeout, and stop-on-failure options
160
+
161
+ Note: Refactor filter defaults to all refactor items (by priority order). If the user selects "Other" on any option, handle their custom input.
162
+
163
+ **If user chose "Yes" to Advanced config**, ask a second round of `AskUserQuestion`:
164
+
165
+ **Question 1 — Session timeout** (multiSelect: false):
148
166
  - None (default) — No timeout
149
167
  - 30 min — `SESSION_TIMEOUT=1800`
150
168
  - 1 hour — `SESSION_TIMEOUT=3600`
151
169
  - 2 hours — `SESSION_TIMEOUT=7200`
152
170
 
153
- **Question 4Strict behavior check** (multiSelect: false):
154
- - On (default) — Run full test suite after each refactor task to verify behavior preservation
155
- - OffSkip post-task test verification (faster but riskier)
171
+ **Question 2Stop on failure** (multiSelect: false):
172
+ - Off (default) — Pipeline continues to next task after failure
173
+ - OnPipeline halts immediately when a task exhausts all retries (`STOP_ON_FAILURE=1`)
156
174
 
157
- Note: Refactor filter defaults to all refactor items (by priority order). If the user selects "Other" on any option, handle their custom input.
175
+ **Question 3 Critic review** (multiSelect: false):
176
+ - Off (default) — Skip adversarial review
177
+ - On — Enable adversarial critic review: an independent AI agent reviews the refactor plan for completeness and the implementation for regressions, missed edge cases, and behavior violations. Adds ~5-10 min per refactor task.
178
+
179
+ Default Critic to Off unless refactor items have `priority: "critical"` (in which case default to On).
158
180
 
159
181
  **Environment variable mapping** (for translating user responses → env vars):
160
182
 
@@ -163,9 +185,11 @@ Detect user intent from their message, then follow the corresponding workflow:
163
185
  | Verbose: On | `VERBOSE=1` |
164
186
  | Verbose: Off | `VERBOSE=0` |
165
187
  | Max retries: N | `MAX_RETRIES=N` |
166
- | Timeout: value | `SESSION_TIMEOUT=<seconds>` |
167
188
  | Strict behavior: On | `STRICT_BEHAVIOR_CHECK=1` |
168
189
  | Strict behavior: Off | `STRICT_BEHAVIOR_CHECK=0` |
190
+ | Critic: On | `ENABLE_CRITIC=true` |
191
+ | Timeout: value | `SESSION_TIMEOUT=<seconds>` |
192
+ | Stop on failure: On | `STOP_ON_FAILURE=1` |
169
193
 
170
194
  **Advanced environment variables** (not exposed in interactive menu, pass via `--env`):
171
195
 
@@ -179,7 +203,6 @@ Detect user intent from their message, then follow the corresponding workflow:
179
203
  | `LOG_CLEANUP_ENABLED` | `1` | Run periodic log cleanup (`0` to disable) |
180
204
  | `LOG_RETENTION_DAYS` | `14` | Delete logs older than N days |
181
205
  | `LOG_MAX_TOTAL_MB` | `1024` | Keep total logs under N MB via oldest-first cleanup |
182
- | `STOP_ON_FAILURE` | `0` | Stop pipeline when a task exhausts all retries (`1` to stop immediately) |
183
206
 
184
207
  ⚠️ STOP HERE and wait for user response before continuing to step 7.
185
208
 
@@ -342,6 +365,8 @@ Notes:
342
365
  | Launch failed (process died immediately) | Show last 20 lines of log: `tail -20 .prizmkit/state/refactor/pipeline-daemon.log` |
343
366
  | Refactor stuck/blocked | Use `reset-refactor.sh <R-XXX> --clean --run` for a fresh retry |
344
367
  | All refactors blocked/failed | Show status, suggest recovery: `dev-pipeline/reset-refactor.sh <R-XXX> --clean --run .prizmkit/plans/refactor-list.json` |
368
+ | `playwright-cli` not installed | Browser verification skipped for playwright refactors (non-blocking). Suggest: `npm install -g @playwright/cli@latest && playwright-cli install --skills` |
369
+ | `opencli` not installed | Browser verification skipped for opencli refactors (non-blocking). Install opencli for Chrome session-based browser verification |
345
370
  | Permission denied on script | Run `chmod +x dev-pipeline/launch-refactor-daemon.sh dev-pipeline/run-refactor.sh` |
346
371
 
347
372
  ### Integration Notes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.1.38",
3
+ "version": "1.1.40",
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": {
@@ -1,13 +0,0 @@
1
- "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
2
- **MODE: Code Challenge**
3
- 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Implementation Log section shows what Dev changed.
4
- 2. Read `.prizm-docs/root.prizm` and relevant module docs for RULES/PATTERNS.
5
- 3. Read the actual source files changed (from Implementation Log).
6
- 4. Read comparable existing source files in the same module for style comparison.
7
- 5. Read test files created/modified (from Implementation Log) — evaluate test quality:
8
- - Coverage adequacy: Do tests cover all code paths modified? Target: {{COVERAGE_TARGET}}%
9
- - Test brittleness: Do tests pass consistently (not flaky)? Check Implementation Log for test re-runs
10
- - Edge case handling: Are boundary conditions tested? Are error paths tested?
11
- 6. Challenge code integration quality: style fit, robustness, existing code cohesion, hidden impact.
12
- 7. Challenge test quality: coverage, brittleness, edge case handling.
13
- Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` (overwrite) with findings (or 'No significant challenges')."
@@ -1,25 +0,0 @@
1
- ### Code Challenge — Critic Agent
2
-
3
- **Guard**: Verify critic agent file exists before spawning:
4
- ```bash
5
- ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:MISSING"
6
- ```
7
- If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Code Challenge."
8
-
9
- **Spawn Agent**:
10
- | Parameter | Value |
11
- |-----------|-------|
12
- | subagent_type | prizm-dev-team-critic |
13
- | mode | plan |
14
- | run_in_background | false |
15
-
16
- **Prompt**:
17
- > {{AGENT_PROMPT_CRITIC_CODE_CHALLENGE}}
18
-
19
- Wait for Critic to return.
20
- - Read challenge-report.md. For items marked CRITICAL/HIGH: spawn Dev to fix, then proceed to Review.
21
-
22
- **CP-3.5**: Code challenges reviewed and resolved.
23
-
24
-
25
- **Checkpoint update**: Update `workflow-checkpoint.json` — set step `critic-code-review` to `"completed"`.