@optima-chat/dev-skills 0.16.3 → 0.16.5

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,42 @@
1
+ #!/usr/bin/env python3
2
+ """比对 vendored 文件与上游是否漂移。上游 repo 不在本机则跳过(不破坏自包含)。"""
3
+ import os, subprocess
4
+
5
+ # adapted=True 的文件在上游基础上有本地改动/追加,diff 必然 ≠0 → ⚠️ 是「去看上游有无新变更」而非缺陷;
6
+ # adapted=False 是逐字 vendored,应与上游一致,⚠️ 才是真漂移。
7
+ VENDORED = [
8
+ {"file": "chat_driver.py", "repo": "store-skills", "adapted": False,
9
+ "upstream": "~/optima-store-skills/.claude/skills/operating-yzsgo-chat/chat_driver.py"},
10
+ {"file": "pull_wire.py", "repo": "store-skills", "adapted": True, # 追加了 emit_conversation_index/locate_conversation
11
+ "upstream": "~/optima-store-skills/.claude/skills/pulling-yzsgo-session-wire/pull_wire.py"},
12
+ {"file": "prep_conversation.py", "repo": "gateway", "adapted": True,
13
+ "upstream": "~/optima-gateway/.claude/skills/conversation-iq/prep_session.py"},
14
+ {"file": "judge_workflow.js", "repo": "gateway", "adapted": True,
15
+ "upstream": "~/optima-gateway/.claude/skills/conversation-iq/workflow.js"},
16
+ ]
17
+
18
+ def plan_drift_checks(present: dict) -> list:
19
+ out = []
20
+ for v in VENDORED:
21
+ out.append({"file": v["file"], "upstream": v["upstream"],
22
+ "adapted": v.get("adapted", False),
23
+ "checkable": bool(present.get(v["repo"], False))})
24
+ return out
25
+
26
+ def _present() -> dict:
27
+ return {"store-skills": os.path.isdir(os.path.expanduser("~/optima-store-skills")),
28
+ "gateway": os.path.isdir(os.path.expanduser("~/optima-gateway"))}
29
+
30
+ if __name__ == "__main__":
31
+ here = os.path.dirname(os.path.abspath(__file__))
32
+ for c in plan_drift_checks(_present()):
33
+ if not c["checkable"]:
34
+ print(f"⏭ {c['file']}:上游不在本机,跳过"); continue
35
+ up = os.path.expanduser(c["upstream"])
36
+ r = subprocess.run(["diff", "-q", os.path.join(here, c["file"]), up], capture_output=True, text=True)
37
+ if r.returncode == 0:
38
+ print(f"✅ {c['file']} 与上游一致")
39
+ elif c.get("adapted"):
40
+ print(f"⚠️(改编·预期) {c['file']}:与上游有差异属正常,去看上游有无值得同步的新变更")
41
+ else:
42
+ print(f"⚠️ 漂移 {c['file']} vs {c['upstream']}(逐字 vendored,应一致 → 去同步)")
package/AGENTS.md CHANGED
@@ -35,6 +35,7 @@ After `npm install -g @optima-chat/dev-skills`, this package installs skills und
35
35
  - `restart-ecs`
36
36
  - `show-env`
37
37
  - `use-commerce-cli`
38
+ - `yzsgo-e2e`
38
39
 
39
40
  `discount-codes` and `gateway-admin` exist under `.claude/skills/` only, so they are not installed for Codex.
40
41
 
package/README.md CHANGED
@@ -51,6 +51,7 @@ Optima Dev Skills 让 Claude Code 能够直接在 **ci、stage、prod、cn-stage
51
51
  - **restart-ecs** - 重启 ECS 服务(stage / prod)
52
52
  - **show-env** - 查看服务环境变量,从 Infisical 取(stage / prod / cn-stage / cn-prod)
53
53
  - **use-commerce-cli** - 用 Commerce CLI 管理电商店铺(商品、订单、库存、运费、集合、首页、国际化)
54
+ - **yzsgo-e2e** - 鸭嘴兽通用端到端测试:浏览器真机驱对话 + 拉 wire + 语义判定 + 提 issue(cn-prod;cn-stage 待核实)
54
55
 
55
56
  ## 👤 用户故事
56
57