Primitiv

Introduction

The design contract layer for your agents.

Primitiv is the design contract layer for agent-first codebases. It sits above your design sources — Figma, codebase, Storybook, token files — scans them, actively reconciles conflicts between them, and infers the design rules your codebase is already following. The result is a single machine-readable contract exposed via MCP.

Unlike read-only retrieval tools, Primitiv doesn't just surface what exists — it resolves what's true. Any agentic tool that connects gets one authoritative answer before it builds anything.

Your code never leaves your machine.

How it works

Any source                      Primitiv                    Your agent

Figma           ──┐
Codebase        ──┤──► scan ──► reconcile ──► contract ──► MCP ──► Cursor / Claude Code / Codex / Windsurf / any MCP-compatible tool
Storybook       ──┤
Tokens file     ──┤
Any adapter     ──┘
  1. Scan — Primitiv ingests from any configured source via adapters
  2. Reconcile — Conflicts between sources are surfaced and resolved according to your governance configuration
  3. Infer — Design rules are extracted from actual codebase patterns and written into the contract
  4. Contract — A single primitiv.contract.json is written as the canonical reference
  5. MCP — Agents call get_design_context before building and receive the resolved contract

Principles

  • Source-agnostic — Works with Figma, Storybook, token files, raw codebase, or any combination. Sources are configured via adapters.
  • Contract over documentation — The output is a machine-readable contract designed to be consumed by agents, not read by people.
  • Active reconciliation — Resolves conflicts between sources and produces something authoritative. Retrieval gives you data; reconciliation gives you truth.
  • Inferred before prescribed — Surfaces the rules your codebase is already following before asking you to write any.
  • Governance is explicit — Conflicts are surfaced, logged, and resolved according to rules you define. Nothing is resolved by guessing.
  • Local-first — Everything runs on your machine. Your codebase is never sent to an external service.
  • Incrementally adoptable — Start with a single source. Add more as needed.

On this page