Every AI tool wants its own config — Cursor, Claude Code, Copilot, Windsurf. contextarch detects your stack and generates all four, consistent with each other, tuned to what you actually use.
Four files, every run. Same core behavior rules so every agent in your editor acts the same.
Four tools, four config formats, zero consistency. Most rules are copied from a blog post and never updated.
No install, no account, no config file to learn. 60-second wizard, four files on disk.
`npx contextarch init` fetches the CLI on demand — nothing to install. Works on Node.js 18+.
Project kind, coding style (strict / pragmatic / fast-iteration), verbosity, testing emphasis, any project-specific rules. Smart defaults from your manifests — usually you just hit enter.
Existing files get `.bak` backups by default. Re-run any time with `--overwrite` to regenerate.
Real excerpts for four stacks. Same core rules, stack-specific guidance — no generic filler.
### Next.js (App Router) - Server Components by default. Add "use client" only when you need state, effects, or browser APIs. - Data fetching lives in Server Components or Route Handlers — not in useEffect. - Server Actions for mutations — always validate inputs with Zod/Valibot before doing work. - Cache with fetch options (next: { revalidate }, cache: 'force-cache') — don't reinvent. ### Prisma - Schema is the source of truth. Migrations via prisma migrate, never raw SQL drift. - Select only needed fields (select: { ... }) — don't return full rows to clients. - Wrap multi-step mutations in prisma.$transaction([...]). - Singleton client in server code; don't instantiate new PrismaClient() per request.
### FastAPI - Pydantic v2 models for every request body and response. Let FastAPI do the validation. - Dependency injection via Depends(...) — don't import globals inside routes. - Async routes for I/O-bound work; sync when the library is sync (don't fake async). - Return typed response models via response_model= — don't leak ORM objects. ### Python - Type hints on every function signature. Use mypy --strict or pyright in CI. - f-strings for formatting. Never % or .format() in new code. - Prefer pathlib.Path over os.path. Use match/case where it clarifies branching.
### Go - Go 1.22+ features are fair game. Prefer the standard library. - Errors as values — wrap with fmt.Errorf("context: %w", err) and check with errors.Is/As. - Return early. Avoid nested if err == nil pyramids. - Accept interfaces, return structs. Keep interfaces small — define them where consumed. - Context propagation: every I/O function takes ctx context.Context as the first arg. - Table-driven tests with t.Run(name, ...) subtests. Avoid: - Panicking in library code for recoverable errors. - Stuffing everything in package main.
### SvelteKit - Load data in +page.server.ts / +page.ts — never fetch in the component <script> block. - Form actions for mutations. Use progressive enhancement (use:enhance). - Stores (writable, readable) for shared state; prefer $state runes in Svelte 5. - Put server-only code in $lib/server/ so it can't leak to the client bundle. ### TypeScript - Never use any — use unknown and narrow, or write a proper type. - Import types with import type { ... } to avoid runtime import cost. - Prefer discriminated unions over enums.
Thirty-plus stack tags out of the box. Detection reads your actual manifests, so you usually don't pick anything.