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.
- package/bin/create-prizmkit.js +1 -1
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/assets/playwright-cli-reference.md +113 -0
- package/bundled/dev-pipeline/lib/common.sh +21 -0
- package/bundled/dev-pipeline/run-bugfix.sh +4 -1
- package/bundled/dev-pipeline/run.sh +6 -3
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +51 -8
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +57 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +57 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +57 -0
- package/bundled/dev-pipeline/templates/feature-list-schema.json +27 -0
- package/bundled/skills/_metadata.json +8 -5
- package/bundled/skills/app-planner/SKILL.md +49 -0
- package/bundled/skills/bug-planner/SKILL.md +3 -0
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +72 -51
- package/bundled/skills/dev-pipeline-launcher/SKILL.md +143 -101
- package/bundled/skills/prizmkit-clarify/SKILL.md +35 -9
- package/bundled/skills/prizmkit-specify/SKILL.md +3 -3
- package/package.json +1 -1
- package/src/external-skills.js +57 -28
- package/src/gitignore-template.js +6 -0
- package/src/index.js +9 -0
- package/src/scaffold.js +53 -3
package/bin/create-prizmkit.js
CHANGED
|
@@ -36,7 +36,7 @@ program
|
|
|
36
36
|
.option('--no-pipeline', 'Disable dev-pipeline')
|
|
37
37
|
.option('--rules <preset>', 'Rules preset: recommended, minimal, or none', 'recommended')
|
|
38
38
|
.option('--ai-cli <command>', 'AI CLI executable command (e.g. cbc, claude, claude-internal)')
|
|
39
|
-
.option('--external-skills <names>', 'Comma-separated external skill names to install (e.g. find-
|
|
39
|
+
.option('--external-skills <names>', 'Comma-separated external skill names to install (e.g. find-skills,impeccable)')
|
|
40
40
|
.option('--non-interactive', 'Skip interactive prompts (requires --platform)')
|
|
41
41
|
.option('--dry-run', 'Show what would be created without making changes')
|
|
42
42
|
.action(async (directory = '.', options) => {
|
package/bundled/VERSION.json
CHANGED
|
@@ -0,0 +1,113 @@
|
|
|
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
|
|
@@ -88,6 +88,27 @@ except: pass
|
|
|
88
88
|
export PRIZMKIT_PLATFORM="$PLATFORM"
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
# prizm_detect_subagents <session_log>
|
|
92
|
+
#
|
|
93
|
+
# Scan session log for subagent spawns and log the result.
|
|
94
|
+
# Uses grep -q for early exit on first match.
|
|
95
|
+
# Requires: USE_STREAM_JSON (from detect_stream_json_support)
|
|
96
|
+
prizm_detect_subagents() {
|
|
97
|
+
local session_log="$1"
|
|
98
|
+
[[ -f "$session_log" ]] || return 0
|
|
99
|
+
|
|
100
|
+
local has_subagent=false
|
|
101
|
+
if [[ "$USE_STREAM_JSON" == "true" ]]; then
|
|
102
|
+
grep -q '"name"[[:space:]]*:[[:space:]]*"Agent"' "$session_log" 2>/dev/null && has_subagent=true
|
|
103
|
+
else
|
|
104
|
+
grep -qE '(Tool: Agent|"tool":\s*"Agent"|tool_use.*Agent|subagent_type)' "$session_log" 2>/dev/null && has_subagent=true
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
if [[ "$has_subagent" == true ]]; then
|
|
108
|
+
log_info "Subagent calls detected in session"
|
|
109
|
+
fi
|
|
110
|
+
}
|
|
111
|
+
|
|
91
112
|
# Common dependency check (jq + python3 + optional CLI in PATH)
|
|
92
113
|
# Args:
|
|
93
114
|
# $1 - cli command (optional)
|
|
@@ -215,7 +215,7 @@ spawn_and_wait_session() {
|
|
|
215
215
|
if [[ -n "$dirty_files" ]]; then
|
|
216
216
|
log_info "Auto-committing remaining session artifacts..."
|
|
217
217
|
git -C "$project_root" add -A 2>/dev/null || true
|
|
218
|
-
git -C "$project_root" commit --no-verify --amend --no-edit
|
|
218
|
+
git -C "$project_root" commit --no-verify --amend --no-edit 2>/dev/null \
|
|
219
219
|
|| git -C "$project_root" commit --no-verify -m "chore($bug_id): include remaining session artifacts" 2>/dev/null \
|
|
220
220
|
|| true
|
|
221
221
|
fi
|
|
@@ -224,6 +224,9 @@ spawn_and_wait_session() {
|
|
|
224
224
|
|
|
225
225
|
log_info "Session result: $session_status"
|
|
226
226
|
|
|
227
|
+
# Subagent detection
|
|
228
|
+
prizm_detect_subagents "$session_log"
|
|
229
|
+
|
|
227
230
|
# Update bug status
|
|
228
231
|
python3 "$SCRIPTS_DIR/update-bug-status.py" \
|
|
229
232
|
--bug-list "$bug_list" \
|
|
@@ -216,7 +216,7 @@ spawn_and_wait_session() {
|
|
|
216
216
|
uncommitted=$(git -C "$project_root" status --porcelain 2>/dev/null | head -1 || true)
|
|
217
217
|
if [[ -n "$uncommitted" ]]; then
|
|
218
218
|
log_warn "Session exited cleanly but produced no commits (uncommitted changes found) — auto-committing..."
|
|
219
|
-
git -C "$project_root" add -
|
|
219
|
+
git -C "$project_root" add -A 2>/dev/null || true
|
|
220
220
|
if git -C "$project_root" commit --no-verify -m "chore($feature_id): auto-commit session work" 2>/dev/null; then
|
|
221
221
|
log_info "Auto-commit succeeded"
|
|
222
222
|
session_status="success"
|
|
@@ -239,8 +239,8 @@ spawn_and_wait_session() {
|
|
|
239
239
|
dirty_files=$(git -C "$project_root" status --porcelain 2>/dev/null || true)
|
|
240
240
|
if [[ -n "$dirty_files" ]]; then
|
|
241
241
|
log_info "Auto-committing remaining session artifacts..."
|
|
242
|
-
git -C "$project_root" add -
|
|
243
|
-
git -C "$project_root" commit --no-verify --amend --no-edit
|
|
242
|
+
git -C "$project_root" add -A 2>/dev/null || true
|
|
243
|
+
git -C "$project_root" commit --no-verify --amend --no-edit 2>/dev/null \
|
|
244
244
|
|| git -C "$project_root" commit --no-verify -m "chore($feature_id): include remaining session artifacts" 2>/dev/null \
|
|
245
245
|
|| true
|
|
246
246
|
fi
|
|
@@ -249,6 +249,9 @@ spawn_and_wait_session() {
|
|
|
249
249
|
|
|
250
250
|
log_info "Session result: $session_status"
|
|
251
251
|
|
|
252
|
+
# Subagent detection
|
|
253
|
+
prizm_detect_subagents "$session_log"
|
|
254
|
+
|
|
252
255
|
# Write lightweight session summary for post-session inspection
|
|
253
256
|
local feature_slug
|
|
254
257
|
feature_slug=$(python3 -c "
|
|
@@ -285,11 +285,13 @@ def process_conditional_blocks(content, resume_phase):
|
|
|
285
285
|
return content
|
|
286
286
|
|
|
287
287
|
|
|
288
|
-
def process_mode_blocks(content, pipeline_mode, init_done, critic_enabled=False
|
|
289
|
-
|
|
288
|
+
def process_mode_blocks(content, pipeline_mode, init_done, critic_enabled=False,
|
|
289
|
+
browser_interaction=False):
|
|
290
|
+
"""Process pipeline mode, init, critic, and browser conditional blocks.
|
|
290
291
|
|
|
291
292
|
Keeps the block matching the current mode, removes the others.
|
|
292
293
|
Handles {{IF_CRITIC_ENABLED}} / {{END_IF_CRITIC_ENABLED}} blocks.
|
|
294
|
+
Handles {{IF_BROWSER_INTERACTION}} / {{END_IF_BROWSER_INTERACTION}} blocks.
|
|
293
295
|
"""
|
|
294
296
|
# Handle lite/standard/full blocks
|
|
295
297
|
modes = ["lite", "standard", "full"]
|
|
@@ -339,6 +341,18 @@ def process_mode_blocks(content, pipeline_mode, init_done, critic_enabled=False)
|
|
|
339
341
|
pattern = re.escape(critic_open) + r".*?" + re.escape(critic_close) + r"\n?"
|
|
340
342
|
content = re.sub(pattern, "", content, flags=re.DOTALL)
|
|
341
343
|
|
|
344
|
+
# Browser interaction blocks
|
|
345
|
+
browser_open = "{{IF_BROWSER_INTERACTION}}"
|
|
346
|
+
browser_close = "{{END_IF_BROWSER_INTERACTION}}"
|
|
347
|
+
if browser_interaction:
|
|
348
|
+
content = content.replace(browser_open + "\n", "")
|
|
349
|
+
content = content.replace(browser_open, "")
|
|
350
|
+
content = content.replace(browser_close + "\n", "")
|
|
351
|
+
content = content.replace(browser_close, "")
|
|
352
|
+
else:
|
|
353
|
+
pattern = re.escape(browser_open) + r".*?" + re.escape(browser_close) + r"\n?"
|
|
354
|
+
content = re.sub(pattern, "", content, flags=re.DOTALL)
|
|
355
|
+
|
|
342
356
|
return content
|
|
343
357
|
|
|
344
358
|
|
|
@@ -517,6 +531,31 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
517
531
|
)
|
|
518
532
|
critic_enabled = False
|
|
519
533
|
|
|
534
|
+
# Browser interaction - extract from feature if present and playwright-cli available
|
|
535
|
+
browser_interaction = feature.get("browser_interaction")
|
|
536
|
+
browser_enabled = False
|
|
537
|
+
browser_url = ""
|
|
538
|
+
browser_setup_command = ""
|
|
539
|
+
browser_verify_steps = ""
|
|
540
|
+
|
|
541
|
+
browser_verify_env = os.environ.get("BROWSER_VERIFY", "").lower()
|
|
542
|
+
if browser_verify_env == "false":
|
|
543
|
+
browser_interaction = None
|
|
544
|
+
|
|
545
|
+
if browser_interaction and isinstance(browser_interaction, dict):
|
|
546
|
+
browser_url = browser_interaction.get("url", "")
|
|
547
|
+
if browser_url:
|
|
548
|
+
browser_enabled = True
|
|
549
|
+
browser_setup_command = browser_interaction.get("setup_command", "# no setup needed")
|
|
550
|
+
steps = browser_interaction.get("verify_steps", [])
|
|
551
|
+
if steps:
|
|
552
|
+
browser_verify_steps = "\n".join(
|
|
553
|
+
" # Step {}: {}".format(i + 1, step)
|
|
554
|
+
for i, step in enumerate(steps)
|
|
555
|
+
)
|
|
556
|
+
else:
|
|
557
|
+
browser_verify_steps = " # (no specific verify steps — just open and screenshot)"
|
|
558
|
+
|
|
520
559
|
replacements = {
|
|
521
560
|
"{{RUN_ID}}": args.run_id,
|
|
522
561
|
"{{SESSION_ID}}": args.session_id,
|
|
@@ -552,21 +591,25 @@ def build_replacements(args, feature, features, global_context, script_dir):
|
|
|
552
591
|
"{{HAS_SPEC}}": "true" if artifacts["has_spec"] else "false",
|
|
553
592
|
"{{HAS_PLAN}}": "true" if artifacts["has_plan"] else "false",
|
|
554
593
|
"{{ARTIFACTS_COMPLETE}}": "true" if artifacts["all_complete"] else "false",
|
|
594
|
+
"{{BROWSER_URL}}": browser_url,
|
|
595
|
+
"{{BROWSER_SETUP_COMMAND}}": browser_setup_command,
|
|
596
|
+
"{{BROWSER_VERIFY_STEPS}}": browser_verify_steps,
|
|
555
597
|
}
|
|
556
598
|
|
|
557
|
-
return replacements, effective_resume
|
|
599
|
+
return replacements, effective_resume, browser_enabled
|
|
558
600
|
|
|
559
601
|
|
|
560
|
-
def render_template(template_content, replacements, resume_phase):
|
|
602
|
+
def render_template(template_content, replacements, resume_phase, browser_enabled=False):
|
|
561
603
|
"""Render the template by processing conditionals and replacing placeholders."""
|
|
562
604
|
# Step 1: Process fresh_start/resume conditional blocks
|
|
563
605
|
content = process_conditional_blocks(template_content, resume_phase)
|
|
564
606
|
|
|
565
|
-
# Step 2: Process mode, init, and
|
|
607
|
+
# Step 2: Process mode, init, critic, and browser conditional blocks
|
|
566
608
|
pipeline_mode = replacements.get("{{PIPELINE_MODE}}", "standard")
|
|
567
609
|
init_done = replacements.get("{{INIT_DONE}}", "false") == "true"
|
|
568
610
|
critic_enabled = replacements.get("{{CRITIC_ENABLED}}", "false") == "true"
|
|
569
|
-
content = process_mode_blocks(content, pipeline_mode, init_done, critic_enabled
|
|
611
|
+
content = process_mode_blocks(content, pipeline_mode, init_done, critic_enabled,
|
|
612
|
+
browser_enabled)
|
|
570
613
|
|
|
571
614
|
# Step 3: Replace all {{PLACEHOLDER}} variables
|
|
572
615
|
for placeholder, value in replacements.items():
|
|
@@ -661,7 +704,7 @@ def main():
|
|
|
661
704
|
global_context = {}
|
|
662
705
|
|
|
663
706
|
# Build replacements
|
|
664
|
-
replacements, effective_resume = build_replacements(
|
|
707
|
+
replacements, effective_resume, browser_enabled = build_replacements(
|
|
665
708
|
args, feature, features, global_context, script_dir
|
|
666
709
|
)
|
|
667
710
|
|
|
@@ -670,7 +713,7 @@ def main():
|
|
|
670
713
|
|
|
671
714
|
# Render the template
|
|
672
715
|
rendered = render_template(
|
|
673
|
-
template_content, replacements, effective_resume
|
|
716
|
+
template_content, replacements, effective_resume, browser_enabled
|
|
674
717
|
)
|
|
675
718
|
|
|
676
719
|
# Write the output
|
|
@@ -161,6 +161,63 @@ Files changed/created: [list]
|
|
|
161
161
|
Key decisions: [list]
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
+
{{IF_BROWSER_INTERACTION}}
|
|
165
|
+
### Phase 3.5: Browser Verification (playwright-cli)
|
|
166
|
+
|
|
167
|
+
Verify UI behavior using `playwright-cli` before committing. This phase is best-effort — failures are logged but do NOT block the commit.
|
|
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.
|
|
196
|
+
{{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`:
|
|
210
|
+
```
|
|
211
|
+
## Browser Verification
|
|
212
|
+
URL: {{BROWSER_URL}}
|
|
213
|
+
Steps executed: [list]
|
|
214
|
+
Screenshot: [path]
|
|
215
|
+
Result: PASS / FAIL (reason)
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
If any step fails, log the failure and continue to Phase 4. Do NOT retry browser verification.
|
|
219
|
+
{{END_IF_BROWSER_INTERACTION}}
|
|
220
|
+
|
|
164
221
|
### Phase 4: Architecture Sync & Commit (SINGLE COMMIT)
|
|
165
222
|
|
|
166
223
|
**4a.** Run `/prizmkit-retrospective` — maintains `.prizm-docs/` (architecture index):
|
|
@@ -275,6 +275,63 @@ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '#
|
|
|
275
275
|
|
|
276
276
|
**CP-3**: Tests pass, verdict is not NEEDS_FIXES.
|
|
277
277
|
|
|
278
|
+
{{IF_BROWSER_INTERACTION}}
|
|
279
|
+
### Phase 5.5: Browser Verification (playwright-cli)
|
|
280
|
+
|
|
281
|
+
Verify UI behavior using `playwright-cli` before committing. This phase is best-effort — failures are logged but do NOT block the commit.
|
|
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.
|
|
310
|
+
{{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`:
|
|
324
|
+
```
|
|
325
|
+
## Browser Verification
|
|
326
|
+
URL: {{BROWSER_URL}}
|
|
327
|
+
Steps executed: [list]
|
|
328
|
+
Screenshot: [path]
|
|
329
|
+
Result: PASS / FAIL (reason)
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
If any step fails, log the failure and continue to Phase 6. Do NOT retry browser verification.
|
|
333
|
+
{{END_IF_BROWSER_INTERACTION}}
|
|
334
|
+
|
|
278
335
|
### Phase 6: Architecture Sync & Commit (SINGLE COMMIT)
|
|
279
336
|
|
|
280
337
|
**6a.** Run `/prizmkit-retrospective` — maintains `.prizm-docs/` (architecture index):
|
|
@@ -375,6 +375,63 @@ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '#
|
|
|
375
375
|
|
|
376
376
|
**CP-3**: Integration tests pass, verdict is not NEEDS_FIXES.
|
|
377
377
|
|
|
378
|
+
{{IF_BROWSER_INTERACTION}}
|
|
379
|
+
### Phase 5.5: Browser Verification (playwright-cli)
|
|
380
|
+
|
|
381
|
+
Verify UI behavior using `playwright-cli` before committing. This phase is best-effort — failures are logged but do NOT block the commit.
|
|
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.
|
|
410
|
+
{{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`:
|
|
424
|
+
```
|
|
425
|
+
## Browser Verification
|
|
426
|
+
URL: {{BROWSER_URL}}
|
|
427
|
+
Steps executed: [list]
|
|
428
|
+
Screenshot: [path]
|
|
429
|
+
Result: PASS / FAIL (reason)
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
If any step fails, log the failure and continue to Phase 6. Do NOT retry browser verification.
|
|
433
|
+
{{END_IF_BROWSER_INTERACTION}}
|
|
434
|
+
|
|
378
435
|
|
|
379
436
|
### Phase 6: Retrospective & Commit (SINGLE COMMIT) — DO NOT SKIP
|
|
380
437
|
|
|
@@ -111,6 +111,33 @@
|
|
|
111
111
|
"type": "integer",
|
|
112
112
|
"description": "Number of parallel critic agents. 1 = single critic, 3 = multi-critic voting. Default: 1.",
|
|
113
113
|
"enum": [1, 3]
|
|
114
|
+
},
|
|
115
|
+
"browser_interaction": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"description": "Browser verification config for features with UI. Requires playwright-cli. Pipeline uses this to verify UI behavior after implementation.",
|
|
118
|
+
"properties": {
|
|
119
|
+
"url": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"description": "URL to open for verification (e.g. http://localhost:3000/login)"
|
|
122
|
+
},
|
|
123
|
+
"setup_command": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "Command to start the dev server before verification (e.g. npm run dev)"
|
|
126
|
+
},
|
|
127
|
+
"verify_steps": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"description": "Ordered playwright-cli commands to execute for verification",
|
|
130
|
+
"items": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"screenshot": {
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"description": "Capture screenshot after verification steps. Default: true.",
|
|
137
|
+
"default": true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": ["url"]
|
|
114
141
|
}
|
|
115
142
|
}
|
|
116
143
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.129",
|
|
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.",
|
|
@@ -328,12 +328,15 @@
|
|
|
328
328
|
]
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
|
-
"name": "
|
|
332
|
-
"description": "UI/UX design
|
|
333
|
-
"repo": "
|
|
331
|
+
"name": "impeccable",
|
|
332
|
+
"description": "Production-grade UI/UX design skills (21 skills: frontend-design, adapt, animate, polish, etc.)",
|
|
333
|
+
"repo": "pbakaus/impeccable",
|
|
334
|
+
"installAll": true,
|
|
334
335
|
"tags": [
|
|
335
336
|
"design",
|
|
336
|
-
"frontend"
|
|
337
|
+
"frontend",
|
|
338
|
+
"ui",
|
|
339
|
+
"ux"
|
|
337
340
|
]
|
|
338
341
|
}
|
|
339
342
|
]
|
|
@@ -132,9 +132,11 @@ Execute the selected scenario workflow in conversation mode with mandatory check
|
|
|
132
132
|
### Interactive Phases
|
|
133
133
|
1. clarify business goal and scope
|
|
134
134
|
1.1 confirm deliverable intent (→ Intent Confirmation)
|
|
135
|
+
1.2 **requirement clarification** — apply `/prizmkit-clarify` principles: for ANY unclear aspect of the user's vision, goals, target users, or scope, ask questions one at a time until you fully understand. No limit on rounds or number of questions. Do not proceed to Phase 2 with unresolved ambiguities.
|
|
135
136
|
2. confirm constraints and tech assumptions
|
|
136
137
|
3. propose feature set with dependencies
|
|
137
138
|
4. refine descriptions and acceptance criteria
|
|
139
|
+
4.1 **per-feature clarification** — for each feature, if the description, acceptance criteria, or scope is vague or could be interpreted multiple ways, ask the user to clarify before finalizing. Continue until every feature has unambiguous, implementation-ready details.
|
|
138
140
|
5. verify DAG/order/priorities
|
|
139
141
|
6. build or append `feature-list.json`
|
|
140
142
|
7. ask whether to enable adversarial critic review for high/critical features
|
|
@@ -244,6 +246,52 @@ AI: [Validates immediately]
|
|
|
244
246
|
AI: "Ready to proceed to dev-pipeline."
|
|
245
247
|
```
|
|
246
248
|
|
|
249
|
+
## Browser Interaction Planning
|
|
250
|
+
|
|
251
|
+
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.
|
|
252
|
+
|
|
253
|
+
### When to Suggest
|
|
254
|
+
|
|
255
|
+
Suggest `browser_interaction` when ALL of these apply:
|
|
256
|
+
- The app has a web frontend (detected from tech stack or `global_context`)
|
|
257
|
+
- The feature produces user-visible UI (pages, forms, modals, navigation flows)
|
|
258
|
+
- The acceptance criteria reference visual/interactive behavior (e.g., "user sees...", "clicking X shows Y")
|
|
259
|
+
|
|
260
|
+
Do NOT suggest for:
|
|
261
|
+
- Backend-only features (APIs, database, services)
|
|
262
|
+
- Config/setup/scaffolding features
|
|
263
|
+
- Features where UI is not the primary deliverable
|
|
264
|
+
|
|
265
|
+
### How to Capture
|
|
266
|
+
|
|
267
|
+
During Phase 4 (refine descriptions and acceptance criteria), for qualifying features ask:
|
|
268
|
+
|
|
269
|
+
> "This feature has UI behavior. Want to add browser verification so the pipeline can auto-check it after implementation? (Y/n)"
|
|
270
|
+
|
|
271
|
+
If yes, generate the `browser_interaction` object:
|
|
272
|
+
|
|
273
|
+
```json
|
|
274
|
+
{
|
|
275
|
+
"browser_interaction": {
|
|
276
|
+
"url": "http://localhost:3000/login",
|
|
277
|
+
"setup_command": "npm run dev",
|
|
278
|
+
"verify_steps": [
|
|
279
|
+
"snapshot",
|
|
280
|
+
"click <ref> — click login button",
|
|
281
|
+
"fill <ref> 'test@example.com' — enter email",
|
|
282
|
+
"screenshot"
|
|
283
|
+
],
|
|
284
|
+
"screenshot": true
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Rules:**
|
|
290
|
+
- `url` is required — the page URL to verify
|
|
291
|
+
- `setup_command` is optional — command to start dev server (omit if already running)
|
|
292
|
+
- `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.
|
|
293
|
+
- `screenshot` defaults to `true` — capture final state for human review
|
|
294
|
+
|
|
247
295
|
## Output Rules
|
|
248
296
|
|
|
249
297
|
`feature-list.json` must satisfy:
|
|
@@ -256,6 +304,7 @@ AI: "Ready to proceed to dev-pipeline."
|
|
|
256
304
|
- `model` field is optional — omitting it means the pipeline uses $MODEL env or CLI default
|
|
257
305
|
- `critic` field is optional (boolean). If user requested adversarial critic review during planning, set `"critic": true` for relevant features. Omitting defaults to `false`.
|
|
258
306
|
- `critic_count` field is optional (integer, 1 or 3). If omitted, defaults to 1 (single critic). Set to 3 for multi-critic voting mode on critical features.
|
|
307
|
+
- `browser_interaction` field is optional (object). If user opted for browser verification during planning, set for features with UI behavior. Requires `playwright-cli` to be installed.
|
|
259
308
|
- **descriptions must be implementation-ready** — minimum 15 words (error), recommended 30/50/80 words for low/medium/high complexity (warning). See `planning-guide.md` §4 for what to include.
|
|
260
309
|
|
|
261
310
|
## Next-Step Execution Policy (after planning)
|
|
@@ -44,6 +44,7 @@ Launch the interactive bug planning process through 4 phases.
|
|
|
44
44
|
1. **Identify project**: Read project name and description from existing `feature-list.json` or ask user
|
|
45
45
|
2. **Identify tech stack**: Read from `.prizmkit/config.json` `tech_stack` (preferred), then `feature-list.json` global_context, then `.prizm-docs/root.prizm`. Only ask user if none of these sources provide tech stack info.
|
|
46
46
|
3. **Identify testing framework**: Read from `.prizmkit/config.json` `tech_stack.testing`, or auto-detect from package.json/requirements.txt/etc., or ask user
|
|
47
|
+
4. **Clarify context** — apply `/prizmkit-clarify` principles: if the project context, affected systems, or bug scope is unclear, ask questions one at a time until you fully understand the environment. No limit on rounds or number of questions.
|
|
47
48
|
|
|
48
49
|
Output: `project_name`, `project_description`, `global_context` fields populated.
|
|
49
50
|
|
|
@@ -116,6 +117,8 @@ ALERT: Error rate spike: 500 errors/min on /api/login endpoint
|
|
|
116
117
|
- Verification type (suggest `automated` by default, ask user)
|
|
117
118
|
- Acceptance criteria (auto-suggest based on description, user can edit)
|
|
118
119
|
|
|
120
|
+
**Per-bug clarification** — apply `/prizmkit-clarify` principles: if the bug's root cause, reproduction steps, expected behavior, or scope is unclear from the provided information, ask focused questions until the bug is fully understood. Do not finalize a bug entry with ambiguous details. No limit on the number of questions per bug.
|
|
121
|
+
|
|
119
122
|
**Multiple bugs per session**: After each bug, ask "Any more bugs to add? (yes/no)"
|
|
120
123
|
|
|
121
124
|
### Phase 3: Prioritization & Review
|