Contributing
July 26, 2026 ยท View on GitHub
Scope
README.md is for users.
Keep development details, testing notes, internal tool guidance, and docs build details in this file.
Development
Requirements:
- Node.js
22.19.0or newer - pnpm
10.26.1
Install dependencies:
pnpm install
Run checks:
pnpm typecheck
pnpm lint
pnpm test
pnpm test:e2e
Repository layout
src/- Pi-agnostic process management, types, protocol, and utilitiesextensions/processes/- core extension, process tool (start, list, output, update, write, stop, clear), settings, lifecycle hooks, notifications, protocol handlers,/ps,/ps:kill,/ps:clear, and/ps:settingsextensions/processes-logs/-/ps:logscommand and log overlayextensions/processes-dock/-/ps:dock,/ps:pin, the dock widget, and the status widgetextensions/shared/- shared UI helpers (statusDot,processStatusTone,LineComponent, etc.) used across all three extensionsskills/- shipped package skills.agents/skills/- local repo-only skills for development workflows
Package metadata
The package targets Pi 0.80.3.
Pi bundles core packages for extensions. Keep direct imports of these packages in peerDependencies with "*" ranges and exact local versions in devDependencies:
@earendil-works/pi-ai@earendil-works/pi-coding-agent@earendil-works/pi-tuitypebox
Keep normal third-party runtime dependencies in dependencies.
Internal behavior
This extension is mainly for agent-managed background processes.
Typical flow:
- Pi starts a long-running command in the background.
- Pi continues other work.
- The user watches, pins, or kills the process from the UI.
- Pi inspects output or logs when needed.
Use the process tool for long-running commands such as dev servers, test watchers, build watchers, and log tails.
Avoid shell background patterns when the process tool fits.
Background command blocking is optional. It is controlled by interception.blockBackgroundCommands.
Testing
Useful local checks:
pnpm lint
pnpm typecheck
Useful manual process scripts live under tests/e2e/scripts/:
./tests/e2e/scripts/continuous-output.sh # long-running stdout
./tests/e2e/scripts/error-log.sh # interleaved info/error on stdout+stderr
./tests/e2e/scripts/exited-task.sh # finite, exits 0
./tests/e2e/scripts/crash-on-file.sh <name> # waits for a marker file then crashes
See .agents/skills/pi-processes-testing/SKILL.md for the full manual QA workflow and the complete fixture script reference.
Docs conventions
README
Keep README.md focused on user outcomes:
- what the extension does
- how users interact with it
- slash commands and UI behavior
- troubleshooting
Avoid putting these in README.md:
- dev commands
- test commands
- internal architecture details
- detailed tool-call schemas
- release workflow notes
Docs page build
The docs page is generated from README.md by an external build, not in this repo. Keep README.md self-contained with only standard markdown.
Future design notes
Unimplemented design notes live in docs/:
docs/future-cleanup-hooks.md- plannedcleanupsupport forprocess start/process stopdocs/future-persistent-manager.md- planned cross-session process persistence
These describe intended future behavior, not current behavior. Active implementation work goes under .agents/plans/.