# Freeze a source-bound package draft

PulseNotes is a **fictional** internal support-triage app. In this example, a three-person support team receives bug reports through chat. A support lead estimates that two of ten weekly reports need a second clarification because the original message was not linked. That number is an **interview estimate**, not telemetry. The proposed pilot records ten consecutive reports with a title, impact, owner, status, and original chat URL. Success means the team can identify each report's owner and source without revisiting chat history.

The platform stores the interview as `version:interview-1` and a separate human decision to run only a one-team pilot. The commission selects that exact source version and the decision at the saved investigation revision. [The pinned-context receipt](pinned-context.json) records the passage digest and revision; [the fictional source](fictional-interview.txt) is downloadable so the claim can be checked.

## What the saved package demonstrates

The [commission and preflight](commission.json) use the software-product preset with `manualDraft: true`, no authorized provider routes or tools, and a zero-credit quote. Preflight permits the manual draft but reports automatic generation unavailable. The saved package is paused, with no model work billed.

The local fixture seeds one clearly labelled **human** SH04 product-and-opportunity brief so the real revision API has an existing canonical source to edit. This seed is not a model result, validated output, or qualification. `appendManualArtifactRevision` saves revision 2 with a new question about source-link retention. The original source revision remains stored. The revised artifact is `manual-unvalidated`, its task is blocked, and it has no model receipt, local validation, or independent review. [The revision lineage](manual-source.json) makes both versions inspectable.

`preparePackageRelease` and `commitPackageRelease` then create [the immutable draft ZIP](draft-archive.zip). Its [manifest](release-manifest.json) names the selected revision, the human edit file, portable package templates, and **27 missing outputs**. The release download endpoint returns exactly the same ZIP bytes; the [verification receipt](lifecycle-receipt.json) records the SHA-256 hashes and byte comparison. [The agent handoff](agent-handoff.json) binds its instructions to this exact archive and requires the complete archive alongside the prompt.

The workbench screenshot shows the paused job and disabled ready-archive control. The release and artifact previews are captures of the actual local app after the draft was saved. A ready-release attempt returned HTTP 409 because only an active automatic run can publish ready output. Approval of this draft also returned HTTP 409. These are real platform guards, not an assertion that the pilot package passed review.

## Repeat locally

From the repository root, run:

```sh
node scripts/cookbook-package-handoff.mjs --screenshots
```

The script starts a throwaway self-hosted app and signed-in local fixture account, saves the investigation, source extraction and decision, then uses the package commission, context, job, revision, release, and owner-scoped HTTP read/download APIs. It checks the archive contents and SHA-256, exercises the ready/approval guards, captures browser panels, writes the assets in this folder, and closes/removes the throwaway app. No provider credential, network research, paid tool, repository push, or external account is used. Generated IDs, timestamps, and archive hashes can differ on a fresh run; the links within each run remain exact.

To inspect the ZIP independently, run `unzip -l public/the-confused-engineer/cookbook/package-handoff/draft-archive.zip`. The archive's own `README.md` and `tools/validate-package.py` describe the platform package format. A later ready release would require a new qualified automatic commission, completed outputs, passed local checks, and independent review; this example stops deliberately at a durable manual draft.
