KBAISE/ for lovable
Library
Docs

Define workspace and project knowledge

about 10 minBuildingchecked 4d agoOfficial page
The short version

You can give Lovable persistent instructions about your coding style, project details, and rules that it will remember across all your conversations and projects. This helps Lovable understand your preferences and project context without you having to repeat them.

Anyone who wants Lovable to consistently follow specific rules, coding standards, or project details without constant reminders.

Do this, in order

  1. 1

    Decide which rules apply to all projects in your workspace (like coding styles or preferred tools) and which apply only to a specific project (like its purpose or database details).

    Lovable has two places for instructions: 'workspace knowledge' for shared rules and 'project knowledge' for project-specific details. Keeping them separate helps avoid conflicts and keeps instructions clear.

  2. 2

    For rules that apply to all projects, go to 'Workspace settings → Knowledge' or 'Project settings → Knowledge' and type your instructions into the 'Workspace knowledge' text field.

    This sets up shared guidelines that Lovable will use for every project in that workspace, ensuring consistency.

  3. 3

    For rules that apply only to a specific project, go to 'Project settings → Knowledge' and type your instructions into the 'Project knowledge' text field.

    This provides Lovable with specific context for that project, helping it make more relevant suggestions and edits.

  4. 4

    Write your instructions clearly and concisely, using bullet points or direct rules, as if you're explaining it to a new team member.

    Clear and specific instructions help Lovable understand exactly what you want, leading to better results. Avoid vague statements.

  5. 5

    Review your knowledge periodically and update it if your project's rules or architecture change.

    Keeping your knowledge up-to-date ensures Lovable always follows the most current guidelines and doesn't use outdated information.

Paste this into your project

I need to set up persistent instructions for Lovable. For my workspace, I want to enforce these coding standards:
- Always enable TypeScript strict mode.
- Never use `any`. Use `unknown` and narrow the type.
- Prefer named exports. Do not use default exports.
- Prefer `const` over `let`. Never use `var`.

For my current project, it's a B2B SaaS application for restaurant managers to track food inventory across multiple locations. The primary users are restaurant managers. Key database tables include `inventory_items`, `locations`, and `transactions`. I want to use Tailwind CSS for styling and prefer shadcn/ui components. Monetary values should be stored in cents as integers.

Words decoded

Workspace knowledge
A set of instructions or rules that apply to all projects within your Lovable workspace. Think of it as your company's or team's general guidelines.
Project knowledge
A set of instructions or context specific to a single project. This includes details like what the project does, its design rules, or important technical decisions.
Lovable agent
The artificial intelligence that helps you build software by understanding your project and making edits or suggestions.
Context
The background information and details Lovable uses to understand your project and your requests, like your code, project knowledge, and workspace knowledge.

Where people get stuck

  • Don't exceed the 10,000 character limit for either workspace or project knowledge.
  • Don't expect to have multiple sets of workspace knowledge; there's only one per workspace.
  • Avoid vague instructions like 'Write clean code'; be specific about what 'clean' means (e.g., 'Always enable TypeScript strict mode. Never use `any`').
  • Don't put project-specific rules in workspace knowledge, as they will apply to all projects.
  • Don't forget that if project and workspace knowledge conflict, Lovable will usually prioritize project knowledge.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.