# exsinger-hub/sivia architecture

> Architecture diagram of the GitHub repository exsinger-hub/sivia, 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/exsinger-hub/sivia
- Repository: https://github.com/exsinger-hub/sivia

## Overview

Sivia is a scientific-figure plugin for Codex and Claude Code. Its main workflow turns a paper into a method overview, lets the user approve the design, then delivers an editable PowerPoint and preview; it also supports figure reconstruction and editable draw.io output. Knowledge-base references and local revisions are supporting capabilities. The map combines README-documented workflows with source-index evidence for the server modules; unsampled runtime wiring is not asserted.

Main entry points: [`scripts/server.mjs`](https://github.com/exsinger-hub/sivia/blob/main/scripts/server.mjs) (Draw.io server), [`scripts/powerpoint-server.mjs`](https://github.com/exsinger-hub/sivia/blob/main/scripts/powerpoint-server.mjs) (PowerPoint server), [`skills/design-scientific-figure/SKILL.md`](https://github.com/exsinger-hub/sivia/blob/main/skills/design-scientific-figure/SKILL.md) (Figure design), [`knowledge-base`](https://github.com/exsinger-hub/sivia/tree/main/knowledge-base) (Reference cases)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_figure_workflow["Figure workflow"]
  node_design_skill["Figure design<br/>[SKILL.md]"]
  node_audit_skill["Figure audit<br/>[SKILL.md]"]
  node_correct_skill["Figure correction<br/>[SKILL.md]"]
  node_recreate_skill["Figure recreation<br/>[SKILL.md]"]
  node_overview["Overview preview"]
end

subgraph group_references["Knowledge base"]
  node_knowledge_base[("Reference cases")]
end

subgraph group_powerpoint["PowerPoint editing"]
  node_ppt_server["PowerPoint server"]
  node_office_bridge["Office.js bridge"]
  node_taskpane["PowerPoint taskpane<br/>[taskpane.js]"]
  node_pptx["Editable PPTX"]
end

subgraph group_drawio["Draw.io editing"]
  node_drawio_recreate["Draw.io recreation<br/>[SKILL.md]"]
  node_drawio_server["Draw.io server<br/>[server.mjs]"]
  node_live_server["Draw.io live server<br/>[live-server.mjs]"]
  node_drawio_path["Draw.io resolver<br/>[drawio-path.mjs]"]
  node_drawio_output["Editable draw.io"]
end

node_user(("Researcher"))
node_paper["Research paper"]
node_powerpoint["PowerPoint / WPS"]
node_drawio_app["Draw.io desktop"]

node_user -->|"provides"| node_paper
node_paper -->|"informs design"| node_design_skill
node_design_skill -->|"creates preview"| node_overview
node_user -->|"approves design"| node_overview
node_knowledge_base -->|"guides composition"| node_design_skill
node_knowledge_base -->|"accepts cases"| node_user
node_user -->|"requests PowerPoint"| node_ppt_server
node_ppt_server -->|"uses bridge"| node_office_bridge
node_office_bridge -.->|"dispatches commands"| node_taskpane
node_taskpane -.->|"edits slides"| node_powerpoint
node_ppt_server -->|"delivers"| node_pptx
node_pptx -->|"opens in"| node_powerpoint
node_user -->|"requests audit"| node_audit_skill
node_user -->|"requests revision"| node_correct_skill
node_user -->|"requests recreation"| node_recreate_skill
node_user -->|"requests draw.io"| node_drawio_recreate
node_drawio_recreate -.->|"creates diagram"| node_drawio_server
node_drawio_server -->|"resolves executable"| node_drawio_path
node_live_server -->|"resolves executable"| node_drawio_path
node_drawio_server -->|"opens diagrams"| node_drawio_app
node_live_server -.->|"controls editor"| node_drawio_app
node_drawio_server -.->|"exports diagram"| node_drawio_output
node_user -->|"edits diagram"| node_drawio_output

click node_design_skill "https://github.com/exsinger-hub/sivia/blob/main/skills/design-scientific-figure/SKILL.md"
click node_audit_skill "https://github.com/exsinger-hub/sivia/blob/main/skills/audit-scientific-figure/SKILL.md"
click node_correct_skill "https://github.com/exsinger-hub/sivia/blob/main/skills/correct-scientific-figure/SKILL.md"
click node_recreate_skill "https://github.com/exsinger-hub/sivia/blob/main/skills/recreate-scientific-figure/SKILL.md"
click node_drawio_recreate "https://github.com/exsinger-hub/sivia/blob/main/skills/recreate-scientific-figure-in-drawio/SKILL.md"
click node_knowledge_base "https://github.com/exsinger-hub/sivia/tree/main/knowledge-base"
click node_ppt_server "https://github.com/exsinger-hub/sivia/blob/main/scripts/powerpoint-server.mjs"
click node_office_bridge "https://github.com/exsinger-hub/sivia/blob/main/scripts/officejs-bridge.mjs"
click node_taskpane "https://github.com/exsinger-hub/sivia/blob/main/officejs/taskpane.js"
click node_drawio_server "https://github.com/exsinger-hub/sivia/blob/main/scripts/server.mjs"
click node_live_server "https://github.com/exsinger-hub/sivia/blob/main/scripts/live-server.mjs"
click node_drawio_path "https://github.com/exsinger-hub/sivia/blob/main/scripts/drawio-path.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_design_skill,node_audit_skill,node_correct_skill,node_recreate_skill,node_overview toneBlue
class node_knowledge_base toneAmber
class node_ppt_server,node_office_bridge,node_taskpane,node_pptx toneMint
class node_drawio_recreate,node_drawio_server,node_live_server,node_drawio_path,node_drawio_output toneRose
class node_user,node_paper,node_powerpoint,node_drawio_app toneIndigo
```

## Components

### Figure workflow

- [Figure design](https://github.com/exsinger-hub/sivia/blob/main/skills/design-scientific-figure/SKILL.md): `skills/design-scientific-figure/SKILL.md`
- [Figure audit](https://github.com/exsinger-hub/sivia/blob/main/skills/audit-scientific-figure/SKILL.md): `skills/audit-scientific-figure/SKILL.md`
- [Figure correction](https://github.com/exsinger-hub/sivia/blob/main/skills/correct-scientific-figure/SKILL.md): `skills/correct-scientific-figure/SKILL.md`
- [Figure recreation](https://github.com/exsinger-hub/sivia/blob/main/skills/recreate-scientific-figure/SKILL.md): `skills/recreate-scientific-figure/SKILL.md`
- **Overview preview**

### Knowledge base

- [Reference cases](https://github.com/exsinger-hub/sivia/tree/main/knowledge-base): `knowledge-base`

### PowerPoint editing

- [PowerPoint server](https://github.com/exsinger-hub/sivia/blob/main/scripts/powerpoint-server.mjs): `scripts/powerpoint-server.mjs`
- [Office.js bridge](https://github.com/exsinger-hub/sivia/blob/main/scripts/officejs-bridge.mjs): `scripts/officejs-bridge.mjs`
- [PowerPoint taskpane](https://github.com/exsinger-hub/sivia/blob/main/officejs/taskpane.js): `officejs/taskpane.js`
- **Editable PPTX**

### Draw.io editing

- [Draw.io recreation](https://github.com/exsinger-hub/sivia/blob/main/skills/recreate-scientific-figure-in-drawio/SKILL.md): `skills/recreate-scientific-figure-in-drawio/SKILL.md`
- [Draw.io server](https://github.com/exsinger-hub/sivia/blob/main/scripts/server.mjs): `scripts/server.mjs`
- [Draw.io live server](https://github.com/exsinger-hub/sivia/blob/main/scripts/live-server.mjs): `scripts/live-server.mjs`
- [Draw.io resolver](https://github.com/exsinger-hub/sivia/blob/main/scripts/drawio-path.mjs): `scripts/drawio-path.mjs`
- **Editable draw.io**

### Other components

- **Researcher**
- **Research paper**
- **PowerPoint / WPS**
- **Draw.io desktop**

## Connections

- Researcher → Research paper: provides (evidence: `README.md`)
- Research paper → Figure design: informs design (evidence: `README.md`)
- Figure design → Overview preview: creates preview (evidence: `README.md`)
- Researcher → Overview preview: approves design (evidence: `README.md`)
- Reference cases → Figure design: guides composition (evidence: `README.md`)
- Reference cases → Researcher: accepts cases (evidence: `README.md`)
- Researcher → PowerPoint server: requests PowerPoint (evidence: `README.md`)
- PowerPoint server → Office.js bridge: uses bridge (evidence: `scripts/powerpoint-server.mjs`)
- Office.js bridge → PowerPoint taskpane: dispatches commands
- PowerPoint taskpane → PowerPoint / WPS: edits slides
- PowerPoint server → Editable PPTX: delivers (evidence: `README.md`)
- Editable PPTX → PowerPoint / WPS: opens in (evidence: `README.md`)
- Researcher → Figure audit: requests audit (evidence: `README.md`)
- Researcher → Figure correction: requests revision (evidence: `README.md`)
- Researcher → Figure recreation: requests recreation (evidence: `README.md`)
- Researcher → Draw.io recreation: requests draw.io (evidence: `README.md`)
- Draw.io recreation → Draw.io server: creates diagram
- Draw.io server → Draw.io resolver: resolves executable (evidence: `scripts/server.mjs`)
- Draw.io live server → Draw.io resolver: resolves executable (evidence: `scripts/live-server.mjs`)
- Draw.io server → Draw.io desktop: opens diagrams (evidence: `scripts/server.mjs`)
- Draw.io live server → Draw.io desktop: controls editor
- Draw.io server → Editable draw.io: exports diagram
- Researcher → Editable draw.io: edits diagram (evidence: `README.md`)
