@fradser/pi-context

Retrieve context for repositories, libraries, and technical questions with one native tool that launches an isolated prompt-constrained Pi research child.


Keywords
pi-package, code-context, isolated-research, prompt-constrained
License
MIT
Install
npm install @fradser/pi-context@0.6.1

Documentation

Frad's Pi Packages

Runtime Format

English | 简体中文

Native Pi packages for reusable skills, extensions, and workflow commands.

Packages

Compact agent delegation and shared agent_event communication for Pi. New work starts an independent session, fresh by default or forked from the Leader's context with fork: true; final answers return automatically. Work IDs target existing execution. Resident teams, board work, and peer messaging remain available.

Tools: agent, agent_event, teammate_spawn, teammate_shutdown, task_create, send_message, task_list

Command: /agent-teams

Install:

pi install npm:@fradser/pi-agent-teams

Answers side questions in a read-only overlay without adding them to the current session history.

Command: /btw <question>

Install:

pi install npm:@fradser/pi-btw

Researches repositories, libraries, and technical questions through an isolated prompt-constrained Pi child process with read and bash tools; its no-modification boundary comes from the research prompt rather than an OS sandbox. Natural-language research requests invoke the tool automatically; the started display wraps the complete query without an ellipsis, while results remain compact and expandable.

Tool: context_get

Install:

pi install npm:@fradser/pi-context

Learns durable memory and verifiable constraints from completed user tasks. Memory supplies relevant context before generation; Harness checks tool calls, assistant output, and configured file artifacts, with bounded corrective feedback. /consolidate also runs learning explicitly.

Commands: /memory, /consolidate, /harness

Install:

pi install npm:pi-continual-learning

Loads design guidance for interface polish, animation, typography, color, layout, copy, and browser-based iteration. Loading guidance does not execute scripts or authorize edits.

Tool: impeccable_load

Command: /impeccable

Install from this checkout (Node.js 22.18+):

pi install ./packages/impeccable

Controls VIA and QMK keyboard lighting to reflect Pi states, including idle, thinking, unread messages, approval prompts, and fatal errors. Requires a compatible keyboard.

Command: /keyboard

Install:

pi install npm:pi-keyboard

Provides /matt-pocock, a persisted Pi workflow harness for BDD, TDD, implementation, review, debugging, architecture, research, planning, teaching, and skill-writing procedures.

Tool: matt_pocock_workflow

Command: /matt-pocock

Install:

pi install npm:pi-matt-pocock

Runs background commands against an explicit result contract and reports one structured terminal result.

Tools: monitor_start, monitor_stop

Command: /monitor

Install:

pi install npm:@fradser/pi-monitor

Read-only exploration and planning in the main session before code modifications, with dedicated planning model support.

Command: /plan, /plan start, /plan exit, /plan model, /plan status

Install:

pi install npm:@fradser/pi-plan-mode

Displays a concise summary of session progress above the TUI editor and restores it across restarts.

Command: /recap, /recap now, /recap on, /recap off, /recap auto, /recap model [provider/model]

Install:

pi install npm:@fradser/pi-recap

Routes to externally hosted skill collections: add GitHub skill repositories through the /skill-router menu, exposing selected skills behind a model-visible gateway. Ships no skill content directly.

Command: /skill-router

Install:

pi install npm:pi-skill-router

Adds /effort, /continue, /sessions, /init, internal private live-session control, and safe Git worktree isolation.

Tools: enter_worktree, exit_worktree, list_directory_sessions

Commands: /effort, /continue, /sessions, /init

Install:

pi install npm:@fradser/pi-utils

Bridges images to a configured vision-capable model when the active Pi model only accepts text.

Command: /vision, /vision model <model>, /vision on, /vision off

Install:

pi install npm:@fradser/pi-vision

Development

pnpm install
pnpm test
pnpm typecheck
pnpm pack:check
# or run all three checks together
pnpm check

Each package keeps behavior scenarios in features/ and tests in tests/.

pnpm check runs the package and root pytest suites, the extension TypeScript project, and a registry-free packed-manifest check for every workspace package. Use pnpm check:install separately to audit the packages in the live Pi settings file.

The test suite requires Python 3 with pytest and Bun 1.4.1 for subprocess fixtures. The CI workflows install both runtimes before running pnpm check.

Use pnpm --dir packages/<name> pack --dry-run to inspect one package's contents before publishing.

Shared runtime helpers live in the internal @fradser/pi-kit package. It is an internal workspace dependency and is not installable via pi install.

Adding a package

  1. Create packages/<name>/.
  2. Add a package.json with the pi-package keyword and an explicit pi resource manifest.
  3. Include runtime resources in files and declare imported Pi core packages as peer dependencies.
  4. Write the BDD scenario under features/ before implementation, then add executable tests.
  5. Add a Changeset for a released package change.

Publishing

Releases use Changesets and the GitHub Actions workflow in .github/workflows/release.yml. Pull requests and releases run pnpm check before release actions; the root pnpm run publish command runs the same gate before its local release script. Push changes to main, then merge the generated version PR. The workflow publishes the explicit package list through npm Trusted Publishing, in dependency order, and skips exact versions already present in the npm registry.

New packages require one manual first publication and npm Trusted Publishing configuration before later versions can be released by GitHub Actions.

License

Each package is licensed under MIT.