← Blog·Context Engineering

How I Write Context Files for Every Lovable Project

Context files are the cheapest leverage in any Lovable project. Here are the exact ones I write before I ever click Build.

Massimo Di Chiaravi3ecoding Team·Jun 3, 2026·3 min read
How I Write Context Files for Every Lovable Project

Most Lovable users skip the boring 20 minutes that decide whether the next 10 hours feel good or terrible.

That 20 minutes is writing context files.

Context files are the cheapest leverage in any Lovable project. Skip them and you'll pay the price in every prompt after.

Related reading from vi3ecoding:

When I rebuilt the booking flow on foodla.eu, I spent ~30 minutes on context files before touching a single component. The build itself took roughly 10 hours instead of 40. Same tool. Same model. Different setup.

Here's exactly what I write, in the order I write it.

File 1 — product.md

Two paragraphs, no more.

  • Who is this product for, in one sentence.
  • What problem it solves, in one sentence.
  • What success looks like in 90 days.

If I can't write this without hedging, I'm not ready to build yet.

File 2 — stack.md

Boring but decisive. I list:

  • Framework and version (Lovable + TanStack Start, Tailwind, etc.)
  • Backend (Supabase, with auth and storage on by default)
  • Naming conventions (kebab-case files, named exports, no default exports)
  • Folder rules (where pages live, where components live)
  • One paragraph titled "things that are not negotiable"

That last paragraph is what stops the AI from suggesting React Router every third prompt.

File 3 — design.md

Tokens, not adjectives. The AI doesn't know what "warm but practical" means. It does know what --radius-md: 12px means.

  • Primary, accent, background, foreground in hex or HSL
  • Font families, sizes, weights
  • Spacing scale
  • One paragraph of voice and tone, with two example sentences

Two examples beat ten rules every time.

File 4 — decisions.md

This is the file most people don't write. It's also the one that saves the most time.

A running log of:

  • What we tried
  • Why we rejected it
  • What we're doing instead

Without this, the AI will happily re-propose the exact idea you killed last week. With it, you get to keep moving.

My rule: shorter than you think

A good context file fits on one screen. If yours scrolls, it's already too long.

Long context dilutes the important parts. The AI starts averaging across the whole document instead of weighting the rules that matter. Cut ruthlessly.

How I keep them current

Every Friday, 15 minutes. I open all four files and ask one question per file:

  • Is anything in here no longer true?
  • Is anything missing that bit us this week?

That's the whole maintenance ritual. Skipping it for a month is how stale context starts producing strange code.

What changes when you do this

Three things, every time.

  1. The first prompt of a new feature stops being a 400-word essay. It becomes a sentence.
  2. The AI stops making confident wrong choices about your stack.
  3. New collaborators — human or AI — get onboarded in minutes, not days.

That third one is underrated. Context files are also the best handover document you'll ever write.

So — should you write context files for your next Lovable project?

You already do. You just write them in your head, and re-explain them in every prompt.

Write them down once. Reuse them forever.

Context files aren't documentation. They're the operating manual for the teammate you keep hiring on every new prompt.

Sources

On this page

About the author

Massimo Di Chiara — Founder of Vi3ecoding
Massimo Di Chiara

Founder of Vi3ecoding

Massimo Di Chiara is the founder of Vi3ecoding. After more than 100 web projects, he now explores how AI, ChatGPT and Vibe Coding help people turn ideas into real digital products.

Read Massimo's story
Website ready in 30 minutes

Your first website is closer than you think.

Start today. Build something real this week.

Start your first websiteNo coding. No experience required.