5 · Cursor & other IDEs
The constitution is tool-agnostic by design. This step makes the other agents — Cursor, Gemini, Codex — boot from the same AGENTS.md, and registers the project’s MCP servers so any tool can use them.
1. .mcp.json (committed) — project MCP servers
Section titled “1. .mcp.json (committed) — project MCP servers”Project-scoped MCP servers live in a committed .mcp.json at the repo root so every teammate and every tool gets them. The key one for Laravel is Laravel Boost — it adds search-docs (version-specific docs), tinker, database-query, browser-logs, and more.
Install Boost in Phase 3 (it’s a Composer package needing the extracted app), then register it:
composer require laravel/boost --devphp artisan boost:install{ "mcpServers": { "laravel-boost": { "command": "php", "args": ["artisan", "boost:mcp"] } }}2. Cursor — boot rule + ignore
Section titled “2. Cursor — boot rule + ignore”Cursor reads .cursor/rules/*.mdc. Add a single always-apply boot rule that points Cursor at the constitution so it inherits everything without duplicating it:
---description: Boot — read the constitution firstalwaysApply: true---
# Boot
Read `AGENTS.md` at the repo root FIRST — it is the cross-tool constitution(tech stack, conventions, safety rules, read-set). Then honor `.claude/rules/`(behavioral + reference rules) and `CLAUDE.local.md` if present.
Key safety rules: never edit `vendor/`; wrap vendor edits in `ZAJ:BEGIN/END`;never run destructive migrations on shared data; always double-quote `.env` values.Save it as .cursor/rules/000-boot.mdc. Also add a security-focused .cursorignore so Cursor never indexes secrets:
.env.env.*!.env.example*.key*.pemauth.json**/secrets/**vendor/node_modules/storage/framework/bootstrap/cache/3. Gemini & Codex (optional mirrors)
Section titled “3. Gemini & Codex (optional mirrors)”These tools also converge on AGENTS.md. Keep mirrors thin — a pointer, never a copy:
- Gemini CLI —
GEMINI.mdat the repo root:GEMINI.md Read **AGENTS.md** first — it is the single source of truth for this project. - Codex — a
.codex/config orAGENTS.md(Codex readsAGENTS.mdnatively). If you keep a.codex/note, point it back toAGENTS.mdthe same way.
The rule across all of them: one canonical file (AGENTS.md), every other tool file is a one-line redirect. That’s what keeps the constitution from drifting across five tools.
Verify
Section titled “Verify”.mcp.jsonis valid JSON and committed; in Phase 3search-docsreturns version-specific Laravel docs.- Open the project in Cursor → it acknowledges the constitution / safety rules without prompting.
- Any mirror (
GEMINI.md,.codex/) is a pointer, not a fork.
✅ .mcp.json committed (Boost registered in Phase 3), .cursor/rules/000-boot.mdc + .cursorignore in place, optional Gemini/Codex mirrors are thin pointers. → Continue to Verify & gate.