Use plan mode

Walk the agent through a change without side effects, then flip the switch to execute.

When to use it

Plan mode is the right fit for three moments a charm author routinely hits:

How to use it

> /plan
**Plan mode on.**  I will read the code, Juju state, git history,
and web, and produce a *Proposed changes* summary — but I won't
edit files, run shells, or deploy.  Flip back with `/build`.

> Reshape src/charm.py to use collect-status.

... the agent reads files, inspects the relation graph, and ...

## Proposed changes
- `src/charm.py`: replace the `update-status` handler with a
  `collect_app_status` observer on `CollectStatusEvent`.
- `tests/unit/test_charm.py`: delete the `test_update_status`
  cases and add coverage for `collect_app_status`.
- Run `make check` after the edits to confirm lint + types.

> /build
**Build mode on.**  Every tool is available again.  Resumed the
plan's *Proposed changes* section as context — the next turn
will execute against it.

What plan mode lets through

Plan mode is implemented as a stricter permission policy layered on top of whatever you already have configured. The allow-list is intentionally narrow:

Every other tool returns a refused ToolResult with a clear "Plan mode — tool is not available" message so the LLM knows to stop rather than retrying. MCP-provided tools bypass plan mode because they are gated by their own per-server allow-lists and are not inherently destructive; if you want to tighten those too, tighten the MCP config.

Capturing Proposed changes

While plan mode is on, Cantrip injects a short guidance block into the system prompt asking the agent to end each response with a ## Proposed changes section. When the agent produces one, Cantrip captures the body into state.plan_summary. The next /build splices that summary back in as an assistant-role message so the agent picks up where the plan left off — no re-planning from scratch, no re-reading files.

The heading is recognised case-insensitively at any heading depth (## through ######). A response without the section leaves whatever summary was captured before untouched, so a mid-plan clarification question does not blow away the earlier plan.

Status indicator

Every surface that shows a status bar tints it while plan mode is active:

Interaction with other guards

What plan mode is not