Skip to content

chore(release): add agent release workflow#79

Merged
wasabeef merged 4 commits into
mainfrom
chore/release-command
May 15, 2026
Merged

chore(release): add agent release workflow#79
wasabeef merged 4 commits into
mainfrom
chore/release-command

Conversation

@wasabeef
Copy link
Copy Markdown
Owner

@wasabeef wasabeef commented May 15, 2026

Summary

  • Add repo-local agentnote-release skills and /release commands for Codex, Claude, Cursor, and Gemini.
  • Keep release automation as Markdown guidance instead of a maintained JS release script.
  • Document that x.y.z and vx.y.z inputs both produce package version x.y.z and annotated git tag vx.y.z.
  • Update maintainer docs and agent instructions to prefer the repeatable release skill over an ad hoc checklist.

Details

The release workflow now lives in repo-local skills, matching the existing CodeRabbit skill pattern. Agents can use /release <version> or the agentnote-release skill to normalize the version, update package metadata, rebuild the CLI bundle, run checks, preview release notes with git-cliff --unreleased --tag vx.y.z, commit the version bump with Release note: skip, create the annotated tag, and verify GitHub/npm publication after pushing.

This intentionally avoids adding scripts/release.mjs or a root npm run release command. Release policy changes are easier to review and maintain as Markdown because this is maintainer workflow guidance, not public runtime behavior.

Verification

  • git diff --check
  • node -e "JSON.parse(require('fs').readFileSync('package.json','utf8')); console.log('package.json ok')"
  • git-cliff --config .github/cliff.toml --unreleased --tag v1.0.6 --strip header
  • npm -w packages/cli run typecheck
  • shasum .codex/skills/agentnote-release/SKILL.md .claude/skills/agentnote-release/SKILL.md .cursor/skills/agentnote-release/SKILL.md .gemini/skills/agentnote-release/SKILL.md
  • shasum .codex/commands/release.md .claude/commands/release.md .cursor/commands/release.md .gemini/commands/release.md

Summary by CodeRabbit

  • Documentation
    • Revised release-note guidance and preview rules to require rewriting commit messages and previewing against the next version before tagging.
    • Standardized version-bump workflow to use a dedicated chore commit and the repo-local release command/skill; defer pushing tags until ready to publish.
    • Added comprehensive repo-local release command and skill docs across agent docs, clarifying version normalization, changelog preview flags, pre-publish checks, and post-publish verification steps.

Review Change Stack

🧑💬🤖 Agent Note

Total AI Ratio: ████████ 100%
Model: gpt-5.4

Commit AI Ratio Prompts Files
aee77ad chore(release): add release helper command █████ 100% 1 AGENTS.md 🤖, CLAUDE.md 🤖, architecture.md 🤖, engineering.md 🤖, package.json 🤖, release.mjs 🤖
51975a2 chore(release): add agent release skill █████ 100% 1 release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, architecture.md 🤖
a833ca0 chore(release): keep release workflow in skills █████ 100% 2 release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, AGENTS.md 🤖, CLAUDE.md 🤖, architecture.md 🤖, engineering.md 🤖, package.json 🤖, release.mjs 🤖
5ca071c docs(release): address release skill review █████ 100% 2 release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, release.md 🤖, SKILL.md 🤖, architecture.md 🤖
💬 Prompts & Responses (5 shown / 6 total)

aee77ad chore(release): add release helper command

🧑 Prompt

リリース用のコマンド作ってもいいかも

🤖 Response

リリース手順が毎回ほぼ同じなので、CLI というより repo 用 script にまとめるのが良さそうです。まず既存の script / workflow / docs を確認して、dry-run できる安全な形で提案しつつ実装します。
この作業は release automation の追加なので、main 直ではなく小さな別ブランチに分けます。コマンドは「デフォルトでは push しない」「--push を明示したときだけ tag push する」安全設計にします。
リリース手順を人間の記憶頼りにしない方向で進めています。今は npm run release -- <version> で version bump、検証、commit、tag、必要なら push まで寄せる小さな automation を入れているところです。
既に AGENTS.md / CLAUDE.md / maintainer docs も少し触られていて、手順自体はかなり形になっています。ここからは「実際に使える JS か」「dry-run で安全に動くか」「docs が過不足ないか」を順…

51975a2 chore(release): add agent release skill

🧑 Prompt

coderabbit のようなスキルにして

🤖 Response

release command を「人がコマンド名を思い出して打つ」だけでなく、Agent が自然に release 準備を実行できる repo-local skill にします。まず既存の coderabbit-review skill の形と、この repo の skill 配置を確認して揃えます。
skill-creator の作法に合わせて、Skill 本体は短く、release の fragile な部分だけを手順化します。coderabbit-review と同じように .codex/.claude/.cursor/.gemini に同名 skill と command entry を置く形にします。
skill と command entry を 4 agent 分追加しました。/release 1.0.6 --push のように呼べる導線と、背後で読む agentnote-release skill の両方を coderabbit-review と同じ repo-local 配置にしています。
同一内容の skill / command が …

a833ca0 chore(release): keep release workflow in skills

🧑 Prompt

例えば、 1.0.0 のように引数で渡されても v1.0.0 でちゃんと切るよに明示すること

🤖 Response

1.0.0v1.0.0 の扱いが暗黙だと release 作業では危ないので、script help / docs / skill に「入力はどちらでもよいが tag は常に vX.Y.Z」と明記します。実装側は既に normalizeVersion() でそう動いているので、今回は説明と verification を補強します。

🧑 Prompt

scripts/release.mjs って必要? md で完結できるんじゃない?

🤖 Response

たしかに、ここは見直す価値があります。release は「誰でも実行する public CLI 機能」ではなく maintainer workflow なので、scripts/release.mjs を増やすより、coderabbit-review と同じく repo-local skill / command の Markdown に手順と guardrail を閉じ込める方が保守コストは低いです。今回はその方向に寄せます。
整理すると、scripts/release.mjs は「安全に自動化したい」という意味では便利ですが、この repo では release 操作自体が maintainer / Agent 向けの手順で、既に skill で表現できます。なので JS を消して、Markdown skill を唯一の release workflow にする方が筋が良いです。今から PR #79 をその形に切り替えます。
見つけた残りの npm run release 参照を全部消します。ここからは /release が「Markdown skill の手順を…

5ca071c docs(release): address release skill review

🧑 Prompt

$coderabbit-review

coderabbit-review /Users/a12622/git/context-history/.codex/skills/coderabbit-review/SKILL.md --- name: coderabbit-review description: Fetch CodeRabbit review feedback for the current PR, classify actionable items, implement fixes, verify them, and resolve only addressed review threads. ---

CodeRabbit Review Workflow

Use this skill when the task asks to address CodeRabbit comments, review CodeRabbit feedback, or resolve CodeRabbit threads.…

🤖 Response

coderabbit-review skill で再確認します。今回は CodeRabbit check の完了後に新しい unresolved thread が出ていないか、PR #79 を直接指定して取り直します。
CodeRabbit から新規 unresolved thread が 4 件出ています。内容は妥当です。git-cliff preview は command docs でも canonical form に揃え、lockfile 更新は「手編集」ではなく npm install で npm に同期させるように 4 agent 分まとめて直します。
4 件とも反映しました。指摘されていない docs/architecture.md も同じ lockfile 方針に揃えたので、Skill と maintainer docs のズレもなくしています。

Why
Release prep currently depends on a manual checklist for package metadata, generated bundles, release note preview, commit creation, and tag creation. A repeatable command reduces the chance of cutting a tag before the package version and dist bundle are ready.

User impact
Maintainers can run one command to prepare the version bump and tag, then opt into pushing when ready to trigger the release workflow.

Verification
node --check scripts/release.mjs
node scripts/release.mjs --help
node scripts/release.mjs 1.0.6 --pus
node scripts/release.mjs 1.0.6 extra
npm run release -- 1.0.6 --dry-run --allow-non-main --allow-dirty --skip-checks
npm -w packages/cli run build
npm -w packages/cli run typecheck
npm -w packages/cli run lint
npm -w packages/cli test

Release note: skip
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 79b6fc46-6883-420a-b1b4-90e1a62ae7b9

📥 Commits

Reviewing files that changed from the base of the PR and between a833ca0 and 5ca071c.

📒 Files selected for processing (9)
  • .claude/commands/release.md
  • .claude/skills/agentnote-release/SKILL.md
  • .codex/commands/release.md
  • .codex/skills/agentnote-release/SKILL.md
  • .cursor/commands/release.md
  • .cursor/skills/agentnote-release/SKILL.md
  • .gemini/commands/release.md
  • .gemini/skills/agentnote-release/SKILL.md
  • docs/architecture.md

📝 Walkthrough

Walkthrough

This PR standardizes release preparation around a repo-local agentnote-release skill and /release command: contributor guides and architecture docs are updated, and assistant-specific command/skill docs (Claude, Codex, Cursor, Gemini) are added with version/tag normalization, git-cliff preview flags, version-bump commit rules, and push/tag guardrails.

Changes

AI-Driven Release Workflow

Layer / File(s) Summary
Release guidance and architecture docs
AGENTS.md, CLAUDE.md, docs/architecture.md, docs/engineering.md
Contributor guides and architecture docs updated to prefer the repo-local agentnote-release skill or /release command; clarify x.y.z vs vX.Y.Z normalization; require a dedicated chore: bump version to X.Y.Z commit with Release note: skip; and change git-cliff preview to --unreleased --tag vX.Y.Z --strip header and push-tag-once-ready guidance.
Claude Release Skill and Command
.claude/commands/release.md, .claude/skills/agentnote-release/SKILL.md
Adds Claude command and skill docs describing the release CLI interface, version parsing rules, dry-run mode, explicit bump/build/typecheck/lint/test steps, git-cliff preview, staged commit/tag flow, guardrails, and post-push verification and reporting.
Codex Release Skill and Command
.codex/commands/release.md, .codex/skills/agentnote-release/SKILL.md
Adds Codex command and skill docs mirroring the agent-driven release workflow, including version/tag handling, manual release steps with git-cliff preview flags, commit/tag ordering, and verification/reporting requirements.
Cursor Release Skill and Command
.cursor/commands/release.md, .cursor/skills/agentnote-release/SKILL.md
Adds Cursor command and skill docs with end-to-end release instructions: version normalization, clean-tree/dry-run behavior, bump + lockfile sync, build/typecheck/lint/tests, git-cliff preview, release-only commit, annotated tag creation, controlled pushing, verification, and reporting fields.
Gemini Release Skill and Command
.gemini/commands/release.md, .gemini/skills/agentnote-release/SKILL.md
Adds Gemini command and skill docs covering version validation/normalization, main-branch preparation, explicit release steps with git-cliff preview, tag/push sequencing discipline, post-publish verification, and required end-of-run reporting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • wasabeef/AgentNote#73: Both PRs refine release-note workflows and contributor guidance around rewriting commit subjects/bodies and previewing changelogs before tagging.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the main change: adding an agent release workflow (skills and commands) as documented across multiple files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/release-command

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/release.mjs`:
- Around line 98-111: The script's updateVersions function directly mutates the
package-lock JSON (LOCKFILE_PATH) which is brittle; instead, after setting
cliPackage.version and writing CLI_PACKAGE_PATH, invoke npm to regenerate the
lockfile entry so npm handles format differences: update the updateVersions
function to write the new version to CLI_PACKAGE_PATH (using CLI_PACKAGE_PATH
and the existing writeJson), then run an npm command (e.g., npm install
--package-lock-only targeting the CLI package/workspace or using appropriate
workspace flags) from the repo root so npm updates the package-lock entry for
"packages/cli" rather than manually editing lockfile.packages["packages/cli"];
only fall back to the existing direct modification if the npm command fails, and
surface the error.
- Around line 85-91: The assertMainBranch function currently hardcodes "main";
update it to accept configurable default branch names by checking an environment
variable (e.g., RELEASE_MAIN_BRANCH) or a list of allowed names (e.g.,
["main","master","trunk"]) and use gitOutput(["branch","--show-current"]) to
compare against that configurable value/set; modify assertMainBranch and any
callers to prefer the env var if present, falling back to the existing "main" or
the list, and ensure the thrown Error message reflects the configured allowed
branches.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: affc5c42-be1b-41ab-8909-ea1da2adb798

📥 Commits

Reviewing files that changed from the base of the PR and between d94c6ea and aee77ad.

📒 Files selected for processing (6)
  • AGENTS.md
  • CLAUDE.md
  • docs/architecture.md
  • docs/engineering.md
  • package.json
  • scripts/release.mjs

Comment thread scripts/release.mjs Outdated
Comment thread scripts/release.mjs Outdated
Why
Release work is fragile enough that agents should follow the same guarded workflow as humans. A repo-local skill and command make the release command discoverable from Codex, Claude, Cursor, and Gemini.

User impact
Maintainers can ask an agent to prepare or publish an Agent Note release and get the same version bump, release note preview, tag, workflow monitoring, and npm verification steps.

Verification
git diff --check
shasum .codex/skills/agentnote-release/SKILL.md .claude/skills/agentnote-release/SKILL.md .cursor/skills/agentnote-release/SKILL.md .gemini/skills/agentnote-release/SKILL.md
shasum .codex/commands/release.md .claude/commands/release.md .cursor/commands/release.md .gemini/commands/release.md
npm run release -- 1.0.6 --dry-run --allow-non-main --allow-dirty --skip-checks

Release note: skip
Why
The release workflow is maintainer guidance rather than a public CLI feature. Keeping it as repo-local Markdown skills matches the CodeRabbit workflow pattern and avoids maintaining an extra release script.

User impact
Agents can still prepare or publish releases through /release, while the source of truth stays in Markdown and explicitly maps x.y.z inputs to vx.y.z git tags.

Verification
git diff --check
node -e "JSON.parse(require('fs').readFileSync('package.json','utf8')); console.log('package.json ok')"
git-cliff --config .github/cliff.toml --unreleased --tag v1.0.6 --strip header
npm -w packages/cli run typecheck

Release note: skip
@wasabeef wasabeef changed the title chore(release): add release helper command chore(release): add agent release workflow May 15, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/commands/release.md:
- Line 13: Update the git-cliff preview command in the release instructions to
use the repository's canonical invocation: replace the short `git-cliff
--unreleased --tag vx.y.z` usage with the full form `git-cliff --config
.github/cliff.toml --unreleased --tag vx.y.z --strip header` so the command in
the .claude/commands/release.md text matches the repo release workflow guidance.

In @.codex/commands/release.md:
- Line 13: Update the git-cliff preview command in the release instructions to
match the canonical form: replace the existing `git-cliff --unreleased --tag
vx.y.z` usage with the full preview command including the config and strip flags
so it reads `git-cliff --config .github/cliff.toml --strip header --unreleased
--tag vx.y.z`; ensure the same canonical command appears wherever the preview
step (git-cliff) is described so previews match the documented release workflow.

In @.cursor/skills/agentnote-release/SKILL.md:
- Line 22: Step 2 is ambiguous about editing packages["packages/cli"].version in
package-lock.json; instead, update the package version in
packages/cli/package.json and then run npm install (or npm ci) at the repo root
so npm updates package-lock.json automatically and synchronizes
packages["packages/cli"].version to x.y.z; reference the
packages/cli/package.json change and the packages["packages/cli"].version field
in the lockfile when making this guidance.

In @.gemini/skills/agentnote-release/SKILL.md:
- Line 22: Clarify that Step 2 should not be manual editing of
package-lock.json; instead update packages/cli/package.json to the new x.y.z
version and then run npm install in the workspace root so npm updates
packages["packages/cli"].version in package-lock.json automatically; mention the
specific files/keys to touch: packages/cli/package.json and package-lock.json
and the command npm install to synchronize the lockfile.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5c8d1517-5fa7-4515-8415-88961fc95c4d

📥 Commits

Reviewing files that changed from the base of the PR and between 51975a2 and a833ca0.

📒 Files selected for processing (12)
  • .claude/commands/release.md
  • .claude/skills/agentnote-release/SKILL.md
  • .codex/commands/release.md
  • .codex/skills/agentnote-release/SKILL.md
  • .cursor/commands/release.md
  • .cursor/skills/agentnote-release/SKILL.md
  • .gemini/commands/release.md
  • .gemini/skills/agentnote-release/SKILL.md
  • AGENTS.md
  • CLAUDE.md
  • docs/architecture.md
  • docs/engineering.md

Comment thread .claude/commands/release.md Outdated
Comment thread .codex/commands/release.md Outdated
Comment thread .cursor/skills/agentnote-release/SKILL.md Outdated
Comment thread .gemini/skills/agentnote-release/SKILL.md Outdated
Why
CodeRabbit found two places where the release workflow docs could diverge from the canonical maintainer process: abbreviated git-cliff previews and ambiguous lockfile update guidance.

User impact
Agents following /release now use the same git-cliff command everywhere and run npm install to synchronize package-lock.json instead of implying manual lockfile edits.

Verification
git diff --check
node -e "JSON.parse(require('fs').readFileSync('package.json','utf8')); console.log('package.json ok')"
git-cliff --config .github/cliff.toml --unreleased --tag v1.0.6 --strip header
npm -w packages/cli run typecheck
shasum .codex/skills/agentnote-release/SKILL.md .claude/skills/agentnote-release/SKILL.md .cursor/skills/agentnote-release/SKILL.md .gemini/skills/agentnote-release/SKILL.md
shasum .codex/commands/release.md .claude/commands/release.md .cursor/commands/release.md .gemini/commands/release.md

Release note: skip
@wasabeef wasabeef merged commit f62dc6f into main May 15, 2026
11 checks passed
@wasabeef wasabeef deleted the chore/release-command branch May 15, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant