Skip to content

feat(tui): guided workflow orchestrator — wave as default entry point with health → proposals → execution #248

@nextlevelshit

Description

@nextlevelshit

Summary

Evolve the wave TUI into a guided workflow orchestrator that leads the user through health analysis → pipeline proposals → selection → execution → monitoring. The current implementation provides a Tab-based multi-view dashboard (Pipelines, Personas, Contracts, Skills, Health, Issues, Suggest) but does not implement the guided flow described in #184 and #245.

wave (no subcommand) becomes the default entry point — the user types wave and gets the guided orchestrator. wave run <pipeline> continues to work unchanged for single-pipeline execution.

This builds on the current internal/tui/ implementation which provides solid infrastructure (7-view Tab system, pipeline launcher, live output, health checks, suggestions, compose sequences) but lacks the guided startup flow.

Problem

The current TUI opens to the Pipelines view (a list of available pipelines). Health checks are accessible via the Health tab but not shown on startup. Suggestions are available via the Suggest tab but require the user to navigate there. There is no guided flow that leads from health → proposals → execution. The user experience is "here are 7 equal tabs, explore them" instead of "here's what your codebase needs, select what to do."

What the issues require vs what exists

Requirement (from #184/#245) Status
Guided startup: health → proposals → selection Missing — opens to Pipelines tab, all views are peer tabs
Visible health check progress on startup Exists but not default — ViewHealth tab shows 6 health checks but user must Tab to it
Proposals as primary view after health Exists but not default — ViewSuggest tab shows ranked suggestions but user must Tab to it
Multi-pipeline sequence selection (#209) Partially implemented — Compose view (compose_list.go) builds sequences with huh form
DAG preview before execution (#209) Partially implementedcompose_detail.go shows artifact compatibility between pipeline steps
Parallel pipeline groups (#210) Backend existsSequenceExecutor.ExecutePlan() supports parallel stages, not wired to TUI
Accept/modify/skip per proposal (#209) Partially implemented — Suggest view shows proposals, Enter launches; no skip/modify UI
Pipeline chaining with artifact handoff Backend existsSequenceExecutor in internal/pipeline/sequence.go handles artifact handoff
Real-time monitoring of running pipelines Workinglive_output.go shows structured event stream with step progress
Archive separation for completed runs Not implemented — pipeline list shows all pipelines equally

What infrastructure IS reusable

The infrastructure layer is solid and should be preserved:

  • Pipeline launcher (internal/tui/pipeline_launcher.go) — detached subprocess execution, SQLite tracking, process management
  • Live output (internal/tui/live_output.go) — structured event stream rendering with step state tracking
  • Health checks (internal/tui/health_list.go, health_provider.go) — 6 async checks (git, adapter, database, config, tools, skills)
  • Suggestions (internal/tui/suggest_list.go, suggest_provider.go) — pipeline recommendations with priority and rationale
  • Compose sequences (internal/tui/compose.go, compose_list.go, compose_detail.go) — interactive sequence builder with artifact compatibility validation
  • Issue integration (internal/tui/issue_list.go) — GitHub issues with running/finished pipeline children
  • Header bar (internal/tui/header.go, header_logo.go) — animated Wave ASCII logo, 3-row metadata grid
  • Content area (internal/tui/content.go) — split-pane list/detail layout
  • SequenceExecutor (internal/pipeline/sequence.go) — sequential and parallel pipeline execution with artifact handoff
  • Display formatting (internal/display/dashboard.go, progress.go, formatter.go) — terminal rendering utilities

Proposed Behavior

Phase 1: Health Check (visible on startup)

When wave opens, the user immediately sees health checks running:

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        Analyzing system health...
╚╩╝╩ ╩ ╚╝ ╚═╝

  ✓ Wave initialized (last updated 2h ago)
  ✓ Dependencies verified (claude-code, gh, 4 skills)
  ⠹ Analyzing codebase...
  ✓ Platform: GitHub (re-cinq/wave)

This is the default view on startup — not a pipeline list. The health checks already run via HealthDataProvider. The change is making their progress the primary visual on launch.

If missing dependencies are auto-installable, prompt the user:

  ⚠ Missing: speckit (auto-installable)
  Install now? [Y/n]

Phase 2: Proposals (automatic transition after health)

When health checks complete, the view transitions to the proposal screen:

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        3 proposals from health analysis
╚╩╝╩ ╩ ╚╝ ╚═╝

  Health: 12 open issues, 3 PRs awaiting review, all deps OK

  ▸ [sequence] gh-research → gh-implement          Priority: high
     12 open issues — research context then implement
  
    [single]   gh-pr-review                         Priority: medium
     3 PRs awaiting review

    [parallel]  gh-implement | gh-pr-review         Priority: low
     Run implementation and review concurrently

  ─── DAG Preview ───
  gh-research ──→ gh-implement
                       ↑ artifacts: research-findings.json

  Enter: launch   Space: toggle select   m: modify input   s: skip   Tab: fleet view

Key interactions per #209:

  • Enter on a proposal: launch it (single pipeline or sequence)
  • Space: toggle selection for multi-pipeline composition
  • m: modify the prefilled input before launching
  • s: skip a proposal
  • Tab: switch to fleet view (the existing Pipelines view for monitoring)

The DAG preview shows execution order and artifact flow between pipelines.

Phase 3: Execution + Fleet Monitoring

After launching pipelines, the view transitions to the fleet view (the existing Pipelines view with live output) — now it makes sense because there are active runs to monitor:

╦ ╦╔═╗╦  ╦╔═╗          Pipeline: gh-research
║║║╠═╣╚╗╔╝║╣           Elapsed:  1m 30s • 8k in / 2k out
╚╩╝╩ ╩ ╚╝ ╚═╝          Progress: 50% Step 3/6

▸ ● gh-research    1m30s   ✓ specify (navigator) [opus] (45s)
  ◌ gh-implement     —        └─ artifact: spec.md
  ✓ wave-evolve    4m10s   ✓ clarify (navigator) [opus] (30s)
  ✗ bb-implement   3m22s   ⠹ plan (navigator) [opus] (52s)
                               Write → .wave/output/plan.md
  ── Archive ──             ○ tasks (craftsman)
  ✓ speckit-flow   6m10s   ○ checklist (navigator)
  ✗ gh-pr-review   2m44s

  2 running 1 ok 1 fail

  Enter:attach  n:new  p:proposals  c:cancel  /:filter  q:quit
  • Enter: attach to a run (fullscreen single-run view via live_output.go)
  • Esc: detach back to fleet
  • p: return to proposals view
  • Tab: toggle between proposals and fleet views

Phase transitions as a state machine

                    ┌─────────────┐
    `wave` → │ HealthPhase │
                    └──────┬──────┘
                           │ health complete
                    ┌──────▼──────┐
               ┌────│  Proposals  │◄────┐
               │    └──────┬──────┘     │
               │           │ launch     │ p key
               │    ┌──────▼──────┐     │
               │    │  FleetView  │─────┘
               │    └──────┬──────┘
               │           │ Enter
               │    ┌──────▼──────┐
               │    │  Attached   │
               │    └──────┬──────┘
               │           │ Esc
               │           ▼
               │      (back to FleetView)
               │
               │ Tab (from any non-attached view)
               └──► toggle Proposals ↔ FleetView

Detailed Screen Mockups & Interaction Examples

Health Phase — Startup Sequence

Frame 1: Immediate open (all checks starting)

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        Analyzing system health...
╚╩╝╩ ╩ ╚╝ ╚═╝

  ⠹ Checking Wave initialization...
  ⠹ Verifying dependencies...
  ⠹ Analyzing codebase...
  ⠹ Detecting platform...




                                                              q: quit

Frame 2: Checks completing (1-2 seconds in)

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        Analyzing system health...
╚╩╝╩ ╩ ╚╝ ╚═╝

  ✓ Wave initialized — last updated 2h ago
  ✓ Dependencies: claude-code, gh, git, 4 skills
  ⠸ Analyzing codebase (querying GitHub API)...
  ✓ Platform: GitHub (re-cinq/wave)




                                                              q: quit

Frame 3: All complete — auto-transitions to proposals

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        Health check complete (3.2s)
╚╩╝╩ ╩ ╚╝ ╚═╝

  ✓ Wave initialized — last updated 2h ago
  ✓ Dependencies: claude-code, gh, git, 4 skills
  ✓ Codebase: 12 open issues, 3 PRs, 847 commits
  ✓ Platform: GitHub (re-cinq/wave)

  Loading proposals...

                                                              q: quit

Variant: Missing auto-installable dependency

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        Health check complete (2.8s)
╚╩╝╩ ╩ ╚╝ ╚═╝

  ✓ Wave initialized — last updated 2h ago
  ⚠ Dependencies: claude-code ✓, gh ✓, speckit ✗ (auto-installable)
  ✓ Codebase: 12 open issues, 3 PRs, 847 commits
  ✓ Platform: GitHub (re-cinq/wave)

  ⚠ 1 missing dependency can be auto-installed:
    • speckit — uv tool install speckit

  Install now? ▸ Yes   No                        q: quit

Variant: Failed health check

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        Health check complete (4.1s)
╚╩╝╩ ╩ ╚╝ ╚═╝

  ✓ Wave initialized — last updated 2h ago
  ✗ Dependencies: claude-code ✗ (not found in PATH)
      Hint: Install Claude Code CLI — npm install -g @anthropic/claude-code
  ✓ Codebase: 12 open issues, 3 PRs
  ✓ Platform: GitHub (re-cinq/wave)

  ⚠ 1 critical dependency missing — some pipelines will not work

  Continue anyway? ▸ Yes   No                    q: quit

Proposals View — Pipeline Selection

Default view: cursor on first proposal

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        3 proposals from health analysis
╚╩╝╩ ╩ ╚╝ ╚═╝

  Health: 12 open issues • 3 PRs awaiting review • all deps OK

  ▸ [sequence]  gh-research → gh-implement              ★ high
    12 open issues need research context before implementation

    [single]    gh-pr-review                             ★ medium
    3 pull requests awaiting code review

    [parallel]  gh-implement | gh-pr-review              ★ low
    Run implementation and review concurrently


  ─── Preview ───────────────────────────────────────────────
  gh-research ──→ gh-implement
                       ↑ artifacts: research-findings.json

  Enter: launch  Space: select  m: modify input  s: skip  Tab: fleet  q: quit

User presses Space on first, then Space on second (multi-select)

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        3 proposals — 2 selected
╚╩╝╩ ╩ ╚╝ ╚═╝

  Health: 12 open issues • 3 PRs awaiting review • all deps OK

  ● [sequence]  gh-research → gh-implement              ★ high
    12 open issues need research context before implementation

  ▸● [single]    gh-pr-review                             ★ medium
    3 pull requests awaiting code review

    [parallel]  gh-implement | gh-pr-review              ★ low
    Run implementation and review concurrently


  ─── Selected Execution Plan ──────────────────────────────
  1. gh-research ──→ gh-implement    (sequence)
  2. gh-pr-review                    (parallel with #1)

  Enter: launch 2 selected  Space: toggle  m: modify  s: skip  Tab: fleet  q: quit

User presses m to modify input for the focused proposal

╦ ╦╔═╗╦  ╦╔═╗
║║║╠═╣╚╗╔╝║╣        Modify input for: gh-pr-review
╚╩╝╩ ╩ ╚╝ ╚═╝

  ┌─────────────────────────────────────────────────────────┐
  │ Pipeline: gh-pr-review                                  │
  │ Type:     single                                        │
  │                                                         │
  │ Input:                                                  │
  │ ┌─────────────────────────────────────────────────────┐ │
  │ │ Review open PRs for code quality and correctness▌   │ │
  │ └─────────────────────────────────────────────────────┘ │
  │                                                         │
  │ Enter: confirm   Esc: cancel                            │
  └─────────────────────────────────────────────────────────┘

Fleet View — Active Monitoring

Active runs with live step progress

╦ ╦╔═╗╦  ╦╔═╗          Pipeline: gh-research
║║║╠═╣╚╗╔╝║╣           Elapsed:  1m 30s • 8.2k in / 2.1k out
╚╩╝╩ ╩ ╚╝ ╚═╝          Progress: 50% Step 3/6

▸ ● gh-research    1m30s   ✓ specify (navigator) [opus] (45.2s, 3k in / 800 out)
  ◌ gh-implement     —        └─ artifact: spec.md (written)
                             ✓ clarify (navigator) [opus] (30.1s, 2k in / 600 out)
                             ⠹ plan (navigator) [opus] (52s)
                                Write → .wave/output/plan.md
                             ○ tasks (craftsman)
                             ○ checklist (navigator)
                             ○ analyze (navigator)

  2 running  0 ok  0 fail

  Enter:attach  n:new  p:proposals  c:cancel  /:filter  q:quit

Multiple runs — sequence grouping + archive divider

╦ ╦╔═╗╦  ╦╔═╗          Pipeline: gh-research
║║║╠═╣╚╗╔╝║╣           Elapsed:  2m 30s • 12k in / 4k out
╚╩╝╩ ╩ ╚╝ ╚═╝          Progress: 67% Step 4/6

▸ ● gh-research    2m30s   ✓ specify (navigator) [opus] (45s)
  ◌ gh-implement     —        └─ artifact: spec.md
  ● gh-pr-review   1m12s   ✓ clarify (navigator) [opus] (30s)
                             ✓ plan (navigator) [opus] (1m 2s)
  ── Archive ──              ⠹ tasks (craftsman) [opus] (52s)
  ✓ wave-evolve    4m10s      Write → .wave/output/tasks.md
  ✓ speckit-flow   6m10s   ○ checklist (navigator)
  ✗ bb-implement   3m22s   ○ analyze (navigator)
  ✗ gh-pr-review   2m44s

  3 running  2 ok  2 fail

  Enter:attach  n:new  p:proposals  c:cancel  /:filter  q:quit

Attached View — Fullscreen Single Run

User presses Enter on gh-research — fullscreen live output

╦ ╦╔═╗╦  ╦╔═╗    Pipeline: gh-research
║║║╠═╣╚╗╔╝║╣     Elapsed:  2m 45s • 14k in / 4.8k out
╚╩╝╩ ╩ ╚╝ ╚═╝    Progress: 67% Step 4/6 (1 running, 3 ok)

✓ specify (navigator) [claude-4-opus via claude-code] (45.2s, 3.2k in / 820 out)
   └─ deliverable: specification.md

✓ clarify (navigator) [claude-4-opus via claude-code] (30.1s, 2.1k in / 610 out)
   └─ deliverable: clarifications.md

✓ plan (navigator) [claude-4-opus via claude-code] (1m 2.4s, 4.8k in / 1.9k out)
   ├─ deliverable: plan.md
   └─ artifact: plan.json (written)
       contract: plan-status ✓ valid
       handover → tasks

⠸ tasks (craftsman) [claude-4-opus via claude-code] (1m 8s)
   Write → .wave/output/tasks.md

○ checklist (navigator)

○ analyze (navigator)

                                              Esc: back to fleet  c: cancel  q: quit

Interaction Flow: Complete User Journey

1. User runs wave
→ Health phase appears, spinners animate

2. Health checks complete in ~3s
→ Auto-transition to proposals with health summary

3. User sees 3 proposals, reads rationale
→ DAG preview shows gh-research → gh-implement sequence

4. User presses Space on proposal 1 (sequence) and proposal 2 (single)
→ Header updates "2 selected", execution plan shows both

5. User presses Enter to launch
→ Sequence starts: gh-research spawns as detached subprocess
→ gh-pr-review spawns concurrently (parallel with sequence)
→ View transitions to fleet

6. Fleet view shows 2 active runs + queued gh-implement
→ gh-research: step spinner, tool activity updating
→ gh-pr-review: step spinner
→ gh-implement: queued (waiting for gh-research)

7. User presses Enter on gh-research to attach
→ Fullscreen live output view with all step detail

8. User presses Esc to detach
→ Back to fleet view

9. gh-research completes, gh-implement auto-starts (sequence)
→ Fleet shows gh-research ✓, gh-implement ● (running)
→ Artifacts from gh-research injected into gh-implement

10. User presses Tab to check proposals
→ Proposals view, can launch more pipelines

11. All pipelines complete
→ Fleet view: all runs in archive section with ✓/✗ status
→ User presses q to quit

Implementation Plan

Step 1: Add guided startup flow

Modify app.go to start in a health phase instead of ViewPipelines:

  • On startup, activeView = ViewHealth and auto-run health checks
  • Render health check progress using data from HealthDataProvider
  • Show each check category with status glyph and spinner for in-progress
  • When all checks complete, auto-transition to ViewSuggest

Files: internal/tui/app.go, internal/tui/health_list.go

Step 2: Enhance proposals view with selection

Enhance ViewSuggest from a read-only list to an interactive selection view:

  • Add multi-select: Space toggles individual proposals
  • Add m key to modify input before launching
  • Add s key to skip/dismiss proposals
  • Add DAG preview section showing execution order and artifact dependencies
  • Show health summary line at the top

Files: internal/tui/suggest_list.go, internal/tui/suggest_detail.go

Step 3: DAG preview renderer

Text-based DAG showing pipeline execution order in the suggest detail pane:

gh-research ──→ gh-implement
                     ↑ artifacts: research-findings.json

For parallel groups:

┌─ gh-implement
├─ gh-pr-review      (parallel)
└─ wave-security
         │
         ▼ all complete
   gh-pr-review

Build on existing compose_detail.go which already renders artifact compatibility.

Files: internal/tui/suggest_detail.go (new DAG rendering function)

Step 4: Wire SequenceExecutor to TUI

Connect SequenceExecutor (internal/pipeline/sequence.go) to the TUI launcher:

  • Single: existing pipeline_launcher.go subprocess launch
  • Sequence: Add LaunchSequence(names []string, input string) to pipeline launcher that invokes wave compose run or equivalent
  • Parallel: SequenceExecutor.ExecutePlan() with Stage{Parallel: true} — wire to TUI launch

For sequences, each pipeline appears as a separate tracked run, linked by a sequence grouping.

Files: internal/tui/pipeline_launcher.go, internal/tui/compose.go

Step 5: Fleet view improvements

Enhance the Pipelines view for monitoring:

  • Archive divider: Show divider between active/running and completed pipelines
  • Sequence grouping: Show sequence-linked runs as a group
  • Better step data: Ensure historical runs show step detail from event_log

Files: internal/tui/pipeline_list.go, internal/tui/pipeline_detail.go

Step 6: View transitions and keybindings

Update the state machine for guided flow:

View Keys
HealthPhase (startup) (auto-transitions when complete, q to quit, Tab to skip)
Proposals (ViewSuggest) j/k navigate, Enter launch, Space toggle, m modify, s skip, Tab fleet, q quit
FleetView (ViewPipelines) j/k navigate, Enter attach, n new, p/Tab proposals, c cancel, / filter, q quit
Attached (live output) Esc detach, c cancel, q quit

Files: internal/tui/app.go, internal/tui/views.go

Acceptance Criteria

  • wave opens to visible health check progress (not a pipeline list)
  • Health checks auto-transition to proposals view when complete
  • Proposals view shows ranked pipeline recommendations with rationale
  • Users can accept, modify input, or skip individual proposals without typing
  • Multi-select support: toggle multiple pipelines with Space, launch batch with Enter
  • DAG preview shows execution order and artifact dependencies before launch
  • Sequence execution uses SequenceExecutor with artifact handoff between pipelines
  • Parallel proposals launch concurrent goroutines
  • Fleet view shows real-time step progress for running pipelines (step states, tool activity, tokens)
  • Historical runs show step detail from event_log
  • Enter on a run attaches fullscreen (live output view)
  • Tab toggles between proposals and fleet views
  • go test -race ./... passes
  • wave run <pipeline> unchanged (no regression on single-pipeline mode)

Dependencies

All infrastructure exists in the codebase. No new packages needed:

  • internal/tui/health_list.go + health_provider.go — 6 async health checks (git, adapter, database, config, tools, skills)
  • internal/tui/suggest_list.go + suggest_provider.go — pipeline suggestion/proposal interface
  • internal/tui/compose.go + compose_list.go + compose_detail.go — interactive sequence builder with artifact compatibility
  • internal/tui/pipeline_launcher.go — detached subprocess pipeline execution with SQLite tracking
  • internal/tui/live_output.go — structured event stream rendering for running pipelines
  • internal/pipeline/sequence.goSequenceExecutor with sequential and parallel (ExecutePlan) execution + artifact handoff
  • internal/tui/content.go — split-pane layout, list/detail rendering
  • internal/display/ — terminal rendering (dashboard, progress, formatter)

Context


Changes since original

  • Updated all file paths from internal/tui/mission/ (deleted) to current internal/tui/ flat structure (e.g., app.go, health_list.go, suggest_list.go, pipeline_launcher.go, live_output.go)
  • Removed all references to internal/meta/ package (does not exist on main): meta.HealthChecker, meta.ProposalEngine, meta.SequenceExecutor, meta.Installer replaced with actual locations
  • Updated SequenceExecutor references to internal/pipeline/sequence.go (where it actually lives), including ExecutePlan() for parallel stage support
  • Removed reference to internal/display/render.go (does not exist); updated to actual display files (dashboard.go, progress.go, formatter.go)
  • Replaced non-existent TUI components (EventBus, BusEmitter, RunManager, RunContext, StatePoller, HealthCache) with actual components (pipeline_launcher.go, live_output.go, health_provider.go, suggest_provider.go)
  • Updated Problem section: TUI is no longer "empty run list" — it's a 7-view Tab-based dashboard (Pipelines, Personas, Contracts, Skills, Health, Issues, Suggest)
  • Updated status table to reflect partial implementations: health checks exist (ViewHealth), suggestions exist (ViewSuggest), compose sequences exist, live output works, issue integration added
  • Rewrote Implementation Plan to target current file structure and build on existing views
  • Trimmed redundant interaction mockups for conciseness while preserving key UX designs
  • Added cross-reference to feat: AI-steered project optimization — deep codebase analysis and wave.yaml generation after init #296 (project optimization as step 0) from issue comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpipelineRelated to pipeline execution and orchestrationpriority: highHigh priority issueuxUser experience improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions