Appearance
yg init installs one universal set of agent-rules files — the same files, the same content, regardless of which agent you use. There is no platform question to answer.
It writes:
- A short summary block inside marker comments in
AGENTS.md. - A one-line
@AGENTS.mdimport added toCLAUDE.md, because Claude Code does not readAGENTS.mdon its own. - A copy of the same summary at
.clinerules/yggdrasil.md, because Cline looks there instead ofAGENTS.md.
That summary tells the agent to run yg prime before making any change. yg prime prints the complete, current operating manual straight from your installed Yggdrasil CLI — so an agent's instructions are always up to date and are never cut short by a small instruction budget.
yg check also watches these three files and warns if one goes missing, gets hand-edited, falls behind after you upgrade the CLI, or ends up duplicated — always pointing you at yg init --upgrade to fix it.
Upgrading a project that requires its whole tree
These three files (and the .gitattributes entry yg init maintains) are new in your repository, so a project that requires every tracked file to belong to a component will report them as unmapped errors on the next check. That is any project whose yg-config.yaml has no coverage: block at all, or whose coverage.required covers the repository root. They're repository plumbing, not project source — exclude them:
yaml
coverage:
excluded:
- AGENTS.md
- CLAUDE.md
- .clinerules/
- .gitattributesyg init --upgrade tells you when this applies to your project and prints the same stanza; it never edits the file for you. Mapping them to a component instead works just as well if you'd rather keep them under enforcement. A freshly initialized project requires nothing and is unaffected.
How each agent picks up the rules
| Agent | How it gets the rules |
|---|---|
| Claude Code | The @AGENTS.md import line in CLAUDE.md |
| Cline | .clinerules/yggdrasil.md |
GitHub Copilot, Cursor, Codex, OpenCode, Amp, Zed, and any other agent confirmed to read a repository's AGENTS.md | AGENTS.md directly |
No agent gets a bespoke file of its own anymore — every agent reads one of these three universal artifacts. If your agent reads none of them natively, point it at AGENTS.md by hand, or have it run yg prime directly.
Agents that need a one-time manual setup
These are left off the table above because we can't confirm they read AGENTS.md on their own — not because they're unsupported. Each takes one small step, once:
- Windsurf — folded into another product; last we checked, its current status and whether that product reads
AGENTS.mdnatively were both in flux.yg initdeletes the rules file the retired installer wrote at.windsurf/rules/yggdrasil.md. - Aider — needs an explicit
read:entry in.aider.conf.ymlpointing atAGENTS.md.yg initno longer writes one; add the entry yourself if you use Aider. It also removes the entry an earlier version wrote, which pointed at a file that no longer exists. If you wrote that entry by hand rather than lettingyg initadd it, it is left alone on purpose — check.aider.conf.ymlfor aread:line still pointing at.yggdrasil/agent-rules.mdand repoint it atAGENTS.md. - CodeBuddy — reads its own
CODEBUDDY.md, notAGENTS.md; we have no confirmation of nativeAGENTS.mdsupport.yg initdeletes the rules file the retired installer wrote at.codebuddy/rules/yggdrasil/RULE.mdc. - Roo Code — reported to have shut down, so this is here for anyone still running an older install.
yg initdeletes the rules file the retired installer wrote at.roo/rules/yggdrasil.md. - Gemini CLI — retired as a standalone tool as far as we can tell, so this is likewise here for anyone still running it.
yg initremoves the import line the retired installer added toGEMINI.md(and the file itself, if that line was all it held).
For any of these, point the agent at AGENTS.md by hand — for the last two, in whichever file that agent reads — or have it run yg prime directly. Both give it the same rules every other agent gets.
The same sweep covers every other file the retired per-platform installers used to write, whether or not the agent appears above: .cursor/rules/yggdrasil.mdc and the old single rules file at .yggdrasil/agent-rules.md. Whatever it removes is listed in the yg init --upgrade output as cleaned-up legacy artifacts, so nothing disappears silently.