assessment-model/CLAUDE.md
2026-05-06 16:11:00 +00:00

1.2 KiB

Claude guidance for this project

Project conventions

  • Domain language lives in CONTEXT.md. Read it before naming or discussing BulkUpload, Portfolio, Property, etc. concepts.
  • Architectural decisions live in docs/adr/. Read existing ADRs before proposing changes that touch state machines or core flows. Write a new ADR for any decision that's hard to reverse, surprising without context, and the result of a real trade-off.

React

  • Avoid useEffect and useMemo. Derive values inline, prefer Server Components + Route Handlers, prefer event handlers. If a hook is genuinely the only option, flag it and ask before using it.
  • Use TanStack Query (@tanstack/react-query), not raw fetch, for client-side HTTP. Reads use useQuery; writes use useMutation. This project is on v4 — note that refetchInterval's callback signature is (data, query), not v5's (query).

Next.js 15 route handlers

  • params is a Promise — type as { params: Promise<{ ... }> } and await params before destructuring.
  • Error responses use { error: string } consistently. Don't drift to { msg } or other shapes.