Upgrade guide
Move between ViraStack AI versions: what changed, the command to run and what to check by hand.
From v2.0 to v2.1
Run init again. There is nothing to migrate by hand:
$ pnpm dlx @virastack/ai@2 init- Rules you did not change are updated. Rules you changed are kept and listed; use
--forceto replace them. - The rules now ban barrel files and use one
@/*alias. Your existingindex.tsfiles and aliases are not errors, and nothing asks you to refactor them. New code follows the new rules. - The
i18nrule now expectssrc/messages/. An existing rootmessages/folder keeps working; a project instruction can say so. - A project with only
@tanstack/react-routeris no longer treated as TanStack Start; pass--frameworkif you still want those rules.
From v1 to v2
What changed
- Rules moved from
.cursor/rules/*.mdcto.cursor/rules/virastack/, and Claude Code gets its own copy in.claude/rules/virastack/. See installed files. docs/architecture-guide.mdbecame the always-loadedarchitecturerule.docs/MEMORIES.mdis gone.AGENTS.mdis no longer replaced. ViraStack writes only itsvirastack-aiblock.- The Next.js block (
nextjs-agent-rules) is no longer written by ViraStack AI. Next.js and ViraStack Start add it to new projects; the copy v1 wrote is removed if you never edited it. features/*/data/becameconstants/, and the rules no longer use the@/dataalias or*.data.tsfiles.ApiErrorusesmessage,statusanddata, matching ViraStack Start’ssrc/lib/api.ts.
Renamed rules
| v1 file | v2 rule |
|---|---|
.cursor/rules/core-principles.mdc | core |
docs/architecture-guide.md | architecture |
.cursor/rules/react-best-practices.mdc | react |
.cursor/rules/ui-components.mdc | ui |
.cursor/rules/tanstack-query.mdc | server-state |
.cursor/rules/state-management.mdc | client-state |
docs/MEMORIES.md | Removed |
Same name, rewritten content: api, forms, i18n, nextjs, performance, tanstack-start, testing, typescript.
One command
Commit or stash your work, then run in the project root:
$ pnpm dlx @virastack/ai@2 init- v1 rule files and
docs/files you never edited are removed. - v1 files you edited are kept and listed, so you can move your changes and delete them yourself.
- An unedited v1
AGENTS.mdis replaced by the new block. If you edited it, your content is kept, the block is added below it and the CLI warns you. - The v1
CLAUDE.md(@AGENTS.md) is kept.
- .cursor/rules/core-principles.mdc (v1) · removed
- docs/architecture-guide.md (v1) · removed
- docs/MEMORIES.md (v1) · removed
! .cursor/rules/ui-components.mdc (v1) · kept: v1 file you changed; delete it yourself if no longer neededLines marked (v1) are the migration. Add --dry-run to see them before anything is written.
Check by hand
- Kept v1 rule files: move your changes into your own rule file (see customization), then delete the old file.
- Old
AGENTS.mdcontent: if the CLI warned you, remove the v1 part above the block so agents do not get duplicate instructions. - Filled-in
docs/MEMORIES.md: it is kept. Move what is still useful intoAGENTS.mdoutside the block, then delete it. @/datain your code: renamedata/folders toconstants/and remove the alias fromtsconfig.json, or agents will keep two patterns.- Commit the result, including
.virastack/ai.json.
Roll back
Remove v2, then install v1 again:
$ pnpm dlx @virastack/ai remove$ pnpm dlx @virastack/ai@1 initThe v1 documentation stays in the v1 archive.