# pi-plan-html

A pi extension that turns AI agent plans into **commentable, beautifully designed HTML pages**.

Adds `/plan`, `/iterate`, `/approve`, `/plan-off`, `/plan-open` slash commands to every pi session.

## Install

Add to `~/.pi/agent/settings.json`:

```jsonc
{
  "packages": ["npm:pi-plan-html"]
}
```

Restart pi. That's it.

## Use

```
$ pi
> /plan add a hello endpoint to the server
```

A browser tab opens with the rendered plan. Plan files land in `<cwd>/.pi/plans/`.

## Commands

| Command | What it does |
|---|---|
| `/plan <prompt>` | Read-only planning mode. Model emits `plan-json`, extension renders + opens HTML. |
| `/iterate` | Loads `.pi/plans/feedback.md` (your inline comments), produces v2. |
| `/approve` | Restores full tools, model executes the plan with `[DONE:n]` progress markers. |
| `/plan-off` | Cancel planning, restore full tools. |
| `/plan-open` | Reopen the latest rendered plan. |

## Schema

See the [root README](https://github.com/saadzniber/pi-plan-html#plan-json-schema) for the full `plan-json` schema and component reference.

## License

MIT. See [`LICENSE`](../../LICENSE).
