docs: add self-evolution documentation and fix SOUL.md persistence
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
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
- Create 01-identity-evolution.md: Identity system architecture (SOUL.md, USER.md, change proposals, version management) - Create 04-heartbeat-engine.md: Proactive behavior system (heartbeat config, alerts, proactivity levels) - Create 06-context-compaction.md: Context compression system (token management, summarization, information retention) - Update ZCLAW_AGENT_INTELLIGENCE_EVOLUTION.md: Add Phase 5 self-evolution UX roadmap - Fix AgentOnboardingWizard: Persist SOUL.md and USER.md after agent creation - Fix llm-service: Add Tauri kernel mode detection for memory system LLM calls - Fix kernel: Kernel config takes priority over agent's persisted model Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# ZCLAW Agent 智能演化深度分析与实施方案
|
||||
|
||||
> **文档日期**:2026-03-15
|
||||
> **定位**:`ZCLAW_NEXT_EVOLUTION_STRATEGY.md` 的**专题补充文档**,聚焦 Agent 智能层的深度差距分析与演化路径
|
||||
> **文档日期**:2026-03-24
|
||||
> **定位**:`ZCLAW_NEXT_EVOLUTION_STRATEGY.md` 的**专题补充文档**,聚焦 Agent 智能层的深度差距分析与演化路径
|
||||
> **核心问题**:ZCLAW 当前的 Agent 只是"解决问题的帮手",而 OpenClaw 的 Agent 是"可持续成长的助手"——如何弥合这一差距?
|
||||
>
|
||||
> **后续升级路径**:[`ZCLAW_OPENVIKING_INTEGRATION_PLAN.md`](./ZCLAW_OPENVIKING_INTEGRATION_PLAN.md) 中规划了基于 **OpenViking**(火山引擎开源 AI 智能体上下文数据库)的升级方案,作为本文档 Phase 1 自建记忆系统的**后续增强**选项。当前优先按本文档方案实施。
|
||||
|
||||
### 📊 实施进度(2026-03-15 更新)
|
||||
### 📊 实施进度(2026-03-24 更新)
|
||||
|
||||
| Phase | 状态 | 交付物 | 测试覆盖 |
|
||||
|-------|------|--------|---------|
|
||||
@@ -14,8 +14,18 @@
|
||||
| **Phase 2: 上下文压缩** | ✅ 已完成 | `context-compactor.ts` + chatStore 集成 | 23 tests |
|
||||
| **Phase 3: 主动智能 + 自我反思** | ✅ 已完成 | `heartbeat-engine.ts`, `reflection-engine.ts` | 28 tests |
|
||||
| **Phase 4: 多 Agent 协作 + 技能生态** | ✅ 已完成 | `agent-swarm.ts`, `skill-discovery.ts` + chatStore 集成 | 43 tests |
|
||||
| **Phase 5: 自我进化 UX** | 🚧 进行中 | 人格变更审批 UI、演化历史、反思→人格连接 | — |
|
||||
| **全量测试** | ✅ 317 passing | 13 test files | — |
|
||||
|
||||
### 📚 详细文档索引
|
||||
|
||||
| 文档 | 内容 |
|
||||
|------|------|
|
||||
| [01-identity-evolution.md](./features/02-intelligence-layer/01-identity-evolution.md) | 身份演化系统(SOUL.md、变更提案、版本管理) |
|
||||
| [03-reflection-engine.md](./features/02-intelligence-layer/03-reflection-engine.md) | 反思引擎(行为分析、改进建议、人格提案) |
|
||||
| [04-heartbeat-engine.md](./features/02-intelligence-layer/04-heartbeat-engine.md) | 心跳巡检(主动巡检、智能提醒、自主触发) |
|
||||
| [06-context-compaction.md](./features/02-intelligence-layer/06-context-compaction.md) | 上下文压缩(Token 管理、智能摘要、信息保留) |
|
||||
|
||||
---
|
||||
|
||||
## 一、问题诊断:为什么 ZCLAW 的 Agent "不够聪明"
|
||||
@@ -980,6 +990,69 @@ interface SkillDiscovery {
|
||||
|
||||
---
|
||||
|
||||
### 6.6 Phase 5:自我进化 UX 闭环(进行中)
|
||||
|
||||
**目标**:让用户真正感受到 Agent 的"成长性",连接反思→人格变更→用户审批的完整闭环
|
||||
|
||||
#### 6.6.1 核心问题
|
||||
|
||||
Phase 1-4 完成了底层能力,但用户体验存在断层:
|
||||
|
||||
| 问题 | 现状 | 目标 |
|
||||
|------|------|------|
|
||||
| 人格选择不持久 | `generateSoulContent()` 只返回字符串 | SOUL.md 写入文件系统 |
|
||||
| 反思不触发变更 | 反思结果只生成建议 | 自动生成人格变更提案 |
|
||||
| 用户无法审批 | 无变更提案 UI | 展示差异,支持接受/拒绝 |
|
||||
| 无演化历史 | 无版本管理 | 时间线 + 回滚能力 |
|
||||
|
||||
#### 6.6.2 自我进化流程
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Self-Evolution Flow │
|
||||
├─────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌──────────┐ ┌───────────┐ ┌──────────────────┐ │
|
||||
│ │ 对话历史 │───▶│ 反思引擎 │───▶│ 人格变更提案 │ │
|
||||
│ │ │ │ │ │ (SOUL.md delta) │ │
|
||||
│ └──────────┘ └───────────┘ └────────┬─────────┘ │
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ ┌──────────┐ ┌───────────┐ ┌──────────────────┐ │
|
||||
│ │ 更新后的 │◀───│ 用户审批 │◀───│ 审批 UI │ │
|
||||
│ │ SOUL.md │ │ │ │ (变更对比) │ │
|
||||
│ └──────────┘ └───────────┘ └──────────────────┘ │
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ ┌──────────────────────────────────────────────────┐ │
|
||||
│ │ 演化历史 │ │
|
||||
│ │ - 时间戳快照 │ │
|
||||
│ │ - 差异可视化 │ │
|
||||
│ │ - 回滚能力 │ │
|
||||
│ └──────────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
#### 6.6.3 实现计划
|
||||
|
||||
| 优先级 | 任务 | 状态 | 说明 |
|
||||
|--------|------|------|------|
|
||||
| P0.1 | SOUL.md 持久化到 Onboarding | ✅ 完成 | AgentOnboardingWizard 调用 identity.updateFile() |
|
||||
| P0.2 | 智能层文档更新 | ✅ 完成 | 身份演化、心跳、上下文压缩文档 |
|
||||
| P1.1 | 人格变更提案 UI | 📋 待实现 | IdentityChangeProposal.tsx |
|
||||
| P1.2 | 反思→人格连接 | 📋 待实现 | 反思引擎自动生成提案 |
|
||||
| P1.3 | 演化历史回滚 | 📋 待实现 | PersonalityVersionControl.tsx |
|
||||
|
||||
#### 6.6.4 预期用户体验
|
||||
|
||||
1. **创建 Agent 时**:向导选择人格 → 自动生成并持久化 SOUL.md
|
||||
2. **使用过程中**:Agent 反思对话 → 发现"用户偏好简洁回复" → 生成 SOUL.md 变更提案
|
||||
3. **审批时**:用户看到 diff 视图 → 点击"接受"或"拒绝"
|
||||
4. **回溯时**:查看演化历史时间线 → 选择历史版本 → 一键回滚
|
||||
|
||||
---
|
||||
|
||||
## 七、与架构层演化方案的整合
|
||||
|
||||
本文档的 Agent 智能演化与 `ZCLAW_NEXT_EVOLUTION_STRATEGY.md` 中的架构演化是**互补关系**:
|
||||
|
||||
Reference in New Issue
Block a user