$ show poteto/noodle
Noodle is an open-source AI agent orchestration framework written in Go that manages autonomous coding agents through a kitchen-brigade model. It operates as a background daemon with a CLI (`noodle start`, `noodle status`, `noodle worktree`) and a real-time React/TypeScript web UI. The core loop reads backlog items (from markdown files via shell-script adapters), schedules multi-stage orders, dispatches agents (Claude Code, Codex) into isolated git worktrees, monitors their progress via NDJSON event logs, handles merge conflicts, and supports human-in-the-loop review gates. The system is config-driven via `.noodle.toml` and uses skills (directories with `SKILL.md` frontmatter) as the sole extension point for defining agent behavior and task types. Architecturally, Noodle is a monolith with clear internal packages: a state-machine loop (`loop/`), dispatchers for process and remote runtimes (`dispatcher/`), a parser pipeline for provider NDJSON output (`parse/`, `stamp/`), session monitoring (`monitor/`), event-sourced state management (`internal/reducer/`, `internal/state/`), a projection layer for incremental UI updates (`internal/projection/`), and a WebSocket server (`server/`). The UI is built with TanStack Router, React Query, and D3 for agent tree visualization. State is persisted as JSON/NDJSON files under `.noodle/`, with crash recovery via atomic snapshots and idempotent event ingestion. Key design patterns include: event sourcing with a deterministic reducer and effect ledger, directory-based fixture testing with source hash validation, a failure taxonomy with recoverability classification, mode gating for autonomy levels (auto/supervised/manual), and a plugin system via JSON-RPC for external runtimes. The codebase demonstrates strong engineering discipline with extensive test coverage (unit, integration, e2e with Playwright), CI/CD via GitHub Actions and GoReleaser, and a comprehensive brain vault for agent knowledge persistence.
The LLM identified 6 files worth highlighting for reuse:
Defines a canonical failure taxonomy with `FailureClass`, `FailureOwner`, `FailureScope`, and `FailureRecoverability` enums. Provides `Classify` and `Recoverability` functions to map errors to structured categories. This is a reusable pattern for any system that needs to distinguish between hard, recoverable, and degrade failures, with clear ownership attribution (scheduler_agent, cook_agent, backend). The taxonomy is used across the loop, dispatcher, and monitor packages to drive observability and recovery decisions.
Implements a deterministic state projection system that computes a hash of the current state bundle and produces a delta (set/delete operations) between versions. The `Projection` struct holds typed fields (orders, sessions, pending reviews, etc.) and `ComputeDelta` returns a list of changes. This pattern is reusable for any system that needs to broadcast incremental state updates to clients (e.g., WebSocket, SSE) without sending full snapshots. The hash-based change detection avoids unnecessary broadcasts.
Core event-sourced reducer that processes canonical events (dispatch_requested, stage_completed, merge_failed, etc.) to produce deterministic state transitions and a list of side-effect commands (Dispatch, Merge, Cleanup, Ack, WriteProjection). The reducer is pure (no I/O) and returns effects that the caller executes. Includes an effect ledger for tracking side-effect lifecycle (pendingβrunningβdone/failed) with retry support. This pattern is reusable for any system needing crash-consistent event processing with explicit effect management.
A directory-based test fixture framework used across 7+ packages. Each test case is a directory with `state-01/`, `state-02/` input directories and an `expected.md` file containing frontmatter (schema_version, source_hash) and assertion sections (string, error, count). The framework supports record/check modes, source hash validation, and fixture immutability checks. This is a reusable pattern for any Go project that needs structured, versioned, and self-validating integration test fixtures.
Implements a skill resolver with ordered search paths (project `.agents/skills/`, user config, built-in defaults). Provides `Resolve`, `List`, `DiscoverTaskTypes`, and `ResolveWithMeta` methods. Uses first-match-wins precedence and supports fallback to default skills. The resolver is decoupled from file I/O (accepts a `FS` interface) and is fully testable. This pattern is reusable for any system that needs to discover and load plugins or extensions from multiple locations with priority ordering.
Installs a git `post-checkout` hook that blocks dangerous operations from within agent worktrees: prevents `git worktree` commands, `cd .worktrees/` navigation, and write commands from the primary checkout. Uses environment variable detection (`NOODLE_WORKTREE`) and process tree inspection. This is a reusable pattern for any system that needs to enforce operational boundaries in isolated git worktrees, preventing agents from escaping their sandbox.