@mytechtoday/augment-extensions 1.3.0 → 1.3.1

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 (95) hide show
  1. package/LICENSE +22 -22
  2. package/augment-extensions/domain-rules/software-architecture/README.md +143 -143
  3. package/augment-extensions/domain-rules/software-architecture/examples/banking-layered.md +961 -961
  4. package/augment-extensions/domain-rules/software-architecture/examples/ecommerce-microservices.md +990 -990
  5. package/augment-extensions/domain-rules/software-architecture/examples/iot-eventdriven.md +882 -882
  6. package/augment-extensions/domain-rules/software-architecture/examples/monolith-to-microservices-migration.md +703 -703
  7. package/augment-extensions/domain-rules/software-architecture/examples/serverless-imageprocessing.md +957 -957
  8. package/augment-extensions/domain-rules/software-architecture/examples/trading-eventdriven.md +747 -747
  9. package/augment-extensions/domain-rules/software-architecture/module.json +119 -119
  10. package/augment-extensions/domain-rules/software-architecture/rules/challenges-solutions.md +763 -763
  11. package/augment-extensions/domain-rules/software-architecture/rules/definitions-terminology.md +409 -409
  12. package/augment-extensions/domain-rules/software-architecture/rules/design-principles.md +684 -684
  13. package/augment-extensions/domain-rules/software-architecture/rules/evaluation-testing.md +1381 -1381
  14. package/augment-extensions/domain-rules/software-architecture/rules/event-driven-architecture.md +616 -616
  15. package/augment-extensions/domain-rules/software-architecture/rules/fundamentals.md +306 -306
  16. package/augment-extensions/domain-rules/software-architecture/rules/industry-architectures.md +554 -554
  17. package/augment-extensions/domain-rules/software-architecture/rules/layered-architecture.md +776 -776
  18. package/augment-extensions/domain-rules/software-architecture/rules/microservices-architecture.md +503 -503
  19. package/augment-extensions/domain-rules/software-architecture/rules/modeling-documentation.md +1199 -1199
  20. package/augment-extensions/domain-rules/software-architecture/rules/monolithic-architecture.md +351 -351
  21. package/augment-extensions/domain-rules/software-architecture/rules/principles.md +556 -556
  22. package/augment-extensions/domain-rules/software-architecture/rules/quality-attributes.md +797 -797
  23. package/augment-extensions/domain-rules/software-architecture/rules/scalability-performance.md +1345 -1345
  24. package/augment-extensions/domain-rules/software-architecture/rules/security-architecture.md +1039 -1039
  25. package/augment-extensions/domain-rules/software-architecture/rules/serverless-architecture.md +711 -711
  26. package/augment-extensions/domain-rules/software-architecture/rules/skills-development.md +568 -568
  27. package/augment-extensions/domain-rules/software-architecture/rules/tools-methodologies.md +961 -961
  28. package/augment-extensions/visual-design/CHANGELOG.md +132 -132
  29. package/augment-extensions/visual-design/README.md +255 -255
  30. package/augment-extensions/visual-design/__tests__/README.md +119 -119
  31. package/augment-extensions/visual-design/__tests__/style-selector.test.ts +172 -172
  32. package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +214 -214
  33. package/augment-extensions/visual-design/domains/other/ai-prompt-helper.ts +157 -157
  34. package/augment-extensions/visual-design/domains/other/dotnet-application.ts +156 -156
  35. package/augment-extensions/visual-design/domains/other/linux-platform.ts +156 -156
  36. package/augment-extensions/visual-design/domains/other/mobile-application.ts +157 -157
  37. package/augment-extensions/visual-design/domains/other/motion-picture.ts +156 -156
  38. package/augment-extensions/visual-design/domains/other/os-application.ts +156 -156
  39. package/augment-extensions/visual-design/domains/other/print-campaigns.ts +158 -158
  40. package/augment-extensions/visual-design/domains/other/web-app.ts +157 -157
  41. package/augment-extensions/visual-design/domains/other/website.ts +161 -161
  42. package/augment-extensions/visual-design/domains/other/windows-platform.ts +156 -156
  43. package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +506 -506
  44. package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +615 -615
  45. package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +531 -531
  46. package/augment-extensions/visual-design/examples/README.md +97 -97
  47. package/augment-extensions/visual-design/examples/ai-prompt-generation.md +233 -233
  48. package/augment-extensions/visual-design/examples/basic-usage.md +216 -216
  49. package/augment-extensions/visual-design/examples/domain-workflows.md +257 -257
  50. package/augment-extensions/visual-design/examples/vendor-comparison.md +247 -247
  51. package/augment-extensions/visual-design/module.json +78 -78
  52. package/augment-extensions/visual-design/style-selector.ts +177 -177
  53. package/augment-extensions/visual-design/types.ts +302 -302
  54. package/augment-extensions/visual-design/visual-design-core.ts +469 -469
  55. package/augment-extensions/workflows/adr-support/README.md +227 -227
  56. package/augment-extensions/workflows/adr-support/__tests__/adr-validator.test.ts +203 -203
  57. package/augment-extensions/workflows/adr-support/adr-validator.ts +162 -162
  58. package/augment-extensions/workflows/adr-support/examples/complete-lifecycle-example.md +449 -449
  59. package/augment-extensions/workflows/adr-support/examples/integration-example.md +580 -580
  60. package/augment-extensions/workflows/adr-support/examples/superseding-example.md +436 -436
  61. package/augment-extensions/workflows/adr-support/module.json +112 -112
  62. package/augment-extensions/workflows/adr-support/rules/adr-creation.md +372 -372
  63. package/augment-extensions/workflows/adr-support/rules/beads-integration.md +443 -443
  64. package/augment-extensions/workflows/adr-support/rules/conflict-detection.md +486 -486
  65. package/augment-extensions/workflows/adr-support/rules/decision-detection.md +362 -362
  66. package/augment-extensions/workflows/adr-support/rules/lifecycle-management.md +427 -427
  67. package/augment-extensions/workflows/adr-support/rules/openspec-integration.md +465 -465
  68. package/augment-extensions/workflows/adr-support/rules/template-selection.md +405 -405
  69. package/augment-extensions/workflows/adr-support/rules/validation-rules.md +543 -543
  70. package/augment-extensions/workflows/adr-support/schemas/adr-config.json +191 -191
  71. package/augment-extensions/workflows/adr-support/schemas/adr-metadata.json +172 -172
  72. package/augment-extensions/workflows/adr-support/templates/business-case.md +235 -235
  73. package/augment-extensions/workflows/adr-support/templates/madr-elaborate.md +197 -197
  74. package/augment-extensions/workflows/adr-support/templates/madr-simple.md +68 -68
  75. package/augment-extensions/workflows/adr-support/templates/nygard.md +84 -84
  76. package/augment-extensions/writing-standards/screenplay/rules/file-organization.md +213 -213
  77. package/augment-extensions/writing-standards/screenplay/utils/__tests__/file-organization.test.ts +169 -169
  78. package/augment-extensions/writing-standards/screenplay/utils/file-organization.ts +165 -165
  79. package/cli/dist/utils/auto-sync.js +19 -19
  80. package/package.json +5 -3
  81. package/augment-extensions/workflows/openspec/README.md +0 -96
  82. package/augment-extensions/workflows/openspec/examples/complete-change-example.md +0 -244
  83. package/augment-extensions/workflows/openspec/module.json +0 -54
  84. package/augment-extensions/workflows/openspec/rules/best-practices.md +0 -272
  85. package/augment-extensions/workflows/openspec/rules/manual-setup.md +0 -231
  86. package/augment-extensions/workflows/openspec/rules/spec-format.md +0 -236
  87. package/augment-extensions/workflows/openspec/rules/workflow.md +0 -214
  88. package/cli/dist/utils/__tests__/adr-validator.example.d.ts +0 -6
  89. package/cli/dist/utils/__tests__/adr-validator.example.d.ts.map +0 -1
  90. package/cli/dist/utils/__tests__/adr-validator.example.js +0 -148
  91. package/cli/dist/utils/__tests__/adr-validator.example.js.map +0 -1
  92. package/cli/dist/utils/adr-validator.d.ts +0 -65
  93. package/cli/dist/utils/adr-validator.d.ts.map +0 -1
  94. package/cli/dist/utils/adr-validator.js +0 -203
  95. package/cli/dist/utils/adr-validator.js.map +0 -1
@@ -1,469 +1,469 @@
1
- /**
2
- * Visual Design Core Module
3
- *
4
- * Defines the 8 core design elements, 11 design principles, and 5 skill categories
5
- * that form the foundation of visual design knowledge for AI agents.
6
- */
7
-
8
- import {
9
- DesignModule,
10
- DesignElement,
11
- DesignPrinciple,
12
- SkillCategory
13
- } from './types';
14
-
15
- // ============================================================================
16
- // 8 Core Design Elements
17
- // ============================================================================
18
-
19
- export const DESIGN_ELEMENTS: DesignElement[] = [
20
- {
21
- name: 'Color',
22
- description: 'Color palettes, contrast ratios, and accessibility considerations',
23
- properties: {
24
- aspects: [
25
- 'Color theory (primary, secondary, tertiary)',
26
- 'Color harmony (complementary, analogous, triadic)',
27
- 'Contrast ratios (WCAG AA: 4.5:1 for text, AAA: 7:1)',
28
- 'Color psychology and emotional impact',
29
- 'Accessibility (color blindness, high contrast modes)',
30
- 'Brand color consistency'
31
- ],
32
- tools: ['Color contrast checkers', 'Palette generators', 'Accessibility validators']
33
- }
34
- },
35
- {
36
- name: 'Typography',
37
- description: 'Font selection, hierarchy, readability, and text styling',
38
- properties: {
39
- aspects: [
40
- 'Font families (serif, sans-serif, monospace, display)',
41
- 'Type scale and hierarchy (h1-h6, body, caption)',
42
- 'Line height (1.5 for body text, 1.2 for headings)',
43
- 'Letter spacing and kerning',
44
- 'Font weights (100-900)',
45
- 'Responsive typography (fluid type scales)',
46
- 'Web font loading strategies'
47
- ],
48
- tools: ['Google Fonts', 'Adobe Fonts', 'Type scale calculators']
49
- }
50
- },
51
- {
52
- name: 'Layout',
53
- description: 'Grid systems, alignment, spacing, and visual flow',
54
- properties: {
55
- aspects: [
56
- 'Grid systems (12-column, 8-point grid)',
57
- 'Flexbox and CSS Grid',
58
- 'Alignment and distribution',
59
- 'Visual hierarchy and flow',
60
- 'Responsive layouts (mobile-first)',
61
- 'Container widths and breakpoints',
62
- 'Z-index and stacking contexts'
63
- ],
64
- tools: ['CSS Grid', 'Flexbox', 'Layout frameworks']
65
- }
66
- },
67
- {
68
- name: 'Imagery',
69
- description: 'Photos, illustrations, icons, and visual content',
70
- properties: {
71
- aspects: [
72
- 'Image formats (WebP, AVIF, PNG, JPEG, SVG)',
73
- 'Aspect ratios (16:9, 4:3, 1:1, golden ratio)',
74
- 'Image optimization and compression',
75
- 'Responsive images (srcset, picture element)',
76
- 'Lazy loading strategies',
77
- 'Alt text and accessibility',
78
- 'Image composition and cropping'
79
- ],
80
- tools: ['Image optimizers', 'CDNs', 'Responsive image generators']
81
- }
82
- },
83
- {
84
- name: 'Iconography',
85
- description: 'Icon systems, sizes, styles, and consistency',
86
- properties: {
87
- aspects: [
88
- 'Icon styles (outlined, filled, rounded, sharp)',
89
- 'Icon sizes (16px, 24px, 32px, 48px)',
90
- 'SVG vs icon fonts',
91
- 'Icon accessibility (aria-label, role)',
92
- 'Consistent visual language',
93
- 'Icon grid and alignment',
94
- 'Color and state variations'
95
- ],
96
- tools: ['Material Icons', 'Font Awesome', 'Heroicons', 'Lucide']
97
- }
98
- },
99
- {
100
- name: 'Spacing',
101
- description: 'Margins, padding, and rhythm systems',
102
- properties: {
103
- aspects: [
104
- '8-point grid system (multiples of 8px)',
105
- 'Spacing scale (4px, 8px, 16px, 24px, 32px, 48px, 64px)',
106
- 'Vertical rhythm and baseline grid',
107
- 'Component spacing consistency',
108
- 'Responsive spacing (clamp, calc)',
109
- 'Negative space and breathing room',
110
- 'Optical alignment adjustments'
111
- ],
112
- tools: ['Spacing tokens', 'Design systems', 'CSS custom properties']
113
- }
114
- },
115
- {
116
- name: 'Motion',
117
- description: 'Animations, transitions, and micro-interactions',
118
- properties: {
119
- aspects: [
120
- 'Animation durations (100ms instant, 200ms fast, 300ms normal, 500ms slow)',
121
- 'Easing functions (ease-in, ease-out, ease-in-out, spring)',
122
- 'Transition properties (opacity, transform, color)',
123
- 'Micro-interactions (hover, focus, active states)',
124
- 'Loading states and skeletons',
125
- 'Page transitions and route animations',
126
- 'Reduced motion preferences (prefers-reduced-motion)'
127
- ],
128
- tools: ['CSS animations', 'Framer Motion', 'GSAP', 'Lottie']
129
- }
130
- },
131
- {
132
- name: 'Elevation',
133
- description: 'Shadows, depth, and layering systems',
134
- properties: {
135
- aspects: [
136
- 'Shadow levels (0-24 in Material Design)',
137
- 'Box shadows vs drop shadows',
138
- 'Layering and z-index hierarchy',
139
- 'Depth perception and visual weight',
140
- 'Elevation tokens (none, sm, md, lg, xl)',
141
- 'Neumorphism and glassmorphism effects',
142
- 'Dark mode shadow adjustments'
143
- ],
144
- tools: ['Shadow generators', 'Elevation systems', 'CSS filters']
145
- }
146
- }
147
- ];
148
-
149
- // ============================================================================
150
- // 11 Design Principles
151
- // ============================================================================
152
-
153
- export const DESIGN_PRINCIPLES: DesignPrinciple[] = [
154
- {
155
- name: 'Balance',
156
- description: 'Visual equilibrium through symmetrical or asymmetrical distribution of elements',
157
- guidelines: [
158
- 'Symmetrical balance: Mirror elements across a central axis',
159
- 'Asymmetrical balance: Different elements with equal visual weight',
160
- 'Radial balance: Elements radiating from a central point',
161
- 'Use visual weight (size, color, position) to create balance',
162
- 'Balance negative and positive space'
163
- ]
164
- },
165
- {
166
- name: 'Contrast',
167
- description: 'Difference between elements to create visual interest and hierarchy',
168
- guidelines: [
169
- 'Color contrast: Light vs dark, complementary colors',
170
- 'Size contrast: Large vs small elements',
171
- 'Shape contrast: Geometric vs organic forms',
172
- 'Texture contrast: Smooth vs rough surfaces',
173
- 'Ensure sufficient contrast for accessibility (WCAG AA: 4.5:1)',
174
- 'Use contrast to guide attention and create focal points'
175
- ]
176
- },
177
- {
178
- name: 'Hierarchy',
179
- description: 'Organization of elements to show importance and guide user attention',
180
- guidelines: [
181
- 'Size hierarchy: Larger elements appear more important',
182
- 'Color hierarchy: Bright/saturated colors draw attention',
183
- 'Position hierarchy: Top-left to bottom-right reading pattern',
184
- 'Typography hierarchy: h1 > h2 > h3 > body > caption',
185
- 'Use F-pattern or Z-pattern for content layout',
186
- 'Limit hierarchy levels to 3-4 for clarity'
187
- ]
188
- },
189
- {
190
- name: 'Unity',
191
- description: 'Cohesion and consistency across all design elements',
192
- guidelines: [
193
- 'Consistent color palette throughout design',
194
- 'Unified typography system (2-3 font families max)',
195
- 'Repeated visual patterns and motifs',
196
- 'Consistent spacing and alignment',
197
- 'Shared design language across components',
198
- 'Brand consistency in all touchpoints'
199
- ]
200
- },
201
- {
202
- name: 'Emphasis',
203
- description: 'Creating focal points to draw attention to key elements',
204
- guidelines: [
205
- 'Use size, color, or position to create emphasis',
206
- 'Limit focal points to 1-2 per screen/section',
207
- 'Contrast emphasized elements with surroundings',
208
- 'Use whitespace to isolate important elements',
209
- 'Apply visual weight through color saturation or boldness',
210
- 'Guide user journey with strategic emphasis'
211
- ]
212
- },
213
- {
214
- name: 'Rhythm',
215
- description: 'Repetition and pattern to create visual flow and movement',
216
- guidelines: [
217
- 'Regular rhythm: Consistent spacing and repetition',
218
- 'Progressive rhythm: Gradual changes in size or spacing',
219
- 'Flowing rhythm: Organic, curved patterns',
220
- 'Use rhythm to guide eye movement',
221
- 'Create visual interest through varied repetition',
222
- 'Maintain rhythm in grid systems and layouts'
223
- ]
224
- },
225
- {
226
- name: 'Proportion',
227
- description: 'Relationship between element sizes and the overall composition',
228
- guidelines: [
229
- 'Golden ratio (1.618) for harmonious proportions',
230
- 'Rule of thirds for composition',
231
- 'Scale elements relative to their importance',
232
- 'Maintain aspect ratios for images and containers',
233
- 'Use proportional spacing systems (8-point grid)',
234
- 'Consider viewport proportions for responsive design'
235
- ]
236
- },
237
- {
238
- name: 'White Space',
239
- description: 'Negative space that provides breathing room and improves readability',
240
- guidelines: [
241
- 'Micro white space: Between letters, lines, and small elements',
242
- 'Macro white space: Between major sections and components',
243
- 'Use white space to create visual hierarchy',
244
- 'Increase white space for premium/luxury feel',
245
- 'Reduce clutter by embracing emptiness',
246
- 'White space is not wasted space—it enhances comprehension'
247
- ]
248
- },
249
- {
250
- name: 'Consistency',
251
- description: 'Uniformity in design patterns, behaviors, and visual language',
252
- guidelines: [
253
- 'Consistent component styling across the application',
254
- 'Predictable interaction patterns (buttons, links, forms)',
255
- 'Unified color usage (primary for actions, red for errors)',
256
- 'Consistent spacing and alignment rules',
257
- 'Standardized iconography and imagery style',
258
- 'Follow platform conventions (iOS, Android, Web)'
259
- ]
260
- },
261
- {
262
- name: 'Accessibility',
263
- description: 'Designing for all users, including those with disabilities',
264
- guidelines: [
265
- 'WCAG 2.1 Level AA compliance minimum',
266
- 'Color contrast ratios: 4.5:1 for text, 3:1 for UI components',
267
- 'Keyboard navigation support (tab order, focus states)',
268
- 'Screen reader compatibility (semantic HTML, ARIA labels)',
269
- 'Responsive text sizing (rem units, no fixed px)',
270
- 'Support for reduced motion preferences',
271
- 'Touch targets minimum 44x44px (iOS) or 48x48px (Android)'
272
- ]
273
- },
274
- {
275
- name: 'Responsiveness',
276
- description: 'Adapting design to different screen sizes and devices',
277
- guidelines: [
278
- 'Mobile-first approach (design for smallest screen first)',
279
- 'Breakpoints: 320px (mobile), 768px (tablet), 1024px (desktop), 1440px (large)',
280
- 'Fluid typography (clamp, vw units)',
281
- 'Flexible layouts (CSS Grid, Flexbox)',
282
- 'Responsive images (srcset, picture element)',
283
- 'Touch-friendly interactions on mobile',
284
- 'Test on real devices, not just browser DevTools'
285
- ]
286
- }
287
- ];
288
-
289
- // ============================================================================
290
- // 5 Skill Categories
291
- // ============================================================================
292
-
293
- export const SKILL_CATEGORIES: SkillCategory[] = [
294
- {
295
- name: 'Visual Design Fundamentals',
296
- description: 'Core visual design skills and principles',
297
- skills: [
298
- 'Color theory and application',
299
- 'Typography and type hierarchy',
300
- 'Layout and composition',
301
- 'Grid systems and alignment',
302
- 'Visual hierarchy creation',
303
- 'Balance and proportion',
304
- 'Contrast and emphasis',
305
- 'White space utilization',
306
- 'Design system creation',
307
- 'Style guide development'
308
- ]
309
- },
310
- {
311
- name: 'User Interface (UI) Design',
312
- description: 'Designing interactive digital interfaces',
313
- skills: [
314
- 'Component design (buttons, inputs, cards)',
315
- 'Navigation patterns (menus, tabs, breadcrumbs)',
316
- 'Form design and validation states',
317
- 'Modal and dialog design',
318
- 'Responsive design patterns',
319
- 'Mobile-first design',
320
- 'Touch target sizing',
321
- 'Icon design and selection',
322
- 'Micro-interactions and animations',
323
- 'Loading states and feedback'
324
- ]
325
- },
326
- {
327
- name: 'User Experience (UX) Design',
328
- description: 'Creating intuitive and delightful user experiences',
329
- skills: [
330
- 'User research and personas',
331
- 'Information architecture',
332
- 'User flows and journey mapping',
333
- 'Wireframing and prototyping',
334
- 'Usability testing',
335
- 'Accessibility design (WCAG compliance)',
336
- 'Interaction design patterns',
337
- 'Content strategy',
338
- 'Error prevention and recovery',
339
- 'Performance perception optimization'
340
- ]
341
- },
342
- {
343
- name: 'Technical Implementation',
344
- description: 'Translating designs into code and technical specifications',
345
- skills: [
346
- 'HTML semantic structure',
347
- 'CSS (Flexbox, Grid, custom properties)',
348
- 'Responsive CSS (media queries, container queries)',
349
- 'CSS animations and transitions',
350
- 'Design tokens and theming',
351
- 'Component-based architecture',
352
- 'Accessibility implementation (ARIA, semantic HTML)',
353
- 'Performance optimization (lazy loading, code splitting)',
354
- 'Browser compatibility',
355
- 'Design handoff and documentation'
356
- ]
357
- },
358
- {
359
- name: 'Design Tools & Workflow',
360
- description: 'Proficiency with design tools and collaborative workflows',
361
- skills: [
362
- 'Figma (components, auto-layout, variants)',
363
- 'Adobe XD / Sketch',
364
- 'Prototyping tools (Framer, ProtoPie)',
365
- 'Version control for design (Git, Abstract)',
366
- 'Design system management',
367
- 'Collaboration and feedback tools',
368
- 'Asset export and optimization',
369
- 'Design QA and review processes',
370
- 'Handoff to development (Zeplin, Figma Dev Mode)',
371
- 'Documentation and style guides'
372
- ]
373
- }
374
- ];
375
-
376
- // ============================================================================
377
- // Core Module Export
378
- // ============================================================================
379
-
380
- export const VISUAL_DESIGN_CORE: DesignModule = {
381
- name: 'visual-design-core',
382
- version: '1.0.0',
383
- description: 'Core visual design knowledge: 8 elements, 11 principles, 5 skill categories',
384
- elements: DESIGN_ELEMENTS,
385
- principles: DESIGN_PRINCIPLES,
386
- skills: SKILL_CATEGORIES,
387
- vendorPriority: ['google', 'microsoft', 'amazon']
388
- };
389
-
390
- // ============================================================================
391
- // Helper Functions
392
- // ============================================================================
393
-
394
- /**
395
- * Get a design element by name
396
- */
397
- export function getElement(name: string): DesignElement | undefined {
398
- return DESIGN_ELEMENTS.find(
399
- element => element.name.toLowerCase() === name.toLowerCase()
400
- );
401
- }
402
-
403
- /**
404
- * Get a design principle by name
405
- */
406
- export function getPrinciple(name: string): DesignPrinciple | undefined {
407
- return DESIGN_PRINCIPLES.find(
408
- principle => principle.name.toLowerCase() === name.toLowerCase()
409
- );
410
- }
411
-
412
- /**
413
- * Get a skill category by name
414
- */
415
- export function getSkillCategory(name: string): SkillCategory | undefined {
416
- return SKILL_CATEGORIES.find(
417
- category => category.name.toLowerCase() === name.toLowerCase()
418
- );
419
- }
420
-
421
- /**
422
- * Get all elements, principles, and skills as a summary
423
- */
424
- export function getCoreSummary(): {
425
- elements: string[];
426
- principles: string[];
427
- skillCategories: string[];
428
- } {
429
- return {
430
- elements: DESIGN_ELEMENTS.map(e => e.name),
431
- principles: DESIGN_PRINCIPLES.map(p => p.name),
432
- skillCategories: SKILL_CATEGORIES.map(s => s.name)
433
- };
434
- }
435
-
436
- /**
437
- * Validate if a design follows core principles
438
- */
439
- export function validateDesign(design: {
440
- hasColorContrast: boolean;
441
- hasTypographyHierarchy: boolean;
442
- hasConsistentSpacing: boolean;
443
- isAccessible: boolean;
444
- isResponsive: boolean;
445
- }): { valid: boolean; issues: string[] } {
446
- const issues: string[] = [];
447
-
448
- if (!design.hasColorContrast) {
449
- issues.push('Insufficient color contrast (violates Contrast principle)');
450
- }
451
- if (!design.hasTypographyHierarchy) {
452
- issues.push('Missing typography hierarchy (violates Hierarchy principle)');
453
- }
454
- if (!design.hasConsistentSpacing) {
455
- issues.push('Inconsistent spacing (violates Consistency principle)');
456
- }
457
- if (!design.isAccessible) {
458
- issues.push('Accessibility issues (violates Accessibility principle)');
459
- }
460
- if (!design.isResponsive) {
461
- issues.push('Not responsive (violates Responsiveness principle)');
462
- }
463
-
464
- return {
465
- valid: issues.length === 0,
466
- issues
467
- };
468
- }
469
-
1
+ /**
2
+ * Visual Design Core Module
3
+ *
4
+ * Defines the 8 core design elements, 11 design principles, and 5 skill categories
5
+ * that form the foundation of visual design knowledge for AI agents.
6
+ */
7
+
8
+ import {
9
+ DesignModule,
10
+ DesignElement,
11
+ DesignPrinciple,
12
+ SkillCategory
13
+ } from './types';
14
+
15
+ // ============================================================================
16
+ // 8 Core Design Elements
17
+ // ============================================================================
18
+
19
+ export const DESIGN_ELEMENTS: DesignElement[] = [
20
+ {
21
+ name: 'Color',
22
+ description: 'Color palettes, contrast ratios, and accessibility considerations',
23
+ properties: {
24
+ aspects: [
25
+ 'Color theory (primary, secondary, tertiary)',
26
+ 'Color harmony (complementary, analogous, triadic)',
27
+ 'Contrast ratios (WCAG AA: 4.5:1 for text, AAA: 7:1)',
28
+ 'Color psychology and emotional impact',
29
+ 'Accessibility (color blindness, high contrast modes)',
30
+ 'Brand color consistency'
31
+ ],
32
+ tools: ['Color contrast checkers', 'Palette generators', 'Accessibility validators']
33
+ }
34
+ },
35
+ {
36
+ name: 'Typography',
37
+ description: 'Font selection, hierarchy, readability, and text styling',
38
+ properties: {
39
+ aspects: [
40
+ 'Font families (serif, sans-serif, monospace, display)',
41
+ 'Type scale and hierarchy (h1-h6, body, caption)',
42
+ 'Line height (1.5 for body text, 1.2 for headings)',
43
+ 'Letter spacing and kerning',
44
+ 'Font weights (100-900)',
45
+ 'Responsive typography (fluid type scales)',
46
+ 'Web font loading strategies'
47
+ ],
48
+ tools: ['Google Fonts', 'Adobe Fonts', 'Type scale calculators']
49
+ }
50
+ },
51
+ {
52
+ name: 'Layout',
53
+ description: 'Grid systems, alignment, spacing, and visual flow',
54
+ properties: {
55
+ aspects: [
56
+ 'Grid systems (12-column, 8-point grid)',
57
+ 'Flexbox and CSS Grid',
58
+ 'Alignment and distribution',
59
+ 'Visual hierarchy and flow',
60
+ 'Responsive layouts (mobile-first)',
61
+ 'Container widths and breakpoints',
62
+ 'Z-index and stacking contexts'
63
+ ],
64
+ tools: ['CSS Grid', 'Flexbox', 'Layout frameworks']
65
+ }
66
+ },
67
+ {
68
+ name: 'Imagery',
69
+ description: 'Photos, illustrations, icons, and visual content',
70
+ properties: {
71
+ aspects: [
72
+ 'Image formats (WebP, AVIF, PNG, JPEG, SVG)',
73
+ 'Aspect ratios (16:9, 4:3, 1:1, golden ratio)',
74
+ 'Image optimization and compression',
75
+ 'Responsive images (srcset, picture element)',
76
+ 'Lazy loading strategies',
77
+ 'Alt text and accessibility',
78
+ 'Image composition and cropping'
79
+ ],
80
+ tools: ['Image optimizers', 'CDNs', 'Responsive image generators']
81
+ }
82
+ },
83
+ {
84
+ name: 'Iconography',
85
+ description: 'Icon systems, sizes, styles, and consistency',
86
+ properties: {
87
+ aspects: [
88
+ 'Icon styles (outlined, filled, rounded, sharp)',
89
+ 'Icon sizes (16px, 24px, 32px, 48px)',
90
+ 'SVG vs icon fonts',
91
+ 'Icon accessibility (aria-label, role)',
92
+ 'Consistent visual language',
93
+ 'Icon grid and alignment',
94
+ 'Color and state variations'
95
+ ],
96
+ tools: ['Material Icons', 'Font Awesome', 'Heroicons', 'Lucide']
97
+ }
98
+ },
99
+ {
100
+ name: 'Spacing',
101
+ description: 'Margins, padding, and rhythm systems',
102
+ properties: {
103
+ aspects: [
104
+ '8-point grid system (multiples of 8px)',
105
+ 'Spacing scale (4px, 8px, 16px, 24px, 32px, 48px, 64px)',
106
+ 'Vertical rhythm and baseline grid',
107
+ 'Component spacing consistency',
108
+ 'Responsive spacing (clamp, calc)',
109
+ 'Negative space and breathing room',
110
+ 'Optical alignment adjustments'
111
+ ],
112
+ tools: ['Spacing tokens', 'Design systems', 'CSS custom properties']
113
+ }
114
+ },
115
+ {
116
+ name: 'Motion',
117
+ description: 'Animations, transitions, and micro-interactions',
118
+ properties: {
119
+ aspects: [
120
+ 'Animation durations (100ms instant, 200ms fast, 300ms normal, 500ms slow)',
121
+ 'Easing functions (ease-in, ease-out, ease-in-out, spring)',
122
+ 'Transition properties (opacity, transform, color)',
123
+ 'Micro-interactions (hover, focus, active states)',
124
+ 'Loading states and skeletons',
125
+ 'Page transitions and route animations',
126
+ 'Reduced motion preferences (prefers-reduced-motion)'
127
+ ],
128
+ tools: ['CSS animations', 'Framer Motion', 'GSAP', 'Lottie']
129
+ }
130
+ },
131
+ {
132
+ name: 'Elevation',
133
+ description: 'Shadows, depth, and layering systems',
134
+ properties: {
135
+ aspects: [
136
+ 'Shadow levels (0-24 in Material Design)',
137
+ 'Box shadows vs drop shadows',
138
+ 'Layering and z-index hierarchy',
139
+ 'Depth perception and visual weight',
140
+ 'Elevation tokens (none, sm, md, lg, xl)',
141
+ 'Neumorphism and glassmorphism effects',
142
+ 'Dark mode shadow adjustments'
143
+ ],
144
+ tools: ['Shadow generators', 'Elevation systems', 'CSS filters']
145
+ }
146
+ }
147
+ ];
148
+
149
+ // ============================================================================
150
+ // 11 Design Principles
151
+ // ============================================================================
152
+
153
+ export const DESIGN_PRINCIPLES: DesignPrinciple[] = [
154
+ {
155
+ name: 'Balance',
156
+ description: 'Visual equilibrium through symmetrical or asymmetrical distribution of elements',
157
+ guidelines: [
158
+ 'Symmetrical balance: Mirror elements across a central axis',
159
+ 'Asymmetrical balance: Different elements with equal visual weight',
160
+ 'Radial balance: Elements radiating from a central point',
161
+ 'Use visual weight (size, color, position) to create balance',
162
+ 'Balance negative and positive space'
163
+ ]
164
+ },
165
+ {
166
+ name: 'Contrast',
167
+ description: 'Difference between elements to create visual interest and hierarchy',
168
+ guidelines: [
169
+ 'Color contrast: Light vs dark, complementary colors',
170
+ 'Size contrast: Large vs small elements',
171
+ 'Shape contrast: Geometric vs organic forms',
172
+ 'Texture contrast: Smooth vs rough surfaces',
173
+ 'Ensure sufficient contrast for accessibility (WCAG AA: 4.5:1)',
174
+ 'Use contrast to guide attention and create focal points'
175
+ ]
176
+ },
177
+ {
178
+ name: 'Hierarchy',
179
+ description: 'Organization of elements to show importance and guide user attention',
180
+ guidelines: [
181
+ 'Size hierarchy: Larger elements appear more important',
182
+ 'Color hierarchy: Bright/saturated colors draw attention',
183
+ 'Position hierarchy: Top-left to bottom-right reading pattern',
184
+ 'Typography hierarchy: h1 > h2 > h3 > body > caption',
185
+ 'Use F-pattern or Z-pattern for content layout',
186
+ 'Limit hierarchy levels to 3-4 for clarity'
187
+ ]
188
+ },
189
+ {
190
+ name: 'Unity',
191
+ description: 'Cohesion and consistency across all design elements',
192
+ guidelines: [
193
+ 'Consistent color palette throughout design',
194
+ 'Unified typography system (2-3 font families max)',
195
+ 'Repeated visual patterns and motifs',
196
+ 'Consistent spacing and alignment',
197
+ 'Shared design language across components',
198
+ 'Brand consistency in all touchpoints'
199
+ ]
200
+ },
201
+ {
202
+ name: 'Emphasis',
203
+ description: 'Creating focal points to draw attention to key elements',
204
+ guidelines: [
205
+ 'Use size, color, or position to create emphasis',
206
+ 'Limit focal points to 1-2 per screen/section',
207
+ 'Contrast emphasized elements with surroundings',
208
+ 'Use whitespace to isolate important elements',
209
+ 'Apply visual weight through color saturation or boldness',
210
+ 'Guide user journey with strategic emphasis'
211
+ ]
212
+ },
213
+ {
214
+ name: 'Rhythm',
215
+ description: 'Repetition and pattern to create visual flow and movement',
216
+ guidelines: [
217
+ 'Regular rhythm: Consistent spacing and repetition',
218
+ 'Progressive rhythm: Gradual changes in size or spacing',
219
+ 'Flowing rhythm: Organic, curved patterns',
220
+ 'Use rhythm to guide eye movement',
221
+ 'Create visual interest through varied repetition',
222
+ 'Maintain rhythm in grid systems and layouts'
223
+ ]
224
+ },
225
+ {
226
+ name: 'Proportion',
227
+ description: 'Relationship between element sizes and the overall composition',
228
+ guidelines: [
229
+ 'Golden ratio (1.618) for harmonious proportions',
230
+ 'Rule of thirds for composition',
231
+ 'Scale elements relative to their importance',
232
+ 'Maintain aspect ratios for images and containers',
233
+ 'Use proportional spacing systems (8-point grid)',
234
+ 'Consider viewport proportions for responsive design'
235
+ ]
236
+ },
237
+ {
238
+ name: 'White Space',
239
+ description: 'Negative space that provides breathing room and improves readability',
240
+ guidelines: [
241
+ 'Micro white space: Between letters, lines, and small elements',
242
+ 'Macro white space: Between major sections and components',
243
+ 'Use white space to create visual hierarchy',
244
+ 'Increase white space for premium/luxury feel',
245
+ 'Reduce clutter by embracing emptiness',
246
+ 'White space is not wasted space—it enhances comprehension'
247
+ ]
248
+ },
249
+ {
250
+ name: 'Consistency',
251
+ description: 'Uniformity in design patterns, behaviors, and visual language',
252
+ guidelines: [
253
+ 'Consistent component styling across the application',
254
+ 'Predictable interaction patterns (buttons, links, forms)',
255
+ 'Unified color usage (primary for actions, red for errors)',
256
+ 'Consistent spacing and alignment rules',
257
+ 'Standardized iconography and imagery style',
258
+ 'Follow platform conventions (iOS, Android, Web)'
259
+ ]
260
+ },
261
+ {
262
+ name: 'Accessibility',
263
+ description: 'Designing for all users, including those with disabilities',
264
+ guidelines: [
265
+ 'WCAG 2.1 Level AA compliance minimum',
266
+ 'Color contrast ratios: 4.5:1 for text, 3:1 for UI components',
267
+ 'Keyboard navigation support (tab order, focus states)',
268
+ 'Screen reader compatibility (semantic HTML, ARIA labels)',
269
+ 'Responsive text sizing (rem units, no fixed px)',
270
+ 'Support for reduced motion preferences',
271
+ 'Touch targets minimum 44x44px (iOS) or 48x48px (Android)'
272
+ ]
273
+ },
274
+ {
275
+ name: 'Responsiveness',
276
+ description: 'Adapting design to different screen sizes and devices',
277
+ guidelines: [
278
+ 'Mobile-first approach (design for smallest screen first)',
279
+ 'Breakpoints: 320px (mobile), 768px (tablet), 1024px (desktop), 1440px (large)',
280
+ 'Fluid typography (clamp, vw units)',
281
+ 'Flexible layouts (CSS Grid, Flexbox)',
282
+ 'Responsive images (srcset, picture element)',
283
+ 'Touch-friendly interactions on mobile',
284
+ 'Test on real devices, not just browser DevTools'
285
+ ]
286
+ }
287
+ ];
288
+
289
+ // ============================================================================
290
+ // 5 Skill Categories
291
+ // ============================================================================
292
+
293
+ export const SKILL_CATEGORIES: SkillCategory[] = [
294
+ {
295
+ name: 'Visual Design Fundamentals',
296
+ description: 'Core visual design skills and principles',
297
+ skills: [
298
+ 'Color theory and application',
299
+ 'Typography and type hierarchy',
300
+ 'Layout and composition',
301
+ 'Grid systems and alignment',
302
+ 'Visual hierarchy creation',
303
+ 'Balance and proportion',
304
+ 'Contrast and emphasis',
305
+ 'White space utilization',
306
+ 'Design system creation',
307
+ 'Style guide development'
308
+ ]
309
+ },
310
+ {
311
+ name: 'User Interface (UI) Design',
312
+ description: 'Designing interactive digital interfaces',
313
+ skills: [
314
+ 'Component design (buttons, inputs, cards)',
315
+ 'Navigation patterns (menus, tabs, breadcrumbs)',
316
+ 'Form design and validation states',
317
+ 'Modal and dialog design',
318
+ 'Responsive design patterns',
319
+ 'Mobile-first design',
320
+ 'Touch target sizing',
321
+ 'Icon design and selection',
322
+ 'Micro-interactions and animations',
323
+ 'Loading states and feedback'
324
+ ]
325
+ },
326
+ {
327
+ name: 'User Experience (UX) Design',
328
+ description: 'Creating intuitive and delightful user experiences',
329
+ skills: [
330
+ 'User research and personas',
331
+ 'Information architecture',
332
+ 'User flows and journey mapping',
333
+ 'Wireframing and prototyping',
334
+ 'Usability testing',
335
+ 'Accessibility design (WCAG compliance)',
336
+ 'Interaction design patterns',
337
+ 'Content strategy',
338
+ 'Error prevention and recovery',
339
+ 'Performance perception optimization'
340
+ ]
341
+ },
342
+ {
343
+ name: 'Technical Implementation',
344
+ description: 'Translating designs into code and technical specifications',
345
+ skills: [
346
+ 'HTML semantic structure',
347
+ 'CSS (Flexbox, Grid, custom properties)',
348
+ 'Responsive CSS (media queries, container queries)',
349
+ 'CSS animations and transitions',
350
+ 'Design tokens and theming',
351
+ 'Component-based architecture',
352
+ 'Accessibility implementation (ARIA, semantic HTML)',
353
+ 'Performance optimization (lazy loading, code splitting)',
354
+ 'Browser compatibility',
355
+ 'Design handoff and documentation'
356
+ ]
357
+ },
358
+ {
359
+ name: 'Design Tools & Workflow',
360
+ description: 'Proficiency with design tools and collaborative workflows',
361
+ skills: [
362
+ 'Figma (components, auto-layout, variants)',
363
+ 'Adobe XD / Sketch',
364
+ 'Prototyping tools (Framer, ProtoPie)',
365
+ 'Version control for design (Git, Abstract)',
366
+ 'Design system management',
367
+ 'Collaboration and feedback tools',
368
+ 'Asset export and optimization',
369
+ 'Design QA and review processes',
370
+ 'Handoff to development (Zeplin, Figma Dev Mode)',
371
+ 'Documentation and style guides'
372
+ ]
373
+ }
374
+ ];
375
+
376
+ // ============================================================================
377
+ // Core Module Export
378
+ // ============================================================================
379
+
380
+ export const VISUAL_DESIGN_CORE: DesignModule = {
381
+ name: 'visual-design-core',
382
+ version: '1.0.0',
383
+ description: 'Core visual design knowledge: 8 elements, 11 principles, 5 skill categories',
384
+ elements: DESIGN_ELEMENTS,
385
+ principles: DESIGN_PRINCIPLES,
386
+ skills: SKILL_CATEGORIES,
387
+ vendorPriority: ['google', 'microsoft', 'amazon']
388
+ };
389
+
390
+ // ============================================================================
391
+ // Helper Functions
392
+ // ============================================================================
393
+
394
+ /**
395
+ * Get a design element by name
396
+ */
397
+ export function getElement(name: string): DesignElement | undefined {
398
+ return DESIGN_ELEMENTS.find(
399
+ element => element.name.toLowerCase() === name.toLowerCase()
400
+ );
401
+ }
402
+
403
+ /**
404
+ * Get a design principle by name
405
+ */
406
+ export function getPrinciple(name: string): DesignPrinciple | undefined {
407
+ return DESIGN_PRINCIPLES.find(
408
+ principle => principle.name.toLowerCase() === name.toLowerCase()
409
+ );
410
+ }
411
+
412
+ /**
413
+ * Get a skill category by name
414
+ */
415
+ export function getSkillCategory(name: string): SkillCategory | undefined {
416
+ return SKILL_CATEGORIES.find(
417
+ category => category.name.toLowerCase() === name.toLowerCase()
418
+ );
419
+ }
420
+
421
+ /**
422
+ * Get all elements, principles, and skills as a summary
423
+ */
424
+ export function getCoreSummary(): {
425
+ elements: string[];
426
+ principles: string[];
427
+ skillCategories: string[];
428
+ } {
429
+ return {
430
+ elements: DESIGN_ELEMENTS.map(e => e.name),
431
+ principles: DESIGN_PRINCIPLES.map(p => p.name),
432
+ skillCategories: SKILL_CATEGORIES.map(s => s.name)
433
+ };
434
+ }
435
+
436
+ /**
437
+ * Validate if a design follows core principles
438
+ */
439
+ export function validateDesign(design: {
440
+ hasColorContrast: boolean;
441
+ hasTypographyHierarchy: boolean;
442
+ hasConsistentSpacing: boolean;
443
+ isAccessible: boolean;
444
+ isResponsive: boolean;
445
+ }): { valid: boolean; issues: string[] } {
446
+ const issues: string[] = [];
447
+
448
+ if (!design.hasColorContrast) {
449
+ issues.push('Insufficient color contrast (violates Contrast principle)');
450
+ }
451
+ if (!design.hasTypographyHierarchy) {
452
+ issues.push('Missing typography hierarchy (violates Hierarchy principle)');
453
+ }
454
+ if (!design.hasConsistentSpacing) {
455
+ issues.push('Inconsistent spacing (violates Consistency principle)');
456
+ }
457
+ if (!design.isAccessible) {
458
+ issues.push('Accessibility issues (violates Accessibility principle)');
459
+ }
460
+ if (!design.isResponsive) {
461
+ issues.push('Not responsive (violates Responsiveness principle)');
462
+ }
463
+
464
+ return {
465
+ valid: issues.length === 0,
466
+ issues
467
+ };
468
+ }
469
+