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.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/bin/install.js +357 -0
- package/bridge/bridge.py +1780 -0
- package/bridge/local_tracker.py +722 -0
- package/core/agents/backend-specialist.md +266 -0
- package/core/agents/code-archaeologist.md +106 -0
- package/core/agents/database-architect.md +226 -0
- package/core/agents/debugger.md +225 -0
- package/core/agents/devops-engineer.md +323 -0
- package/core/agents/documentation-writer.md +104 -0
- package/core/agents/explorer-agent.md +73 -0
- package/core/agents/frontend-specialist.md +743 -0
- package/core/agents/game-developer.md +162 -0
- package/core/agents/mobile-developer.md +377 -0
- package/core/agents/orchestrator.md +416 -0
- package/core/agents/penetration-tester.md +188 -0
- package/core/agents/performance-optimizer.md +187 -0
- package/core/agents/product-manager.md +112 -0
- package/core/agents/product-owner.md +95 -0
- package/core/agents/project-planner.md +470 -0
- package/core/agents/qa-automation-engineer.md +103 -0
- package/core/agents/security-auditor.md +170 -0
- package/core/agents/seo-specialist.md +111 -0
- package/core/agents/stitch-designer.md +190 -0
- package/core/agents/tdd-reviewer.md +282 -0
- package/core/agents/test-engineer.md +158 -0
- package/core/scripts/auto_preview.py +148 -0
- package/core/scripts/checklist.py +243 -0
- package/core/scripts/cost_report.py +149 -0
- package/core/scripts/doc-sync-check.py +461 -0
- package/core/scripts/parse_user_stories.py +79 -0
- package/core/scripts/prepare_notion_updates.py +172 -0
- package/core/scripts/print_create_payload.py +18 -0
- package/core/scripts/session_manager.py +120 -0
- package/core/scripts/task_complete.py +127 -0
- package/core/scripts/verify_all.py +327 -0
- package/core/skills/analytics-strategy/SKILL.md +128 -0
- package/core/skills/api-patterns/SKILL.md +81 -0
- package/core/skills/api-patterns/api-style.md +42 -0
- package/core/skills/api-patterns/auth.md +24 -0
- package/core/skills/api-patterns/documentation.md +26 -0
- package/core/skills/api-patterns/graphql.md +41 -0
- package/core/skills/api-patterns/rate-limiting.md +31 -0
- package/core/skills/api-patterns/response.md +37 -0
- package/core/skills/api-patterns/rest.md +40 -0
- package/core/skills/api-patterns/scripts/api_validator.py +211 -0
- package/core/skills/api-patterns/security-testing.md +122 -0
- package/core/skills/api-patterns/trpc.md +41 -0
- package/core/skills/api-patterns/versioning.md +22 -0
- package/core/skills/app-builder/SKILL.md +75 -0
- package/core/skills/app-builder/agent-coordination.md +71 -0
- package/core/skills/app-builder/feature-building.md +53 -0
- package/core/skills/app-builder/project-detection.md +34 -0
- package/core/skills/app-builder/scaffolding.md +118 -0
- package/core/skills/app-builder/tech-stack.md +40 -0
- package/core/skills/app-builder/templates/SKILL.md +39 -0
- package/core/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/core/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/core/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/core/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/core/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/core/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/core/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/core/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/core/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/core/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/core/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/core/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/core/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/core/skills/architecture/SKILL.md +55 -0
- package/core/skills/architecture/context-discovery.md +43 -0
- package/core/skills/architecture/examples.md +94 -0
- package/core/skills/architecture/pattern-selection.md +68 -0
- package/core/skills/architecture/patterns-reference.md +50 -0
- package/core/skills/architecture/trade-off-analysis.md +77 -0
- package/core/skills/atomic-design/SKILL.md +282 -0
- package/core/skills/atomic-design/references/classification-guide.md +132 -0
- package/core/skills/atomic-design/references/quality-checklist.md +60 -0
- package/core/skills/atomic-design/references/stacks/stack-blade.md +254 -0
- package/core/skills/atomic-design/references/stacks/stack-nextjs.md +272 -0
- package/core/skills/atomic-design/references/stacks/stack-react.md +239 -0
- package/core/skills/atomic-design/references/stacks/stack-vue.md +224 -0
- package/core/skills/bash-linux/SKILL.md +199 -0
- package/core/skills/behavioral-modes/SKILL.md +242 -0
- package/core/skills/brainstorming/SKILL.md +163 -0
- package/core/skills/brainstorming/dynamic-questioning.md +373 -0
- package/core/skills/checkpointing-patterns/SKILL.md +163 -0
- package/core/skills/clean-code/SKILL.md +201 -0
- package/core/skills/code-review-checklist/SKILL.md +109 -0
- package/core/skills/code-truth-validation/SKILL.md +149 -0
- package/core/skills/component-library-discovery/SKILL.md +154 -0
- package/core/skills/content-strategy/SKILL.md +222 -0
- package/core/skills/context-budget/SKILL.md +155 -0
- package/core/skills/context-gathering-patterns/SKILL.md +278 -0
- package/core/skills/cost-tracking/SKILL.md +206 -0
- package/core/skills/database-design/SKILL.md +52 -0
- package/core/skills/database-design/database-selection.md +43 -0
- package/core/skills/database-design/indexing.md +39 -0
- package/core/skills/database-design/migrations.md +48 -0
- package/core/skills/database-design/optimization.md +36 -0
- package/core/skills/database-design/orm-selection.md +30 -0
- package/core/skills/database-design/schema-design.md +56 -0
- package/core/skills/database-design/scripts/schema_validator.py +172 -0
- package/core/skills/deployment-procedures/SKILL.md +295 -0
- package/core/skills/design-md/README.md +34 -0
- package/core/skills/design-md/SKILL.md +172 -0
- package/core/skills/design-md/examples/DESIGN.md +154 -0
- package/core/skills/design-system-enforcement/SKILL.md +339 -0
- package/core/skills/doc.md +177 -0
- package/core/skills/document-registry/SKILL.md +130 -0
- package/core/skills/documentation-publishing/SKILL.md +174 -0
- package/core/skills/documentation-templates/SKILL.md +194 -0
- package/core/skills/enhance-prompt/README.md +34 -0
- package/core/skills/enhance-prompt/SKILL.md +204 -0
- package/core/skills/enhance-prompt/references/KEYWORDS.md +114 -0
- package/core/skills/frontend-design/SKILL.md +430 -0
- package/core/skills/frontend-design/animation-guide.md +331 -0
- package/core/skills/frontend-design/color-system.md +311 -0
- package/core/skills/frontend-design/decision-trees.md +418 -0
- package/core/skills/frontend-design/motion-graphics.md +306 -0
- package/core/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/core/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/core/skills/frontend-design/typography-system.md +345 -0
- package/core/skills/frontend-design/ux-psychology.md +541 -0
- package/core/skills/frontend-design/visual-effects.md +383 -0
- package/core/skills/game-development/2d-games/SKILL.md +119 -0
- package/core/skills/game-development/3d-games/SKILL.md +135 -0
- package/core/skills/game-development/SKILL.md +167 -0
- package/core/skills/game-development/game-art/SKILL.md +185 -0
- package/core/skills/game-development/game-audio/SKILL.md +190 -0
- package/core/skills/game-development/game-design/SKILL.md +129 -0
- package/core/skills/game-development/mobile-games/SKILL.md +108 -0
- package/core/skills/game-development/multiplayer/SKILL.md +132 -0
- package/core/skills/game-development/pc-games/SKILL.md +144 -0
- package/core/skills/game-development/vr-ar/SKILL.md +123 -0
- package/core/skills/game-development/web-games/SKILL.md +150 -0
- package/core/skills/geo-fundamentals/SKILL.md +156 -0
- package/core/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/core/skills/git-workflow/SKILL.md +263 -0
- package/core/skills/history-check-patterns/SKILL.md +125 -0
- package/core/skills/i18n-localization/SKILL.md +154 -0
- package/core/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/core/skills/integration-completeness/SKILL.md +219 -0
- package/core/skills/intelligent-routing/SKILL.md +370 -0
- package/core/skills/lint-and-validate/SKILL.md +45 -0
- package/core/skills/lint-and-validate/scripts/lint_runner.py +173 -0
- package/core/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/core/skills/local-verification/SKILL.md +195 -0
- package/core/skills/mcp-builder/SKILL.md +176 -0
- package/core/skills/mobile-design/SKILL.md +394 -0
- package/core/skills/mobile-design/decision-trees.md +516 -0
- package/core/skills/mobile-design/mobile-backend.md +491 -0
- package/core/skills/mobile-design/mobile-color-system.md +420 -0
- package/core/skills/mobile-design/mobile-debugging.md +122 -0
- package/core/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/core/skills/mobile-design/mobile-navigation.md +458 -0
- package/core/skills/mobile-design/mobile-performance.md +767 -0
- package/core/skills/mobile-design/mobile-testing.md +356 -0
- package/core/skills/mobile-design/mobile-typography.md +433 -0
- package/core/skills/mobile-design/platform-android.md +666 -0
- package/core/skills/mobile-design/platform-ios.md +561 -0
- package/core/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/core/skills/mobile-design/touch-psychology.md +537 -0
- package/core/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/core/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/core/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/core/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/core/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/core/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/core/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/core/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/core/skills/nextjs-react-expert/SKILL.md +267 -0
- package/core/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/core/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/core/skills/nodejs-best-practices/SKILL.md +333 -0
- package/core/skills/notion-task-patterns/SKILL.md +2529 -0
- package/core/skills/page-specifications/SKILL.md +367 -0
- package/core/skills/parallel-agents/SKILL.md +175 -0
- package/core/skills/performance-profiling/SKILL.md +143 -0
- package/core/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/core/skills/plan-writing/SKILL.md +190 -0
- package/core/skills/powershell-windows/SKILL.md +167 -0
- package/core/skills/project-foundation/SKILL.md +117 -0
- package/core/skills/project-setup/SKILL.md +141 -0
- package/core/skills/project-tracking-patterns/SKILL.md +357 -0
- package/core/skills/project-type-discovery/SKILL.md +239 -0
- package/core/skills/python-patterns/SKILL.md +441 -0
- package/core/skills/qa-test-generation/SKILL.md +156 -0
- package/core/skills/react-components/README.md +36 -0
- package/core/skills/react-components/SKILL.md +47 -0
- package/core/skills/react-components/examples/gold-standard-card.tsx +80 -0
- package/core/skills/react-components/package-lock.json +231 -0
- package/core/skills/react-components/package.json +16 -0
- package/core/skills/react-components/resources/architecture-checklist.md +15 -0
- package/core/skills/react-components/resources/component-template.tsx +37 -0
- package/core/skills/react-components/resources/stitch-api-reference.md +14 -0
- package/core/skills/react-components/resources/style-guide.json +27 -0
- package/core/skills/react-components/scripts/fetch-stitch.sh +30 -0
- package/core/skills/react-components/scripts/validate.js +68 -0
- package/core/skills/red-team-tactics/SKILL.md +199 -0
- package/core/skills/remotion/README.md +105 -0
- package/core/skills/remotion/SKILL.md +393 -0
- package/core/skills/remotion/examples/WalkthroughComposition.tsx +78 -0
- package/core/skills/remotion/examples/screens.json +56 -0
- package/core/skills/remotion/resources/composition-checklist.md +124 -0
- package/core/skills/remotion/resources/screen-slide-template.tsx +123 -0
- package/core/skills/remotion/scripts/download-stitch-asset.sh +38 -0
- package/core/skills/seo-fundamentals/SKILL.md +129 -0
- package/core/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/core/skills/server-management/SKILL.md +161 -0
- package/core/skills/session-resilience/SKILL.md +199 -0
- package/core/skills/shadcn-ui/README.md +248 -0
- package/core/skills/shadcn-ui/SKILL.md +326 -0
- package/core/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/core/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/core/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/core/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/core/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/core/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/core/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/core/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/core/skills/state-machine/SKILL.md +264 -0
- package/core/skills/stitch-loop/README.md +54 -0
- package/core/skills/stitch-loop/SKILL.md +203 -0
- package/core/skills/stitch-loop/examples/SITE.md +73 -0
- package/core/skills/stitch-loop/examples/next-prompt.md +25 -0
- package/core/skills/stitch-loop/resources/baton-schema.md +61 -0
- package/core/skills/stitch-loop/resources/site-template.md +104 -0
- package/core/skills/systematic-debugging/SKILL.md +109 -0
- package/core/skills/tailwind-patterns/SKILL.md +284 -0
- package/core/skills/tdd-validation/SKILL.md +243 -0
- package/core/skills/tdd-workflow/SKILL.md +284 -0
- package/core/skills/testing-patterns/SKILL.md +196 -0
- package/core/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/core/skills/ui-ux-discovery/SKILL.md +329 -0
- package/core/skills/ui-validation/SKILL.md +190 -0
- package/core/skills/ui-validation/scripts/ui_antipattern_check.py +317 -0
- package/core/skills/verification-gate/SKILL.md +205 -0
- package/core/skills/vulnerability-scanner/SKILL.md +276 -0
- package/core/skills/vulnerability-scanner/checklists.md +121 -0
- package/core/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/core/skills/web-design-guidelines/SKILL.md +57 -0
- package/core/skills/webapp-testing/SKILL.md +187 -0
- package/core/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/core/templates/ARCHITECTURE.template.md +407 -0
- package/core/templates/project-resources.example.json +71 -0
- package/core/workflows/atomic.md +182 -0
- package/core/workflows/brainstorm.md +134 -0
- package/core/workflows/check-task.md +242 -0
- package/core/workflows/copy-collect.md +306 -0
- package/core/workflows/create-agent.md +33 -0
- package/core/workflows/create-skill.md +39 -0
- package/core/workflows/create-workflow.md +33 -0
- package/core/workflows/create.md +92 -0
- package/core/workflows/debug.md +186 -0
- package/core/workflows/demand.md +443 -0
- package/core/workflows/deploy.md +260 -0
- package/core/workflows/discovery.md +267 -0
- package/core/workflows/document.md +272 -0
- package/core/workflows/ds-components.md +296 -0
- package/core/workflows/ds-init.md +58 -0
- package/core/workflows/ds-refactor.md +245 -0
- package/core/workflows/ds-references.md +197 -0
- package/core/workflows/ds-styleguide.md +237 -0
- package/core/workflows/ds-token-diff.md +103 -0
- package/core/workflows/ds-tokens.md +317 -0
- package/core/workflows/ds-validate.md +309 -0
- package/core/workflows/execute.md +483 -0
- package/core/workflows/extract-template.md +278 -0
- package/core/workflows/fix-failed-tests.md +160 -0
- package/core/workflows/init-project.md +386 -0
- package/core/workflows/legacy-project.md +849 -0
- package/core/workflows/log.md +97 -0
- package/core/workflows/new-project.md +610 -0
- package/core/workflows/new-project.md.bak +3292 -0
- package/core/workflows/new-task.md +404 -0
- package/core/workflows/orchestrate.md +237 -0
- package/core/workflows/page-build.md +296 -0
- package/core/workflows/plan.md +89 -0
- package/core/workflows/prd.md +255 -0
- package/core/workflows/preview.md +81 -0
- package/core/workflows/review-page.md +304 -0
- package/core/workflows/status.md +86 -0
- package/core/workflows/stitch.md +226 -0
- package/core/workflows/task-complete.md +473 -0
- package/core/workflows/task-update.md +163 -0
- package/core/workflows/tdd.md +344 -0
- package/core/workflows/test.md +251 -0
- package/core/workflows/ui-ux-pro-max.md +437 -0
- package/core/workflows/ux-mobile-optimize.md +262 -0
- package/core/workflows/ux-mobile-validate.md +297 -0
- package/engine-files/GEMINI.md +69 -0
- package/package.json +47 -0
- package/runtime-adapters/antigravity.js +26 -0
- package/runtime-adapters/claude.js +57 -0
- package/runtime-adapters/codex.js +51 -0
- package/runtime-adapters/copilot.js +51 -0
- package/runtime-adapters/cursor.js +51 -0
- package/runtime-adapters/gemini-cli.js +30 -0
- package/runtime-adapters/opencode.js +51 -0
- 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
|
+
```
|