xonecas.io
64875
Mc

mini-coder / commit ede9997

docs: move release instructions into AGENTS.md

xonecas2026-04-09 ede999710806caa1317ec2b1e11d36714e1ed593 parent a1ea883

2 files changed

.agents/skills/release/SKILL.md+0−38
@@ -1,38 +0,0 @@
1----
2-name: release
3-description: "Create a new tagged npm release (patch/minor/major). Use when the user asks to release, publish, bump version, or cut a new version. Triggers on: release, publish, bump, version, tag."
4-compatibility: "Requires git, bun, and npm with publish credentials"
5----
6-
7-Create a new npm release for this repo. Complete all steps in sequence.
8-
9-## Steps
10-
11-1. **Normalize** the bump type to one of `patch | minor | major`. Default to `patch` if the user didn't specify.
12-2. **Verify git state** before mutating anything:
13- - Current branch must be `main`.
14- - Working tree must be clean (`git status --porcelain` is empty).
15- - Run `git fetch origin --tags` and ensure `HEAD` equals `origin/main`. Update the origin as needed.
16- - If any check fails, stop and report.
17-3. **Run checks** — execute the full repo check suite. Stop and report on failures.
18-4. **Read `package.json`** and capture `name` and current `version`.
19-5. **Compute next version** by bumping the selected semver part.
20-6. **Guardrails** before mutating files:
21- - Ensure git tag `v<new-version>` does not exist locally or on origin.
22- - Ensure npm version does not already exist: `npm view <name>@<new-version> version`.
23- - If either exists, stop and report.
24-7. **Update `package.json`** — set the `version` field to `<new-version>`.
25-8. **Build** — run `bun run build`.
26-9. **Commit** all staged and unstaged changes: `chore: release v<new-version>`.
27-10. **Tag** — create annotated tag: `git tag -a v<new-version> -m "<small changelog>"`.
28-11. **Push** explicitly to main and the exact tag:
29- - `git push origin main`
30- - `git push origin v<new-version>`
31-12. **Post-push verification** — run `npm view <name>@<new-version> version`.
32- - If it already exists, report that publish already happened — do **not** ask to publish again.
33- - If it does not exist, run `npm publish`.
34-
35-## Edge cases
36-
37-- If the build fails, revert the version bump in `package.json` and stop.
38-- If the push fails, do not retry — report the failure and let the user resolve.
AGENTS.md+29−1
@@ -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.