Skip to content

tryemerge/code-factory

Repository files navigation

Emerge Factory

Multi-agent Claude Code orchestration platform with Kanban task management and real-time agent monitoring.

⚠️ Architecture Change: We switched from Electron to Tauri v2. See ADR_001 for details.

Overview

Emerge Factory is a Tauri v2 desktop app that manages multiple Claude Code agents working on coding tasks simultaneously. Features:

  • Kanban Board: Visual task management (Todo → In Progress → Review → Done)
  • Factory Floor: Real-time grid view of all running agents with live output
  • Direct Process Spawning: Reliable Claude Code agents via child processes (no tmux!)
  • Structured Communication: JSON-based agent output parsing for rich UI feedback

Architecture

┌─────────────────────────────────────────────────┐
│         Tauri Backend (Rust)                    │
│  ┌───────────────────────────────────────────┐  │
│  │          AgentManager                     │  │
│  │  - spawns Claude Code child processes    │  │
│  │  - parses streaming JSON output          │  │
│  │  - manages session IDs for follow-ups    │  │
│  └───────────────────────────────────────────┘  │
│                      ↕                          │
│  ┌───────────────────────────────────────────┐  │
│  │          TaskDatabase (SQLite)            │  │
│  │  - stores tasks, agent state, history    │  │
│  └───────────────────────────────────────────┘  │
└─────────────────────────────────────────────────┘
                       ↕ Tauri IPC
┌─────────────────────────────────────────────────┐
│            Frontend (React + TypeScript)        │
│  ┌──────────────┐      ┌────────────────────┐  │
│  │ Kanban Tab   │      │ Factory Floor Tab  │  │
│  │ - Task cards │      │ - Agent grid       │  │
│  │ - Drag/drop  │      │ - Live terminals   │  │
│  └──────────────┘      └────────────────────┘  │
└─────────────────────────────────────────────────┘

Monorepo Structure

This Turborepo contains:

Getting Started

Install dependencies:

npm install

Development

Run all apps in development mode:

npm run dev

Build

Build all apps:

npm run build

Apps

  • apps/tauri: Main Tauri v2 desktop application

    • Backend (Rust): AgentManager, TaskDatabase, Tauri commands
    • Frontend (React): Kanban Board and Factory Floor tabs
    • Technologies: Tauri, Rust, React, TypeScript, SQLite
  • apps/docs: VitePress documentation site

    • Architecture guides
    • API reference
    • Development tutorials
  • apps/mcp-server: MCP server for orchestrator agent

    • Provides task management tools to orchestrator Claude Code agent
    • Direct SQLite database access

Packages

  • packages/agent-logger: Shared logging utilities for multi-agent workflows

Each package/app is 100% TypeScript.

Key Features

Kanban Board Tab

  • Task Management: Create, edit, and organize coding tasks
  • Drag & Drop: Move tasks between Todo, In Progress, In Review, Done columns
  • Agent Assignment: Assign tasks to Claude Code agents with one click
  • Status Tracking: Real-time task status updates from running agents

Factory Floor Tab

  • Agent Grid: Visual overview of all running agents simultaneously
  • Live Output: Streaming terminal display of each agent's work
  • Structured Logs: Parsed JSON output shows tool calls, files changed, commands run
  • Agent Controls: Start, stop, pause agents; send follow-up prompts
  • Status Indicators: Visual status (spawning, running, idle, error, completed)

Why Direct Process Spawning?

Previous approach used tmux, which had reliability issues:

  • ❌ Terminal state parsing (detecting if agent is running or at bash prompt)
  • ❌ Control sequence timing races (C-c delays, pasted text buffers)
  • ❌ Fragile output parsing (terminal escape codes, ANSI colors)

New approach spawns Claude Code as child processes:

  • ✅ Structured JSON output (--output-format=stream-json)
  • ✅ Reliable process control (child.kill() works instantly)
  • ✅ Clean lifecycle events (spawn, exit, error)
  • ✅ Direct stdin/stdout/stderr streams

Inspiration

Architecture inspired by vibe-kanban, adapted for desktop with direct process spawning instead of HTTP/WebSocket backend.

Useful Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •