> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Lovable workflow documentation

> This folder contains documentation for the Lovable implementation workflow.

This folder contains documentation for the [Lovable](https://docs.lovable.dev) implementation workflow.

| File                                 | Purpose                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **LOVABLE\_WORKSPACE\_KNOWLEDGE.md** | Paste into **Workspace Knowledge** (Lovable Teams: Settings → Knowledge). Universal platform rules (architecture, security, non-negotiables, patterns, DB/RLS, edge, UI, Lovable-specific). Kept under 10,000 characters for Lovable limit. Re-paste when constitution/AGENTS.md change.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **LOVABLE\_CUSTOM\_KNOWLEDGE.md**    | Paste into **Project Knowledge** (per project). Project architecture context, doc map, key tables, domain terminology, security/compliance anchors, spec trigger guidance, debugging notes, Supabase/CL/PM integration anchors, platform re-export layers, and knowledge refresh guidance. Kept under 10,000 characters. Requires Workspace Knowledge.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **LOVABLE\_PROMPTS.md**              | Copy-paste prompts for the **4-chat workflow**: §1 Pre-implementation review (Chat/Plan mode, **read-only** — cannot edit .md), §2 Plan + Execute (Default mode throughout — Phase 0 preflight with 3 exit ramps, Phase A plan + WS-DOCS, Phase B execute after `Confirm`), §3a Verify + 5 status-file updates (Default), §3b Browser E2E + screenshots (Default + browser tools). Plus §4 Quick fix, §5 Debugging (tiered), §6 Design/UI, §7 Refactoring, §8 Wizard items (folded into §1/§3b — no separate section), §9 Best practices. Each chat ends with a literal `STOP — <CHAT> COMPLETE — ...` signal and a fenced `# HANDOFF → Chat N+1` block (paste it into the next chat to bootstrap context — no `.lovable/plan.md` scratch files). Replace `{SPEC_ID}` and `{core}` before sending. |
| **LOVABLE\_REFERENCE\_APPENDIX.md**  | Performance targets, testing matrix, **database pattern reference** (table categories, indexes, soft delete, module settings), **error handling reference** (code mapping, retry rules), **UI component patterns** (form layout, page templates, icon sizes), **automation governance** (circuit breaker, dry-run, logging), and authoritative external references (42 CFR, FHIR, HEDIS, etc.). Reference on demand; not pasted into Custom Knowledge.                                                                                                                                                                                                                                                                                                                                             |
| **.lovable/system.md**               | Primary Lovable system entry point loaded from the repository. Defines stack, architecture boundaries, non-negotiables, import rules, and a rule-directory guide for `.lovable/rules/`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

**Workspace + Project Knowledge:** If using Lovable Teams, paste **LOVABLE\_WORKSPACE\_KNOWLEDGE.md** into Workspace Knowledge first (so all projects get platform rules), then paste **LOVABLE\_CUSTOM\_KNOWLEDGE.md** into Project Knowledge for each project. Without Teams, paste both into Project Knowledge per project. See LOVABLE\_CUSTOM\_KNOWLEDGE.md §8.

**Quick reference:** Root [AGENTS.md](../../../AGENTS.md) is the main AI quick reference. This folder is the Lovable-specific subset.

**Handoff:** See [AGENTS.md](../../../AGENTS.md) § Lovable-specific instructions for platform patterns. The legacy `docs/development/CURSOR_AND_LOVABLE_WORKFLOW.md` workflow document has been retired; this README + the four `LOVABLE_*` files in this folder are now canonical.

**External references (Lovable):**

* [The Lovable Prompting Bible](https://lovable.dev/blog/2025-01-16-lovable-prompting-handbook) — debugging tiers, refactoring prompts, meta-prompting, design/UI, step-by-step approach.
* [9 Ways to Use Workspace Knowledge](https://lovable.dev/blog/9-ways-to-use-workspace-knowledge-to-empower-your-entire-team) — coding standards, testing-by-default, architecture protection, proactive visual QA.

*Maintenance:* Periodically verify the above two URLs are still valid; update or remove if Lovable changes or retires them.
