# Migrate to Nx 23

## Summary

The Botonic workspace and `@botonic/nx-plugin` have been upgraded to Nx 23.1.0.
Bot apps declare their own `nx` / `@nx/*` dependencies (e.g. `@nx/vite`) in
their `package.json`, independently from the workspace root, so each bot needs
its own version bump to stay on a supported Nx line.

## What the automated migration does

- Scans the bot's `package.json` (`dependencies`, `devDependencies`,
  `peerDependencies`, `optionalDependencies`)
- Bumps any `nx` or `@nx/*` entry that is not already on the `23.x` line to
  `23.1.0`, preserving the existing `^` / `~` range prefix
- Bumps the bot's `@botonic/*` dependencies to the current `@botonic/nx-plugin`
  version, matching the workspace it now targets

## What it cannot handle

- Bots that pin `nx` / `@nx/*` to a version below 23 intentionally (e.g. for a
  plugin not yet compatible with Nx 23) — those pins are still rewritten;
  revert manually if this is a problem
- Custom executors/generators in the bot that depend on Nx 22-only APIs
- Root-level workspace dependencies — those are handled by the companion
  `update-nx-23` workspace migration, not this generator

## Manual migration steps

If the bot has custom Nx executors or plugins that assume Nx 22 APIs (e.g. the
old `CreateNodesV2` / `CreateNodesResultV2` types), update them to the Nx 23
equivalents (`CreateNodes`, `CreateNodesResultArray`) before running
`nx build`.

## Verification checklist

- [ ] `pnpm nx build <bot-name>` — builds successfully
- [ ] `pnpm nx test <bot-name>` — tests pass
- [ ] `pnpm nx serve-bot <bot-name>` — starts development server
- [ ] `pnpm install` — lockfile resolves cleanly after the version bump
