# poteto/noodle architecture

> Architecture diagram of the GitHub repository poteto/noodle, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/poteto/noodle
- Repository: https://github.com/poteto/noodle

## Overview

Noodle is a Go-based, skill-driven agent orchestration product with a browser dashboard. Its principal workflow is to prepare and schedule work, dispatch agent sessions, track their events and outcomes, and expose current state for monitoring and control. The graph includes the event/state-processing layers and the dashboard as a separate user-facing branch. Some source excerpts are partial, so uncertain connections—especially among unsampled runtime subsystems—are omitted.

Main entry points: [`loop/loop_cycle_pipeline.go`](https://github.com/poteto/noodle/blob/main/loop/loop_cycle_pipeline.go) (Cycle Planning), [`event/writer.go`](https://github.com/poteto/noodle/blob/main/event/writer.go) (Event Log), [`main.go`](https://github.com/poteto/noodle/blob/main/main.go) (CLI), [`loop/loop.go`](https://github.com/poteto/noodle/blob/main/loop/loop.go) (Scheduler Loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Orchestration"]
  node_cli["CLI<br/>[main.go]"]
  node_loop["Scheduler Loop<br/>[loop.go]"]
  node_cycle["Cycle Planning"]
  node_skills["Skill Resolver<br/>[resolver.go]"]
  node_adapters["Backlog Adapter<br/>[main.go]"]
  node_worktree["Worktree Manager<br/>[app.go]"]
end

subgraph group_agents["Agent Runtime"]
  node_dispatcher["Session Dispatcher"]
  node_parser["Output Parser<br/>[registry.go]"]
  node_monitor["Session Monitor<br/>[monitor.go]"]
end

subgraph group_state["Events and State"]
  node_events[("Event Log<br/>[writer.go]")]
  node_ingest["Event Ingestion<br/>[ingester.go]"]
  node_reducer["State Reducer<br/>[reducer.go]"]
  node_projection["State Projection<br/>[projection.go]"]
  node_snapshot["Snapshot Builder"]
end

subgraph group_dashboard["Dashboard"]
  node_server["HTTP and WS API<br/>[server.go]"]
  node_ui["Dashboard UI<br/>[dashboard.tsx]"]
  node_api_client["UI API Client<br/>[api.ts]"]
end

node_user(("User"))
node_provider(("Agent Provider"))

node_user -->|"runs commands"| node_cli
node_cli -->|"starts loop"| node_loop
node_loop -->|"plans cycle"| node_cycle
node_cycle -->|"resolves skills"| node_skills
node_cycle -.->|"syncs backlog"| node_adapters
node_cycle -->|"prepares worktree"| node_worktree
node_cycle -->|"spawns sessions"| node_dispatcher
node_dispatcher -->|"launches agent"| node_provider
node_provider -->|"emits output"| node_parser
node_monitor -->|"records activity"| node_events
node_parser -->|"writes events"| node_events
node_events -->|"supplies events"| node_ingest
node_ingest -->|"normalizes events"| node_reducer
node_reducer -->|"updates state"| node_projection
node_projection -->|"builds snapshot"| node_snapshot
node_server -->|"loads snapshot"| node_snapshot
node_user -->|"views dashboard"| node_ui
node_ui -->|"requests data"| node_api_client
node_api_client -->|"calls API"| node_server

click node_cli "https://github.com/poteto/noodle/blob/main/main.go"
click node_loop "https://github.com/poteto/noodle/blob/main/loop/loop.go"
click node_cycle "https://github.com/poteto/noodle/blob/main/loop/loop_cycle_pipeline.go"
click node_skills "https://github.com/poteto/noodle/blob/main/skill/resolver.go"
click node_adapters "https://github.com/poteto/noodle/blob/main/adapters/main.go"
click node_worktree "https://github.com/poteto/noodle/blob/main/worktree/app.go"
click node_parser "https://github.com/poteto/noodle/blob/main/parse/registry.go"
click node_monitor "https://github.com/poteto/noodle/blob/main/monitor/monitor.go"
click node_events "https://github.com/poteto/noodle/blob/main/event/writer.go"
click node_ingest "https://github.com/poteto/noodle/blob/main/internal/ingest/ingester.go"
click node_reducer "https://github.com/poteto/noodle/blob/main/internal/reducer/reducer.go"
click node_projection "https://github.com/poteto/noodle/blob/main/internal/projection/projection.go"
click node_snapshot "https://github.com/poteto/noodle/blob/main/internal/snapshot/snapshot_builder.go"
click node_server "https://github.com/poteto/noodle/blob/main/server/server.go"
click node_ui "https://github.com/poteto/noodle/blob/main/ui/src/routes/dashboard.tsx"
click node_api_client "https://github.com/poteto/noodle/blob/main/ui/src/client/api.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_loop,node_cycle,node_skills,node_adapters,node_worktree,node_user toneBlue
class node_dispatcher,node_parser,node_monitor toneAmber
class node_events,node_ingest,node_reducer,node_projection,node_snapshot toneMint
class node_server,node_ui,node_api_client toneRose
class node_provider toneIndigo
```

## Components

### Orchestration

- [CLI](https://github.com/poteto/noodle/blob/main/main.go): `main.go`
- [Scheduler Loop](https://github.com/poteto/noodle/blob/main/loop/loop.go): `loop/loop.go`
- [Cycle Planning](https://github.com/poteto/noodle/blob/main/loop/loop_cycle_pipeline.go): `loop/loop_cycle_pipeline.go`
- [Skill Resolver](https://github.com/poteto/noodle/blob/main/skill/resolver.go): `skill/resolver.go`
- [Backlog Adapter](https://github.com/poteto/noodle/blob/main/adapters/main.go): `adapters/main.go`
- [Worktree Manager](https://github.com/poteto/noodle/blob/main/worktree/app.go): `worktree/app.go`

### Agent Runtime

- **Session Dispatcher**
- [Output Parser](https://github.com/poteto/noodle/blob/main/parse/registry.go): `parse/registry.go`
- [Session Monitor](https://github.com/poteto/noodle/blob/main/monitor/monitor.go): `monitor/monitor.go`

### Events and State

- [Event Log](https://github.com/poteto/noodle/blob/main/event/writer.go): `event/writer.go`
- [Event Ingestion](https://github.com/poteto/noodle/blob/main/internal/ingest/ingester.go): `internal/ingest/ingester.go`
- [State Reducer](https://github.com/poteto/noodle/blob/main/internal/reducer/reducer.go): `internal/reducer/reducer.go`
- [State Projection](https://github.com/poteto/noodle/blob/main/internal/projection/projection.go): `internal/projection/projection.go`
- [Snapshot Builder](https://github.com/poteto/noodle/blob/main/internal/snapshot/snapshot_builder.go): `internal/snapshot/snapshot_builder.go`

### Dashboard

- [HTTP and WS API](https://github.com/poteto/noodle/blob/main/server/server.go): `server/server.go`
- [Dashboard UI](https://github.com/poteto/noodle/blob/main/ui/src/routes/dashboard.tsx): `ui/src/routes/dashboard.tsx`
- [UI API Client](https://github.com/poteto/noodle/blob/main/ui/src/client/api.ts): `ui/src/client/api.ts`

### Other components

- **User**
- **Agent Provider**

## Connections

- User → CLI: runs commands
- CLI → Scheduler Loop: starts loop
- Scheduler Loop → Cycle Planning: plans cycle
- Cycle Planning → Skill Resolver: resolves skills
- Cycle Planning → Backlog Adapter: syncs backlog
- Cycle Planning → Worktree Manager: prepares worktree
- Cycle Planning → Session Dispatcher: spawns sessions
- Session Dispatcher → Agent Provider: launches agent
- Agent Provider → Output Parser: emits output
- Session Monitor → Event Log: records activity
- Output Parser → Event Log: writes events
- Event Log → Event Ingestion: supplies events
- Event Ingestion → State Reducer: normalizes events
- State Reducer → State Projection: updates state
- State Projection → Snapshot Builder: builds snapshot
- HTTP and WS API → Snapshot Builder: loads snapshot
- User → Dashboard UI: views dashboard
- Dashboard UI → UI API Client: requests data
- UI API Client → HTTP and WS API: calls API
