Guidelines for building React + Vite web apps in the pnpm monorepo with design subagent delegation.
Always follow these guidelines when building a React + Vite web application:
design skill and start an async design subagent to build the frontend. Do not give the subagent any recommendation or advice on how it should build the frontend unless requested by the user. For example, do not talk about color, font, layout, etc. the design subagent has much better taste than youYou must use the design subagent for every react-vite first build — no exceptions. This applies regardless of app size, complexity, or whether a backend is needed. "No backend" means skip OpenAPI/codegen, not skip the design subagent. "Simple app" means the subagent gets a simpler brief, not that you build the frontend yourself. Never build the frontend yourself to save time — the design subagent is the fast path.
Before building, classify the app to decide how you and the DESIGN subagent split work. The design subagent is always used — the question is how much it owns.
The difference between a boring app and a great app is usually 3-5 extra endpoints in the spec. Before codegen, spend an extra minute adding safe wow endpoints beyond flat CRUD — lightweight read-only endpoints that make the app feel polished:
Skip speculative expensive features (recommendations, anomaly detection, forecasting, complex real-time presence).
This way the design subagent has real hooks for both the core app and the wow surfaces, and integration is minimal.
Use the pnpm-workspace skill as the source of truth for shared monorepo rules. When you touch backend code, follow the pnpm-workspace skill's references:
references/openapi.md for contract-first OpenAPI + codegenreferences/server.md for artifacts/api-server/src/routes/ conventionsreferences/db.md for lib/db/src/schema/ and Drizzle guidanceThe design subagent is the bottleneck — everything is ordered to get it running ASAP.
lib/api-spec/openapi.yaml — include both core CRUD and the safe wow endpoints from Step 2. This is the critical path because it gates codegen which gates the design subagent.pnpm run --filter @workspace/api-spec codegen)design skill's delegation rules:
grep "^export " lib/api-client-react/src/generated/*.ts | grep -E "function use|const use|QueryKey" and include the full list in the task description so the subagent does not guess names.src/App.tsx, package.json, and references/frontend_general_rules.md via relevantFiles so the subagent can import and use real API hooks without wasting time exploring.relevantSkills — use the full path from the skills view for each one. Any skill with integration details (auth, storage, payments, etc.) must be forwarded so the subagent builds correctly.grep "^export " lib/api-zod/src/generated/api.ts to capture the exact Zod schema names (e.g. ListNotesQueryParams, CreateNoteBody, GetNoteParams). Use the real names when writing routes instead of guessing based on Orval's naming conventions.lib/db/src/schema/, then run pnpm --filter @workspace/db run push.artifacts/api-server/src/routes/, importing the exact Zod schema names from the grep above (do not guess — Orval names vary by parameter location: QueryParams, Params, Body).generate_image instead of placeholder services (DiceBear, Boring Avatars, Unsplash, Lorem Picsum, etc.). Real API image URLs (e.g. PokéAPI sprites, TMDB posters) are fine. It's okay not to seed object storage.generate_image, generate_video, and stock_image.
Note: It's important to do all the DB schema/definitions/seeding and development work only after the design subagent has been spawned for maximal speed.suggestDeploy() — prompt the user to publish their app so it's live and accessible.No OpenAPI, no codegen. Launch the design subagent immediately.
design skilldesign skill's presentation-heavy delegation rules:
src/App.tsx, and package.json via relevantFiles.suggestDeploy().src/index.css (colors, fonts, radius) and store them for use in subsequent artifacts (expo, slides, etc.). This ensures all artifacts share the same visual identity. See multi-artifact-creation.md "Visual Consistency" section.suggestDeploy() so the user knows their app is ready to publishpnpm-workspace skill./ws) must be listed in artifact.toml's paths array alongside the REST API path. The proxy only forwards explicitly listed paths — unlisted WS paths are silently dropped and the server never sees the connection.There is a full SEO implementation guide in references/seo.md. Read it when building or optimizing pages for search engine visibility. At minimum, ensure every page has a unique title tag, meta description, and Open Graph tags.