# pi-tldr

A [pi](https://pi.dev) extension that generates lean session summaries and injects them into new sessions for context continuity.

## Features

- **`/tldr`** — Generates a lean, engineer-handoff-style session summary and saves it to `./session_summary/`
- **`/rtfa`** — Reads the latest summary and injects it into the current session as context
- **Auto-suppress** — Suppresses `write` tool results to keep sessions lean

## Installation

### Quick install (recommended)

```bash
pi install npm:pi-tldr
```

Then restart pi or run `/reload`.

### Install from GitHub

```bash
pi install git:github.com/shreyashp77/pi-tldr
```

Then restart pi or run `/reload`.

### Manual install

Place the extension in your global extensions directory:

```bash
# After pi install, it's managed automatically.
# For manual setup, clone into:
mkdir -p ~/.pi/agent/extensions
# and place the extension files there.
```

Then restart pi or run `/reload`.

## Commands

### `/tldr`

Generates a lean session summary and saves it to `./session_summary/` in your project directory. The summary includes:

- Date and session reference
- What was being worked on
- What was done (bullet points)
- Key decisions and rationale
- Remaining TODOs
- Current state
- Important file paths

### `/rtfa`

Reads the latest summary from `./session_summary/` and injects it into the current session as context, so the LLM picks up where you left off.

## How It Works

1. Run `/tldr` at the end of a session → summary file is created in `./session_summary/`
2. Start a new session → run `/rtfa` → the latest summary is injected as context
3. The `write` tool results are auto-suppressed to keep sessions lean

## License

MIT
