ccgx-workflow 1.0.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.
Files changed (212) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +469 -0
  3. package/README.zh-CN.md +466 -0
  4. package/bin/ccg.mjs +2 -0
  5. package/dist/cli.d.mts +1 -0
  6. package/dist/cli.d.ts +1 -0
  7. package/dist/cli.mjs +173 -0
  8. package/dist/index.d.mts +1774 -0
  9. package/dist/index.d.ts +1774 -0
  10. package/dist/index.mjs +2029 -0
  11. package/dist/shared/ccgx-workflow.WgUzkiC3.mjs +5248 -0
  12. package/package.json +129 -0
  13. package/templates/commands/agents/assumptions-analyzer.md +129 -0
  14. package/templates/commands/agents/code-fixer.md +292 -0
  15. package/templates/commands/agents/codebase-mapper.md +152 -0
  16. package/templates/commands/agents/debug-session-manager.md +247 -0
  17. package/templates/commands/agents/debugger.md +111 -0
  18. package/templates/commands/agents/eval-auditor.md +171 -0
  19. package/templates/commands/agents/framework-selector.md +152 -0
  20. package/templates/commands/agents/get-current-datetime.md +29 -0
  21. package/templates/commands/agents/init-architect.md +114 -0
  22. package/templates/commands/agents/integration-checker.md +163 -0
  23. package/templates/commands/agents/interface-auditor.md +170 -0
  24. package/templates/commands/agents/nyquist-auditor.md +131 -0
  25. package/templates/commands/agents/pattern-mapper.md +111 -0
  26. package/templates/commands/agents/phase-runner.md +321 -0
  27. package/templates/commands/agents/plan-checker.md +255 -0
  28. package/templates/commands/agents/planner.md +320 -0
  29. package/templates/commands/agents/team-architect.md +186 -0
  30. package/templates/commands/agents/team-qa.md +121 -0
  31. package/templates/commands/agents/team-reviewer.md +157 -0
  32. package/templates/commands/agents/ui-ux-designer.md +573 -0
  33. package/templates/commands/agents/verifier.md +274 -0
  34. package/templates/commands/analyze.md +210 -0
  35. package/templates/commands/autonomous.md +792 -0
  36. package/templates/commands/cancel.md +132 -0
  37. package/templates/commands/clean-branches.md +117 -0
  38. package/templates/commands/codex-exec.md +404 -0
  39. package/templates/commands/commit.md +151 -0
  40. package/templates/commands/context.md +332 -0
  41. package/templates/commands/debate.md +165 -0
  42. package/templates/commands/debug.md +226 -0
  43. package/templates/commands/enhance.md +64 -0
  44. package/templates/commands/execute.md +380 -0
  45. package/templates/commands/init.md +123 -0
  46. package/templates/commands/optimize.md +217 -0
  47. package/templates/commands/plan.md +373 -0
  48. package/templates/commands/result.md +106 -0
  49. package/templates/commands/review.md +338 -0
  50. package/templates/commands/rollback.md +116 -0
  51. package/templates/commands/spec-impl.md +139 -0
  52. package/templates/commands/spec-init.md +101 -0
  53. package/templates/commands/spec-plan.md +210 -0
  54. package/templates/commands/spec-research.md +152 -0
  55. package/templates/commands/spec-review.md +120 -0
  56. package/templates/commands/status.md +206 -0
  57. package/templates/commands/team-exec.md +265 -0
  58. package/templates/commands/test.md +236 -0
  59. package/templates/commands/verify-work.md +338 -0
  60. package/templates/commands/verify.md +66 -0
  61. package/templates/commands/workflow.md +190 -0
  62. package/templates/commands/worktree.md +128 -0
  63. package/templates/hooks/ccg-context-monitor.js +159 -0
  64. package/templates/hooks/ccg-session-state.cjs +510 -0
  65. package/templates/hooks/ccg-statusline.js +142 -0
  66. package/templates/output-styles/abyss-command.md +56 -0
  67. package/templates/output-styles/abyss-concise.md +89 -0
  68. package/templates/output-styles/abyss-cultivator.md +302 -0
  69. package/templates/output-styles/abyss-ritual.md +70 -0
  70. package/templates/output-styles/engineer-professional.md +89 -0
  71. package/templates/output-styles/laowang-engineer.md +127 -0
  72. package/templates/output-styles/nekomata-engineer.md +120 -0
  73. package/templates/output-styles/ojousama-engineer.md +121 -0
  74. package/templates/prompts/claude/analyzer.md +59 -0
  75. package/templates/prompts/claude/architect.md +54 -0
  76. package/templates/prompts/claude/debugger.md +71 -0
  77. package/templates/prompts/claude/optimizer.md +73 -0
  78. package/templates/prompts/claude/reviewer.md +63 -0
  79. package/templates/prompts/claude/tester.md +69 -0
  80. package/templates/prompts/codex/analyzer.md +58 -0
  81. package/templates/prompts/codex/architect.md +54 -0
  82. package/templates/prompts/codex/debugger.md +74 -0
  83. package/templates/prompts/codex/optimizer.md +81 -0
  84. package/templates/prompts/codex/reviewer.md +73 -0
  85. package/templates/prompts/codex/tester.md +62 -0
  86. package/templates/prompts/gemini/analyzer.md +61 -0
  87. package/templates/prompts/gemini/architect.md +55 -0
  88. package/templates/prompts/gemini/debugger.md +78 -0
  89. package/templates/prompts/gemini/frontend.md +64 -0
  90. package/templates/prompts/gemini/optimizer.md +84 -0
  91. package/templates/prompts/gemini/reviewer.md +80 -0
  92. package/templates/prompts/gemini/tester.md +68 -0
  93. package/templates/rules/ccg-skill-routing.md +83 -0
  94. package/templates/rules/ccg-skills.md +71 -0
  95. package/templates/scripts/ccg-phase-runner-launcher.mjs +467 -0
  96. package/templates/scripts/invoke-model.mjs +949 -0
  97. package/templates/scripts/repatch-gemini-plugin.mjs +194 -0
  98. package/templates/skills/SKILL.md +92 -0
  99. package/templates/skills/domains/ai/SKILL.md +35 -0
  100. package/templates/skills/domains/ai/agent-dev.md +242 -0
  101. package/templates/skills/domains/ai/llm-security.md +288 -0
  102. package/templates/skills/domains/ai/prompt-and-eval.md +279 -0
  103. package/templates/skills/domains/ai/rag-system.md +542 -0
  104. package/templates/skills/domains/architecture/SKILL.md +43 -0
  105. package/templates/skills/domains/architecture/api-design.md +225 -0
  106. package/templates/skills/domains/architecture/caching.md +299 -0
  107. package/templates/skills/domains/architecture/cloud-native.md +285 -0
  108. package/templates/skills/domains/architecture/message-queue.md +329 -0
  109. package/templates/skills/domains/architecture/security-arch.md +297 -0
  110. package/templates/skills/domains/data-engineering/SKILL.md +208 -0
  111. package/templates/skills/domains/development/SKILL.md +47 -0
  112. package/templates/skills/domains/development/cpp.md +246 -0
  113. package/templates/skills/domains/development/go.md +323 -0
  114. package/templates/skills/domains/development/java.md +277 -0
  115. package/templates/skills/domains/development/python.md +288 -0
  116. package/templates/skills/domains/development/rust.md +313 -0
  117. package/templates/skills/domains/development/shell.md +313 -0
  118. package/templates/skills/domains/development/typescript.md +277 -0
  119. package/templates/skills/domains/devops/SKILL.md +40 -0
  120. package/templates/skills/domains/devops/cost-optimization.md +272 -0
  121. package/templates/skills/domains/devops/database.md +217 -0
  122. package/templates/skills/domains/devops/devsecops.md +198 -0
  123. package/templates/skills/domains/devops/git-workflow.md +181 -0
  124. package/templates/skills/domains/devops/observability.md +280 -0
  125. package/templates/skills/domains/devops/performance.md +336 -0
  126. package/templates/skills/domains/devops/testing.md +283 -0
  127. package/templates/skills/domains/frontend-design/SKILL.md +244 -0
  128. package/templates/skills/domains/frontend-design/agents/openai.yaml +4 -0
  129. package/templates/skills/domains/frontend-design/claymorphism/SKILL.md +121 -0
  130. package/templates/skills/domains/frontend-design/claymorphism/references/tokens.css +52 -0
  131. package/templates/skills/domains/frontend-design/component-patterns.md +202 -0
  132. package/templates/skills/domains/frontend-design/engineering.md +287 -0
  133. package/templates/skills/domains/frontend-design/glassmorphism/SKILL.md +142 -0
  134. package/templates/skills/domains/frontend-design/glassmorphism/references/tokens.css +32 -0
  135. package/templates/skills/domains/frontend-design/liquid-glass/SKILL.md +139 -0
  136. package/templates/skills/domains/frontend-design/liquid-glass/references/tokens.css +81 -0
  137. package/templates/skills/domains/frontend-design/neubrutalism/SKILL.md +145 -0
  138. package/templates/skills/domains/frontend-design/neubrutalism/references/tokens.css +44 -0
  139. package/templates/skills/domains/frontend-design/reference/color-and-contrast.md +132 -0
  140. package/templates/skills/domains/frontend-design/reference/interaction-design.md +195 -0
  141. package/templates/skills/domains/frontend-design/reference/motion-design.md +99 -0
  142. package/templates/skills/domains/frontend-design/reference/responsive-design.md +114 -0
  143. package/templates/skills/domains/frontend-design/reference/spatial-design.md +100 -0
  144. package/templates/skills/domains/frontend-design/reference/typography.md +133 -0
  145. package/templates/skills/domains/frontend-design/reference/ux-writing.md +107 -0
  146. package/templates/skills/domains/frontend-design/state-management.md +680 -0
  147. package/templates/skills/domains/frontend-design/ui-aesthetics.md +110 -0
  148. package/templates/skills/domains/frontend-design/ux-principles.md +156 -0
  149. package/templates/skills/domains/infrastructure/SKILL.md +201 -0
  150. package/templates/skills/domains/mobile/SKILL.md +225 -0
  151. package/templates/skills/domains/orchestration/SKILL.md +30 -0
  152. package/templates/skills/domains/orchestration/multi-agent.md +263 -0
  153. package/templates/skills/domains/security/SKILL.md +73 -0
  154. package/templates/skills/domains/security/blue-team.md +436 -0
  155. package/templates/skills/domains/security/code-audit.md +265 -0
  156. package/templates/skills/domains/security/pentest.md +226 -0
  157. package/templates/skills/domains/security/red-team.md +374 -0
  158. package/templates/skills/domains/security/threat-intel.md +372 -0
  159. package/templates/skills/domains/security/vuln-research.md +369 -0
  160. package/templates/skills/impeccable/adapt/SKILL.md +201 -0
  161. package/templates/skills/impeccable/animate/SKILL.md +176 -0
  162. package/templates/skills/impeccable/arrange/SKILL.md +126 -0
  163. package/templates/skills/impeccable/audit/SKILL.md +149 -0
  164. package/templates/skills/impeccable/bolder/SKILL.md +118 -0
  165. package/templates/skills/impeccable/clarify/SKILL.md +185 -0
  166. package/templates/skills/impeccable/colorize/SKILL.md +144 -0
  167. package/templates/skills/impeccable/critique/SKILL.md +203 -0
  168. package/templates/skills/impeccable/critique/reference/cognitive-load.md +106 -0
  169. package/templates/skills/impeccable/critique/reference/heuristics-scoring.md +234 -0
  170. package/templates/skills/impeccable/critique/reference/personas.md +178 -0
  171. package/templates/skills/impeccable/delight/SKILL.md +305 -0
  172. package/templates/skills/impeccable/distill/SKILL.md +123 -0
  173. package/templates/skills/impeccable/extract/SKILL.md +94 -0
  174. package/templates/skills/impeccable/harden/SKILL.md +357 -0
  175. package/templates/skills/impeccable/normalize/SKILL.md +72 -0
  176. package/templates/skills/impeccable/onboard/SKILL.md +248 -0
  177. package/templates/skills/impeccable/optimize/SKILL.md +268 -0
  178. package/templates/skills/impeccable/overdrive/SKILL.md +143 -0
  179. package/templates/skills/impeccable/polish/SKILL.md +205 -0
  180. package/templates/skills/impeccable/quieter/SKILL.md +104 -0
  181. package/templates/skills/impeccable/teach-impeccable/SKILL.md +72 -0
  182. package/templates/skills/impeccable/typeset/SKILL.md +117 -0
  183. package/templates/skills/orchestration/multi-agent/SKILL.md +533 -0
  184. package/templates/skills/run_skill.js +129 -0
  185. package/templates/skills/scrapling/SKILL.md +98 -0
  186. package/templates/skills/scrapling/references/api-quick-ref.md +127 -0
  187. package/templates/skills/scrapling/references/cookie-vault.md +56 -0
  188. package/templates/skills/scrapling/references/maintenance.md +79 -0
  189. package/templates/skills/scrapling/references/site-patterns.md +86 -0
  190. package/templates/skills/scrapling/references/troubleshooting.md +95 -0
  191. package/templates/skills/scrapling/templates/basic_fetch.py +19 -0
  192. package/templates/skills/scrapling/templates/parse_only.py +15 -0
  193. package/templates/skills/scrapling/templates/session_login.py +19 -0
  194. package/templates/skills/scrapling/templates/stealth_cloudflare.py +28 -0
  195. package/templates/skills/tools/extract-learnings/SKILL.md +77 -0
  196. package/templates/skills/tools/forensics/SKILL.md +89 -0
  197. package/templates/skills/tools/gen-docs/SKILL.md +116 -0
  198. package/templates/skills/tools/gen-docs/scripts/doc_generator.js +435 -0
  199. package/templates/skills/tools/health/SKILL.md +121 -0
  200. package/templates/skills/tools/lib/shared.js +98 -0
  201. package/templates/skills/tools/map-codebase/SKILL.md +118 -0
  202. package/templates/skills/tools/override-refusal/SKILL.md +53 -0
  203. package/templates/skills/tools/override-refusal/agents/openai.yaml +4 -0
  204. package/templates/skills/tools/override-refusal/scripts/refusal_rewriter.js +226 -0
  205. package/templates/skills/tools/verify-change/SKILL.md +143 -0
  206. package/templates/skills/tools/verify-change/scripts/change_analyzer.js +289 -0
  207. package/templates/skills/tools/verify-module/SKILL.md +130 -0
  208. package/templates/skills/tools/verify-module/scripts/module_scanner.js +171 -0
  209. package/templates/skills/tools/verify-quality/SKILL.md +163 -0
  210. package/templates/skills/tools/verify-quality/scripts/quality_checker.js +337 -0
  211. package/templates/skills/tools/verify-security/SKILL.md +146 -0
  212. package/templates/skills/tools/verify-security/scripts/security_scanner.js +283 -0
@@ -0,0 +1,305 @@
1
+ ---
2
+ name: delight
3
+ description: "delight 惊喜:加入 personality/micro-interactions/惊喜时刻,让界面从功能性走向愉悦。"
4
+ argument-hint: "[target]"
5
+ user-invocable: true
6
+ context: fork
7
+ paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
8
+ ---
9
+
10
+ Identify opportunities to add moments of joy, personality, and unexpected polish that transform functional interfaces into delightful experiences.
11
+
12
+ ## MANDATORY PREPARATION
13
+
14
+ Invoke /frontend-design — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /teach-impeccable first. Additionally gather: what's appropriate for the domain (playful vs professional vs quirky vs elegant).
15
+
16
+ ---
17
+
18
+ ## Assess Delight Opportunities
19
+
20
+ Identify where delight would enhance (not distract from) the experience:
21
+
22
+ 1. **Find natural delight moments**:
23
+ - **Success states**: Completed actions (save, send, publish)
24
+ - **Empty states**: First-time experiences, onboarding
25
+ - **Loading states**: Waiting periods that could be entertaining
26
+ - **Achievements**: Milestones, streaks, completions
27
+ - **Interactions**: Hover states, clicks, drags
28
+ - **Errors**: Softening frustrating moments
29
+ - **Easter eggs**: Hidden discoveries for curious users
30
+
31
+ 2. **Understand the context**:
32
+ - What's the brand personality? (Playful? Professional? Quirky? Elegant?)
33
+ - Who's the audience? (Tech-savvy? Creative? Corporate?)
34
+ - What's the emotional context? (Accomplishment? Exploration? Frustration?)
35
+ - What's appropriate? (Banking app ≠ gaming app)
36
+
37
+ 3. **Define delight strategy**:
38
+ - **Subtle sophistication**: Refined micro-interactions (luxury brands)
39
+ - **Playful personality**: Whimsical illustrations and copy (consumer apps)
40
+ - **Helpful surprises**: Anticipating needs before users ask (productivity tools)
41
+ - **Sensory richness**: Satisfying sounds, smooth animations (creative tools)
42
+
43
+ If any of these are unclear from the codebase, Ask the user using AskUserQuestion.
44
+
45
+ **CRITICAL**: Delight should enhance usability, never obscure it. If users notice the delight more than accomplishing their goal, you've gone too far.
46
+
47
+ ## Delight Principles
48
+
49
+ Follow these guidelines:
50
+
51
+ ### Delight Amplifies, Never Blocks
52
+ - Delight moments should be quick (< 1 second)
53
+ - Never delay core functionality for delight
54
+ - Make delight skippable or subtle
55
+ - Respect user's time and task focus
56
+
57
+ ### Surprise and Discovery
58
+ - Hide delightful details for users to discover
59
+ - Reward exploration and curiosity
60
+ - Don't announce every delight moment
61
+ - Let users share discoveries with others
62
+
63
+ ### Appropriate to Context
64
+ - Match delight to emotional moment (celebrate success, empathize with errors)
65
+ - Respect the user's state (don't be playful during critical errors)
66
+ - Match brand personality and audience expectations
67
+ - Cultural sensitivity (what's delightful varies by culture)
68
+
69
+ ### Compound Over Time
70
+ - Delight should remain fresh with repeated use
71
+ - Vary responses (not same animation every time)
72
+ - Reveal deeper layers with continued use
73
+ - Build anticipation through patterns
74
+
75
+ ## Delight Techniques
76
+
77
+ Add personality and joy through these methods:
78
+
79
+ ### Micro-interactions & Animation
80
+
81
+ **Button delight**:
82
+ ```css
83
+ /* Satisfying button press */
84
+ .button {
85
+ transition: transform 0.1s, box-shadow 0.1s;
86
+ }
87
+ .button:active {
88
+ transform: translateY(2px);
89
+ box-shadow: 0 2px 4px rgba(0,0,0,0.2);
90
+ }
91
+
92
+ /* Ripple effect on click */
93
+ /* Smooth lift on hover */
94
+ .button:hover {
95
+ transform: translateY(-2px);
96
+ transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1); /* ease-out-quart */
97
+ }
98
+ ```
99
+
100
+ **Loading delight**:
101
+ - Playful loading animations (not just spinners)
102
+ - Personality in loading messages (write product-specific ones, not generic AI filler)
103
+ - Progress indication with encouraging messages
104
+ - Skeleton screens with subtle animations
105
+
106
+ **Success animations**:
107
+ - Checkmark draw animation
108
+ - Confetti burst for major achievements
109
+ - Gentle scale + fade for confirmation
110
+ - Satisfying sound effects (subtle)
111
+
112
+ **Hover surprises**:
113
+ - Icons that animate on hover
114
+ - Color shifts or glow effects
115
+ - Tooltip reveals with personality
116
+ - Cursor changes (custom cursors for branded experiences)
117
+
118
+ ### Personality in Copy
119
+
120
+ **Playful error messages**:
121
+ ```
122
+ "Error 404"
123
+ "This page is playing hide and seek. (And winning)"
124
+
125
+ "Connection failed"
126
+ "Looks like the internet took a coffee break. Want to retry?"
127
+ ```
128
+
129
+ **Encouraging empty states**:
130
+ ```
131
+ "No projects"
132
+ "Your canvas awaits. Create something amazing."
133
+
134
+ "No messages"
135
+ "Inbox zero! You're crushing it today."
136
+ ```
137
+
138
+ **Playful labels & tooltips**:
139
+ ```
140
+ "Delete"
141
+ "Send to void" (for playful brand)
142
+
143
+ "Help"
144
+ "Rescue me" (tooltip)
145
+ ```
146
+
147
+ **IMPORTANT**: Match copy personality to brand. Banks shouldn't be wacky, but they can be warm.
148
+
149
+ ### Illustrations & Visual Personality
150
+
151
+ **Custom illustrations**:
152
+ - Empty state illustrations (not stock icons)
153
+ - Error state illustrations (friendly monsters, quirky characters)
154
+ - Loading state illustrations (animated characters)
155
+ - Success state illustrations (celebrations)
156
+
157
+ **Icon personality**:
158
+ - Custom icon set matching brand personality
159
+ - Animated icons (subtle motion on hover/click)
160
+ - Illustrative icons (more detailed than generic)
161
+ - Consistent style across all icons
162
+
163
+ **Background effects**:
164
+ - Subtle particle effects
165
+ - Gradient mesh backgrounds
166
+ - Geometric patterns
167
+ - Parallax depth
168
+ - Time-of-day themes (morning vs night)
169
+
170
+ ### Satisfying Interactions
171
+
172
+ **Drag and drop delight**:
173
+ - Lift effect on drag (shadow, scale)
174
+ - Snap animation when dropped
175
+ - Satisfying placement sound
176
+ - Undo toast ("Dropped in wrong place? [Undo]")
177
+
178
+ **Toggle switches**:
179
+ - Smooth slide with spring physics
180
+ - Color transition
181
+ - Haptic feedback on mobile
182
+ - Optional sound effect
183
+
184
+ **Progress & achievements**:
185
+ - Streak counters with celebratory milestones
186
+ - Progress bars that "celebrate" at 100%
187
+ - Badge unlocks with animation
188
+ - Playful stats ("You're on fire! 5 days in a row")
189
+
190
+ **Form interactions**:
191
+ - Input fields that animate on focus
192
+ - Checkboxes with a satisfying scale pulse when checked
193
+ - Success state that celebrates valid input
194
+ - Auto-grow textareas
195
+
196
+ ### Sound Design
197
+
198
+ **Subtle audio cues** (when appropriate):
199
+ - Notification sounds (distinctive but not annoying)
200
+ - Success sounds (satisfying "ding")
201
+ - Error sounds (empathetic, not harsh)
202
+ - Typing sounds for chat/messaging
203
+ - Ambient background audio (very subtle)
204
+
205
+ **IMPORTANT**:
206
+ - Respect system sound settings
207
+ - Provide mute option
208
+ - Keep volumes quiet (subtle cues, not alarms)
209
+ - Don't play on every interaction (sound fatigue is real)
210
+
211
+ ### Easter Eggs & Hidden Delights
212
+
213
+ **Discovery rewards**:
214
+ - Konami code unlocks special theme
215
+ - Hidden keyboard shortcuts (Cmd+K for special features)
216
+ - Hover reveals on logos or illustrations
217
+ - Alt text jokes on images (for screen reader users too!)
218
+ - Console messages for developers ("Like what you see? We're hiring!")
219
+
220
+ **Seasonal touches**:
221
+ - Holiday themes (subtle, tasteful)
222
+ - Seasonal color shifts
223
+ - Weather-based variations
224
+ - Time-based changes (dark at night, light during day)
225
+
226
+ **Contextual personality**:
227
+ - Different messages based on time of day
228
+ - Responses to specific user actions
229
+ - Randomized variations (not same every time)
230
+ - Progressive reveals with continued use
231
+
232
+ ### Loading & Waiting States
233
+
234
+ **Make waiting engaging**:
235
+ - Interesting loading messages that rotate
236
+ - Progress bars with personality
237
+ - Mini-games during long loads
238
+ - Fun facts or tips while waiting
239
+ - Countdown with encouraging messages
240
+
241
+ ```
242
+ Loading messages — write ones specific to your product, not generic AI filler:
243
+ - "Crunching your latest numbers..."
244
+ - "Syncing with your team's changes..."
245
+ - "Preparing your dashboard..."
246
+ - "Checking for updates since yesterday..."
247
+ ```
248
+
249
+ **WARNING**: Avoid cliched loading messages like "Herding pixels", "Teaching robots to dance", "Consulting the magic 8-ball", "Counting backwards from infinity". These are AI-slop copy — instantly recognizable as machine-generated. Write messages that are specific to what your product actually does.
250
+
251
+ ### Celebration Moments
252
+
253
+ **Success celebrations**:
254
+ - Confetti for major milestones
255
+ - Animated checkmarks for completions
256
+ - Progress bar celebrations at 100%
257
+ - "Achievement unlocked" style notifications
258
+ - Personalized messages ("You published your 10th article!")
259
+
260
+ **Milestone recognition**:
261
+ - First-time actions get special treatment
262
+ - Streak tracking and celebration
263
+ - Progress toward goals
264
+ - Anniversary celebrations
265
+
266
+ ## Implementation Patterns
267
+
268
+ **Animation libraries**:
269
+ - Framer Motion (React)
270
+ - GSAP (universal)
271
+ - Lottie (After Effects animations)
272
+ - Canvas confetti (party effects)
273
+
274
+ **Sound libraries**:
275
+ - Howler.js (audio management)
276
+ - Use-sound (React hook)
277
+
278
+ **Physics libraries**:
279
+ - React Spring (spring physics)
280
+ - Popmotion (animation primitives)
281
+
282
+ **IMPORTANT**: File size matters. Compress images, optimize animations, lazy load delight features.
283
+
284
+ **NEVER**:
285
+ - Delay core functionality for delight
286
+ - Force users through delightful moments (make skippable)
287
+ - Use delight to hide poor UX
288
+ - Overdo it (less is more)
289
+ - Ignore accessibility (animate responsibly, provide alternatives)
290
+ - Make every interaction delightful (special moments should be special)
291
+ - Sacrifice performance for delight
292
+ - Be inappropriate for context (read the room)
293
+
294
+ ## Verify Delight Quality
295
+
296
+ Test that delight actually delights:
297
+
298
+ - **User reactions**: Do users smile? Share screenshots?
299
+ - **Doesn't annoy**: Still pleasant after 100th time?
300
+ - **Doesn't block**: Can users opt out or skip?
301
+ - **Performant**: No jank, no slowdown
302
+ - **Appropriate**: Matches brand and context
303
+ - **Accessible**: Works with reduced motion, screen readers
304
+
305
+ Remember: Delight is the difference between a tool and an experience. Add personality, surprise users positively, and create moments worth sharing. But always respect usability - delight should enhance, never obstruct.
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: distill
3
+ description: "distill 提炼:删除多余复杂度,simplify/declutter/reduce noise,回归设计本质。"
4
+ argument-hint: "[target]"
5
+ user-invocable: true
6
+ context: fork
7
+ paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
8
+ ---
9
+
10
+ Remove unnecessary complexity from designs, revealing the essential elements and creating clarity through ruthless simplification.
11
+
12
+ ## MANDATORY PREPARATION
13
+
14
+ Invoke /frontend-design — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /teach-impeccable first.
15
+
16
+ ---
17
+
18
+ ## Assess Current State
19
+
20
+ Analyze what makes the design feel complex or cluttered:
21
+
22
+ 1. **Identify complexity sources**:
23
+ - **Too many elements**: Competing buttons, redundant information, visual clutter
24
+ - **Excessive variation**: Too many colors, fonts, sizes, styles without purpose
25
+ - **Information overload**: Everything visible at once, no progressive disclosure
26
+ - **Visual noise**: Unnecessary borders, shadows, backgrounds, decorations
27
+ - **Confusing hierarchy**: Unclear what matters most
28
+ - **Feature creep**: Too many options, actions, or paths forward
29
+
30
+ 2. **Find the essence**:
31
+ - What's the primary user goal? (There should be ONE)
32
+ - What's actually necessary vs nice-to-have?
33
+ - What can be removed, hidden, or combined?
34
+ - What's the 20% that delivers 80% of value?
35
+
36
+ If any of these are unclear from the codebase, Ask the user using AskUserQuestion.
37
+
38
+ **CRITICAL**: Simplicity is not about removing features - it's about removing obstacles between users and their goals. Every element should justify its existence.
39
+
40
+ ## Plan Simplification
41
+
42
+ Create a ruthless editing strategy:
43
+
44
+ - **Core purpose**: What's the ONE thing this should accomplish?
45
+ - **Essential elements**: What's truly necessary to achieve that purpose?
46
+ - **Progressive disclosure**: What can be hidden until needed?
47
+ - **Consolidation opportunities**: What can be combined or integrated?
48
+
49
+ **IMPORTANT**: Simplification is hard. It requires saying no to good ideas to make room for great execution. Be ruthless.
50
+
51
+ ## Simplify the Design
52
+
53
+ Systematically remove complexity across these dimensions:
54
+
55
+ ### Information Architecture
56
+ - **Reduce scope**: Remove secondary actions, optional features, redundant information
57
+ - **Progressive disclosure**: Hide complexity behind clear entry points (accordions, modals, step-through flows)
58
+ - **Combine related actions**: Merge similar buttons, consolidate forms, group related content
59
+ - **Clear hierarchy**: ONE primary action, few secondary actions, everything else tertiary or hidden
60
+ - **Remove redundancy**: If it's said elsewhere, don't repeat it here
61
+
62
+ ### Visual Simplification
63
+ - **Reduce color palette**: Use 1-2 colors plus neutrals, not 5-7 colors
64
+ - **Limit typography**: One font family, 3-4 sizes maximum, 2-3 weights
65
+ - **Remove decorations**: Eliminate borders, shadows, backgrounds that don't serve hierarchy or function
66
+ - **Flatten structure**: Reduce nesting, remove unnecessary containers—never nest cards inside cards
67
+ - **Remove unnecessary cards**: Cards aren't needed for basic layout; use spacing and alignment instead
68
+ - **Consistent spacing**: Use one spacing scale, remove arbitrary gaps
69
+
70
+ ### Layout Simplification
71
+ - **Linear flow**: Replace complex grids with simple vertical flow where possible
72
+ - **Remove sidebars**: Move secondary content inline or hide it
73
+ - **Full-width**: Use available space generously instead of complex multi-column layouts
74
+ - **Consistent alignment**: Pick left or center, stick with it
75
+ - **Generous white space**: Let content breathe, don't pack everything tight
76
+
77
+ ### Interaction Simplification
78
+ - **Reduce choices**: Fewer buttons, fewer options, clearer path forward (paradox of choice is real)
79
+ - **Smart defaults**: Make common choices automatic, only ask when necessary
80
+ - **Inline actions**: Replace modal flows with inline editing where possible
81
+ - **Remove steps**: Can signup be one step instead of three? Can checkout be simplified?
82
+ - **Clear CTAs**: ONE obvious next step, not five competing actions
83
+
84
+ ### Content Simplification
85
+ - **Shorter copy**: Cut every sentence in half, then do it again
86
+ - **Active voice**: "Save changes" not "Changes will be saved"
87
+ - **Remove jargon**: Plain language always wins
88
+ - **Scannable structure**: Short paragraphs, bullet points, clear headings
89
+ - **Essential information only**: Remove marketing fluff, legalese, hedging
90
+ - **Remove redundant copy**: No headers restating intros, no repeated explanations, say it once
91
+
92
+ ### Code Simplification
93
+ - **Remove unused code**: Dead CSS, unused components, orphaned files
94
+ - **Flatten component trees**: Reduce nesting depth
95
+ - **Consolidate styles**: Merge similar styles, use utilities consistently
96
+ - **Reduce variants**: Does that component need 12 variations, or can 3 cover 90% of cases?
97
+
98
+ **NEVER**:
99
+ - Remove necessary functionality (simplicity ≠ feature-less)
100
+ - Sacrifice accessibility for simplicity (clear labels and ARIA still required)
101
+ - Make things so simple they're unclear (mystery ≠ minimalism)
102
+ - Remove information users need to make decisions
103
+ - Eliminate hierarchy completely (some things should stand out)
104
+ - Oversimplify complex domains (match complexity to actual task complexity)
105
+
106
+ ## Verify Simplification
107
+
108
+ Ensure simplification improves usability:
109
+
110
+ - **Faster task completion**: Can users accomplish goals more quickly?
111
+ - **Reduced cognitive load**: Is it easier to understand what to do?
112
+ - **Still complete**: Are all necessary features still accessible?
113
+ - **Clearer hierarchy**: Is it obvious what matters most?
114
+ - **Better performance**: Does simpler design load faster?
115
+
116
+ ## Document Removed Complexity
117
+
118
+ If you removed features or options:
119
+ - Document why they were removed
120
+ - Consider if they need alternative access points
121
+ - Note any user feedback to monitor
122
+
123
+ Remember: You have great taste and judgment. Simplification is an act of confidence - knowing what to keep and courage to remove the rest. As Antoine de Saint-Exupéry said: "Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away."
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: extract
3
+ description: "extract 抽取:识别 reusable components/design tokens/patterns,整合进设计系统。"
4
+ argument-hint: "[target]"
5
+ user-invocable: true
6
+ context: fork
7
+ paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
8
+ ---
9
+
10
+ Identify reusable patterns, components, and design tokens, then extract and consolidate them into the design system for systematic reuse.
11
+
12
+ ## Discover
13
+
14
+ Analyze the target area to identify extraction opportunities:
15
+
16
+ 1. **Find the design system**: Locate your design system, component library, or shared UI directory (grep for "design system", "ui", "components", etc.). Understand its structure:
17
+ - Component organization and naming conventions
18
+ - Design token structure (if any)
19
+ - Documentation patterns
20
+ - Import/export conventions
21
+
22
+ **CRITICAL**: If no design system exists, ask before creating one. Understand the preferred location and structure first.
23
+
24
+ 2. **Identify patterns**: Look for:
25
+ - **Repeated components**: Similar UI patterns used multiple times (buttons, cards, inputs, etc.)
26
+ - **Hard-coded values**: Colors, spacing, typography, shadows that should be tokens
27
+ - **Inconsistent variations**: Multiple implementations of the same concept (3 different button styles)
28
+ - **Reusable patterns**: Layout patterns, composition patterns, interaction patterns worth systematizing
29
+
30
+ 3. **Assess value**: Not everything should be extracted. Consider:
31
+ - Is this used 3+ times, or likely to be reused?
32
+ - Would systematizing this improve consistency?
33
+ - Is this a general pattern or context-specific?
34
+ - What's the maintenance cost vs benefit?
35
+
36
+ ## Plan Extraction
37
+
38
+ Create a systematic extraction plan:
39
+
40
+ - **Components to extract**: Which UI elements become reusable components?
41
+ - **Tokens to create**: Which hard-coded values become design tokens?
42
+ - **Variants to support**: What variations does each component need?
43
+ - **Naming conventions**: Component names, token names, prop names that match existing patterns
44
+ - **Migration path**: How to refactor existing uses to consume the new shared versions
45
+
46
+ **IMPORTANT**: Design systems grow incrementally. Extract what's clearly reusable now, not everything that might someday be reusable.
47
+
48
+ ## Extract & Enrich
49
+
50
+ Build improved, reusable versions:
51
+
52
+ - **Components**: Create well-designed components with:
53
+ - Clear props API with sensible defaults
54
+ - Proper variants for different use cases
55
+ - Accessibility built in (ARIA, keyboard navigation, focus management)
56
+ - Documentation and usage examples
57
+
58
+ - **Design tokens**: Create tokens with:
59
+ - Clear naming (primitive vs semantic)
60
+ - Proper hierarchy and organization
61
+ - Documentation of when to use each token
62
+
63
+ - **Patterns**: Document patterns with:
64
+ - When to use this pattern
65
+ - Code examples
66
+ - Variations and combinations
67
+
68
+ **NEVER**:
69
+ - Extract one-off, context-specific implementations without generalization
70
+ - Create components so generic they're useless
71
+ - Extract without considering existing design system conventions
72
+ - Skip proper TypeScript types or prop documentation
73
+ - Create tokens for every single value (tokens should have semantic meaning)
74
+
75
+ ## Migrate
76
+
77
+ Replace existing uses with the new shared versions:
78
+
79
+ - **Find all instances**: Search for the patterns you've extracted
80
+ - **Replace systematically**: Update each use to consume the shared version
81
+ - **Test thoroughly**: Ensure visual and functional parity
82
+ - **Delete dead code**: Remove the old implementations
83
+
84
+ ## Document
85
+
86
+ Update design system documentation:
87
+
88
+ - Add new components to the component library
89
+ - Document token usage and values
90
+ - Add examples and guidelines
91
+ - Update any Storybook or component catalog
92
+
93
+ Remember: A good design system is a living system. Extract patterns as they emerge, enrich them thoughtfully, and maintain them consistently.
94
+