@votruongdanh/ai-agent-skills 3.3.2 → 3.3.4
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/.agents/.skills-version +1 -0
- package/{.kiro → .agents}/skills/agents/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/brainstorm/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/clean/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/create/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/debug/SKILL.md +12 -6
- package/{.kiro → .agents}/skills/deploy/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/enhance/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/explain/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/integrate/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/motion-ui/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/orchestrate/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/plan/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/preview/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/status/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/test/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/ui-ux-pro-max/SKILL.md +3 -0
- package/.kiro/.skills-version +1 -0
- package/README.md +13 -2
- package/bin/cli.js +3 -0
- package/lib/skill-bundle.js +8 -3
- package/package.json +3 -1
- package/scripts/sync-all.js +20 -0
- package/skills/_scripts/.ai-memory-template.md +55 -0
- package/skills/_scripts/checklist.md +35 -0
- package/skills/_scripts/memory-compact.md +142 -0
- package/skills/_scripts/memory-dedupe.md +26 -0
- package/skills/_scripts/pre-deploy.md +42 -0
- package/skills/_scripts/verify-all.md +28 -0
- package/skills/agents/SKILL.md +88 -0
- package/skills/agents/agents/backend-specialist.md +29 -0
- package/skills/agents/agents/database-architect.md +28 -0
- package/skills/agents/agents/debugger.md +29 -0
- package/skills/agents/agents/devops-engineer.md +30 -0
- package/skills/agents/agents/documentation-writer.md +29 -0
- package/skills/agents/agents/frontend-specialist.md +30 -0
- package/skills/agents/agents/orchestrator.md +36 -0
- package/skills/agents/agents/performance-optimizer.md +29 -0
- package/skills/agents/agents/project-planner.md +30 -0
- package/skills/agents/agents/security-auditor.md +30 -0
- package/skills/agents/agents/test-engineer.md +29 -0
- package/skills/brainstorm/SKILL.md +69 -0
- package/skills/clean/SKILL.md +93 -0
- package/skills/create/SKILL.md +66 -0
- package/skills/debug/SKILL.md +77 -0
- package/skills/deploy/SKILL.md +69 -0
- package/skills/enhance/SKILL.md +61 -0
- package/skills/explain/SKILL.md +72 -0
- package/skills/instructions.md +95 -0
- package/skills/integrate/SKILL.md +53 -0
- package/skills/motion-ui/SKILL.md +495 -0
- package/skills/orchestrate/SKILL.md +76 -0
- package/skills/plan/SKILL.md +72 -0
- package/skills/preview/SKILL.md +58 -0
- package/skills/status/SKILL.md +60 -0
- package/skills/test/SKILL.md +61 -0
- package/skills/ui-ux-pro-max/SKILL.md +68 -0
- /package/{.kiro → .agents}/skills/_scripts/.ai-memory-template.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/checklist.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/memory-compact.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/memory-dedupe.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/pre-deploy.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/verify-all.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/backend-specialist.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/database-architect.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/debugger.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/devops-engineer.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/documentation-writer.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/frontend-specialist.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/orchestrator.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/performance-optimizer.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/project-planner.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/security-auditor.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/test-engineer.md +0 -0
- /package/{.kiro → .agents}/skills/instructions.md +0 -0
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: motion-ui
|
|
3
|
+
description: "Advanced Motion UI (AMUI) — Create clean, modern UI with subtle Framer Motion micro-interactions, clear states (idle/loading/success/error), consistent styling via design tokens, and smooth animations. Use when the user wants motion-rich, polished UI with micro-interactions. Triggers: motion, animation, framer motion, micro-interaction, smooth ui, amui, chuyển động, hiệu ứng mượt."
|
|
4
|
+
agents: [frontend-specialist]
|
|
5
|
+
related-skills: [create, ui-ux-pro-max, enhance]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check design tokens, motion patterns, component library, animation conventions, and accessibility settings (prefers-reduced-motion).
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: motion patterns used, components created, animation decisions, and accessibility notes.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Create a clean, modern UI with subtle Framer Motion micro-interactions, clear states (idle/loading/success/error), and consistent styling via CSS variables/tokens. Motion should be purposeful, smooth, and enhance user experience without being distracting.
|
|
14
|
+
|
|
15
|
+
## Design Philosophy (AMUI Principles)
|
|
16
|
+
|
|
17
|
+
### 1. Clarity-First
|
|
18
|
+
- States are always clear: idle / hover / active / loading / success / error / disabled
|
|
19
|
+
- Visual feedback for every interaction
|
|
20
|
+
- No ambiguous UI states
|
|
21
|
+
|
|
22
|
+
### 2. Motion with Purpose
|
|
23
|
+
Animation is not decoration, but serves to:
|
|
24
|
+
- Guide user attention
|
|
25
|
+
- Show system response
|
|
26
|
+
- Reduce jarring/abrupt UI changes
|
|
27
|
+
- Provide feedback and context
|
|
28
|
+
|
|
29
|
+
### 3. Subtle Micro-Interactions
|
|
30
|
+
- Hover: scale 1.01–1.02
|
|
31
|
+
- Tap/Active: scale 0.97–0.98
|
|
32
|
+
- No excessive bounce or dramatic effects
|
|
33
|
+
- Keep it elegant and professional
|
|
34
|
+
|
|
35
|
+
### 4. Immediate Feedback
|
|
36
|
+
- Validation shows instantly
|
|
37
|
+
- Submit actions show loading state
|
|
38
|
+
- Success shows with green check animation
|
|
39
|
+
- Errors show with alert animation
|
|
40
|
+
|
|
41
|
+
### 5. Brand Ambient Layer (Optional)
|
|
42
|
+
- Gradient backgrounds with blur orbs
|
|
43
|
+
- Dot grid patterns
|
|
44
|
+
- Subtle noise textures
|
|
45
|
+
- Use sparingly for auth/landing/empty states
|
|
46
|
+
|
|
47
|
+
## Technical Stack
|
|
48
|
+
|
|
49
|
+
### Required
|
|
50
|
+
- **Framer Motion** (`motion`, `AnimatePresence`) for smooth transitions
|
|
51
|
+
- **CSS Variables** for design tokens (colors, spacing, timing)
|
|
52
|
+
- **Tailwind CSS** or global CSS for styling
|
|
53
|
+
|
|
54
|
+
### Recommended
|
|
55
|
+
- **Lucide Icons** for clean, consistent iconography
|
|
56
|
+
- **TypeScript** for type-safe components
|
|
57
|
+
|
|
58
|
+
## Design Tokens System
|
|
59
|
+
|
|
60
|
+
### Surface Colors
|
|
61
|
+
```css
|
|
62
|
+
--c-bg: /* main background */
|
|
63
|
+
--c-surface: /* card/panel background */
|
|
64
|
+
--c-surface-2: /* hover surface */
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Border Colors
|
|
68
|
+
```css
|
|
69
|
+
--c-border: /* default border */
|
|
70
|
+
--c-border-strong: /* focus/active border */
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Text Colors
|
|
74
|
+
```css
|
|
75
|
+
--c-text-1: /* primary text */
|
|
76
|
+
--c-text-2: /* secondary text */
|
|
77
|
+
--c-text-3: /* muted text */
|
|
78
|
+
--c-text-4: /* disabled text */
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Semantic Colors
|
|
82
|
+
```css
|
|
83
|
+
--c-success: /* success text/icon */
|
|
84
|
+
--c-success-bg: /* success background */
|
|
85
|
+
--c-success-bd: /* success border */
|
|
86
|
+
|
|
87
|
+
--c-danger: /* error text/icon */
|
|
88
|
+
--c-danger-bg: /* error background */
|
|
89
|
+
--c-danger-bd: /* error border */
|
|
90
|
+
|
|
91
|
+
--c-warning: /* warning text/icon */
|
|
92
|
+
--c-warning-bg: /* warning background */
|
|
93
|
+
--c-warning-bd: /* warning border */
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Motion Timing
|
|
97
|
+
```css
|
|
98
|
+
--t-fast: 120ms;
|
|
99
|
+
--t-med: 180ms;
|
|
100
|
+
--t-slow: 260ms;
|
|
101
|
+
--ease-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Motion Rules
|
|
105
|
+
|
|
106
|
+
### Durations & Easing
|
|
107
|
+
- **Small transitions** (hover, focus): 120–180ms
|
|
108
|
+
- **Enter/exit animations**: 180–240ms
|
|
109
|
+
- **Page/section transitions**: 240–320ms
|
|
110
|
+
- **Easing**: `easeOut` for enter, `easeIn` for exit
|
|
111
|
+
|
|
112
|
+
### Pattern 1: Fade + Slide (Standard Entry)
|
|
113
|
+
```jsx
|
|
114
|
+
// Enter animation
|
|
115
|
+
initial={{ opacity: 0, y: 8 }}
|
|
116
|
+
animate={{ opacity: 1, y: 0 }}
|
|
117
|
+
transition={{ duration: 0.24, ease: "easeOut" }}
|
|
118
|
+
|
|
119
|
+
// Exit animation
|
|
120
|
+
exit={{ opacity: 0, y: -10 }}
|
|
121
|
+
transition={{ duration: 0.18, ease: "easeIn" }}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Pattern 2: Layout Shift Prevention
|
|
125
|
+
- Use `AnimatePresence` for conditional rendering
|
|
126
|
+
- Use `layout` prop for smooth layout changes
|
|
127
|
+
- Animate height changes smoothly (0 → auto)
|
|
128
|
+
- Prevent layout jumps during loading states
|
|
129
|
+
|
|
130
|
+
### Pattern 3: Button Micro-Interactions
|
|
131
|
+
```jsx
|
|
132
|
+
<motion.button
|
|
133
|
+
whileHover={{ scale: loading ? 1 : 1.015 }}
|
|
134
|
+
whileTap={{ scale: loading ? 1 : 0.975 }}
|
|
135
|
+
transition={{ duration: 0.12 }}
|
|
136
|
+
>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Rules:**
|
|
140
|
+
- Disabled buttons: no scale, reduced opacity, cursor not-allowed
|
|
141
|
+
- Loading buttons: maintain width, show spinner, disable interactions
|
|
142
|
+
|
|
143
|
+
## State System
|
|
144
|
+
|
|
145
|
+
### Form States
|
|
146
|
+
1. **idle** — Initial state, ready for input
|
|
147
|
+
2. **editing** — User is interacting
|
|
148
|
+
3. **submitting** — Loading, processing request
|
|
149
|
+
4. **success** — Action completed successfully
|
|
150
|
+
5. **error** — Action failed, show error message
|
|
151
|
+
|
|
152
|
+
**Display Rules:**
|
|
153
|
+
- `submitting`: disable inputs + button, show spinner, text "Processing..."
|
|
154
|
+
- `error`: show alert with icon + message, animate expand/collapse
|
|
155
|
+
- `success`: show green check icon panel, animate scale-in, auto-redirect
|
|
156
|
+
|
|
157
|
+
### Input Validation States
|
|
158
|
+
1. **default** — No validation shown
|
|
159
|
+
2. **focus** — User is typing
|
|
160
|
+
3. **valid** — Input passes validation (optional green border/check)
|
|
161
|
+
4. **invalid** — Input fails validation (red border + error message)
|
|
162
|
+
|
|
163
|
+
**UX Rules:**
|
|
164
|
+
- Only show "invalid" after user interaction (touched) or submit attempt
|
|
165
|
+
- Show "valid" state subtly (optional)
|
|
166
|
+
- Error messages animate in/out smoothly
|
|
167
|
+
|
|
168
|
+
## Component Patterns
|
|
169
|
+
|
|
170
|
+
### 1. AMUI Button
|
|
171
|
+
**Required Features:**
|
|
172
|
+
- 3 sizes: sm / md / lg
|
|
173
|
+
- 5 states: default / hover / active / loading / disabled
|
|
174
|
+
- Optional: leftIcon / rightIcon
|
|
175
|
+
- Motion: whileHover scale 1.015, whileTap scale 0.975
|
|
176
|
+
|
|
177
|
+
**Loading Behavior:**
|
|
178
|
+
- Set `aria-busy="true"`
|
|
179
|
+
- Disable click events
|
|
180
|
+
- Show spinner + text
|
|
181
|
+
- Maintain button width (no layout jump)
|
|
182
|
+
|
|
183
|
+
### 2. AMUI Input
|
|
184
|
+
**Required Features:**
|
|
185
|
+
- Label + optional hint text
|
|
186
|
+
- Error message with animation
|
|
187
|
+
- Optional left/right icons
|
|
188
|
+
- Focus ring (subtle, using tokens)
|
|
189
|
+
- Validation states
|
|
190
|
+
|
|
191
|
+
**Animation:**
|
|
192
|
+
- Error message: expand/collapse with height + opacity
|
|
193
|
+
- Focus ring: fade in/out
|
|
194
|
+
|
|
195
|
+
### 3. AMUI Alert / Toast
|
|
196
|
+
**Variants:**
|
|
197
|
+
- **Success**: light green bg + green border + check icon
|
|
198
|
+
- **Error**: light red bg + red border + alert icon
|
|
199
|
+
- **Warning**: light yellow bg + yellow border + warning icon
|
|
200
|
+
- **Info**: light blue bg + blue border + info icon
|
|
201
|
+
|
|
202
|
+
**Animation:**
|
|
203
|
+
- Enter: opacity 0→1, y 8→0
|
|
204
|
+
- Exit: opacity 1→0, y 0→-10
|
|
205
|
+
- Use `AnimatePresence` for mount/unmount
|
|
206
|
+
|
|
207
|
+
### 4. AMUI Success Check View
|
|
208
|
+
**Pattern:**
|
|
209
|
+
When action succeeds, transition entire panel to:
|
|
210
|
+
- Large check icon in circle
|
|
211
|
+
- "Success" heading
|
|
212
|
+
- Optional subtext
|
|
213
|
+
- Scale-in animation (0.98 → 1) + fade-in
|
|
214
|
+
|
|
215
|
+
**Example Use Cases:**
|
|
216
|
+
- Login success
|
|
217
|
+
- Form submission success
|
|
218
|
+
- Payment confirmation
|
|
219
|
+
- Account creation
|
|
220
|
+
|
|
221
|
+
### 5. AMUI Card / Panel
|
|
222
|
+
**Features:**
|
|
223
|
+
- Subtle shadow
|
|
224
|
+
- Border using tokens
|
|
225
|
+
- Hover state (optional lift effect)
|
|
226
|
+
- Smooth transitions
|
|
227
|
+
|
|
228
|
+
### 6. AMUI Modal / Dialog
|
|
229
|
+
**Animation:**
|
|
230
|
+
- Backdrop: fade in/out
|
|
231
|
+
- Content: fade + scale (0.95 → 1)
|
|
232
|
+
- Use `AnimatePresence` for mount/unmount
|
|
233
|
+
|
|
234
|
+
## Ambient Background Layer
|
|
235
|
+
|
|
236
|
+
### When to Use
|
|
237
|
+
- Auth pages (login, register)
|
|
238
|
+
- Onboarding flows
|
|
239
|
+
- Empty states
|
|
240
|
+
- Dashboard landing pages
|
|
241
|
+
|
|
242
|
+
### When NOT to Use
|
|
243
|
+
- Dense data tables
|
|
244
|
+
- Forms with lots of inputs
|
|
245
|
+
- Content-heavy pages
|
|
246
|
+
|
|
247
|
+
### Implementation
|
|
248
|
+
```jsx
|
|
249
|
+
<div className="ambient-bg">
|
|
250
|
+
{/* Gradient base */}
|
|
251
|
+
<div className="gradient-layer" />
|
|
252
|
+
|
|
253
|
+
{/* Blur orbs */}
|
|
254
|
+
<motion.div
|
|
255
|
+
className="orb orb-1"
|
|
256
|
+
animate={{
|
|
257
|
+
scale: [1, 1.1, 1],
|
|
258
|
+
opacity: [0.3, 0.5, 0.3]
|
|
259
|
+
}}
|
|
260
|
+
transition={{
|
|
261
|
+
duration: 8,
|
|
262
|
+
repeat: Infinity,
|
|
263
|
+
ease: "easeInOut"
|
|
264
|
+
}}
|
|
265
|
+
/>
|
|
266
|
+
|
|
267
|
+
{/* Optional: dot grid */}
|
|
268
|
+
<div className="dot-grid" />
|
|
269
|
+
</div>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Rules:**
|
|
273
|
+
- Large blur radius (100px+)
|
|
274
|
+
- Low opacity (0.2–0.5)
|
|
275
|
+
- Slow animation (7–12s)
|
|
276
|
+
- `pointer-events: none`
|
|
277
|
+
- Don't cause eye strain
|
|
278
|
+
|
|
279
|
+
## Accessibility Requirements
|
|
280
|
+
|
|
281
|
+
### Motion
|
|
282
|
+
- Respect `prefers-reduced-motion` media query
|
|
283
|
+
- Disable/reduce animations when user prefers reduced motion
|
|
284
|
+
```css
|
|
285
|
+
@media (prefers-reduced-motion: reduce) {
|
|
286
|
+
* {
|
|
287
|
+
animation-duration: 0.01ms !important;
|
|
288
|
+
transition-duration: 0.01ms !important;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Buttons
|
|
294
|
+
- `aria-busy` when loading
|
|
295
|
+
- `disabled` attribute when disabled
|
|
296
|
+
- Clear focus-visible ring
|
|
297
|
+
- Keyboard accessible
|
|
298
|
+
|
|
299
|
+
### Alerts
|
|
300
|
+
- Use `role="alert"` for error/success messages
|
|
301
|
+
- Ensure screen readers announce state changes
|
|
302
|
+
|
|
303
|
+
### Color Contrast
|
|
304
|
+
- Text on backgrounds must meet WCAG AA (4.5:1 for normal text)
|
|
305
|
+
- Test gradients and ambient backgrounds for contrast
|
|
306
|
+
|
|
307
|
+
## Agent Routing
|
|
308
|
+
- Primary → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
|
|
309
|
+
- For accessibility → apply WCAG knowledge from frontend-specialist
|
|
310
|
+
- For performance → ensure animations don't cause jank
|
|
311
|
+
|
|
312
|
+
## Socratic Gate
|
|
313
|
+
Before implementing Motion UI, verify:
|
|
314
|
+
1. What component/page needs motion UI? (button, form, modal, page?)
|
|
315
|
+
2. What states need to be shown? (loading, success, error?)
|
|
316
|
+
3. Are there existing design tokens or should we create them?
|
|
317
|
+
4. Should we use ambient background layer?
|
|
318
|
+
If any answer is unclear, ASK before proceeding.
|
|
319
|
+
|
|
320
|
+
## Workflow
|
|
321
|
+
1. **Read Memory** — Load `.ai-memory.md` for design tokens and motion patterns.
|
|
322
|
+
2. Identify the component/page to implement.
|
|
323
|
+
3. Set up design tokens if not present (CSS variables).
|
|
324
|
+
4. Implement component with all required states.
|
|
325
|
+
5. Add Framer Motion animations following AMUI patterns.
|
|
326
|
+
6. Ensure accessibility (aria attributes, focus management, reduced motion).
|
|
327
|
+
7. Test all states: idle, hover, active, loading, success, error, disabled.
|
|
328
|
+
8. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md` for verification.
|
|
329
|
+
9. **Update Memory** — Save motion patterns and tokens to `.ai-memory.md`.
|
|
330
|
+
|
|
331
|
+
## Checklist
|
|
332
|
+
- [ ] Component/page identified
|
|
333
|
+
- [ ] Design tokens defined (colors, timing, easing)
|
|
334
|
+
- [ ] All states implemented (idle/hover/active/loading/success/error/disabled)
|
|
335
|
+
- [ ] Framer Motion animations added (fade, slide, scale)
|
|
336
|
+
- [ ] Micro-interactions on buttons (whileHover, whileTap)
|
|
337
|
+
- [ ] AnimatePresence for conditional UI
|
|
338
|
+
- [ ] Layout shift prevention (stable widths, smooth height changes)
|
|
339
|
+
- [ ] Accessibility: aria attributes, focus management
|
|
340
|
+
- [ ] prefers-reduced-motion support
|
|
341
|
+
- [ ] Color contrast verified (WCAG AA)
|
|
342
|
+
- [ ] Memory file updated
|
|
343
|
+
|
|
344
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
345
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
346
|
+
|
|
347
|
+
## Rules
|
|
348
|
+
- Motion should enhance, not distract.
|
|
349
|
+
- Keep animations subtle and purposeful.
|
|
350
|
+
- Always provide immediate visual feedback.
|
|
351
|
+
- Maintain layout stability (no jumps during loading).
|
|
352
|
+
- Respect user motion preferences.
|
|
353
|
+
- Use design tokens consistently.
|
|
354
|
+
- Test all interactive states.
|
|
355
|
+
- Always read and update the memory file.
|
|
356
|
+
|
|
357
|
+
## Quality Gate
|
|
358
|
+
After completing, read `.kiro/skills/_scripts/checklist.md` for cross-cutting quality checks.
|
|
359
|
+
|
|
360
|
+
## Related Skills
|
|
361
|
+
- `/create` → read `.kiro/skills/create/SKILL.md` — Create new motion UI components
|
|
362
|
+
- `/ui-ux-pro-max` → read `.kiro/skills/ui-ux-pro-max/SKILL.md` — Advanced UI/UX improvements
|
|
363
|
+
- `/enhance` → read `.kiro/skills/enhance/SKILL.md` — Improve existing components with motion
|
|
364
|
+
|
|
365
|
+
## Example: AMUI Button Component
|
|
366
|
+
|
|
367
|
+
```tsx
|
|
368
|
+
import { motion } from 'framer-motion';
|
|
369
|
+
import { Loader2 } from 'lucide-react';
|
|
370
|
+
|
|
371
|
+
interface AMUIButtonProps {
|
|
372
|
+
children: React.ReactNode;
|
|
373
|
+
variant?: 'primary' | 'secondary' | 'ghost';
|
|
374
|
+
size?: 'sm' | 'md' | 'lg';
|
|
375
|
+
loading?: boolean;
|
|
376
|
+
disabled?: boolean;
|
|
377
|
+
leftIcon?: React.ReactNode;
|
|
378
|
+
rightIcon?: React.ReactNode;
|
|
379
|
+
onClick?: () => void;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export function AMUIButton({
|
|
383
|
+
children,
|
|
384
|
+
variant = 'primary',
|
|
385
|
+
size = 'md',
|
|
386
|
+
loading = false,
|
|
387
|
+
disabled = false,
|
|
388
|
+
leftIcon,
|
|
389
|
+
rightIcon,
|
|
390
|
+
onClick,
|
|
391
|
+
}: AMUIButtonProps) {
|
|
392
|
+
const isDisabled = disabled || loading;
|
|
393
|
+
|
|
394
|
+
return (
|
|
395
|
+
<motion.button
|
|
396
|
+
className={`amui-btn amui-btn-${variant} amui-btn-${size}`}
|
|
397
|
+
onClick={onClick}
|
|
398
|
+
disabled={isDisabled}
|
|
399
|
+
aria-busy={loading}
|
|
400
|
+
whileHover={{ scale: isDisabled ? 1 : 1.015 }}
|
|
401
|
+
whileTap={{ scale: isDisabled ? 1 : 0.975 }}
|
|
402
|
+
transition={{ duration: 0.12 }}
|
|
403
|
+
>
|
|
404
|
+
{loading && <Loader2 className="amui-btn-spinner" />}
|
|
405
|
+
{!loading && leftIcon && <span className="amui-btn-icon-left">{leftIcon}</span>}
|
|
406
|
+
<span className="amui-btn-text">{children}</span>
|
|
407
|
+
{!loading && rightIcon && <span className="amui-btn-icon-right">{rightIcon}</span>}
|
|
408
|
+
</motion.button>
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## Example: AMUI Success View
|
|
414
|
+
|
|
415
|
+
```tsx
|
|
416
|
+
import { motion } from 'framer-motion';
|
|
417
|
+
import { CheckCircle } from 'lucide-react';
|
|
418
|
+
|
|
419
|
+
interface AMUISuccessViewProps {
|
|
420
|
+
title?: string;
|
|
421
|
+
message?: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export function AMUISuccessView({
|
|
425
|
+
title = 'Success!',
|
|
426
|
+
message
|
|
427
|
+
}: AMUISuccessViewProps) {
|
|
428
|
+
return (
|
|
429
|
+
<motion.div
|
|
430
|
+
className="amui-success-view"
|
|
431
|
+
initial={{ opacity: 0, scale: 0.98 }}
|
|
432
|
+
animate={{ opacity: 1, scale: 1 }}
|
|
433
|
+
transition={{ duration: 0.24, ease: 'easeOut' }}
|
|
434
|
+
>
|
|
435
|
+
<motion.div
|
|
436
|
+
className="amui-success-icon"
|
|
437
|
+
initial={{ scale: 0 }}
|
|
438
|
+
animate={{ scale: 1 }}
|
|
439
|
+
transition={{
|
|
440
|
+
duration: 0.3,
|
|
441
|
+
delay: 0.1,
|
|
442
|
+
type: 'spring',
|
|
443
|
+
stiffness: 200
|
|
444
|
+
}}
|
|
445
|
+
>
|
|
446
|
+
<CheckCircle size={48} />
|
|
447
|
+
</motion.div>
|
|
448
|
+
<h2 className="amui-success-title">{title}</h2>
|
|
449
|
+
{message && <p className="amui-success-message">{message}</p>}
|
|
450
|
+
</motion.div>
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
## Example: AMUI Alert with Animation
|
|
456
|
+
|
|
457
|
+
```tsx
|
|
458
|
+
import { motion, AnimatePresence } from 'framer-motion';
|
|
459
|
+
import { AlertCircle, CheckCircle, Info, AlertTriangle } from 'lucide-react';
|
|
460
|
+
|
|
461
|
+
interface AMUIAlertProps {
|
|
462
|
+
type: 'success' | 'error' | 'warning' | 'info';
|
|
463
|
+
message: string;
|
|
464
|
+
visible: boolean;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
const icons = {
|
|
468
|
+
success: CheckCircle,
|
|
469
|
+
error: AlertCircle,
|
|
470
|
+
warning: AlertTriangle,
|
|
471
|
+
info: Info,
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
export function AMUIAlert({ type, message, visible }: AMUIAlertProps) {
|
|
475
|
+
const Icon = icons[type];
|
|
476
|
+
|
|
477
|
+
return (
|
|
478
|
+
<AnimatePresence>
|
|
479
|
+
{visible && (
|
|
480
|
+
<motion.div
|
|
481
|
+
className={`amui-alert amui-alert-${type}`}
|
|
482
|
+
role="alert"
|
|
483
|
+
initial={{ opacity: 0, height: 0, y: -10 }}
|
|
484
|
+
animate={{ opacity: 1, height: 'auto', y: 0 }}
|
|
485
|
+
exit={{ opacity: 0, height: 0, y: -10 }}
|
|
486
|
+
transition={{ duration: 0.2 }}
|
|
487
|
+
>
|
|
488
|
+
<Icon className="amui-alert-icon" size={20} />
|
|
489
|
+
<span className="amui-alert-message">{message}</span>
|
|
490
|
+
</motion.div>
|
|
491
|
+
)}
|
|
492
|
+
</AnimatePresence>
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrate
|
|
3
|
+
description: "Coordinate multi-step plans across multiple roles, files, systems, or parallel workstreams. Use when the user has a complex request spanning multiple domains or needing decomposition. Triggers: orchestrate, coordinate, multi-step, full-stack, tổng hợp, làm nhiều bước."
|
|
4
|
+
agents: [orchestrator, project-planner]
|
|
5
|
+
related-skills: [plan, create, deploy, test]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check project architecture, team structure, past orchestration plans, ongoing tasks, and blockers.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: workstreams, assignments, dependencies, execution order, and blockers/risks.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Break a complex request into a coordinated execution plan with clear agent assignments.
|
|
14
|
+
|
|
15
|
+
## Agent Routing
|
|
16
|
+
- Primary coordinator → read `.kiro/skills/agents/agents/orchestrator.md` and apply its knowledge
|
|
17
|
+
- For planning phases → read `.kiro/skills/agents/agents/project-planner.md` and apply its knowledge
|
|
18
|
+
- For each workstream, read the most relevant agent file:
|
|
19
|
+
- Frontend tasks → read `.kiro/skills/agents/agents/frontend-specialist.md`
|
|
20
|
+
- Backend tasks → read `.kiro/skills/agents/agents/backend-specialist.md`
|
|
21
|
+
- Database tasks → read `.kiro/skills/agents/agents/database-architect.md`
|
|
22
|
+
- Testing → read `.kiro/skills/agents/agents/test-engineer.md`
|
|
23
|
+
- Security review → read `.kiro/skills/agents/agents/security-auditor.md`
|
|
24
|
+
- Deployment → read `.kiro/skills/agents/agents/devops-engineer.md`
|
|
25
|
+
|
|
26
|
+
## Socratic Gate
|
|
27
|
+
Before orchestrating, verify:
|
|
28
|
+
1. What is the full objective? (end-to-end scope)
|
|
29
|
+
2. How many domains are involved? (frontend, backend, DB, infra?)
|
|
30
|
+
3. Are there hard dependencies or deadlines?
|
|
31
|
+
If any answer is unclear, ASK before proceeding.
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
1. **Read Memory** — Load `.ai-memory.md` for project context and history.
|
|
35
|
+
2. Decompose the objective into workstreams.
|
|
36
|
+
3. Assign each workstream to the appropriate agent/role.
|
|
37
|
+
4. Identify dependencies, blockers, and the critical path.
|
|
38
|
+
5. Define parallelizable tasks and merge points.
|
|
39
|
+
6. Produce an execution order with clear handoffs.
|
|
40
|
+
7. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md` and verify each workstream output before merge.
|
|
41
|
+
8. **Update Memory** — Save orchestration plan to `.ai-memory.md`.
|
|
42
|
+
|
|
43
|
+
## Output format
|
|
44
|
+
- Objective
|
|
45
|
+
- Workstreams (with assigned agents)
|
|
46
|
+
- Dependencies and critical path
|
|
47
|
+
- Execution order (sequential + parallel)
|
|
48
|
+
- Risks and mitigations
|
|
49
|
+
- Done criteria for each workstream
|
|
50
|
+
|
|
51
|
+
## Checklist
|
|
52
|
+
- [ ] Objective clearly defined
|
|
53
|
+
- [ ] Workstreams decomposed
|
|
54
|
+
- [ ] Agents assigned to each workstream
|
|
55
|
+
- [ ] Dependencies mapped
|
|
56
|
+
- [ ] Critical path identified
|
|
57
|
+
- [ ] Parallel tasks defined
|
|
58
|
+
- [ ] Handoff points clear
|
|
59
|
+
- [ ] Done criteria set
|
|
60
|
+
- [ ] Memory file updated
|
|
61
|
+
|
|
62
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
63
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
64
|
+
|
|
65
|
+
## Rules
|
|
66
|
+
- Keep plans realistic for the current project.
|
|
67
|
+
- Surface unknowns early.
|
|
68
|
+
- Favor visible checkpoints over long hidden work.
|
|
69
|
+
- Control scope: each workstream must state minimal files to touch; ASK before allowing wide-impact changes.
|
|
70
|
+
- Always read and update the memory file.
|
|
71
|
+
|
|
72
|
+
## Related Skills
|
|
73
|
+
- `/plan` → read `.kiro/skills/plan/SKILL.md` — Detailed planning for individual workstreams
|
|
74
|
+
- `/create` → read `.kiro/skills/create/SKILL.md` — Execute creation tasks
|
|
75
|
+
- `/deploy` → read `.kiro/skills/deploy/SKILL.md` — Deploy completed work
|
|
76
|
+
- `/test` → read `.kiro/skills/test/SKILL.md` — Validate each workstream
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan
|
|
3
|
+
description: "Create concrete implementation plans with milestones, task breakdowns, and estimates. Use when the user wants to plan, organize work, or create a roadmap. Triggers: plan, milestone, breakdown, roadmap, estimate, kế hoạch, lên kế hoạch, phân chia công việc."
|
|
4
|
+
agents: [project-planner, orchestrator]
|
|
5
|
+
related-skills: [brainstorm, create, orchestrate]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check existing plans, milestones, project structure, tech stack, ongoing work, and past decisions.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: plan summary, phases/tasks, key risks, and first recommended action.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Turn a request into an actionable plan with clear phases and tasks.
|
|
14
|
+
|
|
15
|
+
## Agent Routing
|
|
16
|
+
- For architecture planning → read `.kiro/skills/agents/agents/project-planner.md` and apply its knowledge
|
|
17
|
+
- For multi-domain coordination → read `.kiro/skills/agents/agents/orchestrator.md` and apply its knowledge
|
|
18
|
+
- For technical feasibility → read the relevant specialist agent file:
|
|
19
|
+
- Backend: `.kiro/skills/agents/agents/backend-specialist.md`
|
|
20
|
+
- Frontend: `.kiro/skills/agents/agents/frontend-specialist.md`
|
|
21
|
+
- Database: `.kiro/skills/agents/agents/database-architect.md`
|
|
22
|
+
|
|
23
|
+
## Socratic Gate
|
|
24
|
+
Before planning, verify:
|
|
25
|
+
1. What is the desired outcome? (specific deliverable)
|
|
26
|
+
2. What constraints exist? (time, resources, tech stack)
|
|
27
|
+
3. What is already built vs needs to be built?
|
|
28
|
+
If any answer is unclear, ASK before proceeding.
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
1. **Read Memory** — Load `.ai-memory.md` for project context and history.
|
|
32
|
+
2. Define the objective and acceptance criteria.
|
|
33
|
+
3. Break the work into phases and tasks.
|
|
34
|
+
4. Note file areas, systems, or modules likely to change.
|
|
35
|
+
5. Estimate complexity and highlight risky items.
|
|
36
|
+
6. End with a recommended first task.
|
|
37
|
+
7. **Update Memory** — Save plan details to `.ai-memory.md`.
|
|
38
|
+
|
|
39
|
+
## Output format
|
|
40
|
+
- Objective
|
|
41
|
+
- Acceptance criteria
|
|
42
|
+
- Phases (with tasks under each)
|
|
43
|
+
- File areas / modules affected
|
|
44
|
+
- Risks (with mitigation)
|
|
45
|
+
- Recommended first action
|
|
46
|
+
|
|
47
|
+
## Checklist
|
|
48
|
+
- [ ] Objective clearly stated
|
|
49
|
+
- [ ] Acceptance criteria defined
|
|
50
|
+
- [ ] Phases broken down
|
|
51
|
+
- [ ] Tasks are specific and actionable
|
|
52
|
+
- [ ] Complexity estimated per task
|
|
53
|
+
- [ ] Risks identified with mitigation
|
|
54
|
+
- [ ] First action recommended
|
|
55
|
+
- [ ] Memory file updated
|
|
56
|
+
|
|
57
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
58
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
59
|
+
|
|
60
|
+
## Rules
|
|
61
|
+
- Plans should be specific enough to execute.
|
|
62
|
+
- Prefer task sizes that can be completed and reviewed quickly.
|
|
63
|
+
- Minimize blast radius: call out the smallest set of files likely to change; if scope is unclear, ASK.
|
|
64
|
+
- Always read and update the memory file.
|
|
65
|
+
|
|
66
|
+
## Quality Gate
|
|
67
|
+
After completing, read `.kiro/skills/_scripts/checklist.md` for cross-cutting quality checks.
|
|
68
|
+
|
|
69
|
+
## Related Skills
|
|
70
|
+
- `/brainstorm` → read `.kiro/skills/brainstorm/SKILL.md` — Explore options before planning
|
|
71
|
+
- `/create` → read `.kiro/skills/create/SKILL.md` — Execute planned tasks
|
|
72
|
+
- `/orchestrate` → read `.kiro/skills/orchestrate/SKILL.md` — Coordinate complex plans across teams
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: preview
|
|
3
|
+
description: "Preview expected output, UX flows, copy, interaction design, or generated content before implementing. Use when the user wants to see what something will look like. Triggers: preview, mockup, show me, xem trước, thử xem, mô phỏng."
|
|
4
|
+
agents: [frontend-specialist, documentation-writer]
|
|
5
|
+
related-skills: [create, ui-ux-pro-max, plan]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check UI patterns, design decisions, existing previews, brand guidelines, and user flow notes.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was previewed, assumptions, feedback, and confirmed decisions.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Show the user what the result will look or feel like before full implementation.
|
|
14
|
+
|
|
15
|
+
## Agent Routing
|
|
16
|
+
- If previewing UI/UX → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
|
|
17
|
+
- If previewing documentation → read `.kiro/skills/agents/agents/documentation-writer.md` and apply its knowledge
|
|
18
|
+
- If previewing API response → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge
|
|
19
|
+
|
|
20
|
+
## Socratic Gate
|
|
21
|
+
Before previewing, verify:
|
|
22
|
+
1. What artifact is being previewed? (UI, API output, document, flow?)
|
|
23
|
+
2. What level of fidelity is expected? (wireframe, mockup, full sample?)
|
|
24
|
+
3. Any specific requirements or constraints?
|
|
25
|
+
If any answer is unclear, ASK before proceeding.
|
|
26
|
+
|
|
27
|
+
## Workflow
|
|
28
|
+
1. **Read Memory** — Load `.ai-memory.md` for project context and design history.
|
|
29
|
+
2. Infer the artifact being previewed: UI, API output, document, message, workflow, or report.
|
|
30
|
+
3. Produce a faithful mock, sample output, walkthrough, or structured preview.
|
|
31
|
+
4. Highlight assumptions behind the preview.
|
|
32
|
+
5. Identify what could change during implementation.
|
|
33
|
+
6. **Update Memory** — Save preview details and decisions to `.ai-memory.md`.
|
|
34
|
+
|
|
35
|
+
## Checklist
|
|
36
|
+
- [ ] Artifact type identified
|
|
37
|
+
- [ ] Preview is realistic and faithful
|
|
38
|
+
- [ ] Assumptions clearly labeled
|
|
39
|
+
- [ ] Mock data marked as illustrative
|
|
40
|
+
- [ ] Implementation differences noted
|
|
41
|
+
- [ ] Memory file updated
|
|
42
|
+
|
|
43
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
44
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
- Keep previews realistic and consistent with the current project.
|
|
48
|
+
- Label illustrative content clearly when it is mock data.
|
|
49
|
+
- Avoid implying broad code changes; if the preview would require major refactor, CALL IT OUT and ASK before implementation.
|
|
50
|
+
- Always read and update the memory file.
|
|
51
|
+
|
|
52
|
+
## Quality Gate
|
|
53
|
+
After completing, read `.kiro/skills/_scripts/checklist.md` for cross-cutting quality checks.
|
|
54
|
+
|
|
55
|
+
## Related Skills
|
|
56
|
+
- `/create` → read `.kiro/skills/create/SKILL.md` — Implement the previewed design
|
|
57
|
+
- `/ui-ux-pro-max` → read `.kiro/skills/ui-ux-pro-max/SKILL.md` — Advanced UI/UX design
|
|
58
|
+
- `/plan` → read `.kiro/skills/plan/SKILL.md` — Plan implementation of previewed feature
|