Reaktor DocsStart hereClaude

Start here · Claude

Implementation Plan

Execution plan for moving from prototype to production workbench and Compose/web target.

Use whenUse when converting roadmap intent into engineering tracks.
SourceClaude
Route/docs/reaktor-implementation-plan

Web prototype → Compose Multiplatform (Desktop + Web) — unified Blueprint Editor

1. Inventory — What Already Exists

Reaktor Modules (production-quality)

ModuleStatusRole in Blueprint Editor
reaktor-graph-port Complete Port, Edge, Visitor/Selector/Traverser foundation. Type-safe ConsumerPort<T> / ProviderPort<T> with events.
reaktor-graph Complete Graph runtime: 6 node types, lifecycle, autoWire, navigation, DI, service layer. The single source of truth for all editor data.
reaktor-flow Complete Compose graph canvas: ReaktorGraphEditor, blueprint layout, minimap, legend, toolbar, region overlays. Built on compose-flow.
compose-flow Complete Compose Multiplatform port of React Flow. Rendering, pan/zoom, handle connections, node dragging.
reaktor-ui Complete Compose UI primitives, ComposeNode, ComposeRenderer for live preview.
reaktor-io Complete Network + serialization. Will power Deploy screen CI API calls and telemetry fetches.
reaktor-db Complete SQLite runtime. Stores command history, workspace state, cached manifests.
reaktor-auth Complete Auth for cloud service connections (GitHub, Cloudflare, analytics providers).

Engine Module (bestbuds/modules/engine)

ComponentStatusDescription
ReaktorWorkbench Done Main shell: header, sidebar, resizable panels, Graph/App mode toggle. Foundation for the full shell.
ReaktorWorkbenchGraphPane Done Wraps ReaktorGraphEditor from reaktor-flow. Pan, zoom, node selection, edge rendering all working.
ReaktorWorkbenchTreePanel Done Recursive graph/node tree view with expand/collapse. Maps to the web prototype's LeftSidebar.
ReaktorWorkbenchInspectorPanel Done Node detail inspector: ID, type, ports as chips, route attachments, navigation targets. Partial coverage of the web's 13 type-aware inspectors.
ReaktorWorkbenchPreviewPanel Done Live Compose preview of selected node's Content(). Foundation for the Run screen.
ReaktorComposeSemanticsInspector Done 2300+ line Compose runtime semantics inspector. Reads CompositionData for click-to-inspect. This is UNIQUE — no equivalent in the web prototype.
ReaktorGraphDocument Done JSON export of graph for LLM consumption. Foundation for the agent/command pattern integration.

What the web prototype has that the engine does NOT

Web FeatureEngine StatusGap
5-mode toolbar (Graph, Run, DevTools, Deploy, Insights)2 modes (Graph, App)Build 3 screens
Bottom drawer (Traces, Logs, Agent, Diagnostics, Commands, Queue, CodeDiff)NoneBuild drawer system
Command palette (Cmd+K)NoneBuild search/command UI
13 type-aware inspectors with sparklines1 generic inspectorExtend inspector
Deploy topology (CloudFormation-style)NoneBuild deploy screen
Insights dashboard (timelines, heatmaps)NoneBuild insights screen
Drilldown causal trace (waterfall)NoneBuild devtools screen
Status strip (bottom bar)NoneBuild status bar
WYSIWYG device preview with frameLive Compose preview (no frame)Add device frame
Command queue + CodeDiff viewerGraph document JSON exportBuild command pattern
Edge type overlay filtersLegend with kind filter chipsMostly done in reaktor-flow
Cross-mode navigation (entity → any screen)Single-mode selectionBuild navigation model

2. Target Architecture

Module Dependency Chain

reaktor-graph-port reaktor-graph reaktor-flow reaktor-workbench engine / reaktorDesktop / reaktorWeb

New Module: reaktor-workbench

A commonMain Compose Multiplatform module that contains all the shared Blueprint Editor UI. Both the Desktop target (reaktorDesktop) and the Web target (reaktorWeb-compose) depend on this single module. No screen logic lives in target-specific code.

Directory Structure

reaktor-workbench/
  src/commonMain/kotlin/dev/shibasis/reaktor/workbench/
    shell/
      WorkbenchShell.kt          // Main shell: top bar, mode toolbar, panels, drawer, status
      WorkbenchMode.kt           // enum: Graph, Run, DevTools, Deploy, Insights
      WorkbenchState.kt          // ViewModel: selected entity, mode, drawer state, panel sizes
      TopBar.kt                  // Project name, branch, env indicator, search trigger
      ModeToolbar.kt             // 5-mode tab bar with keyboard shortcuts
      StatusStrip.kt             // Bottom status bar: mode label, entity count, build status
    sidebar/
      LeftSidebar.kt             // Extend existing TreePanel: mode-aware content, search
      SidebarSearch.kt           // Filter entities by name/type/module/tag
    inspector/
      InspectorPanel.kt          // Extend existing InspectorPanel with type dispatch
      InspectorState.kt          // Scroll-linked section tabs, section visibility tracking
      bodies/
        RouteInspector.kt        // Route: status, screens, trace sparkline
        ScreenInspector.kt       // Screen: render preview, crash rate, session count
        ContainerInspector.kt    // Container: child graph list, nav targets
        UiInspector.kt           // UI element: props, click chain, design overlay
        ActionInspector.kt       // Action/Interactor: signature, downstream chain
        ServiceInspector.kt      // Service: endpoints, p95, error rate
        EdgeInspector.kt         // Edge: latency histogram, deploy target, cert status
        DbInspector.kt           // DB: schema, row count, query performance
        ReleaseInspector.kt      // Release: CI pipeline, artifacts, promote CTA
    drawer/
      DrawerPanel.kt             // Bottom drawer with resize handle and tab bar
      DrawerTab.kt               // enum: Traces, Logs, Agent, Diagnostics, Commands, Queue, CodeDiff
      TraceViewer.kt             // Recent traces with timing, status, provider
      LogViewer.kt               // Filterable log stream
      AgentChat.kt               // LLM agent chat interface (Claude Code model)
      DiagnosticsPanel.kt        // Graph health, port wiring status
      CommandQueue.kt            // Pending GraphCommand list with preview
      CodeDiffViewer.kt          // Side-by-side diff preview for generated code
    screens/
      graph/
        GraphScreen.kt           // Wraps ReaktorGraphEditor + edge filter controls
        GraphModeControls.kt     // Overlay toggles, edge type filters
      run/
        RunScreen.kt             // WYSIWYG preview with device frame
        DeviceFrame.kt           // Phone/tablet/desktop frame with notch, status bar
        ComponentTree.kt         // Compose semantics tree (bidirectional selection)
        RunModeControls.kt       // Device type, theme, network mode pills
      devtools/
        DevToolsScreen.kt        // Causal trace drilldown
        TraceRail.kt             // Vertical waterfall with duration bars
        BlastRadiusPanel.kt      // Computed blast radius from graph edges
        TestImpactPanel.kt       // Test coverage for selected entity
      deploy/
        DeployScreen.kt          // Topology view + CI pipeline
        DeployTopology.kt        // Visual partition map (edge, db, kv, queue, bucket)
        CIPipeline.kt            // CI steps with status indicators
        DeployModeControls.kt    // Local/Staging/Production env switcher
      insights/
        InsightsScreen.kt        // Analytics dashboard
        InsightsTimeline.kt      // Time series chart with deploy markers
        InsightsHeatmap.kt       // Route x Metric heatmap grid
        InsightsModeControls.kt  // Time range (1h/24h/7d/30d), route filter
    search/
      CommandPalette.kt          // Cmd+K modal: entity search, command search
      SearchResult.kt            // Result item: type badge, title, source, module
    commands/
      GraphCommand.kt            // Sealed hierarchy: AddNode, ConnectPorts, SetProperty, etc.
      CommandExecutor.kt         // Apply command to graph, record in history
      CommandHistory.kt          // Undo/redo stack, persistence to SQLite
    agent/
      AgentInterface.kt          // Agent chat protocol, tool invocations
      GraphTool.kt               // Tools: read_graph, select_entity, navigate_to, etc.
      CodeGenBridge.kt           // Bridge: command batch → LLM → CodeDiff
    theme/
      WorkbenchTheme.kt          // Dark/light theme tokens matching prototype palette
      WorkbenchTypography.kt     // Font scales, mono font for code sections
  src/jvmMain/
    PlatformBridge.kt            // Desktop: file system, process launch (IntelliJ/VSCode)
  src/jsMain/
    PlatformBridge.kt            // Web: clipboard, URL routing, service worker

Data Flow

GraphManifest
Compile-time JSON
reaktor-graph
Live Graph runtime
reaktor-flow
Visual layout + canvas
Workbench Shell
5 screens + inspector
User interaction
Click, edit, drag
GraphCommand
Typed command object
CommandQueue
Preview + batch
LLM Agent
Generate CodeDiff
IDE
Apply to project
P0
Foundation — reaktor-flow Stabilization
Prerequisite: ensure the graph canvas is production-ready

The existing reaktor-flow analysis identifies fixes needed. We assume these will be completed before Phase 1. Key items:

  • compose-flow edge rendering — ensure bezier edges respect handle positions and edge types render with distinct colors/dash patterns
  • Node drag position persistencemergeGraphNodes() already preserves drag positions across model rebuilds; verify this works reliably
  • Selection eventsonNodeClick / onEdgeClick callbacks must propagate to the workbench shell for inspector wiring
  • Kind filter chipsGraphKindLegend already implements clickable filter chips; verify they filter nodes in the canvas
  • Zoom controlsGraphViewportToolbar has fit/100%/zoom buttons; verify they call the correct viewport APIs

Deliverable: All 10 GraphFlowIntegrationTest tests pass, and manual verification in the Desktop app shows interactive graph editing.

P1
Workbench Shell & Navigation
The outermost frame that hosts all 5 screens

1.1 WorkbenchState ViewModel

Central state holder replacing the web prototype's ScenarioContext. Lives in commonMain, consumed by all screens.

class WorkbenchState {
    val mode: MutableStateFlow<WorkbenchMode>           // Graph, Run, DevTools, Deploy, Insights
    val selectedEntityId: MutableStateFlow<String?>     // Currently inspected entity
    val drawerOpen: MutableStateFlow<Boolean>
    val drawerTab: MutableStateFlow<DrawerTab>
    val searchOpen: MutableStateFlow<Boolean>
    val leftCollapsed: MutableStateFlow<Boolean>
    val rightCollapsed: MutableStateFlow<Boolean>
    val leftWidth: MutableStateFlow<Float>              // dp
    val rightWidth: MutableStateFlow<Float>             // dp
    val drawerHeight: MutableStateFlow<Float>           // dp
    val deployEnv: MutableStateFlow<DeployEnv>          // Local, Staging, Production
    val deviceMode: MutableStateFlow<DeviceMode>        // Phone, Tablet, Desktop
    val themeMode: MutableStateFlow<ThemeMode>          // Light, Dark
    val commandQueue: MutableStateFlow<List<GraphCommand>>

    fun navigateTo(mode: WorkbenchMode, entityId: String?)  // Cross-mode navigation
    fun openDrawerTab(tab: DrawerTab)                        // Open drawer to specific tab
    fun pushCommand(cmd: GraphCommand)                       // Enqueue a graph command
}

1.2 WorkbenchShell Composable

Port of AppShell from app.jsx. Uses Compose BoxWithConstraints for responsive layout.

  • Top bar: Project name, branch indicator, env badge, Cmd+K trigger
  • Mode toolbar: 5 icon+label tabs, Cmd+1–5 shortcuts
  • Three-column layout: Left sidebar + center screen + right inspector, with draggable resize handles
  • Bottom drawer: Collapsible panel with 7 tabs, draggable height
  • Status strip: Mode label, entity count, build status, clock
  • Responsive collapse: Auto-collapse panels when window is narrow (< 1200dp right, < 900dp both)

1.3 Cross-Mode Navigation

The web prototype's navigateTo(sc, mode, entityId) becomes WorkbenchState.navigateTo(). Every "Open in Graph" / "Follow action chain" / "View in Deploy" button calls this. The selected entity is preserved across mode switches.

1.4 Keyboard Shortcuts

ShortcutActionWeb equivalent
Cmd+KToggle command paletteSame
Cmd+1..5Switch modeSame
EscapeClose palette / deselectSame
\Toggle drawerSame
Arrow Up/DownWalk active pathSame
Cmd+Shift+OOpen in IDENew

1.5 Porting from Existing Engine Code

The current ReaktorWorkbench already has:

  • Header with mode toggle (Graph/App) → extend to 5 modes
  • Resizable panels with sidebar → reuse panel infrastructure
  • App switcher → keep for multi-project support

Migration: refactor ReaktorWorkbench to accept a WorkbenchState and delegate screen rendering to the mode-specific composable.

P2
Graph Screen (Blueprint Editor)
The primary editing surface — already 80% done via reaktor-flow

Existing in reaktor-flow

  • Done Canvas with pan/zoomReaktorGraphEditor wraps compose-flow with keyboard zoom shortcuts
  • Done Blueprint layoutBlueprintReaktorGraphLayoutStrategy with semantic lanes, multi-column, regions
  • Done Node cardsReaktorGraphNodeCard with title bar, port columns, badge
  • Done Edge rendering — via compose-flow with kind-based color/width
  • Done MinimapGraphMiniMap with click-to-pan and viewport rect
  • Done LegendGraphKindLegend with clickable filter chips
  • Done Zoom toolbarGraphViewportToolbar with fit/100%/zoom controls
  • Done Region overlaysGraphRegionsOverlay with dashed borders and labels

To add

  • New Overlay toggle dropdown — The prototype has an "Overlays" button that shows/hides edge types (route, parent, consumes, invokes, writes, emits, deploys). Wire this to the existing GraphKindLegend filter or add an explicit overlay popover.
  • New Node hover tooltip — On hover, show a floating card with type badge, title, source file, p95/error rate. Only show if not already selected (don't overlap with inspector).
  • New Container node rendering — Container nodes should have dashed borders and transparent backgrounds. The reaktorNodeKind() classifier already identifies containers; extend ReaktorGraphNodeCard to render them distinctly.
  • New Port-anchored edge endpoints — Edges currently connect center-to-center. Route edges from handleOffset() in ReaktorFlowMeasurement. Connect same-row edges horizontally, parent edges right→left.
  • New Selection → WorkbenchState sync — When a node is clicked in the graph, set workbenchState.selectedEntityId. The inspector panel reacts to this change.

Effort estimate

~20% new code on top of existing reaktor-flow. Most work is wiring, not building.

P3
Run Screen (WYSIWYG Preview)
Live app preview with device framing and click-to-inspect

Existing in Engine

  • Done Live Compose previewScreenPreviewPanel renders selected node's Content() composable with parameterized route guard
  • Done Compose semantics inspectorReaktorComposeSemanticsInspector reads CompositionData for component tree, click-to-inspect (Desktop only)

To build

DeviceFrame composable

Wraps the live preview in a phone/tablet/desktop chrome frame. Purely visual — uses Compose Canvas for the notch, status bar, rounded corners. Dimensions from WorkbenchState.deviceMode:

  • Phone: 312 x 624 dp, radius 36, notch
  • Tablet: 500 x 700 dp, radius 24
  • Desktop: 680 x 440 dp, radius 10

RunModeControls

Pill bar at top of center area: device type toggle, theme toggle (light/dark invert), network mode (online/slow/offline overlay badge).

Bidirectional Component Tree ↔ Entity Selection

When a composable is clicked in the preview, the semantics inspector identifies it → map to a graph entity via source location → update selectedEntityId. Conversely, selecting a UI entity in the graph highlights the corresponding composable in the preview.

Desktop: Full semantics inspector with CompositionData access.

Web: Compose/JS doesn't expose LocalInspectionTables. Use a Modifier.semantics-based approach: tag each composable with its graph entity ID, then use PointerInputScope hit testing.

Floating Graph Link Card

When a UI element is selected in the preview, show a floating card (like the prototype's FloatingGraphLink) with: type pill, entity name, source file, action chain strip, latest trace, and "Open in Graph" / "Follow action chain" / "Open in IDE" buttons.

Platform difference

FeatureDesktop (JVM)Web (JS)
Live previewFull Compose rendering via Content()Full Compose rendering via Compose/JS canvas
Click-to-inspectCompositionData + LocalInspectionTablesModifier.semantics tag-based hit test
Network simulationInterceptor on reaktor-io OkHttp clientInterceptor on fetch/XHR
P4
DevTools Screen (Causal Trace)
Chrome DevTools-style waterfall for tracing request flow through the graph

Data source

Every port invocation emits a PortInvocationEvent (from reaktor-graph-port). The DevTools screen collects these into a trace timeline. For the MVP, use mock trace data (like the web prototype's DRILLDOWN_SPANS). The real integration will wire PortInvocationEvent listeners.

Components

TraceRail

Vertical waterfall with one card per span. Each card shows:

  • Colored left border by entity type
  • Type pill + entity name + source file
  • Duration bar (proportional to total trace time)
  • Timing text (offset from trace start)
  • Click → select entity → update inspector
  • Hover action buttons: "Open in Graph", "Open in IDE"

BlastRadiusPanel

Starting from selected entity, walk N hops through edges, count unique entities and modules. Show a summary card ("14 entities across 6 modules") with expandable list. Computed from the real graph via Traverser.

TestImpactPanel

Find all commands/entities that depend on the selected entity. Cross-reference with test fixtures. Show "12 tests (Maestro 4, Unit 8)" with clickable test names.

Connection to graph runtime

The Visitor pattern in reaktor-graph-port provides exactly the traversal needed. Use ConnectivitySelector with BreadthFirstTraverser to compute blast radius. The causal trace is a specialized visitor that collects PortInvocationEvents in order.

P5
Deploy Screen (Topology + CI)
Visualize deployment targets and CI pipeline status

Components

DeployTopology

Visual partition map showing all deployment targets extracted from the graph. The prototype's DEPLOY_PARTITIONS (edge, db, kv, queue, bucket) are derived from node types and deploys edge relationships.

Data source: Walk graph edges with type deploys. Group by target platform (Cloudflare Workers, D1, R2, KV, Queue). Each partition shows resource name, status indicator, endpoint URL.

Click interaction: Clicking a partition item sets selectedEntityId to the corresponding edge/db entity → inspector shows deployment-specific details.

CIPipeline

CI step visualization with status indicators (passed/running/queued/failed). Steps derived from a BuildManifest or fetched from CI API (GitHub Actions, Cloudflare Pages).

Environment switching: Local (all green) / Staging (mixed) / Production (gated promote). WorkbenchState.deployEnv controls which pipeline view is shown.

DeployModeControls

Three pill buttons: Local, Staging, Production. Plus a "Deploy" primary action button that changes label per environment.

Real integration path

MVP: Static topology from GraphManifest. Phase 2: Wire reaktor-io to poll GitHub Actions API and Cloudflare API for live status. Phase 3: Trigger deploys from the workbench.

P6
Insights Screen (Analytics + Telemetry)
App analytics, performance metrics, and telemetry dashboard

Components

InsightsTimeline

Time-series chart with deploy markers (vertical dashed lines). Shows request volume, error rate, or custom metric. Time range controlled by WorkbenchState.insightsRange (1h/24h/7d/30d). Rendered using Compose Canvas with polyline + filled area.

InsightsHeatmap

Route × Metric grid. Rows = routes from graph, columns = metrics (p50, p95, p99, error rate, volume). Cell color = green→yellow→red gradient. Click cell → select route entity + open inspector with performance section.

Data source: Routes from graph navigation edges. Metrics from telemetry API or mock data.

Metric Cards

Top-level summary cards: Active Users, Avg Response Time, Error Rate, Deployment Frequency. Each with sparkline and trend indicator.

Platform data sources

ProviderDataIntegration
Cloudflare AnalyticsRequest volume, error rate, latencyreaktor-io REST API
SupabaseDatabase query metricsreaktor-io REST API
Custom telemetryApp-specific events via PortInvocationEventGraph runtime events
P7
Inspector System
13 type-aware inspectors, mode-sensitive sections, sparklines

Type dispatch

The existing NodeDetailPanel in the engine module is a generic inspector. Replace it with a type-dispatching system:

@Composable
fun TypeAwareInspector(state: WorkbenchState, graph: Graph) {
    val entityId = state.selectedEntityId.collectAsState().value ?: return
    val entity = graph.findEntity(entityId) ?: return

    when (entity) {
        is RouteNode   -> RouteInspector(entity, state)
        is ComposeNode -> when {
            entity.isScreen() -> ScreenInspector(entity, state)
            entity.isUi()     -> UiInspector(entity, state)
        }
        is ContainerNode    -> ContainerInspector(entity, state)
        is ControllerNode   -> ActionInspector(entity, state) // actions + interactors
        is ServiceNode      -> ServiceInspector(entity, state)
        is BasicNode        -> BasicInspector(entity, state)
        // Edge types dispatched separately
    }
}

Inspector body structure (each type)

Every inspector follows the same pattern from the web prototype:

  1. Header: Type pill + entity name + source file link
  2. Section tabs: Scrollable tab bar that tracks which section is in view (IntersectionObserver equivalent via LaunchedEffect + scroll state)
  3. Sections: Overview → Metrics (sparklines) → Connections (port list) → Source → Actions
  4. Footer actions: "Open in Graph" / "Open in IDE" / "Follow action chain" buttons

Mode-sensitive sections

The inspector adds extra sections based on the current mode:

  • Insights mode: Performance section with flamegraph placeholder, correlation with deploy markers
  • Deploy mode: Deployment target section with status, endpoint, cert info
  • DevTools mode: Recent traces section with timing details

Sparkline composable

Reusable Sparkline composable using Compose Canvas. Replaces the web prototype's SVG sparklines. Auto-sizes to container width (no hardcoded pixel widths).

P8
Command Palette & Agent Interface
Cmd+K search + Claude Code-style agent chat

Command Palette (Cmd+K)

Modal overlay with:

  • Text input with autofocus, fuzzy matching
  • Entity search — filter by title, type, module, source, tag. Results grouped by type with color badges.
  • Command search — search graph commands by operation/target
  • Navigation — Arrow keys to move selection, Enter to navigate, Escape to close
  • Action shortcuts — ">" prefix for commands ("> deploy staging", "> add node", "> run tests")

Data source: All entities from Graph, all commands from CommandHistory. Fuzzy match using Levenshtein or prefix matching.

Agent Chat Interface

The drawer's "Agent" tab hosts a Claude Code-style chat interface. The agent has access to the full graph via ReaktorGraphDocument and can:

  • Read the graph: read_graph() returns the JSON document of all entities, edges, ports
  • Select entities: select_entity(id) navigates to an entity
  • Navigate modes: navigate_to(mode, entityId) switches screen + selection
  • Create commands: push_command(cmd) adds to the command queue
  • Generate code: generate_code(commands[]) sends batch to LLM for CodeDiff
  • Open in IDE: open_in_ide(filePath, line) launches IntelliJ/VS Code
  • Query telemetry: query_metrics(entityId, timeRange) fetches performance data

This mirrors the web prototype's "Ask Code Agent" button but with real tool invocations against the graph runtime.

P9
Command Pattern & LLM Integration
The core differentiator — typed graph commands → LLM code generation

GraphCommand Hierarchy

sealed interface GraphCommand {
    val id: String
    val timestamp: Instant
    val description: String

    data class AddNode(val type: NodeType, val name: String, val parent: String?) : GraphCommand
    data class RemoveNode(val nodeId: String) : GraphCommand
    data class ConnectPorts(val consumer: PortRef, val provider: PortRef) : GraphCommand
    data class DisconnectPorts(val consumer: PortRef, val provider: PortRef) : GraphCommand
    data class SetProperty(val entityId: String, val key: String, val value: JsonElement) : GraphCommand
    data class CreateSubgraph(val name: String, val nodes: List<String>) : GraphCommand
    data class MoveToContainer(val nodeId: String, val containerId: String) : GraphCommand
    data class SetRoute(val routeId: String, val pattern: String) : GraphCommand
    data class SetTransport(val edgeId: String, val transport: TransportMode) : GraphCommand
    data class SetDeployTarget(val nodeId: String, val target: DeployTarget) : GraphCommand
}

Command Lifecycle

User Action
Click, drag, edit in UI
GraphCommand
Typed, serializable
Preview
Show in Queue tab
Batch
Group related cmds
LLM
Generate CodeDiff
Review
CodeDiff tab
Apply
Write to project

LLM Integration

Context Assembly

When the user triggers "Apply" on a command batch:

  1. Serialize the command batch as JSON
  2. Include ReaktorGraphDocument (full graph context)
  3. Include relevant source files (from entity source metadata)
  4. Send to Claude API with system prompt describing Reaktor's conventions
  5. Receive CodeDiff (unified diff format per file)
  6. Show in CodeDiff viewer tab for user review
  7. On approval, write diffs to project via file system (Desktop) or send to IDE plugin (Web)

IDE Bridge

Desktop: Use ProcessBuilder to invoke idea / code CLI for "Open in IDE". Write files directly to project directory.

Web: Communicate with IDE via:

  • VS Code: vscode:// URI scheme for file open
  • IntelliJ: jetbrains:// URI scheme for file open
  • Plugin: HTTP localhost server in IDE plugin for bidirectional communication

Persistence

Commands are persisted to reaktor-db SQLite. Table: graph_commands(id, type, payload_json, timestamp, applied, batch_id). Enables undo/redo and command history across sessions.

P10
Web Target (Compose Multiplatform JS)
Deploy the same workbench to the web via Compose/JS

Strategy

Compose Multiplatform supports Kotlin/JS with canvas rendering. The reaktor-workbench module is commonMain, so it compiles to both JVM and JS without changes. The web target adds:

reaktorWeb-compose target

  • Entry point: fun main() = CanvasBasedWindow { WorkbenchShell(state) }
  • Hosting: Cloudflare Workers (same as current prototype) or CDN static
  • Service Worker: Offline support, caching of graph manifest and static assets
  • URL routing: window.location.hash maps to WorkbenchMode + selected entity
  • IDE bridge: vscode:// and jetbrains:// URI schemes for "Open in IDE"

Platform-specific code (jsMain)

FeatureDesktop (jvmMain)Web (jsMain)
File systemjava.io.FileNot available (IDE plugin bridge)
Process launchProcessBuilder("idea", ...)window.open("jetbrains://...")
ClipboardToolkit.getDefaultToolkit().systemClipboardnavigator.clipboard
Compose inspectionCompositionData + LocalInspectionTablesModifier.semantics tag approach
Network interceptionOkHttp interceptorFetch wrapper
SQLiteNative SQLite via reaktor-dbIndexedDB or sql.js WASM
LLM APIDirect HTTPS to Claude APIProxy via Cloudflare Worker (CORS)

Transition from current web prototype

The current React/Vite prototype at reaktor.build will be replaced by the Compose/JS build once it reaches feature parity. During transition, both can coexist at different subdomains (e.g., reaktor.build = Compose, legacy.reaktor.build = React).

14. Feature Mapping — Prototype → Compose

Every file in the web prototype maps to a specific composable in reaktor-workbench:

Web Prototype FileLinesCompose TargetStatus
scenario.jsx~300WorkbenchState.ktNew
lib.jsx~200WorkbenchTheme.kt + WorkbenchTypography.ktNew
app.jsx~135WorkbenchShell.ktExtend ReaktorWorkbench
shell.jsx~600TopBar.kt + ModeToolbar.kt + LeftSidebar.kt + mode controlsExtend TreePanel
screen-graph.jsx~350GraphScreen.kt wrapping ReaktorGraphEditor80% done
screen-run.jsx~245RunScreen.kt + DeviceFrame.ktExtend PreviewPanel
screen-drilldown.jsx~300DevToolsScreen.kt + TraceRail.ktNew
screen-deploy.jsx~250DeployScreen.kt + DeployTopology.kt + CIPipeline.ktNew
screen-insights.jsx~280InsightsScreen.kt + InsightsTimeline.kt + InsightsHeatmap.ktNew
inspector-common.jsx~200InspectorPanel.kt + InspectorState.ktExtend NodeDetailPanel
inspector-bodies.jsx~900bodies/*.kt (9 files)New
bottom.jsx~350drawer/*.kt (7 files)New
data.jsx~500Not needed — real graph runtime provides all dataN/A
styles.css~1400WorkbenchTheme.kt (Compose theme tokens)New

15. Implementation Schedule

Dependency Graph

P0 (reaktor-flow fixes)
 ↓
P1 (Shell + Navigation) ──────────────────────┐
 ↓                                           ↓
P2 (Graph Screen) ── P3 (Run Screen)    P7 (Inspector System)
 ↓                    ↓                    ↓
P4 (DevTools)        P8 (Cmd Palette)   P9 (Command Pattern + LLM)
 ↓                    ↓
P5 (Deploy)          P6 (Insights)
 ↓
P10 (Web Target)

Estimated Effort

PhaseDescriptionNew CodeReuseEffortPriority
P0reaktor-flow stabilization~200 linesHigh3 daysBlocker
P1Shell + Navigation~800 linesHigh (ReaktorWorkbench)5 daysCritical
P2Graph Screen~300 linesVery High (reaktor-flow)3 daysCritical
P7Inspector System~1200 linesMedium (NodeDetailPanel)5 daysCritical
P3Run Screen~600 linesHigh (PreviewPanel + SemanticsInspector)4 daysHigh
P8Command Palette~400 linesLow3 daysHigh
P4DevTools Screen~500 linesMedium (Visitor/Traverser)4 daysMedium
P5Deploy Screen~500 linesLow4 daysMedium
P6Insights Screen~500 linesLow4 daysMedium
P9Command Pattern + LLM~800 linesMedium (GraphDocument)6 daysHigh
P10Web Target~300 lines (platform)Very High (all commonMain)5 daysMedium

Timeline

Completed
reaktor-graph-port, reaktor-graph, reaktor-flow, compose-flow, engine workbench, semantics inspector
Week 1-2
P0 reaktor-flow stabilization + P1 Shell & Navigation + P2 Graph Screen wiring
Week 2-3
P7 Inspector System (13 type-aware inspectors) + P3 Run Screen with device frame
Week 3-4
P8 Command Palette + P4 DevTools Screen (causal trace)
Week 4-5
P5 Deploy Screen + P6 Insights Screen
Week 5-7
P9 Command Pattern + LLM Integration (the core differentiator)
Week 7-8
P10 Web Target — compile to JS, deploy to Cloudflare Workers

Key Risk: Compose/JS Maturity

Risk: Compose Multiplatform for Web (Kotlin/JS + canvas) is less mature than Desktop. Some composables may need platform-specific adjustments.

Mitigation: Build everything in commonMain. Keep expect/actual declarations minimal (file I/O, process launch, clipboard). Test on Web early in P1 to surface issues before heavy development.

Fallback: If Compose/JS canvas performance is insufficient for the full workbench, the current React prototype can serve as the web target while the Desktop app uses Compose. The agent/command/graph model remains shared via reaktor-graph → JSON → web frontend.

Key Advantage: Real Data

The biggest upgrade from the web prototype is that every data point is live. The prototype uses 38 hardcoded entities and 39 hardcoded edges. The Compose workbench reads the real Graph runtime:

  • Entities & edges from live Graph instance (not mock data)
  • Port invocation events from running app (not hardcoded traces)
  • Lifecycle state from real node lifecycle (not fake status badges)
  • Navigation from actual backstack (not display-only arrows)
  • autoWire results from real DI resolution (not hardcoded connections)

The web prototype was a specification. The Compose workbench is the real thing.

Reaktor Desktop Porting Plan — Generated 2026-05-16 — Source: reaktor-graph, reaktor-flow, engine module scan + web prototype analysis