Other Advanced Markdown

Autonomous PM - 子智能体驱动的自主项目管理

去中心化项目管理模式。子智能体在共享状态文件上自主工作,通过 STATE.yaml 并行执行协调,无需中央协调器。

openclawai-agentsproductivityproject-managementautomation

Autonomous Project Management(子智能体自主项目管理)

去中心化项目管理模式,子智能体在共享状态文件上自主工作,通过并行执行协调而非中央协调器。

解决什么问题

管理多并行工作流的复杂项目令人疲惫。不断切换上下文、跨工具跟踪状态、手动协调交接。

功能特点

  • 去中心化协调:智能体读写共享 STATE.yaml 文件
  • 并行执行:多个子智能体同时处理独立任务
  • 无协调器开销:主会话保持精简(CEO 模式 — 仅策略)
  • 自动记录:所有任务状态持久化在版本控制文件中

核心模式:STATE.yaml

每个项目维护一个 STATE.yaml 作为单一事实来源:

# STATE.yaml - 项目协调文件
project: website-redesign
updated: 2026-02-10T14:30:00Z

tasks:
  - id: homepage-hero
    status: in_progress
    owner: pm-frontend
    started: 2026-02-10T12:00:00Z
    notes: "Working on responsive layout"
    
  - id: api-auth
    status: done
    owner: pm-backend
    completed: 2026-02-10T14:00:00Z
    output: "src/api/auth.ts"
    
  - id: content-migration
    status: blocked
    owner: pm-content
    blocked_by: api-auth
    notes: "Waiting for new endpoint schema"

next_actions:
  - "pm-content: Resume migration now that api-auth is done"
  - "pm-frontend: Review hero with design team"

工作原理

  1. 主智能体接收任务 → 生成有特定范围的子智能体
  2. 子智能体读取 STATE.yaml → 找到分配给它的任务
  3. 子智能体自主工作 → 进度更新 STATE.yaml
  4. 其他智能体轮询 STATE.yaml → 拾取未阻塞的工作
  5. 主智能体定期检查 → 审查状态,调整优先级

如何设置

AGENTS.md 配置

## PM Delegation Pattern

Main session = coordinator ONLY. All execution goes to subagents.

Workflow:
1. New task arrives
2. Check PROJECT_REGISTRY.md for existing PM
3. If PM exists → sessions_send(label="pm-xxx", message="[task]")
4. If new project → sessions_spawn(label="pm-xxx", task="[task]")
5. PM executes, updates STATE.yaml, reports back
6. Main agent summarizes to user

Rules:
- Main session: 0-2 tool calls max (spawn/send only)
- PMs own their STATE.yaml files
- PMs can spawn sub-subagents for parallel subtasks
- All state changes committed to git

生成 PM 示例

User: "Refactor the auth module and update the docs"

Main agent:
1. Checks registry → no active pm-auth
2. Spawns: sessions_spawn(label="pm-auth-refactor", task="Refactor auth module")
3. Responds: "Spawned pm-auth-refactor. I'll report back when done."

PM subagent:
1. Creates STATE.yaml with task breakdown
2. Works through tasks, updating status
3. Commits changes
4. Reports completion to main

成本估算

组件成本
OpenClaw 子智能体取决于 LLM 调用
Git 存储免费

关键洞察

  • STATE.yaml > 协调器:基于文件的协调比消息传递更具可扩展性
  • Git 作为审计日志:提交 STATE.yaml 变更获得完整历史
  • 标签约定重要:使用 pm-{project}-{scope} 便于跟踪
  • 精简主会话:主智能体做得越少,响应越快

局限性与适用条件

适用场景

  • 复杂多仓库重构
  • 研究冲刺
  • 内容管道

不适用场景

  • 简单任务(增加开销不值得)
  • 需要实时协作

局限性

  • 需要维护 STATE.yaml 结构
  • 子智能体协调增加复杂度
  • 可能产生状态冲突

相关链接