DevoxxGenieIDEAPlugin
AGENTS.md689 starsChanged 7 days agoMITView on GitHub
DevoxxGenie is a Java-based LLM Code Assistant plugin for IntelliJ IDEA that integrates with both local LLM providers (Ollama, LMStudio, GPT4All, Llama.cpp, Exo) and cloud-based LLMs (OpenAI, Anthropic, Mistral, Groq, Gemini, DeepInfra, DeepSeek, OpenRouter, OrcaRouter, Requesty, DemonRoute, Azure OpenAI, Amazon Bedrock). The plugin supports advanced features like RAG (Retrieval-Augmented Generation), MCP (Model Context Protocol) servers, web search, and agentic programming capabilities. Entry Point: - UserPromptPanel → PromptSubmissionListener.onPromptSubmitted() → PromptExecutionController.handlePromptSubmission() Processing Layer: - PromptExecutionService.executeQuery() - Handles token calculations, RAG, and GitDiff…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 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 repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- close-task-commit-push-prSkill
- git-commit-push-prSkill
- prSkill
- releaseSkill
- reviewSkill
- start-taskSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 6 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 86
Create factory class implementing ChatModelFactory under chatmodel/cloud/ or chatmodel/local/
- Very specific: line 89
Add provider to ModelProvider enum in model/enumarations/
- Very specific: line 219
Update model/CustomPrompt.java if new model properties needed
- Very specific: line 221
Update service/prompt/command/CustomPromptCommand.java for execution
- Distinctive: line 222
Add entry in Settings → Prompts panel
- Very specific: line 227
Check MCPCallbackLogger for request/response details
- Distinctive: line 228
Verify transport configuration (stdio vs HTTP SSE)
- Distinctive: line 231
Ensure Docker is running
- Very specific: line 234
Use RAGValidatorService to check prerequisites
- Very specific: line 238
Update version in build.gradle.kts
- Very specific: line 242
Test: ./gradlew test and ./gradlew verifyPlugin
- Very specific: line 266
If your client supports MCP resources, read backlog://workflow/overview to understand when and how to use Backlog for this project.
- Very specific: line 267
If your client only supports tools or the above request fails, call backlog.get_workflow_overview() tool to load the tool-oriented overview …
- Distinctive: line 269
First time working here?: Read the overview resource IMMEDIATELY to learn the workflow
- Distinctive: line 271
When to read it: BEFORE creating tasks, or when you're unsure whether to track work
- Distinctive: line 275
Search-first workflow to avoid duplicates
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
DevoxxGenie is a Java-based LLM Code Assistant plugin for IntelliJ IDEA that integrates with both local LLM providers (Ollama, LMStudio, GPT4All, Llama.cpp, Exo) and cloud-based LLMs (OpenAI, Anthropic, Mistral, Groq, Gemini, DeepInfra, DeepSeek, OpenRouter, OrcaRouter, Requesty, DemonRoute, Azure OpenAI, Amazon Bedrock). The plugin supports advanced features like RAG (Retrieval-Augmented Generation), MCP (Model Context Protocol) servers, web search, and agentic programming capabilities.
Build & Development Commands
Building
./gradlew buildPlugin # Build plugin (creates ZIP in build/distributions/)
./gradlew clean # Clean build artifacts
./gradlew shadowJar # Create shadow JAR with dependenciesTesting
./gradlew test # Run all tests
./gradlew test --tests ClassName # Run specific test class
./gradlew test --tests ClassName.methodName # Run single test method
./gradlew verifyPlugin # Verify plugin (includes tests)Running & Publishing
./gradlew runIde # Run IntelliJ IDEA with plugin for testing
./gradlew publishPlugin # Publish to JetBrains Marketplace (requires PUBLISH_TOKEN env var)Task Automation (using Taskfile)
task build # Build the plugin
task test # Run tests
task run-ide # Run IDE with plugin
task generate-changelog VERSION=0.8.0 # Generate changelog from merged PRs
task preview-changes VERSION=0.8.0 # Preview changelog without committingCore Architecture
Multi-Module Structure
- Root module: Main IntelliJ plugin code (
src/main/java/com/devoxx/genie/) - Core module: Shared utilities being refactored (see
core/README.md- issue #564) - Docusaurus: Documentation website (
docusaurus/)
Key Architectural Components
1. Prompt Execution Flow
The plugin processes user prompts through a layered architecture:
Entry Point:
UserPromptPanel→PromptSubmissionListener.onPromptSubmitted()→PromptExecutionController.handlePromptSubmission()
Processing Layer:
PromptExecutionService.executeQuery()- Handles token calculations, RAG, and GitDiff settingsChatPromptExecutor.executePrompt()- Dispatches to appropriate LLM providerLLMProviderService.getAvailableModelProviders()- Retrieves model from ChatModelFactory
Execution Strategies:
StreamingPromptExecutor- Token-by-token streaming responsesNonStreamingPromptExecutionService- Full response modeWebSearchPromptExecutionService- Web search augmented prompts
Response Rendering:
ChatStreamingResponsePanel- Real-time streaming UI updatesChatResponsePanel- Final response display with code highlightingResponseHeaderPanel,ResponseDocumentPanel,MetricExecutionInfoPanel- Modular response components
2. LLM Provider System
Factory Pattern Implementation:
ChatModelFactory(interface) - Base factory for all providersChatModelFactoryProvider- Provider registry and lookup- Provider-specific factories under:
chatmodel/cloud/- Cloud providers (OpenAI, Anthropic, Gemini, etc.)chatmodel/local/- Local providers (Ollama, GPT4All, LMStudio, etc.)
Cloud Providers: anthropic, azureopenai, bedrock, deepinfra, deepseek, google, grok, groq, mistral, openai
Routers (generic path, defined in chatmodel/cloud/router/RouterRegistry): openrouter, orcarouter, requesty, demonroute
Local Providers: ollama, gpt4all, lmstudio, llamacpp, jan, customopenai
Adding New Providers:
- Create factory class implementing
ChatModelFactoryunderchatmodel/cloud/orchatmodel/local/ - Implement
createChatModel()andcreateStreamingChatModel()methods - Register in
ChatModelFactoryProvider - Add provider to
ModelProviderenum inmodel/enumarations/
3. RAG (Retrieval-Augmented Generation) System
Components:
ProjectIndexerService- Indexes project files for semantic searchChromaEmbeddingService- Stores embeddings in ChromaDB (Docker-based, v0.6.2)SemanticSearchService- Retrieves relevant code based on similarity- Uses Ollama with Nomic Text embeddings for vector generation
RAGValidatorService- Validates Docker, ChromaDB, and Ollama setup
Validators:
DockerValidator- Checks Docker availabilityChromeDBValidator- Validates ChromaDB connectionOllamaValidator- Verifies Ollama and embedding modelNomicEmbedTextValidator- Checks nomic-embed-text model
4. MCP (Model Context Protocol) Support
Key Services:
MCPService- Core MCP server managementMCPExecutionService- Executes MCP tool callsMCPListenerService- Implements ChatModelListener for MCP integrationMCPCallbackLogger- Logs MCP requests/responses for debugging
Configuration:
- MCP servers configured in Settings UI (
ui/settings/mcp/) - Supports stdio and HTTP SSE transports
- Tools are automatically exposed to LLM conversations when MCP is enabled
5. Service Layer Organization
Key services under service/:
ChatService- Manages chat conversationsMessageCreationService- Constructs LLM messages with contextTokenCalculationService- Calculates token usage and costsProjectContentService- Extracts project content for contextFileListManager- Manages files added to prompt contextConversationStorageService- Persists chat history locally (SQLite)
UI Architecture
Main Panels:
DevoxxGenieToolWindowContent- Main plugin windowConversationPanel- Chat conversation displayUserPromptPanel- User input area with image/file DnD supportActionButtonsPanel- Control buttons (submit, stop, clear, etc.)PromptOutputPanel- Response output with streaming support
Settings UI (ui/settings/):
LLMProvidersComponent- Configure LLM providers and API keysRAGSettingsComponent- RAG feature configurationMCPSettingsComponent- MCP server managementPromptSettingsComponent- Custom prompts and shortcutsWebSearchProvidersComponent- Google/Tavily search setup
Project Scanner & AST Analysis
Language-Specific Scanners (service/analyzer/languages/):
- Each language has a
ProjectScannerExtensionimplementation - Supports: Java, Kotlin, Python, JavaScript, Go, Rust, C++, PHP
- Extracts AST context (parent classes, field references) for better code analysis
ProjectAnalyzercoordinates language-specific scanningCachedProjectScanner- Caches scan results for performance
Test Driven Generation (TDG)
Experimental Feature (service/tdg/):
CodeGeneratorService- Generates implementation from unit tests- Allows writing tests first, then generating implementation
Code Style & Conventions
Naming Conventions
- Variables/Methods: camelCase
- Classes/Interfaces: PascalCase
- Constants: SCREAMING_SNAKE_CASE
- Service Classes: Suffix with "Service" (e.g.,
ChatService) - Factory Classes: Suffix with "Factory" (e.g.,
ChatModelFactory) - Panel Classes: Suffix with "Panel" (e.g.,
UserPromptPanel)
Dependency Management
- Java minimum: JDK 17
- IntelliJ minimum: 2023.3.4
- Langchain4J version: 1.10.0 (beta: 1.10.0-beta18 for MCP/Chroma/web search)
- Uses Lombok for boilerplate reduction
- Shadow plugin for fat JAR creation with dependency merging
Testing Practices
- Tests located in
src/test/java/mirroring main structure - Uses JUnit 5 (Jupiter) for testing
- Mockito for mocking
- AssertJ for fluent assertions
- Integration tests suffixed with
IT(e.g.,PromptExecutionServiceIT) - Platform tests extend
AbstractLightPlatformTestCase
Important Implementation Details
DEVOXXGENIE.md Files
- Projects can include a
DEVOXXGENIE.mdfile at root - This file is automatically added to the system prompt for better LLM context
- Can be generated via Settings UI or
/initcommand in prompt input - Provides project-specific guidance to the LLM
Chat Memory & Context
- Configurable chat memory size (default: 10 messages)
ChatMemoryManagerhandles memory lifecycle per conversation- Conversations stored locally using SQLite
- Each conversation maintains independent memory context
Token Calculation & Cost Estimation
- Real-time token counting using JTokkit library
- Cost calculation for cloud providers
- Context window tracking and warnings
- Supports adding full project to context for large context models (e.g., Gemini 1M tokens)
Web Search Integration
- Google Custom Search and Tavily supported
WebSearchPromptExecutionServiceaugments prompts with search results- Configured via Settings UI with API keys
Git Integration
GitMergeService- Git diff integration- Can include uncommitted changes in prompt context
- Useful for explaining changes or generating commit messages
Plugin Configuration Files
src/main/resources/META-INF/plugin.xml- Main plugin descriptor- Language-specific features:
java-features.xml,kotlin-features.xml,python-features.xml, etc. src/main/resources/application.properties- Application properties (version auto-updated by build)gradle.properties- Gradle configuration.env- Local environment variables (not committed)
Common Development Workflows
Adding a New Custom Prompt
- Update
model/CustomPrompt.javaif new model properties needed - Modify
ui/settings/prompt/PromptSettingsComponent.javafor UI - Update
service/prompt/command/CustomPromptCommand.javafor execution - Add entry in Settings → Prompts panel
Debugging MCP Issues
- Enable MCP logging in Settings → MCP
- View logs in MCP Log Tool Window (
MCPLogPanel) - Check
MCPCallbackLoggerfor request/response details - Verify transport configuration (stdio vs HTTP SSE)
Working with RAG
- Ensure Docker is running
- ChromaDB container must be started (docker-java integration)
- Ollama with nomic-embed-text model required
- Use
RAGValidatorServiceto check prerequisites - Index project via
ProjectIndexerService.indexFiles()
Release Process
- Update version in
build.gradle.kts - Generate changelog:
task generate-changelog VERSION=x.y.z - Review and commit changes to
CHANGELOG.mdandplugin.xml - Build:
./gradlew buildPlugin - Test:
./gradlew testand./gradlew verifyPlugin - Publish: Set
PUBLISH_TOKENenv var and run./gradlew publishPlugin
Key Dependencies & Tools
- Langchain4J: LLM integration framework (core abstraction)
- Docker Java: Docker integration for ChromaDB
- JTokkit: Token counting
- SQLite JDBC: Local conversation storage
- CommonMark: Markdown parsing and rendering
- Netty: Async networking
- Logback: Logging framework
- Retrofit: HTTP client for external APIs
- AWS SDK: Amazon Bedrock integration
<!-- BACKLOG.MD MCP GUIDELINES START --><CRITICAL_INSTRUCTION>
BACKLOG WORKFLOW INSTRUCTIONS
This project uses Backlog.md MCP for all task and project management activities.
CRITICAL GUIDANCE
- If your client supports MCP resources, read
backlog://workflow/overviewto understand when and how to use Backlog for this project. - If your client only supports tools or the above request fails, call
backlog.get_workflow_overview()tool to load the tool-oriented overview (it lists the matching guide tools). - First time working here? Read the overview resource IMMEDIATELY to learn the workflow
- Already familiar? You should have the overview cached ("## Backlog.md Overview (MCP)")
- When to read it: BEFORE creating tasks, or when you're unsure whether to track work
These guides cover:
- Decision framework for when to create tasks
- Search-first workflow to avoid duplicates
- Links to detailed guides for task creation, execution, and finalization
- MCP tools reference
You MUST read the overview resource to understand the complete workflow. The information is NOT summarized here.
</CRITICAL_INSTRUCTION>
<!-- BACKLOG.MD MCP GUIDELINES END --><!-- groma:start -->Groma
This project uses Groma. Before you scan, inspect, or curate architecture, or change files for a Backlog task, run groma agent-instructions and read the guide it names for that job. When it reports a first scan, ask the user whether they want you to curate the architecture. Do not edit Groma-owned architecture files directly.
<!-- groma:end -->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.

