agy-superpowers 5.1.1 → 5.1.3

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 (54) hide show
  1. package/README.md +22 -2
  2. package/package.json +1 -1
  3. package/template/agent/.shared/mobile-uiux-promax/data/accessibility.csv +25 -0
  4. package/template/agent/.shared/mobile-uiux-promax/data/animation.csv +22 -0
  5. package/template/agent/.shared/mobile-uiux-promax/data/components.csv +21 -0
  6. package/template/agent/.shared/mobile-uiux-promax/data/gestures.csv +26 -0
  7. package/template/agent/.shared/mobile-uiux-promax/data/layout.csv +21 -0
  8. package/template/agent/.shared/mobile-uiux-promax/data/navigation.csv +27 -0
  9. package/template/agent/.shared/mobile-uiux-promax/data/onboarding.csv +17 -0
  10. package/template/agent/.shared/mobile-uiux-promax/data/platform.csv +22 -0
  11. package/template/agent/.shared/mobile-uiux-promax/data/stacks/flutter.csv +19 -0
  12. package/template/agent/.shared/mobile-uiux-promax/data/stacks/jetpack-compose.csv +18 -0
  13. package/template/agent/.shared/mobile-uiux-promax/data/stacks/react-native.csv +20 -0
  14. package/template/agent/.shared/mobile-uiux-promax/data/stacks/swiftui.csv +18 -0
  15. package/template/agent/.shared/mobile-uiux-promax/data/ux-laws.csv +16 -0
  16. package/template/agent/.shared/mobile-uiux-promax/scripts/mobile-search.py +157 -0
  17. package/template/agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
  18. package/template/agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
  19. package/template/agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
  20. package/template/agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
  21. package/template/agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
  22. package/template/agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  23. package/template/agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  24. package/template/agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  25. package/template/agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  26. package/template/agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
  27. package/template/agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  28. package/template/agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  29. package/template/agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  30. package/template/agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
  31. package/template/agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
  32. package/template/agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  33. package/template/agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  34. package/template/agent/.shared/ui-ux-pro-max/scripts/core.py +236 -0
  35. package/template/agent/.shared/ui-ux-pro-max/scripts/search.py +61 -0
  36. package/template/agent/.tests/TESTS.md +119 -0
  37. package/template/agent/.tests/mobile-uiux-promax/test_search.py +266 -0
  38. package/template/agent/.tests/run_tests.py +86 -0
  39. package/template/agent/patches/skills-patches.md +20 -0
  40. package/template/agent/skills/brainstorming/SKILL.md +57 -0
  41. package/template/agent/skills/frontend-design/SKILL.md +147 -0
  42. package/template/agent/skills/frontend-design/reference/color-and-contrast.md +117 -0
  43. package/template/agent/skills/frontend-design/reference/interaction-design.md +159 -0
  44. package/template/agent/skills/frontend-design/reference/motion-design.md +150 -0
  45. package/template/agent/skills/frontend-design/reference/responsive-design.md +161 -0
  46. package/template/agent/skills/frontend-design/reference/spatial-design.md +122 -0
  47. package/template/agent/skills/frontend-design/reference/typography.md +124 -0
  48. package/template/agent/skills/frontend-design/reference/ux-writing.md +127 -0
  49. package/template/agent/skills/mobile-uiux-promax/SKILL.md +139 -0
  50. package/template/agent/skills/subagent-driven-development/implementer-prompt.md +4 -1
  51. package/template/agent/skills/verification-before-completion/SKILL.md +11 -0
  52. package/template/agent/skills/writing-plans/SKILL.md +4 -1
  53. package/template/agent/workflows/mobile-uiux-promax.md +137 -0
  54. package/template/agent/workflows/ui-ux-pro-max.md +231 -0
@@ -0,0 +1,266 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Comprehensive test suite for mobile-search.py
4
+ Tests all 9 domains, 4 stacks, edge cases, and data integrity.
5
+ """
6
+ import subprocess
7
+ import sys
8
+ import csv
9
+ from pathlib import Path
10
+
11
+ # Project root: 3 levels up (.agent/.tests/<skill>/test_*.py → project root)
12
+ BASE = str(Path(__file__).resolve().parents[3])
13
+ SCRIPT = f"{BASE}/.agent/.shared/mobile-uiux-promax/scripts/mobile-search.py"
14
+ DATA_DIR = f"{BASE}/.agent/.shared/mobile-uiux-promax/data"
15
+
16
+ passed = []
17
+ failed = []
18
+
19
+
20
+ def run(query, flag, target, n=3):
21
+ return subprocess.run(
22
+ ["python3", SCRIPT, query, flag, target, "-n", str(n)],
23
+ capture_output=True, text=True, cwd=BASE
24
+ )
25
+
26
+
27
+ def check(label, output, expected_kw, returncode=0):
28
+ ok_code = (output.returncode == returncode)
29
+ all_output = output.stdout + output.stderr
30
+ ok_kw = expected_kw.lower() in all_output.lower() if expected_kw else True
31
+ ok = ok_code and ok_kw
32
+ if ok:
33
+ passed.append(label)
34
+ print(f" ✅ {label}")
35
+ else:
36
+ failed.append(label)
37
+ reasons = []
38
+ if not ok_code:
39
+ reasons.append(f"returncode={output.returncode} (expected {returncode})")
40
+ if not ok_kw:
41
+ reasons.append(f"keyword '{expected_kw}' not found")
42
+ print(f" ❌ {label}")
43
+ for r in reasons:
44
+ print(f" → {r}")
45
+ print(f" → stdout[:300]: {output.stdout[:300]!r}")
46
+
47
+
48
+ # ═══════════════════════════════════════════════════════════
49
+ # GROUP 1: Navigation domain
50
+ # ═══════════════════════════════════════════════════════════
51
+ print("\n📍 GROUP 1: Navigation domain")
52
+ check("tab bar primary sections", run("bottom tab bar primary sections", "--domain", "navigation"), "Tab Bar")
53
+ check("hamburger discoverability", run("hamburger hidden navigation discoverability", "--domain", "navigation"), "discoverability")
54
+ check("thumb zone ergonomics", run("thumb zone one handed ergonomics bottom", "--domain", "navigation"), "Thumb")
55
+ check("drawer sidebar menu", run("drawer sidebar menu hamburger secondary", "--domain", "navigation"), "Drawer")
56
+ check("modal full screen overlay", run("modal full screen immersive camera auth", "--domain", "navigation"), "Modal")
57
+ check("bottom sheet partial", run("bottom sheet action partial overlay", "--domain", "navigation"), "Bottom Sheet")
58
+ check("deep link universal", run("deep link universal link routing url", "--domain", "navigation"), "Deep Link")
59
+ check("back navigation ios swipe", run("back navigation ios swipe gesture return", "--domain", "navigation"), "Back")
60
+
61
+ # ═══════════════════════════════════════════════════════════
62
+ # GROUP 2: Gestures domain
63
+ # ═══════════════════════════════════════════════════════════
64
+ print("\n📍 GROUP 2: Gestures domain")
65
+ check("swipe back ios edge", run("swipe back dismiss ios edge left", "--domain", "gestures"), "Swipe")
66
+ check("pinch zoom two finger", run("pinch zoom scale two finger gesture", "--domain", "gestures"), "Pinch")
67
+ check("long press context menu", run("long press hold context menu action", "--domain", "gestures"), "Long")
68
+ check("pull to refresh scroll", run("pull to refresh scroll top reload", "--domain", "gestures"), "Pull")
69
+ check("double tap zoom toggle", run("double tap zoom toggle like", "--domain", "gestures"), "Double")
70
+
71
+ # ═══════════════════════════════════════════════════════════
72
+ # GROUP 3: Components domain
73
+ # ═══════════════════════════════════════════════════════════
74
+ print("\n📍 GROUP 3: Components domain")
75
+ check("bottom sheet component", run("bottom sheet modal partial screen", "--domain", "components"), "Bottom Sheet")
76
+ check("FAB floating action button", run("floating action button primary create", "--domain", "components"), "FAB")
77
+ check("skeleton loading shimmer", run("skeleton loading placeholder shimmer", "--domain", "components"), "Skeleton")
78
+ check("snackbar toast feedback", run("snackbar toast feedback notification", "--domain", "components"), "Snackbar")
79
+ check("chip filter tag", run("chip filter tag selection category", "--domain", "components"), "Chip")
80
+
81
+ # ═══════════════════════════════════════════════════════════
82
+ # GROUP 4: Layout domain
83
+ # ═══════════════════════════════════════════════════════════
84
+ print("\n📍 GROUP 4: Layout domain")
85
+ check("safe area notch inset", run("safe area notch inset dynamic island", "--domain", "layout"), "Safe Area")
86
+ check("touch target 44pt 48dp", run("touch target minimum size 44pt 48dp", "--domain", "layout"), "44")
87
+ check("thumb zone bottom reach", run("thumb zone reachability bottom reach", "--domain", "layout"), "Thumb")
88
+ check("keyboard avoidance input", run("keyboard avoidance input scroll TextField", "--domain", "layout"), "Keyboard")
89
+ check("spacing design system 8pt", run("spacing 8pt grid system padding margin", "--domain", "layout"), "8")
90
+
91
+ # ═══════════════════════════════════════════════════════════
92
+ # GROUP 5: Platform domain
93
+ # ═══════════════════════════════════════════════════════════
94
+ print("\n📍 GROUP 5: Platform domain")
95
+ check("dark mode system appearance", run("dark mode night system appearance adaptive", "--domain", "platform"), "Dark Mode")
96
+ check("haptic feedback vibration", run("haptic feedback vibration taptic engine", "--domain", "platform"), "Haptic")
97
+ check("typography font system", run("typography font ios android system native", "--domain", "platform"), "Typography")
98
+ check("navigation ios android diff", run("navigation back button ios android differ", "--domain", "platform"), "Navigation")
99
+ check("status bar appearance", run("status bar color tint appearance", "--domain", "platform"), "Status Bar")
100
+
101
+ # ═══════════════════════════════════════════════════════════
102
+ # GROUP 6: Onboarding domain
103
+ # ═══════════════════════════════════════════════════════════
104
+ print("\n📍 GROUP 6: Onboarding domain")
105
+ check("permission priming camera", run("permission priming rationale camera notification", "--domain", "onboarding"), "Permission")
106
+ check("paywall timing subscription", run("paywall timing subscription trial premium", "--domain", "onboarding"), "Paywall")
107
+ check("sign in apple social", run("sign in with apple social login auth", "--domain", "onboarding"), "Sign in with Apple")
108
+ check("value proposition screen", run("value proposition benefit feature showcase", "--domain", "onboarding"), "Value")
109
+ check("progress step indicator", run("onboarding step indicator progress multi", "--domain", "onboarding"), "Step")
110
+
111
+ # ═══════════════════════════════════════════════════════════
112
+ # GROUP 7: Animation domain
113
+ # ═══════════════════════════════════════════════════════════
114
+ print("\n📍 GROUP 7: Animation domain")
115
+ check("spring animation modal", run("spring animation modal sheet natural", "--domain", "animation"), "Spring")
116
+ check("skeleton shimmer loading", run("skeleton shimmer loading placeholder animation", "--domain", "animation"), "Shimmer")
117
+ check("reduce motion accessibility", run("reduce motion accessibility preference disable", "--domain", "animation"), "Reduce")
118
+ check("page transition navigation", run("page transition navigation push slide", "--domain", "animation"), "Transition")
119
+ check("haptic sync animation", run("haptic feedback sync animation success", "--domain", "animation"), "Haptic")
120
+
121
+ # ═══════════════════════════════════════════════════════════
122
+ # GROUP 8: Accessibility domain
123
+ # ═══════════════════════════════════════════════════════════
124
+ print("\n📍 GROUP 8: Accessibility domain")
125
+ check("touch target 44pt minimum", run("touch target size minimum 44pt", "--domain", "accessibility"), "Touch Target")
126
+ check("screen reader label name", run("screen reader voiceover label accessible name", "--domain", "accessibility"), "Screen Reader")
127
+ check("view-tap asymmetry small", run("view tap asymmetry visible untappable small dot", "--domain", "accessibility"), "Asymmetry")
128
+ check("color contrast ratio 4.5:1", run("color contrast ratio 4.5 text background", "--domain", "accessibility"), "Contrast")
129
+ check("dynamic type font scaling", run("dynamic type font scaling text size large", "--domain", "accessibility"), "Dynamic Type")
130
+ check("NNGroup 1cm physical touch", run("NNGroup physical 1cm touch target research", "--domain", "accessibility"), "NNGroup")
131
+ check("coach mark single tip", run("coach mark single tip one at a time overlay", "--domain", "accessibility"), "Coach Mark")
132
+
133
+ # ═══════════════════════════════════════════════════════════
134
+ # GROUP 9: UX Laws domain
135
+ # ═══════════════════════════════════════════════════════════
136
+ print("\n📍 GROUP 9: UX Laws domain")
137
+ check("Fitts touch target size", run("touch target size placement distance primary", "--domain", "ux-laws"), "Fitts")
138
+ check("Hick choices decision time", run("choices menu options decision time complexity", "--domain", "ux-laws"), "Hick")
139
+ check("Jakob mental model familiar", run("mental model convention familiar platform", "--domain", "ux-laws"), "Jakob")
140
+ check("Goal-Gradient progress bar", run("progress steps completion motivation reward", "--domain", "ux-laws"), "Goal-Gradient")
141
+ check("Peak-End memorable delight", run("memorable experience delight success moment", "--domain", "ux-laws"), "Peak")
142
+ check("Doherty 400ms threshold", run("400ms response time loading feedback threshold", "--domain", "ux-laws"), "Doherty")
143
+ check("Miller 7 items memory", run("7 chunks working memory cognitive load limit", "--domain", "ux-laws"), "Miller")
144
+ check("Zeigarnik streak incomplete", run("streak incomplete task engagement retention", "--domain", "ux-laws"), "Zeigarnik")
145
+ check("Von Restorff standout color", run("standout highlight color accent primary call", "--domain", "ux-laws"), "Von Restorff")
146
+ check("Serial Position first last", run("first last item serial position memory recall", "--domain", "ux-laws"), "Serial Position")
147
+ check("Proximity grouping related", run("proximity grouping related elements spacing", "--domain", "ux-laws"), "Proximity")
148
+ check("Common Region card container",run("card container region visual grouping border", "--domain", "ux-laws"), "Common Region")
149
+ check("Paradox coach mark tutorial", run("tutorial coach mark skip learn by doing", "--domain", "ux-laws"), "Paradox")
150
+
151
+ # ═══════════════════════════════════════════════════════════
152
+ # GROUP 10: Stack — React Native
153
+ # ═══════════════════════════════════════════════════════════
154
+ print("\n📍 GROUP 10: Stack — React Native")
155
+ check("FlatList performance", run("FlatList list performance rendering key", "--stack", "react-native"), "FlatList")
156
+ check("Reanimated animations", run("Reanimated animation gesture performant", "--stack", "react-native"), "Reanimated")
157
+ check("accessibilityLabel VoiceOver",run("accessibilityLabel accessible name VoiceOver", "--stack", "react-native"), "accessibilityLabel")
158
+ check("Metro bundler fast refresh", run("Metro bundler fast refresh hot reload", "--stack", "react-native"), "Metro")
159
+
160
+ # ═══════════════════════════════════════════════════════════
161
+ # GROUP 11: Stack — Flutter
162
+ # ═══════════════════════════════════════════════════════════
163
+ print("\n📍 GROUP 11: Stack — Flutter")
164
+ check("GoRouter navigation", run("GoRouter routing navigation deep link", "--stack", "flutter"), "GoRouter")
165
+ check("ListView.builder lazy", run("ListView builder lazy performance list", "--stack", "flutter"), "ListView")
166
+ check("Riverpod state management", run("Riverpod state management provider", "--stack", "flutter"), "Riverpod")
167
+ check("MediaQuery safe area", run("MediaQuery safe area padding inset", "--stack", "flutter"), "MediaQuery")
168
+
169
+ # ═══════════════════════════════════════════════════════════
170
+ # GROUP 12: Stack — SwiftUI
171
+ # ═══════════════════════════════════════════════════════════
172
+ print("\n📍 GROUP 12: Stack — SwiftUI")
173
+ check("NavigationStack push view", run("NavigationStack navigation push screen iOS", "--stack", "swiftui"), "NavigationStack")
174
+ check("@StateObject ViewModel", run("StateObject ViewModel lifecycle init", "--stack", "swiftui"), "StateObject")
175
+ check("reduce motion isReduceMotion",run("reduce motion isReduceMotionEnabled animation", "--stack", "swiftui"), "reduceMotion")
176
+ check("task modifier async load", run("task async await data loading onAppear", "--stack", "swiftui"), "task")
177
+
178
+ # ═══════════════════════════════════════════════════════════
179
+ # GROUP 13: Stack — Jetpack Compose
180
+ # ═══════════════════════════════════════════════════════════
181
+ print("\n📍 GROUP 13: Stack — Jetpack Compose")
182
+ check("LazyColumn list performance", run("LazyColumn list performance lazy scroll", "--stack", "jetpack-compose"), "LazyColumn")
183
+ check("sealed UiState data class", run("sealed class UiState loading error success", "--stack", "jetpack-compose"), "sealed")
184
+ check("WindowInsets edge-to-edge", run("WindowInsets edge to edge insets system bar", "--stack", "jetpack-compose"), "WindowInsets")
185
+ check("remember derivedStateOf", run("remember derivedStateOf state performance recomposition", "--stack", "jetpack-compose"), "derivedStateOf")
186
+
187
+ # ═══════════════════════════════════════════════════════════
188
+ # GROUP 14: Edge Cases
189
+ # ═══════════════════════════════════════════════════════════
190
+ print("\n📍 GROUP 14: Edge Cases")
191
+
192
+ # -n flag returns correct count
193
+ r = run("navigation tab bottom bar", "--domain", "navigation", n=5)
194
+ count = r.stdout.count("### Result")
195
+ ok = count == 5
196
+ (passed if ok else failed).append("navigation: -n 5 returns 5 results")
197
+ print(f" {'✅' if ok else '❌'} -n 5 flag returns 5 results (got {count})")
198
+
199
+ # invalid domain → non-zero exit
200
+ r_bad = subprocess.run(["python3", SCRIPT, "test", "--domain", "foobar"],
201
+ capture_output=True, text=True, cwd=BASE)
202
+ check("invalid domain → error exit", r_bad, None, returncode=2)
203
+
204
+ # invalid stack → non-zero exit
205
+ r_bad2 = subprocess.run(["python3", SCRIPT, "test", "--stack", "xamarin"],
206
+ capture_output=True, text=True, cwd=BASE)
207
+ check("invalid stack → error exit", r_bad2, None, returncode=2)
208
+
209
+ # no flag → non-zero exit
210
+ r_bad3 = subprocess.run(["python3", SCRIPT, "hello"],
211
+ capture_output=True, text=True, cwd=BASE)
212
+ check("no --domain/--stack → error", r_bad3, None, returncode=2)
213
+
214
+ # zero results for nonsense query → "No results" message
215
+ r_zero = run("xyzxyzxyz_gibberish_asdfqwer", "--domain", "navigation")
216
+ check("gibberish query → no crash", r_zero, "results", returncode=0)
217
+
218
+ # ═══════════════════════════════════════════════════════════
219
+ # GROUP 15: Data Integrity
220
+ # ═══════════════════════════════════════════════════════════
221
+ print("\n📍 GROUP 15: Data Integrity (row counts)")
222
+
223
+ expected_min_rows = {
224
+ "navigation.csv": 20,
225
+ "gestures.csv": 20,
226
+ "components.csv": 15,
227
+ "layout.csv": 15,
228
+ "platform.csv": 15,
229
+ "onboarding.csv": 12,
230
+ "animation.csv": 15,
231
+ "accessibility.csv": 20,
232
+ "ux-laws.csv": 12,
233
+ "stacks/react-native.csv": 15,
234
+ "stacks/flutter.csv": 15,
235
+ "stacks/swiftui.csv": 14,
236
+ "stacks/jetpack-compose.csv": 14,
237
+ }
238
+
239
+ for fname, min_rows in expected_min_rows.items():
240
+ fpath = Path(DATA_DIR) / fname
241
+ if not fpath.exists():
242
+ failed.append(f"file exists: {fname}")
243
+ print(f" ❌ file exists: {fname} → FILE MISSING")
244
+ continue
245
+ with open(fpath, encoding="utf-8") as f:
246
+ rows = list(csv.reader(f))
247
+ data_rows = len(rows) - 1 # minus header
248
+ ok = data_rows >= min_rows
249
+ (passed if ok else failed).append(f"row count: {fname}")
250
+ print(f" {'✅' if ok else '❌'} {fname}: {data_rows} rows (min {min_rows})")
251
+
252
+ # ═══════════════════════════════════════════════════════════
253
+ # FINAL REPORT
254
+ # ═══════════════════════════════════════════════════════════
255
+ total = len(passed) + len(failed)
256
+ pct = int(100 * len(passed) / total) if total else 0
257
+ print(f"\n{'═'*55}")
258
+ print(f" TOTAL TESTS : {total}")
259
+ print(f" PASSED : {len(passed)} ({pct}%)")
260
+ print(f" FAILED : {len(failed)}")
261
+ if failed:
262
+ print(f"\n ❌ FAILED TESTS:")
263
+ for f in failed:
264
+ print(f" - {f}")
265
+ print(f"{'═'*55}")
266
+ sys.exit(0 if not failed else 1)
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ .agent/.tests/run_tests.py
4
+ Auto-discover and run all test_*.py files for a given skill.
5
+
6
+ Usage:
7
+ python3 .agent/.tests/run_tests.py mobile-uiux-promax
8
+ python3 .agent/.tests/run_tests.py --all
9
+ """
10
+ import sys
11
+ import subprocess
12
+ from pathlib import Path
13
+
14
+ ROOT = Path(__file__).resolve().parent # .agent/.tests/
15
+
16
+
17
+ def run_suite(skill_name: str) -> tuple[int, int]:
18
+ """Run all test_*.py in .agent/.tests/<skill_name>/. Returns (passed_files, failed_files)."""
19
+ suite_dir = ROOT / skill_name
20
+ if not suite_dir.exists():
21
+ print(f" ⚠️ No test suite found for '{skill_name}' at {suite_dir}")
22
+ return 0, 0
23
+
24
+ test_files = sorted(suite_dir.glob("test_*.py"))
25
+ if not test_files:
26
+ print(f" ⚠️ No test_*.py files found in {suite_dir}")
27
+ return 0, 0
28
+
29
+ passed_files = 0
30
+ failed_files = 0
31
+
32
+ for tf in test_files:
33
+ print(f" → {tf.name}")
34
+ result = subprocess.run(
35
+ ["python3", str(tf)],
36
+ capture_output=False, # let output stream directly (verbose)
37
+ cwd=str(ROOT.parent.parent), # project root
38
+ )
39
+ if result.returncode == 0:
40
+ passed_files += 1
41
+ else:
42
+ failed_files += 1
43
+
44
+ return passed_files, failed_files
45
+
46
+
47
+ def main():
48
+ args = sys.argv[1:]
49
+
50
+ if not args:
51
+ print("Usage: python3 run_tests.py <skill-name> OR --all")
52
+ sys.exit(1)
53
+
54
+ if args[0] == "--all":
55
+ skills = [d.name for d in ROOT.iterdir() if d.is_dir() and not d.name.startswith(".")]
56
+ if not skills:
57
+ print("No test suites found.")
58
+ sys.exit(0)
59
+ else:
60
+ skills = [args[0]]
61
+
62
+ total_passed = total_failed = 0
63
+
64
+ for skill in skills:
65
+ print(f"\n🧪 Running tests for: {skill}")
66
+ p, f = run_suite(skill)
67
+ total_passed += p
68
+ total_failed += f
69
+
70
+ total = total_passed + total_failed
71
+ if total == 0:
72
+ print("\nNo test files executed.")
73
+ sys.exit(0)
74
+
75
+ print(f"\n{'═' * 55}")
76
+ if total_failed == 0:
77
+ print(f" ✅ ALL SUITES PASSED ({total_passed}/{total} files)")
78
+ else:
79
+ print(f" ❌ {total_failed} SUITE(S) FAILED ({total_passed}/{total} files passed)")
80
+ print(f"{'═' * 55}")
81
+
82
+ sys.exit(0 if total_failed == 0 else 1)
83
+
84
+
85
+ if __name__ == "__main__":
86
+ main()
@@ -72,3 +72,23 @@ inline comments). The code should work without platform-specific annotations.
72
72
  - If `auto_commit: false`: skip commit and staging entirely. Print: "Skipping commit (auto_commit: false in .agent/config.yml). Files left as modified for manual commit."
73
73
  Update any diagram labels that mention "commits" to reflect this conditionality
74
74
  (e.g. "commits (if auto_commit: true)").
75
+
76
+ ---
77
+
78
+ ## Patch: auto_commit flag — writing-plans task template
79
+
80
+ **File:** `writing-plans/SKILL.md`
81
+ **Intent:** Make the commit step in the plan task template conditional on `.agent/config.yml`:
82
+ - Step 5 should be titled "Commit (if auto_commit enabled)" instead of just "Commit"
83
+ - Before the `git add`/`git commit` block, add: Check `.agent/config.yml` for `auto_commit` setting
84
+ - If `auto_commit: true` (default): run the git add + git commit as normal
85
+ - If `auto_commit: false`: skip commit and staging. Print: "Skipping commit (auto_commit: false)."
86
+
87
+ ---
88
+
89
+ ## Patch: auto_commit flag — implementer-prompt
90
+
91
+ **File:** `subagent-driven-development/implementer-prompt.md`
92
+ **Intent:** Make the "Commit your work" step in the implementer's job list conditional:
93
+ - Change "4. Commit your work" to "4. Commit your work (if auto_commit is enabled)"
94
+ - Add sub-steps: read `.agent/config.yml`, if `auto_commit: true` (or not set): `git add` + `git commit`, if `auto_commit: false`: skip commit and staging entirely, print skip message.
@@ -25,6 +25,7 @@ You MUST create a task for each of these items and complete them in order:
25
25
  2. **Offer visual companion** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. See the Visual Companion section below.
26
26
  3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
27
27
  4. **Propose 2-3 approaches** — with trade-offs and your recommendation
28
+ - *UI/visual tasks only:* Before proposing, run `search.py` to gather style, typography, color, and UX data so proposals are grounded in real design patterns. See the [UI/UX Intelligence](#uiux-intelligence) section below.
28
29
  5. **Present design** — in sections scaled to their complexity, get user approval after each section
29
30
  6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
30
31
  7. **Spec review loop** — dispatch spec-document-reviewer subagent with precisely crafted review context (never your session history); fix issues and re-dispatch until approved (max 3 iterations, then surface to human)
@@ -86,6 +87,62 @@ digraph brainstorming {
86
87
  - Present options conversationally with your recommendation and reasoning
87
88
  - Lead with your recommended option and explain why
88
89
 
90
+ ## UI/UX Intelligence
91
+
92
+ **When the task involves any visual/UI work** (landing pages, dashboards, components, screens, design systems), run the UI/UX Pro Max search tool **before** presenting the design. This grounds your proposals in a curated knowledge base rather than generic defaults.
93
+
94
+ **How to trigger:**
95
+
96
+ ```bash
97
+ python3 .agent/.shared/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain>
98
+ ```
99
+
100
+ **Recommended search sequence** (run in parallel where possible):
101
+
102
+ | # | Domain | What to search | Example |
103
+ |---|--------|----------------|---------|
104
+ | 1 | `product` | Product type + industry | `"SaaS dashboard"`, `"beauty landing page"` |
105
+ | 2 | `style` | Desired visual style | `"glassmorphism dark"`, `"minimal clean"` |
106
+ | 3 | `typography` | Mood/personality | `"elegant modern"`, `"playful friendly"` |
107
+ | 4 | `color` | Industry or product type | `"fintech"`, `"healthcare"`, `"beauty spa"` |
108
+ | 5 | `landing` | Page structure type | `"hero-centric social-proof"` |
109
+ | 6 | `ux` | `"animation"`, `"accessibility"`, `"z-index"` | Always check these three |
110
+ | 7 | `stack` | Target framework | `--stack react-native`, `--stack flutter` |
111
+
112
+ **When to use each domain:**
113
+ - Always run `product` + `style` + `ux` as a baseline for any UI task
114
+ - Add `typography` + `color` when presenting a full design system
115
+ - Add `landing` only for marketing/landing pages
116
+ - Add `chart` only for analytics dashboards
117
+ - Use `--stack` flag to get implementation-specific patterns (e.g., `--stack react-native` for mobile)
118
+
119
+ **Synthesize results before presenting design:** Do not dump raw search output to the user. Summarize what you found and explain how it informs your design choices.
120
+
121
+ > **Skip this step** for purely backend, data-model, or logic-only tasks where no UI is involved.
122
+
123
+ ### Mobile UI/UX Intelligence (Extended Layer)
124
+
125
+ **When the request is for a mobile app** — detect keywords like: `iOS`, `Android`, `React Native`, `Flutter`, `SwiftUI`, `Jetpack Compose`, `mobile`, `app screen`, `native app` — run the **mobile-uiux-promax workflow** IN ADDITION to the web tool above.
126
+
127
+ Read the workflow file first: `.agent/workflows/mobile-uiux-promax.md`
128
+
129
+ The mobile workflow adds 3 more steps after the web style layer:
130
+
131
+ ```bash
132
+ # Step 2: Mobile behavior
133
+ python3 .agent/.shared/mobile-uiux-promax/scripts/mobile-search.py "<nav pattern>" --domain navigation
134
+ python3 .agent/.shared/mobile-uiux-promax/scripts/mobile-search.py "<component>" --domain components
135
+ python3 .agent/.shared/mobile-uiux-promax/scripts/mobile-search.py "<platform topic>" --domain platform
136
+ python3 .agent/.shared/mobile-uiux-promax/scripts/mobile-search.py "<animation>" --domain animation
137
+
138
+ # Step 3: Stack guidelines (react-native / flutter / swiftui / jetpack-compose)
139
+ python3 .agent/.shared/mobile-uiux-promax/scripts/mobile-search.py "<topic>" --stack react-native
140
+
141
+ # Step 4: Synthesize style + mobile behavior + stack patterns → present design
142
+ ```
143
+
144
+ Read and apply the mobile-uiux-promax skill: `.agent/skills/mobile-uiux-promax/SKILL.md`
145
+
89
146
  **Presenting the design:**
90
147
 
91
148
  - Once you believe you understand what you're building, present the design
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: frontend-design
3
+ description: Use when building web components, pages, artifacts, or applications — especially when high design quality is needed. Generates creative, polished code that avoids generic AI aesthetics (purple gradients, Inter font, card-in-card layouts).
4
+ ---
5
+
6
+ # Frontend Design
7
+
8
+ This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
9
+
10
+ ## Context Gathering Protocol
11
+
12
+ Design skills produce generic output without project context. Before doing any design work, confirm:
13
+
14
+ - **Target audience**: Who uses this product and in what context?
15
+ - **Use cases**: What jobs are they trying to get done?
16
+ - **Brand personality/tone**: How should the interface feel?
17
+
18
+ **Gathering order:**
19
+ 1. **Check current instructions**: If your loaded instructions contain a Design Context section, proceed immediately.
20
+ 2. **Check `.impeccable.md`**: If it exists in the project root and has context, use it.
21
+ 3. **Ask the user**: If neither source has context, ask these 3 questions before proceeding.
22
+
23
+ ---
24
+
25
+ ## Design Direction
26
+
27
+ Commit to a **BOLD** aesthetic direction before writing any code:
28
+
29
+ - **Purpose**: What problem does this interface solve? Who uses it?
30
+ - **Tone**: Pick an extreme — brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian
31
+ - **Differentiation**: What makes this UNFORGETTABLE? What's the one thing users remember?
32
+
33
+ **CRITICAL**: Choose a clear conceptual direction and execute with precision. Bold maximalism and refined minimalism both work — the key is **intentionality**, not intensity.
34
+
35
+ Implement working code that is:
36
+ - Production-grade and functional
37
+ - Visually striking and memorable
38
+ - Cohesive with a clear aesthetic point-of-view
39
+ - Meticulously refined in every detail
40
+
41
+ ---
42
+
43
+ ## Frontend Aesthetics Guidelines
44
+
45
+ ### Typography
46
+ → *See [typography reference](reference/typography.md) for scales, pairing, and loading strategies.*
47
+
48
+ Choose fonts that are beautiful, unique, and interesting. Pair a distinctive display font with a refined body font.
49
+
50
+ **DO**: Use a modular type scale with fluid sizing (`clamp()`)
51
+ **DO**: Vary font weights and sizes to create clear visual hierarchy
52
+ **DON'T**: Use overused fonts — Inter, Roboto, Arial, Open Sans, system defaults
53
+ **DON'T**: Use monospace typography as lazy shorthand for "technical/developer" vibes
54
+ **DON'T**: Put large icons with rounded corners above every heading
55
+
56
+ ### Color & Theme
57
+ → *See [color reference](reference/color-and-contrast.md) for OKLCH, palettes, and dark mode.*
58
+
59
+ **DO**: Use modern CSS color functions (`oklch`, `color-mix`, `light-dark()`) for perceptually uniform palettes
60
+ **DO**: Tint your neutrals toward your brand hue
61
+ **DON'T**: Use gray text on colored backgrounds — looks washed out; use a shade of the bg color instead
62
+ **DON'T**: Use pure black (`#000`) or pure white (`#fff`) — always tint
63
+ **DON'T**: Use the AI color palette: cyan-on-dark, purple-to-blue gradients, neon on dark
64
+ **DON'T**: Use gradient text for "impact" on metrics or headings
65
+ **DON'T**: Default to dark mode with glowing accents without real design decisions
66
+
67
+ ### Layout & Space
68
+ → *See [spatial reference](reference/spatial-design.md) for grids, rhythm, and container queries.*
69
+
70
+ **DO**: Create visual rhythm through varied spacing — tight groupings, generous separations
71
+ **DO**: Use fluid spacing with `clamp()` that breathes on larger screens
72
+ **DO**: Use asymmetry and unexpected compositions; break the grid intentionally
73
+ **DON'T**: Wrap everything in cards — not everything needs a container
74
+ **DON'T**: Nest cards inside cards — visual noise
75
+ **DON'T**: Use identical card grids (same-sized card with icon + heading + text, repeated)
76
+ **DON'T**: Center everything — left-aligned text with asymmetric layouts feels more designed
77
+ **DON'T**: Use the same spacing everywhere
78
+
79
+ ### Visual Details
80
+ **DO**: Use intentional, purposeful decorative elements that reinforce brand
81
+ **DON'T**: Use glassmorphism everywhere — blur/glass/glow as decoration rather than purpose
82
+ **DON'T**: Use rounded rectangles with generic drop shadows — forgettable
83
+ **DON'T**: Use sparklines as decoration
84
+ **DON'T**: Use modals unless there's truly no better alternative
85
+
86
+ ### Motion
87
+ → *See [motion reference](reference/motion-design.md) for timing, easing, and reduced motion.*
88
+
89
+ **DO**: Use motion to convey state changes — entrances, exits, feedback
90
+ **DO**: Use exponential easing (`ease-out-quart/quint/expo`) for natural deceleration
91
+ **DO**: For height animations, use `grid-template-rows` transitions instead of animating `height`
92
+ **DON'T**: Animate layout properties (width, height, padding, margin) — use `transform` and `opacity` only
93
+ **DON'T**: Use bounce or elastic easing — dated and tacky
94
+
95
+ ### Interaction
96
+ → *See [interaction reference](reference/interaction-design.md) for forms, focus, loading patterns.*
97
+
98
+ **DO**: Use progressive disclosure — start simple, reveal sophistication through interaction
99
+ **DO**: Design empty states that teach the interface, not just say "nothing here"
100
+ **DON'T**: Make every button primary — use ghost buttons, text links, secondary styles
101
+ **DON'T**: Repeat the same information redundantly
102
+
103
+ ### Responsive
104
+ → *See [responsive reference](reference/responsive-design.md) for mobile-first, fluid design.*
105
+
106
+ **DO**: Use container queries (`@container`) for component-level responsiveness
107
+ **DO**: Adapt the interface for different contexts — don't just shrink it
108
+ **DON'T**: Hide critical functionality on mobile
109
+
110
+ ### UX Writing
111
+ → *See [UX writing reference](reference/ux-writing.md) for labels, errors, and empty states.*
112
+
113
+ **DO**: Make every word earn its place
114
+ **DON'T**: Repeat information users can already see
115
+
116
+ ---
117
+
118
+ ## The AI Slop Test
119
+
120
+ **Critical quality check**: If you showed this interface to someone and said "AI made this," would they believe you immediately? If yes, that's the problem.
121
+
122
+ A distinctive interface should make someone ask "how was this made?" not "which AI made this?"
123
+
124
+ Review the DON'T guidelines above — they are the fingerprints of AI-generated work from 2024-2025.
125
+
126
+ ---
127
+
128
+ ## Implementation Principles
129
+
130
+ Match implementation complexity to the aesthetic vision:
131
+ - **Maximalist designs** → elaborate code, extensive animations, rich effects
132
+ - **Minimalist designs** → restraint, precision, careful spacing, subtle details
133
+
134
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. **No design should be the same.** Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices across generations.
135
+
136
+ ---
137
+
138
+ ## Quick Reference: What to Avoid
139
+
140
+ | Category | DON'T |
141
+ |----------|-------|
142
+ | **Fonts** | Inter, Roboto, Arial, Open Sans |
143
+ | **Colors** | Pure black/white, purple gradients, gray on color |
144
+ | **Layout** | Cards in cards, centered everything, identical grids |
145
+ | **Motion** | Bounce/elastic easing, animating height/width |
146
+ | **Visual** | Glassmorphism everywhere, gradient text, generic shadows |
147
+ | **Writing** | "OK", "Submit", redundant copy, vague errors |