Skip to main content

/work — Execute Wish Plan

Orchestrate execution of an approved wish. The orchestrator never executes directly — always dispatches via subagent.

When to Use

  • An approved wish exists and is ready for execution
  • After /review returns SHIP on the plan
  • Orchestrator needs to dispatch implementation tasks to subagents

Flow

  1. Load wish — read .genie/wishes/<slug>/WISH.md, confirm scope.
  2. Pick next task — select next unblocked pending execution group.
  3. Self-refine — dispatch /refine on the task prompt with WISH.md as context.
  4. Dispatch worker — send the task to a fresh subagent session.
  5. Local review — run /review per group against acceptance criteria. On FIX-FIRST, dispatch fix subagent (max 2 loops).
  6. Quality review — dispatch review subagent for quality pass (security, maintainability, perf).
  7. Validate — run the group validation command, record evidence.
  8. Signal completion — notify the leader via genie send.
  9. Repeat until all groups done.
  10. HandoffAll work tasks complete. Run /review.

Dispatch

All dispatch uses the genie spawn command:
NeedMethod
Implementation taskgenie spawn engineer
Review taskgenie spawn reviewer (never same agent as engineer)
Fix taskgenie spawn fixer (separate from reviewer)
Quick validationBash tool directly — no subagent needed

State Management

  • Workers signal completion via genie send to the leader.
  • Leader tracks state via genie status <slug> and marks groups complete via genie done <ref>.
  • Workers do NOT call genie done — that is the leader’s responsibility.
  • If a group gets stuck, the leader can use genie reset <ref> to retry.

Escalation

When a subagent fails or fix loop limit (2) is exceeded:
  • Mark task BLOCKED in wish
  • Create follow-up task with concrete gaps
  • Continue with next unblocked task
  • Include blocked items in final handoff

Task Lifecycle Integration

When PostgreSQL tasks exist, /work integrates with the task system at each step:
EventCommand
Claim task before startinggenie task checkout #<seq>
Log progress during executiongenie task comment #<seq> "Building group N..."
Move task on group completiongenie task move #<seq> --to review --comment "Group N complete"
Mark parent task donegenie task done #<parent-seq> --comment "All groups shipped"
Task integration is graceful — if no PG task exists, the work flow proceeds without task commands.

Rules

  • Never execute directly — always dispatch subagents
  • Never expand scope during execution
  • Never skip validation commands
  • Never overwrite WISH.md from workers
  • Keep work auditable: capture commands + outcomes
  • Run local /review per group before signaling done