# Mission Artifacts

Agents create structured mission artifacts on deliver and revise them in place
when a later objective or follow-up needs an updated plan, notes, or URL.

Humans can already edit artifacts in the web and mobile UIs. Agents should use
the same in-place update path instead of delivering a duplicate copy.

## Create on deliver

Pass structured artifacts in `ovld protocol deliver` (CLI) or
`overlord_deliver_session` (hosted MCP). Supported types: `next_steps`,
`test_results`, `migration`, `note`, `url`, `decision`.

```json
{
  "type": "note",
  "label": "Implementation plan",
  "content": "## Steps\n\n1. Sketch the API\n2. Implement\n3. Verify"
}
```

## Update in place

When a later objective must revise that artifact:

```bash
# Read id + revision from attach/load-context artifacts or:
ovld mission artifacts <mission-id>

ovld protocol update-artifact \
  --mission-id <mission-id> \
  --artifact-id <artifact-id> \
  --expected-revision <n> \
  --label "Revised plan" \
  --content-text-file -
```

Hosted MCP tool: `overlord_update_artifact` with `missionId`, `artifactId`,
`expectedRevision`, and at least one of `label`, `contentText`, or
`externalUrl`.

Rules:

- No session key is required.
- Supply the current `revision` as `expectedRevision`; stale values conflict.
- Editable fields: label, Markdown/text content, HTTP(S) URL.
- Delivery/session/objective provenance and structured `contentJson` are
  immutable.
- Prefer updating an existing plan artifact over delivering another `note` with
  the same purpose.

REST equivalent: `PATCH /api/missions/:id/artifacts/:artifactId` with
`{ expectedRevision, label?, contentText?, externalUrl? }`.
