Luci for Codex.
Codex reads AGENTS.md for project instructions. Pass --agents codex and Luci adds a managed block there with your project's rules, design baseline and active task; the local luci-mcp server gives Codex your captures, design checks and the feedback you pin on the running page.
What Codex gets
Instead of guessing from screenshots and long descriptions, Codex works from files in your project and a local MCP server:
- Project memory. Rules, decisions, the playbook and the active task in
.luci/, linked fromAGENTS.md. - Your design system.
luci capture baselinewrites your type, colours and spacing from your stylesheets, so Codex reuses your tokens instead of inventing new ones. - Measured references. Components, text styles, colours and spacing captured with the dev toolbar or the extension, saved as
.design.mdfiles. - Pinned feedback. Notes you click onto the running page. In React, Vue and Svelte projects each one carries its component and source line.
- Design checks. A part-by-part comparison of what Codex built against the capture.
1. Initialize Luci
Run this in your project root. It needs Node 18 or later:
npx @luci-dev/cli@latest init --agents codexLuci detects your framework and stylesheets, creates .luci/ and writes its block into AGENTS.md. The --agents flag adds Codex; combine agents with commas, or pass --agents all.
<!-- LUCI and <!-- END LUCI --> markers. Anything you write elsewhere in AGENTS.md stays as it is when luci update runs.2. Connect luci-mcp
luci-mcp (from @luci-dev/mcp) runs on your machine over standard stdio, with no network calls. Add the server to Codex's configuration file, ~/.codex/config.toml:
[mcp_servers.luci]
command = "npx"
args = ["-y", "@luci-dev/mcp"]If AGENTS.md already exists, plain luci init finds it and adds the block without the flag.
The tools Codex uses most:
- get_project_context
- Rules, context and project setup, read at the start of a task.
- list_captures · get_capture
- The saved .design.md references, read before writing UI.
- get_feedback_prompt · watch_feedback
- Your pending notes from every page, or new ones as you save them.
- get_design_checks
- Recent design check results, read after edits.
Every tool is listed in the Agents and MCP docs.
3. Show it what to change
Start the dev toolbar while your app is running, then point at the page instead of describing it:
npx @luci-dev/cli@latest serveThen ask Codex, for example:
- “Read the pending Luci feedback and fix every item, then report each ID.”
- “Watch for new Luci feedback while I review the app.”
- “Build the pricing card from the saved Luci capture, using our tokens.”
- “Run the design checks again and fix what still differs.”
How notes, layout plans and checks work is in the Devtool guide.
Check the setup
luci doctor checks the installation and project setup and says what to fix. After upgrading Luci, luci update refreshes AGENTS.md and the other agent files.
Using more than one agent? They all read the same .luci/ memory. Set up Claude Code, Cursor, Gemini CLI or GitHub Copilot the same way.