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.
Quickstart
Get Primitiv running in three commands.
Configuration
Configure sources, governance, and output.
CLI Reference
Commands for init, build, and serve.
MCP Tools
Tools exposed by the Primitiv MCP server.
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 ──┘- Scan — Primitiv ingests from any configured source via adapters
- Reconcile — Conflicts between sources are surfaced and resolved according to your governance configuration
- Infer — Design rules are extracted from actual codebase patterns and written into the contract
- Contract — A single
primitiv.contract.jsonis written as the canonical reference - MCP — Agents call
get_design_contextbefore 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.