| project | IntelliJ IDEA Platform | ||
|---|---|---|---|
| languages |
|
||
| framework | IntelliJ Platform SDK | ||
| build-system | Bazel | ||
| repository | monorepo |
Always display the output of SessionStart hooks verbatim to the user at the start of conversation
Critical: These guidelines MUST be followed at all times.
- The repository is a large monorepo with multiple IDE products and plugins.
- Module/plugin directories may contain their own AGENTS/CLAUDE instructions; follow them when present.
*.imlfiles are the source of truth and auto-generateBUILD.bazelfiles.- User-visible strings belong in
*.propertiesfor localization.
Special handling applies to the directories below. If a file you touch lives under one of these roots, you must activate that module's rules first (read the referenced doc before edits or reviews). These rules override general guidelines if they conflict.
-
Product DSL (
community/platform/build-scripts/product-dsl/): read./.claude/rules/product-dsl.mdbefore changing anything in this tree. -
IJ Proxy MCP server (
community/build/mcp-servers/ij-proxy/):- Tests: run
bun run buildandbun test. - Bazel: do not run Bazel build and tests here.
- Tests: run
-
AI Assistant activation (
plugins/llm/activation/):- Activation: follow
plugins/llm/activation/.ai/guidelines.mdbefore edits or reviews.
- Activation: follow
-
Toolbox (
toolbox/):- Tests: never use
./tests.cmd; seetoolbox/.ai/index.mdfor Gradle/Bazel test commands. - Build: use
./bazel.cmd build //toolbox/...instead of./bazel-build-all.cmd.
- Tests: never use
-
PyCharm (
./python): use./python/.ai/index.md.
- Run affected tests:
./tests.cmd --module <module> --test <FQN or wildcard>(FQN required; simple class names do not match; always specify the test module directly), ornode --test <file>for*.test.mjs.tests.cmdperforms Bazel compilation internally, so a separatebazel buildstep is not needed when tests will be run. Module-specific rules may override the runner. Skip if plugin has no tests. See TESTING. - Bazel compilation without tests: when only verifying compilation (no tests to run), use
bazel build <target>for affected modules. Skip if only.js,.mjs,.md,.txt, or.jsonfiles are modified. - After modifying
*.iml,BUILD.bazel, or.idea/files: run./build/jpsModelToBazel.cmd.
- Use
lint_filesto check files for warnings. Fix any warnings related to the code changes made. You may ignore unrelated warnings.
Preserve IDE-serialized .iml files in canonical form. Do not:
- add comments
- auto-format
- normalize (structure or whitespace)
- add a trailing newline at end of file
- prune (remove) empty tags
- reorder elements or attributes
Never use the code-search skill. See ijproxy for search tools.
- Read:
mcp__ijproxy__read_file - Edit/Write:
mcp__ijproxy__apply_patch - Search symbols (preferred):
mcp__ijproxy__search_symbol - Find files (glob):
mcp__ijproxy__search_file - Search text:
mcp__ijproxy__search_text - Search regex:
mcp__ijproxy__search_regex - List dir:
mcp__ijproxy__list_dir
- No MCP: use
./tools/fd.cmd(file search) and./tools/rg.cmd(text/regex search). These are the only allowed shell file ops on repo paths.
Available via ijproxy or JetBrains MCP. Use these for semantic operations; avoid manual search/replace when a refactor exists.
- Default to
search_symbol(if available) for classes/methods/fields; usesearch_text/search_regexmainly for strings, comments, and non-symbol matches. - Inspections & symbol info:
get_file_problems,get_symbol_info - Refactors:
rename(ijproxy) /rename_refactoring(JetBrains MCP); use for renames and avoid manual search/replace. - Formatting:
reformat_file - Concurrency checks:
find_threading_requirements_usages,find_lock_requirements_usages - Project structure & VCS:
get_project_modules,get_project_dependencies,get_repositories,git_status - Run configs:
get_run_configurations,execute_run_configuration
-
When ijproxy MCP is available, all repo file ops (read/search/edit/write) MUST use ijproxy tools. Do not use JetBrains MCP or generic tools.
-
Fallback tools (JetBrains MCP / client) are allowed only when ijproxy is unavailable.
-
For repo edits, use
mcp__ijproxy__apply_patch. Genericapply_patchis forbidden unless ijproxy is unavailable. -
Never shell for file ops (
cat,sed,find,grep) on repo paths, except the client fallback (./tools/fd.cmd,./tools/rg.cmd) when no MCP is available. -
Shell OK for: git (prefer
git_statusif the tool is available), build/test. -
Outside repo: native shell permitted, except for text/file search — use
./tools/rg.cmdand./tools/fd.cmd(absolute paths OK) instead of nativegrep/find.
Local Preferences: @./.ai/local.md