In Lovable, how do workspace knowledge and project knowledge differ in scope and in who may edit them, and which wins when they conflict?
answer
- two plain-text instruction fields
- one per workspace, one per project
- admins versus project editors
- the more specific one is preferred
- always loaded, unlike skills
basics
~20 sWorkspace knowledge holds rules for every project in a workspace and only owners and admins edit it; project knowledge holds one project's context and anyone who can edit the project can change it. On conflict Lovable generally prioritises project knowledge.
solid answer
~40 sBoth are plain-text fields of up to **10,000 characters** that Lovable includes with every message, alongside the project code. **Workspace knowledge** is a single field shared by all projects in the workspace — coding standards, preferred libraries, naming rules — managed only by **workspace owners and admins** from **Workspace settings → Knowledge** or **Project settings → Knowledge**. **Project knowledge** describes one project — purpose, key tables, architecture decisions, domain terms — and anyone with edit permission on the project manages it in **Project settings → Knowledge**. When the two conflict, Lovable is encouraged to prioritise **project knowledge** as the more specific one. Knowledge is always in context, unlike **skills**, which load on demand; Lovable also reads instruction files such as a root-level `AGENTS.md` in the repository.
go deeper
Recall the two levels, the 10,000-character limit on each, and that project knowledge lives under Project settings → Knowledge.
Explain who edits each level, that both load on every message, the soft preference for project knowledge on conflict, and how skills and a root AGENTS.md differ.
Use project knowledge to protect hand-written code after Git sync, and keep instructions short and specific because long conversations can drift from them.
Decide what a workspace admin should standardise centrally versus leave to each project, given a single workspace field and only soft precedence between levels.
## What knowledge is in Lovable **Knowledge** is Lovable's name for persistent instructions: text you write once so you do not repeat it in every chat message. When you send a message, Lovable reads project knowledge, workspace knowledge and the project's code before generating edits, and it also reads integration knowledge from connected services and instruction files in the project's repository such as `AGENTS.md`. Knowledge comes in two levels. | | Workspace knowledge | Project knowledge | |---|---|---| | Applies to | Every project in the workspace | One project | | How many | Exactly one per workspace | One per project | | Who edits | Workspace **owners and admins** only | Anyone with permission to edit the project | | Where | **Workspace settings → Knowledge** or **Project settings → Knowledge** | **Project settings → Knowledge** | | Limit | 10,000 characters | 10,000 characters | | Typical content | Coding standards, naming, libraries, testing rules, brand voice | App purpose, users, key tables, architecture decisions, domain terms | ## How the two combine Both fields are included together on every message. The docs give the precedence softly: when the same instruction appears in both places, or the two conflict, Lovable "will generally prioritize" — is "encouraged to prioritize" — **project knowledge**, because it is more specific to the current project. Three consequences follow: - A project that needs to depart from a workspace rule states the exception in its own project knowledge; there is no way to scope workspace knowledge to a subset of projects, because each workspace has only one. - Precedence is guidance to the model, not a hard override, so the cleanest setup keeps shared rules in workspace knowledge and project-specific facts in project knowledge rather than relying on conflicts being resolved. - Changes apply immediately: an edit to workspace knowledge during a conversation is used on the next follow-up message. ## Knowledge, skills and repository instruction files Lovable has three related ways to give standing guidance: 1. **Knowledge** is always included in context — use it for rules relevant to every message. 2. **Skills** are loaded on demand when a request matches the skill's description — use them for task-specific procedures such as a release checklist. 3. **Instruction files in the repository**: Lovable reads files such as `AGENTS.md`, and a **root-level `AGENTS.md` is always read regardless of session length**, which suits technical users who keep instructions next to the code. Skills are defined once at the workspace level and shared with every project; you can invoke one as a `/` command with your prompt or let Lovable apply it when the task matches its description. Because they load only when relevant, a workspace can keep many focused skills without crowding every message. The practical rule from the docs: if an instruction matters on every message, it belongs in knowledge; if it matters only when a specific topic comes up, make it a skill. ## A worked conflict Suppose workspace knowledge says "Use React Query for server state" and one project's knowledge says "This project fetches through the existing service layer only; do not add React Query". Both reach Lovable on every message. The project-level rule is the more specific one, so Lovable is pointed towards it for that project, while every other project in the workspace keeps following the workspace rule. Writing the exception explicitly — naming the rule it overrides — leaves less to the model's judgement than two silently contradictory lines. ## Where knowledge falls short - **Long conversations**: the docs warn that in very long conversations with a lot of context, instructions may not always be followed consistently. - **Vague rules**: "Write clean code" gives Lovable nothing to act on; "Never use `any`; use `unknown` and narrow the type" does. - **Stale rules**: if the stack or architecture changes, out-of-date knowledge steers Lovable towards old patterns, so review it periodically. ## Why a team relying on Git sync cares When developers edit a synced Lovable project in their own IDE, Lovable treats their code exactly like code it generated and may change it in a later request. The Git sync docs give the remedy directly: put constraints that must hold across requests in **project knowledge**, and keep tests for behaviour you depend on. A typical entry reads: - "Money is stored in cents as integers." - "Do not modify the authentication logic in the shared layout." - "Route API calls through the service layer; never call `fetch` from components." Writing good instructions for an agent in general is a prompting subject of its own; what is specific to Lovable is the two fields, their editors and limits, the soft precedence, and their relationship to skills and `AGENTS.md`.
- A Lovable workspace has twelve projects, and three of them need a different state-management library. How do you express that?Keep the common rule in workspace knowledge and state the exception in the project knowledge of each of the three projects. A workspace has exactly one workspace knowledge, so it cannot be scoped to a subset of projects, and Lovable generally prioritises the more specific project knowledge when the two conflict.
- When should a Lovable instruction become a skill rather than knowledge?When it matters only for a particular kind of task. Knowledge is included with every message, so it suits rules that apply everywhere; a skill is loaded on demand when the request matches its description, so a release checklist or a content procedure belongs there instead of crowding every message's context.
- Any project editor can change the workspace's knowledge
- Workspace knowledge always overrides project knowledge
- Knowledge is loaded only when a message mentions it
- Lovable ignores instruction files committed to the repository
- Separate workspace knowledge can be set per group of projects