Skip to content

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

TypeScript

feat(vibe-tests): add raw HTML target for three-way comparison (#257)

Cindy Zhanga1ef4d98237e
diff --git a/internal/vibe-tests/.gitignore b/internal/vibe-tests/.gitignore
index 264110b849..d97e5c57c8 100644
--- a/internal/vibe-tests/.gitignore
+++ b/internal/vibe-tests/.gitignore
@@ -6,5 +6,8 @@ AGENTS.md
.baseline-docs/
AGENTS.baseline.md
+# Raw HTML docs (generated)
+AGENTS.html.md
+
# Test results (generated)
results/
diff --git a/internal/vibe-tests/src/interactive.ts b/internal/vibe-tests/src/interactive.ts
index 2af6f15f2a..baf23e2a20 100644
--- a/internal/vibe-tests/src/interactive.ts
+++ b/internal/vibe-tests/src/interactive.ts
@@ -675,6 +675,53 @@ Style with className to match the content being loaded.
);
}
+/**
+ * Install AGENTS.html.md for raw HTML/CSS target
+ */
+function installHtmlDocs(): void {
+ const vibeTestsDir = path.join(__dirname, '..');
+ const agentsMdPath = path.join(vibeTestsDir, 'AGENTS.html.md');
+
+ if (fs.existsSync(agentsMdPath)) {
+ const stats = fs.statSync(agentsMdPath);
+ const ageMs = Date.now() - stats.mtimeMs;
+ if (ageMs < 60 * 60 * 1000) return;
+ }
+
+ const agentsMd = `# AGENTS.md
+
+Project-specific guidance for AI coding agents.
+
+## Raw HTML/CSS — No Component Library
+
+You are writing React components using ONLY:
+- Plain HTML elements (div, span, p, h1-h6, button, input, etc.)
+- Inline styles via the \`style\` prop (style={{ ... }})
+- Standard React hooks (useState, useEffect, etc.)
+
+### Rules
+
+1. Do NOT import any component library (no shadcn, no MUI, no XDS, no Radix)
+2. Do NOT use Tailwind CSS or any CSS framework
+3. Do NOT use CSS modules, styled-components, or CSS-in-JS libraries
+4. Use inline \`style={{}}\` for ALL styling
+5. Use semantic HTML elements where appropriate (button, nav, main, etc.)
+6. Handle accessibility yourself (aria-labels, roles, keyboard events)
+7. Export a default function component
+
+### Styling Guidelines
+
+- Use reasonable defaults: system font stack, 16px base, #333 text
+- Use consistent spacing: 4/8/12/16/24/32px scale
+- Use a neutral color palette: grays for backgrounds, blue for accent
+- Add border-radius for interactive elements
+- Include hover/focus states on interactive elements
+`;
+
+ fs.writeFileSync(agentsMdPath, agentsMd);
+ console.log('✓ Generated AGENTS.html.md');
+}
+
/**
* Install AGENTS.md for agent documentation
*/
@@ -709,7 +756,7 @@ interface InteractiveConfig {
holdout?: boolean;
persona: 'naive' | 'experienced' | 'adversarial';
degradation?: boolean; // Enable degradation curve testing
- target: 'xds' | 'baseline'; // Target design system
+ target: 'xds' | 'baseline' | 'html'; // Target design system
}
interface AgentTask {
@@ -890,7 +937,11 @@ function generateSubagentPrompt(
// Target-specific AGENTS.md file
const agentsMdFile =
- config.target === 'baseline' ? 'AGENTS.baseline.md' : 'AGENTS.md';
+ config.target === 'baseline'
+ ? 'AGENTS.baseline.md'
+ : config.target === 'html'
+ ? 'AGENTS.html.md'
+ : 'AGENTS.md';
// Persona-specific framing to simulate different user types
const personaFraming: Record<string, Record<string, string>> = {
@@ -904,6 +955,11 @@ function generateSubagentPrompt(
experienced: `Use baseline/ui components. `,
adversarial: `I'm used to Material UI patterns but need to use your design system. `,
},
+ html: {
+ naive: '', // No special framing
+ experienced: `Use only plain HTML elements and inline CSS. `,
+ adversarial: `I know React component libraries exist but I want raw HTML/CSS. `,
+ },
};
const framing = personaFraming[config.target]?.[config.persona] || '';
@@ -996,7 +1052,9 @@ async function main() {
const degradation = args.includes('--degradation');
const targetIndex = args.indexOf('--target');
const target =
- targetIndex !== -1 ? (args[targetIndex + 1] as 'xds' | 'baseline') : 'xds';
+ targetIndex !== -1
+ ? (args[targetIndex + 1] as 'xds' | 'baseline' | 'html')
+ : 'xds';
const promptsIndex = args.indexOf('--prompts');
const promptIds =
promptsIndex !== -1 ? args[promptsIndex + 1].split(',') : undefined;
@@ -1014,6 +1072,8 @@ async function main() {
installAgentsDocs();
} else if (target === 'baseline') {
installBaselineDocs();
+ } else if (target === 'html') {
+ installHtmlDocs();
}
// Load test set
@@ -1049,7 +1109,7 @@ async function main() {
console.log(`Target: ${target.toUpperCase()}`);
console.log(`Persona: ${persona}`);
console.log(
- `Mode: ${target === 'xds' ? 'AGENTS.md' : 'AGENTS.baseline.md'} (retrieval-led)`,
+ `Mode: ${target === 'xds' ? 'AGENTS.md' : target === 'baseline' ? 'AGENTS.baseline.md' : 'AGENTS.html.md'} (retrieval-led)`,
);
console.log(
`Protocol: ${degradation ? 'Degradation (10-turn curve)' : 'One-shot'}`,