ai-engineering-init 1.14.2 → 1.15.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.
Files changed (57) hide show
  1. package/.claude/commands/release.md +109 -0
  2. package/.claude/hooks/skill-forced-eval.js +1 -0
  3. package/.claude/skills/chrome-cdp/SKILL.md +81 -0
  4. package/.claude/skills/chrome-cdp/scripts/cdp.mjs +838 -0
  5. package/.claude/skills/chrome-cdp/scripts/run-cdp.sh +7 -0
  6. package/.claude/skills/leniu-marketing-scenario/SKILL.md +448 -0
  7. package/.claude/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
  8. package/.claude/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
  9. package/.claude/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
  10. package/.codex/skills/leniu-marketing-scenario/SKILL.md +448 -0
  11. package/.codex/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
  12. package/.codex/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
  13. package/.codex/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
  14. package/.cursor/hooks/cursor-skill-eval.js +5 -6
  15. package/.cursor/rules/skill-activation.mdc +1 -2
  16. package/.cursor/skills/leniu-marketing-scenario/SKILL.md +448 -0
  17. package/.cursor/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
  18. package/.cursor/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
  19. package/.cursor/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
  20. package/AGENTS.md +1 -0
  21. package/package.json +1 -1
  22. package/.claude/skills/leniu-java-amount-handling/SKILL.md +0 -461
  23. package/.claude/skills/leniu-java-export/SKILL.md +0 -570
  24. package/.claude/skills/leniu-java-report-query-param/SKILL.md +0 -291
  25. package/.claude/skills/leniu-java-total-line/SKILL.md +0 -196
  26. package/.claude/skills/leniu-marketing-price-rule-customizer/SKILL.md +0 -301
  27. package/.claude/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +0 -285
  28. package/.claude/skills/leniu-mealtime/SKILL.md +0 -215
  29. package/.claude/skills/leniu-report-customization/SKILL.md +0 -415
  30. package/.claude/skills/leniu-report-customization/references/table-fields.md +0 -93
  31. package/.claude/skills/leniu-report-standard-customization/SKILL.md +0 -391
  32. package/.claude/skills/leniu-report-standard-customization/references/analysis-module.md +0 -64
  33. package/.claude/skills/leniu-report-standard-customization/references/table-fields.md +0 -113
  34. package/.codex/skills/leniu-java-amount-handling/SKILL.md +0 -461
  35. package/.codex/skills/leniu-java-export/SKILL.md +0 -570
  36. package/.codex/skills/leniu-java-report-query-param/SKILL.md +0 -291
  37. package/.codex/skills/leniu-java-total-line/SKILL.md +0 -196
  38. package/.codex/skills/leniu-marketing-price-rule-customizer/SKILL.md +0 -301
  39. package/.codex/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +0 -285
  40. package/.codex/skills/leniu-mealtime/SKILL.md +0 -215
  41. package/.codex/skills/leniu-report-customization/SKILL.md +0 -415
  42. package/.codex/skills/leniu-report-customization/references/table-fields.md +0 -93
  43. package/.codex/skills/leniu-report-standard-customization/SKILL.md +0 -391
  44. package/.codex/skills/leniu-report-standard-customization/references/analysis-module.md +0 -64
  45. package/.codex/skills/leniu-report-standard-customization/references/table-fields.md +0 -113
  46. package/.cursor/skills/leniu-java-amount-handling/SKILL.md +0 -461
  47. package/.cursor/skills/leniu-java-export/SKILL.md +0 -570
  48. package/.cursor/skills/leniu-java-report-query-param/SKILL.md +0 -291
  49. package/.cursor/skills/leniu-java-total-line/SKILL.md +0 -196
  50. package/.cursor/skills/leniu-marketing-price-rule-customizer/SKILL.md +0 -301
  51. package/.cursor/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +0 -285
  52. package/.cursor/skills/leniu-mealtime/SKILL.md +0 -215
  53. package/.cursor/skills/leniu-report-customization/SKILL.md +0 -415
  54. package/.cursor/skills/leniu-report-customization/references/table-fields.md +0 -93
  55. package/.cursor/skills/leniu-report-standard-customization/SKILL.md +0 -391
  56. package/.cursor/skills/leniu-report-standard-customization/references/analysis-module.md +0 -64
  57. package/.cursor/skills/leniu-report-standard-customization/references/table-fields.md +0 -113
@@ -0,0 +1,109 @@
1
+ # /release - 自动化发版
2
+
3
+ 作为发版助手,自动读取项目发版规范(RELEASE.md),按标准流程执行版本发布。
4
+
5
+ ## 使用方式
6
+
7
+ - `/release` — 自动检测变更,推荐版本号,执行完整发版流程
8
+ - `/release patch` — 指定 patch 版本升级
9
+ - `/release minor` — 指定 minor 版本升级
10
+ - `/release major` — 指定 major 版本升级
11
+
12
+ ## 执行流程
13
+
14
+ ### 第一步:环境检查
15
+
16
+ ```bash
17
+ # 1. 读取发版规范
18
+ cat RELEASE.md
19
+
20
+ # 2. 查看当前版本和最新 tag
21
+ node -p "require('./package.json').version"
22
+ git tag --sort=-version:refname | head -5
23
+
24
+ # 3. 检查工作区状态(必须干净或只有待发版的改动)
25
+ git status -s
26
+
27
+ # 4. 查看自上次 tag 以来的所有 commit
28
+ git log $(git tag --sort=-version:refname | head -1)..HEAD --oneline
29
+ ```
30
+
31
+ ### 第二步:确定版本号
32
+
33
+ 根据 commit 内容自动推荐版本类型:
34
+ - 含 `feat` → minor
35
+ - 含 `fix`/`chore`/`remove` → patch
36
+ - 含 `BREAKING CHANGE` → major
37
+
38
+ 如果用户指定了版本类型(patch/minor/major),直接使用。
39
+ 否则展示推荐并等用户确认。
40
+
41
+ ### 第三步:更新 CHANGELOG.md
42
+
43
+ 基于 `git log` 自动生成 CHANGELOG 条目:
44
+
45
+ ```markdown
46
+ ## [vX.Y.Z] - YYYY-MM-DD
47
+
48
+ ### 新增
49
+ - ...
50
+
51
+ ### 修复
52
+ - ...
53
+
54
+ ### 移除
55
+ - ...
56
+ ```
57
+
58
+ 分类规则:
59
+ - `feat` 开头 → 新增
60
+ - `fix` 开头 → 修复
61
+ - `remove`/`删除` → 移除
62
+ - `chore`/其他 → 改进
63
+
64
+ 生成后展示给用户确认,可修改。
65
+
66
+ ### 第四步:更新 package.json
67
+
68
+ ```bash
69
+ # 使用 npm version 更新(不自动打 tag)
70
+ npm version <patch|minor|major> --no-git-tag-version
71
+ ```
72
+
73
+ ### 第五步:提交
74
+
75
+ ```bash
76
+ git add package.json CHANGELOG.md
77
+ git commit -m "chore: 发布 vX.Y.Z"
78
+ ```
79
+
80
+ ### 第六步:推送代码
81
+
82
+ ```bash
83
+ git push origin main
84
+ ```
85
+
86
+ ### 第七步:打 tag 并推送
87
+
88
+ ```bash
89
+ git tag vX.Y.Z
90
+ git push origin vX.Y.Z
91
+ ```
92
+
93
+ ### 第八步:验证
94
+
95
+ ```bash
96
+ echo "package.json: $(node -p \"require('./package.json').version\")"
97
+ echo "latest tag: $(git tag --sort=-version:refname | head -1)"
98
+ echo "HEAD commit: $(git log --oneline -1)"
99
+ echo "tag commit: $(git rev-parse --short vX.Y.Z)"
100
+ ```
101
+
102
+ 确认四个值一致后,输出发版成功信息。
103
+
104
+ ## 安全规则
105
+
106
+ - 如果 `git status` 有未提交的改动,先询问用户是否需要一起发版
107
+ - 如果 package.json version 已经大于最新 tag,说明版本号已手动更新过,跳过 npm version 步骤
108
+ - 推送前必须确认 remote 是正确的仓库
109
+ - 每一步失败都立即停止并报告,不要继续后续步骤
@@ -116,6 +116,7 @@ const instructions = `## 强制技能激活流程(必须执行)
116
116
  - update-status: 更新状态/状态变更
117
117
  - skill-creator: 创建技能模板/技能脚手架/skill scaffold
118
118
  - leniu-report-scenario: 报表/报表开发/报表查询/报表导出/合计行/totalLine/汇总报表/定制报表/report_order_info/金额处理/分转元/餐次/mealtime/ReportBaseTotalVO/CustomNumberConverter
119
+ - leniu-marketing-scenario: 营销/营销规则/消费规则/计价规则/充值规则/扣款规则/就餐规则/折扣/满减/限额/限次/补贴/赠送/满赠/管理费/MarketApi/RulePriceHandler/RuleRechargeHandler/RulePayHandler/MarketRule/规则定制
119
120
 
120
121
  ### 步骤 2 - 激活(逐个调用,等待每个完成)
121
122
 
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: chrome-cdp
3
+ description: 通过 Chrome DevTools Protocol 与本地 Chrome 浏览器交互(截图、导航、点击、执行JS等)
4
+ ---
5
+
6
+ # Chrome CDP
7
+
8
+ 轻量级 Chrome DevTools Protocol CLI 工具。通过 WebSocket 直接连接 Chrome 浏览器 —— 无需 Puppeteer,支持 100+ 标签页,即时连接。
9
+
10
+ ## 前置条件
11
+
12
+ - Chrome 已启用远程调试:打开 `chrome://inspect/#remote-debugging` 并开启开关
13
+ - Node.js 22+(使用内置 WebSocket)—— 通过 nvm 自动切换
14
+
15
+ ## 脚本路径
16
+
17
+ 所有命令通过包装脚本执行(自动切换 Node.js 23):
18
+
19
+ ```bash
20
+ CDP="/Users/xujiajun/Developer/ai-engineering-init/.claude/skills/chrome-cdp/scripts/run-cdp.sh"
21
+ ```
22
+
23
+ ## 命令速查
24
+
25
+ ### 列出打开的页面
26
+
27
+ ```bash
28
+ bash $CDP list
29
+ ```
30
+
31
+ ### 截图
32
+
33
+ ```bash
34
+ bash $CDP shot <target> [file] # 默认: /tmp/screenshot.png
35
+ ```
36
+
37
+ 截取**视口**。需要滚动后内容时先用 `eval` 滚动。输出包含 DPR 和坐标转换提示。
38
+
39
+ ### 可访问性树快照
40
+
41
+ ```bash
42
+ bash $CDP snap <target>
43
+ ```
44
+
45
+ ### 执行 JavaScript
46
+
47
+ ```bash
48
+ bash $CDP eval <target> <expr>
49
+ ```
50
+
51
+ > **注意:** 避免跨多次 `eval` 调用使用基于索引的选择器(`querySelectorAll(...)[i]`),因为 DOM 可能在调用间变化。应在一次 `eval` 中收集所有数据或使用稳定选择器。
52
+
53
+ ### 其他命令
54
+
55
+ ```bash
56
+ bash $CDP html <target> [selector] # 完整页面或元素 HTML
57
+ bash $CDP nav <target> <url> # 导航并等待加载
58
+ bash $CDP net <target> # 资源加载计时
59
+ bash $CDP click <target> <selector> # 通过 CSS 选择器点击元素
60
+ bash $CDP clickxy <target> <x> <y> # 在 CSS 像素坐标处点击
61
+ bash $CDP type <target> <text> # 在焦点元素处输入文本
62
+ bash $CDP loadall <target> <selector> [ms] # 点击"加载更多"直到消失
63
+ bash $CDP evalraw <target> <method> [json] # 原始 CDP 命令透传
64
+ bash $CDP stop [target] # 停止守护进程
65
+ ```
66
+
67
+ ## 坐标系统
68
+
69
+ `shot` 以原生分辨率保存图片:图片像素 = CSS 像素 x DPR。CDP 输入事件(`clickxy` 等)使用 **CSS 像素**。
70
+
71
+ ```
72
+ CSS px = 截图图片 px / DPR
73
+ ```
74
+
75
+ `shot` 会输出当前页面的 DPR。典型 Retina (DPR=2):截图坐标除以 2。
76
+
77
+ ## 使用技巧
78
+
79
+ - 优先使用 `snap --compact` 而非 `html` 来查看页面结构
80
+ - 使用 `type`(而非 eval)在跨域 iframe 中输入文本 —— 先用 `click`/`clickxy` 聚焦,再用 `type`
81
+ - Chrome 在首次访问标签页时显示"允许调试"弹窗。后台守护进程会保持会话,后续命令无需再次确认。守护进程在 20 分钟无活动后自动退出