agentleFS
JetBrainsKnown publisherJetBrains/compose-hot-reload/CLAUDE.md

compose-hot-reload

CLAUDE.md1.4k starsChanged 6 months agoApache-2.0View on GitHub

JetBrains open-source project enabling instant UI code changes without restarting a Compose Multiplatform application. Orchestration — Communication between Gradle, the devtools, the Application, and the IDE. The devtools starts an orchestration server; all connected clients exchange broadcast messages (e.g., ReloadClassesRequest). Agent — JVM agent added at launch in hot reload mode. Runs in the premain phase and uses java.lang.instrument.Instrumentation.redefineClasses to apply class updates on demand. Runtime — A dev variant of the runtime added to the classpath in hot reload…

Trending

Quiet since August.about the whole repository

Dec 2025: 3 mentionsJan 2026: 4 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 3 mentionsJun 2026: 2 mentionsJul 2026: 3 mentionsAug 2026: 12 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the JetBrains/compose-hot-reload repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about JetBrains/compose-hot-reload

The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 51

Talked about on GitHub and Bluesky (51 times).

On GitHub · 42

37 more on GitHub

On Bluesky · 9

4 more on Bluesky

The file

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

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    State transfer during structural changes: When class layouts change, DCEVM performs a GC-like pass — allocates new memory for modified …

    line 58
  2. Very specific:

    Update the plugin version to match: id("org.jetbrains.compose.hot-reload") version "1.0.0-DEBUG"

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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

Compose Hot Reload

JetBrains open-source project enabling instant UI code changes without restarting a Compose Multiplatform application.

Build & Test

# Build
./gradlew build

# Run all tests
./gradlew check

# Run a sample
./gradlew :samples:counter:hotRunJvm

# Publish to local repository (for testing in external projects)
./gradlew publishAllPublicationsToLocalRepository

Key Modules

ModulePurpose
hot-reload-coreCore hot reload functionality
hot-reload-gradle-pluginGradle plugin (shaded for plugin portal)
hot-reload-gradle-coreCore Gradle integration
hot-reload-gradle-ideaProject/build model used by IntelliJ IDEA / Android Studio
hot-reload-agentJVM agent that reloads classes on demand
hot-reload-orchestrationCommunication layer between Gradle, devtools, app, and IDE
hot-reload-runtime-jvmJVM runtime: communicates with the Agent, listens for orchestration messages, invalidates Compose groups after reload
hot-reload-runtime-apiPublic runtime API
hot-reload-annotationsKotlin annotations for hot reload API
hot-reload-analysisBytecode analysis that determines dirty Compose scopes/groups that should be invalidated after reload
hot-reload-devtoolsDeveloper tools UI window
hot-reload-mcpMCP server for AI agent integration
hot-reload-testTest infrastructure and test plugins
tests/Functional integration tests
samples/Example projects (counter app)
buildSrc/Build conventions and custom Gradle tasks

Architecture

Orchestration — Communication between Gradle, the devtools, the Application, and the IDE. The devtools starts an orchestration server; all connected clients exchange broadcast messages (e.g., ReloadClassesRequest).

Agent — JVM agent added at launch in hot reload mode. Runs in the premain phase and uses java.lang.instrument.Instrumentation.redefineClasses to apply class updates on demand.

Runtime — A dev variant of the runtime added to the classpath in hot reload mode. Communicates with the Agent and listens for/broadcasts UI messages (e.g., UIRendered). After reload it integrates with Compose Runtime APIs to invalidate states and trigger re-renders.

Recompiler — Gradle Daemon in continuous mode that connects to orchestration and sends ReloadClassesRequest when .class files change.

MCP Server — Model Context Protocol server that enables AI agents to interact with a running Compose application. Connects to orchestration as a tooling client using PID file polling — starts without a running application, waits for it, detects shutdown, and reconnects automatically. Exposes status and take_screenshot tools over stdio transport. Launched via the hotMcpServer Gradle task.

DCEVM — Dynamic Code Evolution VM

Hot reload relies on JetBrains Runtime with DCEVM (Dynamic Code Evolution VM), which lifts standard JVM restrictions on redefineClasses. Regular JVMs only allow function body updates; DCEVM supports arbitrary changes including class structure modifications (new fields, changed hierarchies, etc.).

State transfer during structural changes: When class layouts change, DCEVM performs a GC-like pass — allocates new memory for modified objects, migrates existing field values, initializes new fields with JVM defaults (null/0/false), updates all pointers, and de-optimizes affected JIT compilations.

Key JVM flags added by the Gradle plugin:

-XX:+AllowEnhancedClassRedefinition   # enables DCEVM unrestricted redefinition
-javaagent:<path-to-agent>            # attaches the hot-reload agent

Classpath Strategy

The Gradle plugin splits dependencies into two buckets:

  • Hot — project source outputs (mutable; checksummed for change detection)
  • Cold — remote/library dependencies (immutable; never reloaded)

This avoids unnecessary reload attempts on stable third-party code.

What Can Be Reloaded

Functions, classes, parameters, added/removed fields, and nearly arbitrary code changes — without manual configuration. The hot-reload-analysis module performs bytecode analysis to determine reload compatibility.

Using a Locally Built Version

  1. Make code changes.
  2. Set a custom version in gradle.properties, e.g. version=1.0.0-DEBUG.
  3. Run ./gradlew publishAllPublicationsToLocalRepository.
  4. In your project's settings.gradle.kts, add:
    pluginManagement {
        repositories { maven("file://path/to/compose-hot-reload/build/repo") }
    }
    dependencyResolutionManagement {
        repositories { maven("file://path/to/compose-hot-reload/build/repo") }
    }
  5. Update the plugin version to match: id("org.jetbrains.compose.hot-reload") version "1.0.0-DEBUG"

Versioning

  • Current version: gradle.properties → version
  • Bootstrap version: gradle.properties → bootstrap.version
  • Main branch for PRs: staging
  • Release branches: release/x.y.z-*

Requirements

  • Kotlin 2.1.20+
  • Compose Multiplatform 1.10.0+
  • JetBrains Runtime with Java 21 or earlier target
  • IntelliJ IDEA 2025.2.2+ or Android Studio Otter 2025.2.1+

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.