Files
zclaw_openfang/docs/features/README.md
iven 9c781f5f2a
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
feat(pipeline): implement Pipeline DSL system for automated workflows
Add complete Pipeline DSL system including:
- Rust backend (zclaw-pipeline crate) with parser, executor, and state management
- Frontend components: PipelinesPanel, PipelineResultPreview, ClassroomPreviewer
- Pipeline recommender for Agent conversation integration
- 5 pipeline templates: education, marketing, legal, research, productivity
- Documentation for Pipeline DSL architecture

Pipeline DSL enables declarative workflow definitions with:
- YAML-based configuration
- Expression resolution (${inputs.topic}, ${steps.step1.output})
- LLM integration, parallel execution, file export
- Agent smart recommendations in conversations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 00:52:12 +08:00

243 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ZCLAW 功能全景文档
> **版本**: v0.3.0
> **更新日期**: 2026-03-25
> **项目状态**: 内部 Kernel 架构Streaming + MCP 协议Pipeline DSL 系统
> **架构**: Tauri 桌面应用Rust 后端 + React 前端
> 📋 **重要**: ZCLAW 现已采用内部 Kernel 架构,所有核心能力集成在 Tauri 桌面应用中,无需外部进程
---
## 一、文档索引
### 1.1 架构层 (Architecture)
| 文档 | 功能 | 成熟度 | 测试覆盖 |
|------|------|--------|---------|
| [01-communication-layer.md](00-architecture/01-communication-layer.md) | 通信层 | L4 | 高 |
| [02-state-management.md](00-architecture/02-state-management.md) | 状态管理 | L4 | 高 |
| [03-security-auth.md](00-architecture/03-security-auth.md) | 安全认证 | L4 | 高 |
### 1.2 核心功能 (Core Features)
| 文档 | 功能 | 成熟度 | 测试覆盖 |
|------|------|--------|---------|
| [00-chat-interface.md](01-core-features/00-chat-interface.md) | 聊天界面 | L4 | 高 |
| [01-agent-clones.md](01-core-features/01-agent-clones.md) | Agent 分身 | L4 | 高 |
| [02-hands-system.md](01-core-features/02-hands-system.md) | Hands 系统 | L3 | 中 |
| [03-workflow-engine.md](01-core-features/03-workflow-engine.md) | 工作流引擎 | L3 | 中 |
| [04-team-collaboration.md](01-core-features/04-team-collaboration.md) | 团队协作 | L3 | 中 |
| [05-swarm-coordination.md](01-core-features/05-swarm-coordination.md) | 多 Agent 协作 | L4 | 高 |
### 1.3 智能层 (Intelligence Layer) - ✅ 完全集成 (2026-03-24 更新)
| 文档 | 功能 | 成熟度 | UI 集成 | 后端状态 |
|------|------|--------|---------|----------|
| [00-agent-memory.md](02-intelligence-layer/00-agent-memory.md) | Agent 记忆 | L4 | ✅ RightPanel | ✅ Rust + SQLite |
| [01-identity-evolution.md](02-intelligence-layer/01-identity-evolution.md) | 身份演化 | L4 | ✅ IdentityChangeProposal | ✅ Rust 实现 |
| [02-context-compaction.md](02-intelligence-layer/02-context-compaction.md) | 上下文压缩 | L4 | ⚙️ 后端自动 | ✅ Rust 实现 |
| [03-reflection-engine.md](02-intelligence-layer/03-reflection-engine.md) | 自我反思 | L4 | ✅ RightPanel 'reflection' | ✅ Rust 实现 |
| [04-heartbeat-proactive.md](02-intelligence-layer/04-heartbeat-proactive.md) | 心跳巡检 | L4 | ✅ HeartbeatConfig | ✅ Rust 实现 |
| [05-autonomy-manager.md](02-intelligence-layer/05-autonomy-manager.md) | 自主授权 | L4 | ✅ RightPanel 'autonomy' | ✅ TypeScript |
> ✅ **智能层完全实现**: 所有 6 个核心组件均已实现,包括 Rust 后端 (Memory, Heartbeat, Reflection, Identity, Compaction) 和 TypeScript 实现 (Autonomy)
### 1.4 上下文数据库 (Context Database)
| 文档 | 功能 | 成熟度 | 测试覆盖 |
|------|------|--------|---------|
| [00-openviking-integration.md](03-context-database/00-openviking-integration.md) | OpenViking 集成 | L4 | 高 |
| [01-vector-memory.md](03-context-database/01-vector-memory.md) | 向量记忆 | L3 | 中 |
| [02-session-persistence.md](03-context-database/02-session-persistence.md) | 会话持久化 | L4 | 高 |
| [03-memory-extraction.md](03-context-database/03-memory-extraction.md) | 记忆提取 | L4 | 高 |
### 1.5 Skills 生态 - ✅ 动态扫描 + execute_skill 已实现
| 文档 | 功能 | 成熟度 | UI 集成 |
|------|------|--------|---------|
| [00-skill-system.md](04-skills-ecosystem/00-skill-system.md) | Skill 系统概述 | L4 | ✅ 通过 Tauri 命令 |
| [01-builtin-skills.md](04-skills-ecosystem/01-builtin-skills.md) | 内置技能 (**69个** SKILL.md) | L4 | N/A |
| [02-skill-discovery.md](04-skills-ecosystem/02-skill-discovery.md) | 技能发现 (动态扫描) | **L4** | ✅ **已集成** |
> ✅ **更新**: Skills 动态扫描已实现。Kernel 集成 `SkillRegistry`,通过 Tauri 命令 `skill_list` 和 `skill_refresh` 动态发现所有 **69 个**技能。**新增 `execute_skill` 工具**,允许 Agent 在对话中直接调用技能。
### 1.6 Hands 系统 - ✅ 9/11 已实现 (2026-03-24 更新)
| 文档 | 功能 | 成熟度 | 可用 Hands |
|------|------|--------|-----------|
| [00-hands-overview.md](05-hands-system/00-hands-overview.md) | Hands 概述 (11个) | L3 | **9/11 (82%)** |
> ✅ **更新**: 9 个 Hands 已有完整 Rust 后端实现:
> - ✅ **Browser** - Fantoccini WebDriver支持 Chrome/Firefox
> - ✅ **Slideshow** - 演示控制,支持 spotlight/laser/highlight
> - ✅ **Speech** - 语音合成,支持 SSML
> - ✅ **Quiz** - 问答生成,支持自适应学习
> - ✅ **Whiteboard** - 白板绘图,支持图表/LaTeX
> - ✅ **Researcher** - 深度研究,支持多源搜索
> - ✅ **Collector** - 数据采集,支持分页/选择器
> - ✅ **Clip** - 视频处理,需 FFmpeg
> - ✅ **Twitter** - Twitter 自动化,需 API Key
>
> ❌ **Predictor** 和 **Lead** 仍在规划中。
### 1.7 Tauri 后端
| 文档 | 功能 | 成熟度 | 测试覆盖 |
|------|------|--------|---------|
| [00-backend-integration.md](06-tauri-backend/00-backend-integration.md) | 后端集成 | L4 | 高 |
| [01-secure-storage.md](06-tauri-backend/01-secure-storage.md) | 安全存储 | L4 | 高 |
| [02-local-gateway.md](06-tauri-backend/02-local-gateway.md) | 本地 Gateway | L4 | 高 |
### 1.8 Pipeline DSL 系统 - ✅ 新增 (v0.3.0)
| 文档 | 功能 | 成熟度 | UI 集成 |
|------|------|--------|---------|
| [00-pipeline-overview.md](07-pipeline-dsl/00-pipeline-overview.md) | Pipeline 概述 | **L4** | ✅ PipelinesPanel |
> ✅ **新增**: Pipeline DSL 自动化工作流系统
> - **教育类**: 互动课堂生成器
> - **营销类**: 营销方案生成器
> - **法律类**: 合同智能审查
> - **研究类**: 文献综述生成器
> - **生产力类**: 智能会议纪要
>
> **特性**: YAML 声明式配置、状态管理、LLM 集成、Agent 智能推荐、结果预览组件
---
## 二、后续工作计划
> 📋 详细计划见 [roadmap.md](roadmap.md) | 🧠 头脑风暴见 [brainstorming-notes.md](brainstorming-notes.md)
### 2.1 短期计划 (1-2 周)
| ID | 任务 | 优先级 | 状态 |
|----|------|--------|------|
| S1 | 完善功能文档覆盖 | P0 | 进行中 |
| S2 | 添加用户反馈入口 | P0 | 待开始 |
| S3 | 优化记忆检索性能 | P0 | 待开始 |
| S4 | 优化审批 UI | P1 | 待开始 |
| S5 | 添加消息搜索功能 | P1 | 待开始 |
| S6 | 优化错误提示 | P1 | 待开始 |
### 2.2 中期计划 (1-2 月)
| ID | 任务 | 价值 | 风险 |
|----|------|------|------|
| M1 | 记忆图谱可视化 | 高 | 中 |
| M2 | 技能市场 MVP | 高 | 中 |
| M3 | 主动学习引擎 | 高 | 高 |
| M4 | 工作流编辑器 | 高 | 中 |
### 2.3 关键决策待定
1. **目标用户定位**: 个人 vs 团队 vs 企业?
2. **记忆存储策略**: 纯本地 vs 可选云同步?
3. **开源策略**: 完全开源 vs 核心闭源?
4. **定价策略**: 免费 vs 付费 vs 混合?
---
## 三、功能优先级矩阵 (ICE 评分)
| 功能 | Impact | Confidence | Ease | ICE 分 | 状态 |
|------|--------|------------|------|--------|------|
| Agent 记忆 | 10 | 9 | 7 | 630 | 已完成 |
| 身份演化 | 8 | 9 | 9 | 648 | 已完成 |
| 上下文压缩 | 9 | 8 | 6 | 432 | 已完成 |
| 心跳巡检 | 9 | 8 | 6 | 432 | 已完成 |
| 多 Agent 协作 | 9 | 6 | 4 | 216 | 已完成 |
| 自主授权 | 8 | 7 | 5 | 280 | 已完成 |
| 向量记忆 | 9 | 7 | 5 | 315 | 已完成 |
| 会话持久化 | 7 | 9 | 8 | 504 | 已完成 |
**评分说明**:
- **Impact (影响)**: 10 = 决定性功能1 = 边缘功能
- **Confidence (信心)**: 10 = 完全确定1 = 高度不确定
- **Ease (容易度)**: 10 = 极易实现1 = 极难实现
- **ICE 分** = Impact × Confidence × Ease
---
## 三、成熟度等级定义
| 等级 | 名称 | 描述 |
|------|------|------|
| L0 | 概念 | 有设计想法,未实现 |
| L1 | 原型 | 基本可用,有已知问题 |
| L2 | 可用 | 功能完整,有测试 |
| L3 | 成熟 | 稳定可靠,有文档 |
| L4 | 生产 | 经过验证,可扩展 |
---
## 四、模块依赖关系
```
┌─────────────────────────────────────────────────────────────┐
│ UI 组件层 │
│ ChatArea │ SwarmDashboard │ RightPanel │ Settings │
└─────────────────────────────┬───────────────────────────────┘
┌─────────────────────────────▼───────────────────────────────┐
│ 状态管理层 │
│ chatStore │ connectionStore │ handStore │ configStore │
└─────────────────────────────┬───────────────────────────────┘
┌─────────────────────────────▼───────────────────────────────┐
│ 智能层 │
│ AgentMemory │ ReflectionEngine │ AutonomyManager │
└─────────────────────────────┬───────────────────────────────┘
┌─────────────────────────────▼───────────────────────────────┐
│ 通信层 │
│ GatewayClient │ VikingClient │ TauriGateway │
└─────────────────────────────┬───────────────────────────────┘
┌─────────────────────────────▼───────────────────────────────┐
│ 后端层 │
│ OpenFang Kernel │ OpenViking Server │ Tauri Backend │
└─────────────────────────────────────────────────────────────┘
```
---
## 五、关键指标
| 指标 | 数值 |
|------|------|
| 功能模块总数 | 25+ |
| SKILL.md 文件 | **69** |
| 动态发现技能 | 69 (100%) |
| Hands 总数 | 11 |
| **已实现 Hands** | **9 (82%)** |
| **Kernel 注册 Hands** | **9/9 (100%)** |
| **Pipeline 模板** | **5** (教育/营销/法律/研究/生产力) |
| **Pipeline 分类** | **5** 类 |
| Zustand Store | 15+ |
| Tauri 命令 | 100+ |
| 代码行数 (前端) | ~25,000 |
| 代码行数 (后端 Rust) | ~12,000 |
| LLM Provider 支持 | **8** (Kimi, Qwen, DeepSeek, Zhipu, OpenAI, Anthropic, Gemini, Local/Ollama) |
| 智能层组件 | 5 (Memory, Heartbeat, Reflection, Identity, Compaction) |
| MCP 协议 | ✅ 已实现 |
| execute_skill 工具 | ✅ 已实现 |
| **Pipeline DSL** | ✅ **新增** |
---
## 六、变更历史
| 日期 | 版本 | 变更内容 |
|------|------|---------|
| 2026-03-25 | v0.3.0 | **Pipeline DSL 系统实现**5 类 Pipeline 模板Agent 智能推荐,结果预览组件 |
| 2026-03-24 | v0.2.5 | **execute_skill 工具实现**,智能层完全实现验证,技能数更新为 69 |
| 2026-03-24 | v0.2.4 | Hands Review: 修复 BrowserHand Kernel 注册问题,所有 9 个已实现 Hands 均可访问 |
| 2026-03-24 | v0.2.3 | Hands 后端集成: 9/11 Hands 可用 (新增 Clip, Twitter) |
| 2026-03-24 | v0.2.2 | Hands 后端集成: 7/11 Hands 可用 (新增 Researcher, Collector) |
| 2026-03-24 | v0.2.1 | Hands 后端集成: 5/11 Hands 可用 (Browser, Slideshow, Speech, Quiz, Whiteboard) |
| 2026-03-24 | v0.2.0 | 更新为内部 Kernel 架构Streaming + MCP 协议,修正 Skills/Hands 数量 |
| 2026-03-17 | v1.1 | 智能层集成状态更新 |
| 2026-03-16 | v1.0 | 初始版本,完成全部功能文档 |