🔨 supersite-build: Surgical Builder
supersite-build executes the architectural plan established by /supersite-plan. It reads supersite-plan.md, constructs atomic components, wires up design tokens and copy, and validates the implementation against the build engine.
The Execution Pipeline
┌─────────────────────────────────────────────────────────────┐
│ 1. Read & Validate Specification Contract │
│ Parse tokens, routes, and manifest from supersite-plan.md │
├─────────────────────────────────────────────────────────────┤
│ 2. Scaffolding, Types & Config │
│ Create src/types/site.ts, src/config/site.ts & base CSS │
├─────────────────────────────────────────────────────────────┤
│ 3. Build UI Primitives │
│ Container, SectionHeader, Button, Badge & Card │
├─────────────────────────────────────────────────────────────┤
│ 4. Build Section Blocks │
│ Navbar, Hero, Contrast, Features, Proof, Pricing & Footer │
├─────────────────────────────────────────────────────────────┤
│ 5. Assemble Routes & Verify Build │
│ Wire pages, check accessibility & execute npm run build │
└─────────────────────────────────────────────────────────────┘
Step 1: Read & Validate supersite-plan.md
- Look for
supersite-plan.mdin the workspace root.- If missing, pause and inform the user:
"No
supersite-plan.mdfound in the project root. Please run/supersite-planto design your plan collaboratively, or run/supersite <prompt>to generate directly."
- If missing, pause and inform the user:
- Parse the architectural parameters from the plan:
- Aesthetic Genre & Color Palette (Hex/OKLCH, 60-30-10 distribution).
- Typography and Corner Radius choices.
- Route and Component Manifest.
- Section copy, headlines, and interactive elements.
Step 2: Scaffolding, Types & Config
- Verify Dependencies:
- Ensure standard utilities are present (
lucide-react,clsx,tailwind-merge). Install if missing:npm install lucide-react clsx tailwind-merge
- Ensure standard utilities are present (
- Generate TypeScript Contracts (
src/types/site.ts):- Define types for
NavItem,FeatureItem,PricingPlan,Testimonial, andFAQItem.
- Define types for
- Generate Centralized Config (
src/config/site.ts):- Store navigation links, brand metadata, and structured section content in one place.
- Update Base CSS (
src/app/globals.css):- Inject color variables, selection styles, and the reduced motion accessibility block:
@layer base { ::selection { background-color: var(--accent); color: var(--accent-foreground); } } @media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
- Inject color variables, selection styles, and the reduced motion accessibility block:
Step 3: Build UI Primitives (src/components/ui/)
Generate modular primitives:
container.tsx: Max-width container (max-w-6xlormax-w-7xl) with responsive padding.section-header.tsx: Standardized badge, title, and description block.button.tsx: Variant-driven button (primary,secondary,outline,ghost) with explicit:focus-visiblestyles.badge.tsx: Pill and status chips with fine hairline borders.card.tsx: Surface wrapper applying the plan's surface color, border, and radius tokens.
Step 4: Build Section Blocks (src/components/site/)
Construct each section specified in the plan:
navbar.tsx: Responsive header with desktop navigation links, action CTA, and mobile hamburger drawer.hero.tsx: Hook pill, H1 title, lead paragraph, CTA cluster, and interactive product preview (e.g. terminal or UI frame).problem-contrast.tsx: Asymmetric visual contrast illustrating the status quo pain versus the modern solution.feature-grid.tsx: Asymmetric bento grid or modular feature cells. Zero repetitive 3-card copies.product-showcase.tsx: Interactive component (tabbed code explorer, live interactive preview, or configuration playground).social-proof.tsx: Verifiable metrics callouts and customer testimonial quotes with specific engineering roles.pricing-matrix.tsx: Monthly / Annual billing toggle (with"use client"), tier cards, feature checklists, and checkout CTAs.faq-accordion.tsx: Expandable technical Q&A using smooth CSS grid height transitions.footer.tsx: Multi-column navigation links, legal anchors, system status dot, and copyright.
Step 5: Assemble Routes & Verify Build
- Assemble
src/app/page.tsx:- Import section components and compose the narrative layout in clean, declarative JSX.
- Assemble Additional Routes:
- If the plan specified multi-page routes (
/features,/pricing,/security), construct the correspondingpage.tsxfiles.
- If the plan specified multi-page routes (
- Run Pre-Flight Anti-Slop Audit:
- Check for forbidden styles: no purple gradient blobs, no ungrounded cards, no generic placeholder copy.
- Check touch targets: verify interactive hit areas are ≥44×44px.
- Check em-dashes: verify zero em-dashes (
—or--) in all UI copy, headlines, microcopy, and button labels.
- Compile & Build Gate:
- Execute the workspace build command:
npm run build - If any TypeScript error or missing import occurs, fix it immediately and re-run until the build passes cleanly with code 0.
- Execute the workspace build command:
- Report to User:
- In all conversational responses and progress reports, enforce the Zero Em-Dash Rule (never use
—or--). Use periods, colons, commas, or parentheses instead. - Provide a clean summary of constructed files with clickable links:
[supersite-plan.md](file:///path/to/supersite-plan.md)[page.tsx](file:///path/to/src/app/page.tsx)- Individual component links in
src/components/site/
- Confirm successful compilation.
- In all conversational responses and progress reports, enforce the Zero Em-Dash Rule (never use