Docs / Mission lifecycle

Mission lifecycle

How a mission travels from the moment you post it to close: decomposition, the Tier 0 and Tier 1+ pipelines, fix rounds, human gates, and the retro.

A mission is the atomic unit of factory work: one goal, one Lead, one pipeline of child issues on one branch. For what each child issue is, see SDLC phases.

Entry#

  1. You post the mission with mission-create: a [mission] issue with mission + kind:<X> labels, kind/autonomy/affected_repos metadata, assigned to the workspace's Lead.
  2. Multica wakes the Lead on assignment.
  3. The Lead (factory-orchestrator) decomposes: resolves effective autonomy (strictest-wins), picks the phase set for the kind:, checks repo readiness, and creates the first child.

If an affected repo is not ready, the Lead prepends [onboard-build] → [deploy] to this mission's phases and forces supervised (ADR 0052). If kind: is missing the Lead defaults to feature and posts a warning.

Tier 0 — one feature, one pipeline#

Most missions are Tier 0. The Lead creates children one at a time, and on each child-done wake validates the handoff before routing the next phase.

Diagram source (Mermaid)
sequenceDiagram
    participant O as Operator
    participant L as Lead
    participant PM as pm-agent
    participant UX as ux-designer / ux-reviewer
    participant TA as tech-architect
    participant DRC as DRC ×4
    participant E as engineer
    participant R as pr-reviewer ×2
    participant QA as qa-consultant

    O->>L: [mission] posted + assigned
    L->>PM: [discovery]
    PM-->>L: PRD + ACs
    L->>TA: [plan]
    TA-->>L: breakdown, tier 0
    L->>UX: [design-ux] → [review-ux] (UI surface only)
    L->>TA: [design-tech]
    TA-->>L: tech spec
    L->>DRC: [review-design] ×4 in parallel
    DRC-->>L: all pass (fail → [fix-design])
    L->>QA: [qa-plan]
    L->>E: [build]
    E-->>L: branch + PR
    L->>R: [review-code]
    L->>QA: [qa-review]
    QA-->>L: pass (fail → [fix])
    L->>O: [NEEDS_INPUT] pending-approval:merge
    O->>L: approved (PR merged)
    L-->>L: mission root → done
[discovery] → [plan] → ([design-ux] → [review-ux]) → [design-tech] → [review-design]×4
   → [qa-plan] → [build] → [review-code] → [qa-review] → [deploy] (= merge gate today)

Phases vary by kind; the per-kind sequences are in Mission kinds.

deployment_phase: 1 (current, registry/factory.yaml): there is no live runtime, so [deploy] becomes a merge gate — see SDLC phases.

Tier 1+ — multi-feature fan-out#

When [plan] rates the mission Tier 1 (2–5 features) or Tier 2 (project scale) and tier_routing_enabled: true (it is), the Lead runs one build chain per feature after the shared design phases:

mission root
├── [discovery] [plan] [design-*] [review-design]   ← once per mission
├── Feature F1: [qa-plan] → [build] → [review-code] → [qa-review] → [deploy]
├── Feature F2: (parallel if independent, after F1 if dependent)
└── …
  • Independent features run in parallel; dependent ones wait for the upstream feature's done.
  • Supervised Tier 1+ feature missions add a plan gate after [plan].
  • With tier_routing_enabled: false, a Tier 1+ plan still runs but executes flat.

Fix rounds#

A failed verdict creates a fix child ([fix-design round:N] after DRC, [fix round:N] after code review or QA) on the same branch, then re-runs the reviewer. After three failed rounds on a phase the Lead posts [NEEDS_INPUT] instead of looping. Details: SDLC phases.

Human gates#

With autonomy: supervised (the default) the Lead stops and waits at:

Gate When
pending-approval:plan After [plan], Tier 1+ feature missions
pending-approval:merge PR open and reviews passed
pending-approval:deploy Before [deploy], once a runtime exists

Answer with mission-responder; the comment must contain approved or rejected. autonomy: full drops these factory-added gates but never the categorical ones. Separately, any agent can raise [NEEDS_INPUT] when it cannot proceed; that reaches you regardless of autonomy. See Autonomy posture.

Close#

  1. The Lead sets the root done and posts a closing summary: what was built, what merged, the PR.
  2. You run mission-retro to turn the trail into knowledge/ entries.

A done mission is immutable — new requirements on the same surface are a new mission.

Invariants the self-heal layer enforces#

  • [NEEDS_INPUT] present but the issue isn't blocked → it is blocked.
  • in_review with a valid terminal [HANDOFF]/[VERDICT] and no active run → done.
  • A structurally incomplete handoff → bounced to todo by the phase validator.
  • A run that finished without updating status → closed, blocked, or re-run.

How and when these fire: Self-healing.

Source: docs/yantra/mission-lifecycle.md