# pi-docket v0.8.1

Planning and implementing were already two workers, but the seam between them was the human: read the plan on a verdict card, then hand-write a task for a second worker and hope the paraphrase kept what mattered. This release makes the approval itself the handoff.

A plan is not a new kind of object. It is a Worker Deliverable that proposes work instead of carrying it, so it reuses immutability, versions, generation-bound approval, revision notes, provenance, and zero-token mounting exactly as they are.

## Highlights

### Use → Implement on an approved plan

An approved plan deliverable offers `Implement` alongside `Parent` and `Worker`. It resolves `worker.implementKind` (default `implementer`), seeds the task from the plan's goal, inherits the parent's model and thinking, and writes the plan byte-exact to the worker's `source-deliverable.md`. One confirmation card shows the resolved launch before any file or tmux window is created.

`Worker` remains the explicit path where kind, model, and thinking are chosen by hand. `Parent` still queues only the exact body for the next human submission.

### The plan gate is discharged, not skipped

Approving a plan and handing it off no longer produces a worker that immediately stops to propose the same plan again. Only a reviewed handoff can discharge a gate: `task.md` names the approval and the decision that satisfied it, and `planAuthorized` without a source deliverable is ignored on both the worker-command and worker-store paths.

The gate stays armed for everything the plan does not cover — files it never names, destructive or external writes, dependency changes, scope growth, or a step that turns out to be wrong. The discharged-gate text also requires publishing the plan's steps with `docket_todos` before the first edit, so the plan becomes the progress board without new machinery.

### Two bundled kinds for the loop

- `architect`: read-only, shared workspace, no worktree. Publishes through `docket_done outcome: proposal` instead of parking a plan in a `docket_wait` question, and writes the whole plan in the same response that calls `docket_done`, since only that body is frozen.
- `implementer`: keeps its plan gate and scopes its rights to the files the approved plan names.

### Plan contract

`## Goal`, `## Constraints`, `## Steps` (numbered, each optionally `files: a.ts, b.ts`), `## Verification`, `## Risks`. Markdown headings and bare `Plan:` label lines both parse, so plan-mode output drops in unchanged. Parsing is pure and happens at review time only: a body with no numbered step simply does not parse and reviews as an ordinary proposal. Nothing is validated at publish time.

### Plan coverage on the verdict card and Report

A ready deliverable that executes an approved plan is compared against its launch sidecar: `plan <ref> · N steps · X/Y planned files touched · … off-plan · … untouched`, warning-colored when either drift figure is non-zero. Derived at card-open from data already on disk — no new storage, no new decision type, zero model context.

### Kind-aware handoffs

`Use → Worker` now selects a kind instead of silently landing on the default one, showing each kind's name and authority. Worker and stored-deliverable handoffs share one launch path, so the fix applies to both.

## Compatibility

No worker protocol, storage path, command-name, or configuration migration is required. Existing workers, deliverables, and bundles continue to work.

Additive only: the `architect` and `implementer` bundled kinds, the `worker.implementKind` configuration key, and the `plan` card presentation. Deliverables published before this release review exactly as they did before, and any plan that does not follow the contract still works everywhere — it just reviews as an ordinary proposal.

Rationale and rejected alternatives: [docs/adr/0007-plan-to-implementation-handoff.md](../adr/0007-plan-to-implementation-handoff.md).

## Upgrade

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

Publishing is handled by the `Release` GitHub Actions workflow. It verifies `package.json` matches `v0.8.1`, publishes to npm with provenance, packs the npm artifact, and creates the GitHub Release from this file.
