Release
You are running the SPECTRE release workflow. Follow each step precisely.
Input Handling
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded $ARGUMENTS value.
Arguments
$ARGUMENTS is optional: patch, minor, or major. If not provided, ask the user.
Version Files
All three files must be bumped in sync:
plugins/spectre/.claude-plugin/plugin.json->versionfield (Claude Code plugin manifest).claude-plugin/marketplace.json-> top-levelversionandplugins[0].version(Claude Code marketplace)package.json->versionfield (npm package@codename_inc/spectre, used by Codexnpxinstalls)
Skipping package.json strands Codex users on the previous version even though the marketplace is current.
Execution Flow
Step 1: Determine Version Bump
Read all version files to get the current version.
If $ARGUMENTS contains patch, minor, or major, use that. Otherwise, ask the user:
Which version bump?
- patch (bug fixes, small changes)
- minor (new features, non-breaking)
- major (breaking changes)
Calculate the new version number and confirm it with the user before proceeding.
Step 2: Handle Dirty Working Tree
Run git status and git diff (staged and unstaged).
If there are uncommitted changes:
- Analyze what changed: read the diffs and understand the intent.
- Stage the relevant files with specific filenames, not
git add -A. - Write a descriptive commit message that summarizes the actual changes. Do not use
release: vX.Y.Zhere; that comes later. - Create the commit.
- If there are no changes, skip this step.
Step 3: Sync Codex Generated Tree
Run the Codex author-time sync before any version files are updated:
Run
npm run sync-codex.Run
npm run sync-codex -- --check.Run
git diff -- plugins/spectre-codex/and inspect any generated changes.If
plugins/spectre-codex/changed, stage only the generated tree and commit it separately:git add plugins/spectre-codex git commit -m "release: sync codex tree"If there are no generated changes, skip the sync commit.
Do not bump versions until the sync check passes.
Step 4: Bump Versions
Update
plugins/spectre/.claude-plugin/plugin.jsonwith the new version.Update
.claude-plugin/marketplace.json: bothversion(top-level) andplugins[0].version.Update
package.jsonversion.Commit these version bumps:
git add plugins/spectre/.claude-plugin/plugin.json .claude-plugin/marketplace.json package.json git commit -m "release: vX.Y.Z"
Step 5: Refresh Global Codex Install Before Shipping
Before changelog, tag, push, or npm publish, make sure the global Codex install is running the exact generated assets from this checkout.
Run the source-local user-scope update:
node bin/spectre.js update codex --scope user --project-dir "$PWD"Verify the installed Codex runtime and hook wiring:
node bin/spectre.js doctor codex --scope user --project-dir "$PWD" --verify-hooksIf the update or doctor command fails, stop and fix it before shipping.
Do not stage ignored local runtime state such as
.codex/,.spectre/,~/.codex/, orAGENTS.override.mdunless the user explicitly asks. This step is a local install guard, not a release artifact commit.
Step 6: Build Changelog
Generate a changelog by analyzing commits since the last tag:
git log $(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)..HEAD --oneline
Organize the commits into a changelog with these categories, skipping empty categories:
- New - new features or capabilities
- Changed - modifications to existing behavior
- Fixed - bug fixes
- Removed - removed features or code
Write the changelog in concise bullet points. Each bullet should describe the user-facing change, not the implementation detail. Present the draft to the user and ask if they want to edit it before proceeding.
Step 7: Tag and Push
- Create the git tag:
vX.Y.Z. - Ask the user to confirm before pushing:
git pushgit push --tags
Step 8: Create GitHub Release
After pushing, create a GitHub release with the changelog:
gh release create vX.Y.Z --title "vX.Y.Z" --notes "<changelog>"
Use a heredoc for the notes body to preserve formatting.
Step 9: Manual npm Publish Handoff
Codex users install via npx @codename_inc/spectre install codex, so the npm package must be published for them to pick up the new version. The marketplace alone is not enough.
Do not run npm login or npm publish for the user. npm auth, OTP, and publish confirmation are user-owned interactive steps. This is the final manual publish step.
Ask the user to run these commands themselves:
npm login
npm publish --access public
If they are already logged in, they can skip npm login. If npm requires an OTP, they should rerun publish with:
npm publish --access public --otp=<code>
Wait for the user to confirm the package is published before proceeding.
Step 10: Verify npm and Refresh Global Codex Install
After the user confirms npm publish completed:
Verify the new version is live:
npm view @codename_inc/spectre versions --jsonRefresh the global Codex install one final time from this checkout:
node bin/spectre.js update codex --scope user --project-dir "$PWD"Verify the installed Codex runtime and hook wiring:
node bin/spectre.js doctor codex --scope user --project-dir "$PWD" --verify-hooksDo not stage ignored local runtime state such as
.codex/,.spectre/,~/.codex/, orAGENTS.override.mdunless the user explicitly asks.
Step 11: Done
Print a summary:
Release complete: vX.Y.Z
- Commit: <short sha>
- Tag: vX.Y.Z
- GitHub release: <url>
- npm: @codename_inc/spectre@X.Y.Z