# ub207/personal-ai-employee architecture

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

- Interactive diagram: https://gitdiagram.com/ub207/personal-ai-employee
- Repository: https://github.com/ub207/personal-ai-employee

## Overview

This repository is primarily an Obsidian-based AI Employee vault, with two implemented watchers that turn incoming email and files into actionable Markdown items. The documented workflow continues through AI processing, human review, approval, and execution through integrations, but most of those orchestrators and integrations are not present in this tree. The graph separates implemented watcher behavior from README-documented capabilities; dashed, uncited links mark workflow steps not verified in the sampled source.

Main entry points: [`watchers/filesystem_watcher.py`](https://github.com/ub207/personal-ai-employee/blob/main/watchers/filesystem_watcher.py) (Filesystem watcher), [`watchers/gmail_imap_watcher.py`](https://github.com/ub207/personal-ai-employee/blob/main/watchers/gmail_imap_watcher.py) (Gmail watcher), [`Approved`](https://github.com/ub207/personal-ai-employee/tree/main/Approved) (Approved items), [`Dashboard.md`](https://github.com/ub207/personal-ai-employee/blob/main/Dashboard.md) (Activity dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Event intake"]
  node_gmail_watcher["Gmail watcher"]
  node_file_watcher["Filesystem watcher"]
end

subgraph group_vault["Vault workflow"]
  node_needs_action[("Needs Action")]
  node_dashboard["Activity dashboard<br/>[Dashboard.md]"]
  node_claude["Claude processing"]
  node_approval["Human approval"]
  node_approved[("Approved items")]
  node_rejected[("Rejected items")]
  node_done[("Completed items")]
end

subgraph group_operations["Business operations"]
  node_executor["Action executor"]
  node_communications["Communications<br/>[README.md]"]
  node_social["Social publishing<br/>[README.md]"]
  node_business_ops["Business operations<br/>[README.md]"]
  node_briefings["CEO briefings"]
  node_audit["Audit logging<br/>[README.md]"]
end

node_email(("Gmail inbox"))
node_inbox(("Inbox files"))

node_email -->|"monitors"| node_gmail_watcher
node_gmail_watcher -->|"writes email items"| node_needs_action
node_inbox -->|"monitors"| node_file_watcher
node_file_watcher -->|"writes file items"| node_needs_action
node_file_watcher -->|"launches processing"| node_claude
node_file_watcher -->|"updates activity"| node_dashboard
node_gmail_watcher -->|"updates activity"| node_dashboard
node_needs_action -.->|"processes items"| node_claude
node_claude -.->|"drafts for review"| node_approval
node_approval -.->|"approves"| node_approved
node_approval -.->|"rejects"| node_rejected
node_approved -.->|"routes approved actions"| node_executor
node_executor -.->|"sends messages"| node_communications
node_executor -.->|"publishes posts"| node_social
node_executor -.->|"executes business tasks"| node_business_ops
node_executor -.->|"logs actions"| node_audit
node_executor -.->|"completes items"| node_done

click node_gmail_watcher "https://github.com/ub207/personal-ai-employee/blob/main/watchers/gmail_imap_watcher.py"
click node_file_watcher "https://github.com/ub207/personal-ai-employee/blob/main/watchers/filesystem_watcher.py"
click node_dashboard "https://github.com/ub207/personal-ai-employee/blob/main/Dashboard.md"
click node_approved "https://github.com/ub207/personal-ai-employee/tree/main/Approved"
click node_done "https://github.com/ub207/personal-ai-employee/tree/main/Done"
click node_communications "https://github.com/ub207/personal-ai-employee/blob/main/README.md"
click node_social "https://github.com/ub207/personal-ai-employee/blob/main/README.md"
click node_business_ops "https://github.com/ub207/personal-ai-employee/blob/main/README.md"
click node_briefings "https://github.com/ub207/personal-ai-employee/tree/main/Briefings"
click node_audit "https://github.com/ub207/personal-ai-employee/blob/main/README.md"

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_gmail_watcher,node_file_watcher toneBlue
class node_needs_action,node_dashboard,node_claude,node_approval,node_approved,node_rejected,node_done toneAmber
class node_executor,node_communications,node_social,node_business_ops,node_briefings,node_audit toneMint
class node_email,node_inbox toneIndigo
```

## Components

### Event intake

- [Gmail watcher](https://github.com/ub207/personal-ai-employee/blob/main/watchers/gmail_imap_watcher.py): `watchers/gmail_imap_watcher.py`
- [Filesystem watcher](https://github.com/ub207/personal-ai-employee/blob/main/watchers/filesystem_watcher.py): `watchers/filesystem_watcher.py`

### Vault workflow

- **Needs Action**
- [Activity dashboard](https://github.com/ub207/personal-ai-employee/blob/main/Dashboard.md): `Dashboard.md`
- **Claude processing**
- **Human approval**
- [Approved items](https://github.com/ub207/personal-ai-employee/tree/main/Approved): `Approved`
- **Rejected items**
- [Completed items](https://github.com/ub207/personal-ai-employee/tree/main/Done): `Done`

### Business operations

- **Action executor**
- [Communications](https://github.com/ub207/personal-ai-employee/blob/main/README.md): `README.md`
- [Social publishing](https://github.com/ub207/personal-ai-employee/blob/main/README.md): `README.md`
- [Business operations](https://github.com/ub207/personal-ai-employee/blob/main/README.md): `README.md`
- [CEO briefings](https://github.com/ub207/personal-ai-employee/tree/main/Briefings): `Briefings`
- [Audit logging](https://github.com/ub207/personal-ai-employee/blob/main/README.md): `README.md`

### Other components

- **Gmail inbox**
- **Inbox files**

## Connections

- Gmail inbox → Gmail watcher: monitors (evidence: `watchers/gmail_imap_watcher.py`)
- Gmail watcher → Needs Action: writes email items (evidence: `watchers/gmail_imap_watcher.py`)
- Inbox files → Filesystem watcher: monitors (evidence: `watchers/filesystem_watcher.py`)
- Filesystem watcher → Needs Action: writes file items (evidence: `watchers/filesystem_watcher.py`)
- Filesystem watcher → Claude processing: launches processing (evidence: `watchers/filesystem_watcher.py`)
- Filesystem watcher → Activity dashboard: updates activity (evidence: `watchers/filesystem_watcher.py`)
- Gmail watcher → Activity dashboard: updates activity (evidence: `watchers/gmail_imap_watcher.py`)
- Needs Action → Claude processing: processes items
- Claude processing → Human approval: drafts for review (evidence: `README.md`)
- Human approval → Approved items: approves (evidence: `README.md`)
- Human approval → Rejected items: rejects (evidence: `README.md`)
- Approved items → Action executor: routes approved actions (evidence: `README.md`)
- Action executor → Communications: sends messages (evidence: `README.md`)
- Action executor → Social publishing: publishes posts (evidence: `README.md`)
- Action executor → Business operations: executes business tasks (evidence: `README.md`)
- Action executor → Audit logging: logs actions (evidence: `README.md`)
- Action executor → Completed items: completes items (evidence: `README.md`)
