openspec-playwright 0.1.27 → 0.1.28

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.
@@ -7,12 +7,27 @@ compatibility: Requires openspec CLI, Playwright (with browsers installed), and
7
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).
8
8
  metadata:
9
9
  author: openspec-playwright
10
- version: "2.2"
10
+ version: "2.3"
11
11
  ---
12
12
 
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.
13
+ ## Input
14
14
 
15
- **Architecture**: Schema owns templates. CLI handles execution. Skill handles cognitive work.
15
+ - **Change name**: `/opsx:e2e <name>` or auto-detected from context
16
+ - **Specs**: `openspec/changes/<name>/specs/*.md`
17
+ - **Credentials**: `E2E_USERNAME` + `E2E_PASSWORD` env vars
18
+
19
+ ## Output
20
+
21
+ - **Test file**: `tests/playwright/<name>.spec.ts`
22
+ - **Auth setup**: `tests/playwright/auth.setup.ts` (if auth required)
23
+ - **Report**: `openspec/reports/playwright-e2e-<name>-<timestamp>.md`
24
+ - **Test plan**: `openspec/changes/<name>/specs/playwright/test-plan.md`
25
+
26
+ ## Architecture
27
+
28
+ 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).
29
+
30
+ **Schema owns templates. CLI handles execution. Skill handles cognitive work.**
16
31
 
17
32
  ## Steps
18
33
 
@@ -181,9 +196,54 @@ Read the report at `openspec/reports/playwright-e2e-<name>-<timestamp>.md`.
181
196
  - Append a verification note: e.g. `✅ Verified via Playwright E2E (<timestamp>)`
182
197
  - Write the updated content back using the Edit tool
183
198
 
184
- **If tests fail**: Suggest which spec items remain unverified and what needs fixing.
199
+ ## Output Format
185
200
 
186
- ---
201
+ ### Report Structure (`openspec/reports/playwright-e2e-<name>-<timestamp>.md`)
202
+
203
+ ```
204
+ # Playwright E2E Report — <name>
205
+
206
+ ## Summary
207
+ | Tests | Passed | Failed | Duration | Status |
208
+ |-------|--------|--------|----------|--------|
209
+ | N | N | N | Xm Xs | ✅/❌ |
210
+
211
+ ## Results
212
+
213
+ ### Passed
214
+ | Test | Duration | Notes |
215
+ |------|----------|-------|
216
+ | ... | ... | ... |
217
+
218
+ ### Failed
219
+ | Test | Error | Recommendation |
220
+ |------|-------|----------------|
221
+ | ... | ... | file:line — fix |
222
+
223
+ ## Auto-Heal Log
224
+ - Attempt N: selector fix → result
225
+
226
+ ## Coverage
227
+ - [x] Requirement 1
228
+ - [ ] Requirement 2 (unverified)
229
+ ```
230
+
231
+ ### Updated tasks.md
232
+ ```
233
+ - [x] Implement feature X ✅ Verified via Playwright E2E (2026-03-28)
234
+ ```
235
+
236
+ ## Graceful Degradation
237
+
238
+ | Scenario | Behavior |
239
+ |----------|----------|
240
+ | No specs found | Stop with info message — E2E requires specs |
241
+ | No auth required | Skip auth setup entirely |
242
+ | test-plan.md exists | Read and use it — never regenerate |
243
+ | auth.setup.ts exists | Verify format — update only if stale |
244
+ | playwright.config.ts exists | Read and preserve all fields — add only missing |
245
+ | Test fails (selector) | Healer: snapshot → fix → re-run, cap at 3 attempts |
246
+ | Test fails (app bug) | Report as failed with recommendation |
187
247
 
188
248
  ## Verification Heuristics
189
249
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openspec-playwright",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
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): document Healer MCP tools and architecture rationale
3
+ - feat(skill): align SKILL.md with OpenSpec format (v2.3)
4
4
 
5
- **Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.27
5
+ **Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.28
Binary file