@jack200714/mafw 4.5.1 → 4.8.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 (330) hide show
  1. package/README.md +5 -2
  2. package/bin/mafw.js +16 -14
  3. package/gateway/dist/index.js +52 -38
  4. package/gateway/dist/media/media-plugin-loader.js +0 -12
  5. package/gateway/dist/plugins/hub.js +153 -19
  6. package/gateway/dist/routes/plugins.js +15 -5
  7. package/gateway/dist/runtime/event-broadcast.js +33 -0
  8. package/gateway/dist/runtime/loader.js +23 -13
  9. package/gateway/dist/usage/builtin-plugins/gateway.js +25 -3
  10. package/gateway/dist/usage/plugin-loader.js +0 -11
  11. package/gateway/package.json +2 -2
  12. package/package.json +1 -7
  13. package/packages/tui/dist/cli.js +8 -3
  14. package/.opencode/mafw/.backup-v61/parametric/base-skill-manifest.yaml +0 -2
  15. package/.opencode/mafw/STATUS.md +0 -6
  16. package/.opencode/mafw/ledger.md +0 -20
  17. package/.opencode/mafw/memory/.harmonic_index.json +0 -28
  18. package/.opencode/mafw/memory/.review_queue.json +0 -1
  19. package/.opencode/mafw/memory/tier3/parametric.json +0 -13
  20. package/.opencode/mafw/memory/tier3/test-goal.json +0 -19
  21. package/.opencode/mafw/memory-index.json +0 -6
  22. package/.opencode/mafw/parametric/base-skill-manifest.yaml +0 -2
  23. package/.opencode/mafw/waves.json +0 -4
  24. package/.opencode/opencode.json +0 -3
  25. package/.opencode/plugins/mafw-plugin.ts +0 -8
  26. package/.opencode/skills/banner-design/SKILL.md +0 -196
  27. package/.opencode/skills/banner-design/references/banner-sizes-and-styles.md +0 -118
  28. package/.opencode/skills/brand/SKILL.md +0 -97
  29. package/.opencode/skills/brand/references/approval-checklist.md +0 -169
  30. package/.opencode/skills/brand/references/asset-organization.md +0 -157
  31. package/.opencode/skills/brand/references/brand-guideline-template.md +0 -140
  32. package/.opencode/skills/brand/references/color-palette-management.md +0 -186
  33. package/.opencode/skills/brand/references/consistency-checklist.md +0 -94
  34. package/.opencode/skills/brand/references/logo-usage-rules.md +0 -185
  35. package/.opencode/skills/brand/references/messaging-framework.md +0 -85
  36. package/.opencode/skills/brand/references/typography-specifications.md +0 -214
  37. package/.opencode/skills/brand/references/update.md +0 -118
  38. package/.opencode/skills/brand/references/visual-identity.md +0 -96
  39. package/.opencode/skills/brand/references/voice-framework.md +0 -88
  40. package/.opencode/skills/brand/scripts/extract-colors.cjs +0 -341
  41. package/.opencode/skills/brand/scripts/inject-brand-context.cjs +0 -349
  42. package/.opencode/skills/brand/scripts/sync-brand-to-tokens.cjs +0 -248
  43. package/.opencode/skills/brand/scripts/tests/test_sync_brand_to_tokens.py +0 -52
  44. package/.opencode/skills/brand/scripts/validate-asset.cjs +0 -387
  45. package/.opencode/skills/brand/templates/brand-guidelines-starter.md +0 -275
  46. package/.opencode/skills/design/SKILL.md +0 -313
  47. package/.opencode/skills/design/data/cip/deliverables.csv +0 -51
  48. package/.opencode/skills/design/data/cip/industries.csv +0 -21
  49. package/.opencode/skills/design/data/cip/mockup-contexts.csv +0 -21
  50. package/.opencode/skills/design/data/cip/styles.csv +0 -21
  51. package/.opencode/skills/design/data/icon/styles.csv +0 -16
  52. package/.opencode/skills/design/data/logo/colors.csv +0 -56
  53. package/.opencode/skills/design/data/logo/industries.csv +0 -56
  54. package/.opencode/skills/design/data/logo/styles.csv +0 -56
  55. package/.opencode/skills/design/references/banner-sizes-and-styles.md +0 -118
  56. package/.opencode/skills/design/references/cip-deliverable-guide.md +0 -95
  57. package/.opencode/skills/design/references/cip-design.md +0 -121
  58. package/.opencode/skills/design/references/cip-prompt-engineering.md +0 -84
  59. package/.opencode/skills/design/references/cip-style-guide.md +0 -68
  60. package/.opencode/skills/design/references/design-routing.md +0 -207
  61. package/.opencode/skills/design/references/icon-design.md +0 -122
  62. package/.opencode/skills/design/references/logo-color-psychology.md +0 -101
  63. package/.opencode/skills/design/references/logo-design.md +0 -92
  64. package/.opencode/skills/design/references/logo-prompt-engineering.md +0 -158
  65. package/.opencode/skills/design/references/logo-style-guide.md +0 -109
  66. package/.opencode/skills/design/references/slides-copywriting-formulas.md +0 -84
  67. package/.opencode/skills/design/references/slides-create.md +0 -4
  68. package/.opencode/skills/design/references/slides-html-template.md +0 -295
  69. package/.opencode/skills/design/references/slides-layout-patterns.md +0 -137
  70. package/.opencode/skills/design/references/slides-strategies.md +0 -94
  71. package/.opencode/skills/design/references/slides.md +0 -42
  72. package/.opencode/skills/design/references/social-photos-design.md +0 -329
  73. package/.opencode/skills/design/scripts/cip/core.py +0 -215
  74. package/.opencode/skills/design/scripts/cip/generate.py +0 -484
  75. package/.opencode/skills/design/scripts/cip/render-html.py +0 -424
  76. package/.opencode/skills/design/scripts/cip/search.py +0 -127
  77. package/.opencode/skills/design/scripts/icon/generate.py +0 -487
  78. package/.opencode/skills/design/scripts/logo/core.py +0 -175
  79. package/.opencode/skills/design/scripts/logo/generate.py +0 -362
  80. package/.opencode/skills/design/scripts/logo/search.py +0 -114
  81. package/.opencode/skills/design-system/SKILL.md +0 -244
  82. package/.opencode/skills/design-system/data/slide-backgrounds.csv +0 -11
  83. package/.opencode/skills/design-system/data/slide-charts.csv +0 -26
  84. package/.opencode/skills/design-system/data/slide-color-logic.csv +0 -14
  85. package/.opencode/skills/design-system/data/slide-copy.csv +0 -26
  86. package/.opencode/skills/design-system/data/slide-layout-logic.csv +0 -16
  87. package/.opencode/skills/design-system/data/slide-layouts.csv +0 -26
  88. package/.opencode/skills/design-system/data/slide-strategies.csv +0 -16
  89. package/.opencode/skills/design-system/data/slide-typography.csv +0 -15
  90. package/.opencode/skills/design-system/references/component-specs.md +0 -236
  91. package/.opencode/skills/design-system/references/component-tokens.md +0 -214
  92. package/.opencode/skills/design-system/references/primitive-tokens.md +0 -203
  93. package/.opencode/skills/design-system/references/semantic-tokens.md +0 -215
  94. package/.opencode/skills/design-system/references/states-and-variants.md +0 -241
  95. package/.opencode/skills/design-system/references/tailwind-integration.md +0 -251
  96. package/.opencode/skills/design-system/references/token-architecture.md +0 -224
  97. package/.opencode/skills/design-system/scripts/embed-tokens.cjs +0 -99
  98. package/.opencode/skills/design-system/scripts/fetch-background.py +0 -317
  99. package/.opencode/skills/design-system/scripts/generate-slide.py +0 -770
  100. package/.opencode/skills/design-system/scripts/generate-tokens.cjs +0 -205
  101. package/.opencode/skills/design-system/scripts/html-token-validator.py +0 -327
  102. package/.opencode/skills/design-system/scripts/search-slides.py +0 -218
  103. package/.opencode/skills/design-system/scripts/slide-token-validator.py +0 -35
  104. package/.opencode/skills/design-system/scripts/slide_search_core.py +0 -453
  105. package/.opencode/skills/design-system/scripts/tests/test_validate_tokens.py +0 -48
  106. package/.opencode/skills/design-system/scripts/validate-tokens.cjs +0 -246
  107. package/.opencode/skills/design-system/templates/design-tokens-starter.json +0 -143
  108. package/.opencode/skills/frontend-design/LICENSE.txt +0 -21
  109. package/.opencode/skills/frontend-design/SKILL.md +0 -115
  110. package/.opencode/skills/mafw-automation-interview/SKILL.md +0 -43
  111. package/.opencode/skills/mafw-cli-scanner/SKILL.md +0 -37
  112. package/.opencode/skills/mafw-compression-verifier/SKILL.md +0 -52
  113. package/.opencode/skills/mafw-desktop-inspector/SKILL.md +0 -170
  114. package/.opencode/skills/mafw-execute/SKILL.md +0 -62
  115. package/.opencode/skills/mafw-gateway-restart/SKILL.md +0 -87
  116. package/.opencode/skills/mafw-github-scanner/SKILL.md +0 -38
  117. package/.opencode/skills/mafw-goal/SKILL.md +0 -76
  118. package/.opencode/skills/mafw-interview/SKILL.md +0 -68
  119. package/.opencode/skills/mafw-memory-extractor/SKILL.md +0 -65
  120. package/.opencode/skills/mafw-plan/SKILL.md +0 -58
  121. package/.opencode/skills/mafw-review/SKILL.md +0 -85
  122. package/.opencode/skills/runtime-plugin-authoring/SKILL.md +0 -791
  123. package/.opencode/skills/slides/SKILL.md +0 -40
  124. package/.opencode/skills/slides/references/copywriting-formulas.md +0 -84
  125. package/.opencode/skills/slides/references/create.md +0 -4
  126. package/.opencode/skills/slides/references/html-template.md +0 -295
  127. package/.opencode/skills/slides/references/layout-patterns.md +0 -137
  128. package/.opencode/skills/slides/references/slide-strategies.md +0 -94
  129. package/.opencode/skills/ui-styling/LICENSE.txt +0 -202
  130. package/.opencode/skills/ui-styling/SKILL.md +0 -324
  131. package/.opencode/skills/ui-styling/references/canvas-design-system.md +0 -320
  132. package/.opencode/skills/ui-styling/references/shadcn-accessibility.md +0 -471
  133. package/.opencode/skills/ui-styling/references/shadcn-components.md +0 -424
  134. package/.opencode/skills/ui-styling/references/shadcn-theming.md +0 -373
  135. package/.opencode/skills/ui-styling/references/tailwind-customization.md +0 -483
  136. package/.opencode/skills/ui-styling/references/tailwind-responsive.md +0 -382
  137. package/.opencode/skills/ui-styling/references/tailwind-utilities.md +0 -455
  138. package/.opencode/skills/ui-styling/scripts/requirements.txt +0 -17
  139. package/.opencode/skills/ui-styling/scripts/shadcn_add.py +0 -308
  140. package/.opencode/skills/ui-styling/scripts/tailwind_config_gen.py +0 -473
  141. package/.opencode/skills/ui-styling/scripts/tests/coverage-ui.json +0 -1
  142. package/.opencode/skills/ui-styling/scripts/tests/requirements.txt +0 -3
  143. package/.opencode/skills/ui-styling/scripts/tests/test_shadcn_add.py +0 -266
  144. package/.opencode/skills/ui-styling/scripts/tests/test_tailwind_config_gen.py +0 -394
  145. package/.opencode/skills/ui-ux-pro-max/SKILL.md +0 -388
  146. package/.opencode/skills/ui-ux-pro-max/data/app-interface.csv +0 -31
  147. package/.opencode/skills/ui-ux-pro-max/data/charts.csv +0 -26
  148. package/.opencode/skills/ui-ux-pro-max/data/colors.csv +0 -193
  149. package/.opencode/skills/ui-ux-pro-max/data/google-fonts.csv +0 -1924
  150. package/.opencode/skills/ui-ux-pro-max/data/icons.csv +0 -106
  151. package/.opencode/skills/ui-ux-pro-max/data/landing.csv +0 -35
  152. package/.opencode/skills/ui-ux-pro-max/data/motion.csv +0 -17
  153. package/.opencode/skills/ui-ux-pro-max/data/products.csv +0 -193
  154. package/.opencode/skills/ui-ux-pro-max/data/react-performance.csv +0 -45
  155. package/.opencode/skills/ui-ux-pro-max/data/stacks/angular.csv +0 -51
  156. package/.opencode/skills/ui-ux-pro-max/data/stacks/astro.csv +0 -54
  157. package/.opencode/skills/ui-ux-pro-max/data/stacks/avalonia.csv +0 -57
  158. package/.opencode/skills/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  159. package/.opencode/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  160. package/.opencode/skills/ui-ux-pro-max/data/stacks/javafx.csv +0 -76
  161. package/.opencode/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  162. package/.opencode/skills/ui-ux-pro-max/data/stacks/laravel.csv +0 -51
  163. package/.opencode/skills/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  164. package/.opencode/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -71
  165. package/.opencode/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  166. package/.opencode/skills/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  167. package/.opencode/skills/ui-ux-pro-max/data/stacks/react.csv +0 -54
  168. package/.opencode/skills/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  169. package/.opencode/skills/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  170. package/.opencode/skills/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  171. package/.opencode/skills/ui-ux-pro-max/data/stacks/threejs.csv +0 -54
  172. package/.opencode/skills/ui-ux-pro-max/data/stacks/uno.csv +0 -60
  173. package/.opencode/skills/ui-ux-pro-max/data/stacks/uwp.csv +0 -56
  174. package/.opencode/skills/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  175. package/.opencode/skills/ui-ux-pro-max/data/stacks/winui.csv +0 -60
  176. package/.opencode/skills/ui-ux-pro-max/data/stacks/wpf.csv +0 -57
  177. package/.opencode/skills/ui-ux-pro-max/data/styles.csv +0 -85
  178. package/.opencode/skills/ui-ux-pro-max/data/typography.csv +0 -75
  179. package/.opencode/skills/ui-ux-pro-max/data/ui-reasoning.csv +0 -162
  180. package/.opencode/skills/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  181. package/.opencode/skills/ui-ux-pro-max/scripts/core.py +0 -464
  182. package/.opencode/skills/ui-ux-pro-max/scripts/design_system.py +0 -1479
  183. package/.opencode/skills/ui-ux-pro-max/scripts/search.py +0 -162
  184. package/.opencode/skills/ui-ux-pro-max/scripts/tests/test_core.py +0 -134
  185. package/.opencode/skills/ui-ux-pro-max/scripts/tests/test_design_system_mode.py +0 -159
  186. package/.opencode/skills/ui-ux-pro-max/scripts/validate_data.py +0 -114
  187. package/dist/hooks/bash-python-guide.d.ts +0 -4
  188. package/dist/hooks/bash-python-guide.d.ts.map +0 -1
  189. package/dist/hooks/bash-python-guide.js +0 -67
  190. package/dist/hooks/bash-python-guide.js.map +0 -1
  191. package/dist/hooks/handoff.d.ts +0 -9
  192. package/dist/hooks/handoff.d.ts.map +0 -1
  193. package/dist/hooks/handoff.js +0 -8
  194. package/dist/hooks/handoff.js.map +0 -1
  195. package/dist/hooks/hook-manager.d.ts +0 -32
  196. package/dist/hooks/hook-manager.d.ts.map +0 -1
  197. package/dist/hooks/hook-manager.js +0 -91
  198. package/dist/hooks/hook-manager.js.map +0 -1
  199. package/dist/hooks/llm-after.d.ts +0 -8
  200. package/dist/hooks/llm-after.d.ts.map +0 -1
  201. package/dist/hooks/llm-after.js +0 -8
  202. package/dist/hooks/llm-after.js.map +0 -1
  203. package/dist/hooks/media-ingest.d.ts +0 -43
  204. package/dist/hooks/media-ingest.d.ts.map +0 -1
  205. package/dist/hooks/media-ingest.js +0 -269
  206. package/dist/hooks/media-ingest.js.map +0 -1
  207. package/dist/hooks/memory-guide.d.ts +0 -3
  208. package/dist/hooks/memory-guide.d.ts.map +0 -1
  209. package/dist/hooks/memory-guide.js +0 -47
  210. package/dist/hooks/memory-guide.js.map +0 -1
  211. package/dist/hooks/observation-capture.d.ts +0 -17
  212. package/dist/hooks/observation-capture.d.ts.map +0 -1
  213. package/dist/hooks/observation-capture.js +0 -20
  214. package/dist/hooks/observation-capture.js.map +0 -1
  215. package/dist/hooks/session-compacting.d.ts +0 -6
  216. package/dist/hooks/session-compacting.d.ts.map +0 -1
  217. package/dist/hooks/session-compacting.js +0 -6
  218. package/dist/hooks/session-compacting.js.map +0 -1
  219. package/dist/hooks/session-ending.d.ts +0 -20
  220. package/dist/hooks/session-ending.d.ts.map +0 -1
  221. package/dist/hooks/session-ending.js +0 -113
  222. package/dist/hooks/session-ending.js.map +0 -1
  223. package/dist/hooks/session-recall.d.ts +0 -2
  224. package/dist/hooks/session-recall.d.ts.map +0 -1
  225. package/dist/hooks/session-recall.js +0 -103
  226. package/dist/hooks/session-recall.js.map +0 -1
  227. package/dist/hooks/session-start.d.ts +0 -9
  228. package/dist/hooks/session-start.d.ts.map +0 -1
  229. package/dist/hooks/session-start.js +0 -42
  230. package/dist/hooks/session-start.js.map +0 -1
  231. package/dist/hooks/tool-before.d.ts +0 -10
  232. package/dist/hooks/tool-before.d.ts.map +0 -1
  233. package/dist/hooks/tool-before.js +0 -6
  234. package/dist/hooks/tool-before.js.map +0 -1
  235. package/dist/hooks/tool-executed.d.ts +0 -19
  236. package/dist/hooks/tool-executed.d.ts.map +0 -1
  237. package/dist/hooks/tool-executed.js +0 -12
  238. package/dist/hooks/tool-executed.js.map +0 -1
  239. package/dist/hooks/user-profile.d.ts +0 -2
  240. package/dist/hooks/user-profile.d.ts.map +0 -1
  241. package/dist/hooks/user-profile.js +0 -30
  242. package/dist/hooks/user-profile.js.map +0 -1
  243. package/dist/hooks/user-prompt.d.ts +0 -9
  244. package/dist/hooks/user-prompt.d.ts.map +0 -1
  245. package/dist/hooks/user-prompt.js +0 -8
  246. package/dist/hooks/user-prompt.js.map +0 -1
  247. package/dist/hooks/voice-guide.d.ts +0 -8
  248. package/dist/hooks/voice-guide.d.ts.map +0 -1
  249. package/dist/hooks/voice-guide.js +0 -101
  250. package/dist/hooks/voice-guide.js.map +0 -1
  251. package/dist/plugin.d.ts +0 -55
  252. package/dist/plugin.d.ts.map +0 -1
  253. package/dist/plugin.js +0 -342
  254. package/dist/plugin.js.map +0 -1
  255. package/dist/tools/add-memory.d.ts +0 -17
  256. package/dist/tools/add-memory.d.ts.map +0 -1
  257. package/dist/tools/add-memory.js +0 -60
  258. package/dist/tools/add-memory.js.map +0 -1
  259. package/dist/tools/media-ask.d.ts +0 -14
  260. package/dist/tools/media-ask.d.ts.map +0 -1
  261. package/dist/tools/media-ask.js +0 -224
  262. package/dist/tools/media-ask.js.map +0 -1
  263. package/dist/tools/media-speak.d.ts +0 -16
  264. package/dist/tools/media-speak.d.ts.map +0 -1
  265. package/dist/tools/media-speak.js +0 -78
  266. package/dist/tools/media-speak.js.map +0 -1
  267. package/dist/tools/media-upload.d.ts +0 -14
  268. package/dist/tools/media-upload.d.ts.map +0 -1
  269. package/dist/tools/media-upload.js +0 -155
  270. package/dist/tools/media-upload.js.map +0 -1
  271. package/dist/tools/python-exec.d.ts +0 -13
  272. package/dist/tools/python-exec.d.ts.map +0 -1
  273. package/dist/tools/python-exec.js +0 -99
  274. package/dist/tools/python-exec.js.map +0 -1
  275. package/dist/tools/python-restart.d.ts +0 -11
  276. package/dist/tools/python-restart.d.ts.map +0 -1
  277. package/dist/tools/python-restart.js +0 -33
  278. package/dist/tools/python-restart.js.map +0 -1
  279. package/dist/utils/circuit-breaker.d.ts +0 -23
  280. package/dist/utils/circuit-breaker.d.ts.map +0 -1
  281. package/dist/utils/circuit-breaker.js +0 -75
  282. package/dist/utils/circuit-breaker.js.map +0 -1
  283. package/dist/utils/config-loader.d.ts +0 -20
  284. package/dist/utils/config-loader.d.ts.map +0 -1
  285. package/dist/utils/config-loader.js +0 -194
  286. package/dist/utils/config-loader.js.map +0 -1
  287. package/dist/utils/fallback.d.ts +0 -7
  288. package/dist/utils/fallback.d.ts.map +0 -1
  289. package/dist/utils/fallback.js +0 -20
  290. package/dist/utils/fallback.js.map +0 -1
  291. package/dist/utils/git.d.ts +0 -24
  292. package/dist/utils/git.d.ts.map +0 -1
  293. package/dist/utils/git.js +0 -71
  294. package/dist/utils/git.js.map +0 -1
  295. package/dist/utils/github.d.ts +0 -37
  296. package/dist/utils/github.d.ts.map +0 -1
  297. package/dist/utils/github.js +0 -53
  298. package/dist/utils/github.js.map +0 -1
  299. package/dist/utils/global-path.d.ts +0 -2
  300. package/dist/utils/global-path.d.ts.map +0 -1
  301. package/dist/utils/global-path.js +0 -32
  302. package/dist/utils/global-path.js.map +0 -1
  303. package/dist/utils/logger.d.ts +0 -6
  304. package/dist/utils/logger.d.ts.map +0 -1
  305. package/dist/utils/logger.js +0 -69
  306. package/dist/utils/logger.js.map +0 -1
  307. package/dist/utils/obs-capture.d.ts +0 -7
  308. package/dist/utils/obs-capture.d.ts.map +0 -1
  309. package/dist/utils/obs-capture.js +0 -49
  310. package/dist/utils/obs-capture.js.map +0 -1
  311. package/dist/utils/retry.d.ts +0 -11
  312. package/dist/utils/retry.d.ts.map +0 -1
  313. package/dist/utils/retry.js +0 -45
  314. package/dist/utils/retry.js.map +0 -1
  315. package/dist/utils/self-wiring.d.ts +0 -13
  316. package/dist/utils/self-wiring.d.ts.map +0 -1
  317. package/dist/utils/self-wiring.js +0 -86
  318. package/dist/utils/self-wiring.js.map +0 -1
  319. package/dist/utils/state.d.ts +0 -106
  320. package/dist/utils/state.d.ts.map +0 -1
  321. package/dist/utils/state.js +0 -166
  322. package/dist/utils/state.js.map +0 -1
  323. package/dist/utils/status.d.ts +0 -47
  324. package/dist/utils/status.d.ts.map +0 -1
  325. package/dist/utils/status.js +0 -147
  326. package/dist/utils/status.js.map +0 -1
  327. package/dist/utils/ttl-map.d.ts +0 -17
  328. package/dist/utils/ttl-map.d.ts.map +0 -1
  329. package/dist/utils/ttl-map.js +0 -67
  330. package/dist/utils/ttl-map.js.map +0 -1
@@ -1,246 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Validate token usage in codebase
4
- * Finds hardcoded values that should use design tokens
5
- *
6
- * Usage:
7
- * node validate-tokens.cjs --dir src/
8
- * node validate-tokens.cjs --dir src/ --fix
9
- */
10
-
11
- const fs = require('fs');
12
- const path = require('path');
13
-
14
- /**
15
- * Parse command line arguments
16
- */
17
- function parseArgs() {
18
- const args = process.argv.slice(2);
19
- const options = {
20
- dir: null,
21
- fix: false,
22
- ignore: ['node_modules', '.git', 'dist', 'build', '.next']
23
- };
24
-
25
- for (let i = 0; i < args.length; i++) {
26
- if (args[i] === '--dir' || args[i] === '-d') {
27
- options.dir = args[++i];
28
- } else if (args[i] === '--fix') {
29
- options.fix = true;
30
- } else if (args[i] === '--ignore' || args[i] === '-i') {
31
- options.ignore.push(args[++i]);
32
- } else if (args[i] === '--help' || args[i] === '-h') {
33
- console.log(`
34
- Usage: node validate-tokens.cjs [options]
35
-
36
- Options:
37
- -d, --dir <path> Directory to scan (required)
38
- --fix Show suggested fixes (no auto-fix)
39
- -i, --ignore <dir> Additional directories to ignore
40
- -h, --help Show this help
41
-
42
- Checks for:
43
- - Hardcoded hex colors (#RGB, #RRGGBB)
44
- - Hardcoded pixel values (except 0, 1px)
45
- - Hardcoded rem values in CSS
46
- `);
47
- process.exit(0);
48
- }
49
- }
50
-
51
- return options;
52
- }
53
-
54
- /**
55
- * Patterns to detect hardcoded values
56
- */
57
- const patterns = {
58
- hexColor: {
59
- regex: /#([0-9A-Fa-f]{3}){1,2}\b/g,
60
- message: 'Hardcoded hex color',
61
- suggestion: 'Use var(--color-*) token'
62
- },
63
- rgbColor: {
64
- regex: /rgb\s*\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)/gi,
65
- message: 'Hardcoded RGB color',
66
- suggestion: 'Use var(--color-*) token'
67
- },
68
- pixelValue: {
69
- regex: /:\s*(\d{2,})px/g, // 2+ digit px values
70
- message: 'Hardcoded pixel value',
71
- suggestion: 'Use var(--space-*) or var(--radius-*) token'
72
- },
73
- remValue: {
74
- regex: /:\s*\d+\.?\d*rem(?![^{]*\$value)/g, // rem not in token definition
75
- message: 'Hardcoded rem value',
76
- suggestion: 'Use var(--space-*) or var(--font-size-*) token'
77
- }
78
- };
79
-
80
- /**
81
- * File extensions to scan
82
- */
83
- const extensions = ['.css', '.scss', '.tsx', '.jsx', '.ts', '.js', '.vue', '.svelte'];
84
-
85
- /**
86
- * Files/patterns to skip
87
- */
88
- const skipPatterns = [
89
- /\.min\.(css|js)$/,
90
- /tailwind\.config/,
91
- /globals\.css/, // Token definitions
92
- /tokens\.(css|json)/
93
- ];
94
-
95
- /**
96
- * Get all files recursively
97
- */
98
- function getFiles(dir, ignore, files = []) {
99
- const entries = fs.readdirSync(dir, { withFileTypes: true });
100
-
101
- for (const entry of entries) {
102
- const fullPath = path.join(dir, entry.name);
103
-
104
- if (entry.isDirectory()) {
105
- if (!ignore.includes(entry.name)) {
106
- getFiles(fullPath, ignore, files);
107
- }
108
- } else if (entry.isFile()) {
109
- const ext = path.extname(entry.name);
110
- if (extensions.includes(ext)) {
111
- files.push(fullPath);
112
- }
113
- }
114
- }
115
-
116
- return files;
117
- }
118
-
119
- /**
120
- * Check if file should be skipped
121
- */
122
- function shouldSkip(filePath) {
123
- return skipPatterns.some(pattern => pattern.test(filePath));
124
- }
125
-
126
- /**
127
- * Scan file for violations
128
- */
129
- function scanFile(filePath) {
130
- const content = fs.readFileSync(filePath, 'utf-8');
131
- const lines = content.split('\n');
132
- const violations = [];
133
-
134
- lines.forEach((line, index) => {
135
- // Skip comments
136
- if (line.trim().startsWith('//') || line.trim().startsWith('/*')) {
137
- return;
138
- }
139
-
140
- for (const [name, pattern] of Object.entries(patterns)) {
141
- const matches = line.match(pattern.regex);
142
- if (matches) {
143
- matches.forEach(match => {
144
- // Skip common exceptions
145
- if (name === 'hexColor' && ['#000', '#fff', '#FFF', '#000000', '#FFFFFF'].includes(match.toUpperCase())) {
146
- return; // Skip black/white, often intentional
147
- }
148
-
149
- violations.push({
150
- file: filePath,
151
- line: index + 1,
152
- column: line.indexOf(match) + 1,
153
- value: match,
154
- type: name,
155
- message: pattern.message,
156
- suggestion: pattern.suggestion,
157
- context: line.trim().substring(0, 80)
158
- });
159
- });
160
- }
161
- }
162
- });
163
-
164
- return violations;
165
- }
166
-
167
- /**
168
- * Format violation report
169
- */
170
- function formatReport(violations) {
171
- if (violations.length === 0) {
172
- return '✅ No token violations found';
173
- }
174
-
175
- let report = `⚠️ Found ${violations.length} potential token violations:\n\n`;
176
-
177
- // Group by file
178
- const byFile = {};
179
- violations.forEach(v => {
180
- if (!byFile[v.file]) byFile[v.file] = [];
181
- byFile[v.file].push(v);
182
- });
183
-
184
- for (const [file, fileViolations] of Object.entries(byFile)) {
185
- report += `📁 ${file}\n`;
186
- fileViolations.forEach(v => {
187
- report += ` Line ${v.line}: ${v.message}\n`;
188
- report += ` Found: ${v.value}\n`;
189
- report += ` Suggestion: ${v.suggestion}\n`;
190
- report += ` Context: ${v.context}\n\n`;
191
- });
192
- }
193
-
194
- // Summary
195
- const byType = {};
196
- violations.forEach(v => {
197
- byType[v.type] = (byType[v.type] || 0) + 1;
198
- });
199
-
200
- report += `\n📊 Summary:\n`;
201
- for (const [type, count] of Object.entries(byType)) {
202
- report += ` ${patterns[type].message}: ${count}\n`;
203
- }
204
-
205
- return report;
206
- }
207
-
208
- /**
209
- * Main
210
- */
211
- function main() {
212
- const options = parseArgs();
213
-
214
- if (!options.dir) {
215
- console.error('Error: --dir is required');
216
- process.exit(1);
217
- }
218
-
219
- const dirPath = path.resolve(process.cwd(), options.dir);
220
-
221
- if (!fs.existsSync(dirPath)) {
222
- console.error(`Error: Directory not found: ${dirPath}`);
223
- process.exit(1);
224
- }
225
-
226
- console.log(`Scanning ${dirPath} for token violations...\n`);
227
-
228
- const files = getFiles(dirPath, options.ignore);
229
- const allViolations = [];
230
-
231
- for (const file of files) {
232
- if (shouldSkip(file)) continue;
233
-
234
- const violations = scanFile(file);
235
- allViolations.push(...violations);
236
- }
237
-
238
- console.log(formatReport(allViolations));
239
-
240
- // Exit with error code if violations found
241
- if (allViolations.length > 0) {
242
- process.exit(1);
243
- }
244
- }
245
-
246
- main();
@@ -1,143 +0,0 @@
1
- {
2
- "$schema": "https://design-tokens.org/schema.json",
3
- "primitive": {
4
- "color": {
5
- "gray": {
6
- "50": { "$value": "#F9FAFB", "$type": "color" },
7
- "100": { "$value": "#F3F4F6", "$type": "color" },
8
- "200": { "$value": "#E5E7EB", "$type": "color" },
9
- "300": { "$value": "#D1D5DB", "$type": "color" },
10
- "400": { "$value": "#9CA3AF", "$type": "color" },
11
- "500": { "$value": "#6B7280", "$type": "color" },
12
- "600": { "$value": "#4B5563", "$type": "color" },
13
- "700": { "$value": "#374151", "$type": "color" },
14
- "800": { "$value": "#1F2937", "$type": "color" },
15
- "900": { "$value": "#111827", "$type": "color" },
16
- "950": { "$value": "#030712", "$type": "color" }
17
- },
18
- "blue": {
19
- "50": { "$value": "#EFF6FF", "$type": "color" },
20
- "500": { "$value": "#3B82F6", "$type": "color" },
21
- "600": { "$value": "#2563EB", "$type": "color" },
22
- "700": { "$value": "#1D4ED8", "$type": "color" },
23
- "800": { "$value": "#1E40AF", "$type": "color" }
24
- },
25
- "red": {
26
- "500": { "$value": "#EF4444", "$type": "color" },
27
- "600": { "$value": "#DC2626", "$type": "color" },
28
- "700": { "$value": "#B91C1C", "$type": "color" }
29
- },
30
- "green": {
31
- "500": { "$value": "#22C55E", "$type": "color" },
32
- "600": { "$value": "#16A34A", "$type": "color" }
33
- },
34
- "yellow": {
35
- "500": { "$value": "#EAB308", "$type": "color" }
36
- },
37
- "white": { "$value": "#FFFFFF", "$type": "color" }
38
- },
39
- "spacing": {
40
- "0": { "$value": "0", "$type": "dimension" },
41
- "1": { "$value": "0.25rem", "$type": "dimension" },
42
- "2": { "$value": "0.5rem", "$type": "dimension" },
43
- "3": { "$value": "0.75rem", "$type": "dimension" },
44
- "4": { "$value": "1rem", "$type": "dimension" },
45
- "5": { "$value": "1.25rem", "$type": "dimension" },
46
- "6": { "$value": "1.5rem", "$type": "dimension" },
47
- "8": { "$value": "2rem", "$type": "dimension" },
48
- "10": { "$value": "2.5rem", "$type": "dimension" },
49
- "12": { "$value": "3rem", "$type": "dimension" },
50
- "16": { "$value": "4rem", "$type": "dimension" }
51
- },
52
- "fontSize": {
53
- "xs": { "$value": "0.75rem", "$type": "dimension" },
54
- "sm": { "$value": "0.875rem", "$type": "dimension" },
55
- "base": { "$value": "1rem", "$type": "dimension" },
56
- "lg": { "$value": "1.125rem", "$type": "dimension" },
57
- "xl": { "$value": "1.25rem", "$type": "dimension" },
58
- "2xl": { "$value": "1.5rem", "$type": "dimension" },
59
- "3xl": { "$value": "1.875rem", "$type": "dimension" },
60
- "4xl": { "$value": "2.25rem", "$type": "dimension" }
61
- },
62
- "radius": {
63
- "none": { "$value": "0", "$type": "dimension" },
64
- "sm": { "$value": "0.125rem", "$type": "dimension" },
65
- "default": { "$value": "0.25rem", "$type": "dimension" },
66
- "md": { "$value": "0.375rem", "$type": "dimension" },
67
- "lg": { "$value": "0.5rem", "$type": "dimension" },
68
- "xl": { "$value": "0.75rem", "$type": "dimension" },
69
- "full": { "$value": "9999px", "$type": "dimension" }
70
- },
71
- "shadow": {
72
- "none": { "$value": "none", "$type": "shadow" },
73
- "sm": { "$value": "0 1px 2px 0 rgb(0 0 0 / 0.05)", "$type": "shadow" },
74
- "default": { "$value": "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)", "$type": "shadow" },
75
- "md": { "$value": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)", "$type": "shadow" },
76
- "lg": { "$value": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)", "$type": "shadow" }
77
- },
78
- "duration": {
79
- "fast": { "$value": "150ms", "$type": "duration" },
80
- "normal": { "$value": "200ms", "$type": "duration" },
81
- "slow": { "$value": "300ms", "$type": "duration" }
82
- }
83
- },
84
- "semantic": {
85
- "color": {
86
- "background": { "$value": "{primitive.color.gray.50}", "$type": "color" },
87
- "foreground": { "$value": "{primitive.color.gray.900}", "$type": "color" },
88
- "primary": { "$value": "{primitive.color.blue.600}", "$type": "color" },
89
- "primary-hover": { "$value": "{primitive.color.blue.700}", "$type": "color" },
90
- "primary-foreground": { "$value": "{primitive.color.white}", "$type": "color" },
91
- "secondary": { "$value": "{primitive.color.gray.100}", "$type": "color" },
92
- "secondary-foreground": { "$value": "{primitive.color.gray.900}", "$type": "color" },
93
- "muted": { "$value": "{primitive.color.gray.100}", "$type": "color" },
94
- "muted-foreground": { "$value": "{primitive.color.gray.500}", "$type": "color" },
95
- "destructive": { "$value": "{primitive.color.red.600}", "$type": "color" },
96
- "destructive-foreground": { "$value": "{primitive.color.white}", "$type": "color" },
97
- "border": { "$value": "{primitive.color.gray.200}", "$type": "color" },
98
- "ring": { "$value": "{primitive.color.blue.500}", "$type": "color" }
99
- },
100
- "spacing": {
101
- "component": { "$value": "{primitive.spacing.4}", "$type": "dimension" },
102
- "section": { "$value": "{primitive.spacing.12}", "$type": "dimension" }
103
- }
104
- },
105
- "component": {
106
- "button": {
107
- "bg": { "$value": "{semantic.color.primary}", "$type": "color" },
108
- "fg": { "$value": "{semantic.color.primary-foreground}", "$type": "color" },
109
- "hover-bg": { "$value": "{semantic.color.primary-hover}", "$type": "color" },
110
- "padding-x": { "$value": "{primitive.spacing.4}", "$type": "dimension" },
111
- "padding-y": { "$value": "{primitive.spacing.2}", "$type": "dimension" },
112
- "radius": { "$value": "{primitive.radius.md}", "$type": "dimension" },
113
- "font-size": { "$value": "{primitive.fontSize.sm}", "$type": "dimension" }
114
- },
115
- "input": {
116
- "bg": { "$value": "{semantic.color.background}", "$type": "color" },
117
- "border": { "$value": "{semantic.color.border}", "$type": "color" },
118
- "focus-ring": { "$value": "{semantic.color.ring}", "$type": "color" },
119
- "padding-x": { "$value": "{primitive.spacing.3}", "$type": "dimension" },
120
- "padding-y": { "$value": "{primitive.spacing.2}", "$type": "dimension" },
121
- "radius": { "$value": "{primitive.radius.md}", "$type": "dimension" }
122
- },
123
- "card": {
124
- "bg": { "$value": "{primitive.color.white}", "$type": "color" },
125
- "border": { "$value": "{semantic.color.border}", "$type": "color" },
126
- "shadow": { "$value": "{primitive.shadow.default}", "$type": "shadow" },
127
- "padding": { "$value": "{primitive.spacing.6}", "$type": "dimension" },
128
- "radius": { "$value": "{primitive.radius.lg}", "$type": "dimension" }
129
- }
130
- },
131
- "dark": {
132
- "semantic": {
133
- "color": {
134
- "background": { "$value": "{primitive.color.gray.950}", "$type": "color" },
135
- "foreground": { "$value": "{primitive.color.gray.50}", "$type": "color" },
136
- "secondary": { "$value": "{primitive.color.gray.800}", "$type": "color" },
137
- "muted": { "$value": "{primitive.color.gray.800}", "$type": "color" },
138
- "muted-foreground": { "$value": "{primitive.color.gray.400}", "$type": "color" },
139
- "border": { "$value": "{primitive.color.gray.800}", "$type": "color" }
140
- }
141
- }
142
- }
143
- }
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Alan
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,115 +0,0 @@
1
- ---
2
- name: frontend-design
3
- description: Build a frontend with a deliberate visual direction held through palette, typography, structure, and texture, with on-screen strings that name real information rather than fabricated demo data or filler labels. Use when building or restyling a frontend.
4
- ---
5
-
6
- # Frontend Design Skill
7
-
8
- Eight anchors. Each is a distinct aesthetic territory locked to specific CSS tokens. Pick one per brief. Match its tokens.
9
-
10
- > **Reach for the unexpected. Fidelity to the anchor. Discipline on the content. Nothing left to default.**
11
-
12
- ---
13
-
14
- ## 1. How to work
15
-
16
- Before writing code, run this sequence:
17
-
18
- 1. **Context** — Identify purpose, audience, domain, content density. State the problem in one sentence.
19
- 2. **Anchor** — Pick one. Lean unexpected. A Swiss punk record label, an Industrial florist, a Brutalist luxury watchmaker, an Aurora tax app, a Chaotic law firm, a Retro-Futuristic wedding photographer, an Organic trading terminal, a Lo-Fi luxury hotel — each more distinctive than its safe counterpart. Safe pairings produce generic work. Unexpectedness is surface-level — what a first-time viewer sees. Don't let "users are technical" or "it's really a data tool" route every brief to Industrial. State the choice and the reason in one line.
20
- 3. **Differentiator** — Define one memorable anchor-internal move: a signature interaction, a typographic gesture, a layout motif, or a material treatment. One sentence. Describable. Visible in the rendered output.
21
- 4. **System** — Match the chosen anchor's tokens exactly. Picking Swiss means white + sans + grid, not "some flavor of clean."
22
- 5. **Implementation** — Outline structure, then build. Content on screen is authored to the discipline in §2 — no fabrication, no filler, no themed replacement for standard UI copy.
23
-
24
- Commit fully to one anchor. Hybridising ("Swiss with Brutalist edge") is a category error — each signature excludes the others by construction.
25
-
26
- ---
27
-
28
- ## 2. Content is not design
29
-
30
- Design is visuals — palette, typography, structure, texture. **Content — every string, number, and label on screen — is authored separately and has its own discipline.** Token fidelity is not a defence against content slop.
31
-
32
- The rule: every string on screen must either name real information from the product, or be authored content that knows what it is — headline, button label, legal body, form field name, sample data that reads as sample. What's forbidden is content pretending to be something it isn't.
33
-
34
- **Forbidden:**
35
-
36
- - **Fabrication posing as real data.** Invented session personas (`a.chen@grid.co`), fake telemetry (`GRID.FREQ 59.998 Hz`, `BUILD 8.2.0-rc3`). If a slot has no real content, leave it empty — do not fabricate to make the screen look alive.
37
- - **Filler labels.** Mono-caps subtitles nobody asked for (`SECURE OPERATOR AUTHENTICATION` under a login masthead), `//`-prefixed kickers pretending to be code comments (`// INTELLIGENCE LAYER`). If removing the string removes no information, it was filler.
38
- - **Themed replacement of standard UI copy.** `Authenticate Session` instead of `Next`; `Remember this operator` instead of `Remember me`. Standard copy for standard actions. Themed copy is a tax that must be paid with actual utility.
39
- - **Unicode glyphs as icon substitutes.** `▣ Dashboard`, `◊ Market Navigator`. Either use a real icon set or use nothing. ASCII art is not iconography.
40
- - **AI-slop register.** The model recognises this. Twee subcopy on serious surfaces (`Ask the grid.`), synth-sci-fi status strips on mundane B2B, ornamental "seam"/"joinery" flourishes pretending to be structural. Recognise it in your own output; cut it before the reviewer does.
41
-
42
- ---
43
-
44
- ## 3. The eight anchors
45
-
46
- Each anchor locks specific CSS tokens. Picking the anchor commits to those tokens. If the rendered output drifts outside them, the anchor didn't hold.
47
-
48
- ### 1. Swiss
49
-
50
- **Surface:** Pure white `#FFFFFF` or neutral `#F7F7F8`. **Typography:** Akzidenz-Grotesk, Helvetica Neue, or Söhne — sans display and body, one family. **Accent:** Swiss Red `#E4002B`, International Orange `#FF4F00`, or Yves Klein Blue `#002FA7` — one, used deliberately. **Structure:** visible grid lines or 1 px hairline rules. Left-aligned typography; asymmetric balance. Numerals as composition elements (dates, folio numbers, page markers set in condensed sans).
51
-
52
- **Breaks if:** warm paper, serif display, grain texture, or centered typography appears.
53
-
54
- ### 2. Industrial
55
-
56
- **Surface:** Pitch black `#000000` or warm-black `#0B0C0A`. **Typography:** IBM Plex Mono, JetBrains Mono, or Berkeley Mono — mono for display and body. **Signal color:** one semantic — green `#00E676`, red `#FF3B30`, amber `#FFB800`, or acid lime `#C6FF4A`. **Structure:** flat; 1 px borders instead of shadows. Tabular numerics via `font-variant-numeric: tabular-nums`.
57
-
58
- **Breaks if:** serif typography, proportional fonts, warm paper, any grain, decorative shadows, or rounded corners appear.
59
-
60
- ### 3. Brutalist
61
-
62
- **Surface:** Pure primary or anti-primary — `#FF0000`, `#0000FF`, `#FFFF00`, `#000000`, `#FFFFFF`. Pick 2–3, compete equally. **Typography:** system fonts only — Times New Roman, Helvetica, Courier, Arial, system-ui. Mix faces deliberately. **Shadows:** hard offset, no blur — `box-shadow: 8px 8px 0 #000`. **Controls:** native browser — unstyled `<button>`, default `<select>`, underlined blue links that stay blue. Margins crushed; type runs edge-to-edge.
63
-
64
- **Breaks if:** webfonts, tuned hex beyond pure primaries, soft shadows, rounded corners, or centered layout appear.
65
-
66
- ### 4. Aurora Maximalism
67
-
68
- **Surface:** Dark saturated gradient — `linear-gradient` or `conic-gradient` through violet `#5D34D0` → magenta `#FF006E` → cyan `#00F0FF`, or `#3B82F6 → #A855F7 → #EC4899`. **Typography:** Inter Variable, PP Neue Machina, or Sharp Grotesk for oversized display (15–25 vw). **Texture:** mesh gradient as primary surface feature; neon `text-shadow` glow on accents (`0 0 20px <accent>`). **Motion:** spring-physics orchestration, scroll-linked parallax.
69
-
70
- **Breaks if:** flat backgrounds, warm paper, restraint, or hairline rules as primary structure appear.
71
-
72
- ### 5. Chaotic Maximalism
73
-
74
- **Surface:** Clashing palette — pastels *and* neons in the same composition. Hot pink `#FF71CE` + acid yellow `#DFFF00` + cyan `#00FFFF` + any third. **Typography:** mixed faces deliberately colliding — 3+ faces from different registers on the same page. **Texture:** patterns on every surface (squiggles, dots, zigzags, checker — SVG or `repeating-linear-gradient`). Oversized display crashing against busy ground.
75
-
76
- **Breaks if:** coherent palette, single typeface, whitespace as structural element, or 60/30/10 dominance appears.
77
-
78
- ### 6. Retro-Futuristic
79
-
80
- **Surface:** Pitch black `#0A0014` or deep navy-black. **Typography:** period-specific — VT323 (CRT), Orbitron (synthwave), Space Mono (cyberpunk), Monoton (Miami-neon), Press Start 2P (arcade), IBM Plex Mono (terminal). **Accent:** neon pair — magenta `#FF006E` + cyan `#00FFFF` (synthwave) or phosphor green `#00FF41` + amber `#FFB000` (terminal). **Texture:** CRT scanlines via `::before` `repeating-linear-gradient` overlay, or chromatic aberration (`text-shadow: 2px 0 #FF0000, -2px 0 #00FFFF`), or both. Glow committed.
81
-
82
- **Breaks if:** flatness, modern sans-serifs (Inter, Söhne), paper surfaces, or absence of texture appears.
83
-
84
- ### 7. Organic
85
-
86
- **Surface:** Earth tones — sage `#8B9D83`, clay `#B08B6E`, terracotta `#C66B3D`, ochre `#C08E3A`, moss `#606C38`. When a light surface is needed: sand `#E8DCC7` or oat `#D4B895`. **Never cream `#F0-F8` warm-paper range.** **Typography:** humanist serif (Freight, Caslon, Fraunces — Fraunces is restricted to this anchor only) or warm geometric sans (Greycliff, Epilogue, Recoleta). **Structure:** rounded corners 16–32 px. **Texture:** grain at 1–3 % via SVG feTurbulence. **Motion:** gentle ease 300–500 ms, breathing animations on hero elements.
87
-
88
- **Breaks if:** cream backgrounds (warm-tinted `#F0+`), cold greys, pure whites, pure blacks, or hard rectangles appear.
89
-
90
- ### 8. Lo-Fi
91
-
92
- **Surface:** Paper-yellow `#E8E0C0` or `#EDE4CF` — more saturated than cream. **Typography:** mixed system fonts on the same page (Times + Helvetica + Courier colliding deliberately). **Structure:** rotated elements (2–8° off-grid via `transform: rotate`). **Texture:** halftone dot transitions (SVG pattern or `radial-gradient` tile) on imagery; Risograph misregistration (2–4 px RGB channel offset via `text-shadow: 3px 0 #FF006E, -3px 0 #00FFCC`). SVG staple, tape, torn-edge elements.
93
-
94
- **Breaks if:** precision, single typeface, smooth motion, rectangles squared to the grid, or cream (the surface is specifically paper-yellow, more saturated) appears.
95
-
96
- ---
97
-
98
- ## 4. Output
99
-
100
- Every implementation delivers:
101
-
102
- - **Stated direction** — A short preamble in a designer's prose before the code, naming: the chosen anchor, why this pairing over the safe one, the differentiator, and the key palette / typefaces / texture choices pulled from the anchor. Written with conviction, not as a checklist.
103
- - **Token fidelity** — The rendered CSS matches the anchor's tokens exactly. If Swiss is chosen, the CSS contains no warm paper, no Fraunces, no grain. If Industrial is chosen, every typeface declared is monospace. Token drift means the anchor didn't hold.
104
- - **Content discipline** — Every string, number, and label on screen names real information or is authored content that knows what it is. No fabricated data, no filler labels, no themed replacement for standard UI copy, no unicode-glyph icons. Token fidelity alone is not sufficient; content ships too.
105
- - **Differentiator visible** — The one memorable move is implemented in the rendered output, not merely described.
106
-
107
- ---
108
-
109
- ## 5. Before shipping
110
-
111
- - **Unexpected pairing** — Did the choice reach for creative tension, or default to the safe pairing?
112
- - **Token fidelity** — Does every rendered token live inside the anchor's allowed range? If tokens appear that the anchor doesn't allow, the anchor didn't hold.
113
- - **Content discipline** — Every label names real information; standard UI copy for standard actions; no fabrication, filler mono-caps, `//` kickers, unicode-glyph icons, twee subcopy, or AI-slop register. If any appeared, cut.
114
- - **Differentiator visible** — Is the memorable anchor-internal move actually rendered?
115
- - **Hybrid resistance** — Was one anchor held, or did the execution drift into "Swiss with Brutalist edge"?
@@ -1,43 +0,0 @@
1
- # MAFW Automation Interview Skill
2
-
3
- ## 职责
4
-
5
- 帮助用户配置自动化规则(automations/*.json)。
6
-
7
- ## 工作流程
8
-
9
- 1. 询问用户:触发条件(cron schedule)
10
- 2. 询问用户:发现方式(Skill 名称)
11
- 3. 询问用户:结果处理方式(triage 或 direct goal)
12
- 4. 询问用户:默认 Goal 参数(maxLoops, metrics)
13
- 5. 确认后写入 automations/{id}.json
14
-
15
- ## 输出格式
16
-
17
- ```json
18
- {
19
- "id": "daily-github",
20
- "enabled": true,
21
- "trigger": {
22
- "type": "cron",
23
- "schedule": "0 7 * * *",
24
- "timezone": "Asia/Shanghai"
25
- },
26
- "skill": "mafw-github-scanner",
27
- "args": {},
28
- "onResult": {
29
- "type": "triage",
30
- "auto_confirm": false
31
- },
32
- "goal_defaults": {
33
- "maxLoops": 3
34
- }
35
- }
36
- ```
37
-
38
- ## 约束
39
-
40
- - schedule 必须是有效的 cron 表达式
41
- - skill 必须是已注册的扫描器 Skill
42
- - 用户确认后才写入文件
43
- - 写入后触发 RELOAD_AUTOMATIONS 控制信号
@@ -1,37 +0,0 @@
1
- # MAFW CLI Scanner Skill
2
-
3
- ## 职责
4
-
5
- 通过本地命令行扫描项目状态,发现需要 Agent 处理的工作。
6
-
7
- ## 工作流程
8
-
9
- 1. 执行本地命令(如 `git status`, `npm outdated`)
10
- 2. 解析输出
11
- 3. 返回 findings 列表
12
-
13
- ## 输入
14
-
15
- ```json
16
- {
17
- "commands": ["git status --short", "npm outdated --json"],
18
- "filters": ["modified_files", "outdated_packages"]
19
- }
20
- ```
21
-
22
- ## 输出
23
-
24
- ```json
25
- {
26
- "findings": [
27
- { "type": "modified_file", "count": 5 },
28
- { "type": "outdated_package", "count": 2 }
29
- ]
30
- }
31
- ```
32
-
33
- ## 约束
34
-
35
- - 不直接创建 Goal,只返回 findings
36
- - Automation Engine 决定如何处理 findings
37
- - 命令执行超时 30 秒
@@ -1,52 +0,0 @@
1
- # MAFW Compression Verifier — Compaction Verification Skill
2
-
3
- ## 角色
4
-
5
- Compression Verifier Agent — 验证 L2 压缩后的 Lesson 是否丢失关键信息。
6
-
7
- ## 职责
8
-
9
- 1. 对比压缩前后的 Lesson 内容
10
- 2. 运行 5 项验证清单
11
- 3. 发现丢失时拒绝压缩,保留原始版本
12
- 4. 确保压缩后 YAML 可被 MemoryExtractor 正确解析
13
-
14
- ## 输入
15
-
16
- - 原始 RawLesson(自然语言)
17
- - 压缩后 CompactedLesson(YAML)
18
-
19
- ## 5 项验证清单
20
-
21
- | # | 规则 | 检查内容 |
22
- |---|------|----------|
23
- | V1 | loop 不丢失 | comp.loop === orig.loop |
24
- | V2 | result 不丢失 | comp.result === orig.result |
25
- | V3 | domain 不丢失 | comp.domain === orig.domain |
26
- | V4 | 核心动作不丢失 | lesson 必须包含"必须/禁止/should/must"等动词 |
27
- | V5 | violation.rule 不丢失 | 若原始有 violation,压缩后 rule 必须保留 |
28
-
29
- ## 输出
30
-
31
- ```json
32
- {
33
- "pass": false,
34
- "failures": [
35
- "[V4] lesson 核心动作丢失: 原始包含'必须引用AGENTS.md',压缩后未保留"
36
- ]
37
- }
38
- ```
39
-
40
- ## 核心约束
41
-
42
- - 任何一项失败 → 拒绝压缩,保留原始版本
43
- - 不能为了压缩率而牺牲信息完整性
44
- - 压缩后的 YAML 必须语法正确,可被解析
45
- - 原始文件必须保留备份(至少保留 30 天)
46
-
47
- ## 自检清单
48
-
49
- 验证完成后,必须回答:
50
- 1. [ ] 5 项检查是否全部通过?
51
- 2. [ ] 压缩后的 YAML 是否可解析?
52
- 3. [ ] 若失败,是否保留了原始版本?