# quentondupont/my-master architecture

> Architecture diagram of the GitHub repository quentondupont/my-master, 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/quentondupont/my-master
- Repository: https://github.com/quentondupont/my-master

## Overview

Pomelo is a human-approved support triage system: incoming Jira tickets are researched and classified into proposals, then a person reviews them before the sole Jira execution path writes changes. The repository also documents knowledge retrieval, Slack mention replies, operational briefs, and a read-and-draft Digital Twin. The graph preserves these distinct capabilities. Some subsystem internals are unsampled; those relationships are omitted unless supported by the README or the supplied source references.

Main entry points: [`agents/jira_leader/worker.py`](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/worker.py) (Triage Worker), [`agents/jira_leader/queue.py`](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/queue.py) (Queue), [`agents/jira_leader/batch.py`](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/batch.py) (Approval Batch), [`agents/slack_leader/worker.py`](https://github.com/quentondupont/my-master/blob/main/agents/slack_leader/worker.py) (Thread Worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_triage["Jira Triage"]
  node_queue["Queue<br/>[queue.py]"]
  node_worker["Triage Worker<br/>[worker.py]"]
  node_gates["Safety Gates<br/>[gates.py]"]
  node_analysis["Classification<br/>[analysis.py]"]
  node_requester_lookup["Requester Lookup<br/>[requester.py]"]
  node_ledger[("Processing Ledger<br/>[ledger.py]")]
end

subgraph group_knowledge["Knowledge Base"]
  node_historian["Historian Retrieval<br/>[retrieval.py]"]
  node_corpus[("Search Corpus<br/>[index.py]")]
  node_corpus_export["Corpus Export<br/>[export.py]"]
end

subgraph group_review["Human Review"]
  node_proposal_store[("Proposal Store<br/>[proposals.py]")]
  node_batch["Approval Batch<br/>[batch.py]"]
  node_mobile_review["Mobile Review<br/>[mobile.py]"]
  node_jira_execute["Jira Execution<br/>[execute.py]"]
  node_jira_client["Jira Client<br/>[jira_client.py]"]
end

subgraph group_slack["Slack Replies"]
  node_slack_leader["Mention Leader<br/>[leader.py]"]
  node_slack_worker["Thread Worker<br/>[worker.py]"]
  node_slack_proposals[("Reply Proposals<br/>[slack_proposals.py]")]
  node_slack_execute["Slack Execution<br/>[slack_execute.py]"]
  node_slack_client["Slack Client<br/>[slack_client.py]"]
end

subgraph group_twin["Digital Twin"]
  node_twin_profile["Work Profile<br/>[profile.py]"]
  node_twin_sources["Allowed Sources<br/>[sources.py]"]
  node_twin_update["Daily Updates<br/>[update.py]"]
  node_twin_tasks[("Task List<br/>[tasklist.py]")]
  node_twin_drafts["Personal Drafts<br/>[drafts.py]"]
  node_twin_alerts["Live Alerts<br/>[alerts.py]"]
  node_twin_bridge["Alert Queue<br/>[bridge.py]"]
end

subgraph group_oversight["Oversight"]
  node_chief_brief["Morning Brief<br/>[brief.py]"]
  node_rule_proposals["Rule Proposals<br/>[rules.py]"]
  node_corrections[("Correction Log<br/>[corrections.py]")]
  node_marketing["Onsite Operations<br/>[surfaces.py]"]
end

node_requester(("Ticket Requester"))
node_jira{{"Jira Boards"}}
node_human(("Human Reviewer"))
node_slack{{"Slack"}}

node_requester -->|"submits ticket"| node_queue
node_queue -->|"reads tickets"| node_jira
node_queue -->|"dispatches work"| node_worker
node_queue -->|"checks and claims"| node_ledger
node_worker -->|"applies gates"| node_gates
node_worker -->|"retrieves evidence"| node_historian
node_worker -->|"classifies ticket"| node_analysis
node_worker -->|"resolves requester"| node_requester_lookup
node_worker -->|"creates proposal"| node_proposal_store
node_worker -->|"records state"| node_ledger
node_historian -->|"searches"| node_corpus
node_corpus_export -->|"exports ticket history"| node_jira
node_corpus_export -->|"builds index"| node_corpus
node_human -->|"approves or edits"| node_batch
node_batch -->|"loads proposals"| node_proposal_store
node_batch -->|"records edits"| node_corrections
node_batch -->|"hands off approved work"| node_jira_execute
node_mobile_review -->|"reviews proposals"| node_proposal_store
node_mobile_review -->|"records edits"| node_corrections
node_jira_execute -->|"writes through"| node_jira_client
node_jira_client -->|"reads and writes"| node_jira
node_slack -->|"provides mentions"| node_slack_leader
node_slack_leader -->|"dispatches threads"| node_slack_worker
node_slack_worker -->|"retrieves evidence"| node_historian
node_slack_worker -->|"applies safety gates"| node_gates
node_slack_worker -->|"creates reply proposal"| node_slack_proposals
node_human -->|"approves before posting"| node_slack_execute
node_slack_execute -->|"posts or undoes"| node_slack_client
node_slack_client -->|"calls Web API"| node_slack
node_chief_brief -->|"reads status"| node_ledger
node_chief_brief -->|"reviews corrections"| node_corrections
node_chief_brief -->|"reports proposals"| node_rule_proposals
node_rule_proposals -->|"clusters edits"| node_corrections
node_marketing -.->|"supports onsite workflows"| node_marketing
node_twin_sources -->|"updates source status"| node_twin_profile
node_twin_update -->|"reads allowed sources"| node_twin_sources
node_twin_update -->|"uses profile"| node_twin_profile
node_twin_update -->|"updates tasks"| node_twin_tasks
node_twin_drafts -->|"closes linked task"| node_twin_tasks
node_twin_alerts -->|"tests queued event"| node_twin_bridge

click node_queue "https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/queue.py"
click node_worker "https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/worker.py"
click node_gates "https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/gates.py"
click node_analysis "https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/analysis.py"
click node_requester_lookup "https://github.com/quentondupont/my-master/blob/main/core/requester.py"
click node_ledger "https://github.com/quentondupont/my-master/blob/main/core/ledger.py"
click node_historian "https://github.com/quentondupont/my-master/blob/main/agents/historian/retrieval.py"
click node_corpus "https://github.com/quentondupont/my-master/blob/main/corpus/index.py"
click node_corpus_export "https://github.com/quentondupont/my-master/blob/main/corpus/export.py"
click node_proposal_store "https://github.com/quentondupont/my-master/blob/main/core/proposals.py"
click node_batch "https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/batch.py"
click node_mobile_review "https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/mobile.py"
click node_jira_execute "https://github.com/quentondupont/my-master/blob/main/core/execute.py"
click node_jira_client "https://github.com/quentondupont/my-master/blob/main/core/jira_client.py"
click node_slack_leader "https://github.com/quentondupont/my-master/blob/main/agents/slack_leader/leader.py"
click node_slack_worker "https://github.com/quentondupont/my-master/blob/main/agents/slack_leader/worker.py"
click node_slack_proposals "https://github.com/quentondupont/my-master/blob/main/core/slack_proposals.py"
click node_slack_execute "https://github.com/quentondupont/my-master/blob/main/core/slack_execute.py"
click node_slack_client "https://github.com/quentondupont/my-master/blob/main/core/slack_client.py"
click node_chief_brief "https://github.com/quentondupont/my-master/blob/main/agents/chief_of_staff/brief.py"
click node_rule_proposals "https://github.com/quentondupont/my-master/blob/main/agents/chief_of_staff/rules.py"
click node_corrections "https://github.com/quentondupont/my-master/blob/main/core/corrections.py"
click node_marketing "https://github.com/quentondupont/my-master/blob/main/agents/marketing_onsite/surfaces.py"
click node_twin_profile "https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/profile.py"
click node_twin_sources "https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/sources.py"
click node_twin_update "https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/update.py"
click node_twin_tasks "https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/tasklist.py"
click node_twin_drafts "https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/drafts.py"
click node_twin_alerts "https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/alerts.py"
click node_twin_bridge "https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/bridge.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_queue,node_worker,node_gates,node_analysis,node_requester_lookup,node_ledger,node_human toneBlue
class node_historian,node_corpus,node_corpus_export toneAmber
class node_proposal_store,node_batch,node_mobile_review,node_jira_execute,node_jira_client,node_requester toneMint
class node_slack_leader,node_slack_worker,node_slack_proposals,node_slack_execute,node_slack_client toneRose
class node_twin_profile,node_twin_sources,node_twin_update,node_twin_tasks,node_twin_drafts,node_twin_alerts,node_twin_bridge,node_jira,node_slack toneIndigo
class node_chief_brief,node_rule_proposals,node_corrections,node_marketing toneTeal
```

## Components

### Jira Triage

- [Queue](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/queue.py): `agents/jira_leader/queue.py`
- [Triage Worker](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/worker.py): `agents/jira_leader/worker.py`
- [Safety Gates](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/gates.py): `agents/jira_leader/gates.py`
- [Classification](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/analysis.py): `agents/jira_leader/analysis.py`
- [Requester Lookup](https://github.com/quentondupont/my-master/blob/main/core/requester.py): `core/requester.py`
- [Processing Ledger](https://github.com/quentondupont/my-master/blob/main/core/ledger.py): `core/ledger.py`

### Knowledge Base

- [Historian Retrieval](https://github.com/quentondupont/my-master/blob/main/agents/historian/retrieval.py): `agents/historian/retrieval.py`
- [Search Corpus](https://github.com/quentondupont/my-master/blob/main/corpus/index.py): `corpus/index.py`
- [Corpus Export](https://github.com/quentondupont/my-master/blob/main/corpus/export.py): `corpus/export.py`

### Human Review

- [Proposal Store](https://github.com/quentondupont/my-master/blob/main/core/proposals.py): `core/proposals.py`
- [Approval Batch](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/batch.py): `agents/jira_leader/batch.py`
- [Mobile Review](https://github.com/quentondupont/my-master/blob/main/agents/jira_leader/mobile.py): `agents/jira_leader/mobile.py`
- [Jira Execution](https://github.com/quentondupont/my-master/blob/main/core/execute.py): `core/execute.py`
- [Jira Client](https://github.com/quentondupont/my-master/blob/main/core/jira_client.py): `core/jira_client.py`

### Slack Replies

- [Mention Leader](https://github.com/quentondupont/my-master/blob/main/agents/slack_leader/leader.py): `agents/slack_leader/leader.py`
- [Thread Worker](https://github.com/quentondupont/my-master/blob/main/agents/slack_leader/worker.py): `agents/slack_leader/worker.py`
- [Reply Proposals](https://github.com/quentondupont/my-master/blob/main/core/slack_proposals.py): `core/slack_proposals.py`
- [Slack Execution](https://github.com/quentondupont/my-master/blob/main/core/slack_execute.py): `core/slack_execute.py`
- [Slack Client](https://github.com/quentondupont/my-master/blob/main/core/slack_client.py): `core/slack_client.py`

### Digital Twin

- [Work Profile](https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/profile.py): `agents/digital_twin/profile.py`
- [Allowed Sources](https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/sources.py): `agents/digital_twin/sources.py`
- [Daily Updates](https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/update.py): `agents/digital_twin/update.py`
- [Task List](https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/tasklist.py): `agents/digital_twin/tasklist.py`
- [Personal Drafts](https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/drafts.py): `agents/digital_twin/drafts.py`
- [Live Alerts](https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/alerts.py): `agents/digital_twin/alerts.py`
- [Alert Queue](https://github.com/quentondupont/my-master/blob/main/agents/digital_twin/bridge.py): `agents/digital_twin/bridge.py`

### Oversight

- [Morning Brief](https://github.com/quentondupont/my-master/blob/main/agents/chief_of_staff/brief.py): `agents/chief_of_staff/brief.py`
- [Rule Proposals](https://github.com/quentondupont/my-master/blob/main/agents/chief_of_staff/rules.py): `agents/chief_of_staff/rules.py`
- [Correction Log](https://github.com/quentondupont/my-master/blob/main/core/corrections.py): `core/corrections.py`
- [Onsite Operations](https://github.com/quentondupont/my-master/blob/main/agents/marketing_onsite/surfaces.py): `agents/marketing_onsite/surfaces.py`

### Other components

- **Ticket Requester**
- **Jira Boards**
- **Human Reviewer**
- **Slack**

## Connections

- Ticket Requester → Queue: submits ticket
- Queue → Jira Boards: reads tickets
- Queue → Triage Worker: dispatches work
- Queue → Processing Ledger: checks and claims
- Triage Worker → Safety Gates: applies gates (evidence: `agents/jira_leader/worker.py`)
- Triage Worker → Historian Retrieval: retrieves evidence (evidence: `agents/jira_leader/worker.py`)
- Triage Worker → Classification: classifies ticket (evidence: `agents/jira_leader/worker.py`)
- Triage Worker → Requester Lookup: resolves requester (evidence: `agents/jira_leader/worker.py`)
- Triage Worker → Proposal Store: creates proposal (evidence: `agents/jira_leader/worker.py`)
- Triage Worker → Processing Ledger: records state (evidence: `agents/jira_leader/worker.py`)
- Historian Retrieval → Search Corpus: searches (evidence: `agents/historian/retrieval.py`)
- Corpus Export → Jira Boards: exports ticket history (evidence: `corpus/export.py`)
- Corpus Export → Search Corpus: builds index
- Human Reviewer → Approval Batch: approves or edits
- Approval Batch → Proposal Store: loads proposals (evidence: `agents/jira_leader/batch.py`)
- Approval Batch → Correction Log: records edits (evidence: `agents/jira_leader/batch.py`)
- Approval Batch → Jira Execution: hands off approved work (evidence: `agents/jira_leader/batch.py`)
- Mobile Review → Proposal Store: reviews proposals (evidence: `agents/jira_leader/mobile.py`)
- Mobile Review → Correction Log: records edits (evidence: `agents/jira_leader/mobile.py`)
- Jira Execution → Jira Client: writes through (evidence: `core/jira_client.py`)
- Jira Client → Jira Boards: reads and writes (evidence: `core/jira_client.py`)
- Slack → Mention Leader: provides mentions
- Mention Leader → Thread Worker: dispatches threads (evidence: `agents/slack_leader/leader.py`)
- Thread Worker → Historian Retrieval: retrieves evidence (evidence: `agents/slack_leader/worker.py`)
- Thread Worker → Safety Gates: applies safety gates (evidence: `agents/slack_leader/worker.py`)
- Thread Worker → Reply Proposals: creates reply proposal (evidence: `agents/slack_leader/worker.py`)
- Human Reviewer → Slack Execution: approves before posting
- Slack Execution → Slack Client: posts or undoes (evidence: `core/slack_client.py`)
- Slack Client → Slack: calls Web API (evidence: `core/slack_client.py`)
- Morning Brief → Processing Ledger: reads status (evidence: `agents/chief_of_staff/brief.py`)
- Morning Brief → Correction Log: reviews corrections (evidence: `agents/chief_of_staff/brief.py`)
- Morning Brief → Rule Proposals: reports proposals (evidence: `agents/chief_of_staff/brief.py`)
- Rule Proposals → Correction Log: clusters edits (evidence: `agents/chief_of_staff/rules.py`)
- Onsite Operations → Onsite Operations: supports onsite workflows (evidence: `agents/marketing_onsite/surfaces.py`)
- Allowed Sources → Work Profile: updates source status (evidence: `agents/digital_twin/sources.py`)
- Daily Updates → Allowed Sources: reads allowed sources (evidence: `agents/digital_twin/update.py`)
- Daily Updates → Work Profile: uses profile (evidence: `agents/digital_twin/update.py`)
- Daily Updates → Task List: updates tasks (evidence: `agents/digital_twin/update.py`)
- Personal Drafts → Task List: closes linked task
- Live Alerts → Alert Queue: tests queued event
