ship-create 1.4.0 → 1.6.0
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.
- package/create.mjs +261 -123
- package/package.json +1 -1
- package/templates/.claude/commands/build.md +90 -45
- package/templates/.claude/skills/ship-method/SKILL.md +26 -53
- package/templates/.claude/skills/uiux-frontend/SKILL.md +321 -0
- package/templates/.cursorrules +7 -5
- package/templates/.windsurfrules +7 -5
- package/templates/AGENTS.md +7 -5
- package/templates/CLAUDE.md +7 -5
- package/templates/docs/DESIGN_SPEC.md +50 -0
- package/templates/docs/DESIGN_SYSTEM.md +145 -0
|
@@ -1,89 +1,134 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Read docs
|
|
2
|
+
description: Read docs, create build spec, and build the MVP fast — home screen first, white theme by default.
|
|
3
3
|
argument-hint: "[feature name — leave blank to build the full MVP]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are
|
|
6
|
+
You are building this app using The SHIP Method. Move fast — the goal is a working MVP the user can see and react to. Refine later.
|
|
7
7
|
|
|
8
8
|
Argument passed (optional feature focus): "$ARGUMENTS"
|
|
9
9
|
|
|
10
10
|
## Step 1 — Read the project docs
|
|
11
11
|
|
|
12
|
-
Read both
|
|
12
|
+
Read both files now:
|
|
13
13
|
- `docs/PROJECT.md` — what we're building and for whom
|
|
14
14
|
- `docs/HUMAN_FLOW.md` — how users move through the product
|
|
15
15
|
|
|
16
|
-
## Step 2 —
|
|
16
|
+
## Step 2 — Quick sanity check
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
- Product Vision
|
|
20
|
-
- Problem Statement (who + what problem)
|
|
21
|
-
- Target Audience (primary segment)
|
|
18
|
+
If PROJECT.md or HUMAN_FLOW.md is missing OR still has `[fill in]` placeholders in Vision, Problem Statement, or Core Screens — stop and say: "Run `/ship` first — I need a filled spec to build from." Otherwise proceed immediately.
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
- User Journey table
|
|
25
|
-
- At least one Core Screen defined
|
|
20
|
+
## Step 2.5 — Four quick choices (one message, one reply)
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
"Run `/ship` first — I need a complete spec to build from."
|
|
22
|
+
Ask all four in a single message. Wait for one reply, then proceed immediately — no follow-up questions.
|
|
29
23
|
|
|
30
|
-
|
|
24
|
+
**1. Site type**
|
|
25
|
+
- `A` Landing page — public, no login needed to browse
|
|
26
|
+
- `B` Member system — login wall, users must sign in first
|
|
31
27
|
|
|
32
|
-
|
|
28
|
+
**2. Language**
|
|
29
|
+
- `A` Thai (ภาษาไทย)
|
|
30
|
+
- `B` English
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
**3. Font style**
|
|
33
|
+
- If Thai (choice 2A): `T1` Prompt · `T2` IBM Plex Thai · `T3` Noto Sans Thai · `T4` Anuphan
|
|
34
|
+
- If English (choice 2B): `E1` Modern — Inter / Geist · `E2` Luxury — Playfair Display + DM Sans
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
**4. Color theme** — shadcn/ui standard palettes:
|
|
37
|
+
- `1` Zinc (neutral gray — most common default)
|
|
38
|
+
- `2` Slate (cool blue-gray)
|
|
39
|
+
- `3` Blue (blue accent)
|
|
40
|
+
- `4` Green (green accent)
|
|
41
|
+
- `5` Orange (warm orange accent)
|
|
42
|
+
- `6` Rose (pink/red accent)
|
|
43
|
+
- `7` Violet (purple accent)
|
|
44
|
+
|
|
45
|
+
Defaults if skipped: B · B · T1 (Prompt) for Thai / E1 (Modern) for English · 1 (Zinc).
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Step 3 — Create the build spec (no waiting)
|
|
50
|
+
|
|
51
|
+
Check if `docs/AI_BUILD_SPEC.md` exists. If not, create it now from the docs:
|
|
37
52
|
|
|
38
53
|
```markdown
|
|
39
54
|
# AI Build Spec
|
|
40
55
|
|
|
41
56
|
## Functional Requirements
|
|
42
|
-
[
|
|
57
|
+
[features from MVP Scope in PROJECT.md — one bullet per feature]
|
|
43
58
|
|
|
44
59
|
## Data Model
|
|
45
|
-
[
|
|
60
|
+
[tables/collections derived from features — fields, types, relations]
|
|
46
61
|
|
|
47
62
|
## API Contract
|
|
48
|
-
[
|
|
63
|
+
[routes/actions needed — method, path, purpose, auth required]
|
|
49
64
|
|
|
50
65
|
## Auth
|
|
51
|
-
[
|
|
66
|
+
[derived from HUMAN_FLOW.md Section 5 Key UX Decisions]
|
|
52
67
|
|
|
53
|
-
## Out of scope
|
|
54
|
-
[
|
|
68
|
+
## Out of scope
|
|
69
|
+
[from PROJECT.md "Out of scope for MVP"]
|
|
55
70
|
```
|
|
56
71
|
|
|
57
|
-
|
|
58
|
-
|
|
72
|
+
Write it and move on — do not wait for user confirmation.
|
|
73
|
+
|
|
74
|
+
## Step 4 — Apply shadcn/ui theme + font (no waiting)
|
|
75
|
+
|
|
76
|
+
**Stack: Tailwind CSS v4 + shadcn/ui. Do not write custom HSL tokens manually.**
|
|
77
|
+
|
|
78
|
+
1. Confirm `shadcn/ui` is initialized in the project. If `components/ui/` doesn't exist, run:
|
|
79
|
+
```
|
|
80
|
+
npx shadcn@latest init
|
|
81
|
+
```
|
|
82
|
+
Select the color palette chosen in Step 2.5 during init (or patch `components.json` + `app/globals.css` to match the chosen palette after the fact).
|
|
83
|
+
|
|
84
|
+
2. Apply the chosen color theme to `app/globals.css` using shadcn's CSS variable block for that palette. Palettes available: `zinc` · `slate` · `blue` · `green` · `orange` · `rose` · `violet`. Always use white background (`--background: 0 0% 100%`).
|
|
85
|
+
|
|
86
|
+
3. Apply the chosen font in `app/layout.tsx` and `app/globals.css` via `next/font/google`:
|
|
87
|
+
|
|
88
|
+
**Thai fonts** — set `subsets: ["thai", "latin"]` on all:
|
|
89
|
+
- `T1` Prompt: `weights: ["400","500","600","700"]`
|
|
90
|
+
- `T2` IBM Plex Thai: `weights: ["400","500","600","700"]`
|
|
91
|
+
- `T3` Noto Sans Thai: `weights: ["400","500","600","700"]`
|
|
92
|
+
- `T4` Anuphan: `weights: ["400","500","600","700"]`
|
|
93
|
+
|
|
94
|
+
Assign to `--font-sans`, apply `font-sans` on `<body>`. Thai fonts are single-font stacks — no separate serif needed.
|
|
95
|
+
|
|
96
|
+
**English fonts:**
|
|
97
|
+
- `E1` Modern: Keep Geist if present, otherwise `Inter`. `font-sans` on `<body>`.
|
|
98
|
+
- `E2` Luxury: `Playfair_Display` → `--font-serif` (headings), `DM_Sans` → `--font-sans` (body). Apply `--font-serif` to `h1`–`h3` in global CSS.
|
|
99
|
+
|
|
100
|
+
4. Install any needed shadcn components now: `npx shadcn@latest add button card input label` (add more as needed per HUMAN_FLOW.md screens). Do not build custom components for things shadcn already covers.
|
|
101
|
+
|
|
102
|
+
5. **Fill `docs/DESIGN_SYSTEM.md`** — replace all `[FILL: ...]` placeholders with the actual choices made above (palette name, font, language). Leave the trend section blank for now — it gets filled by the `uiux-frontend` skill in Step 5.
|
|
59
103
|
|
|
60
|
-
|
|
104
|
+
6. **Fill `docs/DESIGN_SPEC.md` global decisions** — fill site type, language, font, and palette rows.
|
|
61
105
|
|
|
62
|
-
|
|
106
|
+
Do not ask for approval. Proceed immediately.
|
|
63
107
|
|
|
64
|
-
|
|
65
|
-
2. Present 2-3 theme options to the user. Never pick silently.
|
|
66
|
-
3. Apply the chosen theme to `app/globals.css` (`:root` and `.dark` tokens) and `app/layout.tsx`.
|
|
67
|
-
4. Use the skill's component and layout guidance when building each screen in Step 5 — it knows 67 design styles, 96 palettes, and 57 font pairings, so defer to it for any UI decision.
|
|
108
|
+
## Step 5 — 5-minute MVP: home screen first, data later
|
|
68
109
|
|
|
69
|
-
|
|
110
|
+
**Target: user sees a real-looking screen within 5 minutes. Build UI with static placeholder data first. Wire real data after.**
|
|
70
111
|
|
|
71
|
-
|
|
112
|
+
**Before building each screen, apply the `.claude/skills/uiux-frontend/SKILL.md` guidelines** — layout pattern, component selection, typography, states, and copy rules. Do not skip this for any screen.
|
|
72
113
|
|
|
73
|
-
|
|
74
|
-
|
|
114
|
+
Apply choices from Step 2.5 to every screen built:
|
|
115
|
+
- **Landing page:** `app/page.tsx` is a public page — hero section, features, CTA. No auth.
|
|
116
|
+
- **Member system:** `app/page.tsx` redirects to `/login`. Build login page + middleware. First visible screen = the main dashboard with placeholder data.
|
|
117
|
+
- **Thai:** All labels, headings, buttons, nav, and placeholder copy in Thai.
|
|
118
|
+
- **English:** All copy in English.
|
|
75
119
|
|
|
76
|
-
Build in this order
|
|
77
|
-
1.
|
|
78
|
-
2.
|
|
79
|
-
3.
|
|
80
|
-
4.
|
|
81
|
-
5.
|
|
120
|
+
Build in this order — **stop after step 1 and show the user, then continue:**
|
|
121
|
+
1. **Home/entry screen** — replace `app/page.tsx` with static placeholder UI. Announce: "MVP home screen done — here's what it looks like. Continuing with data layer…"
|
|
122
|
+
2. **Database schema** (`lib/db/schema.*.ts`)
|
|
123
|
+
3. **Server actions / API routes**
|
|
124
|
+
4. **Remaining pages** — one screen at a time per HUMAN_FLOW.md
|
|
125
|
+
5. **Wire real data** — replace placeholders with real data layer calls
|
|
82
126
|
|
|
83
|
-
After each screen:
|
|
127
|
+
After each screen: one line on what was built, one line on what's next. No long summaries.
|
|
84
128
|
|
|
85
129
|
## Rules
|
|
86
130
|
|
|
87
|
-
- Never invent business logic not in the spec — if
|
|
88
|
-
- If a code change
|
|
89
|
-
-
|
|
131
|
+
- Never invent business logic not in the spec — if unclear, make a reasonable assumption and note it.
|
|
132
|
+
- If a code change conflicts with `docs/AI_BUILD_SPEC.md`, flag it in one sentence and proceed with the most reasonable interpretation.
|
|
133
|
+
- Speed over perfection — working UI with placeholder data beats perfect code the user can't see yet.
|
|
134
|
+
- **No unnecessary libraries** — before adding any `npm install`, ask: "does Next.js, Tailwind, or shadcn already cover this?" If yes, use what's already there. Allowed additions: `next/font/google` (fonts), `zod` + `react-hook-form` (forms, included with shadcn), `lucide-react` (icons, included with shadcn). Everything else requires explicit justification. Never add: `axios` (use `fetch`), `lodash` (use native JS), `moment`/`dayjs` (use `Intl`), `framer-motion` (use CSS transforms + Tailwind transitions first), `styled-components`/`emotion` (Tailwind is the CSS layer).
|
|
@@ -1,75 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ship-method
|
|
3
|
-
description: Use when starting any new product, feature, or "build me an app" request — before writing any application code. Walks through Structure,
|
|
3
|
+
description: Use when starting any new product, feature, or "build me an app" request — before writing any application code. Walks through Structure, Theme, Instruction, Publish in order, using this repo's templates. Also use when asked to review whether a project is "ready to build" or "ready to ship."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# The SHIP Method
|
|
7
7
|
|
|
8
|
-
You are operating inside a project built with **The SHIP Method OS**. The method has four phases, run strictly in order:
|
|
9
|
-
|
|
10
8
|
```
|
|
11
|
-
S — STRUCTURE
|
|
12
|
-
(what & why) (the experience) (AI-ready specs) (ship it)
|
|
9
|
+
S — STRUCTURE → H — HUMAN FLOW → I — INSTRUCTION → P — PUBLISH
|
|
13
10
|
```
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## When to Use This Skill
|
|
18
|
-
|
|
19
|
-
- The user describes a new product/feature idea and wants something built
|
|
20
|
-
- The user asks you to generate code for a feature that doesn't have a filled spec yet
|
|
21
|
-
- The user asks "is this ready to build?" or "is this ready to ship?"
|
|
22
|
-
- You're about to scaffold, design a schema, or write business logic and no `PROJECT.md` / `HUMAN_FLOW.md` exists yet for it
|
|
23
|
-
- The user runs the `/ship` shortcut — drive them through the gates below one phase at a time, drafting their answers into the docs
|
|
12
|
+
## When `/build` is invoked — do this immediately, in this order
|
|
24
13
|
|
|
25
|
-
|
|
14
|
+
**Do not create a task list. Do not plan. Act.**
|
|
26
15
|
|
|
27
|
-
|
|
16
|
+
### 1. Read (no output, no tasks)
|
|
17
|
+
Silently read `docs/PROJECT.md` and `docs/HUMAN_FLOW.md`. If core sections are empty, ask the user one question: *"Describe your idea in one sentence."* Fill the docs from their answer, then continue.
|
|
28
18
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- [ ] **Gate 3 — Instruction exists.** Functional requirements, data model, and API contract are written somewhere concrete (`AI_BUILD_SPEC.md` / `docs/PROJECT.md`'s feature section) before you generate feature code.
|
|
32
|
-
- [ ] **Gate 4 — Theme & First Screen.** Once Gates 1-3 pass and before final polish/ship: derive 2-3 business-appropriate themes from `PROJECT.md`, let the user pick one, apply it (`app/globals.css`, `app/layout.tsx`), and record it in the design system; then read `HUMAN_FLOW.md` and replace the starter's generic `app/page.tsx` ("Pick your area") with the real entry point. See `theme-guide.md` in this skill folder.
|
|
33
|
-
- [ ] **Gate 5 — Publish readiness.** Before telling the user something is "done," check it against the relevant checklist (`QA_CHECKLIST.md`, `LAUNCH_CHECKLIST.md`) rather than declaring success from a clean build alone.
|
|
19
|
+
### 2. Theme — first visible output
|
|
20
|
+
Present 2–3 theme options (palette name + font, one line each). Wait for the user to pick. Apply the chosen theme to `app/globals.css` and `app/layout.tsx`. Record in `docs/DESIGN_SYSTEM.md`. **This is the first thing the user sees — it must happen before any feature code.**
|
|
34
21
|
|
|
35
|
-
|
|
22
|
+
### 3. Home screen — second visible output
|
|
23
|
+
Read `HUMAN_FLOW.md`. Replace `app/page.tsx` with the real entry point for this product. The user should be able to run `npm run dev` and see their product, not the starter template.
|
|
36
24
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
3. **If all gates are filled:** proceed normally — generate code straight from the spec, and flag if a code request contradicts what's already written in `PROJECT.md` or `HUMAN_FLOW.md` rather than silently overriding it.
|
|
40
|
-
4. **When asked "is this ready to build/ship?":** walk the checklist above explicitly and report which gates pass/fail, rather than giving a vague yes/no.
|
|
25
|
+
### 4. Ask one question
|
|
26
|
+
*"Which feature do you want to build first?"* Then build just that one.
|
|
41
27
|
|
|
42
|
-
|
|
28
|
+
---
|
|
43
29
|
|
|
44
|
-
|
|
45
|
-
knows the business from `PROJECT.md`, so it can theme and build the front door
|
|
46
|
-
accurately.
|
|
30
|
+
**That's the entire flow.** Steps 1–3 are one session. Features are added one at a time after that.
|
|
47
31
|
|
|
48
|
-
|
|
49
|
-
(palette as HSL token values + a font pairing). Present them and let the user
|
|
50
|
-
pick — never pick silently, never require brand assets the user didn't give.
|
|
51
|
-
2. **Apply it.** Write the chosen tokens into `app/globals.css` (`:root` and
|
|
52
|
-
`.dark`), set fonts in `app/layout.tsx`, and record the choice in
|
|
53
|
-
`12-DESIGN-SYSTEM/DESIGN_SYSTEM.md` (or `docs/DESIGN_SYSTEM.md`).
|
|
54
|
-
3. **Build the first screen.** Read `HUMAN_FLOW.md`, decide the real entry point
|
|
55
|
-
for this business, and replace the starter's `app/page.tsx` ("Pick your
|
|
56
|
-
area") with it — landing/sale for marketing-led products, app home/dashboard
|
|
57
|
-
redirect for tools. Adjust each area's main page to match.
|
|
32
|
+
## Hard rules
|
|
58
33
|
|
|
59
|
-
|
|
60
|
-
|
|
34
|
+
- **No task list at start.** Create tasks only when building a specific feature, and only 1–2 at a time.
|
|
35
|
+
- **No spec before theme.** `docs/AI_BUILD_SPEC.md` is written after the home screen exists, not before.
|
|
36
|
+
- **No gates that block visible output.** The only thing that can pause the flow is a missing answer to a direct question.
|
|
37
|
+
- **If the user says "skip docs":** comply. Say once what's skipped. Never repeat.
|
|
61
38
|
|
|
62
|
-
## Reference
|
|
39
|
+
## Reference files
|
|
63
40
|
|
|
64
41
|
| Need | File |
|
|
65
42
|
|---|---|
|
|
66
|
-
|
|
|
67
|
-
| User
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
| Business-type → palette/font theme guide | `theme-guide.md` (this skill folder) |
|
|
73
|
-
| Stack decisions | `13-TECH-STACK/STACK_DECISION_MATRIX.md` |
|
|
74
|
-
|
|
75
|
-
If this is a project generated by `ship-create`, the same files exist under `docs/` instead of the numbered folders above.
|
|
43
|
+
| Vision, audience, MVP | `docs/PROJECT.md` |
|
|
44
|
+
| User flow, screens | `docs/HUMAN_FLOW.md` |
|
|
45
|
+
| Functional spec | `docs/AI_BUILD_SPEC.md` (written after home screen) |
|
|
46
|
+
| Stack choices | `docs/tech-stack/STACK_DECISION_MATRIX.md` |
|
|
47
|
+
| UI guidance | invoke `ui-ux-pro-max` skill |
|
|
48
|
+
| Theme palette table | `theme-guide.md` (this skill folder) |
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: uiux-frontend
|
|
3
|
+
description: UI/UX design guidance for Next.js + Tailwind v4 + shadcn/ui projects. Invoke before building any screen. Fetches current trends, auto-selects the best one for the project, then applies layout, component, and copy guidance.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UI/UX Frontend Skill
|
|
7
|
+
|
|
8
|
+
Design guidance for **Next.js + Tailwind CSS v4 + shadcn/ui** projects. Runs in 3 phases: (0) fetch current trends, (1) auto-select + declare, (2) implement.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Phase 0 — Fetch current trends (every invocation, no skipping)
|
|
13
|
+
|
|
14
|
+
Before designing any screen, do a web search to get the freshest UI/UX trend signal:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
search: "UI UX design trends 2025 site:nngroup.com OR site:smashingmagazine.com OR site:awwwards.com OR site:uxdesign.cc"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Scan the results for any trends that have risen or fallen since the base catalog below. Note any new entrant that appears in ≥ 2 sources. This keeps designs current — do not skip this step.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Phase 1 — Auto-select the trend (do not ask the user)
|
|
25
|
+
|
|
26
|
+
Read `docs/PROJECT.md` for product type, audience, and tone. Cross-reference with the **Trend Catalog** below. Pick **one primary trend** and optionally one supporting micro-trend. Announce the choice in one sentence before writing any code:
|
|
27
|
+
|
|
28
|
+
> "Using **[Trend Name]** — suits [product type] for [audience reason]."
|
|
29
|
+
|
|
30
|
+
### Trend Catalog
|
|
31
|
+
|
|
32
|
+
#### 🎨 Visual & Tactile Aesthetics
|
|
33
|
+
|
|
34
|
+
**Tactile Maximalism (Squishy UI)**
|
|
35
|
+
Soft 3D shapes, inflated elements, playful depth, bold saturated colors, spring-like hover states.
|
|
36
|
+
- Best for: consumer apps, gaming, creative tools, young (18–30) audience
|
|
37
|
+
- Avoid: finance, healthcare, enterprise admin
|
|
38
|
+
- Tailwind implementation: `rounded-3xl shadow-2xl scale-[1.02] hover:scale-105 transition-transform duration-200`, bold `bg-[color]` fills, thick borders `border-4`
|
|
39
|
+
|
|
40
|
+
**Intentional Imperfection**
|
|
41
|
+
Hand-drawn strokes, organic shapes, slight rotation/misalignment, textured backgrounds, ink-style illustrations.
|
|
42
|
+
- Best for: creative agencies, cultural brands, portfolios, artisan products
|
|
43
|
+
- Avoid: SaaS dashboards, fintech, legal
|
|
44
|
+
- Tailwind implementation: `rotate-[-1deg]`, `skew-x-1`, SVG hand-drawn border overlays, `bg-[url('/texture.png')] bg-repeat opacity-10`
|
|
45
|
+
|
|
46
|
+
**Liquid Glass & Glassmorphism**
|
|
47
|
+
Frosted glass panels, translucent cards, blur backdrop, subtle borders on glass surface.
|
|
48
|
+
- Best for: premium apps, fintech, luxury SaaS, iOS-style products
|
|
49
|
+
- Avoid: heavy data tables, accessibility-critical flows (low contrast risk — add `backdrop-blur` + solid text)
|
|
50
|
+
- Tailwind implementation: `bg-white/10 backdrop-blur-md border border-white/20 shadow-lg`, ensure text contrast with `text-white drop-shadow-sm` or `text-gray-900` on light blur
|
|
51
|
+
|
|
52
|
+
**Retrofuturism**
|
|
53
|
+
Neon accents on dark base, grid/scanline overlays, monospace fonts mixed with modern sans, CRT glow effects.
|
|
54
|
+
- Best for: AI tools, dev products, tech startups, edgy consumer apps
|
|
55
|
+
- Avoid: healthcare, legal, conservative brands
|
|
56
|
+
- Tailwind implementation: `bg-gray-950 text-green-400`, `font-mono`, `shadow-[0_0_20px_rgba(74,222,128,0.5)]`, CSS `::before` scanline overlay
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
#### ⚙️ Function & Experience
|
|
61
|
+
|
|
62
|
+
**Spatial Design**
|
|
63
|
+
Elements appear to exist in 3D space — parallax layers, perspective transforms, depth through scale + shadow, immersive scrolling.
|
|
64
|
+
- Best for: product showcases, portfolio sites, hero sections, tech launches
|
|
65
|
+
- Avoid: CRUD admin panels, form-heavy apps
|
|
66
|
+
- Tailwind implementation: `perspective-1000` (custom CSS), `translate-z-[40px]` on hover via `transform-gpu`, `shadow-2xl` depth layers, scroll-driven animation with CSS `@keyframes`
|
|
67
|
+
|
|
68
|
+
**Calm Design & Strategic Minimalism**
|
|
69
|
+
Maximum whitespace, restrained palette (2–3 colors), no decorative elements, typography as the main visual element.
|
|
70
|
+
- Best for: healthcare, productivity, focus tools, wellness, legal SaaS
|
|
71
|
+
- Avoid: marketing pages that need energy, entertainment
|
|
72
|
+
- Tailwind implementation: `max-w-prose mx-auto`, `text-gray-500` for supporting text, `border-b border-gray-100` dividers, avoid shadows — use whitespace for separation
|
|
73
|
+
|
|
74
|
+
**Command Palettes & Unified Search**
|
|
75
|
+
Global `⌘K` search overlay that routes to any action, page, or record. Reduces nav depth, enables power-user flow.
|
|
76
|
+
- Best for: SaaS dashboards, dev tools, data products with many entities
|
|
77
|
+
- Avoid: simple forms, landing pages, consumer apps with < 10 routes
|
|
78
|
+
- Tailwind implementation: Use `cmdk` library + shadcn `Command` component, `fixed inset-0 bg-black/50 flex items-start justify-center pt-32`, trigger via `useEffect` on `⌘K`
|
|
79
|
+
|
|
80
|
+
**Bento Grids**
|
|
81
|
+
Asymmetric card grid where different-sized cells showcase features, metrics, or media — like a magazine layout.
|
|
82
|
+
- Best for: dashboards, feature showcases, portfolios, SaaS landing pages
|
|
83
|
+
- Avoid: long-form content, step-by-step flows
|
|
84
|
+
- Tailwind implementation: `grid grid-cols-3 gap-4 auto-rows-[minmax(160px,auto)]`, mix `col-span-2 row-span-2` for hero cells, shadcn `Card` in each cell
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
#### 🤖 Typography & AI
|
|
89
|
+
|
|
90
|
+
**Expressive Typography**
|
|
91
|
+
Large (100px+) hero type, variable font weights, type as graphic element, kinetic text on scroll, tight tracking on display sizes.
|
|
92
|
+
- Best for: landing pages, marketing sites, portfolios, brand-forward products
|
|
93
|
+
- Avoid: data-dense UIs, forms, admin panels
|
|
94
|
+
- Tailwind implementation: `text-7xl lg:text-9xl font-black tracking-tighter leading-none`, variable fonts via CSS `font-variation-settings`, `mix-blend-multiply` for type overlays
|
|
95
|
+
|
|
96
|
+
**Seamless AI Infrastructure**
|
|
97
|
+
Streaming text (typewriter), skeleton-to-real transitions, inline AI suggestions, confidence indicators, generative placeholders.
|
|
98
|
+
- Best for: AI SaaS, copilot tools, any product with AI-generated content
|
|
99
|
+
- Avoid: non-tech products, forms where instant response is expected
|
|
100
|
+
- Tailwind implementation: `animate-pulse` for streaming state, word-by-word reveal via JS interval, `border-l-2 border-primary pl-3` for AI response thread, `opacity-50` for low-confidence content
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### Auto-selection decision matrix
|
|
105
|
+
|
|
106
|
+
| Project type | Primary trend | Supporting |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| AI / copilot SaaS | Seamless AI Infrastructure | Command Palettes |
|
|
109
|
+
| B2B dashboard / admin | Calm Design & Strategic Minimalism | Bento Grids |
|
|
110
|
+
| Consumer app (young) | Tactile Maximalism | Expressive Typography |
|
|
111
|
+
| Premium / luxury brand | Liquid Glass | Expressive Typography |
|
|
112
|
+
| Creative agency / portfolio | Intentional Imperfection | Spatial Design |
|
|
113
|
+
| Dev tool / CLI product | Retrofuturism | Command Palettes |
|
|
114
|
+
| Healthcare / wellness | Calm Design & Strategic Minimalism | — |
|
|
115
|
+
| Feature showcase landing page | Bento Grids | Expressive Typography |
|
|
116
|
+
| Tech startup landing | Spatial Design | Expressive Typography |
|
|
117
|
+
| Marketplace / e-commerce | Tactile Maximalism | Bento Grids |
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Phase 2 — Implement the screen
|
|
122
|
+
|
|
123
|
+
After announcing the trend:
|
|
124
|
+
|
|
125
|
+
1. **Update `docs/DESIGN_SYSTEM.md`** — fill in the `UI Trend` section (trend name, reason, implementation rules, scope) if not already done.
|
|
126
|
+
2. **Update `docs/DESIGN_SPEC.md`** — add a screen entry for the screen being built. Fill all fields before writing code. Mark `Status: in-progress`.
|
|
127
|
+
3. Build the screen.
|
|
128
|
+
4. After screen is done, update the DESIGN_SPEC entry: mark `Status: done`, tick off states (`✓`), fill in notes.
|
|
129
|
+
|
|
130
|
+
Then apply all sections below.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## A. Think user-first before touching code
|
|
135
|
+
|
|
136
|
+
Answer these before laying out any screen:
|
|
137
|
+
- Who is the user and what state are they in when they arrive?
|
|
138
|
+
- What is the ONE thing they must accomplish on this screen?
|
|
139
|
+
- Where do they come from, and where do they go next?
|
|
140
|
+
- What does "success" look like for them (not the business)?
|
|
141
|
+
|
|
142
|
+
If you can't answer these from `docs/HUMAN_FLOW.md` → reread it, don't guess.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## B. Layout patterns by screen type
|
|
147
|
+
|
|
148
|
+
### Landing page (public)
|
|
149
|
+
```
|
|
150
|
+
Hero → Value props (3 columns) → Social proof → CTA section → Footer
|
|
151
|
+
```
|
|
152
|
+
- Hero: full-width, headline + subheadline + primary button. Apply trend here most visibly.
|
|
153
|
+
- Value props: shadcn `Card` or Bento grid cells
|
|
154
|
+
- CTA: high-contrast button
|
|
155
|
+
- Mobile: single column, buttons full width
|
|
156
|
+
|
|
157
|
+
### Dashboard (member system)
|
|
158
|
+
```
|
|
159
|
+
Sidebar nav (md+) | Top bar | Main content area
|
|
160
|
+
```
|
|
161
|
+
- Sidebar: 240px, `bg-sidebar` token, active state via `aria-current="page"`
|
|
162
|
+
- Top bar: breadcrumb left, avatar/action right + optional `⌘K` trigger
|
|
163
|
+
- Content: `max-w-screen-xl px-6 py-8`. Bento grid for KPI cards, shadcn `Table` for lists
|
|
164
|
+
|
|
165
|
+
### Login / auth screen
|
|
166
|
+
```
|
|
167
|
+
Centered card (max-w-sm) — logo → heading → form → submit → helper link
|
|
168
|
+
```
|
|
169
|
+
- shadcn `Card` + `CardContent`. Apply trend subtly (background, not form itself).
|
|
170
|
+
- Form: `Label` + `Input` stacked, `Button` full-width
|
|
171
|
+
|
|
172
|
+
### Form / settings screen
|
|
173
|
+
```
|
|
174
|
+
Page heading → section groups → save action at bottom
|
|
175
|
+
```
|
|
176
|
+
- Group fields with section cards. Inline errors via shadcn `FormMessage`.
|
|
177
|
+
- Save button: primary, right-aligned
|
|
178
|
+
|
|
179
|
+
### List / table screen
|
|
180
|
+
```
|
|
181
|
+
Toolbar (search + filter + action) → Table or card grid → Pagination
|
|
182
|
+
```
|
|
183
|
+
- shadcn `Table` for structured data, card grid for visual items
|
|
184
|
+
- Empty state: centered icon + message + CTA
|
|
185
|
+
- Loading: shadcn `Skeleton` rows
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## C. Typography rules
|
|
190
|
+
|
|
191
|
+
### Thai fonts (Prompt / IBM Plex Thai / Noto Sans Thai / Anuphan)
|
|
192
|
+
Single-font stack, `font-sans` everywhere.
|
|
193
|
+
|
|
194
|
+
| Element | Class |
|
|
195
|
+
|---------|-------|
|
|
196
|
+
| Page title h1 | `text-3xl font-bold` |
|
|
197
|
+
| Section heading h2 | `text-xl font-semibold` |
|
|
198
|
+
| Body | `text-base font-normal leading-relaxed` |
|
|
199
|
+
| Caption | `text-sm text-muted-foreground` |
|
|
200
|
+
| Button | `text-sm font-medium` |
|
|
201
|
+
|
|
202
|
+
> Thai script needs `leading-relaxed` or higher. Never go below `text-base` on mobile.
|
|
203
|
+
|
|
204
|
+
### English — Modern (Inter / Geist)
|
|
205
|
+
| Element | Class |
|
|
206
|
+
|---------|-------|
|
|
207
|
+
| Page title h1 | `text-3xl font-bold tracking-tight` |
|
|
208
|
+
| Section heading h2 | `text-xl font-semibold` |
|
|
209
|
+
| Body | `text-base font-normal leading-relaxed` |
|
|
210
|
+
| Caption | `text-sm text-muted-foreground` |
|
|
211
|
+
| Button | `text-sm font-medium` |
|
|
212
|
+
|
|
213
|
+
### English — Luxury (Playfair Display + DM Sans)
|
|
214
|
+
| Element | Class |
|
|
215
|
+
|---------|-------|
|
|
216
|
+
| Page title h1 | `font-serif text-3xl font-bold tracking-wide` |
|
|
217
|
+
| Section heading h2 | `font-serif text-xl font-semibold tracking-wide` |
|
|
218
|
+
| Body | `text-base font-normal leading-relaxed` |
|
|
219
|
+
| Caption | `text-sm text-muted-foreground` |
|
|
220
|
+
| Button | `text-sm font-medium tracking-wide uppercase` |
|
|
221
|
+
|
|
222
|
+
For **Expressive Typography** trend: override h1 to `text-7xl lg:text-9xl font-black tracking-tighter leading-none` on hero sections only.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## D. Spacing & sizing
|
|
227
|
+
|
|
228
|
+
- Page padding: `px-4 sm:px-6 lg:px-8`
|
|
229
|
+
- Section gap: `space-y-8` or `gap-8`
|
|
230
|
+
- Card padding: `p-6`
|
|
231
|
+
- Form fields: `space-y-4`
|
|
232
|
+
- Min touch target: `h-11` (44px)
|
|
233
|
+
- Min body text: `text-base` on mobile
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## E. shadcn/ui component map
|
|
238
|
+
|
|
239
|
+
| Need | Component |
|
|
240
|
+
|------|-----------|
|
|
241
|
+
| Navigation | `NavigationMenu` or `<nav>` + Link |
|
|
242
|
+
| Data entry | `Input`, `Textarea`, `Select`, `Checkbox`, `RadioGroup` |
|
|
243
|
+
| Form | `Form` (react-hook-form + zod) |
|
|
244
|
+
| Actions | `Button` (default / outline / ghost / destructive) |
|
|
245
|
+
| Feedback | `Toast`, `Alert` |
|
|
246
|
+
| Modals | `Dialog`, `AlertDialog` |
|
|
247
|
+
| Data display | `Table`, `Card`, `Badge` |
|
|
248
|
+
| Loading | `Skeleton` |
|
|
249
|
+
| Sidebar (mobile) | `Sheet` |
|
|
250
|
+
| Global search | `Command` (cmdk) |
|
|
251
|
+
| Dropdowns | `DropdownMenu` |
|
|
252
|
+
|
|
253
|
+
Do not build custom versions of anything shadcn covers.
|
|
254
|
+
|
|
255
|
+
**Library rule — always check before installing:**
|
|
256
|
+
|
|
257
|
+
| Need | Use this — NOT a new library |
|
|
258
|
+
|------|------------------------------|
|
|
259
|
+
| HTTP requests | Native `fetch` |
|
|
260
|
+
| Date formatting | `Intl.DateTimeFormat` |
|
|
261
|
+
| Array/object utilities | Native JS (`.map`, `.filter`, `.reduce`) |
|
|
262
|
+
| Icons | `lucide-react` (already in shadcn) |
|
|
263
|
+
| Animation | CSS `transition` + Tailwind classes first; CSS `@keyframes` for complex |
|
|
264
|
+
| Forms + validation | `react-hook-form` + `zod` (already in shadcn `Form`) |
|
|
265
|
+
| Global search / cmd palette | shadcn `Command` (uses cmdk internally — do not install cmdk separately) |
|
|
266
|
+
| Fonts | `next/font/google` |
|
|
267
|
+
|
|
268
|
+
Only install a new library if no existing solution covers the need. Mention it explicitly when you do.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## F. UI copy rules
|
|
273
|
+
|
|
274
|
+
### Thai
|
|
275
|
+
- ปุ่ม: กริยาสั้น — "บันทึก", "เข้าสู่ระบบ", "ดูเพิ่มเติม"
|
|
276
|
+
- หัวข้อ: ≤ 10 คำ
|
|
277
|
+
- Placeholder: ตัวอย่างจริง — "กรอกชื่อ-นามสกุล" ไม่ใช่ "กรอกข้อมูล"
|
|
278
|
+
- Error: บอกปัญหาและวิธีแก้ — "กรุณากรอกอีเมลให้ถูกต้อง"
|
|
279
|
+
- Empty: สั่งทำได้ทันที — "ยังไม่มีรายการ — กด 'เพิ่มรายการ' เพื่อเริ่มต้น"
|
|
280
|
+
|
|
281
|
+
### English
|
|
282
|
+
- Buttons: verb-first — "Save changes", "Sign in", "View all"
|
|
283
|
+
- Headings: ≤ 8 words, sentence case
|
|
284
|
+
- Placeholders: real example — "Enter your full name"
|
|
285
|
+
- Error: what + fix — "Email already in use. Try signing in instead."
|
|
286
|
+
- Empty: actionable — "No items yet — click 'Add item' to get started"
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## G. States (all 4 required on every screen)
|
|
291
|
+
|
|
292
|
+
| State | Implementation |
|
|
293
|
+
|-------|----------------|
|
|
294
|
+
| Loading | `Skeleton` matching real content shape |
|
|
295
|
+
| Empty | Centered icon + message + primary CTA |
|
|
296
|
+
| Error | `Alert` destructive + retry action |
|
|
297
|
+
| Success | `Toast` or inline confirmation |
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## H. Accessibility minimum
|
|
302
|
+
|
|
303
|
+
- Keyboard-navigable (`Tab` order = visual order)
|
|
304
|
+
- Icon-only buttons have `aria-label`
|
|
305
|
+
- Every input has a visible `<Label>`
|
|
306
|
+
- Color contrast ≥ 4.5:1 (shadcn defaults pass; glassmorphism — verify manually)
|
|
307
|
+
- Images have `alt` (or `alt=""` if decorative)
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## I. Revenue link check (before closing any screen)
|
|
312
|
+
|
|
313
|
+
| Screen | Revenue connection |
|
|
314
|
+
|--------|--------------------|
|
|
315
|
+
| Landing page | Conversion — CTA → sign-up / purchase |
|
|
316
|
+
| Login / sign-up | Activation — user reaches product |
|
|
317
|
+
| Dashboard | Retention — user sees value, returns |
|
|
318
|
+
| Settings / billing | Revenue — upgrade path, churn prevention |
|
|
319
|
+
| Empty state | Activation — first action drives retention |
|
|
320
|
+
|
|
321
|
+
If a screen has no revenue link, flag it before spending time on it.
|
package/templates/.cursorrules
CHANGED
|
@@ -51,11 +51,13 @@ All docs live under `docs/`:
|
|
|
51
51
|
|
|
52
52
|
6. **Never invent business facts** (market size, pricing, real metrics, real user quotes). Draft clearly-labeled `[TBD: ...]` placeholders or ask the user.
|
|
53
53
|
|
|
54
|
-
7. **
|
|
55
|
-
|
|
56
|
-
- **
|
|
57
|
-
- **
|
|
58
|
-
-
|
|
54
|
+
7. **When `/build` is invoked: act immediately, no planning, no task list.**
|
|
55
|
+
- **First:** read `docs/PROJECT.md` + `docs/HUMAN_FLOW.md` silently. If empty, ask one question: *"Describe your idea in one sentence."* Fill docs, then continue.
|
|
56
|
+
- **Second:** propose 2–3 theme options (one line each), let the user pick, apply to `app/globals.css` + `app/layout.tsx`. This is the first visible output.
|
|
57
|
+
- **Third:** replace `app/page.tsx` with the real home screen from `HUMAN_FLOW.md`. User runs `npm run dev` and sees their product.
|
|
58
|
+
- **Then:** ask "which feature first?" and build just that one.
|
|
59
|
+
- **No task list at start.** No spec before theme. No gate that blocks visible output.
|
|
60
|
+
- See `.claude/skills/ship-method/theme-guide.md` for product-type → palette reference.
|
|
59
61
|
|
|
60
62
|
## Quick Orientation for a New Agent Session
|
|
61
63
|
|