ViraStack
  • Academy
  • About
  • Support
HomeGet Started

Getting started

  • Introduction
  • Installation
  • Supported tools
  • llms.txt
  • llms-full.txt

Usage

  • CLI
  • Installed files

Rules

  • Rule catalog
  • Customization

Versions

  • Upgrade to v2
  • Changelog

Rule catalog

Two rules always load. The others load when the agent works on matching files.

How rules load

  • core and architecture are always loaded.
  • The others carry file patterns: paths in Claude Code, globs in Cursor. The tool loads a rule when the agent reads or edits a matching file.
  • Other agents follow the AGENTS.md map, which gives each rule’s “Use when” line.

Catalog

RuleCoversLoaded for
coreWorking agreement: read before changing, minimal diffs, naming, named exports, error handling, comments.Always
architectureStack table, folder tree, where code lives, feature boundaries and import rules (no ../ imports).Always
reactReact 19 components and hooks: derive instead of mirror, effects only for external systems, React Compiler, ref as a prop.src/**/*.tsxsrc/hooks/**/*.tssrc/features/**/hooks/**/*.ts
typescriptStrict TypeScript and Zod 4: schemas first, discriminated unions, no any, as or non-null assertions.src/**/*.{ts,tsx}
uishadcn/ui on Base UI or Radix, Tailwind CSS 4 tokens, loading, empty and error states, accessibility.src/components/**/*.tsxsrc/features/**/components/**/*.tsx
formsReact Hook Form with zodResolver, schemas in schemas/, typed defaultValues, server errors with setError.src/features/**/components/*Form*.tsxsrc/features/**/schemas/**/*.tssrc/schemas/**/*.ts
apiHTTP calls in features/*/api through src/lib/api.ts, Zod-parsed responses, ApiError, paginated lists.src/lib/api.tssrc/features/**/api/**/*.ts
server-stateTanStack Query 5: key factories, one queryOptions per query, thin hooks, invalidation, optimistic updates.src/features/**/api/**/*.tssrc/features/**/hooks/**/*.tssrc/hooks/**/*.tssrc/lib/query-client.tssrc/providers/**/*.{ts,tsx}
client-stateZustand 5 stores with selectors and useShallow, URL state with nuqs, SSR-safe persistence.src/stores/**/*.tssrc/features/**/stores/**/*.ts
i18nMessages in messages/, no hardcoded strings, typed keys; next-intl and Paraglide specifics.Only with next-intl or Paraglide installedmessages/**/*.jsonsrc/i18n/**/*.tsproject.inlang/settings.jsonsrc/components/**/*.tsxsrc/features/**/components/**/*.tsx
performanceLCP, INP and CLS budgets, measure before optimizing, images, fonts and scripts.src/app/**/*.tsxsrc/routes/**/*.tsxsrc/components/**/*.tsxsrc/features/**/components/**/*.tsx
testingVitest, Testing Library and MSW: behavior over implementation, role queries, HTTP mocked with MSW.src/**/*.test.{ts,tsx}src/test/**/*.{ts,tsx}vitest.config.ts
nextjsApp Router: Server Components, async params, Server Actions, "use cache", proxy.ts, next/image and next/font.Next.js projects onlysrc/app/**/*.{ts,tsx}src/proxy.tsnext.config.ts
tanstack-startFile routes, loaders with ensureQueryData, server functions with createServerFn, middleware, head().TanStack Start projects onlysrc/routes/**/*.{ts,tsx}src/router.tsxsrc/start.ts

What changes per project

  • nextjs is installed only in Next.js projects, tanstack-start only in TanStack Start projects.
  • i18n is installed only when next-intl or @inlang/paraglide-js is a dependency. Add the library later and run init again to get it.
  • Rules shared by both frameworks keep only the lines for yours, for example the QueryProvider setup in server-state.
  • Commands inside the rules (lint, typecheck, test, shadcn add) use your package manager.
PreviousInstalled filesNextCustomization

On this page

  • How rules load
  • Catalog
  • What changes per project
Something wrong? Fix it