enterprise-ui-architect-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/assets/SKILL.md +590 -0
  2. package/assets/claude-skills/enterprise-ui-architect/SKILL.md +600 -0
  3. package/assets/data/accessibility-checks.csv +31 -0
  4. package/assets/data/anti-patterns.csv +55 -0
  5. package/assets/data/api-integration-patterns.csv +16 -0
  6. package/assets/data/charts.csv +26 -0
  7. package/assets/data/color-palettes.csv +21 -0
  8. package/assets/data/component-standards.csv +17 -0
  9. package/assets/data/data-source-strategies.csv +11 -0
  10. package/assets/data/industries.csv +16 -0
  11. package/assets/data/page-patterns.csv +9 -0
  12. package/assets/data/pre-delivery-checklist.csv +36 -0
  13. package/assets/data/review-rubric.csv +11 -0
  14. package/assets/data/styles.csv +16 -0
  15. package/assets/data/tokens.csv +89 -0
  16. package/assets/data/typography.csv +16 -0
  17. package/assets/scripts/search.py +241 -0
  18. package/assets/templates/base/quick-reference.md +123 -0
  19. package/assets/templates/base/skill-content.md +184 -0
  20. package/assets/templates/platforms/claude.json +19 -0
  21. package/assets/templates/platforms/codex.json +19 -0
  22. package/assets/templates/platforms/copilot.json +18 -0
  23. package/assets/templates/platforms/cursor.json +36 -0
  24. package/assets/templates/platforms/windsurf.json +26 -0
  25. package/dist/commands/init.d.ts +5 -0
  26. package/dist/commands/init.d.ts.map +1 -0
  27. package/dist/commands/init.js +182 -0
  28. package/dist/commands/init.js.map +1 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +72 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/utils/template.d.ts +6 -0
  34. package/dist/utils/template.d.ts.map +1 -0
  35. package/dist/utils/template.js +9 -0
  36. package/dist/utils/template.js.map +1 -0
  37. package/package.json +36 -0
@@ -0,0 +1,241 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Search utility for Enterprise UI Architect skill data.
4
+ No external dependencies. Pure Python 3.
5
+
6
+ Usage:
7
+ python search.py --query "table loading" --domain component-standards -n 5
8
+ python search.py --query "form modal" --domain anti-patterns -n 3
9
+ python search.py --query "spacing token" --domain tokens
10
+ python search.py --query "fintech" --domain industries
11
+ python search.py --query "bento grid" --domain styles
12
+ python search.py --query "fintech" --design-system -p "MyBank"
13
+ python search.py --query "saas" --design-system -f markdown --persist -p "MyApp"
14
+ """
15
+
16
+ import argparse
17
+ import csv
18
+ import os
19
+ import sys
20
+ from pathlib import Path
21
+
22
+ DOMAINS = {
23
+ "page-patterns": "page-patterns.csv",
24
+ "component-standards": "component-standards.csv",
25
+ "review-rubric": "review-rubric.csv",
26
+ "anti-patterns": "anti-patterns.csv",
27
+ "tokens": "tokens.csv",
28
+ "accessibility": "accessibility-checks.csv",
29
+ "industries": "industries.csv",
30
+ "styles": "styles.csv",
31
+ "color-palettes": "color-palettes.csv",
32
+ "typography": "typography.csv",
33
+ "charts": "charts.csv",
34
+ "pre-delivery-checklist": "pre-delivery-checklist.csv",
35
+ "api-integration": "api-integration-patterns.csv",
36
+ "data-strategies": "data-source-strategies.csv",
37
+ }
38
+
39
+
40
+ def find_data_dir() -> Path:
41
+ """Locate the data directory relative to this script."""
42
+ script_dir = Path(__file__).resolve().parent
43
+ candidates = [
44
+ script_dir.parent / "data",
45
+ script_dir.parent / "assets" / "data",
46
+ Path.cwd() / "src" / "enterprise-ui-architect" / "data",
47
+ Path.cwd() / "data",
48
+ ]
49
+ for c in candidates:
50
+ if c.exists():
51
+ return c
52
+ return candidates[0]
53
+
54
+
55
+ def bm25_score(row: dict, query_terms: list[str], avgdl: float, k1: float = 1.5, b: float = 0.75) -> float:
56
+ """Simple BM25-inspired scoring across all row values."""
57
+ text = " ".join(str(v).lower() for v in row.values() if v is not None)
58
+ doc_len = len(text.split())
59
+ score = 0.0
60
+ for term in query_terms:
61
+ tf = text.count(term.lower())
62
+ if tf == 0:
63
+ continue
64
+ # IDF approximation: log(1 + N/n) where N=total docs, n=docs with term
65
+ # For simplicity, use a fixed reasonable IDF
66
+ idf = 1.0
67
+ tf_component = (tf * (k1 + 1)) / (tf + k1 * (1 - b + b * (doc_len / max(avgdl, 1))))
68
+ score += idf * tf_component
69
+ return score
70
+
71
+
72
+ def search_csv(data_dir: Path, domain: str, query: str, max_results: int = 10) -> str:
73
+ filename = DOMAINS.get(domain)
74
+ if not filename:
75
+ available = ", ".join(DOMAINS.keys())
76
+ return f"Error: Unknown domain '{domain}'. Available: {available}"
77
+
78
+ filepath = data_dir / filename
79
+ if not filepath.exists():
80
+ return f"Error: File not found: {filepath}"
81
+
82
+ query_terms = query.split()
83
+ results = []
84
+ total_docs = 0
85
+
86
+ # First pass: count total docs and average doc length
87
+ with open(filepath, newline="", encoding="utf-8") as f:
88
+ reader = csv.DictReader(f)
89
+ docs = list(reader)
90
+ total_docs = len(docs)
91
+ total_len = sum(len(" ".join(str(v) for v in r.values() if v is not None).split()) for r in docs)
92
+ avgdl = total_len / max(total_docs, 1)
93
+
94
+ # Second pass: score
95
+ for row in docs:
96
+ s = bm25_score(row, query_terms, avgdl)
97
+ if s > 0:
98
+ results.append((s, row))
99
+
100
+ results.sort(key=lambda x: x[0], reverse=True)
101
+ results = results[:max_results]
102
+
103
+ if not results:
104
+ return f"No results for query '{query}' in {domain}."
105
+
106
+ lines = [f"# Results: {domain}", f"Query: `{query}` | Matches: {len(results)}\n"]
107
+ for idx, (score, row) in enumerate(results, 1):
108
+ lines.append(f"## {idx}. Score: {score:.2f}")
109
+ for key, value in row.items():
110
+ lines.append(f"- **{key}**: {value}")
111
+ lines.append("")
112
+
113
+ return "\n".join(lines)
114
+
115
+
116
+ def generate_design_system(data_dir: Path, query: str, product_name: str = "Your Product", output_format: str = "ascii") -> str:
117
+ """Generate a complete design system based on industry query."""
118
+ industries_result = search_csv(data_dir, "industries", query, max_results=3)
119
+ styles_result = search_csv(data_dir, "styles", query, max_results=3)
120
+ palettes_result = search_csv(data_dir, "color-palettes", query, max_results=3)
121
+ typography_result = search_csv(data_dir, "typography", query, max_results=3)
122
+
123
+ if output_format == "markdown":
124
+ lines = [
125
+ f"# Design System: {product_name}",
126
+ "",
127
+ f"Generated for query: `{query}`",
128
+ "",
129
+ "---",
130
+ "",
131
+ "## Industry Match",
132
+ industries_result,
133
+ "",
134
+ "## Recommended Styles",
135
+ styles_result,
136
+ "",
137
+ "## Color Palette",
138
+ palettes_result,
139
+ "",
140
+ "## Typography",
141
+ typography_result,
142
+ "",
143
+ "---",
144
+ "",
145
+ "## Pre-Delivery Checklist",
146
+ "Apply the checks from `pre-delivery-checklist.csv` for each page type you build.",
147
+ "",
148
+ ]
149
+ return "\n".join(lines)
150
+
151
+ # ASCII format
152
+ lines = [
153
+ "+----------------------------------------------------------------------------------------+",
154
+ f"| TARGET: {product_name:<78} |",
155
+ "| DESIGN SYSTEM (Enterprise UI Architect) |",
156
+ "+----------------------------------------------------------------------------------------+",
157
+ "",
158
+ f" Industry Query: {query}",
159
+ "",
160
+ " INDUSTRY MATCH:",
161
+ industries_result,
162
+ "",
163
+ " STYLES:",
164
+ styles_result,
165
+ "",
166
+ " COLORS:",
167
+ palettes_result,
168
+ "",
169
+ " TYPOGRAPHY:",
170
+ typography_result,
171
+ "",
172
+ " PRE-DELIVERY: Apply checks from pre-delivery-checklist.csv",
173
+ "",
174
+ "+----------------------------------------------------------------------------------------+",
175
+ ]
176
+ return "\n".join(lines)
177
+
178
+
179
+ def persist_design_system(output: str, product_name: str) -> None:
180
+ """Save design system to design-system/MASTER.md for hierarchical retrieval."""
181
+ ds_dir = Path.cwd() / "design-system"
182
+ ds_dir.mkdir(exist_ok=True)
183
+ master_path = ds_dir / "MASTER.md"
184
+ with open(master_path, "w", encoding="utf-8") as f:
185
+ f.write(output)
186
+ print(f"Design system persisted to: {master_path}")
187
+
188
+
189
+ def main():
190
+ parser = argparse.ArgumentParser(
191
+ description="Search Enterprise UI Architect skill data CSVs."
192
+ )
193
+ parser.add_argument("--query", "-q", required=True, help="Search query (space-separated keywords).")
194
+ parser.add_argument(
195
+ "--domain", "-d", default="page-patterns",
196
+ help="Domain to search. Use 'all' to search across all domains."
197
+ )
198
+ parser.add_argument(
199
+ "-n", type=int, default=10, help="Max results to return (default: 10)."
200
+ )
201
+ parser.add_argument(
202
+ "--design-system", action="store_true",
203
+ help="Generate a complete design system for the query."
204
+ )
205
+ parser.add_argument(
206
+ "--product", "-p", default="Your Product",
207
+ help="Product name for design system output."
208
+ )
209
+ parser.add_argument(
210
+ "--format", "-f", default="ascii", choices=["ascii", "markdown"],
211
+ help="Design system output format."
212
+ )
213
+ parser.add_argument(
214
+ "--persist", action="store_true",
215
+ help="Save design system to design-system/MASTER.md."
216
+ )
217
+ args = parser.parse_args()
218
+
219
+ data_dir = find_data_dir()
220
+
221
+ if args.design_system:
222
+ output = generate_design_system(data_dir, args.query, args.product, args.format)
223
+ print(output)
224
+ if args.persist:
225
+ persist_design_system(output, args.product)
226
+ return
227
+
228
+ if args.domain == "all":
229
+ for domain in DOMAINS:
230
+ print(f"\n{'='*60}")
231
+ print(f"Domain: {domain}")
232
+ print(f"{'='*60}")
233
+ print(search_csv(data_dir, domain, args.query, args.n))
234
+ return
235
+
236
+ output = search_csv(data_dir, args.domain, args.query, args.n)
237
+ print(output)
238
+
239
+
240
+ if __name__ == "__main__":
241
+ main()
@@ -0,0 +1,123 @@
1
+ # Enterprise UI Architect — Quick Reference
2
+
3
+ ## Verdict
4
+ Premium Admin = visual feel. MUI v7 = implementation. Ant Design = architecture discipline.
5
+
6
+ ## Component Stack
7
+ - UI: `@mui/material` v7
8
+ - Forms: `react-hook-form` + `Controller`
9
+ - Tables: `@tanstack/react-table`
10
+ - Validation: `valibot` / `zod` via `@hookform/resolvers`
11
+
12
+ ## Design System Generator
13
+ ```bash
14
+ python scripts/search.py --query "fintech" --design-system --product "MyBank"
15
+ python scripts/search.py --query "saas" --design-system --persist --product "MyApp"
16
+ ```
17
+
18
+ ## Drawer vs Dialog vs Page
19
+ - **Dialog**: delete confirm, yes/no, small focused form
20
+ - **Drawer**: quick create/edit, advanced filters, record preview (width 300-400px)
21
+ - **Page**: complex forms, multi-section edit, wizard, heavy validation
22
+
23
+ ## Layout Modes
24
+ - **Skin**: default (shadow) | bordered (outline, no shadow)
25
+ - **Navbar**: fixed | floating | detached | attached | blur
26
+ - **Content**: compact (1440px) | wide (full-bleed)
27
+ - **Sidebar**: 260px / 71px collapsed, semi-dark supported
28
+
29
+ ## Table Checklist
30
+ - [ ] typed columns via `createColumnHelper`
31
+ - [ ] stable rowKey
32
+ - [ ] sorting + filtering + search (debounced 500ms)
33
+ - [ ] pagination via MUI Pagination (rounded tonal)
34
+ - [ ] loading / empty / error states
35
+ - [ ] row actions + optional bulk actions
36
+ - [ ] status chips + formatted dates/numbers
37
+ - [ ] responsive behavior
38
+ - [ ] accessible headers
39
+ - [ ] controlled filter/sort/page state
40
+ - [ ] header height 56px, body 50px
41
+ - [ ] horizontal borders only
42
+ - [ ] first/last column padding 24px, internal 16px
43
+ - [ ] NEVER use MUI TablePagination for logic
44
+ - [ ] ALWAYS use TanStack react-table for logic
45
+
46
+ ## Form Checklist
47
+ - [ ] typed values via RHF generic
48
+ - [ ] validation rules (inline or schema resolver)
49
+ - [ ] field-level errors + helper text
50
+ - [ ] required indicators
51
+ - [ ] submit loading + disabled state
52
+ - [ ] cancel / reset via `reset()`
53
+ - [ ] dirty state protection
54
+ - [ ] responsive field grid (MUI Grid spacing 6)
55
+ - [ ] logical sections with Divider + Typography headers
56
+ - [ ] accessible labels
57
+ - [ ] success / error feedback
58
+ - [ ] label above input (slotProps inputLabel shrink true transform none)
59
+ - [ ] focus: 2px border + primary-sm shadow
60
+ - [ ] start adornments via slotProps input
61
+
62
+ ## Styling Checklist
63
+ - [ ] MUI theme tokens used (palette, spacing, shape)
64
+ - [ ] CSS variables via MUI cssVariables
65
+ - [ ] shared spacing scale (theme.spacing factor)
66
+ - [ ] shared typography scale (theme.typography)
67
+ - [ ] semantic color roles
68
+ - [ ] reusable variants (contained, tonal, outlined)
69
+ - [ ] Tailwind utilities for layout/flex/grid only
70
+ - [ ] slotProps over deprecated inner prop APIs
71
+ - [ ] no random hex colors
72
+ - [ ] no random margins / font sizes
73
+ - [ ] no heavy inline sx props on generic primitives
74
+ - [ ] header height 54px, content padding 24px, max-width 1440px
75
+
76
+ ## Keyboard Navigation
77
+ - Autocomplete: Arrow keys, Enter, Escape, Home/End
78
+ - Select: Space open, arrows navigate, Enter select, typeahead
79
+ - Tabs: Left/Right arrows change tabs; Tab enters panel
80
+ - Accordion: Enter/Space toggle; arrows between headers
81
+ - Slider: Arrow keys step; Home/End min/max; PageUp/PageDown
82
+ - Switch: Space toggles
83
+ - Dialog: Escape closes; Tab traps focus
84
+
85
+ ## Backend Data Detection
86
+ - [ ] Check for backend presence (API docs proxy repo)
87
+ - [ ] Check for real-time endpoints (WebSocket STOMP SSE)
88
+ - [ ] Check for existing API layer (api/ services/ hooks/)
89
+ - [ ] Use TanStack Query for all server state
90
+ - [ ] Use MSW for mock data (never hardcode in components)
91
+ - [ ] Create chart adapter function (API response → chart data)
92
+ - [ ] Use Skeleton for chart loading states
93
+ - [ ] Implement retry + error fallback for unstable APIs
94
+ - [ ] Use refetchInterval or WebSocket for real-time dashboards
95
+
96
+ ## Pre-Delivery Checklist
97
+ - [ ] All interactive elements have hover states and cursor-pointer
98
+ - [ ] Focus states are visible and consistent
99
+ - [ ] No emojis as icons — only SVG or icon font
100
+ - [ ] Text contrast meets 4.5:1 minimum
101
+ - [ ] prefers-reduced-motion respected
102
+ - [ ] Responsive at 375px, 768px, 1024px, 1440px
103
+ - [ ] Loading states for all async operations
104
+ - [ ] Empty states for every list/table/grid
105
+ - [ ] Error states with helpful messages
106
+ - [ ] Browser back button works for filter/sort/page state
107
+
108
+ ## Accessibility Checklist
109
+ - [ ] labels on all inputs
110
+ - [ ] errors linked via aria-describedby
111
+ - [ ] required fields indicated
112
+ - [ ] focus trapped in Dialog/Drawer
113
+ - [ ] focus returns to trigger on close
114
+ - [ ] status uses icon + text (not color alone)
115
+ - [ ] table headers semantic
116
+ - [ ] row actions keyboard accessible
117
+ - [ ] touch targets >= 44x44px
118
+ - [ ] contrast >= 4.5:1
119
+ - [ ] skip links present
120
+ - [ ] focus visible indicators
121
+ - [ ] aria-live for dynamic updates
122
+ - [ ] aria-label on icon-only buttons
123
+ - [ ] prefers-reduced-motion respected
@@ -0,0 +1,184 @@
1
+ # Enterprise UI Architect — Skill Content
2
+
3
+ ## What This Skill Does
4
+ Guides AI coding assistants to build premium admin dashboards that use MUI v7 components, follow Ant Design engineering discipline, and leverage design system intelligence for consistent, industry-appropriate UIs.
5
+
6
+ ## Visual Direction (Enterprise Admin)
7
+ - Card-based layouts with consistent padding and elevation
8
+ - Sidebar + navbar composition (header 54px, sidebar 260px/71px collapsed)
9
+ - Status chips with semantic colors and tonal variant
10
+ - Dashboard widget rhythm with 24px gaps
11
+ - Polished tables with action menus (header 56px, body 50px, horizontal borders only)
12
+ - Clean form sections with footer actions
13
+ - Label-above-input text fields with primary focus shadow
14
+ - Stat cards: horizontal (stats left, avatar right) or vertical (avatar top, stats below)
15
+
16
+ ## Implementation Engine (MUI v7)
17
+ - MUI Card, CardHeader, CardContent, CardActions, Divider
18
+ - MUI Dialog, Drawer, Button, Chip, TextField, Pagination
19
+ - MUI Grid for responsive layouts (no `item` prop in v7)
20
+ - MUI Tabs, Descriptions, Badge, Switch
21
+ - Theme tokens via theme.palette, theme.spacing, theme.shape
22
+
23
+ ## Architecture Principles (Ant Design-inspired)
24
+ - TypeScript-first component APIs
25
+ - Predictable Form patterns (react-hook-form + Controller)
26
+ - Predictable Table patterns (TanStack Table + MUI Pagination)
27
+ - Drawer/Dialog discipline
28
+ - Design token usage
29
+ - Reusable abstractions
30
+ - Accessibility compliance
31
+ - Production-ready state handling
32
+
33
+ ## Component Stack
34
+ - UI: `@mui/material` v7
35
+ - Forms: `react-hook-form` + `Controller`
36
+ - Tables: `@tanstack/react-table`
37
+ - Validation: `valibot` / `zod` via `@hookform/resolvers`
38
+ - Icons: Tabler Icons
39
+ - Data Fetching: TanStack Query (preferred) or SWR
40
+ - Real-Time: WebSocket / STOMP / Socket.io / SSE
41
+ - API Mocking: MSW (Mock Service Worker) for development
42
+
43
+ ## Design System Generation
44
+ Generate a complete design system for any admin product:
45
+
46
+ ```bash
47
+ python scripts/search.py --query "fintech" --design-system --product "MyBank"
48
+ ```
49
+
50
+ Outputs: pattern + style + colors + typography + effects + anti-patterns + checklist
51
+
52
+ Persist for cross-session use:
53
+ ```bash
54
+ python scripts/search.py --query "saas" --design-system --persist --product "MyApp"
55
+ ```
56
+
57
+ ## Industry-Specific Reasoning
58
+ 15 admin industries with tailored rules:
59
+ - SaaS / B2B Platform
60
+ - Fintech / Banking
61
+ - Healthcare / Medical
62
+ - E-commerce Admin
63
+ - Logistics / Supply Chain
64
+ - HR / People Management
65
+ - CRM / Sales
66
+ - ERP / Manufacturing
67
+ - Education / LMS
68
+ - Government / Public Sector
69
+ - Cybersecurity / SOC
70
+ - Real Estate / Property
71
+ - Energy / Utilities
72
+ - Media / Content Management
73
+ - Nonprofit / NGO
74
+
75
+ ## UI Styles for Admin Dashboards
76
+ 15 styles rated for admin suitability:
77
+ - Minimalism & Swiss Style (10/10)
78
+ - Bento Box Grid (10/10)
79
+ - Dark Mode OLED (9/10)
80
+ - Soft UI Evolution (9/10)
81
+ - Data-Dense Dashboard (10/10)
82
+ - Executive Dashboard (8/10)
83
+ - Real-Time Monitoring (9/10)
84
+ - Accessible & Inclusive (10/10)
85
+ - Glassmorphism (7/10)
86
+ - AI-Native UI (7/10)
87
+
88
+ ## Color Palettes
89
+ 20 admin-specific palettes matched to industries.
90
+
91
+ ## Typography Pairings
92
+ 15 curated font pairings with Google Fonts imports.
93
+
94
+ ## Charts for Dashboards
95
+ 25 chart types mapped to admin use cases:
96
+ - Revenue/Growth: Line, Area, Sparkline
97
+ - Comparisons: Bar, Grouped Bar, Horizontal Bar
98
+ - Proportions: Donut, Pie, Treemap
99
+ - Real-time: Gauge, Metric Cards
100
+ - Project: Gantt, Timeline
101
+ - Geographic: Map, Choropleth
102
+
103
+ ## Page Patterns Quick Map
104
+ | Page Type | Visual Feel | MUI + RHF Architecture |
105
+ |---|---|---|
106
+ | CRUD List | Card + toolbar + table + pagination | TanStack Table + MUI Pagination + Drawer filters |
107
+ | Complex Form | Card sections + footer actions | RHF + Controller + MUI TextField + dirty guard |
108
+ | Dashboard | Widget grid + charts + activity | MUI Card + StatCard + Grid + Chip tonal |
109
+ | Detail | Summary + tabs + related lists | MUI Tabs + Descriptions + Card per section |
110
+ | Settings | Tab categories + toggles + save | MUI Tabs + Card per section + Switch + RHF |
111
+ | Wizard | Stepper + step validation | RHF step schema + MUI Stepper + summary review |
112
+ | Auth | Centered card + blank layout | BlankLayout + MUI Card + RHF + fullWidth buttons |
113
+ | Blank | Full-width centered no sidebar | BlankLayout + centered content |
114
+
115
+ ## Component Standards Quick Map
116
+ | Component | Key Rules |
117
+ |---|---|
118
+ | PageLayout | Consistent padding, max-width, background from theme, layout modes |
119
+ | Card | MUI Card + CardHeader + CardContent + CardActions + Divider |
120
+ | DataTable | TanStack Table, typed columns, rowKey, loading/empty/error, MUI Pagination rounded tonal |
121
+ | FormSection | MUI Card + section title + Divider + Grid spacing 6 |
122
+ | StatusChip | MUI Chip, variant tonal, size small, icon + text, semantic color |
123
+ | Drawer | MUI Drawer, anchor right, width 300-400px, manual reset on close |
124
+ | Dialog | MUI Dialog, maxWidth md for edit, scroll body, closeAfterTransition false for confirmations |
125
+ | SubmitBar | MUI CardActions, Button contained primary + tonal secondary, loading, dirty guard |
126
+ | CustomTextField | MUI TextField variant filled with styled overrides, label above input, slotProps inputLabel shrink true |
127
+ | StatCard | MUI Card, horizontal or vertical, avatar + tonal Chip, border accent optional |
128
+ | Button | MUI Button, variant contained/tonal/outlined, loading via CircularProgress, active scale 0.98 |
129
+ | Pagination | MUI Pagination, shape rounded, variant tonal, connected to table state |
130
+ | OptionMenu | MUI Menu + IconButton trigger, typed options array |
131
+ | Skeleton | MUI Skeleton for known-shape content loading, not CircularProgress |
132
+ | ErrorBoundary | React ErrorBoundary at page/layout level with fallback UI |
133
+
134
+ ## Backend Data Detection
135
+ Before building charts tables or forms detect the data source:
136
+ - Backend exists + API documented → Connect real API immediately
137
+ - Backend exists + API not documented → Explore endpoints reverse engineer
138
+ - Backend in development → MSW or json-server with agreed contract
139
+ - No backend → json-server or localStorage mock
140
+ - Backend unstable → Retry logic + circuit breaker + MSW fallback
141
+
142
+ ### Chart + Backend Integration
143
+ - Use TanStack Query `useQuery` for chart data
144
+ - Map API response to chart format in adapter function
145
+ - Use `staleTime` and `refetchInterval` for real-time dashboards
146
+ - Show Skeleton (not spinner) while chart data loads
147
+ - Use `placeholderData` to show previous data while refetching
148
+
149
+ ### Real-Time Patterns
150
+ | Backend | Frontend Pattern |
151
+ |---|---|
152
+ | Spring Boot + STOMP | SockJS + STOMP.js + Zustand |
153
+ | Node.js + Socket.io | Socket.io-client + event store |
154
+ | Any + SSE | EventSource with reconnect |
155
+ | Any + polling | TanStack Query `refetchInterval` |
156
+
157
+ ## Anti-Patterns to Catch
158
+ - Complex forms inside Dialogs
159
+ - Inline table column definitions
160
+ - Random hex colors or margins
161
+ - Missing loading/empty/error states
162
+ - Color-only status indicators
163
+ - Missing dirty form guard
164
+ - Inline sx props on generic primitives
165
+ - Vertical table borders
166
+ - Floating labels without shrink
167
+ - Using MUI TablePagination for logic instead of TanStack state
168
+ - Using native MUI Table without TanStack react-table
169
+ - Missing CardHeader/CardContent/CardActions structure
170
+ - Using `item` prop on MUI v7 Grid
171
+ - Forgetting `declare module` for `tonal` variant
172
+ - Using MUI v7 without AppRouterCacheProvider in Next.js
173
+ - Using rules inline alongside schema resolver
174
+ - No Error Boundaries
175
+ - Using CircularProgress instead of Skeleton for content loading
176
+ - Icon-only buttons without aria-label
177
+ - Disabling focus outlines globally
178
+
179
+ ## Review Verdict Scale
180
+ - Excellent
181
+ - Good but needs refinement
182
+ - Visually acceptable but structurally weak
183
+ - Not production-ready
184
+ - Needs redesign
@@ -0,0 +1,19 @@
1
+ {
2
+ "platform": "claude",
3
+ "outputPath": ".claude/skills/enterprise-ui-architect/SKILL.md",
4
+ "format": "claude-skill",
5
+ "description": "Claude Code skill file for Enterprise UI Architect",
6
+ "contentSource": "SKILL.md",
7
+ "dataPaths": {
8
+ "page-patterns": "data/page-patterns.csv",
9
+ "component-standards": "data/component-standards.csv",
10
+ "review-rubric": "data/review-rubric.csv",
11
+ "anti-patterns": "data/anti-patterns.csv",
12
+ "tokens": "data/tokens.csv",
13
+ "accessibility": "data/accessibility-checks.csv"
14
+ },
15
+ "scripts": {
16
+ "search": "scripts/search.py"
17
+ },
18
+ "quickReference": "templates/base/quick-reference.md"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "platform": "codex",
3
+ "outputPath": ".codex/skills/enterprise-ui-architect/SKILL.md",
4
+ "format": "codex-skill",
5
+ "description": "OpenAI Codex skill file for Enterprise UI Architect",
6
+ "contentSource": "SKILL.md",
7
+ "quickReference": "templates/base/quick-reference.md",
8
+ "rules": [
9
+ "Premium enterprise admin panels define visual feel; Ant Design principles guide architecture.",
10
+ "Reuse existing PageLayout, Card, Table, Form abstractions.",
11
+ "Dialog = confirmations; Drawer = quick edit/filter; Page = complex forms.",
12
+ "Never put complex forms in Dialogs.",
13
+ "Use typed columns; avoid inline column definitions.",
14
+ "Tokens only; no random hex colors or inline styles.",
15
+ "Tables need loading/empty/error states.",
16
+ "Forms need dirty guard, validation, submit loading.",
17
+ "StatusChip = color + icon + text."
18
+ ]
19
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "platform": "copilot",
3
+ "outputPath": ".github/prompts/enterprise-ui-architect.prompt.md",
4
+ "format": "github-prompt",
5
+ "description": "GitHub Copilot prompt file for Enterprise UI Architect skill",
6
+ "contentSource": "templates/base/skill-content.md",
7
+ "systemPrefix": "You are an expert frontend architect specializing in premium enterprise admin dashboards. You combine enterprise-inspired visual composition with MUI v7 component implementation and Ant Design-level engineering discipline.",
8
+ "injectSections": [
9
+ "Core Philosophy",
10
+ "When to Apply",
11
+ "Drawer vs Dialog vs Page Rules",
12
+ "Table Standard",
13
+ "Form Standard",
14
+ "Theme and Styling Standard",
15
+ "Review Output Format"
16
+ ],
17
+ "promptSuffix": "Before writing or editing UI code, inspect the existing codebase for PageLayout, Card, Table, Form, Drawer, Dialog, and StatusChip abstractions. Reuse existing conventions. Do not introduce unnecessary abstractions."
18
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "platform": "cursor",
3
+ "outputPath": ".cursor/rules/enterprise-ui-architect.mdc",
4
+ "format": "cursor-rule",
5
+ "description": "Cursor IDE rule file for Enterprise UI Architect skill",
6
+ "frontmatter": {
7
+ "description": "Enterprise UI Architect — build premium admin UIs with MUI v7 and Ant Design engineering discipline",
8
+ "globs": "**/*.{tsx,jsx,vue,ts,js}",
9
+ "alwaysApply": false
10
+ },
11
+ "contentSource": "templates/base/skill-content.md",
12
+ "injectSections": [
13
+ "Core Philosophy",
14
+ "When to Apply",
15
+ "Drawer vs Dialog vs Page Rules",
16
+ "Table Standard",
17
+ "Form Standard",
18
+ "Theme and Styling Standard",
19
+ "Review Output Format"
20
+ ],
21
+ "rules": [
22
+ "Always inspect existing PageLayout, Card, Table, Form abstractions before creating new ones.",
23
+ "Use Drawer for quick create/edit and advanced filters; use Dialog only for confirmations and small forms.",
24
+ "Never put complex multi-section forms inside a Dialog.",
25
+ "Use typed column configs for Tables via createColumnHelper; never define columns inline inside page components.",
26
+ "Use react-hook-form + Controller for all production forms; never use uncontrolled MUI inputs directly.",
27
+ "Use MUI theme tokens for colors, spacing, shadows, and typography; avoid random hex colors or inline sx props.",
28
+ "Add loading, empty, and error states to every production Table.",
29
+ "Add dirty state protection, submit loading, and validation to every production Form.",
30
+ "Status indicators must use MUI Chip with variant='tonal' and combine color + icon + text; never color alone.",
31
+ "Use TanStack react-table for all data table logic; never use raw MUI Table without TanStack.",
32
+ "Use custom Pagination wrapper around MUI Pagination with shape='rounded' variant='tonal'; never use MUI TablePagination for logic.",
33
+ "Always structure Cards with CardHeader + CardContent + optional CardActions separated by Divider.",
34
+ "Reuse existing conventions; do not introduce unnecessary abstractions."
35
+ ]
36
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "platform": "windsurf",
3
+ "outputPath": ".windsurf/rules/enterprise-ui-architect.md",
4
+ "format": "windsurf-rule",
5
+ "description": "Windsurf IDE rule file for Enterprise UI Architect skill",
6
+ "contentSource": "templates/base/skill-content.md",
7
+ "injectSections": [
8
+ "Core Philosophy",
9
+ "When to Apply",
10
+ "Drawer vs Dialog vs Page Rules",
11
+ "Table Standard",
12
+ "Form Standard",
13
+ "Theme and Styling Standard",
14
+ "Review Output Format"
15
+ ],
16
+ "rules": [
17
+ "Inspect existing abstractions before adding new UI primitives.",
18
+ "Drawer for quick create/edit/filters; Dialog for confirmations only.",
19
+ "Never place complex forms inside Dialogs.",
20
+ "Typed table columns in shared files; never inline in pages.",
21
+ "Tokens for all visual properties; no random hex or inline styles.",
22
+ "Loading/empty/error states required on Tables.",
23
+ "Dirty guard + submit loading + validation required on Forms.",
24
+ "StatusChip uses color + icon + text."
25
+ ]
26
+ }
@@ -0,0 +1,5 @@
1
+ export declare function initCommand(options: {
2
+ ai?: string;
3
+ offline?: boolean;
4
+ }): void;
5
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAwMA,wBAAgB,WAAW,CAAC,OAAO,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAqB7E"}