opencode-mission-control
opencode-mission-control copied to clipboard
feat: show DAG dependency graph in mc_plan_status
Description
When an orchestrated plan is running, mc_plan_status should render an ASCII DAG of the job dependency graph so the user can visually understand execution order, parallelism, and current progress at a glance.
Currently it shows a flat list of jobs with inline (deps: ...) annotations — dependencies are mentioned but the graph structure isn't visible. You can't easily see parallelism or the critical path.
Use Case
Plans with 4+ jobs and branching dependencies are hard to reason about from a flat list. A visual DAG immediately answers:
- What can run in parallel?
- What's the critical path?
- Where is the plan currently progressing?
Example of the current flat output:
Jobs:
✓✓ schema: merged
▶ api: running (deps: schema)
◌ ui: waiting_deps (deps: api)
◌ docs: waiting_deps (deps: api)
Proposed Solution
Add a DAG section to mc_plan_status that visualizes the dependency graph with status indicators:
Dependency Graph:
schema [✓✓]
└─▶ api [▶]
├─▶ ui [◌]
└─▶ docs [◌]
- Root jobs (no deps) appear at the top
- Parallel branches are visually distinct
- Each node shows the job name and current status indicator (reuse existing
getJobStatusIndicator()) - Changes scoped to
src/tools/plan-status.ts mc_overviewshould add a hint line (e.g. "Run mc_plan_status for dependency graph") when a plan is active
Additional Context
- The
dependsOndata already exists on everyJobSpec - The orchestrator has
toAdjacencyMap()insrc/lib/orchestrator.tsfor internal scheduling — could be reused or a similar display helper built - Acceptance criteria:
- [ ]
mc_plan_statusrenders an ASCII DAG when a plan is active - [ ] Root jobs (no deps) appear at the top
- [ ] Parallel branches are visually distinct
- [ ] Each node shows job name + status indicator
- [ ]
mc_overviewhints atmc_plan_statuswhen a plan is active - [ ] Existing tests pass, new tests cover DAG rendering
- [ ]