Loading...
Loading...
Compare original and translation side by side
.design/next-prompt.md.design/next-prompt.md.design/next-prompt.md.design/next-prompt.md| Backend | Setup | Quality | Speed | Best for |
|---|---|---|---|---|
| Claude (default) | Zero dependencies | Great — production-ready HTML/Tailwind | Fast | Most projects, full code control |
| Google Stitch | | Higher fidelity AI designs | ~10-20s/screen | Design-heavy projects, visual polish |
| 后端 | 配置要求 | 质量 | 速度 | 适用场景 |
|---|---|---|---|---|
| Claude(默认) | 零依赖 | 出色——可生产环境使用的HTML/Tailwind | 快 | 大多数项目,需要完全代码可控的场景 |
| Google Stitch | | 更高保真的AI设计 | 每个页面约10-20秒 | 重设计的项目,需要视觉打磨的场景 |
@google/stitch-sdkls node_modules/@google/stitch-sdk 2>/dev/nullSTITCH_API_KEY.dev.vars.design/metadata.json@google/stitch-sdkls node_modules/@google/stitch-sdk 2>/dev/null.dev.varsSTITCH_API_KEY.design/metadata.jsonnpm install @google/stitch-sdkSTITCH_API_KEY.dev.varsimport { stitch } from "@google/stitch-sdk";
// Create a project
const result = await stitch.callTool("create_project", { title: "My Site" });
// Reference an existing project
const project = stitch.project("4044680601076201931");
// Generate a screen
const screen = await project.generate("A modern landing page with hero section", "DESKTOP");
// Get assets
const htmlUrl = await screen.getHtml(); // Download URL for HTML
const imageUrl = await screen.getImage(); // Download URL for screenshot
// Edit an existing screen (prefer this for refinements)
const edited = await screen.edit("Make the background dark and enlarge the CTA button");
// Generate variants
const variants = await screen.variants("Try different colour schemes", {
variantCount: 3,
creativeRange: "EXPLORE", // "REFINE" | "EXPLORE" | "REIMAGINE"
aspects: ["COLOR_SCHEME"], // "LAYOUT" | "COLOR_SCHEME" | "IMAGES" | "TEXT_FONT" | "TEXT_CONTENT"
});"MOBILE""DESKTOP""TABLET""AGNOSTIC""GEMINI_3_PRO""GEMINI_3_FLASH"generate()stitch.projects()project.screens()project.getScreen("id")getHtml()getImage()=w1280STITCH_API_KEYSTITCH_ACCESS_TOKENGOOGLE_CLOUD_PROJECTStitchErrorAUTH_FAILEDNOT_FOUNDRATE_LIMITEDnpm install @google/stitch-sdk.dev.varsSTITCH_API_KEYimport { stitch } from "@google/stitch-sdk";
// 创建项目
const result = await stitch.callTool("create_project", { title: "My Site" });
// 引用已有项目
const project = stitch.project("4044680601076201931");
// 生成页面
const screen = await project.generate("A modern landing page with hero section", "DESKTOP");
// 获取资源
const htmlUrl = await screen.getHtml(); // HTML下载地址
const imageUrl = await screen.getImage(); // 截图下载地址
// 编辑已有页面(优化时优先使用该方法)
const edited = await screen.edit("Make the background dark and enlarge the CTA button");
// 生成变体
const variants = await screen.variants("Try different colour schemes", {
variantCount: 3,
creativeRange: "EXPLORE", // "REFINE" | "EXPLORE" | "REIMAGINE"
aspects: ["COLOR_SCHEME"], // "LAYOUT" | "COLOR_SCHEME" | "IMAGES" | "TEXT_FONT" | "TEXT_CONTENT"
});"MOBILE""DESKTOP""TABLET""AGNOSTIC"generate()"GEMINI_3_PRO""GEMINI_3_FLASH"stitch.projects()project.screens()project.getScreen("id")getHtml()getImage()=w1280STITCH_API_KEYSTITCH_ACCESS_TOKENGOOGLE_CLOUD_PROJECTStitchErrorAUTH_FAILEDNOT_FOUNDRATE_LIMITED.design/metadata.json{
"projectId": "4044680601076201931",
"screens": {
"index": { "screenId": "d7237c7d78f44befa4f60afb17c818c1" },
"about": { "screenId": "bf6a3fe5c75348e58cf21fc7a9ddeafb" }
}
}.design/metadata.jsonscreen.edit().design/metadata.json{
"projectId": "4044680601076201931",
"screens": {
"index": { "screenId": "d7237c7d78f44befa4f60afb17c818c8" },
"about": { "screenId": "bf6a3fe5c75348e58cf21fc7a9ddeafb" }
}
}.design/metadata.jsonscreen.edit().design//design-systemproject/
├── .design/
│ ├── SITE.md # Vision, sitemap, roadmap — the project's long-term memory
│ ├── DESIGN.md # Visual design system — the source of truth for consistency
│ └── next-prompt.md # The baton — current task with page frontmatter
└── site/
└── public/ # Production pages live heredesign-system.design/next-prompt.md.design//design-systemproject/
├── .design/
│ ├── SITE.md # 愿景、站点地图、路线图——项目的长期记忆
│ ├── DESIGN.md # 视觉设计系统——一致性的唯一来源
│ └── next-prompt.md # 接力棒文件——包含页面元数据的当前任务
└── site/
└── public/ # 生产环境页面存放目录SITE.mdDESIGN.mddesign-system.design/next-prompt.md.design/next-prompt.md.design/next-prompt.md.design/next-prompt.md---
page: about
layout: standard
---
An about page for Acme Plumbing describing the company's 20-year history in Newcastle.
**DESIGN SYSTEM:**
[Copied from .design/DESIGN.md Section 6]
**Page Structure:**
1. Header with navigation (consistent with index.html)
2. Hero with company photo and tagline
3. Story timeline showing company milestones
4. Team section with photo grid
5. CTA section: "Get a Free Quote"
6. Footer (consistent with index.html)| Field | Required | Purpose |
|---|---|---|
| Yes | Output filename (without .html) |
| No | |
.design/next-prompt.md---
page: about
layout: standard
---
An about page for Acme Plumbing describing the company's 20-year history in Newcastle.
**DESIGN SYSTEM:**
[Copied from .design/DESIGN.md Section 6]
**Page Structure:**
1. Header with navigation (consistent with index.html)
2. Hero with company photo and tagline
3. Story timeline showing company milestones
4. Team section with photo grid
5. CTA section: "Get a Free Quote"
6. Footer (consistent with index.html)| 字段 | 是否必填 | 用途 |
|---|---|---|
| 是 | 输出文件名(不带.html后缀) |
| 否 | |
Read .design/next-prompt.md
Extract: page name, layout, prompt body读取 .design/next-prompt.md
提取:页面名称、布局、提示词正文| File | What to check |
|---|---|
| Section 4 (Sitemap) — don't recreate existing pages |
| Colour palette, typography, component styles |
Existing pages in | Header/footer/nav patterns to match |
| 文件 | 检查内容 |
|---|---|
| 第4部分(站点地图)——不要重复创建已存在的页面 |
| 调色板、排版、组件样式 |
| 要匹配的页眉/页脚/导航模式 |
.design/DESIGN.mdsite/public/{page}.html.design/DESIGN.mdsite/public/{page}.htmlproject.generate(prompt, deviceType)screen.getHtml().design/designs/{page}.htmlscreen.getImage().design/screenshots/{page}.pngsite/public/{page}.html.design/metadata.jsonscreen.edit(prompt)project.generate(prompt, deviceType)screen.getHtml().design/designs/{page}.htmlscreen.getImage().design/screenshots/{page}.pngsite/public/{page}.html.design/metadata.jsonscreen.edit(prompt)href="#"href="#"npx serve site/public -p 3456.design/screenshots/{page}-desktop.png{page}-mobile.pngnpx serve site/public -p 3456.design/screenshots/{page}-desktop.png{page}-mobile.png.design/SITE.md[x] {page}.html — {description}.design/SITE.md[x] {page}.html — {description}.design/next-prompt.mdpagelayout.design/DESIGN.mdpage: _complete.design/next-prompt.mdpagelayout.design/DESIGN.mdpage: _complete[x]page: _complete[x]page: _complete| Element | Rule |
|---|---|
| Header/Nav | Copy exact HTML from the most recent page. Never regenerate. |
| Footer | Same — copy verbatim, only change active page indicator |
| Tailwind config | If using |
| Colour values | Always use the exact hex codes from DESIGN.md, never approximate |
| Font imports | Same Google Fonts |
| Spacing scale | Consistent padding/margin values (document in DESIGN.md) |
| 元素 | 规则 |
|---|---|
| 页眉/导航 | 从最新页面逐字复制HTML,绝对不要重新生成 |
| 页脚 | 同上——逐字复制,仅修改当前页的激活状态标识 |
| Tailwind配置 | 如果使用 |
| 颜色值 | 始终使用DESIGN.md中给出的准确十六进制代码,不要近似 |
| 字体引入 | 所有页面使用完全相同的Google Fonts |
| 间距规范 | 内边距/外边距值保持一致(在DESIGN.md中定义) |
| Vague Term | Professional Terminology |
|---|---|
| "menu at the top" | "sticky navigation bar with logo and menu items" |
| "big photo" | "full-width hero section with focal-point imagery" |
| "list of things" | "responsive card grid with hover states and subtle elevation" |
| "button" | "primary call-to-action button with hover transition" |
| "form" | "form with labelled input fields, validation states, and submit button" |
| "picture area" | "hero section with background image or video" |
| "sidebar" | "collapsible side navigation with icon-label pairings" |
| "popup" | "modal dialog with overlay and smooth entry animation" |
| "footer stuff" | "footer with sitemap links, contact info, and legal notices" |
| "cards" | "content cards with consistent padding, rounded corners, and shadow" |
| "tabs" | "tabbed interface with active indicator and smooth content transition" |
| "search" | "search input with icon, placeholder text, and results dropdown" |
| "pricing" | "pricing comparison cards with highlighted recommended tier" |
| "testimonials" | "testimonial carousel or grid with avatar, quote, and attribution" |
| 模糊表述 | 专业术语 |
|---|---|
| "顶部的菜单" | "带logo和菜单项的吸顶导航栏" |
| "大图片" | "带焦点图像的通屏英雄区" |
| "列表内容" | "带悬停效果和微妙层级的响应式卡片网格" |
| "按钮" | "带悬停过渡效果的主行动号召按钮" |
| "表单" | "带标签输入框、校验状态和提交按钮的表单" |
| "图片区域" | "带背景图片或视频的英雄区" |
| "侧边栏" | "带图标-标签配对的可折叠侧边导航" |
| "弹窗" | "带遮罩层和平滑入场动画的模态框" |
| "页脚内容" | "带站点地图链接、联系信息和法律声明的页脚" |
| "卡片" | "带统一内边距、圆角和阴影的内容卡片" |
| "标签页" | "带激活指示器和平滑内容过渡的标签界面" |
| "搜索" | "带图标、占位文本和结果下拉框的搜索输入框" |
| "定价" | "带高亮推荐档位的定价对比卡片" |
| "评价" | "带头像、引用和署名的评价轮播或网格" |
| Basic Vibe | Enhanced Description |
|---|---|
| "Modern" | "Clean, minimal, generous whitespace, high-contrast typography" |
| "Professional" | "Sophisticated, trustworthy, subtle shadows, restricted premium palette" |
| "Fun / Playful" | "Vibrant, rounded corners, bold accent colours, bouncy animations" |
| "Dark Mode" | "High-contrast accents on deep slate or near-black backgrounds" |
| "Luxury" | "Elegant, spacious, fine lines, serif headers, high-fidelity photography" |
| "Tech / Cyber" | "Futuristic, neon accents, glassmorphism, monospaced typography" |
| "Warm / Friendly" | "Soft colours, rounded shapes, handwritten accents, inviting imagery" |
| "Bold / Industrial" | "Strong typography, high contrast, geometric shapes, dark backgrounds" |
| "Organic / Natural" | "Earth tones, soft textures, organic shapes, nature photography" |
| "Editorial" | "Magazine-like layouts, strong typographic hierarchy, generous leading" |
| 基础风格 | 增强描述 |
|---|---|
| "现代" | "干净、极简、留白充足、高对比度排版" |
| "专业" | "成熟、值得信任、微妙阴影、受限的高级调色板" |
| "有趣/活泼" | "明亮、圆角、醒目的强调色、有弹性的动画" |
| "深色模式" | "深石板灰或接近黑色背景上的高对比度强调色" |
| "奢华" | "优雅、宽松、细线条、衬线标题、高保真摄影" |
| "科技/赛博" | " futuristic、霓虹强调色、玻璃态效果、等宽排版" |
| "温暖/友好" | "柔和的颜色、圆角形状、手写风格装饰、有亲和力的图像" |
| "醒目/工业风" | "粗体排版、高对比度、几何形状、深色背景" |
| "有机/自然" | "大地色系、柔和纹理、有机形状、自然摄影" |
| "编辑风" | "杂志式布局、清晰的排版层级、充足的行高" |
| Description | Tailwind | Visual Effect |
|---|---|---|
| Pill-shaped | | Buttons, tags, badges |
| Softly rounded | | Cards, containers, modals |
| Gently rounded | | Inputs, smaller elements |
| Sharp / precise | | Technical, brutalist aesthetic |
| Glassmorphism | | Overlays, nav bars |
| Frosted | | Subtle glass effect |
| Elevation | Description | Tailwind |
|---|---|---|
| Flat | No shadows, colour blocking and borders | |
| Whisper-soft | Diffused, barely visible lift | |
| Subtle | Gentle shadow for card elevation | |
| Floating | High-offset, soft shadow | |
| Dramatic | Strong shadow for hero elements or modals | |
| Inset | Inner shadow for pressed or nested elements | |
| Section Density | Description | Tailwind |
|---|---|---|
| Tight | Compact, information-dense | |
| Balanced | Standard section spacing | |
| Generous | Breathing room, premium feel | |
| Dramatic | Statement spacing, luxury/editorial | |
| 描述 | Tailwind类 | 视觉效果 |
|---|---|---|
| 胶囊形 | | 按钮、标签、徽章 |
| 柔和圆角 | | 卡片、容器、模态框 |
| 轻微圆角 | | 输入框、小型元素 |
| 锐利/精确 | | 技术感、野兽派美学 |
| 玻璃态 | | 遮罩层、导航栏 |
| 磨砂效果 | | 微妙的玻璃效果 |
| 层级 | 描述 | Tailwind类 |
|---|---|---|
| 扁平 | 无阴影、色块和边框区隔 | |
| 极淡 | 扩散的、几乎不可见的上浮效果 | |
| 微妙 | 柔和阴影实现卡片上浮效果 | |
| 悬浮 | 高偏移量、柔和阴影 | |
| 醒目 | 强烈阴影用于英雄元素或模态框 | |
| 内凹 | 内阴影用于按下状态或嵌套元素 | |
| 区块密度 | 描述 | Tailwind类 |
|---|---|---|
| 紧凑 | 高密度信息展示 | |
| 平衡 | 标准区块间距 | |
| 宽松 | 充足呼吸感、高级感 | |
| 夸张 | 展示性间距、奢华/编辑风 | |
.design/SITE.mdundefined.design/SITE.mdundefinedAGENT INSTRUCTION: Read this file before every iteration. It is the project's long-term memory.
AGENT INSTRUCTION: Read this file before every iteration. It is the project's long-term memory.
| Field | Value |
|---|---|
| Project Name | [Name] |
| Mission | [What the site achieves] |
| Target Audience | [Who uses this site] |
| Voice & Tone | [Personality descriptors — warm, professional, playful, etc.] |
| Region | [Australia / US / UK — affects spelling, phone format, imagery] |
| 字段 | 值 |
|---|---|
| 项目名称 | [名称] |
| 使命 | [站点要实现的目标] |
| 目标受众 | [站点的使用人群] |
| 语气与风格 | [个性描述——温暖、专业、活泼等] |
| 地区 | [澳大利亚/美国/英国——影响拼写、电话格式、图像选择] |
site/public/site/public/index.htmlabout.htmlservices.htmlcontact.htmlindex.htmlabout.htmlservices.htmlcontact.htmlteam.htmlteam.htmltestimonials.htmlgallery.htmlfaq.htmltestimonials.htmlgallery.htmlfaq.html[x].design/next-prompt.mdundefined[x].design/next-prompt.mdundefineddesign-system.design/DESIGN.mdundefineddesign-system.design/DESIGN.mdundefined| Role | Name | Value | Usage |
|---|---|---|---|
| Primary | [Name] | | Buttons, links, active states |
| Primary Foreground | [Name] | | Text on primary backgrounds |
| Secondary | [Name] | | Supporting elements, badges |
| Background | [Name] | | Page background |
| Surface | [Name] | | Cards, containers |
| Text Primary | [Name] | | Headings, body text |
| Text Secondary | [Name] | | Captions, metadata |
| Border | [Name] | | Dividers, input borders |
| Accent | [Name] | | Highlights, notifications |
| 角色 | 名称 | 值 | 用途 |
|---|---|---|---|
| 主色 | [名称] | | 按钮、链接、激活状态 |
| 主色前景 | [名称] | | 主色背景上的文字 |
| 辅助色 | [名称] | | 支撑元素、徽章 |
| 背景色 | [名称] | | 页面背景 |
| 表面色 | [名称] | | 卡片、容器 |
| 主文字色 | [名称] | | 标题、正文 |
| 次文字色 | [名称] | | 说明文字、元数据 |
| 边框色 | [名称] | | 分割线、输入框边框 |
| 强调色 | [名称] | | 高亮、通知 |
| Element | Font | Weight | Size | Line Height |
|---|---|---|---|---|
| H1 | [Font] | 700 | 3rem | 1.1 |
| H2 | [Font] | 600 | 2rem | 1.2 |
| H3 | [Font] | 600 | 1.5rem | 1.3 |
| Body | [Font] | 400 | 1rem | 1.6 |
| Small | [Font] | 400 | 0.875rem | 1.5 |
| 元素 | 字体 | 字重 | 字号 | 行高 |
|---|---|---|---|---|
| H1 | [字体] | 700 | 3rem | 1.1 |
| H2 | [字体] | 600 | 2rem | 1.2 |
| H3 | [字体] | 600 | 1.5rem | 1.3 |
| 正文 | [字体] | 400 | 1rem | 1.6 |
| 小号文字 | [字体] | 400 | 0.875rem | 1.5 |
undefinedundefinedproject/
├── .design/
│ ├── SITE.md # Project vision, sitemap, roadmap
│ ├── DESIGN.md # Visual design system (source of truth)
│ ├── next-prompt.md # The baton — current/next task
│ ├── metadata.json # Stitch project/screen IDs (if using Stitch)
│ └── screenshots/ # Visual verification captures
├── site/
│ └── public/ # Production pages
└── .gitignore # Add .design/screenshots/project/
├── .design/
│ ├── SITE.md # 项目愿景、站点地图、路线图
│ ├── DESIGN.md # 视觉设计系统(唯一可信来源)
│ ├── next-prompt.md # 接力棒文件——当前/下一个任务
│ ├── metadata.json # Stitch项目/页面ID(如果使用Stitch)
│ └── screenshots/ # 视觉验证截图
├── site/
│ └── public/ # 生产环境页面
└── .gitignore # 添加 .design/screenshots/.design/next-prompt.mdhref="#".design/next-prompt.mdhref="#"