# chase-qisiai/juyouci architecture

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

- Interactive diagram: https://gitdiagram.com/chase-qisiai/juyouci
- Repository: https://github.com/chase-qisiai/juyouci

## Overview

剧有词 is a Codex/Skills agent workflow that turns a requested episode into a curated vocabulary deck and adds it to one reusable, offline HTML learner. The learner supports deck selection, flashcard self-rating, optional typed recall with retries, and per-deck progress. The builder’s validation and merge behavior is visible in source; episode research and learner internals are documented but their implementations were not sampled.

Main entry points: [`SKILL.md`](https://github.com/chase-qisiai/juyouci/blob/main/SKILL.md) (Episode workflow), [`scripts/build_html.py`](https://github.com/chase-qisiai/juyouci/blob/main/scripts/build_html.py) (Validate and merge), [`assets/study.html`](https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html) (Deck selection), [`references/subtitle-sources.md`](https://github.com/chase-qisiai/juyouci/blob/main/references/subtitle-sources.md) (Verified subtitles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_episode["Episode preparation"]
  node_agent["Episode workflow<br/>[SKILL.md]"]
  node_subtitle["Verified subtitles"]
  node_curation["Vocabulary curation<br/>[SKILL.md]"]
end

subgraph group_assembly["Deck assembly"]
  node_deck["Episode deck<br/>[data-format.md]"]
  node_builder["Validate and merge<br/>[build_html.py]"]
end

subgraph group_learning["HTML learning"]
  node_template["Learner template<br/>[study.html]"]
  node_page["Reusable HTML"]
  node_deck_select["Deck selection<br/>[study.html]"]
  node_flashcards["Flashcard review<br/>[study.html]"]
  node_typed["Typed recall<br/>[study.html]"]
  node_retry["Mistake retry<br/>[study.html]"]
  node_progress[("Practice progress<br/>[study.html]")]
end

node_user(("Learner"))
node_browser[("Browser storage")]

node_user -->|"requests episode"| node_agent
node_agent -->|"verifies source"| node_subtitle
node_agent -->|"selects expressions"| node_curation
node_subtitle -->|"supplies transcript"| node_curation
node_curation -->|"creates deck"| node_deck
node_agent -->|"invokes generation"| node_builder
node_builder -->|"validates deck"| node_deck
node_builder -->|"reads template"| node_template
node_builder -->|"writes HTML"| node_page
node_template -->|"renders learner"| node_page
node_user -->|"chooses deck"| node_deck_select
node_deck_select -->|"starts review"| node_flashcards
node_deck_select -->|"switches mode"| node_typed
node_typed -->|"queues mistakes"| node_retry
node_flashcards -->|"updates progress"| node_progress
node_typed -->|"updates progress"| node_progress
node_progress -->|"persists locally"| node_browser

click node_agent "https://github.com/chase-qisiai/juyouci/blob/main/SKILL.md"
click node_subtitle "https://github.com/chase-qisiai/juyouci/blob/main/references/subtitle-sources.md"
click node_curation "https://github.com/chase-qisiai/juyouci/blob/main/SKILL.md"
click node_deck "https://github.com/chase-qisiai/juyouci/blob/main/references/data-format.md"
click node_builder "https://github.com/chase-qisiai/juyouci/blob/main/scripts/build_html.py"
click node_template "https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html"
click node_deck_select "https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html"
click node_flashcards "https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html"
click node_typed "https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html"
click node_retry "https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html"
click node_progress "https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html"

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_subtitle,node_curation toneBlue
class node_deck,node_builder,node_browser toneAmber
class node_template,node_page,node_deck_select,node_flashcards,node_typed,node_retry,node_progress toneMint
class node_user toneIndigo
```

## Components

### Episode preparation

- [Episode workflow](https://github.com/chase-qisiai/juyouci/blob/main/SKILL.md): `SKILL.md`
- [Verified subtitles](https://github.com/chase-qisiai/juyouci/blob/main/references/subtitle-sources.md): `references/subtitle-sources.md`
- [Vocabulary curation](https://github.com/chase-qisiai/juyouci/blob/main/SKILL.md): `SKILL.md`

### Deck assembly

- [Episode deck](https://github.com/chase-qisiai/juyouci/blob/main/references/data-format.md): `references/data-format.md`
- [Validate and merge](https://github.com/chase-qisiai/juyouci/blob/main/scripts/build_html.py): `scripts/build_html.py`

### HTML learning

- [Learner template](https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html): `assets/study.html`
- **Reusable HTML**
- [Deck selection](https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html): `assets/study.html`
- [Flashcard review](https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html): `assets/study.html`
- [Typed recall](https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html): `assets/study.html`
- [Mistake retry](https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html): `assets/study.html`
- [Practice progress](https://github.com/chase-qisiai/juyouci/blob/main/assets/study.html): `assets/study.html`

### Other components

- **Learner**
- **Browser storage**

## Connections

- Learner → Episode workflow: requests episode (evidence: `README.md`)
- Episode workflow → Verified subtitles: verifies source (evidence: `README.md`)
- Episode workflow → Vocabulary curation: selects expressions (evidence: `README.md`)
- Verified subtitles → Vocabulary curation: supplies transcript (evidence: `README.md`)
- Vocabulary curation → Episode deck: creates deck (evidence: `README.md`)
- Episode workflow → Validate and merge: invokes generation (evidence: `README.md`)
- Validate and merge → Episode deck: validates deck (evidence: `scripts/build_html.py`)
- Validate and merge → Learner template: reads template (evidence: `scripts/build_html.py`)
- Validate and merge → Reusable HTML: writes HTML (evidence: `scripts/build_html.py`)
- Learner template → Reusable HTML: renders learner (evidence: `README.md`)
- Learner → Deck selection: chooses deck (evidence: `README.md`)
- Deck selection → Flashcard review: starts review (evidence: `README.md`)
- Deck selection → Typed recall: switches mode (evidence: `README.md`)
- Typed recall → Mistake retry: queues mistakes (evidence: `README.md`)
- Flashcard review → Practice progress: updates progress (evidence: `README.md`)
- Typed recall → Practice progress: updates progress (evidence: `README.md`)
- Practice progress → Browser storage: persists locally (evidence: `README.md`)
