Guides
- Pre-commit hook: Biome on staged files + full-monorepo
pnpm typecheck(turbo-cached, cold ~30s). It blocks—fix first. ^buildin turbo: tests + typecheck build deps first; if type errors appear after changing a package, runpnpm build.- Workspace header: frontend sends
x-workspace-idon every tRPC request; missing→user's default workspace. - Master workspace bypass:
scopedFilterskips checks for the master UUID—never use it for user-facing ops. - Next.js: both apps
output: "standalone"(.next/standalonedeploys) +ignoreBuildErrors: true—rely onpnpm typecheck. - Async event dispatch: polling-based (1s)—events aren't processed immediately after a mutation.
- CI:
.github/workflows/ci.ymlruns typecheck + lint + test on PR/push tomainagainstpgvector/pgvector:pg16. No Temporal (activities run as plain TS); no Playwright; deploys manual viadeploy.sh. - Temporal activities import directly: they run in regular Node (not sandboxed)—lazy
await import()heavy deps like@react-pdf/renderer. - Shared enum:
assetTypeEnumlives inassets.ts, imported byproducts.ts—update in one place. - Open-redirect: quote/invoice tracking URLs embed the redirect target inside the signed JWT—never take it from query params.
- Stripe webhook:
POST /api/webhooks/stripehandles quote (payment_intent.*) + invoice (checkout.session.*), routed bysession.metadata.invoiceId. - Automation allowlist:
ActionExecutor.UPDATABLE_FIELDSgates automatable fields—extend it when adding one. - Ask model:
ASK_MODEL_ID(defaultclaude-sonnet-4-6,…/ask/model.ts) must exist inMODEL_PRICING(boot-checked); test embedders needcreateTestHybridRetriever.