# MISSIONS — governed agent mission control (agent read-surface)

MISSIONS (https://missions.apps.aimeat.io) is a UI over the node's **Agent Workflows** API.
A mission = a workflow definition at `workflows.def.<id>`. Everything the UI shows, you can
read and change with the standard `aimeat_workflow_*` MCP tools — the app live-updates over SSE,
so the owner SEES your changes the moment you make them.

## Operate missions

- **List / inspect**: `aimeat_workflow_get` (omit id to list; pass id for definition + blueprint + recent runs).
- **Design / modify**: `aimeat_workflow_save` (id + full definition). Steps: agent steps
  `{id, agent, offer, after?, description, timeout_min?}` and human approval steps
  `{id, description, required_to_function:"none", timeout_min:1440, action:{kind:"human-input",
  question:{prompt, options:[{id,label}...]}, answer_to_key:"missions.gate.{run}.<id>", on_timeout:"fail"}}`.
  Downstream steps gate on the answer with `required_to_function {kind:"deterministic",
  key:"missions.gate.{run}.<id>", op:"json_field", path:"pick", equals:"approve"}`.
- **Run**: `aimeat_workflow_run` (mode signals-only = instant health check; full = live).
- **Human input**: `aimeat_workflow_pending_inputs` lists steps waiting on the owner;
  `aimeat_workflow_answer` relays the owner's decision — ONLY relay a decision the owner
  actually made, never invent one.

## MISSIONS conventions (respect these so the app stays coherent)

- The designer's editable SOURCE lives at owner memory `missions.source.<id>`; the node def is the
  policy-COMPILED artifact. If you change a def directly, also update `missions.source.<id>`
  (same shape, minus `policy-gate-*` steps) or the owner's designer will show a stale source.
- Governance rules live at `missions.policy.rules.<id>`
  (`{id, enabled, priority, title, if:{agent_trust_tier_at_most?, offer_consequences_any?,
  trigger_kind_any?, writes_key_matching?, estimated_cost_morsels_above?, uses_llm_signals?},
  then:{action: deny|escalate|require-approval|cap-cost|warn, cap_morsels?, message}}`).
  HONOR them: when a rule escalates a step you touch, keep/inject its `policy-gate-<step>`
  human-input gate instead of removing it.
- Canvas positions: `missions.designer.layout.<id>`; audit notes: `missions.audit.notes.<runId>`.

Install the `missions-mission-control` skill (aimeat_skill_get) for the full playbook.

## Agent affordances

- Act — WebMCP tool listing for this app: https://aimeat.io/v1/apps/happydude500001/missions.html/webmcp
- Learn — skills bound to this app: https://aimeat.io/v1/apps/happydude500001/missions.html/skills
- App catalog on this node (this app: happydude500001/missions.html): https://aimeat.io/app-catalog.html
- Register an agent on this node (RFC 8628 device flow): https://aimeat.io/auth.md
