# selmakcby/a-sirketi architecture

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

- Interactive diagram: https://gitdiagram.com/selmakcby/a-sirketi
- Repository: https://github.com/selmakcby/a-sirketi

## Overview

A Şirketi is a Claude Code agent-workflow scaffold: Telegram links or scheduled work enter team queues, agents produce verification or analysis artifacts, a separate watchdog reviews runs, and the distributor may hand accepted work to another team. The main chain turns verified X material into a publication-ready X Article package; a person makes the final publish decision. YouTube analysis is a separate Apify-backed reporting lane. The README documents these product capabilities; sampled source excerpts confirm several orchestration links, but unsampled team prompts and output-generation internals are represented at their existing directory paths.

Main entry points: [`bin/kos.py`](https://github.com/selmakcby/a-sirketi/blob/main/bin/kos.py) (Team runner), [`takimlar`](https://github.com/selmakcby/a-sirketi/tree/main/takimlar) (Team queues and state), [`bin/dagitici.py`](https://github.com/selmakcby/a-sirketi/blob/main/bin/dagitici.py) (Chain distributor), [`bin/telegram_dinle.py`](https://github.com/selmakcby/a-sirketi/blob/main/bin/telegram_dinle.py) (Telegram listener)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Intake and scheduling"]
  node_telegram_reader["Telegram reader<br/>[telegram_oku.py]"]
  node_telegram_listener["Telegram listener<br/>[telegram_dinle.py]"]
  node_scheduler["Daily scheduler<br/>[zamanla.py]"]
  node_daily["Daily reports<br/>[gunluk.py]"]
end

subgraph group_runtime["Agent runtime and oversight"]
  node_runner["Team runner<br/>[kos.py]"]
  node_agent_defs["Agent definitions<br/>[agents_uret.py]"]
  node_watchdog["Run watchdog<br/>[bekci.py]"]
  node_distributor["Chain distributor<br/>[dagitici.py]"]
  node_model_proxy["NIM model proxy<br/>[model_proxy.py]"]
end

subgraph group_content["Content workflows"]
  node_x_team["X verification team"]
  node_tweet_fetch["X source fetcher<br/>[tweet_cek.py]"]
  node_youtube_team["YouTube analysis team"]
  node_youtube_fetch["YouTube data collector"]
  node_apify["Apify actor client<br/>[apify_cek.py]"]
  node_youtube_data[("Weekly source data")]
  node_article_team["X Article team"]
  node_cover["Cover generator<br/>[kapak_uret.py]"]
  node_article_package["Publication package"]
end

subgraph group_state["Queue and state"]
  node_config["Settings and limits<br/>[ayar.py]"]
  node_queues[("Team queues and state")]
end

node_user(("Operator"))
node_telegram(("Telegram bot"))
node_publisher(("Human publisher"))

node_user -->|"sends link"| node_telegram
node_telegram_listener -->|"fetches updates"| node_telegram_reader
node_telegram_reader -->|"writes inbox"| node_queues
node_telegram_listener -->|"routes message"| node_queues
node_telegram_listener -->|"starts team"| node_runner
node_telegram_listener -->|"invokes after run"| node_distributor
node_scheduler -->|"schedules"| node_daily
node_daily -->|"runs morning chain"| node_distributor
node_daily -->|"queues weekly work"| node_queues
node_config -->|"reads and updates"| node_queues
node_runner -->|"generates agents"| node_agent_defs
node_runner -->|"calls fallback review"| node_watchdog
node_runner -->|"records run state"| node_queues
node_runner -->|"runs team"| node_x_team
node_runner -->|"runs team"| node_youtube_team
node_runner -->|"runs team"| node_article_team
node_watchdog -->|"records decision"| node_queues
node_distributor -->|"reads and writes queue"| node_queues
node_distributor -->|"starts eligible team"| node_runner
node_x_team -->|"fetches source"| node_tweet_fetch
node_x_team -->|"queues accepted item"| node_distributor
node_distributor -->|"dispatches accepted item"| node_article_team
node_youtube_team -->|"requests analysis data"| node_youtube_fetch
node_youtube_fetch -->|"runs actors"| node_apify
node_youtube_fetch -->|"writes weekly data"| node_youtube_data
node_youtube_team -->|"reads source data"| node_youtube_data
node_article_team -.->|"requests cover"| node_cover
node_article_team -->|"produces package"| node_article_package
node_article_package -->|"awaits publication"| node_publisher
node_runner -.->|"uses NIM route"| node_model_proxy

click node_telegram_reader "https://github.com/selmakcby/a-sirketi/blob/main/bin/telegram_oku.py"
click node_telegram_listener "https://github.com/selmakcby/a-sirketi/blob/main/bin/telegram_dinle.py"
click node_scheduler "https://github.com/selmakcby/a-sirketi/blob/main/bin/zamanla.py"
click node_daily "https://github.com/selmakcby/a-sirketi/blob/main/bin/gunluk.py"
click node_config "https://github.com/selmakcby/a-sirketi/blob/main/bin/ayar.py"
click node_queues "https://github.com/selmakcby/a-sirketi/tree/main/takimlar"
click node_runner "https://github.com/selmakcby/a-sirketi/blob/main/bin/kos.py"
click node_agent_defs "https://github.com/selmakcby/a-sirketi/blob/main/bin/agents_uret.py"
click node_watchdog "https://github.com/selmakcby/a-sirketi/blob/main/bin/bekci.py"
click node_distributor "https://github.com/selmakcby/a-sirketi/blob/main/bin/dagitici.py"
click node_x_team "https://github.com/selmakcby/a-sirketi/tree/main/takimlar/x-icerik"
click node_tweet_fetch "https://github.com/selmakcby/a-sirketi/blob/main/bin/tweet_cek.py"
click node_youtube_team "https://github.com/selmakcby/a-sirketi/tree/main/takimlar/youtube-analiz"
click node_youtube_fetch "https://github.com/selmakcby/a-sirketi/blob/main/bin/youtube_analiz_cek.py"
click node_apify "https://github.com/selmakcby/a-sirketi/blob/main/bin/apify_cek.py"
click node_article_team "https://github.com/selmakcby/a-sirketi/tree/main/takimlar/twitter-icerik"
click node_cover "https://github.com/selmakcby/a-sirketi/blob/main/bin/kapak_uret.py"
click node_article_package "https://github.com/selmakcby/a-sirketi/tree/main/takimlar/twitter-icerik"
click node_model_proxy "https://github.com/selmakcby/a-sirketi/blob/main/bin/model_proxy.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_telegram_reader,node_telegram_listener,node_scheduler,node_daily toneBlue
class node_runner,node_agent_defs,node_watchdog,node_distributor,node_model_proxy toneAmber
class node_x_team,node_tweet_fetch,node_youtube_team,node_youtube_fetch,node_apify,node_youtube_data,node_article_team,node_cover,node_article_package toneMint
class node_config,node_queues toneRose
class node_user,node_telegram,node_publisher toneIndigo
```

## Components

### Intake and scheduling

- [Telegram reader](https://github.com/selmakcby/a-sirketi/blob/main/bin/telegram_oku.py): `bin/telegram_oku.py`
- [Telegram listener](https://github.com/selmakcby/a-sirketi/blob/main/bin/telegram_dinle.py): `bin/telegram_dinle.py`
- [Daily scheduler](https://github.com/selmakcby/a-sirketi/blob/main/bin/zamanla.py): `bin/zamanla.py`
- [Daily reports](https://github.com/selmakcby/a-sirketi/blob/main/bin/gunluk.py): `bin/gunluk.py`

### Agent runtime and oversight

- [Team runner](https://github.com/selmakcby/a-sirketi/blob/main/bin/kos.py): `bin/kos.py`
- [Agent definitions](https://github.com/selmakcby/a-sirketi/blob/main/bin/agents_uret.py): `bin/agents_uret.py`
- [Run watchdog](https://github.com/selmakcby/a-sirketi/blob/main/bin/bekci.py): `bin/bekci.py`
- [Chain distributor](https://github.com/selmakcby/a-sirketi/blob/main/bin/dagitici.py): `bin/dagitici.py`
- [NIM model proxy](https://github.com/selmakcby/a-sirketi/blob/main/bin/model_proxy.py): `bin/model_proxy.py`

### Content workflows

- [X verification team](https://github.com/selmakcby/a-sirketi/tree/main/takimlar/x-icerik): `takimlar/x-icerik`
- [X source fetcher](https://github.com/selmakcby/a-sirketi/blob/main/bin/tweet_cek.py): `bin/tweet_cek.py`
- [YouTube analysis team](https://github.com/selmakcby/a-sirketi/tree/main/takimlar/youtube-analiz): `takimlar/youtube-analiz`
- [YouTube data collector](https://github.com/selmakcby/a-sirketi/blob/main/bin/youtube_analiz_cek.py): `bin/youtube_analiz_cek.py`
- [Apify actor client](https://github.com/selmakcby/a-sirketi/blob/main/bin/apify_cek.py): `bin/apify_cek.py`
- **Weekly source data**
- [X Article team](https://github.com/selmakcby/a-sirketi/tree/main/takimlar/twitter-icerik): `takimlar/twitter-icerik`
- [Cover generator](https://github.com/selmakcby/a-sirketi/blob/main/bin/kapak_uret.py): `bin/kapak_uret.py`
- [Publication package](https://github.com/selmakcby/a-sirketi/tree/main/takimlar/twitter-icerik): `takimlar/twitter-icerik`

### Queue and state

- [Settings and limits](https://github.com/selmakcby/a-sirketi/blob/main/bin/ayar.py): `bin/ayar.py`
- [Team queues and state](https://github.com/selmakcby/a-sirketi/tree/main/takimlar): `takimlar`

### Other components

- **Operator**
- **Telegram bot**
- **Human publisher**

## Connections

- Operator → Telegram bot: sends link (evidence: `README.md`)
- Telegram listener → Telegram reader: fetches updates (evidence: `bin/telegram_dinle.py`)
- Telegram reader → Team queues and state: writes inbox (evidence: `README.md`)
- Telegram listener → Team queues and state: routes message (evidence: `bin/telegram_dinle.py`)
- Telegram listener → Team runner: starts team (evidence: `bin/telegram_dinle.py`)
- Telegram listener → Chain distributor: invokes after run (evidence: `bin/telegram_dinle.py`)
- Daily scheduler → Daily reports: schedules (evidence: `bin/zamanla.py`)
- Daily reports → Chain distributor: runs morning chain (evidence: `bin/gunluk.py`)
- Daily reports → Team queues and state: queues weekly work (evidence: `bin/gunluk.py`)
- Settings and limits → Team queues and state: reads and updates (evidence: `bin/ayar.py`)
- Team runner → Agent definitions: generates agents (evidence: `bin/kos.py`)
- Team runner → Run watchdog: calls fallback review (evidence: `bin/kos.py`)
- Team runner → Team queues and state: records run state (evidence: `README.md`)
- Team runner → X verification team: runs team (evidence: `README.md`)
- Team runner → YouTube analysis team: runs team (evidence: `README.md`)
- Team runner → X Article team: runs team (evidence: `README.md`)
- Run watchdog → Team queues and state: records decision (evidence: `README.md`)
- Chain distributor → Team queues and state: reads and writes queue (evidence: `bin/dagitici.py`)
- Chain distributor → Team runner: starts eligible team (evidence: `README.md`)
- X verification team → X source fetcher: fetches source (evidence: `README.md`)
- X verification team → Chain distributor: queues accepted item (evidence: `README.md`)
- Chain distributor → X Article team: dispatches accepted item (evidence: `README.md`)
- YouTube analysis team → YouTube data collector: requests analysis data (evidence: `README.md`)
- YouTube data collector → Apify actor client: runs actors (evidence: `bin/youtube_analiz_cek.py`)
- YouTube data collector → Weekly source data: writes weekly data (evidence: `README.md`)
- YouTube analysis team → Weekly source data: reads source data (evidence: `README.md`)
- X Article team → Cover generator: requests cover (evidence: `README.md`)
- X Article team → Publication package: produces package (evidence: `README.md`)
- Publication package → Human publisher: awaits publication (evidence: `README.md`)
- Team runner → NIM model proxy: uses NIM route (evidence: `README.md`)
