@@ -0,0 +1,30 @@
1+---
2+description: Create a new tagged npm release (patch/minor/major)
3+---
4+
5+Create a new npm release for this repo. The bump type is: $1 (default to "patch" if not provided).
6+
7+Steps to follow exactly:
8+
9+1. Normalize bump type to one of `patch|minor|major`; if empty, use `patch`.
10+2. Verify git state before doing anything:
11+ - current branch must be `main`
12+ - working tree must be clean
13+ - run `git fetch origin --tags` and ensure `HEAD` equals `origin/main`
14+ If any check fails, stop and report.
15+3. Run the full repo check suit — stop and report failures.
16+4. Read `package.json` and capture both `name` and current `version`.
17+5. Compute the next semver version by bumping the selected part.
18+6. Guardrails before mutating files:
19+ - ensure git tag `v<new-version>` does not exist locally or on origin
20+ - ensure npm version does not already exist: `npm view <package-name>@<new-version> version`
21+ If either exists, stop and report.
22+7. Update the `version` field in `package.json` to `<new-version>`.
23+8. Commit all staged and unstaged changes with message: `chore: release v<new-version>`.
24+9. Create annotated tag: `git tag -a v<new-version> -m "<small-changelog>"`.
25+10. Push explicitly to main and the exact tag:
26+ - `git push origin main`
27+ - `git push origin v<new-version>`
28+11. Post-push verification: run `npm view <package-name>@<new-version> version`.
29+ - If it already exists, report that publish already happened and do **not** ask user to publish again.
30+ - If it does not exist, run `npm publish`.