Back to Homepage

Technical Architecture

Stitch & Figma Interfaces

Bidirectional design canvas node syncing and automated Google Stitch spec builders.

User & Researcher Perspective

Stitch & Figma Interfaces bridges the gap between research findings and design layouts. By connecting Figma frame layers directly to accepted qualitative nuggets, it ensures that design decisions are backed by evidence. It also integrates with the Google Stitch Model Context Protocol (MCP) server to generate structural wireframes and design specs directly from verified reports.

Operational Workflows & Intent

  • Figma Syncing: Import Figma artboards, mapping visual layers to usability problems and accepted research codes.
  • Stitch Wireframing: Trigger Google Stitch layout synthesis to automatically draft UI wireframes built on verified user recommendations.

Engineering & Architecture Perspective

Layout compliance check services reside in backend/app/services/laws_of_ux_service.py and the external interfaces are routed through the MCP connector in backend/app/skills/registry.py.

Granular Technical Data Flow

  1. Figma Canvas Ingestion: The Figma connector retrieves the component layer hierarchy via API, storing the layout tree in the local SQLite database.
  2. Evidence Binding: Layers are bound to database nugget IDs, establishing a bi-directional mapping.
  3. MCP Server Dispatch: The system initiates a Google Stitch tool call over the Model Context Protocol (MCP) transport channel.
  4. Wireframe Synthesis: The Stitch server processes reports, maps recommendations to spatial UI layouts, and registers the wireframe specs in the design folder.

Technical Documentation Approach

MCP connectivity utilizes strict authorization parameters, checking all incoming and outgoing schemas against validated MCP server trust policies.

Compliance & Quality Invariants

  • Auth Guarding: Figma API tokens and Stitch server scopes are encrypted at rest using project-scoped Fernet keys.
  • Schema Sanitation: Outgoing tool calls are sanitized to prevent prompt injections from carrying malicious scripts to local design environments.

Scientific Foundations & Bibliography

Interoperability protocols are built on verified model context standards and integration frameworks:

  • Model Context Protocol: Model Context Protocol (2025) — "MCP Specification 2025-11-25" modelcontextprotocol.io. The open standard for tool and platform integration.
  • Agent-to-Agent Protocols: Agent2Agent Project (2026) — "Agent2Agent (A2A) Protocol Specification" a2a-protocol.org. Inspires our cross-system interoperability manifests.

Source Code Reference

  • backend/app/services/laws_of_ux_service.py
  • backend/app/skills/registry.py
Stitch & Figma Interfaces Diagram