JUNIEGUIDELINESMD(5)JUNIEGUIDELINESMD(5)

NAME

.junie/guidelines.md — instruction file for Junie

SYNOPSIS

.junie/guidelines.md

METADATA

FORMATMarkdown
FILENAME.junie/guidelines.md
CASE SENSITIVENo
TOOLJunie
ENCODINGUTF-8
GIT COMMITTEDYes
MAX SIZE10KB
SINCEJunie by JetBrains (2025)

DESCRIPTION

`.junie/guidelines.md` is the instruction file for Junie, JetBrains' autonomous AI coding agent. It provides project-specific guidelines that Junie reads at the start of each session to understand coding conventions, architecture, and quality standards.

Junie is separate from JetBrains' AI Assistant (which handles inline completions and chat). The guidelines file lives in the `.junie/` directory and uses plain Markdown — no frontmatter, no special directives, no multi-file rules.

The file is designed to be committed to version control and shared with the team. Unlike tools that support multiple rule files with glob-based activation, Junie uses a single guidelines file. Keep it focused and well-organized with clear headings.

STRUCTURE

├──Project Overview
Brief description of the project, its tech stack, and architecture. Provides Junie with foundational context.
├──Code Conventions
Language-specific coding standards, naming conventions, and design patterns Junie should follow when generating or modifying code.
└──Testing & Quality
Test framework preferences, coverage expectations, and quality standards. Junie uses these when writing or modifying tests.

ANNOTATED EXAMPLE

.junie/guidelines.md
markdown
1# Project Guidelines
2
3## Overview
4Kotlin/JVM microservice using Spring Boot 3.2 and Gradle.
5PostgreSQL database with Flyway migrations. Deployed on Kubernetes.
6
7## Code Style
8- Kotlin coding conventions (ktlint enforced)
9- Use data classes for DTOs and value objects
10- Prefer extension functions over utility classes
11- Coroutines for async operations — no CompletableFuture
12
13## Architecture
14- Hexagonal architecture: domain, application, infrastructure layers
15- Domain layer has zero framework dependencies
16- Use cases are single-purpose application services
17- Repository interfaces in domain, implementations in infrastructure
18
19## Testing
20- JUnit 5 with Kotest assertions
21- Testcontainers for database integration tests
22- MockK for mocking — never Mockito
23- Minimum 80% line coverage for new code
24
25## API Conventions
26- REST endpoints follow OpenAPI spec in docs/api.yaml
27- Use problem+json (RFC 7807) for error responses
28- Pagination with cursor-based tokens, not offset
29- All endpoints require authentication except /health

COMMON MISTAKES

Gotchas
✗WRONG Placing guidelines.md at the project root
✓RIGHT The file must be at `.junie/guidelines.md` — inside the `.junie/` directory

Junie specifically looks for guidelines in the `.junie/` directory. A guidelines.md at the project root will be ignored.

✗WRONG Expecting Junie guidelines to work in IntelliJ's standard AI Assistant
✓RIGHT Junie is a separate product from JetBrains AI Assistant — they use different configs

JetBrains has two AI products: AI Assistant (inline completions and chat) and Junie (autonomous coding agent). The `.junie/guidelines.md` file only affects Junie, not the AI Assistant.

✗WRONG Creating multiple guideline files in `.junie/`
✓RIGHT Junie reads a single `guidelines.md` file — put all instructions there

Unlike tools that scan a directory for multiple rule files, Junie expects a single `guidelines.md` file. Use headings and sections within that file to organize different topics.

USED BY

SIMILAR FILES

CLAUDE.mdClaude Memory File
.github/copilot-instructions.mdGitHub Copilot Instructions
.augment/guidelines.mdAugment Code Guidelines

COMPARISONS

agentconfig.ing2026-03-16JUNIEGUIDELINESMD(5)