openspec-playwright 0.1.26 → 0.1.27

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.
@@ -2,10 +2,12 @@
2
2
  name: openspec-e2e
3
3
  description: Run Playwright E2E verification for an OpenSpec change. Use when the user wants to validate that the implementation works end-to-end by running Playwright tests generated from the specs.
4
4
  license: MIT
5
- compatibility: Requires openspec CLI, Playwright (with browsers installed), and @playwright/mcp (globally installed via claude mcp add).
5
+ compatibility: Requires openspec CLI, Playwright (with browsers installed), and @playwright/mcp (globally installed via `claude mcp add playwright npx @playwright/mcp@latest`).
6
+
7
+ **Architecture**: Uses CLI + SKILLs (not `init-agents`). This follows Playwright's recommended approach for coding agents — CLI is more token-efficient than loading MCP tool schemas into context. MCP is used only for Healer (UI inspection on failure).
6
8
  metadata:
7
9
  author: openspec-playwright
8
- version: "2.1"
10
+ version: "2.2"
9
11
  ---
10
12
 
11
13
  Run Playwright E2E verification for an OpenSpec change. This skill reads specs from `openspec/changes/<name>/specs/`, generates test files, detects auth requirements, and delegates test execution to the `openspec-pw run` CLI.
@@ -140,7 +142,27 @@ The CLI handles:
140
142
  - Port mismatch detection
141
143
  - Report generation at `openspec/reports/playwright-e2e-<name>-<timestamp>.md`
142
144
 
143
- If tests fail → analyze failures, use Playwright MCP tools to inspect UI state, fix selectors in the test file, and re-run.
145
+ If tests fail → analyze failures, use **Playwright MCP tools** to inspect UI state, fix selectors in the test file, and re-run.
146
+
147
+ **Healer MCP tools** (in order of use):
148
+
149
+ | Tool | Purpose |
150
+ |------|---------|
151
+ | `Navigate to a URL` | Go to the failing test's page |
152
+ | `Page snapshot` | Get page structure to find equivalent selectors |
153
+ | `Get console messages` | Diagnose JS errors that may cause failures |
154
+ | `Take a screenshot` | Visually compare before/after fixes |
155
+ | `Run Playwright code` | Execute custom fix logic (optional) |
156
+
157
+ **Healer workflow**:
158
+ 1. Read the failing test file — identify the broken selector or assertion
159
+ 2. Navigate to the target page with `Navigate to a URL`
160
+ 3. Take a `Page snapshot` — find an equivalent stable selector
161
+ 4. Fix the selector in the test file using the Edit tool
162
+ 5. Re-run: `openspec-pw run <name>`
163
+ 6. Repeat until pass or 3 attempts reached
164
+
165
+ **Note**: For selector fixes, prefer `getByRole`, `getByLabel`, `getByText` over CSS paths. For structural issues (wrong page content), update the assertion in the test file.
144
166
 
145
167
  **Cap auto-heal attempts at 3** to prevent infinite loops.
146
168
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openspec-playwright",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "OpenSpec + Playwright E2E verification setup tool for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
package/release-notes.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ## What's Changed
2
2
 
3
- - feat(skill): LLM-driven test generation and tasks.md integration
3
+ - feat(skill): document Healer MCP tools and architecture rationale
4
4
 
5
- **Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.26
5
+ **Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.27
Binary file