Free rules / Lovable

Free Lovable rules

Lovable follows the Instructions text (formerly called Knowledge) you set in project or workspace settings on every request. It also reads AGENTS.md or CLAUDE.md if your project's Git repo has one. This template covers the things that most often go wrong in Lovable apps: surprise redesigns, open Supabase tables and leaked keys.

Goes in: Project settings → Instructions · Format: Project instructions (plain text)

Checked against Lovable's docs on (Lovable docs: Instructions) · What changed

How to install

  1. Open your project and go to Project settings → Instructions (older guides call it Knowledge).
  2. Paste the text below and fill in the ABOUT THIS PROJECT section.
  3. Save. Lovable applies it to every request in that project.
  4. Workspace owners and admins can paste the HOW TO WORK and DATA sections into Workspace settings → Instructions to apply them to every project.

The rules file

ABOUT THIS PROJECT (fill in)
- What it is: [one sentence: who it's for and what it does]
- Main pages / features: [e.g. landing, sign-up, dashboard, settings]
- Look and feel: [e.g. clean, light theme, brand color #4F46E5, rounded cards]
- Out of scope for now: [things you should NOT build yet]

HOW TO WORK
- Change only what I ask for. Don't redesign, rename or restyle anything else.
- Before a large change (new feature, new table, more than a few files), describe the plan in 3-5 bullets and wait for my OK.
- Build one feature at a time and make sure it works before starting the next.
- If my request is unclear, ask one short question instead of guessing.
- Reuse existing components and the existing design system (Tailwind + shadcn/ui). Don't add a second UI library.
- Keep components small and focused. Split files that grow past ~200 lines.
- Don't add new npm packages unless it's really needed, and tell me why.

DESIGN
- Every page must work on mobile (375px wide) and desktop.
- Use the theme tokens / Tailwind config for colors and spacing, not one-off hex values.
- Every image gets alt text, every input gets a label, and buttons must be reachable by keyboard.
- Show loading, empty and error states for anything that fetches data.

DATA AND BACKEND (Supabase)
- Turn on Row Level Security for every table, with policies so users can only read and write their own rows.
- Never put the Supabase service_role key, Stripe secret key, OpenAI/Anthropic key or any other secret in frontend code. Store secrets in Supabase secrets and call third-party APIs from an Edge Function.
- Validate inputs on the server side as well as in forms.
- Ask before deleting a table, dropping a column, or changing data that already exists.

AUTH
- Protect private pages: redirect signed-out users to sign in.
- Never trust a user id sent from the browser; use the authenticated user from Supabase.

WHEN YOU FINISH A CHANGE
- Tell me in plain English what you changed, which files, and anything I need to test or set up (for example a secret or an email setting).
- If an error appears, fix the root cause instead of hiding it.

Notes

What changed

See how Lovable ranks on AgentRank (sister project)

Other tools: Cursor · Claude Code · Windsurf · Bolt

NEWSLETTER

Get new cartridges and free rules in your inbox. About 2 emails a month, no spam, unsubscribe anytime.

Opens Buttondown in a new tab. Confirm via the email they send. Past issues