| name | pi-extension-development |
| description | Use when creating or modifying Pi extensions, built-in extension wiring, prompt shims, package scaffolds, package READMEs, or packages/pi-* implementation in this monorepo. |
| compatibility | Requires the Pi coding-agent monorepo and extension API. |
Pi Extension Development
Use this workflow for packages/pi-* implementation work in this
repo.
Workflow
- Identify the package boundary first: root app,
src/extensions/*,
or a packages/pi-* workspace package.
- For new built-ins, add a package under
packages/, wire root
package.json optional dependencies, and register in
src/extensions/builtin-registry.ts.
- Keep extension entrypoints small: export a default extension
function and pure helper functions for testable trigger logic.
- Put user-facing injected prompt text in one obvious template block;
gate injection by selected tools/options when possible.
- Update package README and Changeset when behavior changes.
- Validate with the package script first, then root checks if
registry/root files changed.
Project conventions
- Prefer
@spences10/pi-* workspace packages with workspace:*
links.
- Tests live beside source as
*.test.ts and should cover
trigger/gating helpers.
- Avoid importing another package's
src/* or dist/*; use public
package entrypoints.
- Use
references/checklist.md for the exact file checklist when
adding a package.