prizmkit 1.0.132 → 1.0.133

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.0.132",
3
- "bundledAt": "2026-03-28T09:29:01.869Z",
4
- "bundledFrom": "e0ce79b"
2
+ "frameworkVersion": "1.0.133",
3
+ "bundledAt": "2026-03-28T10:09:48.381Z",
4
+ "bundledFrom": "242cd4e"
5
5
  }
@@ -166,47 +166,12 @@ Key decisions: [list]
166
166
 
167
167
  Verify UI behavior using `playwright-cli` before committing. This phase is best-effort — failures are logged but do NOT block the commit.
168
168
 
169
- **Before starting**: Run these commands to learn available playwright-cli commands and usage:
170
- ```bash
171
- playwright-cli --help
172
- ```
173
- For detailed help on a specific command:
174
- ```bash
175
- playwright-cli --help <command> # e.g. playwright-cli --help snapshot
176
- ```
177
- Also read `dev-pipeline/assets/playwright-cli-reference.md` for snapshot format and workflow patterns.
178
-
179
- 1. **Start dev server** (if `setup_command` is specified):
180
- ```bash
181
- {{BROWSER_SETUP_COMMAND}} &
182
- DEV_SERVER_PID=$!
183
- sleep 5 # wait for server to start
184
- ```
185
-
186
- 2. **Open browser and navigate**:
187
- ```bash
188
- playwright-cli open {{BROWSER_URL}}
189
- ```
190
-
191
- 3. **Take snapshot and execute verify steps**:
192
- ```bash
193
- playwright-cli snapshot
194
- ```
195
- Read the snapshot file to identify element refs. Then execute each verify step by mapping the descriptive step to actual refs from the snapshot.
169
+ 1. Start dev server if needed: `{{BROWSER_SETUP_COMMAND}}`
170
+ 2. Use `playwright-cli` to open `{{BROWSER_URL}}`, then verify:
196
171
  {{BROWSER_VERIFY_STEPS}}
197
-
198
- 4. **Capture final screenshot**:
199
- ```bash
200
- playwright-cli screenshot
201
- ```
202
-
203
- 5. **Close browser and cleanup**:
204
- ```bash
205
- playwright-cli close
206
- kill $DEV_SERVER_PID 2>/dev/null || true
207
- ```
208
-
209
- 6. **Log results** — append to `context-snapshot.md`:
172
+ 3. Take a final screenshot for evidence.
173
+ 4. Close browser and stop dev server.
174
+ 5. Append results to `context-snapshot.md`:
210
175
  ```
211
176
  ## Browser Verification
212
177
  URL: {{BROWSER_URL}}
@@ -215,7 +180,7 @@ Also read `dev-pipeline/assets/playwright-cli-reference.md` for snapshot format
215
180
  Result: PASS / FAIL (reason)
216
181
  ```
217
182
 
218
- If any step fails, log the failure and continue to Phase 4. Do NOT retry browser verification.
183
+ If any step fails, log the failure and continue. Do NOT retry browser verification.
219
184
  {{END_IF_BROWSER_INTERACTION}}
220
185
 
221
186
  ### Phase 4: Architecture Sync & Commit (SINGLE COMMIT)
@@ -280,47 +280,12 @@ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '#
280
280
 
281
281
  Verify UI behavior using `playwright-cli` before committing. This phase is best-effort — failures are logged but do NOT block the commit.
282
282
 
283
- **Before starting**: Run these commands to learn available playwright-cli commands and usage:
284
- ```bash
285
- playwright-cli --help
286
- ```
287
- For detailed help on a specific command:
288
- ```bash
289
- playwright-cli --help <command> # e.g. playwright-cli --help snapshot
290
- ```
291
- Also read `dev-pipeline/assets/playwright-cli-reference.md` for snapshot format and workflow patterns.
292
-
293
- 1. **Start dev server** (if `setup_command` is specified):
294
- ```bash
295
- {{BROWSER_SETUP_COMMAND}} &
296
- DEV_SERVER_PID=$!
297
- sleep 5 # wait for server to start
298
- ```
299
-
300
- 2. **Open browser and navigate**:
301
- ```bash
302
- playwright-cli open {{BROWSER_URL}}
303
- ```
304
-
305
- 3. **Take snapshot and execute verify steps**:
306
- ```bash
307
- playwright-cli snapshot
308
- ```
309
- Read the snapshot file to identify element refs. Then execute each verify step by mapping the descriptive step to actual refs from the snapshot.
283
+ 1. Start dev server if needed: `{{BROWSER_SETUP_COMMAND}}`
284
+ 2. Use `playwright-cli` to open `{{BROWSER_URL}}`, then verify:
310
285
  {{BROWSER_VERIFY_STEPS}}
311
-
312
- 4. **Capture final screenshot**:
313
- ```bash
314
- playwright-cli screenshot
315
- ```
316
-
317
- 5. **Close browser and cleanup**:
318
- ```bash
319
- playwright-cli close
320
- kill $DEV_SERVER_PID 2>/dev/null || true
321
- ```
322
-
323
- 6. **Log results** — append to `context-snapshot.md`:
286
+ 3. Take a final screenshot for evidence.
287
+ 4. Close browser and stop dev server.
288
+ 5. Append results to `context-snapshot.md`:
324
289
  ```
325
290
  ## Browser Verification
326
291
  URL: {{BROWSER_URL}}
@@ -329,7 +294,7 @@ Also read `dev-pipeline/assets/playwright-cli-reference.md` for snapshot format
329
294
  Result: PASS / FAIL (reason)
330
295
  ```
331
296
 
332
- If any step fails, log the failure and continue to Phase 6. Do NOT retry browser verification.
297
+ If any step fails, log the failure and continue. Do NOT retry browser verification.
333
298
  {{END_IF_BROWSER_INTERACTION}}
334
299
 
335
300
  ### Phase 6: Architecture Sync & Commit (SINGLE COMMIT)
@@ -380,47 +380,12 @@ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '#
380
380
 
381
381
  Verify UI behavior using `playwright-cli` before committing. This phase is best-effort — failures are logged but do NOT block the commit.
382
382
 
383
- **Before starting**: Run these commands to learn available playwright-cli commands and usage:
384
- ```bash
385
- playwright-cli --help
386
- ```
387
- For detailed help on a specific command:
388
- ```bash
389
- playwright-cli --help <command> # e.g. playwright-cli --help snapshot
390
- ```
391
- Also read `dev-pipeline/assets/playwright-cli-reference.md` for snapshot format and workflow patterns.
392
-
393
- 1. **Start dev server** (if `setup_command` is specified):
394
- ```bash
395
- {{BROWSER_SETUP_COMMAND}} &
396
- DEV_SERVER_PID=$!
397
- sleep 5 # wait for server to start
398
- ```
399
-
400
- 2. **Open browser and navigate**:
401
- ```bash
402
- playwright-cli open {{BROWSER_URL}}
403
- ```
404
-
405
- 3. **Take snapshot and execute verify steps**:
406
- ```bash
407
- playwright-cli snapshot
408
- ```
409
- Read the snapshot file to identify element refs. Then execute each verify step by mapping the descriptive step to actual refs from the snapshot.
383
+ 1. Start dev server if needed: `{{BROWSER_SETUP_COMMAND}}`
384
+ 2. Use `playwright-cli` to open `{{BROWSER_URL}}`, then verify:
410
385
  {{BROWSER_VERIFY_STEPS}}
411
-
412
- 4. **Capture final screenshot**:
413
- ```bash
414
- playwright-cli screenshot
415
- ```
416
-
417
- 5. **Close browser and cleanup**:
418
- ```bash
419
- playwright-cli close
420
- kill $DEV_SERVER_PID 2>/dev/null || true
421
- ```
422
-
423
- 6. **Log results** — append to `context-snapshot.md`:
386
+ 3. Take a final screenshot for evidence.
387
+ 4. Close browser and stop dev server.
388
+ 5. Append results to `context-snapshot.md`:
424
389
  ```
425
390
  ## Browser Verification
426
391
  URL: {{BROWSER_URL}}
@@ -429,7 +394,7 @@ Also read `dev-pipeline/assets/playwright-cli-reference.md` for snapshot format
429
394
  Result: PASS / FAIL (reason)
430
395
  ```
431
396
 
432
- If any step fails, log the failure and continue to Phase 6. Do NOT retry browser verification.
397
+ If any step fails, log the failure and continue. Do NOT retry browser verification.
433
398
  {{END_IF_BROWSER_INTERACTION}}
434
399
 
435
400
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.132",
2
+ "version": "1.0.133",
3
3
  "skills": {
4
4
  "prizm-kit": {
5
5
  "description": "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management.",
@@ -53,10 +53,7 @@ Trigger this skill for requests like:
53
53
  - "Prepare feature-list.json", "Prepare dev-pipeline input"
54
54
  - "Reprioritize features", "Split features"
55
55
 
56
- Do NOT use this skill when:
57
- - user only wants to run pipeline now (invoke `dev-pipeline-launcher`)
58
- - user is debugging/refactoring unrelated to feature planning
59
- - user wants to write or modify source code directly
56
+ Do NOT use this skill when the user only wants to run the pipeline (`dev-pipeline-launcher`), is debugging/refactoring, or wants to write source code directly.
60
57
 
61
58
  ## Resource Loading Rules (Mandatory)
62
59
 
@@ -69,13 +66,18 @@ Do NOT use this skill when:
69
66
  2. **Use shared quality examples as needed**:
70
67
  - read `assets/planning-guide.md` for decomposition and acceptance criteria patterns
71
68
 
72
- 3. **Always validate output via script**:
69
+ 3. **Load on-demand references when triggered**:
70
+ - Validation errors or interrupted session → read `references/error-recovery.md`
71
+ - Architecture decisions emerged → read `references/architecture-decisions.md`
72
+ - Browser interaction fields needed → read `references/browser-interaction.md`
73
+
74
+ 4. **Always validate output via script**:
73
75
  - run:
74
76
  ```bash
75
77
  python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input <output-path> --mode <new|incremental>
76
78
  ```
77
79
 
78
- 4. **Use script output as source of truth**:
80
+ 5. **Use script output as source of truth**:
79
81
  - if validation fails, fix and re-run until pass
80
82
 
81
83
  ## Prerequisites
@@ -171,56 +173,11 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
171
173
  | **CP-AP-4** | `feature-list.json` Generated | Schema validates, all required keys present | 6-7 |
172
174
  | **CP-AP-5** | Final Validation Pass | Python script returns `"valid": true` with zero errors | 8 |
173
175
 
174
- **Resume Detection**: See §Resume Support for checkpoint-based resumption.
176
+ **Resume Detection**: If existing artifacts are found, read `references/error-recovery.md` §Resume Support for checkpoint-based resumption.
175
177
 
176
178
  ## Architecture Decision Capture
177
179
 
178
- During planning, key **framework-level** architectural decisions may emerge. When they do, capture them in the project instruction file so all future AI sessions have this context.
179
-
180
- ### What Qualifies (ALL must apply)
181
-
182
- Only capture decisions that are **framework-shaping** — NOT individual feature details. Qualifying categories:
183
-
184
- | Category | Examples |
185
- |----------|----------|
186
- | Tech stack choices | PostgreSQL over MongoDB, React over Vue, Node.js runtime |
187
- | Communication patterns | REST vs GraphQL, WebSocket vs SSE vs polling |
188
- | Architectural patterns | Monorepo, microservices, monolith, event-driven |
189
- | Data model strategies | Relational vs document, event sourcing, CQRS |
190
- | Security architecture | JWT vs session, OAuth provider, RBAC model |
191
-
192
- **Do NOT capture**: individual feature implementation details, UI component choices, specific API endpoint designs, or anything scoped to a single feature.
193
-
194
- **This is conditional** — most planning sessions will NOT produce architecture decisions. Only capture when genuinely impactful decisions are made during the discussion.
195
-
196
- ### When to Capture
197
-
198
- After Phase 5 (DAG verification), before Phase 6 (JSON generation). At this point decisions are settled.
199
-
200
- ### How to Capture
201
-
202
- 1. **Detect platform** — determine which project instruction file to update:
203
- - `.claude/` directory exists → append to `CLAUDE.md`
204
- - `.codebuddy/` directory exists → append to `CODEBUDDY.md`
205
- - Both exist → append to both
206
- - Neither exists → skip (no project instruction file)
207
-
208
- 2. **Check for existing section** — read the target file and look for `### Architecture Decisions` heading:
209
- - If heading exists → append new entries below it (avoid duplicates with existing entries)
210
- - If heading does not exist → create it at the end of the file
211
-
212
- 3. **Format** — one line per decision, no feature IDs:
213
- ```markdown
214
- ### Architecture Decisions
215
- - WebSocket for real-time: sub-second latency required for collaboration features
216
- - PostgreSQL: relational data model with complex queries, ACID compliance needed
217
- - Monorepo structure: shared types between frontend and backend
218
- ```
219
-
220
- 4. **User confirmation** — before writing, show the collected decisions and ask:
221
- > "These architecture decisions were identified during planning. Record them to [CLAUDE.md / CODEBUDDY.md]? (Y/n)"
222
-
223
- If user declines, skip without further prompting.
180
+ After Phase 5, if framework-shaping architecture decisions emerged during planning (tech stack, communication patterns, data model strategies not individual feature details), read `references/architecture-decisions.md` and follow the capture flow. Most sessions will NOT produce architecture decisions — only capture when genuinely impactful.
224
181
 
225
182
  ## Fast Path — Incremental Shortcuts
226
183
 
@@ -265,49 +222,13 @@ AI: "Ready to proceed to dev-pipeline."
265
222
 
266
223
  ## Browser Interaction Planning
267
224
 
268
- For web apps with UI, features that involve user-facing pages or interactive flows can optionally include a `browser_interaction` field. This enables the dev-pipeline to verify UI behavior automatically using `playwright-cli` after implementation.
269
-
270
- ### When to Suggest
271
-
272
- Suggest `browser_interaction` when ALL of these apply:
273
- - The app has a web frontend (detected from tech stack or `global_context`)
274
- - The feature produces user-visible UI (pages, forms, modals, navigation flows)
275
- - The acceptance criteria reference visual/interactive behavior (e.g., "user sees...", "clicking X shows Y")
276
-
277
- Do NOT suggest for:
278
- - Backend-only features (APIs, database, services)
279
- - Config/setup/scaffolding features
280
- - Features where UI is not the primary deliverable
281
-
282
- ### How to Capture
225
+ For features with user-visible UI (pages, forms, modals), optionally add `browser_interaction` for automated playwright-cli verification in the pipeline.
283
226
 
284
- During Phase 4 (refine descriptions and acceptance criteria), for qualifying features ask:
227
+ **Suggest when**: web frontend + user-visible UI + acceptance criteria reference visual/interactive behavior.
228
+ **Do NOT suggest for**: backend-only, config/setup, or non-UI features.
285
229
 
286
- > "This feature has UI behavior. Want to add browser verification so the pipeline can auto-check it after implementation? (Y/n)"
287
-
288
- If yes, generate the `browser_interaction` object:
289
-
290
- ```json
291
- {
292
- "browser_interaction": {
293
- "url": "http://localhost:3000/login",
294
- "setup_command": "npm run dev",
295
- "verify_steps": [
296
- "snapshot",
297
- "click <ref> — click login button",
298
- "fill <ref> 'test@example.com' — enter email",
299
- "screenshot"
300
- ],
301
- "screenshot": true
302
- }
303
- }
304
- ```
305
-
306
- **Rules:**
307
- - `url` is required — the page URL to verify
308
- - `setup_command` is optional — command to start dev server (omit if already running)
309
- - `verify_steps` are descriptive placeholders — the actual `ref` IDs are resolved at runtime by `playwright-cli snapshot`. Use natural language descriptions (e.g., "click login button") that the pipeline agent will map to real refs.
310
- - `screenshot` defaults to `true` — capture final state for human review
230
+ During Phase 4, ask qualifying features: "Want to add browser verification? (Y/n)"
231
+ If yes → read `references/browser-interaction.md` for the `browser_interaction` object format and field rules.
311
232
 
312
233
  ## Output Rules
313
234
 
@@ -342,166 +263,15 @@ Recommend these three options in this strict order:
342
263
 
343
264
  When launcher is available, do not prioritize raw scripts.
344
265
 
345
- ## Error Recovery
346
-
347
- Structured error handling for interrupted sessions and validation failures.
348
-
349
- ### Validation Failures
350
-
351
- When `python3 scripts/validate-and-generate.py validate --input <file> --mode <mode>` returns errors:
352
-
353
- #### Parse validation output
354
- Script returns JSON with `"valid": false`, `"errors": [...]`, `"warnings": [...]`
355
-
356
- #### Decision Tree
357
-
358
- **if `error_count == 0` (warnings only):**
359
- - Proceed with user approval
360
- - Show warnings and ask: "Continue? (Y/n)"
361
-
362
- **elif `error_count > 0` (critical errors):**
363
-
364
- Group errors by type and apply targeted fixes:
365
-
366
- | Error Type | Symptom | Fix Offered | Auto-Fix? |
367
- |-----------|---------|------------|-----------|
368
- | **Schema mismatch** | `$schema` invalid, missing `app_name`, wrong `features` type | "Set `$schema` to `dev-pipeline-feature-list-v1`, `app_name` to string" | Yes |
369
- | **Feature ID issues** | Invalid format (not `F-NNN`), duplicate IDs, undefined refs | "Suggest corrected IDs, show duplicates" | Yes |
370
- | **Dependency errors** | Circular dependency, undefined target features | "Show cycle chain (e.g., `F-003 → F-005 → F-003`), suggest break point" | No |
371
- | **Missing fields** | Feature missing required keys (title, description, AC) | "List each feature + missing keys, guide patch" | Partial |
372
- | **Insufficient AC** | Feature has <2 acceptance criteria | "Show feature, suggest AC examples" | No |
373
- | **Invalid values** | complexity not in [low/medium/high], status not pending | "Show field, valid values" | Yes |
374
-
375
- #### Execution
376
-
377
- ```
378
- For auto-fixable errors:
379
- 1. Show summary: "Found N schema/ID/format issues"
380
- 2. Offer: auto-fix? (Y/n)
381
- 3. Apply fix → regenerate file
382
- 4. Re-run validation
383
- 5. If new errors → loop (max 2 more attempts)
384
-
385
- For manual fixes (dependencies, AC content):
386
- 1. Show concise prompt: "Edit line X-Y in feature-list.json"
387
- 2. Wait for user action
388
- 3. Retry validation (max 2 more attempts)
389
-
390
- if all_retries_exceeded:
391
- → Escalate: "After 3 attempts, validation still fails.
392
- (a) Review file manually, OR
393
- (b) Restart planning from Phase 1"
394
- ```
395
-
396
- ### Interrupted Planning Resume
397
-
398
- | Scenario | Detection | Action |
399
- |----------|-----------|--------|
400
- | Partial `feature-list.json` exists | File found in working dir | Read file, show summary, ask: "Resume from checkpoint or restart?" |
401
- | Checkpoint CP-AP-4 passed | File generates valid schema | Offer: "Jump to Phase 7 (final validation)" |
402
- | Checkpoint CP-AP-5 passed | Full validation passes | Offer: "Feature plan complete, proceed to dev-pipeline" |
403
- | User restarts mid-session | User says "restart" | Return to Phase 1 Vision, or load previous checkpoint if requested |
404
- | Max validation retries exceeded | 3 failed validation loops | Offer: (a) manual review, (b) restart from Phase 1 |
405
-
406
- ### Incremental Mode Abort
407
-
408
- If in Incremental mode but existing `feature-list.json` not found:
409
- - Ask: "Start new plan or provide existing file?"
410
- - If new plan chosen → switch to Route A (New App Planning)
411
- - If existing file uploaded → continue Route B
412
-
413
- ## Incremental Feature Planning — Style Matching
414
-
415
- When appending features to an existing plan, preserve style and detail level automatically.
416
-
417
- ### Style Detection (Automatic)
418
-
419
- Before drafting new features, analyze existing plan:
420
-
421
- 1. **Language Detection**
422
- - Scan `title` and `description` fields
423
- - If >70% English titles → default to English
424
- - If >70% Chinese titles → suggest Chinese (or allow bilingual)
425
-
426
- 2. **Description Density**
427
- - Calculate avg word count per description
428
- - If avg <30 words → draft concise descriptions
429
- - If avg 30-80 words → draft standard detail
430
- - If avg >80 words → draft detailed descriptions
431
-
432
- 3. **Acceptance Criteria Patterns**
433
- - Count avg AC per feature
434
- - Identify dominant format (Given/When/Then Gherkin, BDD, or loose)
435
- - Draft new AC in same format
436
-
437
- 4. **Complexity Distribution**
438
- - Count low/medium/high distribution in existing features
439
- - Alert if new features deviate significantly (>20 percentile points)
440
- - Suggest rebalancing if needed
441
-
442
- ### Style Consistency Prompt
443
-
444
- If new features deviate significantly from detected style:
445
-
446
- ```
447
- "Your new features use avg X words/description, but existing features use Y.
448
- Current ratio: low:M%, medium:N%, high:O%.
449
- Adjust new features to match? (Y/n)"
450
- ```
451
-
452
- Accept user choice, then adjust draft accordingly before Phase 6 (JSON generation).
453
-
454
- ## Resume Support
455
-
456
- App-planner sessions can be resumed from the last completed checkpoint without losing context.
457
-
458
- ### Detection Logic
459
-
460
- Check for artifact files in working directory:
461
-
462
- | Artifacts Found | Last Completed Checkpoint | Next Phase | Resume Action |
463
- |-----------------|--------------------------|-----------|----------------|
464
- | None | (new session) | Phase 1: Vision | Start fresh planning |
465
- | `feature-list.json` exists | CP-AP-4 (file generated) | Phase 7: Final validation | Offer to validate or extend |
466
- | `feature-list.json` + validation passed | CP-AP-5 (validation pass) | Handoff: dev-pipeline | Offer: execute pipeline now |
467
- | Partial state (incomplete file) | CP-AP-2 or CP-AP-3 | Next phase after last checkpoint | Resume interactive planning |
468
-
469
- ### Resume Command (Project Structure)
470
-
471
- For projects using `.prizmkit/` structure:
472
-
473
- ```bash
474
- # Explicit resume (if file is not in current directory):
475
- app-planner --resume-from <path-to-existing-feature-list.json>
476
- ```
477
-
478
- AI detects existing file → suggests:
479
- ```
480
- "Existing plan found with N features, M newly added.
481
- Resume incremental planning? (Y/n)"
482
- ```
483
-
484
- ### Artifact Path Convention
485
-
486
- **CRITICAL PATH RULE**: `feature-list.json` MUST be written to the project root directory
487
- (same level as `package.json` / `.git`).
488
-
489
- Before writing, verify: `ls package.json .git 2>/dev/null` — if these exist in the current
490
- directory, you are at the project root. NEVER write to `dev-pipeline/` or any subdirectory.
491
-
492
- After writing, verify: `ls -la feature-list.json` from project root.
493
-
494
- ```
495
- <project-root>/
496
- ├── feature-list.json # Primary output (always here, at project root)
497
- └── .prizmkit/planning/ # Optional organization for backups
498
- ├── feature-list.validated.json # Checkpoint backup after CP-AP-5
499
- └── <ISO-timestamp>.backup.json # Optional incremental backups
500
- ```
266
+ ## Error Recovery & Resume
501
267
 
502
- The pipeline reads `feature-list.json` from the project root by default. If the user specifies a custom path, the launcher accepts it as an argument.
268
+ If validation fails or a session is interrupted read `references/error-recovery.md` for the full error type table, decision tree, retry logic, and checkpoint-based resume support.
503
269
 
504
- Maintainer note: evaluation workflow moved to `assets/evaluation-guide.md`.
270
+ Key behaviors:
271
+ - Warnings only → proceed with user approval
272
+ - Critical errors → group by type, auto-fix where possible, max 3 total attempts
273
+ - Interrupted session → detect checkpoint from existing artifacts, offer resume or restart
274
+ - `feature-list.json` MUST be written to project root (same level as `package.json` / `.git`)
505
275
 
506
276
  ## Session Exit Gate
507
277
 
@@ -324,39 +324,16 @@ After pipeline completion, if features have `browser_interaction` fields and `pl
324
324
 
325
325
  2. **Ask user**: "N features have browser verification configured. Run playwright-cli verification now? (Y/n)"
326
326
 
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)
335
-
336
- # Open browser and navigate
337
- playwright-cli open <url>
338
-
339
- # Take initial snapshot
340
- playwright-cli snapshot
341
-
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>
345
-
346
- # Take final screenshot
347
- playwright-cli screenshot
348
-
349
- # Close browser
350
- playwright-cli close
351
- ```
327
+ 3. **If yes**, for each qualifying feature:
328
+ - Start dev server if `setup_command` is specified
329
+ - Use `playwright-cli` to open the URL, execute `verify_steps`, and take a screenshot
330
+ - Close browser and stop dev server
352
331
 
353
332
  4. **Report results**:
354
333
  - For each feature: URL opened, steps executed, screenshot path
355
- - If any step fails (element not found, page error): flag as verification failure
334
+ - If any step fails: flag as verification failure
356
335
  - Screenshots are saved to `.playwright-cli/` for user review
357
336
 
358
- 5. **Cleanup**: Stop any dev servers started by `setup_command`
359
-
360
337
  **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
338
 
362
339
  ---
@@ -373,7 +350,7 @@ After pipeline completion, if features have `browser_interaction` fields and `pl
373
350
  | Launch failed (process died immediately) | Show last 20 lines of log: `tail -20 dev-pipeline/state/pipeline-daemon.log` |
374
351
  | Feature stuck/blocked | Use `retry-feature.sh <F-XXX>` to retry; use `reset-feature.sh <F-XXX> --clean --run` for fresh start |
375
352
  | 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` |
353
+ | `playwright-cli` not installed | Browser verification skipped (non-blocking). Suggest: `npm install -g @playwright/cli@latest && playwright-cli install --skills` |
377
354
  | Permission denied on script | Run `chmod +x dev-pipeline/launch-daemon.sh dev-pipeline/run.sh` |
378
355
 
379
356
  ### Integration Notes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prizmkit",
3
- "version": "1.0.132",
3
+ "version": "1.0.133",
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": {
package/src/scaffold.js CHANGED
@@ -697,7 +697,7 @@ export async function installGitignore(projectRoot, options, dryRun) {
697
697
  // ============================================================
698
698
 
699
699
  /**
700
- * 安装 playwright-cli(全局 npm 包 + workspace 初始化)
700
+ * 安装 playwright-cli(全局 npm 包 + AI agent skills)
701
701
  * 用于浏览器交互验证(browser_interaction 功能)
702
702
  */
703
703
  export async function installPlaywrightCli(projectRoot, dryRun) {
@@ -723,12 +723,13 @@ export async function installPlaywrightCli(projectRoot, dryRun) {
723
723
  }
724
724
  }
725
725
 
726
- // Initialize workspace
726
+ // Install AI agent skills (official SKILL.md + references, auto-detects system browser)
727
727
  try {
728
- execSync('playwright-cli install', { cwd: projectRoot, stdio: 'pipe', timeout: 60000 });
729
- console.log(chalk.green(' ✓ playwright-cli workspace initialized'));
728
+ execSync('playwright-cli install --skills', { cwd: projectRoot, stdio: 'pipe', timeout: 60000 });
729
+ console.log(chalk.green(' ✓ playwright-cli skills installed'));
730
730
  } catch (e) {
731
- console.log(chalk.yellow(` ⚠ playwright-cli workspace init skipped: ${e.message}`));
731
+ console.log(chalk.yellow(` ⚠ Skills install skipped: ${e.message}`));
732
+ console.log(chalk.yellow(' ⚠ Run manually: playwright-cli install --skills'));
732
733
  }
733
734
  }
734
735
 
@@ -1,113 +0,0 @@
1
- # playwright-cli Quick Reference (for AI Agents)
2
-
3
- Token-efficient browser automation tool. State is saved to `.playwright-cli/` on disk — only file paths are returned, not page content.
4
-
5
- ## Core Workflow
6
-
7
- ```
8
- playwright-cli open <url> # open browser + navigate (returns snapshot path)
9
- playwright-cli snapshot # capture page state → .yml file with element refs (e.g. ref=e15)
10
- playwright-cli click <ref> # click element by ref from snapshot
11
- playwright-cli fill <ref> <text> # fill text into input/textarea by ref
12
- playwright-cli type <text> # type text into active element
13
- playwright-cli press <key> # press key: Enter, Tab, Escape, ArrowDown, etc.
14
- playwright-cli screenshot # capture viewport → .png file
15
- playwright-cli close # close browser
16
- ```
17
-
18
- ## Reading Snapshots
19
-
20
- After `open` or `snapshot`, read the `.yml` file. Each element has a `ref=eXX`:
21
-
22
- ```yaml
23
- - navigation "Main" [ref=e4]:
24
- - link "Docs" [ref=e11] [cursor=pointer]:
25
- - /url: /docs/intro
26
- - button "Login" [ref=e14] [cursor=pointer]
27
- - searchbox "Search" [ref=e20]
28
- ```
29
-
30
- Use refs in subsequent commands: `playwright-cli click e14`, `playwright-cli fill e20 "query"`.
31
-
32
- **Important**: Refs change after navigation — always `snapshot` after clicking a link.
33
-
34
- ## Additional Commands
35
-
36
- ```
37
- # Navigation
38
- goto <url> # navigate without reopening browser
39
- go-back / go-forward # browser history
40
- reload # reload page
41
-
42
- # Form interaction
43
- select <ref> <value> # select dropdown option
44
- check <ref> / uncheck <ref> # checkbox/radio
45
- upload <file> # file upload
46
- dblclick <ref> # double click
47
- hover <ref> # hover over element
48
- drag <startRef> <endRef> # drag and drop
49
-
50
- # Tabs
51
- tab-list # list all open tabs
52
- tab-new [url] # open new tab
53
- tab-select <index> # switch to tab by index
54
- tab-close [index] # close tab
55
-
56
- # JavaScript
57
- eval <expression> # evaluate JS on page (e.g. eval "document.title")
58
- eval <expression> <ref> # evaluate JS on specific element
59
-
60
- # Session management
61
- list # list browser sessions
62
- close-all # close all browsers
63
- -s=<name> <command> # target specific session (for multiple browsers)
64
-
65
- # DevTools
66
- console # list console messages
67
- network # list network requests
68
- screenshot [ref] # screenshot specific element (not just viewport)
69
-
70
- # Storage / Auth
71
- state-save [file] # save cookies + localStorage (for auth reuse)
72
- state-load <file> # restore saved state
73
- ```
74
-
75
- ## Typical Verification Flow
76
-
77
- ```bash
78
- # 1. Start dev server (if needed)
79
- npm run dev &
80
- sleep 5
81
-
82
- # 2. Open and get initial snapshot
83
- playwright-cli open http://localhost:3000
84
- # → reads .playwright-cli/page-*.yml for element refs
85
-
86
- # 3. Interact — map acceptance criteria to actions
87
- playwright-cli snapshot
88
- # read the .yml, find the target element ref
89
- playwright-cli click e14 # e.g. click "Login" button
90
- playwright-cli fill e20 "admin" # e.g. fill username
91
- playwright-cli fill e22 "pass" # e.g. fill password
92
- playwright-cli click e25 # e.g. click "Submit"
93
-
94
- # 4. Verify result
95
- playwright-cli snapshot
96
- # read the new .yml — check if expected elements exist
97
- # e.g. look for "Welcome" heading, dashboard nav, etc.
98
-
99
- # 5. Screenshot for human review
100
- playwright-cli screenshot
101
-
102
- # 6. Cleanup
103
- playwright-cli close
104
- ```
105
-
106
- ## Tips for AI Agents
107
-
108
- - **Always snapshot before interacting** — you need refs, and they change after navigation
109
- - **Read the .yml file** to find the right ref — don't guess ref numbers
110
- - **One command at a time** — each command returns immediately, check result before next
111
- - **Failures are non-blocking** — if an element isn't found, log it and continue
112
- - **Screenshots are evidence** — take one after each major verification step
113
- - `.playwright-cli/` artifacts are gitignored — they're ephemeral