Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

feat(vibe-tests): add XDS + Tailwind target for verbosity comparison (#503)

Cindy Zhangdf8e1a5dd681
diff --git a/internal/vibe-tests/.generated/xds-tailwind-skill.md b/internal/vibe-tests/.generated/xds-tailwind-skill.md
new file mode 100644
index 0000000000..d1960406e8
--- /dev/null
+++ b/internal/vibe-tests/.generated/xds-tailwind-skill.md
@@ -0,0 +1,398 @@
+# XDS + Tailwind Design System
+
+React design system for building internal tools. All components use the `XDS` prefix.
+XDS components handle structure, behavior, and accessibility. Use Tailwind utility classes for layout, spacing, and visual customization.
+
+> This document is auto-generated from source. Do not edit manually.
+
+## Key Concept
+
+All XDS components accept a `className` prop for Tailwind utilities. Use XDS components for structure and behavior, Tailwind for styling.
+
+```tsx
+// XDS components + Tailwind utilities
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Stack';
+import {XDSHeading, XDSText} from '@xds/core/Text';
+import {XDSButton} from '@xds/core/Button';
+
+<XDSCard className="max-w-md p-6 shadow-lg">
+ <XDSVStack className="gap-4">
+ <XDSHeading level={2}>Title</XDSHeading>
+ <XDSText className="text-gray-500">Description text</XDSText>
+ <XDSButton label="Submit" variant="primary" />
+ </XDSVStack>
+</XDSCard>;
+```
+
+## CLI Reference
+
+Run these commands to get detailed docs on any component:
+
+- `npx xds component <Name>` — full docs (props, usage, examples)
+- `npx xds component <Name> --compact` — condensed reference
+- `npx xds component --list` — all components by category
+- `npx xds docs tokens` — token reference (spacing, color, radius)
+- `npx xds docs theme` — theme system reference
+
+## Principles
+
+React design system for internal tools. Components use `XDS` prefix.
+
+### Rules
+
+1. Use XDS components for everything they cover
+2. Use Tailwind utility classes for layout, spacing, colors, and responsive design
+3. Semantic tokens, not hardcoded values
+4. CSS variables for colors, not hex
+5. Form inputs are controlled (value + onChange)
+
+### Styling with Tailwind
+
+Use Tailwind utilities for:
+
+- **Spacing**: `p-4`, `mt-2`, `gap-3`, `mx-auto`, `space-y-4`
+- **Layout**: `flex`, `grid`, `max-w-md`, `w-full`, `items-center`, `justify-between`
+- **Colors**: `text-gray-500`, `bg-white`, `border-gray-200`, `bg-blue-50`
+- **Typography**: `text-sm`, `font-semibold`, `text-center`, `truncate`
+- **Responsive**: `sm:grid-cols-2`, `md:flex-row`, `lg:max-w-4xl`
+- **Borders**: `rounded-lg`, `border`, `shadow-md`
+- **States**: `hover:bg-gray-100`, `focus:ring-2`, `disabled:opacity-50`
+
+### Anti-Patterns
+
+❌ Inline `style={{}}` on elements → Use Tailwind classes via `className`
+❌ Hardcoded colors (#fff) → Use Tailwind color classes or var(--color-\*)
+❌ Inventing props → Read component docs first
+❌ Reimplementing components that XDS provides → Check the catalog below
+
+## Component Catalog
+
+Brief summaries of all available components. Run `npx xds component <Name>` for full docs.
+
+### Layout
+
+| Component | Import | Description |
+| ---------------- | ----------------------- | ---------------------------------------------- |
+| XDSAspectRatio | `@xds/core/AspectRatio` | Maintains aspect ratio for content |
+| XDSCenter | `@xds/core/Center` | Centers content horizontally and vertically |
+| XDSGrid | `@xds/core/Grid` | CSS grid layout container |
+| XDSGridSpan | `@xds/core/Grid` | Grid item that spans columns |
+| XDSHStack | `@xds/core/Stack` | Horizontal stack layout |
+| XDSLayout | `@xds/core/Layout` | Page-level layout with header, content, panels |
+| XDSLayoutContent | `@xds/core/Layout` | Main content area of layout |
+| XDSLayoutFooter | `@xds/core/Layout` | Footer area of layout |
+| XDSLayoutHeader | `@xds/core/Layout` | Header area of layout |
+| XDSLayoutPanel | `@xds/core/Layout` | Side panel of layout |
+| XDSStack | `@xds/core/Stack` | Generic stack (horizontal or vertical) |
+| XDSStackItem | `@xds/core/Stack` | Individual item in a stack |
+| XDSVStack | `@xds/core/Stack` | Vertical stack layout |
+
+### Display
+
+| Component | Import | Description |
+| ------------------ | -------------------- | ---------------------------------- |
+| XDSAvatar | `@xds/core/Avatar` | User avatar with image or initials |
+| XDSAvatarStatusDot | `@xds/core/Avatar` | Status indicator on avatar |
+| XDSBadge | `@xds/core/Badge` | Small label/count indicator |
+| XDSBaseTable | `@xds/core/Table` | Low-level table primitive |
+| XDSDivider | `@xds/core/Divider` | Visual separator line |
+| XDSFontWrapper | `@xds/core/Text` | Font family wrapper |
+| XDSHeading | `@xds/core/Text` | Heading text (h1-h6) |
+| XDSIcon | `@xds/core/Icon` | Icon display component |
+| XDSSkeleton | `@xds/core/Skeleton` | Loading placeholder |
+| XDSTable | `@xds/core/Table` | Data table with sorting |
+| XDSTableCell | `@xds/core/Table` | Table cell |
+| XDSTableHeaderCell | `@xds/core/Table` | Table header cell |
+| XDSTableRow | `@xds/core/Table` | Table row |
+| XDSText | `@xds/core/Text` | Body text with type scales |
+
+### Form
+
+| Component | Import | Description |
+| ----------------- | ------------------------- | ------------------------------------ |
+| XDSCheckboxInput | `@xds/core/CheckboxInput` | Checkbox with label |
+| XDSDateInput | `@xds/core/DateInput` | Date picker input |
+| XDSField | `@xds/core/Field` | Form field wrapper with label/status |
+| XDSFieldLabel | `@xds/core/Field` | Field label |
+| XDSFieldStatus | `@xds/core/Field` | Field validation status |
+| XDSNumberInput | `@xds/core/NumberInput` | Numeric input with stepper |
+| XDSRadioList | `@xds/core/RadioList` | Radio button group |
+| XDSRadioListItem | `@xds/core/RadioList` | Individual radio option |
+| XDSSelector | `@xds/core/Selector` | Dropdown select |
+| XDSSelectorItem | `@xds/core/Selector` | Selector option item |
+| XDSSelectorOption | `@xds/core/Selector` | Selector option |
+| XDSSlider | `@xds/core/Slider` | Range slider |
+| XDSSwitch | `@xds/core/Switch` | Toggle switch |
+| XDSTextArea | `@xds/core/TextArea` | Multi-line text input |
+| XDSTextInput | `@xds/core/TextInput` | Single-line text input |
+| XDSTimeInput | `@xds/core/TimeInput` | Time picker input |
+
+### Action
+
+| Component | Import | Description |
+| ------------------- | ------------------------ | ----------------------------------------------- |
+| XDSButton | `@xds/core/Button` | Button with variants (primary, secondary, etc.) |
+| XDSDropdownMenu | `@xds/core/DropdownMenu` | Dropdown menu with items |
+| XDSDropdownMenuItem | `@xds/core/DropdownMenu` | Menu item |
+| XDSLink | `@xds/core/Link` | Navigation link |
+| XDSLinkProvider | `@xds/core/Link` | Link routing provider |
+
+### Navigation
+
+| Component | Import | Description |
+| ----------------- | ------------------- | ---------------------- |
+| XDSTab | `@xds/core/TabList` | Individual tab |
+| XDSTabList | `@xds/core/TabList` | Tab navigation bar |
+| XDSTabMenu | `@xds/core/TabList` | Tab with dropdown menu |
+| XDSTopNav | `@xds/core/TopNav` | Top navigation bar |
+| XDSTopNavItem | `@xds/core/TopNav` | Nav bar item |
+| XDSTopNavMegaMenu | `@xds/core/TopNav` | Mega menu dropdown |
+| XDSTopNavMenu | `@xds/core/TopNav` | Nav bar menu |
+| XDSTopNavTitle | `@xds/core/TopNav` | Nav bar title/logo |
+
+### Overlay
+
+| Component | Import | Description |
+| --------------- | -------------------- | -------------------- |
+| XDSCalendar | `@xds/core/Calendar` | Calendar date picker |
+| XDSDialog | `@xds/core/Dialog` | Modal dialog |
+| XDSDialogHeader | `@xds/core/Dialog` | Dialog header |
+| XDSHoverCard | `@xds/core/Layer` | Card shown on hover |
+| XDSPopover | `@xds/core/Layer` | Popover overlay |
+| XDSTooltip | `@xds/core/Layer` | Tooltip overlay |
+
+### Other
+
+| Component | Import | Description |
+| ------------------- | ----------------------- | ----------------------------------------- |
+| XDSAppShell | `@xds/core/AppShell` | Application shell wrapper |
+| XDSBanner | `@xds/core/Banner` | Banner notification |
+| XDSBaseTypeahead | `@xds/core/Typeahead` | Low-level typeahead primitive |
+| XDSBreadcrumbItem | `@xds/core/Breadcrumbs` | Breadcrumb item |
+| XDSBreadcrumbs | `@xds/core/Breadcrumbs` | Breadcrumb navigation |
+| XDSCard | `@xds/core/Card` | Content card container |
+| XDSCollapsible | `@xds/core/Collapsible` | Collapsible/expandable section |
+| XDSCollapsibleGroup | `@xds/core/Collapsible` | Group of collapsible sections (accordion) |
+| XDSEmptyState | `@xds/core/EmptyState` | Empty state placeholder |
+| XDSFormLayout | `@xds/core/FormLayout` | Form layout helper |
+| XDSKbd | `@xds/core/Kbd` | Keyboard shortcut display |
+| XDSList | `@xds/core/List` | List container |
+| XDSListItem | `@xds/core/List` | List item |
+| XDSMobileNav | `@xds/core/MobileNav` | Mobile navigation drawer |
+| XDSMoreMenu | `@xds/core/MoreMenu` | "..." overflow menu |
+| XDSNavIcon | `@xds/core/NavIcon` | Navigation icon button |
+| XDSPagination | `@xds/core/Pagination` | Page navigation controls |
+| XDSProgressBar | `@xds/core/ProgressBar` | Progress indicator bar |
+| XDSSection | `@xds/core/Section` | Content section with heading |
+| XDSSideNav | `@xds/core/SideNav` | Side navigation panel |
+| XDSSideNavHeader | `@xds/core/SideNav` | Side nav header |
+| XDSSideNavItem | `@xds/core/SideNav` | Side nav item |
+| XDSSideNavSection | `@xds/core/SideNav` | Side nav section group |
+| XDSSpinner | `@xds/core/Spinner` | Loading spinner |
+| XDSStatusDot | `@xds/core/StatusDot` | Status indicator dot |
+| XDSToken | `@xds/core/Token` | Removable tag/token |
+| XDSTokenizer | `@xds/core/Tokenizer` | Multi-token input |
+| XDSTypeahead | `@xds/core/Typeahead` | Searchable dropdown with suggestions |
+| XDSTypeaheadItem | `@xds/core/Typeahead` | Typeahead suggestion item |
+
+## Token Reference
+
+XDS provides CSS custom properties you can reference alongside Tailwind utilities:
+
+### Spacing Tokens
+
+| Token | Value | Usage |
+| ----------------- | ----- | --------------- |
+| var(--spacing-0) | 0px | No spacing |
+| var(--spacing-1) | 4px | Tight spacing |
+| var(--spacing-2) | 8px | Compact spacing |
+| var(--spacing-3) | 12px | Default small |
+| var(--spacing-4) | 16px | Default medium |
+| var(--spacing-6) | 24px | Loose |
+| var(--spacing-8) | 32px | Extra loose |
+| var(--spacing-12) | 48px | Maximum spacing |
+
+### Color Tokens
+
+| Token | Usage |
+| --------------------------- | -------------------- |
+| var(--color-accent) | Primary action color |
+| var(--color-surface) | Background surface |
+| var(--color-wash) | Secondary background |
+| var(--color-positive) | Success states |
+| var(--color-negative) | Error states |
+| var(--color-warning) | Warning states |
+| var(--color-text-primary) | Main text |
+| var(--color-text-secondary) | Secondary text |
+| var(--color-text-link) | Link text |
+
+### Radius Tokens
+
+| Token | Value | Usage |
+| ----------------------- | ------ | --------------- |
+| var(--radius-rounded) | 9999px | Pills, avatars |
+| var(--radius-container) | 12px | Cards, modals |
+| var(--radius-element) | 8px | Buttons, inputs |
+| var(--radius-content) | 4px | Small elements |
+
+### Size Tokens
+
+| Token | Value | Usage |
+| -------------- | ----- | -------------------- |
+| var(--size-sm) | 28px | Compact controls |
+| var(--size-md) | 32px | Default control size |
+| var(--size-lg) | 36px | Larger controls |
+
+### Using Tokens with Tailwind
+
+You can reference XDS tokens in Tailwind arbitrary values:
+
+```tsx
+<div className="p-[var(--spacing-4)] bg-[var(--color-surface)] rounded-[var(--radius-container)]">
+ Content
+</div>
+```
+
+Or simply use Tailwind's built-in scale which maps closely:
+
+- `p-4` ≈ var(--spacing-4) (16px)
+- `rounded-xl` ≈ var(--radius-container) (12px)
+- `rounded-lg` ≈ var(--radius-element) (8px)
+
+## Theme System
+
+XDS uses a theme provider for consistent styling:
+
+```tsx
+import {XDSTheme, defaultTheme} from '@xds/core';
+
+<XDSTheme theme={defaultTheme}>
+ <App />
+</XDSTheme>;
+```
+
+### Custom Themes
+
+Create themes by overriding CSS custom properties:
+
+```tsx
+const myTheme = {
+ ...defaultTheme,
+ '--color-accent': '#7B61FF',
+ '--color-surface': '#1A1A2E',
+};
+
+<XDSTheme theme={myTheme}>
+ <App />
+</XDSTheme>;
+```
+
+### Nested Themes
+
+Wrap sections in different themes:
+
+```tsx
+<XDSTheme theme={lightTheme}>
+ <main className="flex">
+ <XDSTheme theme={darkTheme}>
+ <aside className="w-64">Dark sidebar</aside>
+ </XDSTheme>
+ <div className="flex-1">Light content</div>
+ </main>
+</XDSTheme>
+```
+
+## Common Patterns
+
+### Page Layout
+
+```tsx
+<XDSTheme theme={defaultTheme}>
+ <XDSLayout>
+ <XDSLayoutHeader>
+ <XDSTopNav>
+ <XDSTopNavTitle>My App</XDSTopNavTitle>
+ </XDSTopNav>
+ </XDSLayoutHeader>
+ <XDSLayoutPanel className="w-64">
+ <XDSSideNav>
+ <XDSSideNavItem label="Dashboard" />
+ <XDSSideNavItem label="Settings" />
+ </XDSSideNav>
+ </XDSLayoutPanel>
+ <XDSLayoutContent className="p-6">
+ <XDSVStack className="gap-6 max-w-4xl mx-auto">
+ <XDSHeading level={1}>Dashboard</XDSHeading>
+ <XDSText>Welcome to the app.</XDSText>
+ </XDSVStack>
+ </XDSLayoutContent>
+ </XDSLayout>
+</XDSTheme>
+```
+
+### Form with Validation
+
+```tsx
+<XDSCard className="max-w-md p-6">
+ <XDSVStack className="gap-4">
+ <XDSHeading level={2}>Sign Up</XDSHeading>
+ <XDSTextInput
+ label="Email"
+ value={email}
+ onChange={setEmail}
+ placeholder="[email protected]"
+ />
+ <XDSTextInput
+ label="Password"
+ type="password"
+ value={password}
+ onChange={setPassword}
+ />
+ <XDSButton
+ label="Create Account"
+ variant="primary"
+ onClick={handleSubmit}
+ className="w-full"
+ />
+ </XDSVStack>
+</XDSCard>
+```
+
+### Responsive Grid
+
+```tsx
+<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
+ {items.map(item => (
+ <XDSCard key={item.id} className="p-4">
+ <XDSVStack className="gap-2">
+ <XDSHeading level={3}>{item.title}</XDSHeading>
+ <XDSText className="text-sm text-gray-500">{item.description}</XDSText>
+ <XDSButton label="View" variant="secondary" />
+ </XDSVStack>
+ </XDSCard>
+ ))}
+</div>
+```
+
+### Dialog with Form
+
+```tsx
+<XDSDialog isOpen={isOpen} onClose={() => setIsOpen(false)}>
+ <XDSDialogHeader title="Edit Profile" />
+ <div className="p-4">
+ <XDSVStack className="gap-4">
+ <XDSTextInput label="Name" value={name} onChange={setName} />
+ <XDSTextArea label="Bio" value={bio} onChange={setBio} />
+ <XDSHStack className="gap-2 justify-end">
+ <XDSButton
+ label="Cancel"
+ variant="secondary"
+ onClick={() => setIsOpen(false)}
+ />
+ <XDSButton label="Save" variant="primary" onClick={handleSave} />
+ </XDSHStack>
+ </XDSVStack>
+ </div>
+</XDSDialog>
+```
diff --git a/internal/vibe-tests/.gitignore b/internal/vibe-tests/.gitignore
index a6586984b6..12c79a20a2 100644
--- a/internal/vibe-tests/.gitignore
+++ b/internal/vibe-tests/.gitignore
@@ -10,7 +10,9 @@ AGENTS.baseline.md
AGENTS.html.md
# Generated skill doc (from CLI)
-.generated/
+.generated/*
+# Exception: XDS + Tailwind skill doc is committed (not auto-generated)
+!.generated/xds-tailwind-skill.md
# Test results (generated)
results/
diff --git a/internal/vibe-tests/AGENTS.xds-tailwind.md b/internal/vibe-tests/AGENTS.xds-tailwind.md
new file mode 100644
index 0000000000..e7716e9a3a
--- /dev/null
+++ b/internal/vibe-tests/AGENTS.xds-tailwind.md
@@ -0,0 +1,46 @@
+# AGENTS.md
+
+Project-specific guidance for AI coding agents.
+
+<!-- XDS-TAILWIND:START -->
+
+[XDS + Tailwind v0.0.1]|IMPORTANT: Prefer retrieval-led reasoning. Run CLI to read docs before generating code.
+|npx xds component <Name> --compact Docs (props, usage)
+|npx xds component --list All components by category
+|npx xds docs tokens Token reference (spacing, color, radius)
+|npx xds docs theme Theme system: XDSTheme, custom themes, overrides, nesting
+|RULE: Use XDS components for structure, behavior, and accessibility.
+|RULE: Use Tailwind utility classes for layout, spacing, colors, and visual customization.
+|RULE: All XDS components accept a `className` prop for Tailwind utilities.
+|RULE: Do NOT use StyleX, stylex.create, or the xstyle prop. Use className with Tailwind instead.
+|RULE: Import components from @xds/core/<ComponentDir> (e.g., @xds/core/Button, @xds/core/Text)
+|PATTERN: <XDSCard className="max-w-md p-6"><XDSVStack className="gap-4">...</XDSVStack></XDSCard>
+|PATTERN: Use Tailwind responsive prefixes: sm:, md:, lg: for responsive layouts
+|PATTERN: Use Tailwind arbitrary values for XDS tokens: className="p-[var(--spacing-4)]"
+
+<!-- XDS-TAILWIND:END -->
+
+## Skill Doc
+
+Read `.generated/xds-tailwind-skill.md` for the full component catalog, token reference, and usage patterns.
+
+## Quick Start
+
+```tsx
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Stack';
+import {XDSHeading, XDSText} from '@xds/core/Text';
+import {XDSButton} from '@xds/core/Button';
+
+export default function MyComponent() {
+ return (
+ <XDSCard className="max-w-md p-6">
+ <XDSVStack className="gap-4">
+ <XDSHeading level={2}>Title</XDSHeading>
+ <XDSText className="text-gray-500">Description</XDSText>
+ <XDSButton label="Submit" variant="primary" />
+ </XDSVStack>
+ </XDSCard>
+ );
+}
+```
diff --git a/internal/vibe-tests/src/aggregate.ts b/internal/vibe-tests/src/aggregate.ts
index 3d011d068d..a446aa7167 100644
--- a/internal/vibe-tests/src/aggregate.ts
+++ b/internal/vibe-tests/src/aggregate.ts
@@ -118,8 +118,8 @@ function analyzeJobBreakdown(
// Imports
if (stripped.startsWith('import')) {
- if (target === 'xds') {
- // XDS: imports from @xds/core are component routing
+ if (target === 'xds' || target === 'xds-tailwind') {
+ // XDS/XDS+Tailwind: imports from @xds/core are component routing
if (line.includes('XDS') || line.includes('@xds')) {
jobs.componentRouting += chars;
} else {
@@ -146,7 +146,8 @@ function analyzeJobBreakdown(
continue;
}
- // StyleX styles block - XDS only, this is supplemental styling
+ // StyleX styles block - XDS (pure) only, this is supplemental styling
+ // For xds-tailwind, StyleX should not appear (Tailwind replaces it)
if (target === 'xds') {
if (line.includes('stylex.create')) {
inStyles = true;
@@ -160,8 +161,11 @@ function analyzeJobBreakdown(
}
}
- // For baseline: inline style objects are supplemental (escape hatch)
- if (target === 'baseline' && line.includes('style={{')) {
+ // For baseline/xds-tailwind: inline style objects are supplemental (escape hatch)
+ if (
+ (target === 'baseline' || target === 'xds-tailwind') &&
+ line.includes('style={{')
+ ) {
jobs.supplementalStyling += chars;
continue;
}
@@ -182,7 +186,7 @@ function analyzeJobBreakdown(
}
// JSX with components and props
- if (target === 'xds') {
+ if (target === 'xds' || target === 'xds-tailwind') {
// XDS component patterns
const propPatterns = [
'label=',
@@ -270,7 +274,10 @@ function analyzeJobBreakdown(
// JSX structure (html elements)
if (/<\/?[a-z]/.test(line)) {
- if (target === 'xds' && line.includes('XDS')) {
+ if (
+ (target === 'xds' || target === 'xds-tailwind') &&
+ line.includes('XDS')
+ ) {
// Already handled above
} else {
jobs.contentAuthoring += chars;
@@ -615,7 +622,7 @@ function detectEscapeHatches(
// Check for hardcoded colors (hex, rgb, hsl in StyleX style definitions)
// Only flag colors in stylex.create() blocks, not in data objects
// Dynamic data colors (like user-defined label colors) are acceptable
- if (target === 'xds') {
+ if (target === 'xds' || target === 'xds-tailwind') {
// Match colors specifically in style property contexts (after colon with property name)
// Skip if the color is a variable reference (like label.color) or data property
const hardcodedColorRegex =
@@ -642,8 +649,9 @@ function detectEscapeHatches(
// Check for hardcoded spacing (px values in padding, margin, gap)
// Skip for baseline since Tailwind classes handle this differently
+ // For xds-tailwind, flag hardcoded spacing (should use Tailwind utilities instead)
// Note: width/height are dimension constraints, not spacing - they're acceptable
- if (target === 'xds') {
+ if (target === 'xds' || target === 'xds-tailwind') {
// Only match true spacing properties, not dimensions
const hardcodedSpacingRegex =
/(?:padding|margin|gap|paddingTop|paddingBottom|paddingLeft|paddingRight|paddingBlock|paddingInline|marginTop|marginBottom|marginLeft|marginRight|marginBlock|marginInline|rowGap|columnGap)\s*:\s*['"]?\d+px['"]?/gi;
@@ -680,7 +688,9 @@ function detectEscapeHatches(
detail:
target === 'xds'
? 'Inline style object instead of StyleX'
- : 'Inline style object instead of Tailwind',
+ : target === 'xds-tailwind'
+ ? 'Inline style object instead of Tailwind className'
+ : 'Inline style object instead of Tailwind',
codeSnippet: match[0],
});
}
@@ -692,7 +702,7 @@ function detectEscapeHatches(
type: 'wrapper_div',
severity: 'acceptable',
detail:
- target === 'xds'
+ target === 'xds' || target === 'xds-tailwind'
? 'Wrapper div that could potentially use XDS layout components'
: 'Wrapper div (common in Tailwind patterns)',
codeSnippet: match[0],
@@ -722,7 +732,7 @@ function detectEscapeHatches(
}
// Check for hallucinated props - target-specific
- if (target === 'xds') {
+ if (target === 'xds' || target === 'xds-tailwind') {
// XDS-specific hallucination checks
const hallucinatedProps = [
{pattern: /variant\s*=\s*["']outline["']/g, prop: 'variant="outline"'},
@@ -771,7 +781,7 @@ function detectEscapeHatches(
// Check for hardcoded typography values (fontSize, fontWeight, lineHeight, fontFamily)
// These should use XDSText/XDSHeading type system or design tokens
- if (target === 'xds') {
+ if (target === 'xds' || target === 'xds-tailwind') {
// Hardcoded fontSize (raw px/rem/em values, not via var(--text-*))
const hardcodedFontSizeRegex =
/fontSize\s*:\s*['"]?\d+(?:\.\d+)?(?:px|rem|em)['"]?/gi;
diff --git a/internal/vibe-tests/src/interactive.ts b/internal/vibe-tests/src/interactive.ts
index a31411ae88..8634cb5759 100644
--- a/internal/vibe-tests/src/interactive.ts
+++ b/internal/vibe-tests/src/interactive.ts
@@ -722,6 +722,47 @@ You are writing React components using ONLY:
console.log('✓ Generated AGENTS.html.md');
}
+/**
+ * Install AGENTS.xds-tailwind.md and .generated/xds-tailwind-skill.md for XDS + Tailwind target
+ *
+ * This target uses XDS components with Tailwind utility classes instead of StyleX.
+ * The AGENTS.xds-tailwind.md and skill doc are committed to the repo, so this
+ * function just verifies they exist.
+ */
+function installXdsTailwindDocs(): void {
+ const vibeTestsDir = path.join(__dirname, '..');
+ const agentsMdPath = path.join(vibeTestsDir, 'AGENTS.xds-tailwind.md');
+ const skillDocPath = path.join(
+ vibeTestsDir,
+ '.generated',
+ 'xds-tailwind-skill.md',
+ );
+
+ if (!fs.existsSync(agentsMdPath)) {
+ console.error(
+ '⚠ AGENTS.xds-tailwind.md not found. Run generate-skill-doc.sh first.',
+ );
+ return;
+ }
+
+ if (!fs.existsSync(skillDocPath)) {
+ // Try generating via the skill doc script
+ try {
+ const generatedDir = path.join(vibeTestsDir, '.generated');
+ ensureDir(generatedDir);
+ console.log(
+ '⚠ xds-tailwind-skill.md not found in .generated/. Ensure it is generated.',
+ );
+ } catch (_error) {
+ console.warn(
+ '⚠ Failed to find xds-tailwind-skill.md, continuing without it',
+ );
+ }
+ }
+
+ console.log('✓ Using AGENTS.xds-tailwind.md (XDS + Tailwind target)');
+}
+
/**
* Install AGENTS.md for agent documentation
*/
@@ -756,7 +797,7 @@ interface InteractiveConfig {
holdout?: boolean;
persona: 'naive' | 'experienced' | 'adversarial';
degradation?: boolean; // Enable degradation curve testing
- target: 'xds' | 'baseline' | 'html'; // Target design system
+ target: 'xds' | 'baseline' | 'html' | 'xds-tailwind'; // Target design system
}
interface AgentTask {
@@ -942,7 +983,9 @@ function generateSubagentPrompt(
? 'AGENTS.baseline.md'
: config.target === 'html'
? 'AGENTS.html.md'
- : 'AGENTS.md';
+ : config.target === 'xds-tailwind'
+ ? 'AGENTS.xds-tailwind.md'
+ : 'AGENTS.md';
// Persona-specific framing to simulate different user types
const personaFraming: Record<string, Record<string, string>> = {
@@ -961,6 +1004,11 @@ function generateSubagentPrompt(
experienced: `Use only plain HTML elements and inline CSS. `,
adversarial: `I know React component libraries exist but I want raw HTML/CSS. `,
},
+ 'xds-tailwind': {
+ naive: '', // No special framing - just the natural request
+ experienced: `Use XDS components from @xds/core with Tailwind utility classes. `,
+ adversarial: `I'm used to plain Tailwind but need to use your design system components. `,
+ },
};
const framing = personaFraming[config.target]?.[config.persona] || '';
@@ -1055,7 +1103,7 @@ async function main() {
const targetIndex = args.indexOf('--target');
const target =
targetIndex !== -1
- ? (args[targetIndex + 1] as 'xds' | 'baseline' | 'html')
+ ? (args[targetIndex + 1] as 'xds' | 'baseline' | 'html' | 'xds-tailwind')
: 'xds';
const promptsIndex = args.indexOf('--prompts');
const promptIds =
@@ -1076,6 +1124,8 @@ async function main() {
installBaselineDocs();
} else if (target === 'html') {
installHtmlDocs();
+ } else if (target === 'xds-tailwind') {
+ installXdsTailwindDocs();
}
// Load test set
@@ -1111,7 +1161,7 @@ async function main() {
console.log(`Target: ${target.toUpperCase()}`);
console.log(`Persona: ${persona}`);
console.log(
- `Mode: ${target === 'xds' ? 'AGENTS.md' : target === 'baseline' ? 'AGENTS.baseline.md' : 'AGENTS.html.md'} (retrieval-led)`,
+ `Mode: ${target === 'xds' ? 'AGENTS.md' : target === 'baseline' ? 'AGENTS.baseline.md' : target === 'xds-tailwind' ? 'AGENTS.xds-tailwind.md' : 'AGENTS.html.md'} (retrieval-led)`,
);
console.log(
`Protocol: ${degradation ? 'Degradation (10-turn curve)' : 'One-shot'}`,
diff --git a/internal/vibe-tests/test-sets/default.json b/internal/vibe-tests/test-sets/default.json
index b76d515df5..fbe7638f78 100644
--- a/internal/vibe-tests/test-sets/default.json
+++ b/internal/vibe-tests/test-sets/default.json
@@ -273,7 +273,8 @@
"prompt": "An autocomplete input that fetches suggestions from an API as you type",
"expectedComponents": [
"XDSTextInput",
- "XDSCard"
+ "XDSCard",
+ "XDSTypeahead"
],
"complexity": "moderate",
"followUps": [