# development

## prerequisites

- pi installed locally
- bun
- git
- `expect` for the pty smoke test

## setup

```bash
bun install
bun run typecheck
bun test
```

## local runtime checks

run from this repository:

```bash
pi --no-extensions -e .
```

then use `/branchout` inside a disposable git repository.

## release gate

```bash
bun run release:check
```

this runs frozen install, typecheck, tests, package-content validation, pi runtime availability check, packed-artifact smoke in temporary git repositories, real pi pty smoke from an isolated installed unpacked tarball, and `npm pack --dry-run --json`.

## packed artifact smoke

```bash
bun run smoke:packed
```

this packs the package, unpacks the tarball into a temp directory, loads the packaged pi entrypoint, verifies only `/branchout` is registered, and creates a branch in a real temporary git repository.

## pi pty smoke

```bash
bun run smoke:pty
```

this packs the package, installs the unpacked tarball into an isolated `PI_CODING_AGENT_DIR`, runs `/branchout` through a real pi TUI under `expect`, and verifies the resulting git ref directly.
