Generate a DESIGN.md from a brand brief. Use when the user wants to create a visual identity, design system, or brand style guide for a web project. Also use when starting a new website from scratch. Asks for company name, industry, target audience, and aesthetic direction. Outputs an 8-section design spec with colors, typography, and anti-slop rules.
Generate a complete DESIGN.md for a web project using Google Stitch.
.dg-research/ directory exists and contains JSON files..dg-research/ does NOT exist AND the user has mentioned a specific business name, company, brand, cafe, restaurant, store, or real-world entity:
/dg-discover first to research [business name]. This produces a DESIGN.md grounded in real market and competitor data instead of AI defaults. Would you like me to run /dg-discover instead?"/dg-design if the user explicitly says to skip research..dg-research/ exists with JSON files: Read .dg-research/latest.json to get the business brief, competitor analysis, and brand colors. This research data is your PRIMARY source for business context -- use it over any project-level context from CLAUDE.md. Proceed to step 1.When generating a DESIGN.md, distinguish between two contexts:
Host project -- the codebase you are running inside (Design Guard). CLAUDE.md describes THIS project. Its business model, features, CLI commands, test counts, and technical architecture are about Design Guard, NOT about the user's target business.
Target business -- the business the user wants a DESIGN.md for. This comes from:
.dg-research/latest.json (if available from /dg-discover -- this is your PRIMARY source)Rules:
IF the target business is DIFFERENT from Design Guard:
IF the target business IS Design Guard itself:
ALWAYS follow the DESIGN.md 8-section specification and validation rules from CLAUDE.md regardless of target business. The FORMAT rules always apply; the BUSINESS context is what gets isolated.
If the user provided a brand brief as argument, use it. Otherwise ask for:
Generate a DESIGN.md with exactly these 8 sections:
Validation rules:
If DESIGN.md already exists, ask before overwriting.
Write the file to DESIGN.md at the project root.
After writing, check if a Stitch design system exists using mcp__stitch__list_design_systems. If the user has a Stitch project:
mcp__stitch__create_design_systemmcp__stitch__update_design_systemmcp__stitch__apply_design_system so all future generations respect itNext step: Suggest running /dg-generate to create the first screen using the new design system.
Reference: See docs/design-md-guide.md for the full specification.