-
Notifications
You must be signed in to change notification settings - Fork 0
feat: cross-machine and cross-team orchestration via phoenix-flow MCP #489
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
retort run --watch handles local file-based orchestration via RuntimeStateManager (#486). This issue tracks the next layer: cross-machine agent handoffs and human+agent cross-team coordination.
Problem
When agents run on different machines (e.g., a remote GitHub Actions runner spawning Claude Code, or a human engineer handing off a task to an AI team), file-watching over .claude/state/tasks/ doesn't work — there's no shared filesystem. We need a remote-accessible coordination layer.
Proposed Architecture
Local orchestration (same machine)
retort run --watch
└─ watches .claude/state/tasks/ ← RuntimeStateManager (fast, #486)
Remote / cross-team orchestration
retort run --watch --remote
└─ polls phoenix-flow MCP (task graph)
│
├─ Human team creates/assigns tasks on Kanban board
├─ Agent team picks up tasks via MCP tool calls
├─ Task lifecycle: todo → inprogress → done
└─ Syncs back to org-meta (YAML, version-controlled)
Key decisions
Why phoenix-flow (not mcp-org, not cognitive-mesh, not sluice)
| Repo | Role | Verdict |
|---|---|---|
phoenix-flow |
Shared task graph — human + agent, MCP server, bidirectional YAML sync | Primary integration target |
mcp-org |
Org-level task mirror + project health (read-mostly) | Audit/visibility layer only |
cognitive-mesh |
Enterprise AI governance + reasoning platform | Too heavyweight; internal to CM agents |
sluice |
OpenAI-compatible LLM gateway | Model routing, not orchestration |
docket |
FinOps / AOAI cost tracking | Cost visibility, tangential |
codeflow |
Python AutoPR engine | Another CLI retort run dispatches to |
phoenix-flow is already the designated shared task graph between humans and agents in this org — Portfolio → Project → Task hierarchy with MCP read/write and YAML version control.
Implementation sketch
retort run --remote flag
retort run claude --task T-123 --remote phoenix-flow- Fetches task
T-123from phoenix-flow MCP (get_task) - Spawns target CLI with task context injected
- On completion, writes result back to phoenix-flow (
update_task,add_agent_message) - Optionally logs to mcp-org audit trail (
log_agent_message)
.retortconfig extension (builds on #488)
remote:
provider: phoenix-flow
endpoint: ${PHOENIX_FLOW_URL}
secret: ${PHOENIX_FLOW_MCP_SECRET}
fallback: local # fall back to file-watching if remote unreachableCallback protocol for remote CLIs
When a remote agent (e.g., codeflow AutoPR on a runner) completes work:
- Agent writes task status update to phoenix-flow MCP (
update_task status=done) retort run --watch --remotepolls phoenix-flow for status changes (or receives webhook if phoenix-flow supports it)- Next agent in chain is dispatched with the updated task context
Human↔agent handoff
- Human moves task card on Kanban → phoenix-flow writes status to DB →
retort run --watch --remotepicks it up → spawns designated agent CLI - Agent completes → updates task → human sees it on board immediately
Acceptance criteria
-
retort run --remoteflag reads task from phoenix-flow MCP before dispatch - Task status is written back to phoenix-flow on completion/failure
-
.retortconfig remote:block supported (feat(config): extend .retortconfig schema with cli-routing, mcp-servers, and worktree settings #488 prerequisite) - Works across machines (no shared filesystem assumption)
- Human Kanban assignments trigger agent dispatch (phoenix-flow → retort run)
- Fallback to local file-watching when
--remoteprovider is unreachable
Dependencies
- feat(engine): add RuntimeStateManager class — orchestrator state and task lifecycle #486 — RuntimeStateManager (local task state, prerequisite)
- feat(cli): add
retort run— multi-CLI team dispatch with .retortconfig routing #487 —retort runCLI dispatch (prerequisite) - feat(config): extend .retortconfig schema with cli-routing, mcp-servers, and worktree settings #488 —
.retortconfigschema extension (prerequisite) phoenixvc/phoenix-flow— MCP server must exposeupdate_task+add_agent_message(already present)
Out of scope
- Phoenix-flow internal task graph changes (tracked separately in that repo)
- Cognitive-mesh agent orchestration (CM manages its own agent graph internally)
- Real-time streaming (polling is sufficient for v1; webhooks are a follow-up)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request