# pi-docket v0.4.0

This is a breaking rename from **Trail** to **Docket**.

## Why rename?

Trail sounded like a history log or session-resume system. That framing was wrong for the product direction.

Docket is a **decision queue for Pi agent work**:

- a worker finding becomes a case,
- a failed command becomes a case,
- a proposed patch becomes a case,
- a saved evidence bundle becomes a case file,
- the human remains judge.

Pi already has strong session tools: `/tree`, `/fork`, `/clone`, `/compact`, `/new`, and `/resume`. Docket now treats those as Pi's domain. Docket's domain is attention, evidence, and worker-parent coordination.

## Breaking changes

- Package renamed to `@roodriigoooo/pi-docket`.
- GitHub repo title should be `pi-docket`.
- Slash command changed from `/trail` to `/docket`.
- Old `/trail` commands are not kept as aliases.
- `/docket checkpoint`, `/docket continue`, `/docket resume`, and short aliases are removed from the public grammar.
- Evidence preservation is now `/docket save` + `/docket load`.
- Worker protocol tools are now:
  - `docket_todos`
  - `docket_wait`
  - `docket_done`
  - `docket_fail`
  - `docket_spawn_child`
- Shared worker tmux session is now `docket-workers`.
- Extension surface is now `globalThis.__docket`.
- Config/storage paths now use `docket`.

## New command surface

Primary commands:

```text
/docket
/docket spawn [--fresh] [--as <kind>] <task>
/docket tell w<N> [text]
/docket attach [w<N>]
/docket save [flags] [note]
/docket load [id|last|w<N>]
```

Advanced commands remain available via `/docket help advanced`.

## Evidence bundles replace checkpoint-first language

`/docket save` creates a durable evidence bundle and labels the current Pi tree leaf as `docket:<id>`.

`/docket load` mounts bundle or worker artifacts at zero model-context cost.

Docket no longer presents itself as a continuation mechanism. Use Pi for continuation:

- `/tree` for branch navigation,
- `/fork` or `/clone` for separate sessions,
- `/compact` for lossy context compression,
- `/docket save` for durable evidence,
- `/docket load` when evidence becomes relevant.

## Migration notes

Docket uses new paths:

```text
~/.pi/agent/docket/
~/.pi/agent/docket.json
<project>/.pi/docket.json
<project>/.pi/docket/worker-kinds/*.md
```

If you need old Trail data, copy it manually:

```bash
cp -R ~/.pi/agent/trail ~/.pi/agent/docket
cp ~/.pi/agent/trail.json ~/.pi/agent/docket.json 2>/dev/null || true
cp -R .pi/trail .pi/docket 2>/dev/null || true
cp .pi/trail.json .pi/docket.json 2>/dev/null || true
```

## Repository maintenance checklist

After this release:

1. Rename GitHub repository to `pi-docket`.
2. Update repository description to “Decision queue and evidence bundles for Pi agent work.”
3. Confirm npm package `@roodriigoooo/pi-docket` publishes successfully.
4. Keep old `@roodriigoooo/trail` unpublished/deprecated with a pointer to `@roodriigoooo/pi-docket` if needed.
