Set up an AI agent to help with your mizer project
Source:R/setup_mizer_agent.R
setup_mizer_agent.RdCreates (or updates) a MIZER-AGENTS.md file in your project directory
containing a concise mizer reference that AI coding agents read
automatically on startup. The file includes the core mizer workflow,
key object descriptions, and the path to the full mizer API documentation
bundled with the package.
Arguments
- path
Directory in which to create or update the agent files. Defaults to the current working directory, which should be your R project root.
- overwrite
If
TRUE, replace an existingAGENTS.mdentirely with a clean shim. IfFALSE(the default), preserve any custom content inAGENTS.mdwhile prepending the@MIZER-AGENTS.mdshim if not already present.MIZER-AGENTS.mdis always overwritten to ensure it stays up-to-date.
Details
It also creates (or updates) an AGENTS.md file with a @MIZER-AGENTS.md
shim so that agents read both the project-specific instructions and the mizer
reference. It also creates CLAUDE.md and GEMINI.md shim files (each
containing just @AGENTS.md) so that agent-specific tools that look for
their own named file also pick up the shared context. These shims are only
created if the files do not already exist.
After running this function, start your AI coding agent
(e.g. claude, codex, copilot or gemini) from the RStudio Terminal
and it will immediately have the mizer context it needs.