@polymorphism-tech/morph-spec 4.11.0 → 4.12.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/CLAUDE.md +106 -2
- package/README.md +2 -2
- package/bin/morph-spec.js +31 -3
- package/bin/task-manager.js +391 -35
- package/claude-plugin.json +1 -1
- package/docs/CHEATSHEET.md +1 -1
- package/docs/QUICKSTART.md +1 -1
- package/framework/agents.json +16 -6
- package/framework/commands/morph-apply.md +21 -1
- package/framework/commands/morph-proposal.md +44 -1
- package/framework/hooks/claude-code/post-tool-use/agent-complete.js +122 -0
- package/framework/hooks/claude-code/post-tool-use/dispatch.js +47 -2
- package/framework/hooks/claude-code/session-start/inject-morph-context.js +4 -3
- package/framework/hooks/shared/dispatch-helpers.js +31 -0
- package/framework/hooks/shared/state-reader.js +7 -3
- package/framework/rules/morph-task-tracking.md +49 -0
- package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +6 -10
- package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +10 -1
- package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +1 -1
- package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +7 -13
- package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +7 -1
- package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +9 -12
- package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +7 -10
- package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +10 -18
- package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +256 -14
- package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +1 -1
- package/framework/standards/STANDARDS.json +31 -0
- package/framework/standards/frontend/design-system/aesthetic-direction.md +60 -7
- package/framework/standards/frontend/design-system/design-trends.md +171 -0
- package/framework/templates/context/CONTEXT.md +2 -2
- package/framework/templates/context/design-system.md +346 -211
- package/framework/templates/meta-prompts/squad-leaders/frontend-squad.md +1 -1
- package/package.json +1 -1
- package/src/commands/agents/dispatch-agents.js +25 -1
- package/src/commands/mcp/mcp-setup.js +28 -6
- package/src/commands/project/init.js +20 -1
- package/src/commands/tasks/task.js +54 -0
- package/src/lib/build/build-runner.js +99 -0
- package/src/lib/checkpoints/checkpoint-hooks.js +110 -0
- package/src/lib/generators/design-system-generator.js +340 -51
- package/src/lib/generators/recap-generator.js +27 -4
- package/src/lib/stack/stack-profile.js +3 -0
- package/src/lib/tasks/task-parser.js +23 -9
- package/src/lib/validators/design-system/design-system-validator.js +11 -5
- package/src/utils/file-copier.js +1 -0
- package/src/utils/hooks-installer.js +11 -1
- package/framework/hooks/claude-code/pre-tool-use/protect-readonly-files.js +0 -7
|
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 4 (Plan). Generates a detailed implementation plan
|
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.12.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Plan — Phase 4
|
|
@@ -54,6 +54,14 @@ Check the `"phase"` field:
|
|
|
54
54
|
|
|
55
55
|
> **Rule:** Never write to `3-plan/` until the phase is `plan`.
|
|
56
56
|
|
|
57
|
+
## MANDATORY: Session Tasks
|
|
58
|
+
|
|
59
|
+
> **BEFORE reading any files**, analyze the planning workflow and create session tasks.
|
|
60
|
+
>
|
|
61
|
+
> **Rules:** Minimum 2 tasks, typically 3-5. Mark `in_progress` before starting, `completed` after.
|
|
62
|
+
>
|
|
63
|
+
> **Typical tasks:** feature analysis, execution strategy, plan.md generation, plan approval
|
|
64
|
+
|
|
57
65
|
### 1. Read all prerequisites in PARALLEL
|
|
58
66
|
|
|
59
67
|
```
|
|
@@ -65,17 +73,6 @@ Read: .morph/features/{feature}/1-design/spec.md
|
|
|
65
73
|
+ Read: .morph/config/config.json
|
|
66
74
|
```
|
|
67
75
|
|
|
68
|
-
### 1.5 Create session tasks for visibility
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
TaskCreate: "Analyze feature for execution strategy" → activeForm: "Analyzing feature"
|
|
72
|
-
TaskCreate: "Determine execution strategy" → activeForm: "Planning strategy"
|
|
73
|
-
TaskCreate: "Generate plan.md" → activeForm: "Writing plan"
|
|
74
|
-
TaskCreate: "Plan approval" → activeForm: "Awaiting plan approval"
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Update each to `in_progress` before starting and `completed` after finishing.
|
|
78
|
-
|
|
79
76
|
---
|
|
80
77
|
|
|
81
78
|
## Workflow
|
|
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 1 (Setup). Reads project context, detects tech sta
|
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.12.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Setup — Phase 1
|
|
@@ -58,16 +58,13 @@ If any checkbox is NOT checked → go back to Phase 0 (Proposal).
|
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
## MANDATORY: Session Tasks
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Update each task to `in_progress` before its step and `completed` after.
|
|
63
|
+
> **BEFORE starting any setup work**, analyze the steps below and create session tasks.
|
|
64
|
+
>
|
|
65
|
+
> **Rules:** Minimum 2 tasks, typically 3-5. Mark `in_progress` before starting, `completed` after.
|
|
66
|
+
>
|
|
67
|
+
> **Typical tasks:** agent detection, MCP validation, stack confirmation, state configuration
|
|
71
68
|
|
|
72
69
|
---
|
|
73
70
|
|
|
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 4 (Tasks). Breaks approved spec into bottom-up ord
|
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.12.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Tasks — Phase 4
|
|
@@ -71,6 +71,14 @@ Check the `"phase"` field:
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
+
## MANDATORY: Session Tasks
|
|
75
|
+
|
|
76
|
+
> **BEFORE reading any files**, analyze the task breakdown workflow and create session tasks.
|
|
77
|
+
>
|
|
78
|
+
> **Rules:** Minimum 2 tasks, typically 3-4. Mark `in_progress` before starting, `completed` after.
|
|
79
|
+
>
|
|
80
|
+
> **Typical tasks:** spec analysis and task definition, tasks.md generation, state update and approval
|
|
81
|
+
|
|
74
82
|
### 1. Read all prerequisites in PARALLEL
|
|
75
83
|
|
|
76
84
|
```
|
|
@@ -82,25 +90,9 @@ Read: .morph/features/{feature}/1-design/spec.md
|
|
|
82
90
|
+ Read: .morph/config/config.json (→ architecture.style)
|
|
83
91
|
```
|
|
84
92
|
|
|
85
|
-
### 2. Create session tasks for visibility
|
|
86
|
-
|
|
87
|
-
After detecting `activeAgents` from state, create tasks with agent context:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
TaskCreate: "Analyze spec and define tasks"
|
|
91
|
-
→ description: "Active agents: {activeAgents.join(', ')}"
|
|
92
|
-
→ activeForm: "Analyzing spec"
|
|
93
|
-
TaskCreate: "Generate tasks.md"
|
|
94
|
-
→ description: "Architecture: {config.architecture.style}"
|
|
95
|
-
→ activeForm: "Generating tasks.md"
|
|
96
|
-
TaskCreate: "Phase advance" → activeForm: "Awaiting tasks approval + advancing phase"
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
> **Note:** Individual T001-T00N tasks are created as native tasks during the implementation phase (`phase-implement`). Here we only keep the 3 high-level tasks for this planning session.
|
|
100
|
-
|
|
101
93
|
---
|
|
102
94
|
|
|
103
|
-
###
|
|
95
|
+
### 2. Entry checkpoint — verify prerequisites
|
|
104
96
|
|
|
105
97
|
Before starting the breakdown:
|
|
106
98
|
|
|
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 1.5 (UI/UX). Creates design-system.md, mockups.md,
|
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.12.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH UI/UX Design - Phase 1.5
|
|
@@ -39,6 +39,11 @@ Conditional phase for features with front-end. Collects UI/UX requirements, gene
|
|
|
39
39
|
| Render UI templates | **Bash** `morph-spec template render docs/ui-mockups ...` | — |
|
|
40
40
|
| Generate design system from existing CSS | **Bash** `morph-spec generate design-system --scan` | — |
|
|
41
41
|
| Update state | **Bash** `morph-spec state mark-output ...` | — |
|
|
42
|
+
| Auto-detect dev server | **Glob** `next.config.*`, `vite.config.*`, `*.csproj` | **Read** `package.json` scripts |
|
|
43
|
+
| Capture existing app | **Playwright MCP** `browser_navigate()` + `browser_take_screenshot()` | — |
|
|
44
|
+
| Read Tailwind config | **Read** `tailwind.config.{js,ts}` | **Grep** `colors:` |
|
|
45
|
+
| Read MudBlazor theme | **Glob** `**/MudTheme*.cs` → **Read** | **Grep** `PaletteLight` |
|
|
46
|
+
| Trend research | **Read** `design-trends.md` standard | **Context7 MCP** / **WebSearch** |
|
|
42
47
|
|
|
43
48
|
**MCPs for this phase:** Playwright (preview, inspection, responsiveness), Context7 (component docs).
|
|
44
49
|
|
|
@@ -70,15 +75,123 @@ Check the `"phase"` field in the output:
|
|
|
70
75
|
|
|
71
76
|
---
|
|
72
77
|
|
|
78
|
+
### Step 0.2: Capture Existing App (Playwright)
|
|
79
|
+
|
|
80
|
+
> **Purpose:** Before analyzing tokens, capture visual screenshots of the existing app to understand current design patterns.
|
|
81
|
+
> **Skip if:** Greenfield project (no existing UI pages).
|
|
82
|
+
|
|
83
|
+
#### 0.2.1 — Auto-detect dev server
|
|
84
|
+
|
|
85
|
+
Check in priority order:
|
|
86
|
+
|
|
87
|
+
1. **`config.json`**: Read `.morph/config/config.json` → check for `project.devServerUrl` field → use if present
|
|
88
|
+
2. **`package.json` port flags**: Read `package.json` scripts → scan for `--port`, `-p` flags → extract port
|
|
89
|
+
3. **Next.js**: Glob `next.config.*` → try `http://localhost:3000`
|
|
90
|
+
4. **Vite**: Glob `vite.config.*` → try `http://localhost:5173`
|
|
91
|
+
5. **.NET launchSettings**: Glob `**/Properties/launchSettings.json` → Read → extract `applicationUrl`
|
|
92
|
+
6. **.NET fallback**: Glob `*.csproj` → try `https://localhost:5001`
|
|
93
|
+
|
|
94
|
+
Track: `detectedUrl` (string or null).
|
|
95
|
+
|
|
96
|
+
#### 0.2.2 — Attempt connection
|
|
97
|
+
|
|
98
|
+
If `detectedUrl` is not null:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
mcp__plugin_playwright_playwright__browser_navigate({ url: detectedUrl })
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- **Timeout:** 5 seconds
|
|
105
|
+
- **If connects:** proceed to 0.2.3
|
|
106
|
+
- **If fails (timeout/error):**
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"questions": [{
|
|
111
|
+
"header": "Dev Server",
|
|
112
|
+
"question": "Could not connect to dev server at {detectedUrl}. How to proceed?",
|
|
113
|
+
"multiSelect": false,
|
|
114
|
+
"options": [
|
|
115
|
+
{ "label": "Start server first", "description": "I'll start the dev server — wait for me" },
|
|
116
|
+
{ "label": "Use different URL", "description": "I'll provide the correct URL (Other)" },
|
|
117
|
+
{ "label": "Skip screenshots", "description": "Continue without existing app screenshots" }
|
|
118
|
+
]
|
|
119
|
+
}]
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
If `detectedUrl` is null (no indicators found):
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"questions": [{
|
|
128
|
+
"header": "Existing UI?",
|
|
129
|
+
"question": "Does this project have existing UI pages I should capture?",
|
|
130
|
+
"multiSelect": false,
|
|
131
|
+
"options": [
|
|
132
|
+
{ "label": "Yes, provide URL", "description": "I'll provide the URL in the field below (Other)" },
|
|
133
|
+
{ "label": "No, greenfield", "description": "Skip — this is a new project" }
|
|
134
|
+
]
|
|
135
|
+
}]
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### 0.2.3 — Screenshot main pages
|
|
140
|
+
|
|
141
|
+
Once connected, take screenshots of up to 5 pages:
|
|
142
|
+
|
|
143
|
+
1. **Current page** (usually home/root)
|
|
144
|
+
2. Navigate to common routes: `/dashboard`, `/admin`, `/settings`, or detect from sidebar links via `browser_snapshot()`
|
|
145
|
+
3. For each page:
|
|
146
|
+
```
|
|
147
|
+
mcp__plugin_playwright_playwright__browser_resize({ width: 1440, height: 900 })
|
|
148
|
+
mcp__plugin_playwright_playwright__browser_take_screenshot({})
|
|
149
|
+
```
|
|
150
|
+
4. Save screenshots to `.morph/features/$ARGUMENTS/2-ui/existing-*.png`
|
|
151
|
+
|
|
152
|
+
#### 0.2.4 — Visual analysis
|
|
153
|
+
|
|
154
|
+
Analyze the captured screenshots and write `.morph/features/$ARGUMENTS/2-ui/existing-ui-analysis.md`:
|
|
155
|
+
|
|
156
|
+
> **Note:** This is an intermediate artifact — NOT a tracked output in `output-schema.js`. It will not appear in `state mark-output`. Advisory warnings from `task-tracking-guard.js` are expected.
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# Existing UI Analysis — {Feature}
|
|
160
|
+
|
|
161
|
+
## Visual Summary
|
|
162
|
+
- **Color palette:** [dominant colors observed]
|
|
163
|
+
- **Typography:** [serif/sans/mono, approximate weights, scale]
|
|
164
|
+
- **Layout:** [sidebar/topbar/fullwidth, grid system, card patterns]
|
|
165
|
+
- **Sophistication level:** [basic/intermediate/advanced]
|
|
166
|
+
- **Dark/Light mode:** [which mode detected, or both]
|
|
167
|
+
|
|
168
|
+
## Design Tokens Detected Visually
|
|
169
|
+
- Primary color: [approx hex from screenshots]
|
|
170
|
+
- Background: [surface colors observed]
|
|
171
|
+
- Border style: [rounded/sharp, thickness]
|
|
172
|
+
- Shadow style: [flat/elevated/colored]
|
|
173
|
+
|
|
174
|
+
## Patterns Worth Preserving
|
|
175
|
+
- [List patterns that work well and should be maintained]
|
|
176
|
+
|
|
177
|
+
## Opportunities for Improvement
|
|
178
|
+
- [List areas where modern techniques could improve the UI]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
This analysis feeds into Step 0.5 (cross-check with extracted tokens) and Step 1.5 (domain-adaptive direction).
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
73
185
|
### Step 0.5: Check Design System
|
|
74
186
|
|
|
75
187
|
**This step is MANDATORY and must always run before Step 1.**
|
|
76
188
|
|
|
77
|
-
#### Step 0.5.1 — Scan frontend for
|
|
189
|
+
#### Step 0.5.1 — Scan frontend for design tokens (ALWAYS)
|
|
78
190
|
|
|
79
|
-
Search for existing
|
|
191
|
+
Search for existing design tokens across ALL supported stacks. Run these scans in parallel:
|
|
80
192
|
|
|
81
|
-
|
|
193
|
+
**A. CSS Custom Properties (all stacks):**
|
|
194
|
+
Glob these patterns (exclude `node_modules/`, `.next/`, `dist/`, `build/`, `obj/`, `bin/`):
|
|
82
195
|
```
|
|
83
196
|
wwwroot/**/*.css
|
|
84
197
|
wwwroot/**/*.scss
|
|
@@ -88,16 +201,43 @@ src/**/*.css
|
|
|
88
201
|
src/**/*.scss
|
|
89
202
|
src/**/*.module.css
|
|
90
203
|
public/**/*.css
|
|
204
|
+
app/**/*.css
|
|
91
205
|
```
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
206
|
+
For each file found, Grep for `:root {` blocks containing `--` custom properties.
|
|
207
|
+
|
|
208
|
+
**B. Tailwind Config (Next.js / Vite):**
|
|
209
|
+
Glob: `tailwind.config.{js,ts,mjs,cjs}`
|
|
210
|
+
If found, Read the file and extract:
|
|
211
|
+
- `theme.colors` / `theme.extend.colors` → map to color tokens
|
|
212
|
+
- `theme.fontFamily` → map to font tokens
|
|
213
|
+
- `theme.spacing` → map to spacing tokens
|
|
214
|
+
- `theme.borderRadius` → map to radius tokens
|
|
215
|
+
|
|
216
|
+
**C. shadcn/ui Config:**
|
|
217
|
+
Glob: `components.json`
|
|
218
|
+
If found and contains `"style"` field, also scan `src/lib/utils.ts` or `lib/utils.ts` for CSS var references.
|
|
219
|
+
|
|
220
|
+
**D. MudBlazor Theme (.NET):**
|
|
221
|
+
Glob: `**/MudTheme*.cs`, `**/*Theme*.cs`, `**/CustomTheme*.cs`
|
|
222
|
+
If found, Grep for `PaletteLight`, `PaletteDark`, `Typography` property assignments.
|
|
223
|
+
Extract: Primary, Secondary, Tertiary, Background, Surface colors + font families.
|
|
224
|
+
|
|
225
|
+
**E. Fluent UI Theme (.NET):**
|
|
226
|
+
Glob: `**/FluentDesignTheme*.cs`, `**/DesignTheme*.cs`
|
|
227
|
+
If found, Grep for `DesignThemePalette` properties.
|
|
228
|
+
|
|
229
|
+
**F. Global theme files:**
|
|
230
|
+
Glob: `**/theme.{ts,js}`, `**/tokens.{ts,js}`, `**/design-tokens.{ts,js}`
|
|
231
|
+
If found, Read and extract exported color/spacing/font objects.
|
|
232
|
+
|
|
233
|
+
Classify ALL found tokens into:
|
|
234
|
+
- **Colors**: `--color-*`, hex values, rgb(), Palette assignments
|
|
235
|
+
- **Fonts**: `--font-*`, `font-family:`, fontFamily config
|
|
236
|
+
- **Spacing**: `--space-*`, `--gap-*`, spacing config
|
|
237
|
+
- **Radius**: `--radius-*`, borderRadius config
|
|
238
|
+
- **Shadows**: `--shadow-*`, boxShadow config
|
|
239
|
+
|
|
240
|
+
Track: `tokensFound` (object by category), `tokenSources` (array of {file, stack, tokenCount}).
|
|
101
241
|
|
|
102
242
|
#### Step 0.5.2 — Check if design-system.md exists
|
|
103
243
|
|
|
@@ -113,7 +253,7 @@ Track: `dsExists` (bool).
|
|
|
113
253
|
|------|-----------|--------|
|
|
114
254
|
| **A** | `dsExists` AND `cssTokensFound` | Cross-check DS vs scanned tokens. If >2 colors diverge, flag misalignment and ask user if they want to update DS with `AskUserQuestion`. Proceed to Step 1. |
|
|
115
255
|
| **B** | `dsExists` AND NOT `cssTokensFound` | Print: `✓ Design system found (no CSS tokens to cross-check)`. Proceed to Step 1. |
|
|
116
|
-
| **C** | NOT `dsExists` AND
|
|
256
|
+
| **C** | NOT `dsExists` AND tokens found | Auto-generate `.morph/context/design-system.md` from ALL scanned token sources (CSS vars, Tailwind config, MudBlazor theme, etc.). Merge tokens from multiple sources, preferring Tailwind/Theme config over raw CSS. If Step 0.2 produced `existing-ui-analysis.md`, cross-reference visual analysis with extracted tokens. Proceed to Step 1. |
|
|
117
257
|
| **D** | NOT `dsExists` AND NOT `cssTokensFound` | Greenfield project. Ask user for aesthetic direction + brand color using `AskUserQuestion` (same options as morph-init). Scaffold from template. Proceed to Step 1. |
|
|
118
258
|
|
|
119
259
|
**Case C — auto-generate from scanned tokens:**
|
|
@@ -129,6 +269,14 @@ Print: `✓ Design system generated from [N] tokens — .morph/context/design-sy
|
|
|
129
269
|
|
|
130
270
|
> **Design system is mandatory** for UI features. The implementation gate (Phase 5) will block if no design system exists.
|
|
131
271
|
|
|
272
|
+
## MANDATORY: Session Tasks
|
|
273
|
+
|
|
274
|
+
> **BEFORE starting UI/UX work**, analyze the workflow below and create session tasks.
|
|
275
|
+
>
|
|
276
|
+
> **Rules:** Minimum 3 tasks, typically 5-7. Mark `in_progress` before starting, `completed` after.
|
|
277
|
+
>
|
|
278
|
+
> **Typical tasks:** design system check, user input collection, UI library selection, visual mockup, deliverable generation, accessibility validation, approval
|
|
279
|
+
|
|
132
280
|
### Step 1: Detect If Phase Is Needed
|
|
133
281
|
|
|
134
282
|
Check if active agents include `ui-designer`:
|
|
@@ -139,6 +287,60 @@ morph-spec state get $ARGUMENTS
|
|
|
139
287
|
|
|
140
288
|
If `ui-designer` is NOT in `activeAgents`, skip this phase and continue to Phase 2 (Design).
|
|
141
289
|
|
|
290
|
+
### Step 1.3: Trend Research
|
|
291
|
+
|
|
292
|
+
> **Purpose:** Before defining aesthetic direction, research current design trends relevant to this project's domain.
|
|
293
|
+
> **Ref:** `framework/standards/frontend/design-system/design-trends.md`
|
|
294
|
+
|
|
295
|
+
#### 1.3.1 — Consult curated catalog
|
|
296
|
+
|
|
297
|
+
Read `framework/standards/frontend/design-system/design-trends.md` and identify techniques relevant to the project.
|
|
298
|
+
|
|
299
|
+
#### 1.3.2 — Detect project domain
|
|
300
|
+
|
|
301
|
+
Scan `.morph/features/$ARGUMENTS/0-proposal/proposal.md` for domain keywords:
|
|
302
|
+
|
|
303
|
+
| Domain | Keywords |
|
|
304
|
+
|--------|----------|
|
|
305
|
+
| SaaS Dashboard | dashboard, analytics, metrics, monitoring, kpi, chart |
|
|
306
|
+
| E-commerce | e-commerce, store, product, cart, checkout, catalog |
|
|
307
|
+
| Landing Page | landing, marketing, site, hero, launch, waitlist |
|
|
308
|
+
| Internal Tool | admin, backoffice, internal, settings, management |
|
|
309
|
+
| Social/Community | social, feed, community, chat, post, notification |
|
|
310
|
+
|
|
311
|
+
Count keyword hits per domain. Use the domain with most hits. If zero hits across all domains, skip domain-specific filtering.
|
|
312
|
+
|
|
313
|
+
#### 1.3.3 — Research current trends (optional enhancement)
|
|
314
|
+
|
|
315
|
+
If Context7 MCP or WebSearch is available:
|
|
316
|
+
- Search: "{currentYear} UI design trends {detectedDomain}"
|
|
317
|
+
- Extract 2-3 additional techniques not in the curated catalog
|
|
318
|
+
- Evaluate if they are production-ready (browser support, performance)
|
|
319
|
+
|
|
320
|
+
#### 1.3.4 — Present recommendations
|
|
321
|
+
|
|
322
|
+
Use `AskUserQuestion` to present 3-4 recommended modern techniques:
|
|
323
|
+
|
|
324
|
+
```json
|
|
325
|
+
{
|
|
326
|
+
"questions": [{
|
|
327
|
+
"header": "Trends",
|
|
328
|
+
"question": "Based on your project domain ({detectedDomain}), these modern techniques are recommended. Which ones do you want to incorporate?",
|
|
329
|
+
"multiSelect": true,
|
|
330
|
+
"options": [
|
|
331
|
+
{ "label": "{Technique 1}", "description": "{Brief description + when to use}" },
|
|
332
|
+
{ "label": "{Technique 2}", "description": "{Brief description + when to use}" },
|
|
333
|
+
{ "label": "{Technique 3}", "description": "{Brief description + when to use}" },
|
|
334
|
+
{ "label": "None / custom", "description": "Skip trends or describe your own preference (Other)" }
|
|
335
|
+
]
|
|
336
|
+
}]
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Selected trends feed into Step 1.5 (Aesthetic Direction) and Step 4 (Deliverables).
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
142
344
|
### Step 1.5: Design Thinking — Aesthetic Direction
|
|
143
345
|
|
|
144
346
|
> **Ref:** `framework/standards/frontend/design-system/aesthetic-direction.md`
|
|
@@ -153,6 +355,46 @@ If `ui-designer` is NOT in `activeAgents`, skip this phase and continue to Phase
|
|
|
153
355
|
**CRITICAL:** Commit to direction BEFORE technical specs. Document in `ui-design-system.md`
|
|
154
356
|
in section `## Aesthetic Direction` (template available in the standard above).
|
|
155
357
|
|
|
358
|
+
#### Domain-Adaptive Patterns
|
|
359
|
+
|
|
360
|
+
After defining aesthetic direction, apply domain-specific pattern suggestions:
|
|
361
|
+
|
|
362
|
+
> **Ref:** `framework/standards/frontend/design-system/aesthetic-direction.md` → `## Domain Adaptation`
|
|
363
|
+
|
|
364
|
+
Based on the domain detected in Step 1.3.2, suggest patterns from the Domain Adaptation guide:
|
|
365
|
+
|
|
366
|
+
| Domain | Preferred Directions | Key Patterns to Suggest |
|
|
367
|
+
|--------|---------------------|------------------------|
|
|
368
|
+
| SaaS Dashboard | Industrial, Minimal Refined | Dense bento grid KPIs, skeleton loaders, sidebar glassmorphism, dark mode default |
|
|
369
|
+
| E-commerce | Modern Luxury, Soft Professional | Product card hover lift, CTA colored shadows, image-first layouts, scroll galleries |
|
|
370
|
+
| Landing Page | Editorial, Modern Luxury | Hero aurora gradient, scroll-driven narrative, fluid typography, overlapping layers |
|
|
371
|
+
| Internal Tool | Industrial, Minimal Refined | Compact forms, dense tables, status chips, monospace data displays |
|
|
372
|
+
| Social/Community | Soft Professional, Editorial | Card feed, notification badges, avatar systems, drawer navigation |
|
|
373
|
+
|
|
374
|
+
If the user's chosen direction conflicts with domain recommendations (e.g., Industrial for E-commerce), present an `AskUserQuestion` advisory:
|
|
375
|
+
|
|
376
|
+
```json
|
|
377
|
+
{
|
|
378
|
+
"questions": [{
|
|
379
|
+
"header": "Direction",
|
|
380
|
+
"question": "You chose {direction} for a {domain} project. The recommended directions are {recommended}. Keep your choice or adapt?",
|
|
381
|
+
"multiSelect": false,
|
|
382
|
+
"options": [
|
|
383
|
+
{ "label": "Keep {direction}", "description": "I have specific reasons for this choice" },
|
|
384
|
+
{ "label": "Switch to {recommended[0]}", "description": "{Brief rationale}" }
|
|
385
|
+
]
|
|
386
|
+
}]
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
#### Integration with Selected Trends
|
|
391
|
+
|
|
392
|
+
Incorporate the trends selected in Step 1.3.4 into the aesthetic direction documentation:
|
|
393
|
+
|
|
394
|
+
- Add selected trends to `## Aesthetic Direction` in `ui-design-system.md`
|
|
395
|
+
- Reference the specific implementation from `design-trends.md`
|
|
396
|
+
- Document how each trend maps to the chosen direction
|
|
397
|
+
|
|
156
398
|
**Anti-patterns to avoid:**
|
|
157
399
|
- Purple gradient on white background (AI cliche)
|
|
158
400
|
- Inter/Roboto as display font
|
|
@@ -4,7 +4,7 @@ description: Guided workflow for mid-implementation scope escalation — analyze
|
|
|
4
4
|
user-invocable: true
|
|
5
5
|
argument-hint: "[feature-name]"
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.12.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Scope Escalation Workflow
|
|
@@ -1359,6 +1359,37 @@
|
|
|
1359
1359
|
"*"
|
|
1360
1360
|
]
|
|
1361
1361
|
},
|
|
1362
|
+
{
|
|
1363
|
+
"id": "frontend-design-system-design-trends",
|
|
1364
|
+
"name": "design trends",
|
|
1365
|
+
"path": "frontend/design-system/design-trends.md",
|
|
1366
|
+
"category": "frontend",
|
|
1367
|
+
"subcategory": "design-system",
|
|
1368
|
+
"tags": [
|
|
1369
|
+
"frontend",
|
|
1370
|
+
"design-system",
|
|
1371
|
+
"trends",
|
|
1372
|
+
"modern"
|
|
1373
|
+
],
|
|
1374
|
+
"aliases": [
|
|
1375
|
+
"design trends",
|
|
1376
|
+
"modern design",
|
|
1377
|
+
"ui trends",
|
|
1378
|
+
"visual trends",
|
|
1379
|
+
"design patterns"
|
|
1380
|
+
],
|
|
1381
|
+
"anchors": {
|
|
1382
|
+
"layout": "#layout-patterns",
|
|
1383
|
+
"effects": "#visual-effects",
|
|
1384
|
+
"typography": "#typography-techniques",
|
|
1385
|
+
"animation": "#animation-patterns",
|
|
1386
|
+
"dark-mode": "#dark-mode-patterns-dark-first"
|
|
1387
|
+
},
|
|
1388
|
+
"digest": "Curated catalog of modern design techniques (2025-2026). Agents consult during UI/UX phase Step 1.3 before choosing aesthetic direction. Covers: Bento Grid, Glassmorphism, Aurora Gradients, Variable Fonts, Scroll-driven Animations, Dark-first design, domain-specific patterns.",
|
|
1389
|
+
"stacks": [
|
|
1390
|
+
"*"
|
|
1391
|
+
]
|
|
1392
|
+
},
|
|
1362
1393
|
{
|
|
1363
1394
|
"id": "frontend-nextjs-app-router",
|
|
1364
1395
|
"name": "app router",
|
|
@@ -43,13 +43,13 @@ na seção `## Aesthetic Direction` usando o template no final deste standard.
|
|
|
43
43
|
|
|
44
44
|
### Font Pairs por Direção
|
|
45
45
|
|
|
46
|
-
| Direction | Display | Body |
|
|
47
|
-
|
|
48
|
-
| Minimal Refined | Cormorant Garamond | DM Sans |
|
|
49
|
-
| Editorial | Playfair Display | Source Sans 3 |
|
|
50
|
-
| Soft Professional | Nunito | Inter |
|
|
51
|
-
| Industrial | JetBrains Mono | IBM Plex Sans |
|
|
52
|
-
| Modern Luxury | Bodoni Moda | Sora |
|
|
46
|
+
| Direction | Display | Body | Variable Alternative |
|
|
47
|
+
|-----------|---------|------|---------------------|
|
|
48
|
+
| Minimal Refined | Cormorant Garamond | DM Sans | Cormorant Variable + DM Sans Variable |
|
|
49
|
+
| Editorial | Playfair Display | Source Sans 3 | Playfair Display Variable + Source Sans 3 Variable |
|
|
50
|
+
| Soft Professional | Nunito | Inter | Nunito Variable + Inter Variable |
|
|
51
|
+
| Industrial | JetBrains Mono | IBM Plex Sans | JetBrains Mono Variable + IBM Plex Sans Variable |
|
|
52
|
+
| Modern Luxury | Bodoni Moda | Sora | Bodoni Moda Variable + Sora Variable |
|
|
53
53
|
|
|
54
54
|
### Anti-padrões
|
|
55
55
|
|
|
@@ -192,6 +192,59 @@ Técnicas por direção para criar profundidade e caráter:
|
|
|
192
192
|
|
|
193
193
|
---
|
|
194
194
|
|
|
195
|
+
## Modern Techniques by Direction
|
|
196
|
+
|
|
197
|
+
Cross-reference with `design-trends.md` catalog. For each aesthetic direction, these are the most effective modern techniques:
|
|
198
|
+
|
|
199
|
+
| Direction | Layout | Effects | Animation | Typography |
|
|
200
|
+
|-----------|--------|---------|-----------|------------|
|
|
201
|
+
| **Minimal Refined** | Asymmetric split, generous whitespace | Noise texture, subtle colored shadows | Entry stagger (slow), hover lift | Variable fonts (weight transitions on hover) |
|
|
202
|
+
| **Editorial** | Asymmetric layouts, overlapping layers | Dramatic type shadows, kinetic backgrounds | Scroll-driven reveals, word-by-word entry | Kinetic typography, fluid clamp() sizing |
|
|
203
|
+
| **Soft Professional** | Container query cards, balanced grid | Glassmorphism cards, aurora gradient backgrounds | Spring animations, gentle micro-interactions | Rounded sans variable, generous line-height |
|
|
204
|
+
| **Industrial** | Dense bento grid, hard grid lines | Minimal — border-only cards, no shadows | No animation or minimal loading states | Monospace variable, condensed headings |
|
|
205
|
+
| **Modern Luxury** | Overlapping layers, asymmetric hero | Gradient mesh backgrounds, perspective cards, colored shadows + lift | Parallax + hover lift, shine effect, gold/copper accents | Display italic variable, premium tracking |
|
|
206
|
+
|
|
207
|
+
### Technique Pairing Rules
|
|
208
|
+
|
|
209
|
+
1. **Max 3 visual effects per project** — more creates visual noise
|
|
210
|
+
2. **Aurora gradients + glassmorphism** = strong pairing (both use translucency)
|
|
211
|
+
3. **Noise texture + glassmorphism** = conflicting (noise reduces glass clarity)
|
|
212
|
+
4. **Bento grid + container queries** = ideal pairing (responsive cells)
|
|
213
|
+
5. **Scroll-driven + spring physics** = pair for dynamic feel, avoid for Industrial
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Domain Adaptation
|
|
218
|
+
|
|
219
|
+
Adaptar a direção estética ao domínio do projeto. A direção define o *feel*, o domínio define os *patterns*.
|
|
220
|
+
|
|
221
|
+
### SaaS Dashboard
|
|
222
|
+
- **Preferred directions:** Industrial, Minimal Refined
|
|
223
|
+
- **Key patterns:** Dense bento grid KPIs, skeleton loaders para data fetch, sidebar glassmorphism
|
|
224
|
+
- **Avoid:** Aurora gradients (distrai de dados), kinetic typography (conflita com data density)
|
|
225
|
+
|
|
226
|
+
### E-commerce / Product
|
|
227
|
+
- **Preferred directions:** Modern Luxury, Soft Professional
|
|
228
|
+
- **Key patterns:** Product card hover lift, CTA colored shadows, image-first asymmetric layouts
|
|
229
|
+
- **Avoid:** Industrial (cold for buying), monospace fonts (breaks trust)
|
|
230
|
+
|
|
231
|
+
### Landing / Marketing
|
|
232
|
+
- **Preferred directions:** Editorial, Modern Luxury
|
|
233
|
+
- **Key patterns:** Hero aurora gradient, scroll-driven narrative, fluid typography, overlapping layers
|
|
234
|
+
- **Avoid:** Dense layouts (landing needs breathing room), Industrial (too technical)
|
|
235
|
+
|
|
236
|
+
### Internal Tool / Admin
|
|
237
|
+
- **Preferred directions:** Industrial, Minimal Refined
|
|
238
|
+
- **Key patterns:** Compact forms, dense data tables, status chips, monospace data
|
|
239
|
+
- **Avoid:** Aurora gradients, parallax, any non-functional animation
|
|
240
|
+
|
|
241
|
+
### Social / Community
|
|
242
|
+
- **Preferred directions:** Soft Professional, Editorial
|
|
243
|
+
- **Key patterns:** Card feed layout, notification badges, avatar systems, drawer navigation
|
|
244
|
+
- **Avoid:** Modern Luxury (too formal), Industrial (too cold)
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
195
248
|
## Template de Documentação
|
|
196
249
|
|
|
197
250
|
Usar no `ui-design-system.md` de cada feature (seção `## Aesthetic Direction`):
|