Version: 1.9.0
Target Audience: Developers, Design Engineers, and AI Coding Agents (Google Antigravity, Claude Code, Cursor, Codex, Windsurf)
Status: Authoritative Reference Manual
- The Mental Model: Design Engineering vs. Visual Prompting
- Agent Discovery & Environment Setup
- Step-by-Step Lifecycle Tutorial: Building a Production Prototype
- Component & Seam Matrices Cookbook (Volumes 01–03)
- The Anti-Slop Discipline & Quality Gate
- Rule 15: YAML Primacy & Token Management
- Arabic & Bilingual RTL Engineering
- CLI Tooling & Automated Verification
Traditional AI coding interactions treat UI design as an ad-hoc text prompt:
User: "Create a SaaS landing page for an AI CRM"
Model: Emits arbitrary HTML with inline styles, un-tokenized colors, and generic components.
TidyFactor Design replaces prompt guesswork with an Engineering Operating System:
┌───────────────────────────────────────────────────────────┐
│ Design Intelligence │
│ Operational Memory (Matrices) + Workflows (Steps) │
└─────────────────────────────┬─────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────┐
│ AI Coding Agent │
│ Scaffolds design-system/ with zero per-page CSS/JS │
└─────────────────────────────┬─────────────────────────────┘
▼
┌───────────────────────────────────────────────────────────┐
│ Deterministic Verification │
│ 7-Axis Critique Stamp + AST Anti-Pattern Audit │
└───────────────────────────────────────────────────────────┘
- Zero per-page CSS/JS: All design tokens and component styles live inside
design-system/. HTML pages inpages/contain semantic markup only. - Single CSS Foundation: Lock Native CSS, Tailwind, daisyUI, shadcn/ui, Pico, or Hybrid once during
/init. Never mix foundations. - Operational Memory Primacy: Operational files (
references/memory/) contain pure engineering constraints, formulas, and matrices—zero narrative essays.
# Via TidyFactor CLI
npx @tidyfactor/cli add tidyfactor-design
# Via skills.sh standard
npx skills add TidyFactor/Design- Google Antigravity: Native detection in
.agents/skills/tidyfactor-designor~/.gemini/config/skills/. - Claude Code: Direct slash command execution via
/brief,/init,/components. - Cursor / Codex / Windsurf: Contextual discovery from
SKILL.mddispatcher.
Before writing markup, evaluate the Contextual Decision Layer (CDL) to resolve unknowns:
/briefThe agent scans existing project files (brand.yaml, pages/, configs) and only prompts for genuine unknowns:
- Audience Mode: Inspire (aspirational), Evaluate (data-dense), Act (conversion-first), or Learn (editorial).
- Surface Type: Landing, Dashboard, Product, Editorial, Minimal, or Spatial.
- Tone School: Swiss-international, Neo-brutalist, Luxury, Bento, or Heritage.
Output: Cached baseline locked in .tidyfactor/design-brief.snapshot.json and .tidyfactor/design-brief.md.
Initialize the project structure with zero build steps:
/init --foundation native --school swiss-internationalThis scaffolds:
project-root/
├── brand.yaml # Canonical design tokens & identity SSOT
├── brand.json # Backward-compatible mirror
├── design-system/
│ ├── tokens.css # CSS custom properties (colors, type, radius)
│ ├── components.css # 8-state component styles
│ └── motion.js # GSAP & scroll choreography
├── pages/ # Markup-only HTML pages
└── index.html # Root entry point
Derive WCAG 2.1 AAA compliant colors directly from brand assets:
python scripts/extract_palette.py assets/logo.png --yamlSelect a mood-routed typography pairing:
/typography --mood confident-saas- Latin Display: Outfit or Plus Jakarta Sans
- Latin Body: Inter or Roboto
- Arabic Display: El Messiri (never Amiri > 24px)
- Arabic Body: Tajawal
Assemble container shells from layout archetypes L1–L4:
/layout --archetype L1-split-hero
/nav-footer --nav N3-floating-glass --footer Ft2-minimal-splitScaffold modular components using authoritative matrices:
- Add a Kicker tag (
21-eyebrow-kicker-matrix.md):family-badgeorfamily-code - Add a Hero architecture (
22-hero-section-matrix.md):kinetic-split-typewith GSAP - Add Cards (
23-card-architecture-matrix.md): Flex-column withmargin-top: autopinned CTAs - Add 8-State Buttons (
24-button-cta-matrix.md): Supporting idle, hover, active, focus, disabled, loading, success, error
Run the deterministic AST audit to verify zero inline styles and check anti-pattern tells:
/audit
# Or run deterministic script directly:
python scripts/audit_design.py --target .Verify the output stamp:
/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */Generate clean handoff tables mapping CSS variables to production frameworks:
/handoff --framework react-tailwind<div class="c-eyebrow c-eyebrow--pill" data-accent="emerald">
<span class="c-eyebrow__dot"></span>
<span class="c-eyebrow__label">Release v1.9.0 Available</span>
</div>The seam belongs to the outgoing section and draws color dynamically from the incoming section:
<section class="s-hero s-hero--light">
<!-- Section Content -->
<div class="c-seam c-seam--wave" aria-hidden="true">
<svg viewBox="0 0 1440 80" preserveAspectRatio="none">
<path d="M0,0 C360,60 1080,60 1440,0 L1440,80 L0,80 Z" fill="var(--color-surface-next)" />
</svg>
</div>
</section>Always enforce vertical flex and margin-top: auto on card actions:
.c-card {
display: flex;
flex-direction: column;
}
.c-card__footer {
margin-top: auto;
}TidyFactor Design automatically rejects generic AI output. When authoring pages, ensure:
- No Purple Gradient Slop: Never pair
#7C3AEDto#EC4899gradient backgrounds with white text. - No Pure Black / White: Use tinted neutrals (
#0F172A,#1E293B) instead of#000000. - No Un-aligned CTAs: All buttons in grid rows must align horizontally via
mt-auto. - No Floating Mid-Screen Heroes: Hero top padding must not push primary CTA below the fold.
- No Decorative Grid Overlays: Do not place
linear-gradient(1px, transparent)grids on non-technical pages.
Store design tokens in brand.yaml instead of JSON:
name: "Acme SaaS"
version: "1.0.0"
cssFoundation: "native"
school: "swiss-international"
colors:
light:
background: "#F8FAFC"
surface: "#FFFFFF"
text: "#0F172A"
primary: "#2563EB"
primaryForeground: "#FFFFFF"
border: "#E2E8F0"
dark:
background: "#090D16"
surface: "#0F172A"
text: "#F8FAFC"
primary: "#3B82F6"
primaryForeground: "#FFFFFF"
border: "#1E293B"- Headings: Use
El Messiri(font-family: var(--font-arabic-heading)). - Body Text: Use
Tajawal(font-family: var(--font-arabic-body)). - Hard Constraint: Never use
Amirifor headings larger than 24px (Amiri is a traditional Naskh book font; large display rendering produces spindly strokes). - Bidi Mirroring: Use CSS logical properties (
margin-inline-start,padding-inline-end,inset-inline-start) instead ofleft/right.
Run automated checks before pushing or deploying:
# 1. AST Lint & Design Consistency
python scripts/audit_design.py --target .
# 2. Release & Integrity Validation
python tools/validate_skill.py
# 3. Package & Sync Across Agents
node tools/build-skill.js