The user wants to "Architect a design system contribution funnel for external vendors."
The key components mentioned are:
- Vetting: How do we allow vendors in? How do we check their credibility/quality before they even start?
- Variant Review: How do we handle the UI components they build? Reviewing code, design, and variations (states, themes).
- Token Alignment: Ensuring the contributed components use the design system's tokens (colors, spacing, typography) rather than hard-coded values.
I need to structure this as a comprehensive architectural plan. This isn't just a UI flow; it's a process and governance model.
Target Audience: Design System Team, Engineering Leads, Vendor Managers.
Structure of the Response:
- High-Level Philosophy: Why do we need this? (Scalability, Consistency, Quality).
- The Funnel Stages (The Core):
- Stage 1: Intake & Vetting (The Gate).
- Stage 2: Sandbox & Onboarding (The Setup).
- Stage 3: Development & Token Alignment (The Work).
- Stage 4: Variant & Code Review (The Gatekeeper).
- Stage 5: Merge & Release (The Reward).
- Technical Architecture: Tools, CI/CD, Dependency management.
- Governance Model: Roles (DS Team vs. Vendors), SLAs.
- Visualizing the Funnel: A Mermaid diagram would be nice.
Fleshing out the details:
Refining the "Architect" aspect:
It implies structure and tools.
- Repo Structure: Monorepo vs. Polyrepo. (Likely Monorepo or unified NPM registry for consumption).
- CI/CD: GitHub Actions/GitLab CI.
- Documentation: Storybook.
Key Differentiators for "External Vendors":
External vendors are different from internal employees. They have less context.
- Need clear documentation (Contribution.md).
- Need isolated environments (don't let them touch the core code easily).
- Need specific points of contact (DS Liaisons).
Drafting the Content - Section by Section:
- Intro: Define the scope.
- Stage 1: Partnership & Intake: The "Vetting". We aren't letting randoms in. It's invitation or proposal based.
- Criteria: Tech stack match, Design capability.
- Stage 2: Design & Architecture Alignment: Before code, design must be approved.
- Stage 3: Development (The Sandbox):
- Token enforcement mechanism (CSS Variables, Styled Components theme providers).
- Crucial: Token Linting. Ban hex codes.
- Stage 4: The Review Cycle (Variant Review):
- Check all states.
- API design (Props).
- Stage 5: Deprecation/Maintenance: Who fixes bugs later? (Vendor or Core team? Usually transitioned to Core or vendor maintains for a period).
Self-Correction during thought process:
- Initial thought: Just talk about code review.
- Correction: No, design systems are 50% design. Must mention Figma/Design handoff.
- Initial thought: Let them push to main.
- Correction: Terrible idea. Forking strategy is essential.
- Token Alignment: It's not just "use blue." It's "use
color-background-brand-primary." I need to emphasize Semantic tokens.
Final Polish:
Use professional terminology (RFC, PR, SLA, Semantic Tokens, Visual Regression). Use formatting (headers, lists, bold text). Create a diagram.
Let's write it out.
- Title: The External Vendor Contribution Funnel.
- Diagram: Intake -> Sandbox -> Automated Check -> Manual Review -> Merge.
- Step 1: Vetting: The "Contributor License Agreement" (CLA) concept.
- Step 2: The "Contract": Design Spec approval.
- Step 3: Token Enforcement: The "Hard Rules" (CI pipelines).
- Step 4: Review Board: The "Human Element."
(Self-Correction on "Variant Review"): Make sure to define what a variant is in this context (Size, State, Theme).
Let's structure the response now.
Architecting a funnel for external vendors requires shifting from a "gatekeeper" mindset to a "supply chain" mindset. You are importing code and design assets from an uncontrolled environment into a controlled one.
Here is the architectural blueprint for a Design System Vendor Contribution Funnel, broken down into five distinct stages.
The Funnel Architecture
We can visualize this as a progressive filter:
Intake → Automated Vetting → Token Alignment → Variant Review → Canonical Merge
Phase 1: Intake & Contract (The "Airlock")
Before a single line of code is reviewed, the vendor must agree to the constraints of the system.
- Contribution License Agreement (CLA): A legal digital sign-off ensuring the organization has rights to the code.
- The "Definition of Done" (DoD): A checklist the vendor must sign.
- Examples: "I have used no hard-coded colors," "I have included Storybook stories for all states," "I have run the accessibility axe-core scan."
- Templated Repository Structure:
- Do not accept a zip file. Require a Git repo using a strict template (e.g., a specific folder structure for
/src, /tokens, /docs).
Phase 2: Automated Vetting (The "Smoke Test")
This phase removes the need for human review on 80% of low-quality submissions.
- CI Pipeline Gates:
- Unit Test Coverage: Vendor code must maintain >90% coverage.
- Visual Regression: Automated screenshot comparison (via Percy or Chromatic) to ensure the component doesn't break existing views.
- Bundle Size: Reject if the component increases the overall bundle size beyond a set limit (preventing bloat).
- Linting for Governance:
- Accessibility Linting: Enforce
jsx-a11y or equivalent.
- Interaction Standards: Enforce specific interaction patterns (e.g., "All buttons must handle
onKeyDown").
Phase 3: Token Alignment (The "Chameleon Layer")
This is the most critical technical step. Vendor code usually arrives with "opinionated" styles (hard-coded hex values, magic numbers). We must force alignment with your Design Tokens.
- The "No Magic Numbers" Rule:
- Implement a Stylelint rule that rejects hard-coded values (e.g.,
#FFFFFF, 16px, 700).
- Correction: The build fails if the vendor hasn't referenced a token (e.g.,
var(--color-text-primary)).
- Semantic Token Mapping:
- Vendors often use Global Tokens (e.g.,
blue-500).
- The funnel requires them to use Semantic Tokens (e.g.,
color-background-interactive).
- Tooling: Provide vendors with a "Token Linter" CLI tool they can run locally to validate compliance before pushing.
- Theme Context Wrapper:
- Require all vendor components to be wrapped in a
ThemeProvider context during local development to prove the component adapts when the theme object is swapped (Light/Dark/High-Contrast).
Phase 4: Variant Review (The "Human Gate")
Once the code passes automated checks, it undergoes a split review: Visual and API.
- The Variant Matrix:
- Reviewers verify the component against a matrix of states:
- States: Default, Hover, Active, Disabled, Loading, Error.
- Densities: Desktop, Tablet, Mobile.
- Themes: Light, Dark, RTL (Right-to-Left).
- API Surface Review:
- Ensure the props interface matches system standards (e.g., if your system uses
isDisabled, the vendor cannot use disabled).
- Ensure standard events are passed through (e.g.,
onClick, className, style overrides).
- Behavioral Consistency:
- Does it "feel" like a native component? (Animation timing, click response, focus rings).
Phase 5: Canonical Merge & Documentation
The final stage where the external becomes internal.
- Deprecation Wrappers: If the vendor component replaces an internal one, a wrapper is created to map old props to new props to prevent breaking changes for consumers.
- Documentation Injection: Automatically pull the vendor's
README.md and JSDoc comments into the central DS documentation site (e.g., Zeroheight, Storybook).
The Governance Model (Roles & SLAs)
To prevent bottlenecking, define clear Service Level Agreements (SLAs) for the review team.
| Role | Responsibility | SLA |
|---|
| Vendor | Develops, Self-Tests, Submits PR. | N/A |
| DS Automaton | Runs CI/CD, Token Linting, Unit Tests. | Instant (Webhook) |
| DS Engineer | Reviews Code Quality, API, Token usage. | 3 Business Days |
| DS Designer | Reviews Visuals, Variants, Motion. | 3 Business Days |
| Accessibility Specialist | Reviews Screen Reader flow, Keyboard nav. | 5 Business Days |
Technical Implementation Strategy
To make this work technically, you should construct a "Monorepo Sandbox."
- The Setup: Maintain a repository specifically for vendor contributions. It should have your Design System Core as a dependency.
- The Process:
- Vendor forks the repo.
- Vendor creates a branch in
/packages/vendors/{component-name}.
- Vendor opens a Pull Request.
- The Enforcer (Stylelint/ESlint Config):
Create a sharable configuration package (
my-ds-vendor-config) that vendors install.
- This config contains the hard rules. If they don't use it, their build fails locally.
Summary Dashboard (The "Funnel View")
For internal stakeholders, visualize this funnel to track efficiency:
- Submitted: 12 Components
- Failed Vetting (Automated): 4 (Reason: Hard-coded colors)
- Failed Token Alignment: 2 (Reason: Incorrect semantic usage)
- In Design Review: 3
- Merged: 3