@llipe.com/dev-tasks 0.9.1 → 0.10.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/.claude/agents/ux-engineer.md +118 -114
- package/.claude/skills/activity-refine/SKILL.md +1 -0
- package/.claude/skills/ux-scaffold/SKILL.md +129 -0
- package/.claude/skills/ux-scaffold/scripts/scaffold-full.sh +183 -0
- package/.claude/skills/ux-scaffold/scripts/scaffold-lite.sh +235 -0
- package/.claude/skills/ux-theme-gen/SKILL.md +149 -0
- package/.github/agents/ux-engineer.agent.md +119 -114
- package/.github/skills/activity-refine/SKILL.md +6 -0
- package/.github/skills/ux-scaffold/SKILL.md +129 -0
- package/.github/skills/ux-scaffold/scripts/scaffold-full.sh +183 -0
- package/.github/skills/ux-scaffold/scripts/scaffold-lite.sh +235 -0
- package/.github/skills/ux-theme-gen/SKILL.md +149 -0
- package/.kiro/agents/ux-engineer.md +119 -132
- package/.kiro/skills/activity-refine/SKILL.md +1 -0
- package/.kiro/skills/ux-scaffold/SKILL.md +129 -0
- package/.kiro/skills/ux-scaffold/scripts/scaffold-full.sh +183 -0
- package/.kiro/skills/ux-scaffold/scripts/scaffold-lite.sh +235 -0
- package/.kiro/skills/ux-theme-gen/SKILL.md +149 -0
- package/AGENTS.md +8 -7
- package/CHANGELOG.md +42 -0
- package/DESIGN.md +233 -0
- package/README.md +30 -28
- package/bundle-manifest.json +1 -0
- package/dist/bin/dev-tasks.js +4 -0
- package/dist/bin/dev-tasks.js.map +1 -1
- package/dist/core/distribution/doctor.d.ts +2 -2
- package/dist/core/distribution/doctor.js +3 -3
- package/dist/core/distribution/migrate.d.ts +5 -3
- package/dist/core/distribution/migrate.d.ts.map +1 -1
- package/dist/core/distribution/migrate.js +27 -4
- package/dist/core/distribution/migrate.js.map +1 -1
- package/dist/core/distribution/profiles.d.ts.map +1 -1
- package/dist/core/distribution/profiles.js +1 -1
- package/dist/core/distribution/profiles.js.map +1 -1
- package/dist/core/distribution/update.d.ts +2 -0
- package/dist/core/distribution/update.d.ts.map +1 -1
- package/dist/core/distribution/update.js +14 -2
- package/dist/core/distribution/update.js.map +1 -1
- package/package.json +4 -3
- package/.claude/skills/webapp-mockup/SKILL.md +0 -76
- package/.claude/skills/webapp-mockup/scripts/scaffold-mockup.sh +0 -469
- package/.github/skills/webapp-mockup/SKILL.md +0 -71
- package/.github/skills/webapp-mockup/scripts/scaffold-mockup.sh +0 -469
- package/.kiro/skills/webapp-mockup/SKILL.md +0 -76
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Webapp Mockup Skill
|
|
2
|
-
|
|
3
|
-
Purpose
|
|
4
|
-
|
|
5
|
-
- Generate consistent, runnable React mockups for feature discovery and UI/functionality gap analysis.
|
|
6
|
-
- Produce partial, high-signal mockups with realistic UI artifacts: components, texts, transitions, popups, warnings, inputs, and validations.
|
|
7
|
-
|
|
8
|
-
When to use
|
|
9
|
-
|
|
10
|
-
- User asks to visualize a potential UI before full implementation.
|
|
11
|
-
- Team needs a browsable prototype to identify missing requirements.
|
|
12
|
-
- A feature section is still exploratory and should not include full backend flow.
|
|
13
|
-
|
|
14
|
-
Required behavior
|
|
15
|
-
|
|
16
|
-
1. Folder layout
|
|
17
|
-
|
|
18
|
-
- Create mockups only under:
|
|
19
|
-
- /mockups/mockup-<feature>-<num>
|
|
20
|
-
- Keep each mockup self-contained and runnable with npm scripts.
|
|
21
|
-
|
|
22
|
-
2. Color palette rule
|
|
23
|
-
|
|
24
|
-
- If the project or user has not defined a palette, ask for one.
|
|
25
|
-
- Default fallback palette source:
|
|
26
|
-
- https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd
|
|
27
|
-
|
|
28
|
-
3. UI coverage requirements
|
|
29
|
-
|
|
30
|
-
- Include:
|
|
31
|
-
- Core components (cards, buttons, inputs, labels)
|
|
32
|
-
- Meaningful UI text and microcopy
|
|
33
|
-
- Transition behavior (section reveal, popup open/close)
|
|
34
|
-
- Popup/dialog examples
|
|
35
|
-
- Warning and error states
|
|
36
|
-
- Input validation states and messages
|
|
37
|
-
- No need to complete entire flow.
|
|
38
|
-
- If only a section is implemented, add a visible banner with instructions indicating this is a partial mockup and where to continue.
|
|
39
|
-
|
|
40
|
-
4. CSS references
|
|
41
|
-
|
|
42
|
-
- Ensure CSS files are referenced correctly from app entry/components.
|
|
43
|
-
- Keep any additional stylesheet imports explicit.
|
|
44
|
-
|
|
45
|
-
5. Consistency via scaffold script
|
|
46
|
-
|
|
47
|
-
- Use:
|
|
48
|
-
- ./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh <feature> <num> [palette_url]
|
|
49
|
-
- This script must be the default path for creating new mockups to keep structure and baseline behavior consistent.
|
|
50
|
-
- The scaffold path must remain non-interactive so agents can run it without manual terminal confirmation.
|
|
51
|
-
|
|
52
|
-
Operational workflow
|
|
53
|
-
|
|
54
|
-
1. Confirm feature slug and mockup number.
|
|
55
|
-
2. Confirm palette or apply fallback URL.
|
|
56
|
-
3. Run scaffold script.
|
|
57
|
-
|
|
58
|
-
- The script is designed to run non-interactively in agent terminal sessions.
|
|
59
|
-
|
|
60
|
-
4. Implement or adjust the specific mockup section requested.
|
|
61
|
-
5. Verify app runs with npm run dev.
|
|
62
|
-
6. Summarize what is mocked vs intentionally not implemented.
|
|
63
|
-
|
|
64
|
-
Acceptance checklist
|
|
65
|
-
|
|
66
|
-
- Mockup path follows /mockups/mockup-<feature>-<num>
|
|
67
|
-
- App is runnable locally
|
|
68
|
-
- Palette is user-defined or fallback applied
|
|
69
|
-
- Banner exists for partial implementation
|
|
70
|
-
- Includes inputs + validations + warnings + popup + transitions
|
|
71
|
-
- CSS references are present and valid
|
|
@@ -1,469 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# Scaffolds a consistent React + shadcn-style mockup app at:
|
|
5
|
-
# /mockups/mockup-<feature>-<num>
|
|
6
|
-
|
|
7
|
-
usage() {
|
|
8
|
-
cat <<'USAGE'
|
|
9
|
-
Usage:
|
|
10
|
-
./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh <feature> <num> [palette_url]
|
|
11
|
-
|
|
12
|
-
Examples:
|
|
13
|
-
./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh onboarding 1
|
|
14
|
-
./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh billing 2 https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd
|
|
15
|
-
USAGE
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if [[ $# -lt 2 || $# -gt 3 ]]; then
|
|
19
|
-
usage
|
|
20
|
-
exit 1
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
FEATURE_RAW="$1"
|
|
24
|
-
NUM_RAW="$2"
|
|
25
|
-
PALETTE_URL="${3:-https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd}"
|
|
26
|
-
|
|
27
|
-
if ! [[ "$NUM_RAW" =~ ^[0-9]+$ ]]; then
|
|
28
|
-
echo "Error: <num> must be an integer."
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
FEATURE="$(echo "$FEATURE_RAW" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-')"
|
|
33
|
-
if [[ -z "$FEATURE" ]]; then
|
|
34
|
-
echo "Error: <feature> produced an empty slug."
|
|
35
|
-
exit 1
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
39
|
-
REPO_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
|
|
40
|
-
MOCKUPS_ROOT="$REPO_ROOT/mockups"
|
|
41
|
-
APP_DIR="$MOCKUPS_ROOT/mockup-${FEATURE}-${NUM_RAW}"
|
|
42
|
-
|
|
43
|
-
if [[ -d "$APP_DIR" ]]; then
|
|
44
|
-
echo "Error: target already exists: $APP_DIR"
|
|
45
|
-
exit 1
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
mkdir -p "$MOCKUPS_ROOT"
|
|
49
|
-
|
|
50
|
-
echo "Creating app at: $APP_DIR"
|
|
51
|
-
CI=1 npm_config_yes=true npm create vite@latest "$APP_DIR" -- --template react-ts
|
|
52
|
-
|
|
53
|
-
pushd "$APP_DIR" >/dev/null
|
|
54
|
-
|
|
55
|
-
npm install
|
|
56
|
-
npm install class-variance-authority clsx tailwind-merge lucide-react @radix-ui/react-dialog
|
|
57
|
-
npm install -D tailwindcss postcss autoprefixer tailwindcss-animate
|
|
58
|
-
npx --yes tailwindcss init -p
|
|
59
|
-
|
|
60
|
-
cat > tailwind.config.js <<'EOF'
|
|
61
|
-
/** @type {import('tailwindcss').Config} */
|
|
62
|
-
module.exports = {
|
|
63
|
-
darkMode: ["class"],
|
|
64
|
-
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
65
|
-
theme: {
|
|
66
|
-
extend: {
|
|
67
|
-
borderRadius: {
|
|
68
|
-
lg: "var(--radius)",
|
|
69
|
-
md: "calc(var(--radius) - 2px)",
|
|
70
|
-
sm: "calc(var(--radius) - 4px)",
|
|
71
|
-
},
|
|
72
|
-
colors: {
|
|
73
|
-
background: "hsl(var(--background))",
|
|
74
|
-
foreground: "hsl(var(--foreground))",
|
|
75
|
-
card: "hsl(var(--card))",
|
|
76
|
-
cardForeground: "hsl(var(--card-foreground))",
|
|
77
|
-
primary: "hsl(var(--primary))",
|
|
78
|
-
primaryForeground: "hsl(var(--primary-foreground))",
|
|
79
|
-
secondary: "hsl(var(--secondary))",
|
|
80
|
-
secondaryForeground: "hsl(var(--secondary-foreground))",
|
|
81
|
-
accent: "hsl(var(--accent))",
|
|
82
|
-
accentForeground: "hsl(var(--accent-foreground))",
|
|
83
|
-
warning: "hsl(var(--warning))",
|
|
84
|
-
warningForeground: "hsl(var(--warning-foreground))",
|
|
85
|
-
border: "hsl(var(--border))",
|
|
86
|
-
input: "hsl(var(--input))",
|
|
87
|
-
ring: "hsl(var(--ring))",
|
|
88
|
-
},
|
|
89
|
-
keyframes: {
|
|
90
|
-
fadeIn: {
|
|
91
|
-
from: { opacity: "0", transform: "translateY(8px)" },
|
|
92
|
-
to: { opacity: "1", transform: "translateY(0)" },
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
animation: {
|
|
96
|
-
fadeIn: "fadeIn 220ms ease-out",
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
plugins: [require("tailwindcss-animate")],
|
|
101
|
-
}
|
|
102
|
-
EOF
|
|
103
|
-
|
|
104
|
-
mkdir -p src/components/ui src/lib
|
|
105
|
-
|
|
106
|
-
cat > src/lib/utils.ts <<'EOF'
|
|
107
|
-
import { type ClassValue, clsx } from "clsx"
|
|
108
|
-
import { twMerge } from "tailwind-merge"
|
|
109
|
-
|
|
110
|
-
export function cn(...inputs: ClassValue[]) {
|
|
111
|
-
return twMerge(clsx(inputs))
|
|
112
|
-
}
|
|
113
|
-
EOF
|
|
114
|
-
|
|
115
|
-
cat > src/components/ui/button.tsx <<'EOF'
|
|
116
|
-
import * as React from "react"
|
|
117
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
118
|
-
import { cn } from "../../lib/utils"
|
|
119
|
-
|
|
120
|
-
const buttonVariants = cva(
|
|
121
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
122
|
-
{
|
|
123
|
-
variants: {
|
|
124
|
-
variant: {
|
|
125
|
-
default: "bg-primary text-primaryForeground hover:opacity-90",
|
|
126
|
-
outline: "border border-border bg-background hover:bg-secondary hover:text-secondaryForeground",
|
|
127
|
-
ghost: "hover:bg-secondary hover:text-secondaryForeground",
|
|
128
|
-
warning: "bg-warning text-warningForeground hover:opacity-90",
|
|
129
|
-
},
|
|
130
|
-
size: {
|
|
131
|
-
default: "h-10 px-4 py-2",
|
|
132
|
-
sm: "h-9 rounded-md px-3",
|
|
133
|
-
lg: "h-11 rounded-md px-8",
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
defaultVariants: {
|
|
137
|
-
variant: "default",
|
|
138
|
-
size: "default",
|
|
139
|
-
},
|
|
140
|
-
}
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
export interface ButtonProps
|
|
144
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
145
|
-
VariantProps<typeof buttonVariants> {}
|
|
146
|
-
|
|
147
|
-
export function Button({ className, variant, size, ...props }: ButtonProps) {
|
|
148
|
-
return <button className={cn(buttonVariants({ variant, size, className }))} {...props} />
|
|
149
|
-
}
|
|
150
|
-
EOF
|
|
151
|
-
|
|
152
|
-
cat > src/components/ui/input.tsx <<'EOF'
|
|
153
|
-
import * as React from "react"
|
|
154
|
-
import { cn } from "../../lib/utils"
|
|
155
|
-
|
|
156
|
-
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
157
|
-
|
|
158
|
-
export const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => {
|
|
159
|
-
return (
|
|
160
|
-
<input
|
|
161
|
-
ref={ref}
|
|
162
|
-
className={cn(
|
|
163
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
164
|
-
className
|
|
165
|
-
)}
|
|
166
|
-
{...props}
|
|
167
|
-
/>
|
|
168
|
-
)
|
|
169
|
-
})
|
|
170
|
-
Input.displayName = "Input"
|
|
171
|
-
EOF
|
|
172
|
-
|
|
173
|
-
cat > src/components/ui/dialog.tsx <<'EOF'
|
|
174
|
-
import * as React from "react"
|
|
175
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog"
|
|
176
|
-
import { X } from "lucide-react"
|
|
177
|
-
import { cn } from "../../lib/utils"
|
|
178
|
-
|
|
179
|
-
export const Dialog = DialogPrimitive.Root
|
|
180
|
-
export const DialogTrigger = DialogPrimitive.Trigger
|
|
181
|
-
export const DialogClose = DialogPrimitive.Close
|
|
182
|
-
|
|
183
|
-
export function DialogContent({ className, ...props }: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>) {
|
|
184
|
-
return (
|
|
185
|
-
<DialogPrimitive.Portal>
|
|
186
|
-
<DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out" />
|
|
187
|
-
<DialogPrimitive.Content
|
|
188
|
-
className={cn(
|
|
189
|
-
"fixed left-1/2 top-1/2 z-50 w-[92vw] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-border bg-card p-6 shadow-lg",
|
|
190
|
-
className
|
|
191
|
-
)}
|
|
192
|
-
{...props}
|
|
193
|
-
>
|
|
194
|
-
{props.children}
|
|
195
|
-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-80 transition-opacity hover:opacity-100">
|
|
196
|
-
<X className="h-4 w-4" />
|
|
197
|
-
<span className="sr-only">Close</span>
|
|
198
|
-
</DialogPrimitive.Close>
|
|
199
|
-
</DialogPrimitive.Content>
|
|
200
|
-
</DialogPrimitive.Portal>
|
|
201
|
-
)
|
|
202
|
-
}
|
|
203
|
-
EOF
|
|
204
|
-
|
|
205
|
-
cat > src/components/ui/alert.tsx <<'EOF'
|
|
206
|
-
import * as React from "react"
|
|
207
|
-
import { cn } from "../../lib/utils"
|
|
208
|
-
|
|
209
|
-
export function Alert({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
|
|
210
|
-
return <div className={cn("rounded-md border border-warning bg-warning/15 p-3 text-sm", className)} {...props} />
|
|
211
|
-
}
|
|
212
|
-
EOF
|
|
213
|
-
|
|
214
|
-
cat > src/index.css <<'EOF'
|
|
215
|
-
@tailwind base;
|
|
216
|
-
@tailwind components;
|
|
217
|
-
@tailwind utilities;
|
|
218
|
-
|
|
219
|
-
/* Default palette source:
|
|
220
|
-
https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd
|
|
221
|
-
*/
|
|
222
|
-
:root {
|
|
223
|
-
--radius: 0.6rem;
|
|
224
|
-
|
|
225
|
-
--background: 46 73% 95%; /* #EDF7BD */
|
|
226
|
-
--foreground: 258 53% 23%; /* #281C59 */
|
|
227
|
-
|
|
228
|
-
--card: 0 0% 100%;
|
|
229
|
-
--card-foreground: 258 53% 23%;
|
|
230
|
-
|
|
231
|
-
--primary: 258 53% 23%; /* #281C59 */
|
|
232
|
-
--primary-foreground: 0 0% 100%;
|
|
233
|
-
|
|
234
|
-
--secondary: 191 34% 46%; /* #4E8D9C */
|
|
235
|
-
--secondary-foreground: 0 0% 100%;
|
|
236
|
-
|
|
237
|
-
--accent: 96 40% 64%; /* #85C79A */
|
|
238
|
-
--accent-foreground: 258 53% 20%;
|
|
239
|
-
|
|
240
|
-
--warning: 12 88% 59%;
|
|
241
|
-
--warning-foreground: 0 0% 100%;
|
|
242
|
-
|
|
243
|
-
--border: 191 20% 78%;
|
|
244
|
-
--input: 191 20% 78%;
|
|
245
|
-
--ring: 191 34% 46%;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
* {
|
|
249
|
-
@apply border-border;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
body {
|
|
253
|
-
@apply min-h-screen bg-background text-foreground antialiased;
|
|
254
|
-
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
|
|
255
|
-
}
|
|
256
|
-
EOF
|
|
257
|
-
|
|
258
|
-
cat > src/mockup.css <<'EOF'
|
|
259
|
-
.mockup-enter {
|
|
260
|
-
animation: fadeUp 220ms ease-out;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
@keyframes fadeUp {
|
|
264
|
-
from {
|
|
265
|
-
opacity: 0;
|
|
266
|
-
transform: translateY(8px);
|
|
267
|
-
}
|
|
268
|
-
to {
|
|
269
|
-
opacity: 1;
|
|
270
|
-
transform: translateY(0);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
EOF
|
|
274
|
-
|
|
275
|
-
cat > src/App.tsx <<'EOF'
|
|
276
|
-
import { useMemo, useState } from "react"
|
|
277
|
-
import "./mockup.css"
|
|
278
|
-
import { Alert } from "./components/ui/alert"
|
|
279
|
-
import { Button } from "./components/ui/button"
|
|
280
|
-
import { Dialog, DialogContent, DialogTrigger } from "./components/ui/dialog"
|
|
281
|
-
import { Input } from "./components/ui/input"
|
|
282
|
-
|
|
283
|
-
type FormState = {
|
|
284
|
-
fullName: string
|
|
285
|
-
email: string
|
|
286
|
-
company: string
|
|
287
|
-
accepted: boolean
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
type FormErrors = Partial<Record<keyof FormState, string>>
|
|
291
|
-
|
|
292
|
-
function validateForm(values: FormState): FormErrors {
|
|
293
|
-
const errors: FormErrors = {}
|
|
294
|
-
|
|
295
|
-
if (!values.fullName.trim()) {
|
|
296
|
-
errors.fullName = "Full name is required."
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
if (!values.email.trim()) {
|
|
300
|
-
errors.email = "Email is required."
|
|
301
|
-
} else if (!/^\S+@\S+\.\S+$/.test(values.email)) {
|
|
302
|
-
errors.email = "Use a valid email format."
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
if (!values.company.trim()) {
|
|
306
|
-
errors.company = "Company is required."
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
if (!values.accepted) {
|
|
310
|
-
errors.accepted = "You must accept terms to continue."
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
return errors
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export default function App() {
|
|
317
|
-
const [form, setForm] = useState<FormState>({
|
|
318
|
-
fullName: "",
|
|
319
|
-
email: "",
|
|
320
|
-
company: "",
|
|
321
|
-
accepted: false,
|
|
322
|
-
})
|
|
323
|
-
const [errors, setErrors] = useState<FormErrors>({})
|
|
324
|
-
const [submitted, setSubmitted] = useState(false)
|
|
325
|
-
|
|
326
|
-
const hasErrors = useMemo(() => Object.keys(errors).length > 0, [errors])
|
|
327
|
-
|
|
328
|
-
const onSubmit = (event: React.FormEvent) => {
|
|
329
|
-
event.preventDefault()
|
|
330
|
-
const nextErrors = validateForm(form)
|
|
331
|
-
setErrors(nextErrors)
|
|
332
|
-
setSubmitted(Object.keys(nextErrors).length === 0)
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return (
|
|
336
|
-
<main className="mx-auto max-w-4xl px-4 py-10 md:px-6">
|
|
337
|
-
<header className="mockup-enter mb-8 rounded-xl border bg-card p-5 shadow-sm">
|
|
338
|
-
<p className="mb-2 text-xs font-semibold uppercase tracking-wide text-secondary">Mockup Banner</p>
|
|
339
|
-
<h1 className="text-2xl font-semibold">Mockup Workspace</h1>
|
|
340
|
-
<p className="mt-2 text-sm text-foreground/80">
|
|
341
|
-
This is a partial mockup section. Extend this area with additional flows and link each new section from here.
|
|
342
|
-
</p>
|
|
343
|
-
<p className="mt-1 text-xs text-foreground/70">
|
|
344
|
-
Palette source: PLACEHOLDER_PALETTE_URL
|
|
345
|
-
</p>
|
|
346
|
-
</header>
|
|
347
|
-
|
|
348
|
-
<section className="mockup-enter grid gap-6 md:grid-cols-[1.1fr_0.9fr]">
|
|
349
|
-
<form onSubmit={onSubmit} className="rounded-xl border bg-card p-5 shadow-sm">
|
|
350
|
-
<h2 className="text-lg font-semibold">Lead Capture Section</h2>
|
|
351
|
-
<p className="mt-1 text-sm text-foreground/80">
|
|
352
|
-
Includes inputs, validations, warning states, confirmation popup, and transition-ready UI blocks.
|
|
353
|
-
</p>
|
|
354
|
-
|
|
355
|
-
<div className="mt-5 space-y-4">
|
|
356
|
-
<div>
|
|
357
|
-
<label htmlFor="fullName" className="mb-1 block text-sm font-medium">Full name</label>
|
|
358
|
-
<Input
|
|
359
|
-
id="fullName"
|
|
360
|
-
value={form.fullName}
|
|
361
|
-
onChange={(event) => setForm((prev) => ({ ...prev, fullName: event.target.value }))}
|
|
362
|
-
aria-invalid={Boolean(errors.fullName)}
|
|
363
|
-
/>
|
|
364
|
-
{errors.fullName && <p className="mt-1 text-xs text-warning">{errors.fullName}</p>}
|
|
365
|
-
</div>
|
|
366
|
-
|
|
367
|
-
<div>
|
|
368
|
-
<label htmlFor="email" className="mb-1 block text-sm font-medium">Work email</label>
|
|
369
|
-
<Input
|
|
370
|
-
id="email"
|
|
371
|
-
type="email"
|
|
372
|
-
value={form.email}
|
|
373
|
-
onChange={(event) => setForm((prev) => ({ ...prev, email: event.target.value }))}
|
|
374
|
-
aria-invalid={Boolean(errors.email)}
|
|
375
|
-
/>
|
|
376
|
-
{errors.email && <p className="mt-1 text-xs text-warning">{errors.email}</p>}
|
|
377
|
-
</div>
|
|
378
|
-
|
|
379
|
-
<div>
|
|
380
|
-
<label htmlFor="company" className="mb-1 block text-sm font-medium">Company</label>
|
|
381
|
-
<Input
|
|
382
|
-
id="company"
|
|
383
|
-
value={form.company}
|
|
384
|
-
onChange={(event) => setForm((prev) => ({ ...prev, company: event.target.value }))}
|
|
385
|
-
aria-invalid={Boolean(errors.company)}
|
|
386
|
-
/>
|
|
387
|
-
{errors.company && <p className="mt-1 text-xs text-warning">{errors.company}</p>}
|
|
388
|
-
</div>
|
|
389
|
-
|
|
390
|
-
<label className="flex items-start gap-3 rounded-md border p-3">
|
|
391
|
-
<input
|
|
392
|
-
type="checkbox"
|
|
393
|
-
checked={form.accepted}
|
|
394
|
-
onChange={(event) => setForm((prev) => ({ ...prev, accepted: event.target.checked }))}
|
|
395
|
-
className="mt-1"
|
|
396
|
-
/>
|
|
397
|
-
<span className="text-sm">I accept terms and understand this is a mockup-only workflow.</span>
|
|
398
|
-
</label>
|
|
399
|
-
{errors.accepted && <p className="mt-1 text-xs text-warning">{errors.accepted}</p>}
|
|
400
|
-
|
|
401
|
-
<div className="flex flex-wrap gap-3">
|
|
402
|
-
<Button type="submit">Validate inputs</Button>
|
|
403
|
-
|
|
404
|
-
<Dialog>
|
|
405
|
-
<DialogTrigger asChild>
|
|
406
|
-
<Button type="button" variant="outline">Open confirmation popup</Button>
|
|
407
|
-
</DialogTrigger>
|
|
408
|
-
<DialogContent>
|
|
409
|
-
<h3 className="text-lg font-semibold">Mockup Confirmation</h3>
|
|
410
|
-
<p className="mt-2 text-sm text-foreground/80">
|
|
411
|
-
This popup demonstrates a future confirmation step. Connect this to a real action in implementation.
|
|
412
|
-
</p>
|
|
413
|
-
<div className="mt-4 flex gap-2">
|
|
414
|
-
<Button type="button">Confirm</Button>
|
|
415
|
-
<Button type="button" variant="outline">Cancel</Button>
|
|
416
|
-
</div>
|
|
417
|
-
</DialogContent>
|
|
418
|
-
</Dialog>
|
|
419
|
-
</div>
|
|
420
|
-
</div>
|
|
421
|
-
</form>
|
|
422
|
-
|
|
423
|
-
<aside className="rounded-xl border bg-card p-5 shadow-sm">
|
|
424
|
-
<h3 className="text-lg font-semibold">Status + Warnings</h3>
|
|
425
|
-
|
|
426
|
-
{hasErrors ? (
|
|
427
|
-
<Alert className="mt-4">
|
|
428
|
-
Some fields need attention before progressing. This warning block should remain visible on invalid submit.
|
|
429
|
-
</Alert>
|
|
430
|
-
) : (
|
|
431
|
-
<div className="mt-4 rounded-md border border-accent bg-accent/20 p-3 text-sm">
|
|
432
|
-
No current validation warnings.
|
|
433
|
-
</div>
|
|
434
|
-
)}
|
|
435
|
-
|
|
436
|
-
{submitted && (
|
|
437
|
-
<div className="mockup-enter mt-4 rounded-md border border-secondary bg-secondary/15 p-3 text-sm">
|
|
438
|
-
Validation passed. Next flow step intentionally not implemented in this partial mockup.
|
|
439
|
-
</div>
|
|
440
|
-
)}
|
|
441
|
-
|
|
442
|
-
<div className="mt-4 rounded-md border p-3 text-sm">
|
|
443
|
-
<p className="font-medium">Transition Notes</p>
|
|
444
|
-
<ul className="mt-2 list-disc space-y-1 pl-5 text-foreground/80">
|
|
445
|
-
<li>Use entrance animations for newly revealed sections.</li>
|
|
446
|
-
<li>Animate warning visibility when validation state changes.</li>
|
|
447
|
-
<li>Use popup transitions for confirmations and destructive actions.</li>
|
|
448
|
-
</ul>
|
|
449
|
-
</div>
|
|
450
|
-
</aside>
|
|
451
|
-
</section>
|
|
452
|
-
</main>
|
|
453
|
-
)
|
|
454
|
-
}
|
|
455
|
-
EOF
|
|
456
|
-
|
|
457
|
-
# Set palette reference in App banner line.
|
|
458
|
-
sed -i '' "s|PLACEHOLDER_PALETTE_URL|$PALETTE_URL|g" src/App.tsx
|
|
459
|
-
|
|
460
|
-
# Remove default starter styles if present.
|
|
461
|
-
rm -f src/App.css
|
|
462
|
-
|
|
463
|
-
echo
|
|
464
|
-
echo "Done. Mockup app created at: $APP_DIR"
|
|
465
|
-
echo "Run it with:"
|
|
466
|
-
echo " cd $APP_DIR"
|
|
467
|
-
echo " npm run dev"
|
|
468
|
-
|
|
469
|
-
popd >/dev/null
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: webapp-mockup
|
|
3
|
-
description: "Scaffold and generate runnable React mockups for UX testing. Use when prototyping UI before full implementation."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Webapp Mockup Skill
|
|
7
|
-
|
|
8
|
-
Purpose
|
|
9
|
-
|
|
10
|
-
- Generate consistent, runnable React mockups for feature discovery and UI/functionality gap analysis.
|
|
11
|
-
- Produce partial, high-signal mockups with realistic UI artifacts: components, texts, transitions, popups, warnings, inputs, and validations.
|
|
12
|
-
|
|
13
|
-
When to use
|
|
14
|
-
|
|
15
|
-
- User asks to visualize a potential UI before full implementation.
|
|
16
|
-
- Team needs a browsable prototype to identify missing requirements.
|
|
17
|
-
- A feature section is still exploratory and should not include full backend flow.
|
|
18
|
-
|
|
19
|
-
Required behavior
|
|
20
|
-
|
|
21
|
-
1. Folder layout
|
|
22
|
-
|
|
23
|
-
- Create mockups only under:
|
|
24
|
-
- /mockups/mockup-<feature>-<num>
|
|
25
|
-
- Keep each mockup self-contained and runnable with npm scripts.
|
|
26
|
-
|
|
27
|
-
2. Color palette rule
|
|
28
|
-
|
|
29
|
-
- If the project or user has not defined a palette, ask for one.
|
|
30
|
-
- Default fallback palette source:
|
|
31
|
-
- https://colorhunt.co/palette/281c594e8d9c85c79aedf7bd
|
|
32
|
-
|
|
33
|
-
3. UI coverage requirements
|
|
34
|
-
|
|
35
|
-
- Include:
|
|
36
|
-
- Core components (cards, buttons, inputs, labels)
|
|
37
|
-
- Meaningful UI text and microcopy
|
|
38
|
-
- Transition behavior (section reveal, popup open/close)
|
|
39
|
-
- Popup/dialog examples
|
|
40
|
-
- Warning and error states
|
|
41
|
-
- Input validation states and messages
|
|
42
|
-
- No need to complete entire flow.
|
|
43
|
-
- If only a section is implemented, add a visible banner with instructions indicating this is a partial mockup and where to continue.
|
|
44
|
-
|
|
45
|
-
4. CSS references
|
|
46
|
-
|
|
47
|
-
- Ensure CSS files are referenced correctly from app entry/components.
|
|
48
|
-
- Keep any additional stylesheet imports explicit.
|
|
49
|
-
|
|
50
|
-
5. Consistency via scaffold script
|
|
51
|
-
|
|
52
|
-
- Use:
|
|
53
|
-
- ./.github/skills/webapp-mockup/scripts/scaffold-mockup.sh <feature> <num> [palette_url]
|
|
54
|
-
- This script must be the default path for creating new mockups to keep structure and baseline behavior consistent.
|
|
55
|
-
- The scaffold path must remain non-interactive so agents can run it without manual terminal confirmation.
|
|
56
|
-
|
|
57
|
-
Operational workflow
|
|
58
|
-
|
|
59
|
-
1. Confirm feature slug and mockup number.
|
|
60
|
-
2. Confirm palette or apply fallback URL.
|
|
61
|
-
3. Run scaffold script.
|
|
62
|
-
|
|
63
|
-
- The script is designed to run non-interactively in agent terminal sessions.
|
|
64
|
-
|
|
65
|
-
4. Implement or adjust the specific mockup section requested.
|
|
66
|
-
5. Verify app runs with npm run dev.
|
|
67
|
-
6. Summarize what is mocked vs intentionally not implemented.
|
|
68
|
-
|
|
69
|
-
Acceptance checklist
|
|
70
|
-
|
|
71
|
-
- Mockup path follows /mockups/mockup-<feature>-<num>
|
|
72
|
-
- App is runnable locally
|
|
73
|
-
- Palette is user-defined or fallback applied
|
|
74
|
-
- Banner exists for partial implementation
|
|
75
|
-
- Includes inputs + validations + warnings + popup + transitions
|
|
76
|
-
- CSS references are present and valid
|