Junie reads AGENTS.md unless .junie has its own
Junie reads Ultracite’s rules from the project-root AGENTS.md, along with .junie/rules/, as long as there’s no .junie/AGENTS.md to take its place. It has no hook that runs after an edit, so Junie runs ultracite fix and ultracite check when the rules tell it to, once you approve the command or allowlist it.
Junie by JetBrainsChecked against Junie CLI 26.10.5
# Ultracite Code Standards
This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting.
## Quick Reference
- **Format code**: `npx ultracite fix`
- **Check for issues**: `npx ultracite check`
- **Diagnose setup**: `npx ultracite doctor`
Oxlint + Oxfmt (the underlying engine) provides robust linting and formatting. Most issues are automatically fixable.
…- 1
Guidelines pathA file set in Settings | Tools | Junie | Project Settings (IDE) orguidelines-location(CLI) replaces the defaults below. - 2
.junie/AGENTS.mdIf.junie/AGENTS.mdexists, Junie uses it on its own and combines nothing else with it. - 3
AGENTS.mdUltraciteThe project-root fileinitwrites, read when there’s no.junie/AGENTS.md, together with.junie/playbook.mdand every.junie/rules/*.md. - 4
.junie/guidelines.mdThe legacy location (or a.junie/guidelines/folder), still read as the last fallback. - 5
~/.junie/AGENTS.mdJunie CLI adds your globalAGENTS.mdfrom here to the project’s guidelines; the project wins on conflicts.
How Junie reads the rules
Junie takes one set of project guidelines, found in a fixed order, and Junie CLI adds your global file. The root AGENTS.md counts only when nothing ahead of it in that order exists.
- One project file
- With no custom path, the IDE uses
.junie/AGENTS.mdexclusively when it exists, so the rootAGENTS.mdand.junie/rules/are skipped. - Imports
- The first time Junie CLI opens a project, it looks for other agents’ instruction files and offers to import them into
.junie/AGENTS.md, which then comes first. - Global
~/.junie/AGENTS.md(%USERPROFILE%\.junie\AGENTS.mdon Windows) applies to every project in Junie CLI. Identical global and project content is used once.- Precedence
- When global and project guidelines conflict, the project’s win. Both are included and marked so Junie can tell them apart.
- Trust
- Junie CLI doesn’t load an untrusted project’s guidelines, skills or hooks. Non-interactive runs are always trusted, since they can’t ask.
- Config files
guidelines-locationin~/.junie/config.json, or in a trusted project’s.junie/config.json, points Junie CLI at another file. Command-line flags override both.
Junie runs the checks AGENTS.md lists
Junie has no event that fires after it edits a file: Junie CLI’s hooks, still in Early Access, fire on session start and end, prompts, tool calls before they run, permission requests and task completion. So the loop is the one in AGENTS.md, and an allowlist rule saves you approving each ultracite run.
{
"defaultBehavior": "ask",
"rules": {
"executables": {
"rules": [
{ "prefix": "npx ultracite", "action": "allow" }
]
}
}
}- 01Junie edits files as it works through its plan.
- 02The rules in
AGENTS.mdtell it to runnpx ultracite fix, which it does in the terminal. - 03Junie asks before running the command unless it’s on the Action Allowlist or Brave mode is on.
- 04It reads the output and fixes what
ultracite fixcouldn’t before handing the task back.
Worth knowing about Junie
A Stop hook can hold the task open
Junie CLI’s
Stophook (Early Access) runs before a task is submitted. Exit with code 2 and Junie feeds your stderr back to the agent and retries, up to 8 times in a row unlessJUNIE_STOP_HOOK_BLOCK_CAPsays otherwise. Hooks load from~/.junie/config.jsonor a--config-locationfile, never from the project’s own.junie/config.json, and Ultracite doesn’t set one up.Allowlists check every part of a command
An allowlist rule approves a command only when every command in it is allowed: each side of
&&, anything inside$(…)or backticks, and process substitutions. A command spread over several lines always asks. Rules run top to bottom and the first match wins.Review each file before you keep it
In the IDE, Junie links each change to the diff viewer as it works. When the task is done, the Done panel lists every changed file, so you can revert files one by one before you accept or reject the result.
The Ultracite skill
Junie loads skills from
.junie/skills/and~/.junie/skills/, and Junie CLI also reads.agents/skills/in a trusted project.initinstalls the Ultracite skill into.agents/skills/, and into.junie/skills/as well when the project has a.juniefolder.
Junie questions, answered
- Does Junie read AGENTS.md?
- Yes. With no custom guidelines path, Junie uses
.junie/AGENTS.mdif it exists; otherwise it reads the project-rootAGENTS.mdtogether with.junie/playbook.mdand any.junie/rules/*.md.ultracite init --agents juniewrites Ultracite’s rules to the root file. - Why isn’t Junie following my AGENTS.md?
- Look for a
.junie/AGENTS.md. In the IDE it’s used exclusively, so the root file is skipped; merge the two, or set the Guidelines path. In Junie CLI, also check that you trusted the project, since an untrusted project’s guidelines don’t load. - Does Junie support hooks?
- Junie CLI does, in Early Access:
SessionStart,UserPromptSubmit,PreToolUse,PermissionRequest,Stop,StopFailureandSessionEnd. There’s no event after a file edit, and Ultracite doesn’t configure Junie hooks. - How do I let Junie run ultracite without asking?
- Pick Always allow when Junie CLI asks, or add a
prefixrule fornpx ultraciteunderexecutablesin~/.junie/allowlist.json. The IDE keeps its own list under Settings | Tools | Junie | Action Allowlist. - Can I point Junie CLI at a different guidelines file?
- Yes. Set
guidelines-locationin~/.junie/config.json, or in the project’s.junie/config.jsononce you trust the project. A relative path resolves from the folder that holds thatconfig.json.
Keep going
- AgentFirebenderCoding agent for Android Studio and other JetBrains IDEs, focused on Android.
- AgentAugment CodeCoding agent for VS Code and JetBrains, plus the Auggie CLI, built on a codebase context engine.
- AgentZencoderCoding agent for VS Code and JetBrains, with the Zenflow desktop app and a CLI.
- DocsAgent rulesWhat
initwrites for every agent, and how to keep it current.
Ship less slop
One command sets up your linter, formatter, editor and agents. Works with Oxlint, Biome and ESLint.