@symbo.ls/mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.env.example +16 -0
  2. package/.env.railway +13 -0
  3. package/LICENSE +21 -0
  4. package/README.md +184 -0
  5. package/mcp.json +57 -0
  6. package/package.json +20 -0
  7. package/pyproject.toml +25 -0
  8. package/railway.toml +26 -0
  9. package/run.sh +17 -0
  10. package/symbols_mcp/__init__.py +1 -0
  11. package/symbols_mcp/server.py +1114 -0
  12. package/symbols_mcp/skills/ACCESSIBILITY.md +471 -0
  13. package/symbols_mcp/skills/ACCESSIBILITY_AUDITORY.md +70 -0
  14. package/symbols_mcp/skills/AGENT_INSTRUCTIONS.md +257 -0
  15. package/symbols_mcp/skills/BRAND_INDENTITY.md +69 -0
  16. package/symbols_mcp/skills/BUILT_IN_COMPONENTS.md +304 -0
  17. package/symbols_mcp/skills/CLAUDE.md +2158 -0
  18. package/symbols_mcp/skills/CLI_QUICK_START.md +205 -0
  19. package/symbols_mcp/skills/DESIGN_CRITIQUE.md +64 -0
  20. package/symbols_mcp/skills/DESIGN_DIRECTION.md +320 -0
  21. package/symbols_mcp/skills/DESIGN_SYSTEM_ARCHITECT.md +64 -0
  22. package/symbols_mcp/skills/DESIGN_SYSTEM_CONFIG.md +487 -0
  23. package/symbols_mcp/skills/DESIGN_SYSTEM_IN_PROPS.md +136 -0
  24. package/symbols_mcp/skills/DESIGN_TO_CODE.md +64 -0
  25. package/symbols_mcp/skills/DESIGN_TREND.md +50 -0
  26. package/symbols_mcp/skills/DOMQL_v2-v3_MIGRATION.md +236 -0
  27. package/symbols_mcp/skills/FIGMA_MATCHING.md +63 -0
  28. package/symbols_mcp/skills/GARY_TAN.md +80 -0
  29. package/symbols_mcp/skills/MARKETING_ASSETS.md +66 -0
  30. package/symbols_mcp/skills/MIGRATE_TO_SYMBOLS.md +614 -0
  31. package/symbols_mcp/skills/QUICKSTART.md +79 -0
  32. package/symbols_mcp/skills/SYMBOLS_LOCAL_INSTRUCTIONS.md +1405 -0
  33. package/symbols_mcp/skills/THE_PRESENTATION.md +69 -0
  34. package/symbols_mcp/skills/UI_UX_PATTERNS.md +68 -0
  35. package/windsurf-mcp-config.json +18 -0
@@ -0,0 +1,257 @@
1
+ # Symbols / DOMQL v3 — AI Agent Instructions
2
+
3
+ You are working inside a **Symbols/DOMQL v3** project. These rules are absolute and override any general coding instincts. Violations cause silent failures (black page, nothing renders).
4
+
5
+ ---
6
+
7
+ ## 1. Components are OBJECTS — never functions
8
+
9
+ ```js
10
+ // CORRECT
11
+ export const Header = { extends: 'Flex', padding: 'A' }
12
+
13
+ // WRONG — never
14
+ export const Header = (el, state) => ({ padding: 'A' })
15
+ ```
16
+
17
+ ---
18
+
19
+ ## 2. NO imports between project files — EVER
20
+
21
+ Components reference each other by PascalCase key name in the tree. No `import` statements between `components/`, `pages/`, `functions/`, etc.
22
+
23
+ ```js
24
+ // WRONG
25
+ import { Navbar } from './Navbar.js'
26
+
27
+ // CORRECT — just use the key name in the tree
28
+ Nav: { extends: 'Navbar' }
29
+ ```
30
+
31
+ ---
32
+
33
+ ## 3. `components/index.js` — use `export *` NOT `export * as`
34
+
35
+ `export * as Foo` wraps everything in a namespace object and **breaks component resolution entirely**.
36
+
37
+ ```js
38
+ // CORRECT
39
+ export * from './Navbar.js'
40
+ export * from './PostCard.js'
41
+
42
+ // WRONG — this breaks everything
43
+ export * as Navbar from './Navbar.js'
44
+ ```
45
+
46
+ ---
47
+
48
+ ## 4. Pages extend `'Page'`, not `'Flex'` or `'Box'`
49
+
50
+ ```js
51
+ // CORRECT
52
+ export const main = { extends: 'Page', ... }
53
+
54
+ // WRONG
55
+ export const main = { extends: 'Flex', ... }
56
+ ```
57
+
58
+ ---
59
+
60
+ ## 5. `pages/index.js` — imports ARE allowed here (it's the registry)
61
+
62
+ ```js
63
+ import { main } from './main.js'
64
+ export default { '/': main }
65
+ ```
66
+
67
+ This is the **only** file where cross-file imports are permitted.
68
+
69
+ ---
70
+
71
+ ## 6. Tab / view switching — use DOM IDs + a function, NOT reactive `display` bindings
72
+
73
+ Reactive `display: (el, s) => ...` on multiple full-page trees causes rendering failures. Use the DOM ID pattern instead:
74
+
75
+ ```js
76
+ // In page definition — assign ids to views
77
+ HomeView: { id: 'view-home', extends: 'Flex', ... },
78
+ ExploreView: { id: 'view-explore', extends: 'Flex', display: 'none', ... },
79
+
80
+ // In Navbar onClick
81
+ onClick: (e, el) => { el.call('switchView', 'explore') }
82
+
83
+ // functions/switchView.js
84
+ export const switchView = function switchView(view) {
85
+ ['home', 'explore', 'profile'].forEach(function(v) {
86
+ const el = document.getElementById('view-' + v)
87
+ if (el) el.style.display = v === view ? 'flex' : 'none'
88
+ })
89
+ }
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 7. `el.call('fn', arg)` — element is `this` inside the function, NOT the first arg
95
+
96
+ ```js
97
+ // functions/myFn.js
98
+ export const myFn = function myFn(arg1) {
99
+ const node = this.node // 'this' is the DOMQL element
100
+ }
101
+
102
+ // In component
103
+ onClick: (e, el) => el.call('myFn', someArg) // CORRECT
104
+ onClick: (e, el) => el.call('myFn', el, someArg) // WRONG — el passed twice
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 8. Icon rendering — NEVER use `Icon` inside `Button` or `Flex+tag:button`
110
+
111
+ Use `Svg` atom with `html` prop instead. Key MUST be named `Svg`.
112
+
113
+ ```js
114
+ // CORRECT
115
+ MyBtn: {
116
+ extends: 'Flex', tag: 'button', flexAlign: 'center center', cursor: 'pointer',
117
+ Svg: { viewBox: '0 0 24 24', width: '22', height: '22',
118
+ html: '<path d="..." fill="currentColor"/>' }
119
+ }
120
+
121
+ // WRONG — Icon will NOT render inside Button
122
+ MyBtn: { extends: 'Button', Icon: { name: 'heart' } }
123
+ ```
124
+
125
+ ---
126
+
127
+ ## 9. Use `flexAlign` not `align` for Flex shorthand
128
+
129
+ ```js
130
+ { extends: 'Flex', flexAlign: 'center center' } // CORRECT
131
+ { extends: 'Flex', align: 'center center' } // WRONG — no effect
132
+ ```
133
+
134
+ ---
135
+
136
+ ## 10. State — use `s.update()`, never mutate directly
137
+
138
+ ```js
139
+ onClick: (e, el, s) => s.update({ count: s.count + 1 }) // CORRECT
140
+ onClick: (e, el, s) => { s.count = s.count + 1 } // WRONG — no re-render
141
+ ```
142
+
143
+ Root-level state (global): `s.root.update({ key: val })`
144
+
145
+ ---
146
+
147
+ ## 11. v3 syntax — never use v2
148
+
149
+ | v3 ✅ | v2 ❌ |
150
+ |---|---|
151
+ | `extends: 'X'` | `extend: 'X'` |
152
+ | `childExtends: 'X'` | `childExtend: 'X'` |
153
+ | `onClick: fn` | `on: { click: fn }` |
154
+ | props flattened at root | `props: { ... }` wrapper |
155
+
156
+ ---
157
+
158
+ ## 12. All folders are flat — no subfolders
159
+
160
+ ```
161
+ components/Navbar.js ✅
162
+ components/nav/Navbar.js ❌
163
+ ```
164
+
165
+ ---
166
+
167
+ ## 13. `onRender` — guard against double-init
168
+
169
+ ```js
170
+ onRender: (el) => {
171
+ if (el.__initialized) return
172
+ el.__initialized = true
173
+ // imperative logic here
174
+ }
175
+ ```
176
+
177
+ ---
178
+
179
+ ## 14. `childExtends` — MUST be a named component string, never an inline object
180
+
181
+ Inline `childExtends` objects cause ALL property values to be concatenated as visible text content on every child element.
182
+
183
+ ```js
184
+ // CORRECT — reference a named component
185
+ childExtends: 'NavLink'
186
+
187
+ // WRONG — dumps all prop values as raw text on every child
188
+ childExtends: {
189
+ tag: 'button',
190
+ background: 'transparent',
191
+ border: '2px solid transparent', // renders as visible text!
192
+ color: 'white'
193
+ }
194
+ ```
195
+
196
+ Define the shared style as a named component in `components/`, register it in `components/index.js`, then reference it by name.
197
+
198
+ ---
199
+
200
+ ## 15. Color tokens — NO opacity modifier syntax
201
+
202
+ `color: 'white .7'` is NOT valid — Symbols renders it as raw text content.
203
+ Define named tokens in `designSystem/COLOR.js` instead:
204
+
205
+ ```js
206
+ // designSystem/COLOR.js
207
+ export default {
208
+ whiteMuted: 'rgba(255,255,255,0.7)',
209
+ whiteSubtle: 'rgba(255,255,255,0.6)',
210
+ whiteFaint: 'rgba(255,255,255,0.5)',
211
+ }
212
+
213
+ // In component — CORRECT
214
+ { color: 'whiteMuted' }
215
+
216
+ // WRONG — renders as literal text, not a style
217
+ { color: 'white .7' }
218
+ { color: 'black .5' }
219
+ ```
220
+
221
+ ---
222
+
223
+ ## 15. Border shorthand — split into individual props
224
+
225
+ `border: '2px solid transparent'` in `childExtends` or any Symbols prop renders the raw string as text content. Always split:
226
+
227
+ ```js
228
+ // CORRECT
229
+ { borderWidth: '2px', borderStyle: 'solid', borderColor: 'transparent' }
230
+
231
+ // WRONG — raw string appears as visible text
232
+ { border: '2px solid transparent' }
233
+ ```
234
+
235
+ `border: 'none'` is the only shorthand that works safely.
236
+
237
+ ---
238
+
239
+ ## Project structure quick reference
240
+
241
+ ```
242
+ smbls/
243
+ ├── index.js # export * as components, export default pages, etc.
244
+ ├── state.js # export default { ... }
245
+ ├── dependencies.js # export default { 'pkg': 'version' }
246
+ ├── components/
247
+ │ ├── index.js # export * from './Foo.js' ← flat re-exports
248
+ │ └── Navbar.js # export const Navbar = { ... }
249
+ ├── pages/
250
+ │ ├── index.js # import + export default { '/': main }
251
+ │ └── main.js # export const main = { extends: 'Page', ... }
252
+ ├── functions/
253
+ │ ├── index.js # export * from './switchView.js'
254
+ │ └── switchView.js # export const switchView = function(...) {}
255
+ └── designSystem/
256
+ └── index.js # export default { COLOR, THEME, ... }
257
+ ```
@@ -0,0 +1,69 @@
1
+ The Brand Identity Creator
2
+
3
+ You are the Creative Director at Pentagram, the world's most prestigious design firm.
4
+
5
+ Develop a complete brand identity system for [COMPANY NAME], a [INDUSTRY] company targeting [AUDIENCE].
6
+
7
+ Brand strategy foundation:
8
+
9
+ - Mission: [STATEMENT]
10
+ - Vision: [STATEMENT]
11
+ - Values: [3-5 CORE VALUES]
12
+ - Positioning: [HOW THEY'RE DIFFERENT]
13
+
14
+ Deliverables:
15
+
16
+ 1. BRAND STRATEGY DOCUMENT
17
+ • Brand story (narrative arc: challenge → transformation → resolution)
18
+ • Brand personality (human traits using brand archetypes)
19
+ • Voice and tone matrix (4 dimensions: funny/serious, casual/formal, irreverent/respectful, enthusiastic/matter-of-fact)
20
+ • Messaging hierarchy (tagline, value proposition, key messages, proof points)
21
+
22
+ 2. VISUAL IDENTITY SYSTEM
23
+ • Logo concept (3 directions with strategic rationale for each):
24
+ - Wordmark approach
25
+ - Symbol/icon approach
26
+ - Combination approach
27
+
28
+ • Logo variations:
29
+ - Primary (full color)
30
+ - Secondary (simplified)
31
+ - Monochrome (black and white)
32
+ - Reversed (on dark backgrounds)
33
+ - Minimum size specifications
34
+ - Clear space requirements
35
+
36
+ • Logo usage rules:
37
+ - Correct applications (5 examples)
38
+ - Incorrect applications (5 examples with "do not" warnings)
39
+
40
+ • Color palette:
41
+ - Primary colors (2-3): Hex, Pantone, CMYK, RGB values
42
+ - Secondary colors (3-4): Supporting palette
43
+ - Neutral colors (4-5): Grays for UI
44
+ - Accent colors (2-3): For calls-to-action
45
+ - Color psychology rationale for each choice
46
+
47
+ • Typography:
48
+ - Primary typeface: [SPECIFY OR RECOMMEND]
49
+ - Secondary typeface: [SPECIFY OR RECOMMEND]
50
+ - Usage hierarchy (display, headlines, body, captions)
51
+
52
+ • Imagery style:
53
+ - Photography guidelines (mood, lighting, subjects, composition)
54
+ - Illustration style (if applicable)
55
+ - Iconography style (line weight, corner radius, fill rules)
56
+ - Graphic element patterns
57
+
58
+ 3. BRAND APPLICATIONS
59
+ • Business cards (front and back design)
60
+ • Letterhead and stationery system
61
+ • Email signature template
62
+ • Social media profile templates (avatar, cover images for 5 platforms)
63
+ • Presentation template (title slide, content slide, data slide, closing slide)
64
+
65
+ 4. BRAND GUIDELINES DOCUMENT
66
+ • 20-page brand book structure with all rules documented
67
+ • Asset library organization system
68
+
69
+ Include a strategic rationale for every design decision. Show your work.
@@ -0,0 +1,304 @@
1
+ # Built-in atoms and property usage
2
+
3
+ This document lists the built-in components (atoms and UI kit components) and how their properties are commonly used in Symbols/DOMQL v3.
4
+
5
+ ## Built-in atoms
6
+
7
+ - `Text` -> <span>
8
+ - `Box` -> <div>
9
+ - `Flex` -> <div>
10
+ - `Grid` -> <div>
11
+ - `Link` -> <a>
12
+ - `Input` -> <input>
13
+ - `Radio` -> <input>
14
+ - `Checkbox` -> <input>
15
+ - `Svg` -> <svg>
16
+ - `Icon` -> <svg> (icon sprite)
17
+ - `IconText` -> <div>
18
+ - `Button` -> <button>
19
+ - `Img` -> <img>
20
+ - `Iframe` -> <iframe>
21
+ - `Video` -> <video>
22
+
23
+ ## Built-in components (UI kit)
24
+
25
+ These are the higher-level components shipped in the UI kit. They are composed from atoms and share the same prop rules.
26
+
27
+ - `Avatar`
28
+ - `Button`
29
+ - `Dialog`
30
+ - `Dropdown`
31
+ - `Icon`
32
+ - `Input`
33
+ - `Link`
34
+ - `Notification`
35
+ - `Range`
36
+ - `Select`
37
+ - `Tooltip`
38
+
39
+ ## Property usage by atom
40
+
41
+ These components all use flattened props (no `props` wrapper) and `onX` events.
42
+
43
+ ### Text
44
+
45
+ Primary use: inline text content.
46
+
47
+ Common props:
48
+
49
+ - `text`: string or binding (e.g. `'{{ title }}'`)
50
+ - `color`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`
51
+ - `textTransform`, `textDecoration`, `textAlign`
52
+ - `maxWidth`, `overflow`, `whiteSpace`
53
+
54
+ Example:
55
+
56
+ ```js
57
+ Text: {
58
+ text: 'Hello',
59
+ fontSize: 'B',
60
+ color: 'title'
61
+ }
62
+ ```
63
+
64
+ ### Box
65
+
66
+ Primary use: generic container.
67
+
68
+ Common props:
69
+
70
+ - `padding`, `margin`, `border`, `borderRadius`, `background`, `shadow`
71
+ - `width`, `height`, `minWidth`, `maxWidth`, `minHeight`, `maxHeight`
72
+ - `position`, `inset`, `top`, `right`, `bottom`, `left`
73
+ - `overflow`, `zIndex`
74
+
75
+ Example:
76
+
77
+ ```js
78
+ Box: {
79
+ padding: 'A B',
80
+ background: 'surface',
81
+ borderRadius: 'B'
82
+ }
83
+ ```
84
+
85
+ ### Flex
86
+
87
+ Primary use: layout container using flexbox.
88
+
89
+ Common props:
90
+
91
+ - `flow` or `flexFlow`
92
+ - `align` or `flexAlign`
93
+ - `alignItems`, `justifyContent`, `gap`
94
+ - `flex`, `flexGrow`, `flexShrink`, `flexBasis`
95
+ - `wrap`
96
+
97
+ Example:
98
+
99
+ ```js
100
+ Flex: {
101
+ flow: 'y',
102
+ align: 'center space-between',
103
+ gap: 'B'
104
+ }
105
+ ```
106
+
107
+ ### Grid
108
+
109
+ Primary use: layout container using CSS grid.
110
+
111
+ Common props:
112
+
113
+ - `columns` or `gridTemplateColumns`
114
+ - `rows` or `gridTemplateRows`
115
+ - `gap`, `columnGap`, `rowGap`
116
+ - `gridAutoFlow`, `gridAutoColumns`, `gridAutoRows`
117
+
118
+ Example:
119
+
120
+ ```js
121
+ Grid: {
122
+ columns: 'repeat(3, 1fr)',
123
+ gap: 'A'
124
+ }
125
+ ```
126
+
127
+ ### Link
128
+
129
+ Primary use: navigation or external link.
130
+
131
+ Common props:
132
+
133
+ - `href`, `target`, `rel`
134
+ - `text` or child content
135
+ - `color`, `textDecoration`
136
+ - `onClick`
137
+
138
+ Example:
139
+
140
+ ```js
141
+ Link: {
142
+ text: 'Docs',
143
+ href: '/docs'
144
+ }
145
+ ```
146
+
147
+ ### Input
148
+
149
+ Primary use: text input.
150
+
151
+ Common props:
152
+
153
+ - `type`, `name`, `value`, `placeholder`, `required`, `disabled`
154
+ - `onInput`, `onChange`, `onKeydown`
155
+ - `padding`, `background`, `border`, `round`
156
+
157
+ Example:
158
+
159
+ ```js
160
+ Input: {
161
+ type: 'text',
162
+ name: 'title',
163
+ placeholder: 'Enter title'
164
+ }
165
+ ```
166
+
167
+ ### Radio and Checkbox
168
+
169
+ Primary use: selectable inputs.
170
+
171
+ Common props:
172
+
173
+ - `name`, `value`, `checked`, `disabled`
174
+ - `onChange`
175
+
176
+ Example:
177
+
178
+ ```js
179
+ Checkbox: { name: 'agree', checked: true }
180
+ ```
181
+
182
+ ### Svg
183
+
184
+ Primary use: raw SVG container.
185
+
186
+ Common props:
187
+
188
+ - `html` (inline SVG markup)
189
+ - `width`, `height`, `viewBox`, `fill`, `stroke`
190
+
191
+ Example:
192
+
193
+ ```js
194
+ Svg: { html: '<path d="..." />', viewBox: '0 0 24 24' }
195
+ ```
196
+
197
+ ### Icon
198
+
199
+ Primary use: icon from sprite.
200
+
201
+ Common props:
202
+
203
+ - `name` (sprite symbol id)
204
+ - `size` or `boxSize`
205
+ - `color`
206
+
207
+ Example:
208
+
209
+ ```js
210
+ Icon: { name: 'chevronRight', boxSize: 'A' }
211
+ ```
212
+
213
+ ### IconText
214
+
215
+ Primary use: icon + text combo.
216
+
217
+ Common props:
218
+
219
+ - `icon`, `text`
220
+ - `gap`, `align`, `color`
221
+
222
+ Example:
223
+
224
+ ```js
225
+ IconText: { icon: 'search', text: 'Search', gap: 'Z' }
226
+ ```
227
+
228
+ ### Button
229
+
230
+ Primary use: actionable control.
231
+
232
+ Common props:
233
+
234
+ - `text`, `icon`, `type`, `disabled`
235
+ - `theme`, `padding`, `round`
236
+ - `onClick`, `onSubmit`
237
+
238
+ Example:
239
+
240
+ ```js
241
+ Button: { text: 'Save', theme: 'primary', type: 'submit' }
242
+ ```
243
+
244
+ ### Img
245
+
246
+ Primary use: image element.
247
+
248
+ Common props:
249
+
250
+ - `src`, `alt`, `loading`
251
+ - `width`, `height`, `boxSize`, `objectFit`
252
+
253
+ Example:
254
+
255
+ ```js
256
+ Img: { src: '/logo.png', alt: 'Logo', boxSize: 'B' }
257
+ ```
258
+
259
+ ### Iframe
260
+
261
+ Primary use: embedded content.
262
+
263
+ Common props:
264
+
265
+ - `src`, `title`, `allow`, `sandbox`
266
+ - `width`, `height`, `border`
267
+
268
+ Example:
269
+
270
+ ```js
271
+ Iframe: { src: 'https://example.com', width: '100%', height: '300px' }
272
+ ```
273
+
274
+ ### Video
275
+
276
+ Primary use: video player.
277
+
278
+ Common props:
279
+
280
+ - `src`, `poster`, `controls`, `autoplay`, `muted`, `loop`
281
+ - `width`, `height`, `objectFit`
282
+
283
+ Example:
284
+
285
+ ```js
286
+ Video: { src: '/demo.mp4', controls: true, width: '100%' }
287
+ ```
288
+
289
+ ## Cross-cutting props
290
+
291
+ All atoms can also use:
292
+
293
+ - `@media` keys (e.g. `@mobile`)
294
+ - pseudo selectors (e.g. `:hover`, `:active`)
295
+ - conditional cases (e.g. `.isActive`, `!isActive`)
296
+ - `childProps` for one-level child overrides
297
+ - `children` arrays or nested object trees
298
+ - `onInit`, `onRender`, `onUpdate`, `onStateUpdate`
299
+
300
+ ---
301
+
302
+ ## Symbols Feedback Conventions
303
+
304
+ Supplemental conventions are merged into [CLAUDE.md](CLAUDE.md).