prizmkit 1.1.35 → 1.1.36

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.
Files changed (24) hide show
  1. package/bin/create-prizmkit.js +4 -0
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +66 -18
  4. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +4 -5
  5. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
  6. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +74 -4
  7. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +84 -15
  8. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +84 -22
  9. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +4 -4
  10. package/bundled/dev-pipeline/templates/feature-list-schema.json +8 -2
  11. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +5 -6
  12. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +153 -0
  13. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +124 -0
  14. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +10 -17
  15. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +11 -18
  16. package/bundled/skills/_metadata.json +1 -1
  17. package/bundled/skills/feature-planner/SKILL.md +6 -5
  18. package/bundled/skills/feature-planner/references/browser-interaction.md +14 -1
  19. package/bundled/skills/prizmkit-code-review/SKILL.md +176 -45
  20. package/package.json +1 -1
  21. package/src/index.js +10 -1
  22. package/src/scaffold.js +52 -3
  23. package/bundled/skills/prizmkit-code-review/rules/dimensions.md +0 -85
  24. package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +0 -61
@@ -162,15 +162,14 @@ Resolve any `[NEEDS CLARIFICATION]` markers using the refactor description — d
162
162
  Prompt: "Read {{REVIEWER_SUBAGENT_PATH}}. For refactor {{REFACTOR_ID}}:
163
163
  1. Read `.prizmkit/refactor/{{REFACTOR_ID}}/spec.md` for goals and behavior preservation contracts
164
164
  2. Read `.prizmkit/refactor/{{REFACTOR_ID}}/plan.md` for architecture decisions and completed tasks
165
- 3. Run `/prizmkit-code-review` with artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/ scoped to CHANGED FILES ONLY (both phases: diagnostic + fix strategy)
165
+ 3. Run `/prizmkit-code-review` with artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/. The skill runs an internal review-fix loop (Reviewer filter Dev fix, max 3 rounds) and writes review-report.md.
166
166
  4. Run full test suite and verify ALL tests pass
167
- 5. Write integration tests covering all goals from spec.md
168
- 6. review-report.md will be written to .prizmkit/refactor/{{REFACTOR_ID}}/ by prizmkit-code-review
169
- 7. Report: number of findings found, or 'no findings' if clean
167
+ 5. review-report.md will be written to .prizmkit/refactor/{{REFACTOR_ID}}/ by prizmkit-code-review
168
+ 6. Report: verdict (PASS/NEEDS_FIXES), number of rounds, findings fixed/rejected
170
169
  "
171
170
  - **Wait for Reviewer to return**
172
- - **Verdict decision** (L4 responsibility): If findings exist return to Phase 2 for refinement (max 2 review rounds). If no findings proceed.
173
- - **CP-RF-3**: Code review passes, all tests green, behavior preserved
171
+ - Read `review-report.md` if PASS proceed, if NEEDS_FIXES log remaining findings and proceed.
172
+ - **CP-RF-3**: Code review complete, tests pass, behavior preserved
174
173
  - **Checkpoint update**: set step `prizmkit-code-review` to `"completed"` in `{{CHECKPOINT_PATH}}`
175
174
 
176
175
  ---
@@ -0,0 +1,153 @@
1
+ ### Browser Verification — MANDATORY
2
+
3
+ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without actually running browser verification.
4
+
5
+ **Step 0 — Tool Selection (BLOCKING — decide before any browser action)**:
6
+
7
+ 0a. Check which browser tools are available:
8
+ ```bash
9
+ echo "=== playwright-cli ==="
10
+ which playwright-cli 2>/dev/null && playwright-cli --version 2>/dev/null || echo "NOT_INSTALLED"
11
+ echo "=== opencli ==="
12
+ which opencli 2>/dev/null && opencli --version 2>/dev/null || echo "NOT_INSTALLED"
13
+ ```
14
+
15
+ 0b. If opencli is installed, verify Browser Bridge connectivity:
16
+ ```bash
17
+ opencli doctor 2>/dev/null || echo "OPENCLI_BRIDGE_FAILED"
18
+ ```
19
+
20
+ 0c. **Choose your tool** based on availability and scenario:
21
+
22
+ | Condition | Use this tool |
23
+ |-----------|--------------|
24
+ | Only playwright-cli installed | `playwright-cli` |
25
+ | Only opencli installed (and doctor passes) | `opencli` |
26
+ | Both installed — verifying local dev server, forms, components | `playwright-cli` (isolated, deterministic) |
27
+ | Both installed — feature needs real login state (OAuth/SSO) | `opencli` (reuses Chrome sessions) |
28
+ | Both installed — verifying third-party integration pages | `opencli` (has logged-in cookies) |
29
+ | Both installed — headless CI environment | `playwright-cli` (no Chrome dependency) |
30
+ | Neither installed | Skip — log `## Browser Verification: SKIPPED — no browser tool available` |
31
+
32
+ If neither tool is available, install playwright-cli as the default:
33
+ ```bash
34
+ npm install -g @playwright/cli@latest
35
+ playwright-cli --version
36
+ ```
37
+
38
+ Record your choice:
39
+ ```bash
40
+ BROWSER_TOOL="playwright-cli" # or "opencli"
41
+ echo "Selected browser tool: $BROWSER_TOOL"
42
+ ```
43
+
44
+ ---
45
+
46
+ **If you chose `playwright-cli`**, follow this workflow:
47
+
48
+ 0d. Check if playwright-cli skill is installed for the current AI platform:
49
+ ```bash
50
+ CURRENT_PLATFORM=""
51
+ if which claude >/dev/null 2>&1; then
52
+ CURRENT_PLATFORM="claude"; SKILL_DIR="$HOME/.claude/skills"
53
+ elif which cbc >/dev/null 2>&1; then
54
+ CURRENT_PLATFORM="codebuddy"; SKILL_DIR="$HOME/.cbc/skills"
55
+ else
56
+ CURRENT_PLATFORM="unknown"
57
+ fi
58
+ if [ -d "$SKILL_DIR/playwright-cli" ] || ls "$SKILL_DIR"/playwright* 2>/dev/null | grep -q .; then
59
+ echo "SKILL_EXISTS"
60
+ else
61
+ echo "SKILL_MISSING"
62
+ fi
63
+ ```
64
+ If `SKILL_MISSING`: run `playwright-cli install --skills`. If current platform is NOT claude, copy installed skill from `$HOME/.claude/skills/playwright-cli` to `$SKILL_DIR/playwright-cli`.
65
+
66
+ 0e. Read the installed playwright-cli skill (SKILL.md) for workflow guidance. Learn usage: `playwright-cli --help`.
67
+
68
+ **Step 1 — Start Dev Server + Open (playwright-cli)**:
69
+ 1. Identify and start the dev server (see port detection below)
70
+ 2. Open: `playwright-cli open http://localhost:$DEV_PORT`
71
+ 3. If auth needed, use playwright-cli to register a test user and log in
72
+
73
+ **Step 2 — Verification (playwright-cli)**:
74
+ Use `playwright-cli snapshot` to discover element refs, then verify these goals:
75
+ {{BROWSER_VERIFY_STEPS}}
76
+
77
+ Construct your verification workflow based on: (1) the playwright-cli skill documentation, (2) the `--help` output, (3) the current task's acceptance criteria. Take a final screenshot: `playwright-cli screenshot`.
78
+
79
+ **Step 3 — Cleanup (playwright-cli)**:
80
+ 1. `playwright-cli close`
81
+ 2. `kill $DEV_SERVER_PID 2>/dev/null || true`
82
+ 3. `lsof -ti:$DEV_PORT | xargs kill -9 2>/dev/null || true`
83
+
84
+ ---
85
+
86
+ **If you chose `opencli`**, follow this workflow:
87
+
88
+ 0d. Learn usage: `opencli browser --help 2>/dev/null || opencli --help`
89
+
90
+ **Step 1 — Start Dev Server + Open (opencli)**:
91
+ 1. Identify and start the dev server (see port detection below)
92
+ 2. Open and inspect: `opencli browser open http://localhost:$DEV_PORT && opencli browser state`
93
+ 3. If auth needed, opencli reuses Chrome cookies — SSO/OAuth may already be active
94
+
95
+ **Step 2 — Verification (opencli)**:
96
+ Use `opencli browser state` to discover elements with `[N]` indices, then verify these goals:
97
+ {{BROWSER_VERIFY_STEPS}}
98
+
99
+ Key commands: `state`, `click <N>`, `type <N> "text"`, `get text <N>`, `get value <N>`, `wait text "..."`, `wait selector "..."`, `scroll down`, `eval "(function(){ ... })()"`.
100
+
101
+ **Chain commands with `&&`**: `opencli browser type 3 "hello" && opencli browser click 7`
102
+
103
+ Always run `state` after page-changing actions to get fresh indices.
104
+
105
+ **Step 3 — Cleanup (opencli)**:
106
+ 1. `opencli browser close`
107
+ 2. `kill $DEV_SERVER_PID 2>/dev/null || true`
108
+ 3. `lsof -ti:$DEV_PORT | xargs kill -9 2>/dev/null || true`
109
+
110
+ ---
111
+
112
+ **Shared: Dev Server Port Detection** (used by both tools):
113
+
114
+ ```bash
115
+ DEV_PORT={{DEV_PORT}}
116
+ if [ "$DEV_PORT" = "{{DEV_PORT}}" ]; then
117
+ DEV_PORT=$(node -e "const s=require('./package.json').scripts.dev; const m=s.match(/-p\s+(\d+)/); console.log(m?m[1]:'')")
118
+ if [ -z "$DEV_PORT" ]; then
119
+ DEV_PORT=$(echo "$NEXT_PUBLIC_SITE_URL" | sed -nE 's|.*:([0-9]+).*|\1|p')
120
+ fi
121
+ DEV_PORT=${DEV_PORT:-3000}
122
+ fi
123
+ echo "Detected DEV_PORT=$DEV_PORT"
124
+ ```
125
+
126
+ Verify port available: `lsof -ti:$DEV_PORT 2>/dev/null && echo "PORT_IN_USE" || echo "PORT_FREE"`
127
+
128
+ Start dev server: `<start-command> & DEV_SERVER_PID=$!`
129
+
130
+ Wait for ready: poll `http://localhost:$DEV_PORT` with `curl -s -o /dev/null -w "%{http_code}"` until 200/302 (max 30s, 2s interval).
131
+
132
+ ---
133
+
134
+ **Step 4 — Reporting** (both tools):
135
+
136
+ Append results to `context-snapshot.md`:
137
+ ```
138
+ ## Browser Verification
139
+ Tool: <playwright-cli or opencli>
140
+ URL: http://localhost:$DEV_PORT
141
+ Dev Server Command: <actual command used>
142
+ Tool version: <version>
143
+ Steps executed: [list of commands used]
144
+ Screenshot: [path if taken]
145
+ Result: PASS / FAIL (reason)
146
+ Server cleanup: confirmed
147
+ Browser cleanup: confirmed
148
+ ```
149
+
150
+ If verification fails, log the failure details but continue to commit. Failures do NOT block the commit, but you MUST attempt verification and MUST clean up the dev server.
151
+
152
+
153
+ **Checkpoint update**: Update `workflow-checkpoint.json` — set step `browser-verification` to `"completed"`.
@@ -0,0 +1,124 @@
1
+ ### Browser Verification (opencli) — MANDATORY
2
+
3
+ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without actually running opencli.
4
+
5
+ **CRITICAL CONSTRAINT — opencli browser ONLY, NO Playwright**:
6
+ - You MUST use `opencli browser` (the CLI tool) for ALL browser interactions in this phase
7
+ - **NEVER** use playwright-cli, Playwright MCP server, or any MCP-based browser automation
8
+ - All browser actions go through `opencli browser <command>` in the Bash tool, not through any MCP tool call
9
+ - OpenCLI reuses Chrome's logged-in sessions — your existing authentication is available automatically
10
+
11
+ **Step 0 — OpenCLI Readiness Check (BLOCKING — must pass before any browser action)**:
12
+
13
+ 0a. Check if `opencli` is installed:
14
+ ```bash
15
+ which opencli 2>/dev/null && opencli --version 2>/dev/null || echo "NOT_INSTALLED"
16
+ ```
17
+ If output is `NOT_INSTALLED`, install it:
18
+ ```bash
19
+ npm install -g @jackwener/opencli@latest
20
+ ```
21
+ Then verify installation succeeded: `opencli --version`. If installation fails, log `## Browser Verification: SKIPPED — opencli installation failed` in context-snapshot.md and proceed to the next phase.
22
+
23
+ 0b. Verify Browser Bridge connectivity:
24
+ ```bash
25
+ opencli doctor
26
+ ```
27
+ If `opencli doctor` fails (Chrome not running or extension not installed), log `## Browser Verification: SKIPPED — opencli doctor failed (Chrome/extension not ready)` in context-snapshot.md and proceed to the next phase.
28
+
29
+ 0c. Learn opencli browser usage (run once per session):
30
+ ```bash
31
+ opencli browser --help 2>/dev/null || opencli --help
32
+ ```
33
+
34
+ **Step 1 — Start Dev Server**:
35
+
36
+ You know this project's tech stack. Detect and start the dev server yourself:
37
+
38
+ 1. Identify the dev server start command from project config (`package.json` scripts, `Makefile`, `docker-compose.yml`, etc.)
39
+ 2. **Detect the dev server port** — use the pre-detected port from pipeline if available, otherwise extract from project config. Do NOT hardcode or guess the port:
40
+ ```bash
41
+ DEV_PORT={{DEV_PORT}}
42
+ if [ "$DEV_PORT" = "{{DEV_PORT}}" ]; then
43
+ DEV_PORT=$(node -e "const s=require('./package.json').scripts.dev; const m=s.match(/-p\s+(\d+)/); console.log(m?m[1]:'')")
44
+ if [ -z "$DEV_PORT" ]; then
45
+ DEV_PORT=$(echo "$NEXT_PUBLIC_SITE_URL" | sed -nE 's|.*:([0-9]+).*|\1|p')
46
+ fi
47
+ DEV_PORT=${DEV_PORT:-3000}
48
+ fi
49
+ echo "Detected DEV_PORT=$DEV_PORT"
50
+ ```
51
+ 3. Verify the port is available:
52
+ ```bash
53
+ lsof -ti:$DEV_PORT 2>/dev/null && echo "PORT_IN_USE" || echo "PORT_FREE"
54
+ ```
55
+ 4. Start the dev server in background, capture PID:
56
+ ```bash
57
+ <start-command> &
58
+ DEV_SERVER_PID=$!
59
+ ```
60
+ 5. Wait for server to be ready: poll `http://localhost:$DEV_PORT` with `curl -s -o /dev/null -w "%{http_code}"` until it returns 200 or 302 (max 30 seconds, 2s interval)
61
+ 6. Open the app in opencli and inspect page state:
62
+ ```bash
63
+ opencli browser open http://localhost:$DEV_PORT && opencli browser state
64
+ ```
65
+ 7. If the page requires authentication, use opencli browser to interact with login forms (opencli reuses Chrome cookies, so SSO/OAuth may already be active)
66
+
67
+ **Step 2 — Verification**:
68
+
69
+ Use `opencli browser state` on the running app to discover elements with `[N]` indices, then verify these goals:
70
+ {{BROWSER_VERIFY_STEPS}}
71
+
72
+ Key opencli browser commands for verification:
73
+ - `opencli browser state` — structured DOM with `[N]` element indices (FREE, always use this)
74
+ - `opencli browser click <N>` — click element by index
75
+ - `opencli browser type <N> "text"` — type into input
76
+ - `opencli browser get text <N>` — read element text
77
+ - `opencli browser get value <N>` — read input value
78
+ - `opencli browser wait text "Success"` — wait for text to appear
79
+ - `opencli browser wait selector ".loaded"` — wait for element
80
+ - `opencli browser scroll down` — scroll page
81
+ - `opencli browser eval "(function(){ ... })()"` — read-only JS evaluation for data extraction
82
+
83
+ **Chain commands aggressively with `&&`** to minimize tool calls:
84
+ ```bash
85
+ # GOOD: open + inspect in one call
86
+ opencli browser open http://localhost:$DEV_PORT && opencli browser state
87
+
88
+ # GOOD: fill form in one call
89
+ opencli browser type 3 "hello" && opencli browser type 4 "world" && opencli browser click 7
90
+
91
+ # GOOD: click + wait + re-inspect
92
+ opencli browser click 12 && opencli browser wait time 1 && opencli browser state
93
+ ```
94
+
95
+ **IMPORTANT**: Always run `opencli browser state` after page-changing actions (open, click on links, scroll) to get fresh element indices. Never guess indices.
96
+
97
+ Construct your verification workflow based on: (1) the `opencli browser --help` output, (2) the current task's acceptance criteria. Decide the concrete actions yourself. Take a final screenshot if needed: `opencli browser screenshot`.
98
+
99
+ **Step 3 — Cleanup (REQUIRED — you started it, you stop it)**:
100
+
101
+ 1. Close the opencli browser session: `opencli browser close`
102
+ 2. Kill the dev server process: `kill $DEV_SERVER_PID 2>/dev/null || true`
103
+ 3. Verify port is released: `lsof -ti:$DEV_PORT | xargs kill -9 2>/dev/null || true`
104
+
105
+ **Step 4 — Reporting**:
106
+
107
+ Append results to `context-snapshot.md`:
108
+ ```
109
+ ## Browser Verification
110
+ Tool: opencli
111
+ URL: http://localhost:$DEV_PORT
112
+ Dev Server Command: <actual command used>
113
+ opencli version: <version>
114
+ Steps executed: [list of opencli browser commands used]
115
+ Screenshot: [path if taken]
116
+ Result: PASS / FAIL (reason)
117
+ Server cleanup: confirmed
118
+ Browser cleanup: confirmed
119
+ ```
120
+
121
+ If verification fails, log the failure details but continue to commit. Failures do NOT block the commit, but you MUST attempt verification and MUST clean up the dev server.
122
+
123
+
124
+ **Checkpoint update**: Update `workflow-checkpoint.json` — set step `browser-verification` to `"completed"`.
@@ -1,28 +1,21 @@
1
- ### Review + Test — Reviewer Subagent
1
+ ### Review + Test — Code Review
2
2
 
3
- **Spawn Agent**:
4
- | Parameter | Value |
5
- |-----------|-------|
6
- | subagent_type | prizm-dev-team-reviewer |
7
- | run_in_background | false |
3
+ Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`.
8
4
 
9
- **Prompt**:
10
- > {{AGENT_PROMPT_REVIEWER_REVIEW}}
11
-
12
- Wait for Reviewer to return.
5
+ The skill runs an internal review-fix loop (Reviewer Agent → filter → Dev Agent fix, max 3 rounds) and writes `review-report.md` to the artifact directory.
13
6
 
14
7
  **Gate Check — Review Report**:
15
- After Reviewer agent returns, verify the review report was written:
8
+ After `/prizmkit-code-review` returns, verify the review report:
16
9
  ```bash
17
- grep -q "## Findings" .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md && echo "GATE:PASS" || echo "GATE:MISSING"
10
+ grep -q "## Verdict" .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md && echo "GATE:PASS" || echo "GATE:MISSING"
18
11
  ```
19
- If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write review-report.md to .prizmkit/specs/{{FEATURE_SLUG}}/ with findings."
20
-
21
- **Verdict decision** (L4 responsibility): Read review-report.md findings count. If findings exist → NEEDS_FIXES. If no findings → PASS.
12
+ If GATE:MISSING — re-run `/prizmkit-code-review`.
22
13
 
23
- - If NEEDS_FIXES: spawn Dev to fix (Dev reads Fix Instructions in review-report.md), re-run Review (max 3 rounds)
14
+ Read `review-report.md` and check the Verdict:
15
+ - `PASS` → proceed to next phase
16
+ - `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed (do not retry externally)
24
17
 
25
- **CP-3**: Tests pass, no unresolved findings.
18
+ **CP-3**: Review complete, report written.
26
19
 
27
20
 
28
21
  **Checkpoint update**: Update `workflow-checkpoint.json` — set step `prizmkit-code-review` to `"completed"`.
@@ -1,30 +1,23 @@
1
- ### Review + Test — Reviewer Agent
1
+ ### Review + Test — Code Review
2
2
 
3
- **Spawn Agent**:
4
- | Parameter | Value |
5
- |-----------|-------|
6
- | subagent_type | prizm-dev-team-reviewer |
7
- | run_in_background | false |
3
+ Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`.
8
4
 
9
- **Prompt**:
10
- > {{AGENT_PROMPT_REVIEWER_REVIEW}}
11
-
12
- Wait for Reviewer to return.
5
+ The skill runs an internal review-fix loop (Reviewer Agent → filter → Dev Agent fix, max 3 rounds) and writes `review-report.md` to the artifact directory.
13
6
 
14
7
  **Gate Check — Review Report**:
15
- After Reviewer agent returns, verify the review report was written:
8
+ After `/prizmkit-code-review` returns, verify the review report:
16
9
  ```bash
17
- grep -q "## Findings" .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md && echo "GATE:PASS" || echo "GATE:MISSING"
10
+ grep -q "## Verdict" .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md && echo "GATE:PASS" || echo "GATE:MISSING"
18
11
  ```
19
- If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write review-report.md to .prizmkit/specs/{{FEATURE_SLUG}}/ with findings."
12
+ If GATE:MISSING — re-run `/prizmkit-code-review`.
20
13
 
21
- **Verdict decision** (L4 responsibility): Read review-report.md findings count. If findings exist → NEEDS_FIXES. If no findings → PASS.
14
+ Read `review-report.md` and check the Verdict:
15
+ - `PASS` → proceed to next phase
16
+ - `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed (do not retry externally)
22
17
 
23
- - If NEEDS_FIXES: spawn Dev to fix with this prompt:
24
- > {{AGENT_PROMPT_DEV_FIX}}
25
- Then re-run Review (max 3 rounds).
18
+ Run the full test suite: `({{TEST_CMD}}) 2>&1 | tee /tmp/review-test-out.txt | tail -20`
26
19
 
27
- **CP-3**: Integration tests pass, no unresolved findings.
20
+ **CP-3**: Review complete, tests pass, report written.
28
21
 
29
22
 
30
23
  **Checkpoint update**: Update `workflow-checkpoint.json` — set step `prizmkit-code-review` to `"completed"`.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.35",
2
+ "version": "1.1.36",
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.",
@@ -284,9 +284,10 @@ A feature is **exempt** when ANY true:
284
284
 
285
285
  ### Default Behavior (Phase 4.2)
286
286
 
287
- 1. **Auto-generate** `browser_interaction` for ALL qualifying features. Read `${SKILL_DIR}/references/browser-interaction.md` for the object format and field rules.
288
- 2. **Present a summary** to the user showing which features received `browser_interaction`.
289
- 3. **User can opt-OUT** specific features.
287
+ 1. **Auto-generate** `browser_interaction` for ALL qualifying features. Read `${SKILL_DIR}/references/browser-interaction.md` for the object format, field rules, and `tool` selection guide.
288
+ 2. **Tool selection**: Default `tool` to `"auto"`. Override to `"opencli"` when the feature involves OAuth/SSO callbacks, third-party dashboard verification, or requires real login state. Override to `"playwright-cli"` when the feature is purely local UI (forms, components, routing).
289
+ 3. **Present a summary** to the user showing which features received `browser_interaction` (including the `tool` value).
290
+ 4. **User can opt-OUT** specific features or override the `tool` choice.
290
291
 
291
292
  ## Output Rules
292
293
 
@@ -300,7 +301,7 @@ Key requirements:
300
301
  - new items default `status: "pending"`
301
302
  - English feature titles for stable slug generation
302
303
  - `critic` / `critic_count` defaults per Testing Defaults section
303
- - `browser_interaction` auto-generated for qualifying frontend features
304
+ - `browser_interaction` auto-generated for qualifying frontend features (with `tool` selection: `auto`/`playwright-cli`/`opencli`)
304
305
  - descriptions: minimum 15 words (error), recommended minimum 30/50/80/100+ for low/medium/high/critical (warning). No upper limit — more detail prevents AI guessing
305
306
  - `estimated_complexity` determines pipeline execution tier:
306
307
  - `low` / `medium` → **lite** (single agent, no subagents)
@@ -322,7 +323,7 @@ Set default testing-related fields for each feature. The user can opt out.
322
323
  | medium | `true` | `1` | Single critic review |
323
324
  | low | `false` | (omitted) | Skip critic |
324
325
 
325
- For frontend features with `browser_interaction`, Playwright verification is enabled by default.
326
+ For frontend features with `browser_interaction`, browser verification is enabled by default. The `tool` field determines which browser tool is used (default: `auto` — AI chooses at runtime between `playwright-cli` and `opencli`).
326
327
 
327
328
  Present a consolidated testing summary table at Phase 8, then ask for confirmation.
328
329
 
@@ -22,7 +22,20 @@ For each qualifying feature, generate the `browser_interaction` object:
22
22
 
23
23
  ## Field Rules
24
24
 
25
- - `verify_steps` are **verification goals**, not specific playwright-cli commands. Describe WHAT to verify, not HOW to verify it. The pipeline AI will:
25
+ - `tool` selects the browser verification tool. Values: `"playwright-cli"`, `"opencli"`, `"auto"` (default).
26
+ - **`"auto"`** (default): AI chooses at runtime based on available tools and scenario. Recommended for most cases.
27
+ - **`"playwright-cli"`**: Isolated browser instance, no login state. Best for local dev server verification, form testing, component rendering checks.
28
+ - **`"opencli"`**: Reuses Chrome's logged-in sessions via Browser Bridge. Best for verifying third-party integrations (OAuth callbacks, API dashboards), features requiring real authentication state, or pages behind SSO.
29
+
30
+ | Scenario | Recommended `tool` |
31
+ |----------|-------------------|
32
+ | Local dev server, pure frontend components | `playwright-cli` |
33
+ | Needs real login state (e.g., OAuth redirect page) | `opencli` |
34
+ | Third-party API integration dashboard verification | `opencli` |
35
+ | Headless CI environment | `playwright-cli` |
36
+ | Unsure / mixed scenarios | `auto` |
37
+
38
+ - `verify_steps` are **verification goals**, not specific tool commands. Describe WHAT to verify, not HOW to verify it. The pipeline AI will:
26
39
  1. Auto-detect the dev server start command from project config (`package.json`, `Makefile`, etc.)
27
40
  2. Start the server and discover the URL/port at runtime
28
41
  3. Use `playwright-cli snapshot` to discover real element refs