One Bricklayer setup across Claude Code, Cursor, Copilot and Codex

Just enough setup so every developer on the team gets the same Magento knowledge, whatever AI agent they prefer.

No team agrees on one AI agent. Somebody lives in Claude Code, somebody in Cursor, the PhpStorm people use Junie, somebody tries Codex this month. Each one wants its own instruction file in its own place, and keeping five of them in sync by hand never works for long.

Bricklayer generates all of them from one source: its bundled guidelines plus Your .bricklayer/ overrides. One MCP server, one .bricklayer.json, as many agent files as You need.

Generate for every agent

Repeat --agents for each one, no interactive prompt needed:

vendor/bin/bricklayer install \
    --agents=claude-code \
    --agents=cursor \
    --agents=copilot \
    --agents=phpstorm \
    --agents=codex

Valid values: claude-code, cursor, phpstorm, copilot, gemini, codex, mistral-vibe.

What You get:

Agent MCP config Instructions
Claude Code .mcp.json CLAUDE.md
Cursor .mcp.json .cursorrules
GitHub Copilot .mcp.json .github/copilot-instructions.md
JetBrains AI (PhpStorm) .mcp.json .junie/guidelines.md
Gemini CLI .mcp.json AGENTS.md
OpenAI Codex .codex/config.toml AGENTS.md
Mistral Vibe .vibe/config.toml AGENTS.md

Gemini, Codex and Vibe share AGENTS.md, so one file covers all three. Claude Code and Cursor are listed as fully supported, the rest as supported.

Codex note: project-scoped .codex/config.toml needs a recent Codex CLI release, and Codex loads it only after You mark the project as trusted. If Codex does not see the Bricklayer tools, that is the first thing to check.

Keeping them in sync

The rule is simple: never edit the generated files by hand. Edit the source, regenerate.

  • project conventions → .bricklayer/project-context.md, .bricklayer/skills/, .bricklayer/decision-matrix.md
  • tool permissions → .bricklayer.json (shared by every agent, since they all talk to the same MCP server)
  • then:
vendor/bin/bricklayer update

update regenerates every agent file from bundled content plus Your local overrides, so a new skill lands in CLAUDE.md, .cursorrules and AGENTS.md in one go.

After upgrading the package with Composer, run update too, so the agent files pick up the new bundled guidelines.

Your project root then looks like:

magento-root/
├── .bricklayer/
├── .bricklayer.json
├── .codex/config.toml
├── .cursorrules
├── .github/copilot-instructions.md
├── .junie/guidelines.md
├── .mcp.json
├── AGENTS.md
└── CLAUDE.md
  • Commit all of it, so a new teammate gets a working agent on the first git clone
  • Container setups: .mcp.json holds the container command, see the Docker/DDEV/Warden post

Start coding!

Source: GitHub