diff --git a/docs/assets/images/prompt-strategy-mcp-server-prototype-architecture.svg b/docs/assets/images/prompt-strategy-mcp-server-prototype-architecture.svg new file mode 100644 index 0000000..c93ab28 --- /dev/null +++ b/docs/assets/images/prompt-strategy-mcp-server-prototype-architecture.svg @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + + + + + FIG-01 + 提示词策略 MCP Server 系统组件工作流架构图 + 架构图 > MVP Sprint1 & 系统组件工作流 + + + + + + + + + + + + 📦 Node.js MCP Server Runtime (Express.js) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTTP Request + Enquiry + Enhanced + Prompt + Context + Data + API Call + Response + Fetch / Sync + + + + + + + + + + + Client Request + + + - /api/prompts/query + - /api/model/infer + - /api/resources/list + + Format: JSON-RPC 2.0 + + + + + + + + .env & config.js + API Keys & Configuration + + + + + + + + app.js + Main Gateway + + + + + + + + apiRoutes.js + API Router Node + + Express Router() + + + + + + + + promptsController.js + 查询与提示词请求分发 + + + + + + + + modelController.js + 多步推理请求分发 + + + + + + + + resourcesController.js + 资源获取与管理分发 + + + + + + + + promptService.js + + 核心: 5 Whys 模板分解引擎 + 输出: 增强合成提示词 + + + + + + + + inferenceService.js + 大语言模型交互管理 + 上下文注入与结果格式化 + + + + + + + + resourceService.js + 管理学术DB、PDF等 + 提供推理上下文数据 + + + + + + LLM API + (Model) + + + + + + + + + 资源与知识库 (Resources) + 学术DB / PDF / Obsidian + + + + + + + + + + 1 + + + + + + 2 + + + + + + 3 + + + + + + 4 + + + + + + 5 + + + + + + 6 + + + + + + MVP 核心执行步骤流 + + + + + + 1 + 接收初始查询与资源请求 + + + + 2 + 5 Whys 深度模板分解 + + + + 3 + 提取外部资源与本地知识 + + + + 4 + 注入上下文生成合成提示词 + + + + 5 + 发起大模型多步推理 + + + + 6 + 组装并返回深度研究结果 + + + + + + + + + + + 组件与语义对照: + + + + 基础架构与路由网关 + + + + + 请求分发与控制器 + + + + + 核心策略与业务逻辑 + + + + + 远端第三方 AI 与资源 + + + + + + + 本作品采用 CC-BY-SA 4.0 进行许可,© 2025-2026 Gitconomy Research社区 + + +