TaoDesign: How Taotian Built an AI-Native Design Tool with Self-Evolving Assets
Taotian's TaoDesign evolves from a MasterGo plugin to a custom browser-based canvas, using a client-server-sandbox architecture, deterministic patches with agent fallback, design assets as callable resources, RAG for style retrieval, offline/online evaluation loops, and MCP handoff to development, reducing rework and enabling One Person Team collaboration.
Reading font

From MasterGo Plugin to Custom Canvas
Initially, the team built a MasterGo plugin to leverage designers' familiar environment. The plugin generated HTML/CSS via LLM, then mapped to MasterGo nodes. Two core mapping challenges: node tree and styles.
Node Tree Mapping
Evaluated two approaches: tool-calling (low accuracy, high latency) and intermediate structure conversion (HTML → VDOM → MasterGo nodes). Chose the latter for stability.
Style Mapping
Compared pure CSS (too flexible, hard to constrain) vs Tailwind CSS (atomic classes, built-in constraints, better traceability). Adopted Tailwind as intermediate representation, handling image imports, component variants, and slots.
Special Nodes for Business Components
Introduced custom tags like <x-component props="foo"> to reuse existing business components, parsed to design components with variants.
Plugin Capabilities and Results
Chat panel in MasterGo supported modifying existing designs and creating new ones from scratch. Real-world B2B and B2C pages achieved ~85% usable generation rate, with minor manual fixes.
Bottlenecks of Plugin Approach
Cross-representation conversion loss: MasterGo canvas and web standards only intersect. CSS features like filter, media queries, background composites couldn't map; canvas paths exported as images. Bidirectional constraints bloated prompts, increased latency/cost, and lowered creative ceiling.
Custom Canvas: Unified Generation and Editing
Inspired by Claude Design, the team built a desktop app with a browser-based canvas, making HTML/JSX the direct design artifact.
Client-Cloud-Sandbox Architecture
Client (macOS only): Electron main window for UI (chat, canvas, asset management), SwiftUI for menu bar integration. Also acts as local driver for model quotas.
Server: State hub for identity, projects, task scheduling, storage, permissions, billing. Uses SSE for progress streaming with reconnection support.
Cloud Sandbox: Linux containers with Harness SDK, Agent CLI, Node environment for Design Agent execution. Provides generation, modification, compilation verification. Persists files and versions via server. Implements idle recycling for cost efficiency.
Canvas and Editor
Goal: high-fidelity single-shot generation, only high-frequency tweaks supported. Complex restructuring delegated to AI; extreme cases fall back to MasterGo import/export.
Infinite Draggable Canvas
Supports multiple pages and states on one canvas. Viewport geometry (drag, zoom, grid) decoupled from element editing; persisted to localStorage.
Design Editing Functions
Two parallel pipelines:
Deterministic Source Code Handling (priority): Edits queued, merged by target file, rule-based precise location and conflict detection on latest source. Generates deterministic diff patches instantly without LLM.
Design Agent (fallback): Handles complex restructuring, location failures, or conflicts by replanning UI structure with LLM.
Features: node selection, text/style tweaks, asset replacement, freehand annotation for edit targets. Undo/Redo via in-memory session history.
Async Snapshots and Safe Rollback
Non-intrusive snapshots: Background worker checkpoints at end of each agent session, persisting immutable files and manifest to remote version store, zero main-thread blocking.
Safe rollback: Validates idempotency key and baseline, locks workspace via sandbox lease and mutex, creates safety checkpoint before restore, reinstates file tree per target manifest, clears caches, pushes frontend refresh for consistency.
Design Experience as Callable Business Assets
External LLMs lack private business context (e.g., Qianniu promo pages). Internal assets needed.
Asset Structure Abstraction
Four core parts:
Visual Specs: Design Tokens and base specs for color, typography, spacing, radii.
Reusable Structures: Business components, typical layouts, page templates.
Static Resources: Business-specific images, icons, fonts.
Business Knowledge: Interaction rules, copy guidelines, boundary constraints.
Asset Ingestion: Manual Entry + AI Distillation
Built admin backend for manual rule entry, versioning, permissions, visibility. Designers select styles in client.
AI distillation: designers provide finished designs, live pages, existing specs; agent extracts patterns into structured candidate style drafts; designers confirm boundaries (e.g., whether a color is permanent brand or campaign-specific) before publishing.
Asset Consumption: Evolving Knowledge Retrieval
Unified knowledge tool with micro-agent RAG.
Unified Entry and Batch Retrieval
Merged knowledge needs into single batch request; concurrent retrieval; page templates matched by pageId deduplication. Reduced tool calls from 40+ to 10+, returned chars from 600k+ to <100k, main model tokens down 30%. But blind evaluation scores flat, some regressions — compression risked losing key constraints.
Structured Extraction and Code Assembly
Stopped free-form summarization. Instead: segment by source and Markdown structure, up to 6-way parallel extraction preserving defaults, applicability, exceptions, state linkages. Filter applicable entries, highlight template-default vs user-intent conflicts, assemble implementation notes via deterministic code — no LLM rewriting of core rules. In 7 paired experiments with fixed main model, designer blind scores rose from 3.xx to 4.xx (5-point scale), main agent tokens further reduced >10%, latency dropped significantly.
Offline Extraction + Online Selection
Split "understand docs" (offline) from "select docs" (online). On publish/update: fully extract rules, values, conditions, exceptions, sources into versioned, fingerprinted knowledge units; bucket by style, type, constraint strength; use embeddings to detect cross-doc duplicates, propose merges via model, human review, then persist (merged ~60% of rule groups in Taobao docs, single rule "main search original image protection" reduced render tokens). Online: only recall candidates, filter applicable, verify omissions, isolate conflicts; re-read source only on version changes or gaps. Combined with decision model, achieved clear speed/quality gains:
Generation Model | Avg Knowledge Tool Latency | Avg Full Page Gen Latency | Designer Blind Score (5-pt)
SOTA Pro Model | ~2 min → ~20 sec | ~8 pt reduction | From 4+ up 5 pts
SOTA Flash Model | 1.5 min → ~20 sec | ~15 pt reduction | From 4+ up 4 ptsQuality gains concentrated in complex C-end scenarios; B-end stable.
Decision Model
Specialized decision models for online selection: median latency 4.xx s → 2.xx s vs smaller general models; checkpoint coverage +2 pts; knowledge-pack pass rate +30%. Enforced constraints: must read at least one business style; post-render DOM/visual self-check.
Continuous Asset Updates via Evaluation and Feedback
Offline Evaluation
Two test sets: Standard (designer-curated typical scenarios) and TC (real-world bad cases). Cloud pipeline: parallel generation → LLM-as-Judge scoring → human review/annotation. Human judgments calibrate machine scores. Discrepancies: machine may score well but miss business component fidelity (e.g., model rewrites components unusable in production). Root-cause analysis splits into engineering/call issues (fix retrieval/execution) vs asset gaps (AI-assisted revision proposals, designer confirmation, regression test).
Online Feedback Extraction
User thumbs-down/feedback links session trace (full OpenTelemetry trace: LLM calls, tools, reasoning, sub-agents, user inputs). Periodic job scans anomalous tasks. Agent analyzes emotional signals in user inputs for hidden issues, aggregated/deduped, human-verified (emotion ≠ quality; could be changed requirements, preference, tool timeout). Verified results feed two streams: common design issues → candidate style optimization proposals (designer approves for generalization); representative failures → added to test sets for regression.
Loop: AI assists analysis/drafting; designers judge generality; pipeline validates before/after; confirmed revisions become new asset versions.
Design Context as Shared Basis for Delivery
Static visuals insufficient; need business rules, state branches, interaction logic handed to code.
Traditional Handoff Gaps
Case: Qianniu price-power popup with Taojinbi strategy. Two popup shapes based on product discount state. Traditional handoff loses trigger conditions, navigation targets, error handling — scattered in PRD or verbal, causing rework.
Graph Structure and Node Annotations for Context
Graph for multi-page/multi-state flows: Nodes and edges represent pages, modules, states, transitions. Canvas auto-layout visualizes interaction chains.
Polymorphic state protocol: Decoupled page/module branches with variants (condition, UI description, pageId, nodeXPath). Example JSON shows module with two variants based on purchase count.
Annotations via XPath, separate from source: Business notes attached to DOM nodes via XPath; frontend uses DOMRect for floating annotation positioning that follows responsive layout.
{ "name": "xx页官方xx模块", "pageId": "imports/999fc475-e92d-4114-abb2-230a7f37b958/组 739939.html", "polymorphs": [ { "description": "xxxx模块,按xx通过次数切换无轮播和有轮播形态;位置、尺寸、图标和头像以各设计节点为准", "nodeXPath": "", "scope": "module", "variants": [ { "condition": "当前商品xx通过次数为0~9次,未达到轮播门槛", "uiDescription": "展示单行浅蓝底xx条,包含xxxxxxxxxxxxxxxx鉴别,100%正品保障及右箭头;不展示xxxxx", "pageId": "imports/999fc475-e92d-4114-abb2-230a7f37b958/组 739939.html", "nodeXPath": "/html/body/div[1]/div[1]/div[2]/div[1]/div[2]" }, { "condition": "当前商品xxxxxx次数大于或等于10次", "uiDescription": "展示xxxxxxxxx;上方展示xxxxxxxx「该商品已xx通过 XX 次,100%正品,假一赔xx」,下方展示xx记录的用户头像、昵称、xxx及xxx通过标识", "pageId": "imports/fe8941cd-72e1-4609-96eb-e697c09e6f0c/组 739938.html", "nodeXPath": "/html/body/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[6]" } ] } ] }MCP Handoff to Development
Downstream coding agents consume design artifacts, node annotations, page graph via MCP or OpenAPI, combine with business repo, APIs, data constraints for implementation. TaoDesign handles design expression and interaction context; technical solution, coding, testing, deployment remain on existing dev platform. End-to-end pipeline validated: package fetch, artifact merge, static hosting, knowledge archiving, PRD linking. Currently tested by engineers importing MasterGo files manually.
Design Acceptance
Verified against confirmed design: visual fidelity, state condition triggers, flow correctness, error handling. Two tracks:
Manual walkthrough: Frontend compares pre-release page with design, annotates diffs, PASS/NOPASS with reasons, failed returns to dev.
Automated walkthrough: For high-frequency standard scenarios, static screenshot diff, DOM diff, dynamic data simulation to catch style/structure deviations early.
Discrepancies categorized: implementation deviation → return to dev with state, reproduction steps, expected behavior; requirement ambiguity → back to workbench to clarify design specs, then sync code and acceptance baseline to avoid drift.
Results, Current Boundaries, Future Directions
Full delivery chain operational. Value measured by reduced duplicate design time, fewer clarification rounds, lower rework rate.
Current Engineering Boundaries
MasterGo round-trip conversion still lossy (complex shapes, dynamic interactions).
Asset revision requires human judgment and regression testing (AI drafts, designers decide generality).
Dynamic scenario automated walkthrough still maturing (needs deeper engineering integration for data-dependent pages).
Complex experience control, business intent decisions, critical quality gates still need professionals in the loop.
Future: One Person Team (OPT)
As assets mature and context clarifies, product managers and engineers can also leverage assets to express/validate ideas, lowering barrier to high-quality solutions. Goal: a single requirement owner uses shared assets and per-stage agents to drive idea → confirmation → implementation → acceptance. Foundation: complete requirement context, explicit engineering constraints, reliable verification. Designers shift from repetitive layout to new experience exploration, core interaction decisions, and continuous asset evolution.
For questions about attribution, corrections or content rights, please contactand we will review it promptly.