# v0.1.0 Release Runbook

This runbook separates release preparation from irreversible publication. Preparation and CI must not authenticate, publish, push tags, or create a GitHub Release.

## Preparation gates

Run the documented non-publishing release-candidate gate on Node.js 24:

```bash
corepack enable
corepack prepare pnpm@11.9.0 --activate
corepack pnpm release:check
```

`pnpm release:check` requires a clean Git index and worktree, records the exact commit and tree, runs mandatory gates in sequence, builds and inspects the real npm candidate, compares tracked `dist`, and passes that same reviewed tarball plus its SHA-256 to the local/Git/npm Pi installation smoke. It records commit, tree, version, artifact, entry, mode, content-hash, launch, check, and terminal evidence under the ignored `.release-check/<timestamp>/` directory without checkout-absolute paths. It is fail-closed and must not push, tag, authenticate, publish to npm, create a GitHub Release, or write inside runner-owned `.pi-subagents` state.

For manual troubleshooting, the release check expands to these mandatory checks in order:

```bash
corepack enable
corepack prepare pnpm@11.9.0 --activate
corepack pnpm install --frozen-lockfile --ignore-scripts
corepack pnpm typecheck
corepack pnpm lint
corepack pnpm test
corepack pnpm test:e2e
corepack pnpm build
git diff --exit-code -- dist
corepack pnpm validate:package
corepack pnpm validate:plugins
npm pack --json > npm-pack.json
node scripts/validate-pi-package.mjs --pack-list npm-pack.json
```

Inspect the real `learning-session-organizer-0.1.0.tgz` candidate before publication.

## Manual operator publication

Only after the prepared commit is accepted:

1. Push `main` and wait for GitHub CI success.
2. Re-run final package inspection on the exact commit to publish.
3. Confirm the npm name/version is still publishable and authenticate with npm manually.
4. Publish once with `npm publish ./learning-session-organizer-0.1.0.tgz` or equivalent reviewed artifact command.
5. Verify the registry shows `learning-session-organizer@0.1.0`.
6. Verify public installation with `pi install npm:learning-session-organizer` in a clean environment.
7. Create and push tag `v0.1.0`, then create the GitHub Release with the inspected artifact evidence and changelog notes.
8. Confirm README and installation documentation wording. If wording needs post-publication correction, prepare a new commit; if package contents need correction after publication, prepare a new package version.

Do not overwrite or republish `0.1.0`; npm versions are immutable.
