opencodekit 0.21.1 → 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,307 +0,0 @@
1
- /**
2
- * Stitch Plugin — Google Stitch UI generation as native OpenCode tools.
3
- *
4
- * Replaces the MCP subprocess (`npx @_davideast/stitch-mcp proxy`) with
5
- * direct HTTP via `@google/stitch-sdk`'s `StitchToolClient`.
6
- *
7
- * Tools: stitch_create_project, stitch_get_project, stitch_list_projects,
8
- * stitch_list_screens, stitch_get_screen, stitch_generate_screen,
9
- * stitch_edit_screens, stitch_generate_variants
10
- *
11
- * Auth: Set STITCH_API_KEY env var (API key) or STITCH_ACCESS_TOKEN (OAuth).
12
- */
13
-
14
- import { StitchError, StitchToolClient } from "@google/stitch-sdk";
15
- import type { Plugin } from "@opencode-ai/plugin";
16
- import { tool } from "@opencode-ai/plugin/tool";
17
-
18
- // ---------------------------------------------------------------------------
19
- // Shared
20
- // ---------------------------------------------------------------------------
21
-
22
- let client: StitchToolClient | null = null;
23
-
24
- const getClient = (): StitchToolClient => {
25
- if (!client) {
26
- client = new StitchToolClient();
27
- }
28
- return client;
29
- };
30
-
31
- /** Call a Stitch MCP tool and return the result as a JSON string. */
32
- const callTool = async (
33
- name: string,
34
- args: Record<string, unknown>,
35
- ): Promise<string> => {
36
- try {
37
- const result = await getClient().callTool(name, args);
38
- return JSON.stringify(result, null, 2);
39
- } catch (err: unknown) {
40
- if (err instanceof StitchError) {
41
- return JSON.stringify({
42
- error: err.code,
43
- message: err.message,
44
- ...(err.suggestion ? { suggestion: err.suggestion } : {}),
45
- recoverable: err.recoverable,
46
- tool: name,
47
- });
48
- }
49
- return JSON.stringify({
50
- error: "UNKNOWN_ERROR",
51
- message: err instanceof Error ? err.message : String(err),
52
- tool: name,
53
- });
54
- }
55
- };
56
-
57
- // ---------------------------------------------------------------------------
58
- // Enums (for agent guidance — not strict validation)
59
- // ---------------------------------------------------------------------------
60
-
61
- const DEVICE_TYPES = [
62
- "DEVICE_TYPE_UNSPECIFIED",
63
- "MOBILE",
64
- "DESKTOP",
65
- "TABLET",
66
- "AGNOSTIC",
67
- ] as const;
68
-
69
- const MODEL_IDS = [
70
- "MODEL_ID_UNSPECIFIED",
71
- "GEMINI_3_PRO",
72
- "GEMINI_3_FLASH",
73
- ] as const;
74
-
75
- // ---------------------------------------------------------------------------
76
- // Plugin
77
- // ---------------------------------------------------------------------------
78
-
79
- export const StitchPlugin: Plugin = async () => {
80
- return {
81
- tool: {
82
- // ---------------------------------------------------------------
83
- // Projects
84
- // ---------------------------------------------------------------
85
-
86
- stitch_create_project: tool({
87
- description:
88
- "Create a new Google Stitch project.\n\nOptionally provide a title.",
89
- args: {
90
- title: tool.schema
91
- .string()
92
- .optional()
93
- .describe("Project title (optional)"),
94
- },
95
- async execute(args: { title?: string }) {
96
- return callTool("create_project", args);
97
- },
98
- }),
99
-
100
- stitch_get_project: tool({
101
- description:
102
- "Get details of a Stitch project by resource name.\n\nFormat: projects/{projectId}",
103
- args: {
104
- name: tool.schema
105
- .string()
106
- .describe(
107
- "Project resource name (e.g. projects/abc123). Required.",
108
- ),
109
- },
110
- async execute(args: { name: string }) {
111
- return callTool("get_project", args);
112
- },
113
- }),
114
-
115
- stitch_list_projects: tool({
116
- description: "List all Stitch projects. Optionally filter by keyword.",
117
- args: {
118
- filter: tool.schema
119
- .string()
120
- .optional()
121
- .describe("Filter string (optional)"),
122
- },
123
- async execute(args: { filter?: string }) {
124
- return callTool("list_projects", args);
125
- },
126
- }),
127
-
128
- // ---------------------------------------------------------------
129
- // Screens
130
- // ---------------------------------------------------------------
131
-
132
- stitch_list_screens: tool({
133
- description:
134
- "List all screens in a Stitch project.\n\nRequires projectId.",
135
- args: {
136
- projectId: tool.schema.string().describe("Project ID. Required."),
137
- },
138
- async execute(args: { projectId: string }) {
139
- return callTool("list_screens", args);
140
- },
141
- }),
142
-
143
- stitch_get_screen: tool({
144
- description:
145
- "Get screen details including HTML code.\n\nProvide the screen resource name (format: projects/{projectId}/screens/{screenId}).",
146
- args: {
147
- name: tool.schema
148
- .string()
149
- .describe(
150
- "Screen resource name (e.g. projects/abc/screens/xyz). Required.",
151
- ),
152
- },
153
- async execute(args: { name: string }) {
154
- return callTool("get_screen", args);
155
- },
156
- }),
157
-
158
- // ---------------------------------------------------------------
159
- // Generation
160
- // ---------------------------------------------------------------
161
-
162
- stitch_generate_screen: tool({
163
- description: `Generate a UI screen from a text prompt.
164
-
165
- Device types: ${DEVICE_TYPES.join(", ")}
166
- Model IDs: ${MODEL_IDS.join(", ")}`,
167
- args: {
168
- projectId: tool.schema.string().describe("Project ID. Required."),
169
- prompt: tool.schema
170
- .string()
171
- .describe("Text description of the UI to generate. Required."),
172
- deviceType: tool.schema
173
- .string()
174
- .optional()
175
- .describe(
176
- `Device type: ${DEVICE_TYPES.join(" | ")} (default: MOBILE)`,
177
- ),
178
- modelId: tool.schema
179
- .string()
180
- .optional()
181
- .describe(
182
- `Model: ${MODEL_IDS.join(" | ")} (default: GEMINI_3_FLASH)`,
183
- ),
184
- },
185
- async execute(args: {
186
- projectId: string;
187
- prompt: string;
188
- deviceType?: string;
189
- modelId?: string;
190
- }) {
191
- return callTool("generate_screen_from_text", args);
192
- },
193
- }),
194
-
195
- stitch_edit_screens: tool({
196
- description: `Edit existing screens with a text prompt.
197
-
198
- Device types: ${DEVICE_TYPES.join(", ")}
199
- Model IDs: ${MODEL_IDS.join(", ")}`,
200
- args: {
201
- projectId: tool.schema.string().describe("Project ID. Required."),
202
- selectedScreenIds: tool.schema
203
- .array(tool.schema.string())
204
- .describe("Screen IDs to edit. Required."),
205
- prompt: tool.schema.string().describe("Edit instructions. Required."),
206
- deviceType: tool.schema
207
- .string()
208
- .optional()
209
- .describe(
210
- `Device type: ${DEVICE_TYPES.join(" | ")} (default: MOBILE)`,
211
- ),
212
- modelId: tool.schema
213
- .string()
214
- .optional()
215
- .describe(
216
- `Model: ${MODEL_IDS.join(" | ")} (default: GEMINI_3_FLASH)`,
217
- ),
218
- },
219
- async execute(args: {
220
- projectId: string;
221
- selectedScreenIds: string[];
222
- prompt: string;
223
- deviceType?: string;
224
- modelId?: string;
225
- }) {
226
- return callTool("edit_screens", args);
227
- },
228
- }),
229
-
230
- stitch_generate_variants: tool({
231
- description: `Generate design variants of existing screens.
232
-
233
- variantOptions:
234
- - variantCount: number of variants (1-10)
235
- - creativeRange: LOW, MEDIUM, HIGH (how different from original)
236
- - aspects: optional comma-separated aspects to vary (e.g. "color,layout")
237
-
238
- Device types: ${DEVICE_TYPES.join(", ")}
239
- Model IDs: ${MODEL_IDS.join(", ")}`,
240
- args: {
241
- projectId: tool.schema.string().describe("Project ID. Required."),
242
- selectedScreenIds: tool.schema
243
- .array(tool.schema.string())
244
- .describe("Screen IDs to create variants of. Required."),
245
- prompt: tool.schema
246
- .string()
247
- .describe("Prompt describing desired variations. Required."),
248
- variantCount: tool.schema
249
- .number()
250
- .optional()
251
- .describe("Number of variants to generate (1-10, default: 3)"),
252
- creativeRange: tool.schema
253
- .string()
254
- .optional()
255
- .describe("Creative range: LOW | MEDIUM | HIGH (default: MEDIUM)"),
256
- aspects: tool.schema
257
- .string()
258
- .optional()
259
- .describe(
260
- "Comma-separated aspects to vary (e.g. 'color,layout'). Optional.",
261
- ),
262
- deviceType: tool.schema
263
- .string()
264
- .optional()
265
- .describe(
266
- `Device type: ${DEVICE_TYPES.join(" | ")} (default: MOBILE)`,
267
- ),
268
- modelId: tool.schema
269
- .string()
270
- .optional()
271
- .describe(
272
- `Model: ${MODEL_IDS.join(" | ")} (default: GEMINI_3_FLASH)`,
273
- ),
274
- },
275
- async execute(args: {
276
- projectId: string;
277
- selectedScreenIds: string[];
278
- prompt: string;
279
- variantCount?: number;
280
- creativeRange?: string;
281
- aspects?: string;
282
- deviceType?: string;
283
- modelId?: string;
284
- }) {
285
- // Build variantOptions object from flat args
286
- const variantOptions: Record<string, unknown> = {};
287
- if (args.variantCount != null)
288
- variantOptions.variantCount = args.variantCount;
289
- if (args.creativeRange)
290
- variantOptions.creativeRange = args.creativeRange;
291
- if (args.aspects) variantOptions.aspects = args.aspects;
292
-
293
- return callTool("generate_variants", {
294
- projectId: args.projectId,
295
- selectedScreenIds: args.selectedScreenIds,
296
- prompt: args.prompt,
297
- variantOptions,
298
- ...(args.deviceType ? { deviceType: args.deviceType } : {}),
299
- ...(args.modelId ? { modelId: args.modelId } : {}),
300
- });
301
- },
302
- }),
303
- },
304
- };
305
- };
306
-
307
- export default StitchPlugin;
@@ -1,164 +0,0 @@
1
- ---
2
- name: stitch
3
- description: Use when generating, editing, or creating variants of UI screens in Google Stitch. MUST load before any stitch_generate_screen or stitch_edit_screens tool calls.
4
- version: 2.0.0
5
- tags: [design, ui, stitch]
6
- dependencies: []
7
- ---
8
-
9
- # Google Stitch Plugin
10
-
11
- ## When to Use
12
-
13
- - When you need to generate or inspect Google Stitch UI designs.
14
-
15
- ## When NOT to Use
16
-
17
- - When you don't have Stitch access or don't need Stitch-generated UI.
18
-
19
- ## Overview
20
-
21
- Stitch tools are registered as native OpenCode tools via the Stitch plugin (`.opencode/plugin/stitch.ts`), using `@google/stitch-sdk` for direct HTTP to `stitch.googleapis.com/mcp`. No MCP subprocess needed.
22
-
23
- ## Prerequisites
24
-
25
- 1. **Google Cloud Project** with Stitch API enabled
26
- 2. **Google Cloud CLI** (`gcloud`) installed and initialized
27
- 3. **Required IAM Roles**:
28
- - `roles/serviceusage.serviceUsageAdmin` (to enable the service)
29
- - `roles/mcp.toolUser` (to call MCP tools)
30
-
31
- ## Setup Steps
32
-
33
- ### 1. Enable Stitch API in Google Cloud
34
-
35
- ```bash
36
- gcloud config set project PROJECT_ID
37
- gcloud beta services mcp enable stitch.googleapis.com --project=PROJECT_ID
38
- ```
39
-
40
- ### 2. Set Environment Variables
41
-
42
- **API Key auth** (recommended):
43
-
44
- ```bash
45
- export STITCH_API_KEY="your-api-key"
46
- ```
47
-
48
- **Or OAuth auth**:
49
-
50
- ```bash
51
- export STITCH_ACCESS_TOKEN=$(gcloud auth print-access-token)
52
- export GOOGLE_CLOUD_PROJECT="your-project-id"
53
- ```
54
-
55
- ### 3. Restart OpenCode
56
-
57
- Tools are available immediately after env vars are set and OpenCode restarts.
58
-
59
- ## Available Tools
60
-
61
- | Tool | Description |
62
- | -------------------------- | ------------------------------------ |
63
- | `stitch_create_project` | Create a new Stitch project |
64
- | `stitch_get_project` | Get project details by resource name |
65
- | `stitch_list_projects` | List all projects (optional filter) |
66
- | `stitch_list_screens` | List screens in a project |
67
- | `stitch_get_screen` | Get screen details with HTML code |
68
- | `stitch_generate_screen` | Generate UI from text prompt |
69
- | `stitch_edit_screens` | Edit existing screens with a prompt |
70
- | `stitch_generate_variants` | Generate design variants of screens |
71
-
72
- ## Usage Examples
73
-
74
- ### List Projects
75
-
76
- ```typescript
77
- stitch_list_projects({});
78
- ```
79
-
80
- ### Create a Project
81
-
82
- ```typescript
83
- stitch_create_project({ title: "My E-commerce App" });
84
- ```
85
-
86
- ### Generate Screen from Text
87
-
88
- ```typescript
89
- stitch_generate_screen({
90
- projectId: "my-project-123",
91
- prompt:
92
- "Create a modern login page with email and password fields, social login buttons, and a forgot password link",
93
- deviceType: "MOBILE",
94
- });
95
- ```
96
-
97
- ### Edit Existing Screens
98
-
99
- ```typescript
100
- stitch_edit_screens({
101
- projectId: "my-project-123",
102
- selectedScreenIds: ["screen-abc"],
103
- prompt: "Make the login button larger and change the color scheme to dark mode",
104
- });
105
- ```
106
-
107
- ### Generate Design Variants
108
-
109
- ```typescript
110
- stitch_generate_variants({
111
- projectId: "my-project-123",
112
- selectedScreenIds: ["screen-abc"],
113
- prompt: "Create variants with different color schemes",
114
- variantCount: 3,
115
- creativeRange: "MEDIUM",
116
- });
117
- ```
118
-
119
- ## Parameters
120
-
121
- ### Device Types
122
-
123
- `DEVICE_TYPE_UNSPECIFIED` | `MOBILE` | `DESKTOP` | `TABLET` | `AGNOSTIC`
124
-
125
- ### Model IDs
126
-
127
- `MODEL_ID_UNSPECIFIED` | `GEMINI_3_PRO` | `GEMINI_3_FLASH`
128
-
129
- ### Variant Options
130
-
131
- - `variantCount`: Number of variants (1-10)
132
- - `creativeRange`: `LOW` | `MEDIUM` | `HIGH`
133
- - `aspects`: Comma-separated aspects to vary (e.g. "color,layout")
134
-
135
- ## Troubleshooting
136
-
137
- ### "AUTH_FAILED"
138
-
139
- ```bash
140
- # API key auth
141
- export STITCH_API_KEY="your-key"
142
-
143
- # Or OAuth (token expires after ~1 hour)
144
- export STITCH_ACCESS_TOKEN=$(gcloud auth print-access-token)
145
- ```
146
-
147
- ### "Stitch API not enabled"
148
-
149
- ```bash
150
- gcloud beta services mcp enable stitch.googleapis.com --project=YOUR_PROJECT_ID
151
- ```
152
-
153
- ## Documentation
154
-
155
- - [Google Stitch](https://stitch.withgoogle.com)
156
- - [Stitch SDK](https://github.com/google-labs-code/stitch-sdk)
157
- - [Stitch MCP Setup](https://stitch.withgoogle.com/docs/mcp/setup)
158
-
159
- ## Tips
160
-
161
- - API key auth is simpler than OAuth (no token refresh)
162
- - Use descriptive prompts for better UI generation
163
- - `GEMINI_3_PRO` produces higher quality; `GEMINI_3_FLASH` is faster
164
- - Test generated code in your target framework before production use
@@ -1,121 +0,0 @@
1
- # Design System: Taste Standard
2
- **Skill:** stitch-design-taste
3
-
4
- ---
5
-
6
- ## Configuration — Set Your Style
7
- Adjust these dials before using this design system. They control how creative, dense, and animated the output should be. Pick the level that fits your project.
8
-
9
- | Dial | Level | Description |
10
- |------|-------|-------------|
11
- | **Creativity** | `8` | `1` = Ultra-minimal, Swiss, silent, monochrome. `5` = Balanced, clean but with personality. `10` = Expressive, editorial, bold typography experiments, inline images in headlines, strong asymmetry. Default: `8` |
12
- | **Density** | `4` | `1` = Gallery-airy, massive whitespace. `5` = Balanced sections. `10` = Cockpit-dense, data-heavy. Default: `4` |
13
- | **Variance** | `8` | `1` = Predictable, symmetric grids. `5` = Subtle offsets. `10` = Artsy chaotic, no two sections alike. Default: `8` |
14
- | **Motion Intent** | `6` | `1` = Static, no animation noted. `5` = Subtle hover/entrance cues. `10` = Cinematic orchestration noted in every component. Default: `6` |
15
-
16
- > **How to use:** Change the numbers above to match your project's vibe. At **Creativity 1–3**, the system produces clean, quiet, Notion-like interfaces. At **Creativity 7–10**, expect inline image typography, dramatic scale contrast, and strong editorial layouts. The rest of the rules below adapt to your chosen levels.
17
-
18
- ---
19
-
20
- ## 1. Visual Theme & Atmosphere
21
- A restrained, gallery-airy interface with confident asymmetric layouts and fluid spring-physics motion. The atmosphere is clinical yet warm — like a well-lit architecture studio where every element earns its place through function. Density is balanced (Level 4), variance runs high (Level 8) to prevent symmetrical boredom, and motion is fluid but never theatrical (Level 6). The overall impression: expensive, intentional, alive.
22
-
23
- ## 2. Color Palette & Roles
24
- - **Canvas White** (#F9FAFB) — Primary background surface. Warm-neutral, never clinical blue-white
25
- - **Pure Surface** (#FFFFFF) — Card and container fill. Used with whisper shadow for elevation
26
- - **Charcoal Ink** (#18181B) — Primary text. Zinc-950 depth — never pure black
27
- - **Steel Secondary** (#71717A) — Body text, descriptions, metadata. Zinc-500 warmth
28
- - **Muted Slate** (#94A3B8) — Tertiary text, timestamps, disabled states
29
- - **Whisper Border** (rgba(226,232,240,0.5)) — Card borders, structural 1px lines. Semi-transparent for depth
30
- - **Diffused Shadow** (rgba(0,0,0,0.05)) — Card elevation. Wide-spreading, 40px blur, -15px offset. Never harsh
31
-
32
- ### Accent Selection (Pick ONE per project)
33
- - **Emerald Signal** (#10B981) — For growth, success, positive data dashboards
34
- - **Electric Blue** (#3B82F6) — For productivity, SaaS, developer tools
35
- - **Deep Rose** (#E11D48) — For creative, editorial, fashion-adjacent projects
36
- - **Amber Warmth** (#F59E0B) — For community, social, warm-toned products
37
-
38
- ### Banned Colors
39
- - Purple/Violet neon gradients — the "AI Purple" aesthetic
40
- - Pure Black (#000000) — always Off-Black or Zinc-950
41
- - Oversaturated accents above 80% saturation
42
- - Mixed warm/cool gray systems within one project
43
-
44
- ## 3. Typography Rules
45
- - **Display:** `Geist`, `Satoshi`, `Cabinet Grotesk`, or `Outfit` — Track-tight (`-0.025em`), controlled fluid scale, weight-driven hierarchy (700–900). Not screaming. Leading compressed (`1.1`). Alternatives forced — `Inter` is BANNED for premium contexts
46
- - **Body:** Same family at weight 400 — Relaxed leading (`1.65`), 65ch max-width, Steel Secondary color (#71717A)
47
- - **Mono:** `Geist Mono` or `JetBrains Mono` — For code blocks, metadata, timestamps. When density exceeds Level 7, all numbers switch to monospace
48
- - **Scale:** Display at `clamp(2.25rem, 5vw, 3.75rem)`. Body at `1rem/1.125rem`. Mono metadata at `0.8125rem`
49
-
50
- ### Banned Fonts
51
- - `Inter` — banned everywhere in premium/creative contexts
52
- - Generic serif fonts (`Times New Roman`, `Georgia`, `Garamond`, `Palatino`) — BANNED. If serif is needed for editorial/creative, use only distinctive modern serifs like `Fraunces`, `Gambarino`, `Editorial New`, or `Instrument Serif`. Never use default browser serif stacks. Serif is always BANNED in dashboards or software UIs regardless
53
-
54
- ## 4. Component Stylings
55
- * **Buttons:** Flat surface, no outer glow. Primary: accent fill with white text. Secondary: ghost/outline. Active state: `-1px translateY` or `scale(0.98)` for tactile push. Hover: subtle background shift, never glow
56
- * **Cards/Containers:** Generously rounded corners (`2.5rem`). Pure white fill. Whisper border (`1px`, semi-transparent). Diffused shadow (`0 20px 40px -15px rgba(0,0,0,0.05)`). Internal padding `2rem–2.5rem`. Used ONLY when elevation communicates hierarchy — high-density layouts replace cards with `border-top` dividers or negative space
57
- * **Inputs/Forms:** Label positioned above input. Helper text optional. Error text below in Deep Rose. Focus ring in accent color, `2px` offset. No floating labels. Standard `0.5rem` gap between label-input-error stack
58
- * **Navigation:** Sleek, sticky. Icons scale on hover (Dock Magnification optional). No hamburger on desktop. Clean horizontal with generous spacing
59
- * **Loaders:** Skeletal shimmer matching exact layout dimensions and rounded corners. Shifting light reflection across placeholder shapes. Never circular spinners
60
- * **Empty States:** Composed illustration or icon composition with guidance text. Never just "No data found"
61
- * **Error States:** Inline, contextual. Red accent underline or border. Clear recovery action
62
-
63
- ## 5. Hero Section
64
- The Hero is the first impression — it must be striking, creative, and never generic.
65
- - **Inline Image Typography:** Embed small, contextual photos or visuals directly between words or letters in the headline. Example: "We build [photo of hands typing] digital [photo of screen] products" — images sit inline at type-height, rounded, acting as visual punctuation between words. This is the signature creative technique
66
- - **No Overlapping Elements:** Text must never overlap images or other text. Every element has its own clear spatial zone. No z-index stacking of content layers, no absolute-positioned headlines over images. Clean separation always
67
- - **No Filler Text:** "Scroll to explore", "Swipe down", scroll arrow icons, bouncing chevrons, and any instructional UI chrome are BANNED. The user knows how to scroll. Let the content pull them in naturally
68
- - **Asymmetric Structure:** Centered Hero layouts are BANNED at this variance level. Use Split Screen (50/50), Left-Aligned text / Right visual, or Asymmetric Whitespace with large empty zones
69
- - **CTA Restraint:** Maximum one primary CTA button. No secondary "Learn more" links. No redundant micro-copy below the headline
70
-
71
- ## 6. Layout Principles
72
- - **Grid-First:** CSS Grid for all structural layouts. Never flexbox percentage math (`calc(33% - 1rem)` is BANNED)
73
- - **No Overlapping:** Elements must never overlap each other. No absolute-positioned layers stacking content on content. Every element occupies its own grid cell or flow position. Clean, separated spatial zones
74
- - **Feature Sections:** The "3 equal cards in a row" pattern is BANNED. Use 2-column Zig-Zag, asymmetric Bento grids (2fr 1fr 1fr), or horizontal scroll galleries
75
- - **Containment:** All content within `max-width: 1400px`, centered. Generous horizontal padding (`1rem` mobile, `2rem` tablet, `4rem` desktop)
76
- - **Full-Height:** Use `min-height: 100dvh` — never `height: 100vh` (iOS Safari address bar jump)
77
- - **Bento Architecture:** For feature grids, use Row 1: 3 columns | Row 2: 2 columns (70/30 split). Each tile contains a perpetual micro-animation
78
-
79
- ## 7. Responsive Rules
80
- Every screen must work flawlessly across all viewports. **Responsive is not optional — it is a hard requirement. Every single element must be tested at 375px, 768px, and 1440px.**
81
- - **Mobile-First Collapse (< 768px):** All multi-column layouts collapse to a strict single column. `width: 100%`, `padding: 1rem`, `gap: 1.5rem`. No exceptions
82
- - **No Horizontal Scroll:** Horizontal overflow on mobile is a critical failure. All elements must fit within viewport width. If any element causes horizontal scroll, the design is broken
83
- - **Typography Scaling:** Headlines scale down gracefully via `clamp()`. Body text stays `1rem` minimum. Never shrink body below `14px`. Headlines must remain readable on 375px screens
84
- - **Touch Targets:** All interactive elements minimum `44px` tap target. Generous spacing between clickable items. Buttons must be full-width on mobile
85
- - **Image Behavior:** Hero and inline images scale proportionally. Inline typography images (photos between words) stack below the headline on mobile instead of inline
86
- - **Navigation:** Desktop horizontal nav collapses to a clean mobile menu (slide-in or full-screen overlay). No tiny hamburger icons without labels
87
- - **Cards & Grids:** Bento grids and asymmetric layouts revert to stacked single-column cards with full-width. Maintain internal padding (`1rem`)
88
- - **Spacing Consistency:** Vertical section gaps reduce proportionally on mobile (`clamp(3rem, 8vw, 6rem)`). Never cramped, never excessively airy
89
- - **Testing Viewports:** Designs must be verified at: `375px` (iPhone SE), `390px` (iPhone 14), `768px` (iPad), `1024px` (small laptop), `1440px` (desktop)
90
-
91
- ## 8. Motion & Interaction (Code-Phase Intent)
92
- > **Note:** Stitch generates static screens — it does not animate. This section documents the **intended motion behavior** so that the coding agent (Antigravity, Cursor, etc.) knows exactly how to implement animations when building the exported design into a live product.
93
-
94
- - **Physics Engine:** Spring-based exclusively. `stiffness: 100, damping: 20`. No linear easing anywhere. Premium, weighty feel on all interactive elements
95
- - **Perpetual Micro-Loops:** Every active dashboard component has an infinite-loop state — Pulse on status dots, Typewriter on search bars, Float on feature icons, Shimmer on loading states
96
- - **Staggered Orchestration:** Lists and grids mount with cascaded delays (`animation-delay: calc(var(--index) * 100ms)`). Waterfall reveals, never instant mount
97
- - **Layout Transitions:** Smooth re-ordering via shared element IDs. Items swap positions with physics, simulating real-time intelligence
98
- - **Hardware Rules:** Animate ONLY `transform` and `opacity`. Never `top`, `left`, `width`, `height`. Grain/noise filters on fixed, pointer-events-none pseudo-elements only
99
- - **Performance:** CPU-heavy perpetual animations isolated in microscopic leaf components. Never trigger parent re-renders. Target 60fps minimum
100
-
101
- ## 9. Anti-Patterns (Banned)
102
- - No emojis — anywhere in UI, code, or alt text
103
- - No `Inter` font — use `Geist`, `Outfit`, `Cabinet Grotesk`, `Satoshi`
104
- - No generic serif fonts (`Times New Roman`, `Georgia`, `Garamond`) — if serif is needed, use distinctive modern serifs only (`Fraunces`, `Instrument Serif`)
105
- - No pure black (`#000000`) — Off-Black or Zinc-950 only
106
- - No neon outer glows or default box-shadow glows
107
- - No oversaturated accent colors above 80%
108
- - No excessive gradient text on large headers
109
- - No custom mouse cursors
110
- - No overlapping elements — text never overlaps images or other content. Clean spatial separation always
111
- - No 3-column equal card layouts for features
112
- - No centered Hero sections (at this variance level)
113
- - No filler UI text: "Scroll to explore", "Swipe down", "Discover more below", scroll arrows, bouncing chevrons — all BANNED
114
- - No generic names: "John Doe", "Sarah Chan", "Acme", "Nexus", "SmartFlow"
115
- - No fake round numbers: `99.99%`, `50%`, `1234567` — use organic data: `47.2%`, `+1 (312) 847-1928`
116
- - No AI copywriting clichés: "Elevate", "Seamless", "Unleash", "Next-Gen", "Revolutionize"
117
- - No broken Unsplash links — use `picsum.photos/seed/{id}/800/600` or SVG UI Avatars
118
- - No generic `shadcn/ui` defaults — customize radii, colors, shadows to match this system
119
- - No `z-index` spam — use only for Navbar, Modal, Overlay layer contexts
120
- - No `h-screen` — always `min-h-[100dvh]`
121
- - No circular loading spinners — skeletal shimmer only