agentleFS
JetBrainsKnown publisherJetBrains/kotlin-compiler-devkit/AGENTS.md

kotlin-compiler-devkit

AGENTS.md56 starsChanged 18 months agoApache-2.0View on GitHub

Kotlin Compiler DevKit is an IntelliJ IDEA plugin that enhances the development experience for working with compiler tests in the Kotlin project or Kotlin compiler plugins. It provides a specialized test data editor, test running capabilities, and diff application features. Use JetBrains MCP get_run_configurations() or these pre-configured options: - Run Plugin - Launches sandbox IDE with plugin installed - Run Tests - Executes test suite - Run Verifications - Runs plugin verification - Run Linters - Runs linters verification The…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use JetBrains MCP get_run_configurations() or these pre-configured options:

    line 37
  2. Distinctive:

    Use other similar tools only if it is not possible to use the JetBrains IDE MCP, and you together with the user can't manage to make it …

    line 84
  3. Very specific:

    If a file is open in IDE with unsaved changes, standard Read sees the old disk version, while MCP sees current IDE buffer

    line 90
  4. Distinctive:

    If there are many options for the JetBrains IDE MCP server, ask the user what MCP server to use.

    line 103
  5. Very specific:

    Use JetBrains MCP get_file_problems with errorsOnly=false to check files for warnings.

    line 124

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

This file provides guidance to AI agents when working with code in this repository.

Project Overview

Kotlin Compiler DevKit is an IntelliJ IDEA plugin that enhances the development experience for working with compiler tests in the Kotlin project or Kotlin compiler plugins. It provides a specialized test data editor, test running capabilities, and diff application features.

Build Commands

# Build the plugin (outputs to ./build/distributions/)
./gradlew buildPlugin

# Run all tests
./gradlew test

# Run linting (ktlint + detekt)
./gradlew ktlintCheck detekt

# Run the plugin in a sandbox IDE for testing
./gradlew runIde

# Verify plugin compatibility
./gradlew verifyPlugin

Run Configurations

Use JetBrains MCP get_run_configurations() or these pre-configured options:

  • Run Plugin - Launches sandbox IDE with plugin installed
  • Run Tests - Executes test suite
  • Run Verifications - Runs plugin verification
  • Run Linters - Runs linters verification

Architecture

Core Components

  • KotlinTestDataFileEditorProvider (src/.../helper/KotlinTestDataFileEditorProvider.kt) - Entry point that provides a custom editor for test data files. Wraps the standard text editor with TestDataEditor.
  • TestDataEditor (src/.../helper/ui/TestDataEditor.kt) - Split editor UI showing test file and related files side-by-side with toolbar for running tests.
  • TestDataPathsConfiguration (src/.../helper/TestDataPluginSettings.kt) - Persists plugin settings per project in .idea/kotlinTestDataPluginTestDataPaths.xml.

Key Packages

PackagePurpose
actions/Editor toolbar and context menu actions (run tests, apply diffs, create reproducer)
gradle/Gradle command line building and test generation utilities
ui/Editor UI components and settings panels
reference/PSI references for test directives
inspections/Code inspections and intention actions
runAnything/"Run Anything" provider for testGlobally command

Extension Points

The plugin registers extensions in resources/META-INF/plugin.xml:

  • fileEditorProvider - Custom test data editor
  • projectConfigurable - Settings UI
  • localInspection - Context parameter inspection
  • intentionAction - Create contextual overload
  • completion.contributor - Directive completion
  • psi.referenceContributor - Directive references

JetBrains IDE MCP - MANDATORY for file and project operations

NEVER use these tools: Grep, Glob, Read, Edit, Write, Task(Explore). ALWAYS use JetBrains MCP equivalents instead.

Exception: for paths outside the project (e.g., ~/.claude/), use standard tools — MCP only works with project-relative paths.

NEVER use execute_terminal_command tool. ALWAYS use default Bash instead.

Use other similar tools only if it is not possible to use the JetBrains IDE MCP, and you together with the user can't manage to make it work.

Why MCP over standard tools?

Synchronization with IDE:

  • Standard tools work with the filesystem directly, MCP works with IDE's view of files
  • If a file is open in IDE with unsaved changes, standard Read sees the old disk version, while MCP sees current IDE buffer
  • Standard Write/Edit may conflict with IDE's buffer or not be picked up immediately
  • MCP changes integrate with IDE's undo history

IDE capabilities:

  • search_in_files_by_text uses IntelliJ indexes — faster than grep on large codebases
  • rename_refactoring understands code structure and updates all references correctly
  • get_symbol_info provides type info, documentation, and declarations
  • get_file_problems runs IntelliJ inspections beyond syntax checking

MCP server configuration

The JetBrains IDE MCP server can be called as jetbrains, idea, my-idea, my-idea-dev, etc. If there are many options for the JetBrains IDE MCP server, ask the user what MCP server to use.

Tool mapping

Instead ofUse JetBrains MCP
Readget_file_text_by_path
Edit, Writereplace_text_in_file, create_new_file
Grepsearch_in_files_by_text, search_in_files_by_regex
Globfind_files_by_name_keyword, find_files_by_glob
Task(Explore)list_directory_tree, search_in_files_by_text

Additional MCP tools

  • Code analysis: get_symbol_info, get_file_problems for understanding code
  • Refactoring: rename_refactoring for symbol renaming (safer than text replacement)
  • Terminal: execute_terminal_command for running commands
  • Run configurations: get_run_configurations() to discover, or execute_run_configuration(name="...") if name is known

MANDATORY - Verify After Writing Code

Use JetBrains MCP get_file_problems with errorsOnly=false to check files for warnings. FIX any warnings related to the code changes made. You may ignore unrelated warnings.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.