conductor-figma 1.0.2 → 3.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.
package/LICENSE CHANGED
@@ -19,3 +19,23 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
+
23
+ ADDITIONAL DISCLAIMER:
24
+
25
+ This software is experimental and provided for educational and research
26
+ purposes only. The author(s) and contributor(s) make no representations or
27
+ warranties regarding the accuracy, completeness, reliability, or suitability
28
+ of this software for any purpose.
29
+
30
+ The author(s) shall not be held liable for any damages whatsoever — including
31
+ but not limited to direct, indirect, incidental, special, consequential, or
32
+ punitive damages — arising from the use, misuse, or inability to use this
33
+ software, including but not limited to loss of data, corruption of design
34
+ files, business interruption, or any other commercial or personal damages.
35
+
36
+ This software interacts with third-party services and APIs (including but not
37
+ limited to Figma, Cursor, and Claude Code) and is not affiliated with,
38
+ endorsed by, or sponsored by any of these services or their parent companies.
39
+
40
+ Users assume all risk associated with the use of this software. Always back
41
+ up your work before running automated operations. Do your own research (DYOR).
package/README.md CHANGED
@@ -1,25 +1,29 @@
1
- # CONDUCTOR
1
+ # conductor-figma
2
2
 
3
- > Experimental software. DYOR. Use at your own risk.
4
-
5
- Design-intelligent MCP server for Figma. 61 tools across 10 categories. It doesn't place shapes — it designs. 8px grid, type scale ratios, auto-layout, component reuse, WCAG accessibility, and a self-auditing design score. Every decision follows the rules a senior designer applies instinctively.
3
+ Design-intelligent MCP server for Figma. 201 tools across 17 categories. Every tool has built-in design intelligence — 8px grid, type scales, semantic colors, accessibility checks, component defaults. Not a shape proxy. A design engine.
6
4
 
7
5
  ```
8
6
  npx conductor-figma
9
7
  ```
10
8
 
11
- ## What it does
9
+ ## What makes this different
12
10
 
13
- Other MCP servers translate your words into shapes. CONDUCTOR translates them into design decisions.
14
11
 
15
- Say "create a pricing page." A typical MCP creates rectangles with absolute positioning, random font sizes, and arbitrary spacing. CONDUCTOR creates a page with auto-layout frames, a type scale following a major third ratio (1.25), spacing on an 8px grid, and proper visual hierarchy headings are dominant, body text recedes, CTAs are prominent.
12
+ **Conductor** has 201 tools with design intelligence. You say "create a button" and it knows: 44px height (touch target), 20px horizontal padding (8px grid), 10px radius, 15px Semi Bold text. Every value is intentional.
16
13
 
17
14
  ## Setup
18
15
 
19
- Install the CONDUCTOR plugin from the Figma Community. Then add to your editor:
16
+ ### 1. Figma Plugin
17
+
18
+ ```
19
+ git clone https://github.com/dragoon0x/conductor.git
20
+ ```
21
+
22
+ In Figma: **Plugins → Development → Import plugin from manifest** → select `conductor/figma-plugin/manifest.json`
23
+
24
+ ### 2. Add to Cursor / Claude Code
20
25
 
21
26
  ```json
22
- // ~/.cursor/mcp.json
23
27
  {
24
28
  "mcpServers": {
25
29
  "conductor": {
@@ -30,164 +34,66 @@ Install the CONDUCTOR plugin from the Figma Community. Then add to your editor:
30
34
  }
31
35
  ```
32
36
 
33
- Open your Figma file, run the plugin, then chat:
34
-
35
- ```
36
- "Create a SaaS landing page with hero, features, and pricing"
37
- "Audit this frame — is my spacing consistent?"
38
- "Generate a dark mode variant of this page"
39
- "Convert these absolute-positioned layers to auto-layout"
40
- ```
41
-
42
- ## 61 Tools · 10 Categories
43
-
44
- ### Create (8)
45
- | Tool | Description |
46
- |------|-------------|
47
- | `create_frame` | Auto-layout frame with grid-aligned spacing |
48
- | `create_page` | Full page from intent: landing, pricing, dashboard |
49
- | `create_section` | Hero, features, testimonials, FAQ, CTA — pattern-aware |
50
- | `create_card` | Card with proper padding, radius, shadow, hierarchy |
51
- | `create_form` | Form with labels, inputs, validation, submit flow |
52
- | `create_table` | Data table with header, rows, sorting, pagination |
53
- | `create_modal` | Modal with overlay, sizing, and action buttons |
54
- | `create_nav` | Topbar, sidebar, breadcrumbs, tabs — with states |
55
-
56
- ### Layout (7)
57
- | Tool | Description |
58
- |------|-------------|
59
- | `layout_auto` | Convert any frame to auto-layout |
60
- | `layout_grid` | Apply column grid: 12-col, 8-col, custom |
61
- | `layout_stack` | Stack children with consistent spacing |
62
- | `layout_wrap` | Wrap-layout for tags, pills, flexible grids |
63
- | `layout_constrain` | Set fill, hug, fixed, min/max constraints |
64
- | `layout_align` | Align and distribute frames on the grid |
65
- | `layout_nest` | Restructure flat layers into auto-layout tree |
66
-
67
- ### Typography (6)
68
- | Tool | Description |
69
- |------|-------------|
70
- | `type_scale` | Generate or detect type scale ratios |
71
- | `type_hierarchy` | Set heading levels with proper ratios |
72
- | `type_pair` | Font pairing suggestions |
73
- | `type_measure` | Check line length and readability |
74
- | `type_apply` | Bulk-apply text styles |
75
- | `type_audit` | Find off-scale sizes and inconsistencies |
76
-
77
- ### Color & Style (7)
78
- | Tool | Description |
79
- |------|-------------|
80
- | `color_palette` | Generate 50-950 shades from one color |
81
- | `color_semantic` | Create semantic tokens |
82
- | `color_darkmode` | Generate dark mode with preserved contrast |
83
- | `color_contrast` | WCAG AA/AAA contrast checking |
84
- | `color_apply` | Apply colors by semantic role |
85
- | `style_shadow` | Generate elevation system |
86
- | `style_radius` | Generate radius scale |
87
-
88
- ### Components (6)
89
- | Tool | Description |
90
- |------|-------------|
91
- | `component_list` | List components in file or library |
92
- | `component_use` | Instantiate with variant props |
93
- | `component_create` | Create component from frame |
94
- | `component_swap` | Swap instances across a frame |
95
- | `component_detach` | Detach instances to editable frames |
96
- | `component_audit` | Find missing/unused/detached components |
97
-
98
- ### Spacing & Grid (6)
99
- | Tool | Description |
100
- |------|-------------|
101
- | `spacing_scale` | Generate spacing scale from base unit |
102
- | `spacing_fix` | Snap off-grid values to nearest grid |
103
- | `spacing_audit` | Report all spacing values, flag issues |
104
- | `spacing_rhythm` | Check vertical rhythm consistency |
105
- | `grid_apply` | Apply layout grid to a frame |
106
- | `grid_check` | Verify children align to grid |
107
-
108
- ### Audit & Critique (6)
109
- | Tool | Description |
110
- |------|-------------|
111
- | `audit_full` | Full design audit across all categories |
112
- | `audit_hierarchy` | Check visual hierarchy |
113
- | `audit_consistency` | Find elements with inconsistent styles |
114
- | `audit_alignment` | Flag misaligned elements |
115
- | `audit_density` | Check information density |
116
- | `audit_score` | 0-100 design health score |
117
-
118
- ### Accessibility (5)
119
- | Tool | Description |
120
- |------|-------------|
121
- | `a11y_contrast` | WCAG AA/AAA contrast checking |
122
- | `a11y_touch` | 44x44px touch target verification |
123
- | `a11y_focus` | Generate focus ring styles |
124
- | `a11y_labels` | Check for missing labels |
125
- | `a11y_fix` | Auto-fix: contrast, targets, focus |
126
-
127
- ### Responsive (4)
128
- | Tool | Description |
129
- |------|-------------|
130
- | `responsive_variant` | Generate mobile/tablet/desktop variants |
131
- | `responsive_reflow` | Reflow desktop to mobile |
132
- | `responsive_breakpoints` | Set up breakpoint frames |
133
- | `responsive_check` | Verify overflow and targets |
134
-
135
- ### Export & Handoff (6)
136
- | Tool | Description |
137
- |------|-------------|
138
- | `export_tokens_css` | CSS custom properties |
139
- | `export_tokens_tailwind` | Tailwind config extension |
140
- | `export_tokens_json` | W3C Design Tokens format |
141
- | `export_tokens_scss` | SCSS variables |
142
- | `export_spec` | Design spec with measurements |
143
- | `export_changelog` | Diff two frames |
37
+ ### 3. Design
144
38
 
145
- ## Design Intelligence
146
-
147
- Every tool is backed by real design logic, not arbitrary values.
148
-
149
- **8px Grid**: All spacing values snap to the nearest multiple of 8. Padding, margins, gaps — no 13px, no 27px, no arbitrary numbers.
150
-
151
- **Type Scale Ratios**: Font sizes follow mathematical ratios. Minor third (1.2), major third (1.25), perfect fourth (1.333), golden ratio (1.618). Headings, body, captions all relate to each other.
152
-
153
- **Auto-Layout**: Every frame uses Figma auto-layout with proper direction, gap, padding, and alignment. Zero absolute positioning.
39
+ Open Figma → Run the Conductor plugin → Chat in Cursor:
154
40
 
155
- **WCAG Accessibility**: Contrast checking against AA (4.5:1) and AAA (7:1). Touch target verification (44x44px minimum). Focus state generation.
41
+ > "Create a mobile login screen with email and password fields"
156
42
 
157
- **Design Score**: 0-100 health score weighted across spacing (25%), typography (20%), color (15%), components (15%), accessibility (15%), hierarchy (10%).
43
+ > "Design a dashboard with sidebar, KPI cards, and chart area"
158
44
 
159
- ## Programmatic API
45
+ > "Audit the accessibility of my current selection"
160
46
 
161
- ```js
162
- import { generateTypeScale, checkContrast, auditSpacing, snapToGrid } from 'conductor-figma'
47
+ > "Export this frame as React + Tailwind code"
163
48
 
164
- const scale = generateTypeScale(16, 'major-third')
165
- // → { scale: 'Major Third', ratio: 1.25, sizes: [...] }
49
+ ## 201 Tools in 17 Categories
166
50
 
167
- const contrast = checkContrast('#333333', '#ffffff')
168
- // → { ratio: 12.63, aa: true, aaa: true }
51
+ | Category | Count | Highlights |
52
+ |----------|-------|-----------|
53
+ | Create & Layout | 20 | Frames, text, shapes, smart components (18 types), sections, pages, forms, tables, nav bars, cards, sidebars |
54
+ | Modify & Style | 25 | Fills (solid + gradients), strokes, effects, image fills, text ranges, constraints, transforms |
55
+ | Vector & Shape | 8 | Paths, booleans, polygons, stars, 35 built-in icons, arrows, dividers |
56
+ | Read & Inspect | 18 | Selection, page tree, node info, search, CSS export, fonts, annotations, measurements |
57
+ | Variables & Tokens | 10 | Collections, modes, binding, W3C import/export, full token system from brand color |
58
+ | Export & Code | 12 | React + Tailwind, HTML, Vue, Svelte, SVG, PNG, design specs, stylesheets, palettes |
59
+ | Accessibility & Lint | 12 | WCAG audit, contrast, touch targets, font sizes, color blindness, design lint, compliance reports |
60
+ | Batch Operations | 17 | Rename patterns, bulk style, find/replace text/color, clean hidden layers, round values, set fonts |
61
+ | Design System | 10 | Scan, extract, normalize, lint, style guide, palette, type scale, import/export |
62
+ | Responsive | 5 | Mobile/tablet/desktop variants, breakpoints, stacking, responsive conversion |
63
+ | Typography | 10 | Type scale, audit, hierarchy, measure, normalize, font replace, pairing, styles |
64
+ | Color | 10 | Palette generation, harmonies, dark/light mode, contrast check, semantic systems |
65
+ | Prototype | 10 | Links, transitions, overlays, scroll, hover states, flows, fixed position |
66
+ | Page Management | 8 | Create, switch, duplicate, delete, rename, sort, merge, overview |
67
+ | Library | 8 | Search, swap, detach, audit, batch swap, publish |
68
+ | Annotation & Handoff | 10 | Spacing redlines, color swatches, typography specs, spec sheets, changelogs |
69
+ | Effects & Styles | 8 | Glassmorphism, neumorphism, noise, gradients, shadow systems, border gradients |
169
70
 
170
- const audit = auditSpacing([8, 13, 16, 22, 32], 8)
171
- // → { adherence: 0.6, fixes: [{ from: 13, to: 16 }, { from: 22, to: 24 }] }
172
- ```
71
+ ## Design Intelligence
173
72
 
174
- ## CLI
73
+ Every tool queries the intelligence engine:
175
74
 
176
- ```bash
177
- conductor-figma --list # List all 61 tools
178
- conductor-figma --categories # Show categories
179
- conductor-figma --help # Help
180
- conductor-figma # Start MCP server (stdio)
181
- ```
75
+ - **8px Grid**: All spacing values snapped to 8px grid
76
+ - **Type Scale**: 7 mathematical ratios (Minor Second through Golden Ratio)
77
+ - **Semantic Colors**: Full palette from one brand color (dark + light modes)
78
+ - **Component Defaults**: 18 component types with size variants (button, input, card, avatar, badge, chip, switch, checkbox, radio, toast, tooltip, modal, dropdown, tabs, table, progress, skeleton, divider)
79
+ - **Accessibility**: WCAG AA/AAA contrast, 44px touch targets, font minimums, color blindness
80
+ - **Font Weights**: Auto-resolves "bold" → "Bold", "600" → "Semi Bold"
81
+ - **Layout Intelligence**: 13 layout presets (row, column, center, spread, grid, sidebar, form)
182
82
 
183
- ## Zero Dependencies
83
+ ## License
184
84
 
185
- CONDUCTOR has no runtime dependencies. Pure JavaScript. The design intelligence engine runs locally — no API calls, no external services.
85
+ MIT. Built by [0xDragoon](https://github.com/dragoon0x).
186
86
 
187
87
  ## Disclaimer
188
88
 
189
- Experimental, open-source software. Provided as-is with no warranties. DYOR. Use at your own risk. The author assumes zero liability.
89
+ **This software is provided strictly for educational and experimental purposes only.** Do your own research (DYOR) before using in any production environment.
190
90
 
191
- ## License
91
+ - This is experimental, open-source software provided "as-is" with **absolutely no warranties, representations, or guarantees of any kind** — express, implied, or statutory — including but not limited to warranties of merchantability, fitness for a particular purpose, accuracy, reliability, or non-infringement.
92
+ - The author(s), contributor(s), and maintainer(s) of this project — including the individual known as 0xDragoon — **shall not be held liable** for any direct, indirect, incidental, special, consequential, or punitive damages, losses, costs, or expenses arising from or related to the use, misuse, inability to use, or reliance upon this software, including but not limited to loss of data, loss of revenue, business interruption, or damages to Figma files, design assets, or any other digital property.
93
+ - This software interacts with third-party services (Figma, Cursor, Claude Code) over which the author has no control. The author assumes **no responsibility** for any changes, outages, API modifications, or policy updates by these third parties that may affect the functionality of this software.
94
+ - No data collection, telemetry, or analytics are performed by this software. All operations run locally between your machine and the Figma desktop application. However, the author makes **no guarantees** regarding data security, privacy, or confidentiality.
95
+ - This software is **not affiliated with, endorsed by, or sponsored by** Figma, Inc., Anthropic, PBC, Anysphere (Cursor), or any other company or organization.
96
+ - Users are solely responsible for ensuring their use of this software complies with all applicable laws, regulations, terms of service, and licensing agreements — including Figma's Terms of Service and API usage policies.
97
+ - **Use at your own risk.** Always back up your Figma files before running any automated operations. The author is not responsible for any unintended modifications, deletions, or corruption of design files.
192
98
 
193
- MIT. Built by 0xDragoon.
99
+ MIT License · Copyright © 2025 0xDragoon
package/bin/conductor.js CHANGED
@@ -1,76 +1,2 @@
1
1
  #!/usr/bin/env node
2
-
3
- import { startServer } from '../src/server.js';
4
- import { TOOLS, CATEGORIES } from '../src/tools/registry.js';
5
-
6
- var args = process.argv.slice(2);
7
-
8
- if (args.includes('--help') || args.includes('-h')) {
9
- console.log(`
10
- ⊞ CONDUCTOR — Design-intelligent MCP server for Figma
11
-
12
- Usage:
13
- conductor-figma Start MCP server + orchestrator
14
- conductor-figma --port 9800 Set WebSocket port (default: 9800)
15
- conductor-figma --list List all ${TOOLS.length} tools
16
- conductor-figma --categories Show tool categories
17
- conductor-figma --help Show this help
18
-
19
- How it works:
20
- 1. You say "create a pricing page" in Cursor
21
- 2. CONDUCTOR generates a blueprint (30-50 commands)
22
- 3. Each command executes sequentially on your Figma canvas
23
- 4. Frames, text, cards, buttons appear in real-time
24
- 5. All auto-layout. All grid-aligned. All design-intelligent.
25
-
26
- Setup:
27
- ~/.cursor/mcp.json:
28
- {
29
- "mcpServers": {
30
- "conductor": {
31
- "command": "npx",
32
- "args": ["-y", "conductor-figma"]
33
- }
34
- }
35
- }
36
-
37
- Then open the CONDUCTOR plugin in Figma and click Connect.
38
-
39
- ${TOOLS.length} tools · ${Object.keys(CATEGORIES).length} categories
40
- Built by 0xDragoon · MIT License
41
- `);
42
- process.exit(0);
43
- }
44
-
45
- if (args.includes('--list')) {
46
- for (var entries = Object.entries(CATEGORIES), i = 0; i < entries.length; i++) {
47
- var catKey = entries[i][0], cat = entries[i][1];
48
- var tools = TOOLS.filter(function(t) { return t.category === catKey; });
49
- console.log('\n ' + cat.icon + ' ' + cat.label + ' (' + tools.length + ')');
50
- for (var j = 0; j < tools.length; j++) {
51
- console.log(' ' + tools[j].name.padEnd(28) + ' ' + tools[j].description.slice(0, 70));
52
- }
53
- }
54
- console.log('\n ' + TOOLS.length + ' tools total\n');
55
- process.exit(0);
56
- }
57
-
58
- if (args.includes('--categories')) {
59
- for (var entries2 = Object.entries(CATEGORIES), k = 0; k < entries2.length; k++) {
60
- var key = entries2[k][0], cat2 = entries2[k][1];
61
- var count = TOOLS.filter(function(t) { return t.category === key; }).length;
62
- console.log(' ' + cat2.icon + ' ' + cat2.label.padEnd(18) + ' ' + count + ' tools');
63
- }
64
- console.log('\n ' + TOOLS.length + ' tools total');
65
- process.exit(0);
66
- }
67
-
68
- // Parse port
69
- var port = 9800;
70
- var portIdx = args.indexOf('--port');
71
- if (portIdx !== -1 && args[portIdx + 1]) {
72
- port = parseInt(args[portIdx + 1]) || 9800;
73
- }
74
-
75
- // Start MCP server with relay
76
- startServer({ port: port });
2
+ import '../src/server.js'