A personal pi coding-agent harness, built by hand in plain TypeScript. Everything that shapes agent behavior is written here rather than installed as a package.
- git-info — branch dirty-count and open-PR info above the input;
/pr. - ask-user — the model asks 1-5 multiple-choice questions in one form
(single/multi-select, free-form answers,
Tabattaches a note). - background-terminals —
bg_start/bg_status/bg_list/bg_killfor long-running processes;/psto inspect. - file-search —
fdandrgas first-class tools. - subagents — children with markdown roles (
agents/*.md) on three backends: in-process pi (default), real Claude Code (Agent SDK), and real Codex (app-server); interactivesubagent_send;/subagents. - workflows — model-authored orchestration scripts run in a
sandboxed child; Claude Code-compatible DSL;
/workflows,workflow_statusfor polling background runs. - web-access —
web_fetch(keyless, local HTML→markdown) andweb_search(Exa; setEXA_API_KEY). - browser — a headless chromium as first-class tools
(
browser_goto/_snapshot/_click/_type/_screenshot/_console/_evaluate/_requests/_close) on aria snapshots with[ref=eN]element references; screenshots render in the terminal. Heavy work (mocking, tracing, auth state) goes through playwright scripts — see thebrowser-debuggingskill. Built on the playwright library, no MCP. - todos —
todo_write(Claude Code TodoWrite semantics); live checklist above the input. - session-title — a cheap model names each session from its first
prompt (tab title +
/resumelabel). - ui-customization — header/footer/theme chrome, sticky input, working timer, status-noise suppression.
MCP servers are provided by the installed pi-mcp-adapter package (the one
piece deliberately not hand-written — it's pure transport plumbing); configure
servers in ~/.pi/agent/mcp.json. See SETUP.md.
See SETUP.md. Short version: run ./install.sh.
PLAN.md records the decisions and pattern library; each larger extension has
its own DESIGN.md.