# rajasrinamdar2007-crypto/jj-llm architecture

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

- Interactive diagram: https://gitdiagram.com/rajasrinamdar2007-crypto/jj-llm
- Repository: https://github.com/rajasrinamdar2007-crypto/jj-llm

## Overview

rulebox is a small terminal rule manager: users enter a query, which the screen stores as a JSON rule and adds to the displayed list. On startup and refresh, the screen loads saved rules. The app launches the screen; the README documents the launch commands but no LLM integration, which the UI explicitly describes as pending.

Main entry points: [`src/llm_agent/rules_store.py`](https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/rules_store.py) (Rules store), [`src/llm_agent/ui/main_screen.py`](https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/ui/main_screen.py) (Main screen), [`src/llm_agent/__init__.py`](https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/__init__.py) (CLI entry), [`src/llm_agent/app.py`](https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/app.py) (Textual app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_entry["CLI entry<br/>[__init__.py]"]
  node_app["Textual app<br/>[app.py]"]
end

subgraph group_interface["Terminal interface"]
  node_screen["Main screen<br/>[main_screen.py]"]
end

subgraph group_persistence["Rule persistence"]
  node_store["Rules store<br/>[rules_store.py]"]
  node_rules[("JSON rules")]
end

node_user(("User"))

node_user -->|"launches"| node_entry
node_entry -->|"runs"| node_app
node_app -->|"pushes"| node_screen
node_user -->|"enters query"| node_screen
node_screen -->|"loads rules"| node_store
node_store -->|"reads"| node_rules
node_screen -->|"creates rule"| node_store
node_store -->|"writes"| node_rules
node_store -->|"returns rules"| node_screen

click node_entry "https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/__init__.py"
click node_app "https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/app.py"
click node_screen "https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/ui/main_screen.py"
click node_store "https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/rules_store.py"

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_entry,node_app,node_user toneBlue
class node_screen toneAmber
class node_store,node_rules toneMint
```

## Components

### Application runtime

- [CLI entry](https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/__init__.py): `src/llm_agent/__init__.py`
- [Textual app](https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/app.py): `src/llm_agent/app.py`

### Terminal interface

- [Main screen](https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/ui/main_screen.py): `src/llm_agent/ui/main_screen.py`

### Rule persistence

- [Rules store](https://github.com/rajasrinamdar2007-crypto/jj-llm/blob/main/src/llm_agent/rules_store.py): `src/llm_agent/rules_store.py`
- **JSON rules**

### Other components

- **User**

## Connections

- User → CLI entry: launches
- CLI entry → Textual app: runs
- Textual app → Main screen: pushes
- User → Main screen: enters query
- Main screen → Rules store: loads rules
- Rules store → JSON rules: reads
- Main screen → Rules store: creates rule
- Rules store → JSON rules: writes
- Rules store → Main screen: returns rules
