opencode-mission-control icon indicating copy to clipboard operation
opencode-mission-control copied to clipboard

feat: show DAG dependency graph in mc_plan_status

Open nigel-dev opened this issue 9 months ago • 0 comments

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_overview should add a hint line (e.g. "Run mc_plan_status for dependency graph") when a plan is active

Additional Context

  • The dependsOn data already exists on every JobSpec
  • The orchestrator has toAdjacencyMap() in src/lib/orchestrator.ts for internal scheduling — could be reused or a similar display helper built
  • Acceptance criteria:
    • [ ] mc_plan_status renders 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_overview hints at mc_plan_status when a plan is active
    • [ ] Existing tests pass, new tests cover DAG rendering

nigel-dev avatar Feb 12 '26 07:02 nigel-dev