05-boss-meta-capabilities.md
5.06 KB
5. 元能力:动态 Pipeline 与组织架构
v1.1 → v1.2 — 元能力分布在 Master 和 CXO 两层,职责分明。
5.1 框架 vs Agent 的分界线
┌─────────────────────────────────────────────────────────────────┐
│ LemonBoss 框架层 │
│ │
│ 提供: Agent 生命周期 / Loop 引擎 / 四层调度 / 沙盒 / 通讯 │
│ 不管: 爬虫怎么写 / 数据库用什么 / 视频怎么剪 / 文章怎么发 │
│ │
├─────────────────────────────────────────────────────────────────┤
│ Agent 沙盒层 │
│ │
│ 每个 Agent 在沙盒内自主决定: │
│ - 写什么代码、用什么数据库、调什么 API、存什么文件 │
│ LemonBoss 不预设也不限制 Agent 内部实现 │
│ │
└─────────────────────────────────────────────────────────────────┘
5.2 元能力分层
| 层级 | 元能力 | 说明 |
|---|---|---|
| Master | cxo.create / cxo.redefine / cxo.destroy |
创建/调整战略层 |
| Master | org.status / goal.set |
全局状态 + 目标设定 |
| CXO | role.create / role.redefine / role.destroy |
创建/调整职能层 |
| CXO | pipeline.set / pipeline.adjust |
设计和调整 Pipeline DAG |
| Role | skill.create / skill.redefine / skill.destroy |
创建/调整原子层 |
| Role | skill.reuse |
复用其他 Role 下的 Skill |
// Master 的元操作工具
const MasterMetaTools = {
'cxo.create': async ({ name, define, goal }) => { /* 创建 CXO */ },
'cxo.redefine': async ({ agentId, newDefine }) => { /* 重定义 CXO */ },
'cxo.destroy': async ({ agentId }) => { /* 销毁 CXO */ },
'org.status': async () => { /* 全局组织状态 */ },
'goal.set': async ({ goal }) => { /* 设定公司 Goal */ },
};
// CXO 的元操作工具
const CXOMetaTools = {
'role.create': async ({ name, define, parentCXO, goal }) => { /* 创建 Role */ },
'role.redefine': async ({ agentId, newDefine }) => { /* 重定义 Role */ },
'role.destroy': async ({ agentId }) => { /* 销毁 Role */ },
'pipeline.set': async ({ edges }) => { /* 定义 Pipeline DAG */ },
'pipeline.adjust': async ({ changes }) => { /* 调整 Pipeline */ },
};
// Role 的元操作工具
const RoleMetaTools = {
'skill.create': async ({ name, define, goal }) => { /* 创建 Skill */ },
'skill.redefine': async ({ agentId, newDefine }) => { /* 重定义 Skill */ },
'skill.destroy': async ({ agentId }) => { /* 销毁 Skill */ },
'skill.reuse': async ({ skillId, fromRole }) => { /* 跨 Role 复用 Skill */ },
};
5.3 Pipeline 的生成流程
Pipeline 不再是 Master 直接设计的——它由 CXO 层协商产出:
Master 设定 Goal: "月产 20 部互动短剧,日活 10 万"
│
▼
CEO Agent (中书) 草拟方案:
→ "需要 5 个 Role: 编剧、制作、运营、推广、数据"
→ "Pipeline: 选题→剧本→制作→上架→推广→反馈→选题"
│
▼
CTO Agent (门下) 审复:
→ "技术审核通过,建议制作环节拆为并行:场景+对白+分镜"
→ "增加 Deep Research Skill 到编剧 Role"
│
▼
COO Agent (尚书) 执行:
→ role.create × 5
→ pipeline.set → 定义 DAG
→ 启动调度
│
▼
Pipeline DAG (存储在 CXO 的共享 Memory 中):
{
"pipeline_id": "drama-v3",
"edges": [
{ "from": "role-strategist", "to": "role-dramatist", "trigger": "on_complete" },
{ "from": "role-dramatist", "to": "role-producer", "trigger": "on_complete" },
{ "from": "role-producer", "to": "role-publisher", "trigger": "on_complete" },
{ "from": "role-publisher", "to": "role-promoter", "trigger": "on_complete" },
{ "from": "role-promoter", "to": "role-analyst", "trigger": "on_complete" },
{ "from": "role-analyst", "to": "role-strategist", "trigger": "on_feedback" }
],
"version": 3,
"approved_by": ["cxo-ceo", "cxo-cto", "cxo-coo"]
}
5.4 元能力的层级约束
Master 只能操控 CXO(不会直接创建 Role 或 Skill)
CXO 只能操控 Role(不会直接创建 Skill)
Role 只能操控 Skill
每层只管下一层 → 层层递进 → 避免越级
这与古代治理的核心原则一致:天子→宰相→六部→吏胥,层层递进,各司其职。