Skill Tracer
Skills › Scientific Agent Skills › pi-agent › development.md

development.md

71 lines · skills/pi-agent/references/development.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Development
2
3Source: https://github.com/earendil-works/pi/tree/v0.99.2 (README.md, CONTRIBUTING.md, AGENTS.md, package.json and pi-test.sh; development is no longer a current docs page)
4
5Reviewed against Pi 0.99.2 and the package versions listed in `../SKILL.md` on 2026-09-30.
6
7Use this when working on Pi itself.
8

Development

Source: https://github.com/earendil-works/pi/tree/v0.99.2 (README.md, CONTRIBUTING.md, AGENTS.md, package.json and pi-test.sh; development is no longer a current docs page)

Reviewed against Pi 0.99.2 and the package versions listed in ../SKILL.md on 2026-09-30.

Use this when working on Pi itself.

Raw lines 1 to 8
Project instruction file AGENTS.md :3
9## Setup
11```bash
12git clone https://github.com/earendil-works/pi
13cd pi
14npm install
15npm run build
16```
18Run from source:
20```bash
21/path/to/pi/pi-test.sh
22```
24The script can be run from any directory and preserves the caller's cwd.

Setup

git clone https://github.com/earendil-works/pi
cd pi
npm install
npm run build

Run from source:

/path/to/pi/pi-test.sh

The script can be run from any directory and preserves the caller's cwd.

Raw lines 9 to 25
26## Forking and Rebranding
28Configure `package.json`:
30```json
32 "piConfig": {
33 "name": "pi",
34 "configDir": ".pi"
35 }
37```
39Change `name`, `configDir`, and `bin` for a fork. This affects CLI banner, config paths, and environment variable names.

Forking and Rebranding

Configure package.json:

{
  "piConfig": {
    "name": "pi",
    "configDir": ".pi"
  }
}

Change name, configDir, and bin for a fork. This affects CLI banner, config paths, and environment variable names.

Raw lines 26 to 40
41## Path Resolution
43Pi has npm install, standalone binary, and Node type-stripping source execution modes. Always use `src/config.ts` helpers such as `getPackageDir` and `getThemeDir` for package assets. Do not use `__dirname` directly for assets.

Path Resolution

Pi has npm install, standalone binary, and Node type-stripping source execution modes. Always use src/config.ts helpers such as getPackageDir and getThemeDir for package assets. Do not use __dirname directly for assets.

Raw lines 41 to 44
45## Debugging and Tests
47`/debug` writes rendered TUI lines and last LLM messages to `~/.pi/agent/pi-debug.log`.
49```bash
50npm run check
51./test.sh
52npm test
53npm --prefix packages/coding-agent test -- test/specific.test.ts
54```
56These are upstream developer commands, not commands executed by this review. `npm run check` includes formatting writes, and the full test/build workflows can use native tools or network services. For a targeted test, run from the owning package.

Debugging and Tests

/debug writes rendered TUI lines and last LLM messages to ~/.pi/agent/pi-debug.log.

npm run check
./test.sh
npm test
npm --prefix packages/coding-agent test -- test/specific.test.ts

These are upstream developer commands, not commands executed by this review. npm run check includes formatting writes, and the full test/build workflows can use native tools or network services. For a targeted test, run from the owning package.

Raw lines 45 to 57
58## Project Structure
60```text
61packages/
62 ai/ # LLM provider abstraction
63 agent/ # Agent loop and message types
64 tui/ # Terminal UI components
65 coding-agent/ # CLI and interactive mode
66 codemode/ # QuickJS tool composition
67 mcp/ # Native MCP clients
68 protocol/ # Shared wire definitions
69 client/ # Client integration
70 server/ # Server integration
71```

Project Structure

packages/
  ai/            # LLM provider abstraction
  agent/         # Agent loop and message types
  tui/           # Terminal UI components
  coding-agent/  # CLI and interactive mode
  codemode/      # QuickJS tool composition
  mcp/           # Native MCP clients
  protocol/      # Shared wire definitions
  client/        # Client integration
  server/        # Server integration
Raw lines 58 to 71
Uses an outside tool MCP :67