openspec-playwright 0.2.10 → 0.3.0

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,7 +2,7 @@
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 playwright npx @playwright/mcp@latest`).
5
+ compatibility: Requires openspec CLI, Playwright (with browsers installed), /browse (gstack, for exploration), and @playwright/mcp (globally installed via `claude mcp add playwright npx @playwright/mcp@latest`, for test execution + Healer).
6
6
  metadata:
7
7
  author: openspec-playwright
8
8
  version: "2.24"
@@ -129,8 +129,8 @@ expect((await post.json()).likeCount).toBeGreaterThan(0); // verify persistence
129
129
  - Announce: "Mode: full app exploration + Page Object discovery"
130
130
  - **Goal**: Discover new routes, extract selectors, and build `pages/*.ts` Page Objects — accumulated asset for future Change tests
131
131
  - **Route discovery** (in order):
132
- 1. **sitemap.xml**: `browser_navigate(${BASE_URL}/sitemap.xml)` → parse URLs
133
- 2. **Link extraction**: Navigate to `${BASE_URL}/` → `browser_evaluate` extracts all `<a href>`:
132
+ 1. **sitemap.xml**: `$B goto ${BASE_URL}/sitemap.xml` → parse URLs
133
+ 2. **Link extraction**: Navigate to `${BASE_URL}/` → `$B js` extracts all `<a href>`:
134
134
  ```javascript
135
135
  // Extract all internal links from current page
136
136
  () => {
@@ -199,16 +199,16 @@ Explore to collect real DOM data before writing test plan. This eliminates blind
199
199
 
200
200
  #### 4.1. Verify BASE_URL + Read app-knowledge.md
201
201
 
202
- 1. **Verify BASE_URL**: `browser_navigate(BASE_URL)` → if HTTP 5xx → **STOP: backend error. Fix app first.**
202
+ 1. **Verify BASE_URL**: `$B goto <BASE_URL>` → if HTTP 5xx → **STOP: backend error. Fix app first.**
203
203
  2. **Read app-knowledge.md**: known risks, project conventions
204
204
  3. **Routes** (from Step 1): use already-discovered routes — no need to re-extract
205
205
 
206
- #### 4.2. Explore each route via Playwright MCP
206
+ #### 4.2. Explore each route via /browse
207
207
 
208
208
  For each route:
209
209
 
210
210
  ```
211
- browser_navigatebrowser_console_messagesbrowser_snapshotbrowser_take_screenshot
211
+ $B goto <url> $B console $B snapshot $B screenshot
212
212
  ```
213
213
 
214
214
  **After navigating, check for app-level errors**:
@@ -225,43 +225,42 @@ browser_navigate → browser_console_messages → browser_snapshot → browser_t
225
225
 
226
226
  ```
227
227
  // 1. Initial capture
228
- await browser_navigate(`${BASE_URL}/<route>`);
229
- await new Promise(r => setTimeout(r, 1500)); // wait for SPA hydration
230
- const url1 = await browser_evaluate(() => window.location.href);
228
+ $B goto <url>
229
+ $B wait --networkidle // wait for SPA hydration
230
+ $B js "window.location.href" // url1
231
+ $B wait 2000
231
232
 
232
233
  // 2. Observe stability
233
- await new Promise(r => setTimeout(r, 2000));
234
- const url2 = await browser_evaluate(() => window.location.href);
235
- const msgs = await browser_console_messages();
234
+ $B js "window.location.href" // url2
235
+ $B console --errors
236
236
 
237
237
  // 3. Detect
238
238
  if (url1 !== url2) {
239
- → ❌ URL changed — redirect loop (ERR_TOO_MANY_REDIRECTS)
240
- → Is this route protected without valid auth.storageState?
239
+ → ❌ URL changed — redirect loop
240
+ → Is this route protected without valid auth?
241
241
  → Yes → auth.setup.ts is broken → fix auth first
242
242
  → No → App middleware bug → mark route ❌ skip, record as App Bug
243
243
  }
244
- if (msgs.filter(m => m.type === 'warning' || m.type === 'error').length > 10) {
244
+ if (console errors/warnings > 10) {
245
245
  → ❌ Excessive console errors — page refresh / JS crash loop
246
246
  → Mark route ❌ skip, record as App Bug
247
247
  }
248
248
  ```
249
249
 
250
- **Network monitoring**: After navigating, use `browser_network_requests` to check for failed API calls. Failed requests (status ≥ 400) on a route indicate an API/backend issue — record in `app-exploration.md` for reference.
250
+ **Network monitoring**: After navigating, use `$B network` to check for failed API calls. Failed requests (status ≥ 400) on a route indicate an API/backend issue — record in `app-exploration.md` for reference.
251
251
 
252
252
  **For guest routes** (no auth):
253
253
 
254
- ```javascript
255
- // Navigate directly
256
- await browser_navigate(`${BASE_URL}/<route>`);
254
+ ```
255
+ $B goto <url>
257
256
  ```
258
257
 
259
258
  **For protected routes** (auth required):
260
259
 
261
- ```javascript
260
+ ```
262
261
  // Option A: use existing storageState (recommended)
263
262
  // Option B: navigate to /login first, fill form, then navigate to target
264
- // Option C: use browser_run_code to set auth cookies directly
263
+ // Option C: $B cookie to set auth cookies directly
265
264
  ```
266
265
 
267
266
  **If credentials are not yet available**:
@@ -279,7 +278,7 @@ Wait for page stability:
279
278
 
280
279
  #### 4.3. Parse the snapshot
281
280
 
282
- From `browser_snapshot` output, extract **interactive elements** for each route:
281
+ From `$B snapshot` output, extract **interactive elements** for each route:
283
282
 
284
283
  | Element type | What to capture | Selector priority |
285
284
  | -------------------- | ------------------------------------ | ---------------------------------------------------------- |
@@ -293,7 +292,7 @@ From `browser_snapshot` output, extract **interactive elements** for each route:
293
292
 
294
293
  #### 4.3.1. Detect special elements
295
294
 
296
- From `browser_snapshot` + `browser_evaluate`, identify these special elements per route:
295
+ From `$B snapshot` + `$B js`, identify these special elements per route:
297
296
 
298
297
  **Special element detection matrix:**
299
298
 
@@ -310,9 +309,9 @@ From `browser_snapshot` + `browser_evaluate`, identify these special elements pe
310
309
  | Drag-and-drop | drag events in JS | Simulate DnD via coordinate clicks | Low |
311
310
  | Date picker | specific `data-testid` or class patterns | Click triggers → evaluate value | Low (skip unless specs mention) |
312
311
  | Infinite scroll | Dynamic row insertion | Count elements before/after scroll | Low (skip unless specs mention dynamic lists/pagination) |
313
- | WebSocket / SSE | No DOM signal | Check `browser_console_messages` for WS events | Low (check only if app uses real-time features) |
312
+ | WebSocket / SSE | No DOM signal | Check `$B console --errors` for WS events | Low (check only if app uses real-time features) |
314
313
 
315
- **For each detected special element, capture via `browser_evaluate` with targeted DOM queries:**
314
+ **For each detected special element, capture via `$B js` with targeted DOM queries:**
316
315
  - Canvas: `getContext('webgl2'/'webgl'/'2d')`, `width`, `height`
317
316
  - Iframe: `src` attribute → use `frameLocator` in tests
318
317
  - CAPTCHA: `.g-recaptcha`, `.h-captcha`, `[data-sitekey]`, canvas+slider detection
@@ -622,7 +621,7 @@ Auth required. To set up:
622
621
 
623
622
  **Idempotency**: If `auth.setup.ts` already exists → verify format, update only if stale.
624
623
 
625
- **Post-auth re-exploration**: If Step 4 skipped protected routes due to missing auth, re-run exploration for those routes now that auth is configured. Navigate to each protected route with auth context → `browser_snapshot` → update `app-exploration.md`. Selectors verified now are better than guesses used during test generation.
624
+ **Post-auth re-exploration**: If Step 4 skipped protected routes due to missing auth, re-run exploration for those routes now that auth is configured. Navigate to each protected route with auth context → `$B snapshot` → update `app-exploration.md`. Selectors verified now are better than guesses used during test generation.
626
625
 
627
626
  ### 8. Configure playwright.config.ts
628
627
 
package/README.md CHANGED
@@ -20,7 +20,7 @@ openspec-pw init # Install Playwright E2E integration
20
20
 
21
21
  ## Supported AI Coding Assistants
22
22
 
23
- Claude Code — E2E workflow is driven by SKILL.md using Playwright MCP tools (`/opsx:e2e <change-name>`).
23
+ Claude Code — E2E workflow is driven by SKILL.md using /browse (exploration) + Playwright MCP (test execution).
24
24
 
25
25
  ## Usage
26
26
 
@@ -52,7 +52,7 @@ openspec-pw uninstall # Remove integration from the project
52
52
 
53
53
  ├── 3. Validate env → run seed.spec.ts
54
54
 
55
- ├── 4. Explore app → Playwright MCP explores real DOM
55
+ ├── 4. Explore app → /browse explores real DOM
56
56
  │ ├─ Read app-knowledge.md (project-level knowledge)
57
57
  │ ├─ Extract routes from specs
58
58
  │ ├─ Navigate each route → snapshot → screenshot
@@ -77,13 +77,10 @@ openspec-pw uninstall # Remove integration from the project
77
77
  ## Prerequisites
78
78
 
79
79
  1. **Node.js >= 20**
80
- 2. **OpenSpec** initialized: `npm install -g @fission-ai/openspec && openspec init`
81
- 3. **Claude Code** with `.claude/` directory
82
-
83
- After prerequisites, install Playwright MCP:
84
- ```bash
85
- claude mcp add playwright npx @playwright/mcp@latest
86
- ```
80
+ 2. **Claude Code** with `.claude/` directory
81
+ 3. **gstack** (for exploration + browser QA): `git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup`
82
+ 4. **OpenSpec** initialized: `npm install -g @fission-ai/openspec && openspec init`
83
+ 5. **Playwright MCP** (for test execution + Healer): `claude mcp add playwright npx @playwright/mcp@latest`
87
84
 
88
85
  ## What `openspec-pw init` Does
89
86
 
@@ -101,14 +98,15 @@ Run through these steps in order when using the E2E workflow for the first time:
101
98
  | Step | Command | If it fails |
102
99
  |------|---------|-------------|
103
100
  | 1. Install CLI | `npm install -g openspec-playwright` | Check Node.js version `node -v` (needs >= 20) |
104
- | 2. Install OpenSpec | `npm install -g @fission-ai/openspec && openspec init` | `npm cache clean -f && npm install -g @fission-ai/openspec` |
105
- | 3. Initialize E2E | `openspec-pw init` | Run `openspec-pw doctor` to see what's missing |
106
- | 4. Install Playwright MCP | `claude mcp add playwright npx @playwright/mcp@latest` | `claude mcp list` to confirm installation |
107
- | 5. Install browsers | `npx playwright install --with-deps` | macOS may need `xcode-select --install` first |
108
- | 6. Start dev server | `npm run dev` (in a separate terminal) | Confirm port, set `BASE_URL` if non-standard |
109
- | 7. Validate env | `npx playwright test tests/playwright/seed.spec.ts` | Check `webServer` in `playwright.config.ts` |
110
- | 8. Configure auth (if needed) | See "Authentication" below | Debug with `npx playwright test --project=setup` |
111
- | 9. Run first E2E | `/opsx:e2e <change-name>` | Check `openspec/reports/` for the report |
101
+ | 2. Install gstack | `git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup` | Requires Bun: `curl -fsSL https://bun.sh/install | bash` |
102
+ | 3. Install OpenSpec | `npm install -g @fission-ai/openspec && openspec init` | `npm cache clean -f && npm install -g @fission-ai/openspec` |
103
+ | 4. Initialize E2E | `openspec-pw init` | Run `openspec-pw doctor` to see what's missing |
104
+ | 5. Install Playwright MCP | `claude mcp add playwright npx @playwright/mcp@latest` | `claude mcp list` to confirm installation |
105
+ | 6. Install browsers | `npx playwright install --with-deps` | macOS may need `xcode-select --install` first |
106
+ | 7. Start dev server | `npm run dev` (in a separate terminal) | Confirm port, set `BASE_URL` if non-standard |
107
+ | 8. Validate env | `npx playwright test tests/playwright/seed.spec.ts` | Check `webServer` in `playwright.config.ts` |
108
+ | 9. Configure auth (if needed) | See "Authentication" below | Debug with `npx playwright test --project=setup` |
109
+ | 10. Run first E2E | `/opsx:e2e <change-name>` | Check `openspec/reports/` for the report |
112
110
 
113
111
  ## Authentication
114
112
 
package/README.zh-CN.md CHANGED
@@ -13,13 +13,10 @@ npm install -g openspec-playwright
13
13
  ## 前置条件
14
14
 
15
15
  1. **Node.js >= 20**
16
- 2. **OpenSpec** 已初始化: `npm install -g @fission-ai/openspec && openspec init`
17
- 3. **Claude Code** 且项目中有 `.claude/` 目录
18
-
19
- 安装 Playwright MCP
20
- ```bash
21
- claude mcp add playwright npx @playwright/mcp@latest
22
- ```
16
+ 2. **Claude Code** 且项目中有 `.claude/` 目录
17
+ 3. **gstack**(用于探索 + 浏览器 QA):`git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup`
18
+ 4. **OpenSpec** 已初始化: `npm install -g @fission-ai/openspec && openspec init`
19
+ 5. **Playwright MCP**(用于测试执行 + Healer):`claude mcp add playwright npx @playwright/mcp@latest`
23
20
 
24
21
  ## 初始化
25
22
 
@@ -33,7 +30,7 @@ openspec-pw init # 安装 Playwright E2E 集成
33
30
 
34
31
  ## 支持的 AI 编码助手
35
32
 
36
- Claude Code — E2E 工作流由 SKILL.md 驱动,使用 Playwright MCP 工具(`/opsx:e2e <change-name>`)。
33
+ Claude Code — E2E 工作流由 SKILL.md 驱动,使用 /browse(探索)+ Playwright MCP(测试执行)。
37
34
 
38
35
  ## 使用
39
36
 
@@ -65,7 +62,7 @@ openspec-pw uninstall # 移除项目中的集成
65
62
 
66
63
  ├── 3. 验证环境 → 运行 seed.spec.ts
67
64
 
68
- ├── 4. 探索应用 → Playwright MCP 探索真实 DOM
65
+ ├── 4. 探索应用 → /browse 探索真实 DOM
69
66
  │ ├─ 读取 app-knowledge.md(项目级知识)
70
67
  │ ├─ 从 specs 提取路由
71
68
  │ ├─ 遍历每个路由 → snapshot → screenshot
@@ -102,14 +99,15 @@ openspec-pw uninstall # 移除项目中的集成
102
99
  | 步骤 | 命令 | 失败时快速修复 |
103
100
  |------|------|----------------|
104
101
  | 1. 安装 CLI | `npm install -g openspec-playwright` | 检查 Node.js 版本 `node -v`(需 >= 20) |
105
- | 2. 安装 OpenSpec | `npm install -g @fission-ai/openspec && openspec init` | `npm cache clean -f && npm install -g @fission-ai/openspec` |
106
- | 3. 初始化 E2E | `openspec-pw init` | 运行 `openspec-pw doctor` 查看具体缺失项 |
107
- | 4. 安装 Playwright MCP | `claude mcp add playwright npx @playwright/mcp@latest` | `claude mcp list` 确认安装成功 |
108
- | 5. 安装浏览器 | `npx playwright install --with-deps` | macOS 可能需先运行 `xcode-select --install` |
109
- | 6. 启动开发服务器 | `npm run dev`(在另一个终端) | 确认端口,配置 `BASE_URL` |
110
- | 7. 验证环境 | `npx playwright test tests/playwright/seed.spec.ts` | 检查 `playwright.config.ts` 中的 `webServer` 配置 |
111
- | 8. 配置认证(如需要) | 见下方"认证配置" | `npx playwright test --project=setup` 调试 |
112
- | 9. 运行第一个 E2E | `/opsx:e2e <change-name>` | 查看 `openspec/reports/` 中的报告 |
102
+ | 2. 安装 gstack | `git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup` | 需要 Bun:`curl -fsSL https://bun.sh/install \| bash` |
103
+ | 3. 安装 OpenSpec | `npm install -g @fission-ai/openspec && openspec init` | `npm cache clean -f && npm install -g @fission-ai/openspec` |
104
+ | 4. 初始化 E2E | `openspec-pw init` | 运行 `openspec-pw doctor` 查看具体缺失项 |
105
+ | 5. 安装 Playwright MCP | `claude mcp add playwright npx @playwright/mcp@latest` | `claude mcp list` 确认安装成功 |
106
+ | 6. 安装浏览器 | `npx playwright install --with-deps` | macOS 可能需先运行 `xcode-select --install` |
107
+ | 7. 启动开发服务器 | `npm run dev`(在另一个终端) | 确认端口,配置 `BASE_URL` |
108
+ | 8. 验证环境 | `npx playwright test tests/playwright/seed.spec.ts` | 检查 `playwright.config.ts` 中的 `webServer` 配置 |
109
+ | 9. 配置认证(如需要) | 见下方"认证配置" | `npx playwright test --project=setup` 调试 |
110
+ | 10. 运行第一个 E2E | `/opsx:e2e <change-name>` | 查看 `openspec/reports/` 中的报告 |
113
111
 
114
112
  ## 认证配置
115
113
 
@@ -10,17 +10,16 @@
10
10
  本规范适用于 OpenSpec + openspec-playwright 项目(Claude Code 作为开发工具)。
11
11
 
12
12
  E2E 工作流前提(由用户确保,非 AI 操作):
13
- - OpenSpec CLI:`npm install -g @fission-ai/openspec && openspec init`(提供 `/opsx:propose`、`/opsx:archive` 等命令)
13
+ - gstack:`git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup`(提供 `/browse` 探索 + `/qa` 浏览器验证)
14
+ - OpenSpec CLI:`npm install -g @fission-ai/openspec && openspec init`(提供变更管理能力)
14
15
  - openspec-playwright:`openspec-pw init`(提供 `/opsx:e2e` 命令)
15
- - Playwright MCP:`claude mcp add playwright npx @playwright/mcp@latest`
16
+ - Playwright MCP:`claude mcp add playwright npx @playwright/mcp@latest`(用于测试执行 + Healer)
16
17
  - 浏览器已安装:`npx playwright install --with-deps`
17
18
  - 项目包含 `specs/`、`changes/`、`tests/playwright/` 目录
18
19
 
19
20
  ## 1. 浏览器操作约束
20
21
 
21
- 所有浏览器操作**必须**使用 gstack 的 `/browse`(禁止使用其他 MCP Chrome 工具)。
22
-
23
- Claude Code 会根据上下文自动调度 gstack 技能,无需手动路由。
22
+ 所有浏览器操作用 gstack 的 `/browse` 探索 + `/qa` 验证,Playwright MCP 执行测试。Claude Code 会根据上下文自动调度,无需手动路由。
24
23
 
25
24
  **冲突解决**:gstack 任何想直接修改代码的行为,都必须先确认当前 OpenSpec proposal 是否已存在并通过(检查 `changes/<name>/proposal.md` 是否处于 `approved` 状态)。
26
25
 
@@ -59,39 +58,54 @@ Claude Code 会根据上下文自动调度 gstack 技能,无需手动路由。
59
58
  ## 6. 完整生产工作流(严格执行 + 反馈循环)
60
59
 
61
60
  ```
62
- 1. 探索与提案 → /opsx:propose → 生成 proposal + scenarios
63
- 2. 产品与架构思考(按需触发)
64
- 3. 设计审查 → Build(遵守 OpenSpec delta markers)→ /review 自审
65
- 4. E2E 测试 → /opsx:e2e <change-name> → /qa(真实浏览器 + healer)
66
- 5. 验证通过后 → /opsx:archive
67
- 6. 发布 → /ship /land-and-deploy
68
- 7. 迭代回顾 → /retro
61
+ 1. 探索与提案
62
+ 2. 产品与架构评审(按需触发)
63
+ 3. 设计审查
64
+ 4. 实现 → /opsx:apply
65
+ 5. 自审 → /opsx:verify /design-review /review
66
+ 6. E2E 测试 → /opsx:e2e <change-name> /browse 探索 + /qa 验证
67
+ 7. 验证通过后归档 → /opsx:archive
68
+ 8. 发布 → /ship 或 /land-and-deploy
69
+ 9. 迭代回顾 → /retro
69
70
  ```
70
71
 
71
72
  ### 步骤详解
72
73
 
73
- **1. 探索与规范**:`/opsx:propose` → 生成 proposal + scenarios(记录到 `specs/` 和 `changes/`)。对 proposal 进行评审和调整。如需代码探索,单独使用 `/opsx:explore`(不是生成规范)。
74
+ **1. 探索与提案**:现有项目先探索(`/opsx:explore`)再写 proposal(`/opsx:propose`);新项目(greenfield)直接生成 proposal + scenarios(记录到 `specs/` 和 `changes/`)。
74
75
 
75
- **2. 产品与架构思考**(按需触发,不是每个功能都走):
76
+ **2. 产品与架构评审**(按需触发):
76
77
  - `/office-hours`:产品方向、范围、优先级不确定时
77
78
  - `/plan-ceo-review`:产品战略影响、竞争格局变化时
78
79
  - `/plan-eng-review`:架构影响(新增服务、API 契约变更、数据模型重构)时
79
80
 
80
- **3. 设计与实现**:设计审查 → Build(遵守 OpenSpec delta markers),过程中 `/review` 自审。构建完成后,E2E 测试覆盖通过才能继续。
81
+ **3. 设计审查**:在实现前进行设计评审,确保方案合理。评审通过后开始实现。
82
+
83
+ **4. 实现**:执行 `/opsx:apply` 进行实现 → `lint + typecheck` 通过才算成功。
84
+
85
+ **5. 自审**:`/opsx:verify` `/design-review` `/review` 自审实现代码,确保质量。**设计审查后**,对 HTML/CSS 文件执行 CSS 结构审计(防止 `/design-review` 靠截图漏检间距问题):
86
+
87
+ ```
88
+ 两步式审计:
89
+ 1. 确定间距基准 — 查 CSS variables / Tailwind spacing / Bootstrap $spacer
90
+ grep 'gap:|padding:|margin:' *.html → 提取值 → 对比基准,列低于基准的项
91
+ 2. 检查 margin hack — 同一 grid/flex 容器中相邻元素各自用 margin 硬撑间距
92
+ 信号:两个子元素的 margin 和 > 基准间距 2 倍 → 应改为 grid 行或 gap 控制
93
+ 例:.desc{margin-b:36}+.btn{margin-t:80} 在同一 row → grid 行分离
94
+ ```
81
95
 
82
- **4. E2E 测试生成与执行**:`/opsx:e2e <change-name>` 生成 Playwright 测试并执行执行 `/qa`(真实浏览器 + healer)验证。E2E 通过后进入发布环节。
96
+ **6. E2E 测试生成与执行**:`/opsx:e2e <change-name>` 生成 Playwright 测试`/browse` 探索真实 DOM → Healer 自动修复 → `/qa` 真实浏览器验证。E2E 通过后进入发布环节。
83
97
 
84
- **5. 验证通过后**:`/opsx:archive` 永久归档,更新 `specs/`
98
+ **7. 验证通过后归档**:`/opsx:archive` 永久归档,更新 `specs/`
85
99
 
86
- **6. 发布**:`/ship` 或 `/land-and-deploy`
100
+ **8. 发布**:`/ship` 或 `/land-and-deploy`
87
101
 
88
- **7. 迭代回顾**:`/retro`
102
+ **9. 迭代回顾**:`/retro`
89
103
 
90
104
  ### 反馈循环(生产中必然发生)
91
105
 
92
106
  | 信号 | 回到 |
93
107
  |------|------|
94
- | 测试失败(App Bug) | 步骤 3 修复后步骤 4 重新测试 |
95
- | 发现架构问题 | 步骤 2 重新评审 → 步骤 3 修复 |
96
- | proposal 需调整 | 步骤 1 重新提案 |
108
+ | 测试失败(App Bug) | 回到步骤 4 修复 → 重新测试 |
109
+ | 发现架构问题 | 回到步骤 2 重新评审 → 步骤 4 修复 |
110
+ | Proposal 需调整 | 回到步骤 1 重新提案 |
97
111
  | 评审不通过 | 回到对应步骤重新处理 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openspec-playwright",
3
- "version": "0.2.10",
3
+ "version": "0.3.0",
4
4
  "description": "OpenSpec + Playwright E2E verification setup tool for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -217,7 +217,7 @@ Bypass OTP UI entirely and test the protected endpoint directly.
217
217
 
218
218
  **Test approach:**
219
219
  ```
220
- 1. Identify drag handle and drop target via Playwright MCP snapshot
220
+ 1. Identify drag handle and drop target via /browse snapshot
221
221
  2. Use `page.dragAndDrop()` or `locator.dragTo()`
222
222
  3. If custom implementation uses JS events, use `page.evaluate()` to dispatch events
223
223
  4. Assert: target state reflects the drag result