# pi-docket v0.5.0

A non-breaking release focused on the decision surface, the keys you press on it, and how worker output is observed and answered. No protocol, storage, or command renames.

## Highlights

### Decision ledger and decision debt

Every verdict you resolve (accept, reject, reject & stop, chat, or an option-send) is now appended to `~/.pi/agent/docket/decisions.ndjson` with the verb, the option chosen, any risk the worker flagged, and the evidence refs that were on the card.

Read it with `/docket log decisions` (short: `/docket decisions`):

```text
Decisions · last 7 days
  6 resolved · 2 evicted unreviewed
  accept 3 · reject 2 · reject & stop 1
  decision debt: 2 workers evicted unreviewed this week
```

The last line is decision debt: a worker reached a terminal state and was pruned with no verdict ever recorded, so it aged out before anyone looked. Counting it keeps automation bias visible instead of silent.

### Safer verdict keys

The verdict card numbers worker-proposed options so you can pick one directly with `1`..`9`. `Reject & stop` is set apart with a blank line and warning color, since it kills the worker and removes its workspace, and it still asks for confirmation. Number keys only reach the offered options, never the destructive verb.

### Docket key cleanup

In `/docket`, reply and save are split off the old overloaded `c`:

- `r` replies to the selected worker,
- `b` saves a bundle,
- `a` is the single attach key.

The duplicate `c`/`t`/`i` aliases are gone. Footer and `?` help reflect the new bindings.

### Multiline replies

`/docket tell` and the verdict chat reply now preserve line breaks. A multiline message is loaded into a tmux paste buffer and bracketed-pasted so the worker reads the whole block at once instead of running it on the first newline. One-liners keep the existing send-keys path.

### Earlier in this cycle

This release also lands work shipped earlier in the same development cycle:

- **post-mortem terminal tails**: a crashing worker leaves its dead pane behind long enough for the parent to capture the final lines to `pane-tail.txt`. The capture shows up in review and on the failed verdict card, so you see why a worker died, not just its exit code.
- **peek**: `p` in `/docket workers` shows a live read-only view of the selected worker's tmux pane, refreshing about once a second, with no attach and no model context.
- **two-pane review**: on terminals around 120 columns and wider, `/docket` renders the item list on the left and the selected item's card plus evidence preview on the right.

## Compatibility

No breaking changes. The command grammar adds `/docket decisions` and `/docket log decisions`; existing commands, worker protocol tools, storage paths, and the extension surface are unchanged. The decision ledger is created on first verdict; older state reads as an empty ledger.

## Upgrade

```bash
npm install -g @roodriigoooo/pi-docket@0.5.0
```

Publishing is handled by the `Release` GitHub Actions workflow: it reads the version from `package.json`, requires the pushed `v0.5.0` tag to match it, publishes to npm with provenance, and creates the GitHub Release from this file.
