Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.
JavaScript agent-orchestrationagentic-workflowai-agentsai-codingclaude-codecode-reviewcodebuddycodexcoding-agentscursordeveloper-toolshuman-on-the-loopllmmcpmulti-agentsdlcself-hostedsopworkflow-automationworkflow-engine
Pi 适配器
pi 构建在 Agent Skills 之上,通过 npm:pi-subagents 扩展提供 subagent 工具。使用前先安装:
pi install npm:pi-subagents
没有该工具时不存在可用的生命周期 API,只能按 runtime-core.md
降级为 single-context,不得把降级状态标成 isolated。
能力映射
subagent 前台调用(async: false)会启动一个独立子会话并在返回前阻塞,属于 spawn 拓扑:
spawn(role, prompt) -> executor_id:调用subagent { agent: "delegate", task: "<完整阶段提示>" },返回内容中的Mission: <uuid> (completed)就是宿主签发的executor_id。wait(executor_id):前台调用本身就是阻塞的,返回即子会话完成。close(executor_id):前台模式无需显式关闭;异步模式下用 pi-subagents 的 fleet/stop 能力。spawn_helper(role, bounded_prompt) -> executor_id:调用只读内置 agent,例如subagent { agent: "scout", task: "<有边界的检索提示>" },并把返回的MissionUUID 作为 helper id。send(executor_id, message):前台模式不支持对已结束子会话追加消息。需要补充或重试时, 重新subagent一个全新实例并重新assign,不得复用已结束的 Mission id。
使用步骤
- 确认已安装
pi-subagents,且当前会话能看到subagent工具;缺失时停止并报告, 不得自创替代工具。 - medium/large 使用
--execution-mode isolated --host-adapter pi初始化。 - REQUIREMENT 执行
prepare --emit-prompt → start,由主 Agent 调用devflow-clarify-requirements并填写需求报告,再finish;不得创建需求分析 subagent。 - route 中其他 Agent 阶段先用
prepare --emit-prompt一次生成完整提示,再调用subagent { agent: "delegate", task: "<提示>" }创建全新子会话,从返回的Mission: <uuid>取出executor_id,用assign --executor-type dynamic --dispatch-tool subagent登记,再start, 等待返回后校验产物并finish。协调者不得代写 isolated 阶段产物。 - 只读检索使用
subagent { agent: "scout", task: "<有边界提示>" },并以devflow-code-explorer或devflow-knowledge-retriever作为审计角色用helper --executor-type dynamic --dispatch-tool subagent登记。REVIEW 前不得使用devflow-code-reviewer。
不同阶段使用不同的 Mission UUID。由于前台模式不支持 send,同阶段重试必须重新派发新实例并重新登记,
不得在状态里复用已结束的 id。