| name | release |
| description | Release public npm packages from this repository. Use ONLY when the user explicitly asks to release and supplies patch, minor, major, or an explicit version number. |
Release
Perform a release only when the user has explicitly provided one of: patch, minor, major, or an explicit version number. If missing, ask for it and stop.
Versioning
This project uses pre-1.0 semver semantics:
patch: non-breaking changes. Increment 0.x.y to 0.x.(y+1).
minor: breaking changes. Increment 0.x.y to 0.(x+1).0.
major: use only when explicitly requested; increment the major version normally.
- Explicit version: use exactly the provided version after confirming it is a valid semver version.
Before editing, inspect all workspace package.json files. Change versions only for public packages (private is not true). Keep public Flue package versions aligned to the selected release version unless the user explicitly directs otherwise. Do not version or publish private packages.
Workflow
- Before any release work, run
git status --short --branch and confirm the working directory is clean. If it is not clean, stop and ask before proceeding.
- Read
CHANGELOG.md and review the unreleased changes against the commits since the prior release. Ensure the selected release has an accurate dated changelog section; include its update in the release changes.
- Check the installed versions of
@earendil-works/pi-ai and @earendil-works/pi-agent-core against their latest npm versions. If either is outdated, warn the user and ask whether to update before continuing the release. If the user declines, continue without updating. If the user approves, review the upstream changelog for every intervening version and confirm the update is safe before running pnpm update --recursive --latest @earendil-works/pi-ai @earendil-works/pi-agent-core.
- Confirm the repository is on the intended current branch and determine the selected release version.
- Inspect all workspace package manifests and update the
version field in each public package package.json to the selected release version.
- Run
pnpm install --lockfile-only if necessary to update version-related lockfile metadata.
- Rebuild from scratch: remove generated build outputs for public packages, then run the repository build command (
pnpm run build from the repository root).
- Run repository validation before publishing:
pnpm run check from the repository root.
- Prepare publish artifacts: run
node scripts/prepare-publish.mjs from the repository root. This copies the docs content into each public package's docs/ folder (gitignored) and syncs the root README.md into the core packages (@flue/cli, @flue/runtime, @flue/sdk).
- Publish each public package from its package directory using
pnpm publish -r --no-git-checks. Publish in dependency order when required (for this repository, publish @flue/runtime before packages that depend on it).
- Inspect the final diff and stage only release-generated changes, including the changelog, package versions, lockfile updates, and build or prepublish-generated tracked files.
- Commit after publication with
git commit -m "chore: release v<VERSION>".
- Tag that final commit with
git tag v<VERSION>.
- Push the current branch, then push the tag:
git push followed by git push --tags.
Guardrails
- Do not begin without an explicitly stated release increment or version.
- Do not alter files, build, validate, or publish until the initial clean working-directory check has succeeded and
CHANGELOG.md has been reviewed.
- Never use a normal
pnpm publish; always include -r --no-git-checks because publishing occurs from an intentionally unclean release tree before the commit.
- Never commit unrelated pre-existing work.
- Never create the tag until publishing and the release commit both succeed.
- If publish fails partway through, stop and report which packages published; do not tag or push.
- If verification, commit, tag, or push fails, stop and report the failure rather than changing the requested version.