iter(g148): MCP 暴露组合配方检索

新增 list_recipes / get_recipe 两个工具,配方解析统一走 recipes.md。
顺带把误嵌在 renderAgentDocs 内部的 loadRecipes 提到顶层,
并给 verify 加配方结构校验:编号连续、代码骨架、要点、通用约定段。
This commit is contained in:
HIsheR
2026-10-26 15:48:21 +08:00
parent 38284ac425
commit 4a655d2dea
7 changed files with 90 additions and 18 deletions
+8
View File
@@ -1540,6 +1540,14 @@
"acceptance": "recipes.md 补配方 7-9(筛选栏、评论输入、详情页排版),只消费对外 API,随 npm run docs 进入 llms-full.txt;npm run check 全绿",
"notes": "自补:Agent 文档完善",
"status": "done"
},
{
"id": "g148",
"title": "MCP 暴露组合配方检索(list_recipes / get_recipe)",
"motivation": "recipes.md 已有 9 条跨组件配方,但只写在文档里:Agent 通过 MCP 只能查单组件参数,拿不到「怎么拼」,容易各自造轮子或漏掉约定。",
"acceptance": "ua mcp 新增 list_recipes(id/title/components)与 get_recipe(骨架代码 + 要点 + 用到的组件)两个工具;配方解析复用 recipes.md 单一来源;verify 增加配方结构校验(编号连续、每条有代码块与要点、有通用约定段);AGENTS/README/CLI 清单文档同步。",
"notes": "",
"status": "open"
}
]
}