agentleFS
JetBrainsKnown publisherJetBrains/intellij-obsolete-plugins/ai-playground/CLAUDE.md

intellij-obsolete-plugins / ai-playground

CLAUDE.md44 starsChanged 45 days agoApache-2.0View on GitHub

The file

Show its rules and text

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

38 rules. About 0 are common, 22 are distinctive, and 16 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈22

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 16

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow Kotlin style guidelines with 2-space indentation

    line 8
  2. Distinctive:

    Prefer val over var, immutable data structures when possible

    line 9
  3. Distinctive:

    Use descriptive names (camelCase for functions/variables, PascalCase for classes)

    line 10
  4. Distinctive:

    Add KDoc comments for public APIs and complex methods

    line 11
  5. Distinctive:

    Follow MVVM pattern for UI components

    line 13
  6. Distinctive:

    Use coroutines for asynchronous operations.

    line 14
  7. Distinctive:

    NEVER MIX REGULAR LOCKS AND COROUTINES - this can lead to deadlocks

    line 17
  8. Distinctive:

    DO NOT use Java's synchronized blocks with coroutines

    line 18
  9. Distinctive:

    DO NOT call suspending functions inside synchronized blocks

    line 19
  10. Distinctive:

    Use kotlinx.coroutines.sync.Mutex for thread-safety when needed

    line 20
  11. Distinctive:

    Use AtomicInteger/AtomicBoolean for simple shared counters

    line 21
  12. Distinctive:

    Use withContext() to switch between dispatchers

    line 22
  13. Distinctive:

    Use structured concurrency with launch{} within a defined scope

    line 23
  14. Distinctive:

    Always handle exceptions in coroutines using try/catch or supervisorScope

    line 27
  15. Distinctive:

    Follow IntelliJ plugin development guidelines

    line 32
  16. Distinctive:

    Use proper disposal for resources with DisposableScope

    line 33
  17. Distinctive:

    No initial welcome message for a cleaner start experience

    line 44
  18. Very specific:

    Always use Jewel components from org.jetbrains.jewel.ui.component.* when available

    line 60
  19. Very specific:

    Prefer Jewel's Text, TextField, Icon, IconButton components over Material equivalents

    line 61
  20. Very specific:

    Use JewelTheme.globalColors for accessing theme colors

    line 62
  21. Very specific:

    Use standard Box, Column, Row from Compose foundation for layout

    line 63
  22. Distinctive:

    Do NOT use Material components (Material3 is not available in the project)

    line 66
  23. Very specific:

    Do NOT use Button - create custom buttons using Box + clickable modifier

    line 67
  24. Very specific:

    Do NOT use Surface - use Box with background and border instead

    line 68
  25. Very specific:

    Do NOT use Material's Divider - create a simple divider with a Box with height and background

    line 69
  26. Very specific:

    Use androidx.compose.ui.window.Dialog for dialogs

    line 72
  27. Very specific:

    Use theme colors: JewelTheme.globalColors.panelBackground for dialog backgrounds

    line 74
  28. Very specific:

    Use JewelTheme.globalColors.borders.normal for borders

    line 75
  29. Very specific:

    Use JewelTheme.isDark to check if dark theme is active

    line 79
  30. Very specific:

    Use JewelTheme.globalColors.panelBackground for default background

    line 80
  31. Very specific:

    Use primaryColor and primaryColorLight for accent colors

    line 82
  32. Very specific:

    Use surfaceColor() composable function to get the current surface color

    line 83
  33. Very specific:

    Always use icons from AllIconsKeys.* namespace

    line 86
  34. Very specific:

    Create reusable components when needed (e.g., DialogButton)

    line 96
  35. Distinctive:

    Document components with KDoc comments

    line 97
  36. Distinctive:

    Follow Jewel's design style (rounded corners, proper spacing)

    line 98
  37. Distinctive:

    Use theme colors for consistency with IDE

    line 99
  38. Distinctive:

    Test on both light and dark themes

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.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
CLAUDE.md

AI Playground Plugin Development Reference

Project

  • You cannot build or run the project by your own, ask human for that and always ask for the feedback

Code Style

  • Follow Kotlin style guidelines with 2-space indentation
  • Prefer val over var, immutable data structures when possible
  • Use descriptive names (camelCase for functions/variables, PascalCase for classes)
  • Add KDoc comments for public APIs and complex methods
  • Handle nullability explicitly with nullable types and safe calls
  • Follow MVVM pattern for UI components
  • Use coroutines for asynchronous operations; consider thread safety in UI operations

Coroutines and Concurrency

  • NEVER MIX REGULAR LOCKS AND COROUTINES - this can lead to deadlocks
  • DO NOT use Java's synchronized blocks with coroutines
  • DO NOT call suspending functions inside synchronized blocks
  • Use kotlinx.coroutines.sync.Mutex for thread-safety when needed
  • Use AtomicInteger/AtomicBoolean for simple shared counters
  • Use withContext() to switch between dispatchers
  • Use structured concurrency with launch{} within a defined scope
  • In UI components, use viewModelScope or a lifecycle-aware coroutineScope
  • Be careful with MutableStateFlow updates from multiple coroutines
  • For complex state management, consider using a single-threaded context
  • Always handle exceptions in coroutines using try/catch or supervisorScope

Project Structure

  • src directory has package prefix: "com.intellij.aiplayground"
  • UI components use JetBrains Compose with Jewel components
  • Follow IntelliJ plugin development guidelines
  • Use proper disposal for resources with DisposableScope
  • Implement token management for LLM API calls

Model Selection UI Design

  • Models are grouped by provider in a single scrollable list
  • Model section starts empty by default for new users
  • Selected models are visually distinct and persist between IDE restarts
  • Model selection state is saved to persistent storage automatically
  • Users can toggle models on/off, including removing the last one
  • UI adapts responsively to available screen space
  • Interface prioritizes clarity with minimal redundancy
  • No initial welcome message for a cleaner start experience
  • Message input supports Enter key for sending messages

Chat UI Design

  • Multiple chats are supported with persistent storage
  • Chat messages are saved automatically between sessions
  • Each chat maintains its own history and active model selection
  • Chat selector header shows current chat with dropdown for switching
  • Users can create, rename, and delete chats
  • Chat titles are auto-generated from the first user message
  • New chats inherit active model settings from global preferences
  • Messages are displayed with provider attribution and timestamps

Jewel UI Component Guidelines

Components to Use

  • Always use Jewel components from org.jetbrains.jewel.ui.component.* when available
  • Prefer Jewel's Text, TextField, Icon, IconButton components over Material equivalents
  • Use JewelTheme.globalColors for accessing theme colors
  • Use standard Box, Column, Row from Compose foundation for layout

Components to Avoid

  • Do NOT use Material components (Material3 is not available in the project)
  • Do NOT use Button - create custom buttons using Box + clickable modifier
  • Do NOT use Surface - use Box with background and border instead
  • Do NOT use Material's Divider - create a simple divider with a Box with height and background

Dialogs and Modals

  • Use androidx.compose.ui.window.Dialog for dialogs
  • Build dialog content with Box and other foundation components
  • Use theme colors: JewelTheme.globalColors.panelBackground for dialog backgrounds
  • Use JewelTheme.globalColors.borders.normal for borders
  • For dividers use: Box with height(1.dp) and background color

Theme and Colors

  • Use JewelTheme.isDark to check if dark theme is active
  • Use JewelTheme.globalColors.panelBackground for default background
  • Use JewelTheme.globalColors.borders.normal for borders
  • Use primaryColor and primaryColorLight for accent colors
  • Use surfaceColor() composable function to get the current surface color

Icons

  • Always use icons from AllIconsKeys.* namespace
  • Common icons:
    • AllIconsKeys.General.Add (plus icon)
    • AllIconsKeys.General.Remove (minus icon)
    • AllIconsKeys.General.Menu (hamburger menu)
    • AllIconsKeys.General.ChevronDown (dropdown indicator)
    • AllIconsKeys.Actions.Edit (pencil icon)
    • AllIconsKeys.General.Close (X icon)

Custom Components

  • Create reusable components when needed (e.g., DialogButton)
  • Document components with KDoc comments
  • Follow Jewel's design style (rounded corners, proper spacing)
  • Use theme colors for consistency with IDE
  • Test on both light and dark themes

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.