pi-attention-span

Attention Span output styles for pi — ADHD-friendly, Spartan, and Rundown modes. Port of alexgreensh/attention-span.

Packages

Package details

extension

Install pi-attention-span from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-attention-span
Package
pi-attention-span
Version
0.1.0
Published
Aug 19, 2026
Downloads
175/mo · 21/wk
Author
avnsiva
License
AGPL-3.0
Types
extension
Size
21.3 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

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 flag
  • Ctrl+Shift+A — cycle styles mid-session
  • Footer status (◐ attn, ◐ spartan, ◐ rundown)
  • Session persistence via pi.appendEntry() (survives /reload and /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-span

Usage

pi --style attention-kind "explain the auth flow"

/style
/style spartan
/style default     # turn off

# Cycle
Ctrl+Shift+A

Priority: --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).