flyee 0.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 (302) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/bin/install.js +357 -0
  4. package/bridge/bridge.py +1780 -0
  5. package/bridge/local_tracker.py +722 -0
  6. package/core/agents/backend-specialist.md +266 -0
  7. package/core/agents/code-archaeologist.md +106 -0
  8. package/core/agents/database-architect.md +226 -0
  9. package/core/agents/debugger.md +225 -0
  10. package/core/agents/devops-engineer.md +323 -0
  11. package/core/agents/documentation-writer.md +104 -0
  12. package/core/agents/explorer-agent.md +73 -0
  13. package/core/agents/frontend-specialist.md +743 -0
  14. package/core/agents/game-developer.md +162 -0
  15. package/core/agents/mobile-developer.md +377 -0
  16. package/core/agents/orchestrator.md +416 -0
  17. package/core/agents/penetration-tester.md +188 -0
  18. package/core/agents/performance-optimizer.md +187 -0
  19. package/core/agents/product-manager.md +112 -0
  20. package/core/agents/product-owner.md +95 -0
  21. package/core/agents/project-planner.md +470 -0
  22. package/core/agents/qa-automation-engineer.md +103 -0
  23. package/core/agents/security-auditor.md +170 -0
  24. package/core/agents/seo-specialist.md +111 -0
  25. package/core/agents/stitch-designer.md +190 -0
  26. package/core/agents/tdd-reviewer.md +282 -0
  27. package/core/agents/test-engineer.md +158 -0
  28. package/core/scripts/auto_preview.py +148 -0
  29. package/core/scripts/checklist.py +243 -0
  30. package/core/scripts/cost_report.py +149 -0
  31. package/core/scripts/doc-sync-check.py +461 -0
  32. package/core/scripts/parse_user_stories.py +79 -0
  33. package/core/scripts/prepare_notion_updates.py +172 -0
  34. package/core/scripts/print_create_payload.py +18 -0
  35. package/core/scripts/session_manager.py +120 -0
  36. package/core/scripts/task_complete.py +127 -0
  37. package/core/scripts/verify_all.py +327 -0
  38. package/core/skills/analytics-strategy/SKILL.md +128 -0
  39. package/core/skills/api-patterns/SKILL.md +81 -0
  40. package/core/skills/api-patterns/api-style.md +42 -0
  41. package/core/skills/api-patterns/auth.md +24 -0
  42. package/core/skills/api-patterns/documentation.md +26 -0
  43. package/core/skills/api-patterns/graphql.md +41 -0
  44. package/core/skills/api-patterns/rate-limiting.md +31 -0
  45. package/core/skills/api-patterns/response.md +37 -0
  46. package/core/skills/api-patterns/rest.md +40 -0
  47. package/core/skills/api-patterns/scripts/api_validator.py +211 -0
  48. package/core/skills/api-patterns/security-testing.md +122 -0
  49. package/core/skills/api-patterns/trpc.md +41 -0
  50. package/core/skills/api-patterns/versioning.md +22 -0
  51. package/core/skills/app-builder/SKILL.md +75 -0
  52. package/core/skills/app-builder/agent-coordination.md +71 -0
  53. package/core/skills/app-builder/feature-building.md +53 -0
  54. package/core/skills/app-builder/project-detection.md +34 -0
  55. package/core/skills/app-builder/scaffolding.md +118 -0
  56. package/core/skills/app-builder/tech-stack.md +40 -0
  57. package/core/skills/app-builder/templates/SKILL.md +39 -0
  58. package/core/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  59. package/core/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  60. package/core/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  61. package/core/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  62. package/core/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  63. package/core/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  64. package/core/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  65. package/core/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
  66. package/core/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  67. package/core/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  68. package/core/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
  69. package/core/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  70. package/core/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  71. package/core/skills/architecture/SKILL.md +55 -0
  72. package/core/skills/architecture/context-discovery.md +43 -0
  73. package/core/skills/architecture/examples.md +94 -0
  74. package/core/skills/architecture/pattern-selection.md +68 -0
  75. package/core/skills/architecture/patterns-reference.md +50 -0
  76. package/core/skills/architecture/trade-off-analysis.md +77 -0
  77. package/core/skills/atomic-design/SKILL.md +282 -0
  78. package/core/skills/atomic-design/references/classification-guide.md +132 -0
  79. package/core/skills/atomic-design/references/quality-checklist.md +60 -0
  80. package/core/skills/atomic-design/references/stacks/stack-blade.md +254 -0
  81. package/core/skills/atomic-design/references/stacks/stack-nextjs.md +272 -0
  82. package/core/skills/atomic-design/references/stacks/stack-react.md +239 -0
  83. package/core/skills/atomic-design/references/stacks/stack-vue.md +224 -0
  84. package/core/skills/bash-linux/SKILL.md +199 -0
  85. package/core/skills/behavioral-modes/SKILL.md +242 -0
  86. package/core/skills/brainstorming/SKILL.md +163 -0
  87. package/core/skills/brainstorming/dynamic-questioning.md +373 -0
  88. package/core/skills/checkpointing-patterns/SKILL.md +163 -0
  89. package/core/skills/clean-code/SKILL.md +201 -0
  90. package/core/skills/code-review-checklist/SKILL.md +109 -0
  91. package/core/skills/code-truth-validation/SKILL.md +149 -0
  92. package/core/skills/component-library-discovery/SKILL.md +154 -0
  93. package/core/skills/content-strategy/SKILL.md +222 -0
  94. package/core/skills/context-budget/SKILL.md +155 -0
  95. package/core/skills/context-gathering-patterns/SKILL.md +278 -0
  96. package/core/skills/cost-tracking/SKILL.md +206 -0
  97. package/core/skills/database-design/SKILL.md +52 -0
  98. package/core/skills/database-design/database-selection.md +43 -0
  99. package/core/skills/database-design/indexing.md +39 -0
  100. package/core/skills/database-design/migrations.md +48 -0
  101. package/core/skills/database-design/optimization.md +36 -0
  102. package/core/skills/database-design/orm-selection.md +30 -0
  103. package/core/skills/database-design/schema-design.md +56 -0
  104. package/core/skills/database-design/scripts/schema_validator.py +172 -0
  105. package/core/skills/deployment-procedures/SKILL.md +295 -0
  106. package/core/skills/design-md/README.md +34 -0
  107. package/core/skills/design-md/SKILL.md +172 -0
  108. package/core/skills/design-md/examples/DESIGN.md +154 -0
  109. package/core/skills/design-system-enforcement/SKILL.md +339 -0
  110. package/core/skills/doc.md +177 -0
  111. package/core/skills/document-registry/SKILL.md +130 -0
  112. package/core/skills/documentation-publishing/SKILL.md +174 -0
  113. package/core/skills/documentation-templates/SKILL.md +194 -0
  114. package/core/skills/enhance-prompt/README.md +34 -0
  115. package/core/skills/enhance-prompt/SKILL.md +204 -0
  116. package/core/skills/enhance-prompt/references/KEYWORDS.md +114 -0
  117. package/core/skills/frontend-design/SKILL.md +430 -0
  118. package/core/skills/frontend-design/animation-guide.md +331 -0
  119. package/core/skills/frontend-design/color-system.md +311 -0
  120. package/core/skills/frontend-design/decision-trees.md +418 -0
  121. package/core/skills/frontend-design/motion-graphics.md +306 -0
  122. package/core/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  123. package/core/skills/frontend-design/scripts/ux_audit.py +722 -0
  124. package/core/skills/frontend-design/typography-system.md +345 -0
  125. package/core/skills/frontend-design/ux-psychology.md +541 -0
  126. package/core/skills/frontend-design/visual-effects.md +383 -0
  127. package/core/skills/game-development/2d-games/SKILL.md +119 -0
  128. package/core/skills/game-development/3d-games/SKILL.md +135 -0
  129. package/core/skills/game-development/SKILL.md +167 -0
  130. package/core/skills/game-development/game-art/SKILL.md +185 -0
  131. package/core/skills/game-development/game-audio/SKILL.md +190 -0
  132. package/core/skills/game-development/game-design/SKILL.md +129 -0
  133. package/core/skills/game-development/mobile-games/SKILL.md +108 -0
  134. package/core/skills/game-development/multiplayer/SKILL.md +132 -0
  135. package/core/skills/game-development/pc-games/SKILL.md +144 -0
  136. package/core/skills/game-development/vr-ar/SKILL.md +123 -0
  137. package/core/skills/game-development/web-games/SKILL.md +150 -0
  138. package/core/skills/geo-fundamentals/SKILL.md +156 -0
  139. package/core/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  140. package/core/skills/git-workflow/SKILL.md +263 -0
  141. package/core/skills/history-check-patterns/SKILL.md +125 -0
  142. package/core/skills/i18n-localization/SKILL.md +154 -0
  143. package/core/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  144. package/core/skills/integration-completeness/SKILL.md +219 -0
  145. package/core/skills/intelligent-routing/SKILL.md +370 -0
  146. package/core/skills/lint-and-validate/SKILL.md +45 -0
  147. package/core/skills/lint-and-validate/scripts/lint_runner.py +173 -0
  148. package/core/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  149. package/core/skills/local-verification/SKILL.md +195 -0
  150. package/core/skills/mcp-builder/SKILL.md +176 -0
  151. package/core/skills/mobile-design/SKILL.md +394 -0
  152. package/core/skills/mobile-design/decision-trees.md +516 -0
  153. package/core/skills/mobile-design/mobile-backend.md +491 -0
  154. package/core/skills/mobile-design/mobile-color-system.md +420 -0
  155. package/core/skills/mobile-design/mobile-debugging.md +122 -0
  156. package/core/skills/mobile-design/mobile-design-thinking.md +357 -0
  157. package/core/skills/mobile-design/mobile-navigation.md +458 -0
  158. package/core/skills/mobile-design/mobile-performance.md +767 -0
  159. package/core/skills/mobile-design/mobile-testing.md +356 -0
  160. package/core/skills/mobile-design/mobile-typography.md +433 -0
  161. package/core/skills/mobile-design/platform-android.md +666 -0
  162. package/core/skills/mobile-design/platform-ios.md +561 -0
  163. package/core/skills/mobile-design/scripts/mobile_audit.py +670 -0
  164. package/core/skills/mobile-design/touch-psychology.md +537 -0
  165. package/core/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  166. package/core/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  167. package/core/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  168. package/core/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  169. package/core/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  170. package/core/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  171. package/core/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  172. package/core/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  173. package/core/skills/nextjs-react-expert/SKILL.md +267 -0
  174. package/core/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  175. package/core/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  176. package/core/skills/nodejs-best-practices/SKILL.md +333 -0
  177. package/core/skills/notion-task-patterns/SKILL.md +2529 -0
  178. package/core/skills/page-specifications/SKILL.md +367 -0
  179. package/core/skills/parallel-agents/SKILL.md +175 -0
  180. package/core/skills/performance-profiling/SKILL.md +143 -0
  181. package/core/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  182. package/core/skills/plan-writing/SKILL.md +190 -0
  183. package/core/skills/powershell-windows/SKILL.md +167 -0
  184. package/core/skills/project-foundation/SKILL.md +117 -0
  185. package/core/skills/project-setup/SKILL.md +141 -0
  186. package/core/skills/project-tracking-patterns/SKILL.md +357 -0
  187. package/core/skills/project-type-discovery/SKILL.md +239 -0
  188. package/core/skills/python-patterns/SKILL.md +441 -0
  189. package/core/skills/qa-test-generation/SKILL.md +156 -0
  190. package/core/skills/react-components/README.md +36 -0
  191. package/core/skills/react-components/SKILL.md +47 -0
  192. package/core/skills/react-components/examples/gold-standard-card.tsx +80 -0
  193. package/core/skills/react-components/package-lock.json +231 -0
  194. package/core/skills/react-components/package.json +16 -0
  195. package/core/skills/react-components/resources/architecture-checklist.md +15 -0
  196. package/core/skills/react-components/resources/component-template.tsx +37 -0
  197. package/core/skills/react-components/resources/stitch-api-reference.md +14 -0
  198. package/core/skills/react-components/resources/style-guide.json +27 -0
  199. package/core/skills/react-components/scripts/fetch-stitch.sh +30 -0
  200. package/core/skills/react-components/scripts/validate.js +68 -0
  201. package/core/skills/red-team-tactics/SKILL.md +199 -0
  202. package/core/skills/remotion/README.md +105 -0
  203. package/core/skills/remotion/SKILL.md +393 -0
  204. package/core/skills/remotion/examples/WalkthroughComposition.tsx +78 -0
  205. package/core/skills/remotion/examples/screens.json +56 -0
  206. package/core/skills/remotion/resources/composition-checklist.md +124 -0
  207. package/core/skills/remotion/resources/screen-slide-template.tsx +123 -0
  208. package/core/skills/remotion/scripts/download-stitch-asset.sh +38 -0
  209. package/core/skills/seo-fundamentals/SKILL.md +129 -0
  210. package/core/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  211. package/core/skills/server-management/SKILL.md +161 -0
  212. package/core/skills/session-resilience/SKILL.md +199 -0
  213. package/core/skills/shadcn-ui/README.md +248 -0
  214. package/core/skills/shadcn-ui/SKILL.md +326 -0
  215. package/core/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
  216. package/core/skills/shadcn-ui/examples/data-table.tsx +313 -0
  217. package/core/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
  218. package/core/skills/shadcn-ui/resources/component-catalog.md +481 -0
  219. package/core/skills/shadcn-ui/resources/customization-guide.md +516 -0
  220. package/core/skills/shadcn-ui/resources/migration-guide.md +463 -0
  221. package/core/skills/shadcn-ui/resources/setup-guide.md +412 -0
  222. package/core/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
  223. package/core/skills/state-machine/SKILL.md +264 -0
  224. package/core/skills/stitch-loop/README.md +54 -0
  225. package/core/skills/stitch-loop/SKILL.md +203 -0
  226. package/core/skills/stitch-loop/examples/SITE.md +73 -0
  227. package/core/skills/stitch-loop/examples/next-prompt.md +25 -0
  228. package/core/skills/stitch-loop/resources/baton-schema.md +61 -0
  229. package/core/skills/stitch-loop/resources/site-template.md +104 -0
  230. package/core/skills/systematic-debugging/SKILL.md +109 -0
  231. package/core/skills/tailwind-patterns/SKILL.md +284 -0
  232. package/core/skills/tdd-validation/SKILL.md +243 -0
  233. package/core/skills/tdd-workflow/SKILL.md +284 -0
  234. package/core/skills/testing-patterns/SKILL.md +196 -0
  235. package/core/skills/testing-patterns/scripts/test_runner.py +219 -0
  236. package/core/skills/ui-ux-discovery/SKILL.md +329 -0
  237. package/core/skills/ui-validation/SKILL.md +190 -0
  238. package/core/skills/ui-validation/scripts/ui_antipattern_check.py +317 -0
  239. package/core/skills/verification-gate/SKILL.md +205 -0
  240. package/core/skills/vulnerability-scanner/SKILL.md +276 -0
  241. package/core/skills/vulnerability-scanner/checklists.md +121 -0
  242. package/core/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  243. package/core/skills/web-design-guidelines/SKILL.md +57 -0
  244. package/core/skills/webapp-testing/SKILL.md +187 -0
  245. package/core/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  246. package/core/templates/ARCHITECTURE.template.md +407 -0
  247. package/core/templates/project-resources.example.json +71 -0
  248. package/core/workflows/atomic.md +182 -0
  249. package/core/workflows/brainstorm.md +134 -0
  250. package/core/workflows/check-task.md +242 -0
  251. package/core/workflows/copy-collect.md +306 -0
  252. package/core/workflows/create-agent.md +33 -0
  253. package/core/workflows/create-skill.md +39 -0
  254. package/core/workflows/create-workflow.md +33 -0
  255. package/core/workflows/create.md +92 -0
  256. package/core/workflows/debug.md +186 -0
  257. package/core/workflows/demand.md +443 -0
  258. package/core/workflows/deploy.md +260 -0
  259. package/core/workflows/discovery.md +267 -0
  260. package/core/workflows/document.md +272 -0
  261. package/core/workflows/ds-components.md +296 -0
  262. package/core/workflows/ds-init.md +58 -0
  263. package/core/workflows/ds-refactor.md +245 -0
  264. package/core/workflows/ds-references.md +197 -0
  265. package/core/workflows/ds-styleguide.md +237 -0
  266. package/core/workflows/ds-token-diff.md +103 -0
  267. package/core/workflows/ds-tokens.md +317 -0
  268. package/core/workflows/ds-validate.md +309 -0
  269. package/core/workflows/execute.md +483 -0
  270. package/core/workflows/extract-template.md +278 -0
  271. package/core/workflows/fix-failed-tests.md +160 -0
  272. package/core/workflows/init-project.md +386 -0
  273. package/core/workflows/legacy-project.md +849 -0
  274. package/core/workflows/log.md +97 -0
  275. package/core/workflows/new-project.md +610 -0
  276. package/core/workflows/new-project.md.bak +3292 -0
  277. package/core/workflows/new-task.md +404 -0
  278. package/core/workflows/orchestrate.md +237 -0
  279. package/core/workflows/page-build.md +296 -0
  280. package/core/workflows/plan.md +89 -0
  281. package/core/workflows/prd.md +255 -0
  282. package/core/workflows/preview.md +81 -0
  283. package/core/workflows/review-page.md +304 -0
  284. package/core/workflows/status.md +86 -0
  285. package/core/workflows/stitch.md +226 -0
  286. package/core/workflows/task-complete.md +473 -0
  287. package/core/workflows/task-update.md +163 -0
  288. package/core/workflows/tdd.md +344 -0
  289. package/core/workflows/test.md +251 -0
  290. package/core/workflows/ui-ux-pro-max.md +437 -0
  291. package/core/workflows/ux-mobile-optimize.md +262 -0
  292. package/core/workflows/ux-mobile-validate.md +297 -0
  293. package/engine-files/GEMINI.md +69 -0
  294. package/package.json +47 -0
  295. package/runtime-adapters/antigravity.js +26 -0
  296. package/runtime-adapters/claude.js +57 -0
  297. package/runtime-adapters/codex.js +51 -0
  298. package/runtime-adapters/copilot.js +51 -0
  299. package/runtime-adapters/cursor.js +51 -0
  300. package/runtime-adapters/gemini-cli.js +30 -0
  301. package/runtime-adapters/opencode.js +51 -0
  302. package/runtime-adapters/windsurf.js +51 -0
@@ -0,0 +1,317 @@
1
+ ---
2
+ description: Extract and normalize design tokens from visual references.
3
+ ---
4
+
5
+ Extract, normalize, and version **official Design Tokens** from visual reference materials, ensuring that **no UI code can exist without valid, up-to-date tokens**.
6
+
7
+ This workflow is the **only authorized source** of design tokens in the system.
8
+
9
+ ---
10
+
11
+ ## Hard Preconditions (Abort if any fail)
12
+
13
+ The workflow **MUST NOT RUN** unless all conditions below are true:
14
+
15
+ 1. `.agent/state/project.json` exists
16
+ 2. `project.stage === "development"`
17
+ 3. `design_system.status === "initialized"`
18
+ 4. Reference directory exists:
19
+
20
+ ```
21
+ src/design-system/references/
22
+ ```
23
+ 5. At least **one valid reference file** is present
24
+
25
+ If any condition fails, abort with:
26
+
27
+ ```text
28
+ /ds-tokens aborted: Design System not initialized or references missing.
29
+ ```
30
+ ---
31
+
32
+ ## Reference Intake Gate (Mandatory)
33
+
34
+ Design Tokens MUST be derived from explicit visual references.
35
+
36
+ If NO visual references are found in:
37
+
38
+ src/design-system/references/
39
+
40
+ Then:
41
+
42
+ - DO NOT generate brand, semantic, or expressive tokens
43
+ - Generate ONLY neutral scaffold tokens:
44
+ - grayscale palette
45
+ - base typography scale
46
+ - spacing, radius, shadows (neutral)
47
+ - Set token classification as: scaffold_only
48
+ - Mark design tokens as NOT eligible for validation
49
+
50
+ This mode exists only to:
51
+ - bootstrap the system
52
+ - enable early infrastructure setup
53
+
54
+ Scaffold tokens MUST be replaced once references are provided.
55
+
56
+ ---
57
+
58
+ ## Accepted Inputs
59
+
60
+ From `src/design-system/references/`:
61
+
62
+ * Images: `.png`, `.jpg`, `.jpeg`, `.webp`
63
+ * Documents: `.pdf`
64
+ * Markdown files with links (Figma, Dribbble, Behance)
65
+
66
+ ---
67
+
68
+ ## Execution Steps (Mandatory)
69
+
70
+ ---
71
+
72
+ ### 0️⃣ Reference Presence Check (Hard Gate)
73
+
74
+ Scan directory:
75
+
76
+ src/design-system/references/
77
+
78
+ If directory is empty:
79
+
80
+ - Enter SCAFFOLD MODE
81
+ - Skip brand and semantic inference
82
+ - Set internal token_state = scaffold_only
83
+ - Continue ONLY with neutral system tokens
84
+
85
+ ---
86
+
87
+ ### 1️⃣ Load Current Project State
88
+
89
+ Read from `.agent/state/project.json`:
90
+
91
+ * `design_system.tokens`
92
+ * `design_system.last_validation`
93
+ * Previously processed references (if tracked)
94
+
95
+ ---
96
+
97
+ ### 2️⃣ Exhaustive Reference Analysis (Critical Rule)
98
+
99
+ * **ALL** files in `/references` must be analyzed
100
+ * No reference may be skipped
101
+ * If new references are detected:
102
+
103
+ * Existing tokens are marked **OUTDATED**
104
+
105
+ > ⚠️ Large reference sets must be processed iteratively while preserving state.
106
+
107
+ ---
108
+
109
+ ### 3️⃣ Token Extraction Engine (Multimodal)
110
+
111
+ This step is responsible **only for inference**, not governance.
112
+
113
+ ---
114
+
115
+ #### 🎨 Colors
116
+
117
+ * Primary / Brand color
118
+ * Neutral palette (50–900)
119
+ * Semantic colors:
120
+
121
+ * Success
122
+ * Warning
123
+ * Error
124
+ * Info
125
+ * Background / Surface / Border
126
+ * Focus / Ring
127
+ * Chart colors (minimum 5)
128
+
129
+ ✔ Generate **harmonic scales**, not raw samples
130
+
131
+ ---
132
+
133
+ #### 🔤 Typography
134
+
135
+ * Primary font family
136
+ * Hierarchy:
137
+
138
+ * Display
139
+ * Heading
140
+ * Body
141
+ * Caption
142
+ * Font sizes, weights, line heights
143
+ * Safe fallbacks
144
+
145
+ ---
146
+
147
+ #### 📐 Spacing & Layout
148
+
149
+ * Base scale (4px or 8px)
150
+ * Semantic spacing tokens
151
+ * Inferred rhythm / grid
152
+
153
+ ---
154
+
155
+ #### 🟦 Border Radius
156
+
157
+ * Sharp / Rounded / Pill styles
158
+ * Scaled tokens (`xs → xl`)
159
+
160
+ ---
161
+
162
+ #### 🌫️ Shadows
163
+
164
+ * Levels: none / sm / md / lg
165
+ * Consistent elevation logic
166
+
167
+ ---
168
+
169
+ ### 4️⃣ Semantic Normalization (Non-Negotiable)
170
+
171
+ 🚫 Forbidden:
172
+
173
+ * Raw numeric names (`blue-500`)
174
+ * Hardcoded values (`#123456`)
175
+ * Context-less tokens
176
+
177
+ ✅ Required naming examples:
178
+
179
+ ```text
180
+ color-button-primary-bg
181
+ color-text-muted
182
+ radius-card
183
+ space-section
184
+ shadow-overlay
185
+ ```
186
+
187
+ Tokens must be **semantic, contextual, and reusable**.
188
+
189
+ ---
190
+
191
+ ### 5️⃣ Official Token Artifacts Generation
192
+
193
+ The following structure **MUST be generated**:
194
+
195
+ ```
196
+ src/design-system/
197
+ ├── tokens/
198
+ │ ├── colors.json
199
+ │ ├── typography.json
200
+ │ ├── spacing.json
201
+ │ ├── radius.json
202
+ │ ├── shadows.json
203
+ │ └── index.json
204
+ ├── tokens.css # CSS Variables
205
+ └── tokens.ts # Typed tokens (TS)
206
+ ```
207
+
208
+ ⚠️ **Tokens must NEVER be defined inside components.**
209
+
210
+ ---
211
+
212
+ ### 6️⃣ UI Integration Layer (If Applicable)
213
+
214
+ If using Tailwind / shadcn:
215
+
216
+ * Map tokens into `globals.css`
217
+ * Support **light and dark modes**
218
+ * Zero hardcoded UI values allowed
219
+
220
+ `globals.css` is a **consumer**, never the source of truth.
221
+
222
+ ---
223
+
224
+ ### 7️⃣ Project State Update (Mandatory)
225
+
226
+ If token_state === "scaffold_only":
227
+
228
+ ```json
229
+ "design_system": {
230
+ "status": "initialized",
231
+ "tokens": "scaffold_only",
232
+ "token_origin": "scaffold",
233
+ "components": "missing",
234
+ "styleguide": "missing",
235
+ "validated": false
236
+ }
237
+ ````
238
+
239
+ If token_state === "reference_based":
240
+
241
+ ```json
242
+ "design_system": {
243
+ "status": "initialized",
244
+ "tokens": "ready",
245
+ "token_origin": "visual_reference",
246
+ "components": "missing",
247
+ "styleguide": "missing",
248
+ "validated": false
249
+ }
250
+
251
+ ```
252
+
253
+ ---
254
+
255
+ ### 8️⃣ Artifact Registration
256
+
257
+ Append to project artifacts:
258
+
259
+ ```json
260
+ "artifacts": {
261
+ "documents": ["Design tokens generated from visual references"],
262
+ "code": ["src/design-system/tokens/*"],
263
+ "prompts": ["/ds-tokens"]
264
+ }
265
+ ```
266
+
267
+ ---
268
+
269
+ ## Postconditions (Guaranteed)
270
+
271
+ After successful execution:
272
+
273
+ * Tokens exist and are versioned
274
+ * Tokens reflect **all references**
275
+ * Tokens are semantic and accessible
276
+ * UI generation remains **BLOCKED**
277
+ * Next mandatory step is `/ds-validate`
278
+
279
+ ---
280
+
281
+ ## Standard Output Format
282
+
283
+ ```text
284
+ Design System Tokens: READY
285
+ References Processed: 8
286
+ New References Detected: true
287
+ Token Status: NORMALIZED
288
+ Next Required Action: /ds-validate
289
+ UI Generation: BLOCKED
290
+ ```
291
+
292
+ ---
293
+
294
+ ## Golden Rules (Non-Negotiable)
295
+
296
+ * Tokens are evidence, not opinion
297
+ * New references invalidate existing tokens
298
+ * Tokens ≠ UI
299
+ * Without `/ds-validate`, nothing passes
300
+
301
+ ---
302
+
303
+ ## `/next-step` Integration
304
+
305
+ `/next-step` MUST interpret:
306
+
307
+ ```text
308
+ design_system.tokens === "ready"
309
+ design_system.validated === false
310
+ ```
311
+
312
+ As:
313
+
314
+ ```text
315
+ BLOCK UI
316
+ NEXT ACTION: /ds-validate
317
+ ```
@@ -0,0 +1,309 @@
1
+ ---
2
+ description: Validate the entire Design System for correctness, consistency, accessibility, and documentation completeness.
3
+ ---
4
+
5
+ Validate that the Design System is **complete, consistent, accessible, and enforceable** before **any UI, feature, or page** is allowed to be generated.
6
+
7
+ This workflow acts as a **hard stop** in the system.
8
+ Failure blocks **all downstream execution**.
9
+
10
+ ---
11
+
12
+ ## Hard Preconditions (Abort if any fail)
13
+
14
+ The workflow **MUST NOT RUN** unless **all** conditions below are met:
15
+
16
+ 1. `.agent/state/project.json` exists
17
+ 2. `project.stage === "development"`
18
+ 3. `design_system.status === "initialized"`
19
+ 4. `design_system.tokens === "ready"`
20
+ 5. Token artifacts exist:
21
+
22
+ ```
23
+ src/design-system/tokens/
24
+ ```
25
+ 6. At least one token consumer exists:
26
+
27
+ * `tokens.css` **OR**
28
+ * `globals.css`
29
+
30
+ If any condition fails, abort with:
31
+
32
+ ```text
33
+ /ds-validate aborted: Design System not ready for validation.
34
+ ```
35
+ ---
36
+
37
+ ## Reference Origin Gate (Critical)
38
+
39
+ The validation workflow MUST HARD FAIL if design tokens
40
+ were not generated from visual references.
41
+
42
+ Required condition:
43
+
44
+ ```text
45
+ design_system.token_origin === "visual_reference"
46
+ ```
47
+
48
+ If the condition is not met, abort with:
49
+
50
+ ```text
51
+ /ds-validate aborted: Tokens are scaffold-only. Visual references required.
52
+ ```
53
+
54
+ This rule is ABSOLUTE.
55
+ No override, no partial validation, no warnings.
56
+
57
+ ---
58
+
59
+ ## Validation Scope (Non-Negotiable)
60
+
61
+ Validation applies to **all layers**:
62
+
63
+ * Design Tokens
64
+ * Component Specifications (if any)
65
+ * Styling Integration
66
+ * Accessibility
67
+ * Governance Compliance
68
+
69
+ ---
70
+
71
+ ## Execution Phases
72
+
73
+ ---
74
+
75
+ ### 1️⃣ Load Project State & Artifacts
76
+
77
+ Read from:
78
+
79
+ * `.agent/state/project.json`
80
+ * `src/design-system/tokens/*`
81
+ * `tokens.css` / `globals.css`
82
+ * Existing component specs (if present)
83
+
84
+ ---
85
+
86
+ ### 2️⃣ Design Token Integrity Validation
87
+
88
+ #### Required Checks
89
+
90
+ * Tokens are **semantic**, not numeric
91
+ * No duplicated meanings
92
+ * No missing mandatory categories:
93
+
94
+ * Colors
95
+ * Typography
96
+ * Spacing
97
+ * Radius
98
+ * Shadows
99
+
100
+ 🚫 FAIL if:
101
+
102
+ * Hardcoded values detected
103
+ * Token names reference raw values
104
+ * Tokens are defined inside components
105
+
106
+ ---
107
+
108
+ ### 3️⃣ Structural Consistency Validation
109
+
110
+ * JSON schema integrity
111
+ * Cross-file references resolve correctly
112
+ * Token index completeness
113
+ * No orphan or unused core tokens
114
+
115
+ 🚫 FAIL if:
116
+
117
+ * Broken references exist
118
+ * Schema mismatch detected
119
+
120
+ ---
121
+
122
+ ### 4️⃣ UI Integration Validation
123
+
124
+ * CSS variables are generated correctly
125
+ * Light and Dark themes exist (if required)
126
+ * All UI styles reference tokens
127
+ * No inline styles or magic numbers
128
+
129
+ 🚫 FAIL if:
130
+
131
+ * Components bypass token usage
132
+ * globals.css contains raw values
133
+
134
+ ---
135
+
136
+ ### 5️⃣ Component Readiness Validation (If Components Exist)
137
+
138
+ If `design_system.components !== "missing"`:
139
+
140
+ * Each component must declare:
141
+
142
+ * Token dependencies
143
+ * Variants
144
+ * States
145
+ * No visual values defined locally
146
+
147
+ 🚫 FAIL if:
148
+
149
+ * Components define colors, spacing, or fonts directly
150
+
151
+ ---
152
+
153
+ ### 6️⃣ Accessibility & Contrast Validation (WCAG 2.1 AA)
154
+
155
+ * Text contrast ≥ AA
156
+ * Interactive elements distinguishable
157
+ * Focus and hover states visible
158
+ * Semantic color usage respected
159
+
160
+ 🚫 FAIL if:
161
+
162
+ * Any AA contrast violation exists
163
+
164
+ ---
165
+
166
+ ### 7️⃣ Governance & Rule Enforcement
167
+
168
+ Verify compliance with:
169
+
170
+ * `project.rules.md`
171
+ * Locked decisions
172
+ * Design System rules
173
+
174
+ 🚫 FAIL if:
175
+
176
+ * Locked decisions violated
177
+ * UI generated before validation
178
+ * Unauthorized workflow execution detected
179
+
180
+ Verify token origin integrity:
181
+
182
+ - Tokens MUST be derived from visual references
183
+ - Scaffold tokens are NOT eligible for validation
184
+ - Token origin must be traceable in project state
185
+
186
+ 🚫 FAIL if:
187
+
188
+ - design_system.token_origin !== "visual_reference"
189
+
190
+ ---
191
+
192
+ ### 8️⃣ Validation Report Generation
193
+
194
+ Generate a **machine-readable** and **human-readable** report:
195
+
196
+ ```
197
+ src/design-system/validation/
198
+ ├── ds-validation-report.json
199
+ └── ds-validation-report.md
200
+ ```
201
+
202
+ Report MUST include:
203
+
204
+ * PASS / FAIL status
205
+ * Failed checks (if any)
206
+ * Blocking issues
207
+ * Required remediation steps
208
+
209
+ ---
210
+
211
+ ### 9️⃣ Project State Update (Conditional)
212
+
213
+ #### On PASS:
214
+
215
+ ```json
216
+ "design_system": {
217
+ "status": "validated",
218
+ "tokens": "ready",
219
+ "token_origin": "visual_reference",
220
+ "components": "ready",
221
+ "styleguide": "missing",
222
+ "validated": true,
223
+ "locked": true,
224
+ "last_validation": "ISO_TIMESTAMP"
225
+ }
226
+
227
+ ```
228
+
229
+ #### On FAIL:
230
+
231
+ * `validated` remains `false`
232
+ * State is NOT advanced
233
+
234
+ ---
235
+
236
+ ## Standard Output Format (Mandatory)
237
+
238
+ ```text
239
+ Design System Validation: PASS
240
+ Token Integrity: PASS
241
+ Structural Consistency: PASS
242
+ Accessibility: PASS
243
+ Governance Compliance: PASS
244
+
245
+ Next Allowed Action: UI / Feature generation
246
+ ```
247
+
248
+ OR
249
+
250
+ ```text
251
+ Design System Validation: FAIL
252
+ Blocking Issues: 3
253
+ Critical Violations Detected
254
+ Next Required Action: Fix tokens or components
255
+ UI Generation: BLOCKED
256
+ ```
257
+
258
+ ---
259
+
260
+ ## Postconditions
261
+
262
+ ### On PASS
263
+
264
+ * Design System is LOCKED
265
+ * Tokens and component decisions become immutable
266
+ * UI generation is officially allowed
267
+
268
+ ### On FAIL
269
+
270
+ * System remains blocked
271
+ * No downstream workflow may proceed
272
+
273
+ ---
274
+
275
+ ## Golden Rules (Hard Law)
276
+
277
+ * Validation is final authority
278
+ * No partial passes
279
+ * No silent bypass
280
+ * Governance > Speed
281
+
282
+ ---
283
+
284
+ ## `/next-step` Integration (Mandatory)
285
+
286
+ `/next-step` MUST interpret:
287
+
288
+ ```text
289
+ design_system.validated === true
290
+ ```
291
+
292
+ As:
293
+
294
+ ```text
295
+ ALLOW UI / FEATURE GENERATION
296
+ ```
297
+
298
+ And:
299
+
300
+ ```text
301
+ design_system.validated === false
302
+ ```
303
+
304
+ As:
305
+
306
+ ```text
307
+ BLOCK ALL UI
308
+ NEXT ACTION: /ds-validate
309
+ ```