# alice-viola/angy architecture

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

- Interactive diagram: https://gitdiagram.com/alice-viola/angy
- Repository: https://github.com/alice-viola/angy

## Overview

#### Purpose and Entry Points
Angy is a local-first desktop command center for autonomous AI coding-agent fleets. Users create epics; the app schedules, executes, verifies, and presents multi-agent work in isolated Git branches. Frontend bootstraps at `src/main.ts` and `src/App.vue`; the native Tauri process starts through `src-tauri/src/main.rs` and `src-tauri/src/lib.rs`.

#### Desktop Boundary and Runtime
The application is a Vue 3/TypeScript frontend packaged by Tauri 2 with a Rust native host. Tauri capabilities and platform integration—including PTY support—are implemented in `src-tauri/capabilities/default.json`, `src-tauri/src/platform.rs`, and `src-tauri/src/pty.rs`. The frontend invokes native facilities for filesystem, process, Git, terminal, and SQLite-backed operations; it is not a conventional web deployment.

#### UI, State, and User Workflows
Vue feature views expose the operating model: epic Kanban management, agent chat/fleet, execution graphs, code editing, terminals, Git, and analytics. Primary surfaces are `src/components/kanban/KanbanView.vue`, `src/components/agents/AgentsView.vue`, and `src/components/graph/MissionControlView.vue`. Pinia stores provide shared client state for projects, epics, sessions, fleet, Git, graph, and UI state, centered in `src/stores/epics.ts`, `src/stores/sessions.ts`, and `src/stores/projects.ts`.

#### Scheduling and Epic Lifecycle
The scheduler continuously selects eligible Todo epics according to priority, dependencies, concurrency/cost constraints, recovery state, and per-repository locks. It dispatches execution and moves epics through pipeline/review lifecycle states. This control plane is concentrated in `src/engine/Scheduler.ts`, `src/engine/PipelineEngine.ts`, and `src/engine/PipelineStateStore.ts`. Persistent domain access is abstracted through `src/engine/Database.ts` and `src/engine/repositories.ts`, backed by local SQLite.

#### Deterministic Multi-Agent Pipeline
`HybridPipelineRunner` is the central TypeScript state machine: it directs planning and adversarial plan review, splits approved plans into sequential increments, gates each builder increment on tester verification, then performs integration review and final testing/fix loops. Relevant orchestration paths are `src/engine/HybridPipelineRunner.ts`, `src/engine/OrchestratorPool.ts`, and `src/engine/SpecialistConstants.ts`. Agents are managed as sessions/processes, with streaming and buffering boundaries in `src/engine/SessionService.ts`, `src/engine/SessionMessageBuffer.ts`, and `src/engine/StreamParser.ts`.

#### Agent Providers and Execution
Angy supports direct Anthropic and Gemini APIs through the embedded `@angycode/core` workspace package, plus Claude Code CLI processes. The reusable agentic loop owns provider streaming, tool calls, session persistence, and usage/cost tracking: `code/packages/core/src/agent/AgentLoop.ts`, `code/packages/core/src/providers/index.ts`, and `code/packages/core/src/tools/registry.ts`. Claude CLI lifecycle/health handling is app-side in `src/engine/ClaudeProcess.ts`, `src/engine/ClaudeHealthMonitor.ts`, and `src/engine/ProcessManager.ts`. External dependencies are Anthropic, Google GenAI, optional `claude` executable, and user-provided API keys.

#### Repository Isolation and Human Gate
Each epic operates in an `epic/{id}` Git branch per target repository; branch creation, changes, merge operations, and diffs are separated from agent reasoning. Core boundaries are `src/engine/BranchManager.ts`, `src/engine/GitManager.ts`, and `src/engine/DiffEngine.ts`. Completed work reaches a human review gate in the Kanban UI before squash merge or rejection/requeue, preventing autonomous pipelines from directly finalizing product changes.

Main entry points: [`src/App.vue`](https://github.com/alice-viola/angy/blob/master/src/App.vue) (App shell), [`src/components/kanban/KanbanView.vue`](https://github.com/alice-viola/angy/blob/master/src/components/kanban/KanbanView.vue) (Human review gate), [`src/engine/PipelineEngine.ts`](https://github.com/alice-viola/angy/blob/master/src/engine/PipelineEngine.ts) (Pipeline lifecycle), [`src/engine/HybridPipelineRunner.ts`](https://github.com/alice-viola/angy/blob/master/src/engine/HybridPipelineRunner.ts) (Hybrid pipeline runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Desktop UI"]
  node_vue_boot["Vue bootstrap<br/>frontend entry<br/>[main.ts]"]
  node_app_shell["App shell<br/>Vue application<br/>[App.vue]"]
  node_operations_ui["Operations views<br/>Vue feature views<br/>[KanbanView.vue]"]
  node_pinia_stores["Shared state<br/>Pinia stores<br/>[epics.ts]"]
  node_human_review["Human review gate<br/>Kanban approval<br/>[KanbanView.vue]"]
end

subgraph group_control["Control Plane"]
  node_scheduler["Scheduler<br/>epic dispatcher<br/>[Scheduler.ts]"]
  node_pipeline_engine["Pipeline lifecycle<br/>control-plane engine<br/>[PipelineEngine.ts]"]
  node_pipeline_state["Pipeline state<br/>lifecycle persistence"]
  node_hybrid_runner["Hybrid pipeline runner<br/>multi-agent state machine"]
  node_git_isolation["Git isolation<br/>branch workspace manager<br/>[BranchManager.ts]"]
end

subgraph group_agents["Agent Execution"]
  node_session_service["Agent sessions<br/>session runtime<br/>[SessionService.ts]"]
  node_agent_loop["Agent loop<br/>core agent runtime<br/>[AgentLoop.ts]"]
  node_providers_tools["Providers and tools<br/>agent integrations<br/>[index.ts]"]
  node_claude_cli["Claude CLI runtime<br/>process lifecycle<br/>[ClaudeProcess.ts]"]
end

subgraph group_native["Native &amp; Local Data"]
  node_tauri_host{{"Tauri host<br/>Rust native host<br/>[main.rs]"}}
  node_platform_pty["Platform and PTY<br/>native integration<br/>[platform.rs]"]
  node_sqlite_data[("Local SQLite<br/>persistent store<br/>[Database.ts]")]
end

node_vue_boot -->|"mounts"| node_app_shell
node_app_shell -->|"presents"| node_operations_ui
node_operations_ui -->|"reads and updates"| node_pinia_stores
node_app_shell -->|"invokes native APIs"| node_tauri_host
node_tauri_host -->|"uses"| node_platform_pty
node_pinia_stores -->|"submits epic work"| node_scheduler
node_scheduler -->|"dispatches"| node_pipeline_engine
node_pipeline_engine -->|"runs pipeline"| node_hybrid_runner
node_pipeline_engine -->|"persists lifecycle"| node_pipeline_state
node_pipeline_state -->|"stores locally"| node_sqlite_data
node_hybrid_runner -->|"orchestrates roles"| node_session_service
node_session_service -->|"runs sessions"| node_agent_loop
node_agent_loop -->|"streams and calls tools"| node_providers_tools
node_session_service -->|"launches optional CLI"| node_claude_cli
node_hybrid_runner -->|"operates in epic branch"| node_git_isolation
node_git_isolation -->|"submits completed diff"| node_human_review
node_human_review -.->|"requeues rejected work"| node_scheduler
node_human_review -->|"approves squash merge"| node_git_isolation

click node_vue_boot "https://github.com/alice-viola/angy/blob/master/src/main.ts"
click node_app_shell "https://github.com/alice-viola/angy/blob/master/src/App.vue"
click node_operations_ui "https://github.com/alice-viola/angy/blob/master/src/components/kanban/KanbanView.vue"
click node_pinia_stores "https://github.com/alice-viola/angy/blob/master/src/stores/epics.ts"
click node_tauri_host "https://github.com/alice-viola/angy/blob/master/src-tauri/src/main.rs"
click node_platform_pty "https://github.com/alice-viola/angy/blob/master/src-tauri/src/platform.rs"
click node_sqlite_data "https://github.com/alice-viola/angy/blob/master/src/engine/Database.ts"
click node_scheduler "https://github.com/alice-viola/angy/blob/master/src/engine/Scheduler.ts"
click node_pipeline_engine "https://github.com/alice-viola/angy/blob/master/src/engine/PipelineEngine.ts"
click node_pipeline_state "https://github.com/alice-viola/angy/blob/master/src/engine/PipelineStateStore.ts"
click node_hybrid_runner "https://github.com/alice-viola/angy/blob/master/src/engine/HybridPipelineRunner.ts"
click node_session_service "https://github.com/alice-viola/angy/blob/master/src/engine/SessionService.ts"
click node_agent_loop "https://github.com/alice-viola/angy/blob/master/code/packages/core/src/agent/AgentLoop.ts"
click node_providers_tools "https://github.com/alice-viola/angy/blob/master/code/packages/core/src/providers/index.ts"
click node_claude_cli "https://github.com/alice-viola/angy/blob/master/src/engine/ClaudeProcess.ts"
click node_git_isolation "https://github.com/alice-viola/angy/blob/master/src/engine/BranchManager.ts"
click node_human_review "https://github.com/alice-viola/angy/blob/master/src/components/kanban/KanbanView.vue"

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_vue_boot,node_app_shell,node_operations_ui,node_pinia_stores,node_human_review toneBlue
class node_scheduler,node_pipeline_engine,node_pipeline_state,node_hybrid_runner,node_git_isolation toneAmber
class node_session_service,node_agent_loop,node_providers_tools,node_claude_cli toneMint
class node_tauri_host,node_platform_pty,node_sqlite_data toneRose
```

## Components

### Desktop UI

- [Vue bootstrap](https://github.com/alice-viola/angy/blob/master/src/main.ts): frontend entry · `src/main.ts`
- [App shell](https://github.com/alice-viola/angy/blob/master/src/App.vue): Vue application · `src/App.vue`
- [Operations views](https://github.com/alice-viola/angy/blob/master/src/components/kanban/KanbanView.vue): Vue feature views · Kanban, fleet, and mission-control surfaces. · `src/components/kanban/KanbanView.vue`
- [Shared state](https://github.com/alice-viola/angy/blob/master/src/stores/epics.ts): Pinia stores · Projects, epics, and session state. · `src/stores/epics.ts`
- [Human review gate](https://github.com/alice-viola/angy/blob/master/src/components/kanban/KanbanView.vue): Kanban approval · Users squash merge, reject, or requeue completed work. · `src/components/kanban/KanbanView.vue`

### Control Plane

- [Scheduler](https://github.com/alice-viola/angy/blob/master/src/engine/Scheduler.ts): epic dispatcher · Selects eligible work under dependency, lock, cost, and recovery constraints. · `src/engine/Scheduler.ts`
- [Pipeline lifecycle](https://github.com/alice-viola/angy/blob/master/src/engine/PipelineEngine.ts): control-plane engine · `src/engine/PipelineEngine.ts`
- [Pipeline state](https://github.com/alice-viola/angy/blob/master/src/engine/PipelineStateStore.ts): lifecycle persistence · `src/engine/PipelineStateStore.ts`
- [Hybrid pipeline runner](https://github.com/alice-viola/angy/blob/master/src/engine/HybridPipelineRunner.ts): multi-agent state machine · Plans, reviews, increments, verification, integration, and fix loops. · `src/engine/HybridPipelineRunner.ts`
- [Git isolation](https://github.com/alice-viola/angy/blob/master/src/engine/BranchManager.ts): branch workspace manager · Uses an epic/{id} branch per target repository. · `src/engine/BranchManager.ts`

### Agent Execution

- [Agent sessions](https://github.com/alice-viola/angy/blob/master/src/engine/SessionService.ts): session runtime · Manages agent processes and streaming boundaries. · `src/engine/SessionService.ts`
- [Agent loop](https://github.com/alice-viola/angy/blob/master/code/packages/core/src/agent/AgentLoop.ts): core agent runtime · Owns provider streaming, tools, persistence, and usage tracking. · `code/packages/core/src/agent/AgentLoop.ts`
- [Providers and tools](https://github.com/alice-viola/angy/blob/master/code/packages/core/src/providers/index.ts): agent integrations · Anthropic, Gemini, and registered tool calls. · `code/packages/core/src/providers/index.ts`
- [Claude CLI runtime](https://github.com/alice-viola/angy/blob/master/src/engine/ClaudeProcess.ts): process lifecycle · Optional local Claude Code process health and lifecycle. · `src/engine/ClaudeProcess.ts`

### Native & Local Data

- [Tauri host](https://github.com/alice-viola/angy/blob/master/src-tauri/src/main.rs): Rust native host · `src-tauri/src/main.rs`
- [Platform and PTY](https://github.com/alice-viola/angy/blob/master/src-tauri/src/platform.rs): native integration · `src-tauri/src/platform.rs`
- [Local SQLite](https://github.com/alice-viola/angy/blob/master/src/engine/Database.ts): persistent store · `src/engine/Database.ts`

## Connections

- Vue bootstrap → App shell: mounts
- App shell → Operations views: presents
- Operations views → Shared state: reads and updates
- App shell → Tauri host: invokes native APIs
- Tauri host → Platform and PTY: uses
- Shared state → Scheduler: submits epic work
- Scheduler → Pipeline lifecycle: dispatches
- Pipeline lifecycle → Hybrid pipeline runner: runs pipeline
- Pipeline lifecycle → Pipeline state: persists lifecycle
- Pipeline state → Local SQLite: stores locally
- Hybrid pipeline runner → Agent sessions: orchestrates roles
- Agent sessions → Agent loop: runs sessions
- Agent loop → Providers and tools: streams and calls tools
- Agent sessions → Claude CLI runtime: launches optional CLI
- Hybrid pipeline runner → Git isolation: operates in epic branch
- Git isolation → Human review gate: submits completed diff
- Human review gate → Scheduler: requeues rejected work
- Human review gate → Git isolation: approves squash merge
