medesign 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -86
- package/SKILL.md +169 -0
- package/bin/medesign.js +130 -27
- package/data/cip/deliverables.csv +51 -0
- package/data/cip/industries.csv +21 -0
- package/data/cip/mockup-contexts.csv +21 -0
- package/data/cip/styles.csv +21 -0
- package/data/icon/styles.csv +16 -0
- package/data/logo/colors.csv +56 -0
- package/data/logo/industries.csv +56 -0
- package/data/logo/styles.csv +56 -0
- package/docs/architecture/v1.7-proposal.md +279 -0
- package/docs/audit/COMPETITIVE-BENCHMARK.md +101 -0
- package/docs/audit/INITIAL-SOURCE-AUDIT.md +89 -0
- package/docs/benchmark/BENCHMARK-SUITE.md +97 -0
- package/docs/roadmap/FRONTEND-DESIGN-SKILL-ROADMAP.md +277 -0
- package/examples/snapshots/cadastral-qaqc-slide-desktop-1440x900.png +0 -0
- package/examples/snapshots/cadastral-qaqc-slide-mobile-390x844.png +0 -0
- package/examples/snapshots/cadastral-qaqc-slide-tablet-820x1180.png +0 -0
- package/package.json +85 -81
- package/presets/metha/design-tokens.css +12 -12
- package/references/design-routing.md +96 -207
- package/references/quality-gate.md +1 -1
- package/references/slides-copywriting-formulas.md +5 -8
- package/references/slides-layout-patterns.md +8 -23
- package/references/slides-strategies.md +0 -10
- package/tests/browser-audit.js +24 -6
- package/tests/linter.js +131 -13
- package/tests/snapshot.js +5 -2
- package/tests/visual-testbed.html +682 -681
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
No,Style Name,Category,Keywords,Primary Colors,Secondary Colors,Typography,Effects,Best For,Avoid For,Complexity,Era
|
|
2
|
+
1,Minimalist,General,"clean, simple, essential, whitespace, geometric, modern",#000000 #FFFFFF #F5F5F5,Single accent only,Sans-serif thin weight,"None, sharp edges, high contrast",Tech startups SaaS apps professional services,Playful brands children entertainment,Low,2010s-Present
|
|
3
|
+
2,Wordmark,Typography,"logotype, text-only, custom lettering, brand name",Brand-specific,Monochromatic,Custom modified typeface,"Kerning adjustments, ligatures",Established brands name recognition,Complex names visual-heavy industries,Low,Classic
|
|
4
|
+
3,Lettermark,Typography,"monogram, initials, abbreviated, compact",Brand-specific usually 2 colors,Minimal accent,Bold geometric sans-serif,"Interlocking letters, negative space",Long company names professional firms,Consumer brands needing recognition,Medium,Classic
|
|
5
|
+
4,Pictorial Mark,Symbol,"icon, image, symbol, standalone graphic",Brand-specific,Supporting colors,Paired with wordmark,"Clean lines, scalable shapes",Recognizable brands global companies,Startups unknown brands,Medium,Classic
|
|
6
|
+
5,Abstract Mark,Symbol,"geometric, non-representational, unique shape",Bold vibrant colors,Gradient or flat,Modern sans-serif pairing,"Gradients, 3D effects, flat design",Tech companies differentiating brands,Traditional industries,Medium,Modern
|
|
7
|
+
6,Mascot,Illustrated,"character, cartoon, friendly, approachable",Warm vibrant palette,Multiple supporting colors,Rounded friendly typeface,"Illustrated, expressions, poses",Food brands sports teams children products,Luxury finance professional services,High,Various
|
|
8
|
+
7,Emblem,Badge,"seal, crest, enclosed, official",#1E3A8A #FFD700 #000000,Metallic accents,Serif or gothic typeface,"Banners, shields, circular frame",Universities government traditional brands,Modern tech startups,High,Classic
|
|
9
|
+
8,Combination Mark,Hybrid,"icon + text, versatile, complete",Brand-specific,Coordinated palette,Balanced with icon,"Lockup variations, responsive",New brands versatile applications,Simple recognition needs,Medium,Various
|
|
10
|
+
9,Vintage/Retro,Aesthetic,"nostalgic, heritage, classic, established",#8B4513 #F5DEB3 #2F4F4F,Muted earth tones,Serif script or slab serif,"Distressed, worn, textured",Craft brands heritage products artisan goods,Modern tech forward brands,Medium,1920s-1970s
|
|
11
|
+
10,Art Deco,Aesthetic,"geometric, elegant, 1920s, glamorous",#FFD700 #000000 #1C1C1C,Metallic gold silver,Geometric display typeface,"Sharp angles, symmetry, luxury feel",Luxury hotels fashion high-end products,Budget casual brands,High,1920s-1930s
|
|
12
|
+
11,Hand-Drawn,Illustrated,"organic, authentic, imperfect, artisan",Earth tones warm colors,Natural palette,Script or hand-lettered,"Sketched, brush strokes, uneven lines",Artisan products bakeries creative brands,Corporate tech professional,Medium,Timeless
|
|
13
|
+
12,Geometric,Modern,"shapes, mathematical, precise, structured",Bold primary colors,Contrasting accent,Geometric sans-serif,"Clean angles, perfect shapes, symmetry",Tech architecture modern brands,Organic natural brands,Low,Modern
|
|
14
|
+
13,Gradient,Modern,"color transition, vibrant, dynamic, dimensional",Multi-color spectrum,Smooth transitions,Modern sans-serif,"Color flow, blur effects, 3D depth",Tech apps social media modern brands,Traditional conservative industries,Medium,2015-Present
|
|
15
|
+
14,Flat Design,Modern,"2D, solid colors, no shadows, minimal",Bright solid colors,Limited palette 3-4 max,Clean sans-serif,"No gradients, no shadows, simple shapes",Apps websites digital products,Luxury traditional premium,Low,2010s-Present
|
|
16
|
+
15,3D/Isometric,Modern,"dimensional, perspective, layered, technical",Cool tech colors,Highlight shadows,Modern geometric,"Depth, shadows, highlights, perspective",Tech gaming architecture firms,Simple classic brands,High,2018-Present
|
|
17
|
+
16,Negative Space,Clever,"hidden element, dual meaning, optical illusion",Usually 2 colors max,High contrast pairs,Clean readable font,"Clever cutouts, figure-ground reversal",Creative agencies clever brands,Straightforward industries,Medium,Timeless
|
|
18
|
+
17,Line Art,Minimal,"outline, single weight, continuous, elegant",#000000 or single color,Monochromatic,Thin weight sans-serif,"Stroke only, no fills, continuous lines",Fashion beauty boutique brands,Bold energetic brands,Low,Modern
|
|
19
|
+
18,Neon/Glow,Aesthetic,"vibrant, electric, nightlife, digital",#FF00FF #00FFFF #39FF14,Dark backgrounds,Bold display typeface,"Glow effect, light emission, bright",Entertainment nightlife gaming,Corporate healthcare traditional,Medium,1980s/Modern
|
|
20
|
+
19,Brutalist,Bold,"raw, stark, bold, anti-design",#FF0000 #0000FF #FFFF00 #000000,Primary colors only,Heavy bold sans-serif,"No effects, raw, bold blocks",Art creative counter-culture tech blogs,Conservative corporate healthcare,Low,1950s/2020s Revival
|
|
21
|
+
20,Luxury/Premium,Aesthetic,"elegant, sophisticated, high-end, refined",#000000 #FFFFFF #FFD700,Gold silver metallics,Elegant serif thin sans,"Foil, emboss, minimal, premium feel",Fashion jewelry luxury real estate,Budget mass-market casual,Medium,Timeless
|
|
22
|
+
21,Playful/Fun,Aesthetic,"colorful, whimsical, energetic, youthful",Rainbow bright palette,Multi-color variety,Rounded bubbly typeface,"Bouncy, irregular, decorative elements",Children brands toys entertainment,Serious finance legal medical,Medium,Various
|
|
23
|
+
22,Corporate/Professional,Business,"trustworthy, stable, serious, established",#003366 #666666 #FFFFFF,Conservative blues grays,Clean professional sans,"Subtle, refined, balanced",Financial legal consulting corporate,Creative entertainment youth,Low,Classic
|
|
24
|
+
23,Tech/Digital,Industry,"modern, innovative, forward, digital",#0080FF #00D4FF #6366F1,Gradient tech colors,Geometric modern sans,"Circuit, pixel, data visualization",Technology startups software apps,Traditional handmade artisan,Medium,Modern
|
|
25
|
+
24,Organic/Natural,Aesthetic,"flowing, nature, sustainable, eco",#228B22 #8B4513 #87CEEB,Earth tones greens,Organic flowing typeface,"Leaf, water, natural textures",Eco brands wellness organic food,Industrial tech urban,Medium,Timeless
|
|
26
|
+
25,Swiss/International,Design,"grid-based, rational, clean, functional",#000000 #FFFFFF neutral,Minimal color use,Helvetica style sans-serif,"Grid alignment, mathematical spacing",Corporate design professional,Decorative playful brands,Low,1950s-Present
|
|
27
|
+
26,Bauhaus,Design,"geometric, functional, primary colors, modernist",#FF0000 #FFFF00 #0000FF #000000,Primary colors only,Geometric sans-serif,"Circles squares triangles, functional",Architecture design schools modern brands,Traditional ornate decorative,Medium,1920s-1930s
|
|
28
|
+
27,Grunge,Aesthetic,"distressed, rough, textured, alternative",Dark muted colors,Earth tones blacks,Distressed or stencil type,"Scratched, worn, dirty textures",Music alternative fashion street brands,Luxury corporate clean,Medium,1990s
|
|
29
|
+
28,Watercolor,Artistic,"soft, artistic, fluid, organic",Soft pastel washes,Blended transitions,Script or delicate serif,"Paint bleeding, soft edges, artistic",Art galleries wedding florists beauty,Tech corporate industrial,High,Artistic
|
|
30
|
+
29,Monogram Luxury,Typography,"intertwined initials, fashion, heritage",#000000 #FFD700 #FFFFFF,Gold black combinations,Custom serif letterforms,"Interlocking, overlapping, refined",Fashion houses luxury brands hotels,Casual budget consumer,Medium,Classic
|
|
31
|
+
30,Vintage Badge,Retro,"circular, heritage, authentic, craft",#8B4513 #2F4F4F #D4AF37,Muted vintage palette,Serif or slab serif,"Banners, stars, established dates",Breweries coffee shops craft brands,Modern minimalist tech,High,1900s-1950s
|
|
32
|
+
31,Responsive/Adaptive,Modern,"scalable, flexible, multi-format",Brand-specific,Consistent across sizes,Legible at all sizes,"Multiple lockups, favicon version",Digital-first brands multi-platform,Print-only traditional,Medium,2015-Present
|
|
33
|
+
32,Motion-Ready,Digital,"animated, dynamic, kinetic, digital",Vibrant animated-friendly,Colors that transition well,Sans-serif legible in motion,"Designed for animation, morphing shapes",Digital brands apps social media,Static print-only brands,High,2018-Present
|
|
34
|
+
33,Duotone,Modern,"two-color, high contrast, bold, graphic",Two contrasting colors,No additional colors,Bold sans-serif,"Two-color overlay, high contrast",Graphic design music modern brands,Multi-color needs complex imagery,Low,2016-Present
|
|
35
|
+
34,Split/Fragmented,Experimental,"broken, deconstructed, modern, artistic",Bold contrasting,Highlight fragments,Modern experimental type,"Sliced, separated, glitch-like",Creative agencies art design studios,Conservative traditional corporate,High,2018-Present
|
|
36
|
+
35,Outline/Stroke,Minimal,"hollow, transparent, modern, light",Single color or gradient,Background contrast,Matching weight typeface,"Stroke only, no fill, see-through",Fashion tech modern minimal brands,Bold impactful needs,Low,Modern
|
|
37
|
+
36,Stamp/Seal,Vintage,"official, authentic, approved, certified",#8B0000 #000080 #006400,Ink-like colors,Bold condensed typeface,"Circular, aged, ink texture",Artisan coffee postal craft brands,Modern digital tech,Medium,Classic
|
|
38
|
+
37,Calligraphic,Typography,"flowing, elegant, hand-written, artistic",#000000 gold metallics,Minimal accent colors,Custom calligraphy,"Flourishes, swashes, elegant strokes",Wedding luxury fashion beauty,Tech corporate industrial,High,Timeless
|
|
39
|
+
38,Pixel Art,Digital,"8-bit, retro gaming, nostalgic, digital",Bright limited palette,Classic game colors,Pixel or blocky typeface,"Pixelated, grid-based, retro game feel",Gaming retro apps indie games,Luxury professional corporate,Medium,1980s Revival
|
|
40
|
+
39,Symmetrical,Balanced,"mirror, balanced, harmonious, stable",Balanced color scheme,Matching halves,Centered balanced type,"Perfect mirror, radial symmetry",Corporate wellness balanced brands,Dynamic energetic brands,Low,Timeless
|
|
41
|
+
40,Asymmetrical,Dynamic,"unbalanced, modern, dynamic, interesting",Bold accent placement,Contrasting weights,Off-center experimental,"Intentional imbalance, visual tension",Creative modern art fashion,Traditional stable corporate,Medium,Modern
|
|
42
|
+
41,Mascot Modern,Character,"simplified mascot, flat character, friendly",Bright character colors,Supporting brand colors,Rounded friendly sans,"Flat design mascot, simple shapes",Tech apps startups modern food brands,Serious luxury traditional,Medium,2015-Present
|
|
43
|
+
42,Monoline,Minimal,"single line weight, consistent, clean",Single color typically,Monochromatic,Matching weight typeface,"Uniform stroke, no weight variation",Coffee shops boutiques craft brands,Bold impactful industrial,Low,Modern
|
|
44
|
+
43,Letterform,Typography,"single letter, initial, bold statement",Brand primary color,Background contrast,Custom letter design,"One letter, modified, distinctive",Personal brands design studios agencies,Multi-initial brands corporations,Medium,Classic
|
|
45
|
+
44,Wordmark Script,Typography,"handwritten, signature, personal, elegant",#000000 or gold,Minimal supporting,Custom script typeface,"Flowing, connected, signature-like",Fashion designers personal brands,Corporate tech industrial,Medium,Timeless
|
|
46
|
+
45,Crest/Heraldic,Traditional,"coat of arms, royal, established, heritage",#1E3A8A #8B0000 #FFD700,Traditional regal colors,Serif blackletter,"Shield, crown, banners, symbols",Universities sports teams luxury brands,Modern casual startups,High,Classic
|
|
47
|
+
46,Circular,Shape,"round, infinite, complete, unified",Enclosed palette,Internal colors,Curved or circular type,"Full circle, badge-like, contained",Global brands apps communities,Angular sharp brands,Medium,Timeless
|
|
48
|
+
47,Hexagonal,Shape,"modern, tech, honeycomb, structured",Tech-forward colors,Geometric accent,Modern geometric sans,"Six-sided, tessellating, tech feel",Tech blockchain chemical science,Traditional organic natural,Medium,Modern
|
|
49
|
+
48,Dynamic Mark,Motion,"movement, speed, progress, forward",Energetic warm colors,Motion blur colors,Italic or forward-leaning,"Motion lines, implied movement",Sports logistics transportation,Static calm wellness,Medium,Modern
|
|
50
|
+
49,Eco/Sustainable,Values,"green, sustainable, recycling, earth-friendly",#228B22 #8FBC8F #2E8B57,Natural greens browns,Organic rounded typeface,"Leaf, recycle, earth, natural elements",Eco brands organic sustainable business,Luxury industrial chemical,Medium,2000s-Present
|
|
51
|
+
50,Healthcare/Medical,Industry,"trust, care, health, professional",#0077B6 #00A896 #FFFFFF,Calming blues greens,Clean professional sans,"Cross, heart, human figures, care",Hospitals clinics health wellness,Entertainment gaming fashion,Medium,Classic
|
|
52
|
+
51,Legal/Financial,Industry,"trust, stability, establishment, serious",#003366 #1E3A8A #4A5568,Navy blue conservative,Traditional serif,"Scales, pillars, shields, professional",Law firms banks financial services,Playful creative casual,Low,Classic
|
|
53
|
+
52,Food/Restaurant,Industry,"appetizing, warm, inviting, delicious",#DC2626 #F97316 #CA8A04,Warm appetizing colors,Friendly readable type,"Utensils, chef hat, food imagery",Restaurants cafes food delivery,Tech healthcare professional,Medium,Various
|
|
54
|
+
53,Real Estate,Industry,"home, trust, growth, property",#0F766E #0369A1 #000000,Blues greens professional,Clean professional sans,"House, roof, key, door imagery",Property agencies home services,Entertainment gaming tech,Medium,Classic
|
|
55
|
+
54,Education,Industry,"knowledge, growth, trust, achievement",#4F46E5 #7C3AED #059669,Blues purples greens,Clear readable typeface,"Book, cap, torch, learning symbols",Schools universities edtech,Entertainment luxury consumer,Medium,Classic
|
|
56
|
+
55,Music/Entertainment,Industry,"dynamic, creative, expressive, bold",#7C3AED #EC4899 #F59E0B,Vibrant expressive colors,Bold display typeface,"Sound waves, notes, dynamic shapes",Labels studios streaming venues,Corporate healthcare financial,Medium,Various
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# ME-DESIGN v1.7 — Architecture Proposal
|
|
2
|
+
|
|
3
|
+
> **Status:** Adopted Roadmap Blueprint
|
|
4
|
+
> **Source:** ChatGPT Technical Review & Architectural Consultation (October 2026)
|
|
5
|
+
> **Target Release:** v1.7.0+
|
|
6
|
+
> **Guiding Principle:** Keep the core engine lightweight (0 mandatory runtime dependencies for AI coding agents), make deeper analysis capability-driven (opt-in parsers), and require empirical evidence before declaring an interface compliant or a repair successful.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. Multi-Tier Operating Modes
|
|
11
|
+
|
|
12
|
+
ME-DESIGN separates execution into three distinct capability layers:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
16
|
+
│ 1. Core Mode — Minimal Overhead (0 Runtime Dependencies) │
|
|
17
|
+
│ - Bespoke lexical scanner and shared source offsets │
|
|
18
|
+
│ - Shared Intermediate Representation (IR): ElementRecord, StyleRule │
|
|
19
|
+
│ - Design token validation & deterministic pattern rules │
|
|
20
|
+
│ - Transactional auto-repair with safe staging, backup & rollback │
|
|
21
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
22
|
+
│ 2. Extended Mode — Syntax-Aware Analysis (Opt-in Parsers) │
|
|
23
|
+
│ - HTML: parse5 for standards-compliant HTML tree construction │
|
|
24
|
+
│ - CSS: css-tree or PostCSS for selector specificity & nested at-rules│
|
|
25
|
+
│ - JSX/TSX: TypeScript compiler API or dedicated JSX parser │
|
|
26
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
27
|
+
│ 3. Verification Mode — Actual Rendered Behavior (Headless Chrome/CDP) │
|
|
28
|
+
│ - Real computed styles, bounding box measurements (44px hit-targets) │
|
|
29
|
+
│ - Responsive layout stability & horizontal overflow detection │
|
|
30
|
+
│ - Keyboard focus visibility & forced-colors high contrast simulation │
|
|
31
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The essential distinction: **Static analysis establishes that a rule appears to be satisfied in source code; browser verification proves that the rendered interface behaves correctly.** ME-DESIGN reports this distinction explicitly.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 2. Shared Intermediate Representation (IR)
|
|
39
|
+
|
|
40
|
+
Rules must never independently rescan raw source text with ad-hoc regular expressions. Elements and style declarations are extracted once into a shared schema:
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
type SourceRange = {
|
|
44
|
+
startOffset: number;
|
|
45
|
+
endOffset: number;
|
|
46
|
+
startLine: number;
|
|
47
|
+
startColumn: number;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type ElementRecord = {
|
|
51
|
+
id: string;
|
|
52
|
+
syntax: "html" | "jsx";
|
|
53
|
+
tagName: string | null;
|
|
54
|
+
componentName?: string;
|
|
55
|
+
attributes: Record<string, string | null>;
|
|
56
|
+
parentId?: string;
|
|
57
|
+
children: string[];
|
|
58
|
+
source: SourceRange;
|
|
59
|
+
confidence: "exact" | "partial";
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
type StyleDeclaration = {
|
|
63
|
+
property: string;
|
|
64
|
+
value: string;
|
|
65
|
+
important: boolean;
|
|
66
|
+
source: SourceRange;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
type StyleRule = {
|
|
70
|
+
selectors: string[];
|
|
71
|
+
declarations: StyleDeclaration[];
|
|
72
|
+
atRulePath: string[];
|
|
73
|
+
source: SourceRange;
|
|
74
|
+
parseStatus: "parsed" | "partial" | "unsupported";
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
type AnalysisEvidence = {
|
|
78
|
+
ruleId: string;
|
|
79
|
+
status: "pass" | "fail" | "unknown" | "not-applicable";
|
|
80
|
+
evidence: string[];
|
|
81
|
+
sourceRanges: SourceRange[];
|
|
82
|
+
method: "static" | "browser";
|
|
83
|
+
};
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Invariant Checks & Diagnostic Confidence
|
|
87
|
+
|
|
88
|
+
- **`:focus-visible` (MD001 / MD005):**
|
|
89
|
+
- *Static:* Extracts selectors and declarations with source locations.
|
|
90
|
+
- *Browser:* Emulates keyboard focus on interactive elements and measures computed outline/ring contrast.
|
|
91
|
+
- **44px Hit Targets (MD003 / MD106):**
|
|
92
|
+
- *Static:* Scans for `min-width`, `min-height`, padding, and decoupled halos (`.touch-halo`).
|
|
93
|
+
- *Browser:* Measures actual rendered `getBoundingClientRect()`:
|
|
94
|
+
$$W_i = \operatorname{width}(\operatorname{rect}(e_i)), \quad H_i = \operatorname{height}(\operatorname{rect}(e_i))$$
|
|
95
|
+
$$T_i = (W_i \ge 44 \land H_i \ge 44) ? 1 : 0$$
|
|
96
|
+
- **Reduced Motion (MD002):**
|
|
97
|
+
- *Static:* Verifies enclosing `@media (prefers-reduced-motion: reduce)` at-rule blocks for matching animated selectors.
|
|
98
|
+
- *Browser:* Emulates `prefers-reduced-motion` and verifies computed `animation-duration` and `transition-duration`.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 3. Mathematically Grounded Q-Score Model
|
|
103
|
+
|
|
104
|
+
### 3.1 Hard-Gate Invariants vs Continuous Dimensions
|
|
105
|
+
|
|
106
|
+
The release decision must never be overridden or masked by an aggregate numeric score.
|
|
107
|
+
|
|
108
|
+
Let each mandatory invariant be $h_j \in \{\text{PASS}, \text{FAIL}, \text{INCOMPLETE}, \text{NOT-APPLICABLE}\}$.
|
|
109
|
+
|
|
110
|
+
$$\text{Gate} = \begin{cases}
|
|
111
|
+
\text{FAIL}, & \exists j: h_j = \text{FAIL} \\
|
|
112
|
+
\text{INCOMPLETE}, & \exists j: h_j = \text{INCOMPLETE} \\
|
|
113
|
+
\text{PASS}, & \text{all applicable mandatory invariants pass}
|
|
114
|
+
\end{cases}$$
|
|
115
|
+
|
|
116
|
+
### 3.2 Continuous Scoring Dimensions
|
|
117
|
+
|
|
118
|
+
| Dimension ($S_k$) | Weight ($w_k$) | Measurable Signals |
|
|
119
|
+
| :--- | :---: | :--- |
|
|
120
|
+
| **Contrast Quality** | 0.20 | Actual computed contrast ratios against target threshold $\tau_i$ |
|
|
121
|
+
| **Responsiveness** | 0.20 | Absence of horizontal overflow, clipped content, layout shifts |
|
|
122
|
+
| **Token Adherence** | 0.15 | Ratio of eligible declarations using approved design tokens |
|
|
123
|
+
| **Spacing & Geometry** | 0.15 | Spacing-scale adherence, concentric radii math, boundary clearance |
|
|
124
|
+
| **Typography** | 0.10 | Fluid scaling, line-height ratios, font-stack priority |
|
|
125
|
+
| **Interaction States** | 0.10 | Coverage of hover, active, focus-visible, disabled, loading |
|
|
126
|
+
| **Visual Consistency** | 0.10 | Palette harmonization, elevation hierarchy, squint-test focus |
|
|
127
|
+
|
|
128
|
+
### 3.3 Weighted Geometric Mean Formula
|
|
129
|
+
|
|
130
|
+
Continuous dimensions are combined using a weighted geometric mean to penalize catastrophic failures in any single dimension:
|
|
131
|
+
|
|
132
|
+
$$Q = 100 \cdot \prod_{k} \left(\max(\epsilon, S_k / 100)\right)^{w_k}$$
|
|
133
|
+
|
|
134
|
+
*(where $\sum w_k = 1.0$ and $\epsilon = 0.01$ prevents logarithmic singularities)*
|
|
135
|
+
|
|
136
|
+
### 3.4 Evidence Coverage Gating
|
|
137
|
+
|
|
138
|
+
Every dimension reports its evidence coverage:
|
|
139
|
+
|
|
140
|
+
$$E_k = 100 \cdot \frac{\text{weight of evaluated checks}}{\text{weight of all applicable checks}}$$
|
|
141
|
+
|
|
142
|
+
If overall evidence coverage $< 90\%$, the score is flagged as `DIAGNOSTIC_ONLY` / `INSUFFICIENT_EVIDENCE` rather than presenting an unverified passing score.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 4. Transactional Auto-Repair Specification
|
|
147
|
+
|
|
148
|
+
File modifications in `medesign polish` must follow a fail-closed transactional lifecycle:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
[1. Lock & Hash]
|
|
152
|
+
│
|
|
153
|
+
[2. Transform in Memory]
|
|
154
|
+
│
|
|
155
|
+
[3. Write to Staging (.medesign-stage-*)]
|
|
156
|
+
│
|
|
157
|
+
[4. Pre-Commit Validation] ──(Failed)──> [Abort & Remove Staging]
|
|
158
|
+
│ (Pass / Not Dry-Run)
|
|
159
|
+
[5. Create Backup (.medesign-backup-*)]
|
|
160
|
+
│
|
|
161
|
+
[6. Atomic Rename / Commit]
|
|
162
|
+
│
|
|
163
|
+
[7. Post-Commit Verification] ──(Failed)──> [Rollback to Backup & Verify Hash]
|
|
164
|
+
│ (Pass)
|
|
165
|
+
[8. Release Lock & Cleanup]
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Reference Implementation Contract (`src/repair/transaction.js`)
|
|
169
|
+
|
|
170
|
+
```javascript
|
|
171
|
+
'use strict';
|
|
172
|
+
const fs = require('node:fs/promises');
|
|
173
|
+
const path = require('node:path');
|
|
174
|
+
const crypto = require('node:crypto');
|
|
175
|
+
|
|
176
|
+
function hash(data) {
|
|
177
|
+
return crypto.createHash('sha256').update(data).digest('hex');
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function siblingPath(target, label, extension = '') {
|
|
181
|
+
return path.join(
|
|
182
|
+
path.dirname(target),
|
|
183
|
+
`.${path.basename(target, path.extname(target))}.medesign-${label}-${crypto.randomUUID()}${extension}`
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
async function transactionalRepair({
|
|
188
|
+
filePath,
|
|
189
|
+
transform,
|
|
190
|
+
validators,
|
|
191
|
+
dryRun = false,
|
|
192
|
+
keepBackup = false
|
|
193
|
+
}) {
|
|
194
|
+
const target = path.resolve(filePath);
|
|
195
|
+
const directory = path.dirname(target);
|
|
196
|
+
const extension = path.extname(target);
|
|
197
|
+
|
|
198
|
+
const lockPath = `${target}.medesign.lock`;
|
|
199
|
+
let lock;
|
|
200
|
+
let ownsLock = false;
|
|
201
|
+
let stagePath;
|
|
202
|
+
let backupPath;
|
|
203
|
+
let committed = false;
|
|
204
|
+
let preserveBackup = false;
|
|
205
|
+
|
|
206
|
+
try {
|
|
207
|
+
lock = await fs.open(lockPath, 'wx', 0o600);
|
|
208
|
+
ownsLock = true;
|
|
209
|
+
await lock.writeFile(JSON.stringify({ pid: process.pid, startedAt: new Date().toISOString() }));
|
|
210
|
+
await lock.sync();
|
|
211
|
+
|
|
212
|
+
const originalBytes = await fs.readFile(target);
|
|
213
|
+
const originalHash = hash(originalBytes);
|
|
214
|
+
const originalText = originalBytes.toString('utf8');
|
|
215
|
+
|
|
216
|
+
const candidate = await transform(originalText, { filePath: target, originalHash });
|
|
217
|
+
const candidateBytes = Buffer.from(candidate, 'utf8');
|
|
218
|
+
const candidateHash = hash(candidateBytes);
|
|
219
|
+
|
|
220
|
+
if (candidateHash === originalHash) {
|
|
221
|
+
return { ok: true, changed: false, committed: false };
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
stagePath = siblingPath(target, 'stage', extension);
|
|
225
|
+
await fs.writeFile(stagePath, candidateBytes);
|
|
226
|
+
|
|
227
|
+
// Pre-commit validation
|
|
228
|
+
const beforeCommit = await validateCandidate(stagePath, target, validators, 'pre-commit');
|
|
229
|
+
if (!beforeCommit.ok) {
|
|
230
|
+
return { ok: false, changed: true, committed: false, reason: 'candidate-validation-failed', validation: beforeCommit };
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (dryRun) {
|
|
234
|
+
return { ok: true, dryRun: true, changed: true, committed: false, preview: candidate };
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Backup creation & Atomic rename
|
|
238
|
+
backupPath = siblingPath(target, 'backup');
|
|
239
|
+
await fs.writeFile(backupPath, originalBytes);
|
|
240
|
+
|
|
241
|
+
await fs.rename(stagePath, target);
|
|
242
|
+
stagePath = undefined;
|
|
243
|
+
committed = true;
|
|
244
|
+
|
|
245
|
+
// Post-commit validation
|
|
246
|
+
const afterCommit = await validateCandidate(target, target, validators, 'post-commit');
|
|
247
|
+
if (!afterCommit.ok) {
|
|
248
|
+
await fs.writeFile(target, originalBytes); // Safe rollback
|
|
249
|
+
committed = false;
|
|
250
|
+
return { ok: false, changed: true, committed: false, rolledBack: true, reason: 'post-commit-validation-failed' };
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return { ok: true, changed: true, committed: true, originalHash, candidateHash };
|
|
254
|
+
} finally {
|
|
255
|
+
if (stagePath) await fs.unlink(stagePath).catch(() => {});
|
|
256
|
+
if (backupPath && !preserveBackup && !keepBackup) await fs.unlink(backupPath).catch(() => {});
|
|
257
|
+
if (ownsLock && lock) {
|
|
258
|
+
await lock.close().catch(() => {});
|
|
259
|
+
await fs.unlink(lockPath).catch(() => {});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 5. Release Roadmap
|
|
268
|
+
|
|
269
|
+
- **v1.6.1 (Immediate Hotfix):**
|
|
270
|
+
- Security: Eliminate fixture path shell injection in `tests/runner.js` with `spawnSync`.
|
|
271
|
+
- Reliability: Correct `medesign polish` exit code and `--dry-run` flag.
|
|
272
|
+
- Diagnostics: Separate static vs browser status in `medesign doctor`.
|
|
273
|
+
- Documentation: Align CLI help & README descriptions with deterministic pattern rules.
|
|
274
|
+
- **v1.7.0 (Core Transactional & Shared IR):**
|
|
275
|
+
- Integrate `src/repair/transaction.js` into the CLI.
|
|
276
|
+
- Implement shared lexical scanner and `ElementRecord` / `StyleRule` IR.
|
|
277
|
+
- **v1.8.0 (Mathematical Q-Score & Parser Adapters):**
|
|
278
|
+
- Implement weighted geometric mean scoring engine with explicit `E_k` evidence coverage.
|
|
279
|
+
- Add optional `parse5` and `css-tree` adapter interfaces for Extended Mode.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Competitive Benchmark: Frontend Design Skills
|
|
2
|
+
|
|
3
|
+
**Reviewed:** 2026-11-24
|
|
4
|
+
**Purpose:** Extract design and engineering patterns that can inform ME-DESIGN without copying proprietary text, data or implementation.
|
|
5
|
+
|
|
6
|
+
This is a qualitative source review of public repository files, not a controlled performance benchmark. Repository popularity is not treated as proof of quality.
|
|
7
|
+
|
|
8
|
+
## 1. References reviewed
|
|
9
|
+
|
|
10
|
+
| Project | Source | Observed strength | Lesson for ME-DESIGN |
|
|
11
|
+
|---|---|---|---|
|
|
12
|
+
| Anthropic Frontend Design | [anthropics/skills - frontend-design](https://github.com/anthropics/skills/tree/main/skills/frontend-design) | Distinctive design direction grounded in real subject matter; plan, critique and restraint; careful UX copy | Make the brief and product context drive the aesthetic. Keep the root skill compact and opinionated. |
|
|
13
|
+
| UI UX Pro Max | [nextlevelbuilder/ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) | Searchable structured data across products, styles, typography, colours, landing patterns, charts, UX and stacks; BM25 + regex search; design-system generation; source-of-truth and asset-sync process | Turn the existing ME-DESIGN catalogue into a curated, queryable knowledge system with provenance and validation. |
|
|
14
|
+
| Impeccable | [pbakaus/impeccable](https://github.com/pbakaus/impeccable) | Small targeted commands for design iteration; persistent `PRODUCT.md` and `DESIGN.md`; scored critique and technical audit; deterministic detection; hooks and CI integration | Make the common actions obvious and targeted. Persist product/design context and let checks run without relying on memory. |
|
|
15
|
+
| Vercel Web Design Guidelines | [vercel-labs/agent-skills - web-design-guidelines](https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines) | Focused review skill; explicit instruction to read bundled rules; pinned upstream commit and SHA-256; terse file-oriented findings | Use short instructions, versioned rule snapshots and precise file/line output. |
|
|
16
|
+
| Taste Skill | [Leonxlnx/taste-skill](https://github.com/Leonxlnx/taste-skill/tree/main/skills/taste-skill) | Page-kind and business-aware design planning; concrete layout/asset workflow; build finish gate and browser checks | Use explicit page/domain context and real rendered verification, but keep recipes optional and context-specific. |
|
|
17
|
+
|
|
18
|
+
## 2. What makes each approach useful
|
|
19
|
+
|
|
20
|
+
### Anthropic Frontend Design: taste and creative direction
|
|
21
|
+
|
|
22
|
+
The reviewed skill puts the subject, audience and primary job ahead of visual styling. It asks the agent to commit to a clear concept, plan a compact token system, review that plan against the brief, then build and critique. It also warns against repeating the same aesthetic defaults across projects and treats interface writing as part of design.
|
|
23
|
+
|
|
24
|
+
**Adopt:** brief-led direction, specificity, critique, restraint, copy quality and creative complexity matched to the task.
|
|
25
|
+
|
|
26
|
+
**Do not over-apply:** a mandatory planning ceremony for one-line edits. The value is intentionality, not extra chat turns.
|
|
27
|
+
|
|
28
|
+
### UI UX Pro Max: design knowledge as a product
|
|
29
|
+
|
|
30
|
+
The reviewed repository describes structured datasets, domain-based search, stack-specific guidance and a hybrid BM25/regex ranking engine. It also documents a clear source-of-truth and generated-asset sync process.
|
|
31
|
+
|
|
32
|
+
**Adopt:** well-structured and searchable knowledge; framework-aware recommendations; explicit data provenance; schema checks; reproducible generated outputs.
|
|
33
|
+
|
|
34
|
+
**Do not over-apply:** letting a large database choose the design in place of the product brief. Search should narrow options and explain fit, not force a template.
|
|
35
|
+
|
|
36
|
+
### Impeccable: useful iteration verbs and operational QA
|
|
37
|
+
|
|
38
|
+
The README describes targeted actions such as critique, audit, polish, harden, adapt and optimize. It also describes product/design context files and automated detector workflows in an agent or CI environment. Its documentation distinguishes code-only static rules from checks that require a rendered URL.
|
|
39
|
+
|
|
40
|
+
**Adopt:** targeted workflows, persistent project context, priority-ranked findings, automatic checks and distinct static/browser execution.
|
|
41
|
+
|
|
42
|
+
**Do not over-apply:** a long command vocabulary that users must memorise. ME-DESIGN should accept natural-language requests first and use concise aliases second.
|
|
43
|
+
|
|
44
|
+
### Vercel Web Design Guidelines: concise and reviewable
|
|
45
|
+
|
|
46
|
+
The reviewed skill is deliberately narrow: read a bundled rules file, inspect specified files, apply the rules and return concise file-oriented findings. Its upstream rules are pinned to a commit and checksum.
|
|
47
|
+
|
|
48
|
+
**Adopt:** a small routing skill, immutable/versioned reference snapshots, narrow scope and precise findings.
|
|
49
|
+
|
|
50
|
+
**Do not over-apply:** treating a review checklist as a complete design-generation process.
|
|
51
|
+
|
|
52
|
+
### Taste Skill: real-world specificity and finish gates
|
|
53
|
+
|
|
54
|
+
The reviewed skill uses explicit site/page kinds, business context, actual assets and a repeatable build sequence. It also calls for a finish gate and a browser-verified result.
|
|
55
|
+
|
|
56
|
+
**Adopt:** page/domain-aware composition, asset planning, real implementation and rendered finish checks.
|
|
57
|
+
|
|
58
|
+
**Do not over-apply:** universal page-height, section-count, photography or motion rules. A GIS workbench, admin dashboard, finance table and marketing page should not share the same rigid recipe.
|
|
59
|
+
|
|
60
|
+
## 3. ME-DESIGN's differentiated strengths
|
|
61
|
+
|
|
62
|
+
ME-DESIGN already has valuable assets that should be refined rather than discarded:
|
|
63
|
+
|
|
64
|
+
- Engineering, GIS, cadastral, CAD, telemetry, field-survey and QA/QC archetypes that many general frontend skills do not foreground.
|
|
65
|
+
- Thai/Latin typography guidance and attention to diacritics.
|
|
66
|
+
- Optical geometry and perceptual colour work.
|
|
67
|
+
- A Node CLI, presets, token export, SARIF output, fixtures, CDP browser tooling and snapshot generation.
|
|
68
|
+
- A substantial reference library and cross-agent adapters.
|
|
69
|
+
|
|
70
|
+
The opportunity is to make these assets easier to reach, less prescriptive and more rigorously verified.
|
|
71
|
+
|
|
72
|
+
## 4. The target synthesis
|
|
73
|
+
|
|
74
|
+
ME-DESIGN should combine five strengths:
|
|
75
|
+
|
|
76
|
+
1. **Anthropic-like design intent:** subject, users, primary job and original visual direction.
|
|
77
|
+
2. **Pro Max-like intelligence:** curated, searchable, stack-aware design knowledge.
|
|
78
|
+
3. **Impeccable-like iteration:** clear targeted actions and persistent project context.
|
|
79
|
+
4. **Vercel-like review discipline:** concise rules, pinned sources and file/line findings.
|
|
80
|
+
5. **Taste-like finish quality:** real assets, domain-aware layout and browser verification.
|
|
81
|
+
|
|
82
|
+
The differentiator should be the integration of these strengths with ME-DESIGN's engineering/GIS knowledge and safe frontend QA.
|
|
83
|
+
|
|
84
|
+
## 5. Anti-patterns ME-DESIGN should avoid
|
|
85
|
+
|
|
86
|
+
- One default font family, colour palette, radius, grid or card treatment for every product.
|
|
87
|
+
- Mandatory dark mode, three-pane cockpit, Bento layout, gradients or motion.
|
|
88
|
+
- Treating "zero em dash" or a preferred aesthetic as an accessibility invariant.
|
|
89
|
+
- Requiring every possible UI state for every component irrespective of its function.
|
|
90
|
+
- Treating one regex match as proof that all interactive elements are accessible.
|
|
91
|
+
- Treating a static heuristic score as a visual/browser measurement.
|
|
92
|
+
- Auto-rewriting arbitrary code or visible/non-visible text because a pattern matched.
|
|
93
|
+
- Requiring users to answer a large intake form when the repository or brief already contains the answer.
|
|
94
|
+
- Presenting a long list of style options without a recommendation and rationale.
|
|
95
|
+
|
|
96
|
+
## 6. Source-review limitations
|
|
97
|
+
|
|
98
|
+
- This review inspects selected public repository files, not every file, issue, release or user workflow.
|
|
99
|
+
- No comparative implementation benchmark was executed in the same model, framework, prompt set or browser environment.
|
|
100
|
+
- Public examples and feature claims are treated as project documentation, not independent proof of quality.
|
|
101
|
+
- ME-DESIGN should conduct a reproducible prompt-and-code benchmark in Phase 6 before making superiority claims.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Initial Source Audit: ME-DESIGN
|
|
2
|
+
|
|
3
|
+
**Baseline commit:** `48296cb49b0da6ae60ff6edcbd77cc82616335b6`
|
|
4
|
+
**Baseline version:** `1.6.1`
|
|
5
|
+
**Review date:** 2026-11-24
|
|
6
|
+
**Scope:** Source and workflow review through GitHub repository files. No local install, `npm test`, browser execution or visual user testing was performed during this baseline review.
|
|
7
|
+
|
|
8
|
+
## 1. Executive summary
|
|
9
|
+
|
|
10
|
+
ME-DESIGN has a meaningful foundation: domain-specific design references, reusable presets, token export, CLI commands, a fixture-based linter, a CDP browser verifier, snapshots and CI workflows.
|
|
11
|
+
|
|
12
|
+
The primary risk is not missing features. It is the gap between the strength of the claims and the evidence produced by the current implementation. The first priority is to make the safety and verification model trustworthy, then improve skill usability and only then expand the design knowledge and automation surface.
|
|
13
|
+
|
|
14
|
+
## 2. Confirmed source findings
|
|
15
|
+
|
|
16
|
+
| ID | Priority | File(s) | Finding | Risk |
|
|
17
|
+
|---|---|---|---|---|
|
|
18
|
+
| AUD-001 | P0 | `tests/linter.js` | MD001-MD005 take their severity from `config.rules`; the hard-failure calculation only includes hard invariants whose severity is `error`. | A custom `off` or weaker severity can bypass the hard gate. |
|
|
19
|
+
| AUD-002 | P0 | `tests/linter.js` | Inline suppression preprocessing accepts generic rule IDs, including hard-invariant IDs. | A hard rule can be hidden by a suppression comment. |
|
|
20
|
+
| AUD-003 | P0 | `bin/medesign.js` | `polish` writes the candidate to the original file before the post-repair audit. The post-audit starts with `isPassed = true` and catches errors without failing closed. | A missing or malformed post-audit report can leave modified code and a misleading PASS. A rejected candidate is not rolled back. |
|
|
21
|
+
| AUD-004 | P1 | `tests/linter.js` | The engine uses global text/pattern checks for several rules, while descriptions call it AST/semantic analysis. For example, one occurrence of `:focus-visible` can satisfy the global focus-presence test. | False confidence and false positives/negatives. |
|
|
22
|
+
| AUD-005 | P1 | `tests/linter.js` | The score is derived from rule-count deductions; hierarchy starts at a constant 95. | The Q-Score is a static heuristic, not a direct measurement of rendered hierarchy or visual quality. |
|
|
23
|
+
| AUD-006 | P1 | `tests/browser-audit.js` | Some browser checks use fixed delays and the text-contrast check samples a limited set of text nodes. | Slow-loading or later-page elements may be missed; results can be timing-sensitive. |
|
|
24
|
+
| AUD-007 | P1 | `package.json`, `tests/browser-audit.js`, `tests/snapshot.js` | The package declares Node `>=18`, while browser tooling instantiates the global `WebSocket`. Node documents the global WebSocket as added in v20.10.0 and stable in v22.4.0. | The advertised minimum runtime does not match the browser tool's runtime API requirements. |
|
|
25
|
+
| AUD-008 | P2 | `.github/workflows/ci.yml` | SARIF upload uses `continue-on-error: true`. | A report-upload failure can be hidden from the workflow result. |
|
|
26
|
+
| AUD-009 | P2 | `SKILL.md` | The root instructions require a full brief/direction ritual and announce a mode even for work that could be small and unambiguous. | Higher interaction cost and unnecessary questions. |
|
|
27
|
+
| AUD-010 | P2 | `SKILL.md`, `references/` | The entry skill routes into a large reference collection, while many design rules are phrased as broad universal requirements. | Cognitive load and the risk of applying a domain-specific preference to the wrong product. |
|
|
28
|
+
|
|
29
|
+
## 3. Important implementation details
|
|
30
|
+
|
|
31
|
+
### AUD-001 / AUD-002 - hard invariants
|
|
32
|
+
|
|
33
|
+
The code marks MD001-MD005 as `hardInvariant: true`, but severity is resolved from user configuration. The gate later filters with both conditions: `hardInvariant && severity === 'error'`. Inline suppression preprocessing also accepts generic identifiers.
|
|
34
|
+
|
|
35
|
+
**Required behaviour:** MD001-MD005 must remain blocking. If exceptions are needed in the future, they must use an explicit, reviewable waiver model and must not silently turn a gate green.
|
|
36
|
+
|
|
37
|
+
### AUD-003 - polish gate
|
|
38
|
+
|
|
39
|
+
The current flow:
|
|
40
|
+
1. Reads and transforms the source.
|
|
41
|
+
2. Writes the transformed content directly to the original path.
|
|
42
|
+
3. Runs the linter afterward.
|
|
43
|
+
4. Defaults to a passing state and swallows post-audit exceptions.
|
|
44
|
+
|
|
45
|
+
It also used a truthy fallback for the pre-audit score (`parsed.qScore || 80.0`), which does not preserve a legitimate numeric zero.
|
|
46
|
+
|
|
47
|
+
**Required behaviour:** validate the candidate in a temporary sibling file, require a valid machine-readable report, replace the original only after a genuine pass, and remove the temporary file on every failure path.
|
|
48
|
+
|
|
49
|
+
### AUD-004 / AUD-005 - honesty of the verification model
|
|
50
|
+
|
|
51
|
+
The current linter is a static heuristic engine using source-pattern checks. It does not parse every HTML/CSS/JSX construct into an AST and does not render the page. The score's category values are also partly fixed and deducted according to detected rule counts.
|
|
52
|
+
|
|
53
|
+
**Required behaviour:** call it a static pattern/heuristic check until parser-backed analysis exists. Expose the score as `static-heuristic`; do not describe it as a browser-verified or perceptual design score.
|
|
54
|
+
|
|
55
|
+
### AUD-006 - browser evidence
|
|
56
|
+
|
|
57
|
+
The browser verifier does use Chrome DevTools Protocol, which is a useful foundation. However, fixed waits and limited element sampling reduce confidence. Browser startup and cleanup/error paths also need focused tests.
|
|
58
|
+
|
|
59
|
+
**Required behaviour:** use explicit readiness conditions, inspect the complete relevant element set, distinguish audit failure from environment failure, and close child processes and CDP resources in a guaranteed cleanup path.
|
|
60
|
+
|
|
61
|
+
### AUD-007 - runtime compatibility
|
|
62
|
+
|
|
63
|
+
The package currently advertises `node >=18.0.0`. The browser tooling uses the global `WebSocket`; the official Node.js documentation records this API as added in v20.10.0 and stable in v22.4.0. See [Node.js global WebSocket documentation](https://nodejs.org/api/globals.html#class-websocket).
|
|
64
|
+
|
|
65
|
+
**Required decision:** either raise the engine floor to a version with stable native WebSocket support, or add and test a compatible WebSocket implementation for the declared minimum runtime. Do not leave the mismatch undocumented.
|
|
66
|
+
|
|
67
|
+
## 4. Skill-level findings
|
|
68
|
+
|
|
69
|
+
- The main skill combines frontend design, graphic design, slides, reports and brand systems. This breadth can remain in the repository, but the primary frontend workflow should be clearer.
|
|
70
|
+
- A full A/B direction pitch should be optional for substantial or ambiguous projects, not mandatory for a simple task.
|
|
71
|
+
- Project context (product, users, design conventions and stack) should be inspected and recorded where useful.
|
|
72
|
+
- The skill should distinguish universal engineering constraints from visual preferences and context-specific heuristics.
|
|
73
|
+
- "No em dash", a particular font pairing, a dark palette or a Bento layout should never be described as an accessibility requirement.
|
|
74
|
+
- Existing project conventions and business logic should be preserved unless the user asks to change them.
|
|
75
|
+
|
|
76
|
+
## 5. Immediate remediation order
|
|
77
|
+
|
|
78
|
+
1. **P0:** make hard invariants non-overridable and suppression-safe.
|
|
79
|
+
2. **P0:** make `polish` fail-closed and atomic.
|
|
80
|
+
3. **P1:** correct terminology and expose the static score type.
|
|
81
|
+
4. **P1:** resolve the Node/WebSocket compatibility contract.
|
|
82
|
+
5. **P1:** improve browser readiness, coverage and cleanup.
|
|
83
|
+
6. **P2:** simplify the root skill and adopt the fast/deep workflow.
|
|
84
|
+
7. **P2:** organise and validate the design knowledge base.
|
|
85
|
+
8. **P2:** improve CI, compatibility and release provenance.
|
|
86
|
+
|
|
87
|
+
## 6. Verification status
|
|
88
|
+
|
|
89
|
+
This is a source review, not an executed test report. The findings above are derived from the reviewed source and workflow files. No claim is made that the existing test suite passes or fails in a live runtime. Each remediation must add regression coverage and record actual command output before being marked complete.
|