# Missions [← Docs index](./README.md) Missions provide structured planning across multiple related tasks. > Roadmaps are a separate lightweight planning model (`Roadmap → RoadmapMilestone → RoadmapFeature`) used for standalone planning. Missions remain the richer execution-oriented hierarchy when you need slice activation, autopilot, and feature-to-task delivery tracking. ## Mission Hierarchy Fusion models delivery as: **Mission → Milestone → Slice → Feature → Task** Example: ```text Mission: Improve Reliability Milestone: Stabilize execution pipeline Slice: Retry and recovery hardening Feature: Stuck task recovery improvements Task: FN-210 Task: FN-214 ``` ## Mission → Goal linkage Missions and goals are stored independently, with an optional many-to-many linkage persisted in the `mission_goals` join table. - Columns: `missionId`, `goalId`, `createdAt` - Primary key: `(missionId, goalId)` - Foreign keys: `missionId → missions.id`, `goalId → goals.id` - Delete behavior: both foreign keys use `ON DELETE CASCADE`, so removing either parent deletes only the corresponding join rows - Reverse lookups are indexed via `idxMissionGoalsGoalId` `MissionStore` owns the persisted linkage CRUD surface: - `linkGoal(missionId, goalId)` — idempotently create a link and return `{ missionId, goalId, createdAt }` - `unlinkGoal(missionId, goalId)` — remove a link and report whether anything changed - `listGoalIdsForMission(missionId)` — list linked goals in deterministic creation order - `listMissionIdsForGoal(goalId)` — list linked missions in deterministic creation order ### No-backfill decision Existing missions are intentionally **not** auto-linked to any goals. Fusion does not run a migration backfill for pre-existing missions, so a mission with no links should be treated as genuinely unlinked until an operator or agent associates it with one or more goals. ### Manual linkage workflow Mission ↔ goal links are created and removed deliberately as part of normal planning and operations work. Read surfaces can show current associations, and operator-facing write surfaces can add or remove links when a mission should explicitly support a goal. The workflow is intentionally manual so teams can choose the correct strategic relationship per mission instead of inheriting guessed links from older data. ### Unlinked mission indicator Mission Manager shows an **Unlinked** indicator on active mission cards when `linkedGoalCount` is zero. This is a read-only attention badge so operators can quickly find active missions that still need an explicit goal association. ## Creating Missions ### Mission base branch defaults Missions support an optional `baseBranch` field. When set, feature triage (`triageFeature`) and slice triage (`triageSlice`) inherit this value as the task `baseBranch` whenever a triage request does not explicitly provide a base branch override. Precedence order during triage: 1. Explicit triage `branchSelection.baseBranch` / `baseBranch` 2. Mission `baseBranch` 3. Project default branch resolution ### Mission branch strategy defaults Missions can also persist a `branchStrategy` used whenever triage is triggered without explicit branch options (manual triage and autopilot triage). Supported modes: - `project-default` (or absent): shared mode; each triaged feature gets a distinct per-task working branch (for example `/`) while the shared branch remains the mission group merge target - `auto-per-task`: sets `branchAssignment.mode = "per-task-derived"` (distinct per-task working branches with no shared mission group merge target) - `existing`: shared mode using `branchSelection.mode = "existing"` with `branchName` as the shared merge-target branch - `custom-new`: shared mode using `branchSelection.mode = "custom-new"` with `branchName` as the shared merge-target branch The Mission Manager create/edit form exposes this as **Branch strategy** plus a conditional **Branch name** field for `existing` and `custom-new`. ### Shared branch-group invariant across entry points Across all branch entry points (planning/subtask creation, mission triage, and New Task `shared-group` creation), Fusion enforces one rule: - Persist a **per-task working branch** on each task (the checkout branch used for execution). - Persist the shared branch only as the **group merge target** via `branchContext.groupId` → `branch_groups.branchName`. - Never persist the shared branch itself as a task working/checkout branch. This keeps member execution isolated per task while still routing member landings into a single shared integration branch. ### Dashboard Use the Mission Manager UI to create missions and build hierarchy interactively. On mobile, Mission Manager surfaces the primary **Plan New Mission** CTA at the top of the mission list for faster access, while desktop keeps the split-layout sidebar CTA anchored in the bottom action region as the primary entry point. Mission detail refreshes now preserve expanded milestone/slice state and keep the selected milestone expanded, so persisted milestone acceptance criteria remain visible across live updates. Mission, milestone, slice, and feature read-only text surfaces in Mission Manager render Markdown (GFM) for descriptions, verification, and acceptance criteria; edit forms continue to use raw plain-text `