A comprehensive design system built with Style Dictionary, featuring Material Color Utilities integration, automated accessibility testing, and multi-platform support.
- Token-Based Architecture: Three-tier token system (primitives β semantic β component)
- Material Color Utilities: Advanced color generation with HCT color space
- Accessibility First: Automated WCAG compliance testing
- Multi-Platform: Generate tokens for CSS, JS, iOS, Android, and more
- SVG Asset Pipeline: Dynamic icon theming with SVGO optimization
- Type Safety: Full TypeScript support throughout
Based on comprehensive research of the current design system landscape, Terroir Core is adopting a next-generation architecture that combines the best of modern approaches:
- Open-Code Distribution: Adopting shadcn/ui's revolutionary approach where users get full control over component source code
- AI-Native Design: Built for seamless integration with AI generation tools like V0
- Scientific Color Foundation: Material Color Utilities provide perceptually uniform colors
- Performance-First: Zero runtime overhead through build-time optimization
Phase 1 - Core Foundation (v0.1.0) β Current
- Material Color Utilities integration
- Design token architecture with Style Dictionary
- TailwindCSS configuration system
- Basic build pipeline
Phase 2 - Component CLI (v0.2.0) π§ Next
- Component installation CLI tool (like shadcn/ui)
- Basic component templates (Button, Card, Input, Select)
- Headless UI primitives integration
- Component registry system
Phase 3 - AI Integration (v0.3.0)
- V0 template compatibility
- AI-friendly component APIs
- Automated component documentation
- LLM-optimized code patterns
Phase 4 - Enterprise Features (v1.0.0)
- Multi-brand theming system
- Advanced component variants
- Performance optimization tools
- Complete component library
- AI Readiness: Open-code components work seamlessly with AI generation tools
- Developer Control: Full customization without library constraints
- Performance: No runtime overhead from traditional component libraries
- Future-Proof: Architecture adapts to new frameworks and tools
- Scientific Foundation: Material Color Utilities provide proven color science
This positions Terroir Core as a bridge between AI-generated components and scientific design principles, making it highly relevant for modern development workflows.
# Install dependencies
pnpm install
# Build all tokens
pnpm build
# Development mode with watch
pnpm dev
# Run tests
pnpm test
terroir-core/
βββ tokens/ # Design token source files
β βββ base/ # Base token definitions
βββ scripts/ # Build and generation scripts
βββ packages/ # Platform-specific packages
β βββ core/ # Core tokens package
β βββ react/ # React components
β βββ web-components/ # Web Components
βββ assets/ # Visual assets (icons, images)
βββ docs/ # Documentation
βββ tests/ # Test suites
- Primitive Tokens: Raw values (colors, sizes, durations)
- Semantic Tokens: Purpose-driven tokens (primary, secondary, error)
- Component Tokens: Component-specific tokens (button.padding, card.shadow)
- Colors:
on-{background}
pattern for accessibility relationships - Spacing: T-shirt sizes (xs, sm, md, lg, xl) with numerical scale
- Typography: Semantic names (heading, body, caption) with variants
Powered by Google's Material Color Utilities:
- HCT Color Space: Perceptually uniform color generation
- Continuous Tone Scale: 0-100 scale for precise control
- Dynamic Theming: Generate complete themes from a single brand color
- Accessibility: Pre-calculated contrast ratios for WCAG compliance
- Add token definitions to
tokens/base/
- Run
pnpm build
to generate outputs - Tokens automatically validated for accessibility
- Add SVG files to
assets/icons/
- Use token references:
fill="{color.primary}"
- Build process replaces with CSS variables
# Run all tests
pnpm test
# Accessibility tests only
pnpm test:a11y
# Visual regression tests
pnpm test:visual
pnpm add @terroir/core
import { tokens } from '@terroir/core';
import { Button } from '@terroir/core/react';
git submodule add https://github.com/your-org/terroir-core design-system
This project includes an innovative multi-agent development system that enables parallel development with 70% less memory usage than traditional approaches.
A Docker-based system that lets one developer coordinate multiple parallel tasks:
- 1 Core Agent: Your main VS Code environment
- N Assistant Agents: Lightweight Docker containers for parallel work
- Git Worktrees: Each agent on its own branch, no conflicts
# Start an assistant agent
cd .agents/docker
./agent-manager.sh start 1
# Generate Claude AI prompt for the agent
./agent-manager.sh prompt 1
See .agents/index.md for complete documentation on this accelerated development approach.
- Fork the repository
- Create your feature branch (or use multi-agent workflow for complex features)
- Commit changes (hooks ensure quality)
- Push to the branch
- Create a Pull Request
MIT License - see LICENSE file for details