# superlogicai/logic-loop architecture

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

- Interactive diagram: https://gitdiagram.com/superlogicai/logic-loop
- Repository: https://github.com/superlogicai/logic-loop

## Overview

Logic Loop is a desktop workspace for returning to AI coding projects: it aggregates agent activity, questions and project state, then routes the user back to a relevant terminal and next action. The main path is Home → project overview → workspace/terminal, with decisions, activity digests, blockers, idea boards, and usage/status features supporting re-entry. Rust/Tauri provides terminal sessions, agent event ingestion, and native persistence; the React frontend presents and coordinates those capabilities. Some adapter and UI relationships below are documented in the README but their source was not sampled.

Main entry points: [`src/components/ProjectOverview.tsx`](https://github.com/superlogicai/logic-loop/blob/main/src/components/ProjectOverview.tsx) (Project Overview), [`src/components/SidePanel.tsx`](https://github.com/superlogicai/logic-loop/blob/main/src/components/SidePanel.tsx) (Project Workspace), [`src/App.tsx`](https://github.com/superlogicai/logic-loop/blob/main/src/App.tsx) (App Coordinator), [`src/components/Terminal.tsx`](https://github.com/superlogicai/logic-loop/blob/main/src/components/Terminal.tsx) (Agent Terminals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace UI"]
  node_app["App Coordinator<br/>[App.tsx]"]
  node_workspace_panel["Project Workspace<br/>[SidePanel.tsx]"]
  node_terminal["Agent Terminals<br/>[Terminal.tsx]"]
  node_tabs["Tabs and Bookmarks<br/>[TabBar.tsx]"]
  node_usage["Usage Meters<br/>[ContextMeter.tsx]"]
end

subgraph group_reentry["Project Re-entry"]
  node_home["Home Dashboard<br/>[HomeDashboard.tsx]"]
  node_overview["Project Overview"]
  node_attention["Attention Inbox<br/>[AttentionInbox.tsx]"]
  node_decisions["Decision Tracking<br/>[decisions.ts]"]
  node_digest["Activity Digest<br/>[dashboard.ts]"]
  node_idea_board["Idea Board<br/>[IdeaBoard.tsx]"]
  node_blockers["Blocker Tracking<br/>[board.rs]"]
end

subgraph group_agent["Agent Runtime"]
  node_extractor["Decision Extraction<br/>[extractor.rs]"]
  node_ingest_ui["Event Ingest Client<br/>[ingest.ts]"]
  node_ingest_native["Agent Event Ingest<br/>[ingest.rs]"]
  node_adapters["Agent Adapters"]
  node_pty["PTY and Git<br/>[pty.rs]"]
end

subgraph group_state["Project State"]
  node_repo["Project Data Access<br/>[repo.ts]"]
  node_database[("SQLite State<br/>[lib.rs]")]
end

node_person(("Developer"))

node_person -->|"opens projects"| node_home
node_home -->|"opens project"| node_overview
node_overview -->|"continues session"| node_workspace_panel
node_workspace_panel -->|"hosts terminals"| node_terminal
node_app -->|"renders"| node_home
node_app -->|"renders"| node_workspace_panel
node_app -->|"coordinates tabs"| node_tabs
node_overview -->|"loads project data"| node_repo
node_overview -->|"builds work log"| node_digest
node_overview -->|"reads board"| node_idea_board
node_overview -->|"routes evidence"| node_attention
node_workspace_panel -->|"renders"| node_idea_board
node_workspace_panel -->|"reads session state"| node_repo
node_person -->|"reviews questions"| node_attention
node_attention -->|"focuses tab"| node_terminal
node_adapters -.->|"sends agent events"| node_ingest_native
node_ingest_native -->|"emits events"| node_ingest_ui
node_ingest_ui -.->|"supports extraction"| node_decisions
node_extractor -->|"extracts questions"| node_decisions
node_person -->|"answers in session"| node_terminal
node_app -->|"spawns sessions"| node_pty
node_pty -.->|"provides PTY"| node_terminal
node_repo -->|"persists project state"| node_database
node_person -->|"plans work"| node_idea_board
node_person -->|"tracks blockers"| node_blockers
node_person -->|"views usage"| node_usage

click node_app "https://github.com/superlogicai/logic-loop/blob/main/src/App.tsx"
click node_home "https://github.com/superlogicai/logic-loop/blob/main/src/components/HomeDashboard.tsx"
click node_overview "https://github.com/superlogicai/logic-loop/blob/main/src/components/ProjectOverview.tsx"
click node_workspace_panel "https://github.com/superlogicai/logic-loop/blob/main/src/components/SidePanel.tsx"
click node_terminal "https://github.com/superlogicai/logic-loop/blob/main/src/components/Terminal.tsx"
click node_tabs "https://github.com/superlogicai/logic-loop/blob/main/src/components/TabBar.tsx"
click node_attention "https://github.com/superlogicai/logic-loop/blob/main/src/components/AttentionInbox.tsx"
click node_decisions "https://github.com/superlogicai/logic-loop/blob/main/src/lib/decisions.ts"
click node_extractor "https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/extractor.rs"
click node_digest "https://github.com/superlogicai/logic-loop/blob/main/src/lib/dashboard.ts"
click node_idea_board "https://github.com/superlogicai/logic-loop/blob/main/src/components/IdeaBoard.tsx"
click node_blockers "https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/board.rs"
click node_usage "https://github.com/superlogicai/logic-loop/blob/main/src/components/ContextMeter.tsx"
click node_ingest_ui "https://github.com/superlogicai/logic-loop/blob/main/src/lib/ingest.ts"
click node_ingest_native "https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/ingest.rs"
click node_adapters "https://github.com/superlogicai/logic-loop/tree/main/src-tauri/src"
click node_pty "https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/pty.rs"
click node_repo "https://github.com/superlogicai/logic-loop/blob/main/src/lib/repo.ts"
click node_database "https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/lib.rs"

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_app,node_workspace_panel,node_terminal,node_tabs,node_usage toneBlue
class node_home,node_overview,node_attention,node_decisions,node_digest,node_idea_board,node_blockers toneAmber
class node_extractor,node_ingest_ui,node_ingest_native,node_adapters,node_pty toneMint
class node_repo,node_database toneRose
class node_person toneIndigo
```

## Components

### Workspace UI

- [App Coordinator](https://github.com/superlogicai/logic-loop/blob/main/src/App.tsx): `src/App.tsx`
- [Project Workspace](https://github.com/superlogicai/logic-loop/blob/main/src/components/SidePanel.tsx): `src/components/SidePanel.tsx`
- [Agent Terminals](https://github.com/superlogicai/logic-loop/blob/main/src/components/Terminal.tsx): `src/components/Terminal.tsx`
- [Tabs and Bookmarks](https://github.com/superlogicai/logic-loop/blob/main/src/components/TabBar.tsx): `src/components/TabBar.tsx`
- [Usage Meters](https://github.com/superlogicai/logic-loop/blob/main/src/components/ContextMeter.tsx): `src/components/ContextMeter.tsx`

### Project Re-entry

- [Home Dashboard](https://github.com/superlogicai/logic-loop/blob/main/src/components/HomeDashboard.tsx): `src/components/HomeDashboard.tsx`
- [Project Overview](https://github.com/superlogicai/logic-loop/blob/main/src/components/ProjectOverview.tsx): `src/components/ProjectOverview.tsx`
- [Attention Inbox](https://github.com/superlogicai/logic-loop/blob/main/src/components/AttentionInbox.tsx): `src/components/AttentionInbox.tsx`
- [Decision Tracking](https://github.com/superlogicai/logic-loop/blob/main/src/lib/decisions.ts): `src/lib/decisions.ts`
- [Activity Digest](https://github.com/superlogicai/logic-loop/blob/main/src/lib/dashboard.ts): `src/lib/dashboard.ts`
- [Idea Board](https://github.com/superlogicai/logic-loop/blob/main/src/components/IdeaBoard.tsx): `src/components/IdeaBoard.tsx`
- [Blocker Tracking](https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/board.rs): `src-tauri/src/board.rs`

### Agent Runtime

- [Decision Extraction](https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/extractor.rs): `src-tauri/src/extractor.rs`
- [Event Ingest Client](https://github.com/superlogicai/logic-loop/blob/main/src/lib/ingest.ts): `src/lib/ingest.ts`
- [Agent Event Ingest](https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/ingest.rs): `src-tauri/src/ingest.rs`
- [Agent Adapters](https://github.com/superlogicai/logic-loop/tree/main/src-tauri/src): `src-tauri/src`
- [PTY and Git](https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/pty.rs): `src-tauri/src/pty.rs`

### Project State

- [Project Data Access](https://github.com/superlogicai/logic-loop/blob/main/src/lib/repo.ts): `src/lib/repo.ts`
- [SQLite State](https://github.com/superlogicai/logic-loop/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Other components

- **Developer**

## Connections

- Developer → Home Dashboard: opens projects (evidence: `README.md`)
- Home Dashboard → Project Overview: opens project (evidence: `README.md`)
- Project Overview → Project Workspace: continues session (evidence: `README.md`)
- Project Workspace → Agent Terminals: hosts terminals (evidence: `README.md`)
- App Coordinator → Home Dashboard: renders (evidence: `src/App.tsx`)
- App Coordinator → Project Workspace: renders (evidence: `src/App.tsx`)
- App Coordinator → Tabs and Bookmarks: coordinates tabs (evidence: `src/App.tsx`)
- Project Overview → Project Data Access: loads project data (evidence: `src/components/ProjectOverview.tsx`)
- Project Overview → Activity Digest: builds work log (evidence: `src/components/ProjectOverview.tsx`)
- Project Overview → Idea Board: reads board (evidence: `src/components/ProjectOverview.tsx`)
- Project Overview → Attention Inbox: routes evidence (evidence: `src/components/ProjectOverview.tsx`)
- Project Workspace → Idea Board: renders (evidence: `src/components/SidePanel.tsx`)
- Project Workspace → Project Data Access: reads session state (evidence: `src/components/SidePanel.tsx`)
- Developer → Attention Inbox: reviews questions (evidence: `README.md`)
- Attention Inbox → Agent Terminals: focuses tab (evidence: `README.md`)
- Agent Adapters → Agent Event Ingest: sends agent events (evidence: `src-tauri/src/lib.rs`)
- Agent Event Ingest → Event Ingest Client: emits events (evidence: `src-tauri/src/ingest.rs`)
- Event Ingest Client → Decision Tracking: supports extraction
- Decision Extraction → Decision Tracking: extracts questions (evidence: `README.md`)
- Developer → Agent Terminals: answers in session (evidence: `README.md`)
- App Coordinator → PTY and Git: spawns sessions (evidence: `src/App.tsx`)
- PTY and Git → Agent Terminals: provides PTY
- Project Data Access → SQLite State: persists project state (evidence: `src/lib/repo.ts`)
- Developer → Idea Board: plans work (evidence: `README.md`)
- Developer → Blocker Tracking: tracks blockers (evidence: `README.md`)
- Developer → Usage Meters: views usage (evidence: `README.md`)
