ui-ux-master 1.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 (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +198 -0
  3. package/SKILL.md +717 -0
  4. package/agent-templates/antigravity/AGENTS.append.md +15 -0
  5. package/agent-templates/claude/commands/ui-ux-master.md +25 -0
  6. package/agent-templates/codex/AGENTS.append.md +15 -0
  7. package/agent-templates/cursor/rules/ui-ux-master.mdc +10 -0
  8. package/agent-templates/gemini/GEMINI.append.md +9 -0
  9. package/agent-templates/universal/ui-ux-master-trigger.md +18 -0
  10. package/agent-templates/windsurf/rules/ui-ux-master.md +17 -0
  11. package/bin/ui-ux-master.mjs +192 -0
  12. package/docs/slash-command-compatibility.md +58 -0
  13. package/package.json +55 -0
  14. package/references/accessibility-advanced-patterns.md +43 -0
  15. package/references/competitive-landscape.md +47 -0
  16. package/references/content-design-and-i18n.md +53 -0
  17. package/references/data-visualization-dashboard-ux.md +46 -0
  18. package/references/design-system-playbook.md +133 -0
  19. package/references/ethical-inclusive-design.md +52 -0
  20. package/references/platform-guidelines.md +59 -0
  21. package/references/service-design-journey-mapping.md +39 -0
  22. package/references/top-100-brand-website-analysis.md +302 -0
  23. package/references/ui-ux-complete-checklist.md +214 -0
  24. package/references/ui-ux-curriculum-and-standards.md +40 -0
  25. package/references/ui-ux-frontend-implementation-rules.md +378 -0
  26. package/references/ui-ux-memory-workflow.md +175 -0
  27. package/references/usability-heuristics.md +65 -0
  28. package/references/ux-measurement-quality-gates.md +58 -0
  29. package/references/ux-research-methods.md +99 -0
  30. package/references/wcag-aa-quick-reference.md +85 -0
  31. package/scripts/build_deployment_zip.py +42 -0
  32. package/scripts/validate_skill.py +303 -0
  33. package/templates/component-spec.md +127 -0
  34. package/templates/design-system-spec.md +121 -0
  35. package/templates/top-brand-frontend-spec.md +133 -0
  36. package/templates/ui-ux-audit-report.md +146 -0
  37. package/templates/ui-ux-brief.md +86 -0
  38. package/templates/ui-ux-memory.md +204 -0
  39. package/tests/install-smoke.test.mjs +71 -0
@@ -0,0 +1,175 @@
1
+ # UI/UX Project Memory Workflow
2
+
3
+ Use this workflow every time `ui-ux-master` is used on a project. Its purpose is to keep the UI consistent across the whole application instead of generating a different visual style each time.
4
+
5
+ ## Core Principle
6
+
7
+ The agent must behave like an adaptive product designer who respects the product's existing identity.
8
+
9
+ - If an existing product/app has branding, preserve it.
10
+ - If a design system exists, extend it instead of replacing it.
11
+ - If a UI/UX memory file exists, read it before making design decisions.
12
+ - If no memory file exists, create one after inspecting the project or asking key questions.
13
+ - Only introduce a new visual direction when the user explicitly asks for redesign, rebrand, new theme, or specific modification.
14
+
15
+ ## Memory File Location
16
+
17
+ When working inside a project, use this priority order:
18
+
19
+ 1. Project-specific memory file already present:
20
+ - `.ui-ux-memory.md`
21
+ - `docs/ui-ux-memory.md`
22
+ - `docs/design/ui-ux-memory.md`
23
+ - `design/ui-ux-memory.md`
24
+ 2. If none exists, create:
25
+ - `.ui-ux-memory.md` at the project root.
26
+ 3. If project root is unclear, ask for the project root or create the memory file beside the main frontend app after explaining the assumption.
27
+
28
+ Do not create the memory file inside the `ui-ux-master` skill folder for each app. The memory belongs to the application being designed.
29
+
30
+ ## Required First Step Every Time
31
+
32
+ Before creating or modifying frontend, inspect for existing design memory and branding:
33
+
34
+ - Read `.ui-ux-memory.md` or equivalent if it exists.
35
+ - Search for design tokens, theme files, CSS variables, Tailwind config, Sass variables, component library config, Figma exports, Storybook, or DESIGN.md.
36
+ - Inspect existing global CSS and representative components/screens.
37
+ - Identify current colors, fonts, spacing, radius, shadows, layout patterns, button styles, form styles, icon style, and tone of voice.
38
+ - Check package/dependencies before assuming any UI library.
39
+
40
+ ## Existing Product Behavior
41
+
42
+ If the project already has UI/branding:
43
+
44
+ 1. Extract the existing design facts.
45
+ 2. Update/create `.ui-ux-memory.md` with those facts.
46
+ 3. Follow the existing branding as the default.
47
+ 4. Add new screens/components using the same tokens, components, and interaction patterns.
48
+ 5. If something is inconsistent, propose a normalization plan instead of inventing a new look.
49
+ 6. If the user asks for a specific visual change, update only the requested dimension and preserve everything else.
50
+
51
+ ## Fresh Product Behavior
52
+
53
+ If the project is new and no branding exists, ask only the minimum high-value questions needed:
54
+
55
+ 1. What are you building and who is it for?
56
+ 2. What is the primary user action or success moment?
57
+ 3. What personality should it have: premium, playful, enterprise, technical, calm, bold, luxury, friendly, etc.?
58
+ 4. Any colors, fonts, logos, competitors, or references you want to use or avoid?
59
+ 5. Is this web, mobile, dashboard, landing page, ecommerce, SaaS, admin, or another type?
60
+
61
+ If the user does not answer, proceed with clearly labeled assumptions and create `.ui-ux-memory.md` from those assumptions.
62
+
63
+ ## What to Store in UI/UX Memory
64
+
65
+ Store stable design decisions, not temporary task notes.
66
+
67
+ Required sections:
68
+
69
+ - Product summary.
70
+ - Target users and primary jobs-to-be-done.
71
+ - Brand personality.
72
+ - Design method blend.
73
+ - Color tokens.
74
+ - Typography.
75
+ - Spacing/layout rhythm.
76
+ - Radius/elevation/shadows.
77
+ - Component rules.
78
+ - Interaction/state rules.
79
+ - Accessibility rules.
80
+ - Content/microcopy voice.
81
+ - Responsive rules.
82
+ - Do/don't rules.
83
+ - Change log for design-system decisions.
84
+
85
+ Do not store:
86
+
87
+ - One-off bug status.
88
+ - Temporary implementation progress.
89
+ - Commit hashes or PR numbers.
90
+ - Personal secrets.
91
+ - Credentials.
92
+ - Raw analytics exports.
93
+ - Anything that will be stale in a few days unless it is clearly marked as temporary and removed later.
94
+
95
+ ## How to Use Memory During Implementation
96
+
97
+ Before editing:
98
+
99
+ - Read the memory file.
100
+ - State the existing style baseline in your working notes or summary.
101
+ - Identify whether the user asked to preserve, extend, or change the style.
102
+
103
+ During design:
104
+
105
+ - Reuse stored tokens and component rules.
106
+ - Prefer extending existing patterns over creating new variants.
107
+ - If a new component is needed, define it in memory so future work uses the same pattern.
108
+ - If a new color/font/spacing/radius is needed, justify it and add it as a token.
109
+
110
+ After implementation:
111
+
112
+ - Update the memory file if stable UI rules changed.
113
+ - Add only durable decisions.
114
+ - Keep the memory concise and structured.
115
+ - Mention in the final response whether memory was read/created/updated.
116
+
117
+ ## Adaptive Decision Rules
118
+
119
+ The skill should be intelligent, not robotic:
120
+
121
+ - If existing branding is strong, prioritize consistency over trendiness.
122
+ - If existing branding is weak or inconsistent, normalize it into a clearer token system.
123
+ - If the user asks for "modernize" or "make it better", improve hierarchy, spacing, states, accessibility, and consistency first before changing colors.
124
+ - If the user asks for a new style, confirm whether it is a full redesign or a local change.
125
+ - If different parts of the app conflict, choose the pattern used by the most complete/recent/high-quality screen and document the decision.
126
+ - If the UI library limits design choices, adapt the desired style to the library instead of fighting it.
127
+ - If brand details are missing, infer from product category and ask only if the choice would materially change the result.
128
+
129
+ ## Existing Branding Inspection Checklist
130
+
131
+ Look for:
132
+
133
+ - Logo and wordmark usage.
134
+ - Primary/secondary/accent colors.
135
+ - Background and surface colors.
136
+ - Text color hierarchy.
137
+ - Fonts and font loading.
138
+ - Type scale and weights.
139
+ - Spacing scale.
140
+ - Grid/container widths.
141
+ - Border radius.
142
+ - Shadows/elevation.
143
+ - Button variants.
144
+ - Form/input styling.
145
+ - Cards and panels.
146
+ - Navigation style.
147
+ - Modal/drawer/popover style.
148
+ - Table/list style.
149
+ - Empty/error/loading states.
150
+ - Icons/illustrations/images.
151
+ - Animation/motion style.
152
+ - Voice/tone in headings, CTAs, errors.
153
+
154
+ ## Conflict Resolution
155
+
156
+ When a requested change conflicts with memory:
157
+
158
+ 1. Follow explicit user instruction.
159
+ 2. Preserve unaffected design rules.
160
+ 3. Update memory with the new rule if the change is durable.
161
+ 4. Note the change in the memory change log.
162
+
163
+ When user intent is ambiguous:
164
+
165
+ - Ask whether they want a local change or global design-system change.
166
+ - If low-risk, make a local change and document it as local.
167
+
168
+ ## Required Final Response Note
169
+
170
+ When finishing UI work, include a short note:
171
+
172
+ - UI/UX memory: read / created / updated / not available.
173
+ - Branding baseline followed.
174
+ - Any new durable design decisions added.
175
+ - Any intentional deviations from existing style.
@@ -0,0 +1,65 @@
1
+ # Usability Heuristics and Expert Review
2
+
3
+ Use this reference for heuristic reviews, cognitive walkthroughs, UX audits, and quick diagnosis when user testing is unavailable.
4
+
5
+ ## Nielsen's 10 Usability Heuristics
6
+
7
+ 1. Visibility of system status: show loading, progress, saved state, errors, sync, and feedback.
8
+ 2. Match between system and real world: use user language and natural task order.
9
+ 3. User control and freedom: undo, cancel, back, edit, exit, and recover.
10
+ 4. Consistency and standards: consistent labels, components, locations, platform conventions.
11
+ 5. Error prevention: prevent destructive mistakes and invalid input before they happen.
12
+ 6. Recognition rather than recall: visible options, defaults, examples, history, and contextual help.
13
+ 7. Flexibility and efficiency: shortcuts, saved preferences, bulk actions, power-user paths.
14
+ 8. Aesthetic and minimalist design: remove irrelevant content and reduce competing hierarchy.
15
+ 9. Help users recognize, diagnose, and recover from errors: specific messages and next steps.
16
+ 10. Help and documentation: accessible help where users need it.
17
+
18
+ ## Norman Interaction Principles
19
+
20
+ - Affordances: controls suggest what they do.
21
+ - Signifiers: labels, icons, shape, and placement communicate action.
22
+ - Feedback: every action has a visible, timely response.
23
+ - Mapping: control placement matches outcome.
24
+ - Constraints: the UI prevents impossible or dangerous actions.
25
+ - Conceptual model: users can predict what happens next.
26
+
27
+ ## Practical Cognitive Rules
28
+
29
+ - Reduce cognitive load with grouping, defaults, progressive disclosure, and plain language.
30
+ - Prefer recognition over memory.
31
+ - Use Fitts's Law pragmatically: important targets should be large and easy to reach.
32
+ - Use Hick's Law pragmatically: too many equal choices slow decisions.
33
+ - Use serial position: important actions belong at memorable start/end positions.
34
+ - Avoid change blindness by making important changes explicit.
35
+
36
+ ## Severity Rating
37
+
38
+ Rate each issue:
39
+
40
+ - Critical: blocks task, causes data loss, legal/security/accessibility failure, or deceptive outcome.
41
+ - High: many users fail or require support; severe accessibility or conversion issue.
42
+ - Medium: creates confusion, delay, avoidable errors, or inconsistent behavior.
43
+ - Low: polish issue that reduces confidence but does not block completion.
44
+
45
+ ## Heuristic Review Output
46
+
47
+ For each finding include:
48
+
49
+ - Location.
50
+ - Violated heuristic.
51
+ - Evidence or rationale.
52
+ - Severity.
53
+ - User impact.
54
+ - Recommended fix.
55
+ - Acceptance criteria.
56
+
57
+ ## Common Agent Fixes
58
+
59
+ - Add one primary CTA and demote secondary actions.
60
+ - Add clear loading, empty, error, success, and permission states.
61
+ - Replace vague labels with task-oriented labels.
62
+ - Add undo or confirmation for destructive actions.
63
+ - Preserve form data after errors.
64
+ - Make current location and next best action obvious.
65
+ - Use consistent component variants, spacing, and terminology.
@@ -0,0 +1,58 @@
1
+ # UX Measurement and Quality Gates
2
+
3
+ Use this reference to make UX measurable and deployment-ready.
4
+
5
+ ## Metric Selection
6
+
7
+ Choose metrics based on goal:
8
+
9
+ - Task completion: success rate, error rate, time on task, support contact rate.
10
+ - Conversion: CTA click-through, signup completion, checkout completion, qualified leads.
11
+ - Activation: first successful action, onboarding completion, time to value.
12
+ - Retention: repeat usage, feature adoption, churn, saved work, returning users.
13
+ - Comprehension: first-click success, content comprehension, reduced confusion/support.
14
+ - Trust/safety: consent comprehension, refund/cancel success, security perception, complaint rate.
15
+ - Accessibility: WCAG 2.2 AA pass, keyboard completion, screen-reader smoke test.
16
+ - Performance perception: Core Web Vitals, skeleton stability, perceived latency, no layout shift.
17
+
18
+ ## Common UX Measures
19
+
20
+ - Task success rate.
21
+ - Time on task.
22
+ - Error rate.
23
+ - System Usability Scale (SUS).
24
+ - Single Ease Question (SEQ).
25
+ - UMUX-Lite.
26
+ - HEART: Happiness, Engagement, Adoption, Retention, Task success.
27
+ - Funnel/drop-off by step.
28
+ - Qualitative severity themes.
29
+
30
+ ## Quality Gate Template
31
+
32
+ A UI/UX deliverable is ready only when:
33
+
34
+ - Primary task and success metric are explicit.
35
+ - All required states exist: loading, empty, error, success, disabled, permission, offline if relevant.
36
+ - WCAG 2.2 AA acceptance criteria are listed.
37
+ - Responsive behavior is specified for mobile, tablet, desktop, and wide.
38
+ - Component states and tokens are documented.
39
+ - Content is final enough to implement or flagged as placeholder.
40
+ - Analytics events are named for key decisions and outcomes.
41
+ - Risks, assumptions, and validation plan are documented.
42
+
43
+ ## Frontend Performance Gates
44
+
45
+ For web implementation, aim for:
46
+
47
+ - No avoidable layout shift in core flows.
48
+ - Interactive controls respond immediately or show progress.
49
+ - Images are sized and lazy-loaded appropriately.
50
+ - Critical flows work on low-end mobile and slow network where relevant.
51
+ - Errors are recoverable without data loss.
52
+
53
+ ## Experimentation Guardrails
54
+
55
+ - Define hypothesis before A/B tests.
56
+ - Do not optimize conversion with dark patterns.
57
+ - Track guardrail metrics such as refunds, complaints, accessibility, support load, and retention.
58
+ - Avoid declaring success from underpowered or biased data.
@@ -0,0 +1,99 @@
1
+ # UX Research Methods for Agents
2
+
3
+ Use this reference when a UI/UX task requires evidence, discovery, validation, or uncertainty reduction. Research output must distinguish observed evidence from assumptions.
4
+
5
+ ## Source-Grounded Baseline
6
+
7
+ Align research work with these authoritative bodies of knowledge:
8
+
9
+ - Nielsen Norman Group UX research guidance and UX Research Cheat Sheet.
10
+ - GOV.UK Service Manual user research practices.
11
+ - ISO 9241-210 human-centred design and ISO 9241-11 usability definitions.
12
+ - Interaction Design Foundation UX research and human-computer interaction learning materials.
13
+ - W3C/WAI accessibility research and testing guidance when users include disabled people.
14
+
15
+ ## Research Decision Tree
16
+
17
+ 1. If the problem, audience, or jobs are unclear: use stakeholder interviews, user interviews, analytics/support review, and competitive scan.
18
+ 2. If users cannot find things: use IA audit, card sorting, tree testing, search-log review, first-click testing.
19
+ 3. If a flow is confusing: use task analysis, usability testing, cognitive walkthrough, funnel/drop-off review.
20
+ 4. If copy or labels are unclear: use comprehension testing, preference testing, plain-language review.
21
+ 5. If accessibility risk exists: use WCAG audit, keyboard testing, screen-reader smoke test, disabled-user research where possible.
22
+ 6. If launching high-risk health, finance, minors, legal, or safety UX: require consent, privacy, ethics review, and human expert review.
23
+
24
+ ## Research Plan Template
25
+
26
+ - Research goal: what decision will this inform?
27
+ - Known facts: evidence already available.
28
+ - Assumptions: what may be wrong.
29
+ - Participants/users: segment, criteria, exclusions.
30
+ - Method: interview, survey, contextual inquiry, diary, usability test, analytics, card sort, tree test, heuristic review.
31
+ - Tasks/questions: neutral, non-leading prompts.
32
+ - Consent/privacy: what data is collected and how it is handled.
33
+ - Success metrics: task success, time on task, error rate, confidence, SEQ, SUS, qualitative themes.
34
+ - Output: findings, evidence, confidence, design implications.
35
+
36
+ ## Core Methods
37
+
38
+ ### Stakeholder Interview
39
+ Use to learn business goals, constraints, risks, and internal assumptions. Do not treat stakeholder opinion as user evidence.
40
+
41
+ ### User Interview
42
+ Use for goals, motivations, workflows, language, pains, trust concerns. Ask about past behavior, not hypothetical preferences.
43
+
44
+ ### Contextual Inquiry
45
+ Observe users in their real environment. Capture tools, interruptions, workarounds, handoffs, data sources, and failure recovery.
46
+
47
+ ### Survey
48
+ Use for quantifying known questions with enough respondents. Avoid using surveys to discover unknown needs without qualitative follow-up.
49
+
50
+ ### Diary Study
51
+ Use for repeated behavior over time: habits, emotional changes, frequency, reminders, retention, and lifecycle journeys.
52
+
53
+ ### Competitive and Comparative Analysis
54
+ Compare task models, IA, copy, trust signals, onboarding, pricing, checkout, and accessibility. Extract patterns; do not copy UI.
55
+
56
+ ### Analytics and Support Synthesis
57
+ Review search terms, funnel drop-off, rage clicks, error logs, support tickets, chat transcripts, refunds, cancellations, and feature requests.
58
+
59
+ ### Task Analysis
60
+ Break a task into trigger, user intent, decisions, inputs, system responses, success criteria, and recovery path.
61
+
62
+ ### Card Sorting
63
+ Use open card sorting to discover grouping models and closed card sorting to test existing taxonomy.
64
+
65
+ ### Tree Testing
66
+ Test whether labels and hierarchy help users find content before investing in visual design.
67
+
68
+ ### First-Click Testing
69
+ Validate whether the first click or tap points users toward success.
70
+
71
+ ### Usability Testing
72
+ Test realistic tasks with representative users. Capture success, errors, confusion, workarounds, comments, confidence, and severity.
73
+
74
+ ## Evidence Confidence Levels
75
+
76
+ - High: repeated findings across representative users or triangulated quantitative + qualitative evidence.
77
+ - Medium: consistent evidence from limited research, analytics, or expert review.
78
+ - Low: plausible assumption, stakeholder opinion, synthetic user model, or single observation.
79
+
80
+ Label low-confidence findings as assumptions and recommend validation.
81
+
82
+ ## Research Ethics
83
+
84
+ - Get consent before recording or collecting personal data.
85
+ - Minimize data collection.
86
+ - Avoid manipulative tasks and leading questions.
87
+ - Do not invent user quotes or claim research was performed when it was not.
88
+ - Protect vulnerable users and sensitive domains.
89
+ - Mark AI-generated personas or journeys as synthetic assumptions.
90
+
91
+ ## Deliverables
92
+
93
+ - Research plan.
94
+ - Interview or test script.
95
+ - Recruiting screener.
96
+ - Findings table: finding, evidence, confidence, impact, recommendation.
97
+ - Persona/proto-persona or JTBD if useful.
98
+ - Journey map or service blueprint if useful.
99
+ - Design changes and validation plan.
@@ -0,0 +1,85 @@
1
+ # WCAG 2.2 AA Quick Reference for Agents
2
+
3
+ This is a practical accessibility reference for UI/UX work. Treat WCAG 2.2 AA as the default minimum unless the user specifies another standard.
4
+
5
+ ## Core Principles
6
+
7
+ 1. Perceivable: users can perceive content.
8
+ 2. Operable: users can operate controls.
9
+ 3. Understandable: users can understand interface and content.
10
+ 4. Robust: content works with assistive technology.
11
+
12
+ ## Contrast
13
+
14
+ - Normal text: at least 4.5:1.
15
+ - Large text: at least 3:1.
16
+ - UI components and graphical objects: at least 3:1.
17
+ - Do not use color as the only way to communicate status.
18
+
19
+ ## Keyboard
20
+
21
+ - All interactive controls must be reachable by keyboard.
22
+ - Focus order must follow the visual/task order.
23
+ - Focus indicator must be visible and high contrast.
24
+ - No keyboard trap unless there is an obvious escape method.
25
+ - Modals must trap focus while open and return focus when closed.
26
+
27
+ ## Semantic Structure
28
+
29
+ - Use real buttons for actions and links for navigation.
30
+ - Use headings in logical order.
31
+ - Use lists, tables, labels, fieldsets, and landmarks semantically.
32
+ - Use ARIA only when native HTML cannot express the behavior.
33
+ - If ARIA is used, names, roles, values, and states must be correct.
34
+
35
+ ## Forms
36
+
37
+ - Every input needs a programmatically associated label.
38
+ - Required fields must be clear.
39
+ - Error messages must identify the field and explain the fix.
40
+ - Do not rely only on placeholder text.
41
+ - Use autocomplete attributes when helpful.
42
+ - Use fieldsets/legends for grouped radio/checkbox inputs.
43
+
44
+ ## Motion and Timing
45
+
46
+ - Respect prefers-reduced-motion.
47
+ - Avoid flashing content.
48
+ - Give users control over time limits where relevant.
49
+ - Animation should support orientation, feedback, or continuity, not distract.
50
+
51
+ ## Images and Media
52
+
53
+ - Informative images need alt text.
54
+ - Decorative images should be hidden from assistive technology.
55
+ - Icons used as buttons need accessible labels.
56
+ - Videos need captions; audio-only content needs transcript when relevant.
57
+
58
+ ## Touch and Pointer
59
+
60
+ - Aim for 44x44 px touch targets.
61
+ - Do not require complex gestures without alternatives.
62
+ - Hover-only content must also work on focus/tap.
63
+
64
+ ## Common Agent Fixes
65
+
66
+ - Add visible labels instead of placeholder-only fields.
67
+ - Replace clickable divs with buttons or links.
68
+ - Add focus states to custom components.
69
+ - Add aria-expanded and aria-controls to disclosure controls.
70
+ - Add aria-current to current nav item.
71
+ - Add aria-live polite for async success/status updates.
72
+ - Add role="alert" or associated error text for validation errors.
73
+ - Ensure disabled controls have explanation if their disabled reason is not obvious.
74
+
75
+ ## Accessibility Acceptance Criteria
76
+
77
+ For final handoff, include:
78
+
79
+ - Keyboard path for all major tasks.
80
+ - Focus behavior for modals, drawers, menus, popovers.
81
+ - Contrast requirement for text and UI elements.
82
+ - Screen reader labels for icon-only controls.
83
+ - Error association for forms.
84
+ - Reduced-motion behavior.
85
+ - Touch target requirements.
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env python3
2
+ from pathlib import Path
3
+ import shutil
4
+ import subprocess
5
+ import sys
6
+ import tempfile
7
+ import zipfile
8
+
9
+ src = Path(__file__).resolve().parents[1]
10
+ out = src.parent / "ui-ux-master-deployment.zip"
11
+ if out.exists():
12
+ out.unlink()
13
+ exclude_dirs = {".git", "graphify-out", "__pycache__", "node_modules", "coverage", ".nyc_output"}
14
+ exclude_suffixes = {".pyc", ".tgz"}
15
+ exclude_names = {"npm-debug.log"}
16
+
17
+ with zipfile.ZipFile(out, "w", zipfile.ZIP_DEFLATED) as z:
18
+ for path in src.rglob("*"):
19
+ rel = path.relative_to(src)
20
+ if set(rel.parts) & exclude_dirs:
21
+ continue
22
+ if path.suffix in exclude_suffixes:
23
+ continue
24
+ if path.name in exclude_names or path.name.startswith("npm-debug.log"):
25
+ continue
26
+ if path.is_file():
27
+ z.write(path, Path("ui-ux-master") / rel)
28
+
29
+ print(out)
30
+ with tempfile.TemporaryDirectory() as td:
31
+ with zipfile.ZipFile(out) as z:
32
+ z.extractall(td)
33
+ pkg = Path(td) / "ui-ux-master"
34
+ res = subprocess.run(
35
+ [sys.executable, "scripts/validate_skill.py", "--release"],
36
+ cwd=pkg,
37
+ text=True,
38
+ stdout=subprocess.PIPE,
39
+ stderr=subprocess.STDOUT,
40
+ )
41
+ print(res.stdout)
42
+ raise SystemExit(res.returncode)