# hexiaofeier/tanzi architecture

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

- Interactive diagram: https://gitdiagram.com/hexiaofeier/tanzi
- Repository: https://github.com/hexiaofeier/tanzi

## Overview

tanzi is an agent-operated, read-only workflow for collecting traceable public information across selected platforms. The principal flow is: frame a research question and search plan, choose and prepare channels, collect candidates, read available content, assess coverage and failures, then deliver a sourced list and report. The graph combines documented Skill capabilities with sampled WeChat and Xiaohongshu scripts; other platform routes are documented but their implementation is not present in the sampled source.

Main entry points: [`skills/tanzi/SKILL.md`](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/SKILL.md) (Compatible agent), [`skills/tanzi/scripts/wechat/cli.mjs`](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/wechat/cli.mjs) (WeChat CLI), [`skills/tanzi/scripts/wechat/collector.mjs`](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/wechat/collector.mjs) (WeChat collector), [`skills/tanzi/scripts/xhs-read.mjs`](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/xhs-read.mjs) (Xiaohongshu reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Research workflow"]
  node_agent["Compatible agent<br/>[SKILL.md]"]
  node_searchplan["Search planning<br/>[search-plan.md]"]
  node_routing["Channel routing<br/>[channels.md]"]
  node_setup["Tool and access checks<br/>[setup.md]"]
  node_wechatguide["WeChat guidance<br/>[wechat.md]"]
end

subgraph group_integrations["Collection integrations"]
  node_wechatcli["WeChat CLI<br/>[cli.mjs]"]
  node_collector["WeChat collector<br/>[collector.mjs]"]
  node_xhsread["Xiaohongshu reader<br/>[xhs-read.mjs]"]
end

subgraph group_evidence["Evidence delivery"]
  node_corpus["Evidence guidance<br/>[corpus.md]"]
  node_deliverables["Research deliverables"]
end

subgraph group_external["External systems"]
  node_user(("Researcher"))
  node_platformtools["Platform tools"]
  node_platforms["Public platforms"]
  node_sogou["Sogou WeChat search"]
  node_opencli["OpenCLI adapters"]
  node_browser["Browser extension"]
end

node_user -->|"requests research"| node_agent
node_agent -->|"plans queries"| node_searchplan
node_agent -->|"selects channels"| node_routing
node_agent -->|"checks access"| node_setup
node_agent -->|"uses tools"| node_platformtools
node_platformtools -->|"searches or reads"| node_platforms
node_agent -->|"follows guidance"| node_wechatguide
node_agent -->|"runs command"| node_wechatcli
node_wechatcli -->|"calls"| node_collector
node_collector -->|"requests pages"| node_sogou
node_agent -.->|"runs fallback"| node_xhsread
node_xhsread -->|"loads adapters"| node_opencli
node_opencli -->|"opens owned tab"| node_browser
node_browser -->|"reads visible content"| node_platforms
node_agent -->|"applies evidence rules"| node_corpus
node_agent -->|"produces report and list"| node_deliverables

click node_agent "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/SKILL.md"
click node_searchplan "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/search-plan.md"
click node_routing "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/channels.md"
click node_setup "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/setup.md"
click node_wechatguide "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/wechat.md"
click node_corpus "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/corpus.md"
click node_wechatcli "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/wechat/cli.mjs"
click node_collector "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/wechat/collector.mjs"
click node_xhsread "https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/xhs-read.mjs"

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_agent,node_searchplan,node_routing,node_setup,node_wechatguide toneBlue
class node_wechatcli,node_collector,node_xhsread toneAmber
class node_corpus,node_deliverables toneMint
class node_user,node_platformtools,node_platforms,node_sogou,node_opencli,node_browser toneRose
```

## Components

### Research workflow

- [Compatible agent](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/SKILL.md): `skills/tanzi/SKILL.md`
- [Search planning](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/search-plan.md): `skills/tanzi/references/search-plan.md`
- [Channel routing](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/channels.md): `skills/tanzi/references/channels.md`
- [Tool and access checks](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/setup.md): `skills/tanzi/references/setup.md`
- [WeChat guidance](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/wechat.md): `skills/tanzi/references/wechat.md`

### Collection integrations

- [WeChat CLI](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/wechat/cli.mjs): `skills/tanzi/scripts/wechat/cli.mjs`
- [WeChat collector](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/wechat/collector.mjs): `skills/tanzi/scripts/wechat/collector.mjs`
- [Xiaohongshu reader](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/scripts/xhs-read.mjs): `skills/tanzi/scripts/xhs-read.mjs`

### Evidence delivery

- [Evidence guidance](https://github.com/hexiaofeier/tanzi/blob/main/skills/tanzi/references/corpus.md): `skills/tanzi/references/corpus.md`
- **Research deliverables**

### External systems

- **Researcher**
- **Platform tools**
- **Public platforms**
- **Sogou WeChat search**
- **OpenCLI adapters**
- **Browser extension**

## Connections

- Researcher → Compatible agent: requests research
- Compatible agent → Search planning: plans queries
- Compatible agent → Channel routing: selects channels
- Compatible agent → Tool and access checks: checks access
- Compatible agent → Platform tools: uses tools
- Platform tools → Public platforms: searches or reads
- Compatible agent → WeChat guidance: follows guidance
- Compatible agent → WeChat CLI: runs command
- WeChat CLI → WeChat collector: calls
- WeChat collector → Sogou WeChat search: requests pages
- Compatible agent → Xiaohongshu reader: runs fallback
- Xiaohongshu reader → OpenCLI adapters: loads adapters
- OpenCLI adapters → Browser extension: opens owned tab
- Browser extension → Public platforms: reads visible content
- Compatible agent → Evidence guidance: applies evidence rules
- Compatible agent → Research deliverables: produces report and list
