Just enough configuration to tell Your AI agent what to check before it changes the risky parts of Your project.
Every agent file Bricklayer generates (CLAUDE.md, .cursorrules, AGENTS.md…) has a “Before Modifying Magento Code” table near the top. It maps a kind of change to the runtime check and the guidelines the agent should load first. Near the top matters: it is one of the first things the agent reads.
The bundled rows cover generic Magento situations. Your project has its own dangerous places: the ERP sync, the custom checkout step, the price calculation everybody is afraid of. .bricklayer/decision-matrix.md lets You add rows for those.
Format
-
Create the file:
.bricklayer/decision-matrix.md
-
Rows only. Every line must be a valid markdown table row; header and separator lines are ignored if You add them. Judging by the wiki example, each row has three cells: the situation, the runtime check, and the guidelines to load:
| Modifying ERP sync logic | `code-runner` to inspect `Vendor\Erp\Model\SyncQueue` | `development-context category=erp-integration` |
| Changing checkout steps | `plugin-list className=Magento\Checkout\Model\Type\Onepage` | `development-context category=checkout` |
Open Your generated agent file once to see the exact headers of the table, and match the cell order.
Writing good rows
- Situation in the agent’s words - “Changing product prices”, not “PriceEngine refactor ticket #123”. The agent matches the task it got against this column
- A concrete check - name the tool and the class or topic:
check-class className=...,message-queue-inspect topic=...,eav-attributes. “Be careful” is not a check - Point to Your skills - the third cell is where local skills pay off:
development-context category=erp-integration - Only risky places - five good rows beat thirty. If everything is flagged, nothing is
A few more example rows for a typical store:
| Changing product price calculation | `plugin-list className=Magento\Catalog\Model\Product method=getPrice` | `development-context category=pricing-rules` |
| Adding a product attribute | `eav-attributes` for `catalog_product` | `development-context category=eav` |
| Touching stock sync | `message-queue-inspect topic=acme.erp.stock` | `development-context category=erp-integration` |
pricing-rules here is a local skill You would have to write yourself, eav is bundled.
Regenerate
vendor/bin/bricklayer update
Your rows are appended to the bundled ones in every agent file You selected during install. Check the generated file once to make sure the table renders, a missing | breaks the row.
- Commit
.bricklayer/decision-matrix.mdwith the regenerated agent files - Pair it with
project-context.md(the map) and local skills (the details). The matrix is the trigger that sends the agent to them
Start coding!
Source: Project-Local Overrides wiki