This document contains foundational mandates for Gemini CLI in this workspace. These instructions take absolute precedence over general workflows and tool defaults.
This is NOT the Next.js you know. This version has breaking changes. Read the relevant guide in apps/web/node_modules/next/dist/docs/ before writing or changing Next.js code. Heed deprecation notices.
Use this exact priority order when sources conflict:
AGENTS.mdand nestedAGENTS.mdfilesdocs/index.mdand the referenced canonical docs spine- current runtime code in
apps/web/andpackages/codebase-compiler/ docs/ship-by-sunday/*historical source packs for background only
- Ownership-First: Organize code by the owning route, product domain, or platform boundary already present in
apps/web/. - Separation of Concerns: Presentation belongs in components; stateful or behavioral logic belongs in hooks, helpers, or controller layers.
- Component Limits: Never leave a component above 150 lines if it can be split cleanly into feature-local pieces.
- Types & Validation: Prefer straightforward TypeScript, early returns, shallow control flow, and discriminated unions. Assert at boundaries; fail fast.
- Smallest Change: Prefer the smallest viable change. No opportunistic refactors unless required.
- Runtime/PM:
bun - UI:
shadcn/ui - Lint/Format:
oxlint,oxfmt - Python:
uv,ruff,black - Backend/Auth: Convex (hosted dev only), Clerk
- Payments: Stripe
- Testing: Playwright (E2E/Browser), Vitest (Unit/Integration)
bun run dev:full— Start web + hosted Convex dev + Stripe listener.bun run build/bun run typecheck— Build and verify.bun run check— Full repo check (lint, format, test, build).bun run test:unit/test:contracts/test:integration/test:e2e:sandbox— Focused and broad test surfaces.
- Codebase-First: This product is codebase-first, not course-first.
- Protected Handoff: The current journey is
/home -> /generate-codebase -> /generate-codebase/review; staged routes are compatibility redirects only. - Unlock Logic: Ensure the Ship by Sunday Codebase handoff and optional Execute / Ship bonus library unlock exactly as defined in
apps/web/AGENTS.md. - Homepage: Changes to
/must followstarterConfig.homePageinapps/web/config/product.tsand related files. Readapps/web/content/docs/configure-the-homepage.mdxfirst.
- Compiler First: Treat as a codebase compiler with repo-generation side effects.
- Derivation: Prefer derivation over recollection. Do not re-ask downstream for upstream data.
- Pricing: Belongs in
Build Plan. - Customer-Safe: Repo snapshots must exclude machine-local junk, generated output, and unresolved symlinks.
- Convex: Hosted dev workflow only. No local mode. Read
apps/web/convex/_generated/ai/guidelines.mdbefore editing. - ExecPlans: Mandatory for complex features, migrations, or refactors. Store active plans in
docs/exec-plans/active/. Followdocs/exec-plans/PLANS.mdexactly. Treatdocs/codex/as legacy archive only. - Validation: Validate immediately after each milestone. Stop and repair if validation fails.
- Requested behavior is implemented and verified.
- Relevant checks passed (
lint,format:check,test,build). - Diff is scoped; no unrelated changes.
GEMINI.md, ExecPlans, or docs are updated as needed.- Remaining risks or follow-ups are clearly stated.
- Never commit secrets, API keys, or
.envfiles. - Do not overwrite unrelated user changes or delete unrelated files.
- Propose a draft commit message and wait for approval before committing.