--- name: devrig description: Operate a frontendless IntelliJ IDEA backend via devrig execute_code. Use for project registration, indexed search, PSI/VFS work, inspections, navigation, or execution through Kotlin codefiles. Includes 24 reusable codefiles and IntelliJ-native search agents. --- # Devrig Plugin Use `devrig` CLI + MCP Steroid for semantic work in a live JetBrains backend. Source: https://github.com/jonnyzzz/mcp-steroid ## Prerequisites - `devrig` CLI on PATH (`curl -fsSL https://devrig.dev/install.sh | sh`) - JetBrains IDE running with MCP Steroid plugin, or `devrig backend download` for a frontendless backend - Route every project-scoped operation with the fresh opaque `project_name` from `devrig list_projects`; the folder name is not a routing key ## Core workflow 1. `devrig list_projects --json` and select the project by longest matching path. 2. If absent, `devrig open_project --project_path="$PWD" --task_id= --reason="" --wait --json`, then re-list. 3. Run a codefile: `devrig execute_code --project_name= --task_id= --reason="" --code-file=` 4. Every script prints explicitly via `println`/`printJson`/`printCsv`/`printToon`; the final expression is ignored. 5. For PSI/VFS/indices use `readAction`, `smartReadAction`, or `writeAction` wrappers (see `references/`). For frontendless IDEA, project routing proves reachability but not a complete build model. Check content roots/modules before trusting semantic results. ## Codefiles (`codefiles/`, see `manifest.json`) - `01_project_info`, `02_find_files_by_ext`, `03_find_file_by_name`, `04_read_file` - `05_grep_files` (legacy; prefer `19_search_word_index`), `06_find_references`, `07_type_hierarchy`, `08_inspect_file` - `09_edit_single_file`, `10_multi_edit`, `11_create_file` - `12_build_project`, `13_find_duplicates`, `14_document_symbols`, `15_verify_after_edit` - `16_search_class_by_name`, `17_search_method_by_name`, `18_search_field_by_name` (`PsiShortNamesCache`) - `19_search_word_index` (`PsiSearchHelper` word index), `20_find_callers` (`ReferencesSearch`) - `21_goto_definition` (`reference.resolve`), `22_search_overrides`, `23_search_annotated`, `24_search_definitions` Edit the ALL-CAPS vars at the top of each codefile before running. Example: ```bash devrig execute_code --project_name= --task_id=search --reason="find class" --code-file=16_search_class_by_name.kts ``` Inline code needs shell quoting: `devrig execute_code --project_name= --task_id=t1 --reason="hi" --code='println("hello")'`, or use `--code-file=-` for stdin. ## Agents (`agents/`) - `devrig-codefiles.agent.md` — create and maintain reusable `execute_code` Kotlin codefiles with manifest. - `intellij-search.agent.md` — delegate IntelliJ-native code search (IDE indexes only, never grep or filesystem walk). Copy any `*.agent.md` into your repo's `.github/agents/` (or VS Code profile agents folder) to use it as a subagent. ## References (`references/`) Local copies of MCP Steroid guides: `prompt-skill.md`, `coding-with-intellij.md`, `coding-with-intellij-context-api.md`, `coding-with-intellij-threading.md`, `execute-code-overview.md`, `execute-code-feedback.md`, `managing-backends.md`, `project-search.md`, `workspace-symbol.md`. Each retains its original `mcp-steroid://` URI in its header.