Skip to content

开发者与产品经理实战手册(OpenClaw 版本)

目标

让"需求 -> Agent 执行 -> 渠道反馈 -> 复盘优化"形成闭环,且全流程可审计、可回滚。

阶段化协作链路

阶段 1:基础上线(0 -> 1)

开发者:

  • 快速开始 跑通网关与控制台
  • 至少接入 1 个渠道并完成配对

产品经理:

  • 定义首批可自动化任务(建议 3 个以内)
  • 定义高风险动作审批规则

阶段 2:能力增强(1 -> N)

开发者:

  • 引入 Tool profile 与 provider 限制
  • Skill 化高频流程,沉淀模板

产品经理:

  • 设计多角色路由与通知规则
  • 维护验收指标(响应时效、成功率、返工率)

阶段 3:稳定运营(N -> 持续)

开发者:

  • 建立排障 Runbook 与升级流程
  • 固化日志与告警策略

产品经理:

  • 每周复盘失败样本
  • 每月评估自动化收益与风险敞口

角色分工矩阵

职责开发者产品经理
配置与运行主责知情
安全策略共责共责
上线节奏把关技术门禁主责
事故响应主责技术恢复主责业务沟通
验收标准定义技术指标定义业务指标
成本控制监控用量定义预算

每日检查清单

开发者每日检查

markdown
- [ ] 检查网关状态:`openclaw gateway status`
- [ ] 检查渠道健康:`openclaw channels status`
- [ ] 检查错误日志:`openclaw gateway logs --filter error`
- [ ] 检查用量趋势:`openclaw stats usage --period day`

产品经理每日检查

markdown
- [ ] 检查待审批任务
- [ ] 检查用户反馈
- [ ] 检查自动化成功率
- [ ] 检查异常告警

每周复盘模板

markdown
# 周报模板

## 本周数据

- 自动化任务数:{count}
- 成功率:{rate}%
- 平均响应时间:{time}s
- 成本:{cost}

## 成功案例

1. {case_1}
2. {case_2}

## 失败案例

1. {case_1}
   - 原因:{reason}
   - 改进:{improvement}
2. {case_2}
   - 原因:{reason}
   - 改进:{improvement}

## 下周计划

- P0:{task_1}
- P1:{task_2}
- P2:{task_3}

## 风险提醒

- {risk_1}
- {risk_2}

常见场景处理

场景 1:新渠道接入

开发者动作:

bash
# 1. 添加渠道配置
openclaw channels add discord --token $DISCORD_BOT_TOKEN

# 2. 测试连接
openclaw channels test discord

# 3. 启用渠道
openclaw channels enable discord

# 4. 验证配对
openclaw channels pair discord --verify

产品经理动作:

  1. 定义渠道适用场景
  2. 定义消息模板
  3. 定义响应 SLA
  4. 设置监控告警

场景 2:新模型接入

开发者动作:

bash
# 1. 添加模型配置
openclaw providers add openai --model gpt-4-turbo

# 2. 测试模型
openclaw providers test openai:gpt-4-turbo

# 3. 配置路由规则
openclaw config set routing.default-model gpt-4-turbo

# 4. 设置成本限制
openclaw config set providers.openai.models.gpt-4-turbo.cost-limit 100

产品经理动作:

  1. 定义模型使用场景
  2. 定义成本预算
  3. 定义降级策略
  4. 设置用量告警

场景 3:技能开发与发布

开发者动作:

bash
# 1. 创建技能模板
openclaw skills create my-skill --template basic

# 2. 编写技能内容
# 编辑 ~/.openclaw/skills/my-skill/SKILL.md

# 3. 本地测试
openclaw skills test my-skill

# 4. 发布技能
openclaw skills publish my-skill

产品经理动作:

  1. 定义技能需求
  2. 编写验收用例
  3. 定义触发条件
  4. 设置使用限制

场景 4:事故响应

开发者动作:

bash
# 1. 查看错误日志
openclaw gateway logs --filter error --tail 100

# 2. 检查系统状态
openclaw doctor

# 3. 必要时重启网关
openclaw gateway restart

# 4. 生成事故报告
openclaw report incident --start {start_time} --end {end_time}

产品经理动作:

  1. 评估影响范围
  2. 通知相关用户
  3. 记录用户反馈
  4. 跟进恢复进度

监控与告警配置

关键指标

txt
# 监控配置示例
metrics:
  - name: request_success_rate
    type: percentage
    alert:
      warning: < 95%
      critical: < 90%

  - name: response_time_p95
    type: duration
    alert:
      warning: > 10s
      critical: > 30s

  - name: error_rate
    type: percentage
    alert:
      warning: > 5%
      critical: > 10%

  - name: cost_daily
    type: currency
    alert:
      warning: > $50
      critical: > $100

告警通知

yaml
# 通知配置
notifications:
  channels:
    - type: discord
      webhook: $DISCORD_WEBHOOK
    - type: email
      recipients:
        - dev-team@example.com
        - pm-team@example.com

  rules:
    - severity: critical
      channels: [discord, email]
      repeat: 5m
    - severity: warning
      channels: [discord]
      repeat: 30m

成本控制策略

预算配置

txt
# 成本预算
budget:
  daily: 100 # 美元/天
  weekly: 500 # 美元/周
  monthly: 2000 # 美元/月

  # 预算告警阈值
  alerts:
    - threshold: 50%
      action: notify
    - threshold: 80%
      action: notify + throttle
    - threshold: 100%
      action: notify + disable

模型选择策略

txt
# 模型路由规则
routing:
  rules:
    # 简单任务用快速模型
    - condition: "complexity == 'low'"
      model: gpt-4-turbo-preview

    # 复杂任务用高能力模型
    - condition: "complexity == 'high'"
      model: gpt-4

    # 降级策略
    fallback:
      - gpt-4-turbo-preview
      - gpt-3.5-turbo

实操模板入口