agentleFS
smogili1smogili1/circuit/CLAUDE.md

circuit

CLAUDE.md64 starsChanged 10 months agoApache-2.0View on GitHub

Drag-and-drop DAG editor for orchestrating Claude Code and OpenAI Codex agents. Execute multi-step workflows with real-time streaming, reference interpolation between nodes, and flexible control flow. IMPORTANT: Dev server is typically already running in hot reload mode. Code changes are automatically picked up without restarting. Backend (backend/src/) - Node.js + Express + Socket.io - index.ts - Server setup, REST API, WebSocket handlers - orchestrator/engine.ts - DAGExecutionEngine: topological execution with parallel branches - orchestrator/references.ts - {{NodeName.field}} interpolation - agents/claude.ts - Claude Agent…

  • Installs packages
  • In this repositoryOne other file it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a restart is truly necessary, use the background make commands:

    line 32
  2. Very specific:

    Check server logs with make logs to verify status

    line 37
  3. Very specific:

    Add case in DAGExecutionEngine.executeNode() (backend)

    line 113
  4. Very specific:

    Create component in components/Nodes/ (frontend)

    line 114
  5. Distinctive:

    Add to node type registry

    line 115
  6. Very specific:

    Add to ClaudeNodeConfig.tools array

    line 118

≈ “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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

About

Drag-and-drop DAG editor for orchestrating Claude Code and OpenAI Codex agents. Execute multi-step workflows with real-time streaming, reference interpolation between nodes, and flexible control flow.

Commands

# Development (unified server on port 3001)
npm install              # Install all dependencies
make dev-start           # Start server in background with hot reload (logs to .logs/)
make logs                # Tail server logs
make dev-stop            # Stop server

# Testing
npm test                 # All tests
cd backend && npm test   # Backend Jest tests
cd frontend && npm test  # Frontend Vitest tests

# Building
npm run build            # Build both packages

Development Server Guidelines

IMPORTANT: Dev server is typically already running in hot reload mode. Code changes are automatically picked up without restarting.

  • DO NOT manually restart the server - hot reload handles code changes automatically
  • If a restart is truly necessary, use the background make commands:
    make dev-stop    # Stop existing server first
    make dev-start   # Start server in background with hot reload
  • Check server logs with make logs to verify status
  • App available at http://localhost:3001

Architecture

Three-Layer Design

Backend (backend/src/) - Node.js + Express + Socket.io

  • index.ts - Server setup, REST API, WebSocket handlers
  • orchestrator/engine.ts - DAGExecutionEngine: topological execution with parallel branches
  • orchestrator/references.ts - {{NodeName.field}} interpolation
  • agents/claude.ts - Claude Agent SDK wrapper with streaming
  • agents/codex.ts - OpenAI Codex SDK wrapper
  • workflows/storage.ts - YAML-based persistence

Frontend (frontend/src/) - React + Vite + Tailwind

  • stores/workflowStore.ts - Zustand state with React Flow integration
  • hooks/useSocket.ts - WebSocket connection and event handling
  • components/Canvas/ - React Flow DAG editor
  • components/Nodes/ - Node type components (Claude, Codex, Input, Output, etc.)
  • components/Execution/ - Execution panel, timeline, logs

Communication

  • REST API for workflow CRUD (/api/workflows)
  • WebSocket for real-time execution events and workflow sync

DAG Execution Model

The engine executes nodes in topological order:

  1. Find nodes with all predecessors complete
  2. Execute ready nodes in parallel
  3. Store outputs in ExecutionContext
  4. Emit WebSocket events for each lifecycle stage

Node Types: input, claude-agent, codex-agent, condition, merge, output

Reference System

Nodes reference upstream outputs: {{NodeName.field}}

  • Nested paths: {{PlanAgent.output.details.step1}}
  • Special fields: .result, .transcript
  • Used in: userQuery, systemPrompt, condition patterns

Key Types

interface Workflow {
  id: string
  name: string
  workingDirectory?: string
  nodes: WorkflowNode[]
  edges: WorkflowEdge[]
}

interface ExecutionContext {
  executionId: string
  nodeOutputs: Map<nodeId, output>
  variables: Map<string, value>
}

type NodeStatus = 'pending' | 'running' | 'complete' | 'error' | 'skipped'

WebSocket Events

Client → Server:

  • save-workflow - Persist changes
  • control - {type: 'start-execution' | 'interrupt' | 'resume', ...}

Server → Client:

  • workflows - Workflow list updates
  • event - Execution events: execution-start, node-start, node-output, node-complete, execution-complete

Extending

New node type:

  1. Add case in DAGExecutionEngine.executeNode() (backend)
  2. Create component in components/Nodes/ (frontend)
  3. Add to node type registry

New agent tool:

  • Add to ClaudeNodeConfig.tools array
  • Agent SDK handles tool execution

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.