# qingyuna/answer-me-with-html architecture

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

- Interactive diagram: https://gitdiagram.com/qingyuna/answer-me-with-html
- Repository: https://github.com/qingyuna/answer-me-with-html

## Overview

Answer me with HTML is an agent skill and CLI that turn a concise Markdown draft into a readable, self-contained HTML page or narrated explainer video. The main workflow runs from an agent’s draft through CLI parsing and validation to rendering, then saves the result for browser playback; video can also be exported as MP4. The README documents additional diagram, comparison, annotation, timeline, configuration, and always-on capabilities. Source excerpts show the page-rendering path clearly; some video internals and plugin behavior are represented only at subsystem level.

Main entry points: [`src/render.js`](https://github.com/qingyuna/answer-me-with-html/blob/main/src/render.js) (Page renderer), [`src/cli.js`](https://github.com/qingyuna/answer-me-with-html/blob/main/src/cli.js) (am CLI), [`src/video/render.js`](https://github.com/qingyuna/answer-me-with-html/blob/main/src/video/render.js) (Video renderer), [`src/video/tts.js`](https://github.com/qingyuna/answer-me-with-html/blob/main/src/video/tts.js) (Speech synthesis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Draft and CLI"]
  node_skill["Authoring skill<br/>[SKILL.md]"]
  node_draft["Markdown draft"]
  node_cli["am CLI<br/>[cli.js]"]
end

subgraph group_documents["Document processing"]
  node_parser["Draft parser<br/>[parse.js]"]
  node_lint["Writing lint<br/>[ste.js]"]
end

subgraph group_pages["Page rendering"]
  node_renderer["Page renderer<br/>[render.js]"]
  node_markdown["Markdown renderer<br/>[markdown.js]"]
  node_diagrams["Diagram components<br/>[flow.js]"]
  node_sequences["Sequence diagrams<br/>[sequence.js]"]
  node_trees["Tree diagrams<br/>[tree.js]"]
  node_templates["Page templates<br/>[panel.js]"]
  node_themes["Themes and CSS<br/>[index.js]"]
  node_svg["SVG layout tools<br/>[shapes.js]"]
  node_page["Interactive page runtime<br/>[page.js]"]
end

subgraph group_videos["Video production"]
  node_video["Video renderer<br/>[render.js]"]
  node_narration["Speech synthesis<br/>[tts.js]"]
  node_video_runtime["Video player runtime<br/>[video.js]"]
  node_export["MP4 export<br/>[export.js]"]
end

subgraph group_settings["Settings and integration"]
  node_config["CLI configuration<br/>[config.js]"]
  node_plugin["Always-on plugin hook<br/>[remind.mjs]"]
end

node_agent(("AI agent"))
node_voice_service["ElevenLabs"]
node_system_voice["System TTS"]
node_html_page["Generated HTML"]
node_browser(("Browser"))
node_mp4_file["MP4 file"]

node_agent -->|"uses"| node_skill
node_skill -->|"writes"| node_draft
node_draft -->|"passes draft"| node_cli
node_cli -->|"parses draft"| node_parser
node_cli -->|"renders page"| node_renderer
node_cli -->|"checks draft"| node_lint
node_renderer -->|"parses structure"| node_parser
node_renderer -->|"checks writing"| node_lint
node_renderer -->|"renders Markdown"| node_markdown
node_renderer -->|"uses template"| node_templates
node_renderer -->|"loads page styles"| node_themes
node_renderer -->|"dispatches components"| node_diagrams
node_diagrams -->|"uses SVG tools"| node_svg
node_sequences -->|"uses SVG tools"| node_svg
node_trees -->|"uses Markdown"| node_markdown
node_cli -->|"reads settings"| node_config
node_cli -->|"renders video"| node_video
node_video -->|"parses draft"| node_parser
node_video -->|"synthesizes narration"| node_narration
node_video -->|"renders scenes"| node_renderer
node_narration -.->|"requests speech"| node_voice_service
node_narration -.->|"synthesizes speech"| node_system_voice
node_video -.->|"embeds player"| node_video_runtime
node_video -->|"produces page"| node_html_page
node_cli -->|"exports MP4"| node_export
node_export -->|"writes MP4"| node_mp4_file
node_renderer -->|"produces HTML"| node_html_page
node_html_page -->|"opens page"| node_browser
node_plugin -.->|"reminds agent"| node_agent

click node_skill "https://github.com/qingyuna/answer-me-with-html/blob/main/skills/answer-me-with-html/SKILL.md"
click node_cli "https://github.com/qingyuna/answer-me-with-html/blob/main/src/cli.js"
click node_parser "https://github.com/qingyuna/answer-me-with-html/blob/main/src/parse.js"
click node_lint "https://github.com/qingyuna/answer-me-with-html/blob/main/src/lint/ste.js"
click node_renderer "https://github.com/qingyuna/answer-me-with-html/blob/main/src/render.js"
click node_markdown "https://github.com/qingyuna/answer-me-with-html/blob/main/src/markdown.js"
click node_diagrams "https://github.com/qingyuna/answer-me-with-html/blob/main/src/components/flow.js"
click node_sequences "https://github.com/qingyuna/answer-me-with-html/blob/main/src/components/sequence.js"
click node_trees "https://github.com/qingyuna/answer-me-with-html/blob/main/src/components/tree.js"
click node_templates "https://github.com/qingyuna/answer-me-with-html/blob/main/src/templates/panel.js"
click node_themes "https://github.com/qingyuna/answer-me-with-html/blob/main/src/themes/index.js"
click node_svg "https://github.com/qingyuna/answer-me-with-html/blob/main/src/svg/shapes.js"
click node_page "https://github.com/qingyuna/answer-me-with-html/blob/main/src/runtime/page.js"
click node_video "https://github.com/qingyuna/answer-me-with-html/blob/main/src/video/render.js"
click node_narration "https://github.com/qingyuna/answer-me-with-html/blob/main/src/video/tts.js"
click node_video_runtime "https://github.com/qingyuna/answer-me-with-html/blob/main/src/runtime/video.js"
click node_export "https://github.com/qingyuna/answer-me-with-html/blob/main/src/video/export.js"
click node_config "https://github.com/qingyuna/answer-me-with-html/blob/main/src/config.js"
click node_plugin "https://github.com/qingyuna/answer-me-with-html/blob/main/plugins/answer-me-with-html-always/hooks/remind.mjs"

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_draft,node_cli,node_browser toneBlue
class node_parser,node_lint toneAmber
class node_renderer,node_markdown,node_diagrams,node_sequences,node_trees,node_templates,node_themes,node_svg,node_page toneMint
class node_video,node_narration,node_video_runtime,node_export toneRose
class node_config,node_plugin,node_agent,node_voice_service,node_system_voice,node_html_page,node_mp4_file toneIndigo
```

## Components

### Draft and CLI

- [Authoring skill](https://github.com/qingyuna/answer-me-with-html/blob/main/skills/answer-me-with-html/SKILL.md): `skills/answer-me-with-html/SKILL.md`
- **Markdown draft**
- [am CLI](https://github.com/qingyuna/answer-me-with-html/blob/main/src/cli.js): `src/cli.js`

### Document processing

- [Draft parser](https://github.com/qingyuna/answer-me-with-html/blob/main/src/parse.js): `src/parse.js`
- [Writing lint](https://github.com/qingyuna/answer-me-with-html/blob/main/src/lint/ste.js): `src/lint/ste.js`

### Page rendering

- [Page renderer](https://github.com/qingyuna/answer-me-with-html/blob/main/src/render.js): `src/render.js`
- [Markdown renderer](https://github.com/qingyuna/answer-me-with-html/blob/main/src/markdown.js): `src/markdown.js`
- [Diagram components](https://github.com/qingyuna/answer-me-with-html/blob/main/src/components/flow.js): `src/components/flow.js`
- [Sequence diagrams](https://github.com/qingyuna/answer-me-with-html/blob/main/src/components/sequence.js): `src/components/sequence.js`
- [Tree diagrams](https://github.com/qingyuna/answer-me-with-html/blob/main/src/components/tree.js): `src/components/tree.js`
- [Page templates](https://github.com/qingyuna/answer-me-with-html/blob/main/src/templates/panel.js): `src/templates/panel.js`
- [Themes and CSS](https://github.com/qingyuna/answer-me-with-html/blob/main/src/themes/index.js): `src/themes/index.js`
- [SVG layout tools](https://github.com/qingyuna/answer-me-with-html/blob/main/src/svg/shapes.js): `src/svg/shapes.js`
- [Interactive page runtime](https://github.com/qingyuna/answer-me-with-html/blob/main/src/runtime/page.js): `src/runtime/page.js`

### Video production

- [Video renderer](https://github.com/qingyuna/answer-me-with-html/blob/main/src/video/render.js): `src/video/render.js`
- [Speech synthesis](https://github.com/qingyuna/answer-me-with-html/blob/main/src/video/tts.js): `src/video/tts.js`
- [Video player runtime](https://github.com/qingyuna/answer-me-with-html/blob/main/src/runtime/video.js): `src/runtime/video.js`
- [MP4 export](https://github.com/qingyuna/answer-me-with-html/blob/main/src/video/export.js): `src/video/export.js`

### Settings and integration

- [CLI configuration](https://github.com/qingyuna/answer-me-with-html/blob/main/src/config.js): `src/config.js`
- [Always-on plugin hook](https://github.com/qingyuna/answer-me-with-html/blob/main/plugins/answer-me-with-html-always/hooks/remind.mjs): `plugins/answer-me-with-html-always/hooks/remind.mjs`

### Other components

- **AI agent**
- **ElevenLabs**
- **System TTS**
- **Generated HTML**
- **Browser**
- **MP4 file**

## Connections

- AI agent → Authoring skill: uses (evidence: `README.md`)
- Authoring skill → Markdown draft: writes (evidence: `README.md`)
- Markdown draft → am CLI: passes draft (evidence: `README.md`)
- am CLI → Draft parser: parses draft (evidence: `src/cli.js`)
- am CLI → Page renderer: renders page (evidence: `src/cli.js`)
- am CLI → Writing lint: checks draft (evidence: `src/cli.js`)
- Page renderer → Draft parser: parses structure (evidence: `src/render.js`)
- Page renderer → Writing lint: checks writing (evidence: `src/render.js`)
- Page renderer → Markdown renderer: renders Markdown (evidence: `src/render.js`)
- Page renderer → Page templates: uses template (evidence: `src/render.js`)
- Page renderer → Themes and CSS: loads page styles (evidence: `src/render.js`)
- Page renderer → Diagram components: dispatches components (evidence: `src/render.js`)
- Diagram components → SVG layout tools: uses SVG tools (evidence: `src/components/flow.js`)
- Sequence diagrams → SVG layout tools: uses SVG tools (evidence: `src/components/sequence.js`)
- Tree diagrams → Markdown renderer: uses Markdown (evidence: `src/components/tree.js`)
- am CLI → CLI configuration: reads settings (evidence: `src/cli.js`)
- am CLI → Video renderer: renders video (evidence: `src/cli.js`)
- Video renderer → Draft parser: parses draft (evidence: `src/video/render.js`)
- Video renderer → Speech synthesis: synthesizes narration (evidence: `src/video/render.js`)
- Video renderer → Page renderer: renders scenes (evidence: `src/video/render.js`)
- Speech synthesis → ElevenLabs: requests speech (evidence: `src/video/tts.js`)
- Speech synthesis → System TTS: synthesizes speech (evidence: `src/video/tts.js`)
- Video renderer → Video player runtime: embeds player
- Video renderer → Generated HTML: produces page (evidence: `README.md`)
- am CLI → MP4 export: exports MP4 (evidence: `src/cli.js`)
- MP4 export → MP4 file: writes MP4 (evidence: `README.md`)
- Page renderer → Generated HTML: produces HTML (evidence: `src/render.js`)
- Generated HTML → Browser: opens page (evidence: `README.md`)
- Always-on plugin hook → AI agent: reminds agent
