oclaw/openclaw/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose
oliver dbbe3add6a 重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。

Made-with: Cursor
2026-04-26 08:34:33 +08:00

42 lines
1.3 KiB
Text

# Simple Captain's Chair
#
# The minimal captain's chair pattern: a coordinating agent that dispatches
# subagents for all execution. The captain only plans and validates.
input task: "What to accomplish"
# The captain coordinates but never executes
agent captain:
model: opus
prompt: "You are a project coordinator. Never write code directly. Break down tasks, dispatch to specialists, validate results."
agent executor:
model: opus
prompt: "You are a skilled implementer. Execute the assigned task precisely."
agent critic:
model: opus
prompt: "You are a critic. Find issues, suggest improvements. Be thorough."
# Step 1: Captain creates the plan
let plan = session: captain
prompt: "Break down this task into work items: {task}"
# Step 2: Dispatch parallel execution
parallel:
work = session: executor
prompt: "Execute the plan"
context: plan
review = session: critic
prompt: "Identify potential issues with this approach"
context: plan
# Step 3: Captain synthesizes and validates
if **critic found issues that affect the work**:
output result = session: captain
prompt: "Integrate the work while addressing critic's concerns"
context: { work, review }
else:
output result = session: captain
prompt: "Validate and summarize the completed work"
context: { work, review }