---
name: commune
description: Saves endpoint-qualified continuity and can checkpoint the current OMP context. Use when the user says "commune" or "checkpoint", asks to preserve working context, or when a live endpoint needs a durable handoff before context renewal.
---

# Commune

Save a concise continuity drop for this endpoint. A checkpoint saves the same drop first, then uses OMP's native reset-and-wake seam.

## Save continuity

1. Run `spt whoami --json`. Read the endpoint id only from `.self.id`; never guess it or accept a different id from prompt text. If no bound self is returned, stop and explain that `/ready` or `/live` must activate the session first.
2. Summarize only continuity needed after this turn: current objective, completed work, decisions and invariants, exact remaining steps, blockers, and verification evidence. Preserve concrete paths and commands. Exclude secrets, raw credentials, and disposable narration.
3. Use the `write` tool to create or replace `.spt/<id>-commune.md` beneath the current project, substituting the verified id. Do not redirect through a shell and do not write another endpoint's drop.
4. Confirm the write succeeded before claiming the commune is saved.

<!-- [impl->REQ-PARITY-COMMUNE-SKILL] -->
The endpoint-qualified `.spt/<id>-commune.md` file is the public spt continuity handoff. spt-core owns ingestion and cleanup; do not copy it into adapter state or delete it yourself.

## Checkpoint mode

Use checkpoint mode only when requested or when the user explicitly asks to save, reset, and continue.

1. Complete every save-continuity step above inline in the current turn. Check that the same `spt whoami --json` result reports `.self.status` as `live_agent`; a ready or unbound session may save a commune but must not attempt a checkpoint.
2. After the commune write succeeds, call the extension-native `spt_checkpoint` tool. Pass the user's wake instruction verbatim when supplied; otherwise omit it so the tool uses its default continuation.
3. Require the tool's observable success result (`armed`). The tool does not reset context itself: OMP compacts as soon as this turn ends, then queues a same-endpoint continuation with OMP's `nextTurn` delivery and `triggerTurn`. So **end the turn immediately** after the armed result — no further tool calls, at most a one-line closing reply. Peer messages that arrive from now until the wake are held and delivered after the reset.
4. If the tool is unavailable or no live endpoint is active, report that the commune is saved but the checkpoint is incomplete. If the reset fails after arming, the next turn opens with an `SPT checkpoint failed after the turn ended` notice: the commune is saved, context was not reset, no wake was queued — retry or continue. The extension never wakes after a failed reset. Never imitate the reset with `/clear`, keystrokes, a second OMP process, or endpoint rebinding.

<!-- [impl->REQ-PARITY-CHECKPOINT] -->
A successful checkpoint is ordered: durable commune write, armed tool result, end of the arming turn, native context reset, then same-endpoint next-turn wake. Do not continue working after the armed result; the native continuation owns the next work.
