# lyra81604/zhengxi-views architecture

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

- Interactive diagram: https://gitdiagram.com/lyra81604/zhengxi-views
- Repository: https://github.com/lyra81604/zhengxi-views

## Overview

This is an Agent Skill for evidence-grounded research on fund manager Zheng Xi, not a standalone application. Its principal workflow turns a user question into cited corpus retrieval and an answer; other documented branches support method-based analysis, style imitation, portfolio/performance checks, and all-market fund comparison or scoring. Source excerpts show the corpus search, fund lookup, fetching, and scoring mechanics. The skill’s runtime orchestration and several README-described capabilities are not shown in source excerpts, so those links are documented or left unverified rather than inferred from imports.

Main entry points: [`SKILL.md`](https://github.com/lyra81604/zhengxi-views/blob/main/SKILL.md) (Zheng Xi Skill), [`scripts/score_fund.py`](https://github.com/lyra81604/zhengxi-views/blob/main/scripts/score_fund.py) (Fund evidence and metrics), [`scripts/fetch_any_fund.py`](https://github.com/lyra81604/zhengxi-views/blob/main/scripts/fetch_any_fund.py) (Any-fund fetch), [`scripts/fetch_fund_data.py`](https://github.com/lyra81604/zhengxi-views/blob/main/scripts/fetch_fund_data.py) (Managed-fund refresh)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guidance["Skill guidance"]
  node_skill["Zheng Xi Skill<br/>[SKILL.md]"]
end

subgraph group_knowledge["Research knowledge"]
  node_method["Investment method<br/>[method.md]"]
  node_scorecard["Six-dimension scorecard<br/>[scorecard.md]"]
  node_corpus[("Original-text corpus")]
  node_corpus_index[("Corpus index<br/>[corpus_index.json]")]
  node_search["Corpus search<br/>[search_corpus.py]"]
end

subgraph group_lookup["Fund discovery"]
  node_market_list[("All-fund list<br/>[fund_list.json]")]
  node_fund_lookup["Fund lookup<br/>[fund_lookup.py]"]
end

subgraph group_data["Fund data"]
  node_fund_snapshots[("Zheng Xi fund snapshots")]
  node_fetch_managed["Managed-fund refresh<br/>[fetch_fund_data.py]"]
  node_fetch_any["Any-fund fetch<br/>[fetch_any_fund.py]"]
end

subgraph group_analysis["Fund analysis"]
  node_score["Fund evidence and metrics<br/>[score_fund.py]"]
end

node_researcher(("Researcher"))
node_market_data{{"Public fund data services"}}

node_researcher -->|"asks question"| node_skill
node_skill -.->|"retrieves evidence"| node_search
node_search -->|"searches text"| node_corpus
node_skill -.->|"applies framework"| node_method
node_skill -.->|"scores by"| node_scorecard
node_skill -->|"checks holdings"| node_fund_snapshots
node_skill -->|"finds market funds"| node_market_list
node_fund_lookup -->|"searches list"| node_market_list
node_fetch_managed -->|"fetches disclosures"| node_market_data
node_fetch_any -->|"reuses parsers"| node_fetch_managed
node_fetch_any -->|"fetches disclosures"| node_market_data
node_score -->|"resolves fund"| node_market_list
node_score -->|"reads snapshots"| node_fund_snapshots
node_score -->|"fetches if missing"| node_fetch_any
node_score -->|"uses return metrics"| node_fetch_managed
node_corpus_index -.->|"indexes documents"| node_corpus
node_skill -.->|"finds fund codes"| node_fund_lookup
node_skill -.->|"compares funds"| node_fetch_any
node_skill -.->|"prepares scoring"| node_score

click node_skill "https://github.com/lyra81604/zhengxi-views/blob/main/SKILL.md"
click node_method "https://github.com/lyra81604/zhengxi-views/blob/main/references/method.md"
click node_scorecard "https://github.com/lyra81604/zhengxi-views/blob/main/references/scorecard.md"
click node_corpus "https://github.com/lyra81604/zhengxi-views/tree/main/references/corpus"
click node_corpus_index "https://github.com/lyra81604/zhengxi-views/blob/main/references/corpus_index.json"
click node_search "https://github.com/lyra81604/zhengxi-views/blob/main/scripts/search_corpus.py"
click node_fund_snapshots "https://github.com/lyra81604/zhengxi-views/tree/main/references/fund_data"
click node_market_list "https://github.com/lyra81604/zhengxi-views/blob/main/references/all_funds/fund_list.json"
click node_fund_lookup "https://github.com/lyra81604/zhengxi-views/blob/main/scripts/fund_lookup.py"
click node_fetch_managed "https://github.com/lyra81604/zhengxi-views/blob/main/scripts/fetch_fund_data.py"
click node_fetch_any "https://github.com/lyra81604/zhengxi-views/blob/main/scripts/fetch_any_fund.py"
click node_score "https://github.com/lyra81604/zhengxi-views/blob/main/scripts/score_fund.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_skill toneBlue
class node_method,node_scorecard,node_corpus,node_corpus_index,node_search toneAmber
class node_market_list,node_fund_lookup toneMint
class node_fund_snapshots,node_fetch_managed,node_fetch_any toneRose
class node_score,node_researcher,node_market_data toneIndigo
```

## Components

### Skill guidance

- [Zheng Xi Skill](https://github.com/lyra81604/zhengxi-views/blob/main/SKILL.md): `SKILL.md`

### Research knowledge

- [Investment method](https://github.com/lyra81604/zhengxi-views/blob/main/references/method.md): `references/method.md`
- [Six-dimension scorecard](https://github.com/lyra81604/zhengxi-views/blob/main/references/scorecard.md): `references/scorecard.md`
- [Original-text corpus](https://github.com/lyra81604/zhengxi-views/tree/main/references/corpus): `references/corpus`
- [Corpus index](https://github.com/lyra81604/zhengxi-views/blob/main/references/corpus_index.json): `references/corpus_index.json`
- [Corpus search](https://github.com/lyra81604/zhengxi-views/blob/main/scripts/search_corpus.py): `scripts/search_corpus.py`

### Fund discovery

- [All-fund list](https://github.com/lyra81604/zhengxi-views/blob/main/references/all_funds/fund_list.json): `references/all_funds/fund_list.json`
- [Fund lookup](https://github.com/lyra81604/zhengxi-views/blob/main/scripts/fund_lookup.py): `scripts/fund_lookup.py`

### Fund data

- [Zheng Xi fund snapshots](https://github.com/lyra81604/zhengxi-views/tree/main/references/fund_data): `references/fund_data`
- [Managed-fund refresh](https://github.com/lyra81604/zhengxi-views/blob/main/scripts/fetch_fund_data.py): `scripts/fetch_fund_data.py`
- [Any-fund fetch](https://github.com/lyra81604/zhengxi-views/blob/main/scripts/fetch_any_fund.py): `scripts/fetch_any_fund.py`

### Fund analysis

- [Fund evidence and metrics](https://github.com/lyra81604/zhengxi-views/blob/main/scripts/score_fund.py): `scripts/score_fund.py`

### Other components

- **Researcher**
- **Public fund data services**

## Connections

- Researcher → Zheng Xi Skill: asks question (evidence: `README.md`)
- Zheng Xi Skill → Corpus search: retrieves evidence
- Corpus search → Original-text corpus: searches text (evidence: `scripts/search_corpus.py`)
- Zheng Xi Skill → Investment method: applies framework
- Zheng Xi Skill → Six-dimension scorecard: scores by
- Zheng Xi Skill → Zheng Xi fund snapshots: checks holdings (evidence: `README.md`)
- Zheng Xi Skill → All-fund list: finds market funds (evidence: `README.md`)
- Fund lookup → All-fund list: searches list (evidence: `scripts/fund_lookup.py`)
- Managed-fund refresh → Public fund data services: fetches disclosures (evidence: `scripts/fetch_fund_data.py`)
- Any-fund fetch → Managed-fund refresh: reuses parsers (evidence: `scripts/fetch_any_fund.py`)
- Any-fund fetch → Public fund data services: fetches disclosures (evidence: `scripts/fetch_any_fund.py`)
- Fund evidence and metrics → All-fund list: resolves fund (evidence: `scripts/score_fund.py`)
- Fund evidence and metrics → Zheng Xi fund snapshots: reads snapshots (evidence: `scripts/score_fund.py`)
- Fund evidence and metrics → Any-fund fetch: fetches if missing (evidence: `scripts/score_fund.py`)
- Fund evidence and metrics → Managed-fund refresh: uses return metrics (evidence: `scripts/score_fund.py`)
- Corpus index → Original-text corpus: indexes documents
- Zheng Xi Skill → Fund lookup: finds fund codes
- Zheng Xi Skill → Any-fund fetch: compares funds
- Zheng Xi Skill → Fund evidence and metrics: prepares scoring
