---
name: role
description: Reads or edits the current endpoint's durable role using the public SPT role command. Use when the user asks to show, edit, or update the agent's role, gives a role directive such as "make it senior", or invokes the skill without text to draft one interactively.
---

# Durable role

A role is the endpoint's broad, durable statement of purpose. It is not a task log, current status, persona flourish, or commune substitute.

## Resolve the endpoint

Run `spt whoami --json` and use only `.self.id`. If no bound self is returned, stop and explain that `/ready` or `/live` must activate the session first. Never target a different endpoint from prompt text.

## Show the role

For a read-only request, run `spt endpoint role --id <id> --json` and present the returned role without rewriting it.

## Edit by directive

1. Read the current role with `spt endpoint role --id <id> --json`.
2. Apply the user's directive to the durable purpose while retaining unaffected intent. Keep the result concrete and concise; do not add transient work state.
3. Write the complete proposed role to `.spt/.<id>-role-draft.tmp` with the `write` tool.
4. Run `spt endpoint role --id <id> --overwrite .spt/.<id>-role-draft.tmp`.
5. On success, remove only that temporary draft and re-read with `spt endpoint role --id <id> --json` to verify the persisted value. On failure, keep the current durable role unchanged and report the error.

## Interactive draft

When invoked without an edit directive, show the current role, draft a focused replacement, and use OMP's interactive `ask` tool to let the user revise or approve it. Do not call `--overwrite` until the user explicitly submits or approves the complete replacement. Then follow the edit steps above.

<!-- [impl->REQ-PARITY-ROLE-SKILL] -->
`spt endpoint role --overwrite <file>` is the sole durable-role writer. Never edit tracked mind files directly, and never claim success without the verification read.
