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.
- CLAUDE.mdCLAUDE.md
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
- Very specific: line 37
Use JetBrains MCP get_run_configurations() or these pre-configured options:
- Distinctive: line 84
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 …
- Very specific: line 90
If a file is open in IDE with unsaved changes, standard Read sees the old disk version, while MCP sees current IDE buffer
- Distinctive: line 103
If there are many options for the JetBrains IDE MCP server, ask the user what MCP server to use.
- Very specific: line 124
Use JetBrains MCP get_file_problems with errorsOnly=false to check files for warnings.
≈ “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.
Files
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 verifyPluginRun 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 withTestDataEditor.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
| Package | Purpose |
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 editorprojectConfigurable- Settings UIlocalInspection- Context parameter inspectionintentionAction- Create contextual overloadcompletion.contributor- Directive completionpsi.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
Readsees the old disk version, while MCP sees current IDE buffer - Standard
Write/Editmay 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_textuses IntelliJ indexes — faster than grep on large codebasesrename_refactoringunderstands code structure and updates all references correctlyget_symbol_infoprovides type info, documentation, and declarationsget_file_problemsruns 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 of | Use JetBrains MCP |
Read | get_file_text_by_path |
Edit, Write | replace_text_in_file, create_new_file |
Grep | search_in_files_by_text, search_in_files_by_regex |
Glob | find_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_problemsfor understanding code - Refactoring:
rename_refactoringfor symbol renaming (safer than text replacement) - Terminal:
execute_terminal_commandfor running commands - Run configurations:
get_run_configurations()to discover, orexecute_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.
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
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.

