# Pi Scaffold

A Pi coding agent extension that adds a `/scaffold-setup` slash command to quickly initialize an opt-in, model-friendly project workflow tracking framework.

## Motivation

This extension was designed to optimize the performance of state-of-the-art (SOTA) models that are heavily quantized or running in offline environments. By establishing a project-local "memory" through structured markdown files, it ensures a deterministic and reliable workflow. This approach is particularly effective for models with constrained context windows (approx. 130k tokens), as it offloads the project's state and implementation plan into external files that the agent can read selectively.

## Installation

The easiest way to install the extension is via the Pi coding agent's built-in package manager:

```bash
# Install globally
pi install npm:@ibvhim/pi-scaffold

# Or install for a specific project only
pi install -l npm:@ibvhim/pi-scaffold
```

Alternatively, you can manually add it to your `.pi/settings.json`:

```json
{
  "extensions": [
    "@ibvhim/pi-scaffold"
  ]
}
```

## Features

- **/scaffold-setup**: Interactive creation of the `.pi/` metadata directory and files.
- **Structured Workspace**: Initializes `AGENTS.md`, `implementation_plan.md`, `progress_tracker.md`, and `.pi/prompts/setup.md`.
- **Agent Integration**: Automatically injects a follow-up directive so the agent immediately adopts the new operating manual.
- **Idempotent**: Leaves existing files untouched—it will only create missing files, never destructively overwrite your existing setup.

## Usage

Once installed, simply type `/scaffold-setup` in your Pi terminal session. You will be prompted to confirm the creation of the scaffold in your current directory.
