# envforge-dev/design-system-intelligence architecture

> Architecture diagram of the GitHub repository envforge-dev/design-system-intelligence, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/envforge-dev/design-system-intelligence
- Repository: https://github.com/envforge-dev/design-system-intelligence

## Overview

DSI is a provider-neutral design-system workflow with a deterministic local engine and a Node.js CLI. A user supplies a client brief; the CLI generates and validates a system, then can render Markdown or CSS, compare systems, and expose industry and reference data. The README also describes an AI-assisted workflow for refining the result with client evidence. The engine source was not excerpted, so its internal stages are grouped rather than split into unverified modules; documented capabilities are retained.

Main entry points: [`dsi.mjs`](https://github.com/envforge-dev/design-system-intelligence/blob/main/dsi.mjs) (DSI CLI), [`library/catalog.json`](https://github.com/envforge-dev/design-system-intelligence/blob/main/library/catalog.json) (Reference catalog), [`src/system.mjs`](https://github.com/envforge-dev/design-system-intelligence/blob/main/src/system.mjs) (System engine), [`SKILL.md`](https://github.com/envforge-dev/design-system-intelligence/blob/main/SKILL.md) (Assistant workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["CLI interface"]
  node_cli["DSI CLI<br/>[dsi.mjs]"]
  node_brief["Client brief"]
end

subgraph group_engine["Design engine"]
  node_engine["System engine<br/>[system.mjs]"]
end

subgraph group_knowledge["Reference material"]
  node_catalog[("Reference catalog<br/>[catalog.json]")]
  node_skill["Assistant workflow<br/>[SKILL.md]"]
end

subgraph group_deliverables["System outputs"]
  node_systemjson["Design system JSON"]
  node_designmd["DESIGN.md"]
  node_css["Token CSS"]
  node_comparison["System comparison"]
  node_industrylist["Industry list"]
  node_referenceentry["Reference entry"]
end

node_user(("Designer"))
node_assistant(("AI assistant"))

node_user -->|"runs commands"| node_cli
node_user -->|"supplies brief"| node_brief
node_brief -->|"provides input"| node_cli
node_cli -->|"calls functions"| node_engine
node_cli -->|"reads catalog"| node_catalog
node_cli -->|"generates or validates"| node_systemjson
node_cli -->|"renders Markdown"| node_designmd
node_cli -->|"renders CSS"| node_css
node_cli -->|"compares systems"| node_comparison
node_cli -->|"lists industries"| node_industrylist
node_cli -->|"shows reference"| node_referenceentry
node_assistant -->|"follows workflow"| node_skill
node_assistant -->|"studies selectively"| node_catalog
node_assistant -->|"refines system"| node_systemjson

click node_cli "https://github.com/envforge-dev/design-system-intelligence/blob/main/dsi.mjs"
click node_engine "https://github.com/envforge-dev/design-system-intelligence/blob/main/src/system.mjs"
click node_catalog "https://github.com/envforge-dev/design-system-intelligence/blob/main/library/catalog.json"
click node_skill "https://github.com/envforge-dev/design-system-intelligence/blob/main/SKILL.md"

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_cli,node_brief toneBlue
class node_engine toneAmber
class node_catalog,node_skill toneMint
class node_systemjson,node_designmd,node_css,node_comparison,node_industrylist,node_referenceentry toneRose
class node_user,node_assistant toneIndigo
```

## Components

### CLI interface

- [DSI CLI](https://github.com/envforge-dev/design-system-intelligence/blob/main/dsi.mjs): `dsi.mjs`
- **Client brief**

### Design engine

- [System engine](https://github.com/envforge-dev/design-system-intelligence/blob/main/src/system.mjs): `src/system.mjs`

### Reference material

- [Reference catalog](https://github.com/envforge-dev/design-system-intelligence/blob/main/library/catalog.json): `library/catalog.json`
- [Assistant workflow](https://github.com/envforge-dev/design-system-intelligence/blob/main/SKILL.md): `SKILL.md`

### System outputs

- **Design system JSON**
- **DESIGN.md**
- **Token CSS**
- **System comparison**
- **Industry list**
- **Reference entry**

### Other components

- **Designer**
- **AI assistant**

## Connections

- Designer → DSI CLI: runs commands (evidence: `README.md`)
- Designer → Client brief: supplies brief (evidence: `README.md`)
- Client brief → DSI CLI: provides input (evidence: `README.md`)
- DSI CLI → System engine: calls functions (evidence: `dsi.mjs`)
- DSI CLI → Reference catalog: reads catalog (evidence: `dsi.mjs`)
- DSI CLI → Design system JSON: generates or validates (evidence: `dsi.mjs`)
- DSI CLI → DESIGN.md: renders Markdown (evidence: `dsi.mjs`)
- DSI CLI → Token CSS: renders CSS (evidence: `dsi.mjs`)
- DSI CLI → System comparison: compares systems (evidence: `dsi.mjs`)
- DSI CLI → Industry list: lists industries (evidence: `dsi.mjs`)
- DSI CLI → Reference entry: shows reference (evidence: `dsi.mjs`)
- AI assistant → Assistant workflow: follows workflow (evidence: `README.md`)
- AI assistant → Reference catalog: studies selectively (evidence: `README.md`)
- AI assistant → Design system JSON: refines system (evidence: `README.md`)
