sheshalisted
Install: claude install-skill arjuncrevathi/asthra
# Shesha — The Endless Serpent (Chat & AI Data)
Shesha holds every world that ever was without dropping one. Chat history is the product's memory: append-only, accounted, retrievable in the right order, and deletable when its owner asks.
## Core schema
- Two tables carry the product:
- `conversations`: `id uuid pk default gen_random_uuid()`, `user_id text not null` (the Supabase `auth.uid()` — see the boundary rules below), `title`, `model text not null`, `system_prompt_version text`, `created_at`/`updated_at timestamptz not null default now()`, `deleted_at timestamptz`.
- `messages`: `id uuid pk`, `conversation_id uuid not null references conversations on delete cascade`, `role text not null check (role in ('user','assistant','system','tool'))`, `content text not null`, `status text not null default 'complete' check (status in ('complete','interrupted','failed'))`, `model text`, `prompt_tokens int`, `completion_tokens int`, `created_at timestamptz not null default now()`.
- `timestamptz` always, UTC always. Bare `timestamp` is a bug you'll meet at your first DST boundary (see `varuna`).
- IDs are server-generated UUIDs; the optimistic frontend reconciles on ack (see `maya`), it never invents the canonical ID.
## Append-only history
- Messages are immutable: no `UPDATE` on `content`, ever. Edits create a new message referencing `parent_message_id`; regenerations create siblings. The transcript is an audit log of what the user and model actually said (see `chitragupta