---
name: bricks-anatomy
description: Bricks layer map and ability routing for design system, pages, templates, components, batch writes, and shop layouts.
domain: bricks
type: system
version: 1.1.0
min_lolacore_version: 2.7.0
ability_prefixes:
  - lolacore-bricks/
triggers:
  keywords:
    - bricks
    - global class
    - theme style
    - page structure
    - template
    - component
    - clone structure
    - shop template
    - sistema de diseño
    - plantilla
    - componente
    - clonar
---

## Purpose

Domain map for LolaCore for Bricks. Operational flow (confirm, dry-run, vocabulary, hard stops) lives in skill `lolacore-bricks-system-architect`. Kickoff conversation lives in playbook `arranque-de-proyecto`. This file is routing and constraints.

## Key concepts

Bottom → top. Write on a layer only after you know the one below.

| layer | what it is | start here |
|---|---|---|
| index | persisted usage map + coverage | `getBricksOverview`, `rebuildDesignIndex` |
| convention | naming + variable policy (addon option, not memory) | `setDesignConvention` |
| tokens | variables, palettes, theme styles | `getGlobalVariables`, `getThemeStyles` |
| classes | global classes + usage | `getGlobalClasses`, `getClassUsage` |
| page tree | elements in content / header / footer areas | `getPageStructure` |
| templates | header, footer, layouts + conditions | `getTemplates`, `resolveTemplateForPage` |
| components | library + instances | `getComponents`, `getComponentUsage` |
| shop | Woo templates + product elements | `getWooBricksSurface` (only if Woo active) |

Chat abilities are camelCase (`getPageStructure`). MCP slugs are kebab under `lolacore-bricks/`. Same product, both doors.

## Routing

| job | abilities |
|---|---|
| orient | `getBricksOverview`, `getBricksOperatingGuide` |
| index | `rebuildDesignIndex` until `finished` |
| know | `getGlobalClasses`, `getClassUsage`, `getGlobalVariables`, `getVariableUsage`, `getThemeStyles`, `getComponents`, `getComponentUsage`, `getTemplates`, `resolveTemplateForPage`, `describeElementControls` |
| govern | unused/duplicate classes, unused variables, orphan components, theme-style conflicts |
| write tokens | class CRUD + rename/merge/trash/restore, `setGlobalVariable`, `updateThemeStyle`, `setDesignConvention` |
| compose | `getPageStructure`, `insertElement`, `moveElement`, `duplicateElement`, `deleteElement` |
| style | `styleElement`, `applyClasses`, `removeClasses`, `updateElementSettings` |
| content | `setElementContent`, `addSection`, `addContainer`, `addDiv`, `addHeading`, `addText`, `addImage`, `addButton` |
| page behavior | `updatePageSettings`, `setElementConditions`, `setElementInteractions`, `listDynamicDataTags`, `setDynamicContent` |
| templates | `createTemplate`, `setTemplateContent`, `updateTemplateConditions`, `duplicateTemplate`, `deleteTemplate` |
| components | `createComponentFromElement`, `updateComponentProperties`, `updateComponent`, `insertComponentInstance`, `updateComponentInstance`, `detachComponentInstance` |
| many pages | `cloneStructure`, `bulkUpdateContent`, `bulkApplyClasses` |
| shop | `getWooBricksSurface`, `createWooTemplate`, `addProductElement`, `getProductElementsCatalog` |

Unfamiliar element → `describeElementControls` then `insertElement`. Conversational hero/section → shortcuts. Clone twenty service pages → `cloneStructure`, not twenty `duplicateElement` calls.

## Rules

1. Index-backed answers include `coverage`. Incomplete index → say so; advance rebuild in batches.
2. Writes use `dry_run` first. `impact.page_names` lists every page, not a count.
3. Class writes regenerate CSS. Variables and theme styles self-heal on the front — tell the user to refresh.
4. Never write `executeCode`, code signatures, or custom JS interactions.
5. Images from the media library only. External URLs rejected.
6. Dynamic tags must exist in `listDynamicDataTags`.
7. Template condition saves show scope preview first.
8. `updateComponent` reports `impact.instances`. Component nesting limit is 10.
9. Batch writes: `batch_size` default 5, max 20. Failure at page N keeps earlier pages; resume from `stopped_at.offset`.
10. Shop abilities exist only while WooCommerce is active (47 insertable product elements).
11. Pull ACF or WooCommerce sibling abilities when the question needs fields or store data.
12. Do not invent a second class or token when the site already has one for that role.
