real-prototypes-skill 0.1.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.
Files changed (60) hide show
  1. package/.claude/skills/agent-browser-skill/SKILL.md +252 -0
  2. package/.claude/skills/real-prototypes-skill/.gitignore +188 -0
  3. package/.claude/skills/real-prototypes-skill/ACCESSIBILITY.md +668 -0
  4. package/.claude/skills/real-prototypes-skill/INSTALL.md +259 -0
  5. package/.claude/skills/real-prototypes-skill/LICENSE +21 -0
  6. package/.claude/skills/real-prototypes-skill/PUBLISH.md +310 -0
  7. package/.claude/skills/real-prototypes-skill/QUICKSTART.md +240 -0
  8. package/.claude/skills/real-prototypes-skill/README.md +442 -0
  9. package/.claude/skills/real-prototypes-skill/SKILL.md +375 -0
  10. package/.claude/skills/real-prototypes-skill/capture/capture-engine.js +1153 -0
  11. package/.claude/skills/real-prototypes-skill/capture/config.schema.json +170 -0
  12. package/.claude/skills/real-prototypes-skill/cli.js +596 -0
  13. package/.claude/skills/real-prototypes-skill/docs/TROUBLESHOOTING.md +278 -0
  14. package/.claude/skills/real-prototypes-skill/docs/schemas/capture-config.md +167 -0
  15. package/.claude/skills/real-prototypes-skill/docs/schemas/design-tokens.md +183 -0
  16. package/.claude/skills/real-prototypes-skill/docs/schemas/manifest.md +169 -0
  17. package/.claude/skills/real-prototypes-skill/examples/CLAUDE.md.example +73 -0
  18. package/.claude/skills/real-prototypes-skill/examples/amazon-chatbot/CLAUDE.md +136 -0
  19. package/.claude/skills/real-prototypes-skill/examples/amazon-chatbot/FEATURES.md +222 -0
  20. package/.claude/skills/real-prototypes-skill/examples/amazon-chatbot/README.md +82 -0
  21. package/.claude/skills/real-prototypes-skill/examples/amazon-chatbot/references/design-tokens.json +87 -0
  22. package/.claude/skills/real-prototypes-skill/examples/amazon-chatbot/references/screenshots/homepage-viewport.png +0 -0
  23. package/.claude/skills/real-prototypes-skill/examples/amazon-chatbot/references/screenshots/prototype-chatbot-final.png +0 -0
  24. package/.claude/skills/real-prototypes-skill/examples/amazon-chatbot/references/screenshots/prototype-fullpage-v2.png +0 -0
  25. package/.claude/skills/real-prototypes-skill/references/accessibility-fixes.md +298 -0
  26. package/.claude/skills/real-prototypes-skill/references/accessibility-report.json +253 -0
  27. package/.claude/skills/real-prototypes-skill/scripts/CAPTURE-ENHANCEMENTS.md +344 -0
  28. package/.claude/skills/real-prototypes-skill/scripts/IMPLEMENTATION-SUMMARY.md +517 -0
  29. package/.claude/skills/real-prototypes-skill/scripts/QUICK-START.md +229 -0
  30. package/.claude/skills/real-prototypes-skill/scripts/QUICKSTART-layout-analysis.md +148 -0
  31. package/.claude/skills/real-prototypes-skill/scripts/README-analyze-layout.md +407 -0
  32. package/.claude/skills/real-prototypes-skill/scripts/analyze-layout.js +880 -0
  33. package/.claude/skills/real-prototypes-skill/scripts/capture-platform.js +203 -0
  34. package/.claude/skills/real-prototypes-skill/scripts/comprehensive-capture.js +597 -0
  35. package/.claude/skills/real-prototypes-skill/scripts/create-manifest.js +338 -0
  36. package/.claude/skills/real-prototypes-skill/scripts/enterprise-pipeline.js +428 -0
  37. package/.claude/skills/real-prototypes-skill/scripts/extract-tokens.js +468 -0
  38. package/.claude/skills/real-prototypes-skill/scripts/full-site-capture.js +738 -0
  39. package/.claude/skills/real-prototypes-skill/scripts/generate-tailwind-config.js +296 -0
  40. package/.claude/skills/real-prototypes-skill/scripts/integrate-accessibility.sh +161 -0
  41. package/.claude/skills/real-prototypes-skill/scripts/manifest-schema.json +302 -0
  42. package/.claude/skills/real-prototypes-skill/scripts/setup-prototype.sh +167 -0
  43. package/.claude/skills/real-prototypes-skill/scripts/test-analyze-layout.js +338 -0
  44. package/.claude/skills/real-prototypes-skill/scripts/test-validation.js +307 -0
  45. package/.claude/skills/real-prototypes-skill/scripts/validate-accessibility.js +598 -0
  46. package/.claude/skills/real-prototypes-skill/scripts/validate-manifest.js +499 -0
  47. package/.claude/skills/real-prototypes-skill/scripts/validate-output.js +361 -0
  48. package/.claude/skills/real-prototypes-skill/scripts/validate-prerequisites.js +319 -0
  49. package/.claude/skills/real-prototypes-skill/scripts/verify-layout-analysis.sh +77 -0
  50. package/.claude/skills/real-prototypes-skill/templates/dashboard-widget.tsx.template +91 -0
  51. package/.claude/skills/real-prototypes-skill/templates/data-table.tsx.template +193 -0
  52. package/.claude/skills/real-prototypes-skill/templates/form-section.tsx.template +250 -0
  53. package/.claude/skills/real-prototypes-skill/templates/modal-dialog.tsx.template +239 -0
  54. package/.claude/skills/real-prototypes-skill/templates/nav-item.tsx.template +265 -0
  55. package/.claude/skills/real-prototypes-skill/validation/validation-engine.js +559 -0
  56. package/.env.example +74 -0
  57. package/LICENSE +21 -0
  58. package/README.md +444 -0
  59. package/bin/cli.js +319 -0
  60. package/package.json +59 -0
@@ -0,0 +1,302 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://real-prototypes-skill/manifest-schema.json",
4
+ "title": "Platform Prototype Manifest",
5
+ "description": "Schema for validating platform prototype reference manifest files",
6
+ "type": "object",
7
+ "required": ["platform", "pages"],
8
+ "properties": {
9
+ "platform": {
10
+ "type": "object",
11
+ "description": "Platform identification and metadata",
12
+ "required": ["name"],
13
+ "properties": {
14
+ "name": {
15
+ "type": "string",
16
+ "description": "Name of the platform being prototyped",
17
+ "minLength": 1
18
+ },
19
+ "url": {
20
+ "type": "string",
21
+ "description": "Base URL of the platform",
22
+ "format": "uri"
23
+ },
24
+ "version": {
25
+ "type": "string",
26
+ "description": "Version identifier for the reference capture"
27
+ },
28
+ "capturedAt": {
29
+ "type": "string",
30
+ "description": "ISO 8601 timestamp when references were captured",
31
+ "format": "date-time"
32
+ }
33
+ },
34
+ "additionalProperties": true
35
+ },
36
+ "pages": {
37
+ "type": "array",
38
+ "description": "List of captured pages/views",
39
+ "items": {
40
+ "type": "object",
41
+ "required": ["id", "name"],
42
+ "properties": {
43
+ "id": {
44
+ "type": "string",
45
+ "description": "Unique identifier for the page",
46
+ "pattern": "^[a-z0-9-]+$"
47
+ },
48
+ "name": {
49
+ "type": "string",
50
+ "description": "Human-readable name of the page"
51
+ },
52
+ "path": {
53
+ "type": "string",
54
+ "description": "URL path or route for the page"
55
+ },
56
+ "description": {
57
+ "type": "string",
58
+ "description": "Brief description of the page purpose"
59
+ },
60
+ "screenshots": {
61
+ "type": "array",
62
+ "description": "Screenshot files for this page",
63
+ "items": {
64
+ "type": "object",
65
+ "required": ["file"],
66
+ "properties": {
67
+ "file": {
68
+ "type": "string",
69
+ "description": "Filename of the screenshot"
70
+ },
71
+ "viewport": {
72
+ "type": "string",
73
+ "description": "Viewport size (e.g., 'desktop', 'mobile', '1920x1080')"
74
+ },
75
+ "state": {
76
+ "type": "string",
77
+ "description": "UI state captured (e.g., 'default', 'hover', 'expanded')"
78
+ },
79
+ "description": {
80
+ "type": "string",
81
+ "description": "Description of what the screenshot shows"
82
+ }
83
+ },
84
+ "additionalProperties": true
85
+ }
86
+ },
87
+ "html": {
88
+ "type": "object",
89
+ "description": "HTML capture for this page",
90
+ "properties": {
91
+ "file": {
92
+ "type": "string",
93
+ "description": "Filename of the HTML file"
94
+ },
95
+ "capturedAt": {
96
+ "type": "string",
97
+ "description": "ISO 8601 timestamp when HTML was captured",
98
+ "format": "date-time"
99
+ }
100
+ },
101
+ "additionalProperties": true
102
+ },
103
+ "components": {
104
+ "type": "array",
105
+ "description": "Key components identified on this page",
106
+ "items": {
107
+ "type": "string"
108
+ }
109
+ },
110
+ "priority": {
111
+ "type": "string",
112
+ "description": "Implementation priority",
113
+ "enum": ["high", "medium", "low"]
114
+ }
115
+ },
116
+ "additionalProperties": true
117
+ }
118
+ },
119
+ "designTokens": {
120
+ "type": "object",
121
+ "description": "Design tokens extracted from the platform",
122
+ "properties": {
123
+ "colors": {
124
+ "type": "object",
125
+ "description": "Color palette",
126
+ "properties": {
127
+ "primary": {
128
+ "type": "string",
129
+ "description": "Primary brand color"
130
+ },
131
+ "secondary": {
132
+ "type": "string",
133
+ "description": "Secondary brand color"
134
+ },
135
+ "background": {
136
+ "type": "string",
137
+ "description": "Main background color"
138
+ },
139
+ "surface": {
140
+ "type": "string",
141
+ "description": "Surface/card background color"
142
+ },
143
+ "text": {
144
+ "type": "string",
145
+ "description": "Primary text color"
146
+ },
147
+ "textSecondary": {
148
+ "type": "string",
149
+ "description": "Secondary text color"
150
+ },
151
+ "border": {
152
+ "type": "string",
153
+ "description": "Default border color"
154
+ },
155
+ "accent": {
156
+ "type": "string",
157
+ "description": "Accent/highlight color"
158
+ },
159
+ "error": {
160
+ "type": "string",
161
+ "description": "Error state color"
162
+ },
163
+ "success": {
164
+ "type": "string",
165
+ "description": "Success state color"
166
+ },
167
+ "warning": {
168
+ "type": "string",
169
+ "description": "Warning state color"
170
+ }
171
+ },
172
+ "additionalProperties": true
173
+ },
174
+ "typography": {
175
+ "type": "object",
176
+ "description": "Typography settings",
177
+ "properties": {
178
+ "fontFamily": {
179
+ "type": "string",
180
+ "description": "Primary font family stack"
181
+ },
182
+ "fontFamilyMono": {
183
+ "type": "string",
184
+ "description": "Monospace font family stack"
185
+ },
186
+ "baseFontSize": {
187
+ "type": "string",
188
+ "description": "Base font size (e.g., '16px')"
189
+ },
190
+ "lineHeight": {
191
+ "type": "string",
192
+ "description": "Default line height"
193
+ },
194
+ "headings": {
195
+ "type": "object",
196
+ "description": "Heading styles",
197
+ "additionalProperties": {
198
+ "type": "object",
199
+ "properties": {
200
+ "fontSize": { "type": "string" },
201
+ "fontWeight": { "type": "string" },
202
+ "lineHeight": { "type": "string" }
203
+ }
204
+ }
205
+ }
206
+ },
207
+ "additionalProperties": true
208
+ },
209
+ "spacing": {
210
+ "type": "object",
211
+ "description": "Spacing scale",
212
+ "additionalProperties": {
213
+ "type": "string"
214
+ }
215
+ },
216
+ "borderRadius": {
217
+ "type": "object",
218
+ "description": "Border radius values",
219
+ "additionalProperties": {
220
+ "type": "string"
221
+ }
222
+ },
223
+ "shadows": {
224
+ "type": "object",
225
+ "description": "Box shadow definitions",
226
+ "additionalProperties": {
227
+ "type": "string"
228
+ }
229
+ },
230
+ "breakpoints": {
231
+ "type": "object",
232
+ "description": "Responsive breakpoints",
233
+ "additionalProperties": {
234
+ "type": "string"
235
+ }
236
+ },
237
+ "transitions": {
238
+ "type": "object",
239
+ "description": "Transition/animation settings",
240
+ "additionalProperties": {
241
+ "type": "string"
242
+ }
243
+ }
244
+ },
245
+ "additionalProperties": true
246
+ },
247
+ "components": {
248
+ "type": "array",
249
+ "description": "Global component inventory",
250
+ "items": {
251
+ "type": "object",
252
+ "required": ["name"],
253
+ "properties": {
254
+ "name": {
255
+ "type": "string",
256
+ "description": "Component name"
257
+ },
258
+ "description": {
259
+ "type": "string",
260
+ "description": "Component description"
261
+ },
262
+ "usedOn": {
263
+ "type": "array",
264
+ "description": "Page IDs where this component appears",
265
+ "items": {
266
+ "type": "string"
267
+ }
268
+ },
269
+ "variants": {
270
+ "type": "array",
271
+ "description": "Component variants",
272
+ "items": {
273
+ "type": "string"
274
+ }
275
+ }
276
+ },
277
+ "additionalProperties": true
278
+ }
279
+ },
280
+ "metadata": {
281
+ "type": "object",
282
+ "description": "Additional metadata",
283
+ "properties": {
284
+ "generatedAt": {
285
+ "type": "string",
286
+ "description": "ISO 8601 timestamp when manifest was generated",
287
+ "format": "date-time"
288
+ },
289
+ "generatedBy": {
290
+ "type": "string",
291
+ "description": "Tool or person that generated the manifest"
292
+ },
293
+ "notes": {
294
+ "type": "string",
295
+ "description": "Additional notes about the reference capture"
296
+ }
297
+ },
298
+ "additionalProperties": true
299
+ }
300
+ },
301
+ "additionalProperties": true
302
+ }
@@ -0,0 +1,167 @@
1
+ #!/bin/bash
2
+
3
+ # Setup script for creating a new Next.js prototype project
4
+ # Usage: ./setup-prototype.sh [project-name]
5
+
6
+ PROJECT_NAME=${1:-prototype}
7
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
+ SKILL_DIR="$(dirname "$SCRIPT_DIR")"
9
+ ROOT_DIR="$(dirname "$(dirname "$(dirname "$SKILL_DIR")")")"
10
+
11
+ echo "Setting up prototype project: $PROJECT_NAME"
12
+
13
+ # Check if project already exists
14
+ if [ -d "$ROOT_DIR/$PROJECT_NAME" ]; then
15
+ echo "Project directory already exists. Skipping scaffold."
16
+ else
17
+ echo "Creating Next.js project..."
18
+ cd "$ROOT_DIR"
19
+ npx create-next-app@latest "$PROJECT_NAME" \
20
+ --typescript \
21
+ --tailwind \
22
+ --eslint \
23
+ --app \
24
+ --src-dir \
25
+ --no-import-alias \
26
+ --use-npm
27
+ fi
28
+
29
+ cd "$ROOT_DIR/$PROJECT_NAME"
30
+
31
+ # Initialize shadcn/ui
32
+ echo "Initializing shadcn/ui..."
33
+ npx shadcn@latest init -d -y
34
+
35
+ # Add common components
36
+ echo "Adding shadcn/ui components..."
37
+ npx shadcn@latest add button card input label dialog table tabs -y
38
+
39
+ # Create platform color tokens in tailwind config
40
+ echo "Updating Tailwind config with platform tokens..."
41
+ cat > tailwind.config.ts << 'EOF'
42
+ import type { Config } from "tailwindcss";
43
+
44
+ const config: Config = {
45
+ darkMode: ["class"],
46
+ content: [
47
+ "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
48
+ "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
49
+ "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
50
+ ],
51
+ theme: {
52
+ extend: {
53
+ colors: {
54
+ platform: {
55
+ primary: "var(--platform-primary, #3B82F6)",
56
+ secondary: "var(--platform-secondary, #10B981)",
57
+ background: "var(--platform-background, #FFFFFF)",
58
+ foreground: "var(--platform-foreground, #1F2937)",
59
+ muted: "var(--platform-muted, #F3F4F6)",
60
+ border: "var(--platform-border, #E5E7EB)",
61
+ },
62
+ },
63
+ fontFamily: {
64
+ platform: ["var(--platform-font, Inter)", "sans-serif"],
65
+ },
66
+ },
67
+ },
68
+ plugins: [require("tailwindcss-animate")],
69
+ };
70
+
71
+ export default config;
72
+ EOF
73
+
74
+ # Create CSS variables file
75
+ mkdir -p src/styles
76
+ cat > src/styles/platform-tokens.css << 'EOF'
77
+ /* Platform Design Tokens
78
+ These values will be replaced by the extract-tokens script
79
+ based on the captured platform styles */
80
+
81
+ :root {
82
+ --platform-primary: #3B82F6;
83
+ --platform-secondary: #10B981;
84
+ --platform-background: #FFFFFF;
85
+ --platform-foreground: #1F2937;
86
+ --platform-muted: #F3F4F6;
87
+ --platform-border: #E5E7EB;
88
+ --platform-font: "Inter", sans-serif;
89
+ }
90
+ EOF
91
+
92
+ # Update global CSS to import tokens
93
+ cat > src/app/globals.css << 'EOF'
94
+ @import "../styles/platform-tokens.css";
95
+ @tailwind base;
96
+ @tailwind components;
97
+ @tailwind utilities;
98
+
99
+ @layer base {
100
+ * {
101
+ @apply border-platform-border;
102
+ }
103
+ body {
104
+ @apply bg-platform-background text-platform-foreground font-platform;
105
+ }
106
+ }
107
+ EOF
108
+
109
+ # Create features directory
110
+ mkdir -p src/components/features
111
+
112
+ # Create example feature component
113
+ cat > src/components/features/ExampleFeature.tsx << 'EOF'
114
+ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
115
+ import { Button } from "@/components/ui/button";
116
+
117
+ interface ExampleFeatureProps {
118
+ title?: string;
119
+ }
120
+
121
+ export function ExampleFeature({ title = "New Feature" }: ExampleFeatureProps) {
122
+ return (
123
+ <Card className="w-full max-w-md">
124
+ <CardHeader>
125
+ <CardTitle className="text-platform-primary">{title}</CardTitle>
126
+ </CardHeader>
127
+ <CardContent className="space-y-4">
128
+ <p className="text-platform-foreground/80">
129
+ This is a prototype feature matching your platform&apos;s design.
130
+ </p>
131
+ <Button className="bg-platform-primary hover:bg-platform-primary/90">
132
+ Take Action
133
+ </Button>
134
+ </CardContent>
135
+ </Card>
136
+ );
137
+ }
138
+ EOF
139
+
140
+ # Create feature page
141
+ mkdir -p src/app/feature
142
+ cat > src/app/feature/page.tsx << 'EOF'
143
+ import { ExampleFeature } from "@/components/features/ExampleFeature";
144
+
145
+ export default function FeaturePage() {
146
+ return (
147
+ <main className="min-h-screen bg-platform-background p-8">
148
+ <div className="max-w-4xl mx-auto space-y-8">
149
+ <h1 className="text-3xl font-bold text-platform-foreground">
150
+ Feature Prototype
151
+ </h1>
152
+ <ExampleFeature title="Your New Feature" />
153
+ </div>
154
+ </main>
155
+ );
156
+ }
157
+ EOF
158
+
159
+ echo ""
160
+ echo "✓ Prototype project setup complete!"
161
+ echo ""
162
+ echo "Next steps:"
163
+ echo " cd $PROJECT_NAME"
164
+ echo " npm run dev"
165
+ echo ""
166
+ echo "View prototype at: http://localhost:3000/feature"
167
+ EOF