# gentleman-programming/gentle-ai architecture

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

- Interactive diagram: https://gitdiagram.com/gentleman-programming/gentle-ai
- Repository: https://github.com/gentleman-programming/gentle-ai

## Overview

Gentle-AI is a Go CLI that adds deterministic workflows, project memory, and review evidence to existing coding agents. The principal path starts with a user invoking the CLI, which dispatches install or workflow operations, resolves agent/model choices, and applies agent-specific components; review commands separately capture and assess evidence in recoverable transactions. The README documents Engram, ODD, and 17 agent integrations. Connections below are limited to README statements and relationships visible in the supplied source index or excerpts; unsampled internals are represented at their supported directory paths.

Main entry points: [`internal/app/app.go`](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/app/app.go) (Command dispatcher), [`internal/cli/review.go`](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/cli/review.go) (Review commands), [`internal/components/agentguidance/orchestrator.go`](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/components/agentguidance/orchestrator.go) (Guidance and ODD), [`internal/planner`](https://github.com/gentleman-programming/gentle-ai/tree/main/internal/planner) (Plan and resolve)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and orchestration"]
  node_cli["gentle-ai CLI<br/>[main.go]"]
  node_app["Command dispatcher<br/>[app.go]"]
  node_install["Install commands<br/>[install.go]"]
end

subgraph group_setup["Agent setup"]
  node_planner["Plan and resolve"]
  node_agents["Agent adapters"]
end

subgraph group_workflow["Agent workflow"]
  node_guidance["Guidance and ODD<br/>[orchestrator.go]"]
  node_engram["Engram memory"]
  node_skills["Skills and components"]
end

subgraph group_review["Evidence and review"]
  node_reviewcli["Review commands<br/>[review.go]"]
  node_reviewassets["Review assets"]
  node_provider["Reviewer providers<br/>[contract.go]"]
  node_transactions[("Review transactions")]
end

subgraph group_operations["State and telemetry"]
  node_backup["Backup and restore<br/>[restore.go]"]
  node_uninstall["Uninstall service<br/>[service.go]"]
  node_telemetry["Telemetry runtime"]
  node_collector[("Telemetry collector<br/>[runtime_storage.go]")]
  node_telemetrycmd["Collector service<br/>[main.go]"]
end

node_user(("User"))

node_user -->|"invokes"| node_cli
node_cli -->|"runs"| node_app
node_app -->|"dispatches"| node_install
node_app -->|"uses"| node_planner
node_app -->|"uses"| node_agents
node_app -->|"dispatches"| node_reviewcli
node_install -->|"resolves"| node_planner
node_planner -.->|"selects"| node_agents
node_agents -->|"configures"| node_guidance
node_guidance -.->|"integrates memory"| node_engram
node_guidance -.->|"installs capabilities"| node_skills
node_reviewcli -->|"records evidence"| node_transactions
node_reviewcli -->|"invokes reviewers"| node_provider
node_reviewcli -->|"uses contracts"| node_reviewassets
node_app -->|"dispatches"| node_backup
node_app -->|"dispatches"| node_uninstall
node_app -.->|"triggers"| node_telemetry
node_telemetrycmd -->|"serves and stores"| node_collector
node_collector -->|"reads events"| node_telemetry

click node_cli "https://github.com/gentleman-programming/gentle-ai/blob/main/cmd/gentle-ai/main.go"
click node_app "https://github.com/gentleman-programming/gentle-ai/blob/main/internal/app/app.go"
click node_install "https://github.com/gentleman-programming/gentle-ai/blob/main/internal/cli/install.go"
click node_planner "https://github.com/gentleman-programming/gentle-ai/tree/main/internal/planner"
click node_agents "https://github.com/gentleman-programming/gentle-ai/tree/main/internal/agents"
click node_guidance "https://github.com/gentleman-programming/gentle-ai/blob/main/internal/components/agentguidance/orchestrator.go"
click node_engram "https://github.com/gentleman-programming/gentle-ai/tree/main/internal/components/engram"
click node_skills "https://github.com/gentleman-programming/gentle-ai/tree/main/internal/components/skills"
click node_reviewcli "https://github.com/gentleman-programming/gentle-ai/blob/main/internal/cli/review.go"
click node_reviewassets "https://github.com/gentleman-programming/gentle-ai/tree/main/internal/components/reviewassets"
click node_provider "https://github.com/gentleman-programming/gentle-ai/blob/main/internal/reviewerprovider/contract.go"
click node_transactions "https://github.com/gentleman-programming/gentle-ai/tree/main/internal/reviewtransaction"
click node_backup "https://github.com/gentleman-programming/gentle-ai/blob/main/internal/backup/restore.go"
click node_uninstall "https://github.com/gentleman-programming/gentle-ai/blob/main/internal/components/uninstall/service.go"
click node_telemetry "https://github.com/gentleman-programming/gentle-ai/tree/main/internal/telemetry"
click node_collector "https://github.com/gentleman-programming/gentle-ai/blob/main/internal/telemetrycollector/runtime_storage.go"
click node_telemetrycmd "https://github.com/gentleman-programming/gentle-ai/blob/main/cmd/gentle-telemetry/main.go"

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_app,node_install,node_user toneBlue
class node_planner,node_agents toneAmber
class node_guidance,node_engram,node_skills toneMint
class node_reviewcli,node_reviewassets,node_provider,node_transactions toneRose
class node_backup,node_uninstall,node_telemetry,node_collector,node_telemetrycmd toneIndigo
```

## Components

### CLI and orchestration

- [gentle-ai CLI](https://github.com/gentleman-programming/gentle-ai/blob/main/cmd/gentle-ai/main.go): `cmd/gentle-ai/main.go`
- [Command dispatcher](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/app/app.go): `internal/app/app.go`
- [Install commands](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/cli/install.go): `internal/cli/install.go`

### Agent setup

- [Plan and resolve](https://github.com/gentleman-programming/gentle-ai/tree/main/internal/planner): `internal/planner`
- [Agent adapters](https://github.com/gentleman-programming/gentle-ai/tree/main/internal/agents): `internal/agents`

### Agent workflow

- [Guidance and ODD](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/components/agentguidance/orchestrator.go): `internal/components/agentguidance/orchestrator.go`
- [Engram memory](https://github.com/gentleman-programming/gentle-ai/tree/main/internal/components/engram): `internal/components/engram`
- [Skills and components](https://github.com/gentleman-programming/gentle-ai/tree/main/internal/components/skills): `internal/components/skills`

### Evidence and review

- [Review commands](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/cli/review.go): `internal/cli/review.go`
- [Review assets](https://github.com/gentleman-programming/gentle-ai/tree/main/internal/components/reviewassets): `internal/components/reviewassets`
- [Reviewer providers](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/reviewerprovider/contract.go): `internal/reviewerprovider/contract.go`
- [Review transactions](https://github.com/gentleman-programming/gentle-ai/tree/main/internal/reviewtransaction): `internal/reviewtransaction`

### State and telemetry

- [Backup and restore](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/backup/restore.go): `internal/backup/restore.go`
- [Uninstall service](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/components/uninstall/service.go): `internal/components/uninstall/service.go`
- [Telemetry runtime](https://github.com/gentleman-programming/gentle-ai/tree/main/internal/telemetry): `internal/telemetry`
- [Telemetry collector](https://github.com/gentleman-programming/gentle-ai/blob/main/internal/telemetrycollector/runtime_storage.go): `internal/telemetrycollector/runtime_storage.go`
- [Collector service](https://github.com/gentleman-programming/gentle-ai/blob/main/cmd/gentle-telemetry/main.go): `cmd/gentle-telemetry/main.go`

### Other components

- **User**

## Connections

- User → gentle-ai CLI: invokes (evidence: `README.md`)
- gentle-ai CLI → Command dispatcher: runs (evidence: `cmd/gentle-ai/main.go`)
- Command dispatcher → Install commands: dispatches (evidence: `internal/app/app.go`)
- Command dispatcher → Plan and resolve: uses (evidence: `internal/app/app.go`)
- Command dispatcher → Agent adapters: uses (evidence: `internal/app/app.go`)
- Command dispatcher → Review commands: dispatches (evidence: `internal/app/app.go`)
- Install commands → Plan and resolve: resolves
- Plan and resolve → Agent adapters: selects
- Agent adapters → Guidance and ODD: configures (evidence: `internal/components/agentguidance/orchestrator.go`)
- Guidance and ODD → Engram memory: integrates memory (evidence: `README.md`)
- Guidance and ODD → Skills and components: installs capabilities (evidence: `README.md`)
- Review commands → Review transactions: records evidence
- Review commands → Reviewer providers: invokes reviewers
- Review commands → Review assets: uses contracts
- Command dispatcher → Backup and restore: dispatches (evidence: `internal/app/app.go`)
- Command dispatcher → Uninstall service: dispatches (evidence: `internal/app/app.go`)
- Command dispatcher → Telemetry runtime: triggers
- Collector service → Telemetry collector: serves and stores (evidence: `cmd/gentle-telemetry/main.go`)
- Telemetry collector → Telemetry runtime: reads events (evidence: `internal/telemetrycollector/runtime_storage.go`)
