Update CLAUDE.md
This commit is contained in:
24
CLAUDE.md
24
CLAUDE.md
@@ -115,6 +115,30 @@ Do NOT modify web-base files — they are shared across all projects.
|
|||||||
10. `enlace` (link) fields already include slashes — **NEVER modify an existing enlace** unless explicitly asked
|
10. `enlace` (link) fields already include slashes — **NEVER modify an existing enlace** unless explicitly asked
|
||||||
11. **NEVER modify the `controlador` field** of existing records — it defines whether a page is Builder or Standard
|
11. **NEVER modify the `controlador` field** of existing records — it defines whether a page is Builder or Standard
|
||||||
|
|
||||||
|
## Project Styles
|
||||||
|
|
||||||
|
When creating new modules, you need to match the visual style of the existing project. To avoid re-exploring modules every time:
|
||||||
|
|
||||||
|
1. **If `docs/project-styles.md` exists** → read it. It contains the project's color palette, typography, spacing, and design patterns. Use it directly.
|
||||||
|
2. **If it does NOT exist and there are 3+ modules** → explore the existing modules to understand the style, then **generate `docs/project-styles.md`** with a summary for future use.
|
||||||
|
3. **If it does NOT exist and there are few modules** → create the module based on the user's description without exploring. The style will be defined as modules are created.
|
||||||
|
|
||||||
|
**When exploring modules for style reference:**
|
||||||
|
- Only look at modules that have a `builder.json` file (these are builder modules)
|
||||||
|
- Skip modules whose directory name starts with `custom-` (these are general sections, not visual modules)
|
||||||
|
- Read `index-base.tpl` and `style.css` of 3-4 representative modules
|
||||||
|
- Summarize: color palette, typography, spacing, Tailwind patterns, common CSS classes, design conventions
|
||||||
|
|
||||||
|
**When generating `docs/project-styles.md`**, include:
|
||||||
|
- Primary/secondary/accent colors (hex values)
|
||||||
|
- Font families and sizes used
|
||||||
|
- Spacing scale (padding/margin patterns)
|
||||||
|
- Common Tailwind classes and custom CSS patterns
|
||||||
|
- Button styles, card styles, section layouts
|
||||||
|
- Any recurring design patterns (gradients, shadows, borders, etc.)
|
||||||
|
|
||||||
|
**Update `docs/project-styles.md`** after creating a module if the project has grown significantly since the last update (e.g. 5+ new modules).
|
||||||
|
|
||||||
## MCP Tools
|
## MCP Tools
|
||||||
|
|
||||||
This project has MCP tools for managing modules, records, media, and more. **Before starting any task, consult the tools reference for the correct workflow.**
|
This project has MCP tools for managing modules, records, media, and more. **Before starting any task, consult the tools reference for the correct workflow.**
|
||||||
|
|||||||
Reference in New Issue
Block a user