Personal agent harness built on pi: more tools, less context bloat, fewer reasons to leave the terminal.
- Deterministic first. If a script, regex, or hard-coded branch can do the step, don't prompt an LLM.
- Protect main-agent context. Keep data out of history unless the next turn needs it. Before authoring an extension, custom tool, or skill, read
~/.pi/agent/skills/writing-agent-instructions/SKILL.md. - Hooks idempotent. Dedupe repeatable lifecycle side effects per session.
- Agent borrows from dev environment. Nvim config remains the source of truth for LSP, formatters, and diagnostics; don't reimplement them for the agent.
- Say what, not how. Model-facing descriptions and this capability index state capability and trigger, never mechanism.
Before changing Pi-native behavior, read directly relevant documentation in the installed @earendil-works/pi-coding-agent package and its explicitly required prerequisites. Stop once the relevant API and constraints are covered.
web-search.tsβ searches the web and fetches readable page content for external research.eval/β runs persistent Python or JavaScript for iterative computation and bulk aggregation.lsp/β provides symbol navigation and deterministic post-edit diagnostics and fixes for code work.github-pr.tsβ fetches concise PR metadata, failures, review threads, diffs, or a single section, for PR analysis.subagent.tsβ delegates fully specified medium or large research, repository recon, or implementation work requiring no user decisions, optionally in the background; lists, steers, or stops tracked runs, and can hand back one field of a structured result on request.ask/β presents structured choices when a request needs clarification.
btw.tsβ answers quick side questions without adding them to main history.skill-packs.tsβ enables Lark/Feishu or Google Workspace skills only when requested.folder-context.tsβ loads path-specific agent instructions when files are touched.
go.tsβ resumes an interrupted or stalled agent turn.yeet.tsβ validates, generates Conventional Commits with Sonnet 4.6 or Codex fallback, and pushes current changes with progress.copy.tsβ copies a selected code block or the session transcript.usage.tsβ reports Claude Pro/Max and Codex/ChatGPT subscription usage and quota reset times on request.auto-rename.tsβ gives established sessions descriptive names.
notifier.tsβ reports agent status through desktop and terminal surfaces when attention is elsewhere.tmux-bridge.tsβ sends Nvim selections or diagnostics to a Pi session in the same tmux session.
tui.tsβ keeps the interface compact and exposes relevant session state.
extensions/
βββ tsconfig.json
βββ node_modules β ../npm/node_modules
βββ *.ts single-file extensions
βββ ask/ ask_user_question dialog
βββ eval/ persistent kernels
βββ lsp/ navigation and post-edit feedback
βββ shared/ shared extension utilities