medesign 1.4.0 → 1.6.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 (51) hide show
  1. package/README.md +90 -72
  2. package/bin/mebolder.js +4 -0
  3. package/bin/medesign.js +370 -35
  4. package/bin/melint.js +4 -0
  5. package/bin/mepolish.js +4 -0
  6. package/bin/mequiet.js +4 -0
  7. package/bin/mesearch.js +4 -0
  8. package/bin/mesnapshot.js +4 -0
  9. package/examples/cadastral-qaqc-slide.html +577 -0
  10. package/examples/executive-summary-report.html +597 -0
  11. package/examples/executive-summary-report.pdf +0 -0
  12. package/examples/geospatial-banner-1200x630.html +370 -0
  13. package/examples/geospatial-banner-1200x630.svg +149 -0
  14. package/examples/linear-issue-board.html +1273 -0
  15. package/examples/snapshots/cadastral-qaqc-slide-desktop-1440x900.png +0 -0
  16. package/examples/snapshots/cadastral-qaqc-slide-mobile-390x844.png +0 -0
  17. package/examples/snapshots/cadastral-qaqc-slide-tablet-820x1180.png +0 -0
  18. package/examples/snapshots/executive-summary-report-desktop-1440x900.png +0 -0
  19. package/examples/snapshots/executive-summary-report-mobile-390x844.png +0 -0
  20. package/examples/snapshots/executive-summary-report-tablet-820x1180.png +0 -0
  21. package/examples/snapshots/geospatial-banner-1200x630-og-banner-1200x630.png +0 -0
  22. package/examples/snapshots/linear-issue-board-desktop-1440x900.png +0 -0
  23. package/examples/snapshots/linear-issue-board-mobile-390x844.png +0 -0
  24. package/examples/snapshots/linear-issue-board-tablet-820x1180.png +0 -0
  25. package/examples/snapshots/spotify-web-player-desktop-1440x900.png +0 -0
  26. package/examples/snapshots/spotify-web-player-mobile-390x844.png +0 -0
  27. package/examples/snapshots/spotify-web-player-tablet-820x1180.png +0 -0
  28. package/examples/spotify-web-player.html +1446 -0
  29. package/package.json +16 -4
  30. package/presets/metha/guidelines.md +26 -17
  31. package/presets/metha/preset.json +16 -16
  32. package/references/ai-tells.md +9 -2
  33. package/references/brand-design-tokens.md +27 -28
  34. package/references/brief-intake.md +90 -0
  35. package/references/catalog.json +1031 -1023
  36. package/references/cli-architecture.md +1 -1
  37. package/references/compositor-smoothness.md +161 -0
  38. package/references/design-core.md +11 -4
  39. package/references/executive-reports.md +234 -0
  40. package/references/image-mockup-direction.md +53 -53
  41. package/references/image-to-code.md +46 -46
  42. package/references/modern-craft-invariants.md +55 -9
  43. package/references/prompt-templates.md +49 -0
  44. package/references/quality-gate.md +42 -12
  45. package/references/typography-thai-latin.md +206 -0
  46. package/references/view-transitions-engine.md +89 -0
  47. package/references/web-retrofit-protocol.md +103 -0
  48. package/scripts/export-tokens.js +419 -403
  49. package/tests/browser-audit.js +463 -442
  50. package/tests/linter.js +49 -4
  51. package/tests/snapshot.js +266 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # ME-DESIGN v1.4.0
1
+ # ME-DESIGN v1.6.1
2
2
 
3
- **The Autonomous Design Engineering System & Quality Linter for AI Coding Assistants**
3
+ **The Autonomous Design Engineering System, Deterministic Quality Linter & Auto-Compiler for AI Coding Assistants**
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
6
  [![CI Matrix](https://github.com/methastrategy/medesign/actions/workflows/ci.yml/badge.svg)](https://github.com/methastrategy/medesign/actions/workflows/ci.yml)
@@ -8,36 +8,49 @@
8
8
  [![Node Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
9
9
  [![Status](https://img.shields.io/badge/status-production--ready-emerald.svg)]()
10
10
  [![Archetypes](https://img.shields.io/badge/archetypes-38%20models-indigo.svg)]()
11
+ [![Brand Systems](https://img.shields.io/badge/brands-74%20global%20systems-purple.svg)]()
11
12
 
12
13
  *Eliminate AI Slop and bring optical mathematics, perceptual color science, and mission-critical engineering rigor to automated UI/UX generation.*
13
14
 
14
15
  ---
15
16
 
16
- </div>
17
-
18
17
  ## 🌟 Why ME-DESIGN?
19
18
 
20
19
  Most AI-generated user interfaces suffer from **Decisionless Uniformity**: generic 3-card grids, oversaturated neon glows, clipping Thai/Latin font metrics, broken keyboard accessibility, and non-proportional press deformations.
21
20
 
22
- **ME-DESIGN** changes the paradigm from subjective aesthetic prompting to an **executable 5-Engine Design Architecture** coupled with a **Dual-Tier Quality Linter**, **Knowledge Discovery Search Engine**, and **Self-Healing Code Repair**.
21
+ **ME-DESIGN** changes the paradigm from subjective aesthetic prompting to an **executable 5-Engine Design Architecture** coupled with a **Dual-Tier Quality Linter**, **Knowledge Discovery Search Engine**, **Self-Healing Code Repair**, **Interactive Brief Intake Gate (v2.3)**, and **74 Global Brand Multi-Pane Systems**.
22
+
23
+ ---
24
+
25
+ ## 🖼️ Visual Showcase & Responsive Render Gallery
26
+
27
+ Pre-rendered directly by ME-DESIGN's Headless Chrome CDP Engine across Desktop (1440×900) and Mobile (390×844) viewports:
28
+
29
+ | Design System & Archetype | Desktop View (1440×900) | Mobile View (390×844) |
30
+ | :--- | :--- | :--- |
31
+ | **Cadastral Engineering QA/QC**<br>*(Archetype 38 — Geospatial Precision)* | <img src="examples/snapshots/cadastral-qaqc-slide-desktop-1440x900.png" width="480" alt="Cadastral QA/QC Dashboard"> | <img src="examples/snapshots/cadastral-qaqc-slide-mobile-390x844.png" width="160" alt="Cadastral QA/QC Mobile"> |
32
+ | **Linear Issue Board**<br>*(Archetype 06 — Linear Minimal & High-Density)* | <img src="examples/snapshots/linear-issue-board-desktop-1440x900.png" width="480" alt="Linear Issue Board"> | <img src="examples/snapshots/linear-issue-board-mobile-390x844.png" width="160" alt="Linear Mobile"> |
33
+ | **Spotify Web Player**<br>*(Archetype 21 — Decoupled 3-Pane Media Studio)* | <img src="examples/snapshots/spotify-web-player-desktop-1440x900.png" width="480" alt="Spotify Web Player"> | <img src="examples/snapshots/spotify-web-player-mobile-390x844.png" width="160" alt="Spotify Mobile"> |
34
+ | **Executive Saliency Report**<br>*(Archetype 02 — Swiss International Editorial)* | <img src="examples/snapshots/executive-summary-report-desktop-1440x900.png" width="480" alt="Executive Summary Report"> | <img src="examples/snapshots/executive-summary-report-mobile-390x844.png" width="160" alt="Executive Mobile"> |
23
35
 
24
36
  ---
25
37
 
26
38
  ## ⚔️ Multi-Dimensional Competitive Benchmark
27
39
 
28
- | Dimension | `medesign` (v1.4.0) | `ui-ux-pro-max-skill` | `pbakaus/impeccable` |
40
+ | Dimension | `medesign` (v1.6.0) | `ui-ux-pro-max-skill` | `pbakaus/impeccable` |
29
41
  | :--- | :--- | :--- | :--- |
30
42
  | **Execution Architecture** | **Autonomous Node.js CLI & Deterministic Engine** | Prompt-only System Text | Markdown Guidelines & Rules |
43
+ | **Brief Intake Protocol** | **Dual-Layer Auto-Intent Routing & 1-Click Cockpit Gate** | Free-form Prompting | Manual Instructions |
31
44
  | **Verification Gate** | **Mathematical Q-Score (0–100) + Hard Invariants** | Subjective LLM Self-Critique | Manual Inspection Checklist |
32
- | **Self-Healing Code Repair** | **Automatic AST/Regex Fixer (`medesign polish`)** | Re-prompting Prompt Loop | Manual Code Editing |
45
+ | **Self-Healing Code Repair** | **Deterministic Pattern & Style Fixer (`medesign polish`)** | Re-prompting Prompt Loop | Manual Code Editing |
33
46
  | **Conversational Modifiers** | **Instant Code Density (`bolder` / `quiet`)** | Chat Revision Re-rolls | None |
34
- | **Knowledge Discovery** | **Pure Node.js Search across 38 Archetypes & Presets** | Static Markdown Reading | Static Document Browsing |
47
+ | **Knowledge Discovery** | **Pure Node.js Search across 38 Archetypes & 74 Brands** | Static Markdown Reading | Static Document Browsing |
35
48
  | **Automated CI/CD Quality Gate** | **Native OASIS SARIF v2.1.0 for GitHub Code Scanning** | None | None |
36
49
  | **Perceptual Color Science** | **OKLCH / OKLab Gamut Mapping & `color-mix()`** | Standard Hex / sRGB Defaults | Hex / sRGB Recommendations |
37
50
  | **Headless Browser Matrix** | **Chrome DevTools Protocol (Real Contrast & 44px Hit-Targets)** | None | Manual Browser DevTools |
38
51
  | **Design Token Standards** | **Tailwind v4 `@theme`, W3C DTCG & CSS Custom Properties** | Unstructured CSS Snippets | None |
39
- | **Domain Archetype Depth** | **38 Decoupled Archetypes (HMI ISA-101, GIS Cadastre, Telemetry)** | Generic SaaS / E-commerce | General UI Polish Rules |
40
- | **Runtime Package Footprint** | **Zero-Dependency CLI (< 300 KB compressed on npm)** | Multi-file Prompt Repos | Docs / Repo Only |
52
+ | **Domain Archetype Depth** | **38 Decoupled Archetypes + 74 Brand Systems (HMI, GIS, Audio)** | Generic SaaS / E-commerce | General UI Polish Rules |
53
+ | **Runtime Package Footprint** | **Zero-Dependency CLI & Comprehensive Ruleset on npm** | Multi-file Prompt Repos | Docs / Repo Only |
41
54
 
42
55
  ---
43
56
 
@@ -54,7 +67,7 @@ ME-DESIGN Core Engine
54
67
 
55
68
  ---
56
69
 
57
- ## 📐 38 Production Archetypes (5-Axis Decoupled Matrix)
70
+ ## 📐 38 Production Archetypes & 74 Global Brand Systems
58
71
 
59
72
  ME-DESIGN decouples UI synthesis across 5 independent axes:
60
73
  **Operational Archetype × Visual Language × Spatial Model × Motion Profile × Governance Tier**
@@ -68,85 +81,90 @@ ME-DESIGN decouples UI synthesis across 5 independent axes:
68
81
  - **31. Mission Control HMI (ISA-101 Standard):** Tri-state alarms, greyscale base, operator decision priority.
69
82
  - **32. Geospatial Situation Awareness (GIS & Cadastre):** Map-centric 16:10 / 100dvh, linked selection tables, EPSG coordinates.
70
83
  - **33. CAD Precision Workbench:** Maximized canvas, floating command bar, geometric snap indicators.
71
- - **34. Telemetry & Signal Forensics:** Time-series scrubbing, stale sensor detection, gap indicators.
72
- - **35. Anomaly Triage & Incident Response:** Priority queue, severity vs confidence matrix.
73
- - **36. Field Survey & Offline Operations:** 52px touch targets, RTK fix status, offline sync queue.
74
- - **37. Spatiotemporal Change Detection:** Synchronized dual viewports, epoch time slider.
75
- - **38. Data Provenance & Survey QA/QC:** Observation lineage, error ellipses, legal timestamp seals.
84
+ - **74 Global Brand Multi-Pane Systems:** Pre-calibrated spatial layouts and design tokens for premier brands (Apple, Spotify, Linear, Tesla, Stripe, Bloomberg, GitHub, Vercel, Porsche, Teenage Engineering, etc.).
76
85
 
77
86
  ---
78
87
 
79
- ## 🚀 Quickstart: Running via `npx` (Zero Installation)
88
+ ## 📦 Installation & Global CLI
80
89
 
81
- Execute ME-DESIGN immediately without manual installation:
90
+ Install globally or execute instantly with `npx`:
82
91
 
83
92
  ```bash
84
- # 1. Discover archetypes, palettes, and typography for any domain query
85
- npx medesign search "cadastre survey"
86
- npx medesign search "apple hardware"
87
- npx medesign search "tesla telemetry"
93
+ # Direct execution without permanent installation
94
+ npx medesign <command>
88
95
 
89
- # 2. Self-healing code repair (auto-fixes MD005 focus rings, 100dvh, dead buttons, em-dashes)
90
- npx medesign polish path/to/index.html
96
+ # Or install globally
97
+ npm install -g medesign
98
+ ```
91
99
 
92
- # 3. Fine-tune visual density and tone directly in code
93
- npx medesign bolder path/to/index.html # Boost font weights, sharpen borders, raise contrast
94
- npx medesign quiet path/to/index.html # Soften font weights, reduce borders to hairlines
100
+ ### Verified CLI Commands
95
101
 
96
- # 4. Lint an HTML, JSX, or CSS file with static AST & invariant rules
97
- npx medesign lint path/to/index.html
102
+ ```text
103
+ ME-DESIGN CLI v1.6.1
104
+ Autonomous Design Engineering Toolkit & Automated Linter for AI Coding Assistants
98
105
 
99
- # 5. Lint and export OASIS SARIF v2.1.0 for GitHub Code Scanning
100
- npx medesign lint path/to/index.html --format sarif
106
+ USAGE:
107
+ medesign <command> [options]
101
108
 
102
- # 6. Run headless Chrome DevTools Protocol verification matrix
103
- # (Computes real contrast ratios, tab focus indicators, and 44px hit-targets)
104
- npx medesign audit path/to/index.html
109
+ COMMANDS:
110
+ search <query> Search 38 Archetypes & presets with discovery engine
111
+ Options: --json
105
112
 
106
- # 7. Export design tokens to Tailwind CSS v4 @theme, W3C DTCG, or CSS variables
107
- npx medesign tokens --preset apple --format tailwind --out ./tokens
113
+ polish <file> Self-healing repair for Hard Invariants (MD005, MD104, em-dash)
114
+ Options: --dry-run
108
115
 
109
- # 8. Verify system health, Node.js version, and headless browser availability
110
- npx medesign doctor
111
- ```
116
+ bolder <file> Boost visual density, font weights, and border contrast
112
117
 
113
- ### 🔎 Knowledge Discovery Engine (`medesign search`)
118
+ quiet <file> Softens visual density, font weights, and border treatments
114
119
 
115
- Query the 38 production archetypes and design system presets to get immediate, actionable styling recommendations:
120
+ lint <file> Lint HTML/CSS/JSX file with deterministic pattern & architectural rules
121
+ Options: --format <text|json|sarif>
122
+ --preset <apple|tesla|metha>
123
+ --config <path>
116
124
 
117
- ```bash
118
- # Human-focused Terminal Summary Card
119
- npx medesign search "cadastre survey"
125
+ audit <file> Run headless Chrome DevTools Protocol verification matrix
126
+ (Checks computed contrast, tab focus outline, 44px hit-targets across viewports)
127
+ Options: --json
120
128
 
121
- # Output structured JSON for AI agent orchestration
122
- npx medesign search "luxury fintech" --json
123
- ```
129
+ snapshot <file> Capture high-DPI rendered screenshots across responsive viewports
130
+ Options: --out <dir>, --og (1200x630 banner), --viewports <list>
124
131
 
125
- ```text
126
- ME-DESIGN Discovery Engine
127
- ────────────────────────────────────────
128
- Query "cadastre survey"
129
- Best Match Archetype 38: Cadastral Survey & QA/QC Workbench
130
- Preset Link metha (Metha Engineering Cockpit)
131
-
132
- DESIGN ARCHETYPE RECOMMENDATION
133
- Archetype Cadastral Survey & Data Provenance (38)
134
- Spatial Model 16:10 / 100dvh Map-Centric with Split Data Grid
135
- Primary Color Electric Cyan (oklch(0.85 0.18 200))
136
- Secondary Color Passed Emerald (oklch(0.72 0.18 145))
137
- Surface Contrast Ultra-Dark Obsidian (#0a0d14)
138
- Typography JetBrains Mono + IBM Plex Sans Thai
139
- Motion Profile Precision Linear (120ms max)
140
- ────────────────────────────────────────
132
+ tokens [export] Export preset design tokens to Tailwind v4 @theme, W3C DTCG, or CSS
133
+ Options: --preset <apple|tesla|metha|all>
134
+ --format <tailwind|dtcg|css|all>
135
+ --out <directory>
136
+
137
+ presets [list|get] Inspect available design system presets
138
+ Usage: medesign presets list
139
+ medesign presets get <preset-name>
140
+
141
+ test [options] Run deterministic test suite across fixtures
142
+ Options: --browser (runs both static pattern and headless browser matrix)
143
+
144
+ doctor Verify local environment, Node.js, and Chrome/CDP availability
145
+
146
+ help Display this help message
141
147
  ```
142
148
 
143
- ### 🛠️ Self-Healing Code Repair (`medesign polish`)
149
+ ---
150
+
151
+ ## 🛠️ Automated Quality Linter & Self-Healing Repair
144
152
 
145
- Automatically inspect and repair Hard Invariants in your HTML/CSS files without waiting for manual edits:
153
+ ### 🛡️ Deterministic Static Rules Linter (`medesign lint`)
146
154
 
147
- - **MD005:** Injects physical `:focus-visible` outlines and `@media (forced-colors: active)` support when `box-shadow` is used without an outline.
148
- - **MD104:** Replaces unstable `100vh` on containers with dynamic `100dvh` (`min-height: 100vh; min-height: 100dvh;`).
149
- - **MD004:** Injects hover and active states for buttons without defined interactive contracts.
155
+ ```bash
156
+ # Output human-readable terminal report
157
+ npx medesign lint path/to/dashboard.html
158
+
159
+ # Output SARIF 2.1.0 JSON format for GitHub Code Scanning
160
+ npx medesign lint path/to/dashboard.html --format sarif > medesign-results.sarif
161
+ ```
162
+
163
+ ### 🩹 Self-Healing Repair (`medesign polish`)
164
+
165
+ Automatically inspects and repairs hard invariants directly in code:
166
+ - **MD104:** Replaces raw unconstrained `100vh` with safe modern `100dvh` fallbacks.
167
+ - **MD005:** Replaces `outline: none` with physical `:focus-visible` rings and `@media (forced-colors: active)`.
150
168
  - **MD002:** Adds `@media (prefers-reduced-motion)` accessibility gates.
151
169
  - **MD201:** Cleans up decorative AI-tell em-dashes `—` (including entity `&mdash;`) into clean hyphens `-`.
152
170
 
@@ -179,13 +197,13 @@ npx medesign quiet path/to/dashboard.html
179
197
  ### The Terminal Quality Audit Card
180
198
 
181
199
  ```text
182
- ME-DESIGN v1.4.0
200
+ ME-DESIGN v1.6.0
183
201
  Design Quality & Governance Audit
184
202
  ────────────────────────────────────────
185
203
  Target dashboard.tsx
186
204
  Archetype Geospatial Situation Awareness (32)
187
- Analysis Static AST & Semantic Rules
188
- Ruleset medesign-standard@1.4.0
205
+ Analysis Deterministic Static Pattern Rules
206
+ Ruleset medesign-standard@1.6.0
189
207
 
190
208
  QUALITY SCORE (Q = 0.30H + 0.25I + 0.20G + 0.15R + 0.10V)
191
209
  Hierarchy (H) 94.0 / 100
@@ -212,9 +230,9 @@ RESULT: PASS (Exit Code: 0)
212
230
 
213
231
  ME-DESIGN provides shared rule adapters for all major agentic tools:
214
232
 
233
+ - **Google Antigravity:** Native Skill supported under `skills/medesign/SKILL.md`
215
234
  - **Claude Code:** Copy `integrations/claude-code/SKILL.md` to `.claude/skills/medesign/SKILL.md`
216
235
  - **Cursor:** Copy `integrations/cursor/medesign.mdc` to `.cursor/rules/medesign.mdc`
217
- - **Google Antigravity:** Native Skill supported under `skills/medesign/SKILL.md`
218
236
 
219
237
  ---
220
238
 
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+
3
+ process.argv.splice(2, 0, 'bolder');
4
+ require('./medesign.js');