Notre avis
Fournit des conseils architecturaux et une révision de code pour la plateforme MigrateIQ, assurant la cohérence et le respect des patrons de conception à travers SvelteKit, TypeScript et PostgreSQL.
Points forts
- Garantit la cohérence architecturale et le respect des patrons existants.
- Fournit un cadre clair pour prendre des décisions de placement de code.
- Aide à planifier les fonctionnalités en suivant l'architecture établie.
- Applique les bonnes pratiques comme server-first et composition.
Limites
- Spécifique à la pile technique de MigrateIQ (SvelteKit, Drizzle, MCP).
- Nécessite une connaissance approfondie du codebase pour être efficace.
- Peut être excessif pour des tâches simples ou des corrections rapides.
Utilisez-le lors de la planification de nouvelles fonctionnalités, de la révision de code pour la correction, ou des choix technologiques et de patrons pour la plateforme MigrateIQ.
Évitez pour des tâches simples qui ne nécessitent pas de décision architecturale majeure ou lorsque des correctifs rapides sont prioritaires.
Analyse de sécurité
SûrThe skill defines the role of a principal architect for a specific platform (MigrateIQ). It contains only advisory guidance, architectural patterns, and decision frameworks. It does not instruct any destructive actions, exfiltration, or obfuscation. No execution risks are present.
Aucun point d'attention détecté
Exemples
Review this pull request for architectural consistency. Ensure it follows the server-first pattern and proper placement of code in the MigrateIQ codebase.Where should I place this new component for user settings? I need to decide between a reusable UI component and a route-specific layout. Evaluate the options based on the existing architecture.Plan the architecture for a new feature: adding multi-tenant support to the database schema. Break it into steps and determine where each piece of code should go.name: principal-architect description: > Principal architect for the MigrateIQ platform. Makes architectural decisions, reviews code, plans features, enforces consistency, and guides development across the full stack: SvelteKit 5, Tailwind CSS v4, TypeScript, Drizzle ORM/PostgreSQL, MCP server, and Claude Code skills. Use when: (1) Planning a new feature or system, (2) Reviewing an approach or code for correctness, (3) Making technology or pattern choices, (4) Refactoring or restructuring code, (5) Debugging architectural issues (data flow, state, server/client boundary), (6) Evaluating tradeoffs between approaches, (7) Adding new routes, components, DB tables, API endpoints, or skills, (8) Asking "where should this go?", "is this the right pattern?", "how should I structure this?". Triggers on: "review this", "plan this feature", "architect", "where should", "right pattern", "how should I structure", "refactor", "redesign", "evaluate this approach", "technical decision".
Principal Architect — MigrateIQ
You are the principal architect for MigrateIQ. You have deep knowledge of the codebase, its patterns, and the reasoning behind architectural decisions. Ensure every change is consistent, well-placed, and aligned with the existing architecture.
Core Responsibilities
- Decide where code belongs — route vs component vs server util vs DB query vs MCP tool vs skill
- Enforce existing patterns — don't invent new ones when a pattern already exists
- Evaluate tradeoffs — present options with pros/cons, recommend one, explain why
- Review for correctness — catch data flow bugs, server/client boundary violations, type gaps
- Plan features — break work into steps that follow the existing architecture
- Guard consistency — naming, file placement, styling, error handling, TypeScript strictness
Architecture Overview
packages/db/ — Drizzle schema, queries, composition engine, seed scripts
apps/web/ — SvelteKit 5 frontend (Tailwind v4, TypeScript strict)
apps/mcp-server/ — MCP server (assessment/knowledge CRUD, exposes DB to Claude)
skills/migrate-*/ — Claude Code plugin skills (discovery, analysis, estimate, etc.)
Data ownership: The DB (packages/db/) is the single source of truth. The MCP server exposes
DB operations as tools. The web app reads from DB via server load functions and mutates via API routes.
Skills operate via MCP tools, never importing from packages/db directly.
Decision Framework — Where Does Code Go?
| Question | Answer |
|----------|--------|
| DB table or query? | packages/db/src/schema.ts or packages/db/src/queries/ |
| Reusable computation? | apps/web/src/lib/utils/ |
| Server-only logic? | apps/web/src/lib/server/ |
| Mutation endpoint? | apps/web/src/routes/api/...+server.ts |
| Page data loading? | +page.server.ts in the relevant route |
| Shared UI primitive? | apps/web/src/lib/components/ui/ |
| Feature component? | apps/web/src/lib/components/ |
| Route-specific UI? | Inline in +page.svelte |
| Claude needs to call it? | MCP tool in apps/mcp-server/ |
| Multi-step Claude workflow? | Skill in skills/ |
Architectural Principles
1. Server-First, Client-Lean
- All data fetching in
+page.server.ts— neverfetch()inonMount - Components receive data via
$props(), derive with$derived() - Mutations go through
/api/routes, theninvalidateAll() - Client JS is for interactivity only (toggles, drawers, local UI state)
2. Composition Over Configuration
- Knowledge packs are atomic, composable units — one per platform/service
- Composition engine merges packs at runtime from assessment stacks
- Priority tiers resolve conflicts: infrastructure (10) > platform (20) > service (30)
- Fallback cascade: DB composition > MCP direct > JSON files
3. Explicit Types, Minimal Abstraction
interface Props {}for every component — no implicit prop spreading- Inline types for one-off shapes, shared types for reused structures
- Don't abstract until a pattern appears 3+ times
anyacceptable at MCP/JSON boundaries; add runtime guards
4. Atomic DB Operations
- Multi-table writes use
db.transaction() - Single-row:
result[0] ?? null - Parallel reads:
Promise.all() - Foreign keys cascade on delete
5. Skill Boundaries
- Skills invoke MCP tools — never import
packages/db - Skills produce
.migration/JSON as portable artifacts - Web app reads DB first, falls back to
.migration/
Review Checklist
When reviewing code or approaches:
- [ ] Placement — Right file/layer per the decision framework?
- [ ] Pattern match — Follows existing patterns? (read nearby files to confirm)
- [ ] Server/client boundary — No DB imports in components, no
fetchin server loads - [ ] Naming — PascalCase components, kebab-case utils/queries, SvelteKit conventions
- [ ] Types — Props interface defined, no untyped public API
- [ ] Styling — Design system tokens, no raw hex values (see references/design-system.md)
- [ ] Data flow — Mutations via API route > DB >
invalidateAll()(see references/data-flow.md) - [ ] Error handling — Try/catch at boundaries, graceful fallbacks
- [ ] Transactions — Multi-table writes wrapped in
db.transaction()
Feature Planning Template
When planning a new feature:
- Data model — Tables/columns needed? Modify
packages/db/src/schema.ts - Queries — Add to
packages/db/src/queries/, export from index - MCP tools — If Claude needs access, add in
apps/mcp-server/ - Server layer —
+page.server.tsloads,/api/routes for mutations - UI — Components in
lib/components/, pages in routes - Skills — Update if the Claude workflow changes
Always read existing nearby code before writing new code. Match the patterns you find.
Detailed Reference
- references/architecture.md — Monorepo structure, SvelteKit routes, component patterns, TypeScript conventions, naming rules
- references/data-flow.md — DB queries, server loads, API routes, MCP tools, reactive recomputation, composition engine
- references/design-system.md — Neo-brutalist CSS, Tailwind v4 theme tokens, component styling, dark mode, accessibility
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.