Browse Source

docs: Phase 6 — PaaS platform services for JARVIS-level capabilities (P01-P08)

8 platform services that any Agent can consume via YAML config:
  P01: Memory Service (3-tier persistent memory)
  P02: Scheduler Service (persistent cron/interval)
  P03: Event Bus (file/system/git/agent events)
  P04: Notification Service (terminal/macOS/webhook/email/wechat)
  P05: Profile Service (auto user profiling)
  P06: Persona Engine (configurable personality)
  P07: Multimodal Gateway (STT/TTS/Vision)
  P08: Learning Service (adaptive strategy extraction)

Key insight: JARVIS capabilities are platform services, not agent code.
agent67 consumes them via `services.memory: enabled` in YAML.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kenny67nju 7 months ago
parent
commit
004d5b2ebf
1 changed files with 74 additions and 1 deletions
  1. 74 1
      ENGINEERING_GAP_ANALYSIS.md

+ 74 - 1
ENGINEERING_GAP_ANALYSIS.md

@@ -1792,6 +1792,78 @@ Phase 3 (P2): 竞争力提升                  [4-6 周]
 
 
 ---
 ---
 
 
+### Phase 6: PaaS 平台服务 — JARVIS 级能力
+
+> 将 JARVIS 的核心能力抽象为 PaaS 服务,任何 Agent 通过 YAML 配置即可消费。
+> Agent 不需要改代码,只需 `services.memory: enabled`。
+
+- [ ] **P01: Memory Service — 持久化记忆服务** [3d] ★★★★★
+  - PaaS API: `POST /api/v1/memory/{agent_id}/store`, `GET .../recall`, `DELETE .../forget`
+  - 三层记忆: Working (会话) + Episodic (近期摘要) + Semantic (永久知识)
+  - 存储: SQLite (dev) / Redis (prod)
+  - 每次会话结束自动提取关键信息存入 Semantic
+  - 每次会话开始自动召回相关记忆注入 system prompt
+  - Agent 侧工具: `MemoryStore`, `MemoryRecall`, `MemoryProfile`
+  - 依赖: 已有 MemoryBackend + RAG
+
+- [ ] **P02: Scheduler Service — 持久化调度服务** [2d] ★★★★
+  - PaaS API: `POST /api/v1/schedules`, `GET`, `DELETE`, `PATCH`
+  - 任务类型: cron 表达式 / interval / once / event-triggered
+  - 每个任务 = 一次 Agent 执行 (`agent_id` + `input` + `notify_channel`)
+  - 持久化: `~/.lambdagent/schedules.json` 或 DB
+  - 支持暂停/恢复/查看执行历史
+  - Agent 侧工具: `ScheduleCreate`, `ScheduleList`, `ScheduleDelete`
+  - 依赖: 无
+
+- [ ] **P03: Event Bus — 系统事件总线** [3d] ★★★★
+  - PaaS API: `POST /api/v1/events/subscribe`, `POST .../publish`
+  - 系统事件: file.created/modified, disk.low, battery.low, wifi.changed, app.launched
+  - Git 事件: push, conflict, merge
+  - Agent 事件: task.completed, task.failed
+  - Agent 可订阅事件并绑定自动动作
+  - 实现: watchdog (文件) + 平台轮询 (系统)
+  - 每个 Agent YAML 声明订阅: `events: [system.file.created:~/Desktop/*]`
+  - 依赖: Hook Layer 3
+
+- [ ] **P04: Notification Service — 多渠道通知** [2d] ★★★★
+  - PaaS API: `POST /api/v1/notify`
+  - 渠道: terminal (REPL banner) / macos (通知中心) / webhook / email / wechat
+  - 优先级: low / normal / high / urgent
+  - Agent 侧工具: `Notify(message, channel, priority)`
+  - 已有基础: app(notify) macOS 工具、wechat.py
+  - 依赖: 无
+
+- [ ] **P05: Profile Service — 用户画像自动构建** [1.5d] ★★★
+  - PaaS API: `GET /api/v1/profile`, `PUT`
+  - 自动收集: 常用命令、编程语言偏好、工作时间段、交互风格
+  - 每个 Agent 启动时自动注入 Profile 到 context
+  - 存储: `~/.lambdagent/user_profile.json` 或 DB
+  - 依赖: P01 (Memory Service)
+
+- [ ] **P06: Persona Engine — 可配置人格** [2d] ★★★
+  - YAML 配置: `persona.name`, `persona.style`, `persona.proactivity`, `persona.wake_word`
+  - 内置模板: JARVIS (正式) / lambda🐑 (活泼) / Friday (干练) / 自定义
+  - 编译时将 persona 转换为 system prompt 组件
+  - 支持情境切换(工作模式 vs 休闲模式)
+  - 依赖: P05 (Profile)
+
+- [ ] **P07: Multimodal Gateway — 多模态网关** [5d] ★★★
+  - PaaS API: `POST /api/v1/multimodal/stt`, `POST .../tts`, `POST .../vision`
+  - STT: whisper (本地) / 云端 ASR
+  - TTS: edge-tts / macOS say / 云端
+  - Vision: Claude Vision / GPT-4V / 本地 VLLM
+  - Agent 侧工具: `Listen`, `Speak`, `See`
+  - 依赖: 无 (独立服务)
+
+- [ ] **P08: Learning Service — 自适应学习** [2d] ★★
+  - PaaS API: `POST /api/v1/learning/feedback`, `GET .../strategies`
+  - 记录工具调用成功/失败模式
+  - 自动提取策略规则(如 "WriteFile 大文件用 Bash+python3")
+  - 下次遇到类似场景自动应用学到的策略
+  - 依赖: P01 (Memory), Hook Layer 3
+
+---
+
 ### TODO 统计
 ### TODO 统计
 
 
 | 类别 | 数量 | 已完成 | 预估总工作量 |
 | 类别 | 数量 | 已完成 | 预估总工作量 |
@@ -1801,7 +1873,8 @@ Phase 3 (P2): 竞争力提升                  [4-6 周]
 | 助手工具 Tier 1-3 (A01-A23) | 23 项 | 23 ✅ | ~40 人天 |
 | 助手工具 Tier 1-3 (A01-A23) | 23 项 | 23 ✅ | ~40 人天 |
 | 助手工具 Tier 4 (A24-A33) | 10 项 | 0 | ~20 人天 |
 | 助手工具 Tier 4 (A24-A33) | 10 项 | 0 | ~20 人天 |
 | 知识库 Tier 5 (A34-A38) | 5 项 | 5 ✅ | ~6 人天 |
 | 知识库 Tier 5 (A34-A38) | 5 项 | 5 ✅ | ~6 人天 |
-| **总计** | **94 项** | **66 ✅** | **~146 人天** |
+| PaaS 服务 Phase 6 (P01-P08) | 8 项 | 0 | ~20 人天 |
+| **总计** | **102 项** | **66 ✅** | **~166 人天** |
 
 
 ---
 ---