Purpose
Code that any teammate (or Claude Code) can read and extend without asking.
The standard
TypeScript everywhere;
strict: true; noanywithout a// why:comment.Formatting by Prettier, linting by ESLint (
next/core-web-vitals+typescript-eslint). No style debates in review.Named exports; default export only for Next.js pages/layouts.
Functions small and pure where possible; side effects in server actions or route handlers.
Data fetching in server components; mutations in server actions; validate every input with
zodat the boundary.Prefer
async/await; never swallow a rejected promise.Types generated from Supabase (
supabase gen types typescript) and committed assrc/types/database.types.ts.Imports: absolute via
@/; ordered external → internal → relative (lint-enforced).
Examples
// good
export async function getPanelsByProject(projectId: string): Promise<Panel[]> { … }
// avoid
export default async function getData(id: any) { … }
Owner: Matt · Last reviewed: 2026-09