# tissue-for-charlie/exam-kit architecture

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

- Interactive diagram: https://gitdiagram.com/tissue-for-charlie/exam-kit
- Repository: https://github.com/tissue-for-charlie/exam-kit

## Overview

exam-kit turns course slides and documents into three self-contained, offline review tools. The principal workflow scans and groups source files, extracts chapter text and image references, then relies on an Agent to prepare a knowledge skeleton and question bank before rendering an outline, interactive quiz, and knowledge graph. The README also documents wrong-question export and image-based Agent review. Extraction and renderer behavior are supported by sampled source; Agent preparation and several renderer capabilities are described in the README rather than sampled implementation.

Main entry points: [`scripts/render_quiz.py`](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_quiz.py) (Interactive Quiz), [`scripts/scan.py`](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/scan.py) (Chapter Scanner), [`scripts/extract.py`](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/extract.py) (Text Extractor), [`scripts/render_outline.py`](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_outline.py) (Knowledge Outline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Course Ingestion"]
  node_scanner["Chapter Scanner<br/>[scan.py]"]
  node_manifest["Chapter Manifest"]
  node_extractor["Text Extractor<br/>[extract.py]"]
  node_bundles["Chapter Bundles"]
end

subgraph group_preparation["Agent Preparation"]
  node_skeleton["Knowledge Skeleton"]
  node_questions["Question Bank"]
end

subgraph group_outputs["Review Products"]
  node_outline["Knowledge Outline<br/>[render_outline.py]"]
  node_quiz["Interactive Quiz<br/>[render_quiz.py]"]
  node_wrongbook["Wrong-Question Export<br/>[render_quiz.py]"]
  node_graph["Knowledge Graph<br/>[render_graph.py]"]
end

subgraph group_rendering["HTML Rendering"]
  node_htmlbase["HTML Foundation<br/>[html_common.py]"]
end

node_learner(("Course Materials"))
node_agent(("Review Agent"))

node_learner -->|"scans materials"| node_scanner
node_scanner -->|"writes groups"| node_manifest
node_manifest -->|"provides chapters"| node_extractor
node_extractor -->|"extracts content"| node_bundles
node_bundles -->|"informs review"| node_agent
node_agent -->|"prepares knowledge"| node_skeleton
node_agent -->|"prepares questions"| node_questions
node_skeleton -->|"renders outline"| node_outline
node_skeleton -->|"renders graph"| node_graph
node_skeleton -->|"supplies labels"| node_quiz
node_questions -->|"renders quiz"| node_quiz
node_quiz -->|"exports mistakes"| node_wrongbook

click node_scanner "https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/scan.py"
click node_extractor "https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/extract.py"
click node_outline "https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_outline.py"
click node_quiz "https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_quiz.py"
click node_wrongbook "https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_quiz.py"
click node_graph "https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_graph.py"
click node_htmlbase "https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/html_common.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_scanner,node_manifest,node_extractor,node_bundles,node_agent toneBlue
class node_skeleton,node_questions toneAmber
class node_outline,node_quiz,node_wrongbook,node_graph toneMint
class node_htmlbase toneRose
class node_learner toneIndigo
```

## Components

### Course Ingestion

- [Chapter Scanner](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/scan.py): `scripts/scan.py`
- **Chapter Manifest**
- [Text Extractor](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/extract.py): `scripts/extract.py`
- **Chapter Bundles**

### Agent Preparation

- **Knowledge Skeleton**
- **Question Bank**

### Review Products

- [Knowledge Outline](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_outline.py): `scripts/render_outline.py`
- [Interactive Quiz](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_quiz.py): `scripts/render_quiz.py`
- [Wrong-Question Export](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_quiz.py): `scripts/render_quiz.py`
- [Knowledge Graph](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/render_graph.py): `scripts/render_graph.py`

### HTML Rendering

- [HTML Foundation](https://github.com/tissue-for-charlie/exam-kit/blob/master/scripts/html_common.py): `scripts/html_common.py`

### Other components

- **Course Materials**
- **Review Agent**

## Connections

- Course Materials → Chapter Scanner: scans materials (evidence: `README.md`)
- Chapter Scanner → Chapter Manifest: writes groups (evidence: `scripts/scan.py`)
- Chapter Manifest → Text Extractor: provides chapters (evidence: `scripts/extract.py`)
- Text Extractor → Chapter Bundles: extracts content (evidence: `scripts/extract.py`)
- Chapter Bundles → Review Agent: informs review (evidence: `README.md`)
- Review Agent → Knowledge Skeleton: prepares knowledge (evidence: `README.md`)
- Review Agent → Question Bank: prepares questions (evidence: `README.md`)
- Knowledge Skeleton → Knowledge Outline: renders outline (evidence: `README.md`)
- Knowledge Skeleton → Knowledge Graph: renders graph (evidence: `README.md`)
- Knowledge Skeleton → Interactive Quiz: supplies labels (evidence: `scripts/render_quiz.py`)
- Question Bank → Interactive Quiz: renders quiz (evidence: `README.md`)
- Interactive Quiz → Wrong-Question Export: exports mistakes (evidence: `README.md`)
