@agile-team/wl-skills-kit 1.1.1 → 1.1.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.2] - 2026-04-09
4
+
5
+ ### 新增:Skills 自动调度注册表
6
+
7
+ - `copilot-instructions.md` 末尾新增 **Skills 自动调度** 章节,包含:
8
+ - Skill 注册表(触发关键词 → 必须读取的 SKILL.md 文件映射)
9
+ - 完整流水线(prototype-scan → api-contract → page-codegen → menu-sync)
10
+ - 单独使用模式(只触发单个 Skill)
11
+ - 组件文档按需查阅表 + 领域样例参考表
12
+ - 所有编辑器配置文件(8 个)均继承此注册表,实现 **全编辑器 Skill 自动调度**
13
+ - README 更新:Skill 识别列从 "⚠️ 需手动引用" → "✅ 通过注册表自动 read_file"
14
+
3
15
  ## [1.1.1] - 2026-04-09
4
16
 
5
17
  ### 修复
package/README.md CHANGED
@@ -212,44 +212,29 @@ npx @agile-team/wl-skills-kit
212
212
 
213
213
  ### 各工具配置一览
214
214
 
215
- | AI 工具 | 配置文件路径 | 规范加载 | Skill 识别 | 备注 |
216
- |---------|-------------|---------|-----------|------|
217
- | **GitHub Copilot** (VS Code) | `.github/copilot-instructions.md` | ✅ 自动 | ✅ 自动识别 `.github/skills/*/SKILL.md` | **主力工具,体验最完整** |
218
- | **Cursor** | `.cursorrules` + `.cursor/rules/conventions.mdc` | ✅ 自动 | ⚠️ 需手动 `@file` 引用 SKILL.md | `.mdc` 带 `alwaysApply: true` 前缀 |
219
- | **Windsurf (Cascade)** | `.windsurfrules` | ✅ 自动 | ⚠️ 需手动 `@context` 引用 SKILL.md | Windsurf 不支持 skill 目录扫描 |
220
- | **Kiro** | `.kiro/steering/conventions.md` | ✅ 自动 | ⚠️ 需手动引用 | steering/ 下的 md 自动加载 |
221
- | **Trae** | `.trae/rules/conventions.md` | ✅ 自动 | ⚠️ 需手动引用 | rules/ 下的 md 自动加载 |
222
- | **Claude Code / CLI** | `CLAUDE.md` | ✅ 自动 | ⚠️ `@import` 或手动引用 | 支持 `@import` 语法 |
223
- | **Roo Code / Cline** | `.clinerules` | ✅ 自动 | ⚠️ 需手动引用 | 支持 tool_use 读文件 |
224
- | **AGENTS.md 兼容** | `AGENTS.md` | ✅ 自动 | ⚠️ 需手动引用 | Linux Foundation 通用标准,兜底 |
225
-
226
- ### 各工具使用姿势差异
227
-
228
- **GitHub Copilot**(VS Code)— 开箱即用,无需额外配置:
229
- - 规范 → 自动加载 `.github/copilot-instructions.md`
230
- - Skill → 自动识别 `.github/skills/*/SKILL.md`,对话中说"帮我生成页面"即触发
231
- - docs/demo AI 可通过 `@workspace` 自动搜索
232
-
233
- **Cursor**规范自动加载,Skill 需手动引用:
234
- - 规范 → `.cursorrules` 和 `.cursor/rules/*.mdc` 自动加载
235
- - Skill 对话中用 `@file .github/skills/page-codegen/SKILL.md` 手动引入
236
- - 或在 `.cursor/rules/` 下新建 `.mdc` 文件 include SKILL 内容
237
-
238
- **Windsurf** — 规范自动加载,Skill 需 `@context`:
239
- - 规范 → `.windsurfrules` 自动加载
240
- - Skill → 对话中用 `@context` 添加 SKILL.md 文件
241
- - Windsurf Cascade 可读取项目文件,但不主动扫描 `.github/skills/`
242
-
243
- **Claude Code / CLI** — 规范自动加载,Skill 推荐 `@import`:
244
- - 规范 → `CLAUDE.md` 自动加载
245
- - Skill → 在 `CLAUDE.md` 末尾追加 `@import .github/skills/page-codegen/SKILL.md`
246
- - 或对话中 `/read .github/skills/page-codegen/SKILL.md`
247
-
248
- **Kiro / Trae / Roo(Cline)** — 规范自动加载,Skill 需对话中引用:
249
- - 规范 → 各自的 steering/rules/.clinerules 默认加载
250
- - Skill → 需要在对话中让 AI 读取对应 SKILL.md
251
-
252
- > **总结**:所有工具的**编码规范**均自动加载(零配置)。差异仅在 **Skill 触发方式**上 — 只有 GitHub Copilot 完全自动识别 Skill,其他工具需在对话中手动引用 SKILL.md 文件。
215
+ | AI 工具 | 配置文件路径 | 规范加载 | Skill 自动调度 | 备注 |
216
+ |---------|-------------|---------|---------------|------|
217
+ | **GitHub Copilot** (VS Code) | `.github/copilot-instructions.md` | ✅ 自动 | ✅ 原生 Skill 识别 + 注册表双保险 | **主力工具,体验最完整** |
218
+ | **Cursor** | `.cursorrules` + `.cursor/rules/conventions.mdc` | ✅ 自动 | 通过注册表自动 `read_file` | `.mdc` 带 `alwaysApply: true` 前缀 |
219
+ | **Windsurf (Cascade)** | `.windsurfrules` | ✅ 自动 | 通过注册表自动 `read_file` | 规范内嵌调度指令 |
220
+ | **Kiro** | `.kiro/steering/conventions.md` | ✅ 自动 | 通过注册表自动 `read_file` | steering/ 下的 md 自动加载 |
221
+ | **Trae** | `.trae/rules/conventions.md` | ✅ 自动 | 通过注册表自动 `read_file` | rules/ 下的 md 自动加载 |
222
+ | **Claude Code / CLI** | `CLAUDE.md` | ✅ 自动 | 通过注册表自动 `read_file` | 也支持 `@import` 语法 |
223
+ | **Roo Code / Cline** | `.clinerules` | ✅ 自动 | 通过注册表自动 `read_file` | 支持 tool_use 读文件 |
224
+ | **AGENTS.md 兼容** | `AGENTS.md` | ✅ 自动 | 通过注册表自动 `read_file` | Linux Foundation 通用标准,兜底 |
225
+
226
+ ### Skill 自动调度机制(v1.1.2+)
227
+
228
+ 所有编辑器配置文件均由 `copilot-instructions.md` 生成,其中内嵌了 **Skills 自动调度注册表**。
229
+ 该注册表以强制指令形式告知 AI:
230
+
231
+ 1. **触发关键词匹配** 用户说"生成页面"/"扫描原型"/"接口约定"等关键词时,AI 必须先 `read_file` 对应的 `SKILL.md`
232
+ 2. **完整流水线** — 用户提供原型/详设并要求批量生成时,按 prototype-scan → api-contract → page-codegen → menu-sync 顺序依次执行
233
+ 3. **单独使用** 用户只说"帮我生成客户档案页面"时,只读取 page-codegen 的 SKILL.md,不必跑完整流水线
234
+
235
+ 这意味着 **所有支持 `read_file` / tool_use AI 工具都能自动调度 Skill**,无需手动引用。
236
+
237
+ > **总结**:v1.1.2 起,**编码规范 + Skill 调度** 均为全编辑器自动加载(零配置)。各工具唯一的区别仅在于原生 Skill 识别(Copilot 独有) vs 注册表驱动的 `read_file` 调度(通用)。
253
238
 
254
239
  ---
255
240
 
@@ -198,14 +198,59 @@ onMounted(() => select());
198
198
  - ❌ 手写查询表单/工具栏/分页(用 BaseQuery/BaseToolbar/jh-pagination)
199
199
  - ❌ 每个页面重复写弹窗组件(优先用 `c_modal` 等局部公共组件)
200
200
 
201
- ## Axure Vue 生成流程
201
+ ## AI Skills 自动调度(强制执行 — 所有 AI 编辑器/模型通用)
202
202
 
203
- 详见 `.github/skills/` 下的 5 个 Skill
203
+ 本项目内置 5 个 Skill 文件,覆盖「原型/详设 → 可运行页面 → 菜单注册」完整流程。
204
+ **执行以下任何任务前,必须先用工具读取(read_file)对应的 SKILL.md,读取完成前禁止生成任何代码或输出。**
204
205
 
205
- 1. **prototype-scan** — 解析 Axure HTML → 页面清单
206
- 2. **convention-extract** — 项目规范提炼(已固化,新项目时使用)
207
- 3. **api-contract** — 页面清单 → api.md 接口约定
208
- 4. **page-codegen** — 生成 index.vue + data.ts + index.scss + api.md
209
- 5. **menu-sync** — 将 pages.ts 页面同步到后端菜单表(Phase 1:AI 调 `/system/menu/save`;Phase 2:`pnpm run menu:push`)
206
+ ### Skill 注册表
210
207
 
211
- > 完整使用步骤及精度技巧见 `.github/docs/use-skill.md`
208
+ | 触发场景(用户意图关键词) | 必须读取的文件 | Skill 名称 |
209
+ |---|---|---|
210
+ | 扫描原型、解析原型、页面清单、原型分析、详设文档 | `.github/skills/prototype-scan/SKILL.md` | prototype-scan |
211
+ | 接口约定、api.md、字段定义、前后端对齐、接口设计 | `.github/skills/api-contract/SKILL.md` | api-contract |
212
+ | 生成页面、创建页面、代码生成、vue页面、按原型生成 | `.github/skills/page-codegen/SKILL.md`(主文件会指示继续读取对应的 `TPL-*.md` 模板) | page-codegen |
213
+ | 创建菜单、注册菜单、同步菜单、补菜单 | `.github/skills/menu-sync/SKILL.md` | menu-sync |
214
+ | 提炼规范、项目规范、编码规范扫描 | `.github/skills/convention-extract/SKILL.md` | convention-extract |
215
+
216
+ ### 完整流水线(原型/详设 → 页面 → 菜单)
217
+
218
+ 当用户提供原型文件或详设文档并要求批量生成页面时,按以下顺序依次执行:
219
+
220
+ ```
221
+ Step 1 → 读取 prototype-scan/SKILL.md → 执行原型扫描 → 输出 page-spec
222
+ Step 2 → 读取 api-contract/SKILL.md → 生成 api.md 接口约定
223
+ Step 3 → 读取 page-codegen/SKILL.md → 逐页生成代码(每页读取对应 TPL-*.md)
224
+ Step 4 → 读取 menu-sync/SKILL.md → 注册菜单到后端
225
+ ```
226
+
227
+ 每个 Step 开始前读取对应 SKILL.md,**前一个 Step 完成后再进入下一个**。
228
+ 上一步的输出(如 page-spec)直接作为下一步的输入,无需用户中间干预。
229
+
230
+ ### 单独使用
231
+
232
+ 用户也可以只执行单个 Skill(如只说"帮我生成客户档案页面"),此时只需读取对应的 SKILL.md,不必执行完整流水线。
233
+
234
+ ### 组件文档按需查阅
235
+
236
+ 生成代码过程中如需了解组件用法,读取 `docs/` 下对应文档:
237
+
238
+ | 组件 | 文档路径 |
239
+ |------|---------|
240
+ | BaseQuery / BaseTable / BaseToolbar | `src/components/remote/BaseQuery/README.md` 等 |
241
+ | jh-select / jh-date / jh-pagination 等 | `docs/jh-select.md` / `docs/jh-date.md` 等 |
242
+ | c_formModal / c_formSections / c_listModal | `src/components/local/c_formModal/README.md` 等 |
243
+ | AbstractPageQueryHook 最佳实践 | `docs/page-query-hook-best-practices.md` |
244
+ | HTTP 请求工具 | `docs/request.md` |
245
+
246
+ ### 领域样例参考
247
+
248
+ 首次生成某类页面时,可读取 `demo/` 下的对应样例学习实际写法:
249
+
250
+ | 模板类型 | 样例路径 |
251
+ |---------|---------|
252
+ | LIST(标准列表) | `demo/produce/aiflow/mmwr-customer-archive/` |
253
+ | FORM_ROUTE(复杂表单) | `demo/produce/aiflow/mmwr-customer-apply-add-form/` |
254
+ | CHANGE_HISTORY(变更历史) | `demo/produce/aiflow/mmwr-customer-apply-change-history/` |
255
+ | DETAIL_TABS(详情Tab) | `demo/produce/aiflow/mmwr-customer-detail/` |
256
+ | MASTER_DETAIL(上下分栏) | `demo/sale/demo/metallurgical-spec/` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agile-team/wl-skills-kit",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "AI Skill 模板包 — 一键导入 AI 指令 + 组件文档 + 通用组件 + 领域样例,覆盖 Copilot/Cursor/Windsurf/Kiro 等主流 AI 编辑器",
5
5
  "bin": {
6
6
  "wl-skills-kit": "./bin/wl-skills.js"