Guidelines and memory
Guidelines
Guidelines allow you to provide persistent, reusable context to the agent. Junie CLI reads guidelines from the AGENTS.md file and adds this context to every task it works on.
Additionally, Junie CLI checks for any guidelines or memory files from other AI agents when it opens the project for the first time. If such files are detected, it will suggest importing the instructions into .junie/AGENTS.md.
AGENTS.md
AGENTS.md is an open file format for guiding coding agents. It's a standard Markdown file with headings, lists, and plain text that the agents can parse to add to the prompt context.
How Junie CLI discovers guidelines
When Junie CLI starts a task, it looks for guidelines in the following order:
.junie/AGENTS.mdfile in the project root.AGENTS.mdfile in the project root..junie/guidelines.mdfile or.junie/guidelines/folder – Junie's legacy format for guidelines (still supported).
Global guidelines
In addition to project-level guidelines, Junie CLI also supports global guidelines from ~/.junie/AGENTS.md. On Windows, the global guidelines path is %USERPROFILE%\.junie\AGENTS.md. This file lets you define personal preferences or organization-wide rules that apply to all your projects without duplicating them in every repository.
How it works:
If only global or only project guidelines exist, Junie uses whichever is available — no extra annotations are added.
If both global and project guidelines exist, Junie includes both and marks them clearly. Project-level guidelines always take precedence over global ones when they conflict.
If the global and project guidelines have identical content, Junie automatically deduplicates and uses the content only once.
Examples of guidelines
An AGENTS.md file can include project-specific context such as tech stacks, conventions, or rules. Providing this information helps Junie better understand your environment, avoid incompatible libraries, and follow your project's specific architectural patterns.
Below are some examples of what you can include:
Quick-start checklist:
Local development commands:
Feature development and decision making:
UI and architecture:
Security and data handling:
Testing and contribution:
Non-goals for agents:
For more technology-specific examples of guidelines with explanations, see the junie-guidelines catalog.