@dedesfr/prompter 0.8.8 → 0.8.10
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/CHANGELOG.md +31 -0
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +57 -5
- package/dist/commands/init.js.map +1 -1
- package/package.json +1 -1
- package/skills/doc-builder/SKILL.md +115 -0
- package/skills/doc-builder/references/ui-patterns.md +394 -0
- package/skills/document-translator/SKILL.md +58 -0
- package/skills/gamma-builder/SKILL.md +134 -0
- package/skills/ui-ux-pro/SKILL.md +224 -233
- package/skills/ui-ux-pro-v2/SKILL.md +344 -0
- package/skills/ui-ux-pro-v2/assets/design-spec-template.md +173 -0
- package/skills/ui-ux-pro-v2/references/component-patterns.md +255 -0
- package/skills/ui-ux-pro-v2/references/design-principles.md +167 -0
- package/src/cli/index.ts +1 -1
- package/src/commands/init.ts +63 -5
- package/docs/product-spec.md +0 -151
- package/docs/tasks.md +0 -3
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# Component Patterns — UI Interaction Best Practices
|
|
2
|
+
|
|
3
|
+
Reference for designing common UI components with proper states, accessibility, and interaction patterns. Load when designing or reviewing specific components.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Buttons
|
|
8
|
+
|
|
9
|
+
### Hierarchy
|
|
10
|
+
|
|
11
|
+
Every interface needs a clear button hierarchy:
|
|
12
|
+
|
|
13
|
+
| Level | Name | Use Case | Visual Treatment |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| 1 | Primary | Main action per section/page | Filled, brand color, high contrast |
|
|
16
|
+
| 2 | Secondary | Supporting actions | Outlined or muted fill |
|
|
17
|
+
| 3 | Tertiary / Ghost | Low-priority actions, cancel | Text-only or very subtle background |
|
|
18
|
+
| 4 | Destructive | Delete, remove, irreversible | Red/danger color, confirm pattern |
|
|
19
|
+
| 5 | Icon-only | Compact actions (close, menu, edit) | Icon with tooltip, adequate touch target |
|
|
20
|
+
|
|
21
|
+
### Required States
|
|
22
|
+
|
|
23
|
+
Every button must handle:
|
|
24
|
+
- **Default** — Resting state
|
|
25
|
+
- **Hover** — Subtle background/shadow change (desktop)
|
|
26
|
+
- **Focus** — Visible ring/outline for keyboard users (2px offset, contrasting color)
|
|
27
|
+
- **Active/Pressed** — Slightly darker, subtle depression
|
|
28
|
+
- **Disabled** — Reduced opacity (0.5-0.6), no pointer events, `aria-disabled`
|
|
29
|
+
- **Loading** — Spinner or dots replacing text, button disabled during action
|
|
30
|
+
|
|
31
|
+
### Sizing
|
|
32
|
+
|
|
33
|
+
| Size | Height | Padding (x) | Font Size | Use Case |
|
|
34
|
+
|---|---|---|---|---|
|
|
35
|
+
| sm | 32px | 12px | 13-14px | Dense UI, table actions, tag actions |
|
|
36
|
+
| md | 40px | 16px | 14-15px | Standard forms, toolbars |
|
|
37
|
+
| lg | 48px | 24px | 16px | Hero CTAs, mobile-first interfaces |
|
|
38
|
+
|
|
39
|
+
### Accessibility
|
|
40
|
+
- Minimum touch target: 44×44px (even if visual size is smaller, pad the clickable area)
|
|
41
|
+
- Always include accessible label (text content or `aria-label` for icon buttons)
|
|
42
|
+
- Don't rely on color alone — icons or text should reinforce meaning
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Forms
|
|
47
|
+
|
|
48
|
+
### Input Fields
|
|
49
|
+
|
|
50
|
+
**Required states:**
|
|
51
|
+
- Default — Clear border, label above
|
|
52
|
+
- Focus — Highlighted border (brand color), optional subtle shadow
|
|
53
|
+
- Filled — Same as default but with content
|
|
54
|
+
- Error — Red/danger border, error message below, `aria-invalid="true"`
|
|
55
|
+
- Disabled — Muted background, reduced opacity
|
|
56
|
+
- Read-only — No border/minimal border, text appears as content
|
|
57
|
+
|
|
58
|
+
**Layout rules:**
|
|
59
|
+
- Label above input (not beside, not as placeholder)
|
|
60
|
+
- Placeholder text is supplementary, never the only label
|
|
61
|
+
- Error messages appear below the input, in context
|
|
62
|
+
- Help text appears below label or below input, not as tooltip
|
|
63
|
+
- Group related fields (name + email, street + city + state)
|
|
64
|
+
|
|
65
|
+
**Sizing:**
|
|
66
|
+
|
|
67
|
+
| Size | Height | Font Size | Use Case |
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
| sm | 32px | 13-14px | Dense forms, admin panels |
|
|
70
|
+
| md | 40px | 14-15px | Standard forms |
|
|
71
|
+
| lg | 48px | 16px | Landing pages, mobile |
|
|
72
|
+
|
|
73
|
+
### Select / Dropdown
|
|
74
|
+
|
|
75
|
+
- Show current selection in the trigger
|
|
76
|
+
- Keyboard navigation: arrow keys, type-ahead, Enter to select, Escape to close
|
|
77
|
+
- Long lists: include search/filter
|
|
78
|
+
- Multi-select: use checkboxes inside dropdown, show count or tags in trigger
|
|
79
|
+
|
|
80
|
+
### Checkbox & Radio
|
|
81
|
+
|
|
82
|
+
- Minimum 44×44px touch target (including label)
|
|
83
|
+
- Label always to the right of the indicator
|
|
84
|
+
- Checkbox: independent selections (multi-select)
|
|
85
|
+
- Radio: mutually exclusive within a group
|
|
86
|
+
- Indeterminate checkbox state for "select all" with partial selection
|
|
87
|
+
|
|
88
|
+
### Form Validation
|
|
89
|
+
|
|
90
|
+
- **Inline validation**: Validate on blur (not on every keystroke)
|
|
91
|
+
- **Submit validation**: Validate all fields, focus the first error, scroll if needed
|
|
92
|
+
- **Error messaging**: Specific ("Email must include @") not generic ("Invalid input")
|
|
93
|
+
- **Success feedback**: Brief confirmation, then move on — don't celebrate trivial actions
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Cards
|
|
98
|
+
|
|
99
|
+
### When to Use
|
|
100
|
+
- Displaying a collection of items with mixed content (image + text + actions)
|
|
101
|
+
- Content that can be browsed and compared
|
|
102
|
+
- NOT for single content blocks or sequential content (use sections instead)
|
|
103
|
+
|
|
104
|
+
### Anatomy
|
|
105
|
+
1. **Media area** (optional) — Image, video, or illustration at top or left
|
|
106
|
+
2. **Header** — Title, subtitle, metadata
|
|
107
|
+
3. **Body** — Description or summary content
|
|
108
|
+
4. **Footer** (optional) — Actions, tags, or secondary metadata
|
|
109
|
+
|
|
110
|
+
### Interaction Patterns
|
|
111
|
+
- **Clickable card**: Entire card is a link, hover shows elevation change
|
|
112
|
+
- **Card with actions**: Card is not clickable, specific buttons/links inside are
|
|
113
|
+
- **Never both**: Don't make the whole card clickable AND have buttons inside it
|
|
114
|
+
|
|
115
|
+
### States
|
|
116
|
+
- Default, Hover (if clickable), Selected (in a selection context), Loading (skeleton)
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Navigation
|
|
121
|
+
|
|
122
|
+
### Top Navigation (Navbar)
|
|
123
|
+
|
|
124
|
+
- Logo/brand on the left
|
|
125
|
+
- Primary nav items horizontally centered or right-aligned
|
|
126
|
+
- Active page indicator: bold text, underline, or background highlight
|
|
127
|
+
- Mobile: hamburger menu (3 lines) → slide-out or full-screen overlay
|
|
128
|
+
- Sticky/fixed: include subtle shadow or border when scrolled
|
|
129
|
+
- Max 5-7 primary items; overflow into "More" dropdown
|
|
130
|
+
|
|
131
|
+
### Sidebar Navigation
|
|
132
|
+
|
|
133
|
+
- Collapsible for more content space
|
|
134
|
+
- Active item: filled background with brand color, or left border accent
|
|
135
|
+
- Group items with section headers
|
|
136
|
+
- Icons + labels in expanded state, icons-only in collapsed state with tooltips
|
|
137
|
+
- Scroll independently from main content
|
|
138
|
+
|
|
139
|
+
### Breadcrumbs
|
|
140
|
+
|
|
141
|
+
- Show current location in hierarchy
|
|
142
|
+
- Each segment is a link except the current page
|
|
143
|
+
- Separator: `/` or `>` or chevron icon
|
|
144
|
+
- Truncate long paths: show first, `...`, last 2 segments
|
|
145
|
+
|
|
146
|
+
### Tabs
|
|
147
|
+
|
|
148
|
+
- Horizontal for 2-5 options, vertical for 5+ or when labels are long
|
|
149
|
+
- Active tab: bold/colored text + bottom border (horizontal) or left border (vertical)
|
|
150
|
+
- Tab content switches without page reload
|
|
151
|
+
- Keyboard: arrow keys to switch, Tab to enter content area
|
|
152
|
+
- Don't nest tabs within tabs
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Modals & Dialogs
|
|
157
|
+
|
|
158
|
+
### When to Use
|
|
159
|
+
- Confirming destructive actions
|
|
160
|
+
- Short forms that don't warrant a new page (login, quick edit)
|
|
161
|
+
- Displaying focused content that blocks the main flow
|
|
162
|
+
|
|
163
|
+
### When NOT to Use
|
|
164
|
+
- Displaying information that could be inline
|
|
165
|
+
- Long forms or multi-step flows (use a page instead)
|
|
166
|
+
- Welcome messages or tutorials (use onboarding flows)
|
|
167
|
+
|
|
168
|
+
### Anatomy
|
|
169
|
+
- **Overlay/backdrop**: Semi-transparent dark (rgba(0,0,0,0.4-0.6))
|
|
170
|
+
- **Container**: Centered, max-width 480-640px, adequate padding (24-32px)
|
|
171
|
+
- **Header**: Title + close button (X) in top-right
|
|
172
|
+
- **Body**: Content area, scrollable if content overflows
|
|
173
|
+
- **Footer**: Action buttons (primary right, cancel left)
|
|
174
|
+
|
|
175
|
+
### Interaction
|
|
176
|
+
- Escape key closes the modal
|
|
177
|
+
- Clicking backdrop closes (for non-critical modals) or doesn't (for confirmations)
|
|
178
|
+
- Focus trapped inside modal (Tab cycles through modal elements only)
|
|
179
|
+
- Return focus to trigger element on close
|
|
180
|
+
- Prevent body scroll while modal is open
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Tables
|
|
185
|
+
|
|
186
|
+
### Best Practices
|
|
187
|
+
- Align text left, numbers right
|
|
188
|
+
- Header row: bold, subtle background, sticky on scroll
|
|
189
|
+
- Zebra striping OR subtle horizontal borders (not both)
|
|
190
|
+
- Minimum row height: 48px for touch, 36px for dense desktop
|
|
191
|
+
- Sortable columns: show sort indicator (arrow up/down)
|
|
192
|
+
- Pagination or virtual scroll for large datasets
|
|
193
|
+
|
|
194
|
+
### Responsive
|
|
195
|
+
- Priority columns stay visible, secondary columns hide on mobile
|
|
196
|
+
- Alternative: card-based layout on mobile instead of table
|
|
197
|
+
- Horizontal scroll as a last resort (wrap in a scroll container with shadow indicators)
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Feedback & Status
|
|
202
|
+
|
|
203
|
+
### Toast / Snackbar
|
|
204
|
+
- Brief messages (1-2 lines), auto-dismiss after 4-6 seconds
|
|
205
|
+
- Position: bottom-center or top-right
|
|
206
|
+
- Types: success (green), error (red), warning (amber), info (blue/neutral)
|
|
207
|
+
- Include dismiss action and optional undo for destructive actions
|
|
208
|
+
- Stack new toasts, don't replace existing ones
|
|
209
|
+
|
|
210
|
+
### Empty States
|
|
211
|
+
- Illustration or icon (purposeful, not decorative)
|
|
212
|
+
- Clear headline: what this area is for
|
|
213
|
+
- Description: why it's empty
|
|
214
|
+
- CTA: how to populate it
|
|
215
|
+
- Don't just show a blank white space
|
|
216
|
+
|
|
217
|
+
### Loading States
|
|
218
|
+
- **Skeleton screens** (preferred): Gray placeholder shapes matching content layout
|
|
219
|
+
- **Spinner**: Only for short, indeterminate waits (< 3 seconds expected)
|
|
220
|
+
- **Progress bar**: For determinate operations with known duration
|
|
221
|
+
- **Inline loading**: Button spinner, input loading indicator
|
|
222
|
+
|
|
223
|
+
### Error States
|
|
224
|
+
- Page-level: Friendly message + illustration, retry button, link to support
|
|
225
|
+
- Inline: Red border, error text below the field, `aria-invalid`
|
|
226
|
+
- Network: "Something went wrong" with retry, not a technical error dump
|
|
227
|
+
- 404: Helpful redirect suggestions, search, home link
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Accessibility Essentials
|
|
232
|
+
|
|
233
|
+
### Color & Contrast
|
|
234
|
+
- Body text: 4.5:1 contrast ratio minimum (WCAG AA)
|
|
235
|
+
- Large text (18px+ or 14px+ bold): 3:1 minimum
|
|
236
|
+
- Interactive elements: 3:1 against adjacent colors
|
|
237
|
+
- Don't use color as the only indicator — pair with icons, text, or patterns
|
|
238
|
+
|
|
239
|
+
### Keyboard Navigation
|
|
240
|
+
- All interactive elements focusable via Tab
|
|
241
|
+
- Visible focus indicator (not just browser default — design a custom one)
|
|
242
|
+
- Logical tab order matching visual layout
|
|
243
|
+
- Escape closes overlays, Enter activates buttons/links
|
|
244
|
+
|
|
245
|
+
### Screen Readers
|
|
246
|
+
- Meaningful alt text for informational images
|
|
247
|
+
- Empty alt (`alt=""`) for decorative images
|
|
248
|
+
- Proper heading hierarchy (h1 → h2 → h3, no skipping)
|
|
249
|
+
- ARIA labels for icon-only buttons and complex widgets
|
|
250
|
+
- Live regions for dynamic content updates (toast notifications, form errors)
|
|
251
|
+
|
|
252
|
+
### Motion
|
|
253
|
+
- Respect `prefers-reduced-motion` — disable or simplify animations
|
|
254
|
+
- No auto-playing video or audio without user control
|
|
255
|
+
- Avoid rapid flashing (3 flashes per second max)
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Design Principles — Anti-AI Aesthetic & Authentic Design Craft
|
|
2
|
+
|
|
3
|
+
Reference for producing designs that feel human-crafted, intentional, and unique. Load this when implementing designs or reviewing design quality.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Anti-AI-Look Patterns
|
|
8
|
+
|
|
9
|
+
AI-generated designs share recognizable traits. Avoid these to produce authentic work.
|
|
10
|
+
|
|
11
|
+
### Layout Anti-Patterns
|
|
12
|
+
|
|
13
|
+
| AI Trap | Why It Feels Generic | Do Instead |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Perfect 3-column symmetry for everything | Real content isn't symmetric | Vary column widths, use 2-col or asymmetric grids |
|
|
16
|
+
| Every section is full-width hero + centered text | Repetitive rhythm, no visual variety | Mix layout types: sidebar, offset, editorial, split |
|
|
17
|
+
| Giant hero with headline + subtitle + CTA on every page | Cookie-cutter template feel | Match the hero to content importance — some pages don't need one |
|
|
18
|
+
| Everything centered on the page | Monotonous visual flow | Use left-aligned text with intentional center/right accents |
|
|
19
|
+
| Equal spacing everywhere | Flat, robotic rhythm | Vary spacing to create grouping and breathing room |
|
|
20
|
+
| Card grids with identical card sizes | Catalog/stock feel | Vary card sizes, feature one, use masonry or editorial layouts |
|
|
21
|
+
|
|
22
|
+
### Color Anti-Patterns
|
|
23
|
+
|
|
24
|
+
| AI Trap | Why It Feels Generic | Do Instead |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| Blue-to-purple gradient as primary | Overused AI default | Choose a palette rooted in the brand or project's personality |
|
|
27
|
+
| Neon accent on dark background | "Tech startup template" look | Use muted, sophisticated accents — or bold ones with restraint |
|
|
28
|
+
| Using 6+ colors with equal prominence | Visual noise, no hierarchy | 1-2 primary colors, 1 accent, rest neutrals |
|
|
29
|
+
| Gradient backgrounds on every section | Decorative without purpose | Use solid colors; reserve gradients for specific emphasis |
|
|
30
|
+
| Pure black (#000) text on pure white (#fff) | Harsh contrast, screen glare | Use near-black (#1a1a1a–#2d2d2d) on off-white (#f8f8f8–#fafafa) |
|
|
31
|
+
| Colored shadows (purple/blue box-shadows) | Trendy but rarely appropriate | Neutral shadows unless the brand specifically calls for it |
|
|
32
|
+
|
|
33
|
+
### Typography Anti-Patterns
|
|
34
|
+
|
|
35
|
+
| AI Trap | Why It Feels Generic | Do Instead |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| Using Inter/Poppins/Montserrat for everything | Ubiquitous AI defaults | Consider the project's personality — serif for editorial, geometric sans for tech, humanist for approachable |
|
|
38
|
+
| Only 2 sizes: heading and body | Flat hierarchy | Use a proper type scale (e.g., 12/14/16/20/24/32/48) |
|
|
39
|
+
| All text in the same weight | No emphasis, everything competes | Use 2-3 weights (regular, medium, bold) with clear purpose |
|
|
40
|
+
| ALL CAPS EVERYWHERE | Aggressive, hard to read | Reserve caps for small labels, buttons, or overlines |
|
|
41
|
+
| Giant display text with no supporting content | Empty visual calories | Size should match content importance |
|
|
42
|
+
|
|
43
|
+
### Component Anti-Patterns
|
|
44
|
+
|
|
45
|
+
| AI Trap | Why It Feels Generic | Do Instead |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| border-radius: 9999px on everything | Bubbly, toy-like | Choose 1-2 radius values that match the design's tone (4-8px for sharp, 12-16px for soft) |
|
|
48
|
+
| Glassmorphism / frosted glass everywhere | Trend over function | Use glass effects sparingly where depth communication is needed |
|
|
49
|
+
| Drop shadows on everything | Visual heaviness, everything "floats" | Shadow only elements that conceptually need elevation (modals, dropdowns, cards on hover) |
|
|
50
|
+
| Outlined icon + outlined button + outlined card | Everything is a border, nothing has weight | Mix filled and outlined treatments for hierarchy |
|
|
51
|
+
| Decorative blob SVGs or wave dividers | Instant AI template identifier | Use geometric shapes with purpose, or no decoration at all |
|
|
52
|
+
| Stock illustration people with purple skin | Unmistakable AI/startup template | Use photography, custom illustration, or no illustration |
|
|
53
|
+
|
|
54
|
+
### Interaction Anti-Patterns
|
|
55
|
+
|
|
56
|
+
| AI Trap | Why It Feels Generic | Do Instead |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| Everything has a hover scale(1.05) | Bouncy, distracting | Reserve scale for interactive cards; use color/shadow changes for most hover states |
|
|
59
|
+
| 0.3s ease on everything | Sluggish, indiscriminate | Use faster transitions (150-200ms) for small elements, slower (300-400ms) for layout changes |
|
|
60
|
+
| Fade-in-up on scroll for every element | Scroll-jacking, animation fatigue | Animate only key content on first appearance; let secondary content be static |
|
|
61
|
+
| Loading spinners as the only loading state | No context about what's loading | Use skeleton screens, progressive content reveal, or inline loading indicators |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Authentic Design Principles
|
|
66
|
+
|
|
67
|
+
### 1. Content-First Hierarchy
|
|
68
|
+
|
|
69
|
+
Design serves content, not the other way around.
|
|
70
|
+
|
|
71
|
+
- Read the actual content before choosing layout
|
|
72
|
+
- Size elements proportional to their importance
|
|
73
|
+
- Use whitespace to group related content and separate sections
|
|
74
|
+
- Ask: "What should the user see first, second, third?"
|
|
75
|
+
|
|
76
|
+
### 2. Intentional Contrast
|
|
77
|
+
|
|
78
|
+
Every visual difference should communicate something.
|
|
79
|
+
|
|
80
|
+
- **Size contrast** — Headings vs. body, featured vs. standard items
|
|
81
|
+
- **Weight contrast** — Bold labels vs. regular values, strong CTAs vs. subtle links
|
|
82
|
+
- **Color contrast** — Primary actions vs. secondary, active states vs. default
|
|
83
|
+
- **Space contrast** — Tight groups of related items, generous gaps between sections
|
|
84
|
+
- **Density contrast** — Dense data areas vs. breathing hero/summary areas
|
|
85
|
+
|
|
86
|
+
### 3. Systematic but Not Robotic
|
|
87
|
+
|
|
88
|
+
Use systems (type scale, spacing scale, color tokens) but break them intentionally.
|
|
89
|
+
|
|
90
|
+
- Establish a base grid (4px or 8px) but don't snap everything mechanically
|
|
91
|
+
- Use your type scale but occasionally break it for display/hero moments
|
|
92
|
+
- Maintain consistent component patterns but allow contextual variations
|
|
93
|
+
|
|
94
|
+
### 4. Typography Does the Heavy Lifting
|
|
95
|
+
|
|
96
|
+
Most visual hierarchy comes from type, not decoration.
|
|
97
|
+
|
|
98
|
+
- Establish a clear scale: body → subhead → section head → page title → display
|
|
99
|
+
- Use weight and size together: a 14px bold label and a 16px regular body text create clear hierarchy without needing different colors
|
|
100
|
+
- Line-height matters: tighter for headings (1.1-1.3), looser for body (1.5-1.7)
|
|
101
|
+
- Letter-spacing: slightly positive for small caps/labels, zero or negative for large display text
|
|
102
|
+
|
|
103
|
+
### 5. Color as Communication
|
|
104
|
+
|
|
105
|
+
Color should mean something, not just decorate.
|
|
106
|
+
|
|
107
|
+
- **Brand color** — Primary actions, key elements, brand identity
|
|
108
|
+
- **Semantic color** — Success (green), warning (amber), error (red), info (blue)
|
|
109
|
+
- **Neutral palette** — Background, text, borders, dividers (this is 80% of your palette)
|
|
110
|
+
- **Accent** — Sparingly, to draw attention to one thing
|
|
111
|
+
|
|
112
|
+
### 6. Space Creates Meaning
|
|
113
|
+
|
|
114
|
+
Proximity and spacing communicate relationships.
|
|
115
|
+
|
|
116
|
+
- Items close together = related
|
|
117
|
+
- Items far apart = separate concepts
|
|
118
|
+
- Consistent internal padding = belonging to the same container
|
|
119
|
+
- Asymmetric margins = visual rhythm and movement
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Design Quality Checklist
|
|
124
|
+
|
|
125
|
+
Use this to evaluate designs before presenting to the user:
|
|
126
|
+
|
|
127
|
+
### Visual Hierarchy
|
|
128
|
+
- [ ] The most important element is visually dominant
|
|
129
|
+
- [ ] There is a clear reading order (F-pattern or Z-pattern where appropriate)
|
|
130
|
+
- [ ] Headings form a logical scale (not random sizes)
|
|
131
|
+
- [ ] CTAs are visually distinct from surrounding content
|
|
132
|
+
|
|
133
|
+
### Typography
|
|
134
|
+
- [ ] Body text is 16px+ for readability
|
|
135
|
+
- [ ] Line length is 45-75 characters for body text
|
|
136
|
+
- [ ] Heading/body font pairing is intentional
|
|
137
|
+
- [ ] No more than 3 font weights in active use
|
|
138
|
+
|
|
139
|
+
### Color
|
|
140
|
+
- [ ] Palette has 2 or fewer primary/accent colors
|
|
141
|
+
- [ ] Text:background contrast meets WCAG AA (4.5:1 for body, 3:1 for large text)
|
|
142
|
+
- [ ] Color is not the only indicator of state (icons, text, or shape also signal)
|
|
143
|
+
- [ ] Neutral palette has enough range (light bg, medium borders, dark text)
|
|
144
|
+
|
|
145
|
+
### Spacing & Layout
|
|
146
|
+
- [ ] Spacing follows a consistent scale (4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px)
|
|
147
|
+
- [ ] Related elements are grouped with tighter spacing
|
|
148
|
+
- [ ] Sections have comfortable breathing room
|
|
149
|
+
- [ ] Layout works at mobile, tablet, and desktop widths
|
|
150
|
+
|
|
151
|
+
### Components
|
|
152
|
+
- [ ] Interactive elements have visible hover/focus states
|
|
153
|
+
- [ ] Buttons have clear hierarchy (primary, secondary, tertiary/ghost)
|
|
154
|
+
- [ ] Form inputs have labels, placeholders are not used as labels
|
|
155
|
+
- [ ] Empty states, loading states, and error states are designed
|
|
156
|
+
|
|
157
|
+
### Interaction
|
|
158
|
+
- [ ] Transitions are fast (150-200ms) and purposeful
|
|
159
|
+
- [ ] Hover states indicate interactivity without being distracting
|
|
160
|
+
- [ ] Focus indicators are visible for keyboard navigation
|
|
161
|
+
- [ ] Animations don't block user interaction
|
|
162
|
+
|
|
163
|
+
### Authenticity
|
|
164
|
+
- [ ] Design doesn't match common template/AI patterns listed above
|
|
165
|
+
- [ ] Layout has visual variety (not repeating the same section format)
|
|
166
|
+
- [ ] Decoration (if any) serves a purpose
|
|
167
|
+
- [ ] The design reflects the project's unique personality
|
package/src/cli/index.ts
CHANGED
package/src/commands/init.ts
CHANGED
|
@@ -70,6 +70,67 @@ export class InitCommand {
|
|
|
70
70
|
return choices;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
private getCategorizedSkillChoices(availableSkills: SkillMetadata[], currentSkillNames: string[]): any[] {
|
|
74
|
+
const categories = [
|
|
75
|
+
{
|
|
76
|
+
name: '📋 Planning & Strategy',
|
|
77
|
+
skills: ['project-orchestrator', 'feature-planner', 'prompter-workflow', 'prompter-specs']
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: '🎨 Design & UI/UX',
|
|
81
|
+
skills: ['ui-ux-pro', 'design-system-generator', 'design-md']
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: '⚙️ Development & Code Review',
|
|
85
|
+
skills: ['code-review', 'laravel-code-review', 'mcp-builder']
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: '📝 Documentation',
|
|
89
|
+
skills: ['doc-builder', 'document-translator', 'agents-md-generator', 'meeting-notes']
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: '✨ Content & Productivity',
|
|
93
|
+
skills: ['gamma-builder', 'enhance-prompt']
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
const categorized = new Set<string>();
|
|
98
|
+
const choices: any[] = [];
|
|
99
|
+
|
|
100
|
+
for (const category of categories) {
|
|
101
|
+
const skillsInCategory = category.skills
|
|
102
|
+
.map(name => availableSkills.find(s => s.name === name))
|
|
103
|
+
.filter((s): s is SkillMetadata => !!s);
|
|
104
|
+
|
|
105
|
+
if (skillsInCategory.length === 0) continue;
|
|
106
|
+
|
|
107
|
+
choices.push(new Separator(chalk.bold.cyan(category.name)));
|
|
108
|
+
for (const skill of skillsInCategory) {
|
|
109
|
+
categorized.add(skill.name);
|
|
110
|
+
choices.push({
|
|
111
|
+
name: ` ${skill.name}`,
|
|
112
|
+
value: skill.name,
|
|
113
|
+
checked: currentSkillNames.includes(skill.name)
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Uncategorized skills
|
|
119
|
+
const uncategorized = availableSkills.filter(s => !categorized.has(s.name));
|
|
120
|
+
if (uncategorized.length > 0) {
|
|
121
|
+
choices.push(new Separator(chalk.bold.cyan('🔧 Other')));
|
|
122
|
+
for (const skill of uncategorized) {
|
|
123
|
+
choices.push({
|
|
124
|
+
name: ` ${skill.name}`,
|
|
125
|
+
value: skill.name,
|
|
126
|
+
checked: currentSkillNames.includes(skill.name)
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return choices;
|
|
132
|
+
}
|
|
133
|
+
|
|
73
134
|
async execute(options: InitOptions = {}): Promise<void> {
|
|
74
135
|
const projectPath = process.cwd();
|
|
75
136
|
const isReInitialization = await PrompterConfig.prompterDirExists(projectPath);
|
|
@@ -177,11 +238,8 @@ export class InitCommand {
|
|
|
177
238
|
|
|
178
239
|
const selectedSkillNames = await checkbox({
|
|
179
240
|
message: 'Select skills to install:',
|
|
180
|
-
choices:
|
|
181
|
-
|
|
182
|
-
value: skill.name,
|
|
183
|
-
checked: currentSkillNames.includes(skill.name)
|
|
184
|
-
}))
|
|
241
|
+
choices: this.getCategorizedSkillChoices(availableSkills, currentSkillNames),
|
|
242
|
+
pageSize: 20
|
|
185
243
|
});
|
|
186
244
|
selectedSkills = availableSkills.filter(s => selectedSkillNames.includes(s.name));
|
|
187
245
|
} catch (error) {
|
package/docs/product-spec.md
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
Product Specification Document
|
|
2
|
-
|
|
3
|
-
### 1. Executive Summary
|
|
4
|
-
- Product name and tagline: **Prompter CLI** — “Enhance prompts directly in your AI coding workflow.”
|
|
5
|
-
- Core value proposition: Turn rough ideas into **structured, professional prompt specifications** and install tool-specific slash-command workflows in local repos.
|
|
6
|
-
- Primary target users: Developers/teams using AI coding assistants who want standardized prompt enhancement workflows.
|
|
7
|
-
- Key differentiators: **Multi-tool workflow generation**, **local-first** (filesystem-only), and **managed template updates** using embedded markers.
|
|
8
|
-
|
|
9
|
-
### 2. Product Overview
|
|
10
|
-
- **Problem Statement:** AI prompt quality is inconsistent; teams need a repeatable way to transform rough ideas into high-quality specs and make them available as slash commands in their tools.
|
|
11
|
-
- **Solution:** A CLI that initializes a project with Prompter context, generates slash-command workflow files for supported AI tools, and helps list enhanced prompts.
|
|
12
|
-
- **Success Metrics:**
|
|
13
|
-
- Successful initialization rate (`prompter init` completes).
|
|
14
|
-
- Number of workflow files created/updated.
|
|
15
|
-
- Number of enhanced prompts listed (`prompter list` output count).
|
|
16
|
-
- **Scope:**
|
|
17
|
-
- **Included:** CLI commands (`init`, `update`, `list`), file templates for workflows, project context file, and detection of enhanced prompts.
|
|
18
|
-
- **Excluded:** Actual prompt enhancement execution (done by the AI tool), remote services, authentication, telemetry.
|
|
19
|
-
|
|
20
|
-
### 3. User Personas
|
|
21
|
-
- **Primary: AI-Enabled Developer**
|
|
22
|
-
- Goals: Quickly bootstrap AI prompt workflows; keep workflows up to date.
|
|
23
|
-
- Pain points: Inconsistent prompt specs; manual setup across tools.
|
|
24
|
-
- **Secondary: Team Lead/Architect**
|
|
25
|
-
- Goals: Standardize AI prompt practices across team repos.
|
|
26
|
-
- Pain points: Tool fragmentation and drift in prompt instructions.
|
|
27
|
-
- **Use Case Scenarios:**
|
|
28
|
-
- New repo bootstrap → run `prompter init` to scaffold workflows.
|
|
29
|
-
- Existing repo update → run `prompter update` to refresh managed sections.
|
|
30
|
-
- Review prompt history → run `prompter list` to see enhanced specs.
|
|
31
|
-
|
|
32
|
-
### 4. Feature Specifications
|
|
33
|
-
|
|
34
|
-
**Feature Name:** CLI Initialization
|
|
35
|
-
- **Description:** Creates `prompter/` directory, `prompter/project.md`, optional `AGENTS.md`, and tool-specific workflow files.
|
|
36
|
-
- **User Flow:**
|
|
37
|
-
1. User runs `prompter init`.
|
|
38
|
-
2. CLI checks if `prompter/` exists; if so, exits with warning.
|
|
39
|
-
3. User selects tools (interactive checkbox) or passes `--tools`.
|
|
40
|
-
4. CLI writes templates and workflow files.
|
|
41
|
-
5. CLI prints next steps.
|
|
42
|
-
- **Acceptance Criteria:**
|
|
43
|
-
- `prompter/` directory created with `project.md`.
|
|
44
|
-
- `AGENTS.md` created only if missing.
|
|
45
|
-
- Tool workflow files created under tool-specific paths.
|
|
46
|
-
- Success message printed.
|
|
47
|
-
- **Priority:** Critical
|
|
48
|
-
- **Dependencies:** `src/commands/init.ts`, `src/core/config.ts`, templates in `src/core/templates/*`, configurators in `src/core/configurators/slash/*`.
|
|
49
|
-
|
|
50
|
-
**Feature Name:** Workflow Update
|
|
51
|
-
- **Description:** Updates managed template sections in existing workflow files for all supported tools.
|
|
52
|
-
- **User Flow:**
|
|
53
|
-
1. User runs `prompter update`.
|
|
54
|
-
2. CLI checks for `prompter/`; if missing, exits with error.
|
|
55
|
-
3. For each tool configurator, updates files containing managed markers.
|
|
56
|
-
4. Outputs updated count.
|
|
57
|
-
- **Acceptance Criteria:**
|
|
58
|
-
- If `prompter/` absent, prints error and sets exit code.
|
|
59
|
-
- If managed markers missing, logs failure for that file.
|
|
60
|
-
- Updates only managed section between markers.
|
|
61
|
-
- **Priority:** High
|
|
62
|
-
- **Dependencies:** `src/commands/update.ts`, `src/core/configurators/slash/base.ts`, `src/core/config.ts`.
|
|
63
|
-
|
|
64
|
-
**Feature Name:** Enhanced Prompt Listing
|
|
65
|
-
- **Description:** Lists existing enhanced prompts under `prompter/<slug>/enhanced-prompt.md`.
|
|
66
|
-
- **User Flow:**
|
|
67
|
-
1. User runs `prompter list` (or `--json`).
|
|
68
|
-
2. CLI scans `prompter/` for directories containing `enhanced-prompt.md`.
|
|
69
|
-
3. Outputs list and optional JSON structure.
|
|
70
|
-
- **Acceptance Criteria:**
|
|
71
|
-
- JSON output when `--json` used.
|
|
72
|
-
- Empty state messaging when no prompts found.
|
|
73
|
-
- Sorted list by slug.
|
|
74
|
-
- **Priority:** Medium
|
|
75
|
-
- **Dependencies:** `src/commands/list.ts`, `src/core/config.ts`.
|
|
76
|
-
|
|
77
|
-
**Feature Name:** Tool-Specific Workflow Generation
|
|
78
|
-
- **Description:** Creates or updates slash-command files for supported AI tools.
|
|
79
|
-
- **User Flow:**
|
|
80
|
-
1. CLI picks tool configurator based on user selection.
|
|
81
|
-
2. Writes file with frontmatter (if applicable) and managed markers.
|
|
82
|
-
- **Acceptance Criteria:**
|
|
83
|
-
- Files created under correct tool paths.
|
|
84
|
-
- Body contains managed markers from `PROMPTER_MARKERS`.
|
|
85
|
-
- **Priority:** High
|
|
86
|
-
- **Dependencies:** `src/core/configurators/slash/*`, `src/core/templates/slash-command-templates.ts`.
|
|
87
|
-
|
|
88
|
-
### 5. Technical Architecture
|
|
89
|
-
- **System Overview:** Local CLI that reads/writes repository files and generates prompt templates. No server-side components.
|
|
90
|
-
- **Technology Stack:**
|
|
91
|
-
- **Language:** TypeScript → compiled to Node.js ES Modules (`src/` → `dist/`).
|
|
92
|
-
- **Runtime:** Node.js >= 20 (`package.json`).
|
|
93
|
-
- **Libraries:** `commander`, `@inquirer/prompts`, `chalk`.
|
|
94
|
-
- **Data Models:**
|
|
95
|
-
- `EnhancedPrompt` (in-memory): `{ id, path, createdAt }` in `src/commands/list.ts`.
|
|
96
|
-
- `ToolChoice` and `SUPPORTED_TOOLS` in `src/core/config.ts`.
|
|
97
|
-
- **APIs & Integrations:** No network APIs. Integrates with tool-specific file conventions.
|
|
98
|
-
- **Infrastructure:** Local filesystem only. CLI entry is `bin/prompter.js` which loads `dist/cli/index.js`.
|
|
99
|
-
|
|
100
|
-
**Architecture Diagram (Mermaid):**
|
|
101
|
-
```mermaid
|
|
102
|
-
flowchart TD
|
|
103
|
-
CLI[prompter CLI] -->|init| FS[(Local Filesystem)]
|
|
104
|
-
CLI -->|update| FS
|
|
105
|
-
CLI -->|list| FS
|
|
106
|
-
FS -->|workflow files| Tools[AI Tools: Claude/Codex/etc.]
|
|
107
|
-
Templates[Templates] --> CLI
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### 6. Non-Functional Requirements
|
|
111
|
-
- **Performance:** Fast file IO; scans only `prompter/` directory.
|
|
112
|
-
- **Security:** No authentication; operates on local filesystem; no data transmission.
|
|
113
|
-
- **Scalability:** Handles many prompt folders; linear scan in `prompter/`.
|
|
114
|
-
- **Reliability:** Uses guarded checks for existing directories; safe updates via marker boundaries.
|
|
115
|
-
- **Compliance:** None specified. ⚠️ ASSUMPTION: Local-only operation minimizes compliance needs.
|
|
116
|
-
|
|
117
|
-
### 7. User Interface Specifications
|
|
118
|
-
- **Navigation Structure:** CLI commands:
|
|
119
|
-
- `prompter init`
|
|
120
|
-
- `prompter update`
|
|
121
|
-
- `prompter list`
|
|
122
|
-
- **Key Screens/Pages:** Terminal output with colored status messages (`chalk`).
|
|
123
|
-
- **Design Patterns:**
|
|
124
|
-
- Interactive selection via checkbox prompt.
|
|
125
|
-
- Managed template sections via markers: `<!-- prompter-managed-start -->` and `<!-- prompter-managed-end -->`.
|
|
126
|
-
- **Responsive Behavior:** N/A (CLI).
|
|
127
|
-
|
|
128
|
-
### 8. Integration Requirements
|
|
129
|
-
- **Third-Party Services:** None.
|
|
130
|
-
- **APIs Consumed:** None.
|
|
131
|
-
- **APIs Provided:** CLI commands only.
|
|
132
|
-
- **Webhooks/Events:** None.
|
|
133
|
-
|
|
134
|
-
### 9. Data Specifications
|
|
135
|
-
- **Data Models:**
|
|
136
|
-
- `prompter/project.md` — project context template.
|
|
137
|
-
- Workflow files per tool, e.g., `.codex/prompts/prompter-enhance.md`.
|
|
138
|
-
- **Data Flow:** User input → CLI templates → filesystem output → AI tool reads workflow file.
|
|
139
|
-
- **Storage Requirements:** Low; markdown text files only.
|
|
140
|
-
- **Data Privacy:** No PII processing; files are local. ⚠️ ASSUMPTION: Enhanced prompts may include sensitive text, handled by repo policies.
|
|
141
|
-
|
|
142
|
-
### 10. Current Limitations & Technical Debt
|
|
143
|
-
- No validation of `--tools` inputs; invalid tool IDs are ignored silently (no error path in `src/commands/init.ts`).
|
|
144
|
-
- `prompter update` updates all known tools, even if not used in the project.
|
|
145
|
-
- No tests present (no `test/` files found).
|
|
146
|
-
- Update requires markers; files without them error (`src/core/configurators/slash/base.ts`).
|
|
147
|
-
|
|
148
|
-
### 11. Assumptions & Inferences
|
|
149
|
-
- ⚠️ ASSUMPTION: Prompter is intended to be used as a **global CLI** (`npm install -g`), inferred from README and `package.json` `bin` mapping.
|
|
150
|
-
- ⚠️ ASSUMPTION: Enhanced prompts are generated by the AI assistant following the workflow, not by this CLI.
|
|
151
|
-
- ⚠️ ASSUMPTION: Users will maintain versioned workflow files in their repos and accept managed updates.
|
package/docs/tasks.md
DELETED