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,176 @@
1
+ ---
2
+ name: animate
3
+ description: "animate 动效:为功能添加有目的的 animation/transitions/micro-interactions/motion 效果。"
4
+ argument-hint: "[target]"
5
+ user-invocable: true
6
+ context: fork
7
+ paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
8
+ ---
9
+
10
+ Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight.
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: performance constraints.
15
+
16
+ ---
17
+
18
+ ## Assess Animation Opportunities
19
+
20
+ Analyze where motion would improve the experience:
21
+
22
+ 1. **Identify static areas**:
23
+ - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.)
24
+ - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes)
25
+ - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious
26
+ - **Lack of delight**: Functional but joyless interactions
27
+ - **Missed guidance**: Opportunities to direct attention or explain behavior
28
+
29
+ 2. **Understand the context**:
30
+ - What's the personality? (Playful vs serious, energetic vs calm)
31
+ - What's the performance budget? (Mobile-first? Complex page?)
32
+ - Who's the audience? (Motion-sensitive users? Power users who want speed?)
33
+ - What matters most? (One hero animation vs many micro-interactions?)
34
+
35
+ If any of these are unclear from the codebase, Ask the user using AskUserQuestion.
36
+
37
+ **CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
38
+
39
+ ## Plan Animation Strategy
40
+
41
+ Create a purposeful animation plan:
42
+
43
+ - **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?)
44
+ - **Feedback layer**: Which interactions need acknowledgment?
45
+ - **Transition layer**: Which state changes need smoothing?
46
+ - **Delight layer**: Where can we surprise and delight?
47
+
48
+ **IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments.
49
+
50
+ ## Implement Animations
51
+
52
+ Add motion systematically across these categories:
53
+
54
+ ### Entrance Animations
55
+ - **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations
56
+ - **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
57
+ - **Content reveals**: Scroll-triggered animations using intersection observer
58
+ - **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management
59
+
60
+ ### Micro-interactions
61
+ - **Button feedback**:
62
+ - Hover: Subtle scale (1.02-1.05), color shift, shadow increase
63
+ - Click: Quick scale down then up (0.95 → 1), ripple effect
64
+ - Loading: Spinner or pulse state
65
+ - **Form interactions**:
66
+ - Input focus: Border color transition, slight scale or glow
67
+ - Validation: Shake on error, check mark on success, smooth color transitions
68
+ - **Toggle switches**: Smooth slide + color transition (200-300ms)
69
+ - **Checkboxes/radio**: Check mark animation, ripple effect
70
+ - **Like/favorite**: Scale + rotation, particle effects, color transition
71
+
72
+ ### State Transitions
73
+ - **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms)
74
+ - **Expand/collapse**: Height transition with overflow handling, icon rotation
75
+ - **Loading states**: Skeleton screen fades, spinner animations, progress bars
76
+ - **Success/error**: Color transitions, icon animations, gentle scale pulse
77
+ - **Enable/disable**: Opacity transitions, cursor changes
78
+
79
+ ### Navigation & Flow
80
+ - **Page transitions**: Crossfade between routes, shared element transitions
81
+ - **Tab switching**: Slide indicator, content fade/slide
82
+ - **Carousel/slider**: Smooth transforms, snap points, momentum
83
+ - **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators
84
+
85
+ ### Feedback & Guidance
86
+ - **Hover hints**: Tooltip fade-ins, cursor changes, element highlights
87
+ - **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning
88
+ - **Copy/paste**: Brief highlight flash on paste, "copied" confirmation
89
+ - **Focus flow**: Highlight path through form or workflow
90
+
91
+ ### Delight Moments
92
+ - **Empty states**: Subtle floating animations on illustrations
93
+ - **Completed actions**: Confetti, check mark flourish, success celebrations
94
+ - **Easter eggs**: Hidden interactions for discovery
95
+ - **Contextual animation**: Weather effects, time-of-day themes, seasonal touches
96
+
97
+ ## Technical Implementation
98
+
99
+ Use appropriate techniques for each animation:
100
+
101
+ ### Timing & Easing
102
+
103
+ **Durations by purpose:**
104
+ - **100-150ms**: Instant feedback (button press, toggle)
105
+ - **200-300ms**: State changes (hover, menu open)
106
+ - **300-500ms**: Layout changes (accordion, modal)
107
+ - **500-800ms**: Entrance animations (page load)
108
+
109
+ **Easing curves (use these, not CSS defaults):**
110
+ ```css
111
+ /* Recommended - natural deceleration */
112
+ --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */
113
+ --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */
114
+ --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */
115
+
116
+ /* AVOID - feel dated and tacky */
117
+ /* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */
118
+ /* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */
119
+ ```
120
+
121
+ **Exit animations are faster than entrances.** Use ~75% of enter duration.
122
+
123
+ ### CSS Animations
124
+ ```css
125
+ /* Prefer for simple, declarative animations */
126
+ - transitions for state changes
127
+ - @keyframes for complex sequences
128
+ - transform + opacity only (GPU-accelerated)
129
+ ```
130
+
131
+ ### JavaScript Animation
132
+ ```javascript
133
+ /* Use for complex, interactive animations */
134
+ - Web Animations API for programmatic control
135
+ - Framer Motion for React
136
+ - GSAP for complex sequences
137
+ ```
138
+
139
+ ### Performance
140
+ - **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
141
+ - **will-change**: Add sparingly for known expensive animations
142
+ - **Reduce paint**: Minimize repaints, use `contain` where appropriate
143
+ - **Monitor FPS**: Ensure 60fps on target devices
144
+
145
+ ### Accessibility
146
+ ```css
147
+ @media (prefers-reduced-motion: reduce) {
148
+ * {
149
+ animation-duration: 0.01ms !important;
150
+ animation-iteration-count: 1 !important;
151
+ transition-duration: 0.01ms !important;
152
+ }
153
+ }
154
+ ```
155
+
156
+ **NEVER**:
157
+ - Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
158
+ - Animate layout properties (width, height, top, left)—use transform instead
159
+ - Use durations over 500ms for feedback—it feels laggy
160
+ - Animate without purpose—every animation needs a reason
161
+ - Ignore `prefers-reduced-motion`—this is an accessibility violation
162
+ - Animate everything—animation fatigue makes interfaces feel exhausting
163
+ - Block interaction during animations unless intentional
164
+
165
+ ## Verify Quality
166
+
167
+ Test animations thoroughly:
168
+
169
+ - **Smooth at 60fps**: No jank on target devices
170
+ - **Feels natural**: Easing curves feel organic, not robotic
171
+ - **Appropriate timing**: Not too fast (jarring) or too slow (laggy)
172
+ - **Reduced motion works**: Animations disabled or simplified appropriately
173
+ - **Doesn't block**: Users can interact during/after animations
174
+ - **Adds value**: Makes interface clearer or more delightful
175
+
176
+ Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right.
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: arrange
3
+ description: "arrange 布局:修复 layout/spacing/visual hierarchy 问题,建立有节奏感的视觉结构。"
4
+ argument-hint: "[target]"
5
+ user-invocable: true
6
+ context: fork
7
+ paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
8
+ ---
9
+
10
+ Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions.
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 Layout
19
+
20
+ Analyze what's weak about the current spatial design:
21
+
22
+ 1. **Spacing**:
23
+ - Is spacing consistent or arbitrary? (Random padding/margin values)
24
+ - Is all spacing the same? (Equal padding everywhere = no rhythm)
25
+ - Are related elements grouped tightly, with generous space between groups?
26
+
27
+ 2. **Visual hierarchy**:
28
+ - Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings?
29
+ - Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?)
30
+ - Does whitespace guide the eye to what matters?
31
+
32
+ 3. **Grid & structure**:
33
+ - Is there a clear underlying structure, or does the layout feel random?
34
+ - Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly)
35
+ - Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule)
36
+
37
+ 4. **Rhythm & variety**:
38
+ - Does the layout have visual rhythm? (Alternating tight/generous spacing)
39
+ - Is every section structured the same way? (Monotonous repetition)
40
+ - Are there intentional moments of surprise or emphasis?
41
+
42
+ 5. **Density**:
43
+ - Is the layout too cramped? (Not enough breathing room)
44
+ - Is the layout too sparse? (Excessive whitespace without purpose)
45
+ - Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air)
46
+
47
+ **CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention.
48
+
49
+ ## Plan Layout Improvements
50
+
51
+ Consult the [spatial design reference](reference/spatial-design.md) from the frontend-design skill for detailed guidance on grids, rhythm, and container queries.
52
+
53
+ Create a systematic plan:
54
+
55
+ - **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency.
56
+ - **Hierarchy strategy**: How will space communicate importance?
57
+ - **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts.
58
+ - **Rhythm**: Where should spacing be tight vs generous?
59
+
60
+ ## Improve Layout Systematically
61
+
62
+ ### Establish a Spacing System
63
+
64
+ - Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers.
65
+ - Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8`
66
+ - Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks
67
+ - Apply `clamp()` for fluid spacing that breathes on larger screens
68
+
69
+ ### Create Visual Rhythm
70
+
71
+ - **Tight grouping** for related elements (8-12px between siblings)
72
+ - **Generous separation** between distinct sections (48-96px)
73
+ - **Varied spacing** within sections — not every row needs the same gap
74
+ - **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense
75
+
76
+ ### Choose the Right Layout Tool
77
+
78
+ - **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks.
79
+ - **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control.
80
+ - **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible.
81
+ - Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints.
82
+ - Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints.
83
+
84
+ ### Break Card Grid Monotony
85
+
86
+ - Don't default to card grids for everything — spacing and alignment create visual grouping naturally
87
+ - Use cards only when content is truly distinct and actionable — never nest cards inside cards
88
+ - Vary card sizes, span columns, or mix cards with non-card content to break repetition
89
+
90
+ ### Strengthen Visual Hierarchy
91
+
92
+ - Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient.
93
+ - Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation).
94
+ - Create clear content groupings through proximity and separation.
95
+
96
+ ### Manage Depth & Elevation
97
+
98
+ - Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip)
99
+ - Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle
100
+ - Use elevation to reinforce hierarchy, not as decoration
101
+
102
+ ### Optical Adjustments
103
+
104
+ - If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively.
105
+
106
+ **NEVER**:
107
+ - Use arbitrary spacing values outside your scale
108
+ - Make all spacing equal — variety creates hierarchy
109
+ - Wrap everything in cards — not everything needs a container
110
+ - Nest cards inside cards — use spacing and dividers for hierarchy within
111
+ - Use identical card grids everywhere (icon + heading + text, repeated)
112
+ - Center everything — left-aligned with asymmetry feels more designed
113
+ - Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers.
114
+ - Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job
115
+ - Use arbitrary z-index values (999, 9999) — build a semantic scale
116
+
117
+ ## Verify Layout Improvements
118
+
119
+ - **Squint test**: Can you identify primary, secondary, and groupings with blurred vision?
120
+ - **Rhythm**: Does the page have a satisfying beat of tight and generous spacing?
121
+ - **Hierarchy**: Is the most important content obvious within 2 seconds?
122
+ - **Breathing room**: Does the layout feel comfortable, not cramped or wasteful?
123
+ - **Consistency**: Is the spacing system applied uniformly?
124
+ - **Responsiveness**: Does the layout adapt gracefully across screen sizes?
125
+
126
+ Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional.
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: audit
3
+ description: "audit 技术审计:accessibility/performance/responsive/反模式 全检,P0-P3 评级。"
4
+ argument-hint: "[area (feature, page, component...)]"
5
+ user-invocable: true
6
+ context: fork
7
+ paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
8
+ ---
9
+
10
+ ## MANDATORY PREPARATION
11
+
12
+ 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.
13
+
14
+ ---
15
+
16
+ Run systematic **technical** quality checks and generate a comprehensive report. Don't fix issues — document them for other commands to address.
17
+
18
+ This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation.
19
+
20
+ ## Diagnostic Scan
21
+
22
+ Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below.
23
+
24
+ ### 1. Accessibility (A11y)
25
+
26
+ **Check for**:
27
+ - **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA)
28
+ - **Missing ARIA**: Interactive elements without proper roles, labels, or states
29
+ - **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps
30
+ - **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons
31
+ - **Alt text**: Missing or poor image descriptions
32
+ - **Form issues**: Inputs without labels, poor error messaging, missing required indicators
33
+
34
+ **Score 0-4**: 0=Inaccessible (fails WCAG A), 1=Major gaps (few ARIA labels, no keyboard nav), 2=Partial (some a11y effort, significant gaps), 3=Good (WCAG AA mostly met, minor gaps), 4=Excellent (WCAG AA fully met, approaches AAA)
35
+
36
+ ### 2. Performance
37
+
38
+ **Check for**:
39
+ - **Layout thrashing**: Reading/writing layout properties in loops
40
+ - **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
41
+ - **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
42
+ - **Bundle size**: Unnecessary imports, unused dependencies
43
+ - **Render performance**: Unnecessary re-renders, missing memoization
44
+
45
+ **Score 0-4**: 0=Severe issues (layout thrash, unoptimized everything), 1=Major problems (no lazy loading, expensive animations), 2=Partial (some optimization, gaps remain), 3=Good (mostly optimized, minor improvements possible), 4=Excellent (fast, lean, well-optimized)
46
+
47
+ ### 3. Theming
48
+
49
+ **Check for**:
50
+ - **Hard-coded colors**: Colors not using design tokens
51
+ - **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme
52
+ - **Inconsistent tokens**: Using wrong tokens, mixing token types
53
+ - **Theme switching issues**: Values that don't update on theme change
54
+
55
+ **Score 0-4**: 0=No theming (hard-coded everything), 1=Minimal tokens (mostly hard-coded), 2=Partial (tokens exist but inconsistently used), 3=Good (tokens used, minor hard-coded values), 4=Excellent (full token system, dark mode works perfectly)
56
+
57
+ ### 4. Responsive Design
58
+
59
+ **Check for**:
60
+ - **Fixed widths**: Hard-coded widths that break on mobile
61
+ - **Touch targets**: Interactive elements < 44x44px
62
+ - **Horizontal scroll**: Content overflow on narrow viewports
63
+ - **Text scaling**: Layouts that break when text size increases
64
+ - **Missing breakpoints**: No mobile/tablet variants
65
+
66
+ **Score 0-4**: 0=Desktop-only (breaks on mobile), 1=Major issues (some breakpoints, many failures), 2=Partial (works on mobile, rough edges), 3=Good (responsive, minor touch target or overflow issues), 4=Excellent (fluid, all viewports, proper touch targets)
67
+
68
+ ### 5. Anti-Patterns (CRITICAL)
69
+
70
+ Check against ALL the **DON'T** guidelines in the frontend-design skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy).
71
+
72
+ **Score 0-4**: 0=AI slop gallery (5+ tells), 1=Heavy AI aesthetic (3-4 tells), 2=Some tells (1-2 noticeable), 3=Mostly clean (subtle issues only), 4=No AI tells (distinctive, intentional design)
73
+
74
+ ## Generate Report
75
+
76
+ ### Audit Health Score
77
+
78
+ | # | Dimension | Score | Key Finding |
79
+ |---|-----------|-------|-------------|
80
+ | 1 | Accessibility | ? | [most critical a11y issue or "--"] |
81
+ | 2 | Performance | ? | |
82
+ | 3 | Responsive Design | ? | |
83
+ | 4 | Theming | ? | |
84
+ | 5 | Anti-Patterns | ? | |
85
+ | **Total** | | **??/20** | **[Rating band]** |
86
+
87
+ **Rating bands**: 18-20 Excellent (minor polish), 14-17 Good (address weak dimensions), 10-13 Acceptable (significant work needed), 6-9 Poor (major overhaul), 0-5 Critical (fundamental issues)
88
+
89
+ ### Anti-Patterns Verdict
90
+ **Start here.** Pass/fail: Does this look AI-generated? List specific tells. Be brutally honest.
91
+
92
+ ### Executive Summary
93
+ - Audit Health Score: **??/20** ([rating band])
94
+ - Total issues found (count by severity: P0/P1/P2/P3)
95
+ - Top 3-5 critical issues
96
+ - Recommended next steps
97
+
98
+ ### Detailed Findings by Severity
99
+
100
+ Tag every issue with **P0-P3 severity**:
101
+ - **P0 Blocking**: Prevents task completion — fix immediately
102
+ - **P1 Major**: Significant difficulty or WCAG AA violation — fix before release
103
+ - **P2 Minor**: Annoyance, workaround exists — fix in next pass
104
+ - **P3 Polish**: Nice-to-fix, no real user impact — fix if time permits
105
+
106
+ For each issue, document:
107
+ - **[P?] Issue name**
108
+ - **Location**: Component, file, line
109
+ - **Category**: Accessibility / Performance / Theming / Responsive / Anti-Pattern
110
+ - **Impact**: How it affects users
111
+ - **WCAG/Standard**: Which standard it violates (if applicable)
112
+ - **Recommendation**: How to fix it
113
+ - **Suggested command**: Which command to use (prefer: /audit, /critique, /normalize, /polish, /distill, /clarify, /optimize, /harden, /animate, /colorize, /bolder, /quieter, /delight, /extract, /adapt, /onboard, /typeset, /arrange, /overdrive, /teach-impeccable)
114
+
115
+ ### Patterns & Systemic Issues
116
+
117
+ Identify recurring problems that indicate systemic gaps rather than one-off mistakes:
118
+ - "Hard-coded colors appear in 15+ components, should use design tokens"
119
+ - "Touch targets consistently too small (<44px) throughout mobile experience"
120
+
121
+ ### Positive Findings
122
+
123
+ Note what's working well — good practices to maintain and replicate.
124
+
125
+ ## Recommended Actions
126
+
127
+ List recommended commands in priority order (P0 first, then P1, then P2):
128
+
129
+ 1. **[P?] `/command-name`** — Brief description (specific context from audit findings)
130
+ 2. **[P?] `/command-name`** — Brief description (specific context)
131
+
132
+ **Rules**: Only recommend commands from: /audit, /critique, /normalize, /polish, /distill, /clarify, /optimize, /harden, /animate, /colorize, /bolder, /quieter, /delight, /extract, /adapt, /onboard, /typeset, /arrange, /overdrive, /teach-impeccable. Map findings to the most appropriate command. End with `/polish` as the final step if any fixes were recommended.
133
+
134
+ After presenting the summary, tell the user:
135
+
136
+ > You can ask me to run these one at a time, all at once, or in any order you prefer.
137
+ >
138
+ > Re-run `/audit` after fixes to see your score improve.
139
+
140
+ **IMPORTANT**: Be thorough but actionable. Too many P3 issues creates noise. Focus on what actually matters.
141
+
142
+ **NEVER**:
143
+ - Report issues without explaining impact (why does this matter?)
144
+ - Provide generic recommendations (be specific and actionable)
145
+ - Skip positive findings (celebrate what works)
146
+ - Forget to prioritize (everything can't be P0)
147
+ - Report false positives without verification
148
+
149
+ Remember: You're a technical quality auditor. Document systematically, prioritize ruthlessly, cite specific code locations, and provide clear paths to improvement.
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: bolder
3
+ description: "bolder 放大:将保守/无聊/generic 设计放大成有 visual impact 和个性的版本。"
4
+ argument-hint: "[target]"
5
+ user-invocable: true
6
+ context: fork
7
+ paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
8
+ ---
9
+
10
+ Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable 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.
15
+
16
+ ---
17
+
18
+ ## Assess Current State
19
+
20
+ Analyze what makes the design feel too safe or boring:
21
+
22
+ 1. **Identify weakness sources**:
23
+ - **Generic choices**: System fonts, basic colors, standard layouts
24
+ - **Timid scale**: Everything is medium-sized with no drama
25
+ - **Low contrast**: Everything has similar visual weight
26
+ - **Static**: No motion, no energy, no life
27
+ - **Predictable**: Standard patterns with no surprises
28
+ - **Flat hierarchy**: Nothing stands out or commands attention
29
+
30
+ 2. **Understand the context**:
31
+ - What's the brand personality? (How far can we push?)
32
+ - What's the purpose? (Marketing can be bolder than financial dashboards)
33
+ - Who's the audience? (What will resonate?)
34
+ - What are the constraints? (Brand guidelines, accessibility, performance)
35
+
36
+ If any of these are unclear from the codebase, Ask the user using AskUserQuestion.
37
+
38
+ **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos.
39
+
40
+ **WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the frontend-design skill before proceeding. Bold means distinctive, not "more effects."
41
+
42
+ ## Plan Amplification
43
+
44
+ Create a strategy to increase impact while maintaining coherence:
45
+
46
+ - **Focal point**: What should be the hero moment? (Pick ONE, make it amazing)
47
+ - **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane.
48
+ - **Risk budget**: How experimental can we be? Push boundaries within constraints.
49
+ - **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast)
50
+
51
+ **IMPORTANT**: Bold design must still be usable. Impact without function is just decoration.
52
+
53
+ ## Amplify the Design
54
+
55
+ Systematically increase impact across these dimensions:
56
+
57
+ ### Typography Amplification
58
+ - **Replace generic fonts**: Swap system fonts for distinctive choices (see frontend-design skill for inspiration)
59
+ - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x)
60
+ - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400
61
+ - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default)
62
+
63
+ ### Color Intensification
64
+ - **Increase saturation**: Shift to more vibrant, energetic colors (but not neon)
65
+ - **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop
66
+ - **Dominant color strategy**: Let one bold color own 60% of the design
67
+ - **Sharp accents**: High-contrast accent colors that pop
68
+ - **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette
69
+ - **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue)
70
+
71
+ ### Spatial Drama
72
+ - **Extreme scale jumps**: Make important elements 3-5x larger than surroundings
73
+ - **Break the grid**: Let hero elements escape containers and cross boundaries
74
+ - **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry
75
+ - **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px)
76
+ - **Overlap**: Layer elements intentionally for depth
77
+
78
+ ### Visual Effects
79
+ - **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles)
80
+ - **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue)
81
+ - **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop)
82
+ - **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side)
83
+ - **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand
84
+
85
+ ### Motion & Animation
86
+ - **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays
87
+ - **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences
88
+ - **Micro-interactions**: Satisfying hover effects, click feedback, state changes
89
+ - **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect)
90
+
91
+ ### Composition Boldness
92
+ - **Hero moments**: Create clear focal points with dramatic treatment
93
+ - **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements
94
+ - **Full-bleed elements**: Use full viewport width/height for impact
95
+ - **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits
96
+
97
+ **NEVER**:
98
+ - Add effects randomly without purpose (chaos ≠ bold)
99
+ - Sacrifice readability for aesthetics (body text must be readable)
100
+ - Make everything bold (then nothing is bold - need contrast)
101
+ - Ignore accessibility (bold design must still meet WCAG standards)
102
+ - Overwhelm with motion (animation fatigue is real)
103
+ - Copy trendy aesthetics blindly (bold means distinctive, not derivative)
104
+
105
+ ## Verify Quality
106
+
107
+ Ensure amplification maintains usability and coherence:
108
+
109
+ - **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over.
110
+ - **Still functional**: Can users accomplish tasks without distraction?
111
+ - **Coherent**: Does everything feel intentional and unified?
112
+ - **Memorable**: Will users remember this experience?
113
+ - **Performant**: Do all these effects run smoothly?
114
+ - **Accessible**: Does it still meet accessibility standards?
115
+
116
+ **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects."
117
+
118
+ Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable.