Saltar a contenido

Missions

A mission is a bounded work container — a named set of objectives that groups related epics and anchors active sessions. Where an epic tracks a single multi-story initiative, a mission tracks a broader goal that may span several epics over days or weeks.

What Missions Are

Missions give the "why" above the "what" of epics. A mission might be "get search to production quality" or "migrate CLI to async model" — a goal that requires multiple epics to accomplish. Without missions, epics exist in isolation and sessions lose continuity between them.

Every session runs inside a mission. The mission provides the strategic context that Rai loads at session start: which epics are in flight, what objectives have been accomplished, and what comes next.

Mission Lifecycle

new → active → accomplished
             → abandoned
  • new: Mission created with objectives, not yet started.
  • active: Mission is the current focus. Sessions bind to it, epics attach to it.
  • accomplished: All objectives are met. Mission is closed with a summary.
  • abandoned: Mission is closed without completing objectives (pivot or cancellation).

Only one mission can be active at a time per developer profile. Switching missions records the current mission state before activating the new one.

Key Operations

Operation What it does
rai mission new Create a mission with name and objectives
rai mission switch Change the active mission
rai mission attach Link an epic to the active mission
rai mission accomplish Mark an objective as done
rai mission close Close the mission (accomplished or abandoned)
rai mission context Show current mission state and attached epics

Relationship to Epics and Sessions

Missions contain epics. Epics are attached to a mission when they are created (or manually attached later). This gives the dependency graph that fleet dispatch uses to identify which stories can run in parallel.

Sessions bind to the active mission at session start. The bound mission determines which governance context, patterns, and graph context are loaded for the session. A session can rebind to a different mission mid-session if needed.

Mission (objective container)
  └── Epic A (multi-story initiative)
       └── Story A.1, A.2, ...
  └── Epic B
       └── Story B.1, B.2, ...

Session → binds to → active Mission → loads governance + context

Worktree Binding

Worktrees can be bound to a specific mission. When you open a worktree with rai worktree open, the worktree records the active mission. From then on, sessions started inside that worktree automatically bind to the same mission — no manual selection needed.

This is the recommended pattern for sustained work: one worktree per mission, reused across its epics and stories until all objectives are met.

See Worktrees for the full worktree model.

Next Steps