## Task Management

This project uses a local markdown-based task board in `.mdboard/`. It consists of a zero-dependency Python HTTP server (`server.py`) serving a single-page kanban UI (`index.html`).

### Running the Board

```bash
uvx mdboard [--port PORT] [--dir DIR]
# → auto-assigns port from 10600-10700 range
# → data dir defaults to ./.mdboard
# → port written to .mdboard/port.json for discovery
# dev: uv run mdboard
```

### Directory Structure

ALL mdboard data lives under `.mdboard/`. The complete layout:

```
.mdboard/
├── port.json                       # runtime only — auto-generated by server
├── tasks/                          # kanban board
│   ├── config.yaml                 # column definitions and settings
│   ├── backlog/
│   │   └── 001-my-task.md
│   ├── todo/
│   ├── in-progress/
│   ├── review/
│   ├── done/
│   └── comments/{task_id}/
├── prompts/                        # reusable prompt templates
│   └── 001-my-prompt/
│       ├── current.md
│       └── revisions/
└── documents/                      # reports, specs, research
    └── 001-my-doc/
        ├── current.md
        └── revisions/
```

- `config.yaml` is inside `.mdboard/tasks/`, NOT at `.mdboard/` root
- `prompts/` and `documents/` are siblings of `tasks/` — all three are direct children of `.mdboard/`
- There is NO `documents/` or `prompts/` inside `tasks/`

### Port Discovery
The server writes `.mdboard/port.json` on startup (`{"port": N, "pid": P}`). To find the running port: `cat .mdboard/port.json`

### Your Workflow
1. At session start, scan `.mdboard/tasks/backlog/`, `.mdboard/tasks/todo/`, and `.mdboard/tasks/in-progress/` for tasks where `assignee: claude`
2. Before starting a task, move it: `mv .mdboard/tasks/todo/XXX.md .mdboard/tasks/in-progress/`
3. Work on the task, checking off acceptance criteria in the file as you go
4. Append notes under `## Notes` with what you did and any decisions made
5. When complete, move to done: `mv .mdboard/tasks/in-progress/XXX.md .mdboard/tasks/done/`
6. Add `completed: YYYY-MM-DD` to the frontmatter
7. If you discover bugs or necessary refactors, create new task files in `.mdboard/tasks/backlog/`
8. Commit task file changes alongside your code changes
9. If a task has `branch: X`, only pick it up when on that branch

### Creating Tasks
Filename format: `{id:03d}-{slug}.md` (zero-padded 3 digits). IDs auto-increment across all columns.

Use this template:
```
---
id: {next_id}
title: {title}
assignee: claude
tags: [{relevant, tags}]
created: {today}
due: {optional, YYYY-MM-DD}
branch: {optional, only if scoped to a branch}
---

## Description
{what needs to be done}

## Acceptance Criteria
- [ ] {criterion}

## Notes
```
