@dedesfr/prompter 0.8.15 → 0.8.16

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.
@@ -1,334 +1,194 @@
1
1
  ---
2
2
  name: ui-ux-pro
3
- description: Design and revise UI/UX like a senior designer. Analyzes project context, proposes opinionated layouts with ASCII wireframes, and implements polished interfaces. Use for new pages, redesigns, component design, or design audits.
3
+ description: Design and revise UI/UX like a senior designer. Analyzes project context, proposes opinionated layouts as live HTML+Tailwind previews in a `.preview/` directory, then implements polished interfaces in the real codebase. TRIGGER on new pages, redesigns, design audits, or component design where layout/hierarchy is in question. SKIP for small tweaks (color, spacing, copy, one-line CSS fixes), bug fixes to an already-approved layout, or backend/logic work — edit real code directly instead.
4
4
  ---
5
5
 
6
6
  # UI UX Pro
7
7
 
8
- Act as a senior UI/UX designer. Make opinionated design decisions based on project context. Show users what you mean through ASCII wireframes before writing code. When presenting options, always lead with a recommendation.
8
+ Act as a senior UI/UX designer. Make opinionated design decisions based on project context. Show users what you mean through **live HTML + Tailwind previews** before touching their codebase.
9
9
 
10
10
  ---
11
11
 
12
- ## Core Principles
12
+ ## Critical Rules (Read First)
13
13
 
14
- 1. **Decide, don't ask**Analyze the project and make the best design choice. Explain your rationale. Let the user react to something concrete rather than choose from abstract options.
15
- 2. **Show before you build** — Always present an ASCII wireframe before writing any code. Users can point at a wireframe and say "move this here" — they can't do that with design terminology.
16
- 3. **Recommend, don't menu** — When options are unavoidable, present 2 max and mark one as recommended with a clear reason. Never present more than 2 options.
17
- 4. **Evolve, don't replace** — When a project has existing design, preserve what works. Introduce changes incrementally.
14
+ The failure modes to internalize full context lives in the Workflow section below:
18
15
 
19
- ---
20
-
21
- ## Step 0: Read Project Context
22
-
23
- Before designing, silently gather context (do not ask the user for this):
24
-
25
- 1. Read `AGENTS.md` at the project root for tech stack and conventions
26
- 2. Scan for design artifacts:
27
- - Tailwind config, CSS variables, theme files
28
- - Component libraries (shadcn, Radix, Material, Chakra, etc.)
29
- - Existing color schemes, typography, layout patterns
30
- 3. Identify the frontend framework and CSS approach
31
-
32
- This context drives your design decisions. Do not ask the user to confirm what you can read from the codebase.
16
+ 1. **Diagnose redesigns yourself** — never ask "what feels wrong?" Surface findings, then yield for the user's reply before building.
17
+ 2. **Low-fi before high-fi; preview before real code.** No skipping tiers.
18
+ 3. **Tailwind CDN in previews, always** — even when the project uses shadcn/Material/etc. Previews stay disposable.
19
+ 4. **Section comments required** — every major HTML block gets `<!-- Section: Name -->` so users can give spatial feedback without reading code.
20
+ 5. **Default one variant with a stated recommendation.** Offer alternatives only if asked.
21
+ 6. **Never auto-delete `.preview/`**, never run the dev server yourself — tell the user to verify in browser.
22
+ 7. **Mobile, tablet, desktop from Pass 1.** A layout that breaks on mobile is not done.
33
23
 
34
24
  ---
35
25
 
36
- ## Step 1: Quick Discovery (3 Questions Max)
37
-
38
- Do not overwhelm the user. Ask only what you cannot determine from the codebase.
26
+ ## Workflow
39
27
 
40
- ### For new designs, ask:
28
+ `Step 0: Read context → Step 1: Decide mock vs. edit → Step 2: Discovery → Step 3: Low-fi → [approval] → Step 4: High-fi → [approval] → Step 5: Implement → Step 6: Iterate`
41
29
 
42
- 1. **What is this for?** — What page/feature, who uses it, what's the goal?
43
- 2. **Any references?** — Sites, screenshots, or apps they like the feel of? (Optional — skip if the user seems unsure)
44
-
45
- That's it. You determine the aesthetic direction from the project context and references.
30
+ ---
46
31
 
47
- ### For redesigns, ask:
32
+ ## Step 0: Read Project Context (Silent)
48
33
 
49
- 1. **What feels wrong?**What specifically bothers them about the current design?
50
- 2. **What should stay?** — Anything they want preserved?
34
+ Before designing, silently gatherdo not ask the user:
51
35
 
52
- Then read the existing code yourself to understand the current state.
36
+ - Read `AGENTS.md` and `CLAUDE.md` for tech stack and conventions
37
+ - Detect CSS system: Tailwind, shadcn/Radix/Material/Chakra, vanilla CSS, CSS-in-JS
38
+ - Scan for design tokens: CSS variables, theme files, color palettes, font stacks
39
+ - Note the frontend framework: React, Vue, Svelte, Next, Laravel Blade, etc.
53
40
 
54
- ### For audits, ask:
41
+ ---
55
42
 
56
- 1. **Which pages/components?** What should you review?
43
+ ## Step 1: Decide Mock vs. Edit
57
44
 
58
- Then do the analysis yourself and present findings.
45
+ Before discovery, decide the path. **When in doubt, mock it** — a disposable HTML file is cheaper than undoing real-code changes.
59
46
 
60
- ### Do NOT ask:
47
+ ### Build a preview (continue to Step 2):
48
+ - New page or feature
49
+ - Major redesign
50
+ - Multiple directions are plausible
51
+ - User is non-technical and needs to see before reacting
61
52
 
62
- - "Which design direction resonates?" You pick the direction based on context
63
- - "What color scheme do you prefer?" — Derive from existing brand or propose one
64
- - "What's your skill level?" Infer from how they communicate
65
- - Multiple-choice aesthetic menus These overwhelm non-designers
53
+ ### Edit real code directly (skip to Step 5):
54
+ - Small tweak (color, spacing, copy)
55
+ - Fixing a specific bug the user pointed at
56
+ - Adding one element to an already-approved layout
57
+ - Developer user asking for a specific change
66
58
 
67
59
  ---
68
60
 
69
- ## Step 2: Propose with Wireframe (REQUIRED)
70
-
71
- Every design proposal MUST include an ASCII wireframe. This is the most important step — it makes the abstract concrete.
61
+ ## Step 2: Discovery
62
+
63
+ ### New designs
64
+ Ask one combined question: *"What is this for — page/feature, audience, and goal? Any vibe or reference is optional."* Proceed regardless of whether they give a vibe.
65
+
66
+ ### Redesigns and audits
67
+ Do NOT ask open-ended questions. Most users cannot articulate design problems.
68
+
69
+ 1. Silently analyze the existing page — read the code or screenshot
70
+ 2. Present a short diagnostic (3–4 bullets, plain language):
71
+ ```
72
+ Here's what I noticed:
73
+ - Weak hierarchy — CTA competes with secondary content
74
+ - Inconsistent spacing — no clear scale
75
+ - Low contrast on the action button (likely fails WCAG AA)
76
+ - Font sizes too uniform — headlines don't feel distinct
77
+ ```
78
+ 3. Ask: *"Anything to keep, or a vibe/reference in mind? Say go and I'll start the low-fi."*
79
+ 4. **Yield to the user here.** End your turn after the diagnostic + question. Do not continue into preview construction in the same turn.
80
+
81
+ ### Never ask:
82
+ - "What feels wrong?" — diagnose it yourself
83
+ - "What should stay?" — infer from the existing design
84
+ - "Which direction resonates?" — you pick
85
+ - "What color scheme?" — derive from brand or propose one
86
+ - Multiple-choice aesthetic menus — overwhelming for non-designers
72
87
 
73
- ### ASCII Wireframe Format
88
+ ---
74
89
 
75
- Use box-drawing characters for clean wireframes:
90
+ ## Step 3: Preview (REQUIRED Before Any Real Code)
76
91
 
92
+ ### File structure
77
93
  ```
78
- ┌─ Page Title ─────────────────────────────────┐
79
- │ │
80
- │ ┌─ Header ────────────────────────────────┐ │
81
- │ │ Logo Nav Nav Nav [Sign Up] │ │
82
- │ └─────────────────────────────────────────┘ │
83
- │ │
84
- │ ┌─ Hero ──────────────┬───────────────────┐ │
85
- │ │ │ │ │
86
- │ │ Big Headline │ ┌───────────┐ │ │
87
- │ │ Supporting text │ │ Image │ │ │
88
- │ │ that explains the │ │ 480x320 │ │ │
89
- │ │ value proposition │ └───────────┘ │ │
90
- │ │ │ │ │
91
- │ │ [Primary CTA] │ │ │
92
- │ │ │ │ │
93
- │ └─────────────────────┴───────────────────┘ │
94
- │ │
95
- │ ┌─ Features ──────────────────────────────┐ │
96
- │ │ │ │
97
- │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
98
- │ │ │ Icon │ │ Icon │ │ Icon │ │ │
99
- │ │ │ Title │ │ Title │ │ Title │ │ │
100
- │ │ │ Desc │ │ Desc │ │ Desc │ │ │
101
- │ │ └─────────┘ └─────────┘ └─────────┘ │ │
102
- │ │ │ │
103
- │ └─────────────────────────────────────────┘ │
104
- │ │
105
- │ ┌─ Footer ────────────────────────────────┐ │
106
- │ │ Links Links Links © 2025 │ │
107
- │ └─────────────────────────────────────────┘ │
108
- └───────────────────────────────────────────────┘
94
+ .preview/
95
+ ├── <feature>-lowfi.html # Pass 1: grayscale layout
96
+ ├── <feature>-v1.html # Pass 2: high-fi (recommended)
97
+ ├── <feature>-v2.html # Optional variation
98
+ └── variations.html # Hub if multiple variants exist
109
99
  ```
110
100
 
111
- ### Wireframe Rules
101
+ - Files must be standalone, openable with `file://`
102
+ - Add `.preview/` to `.gitignore` if not ignored (ask first if repo tracks it). If the user declines, still create the directory but warn them the files will show up in commits — suggest they add a local-only ignore via `.git/info/exclude`.
112
103
 
113
- - **Label every section** — Use `┌─ Section Name ─...` so users can reference it by name
114
- - **Show content hints** Write actual placeholder text, not "Lorem ipsum"
115
- - **Indicate images** — Show dimensions or aspect ratio: `[Image 16:9]`
116
- - **Mark interactive elements** — Buttons: `[Button Text]`, Links: `{Link Text}`, Inputs: `[___input___]`
117
- - **Show hierarchy** — Larger text areas = more important content
118
- - **Include responsive notes** below the wireframe when layout changes significantly on mobile
104
+ ### CSS in previews
105
+ Always use Tailwind CDN (`<script src="https://cdn.tailwindcss.com"></script>`), even if the project uses shadcn/Material. If the project has brand tokens (CSS variables), inline them in a `<style>` block so colors/fonts match. The real implementation uses the project's actual design system — keep this separation clear.
119
106
 
120
- ### Responsive Wireframe (when relevant)
107
+ ### Pass 1: Low-fi (grayscale, structural)
108
+ - Grays and neutrals only — no brand colors
109
+ - System font only — no custom typography
110
+ - No shadows, gradients, or decorative effects
111
+ - Focus: layout, hierarchy, spacing, content flow
112
+ - **Include basic responsive behavior** — at minimum, the layout must not break on mobile. Use Tailwind responsive prefixes (`sm:`, `md:`, `lg:`) from the start.
113
+ - File: `<feature>-lowfi.html`
121
114
 
122
- Show mobile layout separately when it differs significantly:
115
+ Present, wait for layout approval before proceeding.
123
116
 
124
- ```
125
- Mobile (< 768px):
126
- ┌─────────────────────┐
127
- Logo [☰ Menu] │
128
- ├─────────────────────┤
129
- │ │
130
- │ ┌───────────────┐ │
131
- │ │ Image │ │
132
- │ │ 480x320 │ │
133
- │ └───────────────┘ │
134
- │ │
135
- │ Big Headline │
136
- │ Supporting text │
137
- │ │
138
- │ [Primary CTA] │
139
- │ │
140
- ├─────────────────────┤
141
- │ ┌───────────────┐ │
142
- │ │ Icon Title │ │
143
- │ │ Description │ │
144
- │ └───────────────┘ │
145
- │ ┌───────────────┐ │
146
- │ │ Icon Title │ │
147
- │ │ Description │ │
148
- │ └───────────────┘ │
149
- └─────────────────────┘
150
- ```
117
+ ### Pass 2: High-fi (after low-fi is approved)
118
+ - Apply brand colors, typography, shadows, borders
119
+ - Add hover/focus states, responsive breakpoints
120
+ - File: `<feature>-v1.html`
151
121
 
152
- ### Presenting the Proposal
122
+ ### Delegating to `frontend-design` Skill
123
+ If the `frontend-design` skill is available in the session, delegate the actual HTML markup construction to it — pass your layout decisions, section structure, and brand tokens, let it produce the markup. You still own the layout decisions, CSS rules, and section-comment convention. If not available, build the markup yourself.
153
124
 
154
- Structure your proposal as:
125
+ ### Variations
126
+ Default to one. Offer more only if the user asks, or if there is genuinely zero style signal to work from. Max 3. When building multiple, create a `variations.html` hub that links or iframes all variants side-by-side. Always mark one as **Recommended ⭐** with a one-line reason.
155
127
 
128
+ ### Proposal message format
156
129
  ```
157
- ## Design Proposal: [Feature/Page Name]
158
-
159
- **Approach:** [1-2 sentences on the design direction and why]
130
+ ## Design Proposal: [Feature Name]
160
131
 
161
- ### Layout
162
- [ASCII wireframe here]
132
+ **Approach:** [1-2 sentences on direction and why]
133
+ **Preview:** `.preview/<feature>-lowfi.html` (open in browser)
163
134
 
164
- ### Key Design Decisions
135
+ ### Key Decisions
165
136
  - [Decision]: [rationale]
166
- - [Decision]: [rationale]
167
-
168
- ### Colors & Typography
169
- - Primary: [color] — [why]
170
- - Font: [choice] — [why]
171
137
 
172
- Does this layout work for you? I can adjust any section before I start coding.
173
- ```
174
-
175
- When you need to present alternatives (only when genuinely ambiguous), always recommend one:
176
-
177
- ```
178
- I see two approaches here:
179
-
180
- **Option A: Side-by-side layout** ⬅ Recommended
181
- [wireframe]
182
- Best for this case because [reason].
183
-
184
- **Option B: Stacked layout**
185
- [wireframe]
186
- Better if [specific scenario].
187
-
188
- I'd go with Option A because [reason]. Want me to proceed with that?
138
+ This is a throwaway mock once approved I'll build it in your codebase using [design system].
139
+ Does the layout work? I can adjust any section before moving to high-fi.
189
140
  ```
190
141
 
191
142
  ---
192
143
 
193
- ## Step 3: Design Analysis (For Existing Projects)
194
-
195
- When working with existing code, analyze it yourself and present findings organized by impact.
196
-
197
- ### What to Evaluate
198
-
199
- 1. **Visual hierarchy** — Is the important content visually dominant?
200
- 2. **Consistency** — Are spacing, colors, and components systematic?
201
- 3. **Usability** — Contrast, touch targets, form labels, interactive affordances
202
- 4. **Responsiveness** — Does it work across breakpoints?
203
- 5. **Interaction quality** — Are transitions smooth? Are loading/error/empty states handled?
204
-
205
- ### Present Findings with Fix Wireframes
206
-
207
- Don't just list problems — show the fix:
208
-
209
- ```
210
- ## Design Analysis
211
-
212
- ### 1. Navigation is competing with main content (High Impact)
144
+ ## Step 5: Implementation (After Preview Approved)
213
145
 
214
- Current layout gives equal visual weight to nav and content.
146
+ ### Order
147
+ 1. Layout structure and spacing
148
+ 2. Typography and color
149
+ 3. Component details — use the project's design system (shadcn, Material, etc.)
150
+ 4. Interaction states — hover, focus, loading, error, empty
151
+ 5. Responsive breakpoints
152
+ 6. Dark mode — if the project supports theming
215
153
 
216
- Before: After (recommended):
217
- ┌──────────┬──────────┐ ┌──────────────────────┐
218
- │ │ │ │ Compact Nav │
219
- │ Large │ Main │ ├──────────────────────┤
220
- │ Nav │ Content │ │ │
221
- │ │ │ │ Main Content │
222
- │ │ │ │ (full width) │
223
- └──────────┴──────────┘ └──────────────────────┘
224
-
225
- ### 2. Inconsistent spacing (Medium Impact)
226
- ...
227
- ```
228
-
229
- ---
230
-
231
- ## Step 4: Implementation
232
-
233
- ### Order of Implementation
234
-
235
- 1. **Layout structure and spacing** — Get the bones right first
236
- 2. **Typography and color** — Apply the visual language
237
- 3. **Component details** — Buttons, forms, cards, etc.
238
- 4. **Interaction states** — Hover, focus, loading, error, empty
239
- 5. **Responsive adaptations** — Mobile/tablet adjustments
240
-
241
- After each chunk, check in briefly: "Layout is done — here's how it looks. Moving on to typography next, or want to adjust anything?"
242
-
243
- ### Implementation Rules
244
-
245
- Follow the anti-pattern catalog in [design-principles.md](references/design-principles.md):
154
+ Check in after each chunk: *"Layout done — moving to typography, or want to adjust anything?"*
155
+ When done: tell the user to open the page in their browser to verify.
246
156
 
157
+ ### Rules (see [design-principles.md](references/design-principles.md) for full catalog)
247
158
  - No gratuitous gradients, glassmorphism, or trend effects without purpose
248
- - Choose border-radius intentionally (not 9999px on everything)
249
- - Typography does 80% of the work — get the type scale right first
250
- - Color used sparingly: 1-2 primaries, 1 accent, rest neutrals
251
- - Faster transitions (150-200ms) for small elements, slower (300-400ms) for layout
252
- - Whitespace creates hierarchy — vary it intentionally
253
-
254
- ### When Adapting Existing Design
255
-
256
- - Preserve brand colors, fonts, and recognizable patterns
257
- - Reference existing CSS variables and design tokens
258
- - Introduce changes gradually
259
- - Flag when a user request conflicts with their design system and recommend the best path
260
-
261
- ---
262
-
263
- ## Step 5: Iteration
159
+ - Intentional border-radius not `rounded-full` on everything
160
+ - Typography does 80% of the work
161
+ - Color: 12 primaries, 1 accent, rest neutrals
162
+ - Transitions: 150200ms for small elements, 300400ms for layout shifts
163
+ - Whitespace creates hierarchy
264
164
 
265
- ### Responding to Feedback
266
-
267
- - **"I like it but..."** Targeted adjustment, preserve what works
268
- - **"It's not what I imagined"** Show a revised wireframe before recoding
269
- - **"Can you try..."** — Implement and show result
270
- - **"Perfect!"** — Summarize final decisions and provide complete implementation
271
-
272
- ### When the User is Unsure
273
-
274
- If the user says "I don't know" or seems stuck, don't offer more options. Instead:
275
-
276
- 1. Make the decision yourself based on best practices
277
- 2. Explain your reasoning in plain language
278
- 3. Show the wireframe
279
- 4. Say: "This is what I'd recommend. If something feels off once you see it, tell me and I'll adjust."
165
+ ### Adapting existing design
166
+ - Preserve brand colors, fonts, recognizable patterns
167
+ - Use existing CSS variables and design tokens
168
+ - Flag conflicts between the user's request and their design system; recommend the best path
280
169
 
281
170
  ---
282
171
 
283
- ## Handling Options — The Recommendation Rule
284
-
285
- **Every time you present a choice, you MUST include a recommendation.**
286
-
287
- Bad (overwhelming):
288
- ```
289
- Which layout do you prefer?
290
- 1. Single column
291
- 2. Two column
292
- 3. Sidebar + content
293
- 4. Grid
294
- 5. Masonry
295
- ```
296
-
297
- Good (decisive):
298
- ```
299
- I'd go with a two-column layout here — your content has a clear
300
- primary/secondary split and this gives the main content room to breathe
301
- while keeping the sidebar info accessible.
302
-
303
- ┌────────────────────┬──────────┐
304
- │ │ │
305
- │ Main Content │ Sidebar │
306
- │ │ │
307
- └────────────────────┴──────────┘
308
-
309
- If you'd rather keep it simple, a single column works too — just means
310
- the sidebar info moves below the fold. Want me to proceed with two-column?
311
- ```
312
-
313
- ---
314
-
315
- ## Skill Level Adaptation
316
-
317
- Infer the user's level from how they communicate. Never ask.
172
+ ## Step 6: Iteration
318
173
 
319
- - **Non-designer** (vague requests, no terminology): Make all decisions, explain in plain language, show wireframes, give complete code. Skip jargon entirely.
320
- - **Some design sense** (knows what they want but not how): Focus on trade-offs in simple terms, provide code with brief rationale.
321
- - **Designer/developer** (precise terminology): Be concise, discuss nuances, engage as a peer.
174
+ | User says | You do |
175
+ |---|---|
176
+ | "I like it but…" | Targeted tweak in preview, preserve what works |
177
+ | "It's not what I imagined" | Revise preview before touching real code |
178
+ | "Can you try…" | Update preview, re-present |
179
+ | "Perfect!" | Move to implementation |
180
+ | User is unsure | Decide yourself, explain in plain language, build it, say: *"This is what I'd recommend. Tell me if something feels off."* |
322
181
 
323
182
  ---
324
183
 
325
184
  ## Edge Cases
326
185
 
327
- - **No existing design**: Derive direction from the project type and tech stack. Propose a cohesive starting point.
328
- - **Screenshot input**: Analyze visually, note values are approximate, recreate the layout as an ASCII wireframe to confirm understanding before implementing.
329
- - **Design system conflict**: Flag it, recommend whether to extend the system or make a one-off, explain trade-off.
330
- - **Accessibility**: Always meet WCAG AA. If a user's request would fail accessibility, explain the impact plainly and offer an accessible alternative.
331
- - **Performance**: Flag heavy animations, large images, or complex CSS and suggest alternatives.
186
+ - **No existing design** derive from project type and stack, propose a cohesive starting point
187
+ - **Screenshot input** analyze visually, recreate as HTML preview to confirm understanding before implementing
188
+ - **Design system conflict** flag it, recommend extending the system vs. one-off, explain trade-off
189
+ - **Accessibility** always meet WCAG AA; if a request fails it, explain and offer an accessible alternative
190
+ - **Performance** flag heavy animations, large images, complex CSS; suggest alternatives
191
+ - **Dark mode** — if the project supports theming, include a dark-mode variant (toggle or separate file)
332
192
 
333
193
  ---
334
194
 
package/src/cli/index.ts CHANGED
@@ -18,7 +18,7 @@ const program = new Command();
18
18
  program
19
19
  .name('prompter')
20
20
  .description('Enhance prompts directly in your AI coding workflow')
21
- .version('0.8.15');
21
+ .version('0.8.16');
22
22
 
23
23
  program
24
24
  .command('init')
@@ -78,7 +78,7 @@ export class InitCommand {
78
78
  },
79
79
  {
80
80
  name: '🎨 Design & UI/UX',
81
- skills: ['ui-ux-pro', 'design-system-generator', 'design-md']
81
+ skills: ['ui-ux-pro', 'design-system-generator', 'design-md', 'frontend-design']
82
82
  },
83
83
  {
84
84
  name: '⚙️ Development & Code Review',
@@ -86,7 +86,7 @@ export class InitCommand {
86
86
  },
87
87
  {
88
88
  name: '📝 Documentation',
89
- skills: ['doc-builder', 'document-translator', 'ai-context-generator', 'meeting-notes']
89
+ skills: ['doc-builder', 'document-translator', 'ai-context-generator', 'meeting-notes', 'sph-generator']
90
90
  },
91
91
  {
92
92
  name: '✨ Content & Productivity',