---
name: session-init
description: >
  Label or relabel the current UV Suite session — sets name, kind (long-running
  vs outcome), purpose, and priority (low/med/high). Metadata appears in the
  watchtower dashboard. Use when you skipped the launcher prompt or want to
  rename a session mid-flight.
argument-hint: "<name> | --kind long|outcome | --purpose <text> | --priority low|med|high | show | clear"
user-invocable: true
allowed-tools:
  - Bash("$CLAUDE_PROJECT_DIR"/.claude/hooks/session-meta.sh *)
---

## Apply /session-init $ARGUMENTS

!`HELPER="$CLAUDE_PROJECT_DIR/.claude/hooks/session-meta.sh"; ARGS="$ARGUMENTS"; if [ -z "$ARGS" ] || [ "$ARGS" = "show" ]; then "$HELPER" show; elif [ "$ARGS" = "clear" ]; then "$HELPER" clear; else FIRST=$(printf '%s' "$ARGS" | awk '{print $1}'); REST=$(printf '%s' "$ARGS" | sed 's/^[^ ]* *//'); case "$FIRST" in --kind) "$HELPER" set-kind "$REST" ;; --priority) "$HELPER" set-priority "$REST" ;; --purpose) "$HELPER" set-purpose "$REST" ;; --name) "$HELPER" set-name "$REST" ;; *) "$HELPER" set-name "$ARGS" ;; esac; fi`

## Instructions

Show the user the output of the command above. Do not add commentary — the
command itself confirms what changed. The dashboard reflects changes within
a few seconds (next event refreshes session metadata).

## Usage

```
/session-init                                  show current values
/session-init show                             show current values
/session-init <free-text name>                 set the name (default action)
/session-init --kind long                      set kind: long-running
/session-init --kind outcome                   set kind: outcome
/session-init --priority high                  set priority: low | med | high
/session-init --purpose <free text>            set the purpose
/session-init clear                            clear name, kind, purpose, priority
```

## Notes

- The session id is generated by `uv.sh` at launch and exported as
  `UVS_SESSION_ID`. If you launched `claude` directly, this falls back
  to an `ad-hoc-<timestamp>` id.
- Metadata lives at `.uv-suite-state/sessions/<id>.json`.
- Persona is captured at launch time and is not editable from here —
  re-launch with a different `uv` persona to change it.
- Each invocation sets one field at a time. Run multiple times to set more.
