Docs
Everything Sprat 0.4.7 does, for reference. New here? Install it, run it once with SPRAT_DRY_RUN=1, and come back.
On this page
How it works
Sprat is one process on your machine that watches every Claude Code session, knows where each project stands on its roadmap, and notices when an agent or a project stops moving. For each stall it starts a PM run that investigates and ends in one decision: unblock the agent, answer its question from a written decision, hand it the next unblocked item, resume work, wait, or escalate to you. Code checks every decision against guardrails before anything is delivered, and 30 minutes later Sprat checks whether it worked.
Sprat never edits your application code. It moves agents with messages and roadmap
marks, and the only file it writes in a project is .sprat/roadmap.md, when you say so (plus
.sprat/checks
and a Stop hook if you switch on Verify).
Commands
sprat |
Open the Pass: every project, what needs you, what Sprat is doing. |
sprat serve |
Run the observer and PM as a daemon, so detection, follow-up and the brief continue with the board closed. The board becomes its client. |
sprat status |
One line per project: roadmap position, last progress, live sessions. |
sprat brief |
Today's brief, one lowercase line per project. |
sprat install-agent |
macOS: write a launchd agent that starts sprat serve at login. Prints how to load and remove it. |
sprat attach [path] [--yes] |
Switch on Verify for a project: shows the Stop hook it will add to the project's .claude/settings.json and asks first (--yes skips the question). |
sprat detach [path] |
Remove exactly Sprat's Stop hook. .sprat/checks stays. |
sprat legacy |
The earlier V1 tool, kept for existing users. Not covered by these docs. |
Environment
SPRAT_DRY_RUN=1 |
Everything runs, investigations included, but nothing is typed into any session and no session is started. What would have been sent goes to <data>/v4/dry-run.log. |
SPRAT_CLAUDE_DIRS |
Colon-separated Claude config directories to watch. Replaces discovery of ~/.claude*. |
SPRAT_DATA_DIR |
Where Sprat keeps its data. See data and privacy for the defaults. |
NO_COLOR |
No colour. Every state is still a word or a glyph. |
SPRAT_ASCII=1 |
ASCII glyphs and rules only. |
SPRAT_REDUCED_MOTION=1 |
No ticket slide on the rail. |
The board
The board is called the Pass. It is one column of bands, read top to bottom, with no panes. Detail opens in place under what you selected, never in a modal.
- Header
- The time and today's PM spend against the daily cap. The fish faces you (<•<) while a yours ticket is on the rail, swims (><>) while a PM run is working, and is still otherwise.
- Now
- What Sprat is doing this moment (moving a session to another account, sending your message), with its current step and how long it has taken. ✓ when it finished, ✗ with the reason when it failed. Only there while something runs or just ended.
- On the rail
- Tickets: yours first, then sprat, oldest left. Each shows an age chip, the owner, the project, the obstacle or what Sprat is doing, and the action with its key. The chip steps from quiet to amber to red as the evidence ages.
- The line
- One row per project, under column headings: phase and done/total, a bar with one cell per item, the item its agents are on, one glyph per session, what Sprat is doing for it, the autonomy level, and when it last moved. Worst state first.
- Served today
- What Sprat resolved and what progressed, newest first, each with its source. ⏎ opens the PM run behind a line; u reverts its roadmap writes.
- Footer
- The keys for what is selected.
⏎ on a project turns the board into that project: its rail, its roadmap, its sessions and what moved in the last 7 days. ⏎ on a session opens the session itself: talking to a session.
Keys
| Key | Board | Ticket open | Project | Session |
|---|---|---|---|---|
| ←→ h l | move along the rail | previous / next ticket | ||
| ↑↓ j k | move down the line | move | scroll the transcript | |
| ⏎ | open ticket or project | open the session | open item or session | send your message (transcript: expand a line) |
| esc | fold | back | drop your message, or back | |
| f | send the selected ticket's suggested message | send | send (project rail) | |
| e | edit the selected project's roadmap | edit the message inline | edit roadmap in $EDITOR | |
| E | edit the message in $EDITOR | |||
| c | copy the message | |||
| x | dismiss, or mark a yours ticket done | same, and asks a reason | same | |
| u | revert the PM run's roadmap writes | |||
| m | mute this rule for this session | |||
| A | cycle the selected project's autonomy | cycle autonomy | ||
| w r | write / re-read the selected project's roadmap | write / re-read roadmap | ||
| a | activity: everything Sprat did | this project's activity | ||
| b | brief | project brief | project brief | |
| type | write a message to the session | |||
| 1–9 ↑↓ ⏎ | answer a dialog the session shows | |||
| tab | its live terminal ↔ its transcript | |||
| ctrl-o | switch to the session's own cmux tab | |||
| / | command line | |||
| ? | explain this screen | explain | explain | explain |
| q | quit |
The command line
/ on the board opens it.
/settings |
autonomy, budgets, accounts |
/brief |
one line per project |
/findings |
every open finding |
/nudges |
messages sent and their follow-up |
/add <path> |
add a project by path |
/stats |
spend, PM runs, search queries, how Sprat is doing |
Glyphs
| Glyph | ASCII | Means |
|---|---|---|
| ● | * |
session working |
| ◌ | o |
session idle |
| ⏸ | || |
waiting on you |
| ⚠ | ! |
stuck |
| · | . |
session ended with work left |
| ▸ | > |
current phase or item |
| ✓ | v |
done |
| ○ | - |
to do |
Narrow and wide
The layout follows the pane's width and never scrolls sideways. At 120 columns and
wider the rail holds four tickets and the line adds a last-progress column; from 84 it
holds three; from 60 tickets become one-line strips; under 60 strips take two lines and
each project takes two rows. In a short pane, served today goes first; the rail is never
cut. Colour is never the only signal: NO_COLOR
and SPRAT_ASCII=1
keep every state readable.
Talking to a session
A session's screen is the session. Sprat mirrors its own terminal from its cmux tab,
twice a second, inside a frame titled in Claude's coral: Claude Code · cafe-networks-4b · ~/.claude. Inside the frame
is Claude, with its lines coloured the way Claude colours them; outside it is Sprat.
tab
switches to the condensed transcript: what you said, what the agent said, its tool
calls, failures in red.
Type, and a message line opens at the bottom. ⏎
sends your words as typed, with no [sprat]
label. If the session isn't ready (text already in its prompt, a dialog open), Sprat
waits up to two minutes and the NOW band shows it waiting, then sent or why not. When
the session asks something (allow a command, pick an option), answer it from the
board: 1–9, ↑↓, ⏎.
ctrl-o
switches to the session's own tab.
The mirror needs cmux. Without it the screen shows the transcript, and messages go through tmux or the clipboard.
Several accounts
Sprat finds every Claude config directory on the machine: ~/.claude, every ~/.claude-*, and the
CLAUDE_CONFIG_DIR
of any running session wherever it points, remembered after it exits. Accounts that
share a sessions/
folder through symlinks are told apart by each process's own environment.
Several accounts can work on one project. A project counts as limited only while all
of them are. When a session's account runs out and another account that has worked
on the project is free, its ticket offers f continue on <account>. Sprat copies the conversation
into that account if it keeps its own projects/
folder, opens a new cmux workspace, continues the conversation there, and checks
that Claude really started before it clears the ticket. The NOW band shows each step.
What Sprat is doing
Every piece of work Sprat does runs as its own process and says what it is doing. The NOW band under the header shows each job while it runs and how it ended. A key you press answers at once with what is happening; the board never waits on Sprat.
a
opens the activity screen (from a project, that project's): a timeline of jobs, PM
investigations, messages sent, findings and sessions starting or ending; Sprat's own
processes, one per session and one per project, each with its mailbox; and the
programs it runs to look at your machine (ps, git, cmux, claude) with how often and how long they take.
Help
? on any screen explains that screen: what it is for, every part of it drawn the way the screen draws it (the age chip's colours, the session glyphs, the bar), and its keys, named by what they do. The first time you open the board it says so.
Autonomy levels
| Level | Sprat… | Default for |
|---|---|---|
watch |
Detects and investigates. Acts on nothing. | Projects you mark sensitive. |
propose |
Puts every decision on the rail for you to send with f. | A newly discovered project's first 24 hours. |
act |
Delivers unblocks, answers from written decisions, reassignments and waits itself, and ticks items it verified done. Escalations and owner notes go on the rail. | Every project after its first day. |
act+resume |
As act, and starts a session itself for a resume: claude in a new worktree, headless, with the resume prompt, within the project's budget. | Opt-in, per project. |
The level shows on each project's row. Turning a project down to
propose
is recorded, and Sprat does not suggest raising it again for a week.
What stays yours
These always become a yours ticket, whatever the autonomy level:
- Credentials, accounts, money
- Keys, certificates, sign-ins, purchases, anything paid.
- Scope
- Adding, removing or reordering roadmap items. The PM may hand out the next unblocked item in the same phase; anything beyond that is a proposal to you.
- Irreversible or outward-facing actions
- Push, deploy, publish, send, delete data, migrations on shared databases. A Sprat message may never ask an agent to do one.
- Questions nobody has answered in writing
- Sprat answers only when it can cite a written decision. A judgement call is yours; Sprat's opinion goes on the ticket, labelled as its suggestion.
- Low confidence
- Any decision the PM rates low is shown to you, not acted on.
When you clear a yours ticket with x, Sprat asks once whether the blocked item can be unblocked, and if so hands it back to the next free session on the project.
Guardrails
The PM's decision is an input. These checks run in code before anything is delivered.
- Rations
- At most one message per session per 20 minutes, and three PM runs per finding. Then it escalates to you.
- Budgets
- $0.50 and 20 turns per PM run, $3 per project per day, $15 for all projects per day (defaults). At the cap Sprat drops to propose for the rest of the day and says so in the header.
- Content
- A message asking for anything on the yours list (push, deploy, delete, credentials, a new item) is refused, matched by rule as well as by the PM's own declaration.
- Roadmap writes
- Only blocked marks with a reason, and done ticks backed by a commit or a passing check. Each one is a separate event you can revert with u.
- Never twice
- The same message never goes to the same session twice, and the same answer is never given twice for one question.
- You are typing
- Anything you typed in a session in the last 2 minutes holds every delivery to it until it is quiet.
Stall rules
Every finding cites evidence: a transcript line, a commit, a file and its time. The thresholds below are the defaults.
waiting on you · needs you
The session is idle and its last turn ends in a question to you, or a pending AskUserQuestion, for more than 10 minutes.
In plain words: An agent asked you something and is waiting.
permission prompt · needs you
A tool call has no result and the session has been idle for more than 5 minutes.
In plain words: An agent is stuck on a permission dialog.
API errors · needs you
Two or more API errors in the last 10 assistant records that are not a usage limit (auth, overload, billing).
In plain words: Claude itself is failing for this session.
usage limit · scheduled
The session's last assistant record is a usage-limit message with a reset time.
In plain words: A wait with a known end. Sprat resumes it; see usage limits.
error loop · stuck
The same error (command plus first error line, digits and paths stripped) in 3 or more tool results within 30 minutes, with no relevant file changed between them.
In plain words: Retrying the same failing thing.
edit churn · stuck
One file edited 6 or more times in 20 minutes while the last test run is failing.
In plain words: Editing in circles.
spinning · stuck
Busy for more than 45 minutes with no file change, commit or tick.
In plain words: Working hard, landing nothing.
roadmap stalled · stalled
The project has an active item, no progress for 48 hours, and no live session on it.
In plain words: Nobody is working on what is next.
left mid-step · stalled
A session ended with uncommitted changes or an unfinished plan step, and no PAUSE.md newer than its last activity.
In plain words: Work was dropped halfway, with no handover.
claimed done, not done · stalled
The last turn says done, complete or finished, but the bound item is unticked or the last test run failed.
In plain words: The agent says it finished. The evidence disagrees.
idle with work left · stalled
Idle for more than 30 minutes, the last turn is a summary rather than a question, and the bound item is not done.
In plain words: The agent stopped early.
- One finding per rule per session per evidence set. New evidence updates it.
- Dismissed (x, with an optional reason) stays dismissed until the evidence changes.
- A question asked of you goes to the PM first: if a written decision answers it, Sprat answers. Permission prompts and API errors come straight to you.
- Anything you typed in a session in the last 2 minutes suppresses every rule for it.
- An unreadable transcript shows as unreadable, and no rule fires on guessed state.
The PM
One PM run per finding: a claude -p
agent Sprat starts in the project's directory with the toolkit below, a budget, and a
structured decision to return. Sprat keeps one PM session per project per day and
resumes it for that project's next finding, so it remembers what it already tried.
The toolkit
- The evidence
- The finding, the condensed transcript tail, the failing lines.
- The roadmap
- The active item, what depends on it, what is unblocked, and the decisions already written in your specs and plans.
- Memory
- The project's CLAUDE.md, Claude's auto-memory for the project, docs/PAUSE.md, and your MemPalace if you run it.
- Fleet history
- The same error in any of your other projects' transcripts, and the turns that fixed it.
- The code
- A read-only look at the repository and its git history.
- Research
- Docs, issue trackers, changelogs and error messages on the web.
- A check
- Your test or build command, run in a throwaway worktree, never in the agent's checkout. Allow-listed per project.
The PM gets no Edit, no Write and no general shell: only read tools, git log/show/diff/status, web search and fetch, and Sprat's own
tools (roadmap_get, roadmap_unblocked, roadmap_mark, fleet_search, run_check).
Decisions
- unblock
- Sends the agent the fix or the missing fact, where it came from, and the next step.
- answer
- Answers the agent's question from a decision you already wrote down, quoting where ("spec-v3 §5: Postgres, not SQLite").
- reassign
- Marks a blocked item blocked in .sprat/roadmap.md with the reason, and hands the agent the next unblocked item in the same phase.
- resume
- Writes a resume prompt for a project with an active item and no live session. Under act+resume, Sprat starts the session itself.
- wait
- No message. The agent is making real progress the rule misread; the finding is snoozed with the reason.
- escalate
- A yours ticket on the rail, with everything the PM already ruled out.
A decision that cites no evidence is discarded and retried once, then escalated. A reassignment can carry an owner note: the agent moves on, and the one thing only you can do lands as a small yours ticket.
Follow-up
Thirty minutes after delivery, Sprat checks whether the finding still matches and whether progress followed. Resolved: the ticket leaves the rail and a line goes into served today. Unresolved: the next PM run starts with what was tried. After three runs it escalates to you with the whole history.
Roadmaps
Sprat reads each project's roadmap from these sources, highest authority first:
-
.sprat/roadmap.md: lines you edited win over everything below. -
docs/PAUSE.md: its ordered list of what to continue is the current position when it exists, and its age is shown. -
Plan files:
docs/superpowers/plans/*.md,docs/plans/*.md,PLAN.md,TODO.md,ROADMAP.md. Each heading with- [ ]items is a phase; each checkbox an item. -
Specs: numbered phase or build-sequence sections in
docs/spec*.md. - Git history: commits, merged branches and PRs, as progress evidence only.
Sprat proposes a roadmap from these. Until you press w on the project to write it, the board marks it unconfirmed and its position inferred.
# Roadmap: cupful <!-- sprat: edit freely; lines you change are never overwritten --> goal: Cafe networks share one loyalty balance across venues due: 2026-12-15 ## C · Cafe networks [active] source: docs/superpowers/plans/2026-11-14-cafe-networks.md - [x] schema + migration - [x] network admin CRUD - [ ] shared points ledger <!-- branch: cafe-networks --> - [ ] cross-cafe redemption
- Sync is one-way per line: an item with a source is re-synced when the source changes, unless you edited that line.
- Sprat never adds an item on its own. It may suggest one in the project view.
-
<!-- branch: x -->binds an item to a branch: sessions on that branch or its worktree show against the item, and their commits count as its progress. -
Position is the first phase with an undone item and its first undone item. Velocity is
items done per active day over 14 days; it becomes a forecast only against a
duedate. - Progress is something that landed: a ticked checkbox, a commit on a bound branch, a PR, a done mark. Edits and test runs do not count.
-
Whether
.sprat/is committed or ignored is your choice per project.
Usage limits
-
Sprat reads the reset time and zone from the limit message itself. If the message
has no time, it shows
limit · reset unknownand probes nothing. - The limit is per account, meaning per Claude config directory. Every live session on that account is marked limited, and Sprat's own PM runs on it pause too.
- A minute after the reset, each session that was mid-task gets a continue message naming its roadmap item and the last unfinished step. Idle sessions are left alone.
- Sessions resume one at a time, a few minutes apart, highest roadmap priority first. The order shows on the rail before the reset.
-
A session that died meanwhile becomes a resume: Sprat starts it under
act+resume, otherwise it is a yours ticket with the prompt ready. -
A limit belongs to the login that hit it.
/loginto another account, or any session on that account working again before the reset, resumes the paused sessions straight away. -
When another of your accounts is free, the ticket offers
f continue on <account>: see several accounts.
On for every autonomy level except watch.
Delivery
cmux |
Finds the session's pane, reads it, and types the message only when the prompt is empty and no dialog is open. |
tmux |
The same empty-prompt check, through tmux. |
| headless resume |
For a dead session only, under act+resume
or a limit resume: claude --bg --resume. Never on a live session.
|
| clipboard | Everything else: the message is copied and the session named, for you to paste. |
Every message starts with [sprat], so you and the agent can tell
who sent it, and ends with the roadmap item it serves. An answer you send yourself is
marked [sprat, from the owner].
Verify
Verify lets Sprat refuse a session's stop while the project's own checks fail. It is off until you attach it, per project.
sprat attach ~/code/cupful
-
Attach
shows the exact Stop hook it will merge into
<project>/.claude/settings.json(never your user-level settings), asksy/N, and leaves every other key and hook alone. Attaching twice changes nothing. -
.sprat/checks
is written if missing: a commented template plus one detected default
(
mix test,npm test,flutter test,cargo test,go test ./...,pytest). Each non-comment line is a check. The same lines widen what the PM may run. - The checks run one after another in the session's own checkout, with no shell, 300 seconds each and 540 in all.
- The decision. No checks: allow. A repeat stop with the working tree unchanged since Sprat's last refusal: allow, because Sprat never blocks twice on the same evidence. Four refusals in a row: allow, and bring it to you. All checks pass: allow. Otherwise refuse, with each failing check, its exit code, the first failing lines, what passed, and one next action.
- A check that cannot start (command not found) is yours to fix and never blocks on its own. If the hook errors, it prints nothing and the stop goes through.
-
Every decision is a line in
<data>/v4/verify.log, and a refusal shows in served today.
Known limits.
An agent can edit .sprat/checks
itself and Verify will not notice. In a project that is not a git repository, a repeat
stop is always allowed.
sprat detach ~/code/cupful
The brief
One lowercase line per project: what moved, what is stuck, what needs a decision, with
positions from the roadmap. Press b, type /brief, or run sprat brief; it also
arrives once a day as a desktop notification. Every fact in it traces to a recorded
event.
brief · mon 23 nov · 9 projects · 4 items done yesterday · 6 nudges, 5 resolved cupful: C 3/9; cafe-networks-4b waiting on you 18m (network_id column) liftlog-ios: B 5/10; signing cert missing, sprat moved the agent to B.5; you: import the cert dreamboard: stalled 2 days at 2.3 (onboarding copy); resume prompt ready net: 2 decisions for you, 1 resume, 5 moving
Demo data.
The daemon
Without a daemon, the board runs the observer itself while it is open.
sprat serve
moves it into a background process so detection, PM runs, follow-ups and the brief
continue with the board closed; the board then attaches to it as a client. Only one
observer runs per machine. A second exits with a message naming the first.
sprat install-agent
writes ~/Library/LaunchAgents/dev.sprat.serve.plist
(macOS) and prints how to load and remove it. The daemon's log is <data>/v4/serve.log.
Sprat polls every 2 seconds rather than watching files, reading each transcript from where it stopped last time.
Data and privacy
Sprat is local: one user, one machine. Its data lives in
~/Library/Application Support/sprat
on macOS and ~/.local/share/sprat
on Linux (or $SPRAT_DATA_DIR):
sprat.db | the SQLite store: sessions, roadmaps, findings, messages, PM runs |
v4/serve.log, v4/serve.pid | the daemon |
v4/dry-run.log | what a dry run would have sent |
v4/verify.log, v4/verify/ | Verify decisions and per-session state |
It reads, and never writes to, your Claude Code session registry and transcripts. In
your projects it writes only .sprat/
files and, if you attach Verify, the project's Stop hook.
What leaves the machine
-
The transcript excerpt a PM run needs, sent to Claude through
claude -pon your own subscription: the provider the session already uses. PM runs use the account of the project's config directory. -
The PM's web search queries. It is told never to put code, secrets, customer data or
non-public project names in them; every query is logged and listed in
/stats.
Nothing goes to sprat.dev, and installing or running Sprat needs no account. An account on this site holds an email address for release notices and nothing else.