autosnippet 2.19.8 → 3.0.1

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/README.md CHANGED
@@ -115,7 +115,7 @@ Bootstrap 引擎自动完成:SPM Target 发现 → 文件收集 → AST 结构
115
115
  你:「分析 UIComponents Target 的自定义控件实现」
116
116
  ```
117
117
 
118
- Cursor 调用 `get_targets` → `get_target_files` → 逐文件 AI 分析 → `submit_knowledge_batch`,将发现的代码模式作为 Candidate 提交到知识库。你可以逐个 Target 推进,每个 Target 的扫描结果会独立进入审核队列。
118
+ Cursor 调用 `structure({ operation: "targets" })` → `structure({ operation: "files" })` → 逐文件 AI 分析 → `submit_knowledge_batch`,将发现的代码模式作为 Candidate 提交到知识库。你可以逐个 Target 推进,每个 Target 的扫描结果会独立进入审核队列。
119
119
 
120
120
  **④ 审核发布——人工把关质量**
121
121
 
@@ -135,7 +135,7 @@ Recipe 发布后,Cursor 立即可以通过三种通道获取知识:
135
135
 
136
136
  | 通道 | 机制 | 时效 |
137
137
  |------|------|------|
138
- | **MCP 工具检索** | Cursor 通过 `autosnippet_search` 等 38 个工具实时查询知识库 | 实时 |
138
+ | **MCP 工具检索** | Cursor 通过 `autosnippet_search` 等 16 个工具实时查询知识库 | 实时 |
139
139
  | **Cursor Rules** | `asd upgrade` 将 Recipe 导出为 `.cursor/rules/autosnippet-*.mdc` 文件 | 手动触发 |
140
140
  | **Agent Skills** | 13 个 Skill 文档引导 Cursor 在正确场景自动调用知识库 | 常驻 |
141
141
 
@@ -192,9 +192,9 @@ Guard 规则也在同步工作——如果生成的代码违反了知识库中
192
192
 
193
193
  AutoSnippet 为 Cursor 提供完整的 MCP + Skills 集成:
194
194
 
195
- - **38 个 MCP 工具**:搜索(4 种模式)、Guard 检查、候选提交 / 校验 / 查重、知识图谱查询、Bootstrap 冷启动、Skills 管理、知识生命周期等
195
+ - **16 个 MCP 工具**(12 agent + 4 admin):search / knowledge / structure / graph / guard / bootstrap / skill 等参数化统合入口,覆盖搜索、审查、候选管理、冷启动等场景
196
196
  - **13 个 Agent Skills**:`autosnippet-candidates`、`autosnippet-guard`、`autosnippet-coldstart`、`autosnippet-intent` 等,引导 AI 正确使用工具
197
- - **写操作 Gateway 保护**:11 个写操作经过权限 / 宪法 / 审计三重检查
197
+ - **写操作 Gateway 保护**:写操作经过权限 / 宪法 / 审计三重检查
198
198
 
199
199
  ```bash
200
200
  asd install:cursor-skill --mcp # 安装 Skills + MCP 配置
@@ -252,21 +252,29 @@ asd install:vscode-copilot # 配置 MCP 和 Copilot 指令
252
252
 
253
253
  ## MCP 工具一览
254
254
 
255
- 39 个 MCP 工具按功能分组(省略了 **autosnippet_** 前缀):
255
+ 16 个 MCP 工具按功能分组(省略了 **autosnippet_** 前缀):
256
256
 
257
- | 分类 | 工具 |
258
- |------|------|
259
- | **系统** | `health`、`capabilities` |
260
- | **搜索** | `search`(统合入口)、`context_search`(4 层漏斗)、`keyword_search`、`semantic_search` |
261
- | **Recipe 浏览** | `list_recipes`、`get_recipe`、`list_rules`、`patterns`、`list_facts`、`recipe_insights`、`confirm_usage` |
262
- | **候选管理** | `validate_candidate`、`check_duplicate`、`submit_knowledge`、`submit_knowledge_batch`、`enrich_candidates` |
263
- | **开发文档** | `save_document` |
264
- | **知识图谱** | `graph_query`、`graph_impact`、`graph_path`、`graph_stats` |
265
- | **项目结构** | `get_targets`、`get_target_files`、`get_target_metadata` |
266
- | **Guard** | `guard_check`、`guard_audit_files`、`scan_project` |
267
- | **冷启动** | `bootstrap_knowledge`、`bootstrap_refine` |
268
- | **Skills** | `list_skills`、`load_skill`、`create_skill`、`delete_skill`、`update_skill`、`suggest_skills` |
269
- | **知识管理** | `knowledge_lifecycle`、`compliance_report` |
257
+ **Agent 层(12 个)**——默认对外暴露:
258
+
259
+ | 分类 | 工具 | 说明 |
260
+ |------|------|------|
261
+ | **系统** | `health` | 服务健康检查 |
262
+ | **系统** | `capabilities` | 服务能力清单(Agent 自发现) |
263
+ | **搜索** | `search` | 统合入口,`mode` 参数路由 auto / keyword / semantic / context 四种模式 |
264
+ | **知识浏览** | `knowledge` | `operation` 参数路由 list / get / insights / confirm_usage |
265
+ | **项目结构** | `structure` | `operation` 参数路由 targets / files / metadata |
266
+ | **知识图谱** | `graph` | `operation` 参数路由 query / impact / path / stats |
267
+ | **Guard** | `guard` | `code` 参数审查单文件代码,`files` 参数批量审查文件 |
268
+ | **知识提交** | `submit_knowledge` / `submit_knowledge_batch` / `save_document` | 提交候选 / 批量提交 / 保存开发文档 |
269
+ | **Skill 管理** | `skill` | `operation` 参数路由 list / load / create / update / delete / suggest |
270
+ | **冷启动** | `bootstrap` | `operation` 参数路由 knowledge / refine / scan |
271
+
272
+ **Admin 层(4 个)**——需设置 `ASD_MCP_TIER=admin`:
273
+
274
+ | 分类 | 工具 | 说明 |
275
+ |------|------|------|
276
+ | **候选管理** | `enrich_candidates` / `validate_candidate` / `check_duplicate` | AI 润色 / 校验 / 查重 |
277
+ | **知识管理** | `knowledge_lifecycle` | 批量生命周期操作 |
270
278
 
271
279
  ## 配置
272
280