auto-sync: 2026-05-15 13:39:31

This commit is contained in:
cfdaily
2026-05-15 13:39:31 +08:00
parent 60d3f199dc
commit bade1cc345
+18 -18
View File
@@ -1009,58 +1009,58 @@ python3 ~/.sanguo_projects/sanguo_moziplus/cli/blackboard.py create --title "分
## 6. 关键场景流程
### 6.1 庞统规划 + Agent 领任务事件驱动版
### 6.1 庞统规划 + Agent 领任务(事件驱动版)
```
用户 → 庞统(主session):设计一个动量因子策略
用户 → 庞统(主session):"设计一个动量因子策略"
庞统在黑板上写:
- 创建 task-001(数据准备,pending,无依赖)
- 创建 task-002(因子计算,pending,depends_on: [task-001])
- 创建 task-003(回测验证,pending,depends_on: [task-002])
- 评论:建议赵云领 001,张飞领 002 和 003
- 评论:"建议赵云领 001,张飞领 002 和 003"
庞统写 inbox 通知: task_created
Daemon Tick 发现 task-001 pending + 庞统评论建议赵云
→ spawn 赵云L1 消息含任务核心 + 庞统建议
→ spawn 赵云(L1 消息含任务核心 + 庞统建议)
赵云读黑板 → claim task-001 → 执行 → 写产出
→ 写 Handoff Comment: 完成分钟线数据下载 | 产出task-001/data/ | 无未完成事项
→ 更新 status→done → 通知 Daemoninbox JSONL
→ 写 Handoff Comment: "完成:分钟线数据下载 | 产出:task-001/data/ | 无未完成事项"
→ 更新 status→done → 通知 Daemon(inbox JSONL)
Daemon ~1s 内收到 inbox 通知 → mini-tick:
→ 查询 depends_on 包含 task-001 的 pending 任务 → task-002
→ task-002 的依赖全部满足 → spawn 张飞L1 消息含赵云的 handoff 摘要
→ task-002 的依赖全部满足 → spawn 张飞(L1 消息含赵云的 handoff 摘要)
同理 task-002 done → 即时触发 task-003
(同理 task-002 done → 即时触发 task-003)
```
**对比 polling 版**task-001 done 到 task-002 spawn 的延迟从 ≤60s 降到 ≤1s。张飞的 L1 消息中包含赵云的 Handoff Comment无需额外查询即可无缝接手。
**对比 polling 版**:task-001 done 到 task-002 spawn 的延迟从 ≤60s 降到 ≤1s。张飞的 L1 消息中包含赵云的 Handoff Comment,无需额外查询即可无缝接手。
### 6.2 Agent 间协作讨论(事件驱动版)
### 6.2 Agent 间协作讨论事件驱动版
```
张飞执行 task-002 时发现需要分钟线数据
张飞写评论:"@赵云 task-002 需要分钟线数据,能帮忙下载吗?"
张飞写评论:@赵云 task-002 需要分钟线数据,能帮忙下载吗?
张飞更新任务状态 → blocked
写 signal file: comment_added
通知 Daemoninbox JSONL
Daemon EventBus 即时收到 comment_added
Daemon ~1s 内收到 inbox 通知 → mini-tick:
→ 解析 @mention → 赵云
→ spawn 赵云(L1 消息含评论摘要)
→ spawn 赵云L1 消息含评论摘要
赵云读黑板 → 看到评论 → 下载数据 → 写产出
赵云写评论:"@张飞 数据就绪,可以继续"
写 signal file: comment_added
赵云写评论:@张飞 数据就绪,可以继续” + 写产出
通知 Daemoninbox JSONL
Daemon EventBus 即时收到 → @mention → spawn 张飞
Daemon 收到通知 → @mention → spawn 张飞
张飞读黑板 → 看到数据就绪 → 继续 task-002
```
**对比 polling 版**:@mention 响应从 ≤60s 降到 ≤1s。
**对比 polling 版**@mention 响应从 ≤60s 降到 ≤1s。
### 6.3 Agent 发现风险