pi-attention-span
v0.1.0
Published
Attention Span output styles for pi — ADHD-friendly, Spartan, and Rundown modes. Port of alexgreensh/attention-span.
Maintainers
Readme
pi-attention-span
Port of alexgreensh/attention-span for the pi coding agent.
Output styles that change how the agent talks to you, not how it codes. Answer-first, plain English, easy to skim. Same engineering ability underneath — only the delivery changes.
Styles
| Style | Best for | |-------|----------| | attention-kind | ADHD, attention fatigue, anyone tired of walls of text | | spartan | Maximum signal, zero warmth, heads-down work | | rundown | Briefings, standups, progress updates (TL;DR + checkboxes) |
Features
/style— interactive picker or direct switch (/style spartan)--style attention-kind— start with a style via CLI flagCtrl+Shift+A— cycle styles mid-session- Footer status (
◐ attn,◐ spartan,◐ rundown) - Session persistence via
pi.appendEntry()(survives/reloadand/resume) - Optional default in global/project config
- Deliverable purity is in the style prompts themselves
Install
# Quick test
pi -e /path/to/pi-experiments/attention-span/index.ts
# Auto-load (global)
mkdir -p ~/.pi/agent/extensions
cp -r /path/to/pi-experiments/attention-span ~/.pi/agent/extensions/attention-span
# Or as a package
pi install ./attention-spanUsage
pi --style attention-kind "explain the auth flow"
/style
/style spartan
/style default # turn off
# Cycle
Ctrl+Shift+APriority: --style > last style in this session > config defaultStyle > off.
How it works
Each style is appended to the system prompt on before_agent_start. A marker comment prevents double-injection.
Live style is stored as a custom session entry (attention-span). That is the documented way to keep extension state across reloads.
Config
Optional default only. Write these files yourself:
~/.pi/agent/attention-span.json (global) and <cwd>/.pi/attention-span.json (project, trusted projects only):
{
"defaultStyle": "attention-kind"
}Project config wins over global. CLI --style wins over both.
License
AGPL-3.0 (same as upstream).
