# 20240610ldx-hub/mao-chiang-wisdom-skills architecture

> Architecture diagram of the GitHub repository 20240610ldx-hub/mao-chiang-wisdom-skills, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/20240610ldx-hub/mao-chiang-wisdom-skills
- Repository: https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills

## Overview

The repository publishes two installable historical-reasoning Skills and a reusable Debate Arena. The main user workflow is either to install a Skill and use its framework in Codex, or run the Arena with two Skill files to generate a staged debate transcript, optionally adding fact-checking and a judge report. The graph also shows the Skills’ supporting materials and selected published evaluations and debate artifacts. Arena control flow is based on sampled source; broader Skill behavior is described by the README rather than runtime code.

Main entry points: [`debate_arena/orchestrator.py`](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/orchestrator.py) (Debate runner), [`skills/mao-zedong-wisdom/SKILL.md`](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/skills/mao-zedong-wisdom/SKILL.md) (Mao Skill), [`debate_arena/cli.py`](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/cli.py) (CLI entry), [`debate_arena/loader.py`](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/loader.py) (Skill loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_skills["Reasoning Skills"]
  node_mao["Mao Skill<br/>[SKILL.md]"]
  node_mao_assets["Mao principles"]
  node_mao_refs["Evidence and voice"]
  node_chiang["Chiang Skill<br/>[SKILL.md]"]
end

subgraph group_arena["Debate Arena"]
  node_cli["CLI entry<br/>[cli.py]"]
  node_config["Runtime config<br/>[config.py]"]
  node_runner["Debate runner<br/>[orchestrator.py]"]
  node_loader["Skill loader<br/>[loader.py]"]
  node_prompting["Prompt rendering<br/>[prompting.py]"]
  node_prompts["Debate prompts"]
  node_models["Debate records<br/>[models.py]"]
  node_llm["LLM provider<br/>[llm_client.py]"]
  node_renderer["Markdown renderer<br/>[render.py]"]
end

subgraph group_published["Published Records"]
  node_debate_records["Debate artifacts"]
  node_evaluations["Skill evaluations"]
end

node_user(("Skill user"))
node_service(("LLM service"))
node_transcript["Debate transcript"]

node_user -->|"uses"| node_mao
node_user -->|"uses"| node_chiang
node_mao -->|"references as needed"| node_mao_assets
node_mao -->|"references as needed"| node_mao_refs
node_user -->|"runs"| node_cli
node_cli -->|"builds config"| node_config
node_cli -->|"starts debate"| node_runner
node_runner -->|"loads Skills"| node_loader
node_loader -->|"reads input"| node_mao
node_loader -->|"reads input"| node_chiang
node_runner -->|"renders prompts"| node_prompting
node_prompting -->|"loads templates"| node_prompts
node_runner -->|"requests completions"| node_llm
node_llm -.->|"sends requests"| node_service
node_runner -->|"builds transcript"| node_models
node_runner -->|"renders transcript"| node_renderer
node_renderer -->|"produces Markdown"| node_transcript
node_user -->|"reviews"| node_evaluations
node_user -->|"reviews"| node_debate_records

click node_mao "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/skills/mao-zedong-wisdom/SKILL.md"
click node_mao_assets "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/skills/mao-zedong-wisdom/assets"
click node_mao_refs "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/skills/mao-zedong-wisdom/references"
click node_chiang "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/skills/chiang-kai-shek-wisdom/SKILL.md"
click node_cli "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/cli.py"
click node_config "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/config.py"
click node_runner "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/orchestrator.py"
click node_loader "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/loader.py"
click node_prompting "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/prompting.py"
click node_prompts "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/debate_arena/prompts"
click node_models "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/models.py"
click node_llm "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/llm_client.py"
click node_renderer "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/render.py"
click node_debate_records "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/debates/mao-vs-chiang"
click node_evaluations "https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/evaluations"

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_mao,node_mao_assets,node_mao_refs,node_chiang,node_user toneBlue
class node_cli,node_config,node_runner,node_loader,node_prompting,node_prompts,node_models,node_llm,node_renderer toneAmber
class node_debate_records,node_evaluations toneMint
class node_service,node_transcript toneIndigo
```

## Components

### Reasoning Skills

- [Mao Skill](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/skills/mao-zedong-wisdom/SKILL.md): `skills/mao-zedong-wisdom/SKILL.md`
- [Mao principles](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/skills/mao-zedong-wisdom/assets): `skills/mao-zedong-wisdom/assets`
- [Evidence and voice](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/skills/mao-zedong-wisdom/references): `skills/mao-zedong-wisdom/references`
- [Chiang Skill](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/skills/chiang-kai-shek-wisdom/SKILL.md): `skills/chiang-kai-shek-wisdom/SKILL.md`

### Debate Arena

- [CLI entry](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/cli.py): `debate_arena/cli.py`
- [Runtime config](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/config.py): `debate_arena/config.py`
- [Debate runner](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/orchestrator.py): `debate_arena/orchestrator.py`
- [Skill loader](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/loader.py): `debate_arena/loader.py`
- [Prompt rendering](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/prompting.py): `debate_arena/prompting.py`
- [Debate prompts](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/debate_arena/prompts): `debate_arena/prompts`
- [Debate records](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/models.py): `debate_arena/models.py`
- [LLM provider](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/llm_client.py): `debate_arena/llm_client.py`
- [Markdown renderer](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/blob/main/debate_arena/render.py): `debate_arena/render.py`

### Published Records

- [Debate artifacts](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/debates/mao-vs-chiang): `debates/mao-vs-chiang`
- [Skill evaluations](https://github.com/20240610ldx-hub/mao-chiang-wisdom-skills/tree/main/evaluations): `evaluations`

### Other components

- **Skill user**
- **LLM service**
- **Debate transcript**

## Connections

- Skill user → Mao Skill: uses
- Skill user → Chiang Skill: uses
- Mao Skill → Mao principles: references as needed
- Mao Skill → Evidence and voice: references as needed
- Skill user → CLI entry: runs
- CLI entry → Runtime config: builds config
- CLI entry → Debate runner: starts debate
- Debate runner → Skill loader: loads Skills
- Skill loader → Mao Skill: reads input
- Skill loader → Chiang Skill: reads input
- Debate runner → Prompt rendering: renders prompts
- Prompt rendering → Debate prompts: loads templates
- Debate runner → LLM provider: requests completions
- LLM provider → LLM service: sends requests
- Debate runner → Debate records: builds transcript
- Debate runner → Markdown renderer: renders transcript
- Markdown renderer → Debate transcript: produces Markdown
- Skill user → Skill evaluations: reviews
- Skill user → Debate artifacts: reviews
