Skip to content

[META] Component Schema Authoring Tool - Project Tracking #657

@GarthDB

Description

@GarthDB

Project Overview

Build a web-based authoring tool for component schemas that addresses the critical gap between component schema enum values and token option names.

Problem Statement

  • Component schemas use abbreviated values: s, m, l, xl
  • Token names use full words: small, medium, large, extra-large
  • No explicit mapping exists between these values
  • 26 components duplicate identical size patterns
  • Manual JSON editing is error-prone and inconsistent

Solution

A web-based authoring tool that:

  1. Establishes explicit schema-to-token mappings
  2. Creates reusable size profiles for consistency
  3. Provides validation and consolidation features
  4. Enables automated GitHub PR workflow
  5. Runs entirely in browser (zero infrastructure cost)

Architecture

  • Frontend: React + TypeScript + Vite
  • UI: Spectrum Web Components
  • Git: isomorphic-git (browser-based)
  • API: @octokit/rest (GitHub API)
  • Deployment: Static GitHub Pages
  • Authentication: GitHub OAuth Device Flow

Implementation Plan

Planning & Discussion

v1 MVP (Must Have) - 4-6 weeks

v2 (Should Have) - 10-14 weeks

v3+ (Nice to Have) - Future

Success Metrics

  1. Completeness: 100% of components have explicit schema-to-token mappings
  2. Consolidation: 26+ components use shared size profiles (reduce duplication)
  3. Adoption: 80%+ of schema changes made via tool (vs manual editing)
  4. Quality: 95%+ validation pass rate for all components
  5. Efficiency: 80%+ time saved vs manual JSON editing
  6. Cost: Zero infrastructure costs (static hosting)

Strategic Alignment

User Personas

  • Designers: Need simple UI to author component options (Figma plugin in v3)
  • Developers: Need full control, validation, GitHub integration (web tool)
  • Token Maintainers: Need schema-token consistency (validation features)

Dependencies

  • React, Vite, TypeScript
  • Spectrum Web Components
  • isomorphic-git + Lightning FS
  • @octokit/rest
  • Ajv (JSON Schema validation)
  • diff2html

Risks & Mitigations

Risk Likelihood Impact Mitigation
Browser storage limits Medium Medium Monitor usage, clear old clones, repo is only ~10MB
Git operations fail High High Comprehensive error handling, fallback export
User adoption low Medium High User testing, clear docs, designer outreach
Merge conflicts Medium Medium Auto-sync, clear error messages
OAuth complexity Low Medium Clear UI, good error messages

Related Documents

  • Main Plan: .cursor/plans/figma_plugin_poc_for_token_spec_authoring_067bdbb4.plan.md
  • Component Schema Analysis: .cursor/plans/component-schema-analysis.md
  • GitHub PR Workflow: .cursor/plans/github-pr-workflow-design.md
  • Deployment Architecture: .cursor/plans/deployment-architecture-analysis.md
  • RFC Context: .cursor/plans/rfc-context-summary.md
  • POC Analysis: .cursor/plans/figma-plugin-poc-analysis.md

Status

🟡 Planning Complete - Ready to begin implementation with #647

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions