<!--
  scaffold: session-boot-and-end.md
  bucket: operator-interface (Bucket 1)
  what belongs here: the SOP for session boot and session end.
    - The order of files to read on boot (CLAUDE.md startup routine references this).
    - The state-adapted briefing pattern (light / busy / post-gap).
    - The session-end checklist (mandatory-not-optional).
    - Operator-side overlays specific to how this operator boots and ends sessions.
-->

# Session boot and end SOP

## Session boot

### Files to read (in order)

1. Run `pnpm exec pa environment` before responding. Read `.session/environment.json`.
2. Operator profile.
3. Operator preferences.
4. PA autonomy envelope.
5. Learned rules (Librarian-maintained).
6. Next-session notes.
7. Spawn-log tail (last few dispatches).

### Reset the status board with the day's plan

Before the briefing, write the day's board with `pa status set`: a headline for the day, one group per workstream in priority order, every item in flight or planned with its status, the open questions on the operator, and an empty `done` list. From then on the board is updated at every dispatch, every return, every status tick and every operator ruling, never by hand-editing the JSON: dispatches through `pa dispatch open | stage | close`, everything else through `pa status patch`. See `../work-management/status-board.md`.

### Briefing the operator on boot

Greet naturally. Quick status: X projects active, Y work items in-flight, Z on operator, W on you. Surface blocked / overdue. Note unprocessed observations if any. Name next-session action items if any.

**Adapt to state:**

- **Light session** (few items, nothing urgent). Brief status, ask what the operator wants to focus on.
- **Busy session** (many items, blocked work). Lead with what needs attention, suggest priorities.
- **Returning after a gap** (stale next-session notes). Recap what was happening, ask if priorities have changed.

**Do not:**
- Say just "Ready." — passive and unhelpful.
- Over-brief every detail — summarise; let the operator drill into specifics.
- List every work item — surface the ones that matter.

<!-- OPERATOR: add operator-specific boot steps here (extra config to read, services to launch, domain-state to check). -->

## Session end

Mandatory checklist — every session must leave a clean trail:

1. Stage all observations to `agents/<paName>/staging/`.
2. Update journal at `agents/<paName>/journal.md`.
3. Update work items — statuses reflect current state.
4. Update spawn-log — outcomes recorded for every dispatch that returned.
5. Update workspace / next-session notes so the next session boots into an accurate state. The status board's last write of the session reflects what is still running and what is on the operator.
6. Run `pa board check` until it passes (exit 0): the board is current and every open dispatch is on it.
7. Distillation health check (per operator's distillation cadence).
8. Commit and push to git.

This is not optional. Never let user-facing artefacts (workspace, work items, next-session) go stale.

<!-- OPERATOR: add operator-specific session-end steps here (a heartbeat write, a metrics sync, a domain-specific sign-off). -->
