HMI Design Platform
AI-Driven Automotive HMI — Architecture Overview
ITERATION LOOP Figma UI Kit Figma Design Material Minimize & Standardize Code JSON / DSL + Tag & Desc LLM Component Index Mapping Scene-Based PF LLM HMI Brief LLM UX [JSON] LLM WireFrame [JSON] What we have and where to place UI [JSON] LLM Render Figma UI Polish by HMI Staff Standard Frame React Prototype Interaction LLM Iteration
This overview shows the end-to-end platform flow: design assets are extracted from Figma and standardized into JSON/DSL (with tags and descriptions), forming a Component Index. The left-side pipeline (inside the blue dashed line) runs per iteration: Product Function Spec → HMI Brief → UX structure → WireFrame → UI details, each step producing JSON intermediary artifacts. The WireFrame determines 'what we have and where to place it.' The UI stage adds visual details, then renders to a Figma design file (handed to HMI Staff for polishing). Simultaneously, results are written to the Standard Frame (cumulative state) and a runnable React prototype is generated. Prototype feedback feeds into the next iteration, completing the loop.
System Prompt LLM 角色指令
User Prompt 动态内容
HMI-DESIGN.md 9 段式设计准则
Reasoning 推理规则
Context 运行时上下文
Figma Design System Source of Truth
_Tokens
Variables (day/night) + Text Styles
extract-tokens.ts
_Components
Component Sets + @-tag 描述
extract-components.ts + parse-tags.ts
_Icons
SVG 图标按域分类 + @-tags
extract-icons.ts
_Layouts
Auto Layout → skeleton
extract-layouts.ts
_Screens
Screen frames → 派生值
extract-screens.ts
Figma is the single source of truth for the design system. Designers organize assets in Figma following a page convention (_Tokens, _Components, _Icons, _Layouts, _Screens). Extractors read these pages via the Figma API, parse @-tag metadata (e.g. @tags, @interaction, @domain), and convert design data into structured JSON for the Knowledge Base. This ensures the designer's latest changes automatically sync into the AI pipeline — no manual maintenance required.
Knowledge Base JSON + Query Index
components.json
8 组件 · tags · interactions · props
icons.json
10 图标 · domain · pairs_with
tokens.json
颜色 (day/night) · 字体 · 间距 · 圆角
layouts.json
3 布局模板 · slots · skeleton
screens.json
3 屏幕 · PPI · min font · content area
hmi-styles.json
4 风格定义 · do/don't · token override
← ui-ux-pro-max
hmi-reasoning.json
8 推理规则 · segment+domain → atmosphere
← ui-ux-pro-max
constraints.json
10 约束 (safety + ergonomic + visual + ux)
The Knowledge Base is a collection of structured JSON files extracted from Figma, with query indexes. It contains: component library (with semantic tags and interaction types), icons (organized by function domain), design tokens (colors/typography/spacing with day/night mode support), layout templates (with slot definitions), and screen specifications (with derived values like PPI and minimum font sizes). It also includes HMI style definitions (a layered decision model inspired by the ui-ux-pro-max project), reasoning rules (that automatically recommend design atmosphere based on vehicle segment + function domain), and safety/ergonomic constraints (ISO touch target sizes, NHTSA glance time limits, etc.). All query methods (findByTags, findByInteraction, match) support efficient retrieval across pipeline stages.
product-function-spec.json
上游 AI 平台输出 · project + vehicle (screens) + function tree + flows
Standard Frame
已设计功能的累积状态 · v0 → v1 → v2...
Two inputs feed the pipeline: (1) Product Function Spec — generated by the upstream AI platform, defining project info, vehicle screen configurations, a function tree (with interaction types, safety levels, data ranges), and user flows; (2) Standard Frame — the cumulative state of previously designed features, with version incrementing on each iteration. After each feature passes through the pipeline, its results merge into the Standard Frame for the next iteration. This progressive design approach ensures new features remain consistent with existing ones in layout and interaction.
Pre-step A generateGuidelinesMarkdown() src/guidelines/generate.ts ← awesome-design-md
Input: KB (tokens + styles + components + constraints + screens)
Output: hmi-design-guidelines.md9 段式自动生成
§1 Visual Theme · §2 Color Roles · §3 Typography · §4 Component Usage · §5 Spacing · §6 Elevation · §7 Do's/Don'ts · §8 Multi-Screen · §9 Agent Prompt Guide
Pre-step B buildDesignRecommendations() src/pipeline/hmi-brief.ts ← ui-ux-pro-max
Input: spec.project.variant (luxury/sport/ev) + function domains
Process: kb.reasoning.match(segment, domain) → 按 priority 排序 → 取最高分规则
Output: DesignRecommendations — primaryAtmosphere + domainRecommendations + matched Style
1
HMI Brief
LLM
设计意图 · 视觉权重 · 空间分组 · 跨屏
→ hmi-brief.json
System Prompt
"You are an automotive HMI design expert..."
• JSON 格式 (design_intent + function_briefs)
• 枚举值 (atmosphere / density / prominence)
MUST follow design recommendations


User Prompt × 7:
SpecComponentsIconsLayoutsFrameGuidelinesRecommendations
2
UX Map
Solver A
屏幕分配 · 页面分组 · 导航 · 镜像
→ ux-map.json
无 LLM — 确定性求解

Input spec + brief + KB + Frame
Optional HMI Style

• affinity × frequency 评分
• 硬约束: touch / safety / affects
• spatial_grouping 从 brief 获取
• 软决策 2-3 备选
3
Blueprint
Solver B
布局选择 · 组件绑定 · 约束校验
→ blueprint.json
无 LLM — 确定性求解

Input ux-map + KB + tokens + specs

• layout: findByDomain → fitScreen → score
• component: findByInteraction → tag overlap
• props: spec range → component mapping
10 条约束全量校验
4
UI Spec
LLM
视觉细节 · 动效 · 文案 · 微交互
→ ui-spec.json
System Prompt
"You are an automotive UI visual designer..."
• MUST NOT change: types, slots, layouts, token_refs
• CAN add: visual (value_display, track, thumb, animation, label)

User Prompt × 4:
BlueprintTokensComponentsGuidelines
Validator
validateAgainstBlueprint()ui-spec vs blueprint 结构对比 · 7 种违规检测 · 违规自动重试 LLM (max 3x)
validator.ts
The Pipeline is the core processing engine, running once per feature iteration. It has two pre-processing steps and four main stages:

Pre-step A — Auto-generates a 9-section HMI design guidelines document from the Knowledge Base (inspired by awesome-design-md), covering visual theme, color roles, typography hierarchy, component usage, spacing, elevation, Do's/Don'ts, and more. This serves as LLM context.
Pre-step B — Matches reasoning rules by vehicle segment and function domain to produce design recommendations (atmosphere, layout preference, display prominence), giving the LLM evidence-based guidance.

Stage 1 (HMI Brief) — LLM generates design intent: visual priorities, spatial grouping, cross-screen strategy. Receives 7 context blocks and must follow reasoning recommendations.
Stage 2 (UX Map) — Deterministic solver: assigns functions to screens and pages based on affinity scoring, frequency weights, and hard constraints (safety, touch, dependencies).
Stage 3 (Blueprint) — Deterministic solver: selects layout templates, binds components (via tag-overlap scoring), maps properties, and validates all 10 constraints.
Stage 4 (UI Spec) — LLM adds visual polish (animations, track styles, label copy) but must NOT modify the blueprint structure.

Validator — Compares UI Spec output against Blueprint for structural consistency (7 violation types). On failure, automatically retries the LLM (up to 3 times).
React Renderer
scaffold.ts确定性: blueprint → Vite + JSX
state-wiring.ts确定性: spec → useState + handlers
generate.ts可选 LLM 增强
Enhancement System (LLM 增强时)
"React component enhancer for automotive HMI..."
• 不改 imports / useState / exports
• 可加: animation, value display, labels


User scaffold JSX + UI-Spec Visual Data
OUTPUT: 可运行 React 原型
Figma Renderer
node-builder.ts — FRAME / TEXT / INSTANCE / Auto Layout
generate.ts确定性: blueprint → Figma JSON
annotation.ts标注层: 组件名 + tokens + 间距 + 色板
无 LLM — 完全确定性

Input blueprint + ui-spec + KB
skeleton → Auto Layout → INSTANCE → token fills → annotations
OUTPUT: Figma JSON → Staff 打磨
Renderers transform the abstract Blueprint + UI Spec into concrete deliverables:

React Renderer — Three steps: (1) scaffold.ts deterministically generates a Vite project scaffold (package.json, routing, page components with auto-imports from the swp-ui-kit component library); (2) state-wiring.ts auto-generates useState declarations and event handlers from the function spec; (3) generate.ts optionally uses LLM to enhance page components with visual polish (animations, value formatting, labels) while strictly preserving the scaffold structure. The output is a fully runnable interactive prototype (npm install && npm run dev).

Figma Renderer — Fully deterministic (no LLM): converts Blueprint layout skeletons into Figma Auto Layout nodes, inserts component instances, applies token fills, and overlays an annotation layer (component names, token references, spacing indicators, color swatches). Outputs JSON for a Figma plugin to consume — HMI designers polish the details before handing off to development.
React Prototype
可运行 · 带交互
Figma Design
→ Staff 打磨 → 开发
HMI-DESIGN.md
9 段式设计准则
4 Artifacts
brief · ux-map · blueprint · ui-spec
Standard Frame
v+1 → 下次迭代
Each iteration produces 5 types of deliverables: (1) React Prototype — a fully interactive, runnable web application for rapid experience validation; (2) Figma Design — structured nodes with annotation overlays, for HMI designers to polish before dev handoff; (3) HMI-DESIGN.md — 9-section design guidelines document ensuring team alignment on design language; (4) 4 JSON intermediary artifacts (brief, ux-map, blueprint, ui-spec) — a complete, traceable, auditable record of all design decisions; (5) Updated Standard Frame — version +1, containing the new feature's layout and component info, feeding into the next feature iteration.
阶段 文件 类型 内容
Pre-step A guidelines/generate.ts KB Input tokens + styles + components + constraints + screens
Output hmi-design-guidelines.md (9 sections, ~2000 words)
Pre-step B pipeline/hmi-brief.ts Input spec.project.variant + function domains
Output DesignRecommendations { primaryAtmosphere, domainRecs, style.do/don't }
Stage 1: HMI Brief pipeline/hmi-brief.ts System 角色 + JSON 格式 + 枚举值 + MUST follow recommendations
User 7 块: ① spec ② components ③ icons ④ layouts ⑤ frame ⑥ HMI-DESIGN.md ⑦ Recommendations
Stage 2: UX Map pipeline/solver-a.ts Data 无 prompt — 确定性: spec + brief + KB + frame + style
Stage 3: Blueprint pipeline/solver-b.ts Data 无 prompt — 确定性: ux-map + KB + tokens + specs + constraints
Stage 4: UI Spec pipeline/ui-spec.ts System 角色 + MUST NOT (不改结构) + CAN (visual 字段)
User 4 块: ① blueprint ② tokens ③ components ④ HMI-DESIGN.md
Validator pipeline/validator.ts Data 无 prompt — 7 种违规: missing/extra/wrong screen/page/component/layout/token
React Renderer renderer/react/generate.ts Enhancement React enhancer + 不改 imports/state + 可加 animation/labels + ui-spec JSON
User scaffold JSX 代码 (待增强输入)
Figma Renderer renderer/figma/generate.ts Data 无 prompt — 确定性: blueprint + ui-spec + KB → Figma JSON + annotations
This table summarizes the prompts and data types used at each pipeline stage. Key design principle: LLMs are only involved where creative judgment is needed (Stage 1 design intent, Stage 4 visual details, React enhancement), while structural decisions (screen assignment, component binding, constraint validation) are handled by deterministic solvers — ensuring repeatability and auditability. Each LLM stage has a System Prompt (defining role and constraints) and User Prompt (injecting dynamic context), with all outputs validated against JSON Schema or structural checks, auto-retrying on failure.
HMI-DESIGN.md High Impact
output/hmi-design-guidelines.md
9-section design guidelines document. The system auto-generates an initial version from KB, but HMI experts can edit it directly. The modified version is injected as LLM context in Stage 1 (HMI Brief) and Stage 4 (UI Spec).

What to tune:
• §1 Visual Theme — adjust overall visual tone description
• §4 Component Usage — specify preferences like 'when to use Switch vs Toggle'
• §7 Do's / Don'ts — add brand-specific design prohibitions
• §9 Agent Prompt Guide — customize example prompts for the LLM
Affects: Stage 1 HMI Brief · Stage 4 UI Spec · React Enhancement — directly shapes LLM design decisions
hmi-styles.json High Impact
seed/hmi-styles.json
HMI style definition library. Each style contains: applicable vehicle segments, token overrides, component preferences, layout preferences (info_density / whitespace), and do/don't design principles.

What to tune:
• Add new styles (e.g. 'eco_friendly', 'youth_sporty')
• Modify do/don't lists for existing styles
• Adjust component_preferences (which components are preferred in a style)
• Set tokens_override (style-specific color/typography overrides)
Affects: Pre-step A (Guidelines generation) · Pre-step B (reasoning match) · Solver A (info_density) — changes overall design atmosphere and component selection
hmi-reasoning.json High Impact
seed/hmi-reasoning.json
Reasoning rule library. Each rule defines: match conditions (vehicle segment + function domain + OEM) → recommendations (atmosphere, layout preference, display prominence per function) + priority weight.

What to tune:
• Add new rules (e.g. 'luxury + media → premium_warm + hero display')
• Adjust display_prominence (which functions get hero/standard/compact at which segment)
• Modify layout_preference (preferred layout templates)
• Set priority weights to control precedence when rules conflict
Affects: Pre-step B (DesignRecommendations) · Stage 1 HMI Brief — determines design recommendations the LLM receives, indirectly affects all downstream output
constraints.json High Impact
seed/constraints.json
Safety and design constraint library. 10 rules covering: ISO touch target sizes, NHTSA glance time limits, night mode contrast, font readability, information density, one-step access, visual grouping, color role consistency, etc.

What to tune:
• Modify constraint thresholds (e.g. increase touch target size, reduce allowed glance time)
• Modify constraint types and strictness levels
• Add brand/regulatory-specific constraints (e.g. country-specific regulations)
• Disable inapplicable constraints (e.g. HUD doesn't need touch target constraints)
Affects: Stage 3 Blueprint (constraint validation) · Pre-step A (Guidelines §7 Do/Don't) — failed constraints block component binding; acts as a hard quality gate
Standard Frame Medium Impact
output/standard-frame.json
The Standard Frame can be pre-configured rather than starting from blank. HMI experts can pre-define the base layout: which screens have which fixed pages, what sidebar entries already exist, which cross-screen mirror relationships are established.

What to tune:
• Pre-set initial pages per screen (e.g. center screen defaults to a home page)
• Pre-fill sidebar items (e.g. fixed navigation shortcuts)
• Pre-configure cross-screen mirrors (e.g. temperature always shown on cluster)
• Set initial version number and occupied capacity
Affects: Stage 1 HMI Brief (frame state context) · Stage 2 UX Map (capacity calculation) — controls how new features are placed within the existing layout
Knowledge Base Files High Impact
seed/components.json · icons.json · tokens.json · layouts.json · screens.json
While KB files are primarily auto-generated by Figma extractors, experts can directly edit JSON files to supplement or override extraction results.

What to tune:
components.json — add custom components, modify semantic_tags (affects matching scores), adjust supports_interactions
layouts.json — add new layout templates, modify slot definitions and capacities, adjust applicable_domains
tokens.json — override color/typography values, add custom tokens
screens.json — modify screen specs, adjust domain_affinity (which domain prefers which screen)
icons.json — supplement icon semantic_tags and pairs_with relationships
Affects: Entire pipeline — KB data flows through all stages: component matching, layout selection, constraint validation, guidelines generation
System Prompts Medium Impact
pipeline/hmi-brief.ts · pipeline/ui-spec.ts · renderer/react/generate.ts
Three LLM invocations each have an independent System Prompt defining the LLM's role, output format, and behavioral constraints. Advanced users can modify these prompts to fine-tune LLM behavior.

What to tune:
HMI Brief prompt — adjust design intent output granularity, add/reduce enum value options
UI Spec prompt — modify allowed/prohibited visual field types, adjust animation preferences
React Enhancement prompt — control how aggressive the LLM enhancement is (conservative vs bold visual changes)
Affects: Corresponding LLM stage outputs — directly controls the style and quality of AI-generated content
Figma Source Structure Medium Impact
Figma file: _Tokens / _Components / _Icons / _Layouts / _Screens pages
Designers organize assets in Figma following conventions; extractors read them to auto-update the KB. Optimizing how the Figma source file is organized significantly improves extraction quality.

What to tune:
• @-tag metadata in component descriptions (@tags, @interaction, @pairs-with) — affects semantic matching accuracy
• Icon domain grouping (Climate Controls / Seats / Media) — affects findByDomain retrieval
• Layout Auto Layout parameters (spacing, padding, grow) — affects skeleton extraction
• Variable mode settings (Day/Night) — affects multi-theme token generation
Affects: KB data quality → entire pipeline — Figma organization quality determines the completeness and accuracy of extracted data
These 8 tuning points form the HMI expert's 'control panel.' Core philosophy: AI executes, experts decide. By editing these files rather than code, HMI experts can precisely control output quality without touching pipeline source code. Recommended workflow: (1) Run the pipeline once with default config and observe the output; (2) Identify which tuning file corresponds to the unsatisfactory aspect; (3) Edit and re-run, comparing the differences. Reasoning rules and style definitions have the broadest impact (they flow through the entire pipeline), Guidelines modifications are the most direct (they change LLM context immediately), and constraint modifications are the strictest (they act as hard quality gates).