Cross-Cutting

/wtd

What-To-Do — one-shot 'what is my next action in this workbench?'. Walks the per-epic precondition chain and prints one concrete command. The trimmer cousin of `/pmo-status`.

Hat Stage Upstream gate Output
Cross-cutting Status None (read-only) Stdout text or --json payload (no file writes)

When to Use

Prerequisites

Run

wb.wtd            # text report
wb.wtd --json     # machine-readable

How It Decides

For every epic in project.conf EPICS=(...) it walks this chain and emits a recommendation for the first gap:

epic-context → PRD → eng-spec → TDD → BDD → test-cases → test-spec → ralph plan → dispatch
Question (in order) If no → recommendation
Is artifact in .workbench-state/approved.json? If in published.json → “review and approve”. Else → run the producing skill.
Is upstream gate approved? Block; surface the upstream gap instead.
All PRD-scoped artifacts approved for this PRD? Yes → /ralph-workspace-plan, then wb.ralph-dispatch.

Linkage uses YAML frontmatter (epic_id, prd_id) when present, falling back to ID-prefix matching (prd-EPIC-001-foospec-EPIC-001-foo).

Output Shape

What to do next
===============

→ Next  (epic:EPIC-001)
  $ /prd-draft EPIC-001
  [EPIC-001] no PRD yet — draft one from the approved epic context.

Also queued:
  → [EPIC-002] missing TDD — generate it now.
    $ /tdd prd-EPIC-002-checkout
  ⛔ [EPIC-003] pull epic body and stamp it as draft context.
    $ /epic-intake EPIC-003
  → [prd-EPIC-001-foo] all artifacts approved — run workspace plan.
    $ /ralph-workspace-plan

⛔ BLOCKER / = blocker (upstream gate not green). → Next / = normal next step.

Priority Order

Lower wins; ties broken by epic order in project.conf.

Priority Meaning
5 Workbench misconfigured (no EPICS, etc.)
10 Missing epic context
15 Missing PRD
20–25 Awaiting human approval (publish/approve gap)
30 Missing PRD-scoped artifact (spec, TDD, BDD, …)
40 Ready for /ralph-workspace-plan
60 Ready for wb.ralph-dispatch
90 Pipeline idle and clean — open a new epic

Exit Codes

Code Meaning
0 Recommendation printed (including the “pipeline idle” case).
2 Workbench misconfigured (.workbench-state/ missing).

Do Not

Source