Imported from zvip100/zuug-exercise (
AGENTS.md). Install upstream withnpx skills add zvip100/zuug-exercise. Copyright stays with the author.
Agent rules
Conventions for work in this app.
Docs and skills
- Always check the latest Next.js documentation before changing App Router,
searchParams, server components, or routing behavior. - Use installed skills that apply — including Vercel React Best Practices, Next.js skills, and any other Next-related skills on the machine. Prefer those over guessing from memory.
List filters
- Put filter state in the URL as query parameters. Views must be shareable, survive refresh, and work with the browser back button.
- Apply filters in the database query (
WHERE/ Drizzle conditions). Do not fetch a full result set and filter it in JavaScript. - With no filter params present, behavior must match the unfiltered page exactly. Omitting a filter is not a special case — it is the default.
- Drop or ignore unrecognized / invalid query values rather than erroring; fall back to the unfiltered view.
Indexes and migrations
- When a new filtered query will hit production data, add a supporting index via a proper Drizzle migration file.
Filtered empty states
- When filters are active and zero rows match, show a specific empty state (e.g. no activity of this type), not the generic “no data yet” copy.
- Surface what is currently filtered and offer a clear way to reset filters.
Verification
- Do not run the app build, start the server, or other verification that expects a port or a running process.
- Add one test file per feature inside /tests that covers only the new behavior from the specific task. Run that test and make sure it passes — nothing more. Do not expand coverage to unrelated existing features.
