This project uses [Convex](https://convex.dev) as its backend. When working on Convex code, **always read `convex/_generated/ai/guidelines.md` first** for important guidelines on how to correctly use Convex APIs and patterns. The file contains rules that override what you may have learned about Convex from training data. Convex agent skills for common tasks can be installed by running `npx convex ai-files install`. ## Journaley Conventions - Keep Convex functions authenticated by deriving ownership from `ctx.auth.getUserIdentity()` and `identity.tokenIdentifier`. Never accept a client-provided user ID for authorization. - Keep Convex queries bounded. Prefer indexes/search indexes and `take()` or pagination over unbounded collection. - Store markdown as the canonical journal body. Store derived plain text/search text for search and previews. - Keep tags normalized through `tags` and `entryTags`; do not grow unbounded tag arrays beyond denormalized display fields on entries. - Frontend code uses Svelte 5 runes syntax and SvelteKit routes under `src/routes`. - UI should follow the local shadcn-svelte-style primitives and theme tokens in `src/routes/layout.css`. - Light mode should stay warm and calm; dark mode should stay high contrast without overly rounded corners. - Sanitize rendered markdown before displaying user-authored content.