# harish-1708/content-strategy-tool architecture

> Architecture diagram of the GitHub repository harish-1708/content-strategy-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harish-1708/content-strategy-tool
- Repository: https://github.com/harish-1708/content-strategy-tool

## Overview

This repository is a GitHub-operated content strategy and research tool. Its documented workflow syncs brand Shopify catalogues, checks and records product changes and missing facts, then updates catalogue files and brand Sheets; a separate weekly workflow searches configured topics within credit limits and publishes findings. The tree also shows broader observatory, social/ad collection, AI, and session capabilities. Unsampled modules are represented only where their paths are explicit; relationships beyond the README’s documented flows are not inferred from names alone.

Main entry points: [`contentintel/agent_reach_instagram.py`](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/agent_reach_instagram.py) (Instagram reach), [`contentintel/observatory/commands.py`](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/commands.py) (Catalogue workflows), [`contentintel/research.py`](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/research.py) (Research planning), [`contentintel/safety.py`](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/safety.py) (Input safety)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalogue["Catalogue operations"]
  node_brands["Brand settings<br/>[brands.py]"]
  node_shopify["Shopify catalogue<br/>[shopify.py]"]
  node_change_tracking["Change tracking<br/>[changes.py]"]
  node_catalogue_commands["Catalogue workflows<br/>[commands.py]"]
  node_sheets["Brand Sheets<br/>[sheets.py]"]
  node_catalogue_data[("Catalogue data")]
end

subgraph group_research["Research and observatory"]
  node_research_planning["Research planning<br/>[research.py]"]
  node_search_providers["Search providers<br/>[providers.py]"]
  node_research_usage[("Credit ledger")]
  node_observatory_commands["Observatory workflows<br/>[commands.py]"]
  node_observatory_config["Observatory settings<br/>[config.py]"]
  node_site_monitoring["Site monitoring<br/>[monitor.py]"]
  node_scrapling_worker["Scrapling worker"]
  node_worker_client["Worker client<br/>[worker_client.py]"]
end

subgraph group_collection["Content collection"]
  node_collectors["Ad and social collectors<br/>[collectors.py]"]
  node_agent_catalog["Agent reach catalog"]
  node_instagram_reach["Instagram reach"]
  node_sessions[("Login sessions<br/>[sessions.py]")]
end

subgraph group_platform["Shared platform"]
  node_connections["External connections<br/>[connections.py]"]
  node_contract["Result contract<br/>[contract.py]"]
  node_evidence["Evidence handling<br/>[evidence.py]"]
  node_health[("Source health<br/>[health.py]")]
  node_safety["Input safety<br/>[safety.py]"]
  node_guards["Owner guards<br/>[guards.py]"]
  node_services["Shared services<br/>[services.py]"]
end

subgraph group_ai["AI services"]
  node_ai_commands["AI commands<br/>[commands.py]"]
  node_ai_gateway["AI gateway<br/>[gateway.py]"]
  node_ai_router["AI router<br/>[router.py]"]
  node_ai_registry["Provider registry<br/>[registry.py]"]
end

node_github(("GitHub Actions"))

node_github -->|"runs sync"| node_catalogue_commands
node_catalogue_commands -->|"reads catalogue"| node_shopify
node_catalogue_commands -->|"detects changes"| node_change_tracking
node_catalogue_commands -->|"saves catalogue"| node_catalogue_data
node_catalogue_commands -->|"updates sheets"| node_sheets
node_github -->|"runs weekly"| node_research_planning
node_research_planning -->|"counts credits"| node_research_usage
node_research_planning -->|"routes searches"| node_search_providers
node_research_planning -->|"shows findings"| node_sheets
node_observatory_commands -->|"uses settings"| node_observatory_config
node_observatory_commands -->|"references"| node_site_monitoring
node_worker_client -->|"starts worker"| node_scrapling_worker
node_instagram_reach -->|"uses sessions"| node_sessions
node_instagram_reach -->|"uses contract"| node_contract
node_instagram_reach -->|"uses collectors"| node_collectors
node_instagram_reach -->|"uses safety"| node_safety
node_instagram_reach -->|"uses guards"| node_guards
node_evidence -->|"references"| node_health
node_evidence -->|"uses safety"| node_safety
node_services -->|"references"| node_connections
node_services -->|"references"| node_worker_client
node_ai_commands -->|"uses gateway"| node_ai_gateway
node_ai_commands -->|"uses registry"| node_ai_registry
node_ai_gateway -->|"uses safety"| node_safety

click node_brands "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/brands.py"
click node_shopify "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/shopify.py"
click node_change_tracking "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/changes.py"
click node_catalogue_commands "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/commands.py"
click node_sheets "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/sheets.py"
click node_catalogue_data "https://github.com/harish-1708/content-strategy-tool/tree/main/data"
click node_research_planning "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/research.py"
click node_search_providers "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/providers.py"
click node_research_usage "https://github.com/harish-1708/content-strategy-tool/blob/main/data/_shared/research_usage.json"
click node_observatory_commands "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/commands.py"
click node_observatory_config "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/config.py"
click node_site_monitoring "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/monitor.py"
click node_scrapling_worker "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/scrapling_worker.py"
click node_worker_client "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/worker_client.py"
click node_collectors "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/collectors.py"
click node_agent_catalog "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/agent_reach_catalog.py"
click node_instagram_reach "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/agent_reach_instagram.py"
click node_sessions "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/sessions.py"
click node_connections "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/connections.py"
click node_contract "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/contract.py"
click node_evidence "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/evidence.py"
click node_health "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/health.py"
click node_safety "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/safety.py"
click node_guards "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/guards.py"
click node_services "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/services.py"
click node_ai_commands "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/ai/commands.py"
click node_ai_gateway "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/ai/gateway.py"
click node_ai_router "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/ai/router.py"
click node_ai_registry "https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/ai/registry.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_brands,node_shopify,node_change_tracking,node_catalogue_commands,node_sheets,node_catalogue_data toneBlue
class node_research_planning,node_search_providers,node_research_usage,node_observatory_commands,node_observatory_config,node_site_monitoring,node_scrapling_worker,node_worker_client toneAmber
class node_collectors,node_agent_catalog,node_instagram_reach,node_sessions toneMint
class node_connections,node_contract,node_evidence,node_health,node_safety,node_guards,node_services toneRose
class node_ai_commands,node_ai_gateway,node_ai_router,node_ai_registry,node_github toneIndigo
```

## Components

### Catalogue operations

- [Brand settings](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/brands.py): `contentintel/brands.py`
- [Shopify catalogue](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/shopify.py): `contentintel/observatory/shopify.py`
- [Change tracking](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/changes.py): `contentintel/observatory/changes.py`
- [Catalogue workflows](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/commands.py): `contentintel/observatory/commands.py`
- [Brand Sheets](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/sheets.py): `contentintel/sheets.py`
- [Catalogue data](https://github.com/harish-1708/content-strategy-tool/tree/main/data): `data`

### Research and observatory

- [Research planning](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/research.py): `contentintel/research.py`
- [Search providers](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/providers.py): `contentintel/providers.py`
- [Credit ledger](https://github.com/harish-1708/content-strategy-tool/blob/main/data/_shared/research_usage.json): `data/_shared/research_usage.json`
- [Observatory workflows](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/commands.py): `contentintel/observatory/commands.py`
- [Observatory settings](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/config.py): `contentintel/observatory/config.py`
- [Site monitoring](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/monitor.py): `contentintel/observatory/monitor.py`
- [Scrapling worker](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/scrapling_worker.py): `contentintel/observatory/scrapling_worker.py`
- [Worker client](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/observatory/worker_client.py): `contentintel/observatory/worker_client.py`

### Content collection

- [Ad and social collectors](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/collectors.py): `contentintel/collectors.py`
- [Agent reach catalog](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/agent_reach_catalog.py): `contentintel/agent_reach_catalog.py`
- [Instagram reach](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/agent_reach_instagram.py): `contentintel/agent_reach_instagram.py`
- [Login sessions](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/sessions.py): `contentintel/sessions.py`

### Shared platform

- [External connections](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/connections.py): `contentintel/connections.py`
- [Result contract](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/contract.py): `contentintel/contract.py`
- [Evidence handling](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/evidence.py): `contentintel/evidence.py`
- [Source health](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/health.py): `contentintel/health.py`
- [Input safety](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/safety.py): `contentintel/safety.py`
- [Owner guards](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/guards.py): `contentintel/guards.py`
- [Shared services](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/services.py): `contentintel/services.py`

### AI services

- [AI commands](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/ai/commands.py): `contentintel/ai/commands.py`
- [AI gateway](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/ai/gateway.py): `contentintel/ai/gateway.py`
- [AI router](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/ai/router.py): `contentintel/ai/router.py`
- [Provider registry](https://github.com/harish-1708/content-strategy-tool/blob/main/contentintel/ai/registry.py): `contentintel/ai/registry.py`

### Other components

- **GitHub Actions**

## Connections

- GitHub Actions → Catalogue workflows: runs sync
- Catalogue workflows → Shopify catalogue: reads catalogue (evidence: `contentintel/observatory/commands.py`)
- Catalogue workflows → Change tracking: detects changes
- Catalogue workflows → Catalogue data: saves catalogue
- Catalogue workflows → Brand Sheets: updates sheets
- GitHub Actions → Research planning: runs weekly
- Research planning → Credit ledger: counts credits
- Research planning → Search providers: routes searches (evidence: `contentintel/research.py`)
- Research planning → Brand Sheets: shows findings
- Observatory workflows → Observatory settings: uses settings (evidence: `contentintel/observatory/commands.py`)
- Observatory workflows → Site monitoring: references (evidence: `contentintel/observatory/commands.py`)
- Worker client → Scrapling worker: starts worker (evidence: `contentintel/observatory/worker_client.py`)
- Instagram reach → Login sessions: uses sessions
- Instagram reach → Result contract: uses contract (evidence: `contentintel/agent_reach_instagram.py`)
- Instagram reach → Ad and social collectors: uses collectors (evidence: `contentintel/agent_reach_instagram.py`)
- Instagram reach → Input safety: uses safety (evidence: `contentintel/agent_reach_instagram.py`)
- Instagram reach → Owner guards: uses guards (evidence: `contentintel/agent_reach_instagram.py`)
- Evidence handling → Source health: references (evidence: `contentintel/evidence.py`)
- Evidence handling → Input safety: uses safety (evidence: `contentintel/evidence.py`)
- Shared services → External connections: references (evidence: `contentintel/services.py`)
- Shared services → Worker client: references (evidence: `contentintel/services.py`)
- AI commands → AI gateway: uses gateway (evidence: `contentintel/ai/commands.py`)
- AI commands → Provider registry: uses registry (evidence: `contentintel/ai/commands.py`)
- AI gateway → Input safety: uses safety (evidence: `contentintel/ai/gateway.py`)
