Agents
What to load before writing code in the product site, the rules a gate will not catch for you, and the one thing that always has to be checked in a browser.
Written for whoever — human or not — is about to open a file here. The
repo-wide agent notes cover the workspace; this is the part
that is specific to web.
Load before you write
| Doing | Load |
|---|---|
Anything in src/app | next-best-practices, next-cache-components, nextjs-app-router-patterns |
| Fetching or caching | ★ react-query — and read Data first, because this app uses SWR, not React Query |
| Adding state | Where state lives. On web it belongs in the URL through nuqs, not in a store |
| Designing a component API | vercel-composition-patterns |
| Touching a shared primitive | ★ pitsi-ui-component |
| Confirming any of it rendered | ★ preview — mandatory, see below |
This is not the Next.js in your training data
Next 16 renamed middleware.ts to proxy.ts, and this app is on it. Read the
guide in node_modules/next/dist/docs/ before writing routing or config code
rather than reaching for what you remember.
What review will send back
- A filter that exists only on the top bar, or state that filters the request with no control bound to it. Both are covered in Conventions.
- A board that assembles the filter bar and panel by hand instead of rendering
FeatureTemplate. - A
[...segments]catch-all in any of the three@slots. It matches every URL, which silently disables thelegacyrewrites. - A user-visible string written as a literal instead of a catalog key.
- A component in
src/componentsthatadminwould also want. It belongs in@statshub/ui-web.
Source inspection is not verification
bun run lint, typecheck and test pass on a board that renders a blank
table, portals into a target that does not exist, or pushes the results below
the fold. None of those is a type error.
Open the route. The box is headless, so that means the Playwright MCP or
bun run phone — both covered by the preview skill. Check the console while
you are there.
Where the work usually is
src/composed/ is one directory per board and is where most changes land.
src/components/filters/ is the second. If a change is reaching into
src/app/(dashboard)/layout.tsx or next.config.js, it is a change to the
shell or to the hand-over from legacy, and both are load-bearing for every
other board — read Architecture before editing
either.