@@ -28,13 +28,41 @@
2828 - Runtime: Bun. Use `bun run`, `bun test`, `bun install`, `bunx`.
2929 - Toolchain split: **prettier** formats, **biome** lints + sorts imports. CI runs `bun test`, `bun run check`, `bun run format`, and `bun run typecheck`. Lefthook runs the same steps sequentially.
3030 - App data dir: `~/.config/mini-coder/`.
31-- Local manual CLI testing on this machine uses `bun add -g /home/xonecas/src/mini-coder`, which links the working tree into `~/.bun/bin/mc`.
3231 - Published CLI entrypoint is `mc` via `bin/mc.ts` → `src/index.ts`. Do not point `package.json#bin` at `dist/` unless publish actually produces it.
3332 - All exports need JSDoc; interface fields get single-line JSDoc. See `session.ts` for the pattern.
3433 - Dependency references:
3534 - pi-ai: `~/src/pi-mono/packages/ai/` (`src/types.ts`, `src/stream.ts`, `src/utils/oauth/`, `src/providers/faux.ts`)
3635 - cel-tui: `~/src/cel-tui/` (`~/src/cel-tui/spec.md`, `examples/chat.ts`, `packages/components/src/markdown.ts`)
3736
37+## Release process
38+
39+- Release instructions live here now; do not rely on `.agents/skills/release`.
40+- This repo does not have a build step. Do not run `bun run build` for releases.
41+- The published package ships the checked-in Bun launcher (`bin/mc.ts`) and runtime source (`src/index.ts`). The release-time publishability check is `bun pm pack --dry-run --ignore-scripts`.
42+- Before mutating anything for a release:
43+ - ensure the current branch is `main`
44+ - ensure `git status --porcelain` is empty
45+ - run `git fetch origin --tags` and ensure `HEAD` matches `origin/main`
46+ - read `package.json` to capture the package `name` and release `version`
47+ - if `package.json` is already ahead of npm, treat that version as the intended release version and do not bump again unless the user explicitly asks
48+ - ensure `git tag v<version>` does not already exist locally or on origin
49+ - ensure `npm view <name>@<version> version` does not already exist
50+- Release verification suite:
51+ - `bun test`
52+ - `bun run check`
53+ - `bun run format`
54+ - `bun run typecheck`
55+ - `bun pm pack --dry-run --ignore-scripts`
56+- Release flow:
57+ - if the version needs to change, update only `package.json`
58+ - review the diff with the user before committing
59+ - commit with `chore: release v<version>`
60+ - create an annotated tag `v<version>`
61+ - push `main` and the exact tag explicitly
62+ - run `npm publish`
63+ - verify the publish with `npm view <name>@<version> version`
64+- If any check fails, stop and report the failure instead of improvising around it.
65+
3866 ## Project rules
3967
4068 - No inline `import` calls, duplicated helpers, dead code, or speculative abstractions.