qualia-framework 2.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 (261) hide show
  1. package/README.md +50 -0
  2. package/bin/cli.js +519 -0
  3. package/framework/agents/architecture-strategist.md +53 -0
  4. package/framework/agents/backend-agent.md +150 -0
  5. package/framework/agents/code-simplicity-reviewer.md +86 -0
  6. package/framework/agents/frontend-agent.md +111 -0
  7. package/framework/agents/kieran-typescript-reviewer.md +96 -0
  8. package/framework/agents/performance-oracle.md +111 -0
  9. package/framework/agents/qualia-codebase-mapper.md +760 -0
  10. package/framework/agents/qualia-debugger.md +1203 -0
  11. package/framework/agents/qualia-executor.md +881 -0
  12. package/framework/agents/qualia-integration-checker.md +423 -0
  13. package/framework/agents/qualia-phase-researcher.md +453 -0
  14. package/framework/agents/qualia-plan-checker.md +699 -0
  15. package/framework/agents/qualia-planner.md +1241 -0
  16. package/framework/agents/qualia-project-researcher.md +602 -0
  17. package/framework/agents/qualia-research-synthesizer.md +236 -0
  18. package/framework/agents/qualia-roadmapper.md +605 -0
  19. package/framework/agents/qualia-verifier.md +685 -0
  20. package/framework/agents/team-orchestrator.md +228 -0
  21. package/framework/agents/teams/full-stack-team.md +48 -0
  22. package/framework/agents/teams/optimize-team.md +53 -0
  23. package/framework/agents/teams/review-team.md +62 -0
  24. package/framework/agents/teams/ship-team.md +86 -0
  25. package/framework/agents/test-agent.md +182 -0
  26. package/framework/askpass.sh +2 -0
  27. package/framework/commands/design.md +53 -0
  28. package/framework/commands/quick-db.md +22 -0
  29. package/framework/config/retention.json +35 -0
  30. package/framework/core/PRINCIPLES.md +77 -0
  31. package/framework/hooks/auto-format.sh +45 -0
  32. package/framework/hooks/block-env-edit.sh +42 -0
  33. package/framework/hooks/branch-guard.sh +46 -0
  34. package/framework/hooks/confirm-delete.sh +56 -0
  35. package/framework/hooks/migration-validate.sh +68 -0
  36. package/framework/hooks/notification-speak.sh +15 -0
  37. package/framework/hooks/pre-commit.sh +80 -0
  38. package/framework/hooks/pre-compact.sh +55 -0
  39. package/framework/hooks/pre-deploy-gate.sh +151 -0
  40. package/framework/hooks/qualia-colors.sh +32 -0
  41. package/framework/hooks/retention-cleanup.sh +43 -0
  42. package/framework/hooks/save-session-state.sh +153 -0
  43. package/framework/hooks/session-context-loader.sh +28 -0
  44. package/framework/hooks/session-learn.sh +30 -0
  45. package/framework/knowledge/claudecode-bible.md +1384 -0
  46. package/framework/knowledge/client-prefs.md +22 -0
  47. package/framework/knowledge/common-fixes.md +25 -0
  48. package/framework/knowledge/deployment-map.md +35 -0
  49. package/framework/knowledge/email-signature.html +1 -0
  50. package/framework/knowledge/employees.md +8 -0
  51. package/framework/knowledge/learned-patterns.md +51 -0
  52. package/framework/knowledge/optimization-research-2026.md +137 -0
  53. package/framework/knowledge/qualia-context.md +67 -0
  54. package/framework/knowledge/supabase-patterns.md +50 -0
  55. package/framework/knowledge/voice-agent-patterns.md +46 -0
  56. package/framework/qualia-engine/VERSION +1 -0
  57. package/framework/qualia-engine/bin/qualia-tools.js +2160 -0
  58. package/framework/qualia-engine/bin/qualia-tools.test.js +1054 -0
  59. package/framework/qualia-engine/references/checkpoints.md +775 -0
  60. package/framework/qualia-engine/references/continuation-format.md +249 -0
  61. package/framework/qualia-engine/references/decimal-phase-calculation.md +65 -0
  62. package/framework/qualia-engine/references/design-quality.md +56 -0
  63. package/framework/qualia-engine/references/git-integration.md +254 -0
  64. package/framework/qualia-engine/references/git-planning-commit.md +50 -0
  65. package/framework/qualia-engine/references/model-profile-resolution.md +32 -0
  66. package/framework/qualia-engine/references/model-profiles.md +73 -0
  67. package/framework/qualia-engine/references/phase-argument-parsing.md +61 -0
  68. package/framework/qualia-engine/references/planning-config.md +195 -0
  69. package/framework/qualia-engine/references/questioning.md +141 -0
  70. package/framework/qualia-engine/references/tdd.md +263 -0
  71. package/framework/qualia-engine/references/ui-brand.md +160 -0
  72. package/framework/qualia-engine/references/verification-patterns.md +612 -0
  73. package/framework/qualia-engine/templates/DEBUG.md +159 -0
  74. package/framework/qualia-engine/templates/DESIGN.md +81 -0
  75. package/framework/qualia-engine/templates/UAT.md +247 -0
  76. package/framework/qualia-engine/templates/codebase/architecture.md +255 -0
  77. package/framework/qualia-engine/templates/codebase/concerns.md +310 -0
  78. package/framework/qualia-engine/templates/codebase/conventions.md +307 -0
  79. package/framework/qualia-engine/templates/codebase/integrations.md +280 -0
  80. package/framework/qualia-engine/templates/codebase/stack.md +186 -0
  81. package/framework/qualia-engine/templates/codebase/structure.md +285 -0
  82. package/framework/qualia-engine/templates/codebase/testing.md +480 -0
  83. package/framework/qualia-engine/templates/config.json +35 -0
  84. package/framework/qualia-engine/templates/context.md +283 -0
  85. package/framework/qualia-engine/templates/continue-here.md +78 -0
  86. package/framework/qualia-engine/templates/debug-subagent-prompt.md +91 -0
  87. package/framework/qualia-engine/templates/discovery.md +146 -0
  88. package/framework/qualia-engine/templates/milestone-archive.md +123 -0
  89. package/framework/qualia-engine/templates/milestone.md +115 -0
  90. package/framework/qualia-engine/templates/phase-prompt.md +567 -0
  91. package/framework/qualia-engine/templates/planner-subagent-prompt.md +117 -0
  92. package/framework/qualia-engine/templates/project.md +184 -0
  93. package/framework/qualia-engine/templates/projects/ai-agent.md +156 -0
  94. package/framework/qualia-engine/templates/projects/mobile-app.md +181 -0
  95. package/framework/qualia-engine/templates/projects/voice-agent.md +134 -0
  96. package/framework/qualia-engine/templates/projects/website.md +137 -0
  97. package/framework/qualia-engine/templates/requirements.md +231 -0
  98. package/framework/qualia-engine/templates/research-project/ARCHITECTURE.md +204 -0
  99. package/framework/qualia-engine/templates/research-project/FEATURES.md +147 -0
  100. package/framework/qualia-engine/templates/research-project/PITFALLS.md +200 -0
  101. package/framework/qualia-engine/templates/research-project/STACK.md +120 -0
  102. package/framework/qualia-engine/templates/research-project/SUMMARY.md +170 -0
  103. package/framework/qualia-engine/templates/research.md +552 -0
  104. package/framework/qualia-engine/templates/roadmap.md +202 -0
  105. package/framework/qualia-engine/templates/state.md +176 -0
  106. package/framework/qualia-engine/templates/summary-complex.md +59 -0
  107. package/framework/qualia-engine/templates/summary-minimal.md +41 -0
  108. package/framework/qualia-engine/templates/summary-standard.md +48 -0
  109. package/framework/qualia-engine/templates/summary.md +246 -0
  110. package/framework/qualia-engine/templates/user-setup.md +311 -0
  111. package/framework/qualia-engine/templates/verification-report.md +322 -0
  112. package/framework/qualia-engine/workflows/add-phase.md +179 -0
  113. package/framework/qualia-engine/workflows/add-todo.md +157 -0
  114. package/framework/qualia-engine/workflows/audit-milestone.md +241 -0
  115. package/framework/qualia-engine/workflows/check-todos.md +176 -0
  116. package/framework/qualia-engine/workflows/complete-milestone.md +858 -0
  117. package/framework/qualia-engine/workflows/diagnose-issues.md +219 -0
  118. package/framework/qualia-engine/workflows/discovery-phase.md +289 -0
  119. package/framework/qualia-engine/workflows/discuss-phase.md +534 -0
  120. package/framework/qualia-engine/workflows/execute-phase.md +559 -0
  121. package/framework/qualia-engine/workflows/execute-plan.md +438 -0
  122. package/framework/qualia-engine/workflows/help.md +470 -0
  123. package/framework/qualia-engine/workflows/insert-phase.md +220 -0
  124. package/framework/qualia-engine/workflows/list-phase-assumptions.md +178 -0
  125. package/framework/qualia-engine/workflows/map-codebase.md +327 -0
  126. package/framework/qualia-engine/workflows/new-milestone.md +363 -0
  127. package/framework/qualia-engine/workflows/new-project.md +1037 -0
  128. package/framework/qualia-engine/workflows/pause-work.md +122 -0
  129. package/framework/qualia-engine/workflows/plan-milestone-gaps.md +256 -0
  130. package/framework/qualia-engine/workflows/plan-phase.md +422 -0
  131. package/framework/qualia-engine/workflows/progress.md +354 -0
  132. package/framework/qualia-engine/workflows/quick.md +252 -0
  133. package/framework/qualia-engine/workflows/remove-phase.md +326 -0
  134. package/framework/qualia-engine/workflows/research-phase.md +74 -0
  135. package/framework/qualia-engine/workflows/resume-project.md +306 -0
  136. package/framework/qualia-engine/workflows/set-profile.md +80 -0
  137. package/framework/qualia-engine/workflows/settings.md +145 -0
  138. package/framework/qualia-engine/workflows/transition.md +556 -0
  139. package/framework/qualia-engine/workflows/update.md +197 -0
  140. package/framework/qualia-engine/workflows/verify-phase.md +195 -0
  141. package/framework/qualia-engine/workflows/verify-work.md +625 -0
  142. package/framework/rules/context7.md +11 -0
  143. package/framework/rules/deployment.md +29 -0
  144. package/framework/rules/frontend.md +33 -0
  145. package/framework/rules/security.md +12 -0
  146. package/framework/rules/speed.md +20 -0
  147. package/framework/scripts/__pycache__/say.cpython-314.pyc +0 -0
  148. package/framework/scripts/apply-retention.sh +120 -0
  149. package/framework/scripts/bootstrap-pop-os.sh +354 -0
  150. package/framework/scripts/claude-voice +13 -0
  151. package/framework/scripts/cleanup.sh +131 -0
  152. package/framework/scripts/cowork-mode.sh +141 -0
  153. package/framework/scripts/generate-project-claude-md.sh +153 -0
  154. package/framework/scripts/load-test-webhook.js +172 -0
  155. package/framework/scripts/say.py +236 -0
  156. package/framework/scripts/showcase-video-recorder/ffmpeg-builder.js +167 -0
  157. package/framework/scripts/showcase-video-recorder/playwright-helpers.js +216 -0
  158. package/framework/scripts/speak.py +55 -0
  159. package/framework/scripts/speak.sh +18 -0
  160. package/framework/scripts/status.sh +138 -0
  161. package/framework/scripts/sync-to-framework.sh +65 -0
  162. package/framework/scripts/voice-hotkey.py +227 -0
  163. package/framework/scripts/voice-input.sh +51 -0
  164. package/framework/skills/animate/SKILL.md +202 -0
  165. package/framework/skills/bolder/SKILL.md +144 -0
  166. package/framework/skills/browser-qa/SKILL.md +536 -0
  167. package/framework/skills/clarify/SKILL.md +179 -0
  168. package/framework/skills/colorize/SKILL.md +170 -0
  169. package/framework/skills/critique/SKILL.md +126 -0
  170. package/framework/skills/deep-research/SKILL.md +271 -0
  171. package/framework/skills/delight/SKILL.md +329 -0
  172. package/framework/skills/deploy/SKILL.md +261 -0
  173. package/framework/skills/deploy-verify/SKILL.md +377 -0
  174. package/framework/skills/deploy-verify/scripts/canary-check.sh +206 -0
  175. package/framework/skills/deploy-verify/scripts/check-console-errors.js +147 -0
  176. package/framework/skills/deploy-verify/scripts/check-cwv.js +139 -0
  177. package/framework/skills/deploy-verify/scripts/project-detect.sh +84 -0
  178. package/framework/skills/deploy-verify/scripts/verify.sh +548 -0
  179. package/framework/skills/design-quieter/SKILL.md +130 -0
  180. package/framework/skills/distill/SKILL.md +149 -0
  181. package/framework/skills/docs-lookup/SKILL.md +78 -0
  182. package/framework/skills/fcm-notifications/SKILL.md +125 -0
  183. package/framework/skills/financial-ledger/SKILL.md +1039 -0
  184. package/framework/skills/frontend-master/NOTICE.md +4 -0
  185. package/framework/skills/frontend-master/SKILL.md +127 -0
  186. package/framework/skills/frontend-master/reference/color-and-contrast.md +132 -0
  187. package/framework/skills/frontend-master/reference/interaction-design.md +123 -0
  188. package/framework/skills/frontend-master/reference/motion-design.md +99 -0
  189. package/framework/skills/frontend-master/reference/responsive-design.md +114 -0
  190. package/framework/skills/frontend-master/reference/spatial-design.md +100 -0
  191. package/framework/skills/frontend-master/reference/typography.md +131 -0
  192. package/framework/skills/frontend-master/reference/ux-writing.md +107 -0
  193. package/framework/skills/harden/SKILL.md +357 -0
  194. package/framework/skills/i18n-rtl/SKILL.md +752 -0
  195. package/framework/skills/learn/SKILL.md +71 -0
  196. package/framework/skills/memory/SKILL.md +50 -0
  197. package/framework/skills/mobile-expo/SKILL.md +864 -0
  198. package/framework/skills/mobile-expo/references/store-checklist.md +550 -0
  199. package/framework/skills/nestjs-backend/README.md +73 -0
  200. package/framework/skills/nestjs-backend/SKILL.md +446 -0
  201. package/framework/skills/nestjs-backend/references/templates.md +1173 -0
  202. package/framework/skills/normalize/SKILL.md +79 -0
  203. package/framework/skills/onboard/SKILL.md +242 -0
  204. package/framework/skills/polish/SKILL.md +209 -0
  205. package/framework/skills/pr/SKILL.md +66 -0
  206. package/framework/skills/qualia/SKILL.md +153 -0
  207. package/framework/skills/qualia-add-todo/SKILL.md +68 -0
  208. package/framework/skills/qualia-audit-milestone/SKILL.md +92 -0
  209. package/framework/skills/qualia-check-todos/SKILL.md +55 -0
  210. package/framework/skills/qualia-complete-milestone/SKILL.md +108 -0
  211. package/framework/skills/qualia-debug/SKILL.md +149 -0
  212. package/framework/skills/qualia-design/SKILL.md +203 -0
  213. package/framework/skills/qualia-discuss-phase/SKILL.md +72 -0
  214. package/framework/skills/qualia-execute-phase/SKILL.md +86 -0
  215. package/framework/skills/qualia-help/SKILL.md +67 -0
  216. package/framework/skills/qualia-idk/SKILL.md +352 -0
  217. package/framework/skills/qualia-list-phase-assumptions/SKILL.md +67 -0
  218. package/framework/skills/qualia-new-milestone/SKILL.md +72 -0
  219. package/framework/skills/qualia-new-project/SKILL.md +92 -0
  220. package/framework/skills/qualia-optimize/SKILL.md +417 -0
  221. package/framework/skills/qualia-pause-work/SKILL.md +96 -0
  222. package/framework/skills/qualia-plan-milestone-gaps/SKILL.md +57 -0
  223. package/framework/skills/qualia-plan-phase/SKILL.md +101 -0
  224. package/framework/skills/qualia-progress/SKILL.md +53 -0
  225. package/framework/skills/qualia-quick/SKILL.md +89 -0
  226. package/framework/skills/qualia-research-phase/SKILL.md +88 -0
  227. package/framework/skills/qualia-resume-work/SKILL.md +62 -0
  228. package/framework/skills/qualia-review/SKILL.md +263 -0
  229. package/framework/skills/qualia-start/SKILL.md +182 -0
  230. package/framework/skills/qualia-verify-work/SKILL.md +105 -0
  231. package/framework/skills/qualia-workflow/SKILL.md +130 -0
  232. package/framework/skills/rag/SKILL.md +750 -0
  233. package/framework/skills/responsive/SKILL.md +231 -0
  234. package/framework/skills/retro/SKILL.md +284 -0
  235. package/framework/skills/sakani-conventions/SKILL.md +136 -0
  236. package/framework/skills/sakani-conventions/evals/evals.json +23 -0
  237. package/framework/skills/sakani-conventions/references/entities.md +365 -0
  238. package/framework/skills/sakani-conventions/references/error-codes.md +95 -0
  239. package/framework/skills/seo-master/SKILL.md +490 -0
  240. package/framework/skills/seo-master/references/checklist.md +199 -0
  241. package/framework/skills/seo-master/references/structured-data.md +609 -0
  242. package/framework/skills/ship/SKILL.md +202 -0
  243. package/framework/skills/stack-researcher/SKILL.md +215 -0
  244. package/framework/skills/status/SKILL.md +154 -0
  245. package/framework/skills/status/scripts/health-check.sh +562 -0
  246. package/framework/skills/subscription-payments/SKILL.md +250 -0
  247. package/framework/skills/supabase/SKILL.md +973 -0
  248. package/framework/skills/supabase/references/templates.md +159 -0
  249. package/framework/skills/team/SKILL.md +67 -0
  250. package/framework/skills/test-runner/SKILL.md +202 -0
  251. package/framework/skills/voice-agent/SKILL.md +407 -0
  252. package/framework/skills/zoho-workflow/SKILL.md +51 -0
  253. package/framework/statusline-command.sh +117 -0
  254. package/package.json +24 -0
  255. package/profiles/fawzi.json +16 -0
  256. package/profiles/hasan.json +16 -0
  257. package/profiles/moayad.json +16 -0
  258. package/templates/CLAUDE-owner.md +52 -0
  259. package/templates/CLAUDE.md.hbs +58 -0
  260. package/templates/env.claude.template +12 -0
  261. package/templates/settings.json +141 -0
@@ -0,0 +1,227 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Voice-to-text hotkey listener for Razer Basilisk V3 35K mouse button.
4
+ Press forward button to start recording. Stops automatically after
5
+ 1.5s of silence. Pastes transcription and presses Enter.
6
+ """
7
+
8
+ import subprocess
9
+ import sys
10
+ import os
11
+ import signal
12
+ import json
13
+ import threading
14
+ import time
15
+ import struct
16
+ import wave
17
+
18
+ try:
19
+ import evdev
20
+ from evdev import ecodes
21
+ except ImportError:
22
+ print("Install evdev: pip install evdev")
23
+ sys.exit(1)
24
+
25
+ # Config
26
+ ELEVEN_API_KEY = os.environ.get("ELEVEN_API_KEY", "sk_7ed98c8dfe85842183561244ebc3e7120ac291b7005ec0ca")
27
+ MOUSE_NAME = "Razer Razer Basilisk V3 35K"
28
+ TARGET_BUTTON = 276 # BTN_EXTRA = mouse forward button
29
+ AUDIO_FILE = "/tmp/voice-input.wav"
30
+ MIC_DEVICE = "plughw:1,0" # USB Condenser Microphone
31
+
32
+ # Silence detection
33
+ SILENCE_THRESHOLD = 500 # RMS amplitude below this = silence
34
+ SILENCE_DURATION = 1.5 # Seconds of silence before auto-stop
35
+ CHECK_INTERVAL = 0.2 # How often to check audio level
36
+
37
+ recording_proc = None
38
+ is_recording = False
39
+ lock = threading.Lock()
40
+
41
+
42
+ def notify(msg, timeout=2000):
43
+ subprocess.Popen(["notify-send", "-t", str(timeout), "Voice Input", msg],
44
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
45
+
46
+
47
+ def get_rms(audio_file):
48
+ """Get RMS of the last chunk of recorded audio."""
49
+ try:
50
+ size = os.path.getsize(audio_file)
51
+ if size < 1000:
52
+ return 0
53
+ # Read last 0.2s of audio (16000 Hz * 2 bytes * 0.2s = 6400 bytes)
54
+ chunk_size = 6400
55
+ with open(audio_file, "rb") as f:
56
+ # Skip WAV header area, read from near end
57
+ read_start = max(44, size - chunk_size)
58
+ f.seek(read_start)
59
+ data = f.read(chunk_size)
60
+
61
+ if len(data) < 100:
62
+ return 0
63
+
64
+ # Parse as 16-bit signed samples
65
+ samples = struct.unpack(f"<{len(data)//2}h", data[:len(data) - len(data) % 2])
66
+ if not samples:
67
+ return 0
68
+ rms = (sum(s * s for s in samples) / len(samples)) ** 0.5
69
+ return rms
70
+ except Exception:
71
+ return 0
72
+
73
+
74
+ def silence_monitor():
75
+ """Background thread: monitors audio level and stops recording on silence."""
76
+ global is_recording
77
+ silence_start = None
78
+
79
+ # Wait a bit before starting to monitor (let user start speaking)
80
+ time.sleep(0.8)
81
+
82
+ while is_recording:
83
+ time.sleep(CHECK_INTERVAL)
84
+ if not is_recording:
85
+ break
86
+
87
+ rms = get_rms(AUDIO_FILE)
88
+
89
+ if rms < SILENCE_THRESHOLD:
90
+ if silence_start is None:
91
+ silence_start = time.time()
92
+ elif time.time() - silence_start >= SILENCE_DURATION:
93
+ # Silence long enough — stop and transcribe
94
+ with lock:
95
+ if is_recording:
96
+ is_recording = False
97
+ stop_and_transcribe()
98
+ return
99
+ else:
100
+ silence_start = None
101
+
102
+
103
+ def start_recording():
104
+ global recording_proc, is_recording
105
+
106
+ with lock:
107
+ if is_recording:
108
+ return
109
+ is_recording = True
110
+
111
+ notify("Recording...")
112
+ recording_proc = subprocess.Popen(
113
+ ["arecord", "-D", MIC_DEVICE, "-f", "S16_LE", "-r", "16000", "-c", "1", AUDIO_FILE],
114
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
115
+ )
116
+
117
+ # Start silence monitor in background
118
+ t = threading.Thread(target=silence_monitor, daemon=True)
119
+ t.start()
120
+
121
+
122
+ def stop_and_transcribe():
123
+ global recording_proc, is_recording
124
+
125
+ if recording_proc:
126
+ try:
127
+ recording_proc.terminate()
128
+ recording_proc.wait(timeout=2)
129
+ except Exception:
130
+ pass
131
+ recording_proc = None
132
+
133
+ is_recording = False
134
+
135
+ if not os.path.exists(AUDIO_FILE):
136
+ notify("No audio recorded")
137
+ return
138
+
139
+ if os.path.getsize(AUDIO_FILE) < 10000:
140
+ notify("Recording too short")
141
+ try:
142
+ os.unlink(AUDIO_FILE)
143
+ except OSError:
144
+ pass
145
+ return
146
+
147
+ notify("Transcribing...")
148
+
149
+ try:
150
+ result = subprocess.run(
151
+ ["curl", "-s", "-X", "POST", "https://api.elevenlabs.io/v1/speech-to-text",
152
+ "-H", f"xi-api-key: {ELEVEN_API_KEY}",
153
+ "-F", f"file=@{AUDIO_FILE}",
154
+ "-F", "model_id=scribe_v1"],
155
+ capture_output=True, text=True, timeout=30
156
+ )
157
+ os.unlink(AUDIO_FILE)
158
+
159
+ response = json.loads(result.stdout)
160
+ text = response.get("text", "").strip()
161
+
162
+ if not text:
163
+ notify("No speech detected")
164
+ return
165
+
166
+ # Copy to clipboard, paste, then press Enter (wtype = Wayland-native, no daemon)
167
+ subprocess.run(["wl-copy", text], check=True)
168
+ time.sleep(0.1)
169
+ # Ctrl+V (paste)
170
+ subprocess.run(["wtype", "-M", "ctrl", "v", "-m", "ctrl"], check=True)
171
+ time.sleep(0.15)
172
+ # Enter (send)
173
+ subprocess.run(["wtype", "-k", "Return"], check=True)
174
+
175
+ notify(text[:100])
176
+
177
+ except Exception as e:
178
+ notify(f"Error: {str(e)[:80]}")
179
+ try:
180
+ os.unlink(AUDIO_FILE)
181
+ except OSError:
182
+ pass
183
+
184
+
185
+ def find_device():
186
+ """Find the Razer mouse event device."""
187
+ devices = [evdev.InputDevice(path) for path in evdev.list_devices()]
188
+ for dev in devices:
189
+ if MOUSE_NAME in dev.name:
190
+ caps = dev.capabilities(verbose=True)
191
+ for (etype, _), codes in caps.items():
192
+ for code_info in codes:
193
+ if isinstance(code_info, tuple):
194
+ _, code_val = code_info
195
+ if code_val == TARGET_BUTTON:
196
+ return dev
197
+ elif code_info == TARGET_BUTTON:
198
+ return dev
199
+ for dev in devices:
200
+ if MOUSE_NAME in dev.name and "Keyboard" not in dev.name:
201
+ return dev
202
+ return None
203
+
204
+
205
+ def main():
206
+ global is_recording
207
+
208
+ dev = find_device()
209
+ if not dev:
210
+ print(f"Could not find '{MOUSE_NAME}' input device.")
211
+ print("Available devices:")
212
+ for path in evdev.list_devices():
213
+ d = evdev.InputDevice(path)
214
+ print(f" {path}: {d.name}")
215
+ sys.exit(1)
216
+
217
+ print(f"Listening on: {dev.name} ({dev.path})")
218
+ print(f"Press mouse forward button to record. Auto-stops on {SILENCE_DURATION}s silence.")
219
+
220
+ for event in dev.read_loop():
221
+ if event.type == ecodes.EV_KEY and event.code == TARGET_BUTTON and event.value == 1:
222
+ if not is_recording:
223
+ start_recording()
224
+
225
+
226
+ if __name__ == "__main__":
227
+ main()
@@ -0,0 +1,51 @@
1
+ #!/bin/bash
2
+ # Voice-to-text: Record mic → ElevenLabs STT → paste into focused app
3
+ # Usage: Bind to a hotkey. Press once to start recording, press again to stop & transcribe.
4
+ # Requires: arecord, curl, wl-copy, wtype, notify-send
5
+ # Requires: ELEVEN_API_KEY env var
6
+
7
+ set -euo pipefail
8
+
9
+ ELEVEN_API_KEY="${ELEVEN_API_KEY:-sk_7ed98c8dfe85842183561244ebc3e7120ac291b7005ec0ca}"
10
+ LOCKFILE="/tmp/voice-input.lock"
11
+ AUDIO_FILE="/tmp/voice-input.wav"
12
+
13
+ # Toggle: if already recording, stop; otherwise start
14
+ if [ -f "$LOCKFILE" ]; then
15
+ # === STOP RECORDING ===
16
+ PID=$(cat "$LOCKFILE")
17
+ kill "$PID" 2>/dev/null || true
18
+ rm -f "$LOCKFILE"
19
+
20
+ notify-send -t 2000 "Voice Input" "Transcribing..."
21
+
22
+ # Send to ElevenLabs STT
23
+ RESPONSE=$(curl -s -X POST "https://api.elevenlabs.io/v1/speech-to-text" \
24
+ -H "xi-api-key: $ELEVEN_API_KEY" \
25
+ -F "file=@$AUDIO_FILE" \
26
+ -F "model_id=scribe_v1")
27
+
28
+ # Extract text from JSON response
29
+ TEXT=$(echo "$RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin).get('text',''))" 2>/dev/null || echo "")
30
+
31
+ rm -f "$AUDIO_FILE"
32
+
33
+ if [ -z "$TEXT" ]; then
34
+ notify-send -t 3000 "Voice Input" "No speech detected"
35
+ exit 0
36
+ fi
37
+
38
+ # Copy to clipboard and paste via wtype (Wayland-native, no daemon needed)
39
+ echo -n "$TEXT" | wl-copy
40
+ sleep 0.1
41
+ wtype -M ctrl v -m ctrl
42
+
43
+ notify-send -t 2000 "Voice Input" "$TEXT"
44
+ else
45
+ # === START RECORDING ===
46
+ notify-send -t 2000 "Voice Input" "Recording... Press hotkey again to stop"
47
+
48
+ # Record from USB mic (card 1), 16kHz mono WAV (optimal for STT)
49
+ arecord -D plughw:1,0 -f S16_LE -r 16000 -c 1 "$AUDIO_FILE" &
50
+ echo $! > "$LOCKFILE"
51
+ fi
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: animate
3
+ description: Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight.
4
+ user-invokable: true
5
+ args:
6
+ - name: target
7
+ description: The feature or component to animate (optional)
8
+ required: false
9
+ ---
10
+
11
+ Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight.
12
+
13
+ ## MANDATORY PREPARATION
14
+
15
+ ### Read DESIGN.md (Authoritative Source)
16
+
17
+ Before any context gathering, check for the project's design decisions file:
18
+
19
+ ```bash
20
+ cat .planning/DESIGN.md 2>/dev/null
21
+ ```
22
+
23
+ **If DESIGN.md exists:** This is the authoritative source for all design decisions in this project. Use its palette, typography, spacing, component, and motion decisions as your foundation. Do NOT override these decisions unless the user explicitly asks. Reference specific DESIGN.md decisions in your output (e.g., "Per DESIGN.md, the primary color is...").
24
+
25
+ **If DESIGN.md does not exist:** Proceed with normal context gathering below. Consider suggesting the user run `/qualia:discuss-phase` to establish design decisions.
26
+
27
+ ### Context Gathering (Do This First)
28
+
29
+ You cannot do a great job without having necessary context, such as target audience (critical), desired use-cases (critical), brand personality/tone (playful vs serious, energetic vs calm), and performance constraints.
30
+
31
+ Attempt to gather these from the current thread or codebase.
32
+
33
+ 1. If you don't find *exact* information and have to infer from existing design and functionality, you MUST STOP and STOP and call the AskUserQuestionTool to clarify. whether you got it right.
34
+ 2. Otherwise, if you can't fully infer or your level of confidence is medium or lower, you MUST STOP and call the AskUserQuestionTool to clarify. clarifying questions first to complete your context.
35
+
36
+ Do NOT proceed until you have answers. Guessing leads to inappropriate or excessive animation.
37
+
38
+ ### Use frontend-master skill
39
+
40
+ Use the frontend-master skill for design principles and anti-patterns. Do NOT proceed until it has executed and you know all DO's and DON'Ts.
41
+
42
+ ---
43
+
44
+ ## Assess Animation Opportunities
45
+
46
+ Analyze where motion would improve the experience:
47
+
48
+ 1. **Identify static areas**:
49
+ - **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.)
50
+ - **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes)
51
+ - **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious
52
+ - **Lack of delight**: Functional but joyless interactions
53
+ - **Missed guidance**: Opportunities to direct attention or explain behavior
54
+
55
+ 2. **Understand the context**:
56
+ - What's the personality? (Playful vs serious, energetic vs calm)
57
+ - What's the performance budget? (Mobile-first? Complex page?)
58
+ - Who's the audience? (Motion-sensitive users? Power users who want speed?)
59
+ - What matters most? (One hero animation vs many micro-interactions?)
60
+
61
+ If any of these are unclear from the codebase, STOP and call the AskUserQuestionTool to clarify.
62
+
63
+ **CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
64
+
65
+ ## Plan Animation Strategy
66
+
67
+ Create a purposeful animation plan:
68
+
69
+ - **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?)
70
+ - **Feedback layer**: Which interactions need acknowledgment?
71
+ - **Transition layer**: Which state changes need smoothing?
72
+ - **Delight layer**: Where can we surprise and delight?
73
+
74
+ **IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments.
75
+
76
+ ## Implement Animations
77
+
78
+ Add motion systematically across these categories:
79
+
80
+ ### Entrance Animations
81
+ - **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations
82
+ - **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
83
+ - **Content reveals**: Scroll-triggered animations using intersection observer
84
+ - **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management
85
+
86
+ ### Micro-interactions
87
+ - **Button feedback**:
88
+ - Hover: Subtle scale (1.02-1.05), color shift, shadow increase
89
+ - Click: Quick scale down then up (0.95 → 1), ripple effect
90
+ - Loading: Spinner or pulse state
91
+ - **Form interactions**:
92
+ - Input focus: Border color transition, slight scale or glow
93
+ - Validation: Shake on error, check mark on success, smooth color transitions
94
+ - **Toggle switches**: Smooth slide + color transition (200-300ms)
95
+ - **Checkboxes/radio**: Check mark animation, ripple effect
96
+ - **Like/favorite**: Scale + rotation, particle effects, color transition
97
+
98
+ ### State Transitions
99
+ - **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms)
100
+ - **Expand/collapse**: Height transition with overflow handling, icon rotation
101
+ - **Loading states**: Skeleton screen fades, spinner animations, progress bars
102
+ - **Success/error**: Color transitions, icon animations, gentle scale pulse
103
+ - **Enable/disable**: Opacity transitions, cursor changes
104
+
105
+ ### Navigation & Flow
106
+ - **Page transitions**: Crossfade between routes, shared element transitions
107
+ - **Tab switching**: Slide indicator, content fade/slide
108
+ - **Carousel/slider**: Smooth transforms, snap points, momentum
109
+ - **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators
110
+
111
+ ### Feedback & Guidance
112
+ - **Hover hints**: Tooltip fade-ins, cursor changes, element highlights
113
+ - **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning
114
+ - **Copy/paste**: Brief highlight flash on paste, "copied" confirmation
115
+ - **Focus flow**: Highlight path through form or workflow
116
+
117
+ ### Delight Moments
118
+ - **Empty states**: Subtle floating animations on illustrations
119
+ - **Completed actions**: Confetti, check mark flourish, success celebrations
120
+ - **Easter eggs**: Hidden interactions for discovery
121
+ - **Contextual animation**: Weather effects, time-of-day themes, seasonal touches
122
+
123
+ ## Technical Implementation
124
+
125
+ Use appropriate techniques for each animation:
126
+
127
+ ### Timing & Easing
128
+
129
+ **Durations by purpose:**
130
+ - **100-150ms**: Instant feedback (button press, toggle)
131
+ - **200-300ms**: State changes (hover, menu open)
132
+ - **300-500ms**: Layout changes (accordion, modal)
133
+ - **500-800ms**: Entrance animations (page load)
134
+
135
+ **Easing curves (use these, not CSS defaults):**
136
+ ```css
137
+ /* Recommended - natural deceleration */
138
+ --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */
139
+ --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */
140
+ --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */
141
+
142
+ /* AVOID - feel dated and tacky */
143
+ /* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */
144
+ /* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */
145
+ ```
146
+
147
+ **Exit animations are faster than entrances.** Use ~75% of enter duration.
148
+
149
+ ### CSS Animations
150
+ ```css
151
+ /* Prefer for simple, declarative animations */
152
+ - transitions for state changes
153
+ - @keyframes for complex sequences
154
+ - transform + opacity only (GPU-accelerated)
155
+ ```
156
+
157
+ ### JavaScript Animation
158
+ ```javascript
159
+ /* Use for complex, interactive animations */
160
+ - Web Animations API for programmatic control
161
+ - Framer Motion for React
162
+ - GSAP for complex sequences
163
+ ```
164
+
165
+ ### Performance
166
+ - **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
167
+ - **will-change**: Add sparingly for known expensive animations
168
+ - **Reduce paint**: Minimize repaints, use `contain` where appropriate
169
+ - **Monitor FPS**: Ensure 60fps on target devices
170
+
171
+ ### Accessibility
172
+ ```css
173
+ @media (prefers-reduced-motion: reduce) {
174
+ * {
175
+ animation-duration: 0.01ms !important;
176
+ animation-iteration-count: 1 !important;
177
+ transition-duration: 0.01ms !important;
178
+ }
179
+ }
180
+ ```
181
+
182
+ **NEVER**:
183
+ - Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
184
+ - Animate layout properties (width, height, top, left)—use transform instead
185
+ - Use durations over 500ms for feedback—it feels laggy
186
+ - Animate without purpose—every animation needs a reason
187
+ - Ignore `prefers-reduced-motion`—this is an accessibility violation
188
+ - Animate everything—animation fatigue makes interfaces feel exhausting
189
+ - Block interaction during animations unless intentional
190
+
191
+ ## Verify Quality
192
+
193
+ Test animations thoroughly:
194
+
195
+ - **Smooth at 60fps**: No jank on target devices
196
+ - **Feels natural**: Easing curves feel organic, not robotic
197
+ - **Appropriate timing**: Not too fast (jarring) or too slow (laggy)
198
+ - **Reduced motion works**: Animations disabled or simplified appropriately
199
+ - **Doesn't block**: Users can interact during/after animations
200
+ - **Adds value**: Makes interface clearer or more delightful
201
+
202
+ Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right.
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: bolder
3
+ description: Amplify safe or boring designs to make them more visually interesting and stimulating. Increases impact while maintaining usability.
4
+ user-invokable: true
5
+ args:
6
+ - name: target
7
+ description: The feature or component to make bolder (optional)
8
+ required: false
9
+ ---
10
+
11
+ Increase visual impact and personality in designs that are too safe, generic, or visually underwhelming, creating more engaging and memorable experiences.
12
+
13
+ ## MANDATORY PREPARATION
14
+
15
+ ### Read DESIGN.md (Authoritative Source)
16
+
17
+ Before any context gathering, check for the project's design decisions file:
18
+
19
+ ```bash
20
+ cat .planning/DESIGN.md 2>/dev/null
21
+ ```
22
+
23
+ **If DESIGN.md exists:** This is the authoritative source for all design decisions in this project. Use its palette, typography, spacing, component, and motion decisions as your foundation. Do NOT override these decisions unless the user explicitly asks. Reference specific DESIGN.md decisions in your output (e.g., "Per DESIGN.md, the primary color is...").
24
+
25
+ **If DESIGN.md does not exist:** Proceed with normal context gathering below. Consider suggesting the user run `/qualia:discuss-phase` to establish design decisions.
26
+
27
+ ### Context Gathering (Do This First)
28
+
29
+ You cannot do a great job without having necessary context, such as target audience (critical), desired use-cases (critical), brand personality/tone, and everything else that a great human designer would need as well.
30
+
31
+ Attempt to gather these from the current thread or codebase.
32
+
33
+ 1. If you don't find *exact* information and have to infer from existing design and functionality, you MUST STOP and STOP and call the AskUserQuestionTool to clarify. whether you got it right.
34
+ 2. Otherwise, if you can't fully infer or your level of confidence is medium or lower, you MUST STOP and call the AskUserQuestionTool to clarify. clarifying questions first to complete your context.
35
+
36
+ Do NOT proceed until you have answers. Guessing leads to generic AI slop.
37
+
38
+ ### Use frontend-master skill
39
+
40
+ Use the frontend-master skill for design principles and anti-patterns. Do NOT proceed until it has executed and you know all DO's and DON'Ts.
41
+
42
+ ---
43
+
44
+ ## Assess Current State
45
+
46
+ Analyze what makes the design feel too safe or boring:
47
+
48
+ 1. **Identify weakness sources**:
49
+ - **Generic choices**: System fonts, basic colors, standard layouts
50
+ - **Timid scale**: Everything is medium-sized with no drama
51
+ - **Low contrast**: Everything has similar visual weight
52
+ - **Static**: No motion, no energy, no life
53
+ - **Predictable**: Standard patterns with no surprises
54
+ - **Flat hierarchy**: Nothing stands out or commands attention
55
+
56
+ 2. **Understand the context**:
57
+ - What's the brand personality? (How far can we push?)
58
+ - What's the purpose? (Marketing can be bolder than financial dashboards)
59
+ - Who's the audience? (What will resonate?)
60
+ - What are the constraints? (Brand guidelines, accessibility, performance)
61
+
62
+ If any of these are unclear from the codebase, STOP and call the AskUserQuestionTool to clarify.
63
+
64
+ **CRITICAL**: "Bolder" doesn't mean chaotic or garish. It means distinctive, memorable, and confident. Think intentional drama, not random chaos.
65
+
66
+ **WARNING - AI SLOP TRAP**: When making things "bolder," AI defaults to the same tired tricks: cyan/purple gradients, glassmorphism, neon accents on dark backgrounds, gradient text on metrics. These are the OPPOSITE of bold—they're generic. Review ALL the DON'T guidelines in the frontend-master skill before proceeding. Bold means distinctive, not "more effects."
67
+
68
+ ## Plan Amplification
69
+
70
+ Create a strategy to increase impact while maintaining coherence:
71
+
72
+ - **Focal point**: What should be the hero moment? (Pick ONE, make it amazing)
73
+ - **Personality direction**: Maximalist chaos? Elegant drama? Playful energy? Dark moody? Choose a lane.
74
+ - **Risk budget**: How experimental can we be? Push boundaries within constraints.
75
+ - **Hierarchy amplification**: Make big things BIGGER, small things smaller (increase contrast)
76
+
77
+ **IMPORTANT**: Bold design must still be usable. Impact without function is just decoration.
78
+
79
+ ## Amplify the Design
80
+
81
+ Systematically increase impact across these dimensions:
82
+
83
+ ### Typography Amplification
84
+ - **Replace generic fonts**: Swap system fonts for distinctive choices (see frontend-master skill for inspiration)
85
+ - **Extreme scale**: Create dramatic size jumps (3x-5x differences, not 1.5x)
86
+ - **Weight contrast**: Pair 900 weights with 200 weights, not 600 with 400
87
+ - **Unexpected choices**: Variable fonts, display fonts for headlines, condensed/extended widths, monospace as intentional accent (not as lazy "dev tool" default)
88
+
89
+ ### Color Intensification
90
+ - **Increase saturation**: Shift to more vibrant, energetic colors (but not neon)
91
+ - **Bold palette**: Introduce unexpected color combinations—avoid the purple-blue gradient AI slop
92
+ - **Dominant color strategy**: Let one bold color own 60% of the design
93
+ - **Sharp accents**: High-contrast accent colors that pop
94
+ - **Tinted neutrals**: Replace pure grays with tinted grays that harmonize with your palette
95
+ - **Rich gradients**: Intentional multi-stop gradients (not generic purple-to-blue)
96
+
97
+ ### Spatial Drama
98
+ - **Extreme scale jumps**: Make important elements 3-5x larger than surroundings
99
+ - **Break the grid**: Let hero elements escape containers and cross boundaries
100
+ - **Asymmetric layouts**: Replace centered, balanced layouts with tension-filled asymmetry
101
+ - **Generous space**: Use white space dramatically (100-200px gaps, not 20-40px)
102
+ - **Overlap**: Layer elements intentionally for depth
103
+
104
+ ### Visual Effects
105
+ - **Dramatic shadows**: Large, soft shadows for elevation (but not generic drop shadows on rounded rectangles)
106
+ - **Background treatments**: Mesh patterns, noise textures, geometric patterns, intentional gradients (not purple-to-blue)
107
+ - **Texture & depth**: Grain, halftone, duotone, layered elements—NOT glassmorphism (it's overused AI slop)
108
+ - **Borders & frames**: Thick borders, decorative frames, custom shapes (not rounded rectangles with colored border on one side)
109
+ - **Custom elements**: Illustrative elements, custom icons, decorative details that reinforce brand
110
+
111
+ ### Motion & Animation
112
+ - **Entrance choreography**: Staggered, dramatic page load animations with 50-100ms delays
113
+ - **Scroll effects**: Parallax, reveal animations, scroll-triggered sequences
114
+ - **Micro-interactions**: Satisfying hover effects, click feedback, state changes
115
+ - **Transitions**: Smooth, noticeable transitions using ease-out-quart/quint/expo (not bounce or elastic—they cheapen the effect)
116
+
117
+ ### Composition Boldness
118
+ - **Hero moments**: Create clear focal points with dramatic treatment
119
+ - **Diagonal flows**: Escape horizontal/vertical rigidity with diagonal arrangements
120
+ - **Full-bleed elements**: Use full viewport width/height for impact
121
+ - **Unexpected proportions**: Golden ratio? Throw it out. Try 70/30, 80/20 splits
122
+
123
+ **NEVER**:
124
+ - Add effects randomly without purpose (chaos ≠ bold)
125
+ - Sacrifice readability for aesthetics (body text must be readable)
126
+ - Make everything bold (then nothing is bold - need contrast)
127
+ - Ignore accessibility (bold design must still meet WCAG standards)
128
+ - Overwhelm with motion (animation fatigue is real)
129
+ - Copy trendy aesthetics blindly (bold means distinctive, not derivative)
130
+
131
+ ## Verify Quality
132
+
133
+ Ensure amplification maintains usability and coherence:
134
+
135
+ - **NOT AI slop**: Does this look like every other AI-generated "bold" design? If yes, start over.
136
+ - **Still functional**: Can users accomplish tasks without distraction?
137
+ - **Coherent**: Does everything feel intentional and unified?
138
+ - **Memorable**: Will users remember this experience?
139
+ - **Performant**: Do all these effects run smoothly?
140
+ - **Accessible**: Does it still meet accessibility standards?
141
+
142
+ **The test**: If you showed this to someone and said "AI made this bolder," would they believe you immediately? If yes, you've failed. Bold means distinctive, not "more AI effects."
143
+
144
+ Remember: Bold design is confident design. It takes risks, makes statements, and creates memorable experiences. But bold without strategy is just loud. Be intentional, be dramatic, be unforgettable.