# ProPresenter Parser — Agent Instructions

## Documentation

All project documentation lives in `doc/`. Load only what you need.

**Start here:** Read `doc/INDEX.md` for the table of contents and quick navigation.

### How to Find What You Need

1. Check `doc/INDEX.md` for the topic overview
2. Use `doc/keywords.md` to search by keyword
3. Load the specific doc file — don't load everything

### Common Tasks

| Task | Load |
|------|------|
| Parse/modify `.pro` song files | `doc/api/song.md` |
| Parse/modify `.proplaylist` files | `doc/api/playlist.md` |
| Understand `.pro` binary format | `doc/formats/pp_song_spec.md` |
| Understand `.proplaylist` binary format | `doc/formats/pp_playlist_spec.md` |
| Debug or troubleshoot | `doc/internal/issues.md` |
| Add new documentation | `doc/CONTRIBUTING.md` |

### Structure

```
doc/
├── INDEX.md           ← Start here (TOC + navigation)
├── keywords.md        ← Keyword search index
├── CONTRIBUTING.md    ← How to document new things
├── formats/           ← Binary file format specs
│   ├── pp_song_spec.md
│   └── pp_playlist_spec.md
├── api/               ← PHP API docs (read/write/generate)
│   ├── song.md
│   └── playlist.md
└── internal/          ← Dev notes (learnings, decisions, issues)
    ├── learnings.md
    ├── decisions.md
    └── issues.md
```

## Project Overview

PHP tools for parsing, modifying, and generating ProPresenter 7 files:

- **Songs** (`.pro`) — Protobuf-encoded presentation files with lyrics, groups, slides, arrangements, translations
- **Playlists** (`.proplaylist`) — ZIP64 archives containing playlist metadata and embedded songs

### CLI Tools

```bash
php php/bin/parse-song.php path/to/song.pro
php php/bin/parse-playlist.php path/to/playlist.proplaylist
```

### Key Source Files

All PHP source code is in `php/src/`. Generated protobuf classes are in `php/generated/`. Tests are in `php/tests/`.
