# gaoyiiiii/visual-thinking architecture

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

- Interactive diagram: https://gitdiagram.com/gaoyiiiii/visual-thinking
- Repository: https://github.com/gaoyiiiii/visual-thinking

## Overview

Visual Thinking is a Codex-style AI skill for turning a user’s question into an editable visual-thinking diagram. Its main workflow is to interpret the question, identify relationships and evidence needs, select a suitable structure, draw and explain it, then let the user revise it. The repository is primarily skill guidance, reference material, and a library of diagram skeletons—not a standalone application. An optional local renderer converts SVG to PNG and reports layout diagnostics; sampled scripts show that it uses Playwright and the SVG inspector. Unsampled reference and asset details are represented at directory level.

Main entry points: [`SKILL.md`](https://github.com/gaoyiiiii/visual-thinking/blob/main/SKILL.md) (Skill instructions), [`scripts/render-svg.cjs`](https://github.com/gaoyiiiii/visual-thinking/blob/main/scripts/render-svg.cjs) (SVG renderer), [`scripts/apply-theme.cjs`](https://github.com/gaoyiiiii/visual-thinking/blob/main/scripts/apply-theme.cjs) (Theme applicator), [`assets/examples`](https://github.com/gaoyiiiii/visual-thinking/tree/main/assets/examples) (Example diagrams)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guidance["Skill workflow"]
  node_skill["Skill instructions<br/>[SKILL.md]"]
  node_examples["Example diagrams"]
end

subgraph group_knowledge["Methods and structures"]
  node_research["Research guidance"]
  node_evidence["Evidence boundaries"]
  node_methods["Thinking methods"]
  node_skeletons["Diagram skeletons"]
  node_skeleton_index["Skeleton index"]
  node_recognition["Visual recognition"]
end

subgraph group_output["Diagram output"]
  node_diagram["SVG diagram"]
  node_themes["Theme definitions<br/>[themes.json]"]
  node_theme_apply["Theme applicator<br/>[apply-theme.cjs]"]
  node_renderer["SVG renderer<br/>[render-svg.cjs]"]
  node_inspector["SVG inspector<br/>[inspect-svg.cjs]"]
  node_png["Rendered image"]
end

node_user(("User"))
node_ai(("AI client"))

node_user -->|"asks question"| node_ai
node_ai -->|"invokes skill"| node_skill
node_skill -->|"guides research"| node_research
node_skill -->|"sets boundaries"| node_evidence
node_skill -->|"selects method"| node_methods
node_skill -->|"consults index"| node_skeleton_index
node_skill -->|"uses structures"| node_skeletons
node_skill -->|"shows examples"| node_examples
node_skill -->|"supports recognition"| node_recognition
node_ai -->|"creates diagram"| node_diagram
node_user -->|"requests revision"| node_ai
node_ai -.->|"applies theme"| node_theme_apply
node_theme_apply -->|"reads definitions"| node_themes
node_theme_apply -->|"updates SVG"| node_diagram
node_ai -.->|"requests rendering"| node_renderer
node_renderer -->|"inspects SVG"| node_inspector
node_renderer -->|"renders PNG"| node_png
node_renderer -.->|"reads SVG"| node_diagram

click node_skill "https://github.com/gaoyiiiii/visual-thinking/blob/main/SKILL.md"
click node_examples "https://github.com/gaoyiiiii/visual-thinking/tree/main/assets/examples"
click node_research "https://github.com/gaoyiiiii/visual-thinking/blob/main/references/research-planning.md"
click node_evidence "https://github.com/gaoyiiiii/visual-thinking/blob/main/references/evidence-and-boundaries.md"
click node_methods "https://github.com/gaoyiiiii/visual-thinking/tree/main/references"
click node_skeletons "https://github.com/gaoyiiiii/visual-thinking/tree/main/assets/skeletons"
click node_skeleton_index "https://github.com/gaoyiiiii/visual-thinking/blob/main/assets/skeleton-index.json"
click node_recognition "https://github.com/gaoyiiiii/visual-thinking/blob/main/references/visual-recognition.md"
click node_themes "https://github.com/gaoyiiiii/visual-thinking/blob/main/assets/themes.json"
click node_theme_apply "https://github.com/gaoyiiiii/visual-thinking/blob/main/scripts/apply-theme.cjs"
click node_renderer "https://github.com/gaoyiiiii/visual-thinking/blob/main/scripts/render-svg.cjs"
click node_inspector "https://github.com/gaoyiiiii/visual-thinking/blob/main/scripts/inspect-svg.cjs"

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,node_examples,node_user,node_ai toneBlue
class node_research,node_evidence,node_methods,node_skeletons,node_skeleton_index,node_recognition toneAmber
class node_diagram,node_themes,node_theme_apply,node_renderer,node_inspector,node_png toneMint
```

## Components

### Skill workflow

- [Skill instructions](https://github.com/gaoyiiiii/visual-thinking/blob/main/SKILL.md): `SKILL.md`
- [Example diagrams](https://github.com/gaoyiiiii/visual-thinking/tree/main/assets/examples): `assets/examples`

### Methods and structures

- [Research guidance](https://github.com/gaoyiiiii/visual-thinking/blob/main/references/research-planning.md): `references/research-planning.md`
- [Evidence boundaries](https://github.com/gaoyiiiii/visual-thinking/blob/main/references/evidence-and-boundaries.md): `references/evidence-and-boundaries.md`
- [Thinking methods](https://github.com/gaoyiiiii/visual-thinking/tree/main/references): `references`
- [Diagram skeletons](https://github.com/gaoyiiiii/visual-thinking/tree/main/assets/skeletons): `assets/skeletons`
- [Skeleton index](https://github.com/gaoyiiiii/visual-thinking/blob/main/assets/skeleton-index.json): `assets/skeleton-index.json`
- [Visual recognition](https://github.com/gaoyiiiii/visual-thinking/blob/main/references/visual-recognition.md): `references/visual-recognition.md`

### Diagram output

- **SVG diagram**
- [Theme definitions](https://github.com/gaoyiiiii/visual-thinking/blob/main/assets/themes.json): `assets/themes.json`
- [Theme applicator](https://github.com/gaoyiiiii/visual-thinking/blob/main/scripts/apply-theme.cjs): `scripts/apply-theme.cjs`
- [SVG renderer](https://github.com/gaoyiiiii/visual-thinking/blob/main/scripts/render-svg.cjs): `scripts/render-svg.cjs`
- [SVG inspector](https://github.com/gaoyiiiii/visual-thinking/blob/main/scripts/inspect-svg.cjs): `scripts/inspect-svg.cjs`
- **Rendered image**

### Other components

- **User**
- **AI client**

## Connections

- User → AI client: asks question (evidence: `README.md`)
- AI client → Skill instructions: invokes skill (evidence: `README.md`)
- Skill instructions → Research guidance: guides research (evidence: `README.md`)
- Skill instructions → Evidence boundaries: sets boundaries (evidence: `README.md`)
- Skill instructions → Thinking methods: selects method (evidence: `README.md`)
- Skill instructions → Skeleton index: consults index (evidence: `README.md`)
- Skill instructions → Diagram skeletons: uses structures (evidence: `README.md`)
- Skill instructions → Example diagrams: shows examples (evidence: `README.md`)
- Skill instructions → Visual recognition: supports recognition (evidence: `README.md`)
- AI client → SVG diagram: creates diagram (evidence: `README.md`)
- User → AI client: requests revision (evidence: `README.md`)
- AI client → Theme applicator: applies theme
- Theme applicator → Theme definitions: reads definitions (evidence: `scripts/apply-theme.cjs`)
- Theme applicator → SVG diagram: updates SVG (evidence: `scripts/apply-theme.cjs`)
- AI client → SVG renderer: requests rendering
- SVG renderer → SVG inspector: inspects SVG (evidence: `scripts/render-svg.cjs`)
- SVG renderer → Rendered image: renders PNG (evidence: `scripts/render-svg.cjs`)
- SVG renderer → SVG diagram: reads SVG
