@noemuch/bridge-ds 2.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 +21 -0
- package/README.md +147 -0
- package/bin/bridge.js +4 -0
- package/commands/design-workflow.md +1 -0
- package/lib/cli.js +172 -0
- package/lib/mcp-setup.js +47 -0
- package/lib/scaffold.js +120 -0
- package/package.json +39 -0
- package/skills/design-workflow/SKILL.md +205 -0
- package/skills/design-workflow/references/actions/design.md +207 -0
- package/skills/design-workflow/references/actions/done.md +48 -0
- package/skills/design-workflow/references/actions/drop.md +38 -0
- package/skills/design-workflow/references/actions/review.md +149 -0
- package/skills/design-workflow/references/actions/spec.md +128 -0
- package/skills/design-workflow/references/figma-api-rules.md +453 -0
- package/skills/design-workflow/references/knowledge-base/README.md +52 -0
- package/skills/design-workflow/references/onboarding.md +351 -0
- package/skills/design-workflow/references/quality-gates.md +127 -0
- package/skills/design-workflow/references/templates/screen-template.md +127 -0
- package/skills/design-workflow/references/templates/spec-template.md +171 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# {ComponentName} Component
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Implement a **{description}**. {Design principle justification}.
|
|
6
|
+
|
|
7
|
+
| Level | Component | Role | Props |
|
|
8
|
+
|-------|-----------|------|-------|
|
|
9
|
+
| 1 — Primitive | `{Primitive}` | {role} | {count} |
|
|
10
|
+
| 2 — Blocks | `{Block1}`, `{Block2}` | {role} | {count} |
|
|
11
|
+
| 3 — Composition | `{Composed}` | {role} | {count} |
|
|
12
|
+
|
|
13
|
+
**Figma:** {figma_url}
|
|
14
|
+
|
|
15
|
+
**Design principle:** {principle} — {explanation}.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Visual Reference (recommended)
|
|
20
|
+
|
|
21
|
+
> If this component appears in existing screens, document which patterns/screenshots show similar components.
|
|
22
|
+
> This helps the `design` step match proportions, density, and visual weight.
|
|
23
|
+
|
|
24
|
+
| | |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Closest pattern** | {pattern name or "N/A — new pattern"} |
|
|
27
|
+
| **Screenshots** | {screenshot filenames showing similar components, or "N/A"} |
|
|
28
|
+
| **Composition notes** | {what to match: card size, internal spacing rhythm, visual weight relative to surroundings} |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Architecture Overview
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
┌─ {Composed} (convenience wrapper) ──────────────────────┐
|
|
36
|
+
│ │
|
|
37
|
+
│ ┌─ {Primitive} (layout primitive) ───────────────────┐ │
|
|
38
|
+
│ │ │ │
|
|
39
|
+
│ │ [leading] [children] [trailing] │ │
|
|
40
|
+
│ │ {LeadSlot} {ContentSlot} {TrailSlot} │ │
|
|
41
|
+
│ │ │ │
|
|
42
|
+
│ └─────────────────────────────────────────────────────┘ │
|
|
43
|
+
└──────────────────────────────────────────────────────────┘
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Level 1 — `{Primitive}`
|
|
49
|
+
|
|
50
|
+
### Props API
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
interface {Primitive}Props {
|
|
54
|
+
/** {description} */
|
|
55
|
+
{prop}: {type};
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Layout Specs
|
|
60
|
+
|
|
61
|
+
| Property | Value | Token |
|
|
62
|
+
|----------|-------|-------|
|
|
63
|
+
| {property} | {value} | `{token}` |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Level 2 — `{Block}`
|
|
68
|
+
|
|
69
|
+
### Props API
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
interface {Block}Props {
|
|
73
|
+
/** {description} */
|
|
74
|
+
{prop}: {type};
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Typography & Colors
|
|
79
|
+
|
|
80
|
+
| Element | Typography | Color |
|
|
81
|
+
|---------|-----------|-------|
|
|
82
|
+
| {element} | `{token}` | `{token}` |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Level 3 — `{Composed}`
|
|
87
|
+
|
|
88
|
+
### Props API
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
interface {Composed}Props {
|
|
92
|
+
/** {description} */
|
|
93
|
+
{prop}: {type};
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Usage Examples
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
<{Composed} {props} />
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Design Tokens Summary
|
|
106
|
+
|
|
107
|
+
### Spacing
|
|
108
|
+
|
|
109
|
+
| Token | Value | Usage |
|
|
110
|
+
|-------|-------|-------|
|
|
111
|
+
| `{token}` | {value} | {usage} |
|
|
112
|
+
|
|
113
|
+
### Colors
|
|
114
|
+
|
|
115
|
+
| Token | Value | Usage |
|
|
116
|
+
|-------|-------|-------|
|
|
117
|
+
| `{token}` | {value} | {usage} |
|
|
118
|
+
|
|
119
|
+
### Typography
|
|
120
|
+
|
|
121
|
+
| Token | Specs | Usage |
|
|
122
|
+
|-------|-------|-------|
|
|
123
|
+
| `{token}` | {specs} | {usage} |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Component Properties (Figma)
|
|
128
|
+
|
|
129
|
+
> Define ALL configurable properties for the Figma component.
|
|
130
|
+
> Every text, icon, and optional element must be exposed.
|
|
131
|
+
|
|
132
|
+
| Property | Type | Default | Description |
|
|
133
|
+
|----------|------|---------|-------------|
|
|
134
|
+
| `{name}` | TEXT | {default} | {what it controls} |
|
|
135
|
+
| `{name}` | INSTANCE_SWAP | {default component} | {what icon/sub-component it swaps} |
|
|
136
|
+
| `{name}` | BOOLEAN | {true/false} | {what element it shows/hides} |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Interaction States
|
|
141
|
+
|
|
142
|
+
| State | Token | Visual |
|
|
143
|
+
|-------|-------|--------|
|
|
144
|
+
| Default | — | Base appearance |
|
|
145
|
+
| Hovered | `color/interaction/hovered` | Overlay on base background |
|
|
146
|
+
| Pressed | `color/interaction/pressed` | Overlay on base background |
|
|
147
|
+
| Disabled | `color/interaction/disabled` | Overlay + reduced interactivity |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Reused DS Components
|
|
152
|
+
|
|
153
|
+
| Component | Available | Usage |
|
|
154
|
+
|-----------|-----------|-------|
|
|
155
|
+
| `{Name}` | {platforms} | {usage} |
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Acceptance Criteria
|
|
160
|
+
|
|
161
|
+
- [ ] All variants exist in Figma as component variants
|
|
162
|
+
- [ ] All design tokens correctly applied (no hardcoded values)
|
|
163
|
+
- [ ] All typography, colors, and spacing match spec
|
|
164
|
+
- [ ] Component properties exposed (TEXT, INSTANCE_SWAP, BOOLEAN)
|
|
165
|
+
- [ ] {criterion}
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Open Questions
|
|
170
|
+
|
|
171
|
+
1. {question}
|