How sixhq/overture works
Overture is a local “MCP server” (Node/TypeScript) that intercepts an AI coding agent’s planning phase, turns the plan into a structured graph, and serves an interactive web UI to review/approve the plan, enrich nodes with context, and stream execution status in real time.
From the tree + README, it’s best understood as:
• A local server-side integration adapter (MCP) that talks to external AI agents (Claude Code, Cursor, Cline, Sixth, etc.)
• A web application (static UI assets) served by the server
• A WebSocket channel for live graph/status updates
• A plan parsing + state management core (XML parser → in-memory store + history storage)
Read the repo structure as architecture signals
This is a monorepo:
• Top level
• packages/ (actual products)
• prompts/ and packages/mcp-server/prompts/ (integration instructions / agent-specific prompts)
• examples/ (e.g., ecommerce-plan.xml suggests plan input format)
• package.json, pnpm-lock.yaml, tsconfig.json (Node/TS workspace tooling)
• Core runtime package: packages/mcp-server/
• src/cli.ts → entrypoint for npx overture-mcp / global binary
• src/index.ts → likely bootstraps services
• src/http/server.ts → HTTP server (serves UI at OVERTURE_HTTP_PORT default 3031)
• src/websocket/ws-server.ts → WS server (default 3030)
• src/parser/xml-parser.ts → plan XML → internal graph model
• src/store/plan-store.ts → in-memory canonical state of plan graph + node statuses + selections
• src/storage/history-storage.ts → persistence of past plans / events (local disk most likely)
• src/tools/handlers.ts → MCP tool endpoints/handlers (what the agent calls)
• src/utils/plan-diff.ts → changesets between plan versions / incremental updates
• src/types.ts → shared domain types
• UI artifacts
• packages/mcp-server/public/ and packages/mcp-server/ui-dist/ contain built static assets (index.html, bundled JS/CSS). For system design, treat UI as a static SPA served by the HTTP server.
• packages/ui/ exists but file tree doesn’t show contents; still, it implies a separate UI package feeding ui-dist.
Agent → MCP Tool Handlers
• The agent “sends” (or triggers) the plan to Overture via MCP tool calls.
Architectural patterns to call out
• Adapter/Integration pattern: MCP Tool Handlers are the adapter between *external agents* and *Overture’s domain model*.
• Event-driven UI updates: WebSocket pushes store changes; plan-diff suggests incremental/event updates rather than full refresh.
• Single source of truth: plan-store is the canonical state; parser/handlers mutate it; UI observes it.
• Ports split by concern: HTTP (UI) vs WebSocket (live updates), controlled by env vars.
• The UI is likely a prebuilt SPA (ui-dist/, public/). Show it as “static assets served by HTTP server,” not a separate always-running frontend dev server (unless you confirm later).
• The agent integration is via MCP, not generic REST; label that interface clearly as “MCP tools / MCP protocol” (even if transport details aren’t visible in tree).
• two channels to UI: HTTP for initial load, WebSocket for live updates.