@optima-chat/dev-skills 0.16.3 → 0.16.4

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.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: "yzsgo-e2e"
3
+ description: "当用户请求端到端测试鸭嘴兽、e2e 测 yzsgo 对话、用浏览器真机测鸭嘴兽整个流程、驱动对话再拉 wire 核对前后端、测网关/agent 端到端有没有问题时,使用此技能。playwright attach 调试端口 Chrome 驱 www.yzsgo.com 对话 → 拉 gateway wire → conversation-iq 语义管线判定 → confirmed 自动提 issue。"
4
+ allowed-tools: ["Bash", "Read", "Write", "Agent", "Workflow"]
5
+ ---
6
+
7
+ # yzsgo-e2e — 鸭嘴兽通用端到端测试
8
+
9
+ 用浏览器真机驱动鸭嘴兽完成一段对话,同时拿浏览器侧结果 + 拉 gateway wire,判前后端一致性与网关缺陷,confirmed 自动提 issue。
10
+
11
+ ## 何时用
12
+ - 「端到端测一下鸭嘴兽」「e2e 测这段对话」「用浏览器真机测整个流程有没有问题」
13
+
14
+ ## 用户说人话 → 我怎么映射(用户不敲 CLI)
15
+ - 用户给的对话内容 → 逐轮 `--message`(按序)。
16
+ - 用户提到「遇到它问 X 就答 Y / 测某个反问」→ `--answer "X=Y"`。
17
+ - 用户说「重点看有没有 Z」→ `--expect "Z"`。
18
+
19
+ ## 四段流程
20
+ 1. **preflight**:`python3 preflight.py <env>`;缺项按提示准备(一次性登录/充值见 store-skills `setting-up-yzsgo-test-env`,我不替做)。
21
+ 2. **驱动 + 拉 wire + 备料**:`python3 run_e2e.py --env <env> --user <测试账号userId> --message ... [--answer k=v] [--expect ...] --out <dir>` → 出 `prepped.md` + `meta.json`。
22
+ 3. **判定**:`gh issue list --repo Optima-Chat/optima-gateway --state open --json number,title` 拉已知 issue 文本,`Workflow({scriptPath:"<skill>/judge_workflow.js", args:{base:"<dir>", sids:["prepped"], knownIssues:"<文本>"}})`。
23
+ 4. **报告 + 提 issue**:
24
+ 判定跑完后,先把 judge_workflow 输出 + meta.json 组装成 render_report 的入参(两者字段形状不同,别直接传):
25
+ - `confirmed` = 各 sid 的 `confirmed` 里取 `finding` → `{what, evidence}`,跨 sid 合并
26
+ - `needs_review` = 各 sid 的 `needsReview` 里取 `finding` → `{what, evidence}`
27
+ - `env` / `started_ts` / `first_message` 从 `<out>/meta.json` 读
28
+ - `blocked` = 环境类阻断原因(浏览器 state=service_error / 积分不足 / 桌面没连…),否则 None
29
+ - `coverage` = 本次覆盖边界(单次对话 / skeptic 读源码 / 去重挡已知 等,如实写)
30
+ 再调 `run_e2e.render_report(result)` 出报告。**confirmed 直接 `gh issue create --repo Optima-Chat/optima-gateway --label needs-triage`**(证据=前端输出+wire transcript+repro 对话),提错可改可删;判定为纯前端缺陷(前端渲染问题、非 agent/网关逻辑)→ 提到对应前端 repo(而非 gateway);拿不准就默认 gateway。**needs_review 不自动提**,报告单列待人工;**环境类标 blocked 不提**。
31
+
32
+ ## 诚实边界(照搬 conversation-iq)
33
+ - 「0 confirmed」≠「没问题」;needs_review 绝不静默毙。
34
+ - 对抗验证必须让 skeptic 读**真实 runtime 源码**,默认判假。
35
+ - 报告固定含「覆盖边界」+「判断修正」两节。
36
+
37
+ ## 前后端对照(本 skill 独有)
38
+ 判定要核对**前端渲染的** vs **wire 里 agent 真实产出的**:前端丢内容/半截/报错但 wire 成功(或反之)= 缺陷。
39
+
40
+ ## vendor 同步纪律
41
+ `chat_driver.py`/`pull_wire.py` 上游权威 = optima-store-skills;`prep_conversation.py`/`judge_workflow.js` 改编自 optima-gateway conversation-iq。见 `SYNC.md`。驱动异常先怀疑前端 DOM 漂移 → 去上游同步。可跑 `python3 verify_drift.py` 比对。只有 `chat_driver.py` 是逐字 vendored、应与上游一致;`pull_wire.py`(在上游基础上追加了 emit_conversation_index/locate_conversation)、`prep_conversation.py`、`judge_workflow.js` 都是改编,`verify_drift.py` 对它们标「⚠️(改编·预期)」是提醒去看上游有无新变更,非「必须一致」。
42
+
43
+ ## 两环境
44
+ `--env cn-prod`(已打通)/ `cn-stage`(wire 取法待核实,脚本会告警)。
45
+
46
+ ## 真机 smoke(改完先跑这个验管道通)
47
+ ```bash
48
+ python3 run_e2e.py --env cn-prod --user <测试账号userId> --message "你好" --out /tmp/yzsgo-smoke
49
+ # 期望:/tmp/yzsgo-smoke/prepped.md 含「前端所见」节 + wire transcript;meta.json 的 located 命中本次对话。
50
+ # 只验四段接线通,不追判定质量。
51
+ ```
@@ -0,0 +1,10 @@
1
+ # vendored 文件上游台账
2
+
3
+ | 本文件 | 上游 repo · 路径 | commit | 同步日期 |
4
+ |---|---|---|---|
5
+ | chat_driver.py | optima-store-skills · .claude/skills/operating-yzsgo-chat/chat_driver.py | 7a1685a | 2026-08-31 |
6
+ | pull_wire.py | optima-store-skills · .claude/skills/pulling-yzsgo-session-wire/pull_wire.py | 7a1685a | 2026-08-31 |
7
+ | prep_conversation.py | optima-gateway · .claude/skills/conversation-iq/prep_session.py(改编:+浏览器证据合并) | b75f575c | 2026-08-31 |
8
+ | judge_workflow.js | optima-gateway · .claude/skills/conversation-iq/workflow.js(改编:+前后端一致性维度) | b75f575c | 2026-08-31 |
9
+
10
+ > 注:judge_workflow.js 内联的 decideOutcome 是 judge_outcome.js(有 node 单测)的副本,改逻辑需同步两处。