@oriro/orirocli 0.1.8 → 0.1.11
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/ATTRIBUTION.md +53 -45
- package/LICENSE +21 -0
- package/README.md +20 -17
- package/dist/cli.js +4425 -2975
- package/package.json +64 -64
- package/skills/1password/SKILL.md +118 -118
- package/skills/1password/references/cli-examples.md +29 -29
- package/skills/1password/references/get-started.md +21 -21
- package/skills/21stdev/SKILL.md +64 -0
- package/skills/algorithmic-art/LICENSE +21 -21
- package/skills/algorithmic-art/SKILL.md +446 -446
- package/skills/algorithmic-art/templates/generator_template.js +223 -223
- package/skills/algorithmic-art/templates/viewer.html +598 -598
- package/skills/apple-notes/SKILL.md +81 -81
- package/skills/apple-reminders/SKILL.md +122 -122
- package/skills/bear-notes/SKILL.md +111 -111
- package/skills/blogwatcher/SKILL.md +73 -73
- package/skills/blucli/SKILL.md +51 -51
- package/skills/brand-guidelines/LICENSE +21 -21
- package/skills/brand-guidelines/SKILL.md +76 -76
- package/skills/business/biz-analysis/LICENSE +21 -21
- package/skills/business/biz-analysis/SKILL.md +103 -103
- package/skills/business/biz-corporate-strategy/LICENSE +21 -21
- package/skills/business/biz-corporate-strategy/SKILL.md +76 -76
- package/skills/business/biz-customer-success/LICENSE +21 -21
- package/skills/business/biz-customer-success/SKILL.md +55 -55
- package/skills/business/biz-entrepreneurship/LICENSE +21 -21
- package/skills/business/biz-entrepreneurship/SKILL.md +72 -72
- package/skills/business/biz-hr/LICENSE +21 -21
- package/skills/business/biz-hr/SKILL.md +67 -67
- package/skills/business/biz-international/LICENSE +21 -21
- package/skills/business/biz-international/SKILL.md +51 -51
- package/skills/business/biz-leadership/LICENSE +21 -21
- package/skills/business/biz-leadership/SKILL.md +106 -106
- package/skills/business/biz-marketing-strategy/LICENSE +21 -21
- package/skills/business/biz-marketing-strategy/SKILL.md +119 -119
- package/skills/business/biz-negotiation/LICENSE +21 -21
- package/skills/business/biz-negotiation/SKILL.md +152 -152
- package/skills/business/biz-operations/LICENSE +21 -21
- package/skills/business/biz-operations/SKILL.md +74 -74
- package/skills/business/biz-project/LICENSE +21 -21
- package/skills/business/biz-project/SKILL.md +203 -203
- package/skills/business/biz-risk/LICENSE +21 -21
- package/skills/business/biz-risk/SKILL.md +85 -85
- package/skills/business/biz-sales/LICENSE +21 -21
- package/skills/business/biz-sales/SKILL.md +92 -92
- package/skills/business/biz-startup-ops/LICENSE +21 -21
- package/skills/business/biz-startup-ops/SKILL.md +70 -70
- package/skills/business/biz-strategy/LICENSE +21 -21
- package/skills/business/biz-strategy/SKILL.md +233 -233
- package/skills/business/biz-supply-chain-advanced/LICENSE +21 -21
- package/skills/business/biz-supply-chain-advanced/SKILL.md +68 -68
- package/skills/business/fin-chartered-exams/LICENSE +21 -21
- package/skills/business/fin-chartered-exams/SKILL.md +69 -69
- package/skills/camsnap/SKILL.md +49 -49
- package/skills/canvas/SKILL.md +82 -82
- package/skills/canvas-design/LICENSE +21 -21
- package/skills/canvas-design/SKILL.md +140 -140
- package/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -94
- package/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -93
- package/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -93
- package/skills/coding-agent/SKILL.md +146 -146
- package/skills/communication/comm-business-writing/LICENSE +21 -21
- package/skills/communication/comm-business-writing/SKILL.md +67 -67
- package/skills/communication/comm-cross-cultural/LICENSE +21 -21
- package/skills/communication/comm-cross-cultural/SKILL.md +88 -88
- package/skills/communication/comm-journalism/LICENSE +21 -21
- package/skills/communication/comm-journalism/SKILL.md +81 -81
- package/skills/communication/comm-linguistics/LICENSE +21 -21
- package/skills/communication/comm-linguistics/SKILL.md +82 -82
- package/skills/communication/comm-negotiation/LICENSE +21 -21
- package/skills/communication/comm-negotiation/SKILL.md +120 -120
- package/skills/communication/comm-presentations/LICENSE +21 -21
- package/skills/communication/comm-presentations/SKILL.md +93 -93
- package/skills/communication/comm-public-speaking/LICENSE +21 -21
- package/skills/communication/comm-public-speaking/SKILL.md +68 -68
- package/skills/communication/comm-writing/LICENSE +21 -21
- package/skills/communication/comm-writing/SKILL.md +69 -69
- package/skills/craft/ai-engineering/LICENSE +21 -21
- package/skills/craft/ai-engineering/SKILL.md +828 -828
- package/skills/craft/app-builder-guide/LICENSE +21 -21
- package/skills/craft/app-builder-guide/SKILL.md +332 -332
- package/skills/craft/become-an-ai-engineer-26/CONTRIBUTING.md +46 -46
- package/skills/craft/become-an-ai-engineer-26/LICENSE +21 -21
- package/skills/craft/become-an-ai-engineer-26/README.md +270 -270
- package/skills/craft/become-an-ai-engineer-26/SKILL.md +667 -667
- package/skills/craft/become-an-ai-engineer-26/community/BUILDS.md +13 -13
- package/skills/craft/become-an-ai-engineer-26/community/DISCUSSIONS.md +8 -8
- package/skills/craft/become-an-ai-engineer-26/phases/phase-0-mental-models/README.md +14 -14
- package/skills/craft/become-an-ai-engineer-26/phases/phase-0-mental-models/project/TEMPLATE.md +33 -33
- package/skills/craft/become-an-ai-engineer-26/phases/phase-1-first-agent/README.md +25 -25
- package/skills/craft/become-an-ai-engineer-26/phases/phase-1-first-agent/code/raw_loop.py +126 -126
- package/skills/craft/become-an-ai-engineer-26/phases/phase-2-architecture/README.md +17 -17
- package/skills/craft/become-an-ai-engineer-26/phases/phase-3-harness/README.md +17 -17
- package/skills/craft/become-an-ai-engineer-26/phases/phase-4-evals/README.md +21 -21
- package/skills/craft/become-an-ai-engineer-26/phases/phase-4-evals/code/.github/workflows/eval.yml +40 -40
- package/skills/craft/become-an-ai-engineer-26/phases/phase-5-production/README.md +16 -16
- package/skills/craft/become-an-ai-engineer-26/projects/1-mobile-app-slm/README.md +11 -11
- package/skills/craft/become-an-ai-engineer-26/projects/2-self-improving-coder/README.md +11 -11
- package/skills/craft/become-an-ai-engineer-26/projects/3-video-editor-agent/README.md +11 -11
- package/skills/craft/become-an-ai-engineer-26/projects/4-personal-life-os/README.md +12 -12
- package/skills/craft/become-an-ai-engineer-26/projects/5-enterprise-workflow/README.md +12 -12
- package/skills/craft/become-an-ai-engineer-26/references/benchmark-numbers.md +41 -41
- package/skills/craft/become-an-ai-engineer-26/references/mhc-stable-training.md +73 -73
- package/skills/craft/become-an-ai-engineer-26/references/stack-decisions.md +37 -37
- package/skills/craft/become-an-ai-engineer-26/references/yarn-context-extension.md +123 -123
- package/skills/craft/codex-result-handling/LICENSE +21 -21
- package/skills/craft/codex-result-handling/SKILL.md +26 -26
- package/skills/craft/debug-and-build-methodology/LICENSE +21 -21
- package/skills/craft/debug-and-build-methodology/SKILL.md +432 -432
- package/skills/craft/design/LICENSE +21 -21
- package/skills/craft/design/SKILL.md +274 -274
- package/skills/craft/dev/LICENSE +21 -21
- package/skills/craft/dev/SKILL.md +12 -12
- package/skills/craft/dev/release.md +85 -85
- package/skills/craft/dev/roll.md +50 -50
- package/skills/craft/doc-coauthoring/LICENSE +21 -21
- package/skills/craft/doc-coauthoring/SKILL.md +397 -397
- package/skills/craft/focus/LICENSE +21 -21
- package/skills/craft/focus/SKILL.md +432 -432
- package/skills/craft/focus/UPSTREAM_README.md +233 -233
- package/skills/craft/gh/LICENSE +21 -21
- package/skills/craft/gh/SKILL.md +84 -84
- package/skills/craft/gh-skill/LICENSE +21 -21
- package/skills/craft/gh-skill/SKILL.md +121 -121
- package/skills/craft/godmode/LICENSE +21 -21
- package/skills/craft/godmode/SKILL.md +87 -87
- package/skills/craft/godmode/references/android-launch.md +680 -680
- package/skills/craft/godmode/references/data-gcp.md +1038 -1038
- package/skills/craft/godmode/references/expo-eas.md +816 -816
- package/skills/craft/godmode/references/ios-launch.md +734 -734
- package/skills/craft/google-ai-latest/LICENSE +21 -21
- package/skills/craft/google-ai-latest/SKILL.md +682 -682
- package/skills/craft/gpt-5-4-prompting/LICENSE +21 -21
- package/skills/craft/gpt-5-4-prompting/SKILL.md +63 -63
- package/skills/craft/gpt-5-4-prompting/references/codex-prompt-antipatterns.md +101 -101
- package/skills/craft/gpt-5-4-prompting/references/codex-prompt-recipes.md +150 -150
- package/skills/craft/gpt-5-4-prompting/references/prompt-blocks.md +172 -172
- package/skills/craft/grill-me/LICENSE +21 -21
- package/skills/craft/grill-me/SKILL.md +13 -13
- package/skills/craft/idea-to-deploy/LICENSE +21 -21
- package/skills/craft/idea-to-deploy/SKILL.md +292 -292
- package/skills/craft/idea-to-deploy/references/auth-playbook.md +195 -195
- package/skills/craft/idea-to-deploy/references/gcp-deployment.md +268 -268
- package/skills/craft/idea-to-deploy/references/stack-selection.md +117 -117
- package/skills/craft/image-generation-engineer/LICENSE +21 -21
- package/skills/craft/image-generation-engineer/SKILL.md +183 -183
- package/skills/craft/image-generation-engineer/references/architectures.md +260 -260
- package/skills/craft/image-generation-engineer/references/foundations.md +107 -107
- package/skills/craft/image-generation-engineer/references/inference-and-serving.md +253 -253
- package/skills/craft/image-generation-engineer/references/training.md +149 -149
- package/skills/craft/marketing/LICENSE +21 -21
- package/skills/craft/marketing/SKILL.md +1954 -1954
- package/skills/craft/master-architect/LICENSE +21 -21
- package/skills/craft/master-architect/SKILL.md +361 -361
- package/skills/craft/master-architect/references/ai-ml.md +317 -317
- package/skills/craft/master-architect/references/architecture.md +268 -268
- package/skills/craft/master-architect/references/auth-playbook.md +195 -195
- package/skills/craft/master-architect/references/cloud.md +323 -323
- package/skills/craft/master-architect/references/cyber.md +839 -839
- package/skills/craft/master-architect/references/data-eng.md +366 -366
- package/skills/craft/master-architect/references/devops.md +550 -550
- package/skills/craft/master-architect/references/gcp-deployment.md +268 -268
- package/skills/craft/master-architect/references/languages.md +748 -748
- package/skills/craft/master-architect/references/legacy.md +240 -240
- package/skills/craft/master-architect/references/mobile.md +447 -447
- package/skills/craft/master-architect/references/patterns.md +451 -451
- package/skills/craft/master-architect/references/saas-patterns.md +379 -379
- package/skills/craft/master-architect/references/sdlc.md +349 -349
- package/skills/craft/master-architect/references/stack-selection.md +117 -117
- package/skills/craft/oriro-ui-2026/LICENSE +21 -21
- package/skills/craft/oriro-ui-2026/SKILL.md +329 -329
- package/skills/craft/playwright-cli/LICENSE +21 -21
- package/skills/craft/playwright-cli/SKILL.md +393 -393
- package/skills/craft/playwright-cli/references/element-attributes.md +23 -23
- package/skills/craft/playwright-cli/references/playwright-tests.md +39 -39
- package/skills/craft/playwright-cli/references/request-mocking.md +87 -87
- package/skills/craft/playwright-cli/references/running-code.md +240 -240
- package/skills/craft/playwright-cli/references/session-management.md +226 -226
- package/skills/craft/playwright-cli/references/spec-driven-testing.md +312 -312
- package/skills/craft/playwright-cli/references/storage-state.md +275 -275
- package/skills/craft/playwright-cli/references/test-generation.md +134 -134
- package/skills/craft/playwright-cli/references/tracing.md +142 -142
- package/skills/craft/playwright-cli/references/video-recording.md +150 -150
- package/skills/craft/remotion-best-practices/LICENSE +21 -21
- package/skills/craft/remotion-best-practices/SKILL.md +345 -345
- package/skills/craft/remotion-best-practices/rules/3d.md +86 -86
- package/skills/craft/remotion-best-practices/rules/assets/charts-bar-chart.tsx +165 -165
- package/skills/craft/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +89 -89
- package/skills/craft/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +101 -101
- package/skills/craft/remotion-best-practices/rules/audio-visualization.md +195 -195
- package/skills/craft/remotion-best-practices/rules/audio.md +167 -167
- package/skills/craft/remotion-best-practices/rules/calculate-metadata.md +118 -118
- package/skills/craft/remotion-best-practices/rules/compositions.md +132 -132
- package/skills/craft/remotion-best-practices/rules/display-captions.md +176 -176
- package/skills/craft/remotion-best-practices/rules/ffmpeg.md +34 -34
- package/skills/craft/remotion-best-practices/rules/get-audio-duration.md +58 -58
- package/skills/craft/remotion-best-practices/rules/get-video-dimensions.md +68 -68
- package/skills/craft/remotion-best-practices/rules/get-video-duration.md +60 -60
- package/skills/craft/remotion-best-practices/rules/gifs.md +135 -135
- package/skills/craft/remotion-best-practices/rules/google-fonts.md +72 -72
- package/skills/craft/remotion-best-practices/rules/html-in-canvas.md +122 -122
- package/skills/craft/remotion-best-practices/rules/images.md +67 -67
- package/skills/craft/remotion-best-practices/rules/import-srt-captions.md +69 -69
- package/skills/craft/remotion-best-practices/rules/light-leaks.md +73 -73
- package/skills/craft/remotion-best-practices/rules/local-fonts.md +65 -65
- package/skills/craft/remotion-best-practices/rules/lottie.md +67 -67
- package/skills/craft/remotion-best-practices/rules/maplibre.md +441 -441
- package/skills/craft/remotion-best-practices/rules/measuring-dom-nodes.md +34 -34
- package/skills/craft/remotion-best-practices/rules/measuring-text.md +140 -140
- package/skills/craft/remotion-best-practices/rules/parameters.md +109 -109
- package/skills/craft/remotion-best-practices/rules/sequencing.md +144 -144
- package/skills/craft/remotion-best-practices/rules/sfx.md +30 -30
- package/skills/craft/remotion-best-practices/rules/silence-detection.md +73 -73
- package/skills/craft/remotion-best-practices/rules/subtitles.md +36 -36
- package/skills/craft/remotion-best-practices/rules/tailwind.md +11 -11
- package/skills/craft/remotion-best-practices/rules/text-animations.md +20 -20
- package/skills/craft/remotion-best-practices/rules/timing.md +130 -130
- package/skills/craft/remotion-best-practices/rules/transcribe-captions.md +70 -70
- package/skills/craft/remotion-best-practices/rules/transitions.md +193 -193
- package/skills/craft/remotion-best-practices/rules/transparent-videos.md +102 -102
- package/skills/craft/remotion-best-practices/rules/trimming.md +51 -51
- package/skills/craft/remotion-best-practices/rules/videos.md +169 -169
- package/skills/craft/remotion-best-practices/rules/voiceover.md +94 -94
- package/skills/craft/supabase-postgres-best-practices/CHANGELOG.md +25 -25
- package/skills/craft/supabase-postgres-best-practices/LICENSE +21 -21
- package/skills/craft/supabase-postgres-best-practices/SKILL.md +69 -69
- package/skills/craft/supabase-postgres-best-practices/references/_contributing.md +166 -166
- package/skills/craft/supabase-postgres-best-practices/references/_sections.md +47 -47
- package/skills/craft/supabase-postgres-best-practices/references/_template.md +34 -34
- package/skills/craft/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -55
- package/skills/craft/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -49
- package/skills/craft/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -46
- package/skills/craft/supabase-postgres-best-practices/references/conn-limits.md +44 -44
- package/skills/craft/supabase-postgres-best-practices/references/conn-pooling.md +41 -41
- package/skills/craft/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -46
- package/skills/craft/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -54
- package/skills/craft/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -53
- package/skills/craft/supabase-postgres-best-practices/references/data-pagination.md +50 -50
- package/skills/craft/supabase-postgres-best-practices/references/data-upsert.md +50 -50
- package/skills/craft/supabase-postgres-best-practices/references/lock-advisory.md +56 -56
- package/skills/craft/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -68
- package/skills/craft/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -50
- package/skills/craft/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -54
- package/skills/craft/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -45
- package/skills/craft/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -55
- package/skills/craft/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -55
- package/skills/craft/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -44
- package/skills/craft/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -40
- package/skills/craft/supabase-postgres-best-practices/references/query-index-types.md +48 -48
- package/skills/craft/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -43
- package/skills/craft/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -45
- package/skills/craft/supabase-postgres-best-practices/references/schema-constraints.md +80 -80
- package/skills/craft/supabase-postgres-best-practices/references/schema-data-types.md +46 -46
- package/skills/craft/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -59
- package/skills/craft/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -55
- package/skills/craft/supabase-postgres-best-practices/references/schema-partitioning.md +55 -55
- package/skills/craft/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -61
- package/skills/craft/supabase-postgres-best-practices/references/security-privileges.md +54 -54
- package/skills/craft/supabase-postgres-best-practices/references/security-rls-basics.md +50 -50
- package/skills/craft/supabase-postgres-best-practices/references/security-rls-performance.md +63 -63
- package/skills/craft/uipm-banner-design/LICENSE +21 -21
- package/skills/craft/uipm-banner-design/SKILL.md +201 -201
- package/skills/craft/uipm-banner-design/references/banner-sizes-and-styles.md +129 -129
- package/skills/craft/uipm-brand/LICENSE +21 -21
- package/skills/craft/uipm-brand/SKILL.md +104 -104
- package/skills/craft/uipm-brand/references/approval-checklist.md +184 -184
- package/skills/craft/uipm-brand/references/asset-organization.md +167 -167
- package/skills/craft/uipm-brand/references/brand-guideline-template.md +161 -161
- package/skills/craft/uipm-brand/references/color-palette-management.md +203 -203
- package/skills/craft/uipm-brand/references/consistency-checklist.md +105 -105
- package/skills/craft/uipm-brand/references/logo-usage-rules.md +204 -204
- package/skills/craft/uipm-brand/references/messaging-framework.md +91 -91
- package/skills/craft/uipm-brand/references/typography-specifications.md +265 -265
- package/skills/craft/uipm-brand/references/update.md +128 -128
- package/skills/craft/uipm-brand/references/visual-identity.md +109 -109
- package/skills/craft/uipm-brand/references/voice-framework.md +99 -99
- package/skills/craft/uipm-brand/scripts/extract-colors.cjs +333 -333
- package/skills/craft/uipm-brand/scripts/inject-brand-context.cjs +324 -324
- package/skills/craft/uipm-brand/scripts/sync-brand-to-tokens.cjs +269 -269
- package/skills/craft/uipm-brand/scripts/validate-asset.cjs +361 -361
- package/skills/craft/uipm-brand/templates/brand-guidelines-starter.md +280 -280
- package/skills/craft/uipm-design/LICENSE +21 -21
- package/skills/craft/uipm-design/SKILL.md +305 -305
- package/skills/craft/uipm-design/data/cip/deliverables.csv +50 -50
- package/skills/craft/uipm-design/data/cip/industries.csv +20 -20
- package/skills/craft/uipm-design/data/cip/mockup-contexts.csv +20 -20
- package/skills/craft/uipm-design/data/cip/styles.csv +20 -20
- package/skills/craft/uipm-design/data/icon/styles.csv +16 -16
- package/skills/craft/uipm-design/data/logo/colors.csv +56 -56
- package/skills/craft/uipm-design/data/logo/industries.csv +56 -56
- package/skills/craft/uipm-design/data/logo/styles.csv +56 -56
- package/skills/craft/uipm-design/references/banner-sizes-and-styles.md +129 -129
- package/skills/craft/uipm-design/references/cip-deliverable-guide.md +111 -111
- package/skills/craft/uipm-design/references/cip-design.md +121 -121
- package/skills/craft/uipm-design/references/cip-prompt-engineering.md +94 -94
- package/skills/craft/uipm-design/references/cip-style-guide.md +76 -76
- package/skills/craft/uipm-design/references/design-routing.md +226 -226
- package/skills/craft/uipm-design/references/icon-design.md +122 -122
- package/skills/craft/uipm-design/references/logo-color-psychology.md +113 -113
- package/skills/craft/uipm-design/references/logo-design.md +92 -92
- package/skills/craft/uipm-design/references/logo-prompt-engineering.md +176 -176
- package/skills/craft/uipm-design/references/logo-style-guide.md +129 -129
- package/skills/craft/uipm-design/references/slides-copywriting-formulas.md +92 -92
- package/skills/craft/uipm-design/references/slides-create.md +5 -5
- package/skills/craft/uipm-design/references/slides-html-template.md +374 -374
- package/skills/craft/uipm-design/references/slides-layout-patterns.md +155 -155
- package/skills/craft/uipm-design/references/slides-strategies.md +97 -97
- package/skills/craft/uipm-design/references/slides.md +42 -42
- package/skills/craft/uipm-design/references/social-photos-design.md +353 -353
- package/skills/craft/uipm-design/scripts/cip/core.py +215 -215
- package/skills/craft/uipm-design/scripts/cip/generate.py +484 -484
- package/skills/craft/uipm-design/scripts/cip/render-html.py +424 -424
- package/skills/craft/uipm-design/scripts/cip/search.py +127 -127
- package/skills/craft/uipm-design/scripts/icon/generate.py +487 -487
- package/skills/craft/uipm-design/scripts/logo/core.py +175 -175
- package/skills/craft/uipm-design/scripts/logo/generate.py +362 -362
- package/skills/craft/uipm-design/scripts/logo/search.py +114 -114
- package/skills/craft/uipm-design-system/LICENSE +21 -21
- package/skills/craft/uipm-design-system/SKILL.md +255 -255
- package/skills/craft/uipm-design-system/data/slide-backgrounds.csv +11 -11
- package/skills/craft/uipm-design-system/data/slide-charts.csv +26 -26
- package/skills/craft/uipm-design-system/data/slide-color-logic.csv +14 -14
- package/skills/craft/uipm-design-system/data/slide-copy.csv +26 -26
- package/skills/craft/uipm-design-system/data/slide-layout-logic.csv +16 -16
- package/skills/craft/uipm-design-system/data/slide-layouts.csv +26 -26
- package/skills/craft/uipm-design-system/data/slide-strategies.csv +16 -16
- package/skills/craft/uipm-design-system/data/slide-typography.csv +15 -15
- package/skills/craft/uipm-design-system/references/component-specs.md +236 -236
- package/skills/craft/uipm-design-system/references/component-tokens.md +214 -214
- package/skills/craft/uipm-design-system/references/primitive-tokens.md +199 -199
- package/skills/craft/uipm-design-system/references/semantic-tokens.md +215 -215
- package/skills/craft/uipm-design-system/references/states-and-variants.md +243 -243
- package/skills/craft/uipm-design-system/references/tailwind-integration.md +257 -257
- package/skills/craft/uipm-design-system/references/token-architecture.md +226 -226
- package/skills/craft/uipm-design-system/scripts/embed-tokens.cjs +97 -97
- package/skills/craft/uipm-design-system/scripts/fetch-background.py +317 -317
- package/skills/craft/uipm-design-system/scripts/generate-slide.py +753 -753
- package/skills/craft/uipm-design-system/scripts/generate-tokens.cjs +213 -213
- package/skills/craft/uipm-design-system/scripts/html-token-validator.py +327 -327
- package/skills/craft/uipm-design-system/scripts/search-slides.py +218 -218
- package/skills/craft/uipm-design-system/scripts/slide-token-validator.py +35 -35
- package/skills/craft/uipm-design-system/scripts/slide_search_core.py +453 -453
- package/skills/craft/uipm-design-system/scripts/validate-tokens.cjs +254 -254
- package/skills/craft/uipm-design-system/templates/design-tokens-starter.json +143 -143
- package/skills/craft/uipm-slides/LICENSE +21 -21
- package/skills/craft/uipm-slides/SKILL.md +45 -45
- package/skills/craft/uipm-slides/references/copywriting-formulas.md +92 -92
- package/skills/craft/uipm-slides/references/create.md +5 -5
- package/skills/craft/uipm-slides/references/html-template.md +374 -374
- package/skills/craft/uipm-slides/references/layout-patterns.md +155 -155
- package/skills/craft/uipm-slides/references/slide-strategies.md +97 -97
- package/skills/craft/uipm-ui-ux-pro-max/LICENSE +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/SKILL.md +678 -678
- package/skills/craft/uipm-ui-ux-pro-max/data/_sync_all.py +414 -414
- package/skills/craft/uipm-ui-ux-pro-max/data/app-interface.csv +30 -30
- package/skills/craft/uipm-ui-ux-pro-max/data/charts.csv +26 -26
- package/skills/craft/uipm-ui-ux-pro-max/data/colors.csv +161 -161
- package/skills/craft/uipm-ui-ux-pro-max/data/design.csv +1775 -1775
- package/skills/craft/uipm-ui-ux-pro-max/data/draft.csv +1778 -1778
- package/skills/craft/uipm-ui-ux-pro-max/data/google-fonts.csv +1924 -1924
- package/skills/craft/uipm-ui-ux-pro-max/data/icons.csv +105 -105
- package/skills/craft/uipm-ui-ux-pro-max/data/landing.csv +35 -35
- package/skills/craft/uipm-ui-ux-pro-max/data/products.csv +162 -162
- package/skills/craft/uipm-ui-ux-pro-max/data/react-performance.csv +45 -45
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/angular.csv +51 -51
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/astro.csv +54 -54
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/flutter.csv +53 -53
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -56
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -53
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/laravel.csv +51 -51
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/nextjs.csv +53 -53
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -51
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -59
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/react-native.csv +52 -52
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/react.csv +54 -54
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/shadcn.csv +61 -61
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/svelte.csv +54 -54
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/swiftui.csv +51 -51
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/threejs.csv +54 -54
- package/skills/craft/uipm-ui-ux-pro-max/data/stacks/vue.csv +50 -50
- package/skills/craft/uipm-ui-ux-pro-max/data/styles.csv +85 -85
- package/skills/craft/uipm-ui-ux-pro-max/data/typography.csv +74 -74
- package/skills/craft/uipm-ui-ux-pro-max/data/ui-reasoning.csv +162 -162
- package/skills/craft/uipm-ui-ux-pro-max/data/ux-guidelines.csv +99 -99
- package/skills/craft/uipm-ui-ux-pro-max/scripts/core.py +262 -262
- package/skills/craft/uipm-ui-ux-pro-max/scripts/design_system.py +1148 -1148
- package/skills/craft/uipm-ui-ux-pro-max/scripts/search.py +114 -114
- package/skills/craft/uipm-ui-ux-pro-max/templates/base/quick-reference.md +297 -297
- package/skills/craft/uipm-ui-ux-pro-max/templates/base/skill-content.md +375 -375
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/agent.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/augment.json +18 -18
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/claude.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/codebuddy.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/codex.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/continue.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/copilot.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/cursor.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/droid.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/gemini.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/kilocode.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/kiro.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/opencode.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/qoder.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/roocode.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/trae.json +21 -21
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/warp.json +18 -18
- package/skills/craft/uipm-ui-ux-pro-max/templates/platforms/windsurf.json +21 -21
- package/skills/craft/vercel-optimize/AGENTS.md +48 -48
- package/skills/craft/vercel-optimize/CONTRIBUTING.md +41 -41
- package/skills/craft/vercel-optimize/LICENSE +21 -21
- package/skills/craft/vercel-optimize/README.md +91 -91
- package/skills/craft/vercel-optimize/SKILL.md +325 -325
- package/skills/craft/vercel-optimize/lib/auth-route.mjs +23 -23
- package/skills/craft/vercel-optimize/lib/budget-summary.mjs +208 -208
- package/skills/craft/vercel-optimize/lib/citations.mjs +147 -147
- package/skills/craft/vercel-optimize/lib/cost-coverage.mjs +162 -162
- package/skills/craft/vercel-optimize/lib/dedup-recs.mjs +340 -340
- package/skills/craft/vercel-optimize/lib/deep-dive.mjs +371 -371
- package/skills/craft/vercel-optimize/lib/display-labels.mjs +219 -219
- package/skills/craft/vercel-optimize/lib/extract-claims.mjs +640 -640
- package/skills/craft/vercel-optimize/lib/framework-support.mjs +69 -69
- package/skills/craft/vercel-optimize/lib/gates/build-minutes-fanout.mjs +73 -73
- package/skills/craft/vercel-optimize/lib/gates/cold-start.mjs +72 -72
- package/skills/craft/vercel-optimize/lib/gates/contract.mjs +82 -82
- package/skills/craft/vercel-optimize/lib/gates/cwv-poor.mjs +95 -95
- package/skills/craft/vercel-optimize/lib/gates/external-api-slow.mjs +60 -60
- package/skills/craft/vercel-optimize/lib/gates/hard-gates.mjs +70 -70
- package/skills/craft/vercel-optimize/lib/gates/index.mjs +45 -45
- package/skills/craft/vercel-optimize/lib/gates/isr-overrevalidation.mjs +62 -62
- package/skills/craft/vercel-optimize/lib/gates/middleware-heavy.mjs +53 -53
- package/skills/craft/vercel-optimize/lib/gates/observability-events-attribution.mjs +58 -58
- package/skills/craft/vercel-optimize/lib/gates/platform-bot-protection.mjs +123 -123
- package/skills/craft/vercel-optimize/lib/gates/platform-fluid-compute.mjs +94 -94
- package/skills/craft/vercel-optimize/lib/gates/region-misconfig.mjs +71 -71
- package/skills/craft/vercel-optimize/lib/gates/route-errors.mjs +95 -95
- package/skills/craft/vercel-optimize/lib/gates/scanner-driven.mjs +150 -150
- package/skills/craft/vercel-optimize/lib/gates/select-candidates.mjs +137 -137
- package/skills/craft/vercel-optimize/lib/gates/slow-route.mjs +97 -97
- package/skills/craft/vercel-optimize/lib/gates/types.d.ts +38 -38
- package/skills/craft/vercel-optimize/lib/gates/uncached-route.mjs +103 -103
- package/skills/craft/vercel-optimize/lib/gates/usage-spike-triage.mjs +122 -122
- package/skills/craft/vercel-optimize/lib/grade-recommendation.mjs +170 -170
- package/skills/craft/vercel-optimize/lib/impact-label.mjs +128 -128
- package/skills/craft/vercel-optimize/lib/impact-magnitude.mjs +66 -66
- package/skills/craft/vercel-optimize/lib/investigation-brief.mjs +751 -751
- package/skills/craft/vercel-optimize/lib/observation-safety.mjs +217 -217
- package/skills/craft/vercel-optimize/lib/project-facts.mjs +101 -101
- package/skills/craft/vercel-optimize/lib/queries.mjs +333 -333
- package/skills/craft/vercel-optimize/lib/reconcile-candidates.mjs +388 -388
- package/skills/craft/vercel-optimize/lib/render-report.mjs +1065 -1065
- package/skills/craft/vercel-optimize/lib/repo-root.mjs +97 -97
- package/skills/craft/vercel-optimize/lib/route-normalize.mjs +224 -224
- package/skills/craft/vercel-optimize/lib/sanitizers/bot-protection-certainty.mjs +56 -56
- package/skills/craft/vercel-optimize/lib/sanitizers/cache-tag-invalidation-certainty.mjs +33 -33
- package/skills/craft/vercel-optimize/lib/sanitizers/count-correct.mjs +53 -53
- package/skills/craft/vercel-optimize/lib/sanitizers/function-duration-invocations.mjs +32 -32
- package/skills/craft/vercel-optimize/lib/sanitizers/index.mjs +87 -87
- package/skills/craft/vercel-optimize/lib/sanitizers/middleware-conflict.mjs +37 -37
- package/skills/craft/vercel-optimize/lib/sanitizers/missing-citation.mjs +16 -16
- package/skills/craft/vercel-optimize/lib/sanitizers/pre-release.mjs +75 -75
- package/skills/craft/vercel-optimize/lib/sanitizers/rate-limit.mjs +73 -73
- package/skills/craft/vercel-optimize/lib/sanitizers/rendering-mode-mislabel.mjs +42 -42
- package/skills/craft/vercel-optimize/lib/sanitizers/undeclared-dep.mjs +110 -110
- package/skills/craft/vercel-optimize/lib/sanitizers/vercel-directive-strip.mjs +37 -37
- package/skills/craft/vercel-optimize/lib/sanitizers/window-units.mjs +26 -26
- package/skills/craft/vercel-optimize/lib/scanners/cache-components-suspense-dedupe.mjs +114 -114
- package/skills/craft/vercel-optimize/lib/scanners/edge-heavy-import.mjs +102 -102
- package/skills/craft/vercel-optimize/lib/scanners/force-dynamic.mjs +39 -39
- package/skills/craft/vercel-optimize/lib/scanners/headers-in-page.mjs +43 -43
- package/skills/craft/vercel-optimize/lib/scanners/index.mjs +35 -35
- package/skills/craft/vercel-optimize/lib/scanners/large-static-asset.mjs +93 -93
- package/skills/craft/vercel-optimize/lib/scanners/max-age-without-s-maxage.mjs +47 -47
- package/skills/craft/vercel-optimize/lib/scanners/middleware-broad-matcher.mjs +53 -53
- package/skills/craft/vercel-optimize/lib/scanners/missing-cache-headers.mjs +97 -97
- package/skills/craft/vercel-optimize/lib/scanners/prisma-include-tree.mjs +39 -39
- package/skills/craft/vercel-optimize/lib/scanners/region-pin-in-config.mjs +89 -89
- package/skills/craft/vercel-optimize/lib/scanners/source-maps-production.mjs +33 -33
- package/skills/craft/vercel-optimize/lib/scanners/sveltekit-prerender-missing.mjs +47 -47
- package/skills/craft/vercel-optimize/lib/scanners/turbo-force-bypass.mjs +136 -136
- package/skills/craft/vercel-optimize/lib/scanners/unoptimized-image.mjs +127 -127
- package/skills/craft/vercel-optimize/lib/scanners/use-cache-date-stamp.mjs +112 -112
- package/skills/craft/vercel-optimize/lib/support-topics.mjs +365 -365
- package/skills/craft/vercel-optimize/lib/throttle.mjs +280 -280
- package/skills/craft/vercel-optimize/lib/util.mjs +17 -17
- package/skills/craft/vercel-optimize/lib/vercel.mjs +855 -855
- package/skills/craft/vercel-optimize/lib/verify-claim.mjs +1843 -1843
- package/skills/craft/vercel-optimize/lib/workspace-resolver.mjs +552 -552
- package/skills/craft/vercel-optimize/metadata.json +14 -14
- package/skills/craft/vercel-optimize/references/candidates.md +176 -176
- package/skills/craft/vercel-optimize/references/data-collection.md +224 -224
- package/skills/craft/vercel-optimize/references/docs-library.json +683 -683
- package/skills/craft/vercel-optimize/references/doctrine.md +108 -108
- package/skills/craft/vercel-optimize/references/observability-plus.md +109 -109
- package/skills/craft/vercel-optimize/references/playbooks/README.md +57 -57
- package/skills/craft/vercel-optimize/references/playbooks/ai-application.md +32 -32
- package/skills/craft/vercel-optimize/references/playbooks/api-service.md +30 -30
- package/skills/craft/vercel-optimize/references/playbooks/content-site.md +30 -30
- package/skills/craft/vercel-optimize/references/playbooks/ecommerce.md +30 -30
- package/skills/craft/vercel-optimize/references/playbooks/marketing.md +30 -30
- package/skills/craft/vercel-optimize/references/playbooks/saas.md +31 -31
- package/skills/craft/vercel-optimize/references/playbooks/sveltekit.md +75 -75
- package/skills/craft/vercel-optimize/references/recommendations.md +214 -214
- package/skills/craft/vercel-optimize/references/scanner-patterns.md +266 -266
- package/skills/craft/vercel-optimize/references/scoring.md +208 -208
- package/skills/craft/vercel-optimize/references/support-topics/README.md +50 -50
- package/skills/craft/vercel-optimize/references/support-topics/astro-edge-middleware-scope.md +30 -30
- package/skills/craft/vercel-optimize/references/support-topics/astro-output-mode-and-isr.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/auth-preserving-parallelization.md +30 -30
- package/skills/craft/vercel-optimize/references/support-topics/bot-protection-product-guardrails.md +32 -32
- package/skills/craft/vercel-optimize/references/support-topics/build-minutes-monorepo-fanout.md +32 -32
- package/skills/craft/vercel-optimize/references/support-topics/cache-components-static-shell-boundaries.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/cache-components-suspense-dedupe-pitfall.md +32 -32
- package/skills/craft/vercel-optimize/references/support-topics/cdn-cache-auth-safety.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/cold-start-initialization-bundle.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/core-web-vitals-client-bottlenecks.md +33 -33
- package/skills/craft/vercel-optimize/references/support-topics/database-egress-pooling-region.md +32 -32
- package/skills/craft/vercel-optimize/references/support-topics/dynamic-rendering-traps.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/external-api-critical-path-platform.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/external-api-critical-path.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/fast-data-transfer-payloads.md +26 -26
- package/skills/craft/vercel-optimize/references/support-topics/fluid-compute-caveats.md +26 -26
- package/skills/craft/vercel-optimize/references/support-topics/function-duration-io-and-after.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/function-invocation-reduction.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/function-region-misconfiguration-ttfb.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/image-optimization-cost-control.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/isr-revalidation-static-generation.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/middleware-proxy-edge-cost.md +30 -30
- package/skills/craft/vercel-optimize/references/support-topics/next-fetch-revalidate-floor.md +30 -30
- package/skills/craft/vercel-optimize/references/support-topics/next-font-cls-self-hosting.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/next-heavy-ui-lazy-load-boundaries.md +28 -28
- package/skills/craft/vercel-optimize/references/support-topics/next-image-lcp-preload-sizes.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/next-route-handler-get-cache-defaults.md +30 -30
- package/skills/craft/vercel-optimize/references/support-topics/next-script-third-party-strategy.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/nextjs-version-cache-semantics.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/not-found-catchall-request-waste.md +33 -33
- package/skills/craft/vercel-optimize/references/support-topics/nuxt-route-rules-cache-isr.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/observability-events-cost-attribution.md +27 -27
- package/skills/craft/vercel-optimize/references/support-topics/post-response-work-waituntil.md +26 -26
- package/skills/craft/vercel-optimize/references/support-topics/route-error-durable-offload.md +33 -33
- package/skills/craft/vercel-optimize/references/support-topics/route-error-runtime-limits.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/runtime-cache-reusable-data.md +30 -30
- package/skills/craft/vercel-optimize/references/support-topics/sveltekit-isr-prerender-safety.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/sveltekit-split-cold-start-tradeoff.md +30 -30
- package/skills/craft/vercel-optimize/references/support-topics/usage-spike-triage.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/use-cache-date-stamp-isr-write-amplifier.md +31 -31
- package/skills/craft/vercel-optimize/references/support-topics/use-cache-remote-shared-origin-data.md +30 -30
- package/skills/craft/vercel-optimize/references/support-topics/workflow-resumable-stream-routes.md +32 -32
- package/skills/craft/vercel-optimize/references/verification.md +102 -102
- package/skills/craft/vercel-optimize/references/voice.md +76 -76
- package/skills/craft/vercel-optimize/scripts/budget-summary.mjs +58 -58
- package/skills/craft/vercel-optimize/scripts/build-docs.mjs +76 -76
- package/skills/craft/vercel-optimize/scripts/check-citations.mjs +91 -91
- package/skills/craft/vercel-optimize/scripts/check-docs-fresh.mjs +100 -100
- package/skills/craft/vercel-optimize/scripts/collect-signals.mjs +638 -638
- package/skills/craft/vercel-optimize/scripts/collect-sub-agent-outputs.mjs +306 -306
- package/skills/craft/vercel-optimize/scripts/deep-dive.mjs +358 -358
- package/skills/craft/vercel-optimize/scripts/gate-investigations.mjs +178 -178
- package/skills/craft/vercel-optimize/scripts/merge-signals.mjs +203 -203
- package/skills/craft/vercel-optimize/scripts/prepare-investigation-brief.mjs +249 -249
- package/skills/craft/vercel-optimize/scripts/reconcile-candidates.mjs +69 -69
- package/skills/craft/vercel-optimize/scripts/render-report.mjs +462 -462
- package/skills/craft/vercel-optimize/scripts/scan-codebase.mjs +361 -361
- package/skills/craft/vercel-optimize/scripts/verify-and-regen.mjs +379 -379
- package/skills/craft/vercel-optimize/scripts/verify-finding.mjs +21 -21
- package/skills/craft/web-design-guidelines/LICENSE +21 -21
- package/skills/craft/web-design-guidelines/SKILL.md +43 -43
- package/skills/craft/zero-to-live/LICENSE +21 -21
- package/skills/craft/zero-to-live/SKILL.md +422 -422
- package/skills/creative/creative-3d-modeling/LICENSE +21 -21
- package/skills/creative/creative-3d-modeling/SKILL.md +70 -70
- package/skills/creative/creative-architecture/LICENSE +21 -21
- package/skills/creative/creative-architecture/SKILL.md +94 -94
- package/skills/creative/creative-design-principles/LICENSE +21 -21
- package/skills/creative/creative-design-principles/SKILL.md +95 -95
- package/skills/creative/creative-fashion-advanced/LICENSE +21 -21
- package/skills/creative/creative-fashion-advanced/SKILL.md +68 -68
- package/skills/creative/creative-fashion-design/LICENSE +21 -21
- package/skills/creative/creative-fashion-design/SKILL.md +66 -66
- package/skills/creative/creative-game-design/LICENSE +21 -21
- package/skills/creative/creative-game-design/SKILL.md +77 -77
- package/skills/creative/creative-industrial-design/LICENSE +21 -21
- package/skills/creative/creative-industrial-design/SKILL.md +57 -57
- package/skills/creative/creative-interior-design/LICENSE +21 -21
- package/skills/creative/creative-interior-design/SKILL.md +59 -59
- package/skills/creative/creative-music-theory/LICENSE +21 -21
- package/skills/creative/creative-music-theory/SKILL.md +98 -98
- package/skills/creative/creative-photography/LICENSE +21 -21
- package/skills/creative/creative-photography/SKILL.md +87 -87
- package/skills/creative/creative-textile-science/LICENSE +21 -21
- package/skills/creative/creative-textile-science/SKILL.md +67 -67
- package/skills/creative/creative-ux/LICENSE +21 -21
- package/skills/creative/creative-ux/SKILL.md +81 -81
- package/skills/creative/creative-video/LICENSE +21 -21
- package/skills/creative/creative-video/SKILL.md +84 -84
- package/skills/creative/creative-writing-craft/LICENSE +21 -21
- package/skills/creative/creative-writing-craft/SKILL.md +91 -91
- package/skills/diagram-maker/SKILL.md +56 -56
- package/skills/diagram-maker/references/excalidraw-patterns.md +85 -85
- package/skills/diagram-maker/references/svg-template.md +112 -112
- package/skills/discord/SKILL.md +140 -140
- package/skills/education/edu-adult-learning/LICENSE +21 -21
- package/skills/education/edu-adult-learning/SKILL.md +81 -81
- package/skills/education/edu-africa-multilingual/LICENSE +21 -21
- package/skills/education/edu-africa-multilingual/SKILL.md +55 -55
- package/skills/education/edu-arabic/LICENSE +21 -21
- package/skills/education/edu-arabic/SKILL.md +60 -60
- package/skills/education/edu-australia-nz/LICENSE +21 -21
- package/skills/education/edu-australia-nz/SKILL.md +48 -48
- package/skills/education/edu-china-mandarin/LICENSE +21 -21
- package/skills/education/edu-china-mandarin/SKILL.md +58 -58
- package/skills/education/edu-critical-thinking/LICENSE +21 -21
- package/skills/education/edu-critical-thinking/SKILL.md +86 -86
- package/skills/education/edu-curriculum/LICENSE +21 -21
- package/skills/education/edu-curriculum/SKILL.md +87 -87
- package/skills/education/edu-ed-tech/LICENSE +21 -21
- package/skills/education/edu-ed-tech/SKILL.md +73 -73
- package/skills/education/edu-france/LICENSE +21 -21
- package/skills/education/edu-france/SKILL.md +42 -42
- package/skills/education/edu-germany/LICENSE +21 -21
- package/skills/education/edu-germany/SKILL.md +46 -46
- package/skills/education/edu-india-competitive/LICENSE +21 -21
- package/skills/education/edu-india-competitive/SKILL.md +159 -159
- package/skills/education/edu-india-east/LICENSE +21 -21
- package/skills/education/edu-india-east/SKILL.md +60 -60
- package/skills/education/edu-india-hindi/LICENSE +21 -21
- package/skills/education/edu-india-hindi/SKILL.md +107 -107
- package/skills/education/edu-india-south/LICENSE +21 -21
- package/skills/education/edu-india-south/SKILL.md +64 -64
- package/skills/education/edu-india-west/LICENSE +21 -21
- package/skills/education/edu-india-west/SKILL.md +68 -68
- package/skills/education/edu-indonesia-malay/LICENSE +21 -21
- package/skills/education/edu-indonesia-malay/SKILL.md +57 -57
- package/skills/education/edu-international-ib/LICENSE +21 -21
- package/skills/education/edu-international-ib/SKILL.md +61 -61
- package/skills/education/edu-japan/LICENSE +21 -21
- package/skills/education/edu-japan/SKILL.md +48 -48
- package/skills/education/edu-korea/LICENSE +21 -21
- package/skills/education/edu-korea/SKILL.md +48 -48
- package/skills/education/edu-learning-science/LICENSE +21 -21
- package/skills/education/edu-learning-science/SKILL.md +76 -76
- package/skills/education/edu-portuguese-brazil/LICENSE +21 -21
- package/skills/education/edu-portuguese-brazil/SKILL.md +51 -51
- package/skills/education/edu-russia/LICENSE +21 -21
- package/skills/education/edu-russia/SKILL.md +50 -50
- package/skills/education/edu-spain-latam/LICENSE +21 -21
- package/skills/education/edu-spain-latam/SKILL.md +55 -55
- package/skills/education/edu-special/LICENSE +21 -21
- package/skills/education/edu-special/SKILL.md +76 -76
- package/skills/education/edu-thailand/LICENSE +21 -21
- package/skills/education/edu-thailand/SKILL.md +55 -55
- package/skills/education/edu-turkey/LICENSE +21 -21
- package/skills/education/edu-turkey/SKILL.md +58 -58
- package/skills/education/edu-uk-gcse-alevel/LICENSE +21 -21
- package/skills/education/edu-uk-gcse-alevel/SKILL.md +51 -51
- package/skills/education/edu-usa-graduate/LICENSE +21 -21
- package/skills/education/edu-usa-graduate/SKILL.md +57 -57
- package/skills/education/edu-usa-sat-act/LICENSE +21 -21
- package/skills/education/edu-usa-sat-act/SKILL.md +55 -55
- package/skills/education/edu-vietnam/LICENSE +21 -21
- package/skills/education/edu-vietnam/SKILL.md +53 -53
- package/skills/eightctl/SKILL.md +54 -54
- package/skills/engineering/eng-aerospace/LICENSE +21 -21
- package/skills/engineering/eng-aerospace/SKILL.md +117 -117
- package/skills/engineering/eng-chemical/LICENSE +21 -21
- package/skills/engineering/eng-chemical/SKILL.md +63 -63
- package/skills/engineering/eng-civil/LICENSE +21 -21
- package/skills/engineering/eng-civil/SKILL.md +223 -223
- package/skills/engineering/eng-control-systems/LICENSE +21 -21
- package/skills/engineering/eng-control-systems/SKILL.md +158 -158
- package/skills/engineering/eng-cryogenics/LICENSE +21 -21
- package/skills/engineering/eng-cryogenics/SKILL.md +151 -151
- package/skills/engineering/eng-electrical/LICENSE +21 -21
- package/skills/engineering/eng-electrical/SKILL.md +70 -70
- package/skills/engineering/eng-electronics-embedded/LICENSE +21 -21
- package/skills/engineering/eng-electronics-embedded/SKILL.md +89 -89
- package/skills/engineering/eng-environmental/LICENSE +21 -21
- package/skills/engineering/eng-environmental/SKILL.md +66 -66
- package/skills/engineering/eng-manufacturing/LICENSE +21 -21
- package/skills/engineering/eng-manufacturing/SKILL.md +78 -78
- package/skills/engineering/eng-mechanical/LICENSE +21 -21
- package/skills/engineering/eng-mechanical/SKILL.md +66 -66
- package/skills/engineering/eng-project/LICENSE +21 -21
- package/skills/engineering/eng-project/SKILL.md +72 -72
- package/skills/engineering/eng-propulsion/LICENSE +21 -21
- package/skills/engineering/eng-propulsion/SKILL.md +133 -133
- package/skills/engineering/eng-robotics/LICENSE +21 -21
- package/skills/engineering/eng-robotics/SKILL.md +92 -92
- package/skills/engineering/eng-systems/LICENSE +21 -21
- package/skills/engineering/eng-systems/SKILL.md +81 -81
- package/skills/environment/env-biodiversity/LICENSE +21 -21
- package/skills/environment/env-biodiversity/SKILL.md +66 -66
- package/skills/environment/env-circular-economy/LICENSE +21 -21
- package/skills/environment/env-circular-economy/SKILL.md +71 -71
- package/skills/environment/env-climate-action/LICENSE +21 -21
- package/skills/environment/env-climate-action/SKILL.md +55 -55
- package/skills/environment/env-energy/LICENSE +21 -21
- package/skills/environment/env-energy/SKILL.md +83 -83
- package/skills/environment/env-sustainability-biz/LICENSE +21 -21
- package/skills/environment/env-sustainability-biz/SKILL.md +65 -65
- package/skills/environment/env-water/LICENSE +21 -21
- package/skills/environment/env-water/SKILL.md +67 -67
- package/skills/finance/finance-accounting/LICENSE +21 -21
- package/skills/finance/finance-accounting/SKILL.md +239 -239
- package/skills/finance/finance-banking/LICENSE +21 -21
- package/skills/finance/finance-banking/SKILL.md +54 -54
- package/skills/finance/finance-corporate/LICENSE +21 -21
- package/skills/finance/finance-corporate/SKILL.md +105 -105
- package/skills/finance/finance-crypto/LICENSE +21 -21
- package/skills/finance/finance-crypto/SKILL.md +94 -94
- package/skills/finance/finance-debt-management/LICENSE +21 -21
- package/skills/finance/finance-debt-management/SKILL.md +87 -87
- package/skills/finance/finance-insurance/LICENSE +21 -21
- package/skills/finance/finance-insurance/SKILL.md +91 -91
- package/skills/finance/finance-investing/LICENSE +21 -21
- package/skills/finance/finance-investing/SKILL.md +269 -269
- package/skills/finance/finance-options-derivatives/LICENSE +21 -21
- package/skills/finance/finance-options-derivatives/SKILL.md +68 -68
- package/skills/finance/finance-personal/LICENSE +21 -21
- package/skills/finance/finance-personal/SKILL.md +268 -268
- package/skills/finance/finance-real-estate/LICENSE +21 -21
- package/skills/finance/finance-real-estate/SKILL.md +110 -110
- package/skills/finance/finance-startup/LICENSE +21 -21
- package/skills/finance/finance-startup/SKILL.md +253 -253
- package/skills/finance/finance-tax-planning/LICENSE +21 -21
- package/skills/finance/finance-tax-planning/SKILL.md +89 -89
- package/skills/finance/finance-trading/LICENSE +21 -21
- package/skills/finance/finance-trading/SKILL.md +112 -112
- package/skills/gemini/SKILL.md +51 -51
- package/skills/gh-issues/SKILL.md +216 -216
- package/skills/gifgrep/SKILL.md +89 -89
- package/skills/github/SKILL.md +87 -87
- package/skills/gog/SKILL.md +120 -120
- package/skills/goplaces/SKILL.md +56 -56
- package/skills/graphify/SKILL.md +619 -0
- package/skills/graphify/__init__.py +28 -0
- package/skills/graphify/__main__.py +4582 -0
- package/skills/graphify/affected.py +154 -0
- package/skills/graphify/always_on/agents-md.md +12 -0
- package/skills/graphify/always_on/antigravity-rules.md +14 -0
- package/skills/graphify/always_on/claude-md.md +9 -0
- package/skills/graphify/always_on/gemini-md.md +9 -0
- package/skills/graphify/always_on/kiro-steering.md +5 -0
- package/skills/graphify/always_on/vscode-instructions.md +17 -0
- package/skills/graphify/analyze.py +724 -0
- package/skills/graphify/benchmark.py +155 -0
- package/skills/graphify/build.py +487 -0
- package/skills/graphify/cache.py +417 -0
- package/skills/graphify/callflow_html.py +2020 -0
- package/skills/graphify/cluster.py +272 -0
- package/skills/graphify/command-kilo.md +15 -0
- package/skills/graphify/dedup.py +429 -0
- package/skills/graphify/detect.py +1379 -0
- package/skills/graphify/diagnostics.py +390 -0
- package/skills/graphify/export.py +1408 -0
- package/skills/graphify/extract.py +11570 -0
- package/skills/graphify/global_graph.py +159 -0
- package/skills/graphify/google_workspace.py +223 -0
- package/skills/graphify/hooks.py +457 -0
- package/skills/graphify/ingest.py +331 -0
- package/skills/graphify/llm.py +1896 -0
- package/skills/graphify/manifest.py +4 -0
- package/skills/graphify/mcp_ingest.py +392 -0
- package/skills/graphify/multigraph_compat.py +212 -0
- package/skills/graphify/pg_introspect.py +142 -0
- package/skills/graphify/prs.py +748 -0
- package/skills/graphify/querylog.py +70 -0
- package/skills/graphify/report.py +218 -0
- package/skills/graphify/scip_ingest.py +363 -0
- package/skills/graphify/security.py +336 -0
- package/skills/graphify/semantic_cleanup.py +319 -0
- package/skills/graphify/serve.py +1309 -0
- package/skills/graphify/skill-aider.md +1246 -0
- package/skills/graphify/skill-amp.md +613 -0
- package/skills/graphify/skill-claw.md +616 -0
- package/skills/graphify/skill-codex.md +613 -0
- package/skills/graphify/skill-copilot.md +616 -0
- package/skills/graphify/skill-devin.md +1372 -0
- package/skills/graphify/skill-droid.md +613 -0
- package/skills/graphify/skill-kilo.md +625 -0
- package/skills/graphify/skill-kiro.md +615 -0
- package/skills/graphify/skill-opencode.md +608 -0
- package/skills/graphify/skill-pi.md +615 -0
- package/skills/graphify/skill-trae.md +614 -0
- package/skills/graphify/skill-vscode.md +612 -0
- package/skills/graphify/skill-windows.md +651 -0
- package/skills/graphify/skills/amp/references/add-watch.md +56 -0
- package/skills/graphify/skills/amp/references/exports.md +71 -0
- package/skills/graphify/skills/amp/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/amp/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/amp/references/hooks.md +33 -0
- package/skills/graphify/skills/amp/references/query.md +249 -0
- package/skills/graphify/skills/amp/references/transcribe.md +48 -0
- package/skills/graphify/skills/amp/references/update.md +179 -0
- package/skills/graphify/skills/claude/references/add-watch.md +56 -0
- package/skills/graphify/skills/claude/references/exports.md +71 -0
- package/skills/graphify/skills/claude/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/claude/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/claude/references/hooks.md +33 -0
- package/skills/graphify/skills/claude/references/query.md +103 -0
- package/skills/graphify/skills/claude/references/transcribe.md +48 -0
- package/skills/graphify/skills/claude/references/update.md +179 -0
- package/skills/graphify/skills/claw/references/add-watch.md +56 -0
- package/skills/graphify/skills/claw/references/exports.md +71 -0
- package/skills/graphify/skills/claw/references/extraction-spec.md +29 -0
- package/skills/graphify/skills/claw/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/claw/references/hooks.md +33 -0
- package/skills/graphify/skills/claw/references/query.md +249 -0
- package/skills/graphify/skills/claw/references/transcribe.md +48 -0
- package/skills/graphify/skills/claw/references/update.md +179 -0
- package/skills/graphify/skills/codex/references/add-watch.md +56 -0
- package/skills/graphify/skills/codex/references/exports.md +71 -0
- package/skills/graphify/skills/codex/references/extraction-spec.md +29 -0
- package/skills/graphify/skills/codex/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/codex/references/hooks.md +33 -0
- package/skills/graphify/skills/codex/references/query.md +249 -0
- package/skills/graphify/skills/codex/references/transcribe.md +48 -0
- package/skills/graphify/skills/codex/references/update.md +179 -0
- package/skills/graphify/skills/copilot/references/add-watch.md +56 -0
- package/skills/graphify/skills/copilot/references/exports.md +71 -0
- package/skills/graphify/skills/copilot/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/copilot/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/copilot/references/hooks.md +33 -0
- package/skills/graphify/skills/copilot/references/query.md +249 -0
- package/skills/graphify/skills/copilot/references/transcribe.md +48 -0
- package/skills/graphify/skills/copilot/references/update.md +179 -0
- package/skills/graphify/skills/droid/references/add-watch.md +56 -0
- package/skills/graphify/skills/droid/references/exports.md +71 -0
- package/skills/graphify/skills/droid/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/droid/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/droid/references/hooks.md +33 -0
- package/skills/graphify/skills/droid/references/query.md +249 -0
- package/skills/graphify/skills/droid/references/transcribe.md +48 -0
- package/skills/graphify/skills/droid/references/update.md +179 -0
- package/skills/graphify/skills/kilo/references/add-watch.md +56 -0
- package/skills/graphify/skills/kilo/references/exports.md +71 -0
- package/skills/graphify/skills/kilo/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/kilo/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/kilo/references/hooks.md +33 -0
- package/skills/graphify/skills/kilo/references/query.md +249 -0
- package/skills/graphify/skills/kilo/references/transcribe.md +48 -0
- package/skills/graphify/skills/kilo/references/update.md +179 -0
- package/skills/graphify/skills/kiro/references/add-watch.md +56 -0
- package/skills/graphify/skills/kiro/references/exports.md +71 -0
- package/skills/graphify/skills/kiro/references/extraction-spec.md +29 -0
- package/skills/graphify/skills/kiro/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/kiro/references/hooks.md +33 -0
- package/skills/graphify/skills/kiro/references/query.md +249 -0
- package/skills/graphify/skills/kiro/references/transcribe.md +48 -0
- package/skills/graphify/skills/kiro/references/update.md +179 -0
- package/skills/graphify/skills/opencode/references/add-watch.md +56 -0
- package/skills/graphify/skills/opencode/references/exports.md +71 -0
- package/skills/graphify/skills/opencode/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/opencode/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/opencode/references/hooks.md +33 -0
- package/skills/graphify/skills/opencode/references/query.md +249 -0
- package/skills/graphify/skills/opencode/references/transcribe.md +48 -0
- package/skills/graphify/skills/opencode/references/update.md +179 -0
- package/skills/graphify/skills/pi/references/add-watch.md +56 -0
- package/skills/graphify/skills/pi/references/exports.md +71 -0
- package/skills/graphify/skills/pi/references/extraction-spec.md +29 -0
- package/skills/graphify/skills/pi/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/pi/references/hooks.md +33 -0
- package/skills/graphify/skills/pi/references/query.md +249 -0
- package/skills/graphify/skills/pi/references/transcribe.md +48 -0
- package/skills/graphify/skills/pi/references/update.md +179 -0
- package/skills/graphify/skills/trae/references/add-watch.md +56 -0
- package/skills/graphify/skills/trae/references/exports.md +71 -0
- package/skills/graphify/skills/trae/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/trae/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/trae/references/hooks.md +35 -0
- package/skills/graphify/skills/trae/references/query.md +249 -0
- package/skills/graphify/skills/trae/references/transcribe.md +48 -0
- package/skills/graphify/skills/trae/references/update.md +179 -0
- package/skills/graphify/skills/vscode/references/add-watch.md +56 -0
- package/skills/graphify/skills/vscode/references/exports.md +71 -0
- package/skills/graphify/skills/vscode/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/vscode/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/vscode/references/hooks.md +33 -0
- package/skills/graphify/skills/vscode/references/query.md +249 -0
- package/skills/graphify/skills/vscode/references/transcribe.md +48 -0
- package/skills/graphify/skills/vscode/references/update.md +179 -0
- package/skills/graphify/skills/windows/references/add-watch.md +56 -0
- package/skills/graphify/skills/windows/references/exports.md +71 -0
- package/skills/graphify/skills/windows/references/extraction-spec.md +68 -0
- package/skills/graphify/skills/windows/references/github-and-merge.md +46 -0
- package/skills/graphify/skills/windows/references/hooks.md +33 -0
- package/skills/graphify/skills/windows/references/query.md +249 -0
- package/skills/graphify/skills/windows/references/transcribe.md +48 -0
- package/skills/graphify/skills/windows/references/update.md +179 -0
- package/skills/graphify/symbol_resolution.py +538 -0
- package/skills/graphify/transcribe.py +184 -0
- package/skills/graphify/tree_html.py +582 -0
- package/skills/graphify/validate.py +72 -0
- package/skills/graphify/watch.py +898 -0
- package/skills/graphify/wiki.py +282 -0
- package/skills/health/health-aging/LICENSE +21 -21
- package/skills/health/health-aging/SKILL.md +82 -82
- package/skills/health/health-chronic/LICENSE +21 -21
- package/skills/health/health-chronic/SKILL.md +202 -202
- package/skills/health/health-dental/LICENSE +21 -21
- package/skills/health/health-dental/SKILL.md +41 -41
- package/skills/health/health-eye-care/LICENSE +21 -21
- package/skills/health/health-eye-care/SKILL.md +56 -56
- package/skills/health/health-first-aid/LICENSE +21 -21
- package/skills/health/health-first-aid/SKILL.md +201 -201
- package/skills/health/health-fitness/LICENSE +21 -21
- package/skills/health/health-fitness/SKILL.md +111 -111
- package/skills/health/health-general/LICENSE +21 -21
- package/skills/health/health-general/SKILL.md +277 -277
- package/skills/health/health-mens/LICENSE +21 -21
- package/skills/health/health-mens/SKILL.md +53 -53
- package/skills/health/health-mental/LICENSE +21 -21
- package/skills/health/health-mental/SKILL.md +221 -221
- package/skills/health/health-naturopathy-ayurveda/LICENSE +21 -21
- package/skills/health/health-naturopathy-ayurveda/SKILL.md +60 -60
- package/skills/health/health-nutrition/LICENSE +21 -21
- package/skills/health/health-nutrition/SKILL.md +262 -262
- package/skills/health/health-pediatric/LICENSE +21 -21
- package/skills/health/health-pediatric/SKILL.md +94 -94
- package/skills/health/health-pharmacology/LICENSE +21 -21
- package/skills/health/health-pharmacology/SKILL.md +87 -87
- package/skills/health/health-pregnancy/LICENSE +21 -21
- package/skills/health/health-pregnancy/SKILL.md +71 -71
- package/skills/health/health-skin/LICENSE +21 -21
- package/skills/health/health-skin/SKILL.md +71 -71
- package/skills/health/health-sleep/LICENSE +21 -21
- package/skills/health/health-sleep/SKILL.md +81 -81
- package/skills/health/health-womens/LICENSE +21 -21
- package/skills/health/health-womens/SKILL.md +72 -72
- package/skills/health/health-yoga-wellness/LICENSE +21 -21
- package/skills/health/health-yoga-wellness/SKILL.md +58 -58
- package/skills/healthcare-systems/health-sys-global/LICENSE +21 -21
- package/skills/healthcare-systems/health-sys-global/SKILL.md +69 -69
- package/skills/healthcare-systems/health-sys-management/LICENSE +21 -21
- package/skills/healthcare-systems/health-sys-management/SKILL.md +71 -71
- package/skills/healthcare-systems/health-sys-navigation/LICENSE +21 -21
- package/skills/healthcare-systems/health-sys-navigation/SKILL.md +60 -60
- package/skills/healthcare-systems/health-sys-public/LICENSE +21 -21
- package/skills/healthcare-systems/health-sys-public/SKILL.md +71 -71
- package/skills/healthcheck/SKILL.md +109 -109
- package/skills/himalaya/SKILL.md +84 -84
- package/skills/himalaya/references/configuration.md +184 -184
- package/skills/himalaya/references/message-composition.md +199 -199
- package/skills/humanities/humanities-history-world/LICENSE +21 -21
- package/skills/humanities/humanities-history-world/SKILL.md +59 -59
- package/skills/humanities/humanities-indian-classical/LICENSE +21 -21
- package/skills/humanities/humanities-indian-classical/SKILL.md +104 -104
- package/skills/humanities/humanities-philosophy/LICENSE +21 -21
- package/skills/humanities/humanities-philosophy/SKILL.md +105 -105
- package/skills/humanities/humanities-world-religions/LICENSE +21 -21
- package/skills/humanities/humanities-world-religions/SKILL.md +67 -67
- package/skills/impeccable/SKILL.md +186 -0
- package/skills/impeccable/agents/impeccable_asset_producer.toml +92 -0
- package/skills/impeccable/agents/impeccable_manual_edit_applier.toml +95 -0
- package/skills/impeccable/agents/openai.yaml +4 -0
- package/skills/impeccable/reference/adapt.md +311 -0
- package/skills/impeccable/reference/animate.md +201 -0
- package/skills/impeccable/reference/audit.md +133 -0
- package/skills/impeccable/reference/bolder.md +113 -0
- package/skills/impeccable/reference/brand.md +108 -0
- package/skills/impeccable/reference/clarify.md +288 -0
- package/skills/impeccable/reference/codex.md +105 -0
- package/skills/impeccable/reference/colorize.md +257 -0
- package/skills/impeccable/reference/craft.md +123 -0
- package/skills/impeccable/reference/critique.md +790 -0
- package/skills/impeccable/reference/delight.md +302 -0
- package/skills/impeccable/reference/distill.md +111 -0
- package/skills/impeccable/reference/document.md +429 -0
- package/skills/impeccable/reference/extract.md +69 -0
- package/skills/impeccable/reference/harden.md +347 -0
- package/skills/impeccable/reference/init.md +172 -0
- package/skills/impeccable/reference/interaction-design.md +189 -0
- package/skills/impeccable/reference/layout.md +161 -0
- package/skills/impeccable/reference/live.md +720 -0
- package/skills/impeccable/reference/onboard.md +234 -0
- package/skills/impeccable/reference/optimize.md +258 -0
- package/skills/impeccable/reference/overdrive.md +130 -0
- package/skills/impeccable/reference/polish.md +241 -0
- package/skills/impeccable/reference/product.md +60 -0
- package/skills/impeccable/reference/quieter.md +99 -0
- package/skills/impeccable/reference/shape.md +165 -0
- package/skills/impeccable/reference/typeset.md +279 -0
- package/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
- package/skills/impeccable/scripts/command-metadata.json +94 -0
- package/skills/impeccable/scripts/context-signals.mjs +225 -0
- package/skills/impeccable/scripts/context.mjs +266 -0
- package/skills/impeccable/scripts/critique-storage.mjs +242 -0
- package/skills/impeccable/scripts/design-parser.mjs +835 -0
- package/skills/impeccable/scripts/detect-csp.mjs +198 -0
- package/skills/impeccable/scripts/detect.mjs +21 -0
- package/skills/impeccable/scripts/detector/browser/injected/index.mjs +1733 -0
- package/skills/impeccable/scripts/detector/cli/main.mjs +244 -0
- package/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +4618 -0
- package/skills/impeccable/scripts/detector/detect-antipatterns.mjs +43 -0
- package/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +252 -0
- package/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +535 -0
- package/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +986 -0
- package/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +208 -0
- package/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
- package/skills/impeccable/scripts/detector/findings.mjs +12 -0
- package/skills/impeccable/scripts/detector/node/file-system.mjs +198 -0
- package/skills/impeccable/scripts/detector/profile/profiler.mjs +166 -0
- package/skills/impeccable/scripts/detector/registry/antipatterns.mjs +419 -0
- package/skills/impeccable/scripts/detector/rules/checks.mjs +2384 -0
- package/skills/impeccable/scripts/detector/shared/color.mjs +124 -0
- package/skills/impeccable/scripts/detector/shared/constants.mjs +101 -0
- package/skills/impeccable/scripts/detector/shared/page.mjs +7 -0
- package/skills/impeccable/scripts/impeccable-paths.mjs +126 -0
- package/skills/impeccable/scripts/is-generated.mjs +69 -0
- package/skills/impeccable/scripts/live-accept.mjs +812 -0
- package/skills/impeccable/scripts/live-browser-session.js +123 -0
- package/skills/impeccable/scripts/live-browser.js +10295 -0
- package/skills/impeccable/scripts/live-commit-manual-edits.mjs +1241 -0
- package/skills/impeccable/scripts/live-complete.mjs +75 -0
- package/skills/impeccable/scripts/live-completion.mjs +19 -0
- package/skills/impeccable/scripts/live-copy-edit-agent.mjs +683 -0
- package/skills/impeccable/scripts/live-discard-manual-edits.mjs +51 -0
- package/skills/impeccable/scripts/live-event-validation.mjs +137 -0
- package/skills/impeccable/scripts/live-inject.mjs +557 -0
- package/skills/impeccable/scripts/live-insert-ui.mjs +458 -0
- package/skills/impeccable/scripts/live-insert.mjs +272 -0
- package/skills/impeccable/scripts/live-manual-edit-evidence.mjs +363 -0
- package/skills/impeccable/scripts/live-manual-edits-buffer.mjs +152 -0
- package/skills/impeccable/scripts/live-poll.mjs +379 -0
- package/skills/impeccable/scripts/live-resume.mjs +94 -0
- package/skills/impeccable/scripts/live-server.mjs +2326 -0
- package/skills/impeccable/scripts/live-session-store.mjs +289 -0
- package/skills/impeccable/scripts/live-status.mjs +61 -0
- package/skills/impeccable/scripts/live-svelte-component.mjs +826 -0
- package/skills/impeccable/scripts/live-sveltekit-adapter.mjs +274 -0
- package/skills/impeccable/scripts/live-ui-core.mjs +179 -0
- package/skills/impeccable/scripts/live-vocabulary.mjs +36 -0
- package/skills/impeccable/scripts/live-wrap.mjs +894 -0
- package/skills/impeccable/scripts/live.mjs +246 -0
- package/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/skills/impeccable/scripts/palette.mjs +633 -0
- package/skills/impeccable/scripts/pin.mjs +214 -0
- package/skills/imsg/SKILL.md +126 -126
- package/skills/industry/industry-construction/LICENSE +21 -21
- package/skills/industry/industry-construction/SKILL.md +81 -81
- package/skills/industry/industry-education-sector/LICENSE +21 -21
- package/skills/industry/industry-education-sector/SKILL.md +49 -49
- package/skills/industry/industry-fashion/LICENSE +21 -21
- package/skills/industry/industry-fashion/SKILL.md +82 -82
- package/skills/industry/industry-food/LICENSE +21 -21
- package/skills/industry/industry-food/SKILL.md +79 -79
- package/skills/industry/industry-government/LICENSE +21 -21
- package/skills/industry/industry-government/SKILL.md +80 -80
- package/skills/industry/industry-hospitality/LICENSE +21 -21
- package/skills/industry/industry-hospitality/SKILL.md +73 -73
- package/skills/industry/industry-insurance-sector/LICENSE +21 -21
- package/skills/industry/industry-insurance-sector/SKILL.md +57 -57
- package/skills/industry/industry-logistics/LICENSE +21 -21
- package/skills/industry/industry-logistics/SKILL.md +80 -80
- package/skills/industry/industry-media/LICENSE +21 -21
- package/skills/industry/industry-media/SKILL.md +66 -66
- package/skills/industry/industry-nonprofit/LICENSE +21 -21
- package/skills/industry/industry-nonprofit/SKILL.md +77 -77
- package/skills/industry/industry-pharma/LICENSE +21 -21
- package/skills/industry/industry-pharma/SKILL.md +69 -69
- package/skills/industry/industry-real-estate/LICENSE +21 -21
- package/skills/industry/industry-real-estate/SKILL.md +61 -61
- package/skills/industry/industry-sports/LICENSE +21 -21
- package/skills/industry/industry-sports/SKILL.md +71 -71
- package/skills/industry/industry-tech-startup/LICENSE +21 -21
- package/skills/industry/industry-tech-startup/SKILL.md +82 -82
- package/skills/internal-comms/LICENSE +21 -21
- package/skills/internal-comms/SKILL.md +38 -38
- package/skills/internal-comms/examples/3p-updates.md +49 -49
- package/skills/internal-comms/examples/company-newsletter.md +76 -76
- package/skills/internal-comms/examples/faq-answers.md +35 -35
- package/skills/internal-comms/examples/general-comms.md +19 -19
- package/skills/legal/legal-business/LICENSE +21 -21
- package/skills/legal/legal-business/SKILL.md +227 -227
- package/skills/legal/legal-consumer/LICENSE +21 -21
- package/skills/legal/legal-consumer/SKILL.md +155 -155
- package/skills/legal/legal-contracts/LICENSE +21 -21
- package/skills/legal/legal-contracts/SKILL.md +268 -268
- package/skills/legal/legal-corporate-governance/LICENSE +21 -21
- package/skills/legal/legal-corporate-governance/SKILL.md +53 -53
- package/skills/legal/legal-employment/LICENSE +21 -21
- package/skills/legal/legal-employment/SKILL.md +291 -291
- package/skills/legal/legal-immigration/LICENSE +21 -21
- package/skills/legal/legal-immigration/SKILL.md +146 -146
- package/skills/legal/legal-international/LICENSE +21 -21
- package/skills/legal/legal-international/SKILL.md +51 -51
- package/skills/legal/legal-ip/LICENSE +21 -21
- package/skills/legal/legal-ip/SKILL.md +264 -264
- package/skills/legal/legal-privacy/LICENSE +21 -21
- package/skills/legal/legal-privacy/SKILL.md +161 -161
- package/skills/legal/legal-real-estate/LICENSE +21 -21
- package/skills/legal/legal-real-estate/SKILL.md +142 -142
- package/skills/legal/legal-startup/LICENSE +21 -21
- package/skills/legal/legal-startup/SKILL.md +182 -182
- package/skills/legal/legal-tax/LICENSE +21 -21
- package/skills/legal/legal-tax/SKILL.md +156 -156
- package/skills/mcp-builder/LICENSE +21 -21
- package/skills/mcp-builder/SKILL.md +257 -257
- package/skills/mcp-builder/reference/evaluation.md +630 -630
- package/skills/mcp-builder/reference/mcp_best_practices.md +269 -269
- package/skills/mcp-builder/reference/node_mcp_server.md +980 -980
- package/skills/mcp-builder/reference/python_mcp_server.md +737 -737
- package/skills/mcp-builder/scripts/connections.py +151 -151
- package/skills/mcp-builder/scripts/evaluation.py +373 -373
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -22
- package/skills/mcp-builder/scripts/requirements.txt +2 -2
- package/skills/mcporter/SKILL.md +65 -65
- package/skills/meme-maker/SKILL.md +46 -46
- package/skills/meme-maker/references/templates.json +358 -358
- package/skills/meme-maker/scripts/meme.mjs +398 -398
- package/skills/mental-health/mental-health-cbt/LICENSE +21 -21
- package/skills/mental-health/mental-health-cbt/SKILL.md +254 -254
- package/skills/mental-health/psych-addiction/LICENSE +21 -21
- package/skills/mental-health/psych-addiction/SKILL.md +79 -79
- package/skills/mental-health/psych-behavioral-econ/LICENSE +21 -21
- package/skills/mental-health/psych-behavioral-econ/SKILL.md +84 -84
- package/skills/mental-health/psych-child/LICENSE +21 -21
- package/skills/mental-health/psych-child/SKILL.md +84 -84
- package/skills/mental-health/psych-grief/LICENSE +21 -21
- package/skills/mental-health/psych-grief/SKILL.md +85 -85
- package/skills/mental-health/psych-mindfulness/LICENSE +21 -21
- package/skills/mental-health/psych-mindfulness/SKILL.md +71 -71
- package/skills/mental-health/psych-org/LICENSE +21 -21
- package/skills/mental-health/psych-org/SKILL.md +115 -115
- package/skills/mental-health/psych-positive/LICENSE +21 -21
- package/skills/mental-health/psych-positive/SKILL.md +86 -86
- package/skills/mental-health/psych-relationships/LICENSE +21 -21
- package/skills/mental-health/psych-relationships/SKILL.md +100 -100
- package/skills/mental-health/psych-trauma/LICENSE +21 -21
- package/skills/mental-health/psych-trauma/SKILL.md +109 -109
- package/skills/model-usage/SKILL.md +75 -75
- package/skills/model-usage/references/codexbar-cli.md +33 -33
- package/skills/model-usage/scripts/model_usage.py +319 -319
- package/skills/model-usage/scripts/test_model_usage.py +40 -40
- package/skills/nano-pdf/SKILL.md +42 -42
- package/skills/node-connect/SKILL.md +147 -147
- package/skills/node-inspect-debugger/SKILL.md +88 -88
- package/skills/notion/SKILL.md +154 -154
- package/skills/obsidian/SKILL.md +123 -123
- package/skills/openai-whisper/SKILL.md +42 -42
- package/skills/openai-whisper-api/SKILL.md +75 -75
- package/skills/openai-whisper-api/scripts/transcribe.sh +154 -154
- package/skills/openhue/SKILL.md +116 -116
- package/skills/oracle/SKILL.md +130 -130
- package/skills/ordercli/SKILL.md +82 -82
- package/skills/peekaboo/SKILL.md +217 -217
- package/skills/pyproject.toml +10 -10
- package/skills/python-debugpy/SKILL.md +76 -76
- package/skills/sag/SKILL.md +91 -91
- package/skills/science/sci-astronomy/LICENSE +21 -21
- package/skills/science/sci-astronomy/SKILL.md +80 -80
- package/skills/science/sci-biology/LICENSE +21 -21
- package/skills/science/sci-biology/SKILL.md +74 -74
- package/skills/science/sci-chemistry/LICENSE +21 -21
- package/skills/science/sci-chemistry/SKILL.md +89 -89
- package/skills/science/sci-climate/LICENSE +21 -21
- package/skills/science/sci-climate/SKILL.md +72 -72
- package/skills/science/sci-data-analysis/LICENSE +21 -21
- package/skills/science/sci-data-analysis/SKILL.md +87 -87
- package/skills/science/sci-environmental-science/LICENSE +21 -21
- package/skills/science/sci-environmental-science/SKILL.md +69 -69
- package/skills/science/sci-geology/LICENSE +21 -21
- package/skills/science/sci-geology/SKILL.md +56 -56
- package/skills/science/sci-method/LICENSE +21 -21
- package/skills/science/sci-method/SKILL.md +77 -77
- package/skills/science/sci-neuroscience/LICENSE +21 -21
- package/skills/science/sci-neuroscience/SKILL.md +79 -79
- package/skills/science/sci-physics/LICENSE +21 -21
- package/skills/science/sci-physics/SKILL.md +78 -78
- package/skills/science/sci-research-methods/LICENSE +21 -21
- package/skills/science/sci-research-methods/SKILL.md +83 -83
- package/skills/science/sci-statistics/LICENSE +21 -21
- package/skills/science/sci-statistics/SKILL.md +249 -249
- package/skills/session-logs/SKILL.md +155 -155
- package/skills/sherpa-onnx-tts/SKILL.md +113 -113
- package/skills/skill-creator/SKILL.md +81 -81
- package/skills/skill-creator/license.txt +202 -202
- package/skills/skill-creator/scripts/init_skill.py +378 -378
- package/skills/skill-creator/scripts/package_skill.py +144 -144
- package/skills/skill-creator/scripts/quick_validate.py +169 -169
- package/skills/skill-creator/scripts/test_init_skill.py +51 -51
- package/skills/skill-creator/scripts/test_package_skill.py +199 -199
- package/skills/skill-creator/scripts/test_quick_validate.py +116 -116
- package/skills/slack/SKILL.md +82 -82
- package/skills/slack-gif-creator/LICENSE +21 -21
- package/skills/slack-gif-creator/SKILL.md +293 -293
- package/skills/slack-gif-creator/requirements.txt +3 -3
- package/skills/social-sciences/social-anthropology/LICENSE +21 -21
- package/skills/social-sciences/social-anthropology/SKILL.md +62 -62
- package/skills/social-sciences/social-economics/LICENSE +21 -21
- package/skills/social-sciences/social-economics/SKILL.md +88 -88
- package/skills/social-sciences/social-geography/LICENSE +21 -21
- package/skills/social-sciences/social-geography/SKILL.md +61 -61
- package/skills/social-sciences/social-international-dev/LICENSE +21 -21
- package/skills/social-sciences/social-international-dev/SKILL.md +76 -76
- package/skills/social-sciences/social-political-science/LICENSE +21 -21
- package/skills/social-sciences/social-political-science/SKILL.md +70 -70
- package/skills/social-sciences/social-public-policy/LICENSE +21 -21
- package/skills/social-sciences/social-public-policy/SKILL.md +73 -73
- package/skills/social-sciences/social-sociology/LICENSE +21 -21
- package/skills/social-sciences/social-sociology/SKILL.md +78 -78
- package/skills/songsee/SKILL.md +53 -53
- package/skills/sonoscli/SKILL.md +69 -69
- package/skills/spike/SKILL.md +55 -55
- package/skills/spotify-player/SKILL.md +68 -68
- package/skills/summarize/SKILL.md +90 -90
- package/skills/taskflow/SKILL.md +153 -153
- package/skills/taskflow/examples/inbox-triage.lobster +33 -33
- package/skills/taskflow/examples/pr-intake.lobster +32 -32
- package/skills/taskflow-inbox-triage/SKILL.md +123 -123
- package/skills/technical/ai-ethics/LICENSE +21 -21
- package/skills/technical/ai-ethics/SKILL.md +92 -92
- package/skills/technical/ai-product-builder/LICENSE +21 -21
- package/skills/technical/ai-product-builder/SKILL.md +180 -180
- package/skills/technical/analytics-setup/LICENSE +21 -21
- package/skills/technical/analytics-setup/SKILL.md +125 -125
- package/skills/technical/api-builder/LICENSE +21 -21
- package/skills/technical/api-builder/SKILL.md +202 -202
- package/skills/technical/architecture-decisions/LICENSE +21 -21
- package/skills/technical/architecture-decisions/SKILL.md +120 -120
- package/skills/technical/auth-security/LICENSE +21 -21
- package/skills/technical/auth-security/SKILL.md +209 -209
- package/skills/technical/blockchain-web3/LICENSE +21 -21
- package/skills/technical/blockchain-web3/SKILL.md +84 -84
- package/skills/technical/cloud-architecture/LICENSE +21 -21
- package/skills/technical/cloud-architecture/SKILL.md +85 -85
- package/skills/technical/content-platform/LICENSE +21 -21
- package/skills/technical/content-platform/SKILL.md +134 -134
- package/skills/technical/cybersecurity-advanced/LICENSE +21 -21
- package/skills/technical/cybersecurity-advanced/SKILL.md +99 -99
- package/skills/technical/data-engineering/LICENSE +21 -21
- package/skills/technical/data-engineering/SKILL.md +117 -117
- package/skills/technical/database-design/LICENSE +21 -21
- package/skills/technical/database-design/SKILL.md +185 -185
- package/skills/technical/devops-cicd/LICENSE +21 -21
- package/skills/technical/devops-cicd/SKILL.md +181 -181
- package/skills/technical/ecommerce-builder/LICENSE +21 -21
- package/skills/technical/ecommerce-builder/SKILL.md +123 -123
- package/skills/technical/email-marketing/LICENSE +21 -21
- package/skills/technical/email-marketing/SKILL.md +128 -128
- package/skills/technical/fintech-builder/LICENSE +21 -21
- package/skills/technical/fintech-builder/SKILL.md +141 -141
- package/skills/technical/full-stack-web/LICENSE +21 -21
- package/skills/technical/full-stack-web/SKILL.md +173 -173
- package/skills/technical/gdpr-basics/LICENSE +21 -21
- package/skills/technical/gdpr-basics/SKILL.md +145 -145
- package/skills/technical/launch-playbook/LICENSE +21 -21
- package/skills/technical/launch-playbook/SKILL.md +95 -95
- package/skills/technical/marketing-copy/LICENSE +21 -21
- package/skills/technical/marketing-copy/SKILL.md +126 -126
- package/skills/technical/marketplace-builder/LICENSE +21 -21
- package/skills/technical/marketplace-builder/SKILL.md +105 -105
- package/skills/technical/mobile-pwa/LICENSE +21 -21
- package/skills/technical/mobile-pwa/SKILL.md +191 -191
- package/skills/technical/no-code-tools/LICENSE +21 -21
- package/skills/technical/no-code-tools/SKILL.md +80 -80
- package/skills/technical/open-source/LICENSE +21 -21
- package/skills/technical/open-source/SKILL.md +71 -71
- package/skills/technical/performance-optimization/LICENSE +21 -21
- package/skills/technical/performance-optimization/SKILL.md +155 -155
- package/skills/technical/pricing-design/LICENSE +21 -21
- package/skills/technical/pricing-design/SKILL.md +87 -87
- package/skills/technical/product-management/LICENSE +21 -21
- package/skills/technical/product-management/SKILL.md +94 -94
- package/skills/technical/saas-builder/LICENSE +21 -21
- package/skills/technical/saas-builder/SKILL.md +138 -138
- package/skills/technical/scope-estimation/LICENSE +21 -21
- package/skills/technical/scope-estimation/SKILL.md +99 -99
- package/skills/technical/secrets-management/LICENSE +21 -21
- package/skills/technical/secrets-management/SKILL.md +135 -135
- package/skills/technical/seo-technical/LICENSE +21 -21
- package/skills/technical/seo-technical/SKILL.md +136 -136
- package/skills/technical/technical-writing/LICENSE +21 -21
- package/skills/technical/technical-writing/SKILL.md +149 -149
- package/skills/technical/ux-research-tools/LICENSE +21 -21
- package/skills/technical/ux-research-tools/SKILL.md +54 -54
- package/skills/theme-factory/LICENSE +21 -21
- package/skills/theme-factory/SKILL.md +65 -65
- package/skills/theme-factory/themes/arctic-frost.md +19 -19
- package/skills/theme-factory/themes/botanical-garden.md +19 -19
- package/skills/theme-factory/themes/desert-rose.md +19 -19
- package/skills/theme-factory/themes/forest-canopy.md +19 -19
- package/skills/theme-factory/themes/golden-hour.md +19 -19
- package/skills/theme-factory/themes/midnight-galaxy.md +19 -19
- package/skills/theme-factory/themes/modern-minimalist.md +19 -19
- package/skills/theme-factory/themes/ocean-depths.md +19 -19
- package/skills/theme-factory/themes/sunset-boulevard.md +19 -19
- package/skills/theme-factory/themes/tech-innovation.md +19 -19
- package/skills/things-mac/SKILL.md +90 -90
- package/skills/tmux/SKILL.md +95 -95
- package/skills/tmux/scripts/find-sessions.sh +112 -112
- package/skills/tmux/scripts/wait-for-text.sh +83 -83
- package/skills/trades/trades-agriculture/LICENSE +21 -21
- package/skills/trades/trades-agriculture/SKILL.md +80 -80
- package/skills/trades/trades-automotive/LICENSE +21 -21
- package/skills/trades/trades-automotive/SKILL.md +84 -84
- package/skills/trades/trades-carpentry/LICENSE +21 -21
- package/skills/trades/trades-carpentry/SKILL.md +71 -71
- package/skills/trades/trades-cooking-pro/LICENSE +21 -21
- package/skills/trades/trades-cooking-pro/SKILL.md +90 -90
- package/skills/trades/trades-electrical/LICENSE +21 -21
- package/skills/trades/trades-electrical/SKILL.md +146 -146
- package/skills/trades/trades-hvac/LICENSE +21 -21
- package/skills/trades/trades-hvac/SKILL.md +80 -80
- package/skills/trades/trades-landscaping/LICENSE +21 -21
- package/skills/trades/trades-landscaping/SKILL.md +60 -60
- package/skills/trades/trades-metalworking/LICENSE +21 -21
- package/skills/trades/trades-metalworking/SKILL.md +64 -64
- package/skills/trades/trades-painting/LICENSE +21 -21
- package/skills/trades/trades-painting/SKILL.md +70 -70
- package/skills/trades/trades-plumbing/LICENSE +21 -21
- package/skills/trades/trades-plumbing/SKILL.md +160 -160
- package/skills/trades/trades-welding/LICENSE +21 -21
- package/skills/trades/trades-welding/SKILL.md +82 -82
- package/skills/trello/SKILL.md +112 -112
- package/skills/uipm-ui-styling/LICENSE.txt +202 -0
- package/skills/uipm-ui-styling/SKILL.md +328 -0
- package/skills/uipm-ui-styling/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/uipm-ui-styling/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/uipm-ui-styling/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/uipm-ui-styling/references/canvas-design-system.md +320 -0
- package/skills/uipm-ui-styling/references/shadcn-accessibility.md +471 -0
- package/skills/uipm-ui-styling/references/shadcn-components.md +424 -0
- package/skills/uipm-ui-styling/references/shadcn-theming.md +373 -0
- package/skills/uipm-ui-styling/references/tailwind-customization.md +483 -0
- package/skills/uipm-ui-styling/references/tailwind-responsive.md +382 -0
- package/skills/uipm-ui-styling/references/tailwind-utilities.md +455 -0
- package/skills/uipm-ui-styling/scripts/.coverage +0 -0
- package/skills/uipm-ui-styling/scripts/requirements.txt +17 -0
- package/skills/uipm-ui-styling/scripts/shadcn_add.py +292 -0
- package/skills/uipm-ui-styling/scripts/tailwind_config_gen.py +456 -0
- package/skills/uipm-ui-styling/scripts/tests/coverage-ui.json +1 -0
- package/skills/uipm-ui-styling/scripts/tests/requirements.txt +3 -0
- package/skills/uipm-ui-styling/scripts/tests/test_shadcn_add.py +266 -0
- package/skills/uipm-ui-styling/scripts/tests/test_tailwind_config_gen.py +336 -0
- package/skills/video-frames/SKILL.md +50 -50
- package/skills/video-frames/scripts/frame.sh +81 -81
- package/skills/voice-call/SKILL.md +49 -49
- package/skills/wacli/SKILL.md +76 -76
- package/skills/weather/SKILL.md +91 -91
- package/skills/web-artifacts-builder/LICENSE +21 -21
- package/skills/web-artifacts-builder/SKILL.md +82 -82
- package/skills/web-artifacts-builder/scripts/bundle-artifact.sh +53 -53
- package/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -322
- package/skills/xurl/SKILL.md +124 -124
|
@@ -1,1148 +1,1148 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
"""
|
|
4
|
-
Design System Generator - Aggregates search results and applies reasoning
|
|
5
|
-
to generate comprehensive design system recommendations.
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
from design_system import generate_design_system
|
|
9
|
-
result = generate_design_system("SaaS dashboard", "My Project")
|
|
10
|
-
|
|
11
|
-
# With persistence (Master + Overrides pattern)
|
|
12
|
-
result = generate_design_system("SaaS dashboard", "My Project", persist=True)
|
|
13
|
-
result = generate_design_system("SaaS dashboard", "My Project", persist=True, page="dashboard")
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
import csv
|
|
17
|
-
import json
|
|
18
|
-
import os
|
|
19
|
-
from datetime import datetime
|
|
20
|
-
from pathlib import Path
|
|
21
|
-
from core import search, DATA_DIR
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# ============ CONFIGURATION ============
|
|
25
|
-
REASONING_FILE = "ui-reasoning.csv"
|
|
26
|
-
|
|
27
|
-
SEARCH_CONFIG = {
|
|
28
|
-
"product": {"max_results": 1},
|
|
29
|
-
"style": {"max_results": 3},
|
|
30
|
-
"color": {"max_results": 2},
|
|
31
|
-
"landing": {"max_results": 2},
|
|
32
|
-
"typography": {"max_results": 2}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
# ============ DESIGN SYSTEM GENERATOR ============
|
|
37
|
-
class DesignSystemGenerator:
|
|
38
|
-
"""Generates design system recommendations from aggregated searches."""
|
|
39
|
-
|
|
40
|
-
def __init__(self):
|
|
41
|
-
self.reasoning_data = self._load_reasoning()
|
|
42
|
-
|
|
43
|
-
def _load_reasoning(self) -> list:
|
|
44
|
-
"""Load reasoning rules from CSV."""
|
|
45
|
-
filepath = DATA_DIR / REASONING_FILE
|
|
46
|
-
if not filepath.exists():
|
|
47
|
-
return []
|
|
48
|
-
with open(filepath, 'r', encoding='utf-8') as f:
|
|
49
|
-
return list(csv.DictReader(f))
|
|
50
|
-
|
|
51
|
-
def _multi_domain_search(self, query: str, style_priority: list = None) -> dict:
|
|
52
|
-
"""Execute searches across multiple domains."""
|
|
53
|
-
results = {}
|
|
54
|
-
for domain, config in SEARCH_CONFIG.items():
|
|
55
|
-
if domain == "style" and style_priority:
|
|
56
|
-
# For style, also search with priority keywords
|
|
57
|
-
priority_query = " ".join(style_priority[:2]) if style_priority else query
|
|
58
|
-
combined_query = f"{query} {priority_query}"
|
|
59
|
-
results[domain] = search(combined_query, domain, config["max_results"])
|
|
60
|
-
else:
|
|
61
|
-
results[domain] = search(query, domain, config["max_results"])
|
|
62
|
-
return results
|
|
63
|
-
|
|
64
|
-
def _find_reasoning_rule(self, category: str) -> dict:
|
|
65
|
-
"""Find matching reasoning rule for a category."""
|
|
66
|
-
category_lower = category.lower()
|
|
67
|
-
|
|
68
|
-
# Try exact match first
|
|
69
|
-
for rule in self.reasoning_data:
|
|
70
|
-
if rule.get("UI_Category", "").lower() == category_lower:
|
|
71
|
-
return rule
|
|
72
|
-
|
|
73
|
-
# Try partial match
|
|
74
|
-
for rule in self.reasoning_data:
|
|
75
|
-
ui_cat = rule.get("UI_Category", "").lower()
|
|
76
|
-
if ui_cat in category_lower or category_lower in ui_cat:
|
|
77
|
-
return rule
|
|
78
|
-
|
|
79
|
-
# Try keyword match
|
|
80
|
-
for rule in self.reasoning_data:
|
|
81
|
-
ui_cat = rule.get("UI_Category", "").lower()
|
|
82
|
-
keywords = ui_cat.replace("/", " ").replace("-", " ").split()
|
|
83
|
-
if any(kw in category_lower for kw in keywords):
|
|
84
|
-
return rule
|
|
85
|
-
|
|
86
|
-
return {}
|
|
87
|
-
|
|
88
|
-
def _apply_reasoning(self, category: str, search_results: dict) -> dict:
|
|
89
|
-
"""Apply reasoning rules to search results."""
|
|
90
|
-
rule = self._find_reasoning_rule(category)
|
|
91
|
-
|
|
92
|
-
if not rule:
|
|
93
|
-
return {
|
|
94
|
-
"pattern": "Hero + Features + CTA",
|
|
95
|
-
"style_priority": ["Minimalism", "Flat Design"],
|
|
96
|
-
"color_mood": "Professional",
|
|
97
|
-
"typography_mood": "Clean",
|
|
98
|
-
"key_effects": "Subtle hover transitions",
|
|
99
|
-
"anti_patterns": "",
|
|
100
|
-
"decision_rules": {},
|
|
101
|
-
"severity": "MEDIUM"
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
# Parse decision rules JSON
|
|
105
|
-
decision_rules = {}
|
|
106
|
-
try:
|
|
107
|
-
decision_rules = json.loads(rule.get("Decision_Rules", "{}"))
|
|
108
|
-
except json.JSONDecodeError:
|
|
109
|
-
pass
|
|
110
|
-
|
|
111
|
-
return {
|
|
112
|
-
"pattern": rule.get("Recommended_Pattern", ""),
|
|
113
|
-
"style_priority": [s.strip() for s in rule.get("Style_Priority", "").split("+")],
|
|
114
|
-
"color_mood": rule.get("Color_Mood", ""),
|
|
115
|
-
"typography_mood": rule.get("Typography_Mood", ""),
|
|
116
|
-
"key_effects": rule.get("Key_Effects", ""),
|
|
117
|
-
"anti_patterns": rule.get("Anti_Patterns", ""),
|
|
118
|
-
"decision_rules": decision_rules,
|
|
119
|
-
"severity": rule.get("Severity", "MEDIUM")
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
def _select_best_match(self, results: list, priority_keywords: list) -> dict:
|
|
123
|
-
"""Select best matching result based on priority keywords."""
|
|
124
|
-
if not results:
|
|
125
|
-
return {}
|
|
126
|
-
|
|
127
|
-
if not priority_keywords:
|
|
128
|
-
return results[0]
|
|
129
|
-
|
|
130
|
-
# First: try exact style name match
|
|
131
|
-
for priority in priority_keywords:
|
|
132
|
-
priority_lower = priority.lower().strip()
|
|
133
|
-
for result in results:
|
|
134
|
-
style_name = result.get("Style Category", "").lower()
|
|
135
|
-
if priority_lower in style_name or style_name in priority_lower:
|
|
136
|
-
return result
|
|
137
|
-
|
|
138
|
-
# Second: score by keyword match in all fields
|
|
139
|
-
scored = []
|
|
140
|
-
for result in results:
|
|
141
|
-
result_str = str(result).lower()
|
|
142
|
-
score = 0
|
|
143
|
-
for kw in priority_keywords:
|
|
144
|
-
kw_lower = kw.lower().strip()
|
|
145
|
-
# Higher score for style name match
|
|
146
|
-
if kw_lower in result.get("Style Category", "").lower():
|
|
147
|
-
score += 10
|
|
148
|
-
# Lower score for keyword field match
|
|
149
|
-
elif kw_lower in result.get("Keywords", "").lower():
|
|
150
|
-
score += 3
|
|
151
|
-
# Even lower for other field matches
|
|
152
|
-
elif kw_lower in result_str:
|
|
153
|
-
score += 1
|
|
154
|
-
scored.append((score, result))
|
|
155
|
-
|
|
156
|
-
scored.sort(key=lambda x: x[0], reverse=True)
|
|
157
|
-
return scored[0][1] if scored and scored[0][0] > 0 else results[0]
|
|
158
|
-
|
|
159
|
-
def _extract_results(self, search_result: dict) -> list:
|
|
160
|
-
"""Extract results list from search result dict."""
|
|
161
|
-
return search_result.get("results", [])
|
|
162
|
-
|
|
163
|
-
def generate(self, query: str, project_name: str = None) -> dict:
|
|
164
|
-
"""Generate complete design system recommendation."""
|
|
165
|
-
# Step 1: First search product to get category
|
|
166
|
-
product_result = search(query, "product", 1)
|
|
167
|
-
product_results = product_result.get("results", [])
|
|
168
|
-
category = "General"
|
|
169
|
-
if product_results:
|
|
170
|
-
category = product_results[0].get("Product Type", "General")
|
|
171
|
-
|
|
172
|
-
# Step 2: Get reasoning rules for this category
|
|
173
|
-
reasoning = self._apply_reasoning(category, {})
|
|
174
|
-
style_priority = reasoning.get("style_priority", [])
|
|
175
|
-
|
|
176
|
-
# Step 3: Multi-domain search with style priority hints
|
|
177
|
-
search_results = self._multi_domain_search(query, style_priority)
|
|
178
|
-
search_results["product"] = product_result # Reuse product search
|
|
179
|
-
|
|
180
|
-
# Step 4: Select best matches from each domain using priority
|
|
181
|
-
style_results = self._extract_results(search_results.get("style", {}))
|
|
182
|
-
color_results = self._extract_results(search_results.get("color", {}))
|
|
183
|
-
typography_results = self._extract_results(search_results.get("typography", {}))
|
|
184
|
-
landing_results = self._extract_results(search_results.get("landing", {}))
|
|
185
|
-
|
|
186
|
-
best_style = self._select_best_match(style_results, reasoning.get("style_priority", []))
|
|
187
|
-
best_color = color_results[0] if color_results else {}
|
|
188
|
-
best_typography = typography_results[0] if typography_results else {}
|
|
189
|
-
best_landing = landing_results[0] if landing_results else {}
|
|
190
|
-
|
|
191
|
-
# Step 5: Build final recommendation
|
|
192
|
-
# Combine effects from both reasoning and style search
|
|
193
|
-
style_effects = best_style.get("Effects & Animation", "")
|
|
194
|
-
reasoning_effects = reasoning.get("key_effects", "")
|
|
195
|
-
combined_effects = style_effects if style_effects else reasoning_effects
|
|
196
|
-
|
|
197
|
-
return {
|
|
198
|
-
"project_name": project_name or query.upper(),
|
|
199
|
-
"category": category,
|
|
200
|
-
"pattern": {
|
|
201
|
-
"name": best_landing.get("Pattern Name", reasoning.get("pattern", "Hero + Features + CTA")),
|
|
202
|
-
"sections": best_landing.get("Section Order", "Hero > Features > CTA"),
|
|
203
|
-
"cta_placement": best_landing.get("Primary CTA Placement", "Above fold"),
|
|
204
|
-
"color_strategy": best_landing.get("Color Strategy", ""),
|
|
205
|
-
"conversion": best_landing.get("Conversion Optimization", "")
|
|
206
|
-
},
|
|
207
|
-
"style": {
|
|
208
|
-
"name": best_style.get("Style Category", "Minimalism"),
|
|
209
|
-
"type": best_style.get("Type", "General"),
|
|
210
|
-
"effects": style_effects,
|
|
211
|
-
"keywords": best_style.get("Keywords", ""),
|
|
212
|
-
"best_for": best_style.get("Best For", ""),
|
|
213
|
-
"performance": best_style.get("Performance", ""),
|
|
214
|
-
"accessibility": best_style.get("Accessibility", ""),
|
|
215
|
-
"light_mode": best_style.get("Light Mode ✓", ""),
|
|
216
|
-
"dark_mode": best_style.get("Dark Mode ✓", ""),
|
|
217
|
-
},
|
|
218
|
-
"colors": {
|
|
219
|
-
"primary": best_color.get("Primary", "#2563EB"),
|
|
220
|
-
"on_primary": best_color.get("On Primary", ""),
|
|
221
|
-
"secondary": best_color.get("Secondary", "#3B82F6"),
|
|
222
|
-
"accent": best_color.get("Accent", "#F97316"),
|
|
223
|
-
"background": best_color.get("Background", "#F8FAFC"),
|
|
224
|
-
"foreground": best_color.get("Foreground", "#1E293B"),
|
|
225
|
-
"muted": best_color.get("Muted", ""),
|
|
226
|
-
"border": best_color.get("Border", ""),
|
|
227
|
-
"destructive": best_color.get("Destructive", ""),
|
|
228
|
-
"ring": best_color.get("Ring", ""),
|
|
229
|
-
"notes": best_color.get("Notes", ""),
|
|
230
|
-
# Keep legacy keys for backward compat in MASTER.md
|
|
231
|
-
"cta": best_color.get("Accent", "#F97316"),
|
|
232
|
-
"text": best_color.get("Foreground", "#1E293B"),
|
|
233
|
-
},
|
|
234
|
-
"typography": {
|
|
235
|
-
"heading": best_typography.get("Heading Font", "Inter"),
|
|
236
|
-
"body": best_typography.get("Body Font", "Inter"),
|
|
237
|
-
"mood": best_typography.get("Mood/Style Keywords", reasoning.get("typography_mood", "")),
|
|
238
|
-
"best_for": best_typography.get("Best For", ""),
|
|
239
|
-
"google_fonts_url": best_typography.get("Google Fonts URL", ""),
|
|
240
|
-
"css_import": best_typography.get("CSS Import", "")
|
|
241
|
-
},
|
|
242
|
-
"key_effects": combined_effects,
|
|
243
|
-
"anti_patterns": reasoning.get("anti_patterns", ""),
|
|
244
|
-
"decision_rules": reasoning.get("decision_rules", {}),
|
|
245
|
-
"severity": reasoning.get("severity", "MEDIUM")
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
# ============ OUTPUT FORMATTERS ============
|
|
250
|
-
BOX_WIDTH = 90 # Wider box for more content
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
def hex_to_ansi(hex_color: str) -> str:
|
|
254
|
-
"""Convert hex color to ANSI True Color swatch (██) with fallback."""
|
|
255
|
-
if not hex_color or not hex_color.startswith('#'):
|
|
256
|
-
return ""
|
|
257
|
-
colorterm = os.environ.get('COLORTERM', '')
|
|
258
|
-
if colorterm not in ('truecolor', '24bit'):
|
|
259
|
-
return ""
|
|
260
|
-
hex_color = hex_color.lstrip('#')
|
|
261
|
-
if len(hex_color) != 6:
|
|
262
|
-
return ""
|
|
263
|
-
r, g, b = int(hex_color[0:2], 16), int(hex_color[2:4], 16), int(hex_color[4:6], 16)
|
|
264
|
-
return f"\033[38;2;{r};{g};{b}m██\033[0m "
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
def ansi_ljust(s: str, width: int) -> str:
|
|
268
|
-
"""Like str.ljust but accounts for zero-width ANSI escape sequences."""
|
|
269
|
-
import re
|
|
270
|
-
visible_len = len(re.sub(r'\033\[[0-9;]*m', '', s))
|
|
271
|
-
pad = width - visible_len
|
|
272
|
-
return s + (" " * max(0, pad))
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
def section_header(name: str, width: int) -> str:
|
|
276
|
-
"""Create a Unicode section separator: ├─── NAME ───...┤"""
|
|
277
|
-
label = f"─── {name} "
|
|
278
|
-
fill = "─" * (width - len(label) - 1)
|
|
279
|
-
return f"├{label}{fill}┤"
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
def format_ascii_box(design_system: dict) -> str:
|
|
283
|
-
"""Format design system as Unicode box with ANSI color swatches."""
|
|
284
|
-
project = design_system.get("project_name", "PROJECT")
|
|
285
|
-
pattern = design_system.get("pattern", {})
|
|
286
|
-
style = design_system.get("style", {})
|
|
287
|
-
colors = design_system.get("colors", {})
|
|
288
|
-
typography = design_system.get("typography", {})
|
|
289
|
-
effects = design_system.get("key_effects", "")
|
|
290
|
-
anti_patterns = design_system.get("anti_patterns", "")
|
|
291
|
-
|
|
292
|
-
def wrap_text(text: str, prefix: str, width: int) -> list:
|
|
293
|
-
"""Wrap long text into multiple lines."""
|
|
294
|
-
if not text:
|
|
295
|
-
return []
|
|
296
|
-
words = text.split()
|
|
297
|
-
lines = []
|
|
298
|
-
current_line = prefix
|
|
299
|
-
for word in words:
|
|
300
|
-
if len(current_line) + len(word) + 1 <= width - 2:
|
|
301
|
-
current_line += (" " if current_line != prefix else "") + word
|
|
302
|
-
else:
|
|
303
|
-
if current_line != prefix:
|
|
304
|
-
lines.append(current_line)
|
|
305
|
-
current_line = prefix + word
|
|
306
|
-
if current_line != prefix:
|
|
307
|
-
lines.append(current_line)
|
|
308
|
-
return lines
|
|
309
|
-
|
|
310
|
-
# Build sections from pattern
|
|
311
|
-
sections = pattern.get("sections", "").split(">")
|
|
312
|
-
sections = [s.strip() for s in sections if s.strip()]
|
|
313
|
-
|
|
314
|
-
# Build output lines
|
|
315
|
-
lines = []
|
|
316
|
-
w = BOX_WIDTH - 1
|
|
317
|
-
|
|
318
|
-
# Header with double-line box
|
|
319
|
-
lines.append("╔" + "═" * w + "╗")
|
|
320
|
-
lines.append(ansi_ljust(f"║ TARGET: {project} - RECOMMENDED DESIGN SYSTEM", BOX_WIDTH) + "║")
|
|
321
|
-
lines.append("╚" + "═" * w + "╝")
|
|
322
|
-
lines.append("┌" + "─" * w + "┐")
|
|
323
|
-
|
|
324
|
-
# Pattern section
|
|
325
|
-
lines.append(section_header("PATTERN", BOX_WIDTH + 1))
|
|
326
|
-
lines.append(f"│ Name: {pattern.get('name', '')}".ljust(BOX_WIDTH) + "│")
|
|
327
|
-
if pattern.get('conversion'):
|
|
328
|
-
lines.append(f"│ Conversion: {pattern.get('conversion', '')}".ljust(BOX_WIDTH) + "│")
|
|
329
|
-
if pattern.get('cta_placement'):
|
|
330
|
-
lines.append(f"│ CTA: {pattern.get('cta_placement', '')}".ljust(BOX_WIDTH) + "│")
|
|
331
|
-
lines.append("│ Sections:".ljust(BOX_WIDTH) + "│")
|
|
332
|
-
for i, section in enumerate(sections, 1):
|
|
333
|
-
lines.append(f"│ {i}. {section}".ljust(BOX_WIDTH) + "│")
|
|
334
|
-
|
|
335
|
-
# Style section
|
|
336
|
-
lines.append(section_header("STYLE", BOX_WIDTH + 1))
|
|
337
|
-
lines.append(f"│ Name: {style.get('name', '')}".ljust(BOX_WIDTH) + "│")
|
|
338
|
-
light = style.get("light_mode", "")
|
|
339
|
-
dark = style.get("dark_mode", "")
|
|
340
|
-
if light or dark:
|
|
341
|
-
lines.append(f"│ Mode Support: Light {light} Dark {dark}".ljust(BOX_WIDTH) + "│")
|
|
342
|
-
if style.get("keywords"):
|
|
343
|
-
for line in wrap_text(f"Keywords: {style.get('keywords', '')}", "│ ", BOX_WIDTH):
|
|
344
|
-
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
345
|
-
if style.get("best_for"):
|
|
346
|
-
for line in wrap_text(f"Best For: {style.get('best_for', '')}", "│ ", BOX_WIDTH):
|
|
347
|
-
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
348
|
-
if style.get("performance") or style.get("accessibility"):
|
|
349
|
-
perf_a11y = f"Performance: {style.get('performance', '')} | Accessibility: {style.get('accessibility', '')}"
|
|
350
|
-
lines.append(f"│ {perf_a11y}".ljust(BOX_WIDTH) + "│")
|
|
351
|
-
|
|
352
|
-
# Colors section (extended palette with ANSI swatches)
|
|
353
|
-
lines.append(section_header("COLORS", BOX_WIDTH + 1))
|
|
354
|
-
color_entries = [
|
|
355
|
-
("Primary", "primary", "--color-primary"),
|
|
356
|
-
("On Primary", "on_primary", "--color-on-primary"),
|
|
357
|
-
("Secondary", "secondary", "--color-secondary"),
|
|
358
|
-
("Accent/CTA", "accent", "--color-accent"),
|
|
359
|
-
("Background", "background", "--color-background"),
|
|
360
|
-
("Foreground", "foreground", "--color-foreground"),
|
|
361
|
-
("Muted", "muted", "--color-muted"),
|
|
362
|
-
("Border", "border", "--color-border"),
|
|
363
|
-
("Destructive", "destructive", "--color-destructive"),
|
|
364
|
-
("Ring", "ring", "--color-ring"),
|
|
365
|
-
]
|
|
366
|
-
for label, key, css_var in color_entries:
|
|
367
|
-
hex_val = colors.get(key, "")
|
|
368
|
-
if not hex_val:
|
|
369
|
-
continue
|
|
370
|
-
swatch = hex_to_ansi(hex_val)
|
|
371
|
-
content = f"│ {swatch}{label + ':':14s} {hex_val:10s} ({css_var})"
|
|
372
|
-
lines.append(ansi_ljust(content, BOX_WIDTH) + "│")
|
|
373
|
-
if colors.get("notes"):
|
|
374
|
-
for line in wrap_text(f"Notes: {colors.get('notes', '')}", "│ ", BOX_WIDTH):
|
|
375
|
-
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
376
|
-
|
|
377
|
-
# Typography section
|
|
378
|
-
lines.append(section_header("TYPOGRAPHY", BOX_WIDTH + 1))
|
|
379
|
-
lines.append(f"│ {typography.get('heading', '')} / {typography.get('body', '')}".ljust(BOX_WIDTH) + "│")
|
|
380
|
-
if typography.get("mood"):
|
|
381
|
-
for line in wrap_text(f"Mood: {typography.get('mood', '')}", "│ ", BOX_WIDTH):
|
|
382
|
-
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
383
|
-
if typography.get("best_for"):
|
|
384
|
-
for line in wrap_text(f"Best For: {typography.get('best_for', '')}", "│ ", BOX_WIDTH):
|
|
385
|
-
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
386
|
-
if typography.get("google_fonts_url"):
|
|
387
|
-
lines.append(f"│ Google Fonts: {typography.get('google_fonts_url', '')}".ljust(BOX_WIDTH) + "│")
|
|
388
|
-
if typography.get("css_import"):
|
|
389
|
-
lines.append(f"│ CSS Import: {typography.get('css_import', '')[:70]}...".ljust(BOX_WIDTH) + "│")
|
|
390
|
-
|
|
391
|
-
# Key Effects section
|
|
392
|
-
if effects:
|
|
393
|
-
lines.append(section_header("KEY EFFECTS", BOX_WIDTH + 1))
|
|
394
|
-
for line in wrap_text(effects, "│ ", BOX_WIDTH):
|
|
395
|
-
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
396
|
-
|
|
397
|
-
# Anti-patterns section
|
|
398
|
-
if anti_patterns:
|
|
399
|
-
lines.append(section_header("AVOID", BOX_WIDTH + 1))
|
|
400
|
-
for line in wrap_text(anti_patterns, "│ ", BOX_WIDTH):
|
|
401
|
-
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
402
|
-
|
|
403
|
-
# Pre-Delivery Checklist section
|
|
404
|
-
lines.append(section_header("PRE-DELIVERY CHECKLIST", BOX_WIDTH + 1))
|
|
405
|
-
checklist_items = [
|
|
406
|
-
"[ ] No emojis as icons (use SVG: Heroicons/Lucide)",
|
|
407
|
-
"[ ] cursor-pointer on all clickable elements",
|
|
408
|
-
"[ ] Hover states with smooth transitions (150-300ms)",
|
|
409
|
-
"[ ] Light mode: text contrast 4.5:1 minimum",
|
|
410
|
-
"[ ] Focus states visible for keyboard nav",
|
|
411
|
-
"[ ] prefers-reduced-motion respected",
|
|
412
|
-
"[ ] Responsive: 375px, 768px, 1024px, 1440px"
|
|
413
|
-
]
|
|
414
|
-
for item in checklist_items:
|
|
415
|
-
lines.append(f"│ {item}".ljust(BOX_WIDTH) + "│")
|
|
416
|
-
|
|
417
|
-
lines.append("└" + "─" * w + "┘")
|
|
418
|
-
|
|
419
|
-
return "\n".join(lines)
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
def format_markdown(design_system: dict) -> str:
|
|
423
|
-
"""Format design system as markdown."""
|
|
424
|
-
project = design_system.get("project_name", "PROJECT")
|
|
425
|
-
pattern = design_system.get("pattern", {})
|
|
426
|
-
style = design_system.get("style", {})
|
|
427
|
-
colors = design_system.get("colors", {})
|
|
428
|
-
typography = design_system.get("typography", {})
|
|
429
|
-
effects = design_system.get("key_effects", "")
|
|
430
|
-
anti_patterns = design_system.get("anti_patterns", "")
|
|
431
|
-
|
|
432
|
-
lines = []
|
|
433
|
-
lines.append(f"## Design System: {project}")
|
|
434
|
-
lines.append("")
|
|
435
|
-
|
|
436
|
-
# Pattern section
|
|
437
|
-
lines.append("### Pattern")
|
|
438
|
-
lines.append(f"- **Name:** {pattern.get('name', '')}")
|
|
439
|
-
if pattern.get('conversion'):
|
|
440
|
-
lines.append(f"- **Conversion Focus:** {pattern.get('conversion', '')}")
|
|
441
|
-
if pattern.get('cta_placement'):
|
|
442
|
-
lines.append(f"- **CTA Placement:** {pattern.get('cta_placement', '')}")
|
|
443
|
-
if pattern.get('color_strategy'):
|
|
444
|
-
lines.append(f"- **Color Strategy:** {pattern.get('color_strategy', '')}")
|
|
445
|
-
lines.append(f"- **Sections:** {pattern.get('sections', '')}")
|
|
446
|
-
lines.append("")
|
|
447
|
-
|
|
448
|
-
# Style section
|
|
449
|
-
lines.append("### Style")
|
|
450
|
-
lines.append(f"- **Name:** {style.get('name', '')}")
|
|
451
|
-
light = style.get("light_mode", "")
|
|
452
|
-
dark = style.get("dark_mode", "")
|
|
453
|
-
if light or dark:
|
|
454
|
-
lines.append(f"- **Mode Support:** Light {light} | Dark {dark}")
|
|
455
|
-
if style.get('keywords'):
|
|
456
|
-
lines.append(f"- **Keywords:** {style.get('keywords', '')}")
|
|
457
|
-
if style.get('best_for'):
|
|
458
|
-
lines.append(f"- **Best For:** {style.get('best_for', '')}")
|
|
459
|
-
if style.get('performance') or style.get('accessibility'):
|
|
460
|
-
lines.append(f"- **Performance:** {style.get('performance', '')} | **Accessibility:** {style.get('accessibility', '')}")
|
|
461
|
-
lines.append("")
|
|
462
|
-
|
|
463
|
-
# Colors section (extended palette)
|
|
464
|
-
lines.append("### Colors")
|
|
465
|
-
lines.append("| Role | Hex | CSS Variable |")
|
|
466
|
-
lines.append("|------|-----|--------------|")
|
|
467
|
-
md_color_entries = [
|
|
468
|
-
("Primary", "primary", "--color-primary"),
|
|
469
|
-
("On Primary", "on_primary", "--color-on-primary"),
|
|
470
|
-
("Secondary", "secondary", "--color-secondary"),
|
|
471
|
-
("Accent/CTA", "accent", "--color-accent"),
|
|
472
|
-
("Background", "background", "--color-background"),
|
|
473
|
-
("Foreground", "foreground", "--color-foreground"),
|
|
474
|
-
("Muted", "muted", "--color-muted"),
|
|
475
|
-
("Border", "border", "--color-border"),
|
|
476
|
-
("Destructive", "destructive", "--color-destructive"),
|
|
477
|
-
("Ring", "ring", "--color-ring"),
|
|
478
|
-
]
|
|
479
|
-
for label, key, css_var in md_color_entries:
|
|
480
|
-
hex_val = colors.get(key, "")
|
|
481
|
-
if hex_val:
|
|
482
|
-
lines.append(f"| {label} | `{hex_val}` | `{css_var}` |")
|
|
483
|
-
if colors.get("notes"):
|
|
484
|
-
lines.append(f"\n*Notes: {colors.get('notes', '')}*")
|
|
485
|
-
lines.append("")
|
|
486
|
-
|
|
487
|
-
# Typography section
|
|
488
|
-
lines.append("### Typography")
|
|
489
|
-
lines.append(f"- **Heading:** {typography.get('heading', '')}")
|
|
490
|
-
lines.append(f"- **Body:** {typography.get('body', '')}")
|
|
491
|
-
if typography.get("mood"):
|
|
492
|
-
lines.append(f"- **Mood:** {typography.get('mood', '')}")
|
|
493
|
-
if typography.get("best_for"):
|
|
494
|
-
lines.append(f"- **Best For:** {typography.get('best_for', '')}")
|
|
495
|
-
if typography.get("google_fonts_url"):
|
|
496
|
-
lines.append(f"- **Google Fonts:** {typography.get('google_fonts_url', '')}")
|
|
497
|
-
if typography.get("css_import"):
|
|
498
|
-
lines.append(f"- **CSS Import:**")
|
|
499
|
-
lines.append(f"```css")
|
|
500
|
-
lines.append(f"{typography.get('css_import', '')}")
|
|
501
|
-
lines.append(f"```")
|
|
502
|
-
lines.append("")
|
|
503
|
-
|
|
504
|
-
# Key Effects section
|
|
505
|
-
if effects:
|
|
506
|
-
lines.append("### Key Effects")
|
|
507
|
-
lines.append(f"{effects}")
|
|
508
|
-
lines.append("")
|
|
509
|
-
|
|
510
|
-
# Anti-patterns section
|
|
511
|
-
if anti_patterns:
|
|
512
|
-
lines.append("### Avoid (Anti-patterns)")
|
|
513
|
-
newline_bullet = '\n- '
|
|
514
|
-
lines.append(f"- {anti_patterns.replace(' + ', newline_bullet)}")
|
|
515
|
-
lines.append("")
|
|
516
|
-
|
|
517
|
-
# Pre-Delivery Checklist section
|
|
518
|
-
lines.append("### Pre-Delivery Checklist")
|
|
519
|
-
lines.append("- [ ] No emojis as icons (use SVG: Heroicons/Lucide)")
|
|
520
|
-
lines.append("- [ ] cursor-pointer on all clickable elements")
|
|
521
|
-
lines.append("- [ ] Hover states with smooth transitions (150-300ms)")
|
|
522
|
-
lines.append("- [ ] Light mode: text contrast 4.5:1 minimum")
|
|
523
|
-
lines.append("- [ ] Focus states visible for keyboard nav")
|
|
524
|
-
lines.append("- [ ] prefers-reduced-motion respected")
|
|
525
|
-
lines.append("- [ ] Responsive: 375px, 768px, 1024px, 1440px")
|
|
526
|
-
lines.append("")
|
|
527
|
-
|
|
528
|
-
return "\n".join(lines)
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
# ============ MAIN ENTRY POINT ============
|
|
532
|
-
def generate_design_system(query: str, project_name: str = None, output_format: str = "ascii",
|
|
533
|
-
persist: bool = False, page: str = None, output_dir: str = None) -> str:
|
|
534
|
-
"""
|
|
535
|
-
Main entry point for design system generation.
|
|
536
|
-
|
|
537
|
-
Args:
|
|
538
|
-
query: Search query (e.g., "SaaS dashboard", "e-commerce luxury")
|
|
539
|
-
project_name: Optional project name for output header
|
|
540
|
-
output_format: "ascii" (default) or "markdown"
|
|
541
|
-
persist: If True, save design system to design-system/ folder
|
|
542
|
-
page: Optional page name for page-specific override file
|
|
543
|
-
output_dir: Optional output directory (defaults to current working directory)
|
|
544
|
-
|
|
545
|
-
Returns:
|
|
546
|
-
Formatted design system string
|
|
547
|
-
"""
|
|
548
|
-
generator = DesignSystemGenerator()
|
|
549
|
-
design_system = generator.generate(query, project_name)
|
|
550
|
-
|
|
551
|
-
# Persist to files if requested
|
|
552
|
-
if persist:
|
|
553
|
-
persist_design_system(design_system, page, output_dir, query)
|
|
554
|
-
|
|
555
|
-
if output_format == "markdown":
|
|
556
|
-
return format_markdown(design_system)
|
|
557
|
-
return format_ascii_box(design_system)
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
# ============ PERSISTENCE FUNCTIONS ============
|
|
561
|
-
def persist_design_system(design_system: dict, page: str = None, output_dir: str = None, page_query: str = None) -> dict:
|
|
562
|
-
"""
|
|
563
|
-
Persist design system to design-system/<project>/ folder using Master + Overrides pattern.
|
|
564
|
-
|
|
565
|
-
Args:
|
|
566
|
-
design_system: The generated design system dictionary
|
|
567
|
-
page: Optional page name for page-specific override file
|
|
568
|
-
output_dir: Optional output directory (defaults to current working directory)
|
|
569
|
-
page_query: Optional query string for intelligent page override generation
|
|
570
|
-
|
|
571
|
-
Returns:
|
|
572
|
-
dict with created file paths and status
|
|
573
|
-
"""
|
|
574
|
-
base_dir = Path(output_dir) if output_dir else Path.cwd()
|
|
575
|
-
|
|
576
|
-
# Use project name for project-specific folder
|
|
577
|
-
project_name = design_system.get("project_name", "default")
|
|
578
|
-
project_slug = project_name.lower().replace(' ', '-')
|
|
579
|
-
|
|
580
|
-
design_system_dir = base_dir / "design-system" / project_slug
|
|
581
|
-
pages_dir = design_system_dir / "pages"
|
|
582
|
-
|
|
583
|
-
created_files = []
|
|
584
|
-
|
|
585
|
-
# Create directories
|
|
586
|
-
design_system_dir.mkdir(parents=True, exist_ok=True)
|
|
587
|
-
pages_dir.mkdir(parents=True, exist_ok=True)
|
|
588
|
-
|
|
589
|
-
master_file = design_system_dir / "MASTER.md"
|
|
590
|
-
|
|
591
|
-
# Generate and write MASTER.md
|
|
592
|
-
master_content = format_master_md(design_system)
|
|
593
|
-
with open(master_file, 'w', encoding='utf-8') as f:
|
|
594
|
-
f.write(master_content)
|
|
595
|
-
created_files.append(str(master_file))
|
|
596
|
-
|
|
597
|
-
# If page is specified, create page override file with intelligent content
|
|
598
|
-
if page:
|
|
599
|
-
page_file = pages_dir / f"{page.lower().replace(' ', '-')}.md"
|
|
600
|
-
page_content = format_page_override_md(design_system, page, page_query)
|
|
601
|
-
with open(page_file, 'w', encoding='utf-8') as f:
|
|
602
|
-
f.write(page_content)
|
|
603
|
-
created_files.append(str(page_file))
|
|
604
|
-
|
|
605
|
-
return {
|
|
606
|
-
"status": "success",
|
|
607
|
-
"design_system_dir": str(design_system_dir),
|
|
608
|
-
"created_files": created_files
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
def format_master_md(design_system: dict) -> str:
|
|
613
|
-
"""Format design system as MASTER.md with hierarchical override logic."""
|
|
614
|
-
project = design_system.get("project_name", "PROJECT")
|
|
615
|
-
pattern = design_system.get("pattern", {})
|
|
616
|
-
style = design_system.get("style", {})
|
|
617
|
-
colors = design_system.get("colors", {})
|
|
618
|
-
typography = design_system.get("typography", {})
|
|
619
|
-
effects = design_system.get("key_effects", "")
|
|
620
|
-
anti_patterns = design_system.get("anti_patterns", "")
|
|
621
|
-
|
|
622
|
-
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
623
|
-
|
|
624
|
-
lines = []
|
|
625
|
-
|
|
626
|
-
# Logic header
|
|
627
|
-
lines.append("# Design System Master File")
|
|
628
|
-
lines.append("")
|
|
629
|
-
lines.append("> **LOGIC:** When building a specific page, first check `design-system/pages/[page-name].md`.")
|
|
630
|
-
lines.append("> If that file exists, its rules **override** this Master file.")
|
|
631
|
-
lines.append("> If not, strictly follow the rules below.")
|
|
632
|
-
lines.append("")
|
|
633
|
-
lines.append("---")
|
|
634
|
-
lines.append("")
|
|
635
|
-
lines.append(f"**Project:** {project}")
|
|
636
|
-
lines.append(f"**Generated:** {timestamp}")
|
|
637
|
-
lines.append(f"**Category:** {design_system.get('category', 'General')}")
|
|
638
|
-
lines.append("")
|
|
639
|
-
lines.append("---")
|
|
640
|
-
lines.append("")
|
|
641
|
-
|
|
642
|
-
# Global Rules section
|
|
643
|
-
lines.append("## Global Rules")
|
|
644
|
-
lines.append("")
|
|
645
|
-
|
|
646
|
-
# Color Palette
|
|
647
|
-
lines.append("### Color Palette")
|
|
648
|
-
lines.append("")
|
|
649
|
-
lines.append("| Role | Hex | CSS Variable |")
|
|
650
|
-
lines.append("|------|-----|--------------|")
|
|
651
|
-
master_color_entries = [
|
|
652
|
-
("Primary", "primary", "--color-primary"),
|
|
653
|
-
("On Primary", "on_primary", "--color-on-primary"),
|
|
654
|
-
("Secondary", "secondary", "--color-secondary"),
|
|
655
|
-
("Accent/CTA", "accent", "--color-accent"),
|
|
656
|
-
("Background", "background", "--color-background"),
|
|
657
|
-
("Foreground", "foreground", "--color-foreground"),
|
|
658
|
-
("Muted", "muted", "--color-muted"),
|
|
659
|
-
("Border", "border", "--color-border"),
|
|
660
|
-
("Destructive", "destructive", "--color-destructive"),
|
|
661
|
-
("Ring", "ring", "--color-ring"),
|
|
662
|
-
]
|
|
663
|
-
for label, key, css_var in master_color_entries:
|
|
664
|
-
hex_val = colors.get(key, "")
|
|
665
|
-
if hex_val:
|
|
666
|
-
lines.append(f"| {label} | `{hex_val}` | `{css_var}` |")
|
|
667
|
-
lines.append("")
|
|
668
|
-
if colors.get("notes"):
|
|
669
|
-
lines.append(f"**Color Notes:** {colors.get('notes', '')}")
|
|
670
|
-
lines.append("")
|
|
671
|
-
|
|
672
|
-
# Typography
|
|
673
|
-
lines.append("### Typography")
|
|
674
|
-
lines.append("")
|
|
675
|
-
lines.append(f"- **Heading Font:** {typography.get('heading', 'Inter')}")
|
|
676
|
-
lines.append(f"- **Body Font:** {typography.get('body', 'Inter')}")
|
|
677
|
-
if typography.get("mood"):
|
|
678
|
-
lines.append(f"- **Mood:** {typography.get('mood', '')}")
|
|
679
|
-
if typography.get("google_fonts_url"):
|
|
680
|
-
lines.append(f"- **Google Fonts:** [{typography.get('heading', '')} + {typography.get('body', '')}]({typography.get('google_fonts_url', '')})")
|
|
681
|
-
lines.append("")
|
|
682
|
-
if typography.get("css_import"):
|
|
683
|
-
lines.append("**CSS Import:**")
|
|
684
|
-
lines.append("```css")
|
|
685
|
-
lines.append(typography.get("css_import", ""))
|
|
686
|
-
lines.append("```")
|
|
687
|
-
lines.append("")
|
|
688
|
-
|
|
689
|
-
# Spacing Variables
|
|
690
|
-
lines.append("### Spacing Variables")
|
|
691
|
-
lines.append("")
|
|
692
|
-
lines.append("| Token | Value | Usage |")
|
|
693
|
-
lines.append("|-------|-------|-------|")
|
|
694
|
-
lines.append("| `--space-xs` | `4px` / `0.25rem` | Tight gaps |")
|
|
695
|
-
lines.append("| `--space-sm` | `8px` / `0.5rem` | Icon gaps, inline spacing |")
|
|
696
|
-
lines.append("| `--space-md` | `16px` / `1rem` | Standard padding |")
|
|
697
|
-
lines.append("| `--space-lg` | `24px` / `1.5rem` | Section padding |")
|
|
698
|
-
lines.append("| `--space-xl` | `32px` / `2rem` | Large gaps |")
|
|
699
|
-
lines.append("| `--space-2xl` | `48px` / `3rem` | Section margins |")
|
|
700
|
-
lines.append("| `--space-3xl` | `64px` / `4rem` | Hero padding |")
|
|
701
|
-
lines.append("")
|
|
702
|
-
|
|
703
|
-
# Shadow Depths
|
|
704
|
-
lines.append("### Shadow Depths")
|
|
705
|
-
lines.append("")
|
|
706
|
-
lines.append("| Level | Value | Usage |")
|
|
707
|
-
lines.append("|-------|-------|-------|")
|
|
708
|
-
lines.append("| `--shadow-sm` | `0 1px 2px rgba(0,0,0,0.05)` | Subtle lift |")
|
|
709
|
-
lines.append("| `--shadow-md` | `0 4px 6px rgba(0,0,0,0.1)` | Cards, buttons |")
|
|
710
|
-
lines.append("| `--shadow-lg` | `0 10px 15px rgba(0,0,0,0.1)` | Modals, dropdowns |")
|
|
711
|
-
lines.append("| `--shadow-xl` | `0 20px 25px rgba(0,0,0,0.15)` | Hero images, featured cards |")
|
|
712
|
-
lines.append("")
|
|
713
|
-
|
|
714
|
-
# Component Specs section
|
|
715
|
-
lines.append("---")
|
|
716
|
-
lines.append("")
|
|
717
|
-
lines.append("## Component Specs")
|
|
718
|
-
lines.append("")
|
|
719
|
-
|
|
720
|
-
# Buttons
|
|
721
|
-
lines.append("### Buttons")
|
|
722
|
-
lines.append("")
|
|
723
|
-
lines.append("```css")
|
|
724
|
-
lines.append("/* Primary Button */")
|
|
725
|
-
lines.append(".btn-primary {")
|
|
726
|
-
lines.append(f" background: {colors.get('cta', '#F97316')};")
|
|
727
|
-
lines.append(" color: white;")
|
|
728
|
-
lines.append(" padding: 12px 24px;")
|
|
729
|
-
lines.append(" border-radius: 8px;")
|
|
730
|
-
lines.append(" font-weight: 600;")
|
|
731
|
-
lines.append(" transition: all 200ms ease;")
|
|
732
|
-
lines.append(" cursor: pointer;")
|
|
733
|
-
lines.append("}")
|
|
734
|
-
lines.append("")
|
|
735
|
-
lines.append(".btn-primary:hover {")
|
|
736
|
-
lines.append(" opacity: 0.9;")
|
|
737
|
-
lines.append(" transform: translateY(-1px);")
|
|
738
|
-
lines.append("}")
|
|
739
|
-
lines.append("")
|
|
740
|
-
lines.append("/* Secondary Button */")
|
|
741
|
-
lines.append(".btn-secondary {")
|
|
742
|
-
lines.append(f" background: transparent;")
|
|
743
|
-
lines.append(f" color: {colors.get('primary', '#2563EB')};")
|
|
744
|
-
lines.append(f" border: 2px solid {colors.get('primary', '#2563EB')};")
|
|
745
|
-
lines.append(" padding: 12px 24px;")
|
|
746
|
-
lines.append(" border-radius: 8px;")
|
|
747
|
-
lines.append(" font-weight: 600;")
|
|
748
|
-
lines.append(" transition: all 200ms ease;")
|
|
749
|
-
lines.append(" cursor: pointer;")
|
|
750
|
-
lines.append("}")
|
|
751
|
-
lines.append("```")
|
|
752
|
-
lines.append("")
|
|
753
|
-
|
|
754
|
-
# Cards
|
|
755
|
-
lines.append("### Cards")
|
|
756
|
-
lines.append("")
|
|
757
|
-
lines.append("```css")
|
|
758
|
-
lines.append(".card {")
|
|
759
|
-
lines.append(f" background: {colors.get('background', '#FFFFFF')};")
|
|
760
|
-
lines.append(" border-radius: 12px;")
|
|
761
|
-
lines.append(" padding: 24px;")
|
|
762
|
-
lines.append(" box-shadow: var(--shadow-md);")
|
|
763
|
-
lines.append(" transition: all 200ms ease;")
|
|
764
|
-
lines.append(" cursor: pointer;")
|
|
765
|
-
lines.append("}")
|
|
766
|
-
lines.append("")
|
|
767
|
-
lines.append(".card:hover {")
|
|
768
|
-
lines.append(" box-shadow: var(--shadow-lg);")
|
|
769
|
-
lines.append(" transform: translateY(-2px);")
|
|
770
|
-
lines.append("}")
|
|
771
|
-
lines.append("```")
|
|
772
|
-
lines.append("")
|
|
773
|
-
|
|
774
|
-
# Inputs
|
|
775
|
-
lines.append("### Inputs")
|
|
776
|
-
lines.append("")
|
|
777
|
-
lines.append("```css")
|
|
778
|
-
lines.append(".input {")
|
|
779
|
-
lines.append(" padding: 12px 16px;")
|
|
780
|
-
lines.append(" border: 1px solid #E2E8F0;")
|
|
781
|
-
lines.append(" border-radius: 8px;")
|
|
782
|
-
lines.append(" font-size: 16px;")
|
|
783
|
-
lines.append(" transition: border-color 200ms ease;")
|
|
784
|
-
lines.append("}")
|
|
785
|
-
lines.append("")
|
|
786
|
-
lines.append(".input:focus {")
|
|
787
|
-
lines.append(f" border-color: {colors.get('primary', '#2563EB')};")
|
|
788
|
-
lines.append(" outline: none;")
|
|
789
|
-
lines.append(f" box-shadow: 0 0 0 3px {colors.get('primary', '#2563EB')}20;")
|
|
790
|
-
lines.append("}")
|
|
791
|
-
lines.append("```")
|
|
792
|
-
lines.append("")
|
|
793
|
-
|
|
794
|
-
# Modals
|
|
795
|
-
lines.append("### Modals")
|
|
796
|
-
lines.append("")
|
|
797
|
-
lines.append("```css")
|
|
798
|
-
lines.append(".modal-overlay {")
|
|
799
|
-
lines.append(" background: rgba(0, 0, 0, 0.5);")
|
|
800
|
-
lines.append(" backdrop-filter: blur(4px);")
|
|
801
|
-
lines.append("}")
|
|
802
|
-
lines.append("")
|
|
803
|
-
lines.append(".modal {")
|
|
804
|
-
lines.append(" background: white;")
|
|
805
|
-
lines.append(" border-radius: 16px;")
|
|
806
|
-
lines.append(" padding: 32px;")
|
|
807
|
-
lines.append(" box-shadow: var(--shadow-xl);")
|
|
808
|
-
lines.append(" max-width: 500px;")
|
|
809
|
-
lines.append(" width: 90%;")
|
|
810
|
-
lines.append("}")
|
|
811
|
-
lines.append("```")
|
|
812
|
-
lines.append("")
|
|
813
|
-
|
|
814
|
-
# Style section
|
|
815
|
-
lines.append("---")
|
|
816
|
-
lines.append("")
|
|
817
|
-
lines.append("## Style Guidelines")
|
|
818
|
-
lines.append("")
|
|
819
|
-
lines.append(f"**Style:** {style.get('name', 'Minimalism')}")
|
|
820
|
-
lines.append("")
|
|
821
|
-
if style.get("keywords"):
|
|
822
|
-
lines.append(f"**Keywords:** {style.get('keywords', '')}")
|
|
823
|
-
lines.append("")
|
|
824
|
-
if style.get("best_for"):
|
|
825
|
-
lines.append(f"**Best For:** {style.get('best_for', '')}")
|
|
826
|
-
lines.append("")
|
|
827
|
-
if effects:
|
|
828
|
-
lines.append(f"**Key Effects:** {effects}")
|
|
829
|
-
lines.append("")
|
|
830
|
-
|
|
831
|
-
# Layout Pattern
|
|
832
|
-
lines.append("### Page Pattern")
|
|
833
|
-
lines.append("")
|
|
834
|
-
lines.append(f"**Pattern Name:** {pattern.get('name', '')}")
|
|
835
|
-
lines.append("")
|
|
836
|
-
if pattern.get('conversion'):
|
|
837
|
-
lines.append(f"- **Conversion Strategy:** {pattern.get('conversion', '')}")
|
|
838
|
-
if pattern.get('cta_placement'):
|
|
839
|
-
lines.append(f"- **CTA Placement:** {pattern.get('cta_placement', '')}")
|
|
840
|
-
lines.append(f"- **Section Order:** {pattern.get('sections', '')}")
|
|
841
|
-
lines.append("")
|
|
842
|
-
|
|
843
|
-
# Anti-Patterns section
|
|
844
|
-
lines.append("---")
|
|
845
|
-
lines.append("")
|
|
846
|
-
lines.append("## Anti-Patterns (Do NOT Use)")
|
|
847
|
-
lines.append("")
|
|
848
|
-
if anti_patterns:
|
|
849
|
-
anti_list = [a.strip() for a in anti_patterns.split("+")]
|
|
850
|
-
for anti in anti_list:
|
|
851
|
-
if anti:
|
|
852
|
-
lines.append(f"- ❌ {anti}")
|
|
853
|
-
lines.append("")
|
|
854
|
-
lines.append("### Additional Forbidden Patterns")
|
|
855
|
-
lines.append("")
|
|
856
|
-
lines.append("- ❌ **Emojis as icons** — Use SVG icons (Heroicons, Lucide, Simple Icons)")
|
|
857
|
-
lines.append("- ❌ **Missing cursor:pointer** — All clickable elements must have cursor:pointer")
|
|
858
|
-
lines.append("- ❌ **Layout-shifting hovers** — Avoid scale transforms that shift layout")
|
|
859
|
-
lines.append("- ❌ **Low contrast text** — Maintain 4.5:1 minimum contrast ratio")
|
|
860
|
-
lines.append("- ❌ **Instant state changes** — Always use transitions (150-300ms)")
|
|
861
|
-
lines.append("- ❌ **Invisible focus states** — Focus states must be visible for a11y")
|
|
862
|
-
lines.append("")
|
|
863
|
-
|
|
864
|
-
# Pre-Delivery Checklist
|
|
865
|
-
lines.append("---")
|
|
866
|
-
lines.append("")
|
|
867
|
-
lines.append("## Pre-Delivery Checklist")
|
|
868
|
-
lines.append("")
|
|
869
|
-
lines.append("Before delivering any UI code, verify:")
|
|
870
|
-
lines.append("")
|
|
871
|
-
lines.append("- [ ] No emojis used as icons (use SVG instead)")
|
|
872
|
-
lines.append("- [ ] All icons from consistent icon set (Heroicons/Lucide)")
|
|
873
|
-
lines.append("- [ ] `cursor-pointer` on all clickable elements")
|
|
874
|
-
lines.append("- [ ] Hover states with smooth transitions (150-300ms)")
|
|
875
|
-
lines.append("- [ ] Light mode: text contrast 4.5:1 minimum")
|
|
876
|
-
lines.append("- [ ] Focus states visible for keyboard navigation")
|
|
877
|
-
lines.append("- [ ] `prefers-reduced-motion` respected")
|
|
878
|
-
lines.append("- [ ] Responsive: 375px, 768px, 1024px, 1440px")
|
|
879
|
-
lines.append("- [ ] No content hidden behind fixed navbars")
|
|
880
|
-
lines.append("- [ ] No horizontal scroll on mobile")
|
|
881
|
-
lines.append("")
|
|
882
|
-
|
|
883
|
-
return "\n".join(lines)
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
def format_page_override_md(design_system: dict, page_name: str, page_query: str = None) -> str:
|
|
887
|
-
"""Format a page-specific override file with intelligent AI-generated content."""
|
|
888
|
-
project = design_system.get("project_name", "PROJECT")
|
|
889
|
-
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
890
|
-
page_title = page_name.replace("-", " ").replace("_", " ").title()
|
|
891
|
-
|
|
892
|
-
# Detect page type and generate intelligent overrides
|
|
893
|
-
page_overrides = _generate_intelligent_overrides(page_name, page_query, design_system)
|
|
894
|
-
|
|
895
|
-
lines = []
|
|
896
|
-
|
|
897
|
-
lines.append(f"# {page_title} Page Overrides")
|
|
898
|
-
lines.append("")
|
|
899
|
-
lines.append(f"> **PROJECT:** {project}")
|
|
900
|
-
lines.append(f"> **Generated:** {timestamp}")
|
|
901
|
-
lines.append(f"> **Page Type:** {page_overrides.get('page_type', 'General')}")
|
|
902
|
-
lines.append("")
|
|
903
|
-
lines.append("> ⚠️ **IMPORTANT:** Rules in this file **override** the Master file (`design-system/MASTER.md`).")
|
|
904
|
-
lines.append("> Only deviations from the Master are documented here. For all other rules, refer to the Master.")
|
|
905
|
-
lines.append("")
|
|
906
|
-
lines.append("---")
|
|
907
|
-
lines.append("")
|
|
908
|
-
|
|
909
|
-
# Page-specific rules with actual content
|
|
910
|
-
lines.append("## Page-Specific Rules")
|
|
911
|
-
lines.append("")
|
|
912
|
-
|
|
913
|
-
# Layout Overrides
|
|
914
|
-
lines.append("### Layout Overrides")
|
|
915
|
-
lines.append("")
|
|
916
|
-
layout = page_overrides.get("layout", {})
|
|
917
|
-
if layout:
|
|
918
|
-
for key, value in layout.items():
|
|
919
|
-
lines.append(f"- **{key}:** {value}")
|
|
920
|
-
else:
|
|
921
|
-
lines.append("- No overrides — use Master layout")
|
|
922
|
-
lines.append("")
|
|
923
|
-
|
|
924
|
-
# Spacing Overrides
|
|
925
|
-
lines.append("### Spacing Overrides")
|
|
926
|
-
lines.append("")
|
|
927
|
-
spacing = page_overrides.get("spacing", {})
|
|
928
|
-
if spacing:
|
|
929
|
-
for key, value in spacing.items():
|
|
930
|
-
lines.append(f"- **{key}:** {value}")
|
|
931
|
-
else:
|
|
932
|
-
lines.append("- No overrides — use Master spacing")
|
|
933
|
-
lines.append("")
|
|
934
|
-
|
|
935
|
-
# Typography Overrides
|
|
936
|
-
lines.append("### Typography Overrides")
|
|
937
|
-
lines.append("")
|
|
938
|
-
typography = page_overrides.get("typography", {})
|
|
939
|
-
if typography:
|
|
940
|
-
for key, value in typography.items():
|
|
941
|
-
lines.append(f"- **{key}:** {value}")
|
|
942
|
-
else:
|
|
943
|
-
lines.append("- No overrides — use Master typography")
|
|
944
|
-
lines.append("")
|
|
945
|
-
|
|
946
|
-
# Color Overrides
|
|
947
|
-
lines.append("### Color Overrides")
|
|
948
|
-
lines.append("")
|
|
949
|
-
colors = page_overrides.get("colors", {})
|
|
950
|
-
if colors:
|
|
951
|
-
for key, value in colors.items():
|
|
952
|
-
lines.append(f"- **{key}:** {value}")
|
|
953
|
-
else:
|
|
954
|
-
lines.append("- No overrides — use Master colors")
|
|
955
|
-
lines.append("")
|
|
956
|
-
|
|
957
|
-
# Component Overrides
|
|
958
|
-
lines.append("### Component Overrides")
|
|
959
|
-
lines.append("")
|
|
960
|
-
components = page_overrides.get("components", [])
|
|
961
|
-
if components:
|
|
962
|
-
for comp in components:
|
|
963
|
-
lines.append(f"- {comp}")
|
|
964
|
-
else:
|
|
965
|
-
lines.append("- No overrides — use Master component specs")
|
|
966
|
-
lines.append("")
|
|
967
|
-
|
|
968
|
-
# Page-Specific Components
|
|
969
|
-
lines.append("---")
|
|
970
|
-
lines.append("")
|
|
971
|
-
lines.append("## Page-Specific Components")
|
|
972
|
-
lines.append("")
|
|
973
|
-
unique_components = page_overrides.get("unique_components", [])
|
|
974
|
-
if unique_components:
|
|
975
|
-
for comp in unique_components:
|
|
976
|
-
lines.append(f"- {comp}")
|
|
977
|
-
else:
|
|
978
|
-
lines.append("- No unique components for this page")
|
|
979
|
-
lines.append("")
|
|
980
|
-
|
|
981
|
-
# Recommendations
|
|
982
|
-
lines.append("---")
|
|
983
|
-
lines.append("")
|
|
984
|
-
lines.append("## Recommendations")
|
|
985
|
-
lines.append("")
|
|
986
|
-
recommendations = page_overrides.get("recommendations", [])
|
|
987
|
-
if recommendations:
|
|
988
|
-
for rec in recommendations:
|
|
989
|
-
lines.append(f"- {rec}")
|
|
990
|
-
lines.append("")
|
|
991
|
-
|
|
992
|
-
return "\n".join(lines)
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
def _generate_intelligent_overrides(page_name: str, page_query: str, design_system: dict) -> dict:
|
|
996
|
-
"""
|
|
997
|
-
Generate intelligent overrides based on page type using layered search.
|
|
998
|
-
|
|
999
|
-
Uses the existing search infrastructure to find relevant style, UX, and layout
|
|
1000
|
-
data instead of hardcoded page types.
|
|
1001
|
-
"""
|
|
1002
|
-
from core import search
|
|
1003
|
-
|
|
1004
|
-
page_lower = page_name.lower()
|
|
1005
|
-
query_lower = (page_query or "").lower()
|
|
1006
|
-
combined_context = f"{page_lower} {query_lower}"
|
|
1007
|
-
|
|
1008
|
-
# Search across multiple domains for page-specific guidance
|
|
1009
|
-
style_search = search(combined_context, "style", max_results=1)
|
|
1010
|
-
ux_search = search(combined_context, "ux", max_results=3)
|
|
1011
|
-
landing_search = search(combined_context, "landing", max_results=1)
|
|
1012
|
-
|
|
1013
|
-
# Extract results from search response
|
|
1014
|
-
style_results = style_search.get("results", [])
|
|
1015
|
-
ux_results = ux_search.get("results", [])
|
|
1016
|
-
landing_results = landing_search.get("results", [])
|
|
1017
|
-
|
|
1018
|
-
# Detect page type from search results or context
|
|
1019
|
-
page_type = _detect_page_type(combined_context, style_results)
|
|
1020
|
-
|
|
1021
|
-
# Build overrides from search results
|
|
1022
|
-
layout = {}
|
|
1023
|
-
spacing = {}
|
|
1024
|
-
typography = {}
|
|
1025
|
-
colors = {}
|
|
1026
|
-
components = []
|
|
1027
|
-
unique_components = []
|
|
1028
|
-
recommendations = []
|
|
1029
|
-
|
|
1030
|
-
# Extract style-based overrides
|
|
1031
|
-
if style_results:
|
|
1032
|
-
style = style_results[0]
|
|
1033
|
-
style_name = style.get("Style Category", "")
|
|
1034
|
-
keywords = style.get("Keywords", "")
|
|
1035
|
-
best_for = style.get("Best For", "")
|
|
1036
|
-
effects = style.get("Effects & Animation", "")
|
|
1037
|
-
|
|
1038
|
-
# Infer layout from style keywords
|
|
1039
|
-
if any(kw in keywords.lower() for kw in ["data", "dense", "dashboard", "grid"]):
|
|
1040
|
-
layout["Max Width"] = "1400px or full-width"
|
|
1041
|
-
layout["Grid"] = "12-column grid for data flexibility"
|
|
1042
|
-
spacing["Content Density"] = "High — optimize for information display"
|
|
1043
|
-
elif any(kw in keywords.lower() for kw in ["minimal", "simple", "clean", "single"]):
|
|
1044
|
-
layout["Max Width"] = "800px (narrow, focused)"
|
|
1045
|
-
layout["Layout"] = "Single column, centered"
|
|
1046
|
-
spacing["Content Density"] = "Low — focus on clarity"
|
|
1047
|
-
else:
|
|
1048
|
-
layout["Max Width"] = "1200px (standard)"
|
|
1049
|
-
layout["Layout"] = "Full-width sections, centered content"
|
|
1050
|
-
|
|
1051
|
-
if effects:
|
|
1052
|
-
recommendations.append(f"Effects: {effects}")
|
|
1053
|
-
|
|
1054
|
-
# Extract UX guidelines as recommendations
|
|
1055
|
-
for ux in ux_results:
|
|
1056
|
-
category = ux.get("Category", "")
|
|
1057
|
-
do_text = ux.get("Do", "")
|
|
1058
|
-
dont_text = ux.get("Don't", "")
|
|
1059
|
-
if do_text:
|
|
1060
|
-
recommendations.append(f"{category}: {do_text}")
|
|
1061
|
-
if dont_text:
|
|
1062
|
-
components.append(f"Avoid: {dont_text}")
|
|
1063
|
-
|
|
1064
|
-
# Extract landing pattern info for section structure
|
|
1065
|
-
if landing_results:
|
|
1066
|
-
landing = landing_results[0]
|
|
1067
|
-
sections = landing.get("Section Order", "")
|
|
1068
|
-
cta_placement = landing.get("Primary CTA Placement", "")
|
|
1069
|
-
color_strategy = landing.get("Color Strategy", "")
|
|
1070
|
-
|
|
1071
|
-
if sections:
|
|
1072
|
-
layout["Sections"] = sections
|
|
1073
|
-
if cta_placement:
|
|
1074
|
-
recommendations.append(f"CTA Placement: {cta_placement}")
|
|
1075
|
-
if color_strategy:
|
|
1076
|
-
colors["Strategy"] = color_strategy
|
|
1077
|
-
|
|
1078
|
-
# Add page-type specific defaults if no search results
|
|
1079
|
-
if not layout:
|
|
1080
|
-
layout["Max Width"] = "1200px"
|
|
1081
|
-
layout["Layout"] = "Responsive grid"
|
|
1082
|
-
|
|
1083
|
-
if not recommendations:
|
|
1084
|
-
recommendations = [
|
|
1085
|
-
"Refer to MASTER.md for all design rules",
|
|
1086
|
-
"Add specific overrides as needed for this page"
|
|
1087
|
-
]
|
|
1088
|
-
|
|
1089
|
-
return {
|
|
1090
|
-
"page_type": page_type,
|
|
1091
|
-
"layout": layout,
|
|
1092
|
-
"spacing": spacing,
|
|
1093
|
-
"typography": typography,
|
|
1094
|
-
"colors": colors,
|
|
1095
|
-
"components": components,
|
|
1096
|
-
"unique_components": unique_components,
|
|
1097
|
-
"recommendations": recommendations
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
def _detect_page_type(context: str, style_results: list) -> str:
|
|
1102
|
-
"""Detect page type from context and search results."""
|
|
1103
|
-
context_lower = context.lower()
|
|
1104
|
-
|
|
1105
|
-
# Check for common page type patterns
|
|
1106
|
-
page_patterns = [
|
|
1107
|
-
(["dashboard", "admin", "analytics", "data", "metrics", "stats", "monitor", "overview"], "Dashboard / Data View"),
|
|
1108
|
-
(["checkout", "payment", "cart", "purchase", "order", "billing"], "Checkout / Payment"),
|
|
1109
|
-
(["settings", "profile", "account", "preferences", "config"], "Settings / Profile"),
|
|
1110
|
-
(["landing", "marketing", "homepage", "hero", "home", "promo"], "Landing / Marketing"),
|
|
1111
|
-
(["login", "signin", "signup", "register", "auth", "password"], "Authentication"),
|
|
1112
|
-
(["pricing", "plans", "subscription", "tiers", "packages"], "Pricing / Plans"),
|
|
1113
|
-
(["blog", "article", "post", "news", "content", "story"], "Blog / Article"),
|
|
1114
|
-
(["product", "item", "detail", "pdp", "shop", "store"], "Product Detail"),
|
|
1115
|
-
(["search", "results", "browse", "filter", "catalog", "list"], "Search Results"),
|
|
1116
|
-
(["empty", "404", "error", "not found", "zero"], "Empty State"),
|
|
1117
|
-
]
|
|
1118
|
-
|
|
1119
|
-
for keywords, page_type in page_patterns:
|
|
1120
|
-
if any(kw in context_lower for kw in keywords):
|
|
1121
|
-
return page_type
|
|
1122
|
-
|
|
1123
|
-
# Fallback: try to infer from style results
|
|
1124
|
-
if style_results:
|
|
1125
|
-
style_name = style_results[0].get("Style Category", "").lower()
|
|
1126
|
-
best_for = style_results[0].get("Best For", "").lower()
|
|
1127
|
-
|
|
1128
|
-
if "dashboard" in best_for or "data" in best_for:
|
|
1129
|
-
return "Dashboard / Data View"
|
|
1130
|
-
elif "landing" in best_for or "marketing" in best_for:
|
|
1131
|
-
return "Landing / Marketing"
|
|
1132
|
-
|
|
1133
|
-
return "General"
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
# ============ CLI SUPPORT ============
|
|
1137
|
-
if __name__ == "__main__":
|
|
1138
|
-
import argparse
|
|
1139
|
-
|
|
1140
|
-
parser = argparse.ArgumentParser(description="Generate Design System")
|
|
1141
|
-
parser.add_argument("query", help="Search query (e.g., 'SaaS dashboard')")
|
|
1142
|
-
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name")
|
|
1143
|
-
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format")
|
|
1144
|
-
|
|
1145
|
-
args = parser.parse_args()
|
|
1146
|
-
|
|
1147
|
-
result = generate_design_system(args.query, args.project_name, args.format)
|
|
1148
|
-
print(result)
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Design System Generator - Aggregates search results and applies reasoning
|
|
5
|
+
to generate comprehensive design system recommendations.
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
from design_system import generate_design_system
|
|
9
|
+
result = generate_design_system("SaaS dashboard", "My Project")
|
|
10
|
+
|
|
11
|
+
# With persistence (Master + Overrides pattern)
|
|
12
|
+
result = generate_design_system("SaaS dashboard", "My Project", persist=True)
|
|
13
|
+
result = generate_design_system("SaaS dashboard", "My Project", persist=True, page="dashboard")
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
import csv
|
|
17
|
+
import json
|
|
18
|
+
import os
|
|
19
|
+
from datetime import datetime
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
from core import search, DATA_DIR
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# ============ CONFIGURATION ============
|
|
25
|
+
REASONING_FILE = "ui-reasoning.csv"
|
|
26
|
+
|
|
27
|
+
SEARCH_CONFIG = {
|
|
28
|
+
"product": {"max_results": 1},
|
|
29
|
+
"style": {"max_results": 3},
|
|
30
|
+
"color": {"max_results": 2},
|
|
31
|
+
"landing": {"max_results": 2},
|
|
32
|
+
"typography": {"max_results": 2}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# ============ DESIGN SYSTEM GENERATOR ============
|
|
37
|
+
class DesignSystemGenerator:
|
|
38
|
+
"""Generates design system recommendations from aggregated searches."""
|
|
39
|
+
|
|
40
|
+
def __init__(self):
|
|
41
|
+
self.reasoning_data = self._load_reasoning()
|
|
42
|
+
|
|
43
|
+
def _load_reasoning(self) -> list:
|
|
44
|
+
"""Load reasoning rules from CSV."""
|
|
45
|
+
filepath = DATA_DIR / REASONING_FILE
|
|
46
|
+
if not filepath.exists():
|
|
47
|
+
return []
|
|
48
|
+
with open(filepath, 'r', encoding='utf-8') as f:
|
|
49
|
+
return list(csv.DictReader(f))
|
|
50
|
+
|
|
51
|
+
def _multi_domain_search(self, query: str, style_priority: list = None) -> dict:
|
|
52
|
+
"""Execute searches across multiple domains."""
|
|
53
|
+
results = {}
|
|
54
|
+
for domain, config in SEARCH_CONFIG.items():
|
|
55
|
+
if domain == "style" and style_priority:
|
|
56
|
+
# For style, also search with priority keywords
|
|
57
|
+
priority_query = " ".join(style_priority[:2]) if style_priority else query
|
|
58
|
+
combined_query = f"{query} {priority_query}"
|
|
59
|
+
results[domain] = search(combined_query, domain, config["max_results"])
|
|
60
|
+
else:
|
|
61
|
+
results[domain] = search(query, domain, config["max_results"])
|
|
62
|
+
return results
|
|
63
|
+
|
|
64
|
+
def _find_reasoning_rule(self, category: str) -> dict:
|
|
65
|
+
"""Find matching reasoning rule for a category."""
|
|
66
|
+
category_lower = category.lower()
|
|
67
|
+
|
|
68
|
+
# Try exact match first
|
|
69
|
+
for rule in self.reasoning_data:
|
|
70
|
+
if rule.get("UI_Category", "").lower() == category_lower:
|
|
71
|
+
return rule
|
|
72
|
+
|
|
73
|
+
# Try partial match
|
|
74
|
+
for rule in self.reasoning_data:
|
|
75
|
+
ui_cat = rule.get("UI_Category", "").lower()
|
|
76
|
+
if ui_cat in category_lower or category_lower in ui_cat:
|
|
77
|
+
return rule
|
|
78
|
+
|
|
79
|
+
# Try keyword match
|
|
80
|
+
for rule in self.reasoning_data:
|
|
81
|
+
ui_cat = rule.get("UI_Category", "").lower()
|
|
82
|
+
keywords = ui_cat.replace("/", " ").replace("-", " ").split()
|
|
83
|
+
if any(kw in category_lower for kw in keywords):
|
|
84
|
+
return rule
|
|
85
|
+
|
|
86
|
+
return {}
|
|
87
|
+
|
|
88
|
+
def _apply_reasoning(self, category: str, search_results: dict) -> dict:
|
|
89
|
+
"""Apply reasoning rules to search results."""
|
|
90
|
+
rule = self._find_reasoning_rule(category)
|
|
91
|
+
|
|
92
|
+
if not rule:
|
|
93
|
+
return {
|
|
94
|
+
"pattern": "Hero + Features + CTA",
|
|
95
|
+
"style_priority": ["Minimalism", "Flat Design"],
|
|
96
|
+
"color_mood": "Professional",
|
|
97
|
+
"typography_mood": "Clean",
|
|
98
|
+
"key_effects": "Subtle hover transitions",
|
|
99
|
+
"anti_patterns": "",
|
|
100
|
+
"decision_rules": {},
|
|
101
|
+
"severity": "MEDIUM"
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# Parse decision rules JSON
|
|
105
|
+
decision_rules = {}
|
|
106
|
+
try:
|
|
107
|
+
decision_rules = json.loads(rule.get("Decision_Rules", "{}"))
|
|
108
|
+
except json.JSONDecodeError:
|
|
109
|
+
pass
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
"pattern": rule.get("Recommended_Pattern", ""),
|
|
113
|
+
"style_priority": [s.strip() for s in rule.get("Style_Priority", "").split("+")],
|
|
114
|
+
"color_mood": rule.get("Color_Mood", ""),
|
|
115
|
+
"typography_mood": rule.get("Typography_Mood", ""),
|
|
116
|
+
"key_effects": rule.get("Key_Effects", ""),
|
|
117
|
+
"anti_patterns": rule.get("Anti_Patterns", ""),
|
|
118
|
+
"decision_rules": decision_rules,
|
|
119
|
+
"severity": rule.get("Severity", "MEDIUM")
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
def _select_best_match(self, results: list, priority_keywords: list) -> dict:
|
|
123
|
+
"""Select best matching result based on priority keywords."""
|
|
124
|
+
if not results:
|
|
125
|
+
return {}
|
|
126
|
+
|
|
127
|
+
if not priority_keywords:
|
|
128
|
+
return results[0]
|
|
129
|
+
|
|
130
|
+
# First: try exact style name match
|
|
131
|
+
for priority in priority_keywords:
|
|
132
|
+
priority_lower = priority.lower().strip()
|
|
133
|
+
for result in results:
|
|
134
|
+
style_name = result.get("Style Category", "").lower()
|
|
135
|
+
if priority_lower in style_name or style_name in priority_lower:
|
|
136
|
+
return result
|
|
137
|
+
|
|
138
|
+
# Second: score by keyword match in all fields
|
|
139
|
+
scored = []
|
|
140
|
+
for result in results:
|
|
141
|
+
result_str = str(result).lower()
|
|
142
|
+
score = 0
|
|
143
|
+
for kw in priority_keywords:
|
|
144
|
+
kw_lower = kw.lower().strip()
|
|
145
|
+
# Higher score for style name match
|
|
146
|
+
if kw_lower in result.get("Style Category", "").lower():
|
|
147
|
+
score += 10
|
|
148
|
+
# Lower score for keyword field match
|
|
149
|
+
elif kw_lower in result.get("Keywords", "").lower():
|
|
150
|
+
score += 3
|
|
151
|
+
# Even lower for other field matches
|
|
152
|
+
elif kw_lower in result_str:
|
|
153
|
+
score += 1
|
|
154
|
+
scored.append((score, result))
|
|
155
|
+
|
|
156
|
+
scored.sort(key=lambda x: x[0], reverse=True)
|
|
157
|
+
return scored[0][1] if scored and scored[0][0] > 0 else results[0]
|
|
158
|
+
|
|
159
|
+
def _extract_results(self, search_result: dict) -> list:
|
|
160
|
+
"""Extract results list from search result dict."""
|
|
161
|
+
return search_result.get("results", [])
|
|
162
|
+
|
|
163
|
+
def generate(self, query: str, project_name: str = None) -> dict:
|
|
164
|
+
"""Generate complete design system recommendation."""
|
|
165
|
+
# Step 1: First search product to get category
|
|
166
|
+
product_result = search(query, "product", 1)
|
|
167
|
+
product_results = product_result.get("results", [])
|
|
168
|
+
category = "General"
|
|
169
|
+
if product_results:
|
|
170
|
+
category = product_results[0].get("Product Type", "General")
|
|
171
|
+
|
|
172
|
+
# Step 2: Get reasoning rules for this category
|
|
173
|
+
reasoning = self._apply_reasoning(category, {})
|
|
174
|
+
style_priority = reasoning.get("style_priority", [])
|
|
175
|
+
|
|
176
|
+
# Step 3: Multi-domain search with style priority hints
|
|
177
|
+
search_results = self._multi_domain_search(query, style_priority)
|
|
178
|
+
search_results["product"] = product_result # Reuse product search
|
|
179
|
+
|
|
180
|
+
# Step 4: Select best matches from each domain using priority
|
|
181
|
+
style_results = self._extract_results(search_results.get("style", {}))
|
|
182
|
+
color_results = self._extract_results(search_results.get("color", {}))
|
|
183
|
+
typography_results = self._extract_results(search_results.get("typography", {}))
|
|
184
|
+
landing_results = self._extract_results(search_results.get("landing", {}))
|
|
185
|
+
|
|
186
|
+
best_style = self._select_best_match(style_results, reasoning.get("style_priority", []))
|
|
187
|
+
best_color = color_results[0] if color_results else {}
|
|
188
|
+
best_typography = typography_results[0] if typography_results else {}
|
|
189
|
+
best_landing = landing_results[0] if landing_results else {}
|
|
190
|
+
|
|
191
|
+
# Step 5: Build final recommendation
|
|
192
|
+
# Combine effects from both reasoning and style search
|
|
193
|
+
style_effects = best_style.get("Effects & Animation", "")
|
|
194
|
+
reasoning_effects = reasoning.get("key_effects", "")
|
|
195
|
+
combined_effects = style_effects if style_effects else reasoning_effects
|
|
196
|
+
|
|
197
|
+
return {
|
|
198
|
+
"project_name": project_name or query.upper(),
|
|
199
|
+
"category": category,
|
|
200
|
+
"pattern": {
|
|
201
|
+
"name": best_landing.get("Pattern Name", reasoning.get("pattern", "Hero + Features + CTA")),
|
|
202
|
+
"sections": best_landing.get("Section Order", "Hero > Features > CTA"),
|
|
203
|
+
"cta_placement": best_landing.get("Primary CTA Placement", "Above fold"),
|
|
204
|
+
"color_strategy": best_landing.get("Color Strategy", ""),
|
|
205
|
+
"conversion": best_landing.get("Conversion Optimization", "")
|
|
206
|
+
},
|
|
207
|
+
"style": {
|
|
208
|
+
"name": best_style.get("Style Category", "Minimalism"),
|
|
209
|
+
"type": best_style.get("Type", "General"),
|
|
210
|
+
"effects": style_effects,
|
|
211
|
+
"keywords": best_style.get("Keywords", ""),
|
|
212
|
+
"best_for": best_style.get("Best For", ""),
|
|
213
|
+
"performance": best_style.get("Performance", ""),
|
|
214
|
+
"accessibility": best_style.get("Accessibility", ""),
|
|
215
|
+
"light_mode": best_style.get("Light Mode ✓", ""),
|
|
216
|
+
"dark_mode": best_style.get("Dark Mode ✓", ""),
|
|
217
|
+
},
|
|
218
|
+
"colors": {
|
|
219
|
+
"primary": best_color.get("Primary", "#2563EB"),
|
|
220
|
+
"on_primary": best_color.get("On Primary", ""),
|
|
221
|
+
"secondary": best_color.get("Secondary", "#3B82F6"),
|
|
222
|
+
"accent": best_color.get("Accent", "#F97316"),
|
|
223
|
+
"background": best_color.get("Background", "#F8FAFC"),
|
|
224
|
+
"foreground": best_color.get("Foreground", "#1E293B"),
|
|
225
|
+
"muted": best_color.get("Muted", ""),
|
|
226
|
+
"border": best_color.get("Border", ""),
|
|
227
|
+
"destructive": best_color.get("Destructive", ""),
|
|
228
|
+
"ring": best_color.get("Ring", ""),
|
|
229
|
+
"notes": best_color.get("Notes", ""),
|
|
230
|
+
# Keep legacy keys for backward compat in MASTER.md
|
|
231
|
+
"cta": best_color.get("Accent", "#F97316"),
|
|
232
|
+
"text": best_color.get("Foreground", "#1E293B"),
|
|
233
|
+
},
|
|
234
|
+
"typography": {
|
|
235
|
+
"heading": best_typography.get("Heading Font", "Inter"),
|
|
236
|
+
"body": best_typography.get("Body Font", "Inter"),
|
|
237
|
+
"mood": best_typography.get("Mood/Style Keywords", reasoning.get("typography_mood", "")),
|
|
238
|
+
"best_for": best_typography.get("Best For", ""),
|
|
239
|
+
"google_fonts_url": best_typography.get("Google Fonts URL", ""),
|
|
240
|
+
"css_import": best_typography.get("CSS Import", "")
|
|
241
|
+
},
|
|
242
|
+
"key_effects": combined_effects,
|
|
243
|
+
"anti_patterns": reasoning.get("anti_patterns", ""),
|
|
244
|
+
"decision_rules": reasoning.get("decision_rules", {}),
|
|
245
|
+
"severity": reasoning.get("severity", "MEDIUM")
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
# ============ OUTPUT FORMATTERS ============
|
|
250
|
+
BOX_WIDTH = 90 # Wider box for more content
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def hex_to_ansi(hex_color: str) -> str:
|
|
254
|
+
"""Convert hex color to ANSI True Color swatch (██) with fallback."""
|
|
255
|
+
if not hex_color or not hex_color.startswith('#'):
|
|
256
|
+
return ""
|
|
257
|
+
colorterm = os.environ.get('COLORTERM', '')
|
|
258
|
+
if colorterm not in ('truecolor', '24bit'):
|
|
259
|
+
return ""
|
|
260
|
+
hex_color = hex_color.lstrip('#')
|
|
261
|
+
if len(hex_color) != 6:
|
|
262
|
+
return ""
|
|
263
|
+
r, g, b = int(hex_color[0:2], 16), int(hex_color[2:4], 16), int(hex_color[4:6], 16)
|
|
264
|
+
return f"\033[38;2;{r};{g};{b}m██\033[0m "
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def ansi_ljust(s: str, width: int) -> str:
|
|
268
|
+
"""Like str.ljust but accounts for zero-width ANSI escape sequences."""
|
|
269
|
+
import re
|
|
270
|
+
visible_len = len(re.sub(r'\033\[[0-9;]*m', '', s))
|
|
271
|
+
pad = width - visible_len
|
|
272
|
+
return s + (" " * max(0, pad))
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def section_header(name: str, width: int) -> str:
|
|
276
|
+
"""Create a Unicode section separator: ├─── NAME ───...┤"""
|
|
277
|
+
label = f"─── {name} "
|
|
278
|
+
fill = "─" * (width - len(label) - 1)
|
|
279
|
+
return f"├{label}{fill}┤"
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
def format_ascii_box(design_system: dict) -> str:
|
|
283
|
+
"""Format design system as Unicode box with ANSI color swatches."""
|
|
284
|
+
project = design_system.get("project_name", "PROJECT")
|
|
285
|
+
pattern = design_system.get("pattern", {})
|
|
286
|
+
style = design_system.get("style", {})
|
|
287
|
+
colors = design_system.get("colors", {})
|
|
288
|
+
typography = design_system.get("typography", {})
|
|
289
|
+
effects = design_system.get("key_effects", "")
|
|
290
|
+
anti_patterns = design_system.get("anti_patterns", "")
|
|
291
|
+
|
|
292
|
+
def wrap_text(text: str, prefix: str, width: int) -> list:
|
|
293
|
+
"""Wrap long text into multiple lines."""
|
|
294
|
+
if not text:
|
|
295
|
+
return []
|
|
296
|
+
words = text.split()
|
|
297
|
+
lines = []
|
|
298
|
+
current_line = prefix
|
|
299
|
+
for word in words:
|
|
300
|
+
if len(current_line) + len(word) + 1 <= width - 2:
|
|
301
|
+
current_line += (" " if current_line != prefix else "") + word
|
|
302
|
+
else:
|
|
303
|
+
if current_line != prefix:
|
|
304
|
+
lines.append(current_line)
|
|
305
|
+
current_line = prefix + word
|
|
306
|
+
if current_line != prefix:
|
|
307
|
+
lines.append(current_line)
|
|
308
|
+
return lines
|
|
309
|
+
|
|
310
|
+
# Build sections from pattern
|
|
311
|
+
sections = pattern.get("sections", "").split(">")
|
|
312
|
+
sections = [s.strip() for s in sections if s.strip()]
|
|
313
|
+
|
|
314
|
+
# Build output lines
|
|
315
|
+
lines = []
|
|
316
|
+
w = BOX_WIDTH - 1
|
|
317
|
+
|
|
318
|
+
# Header with double-line box
|
|
319
|
+
lines.append("╔" + "═" * w + "╗")
|
|
320
|
+
lines.append(ansi_ljust(f"║ TARGET: {project} - RECOMMENDED DESIGN SYSTEM", BOX_WIDTH) + "║")
|
|
321
|
+
lines.append("╚" + "═" * w + "╝")
|
|
322
|
+
lines.append("┌" + "─" * w + "┐")
|
|
323
|
+
|
|
324
|
+
# Pattern section
|
|
325
|
+
lines.append(section_header("PATTERN", BOX_WIDTH + 1))
|
|
326
|
+
lines.append(f"│ Name: {pattern.get('name', '')}".ljust(BOX_WIDTH) + "│")
|
|
327
|
+
if pattern.get('conversion'):
|
|
328
|
+
lines.append(f"│ Conversion: {pattern.get('conversion', '')}".ljust(BOX_WIDTH) + "│")
|
|
329
|
+
if pattern.get('cta_placement'):
|
|
330
|
+
lines.append(f"│ CTA: {pattern.get('cta_placement', '')}".ljust(BOX_WIDTH) + "│")
|
|
331
|
+
lines.append("│ Sections:".ljust(BOX_WIDTH) + "│")
|
|
332
|
+
for i, section in enumerate(sections, 1):
|
|
333
|
+
lines.append(f"│ {i}. {section}".ljust(BOX_WIDTH) + "│")
|
|
334
|
+
|
|
335
|
+
# Style section
|
|
336
|
+
lines.append(section_header("STYLE", BOX_WIDTH + 1))
|
|
337
|
+
lines.append(f"│ Name: {style.get('name', '')}".ljust(BOX_WIDTH) + "│")
|
|
338
|
+
light = style.get("light_mode", "")
|
|
339
|
+
dark = style.get("dark_mode", "")
|
|
340
|
+
if light or dark:
|
|
341
|
+
lines.append(f"│ Mode Support: Light {light} Dark {dark}".ljust(BOX_WIDTH) + "│")
|
|
342
|
+
if style.get("keywords"):
|
|
343
|
+
for line in wrap_text(f"Keywords: {style.get('keywords', '')}", "│ ", BOX_WIDTH):
|
|
344
|
+
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
345
|
+
if style.get("best_for"):
|
|
346
|
+
for line in wrap_text(f"Best For: {style.get('best_for', '')}", "│ ", BOX_WIDTH):
|
|
347
|
+
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
348
|
+
if style.get("performance") or style.get("accessibility"):
|
|
349
|
+
perf_a11y = f"Performance: {style.get('performance', '')} | Accessibility: {style.get('accessibility', '')}"
|
|
350
|
+
lines.append(f"│ {perf_a11y}".ljust(BOX_WIDTH) + "│")
|
|
351
|
+
|
|
352
|
+
# Colors section (extended palette with ANSI swatches)
|
|
353
|
+
lines.append(section_header("COLORS", BOX_WIDTH + 1))
|
|
354
|
+
color_entries = [
|
|
355
|
+
("Primary", "primary", "--color-primary"),
|
|
356
|
+
("On Primary", "on_primary", "--color-on-primary"),
|
|
357
|
+
("Secondary", "secondary", "--color-secondary"),
|
|
358
|
+
("Accent/CTA", "accent", "--color-accent"),
|
|
359
|
+
("Background", "background", "--color-background"),
|
|
360
|
+
("Foreground", "foreground", "--color-foreground"),
|
|
361
|
+
("Muted", "muted", "--color-muted"),
|
|
362
|
+
("Border", "border", "--color-border"),
|
|
363
|
+
("Destructive", "destructive", "--color-destructive"),
|
|
364
|
+
("Ring", "ring", "--color-ring"),
|
|
365
|
+
]
|
|
366
|
+
for label, key, css_var in color_entries:
|
|
367
|
+
hex_val = colors.get(key, "")
|
|
368
|
+
if not hex_val:
|
|
369
|
+
continue
|
|
370
|
+
swatch = hex_to_ansi(hex_val)
|
|
371
|
+
content = f"│ {swatch}{label + ':':14s} {hex_val:10s} ({css_var})"
|
|
372
|
+
lines.append(ansi_ljust(content, BOX_WIDTH) + "│")
|
|
373
|
+
if colors.get("notes"):
|
|
374
|
+
for line in wrap_text(f"Notes: {colors.get('notes', '')}", "│ ", BOX_WIDTH):
|
|
375
|
+
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
376
|
+
|
|
377
|
+
# Typography section
|
|
378
|
+
lines.append(section_header("TYPOGRAPHY", BOX_WIDTH + 1))
|
|
379
|
+
lines.append(f"│ {typography.get('heading', '')} / {typography.get('body', '')}".ljust(BOX_WIDTH) + "│")
|
|
380
|
+
if typography.get("mood"):
|
|
381
|
+
for line in wrap_text(f"Mood: {typography.get('mood', '')}", "│ ", BOX_WIDTH):
|
|
382
|
+
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
383
|
+
if typography.get("best_for"):
|
|
384
|
+
for line in wrap_text(f"Best For: {typography.get('best_for', '')}", "│ ", BOX_WIDTH):
|
|
385
|
+
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
386
|
+
if typography.get("google_fonts_url"):
|
|
387
|
+
lines.append(f"│ Google Fonts: {typography.get('google_fonts_url', '')}".ljust(BOX_WIDTH) + "│")
|
|
388
|
+
if typography.get("css_import"):
|
|
389
|
+
lines.append(f"│ CSS Import: {typography.get('css_import', '')[:70]}...".ljust(BOX_WIDTH) + "│")
|
|
390
|
+
|
|
391
|
+
# Key Effects section
|
|
392
|
+
if effects:
|
|
393
|
+
lines.append(section_header("KEY EFFECTS", BOX_WIDTH + 1))
|
|
394
|
+
for line in wrap_text(effects, "│ ", BOX_WIDTH):
|
|
395
|
+
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
396
|
+
|
|
397
|
+
# Anti-patterns section
|
|
398
|
+
if anti_patterns:
|
|
399
|
+
lines.append(section_header("AVOID", BOX_WIDTH + 1))
|
|
400
|
+
for line in wrap_text(anti_patterns, "│ ", BOX_WIDTH):
|
|
401
|
+
lines.append(line.ljust(BOX_WIDTH) + "│")
|
|
402
|
+
|
|
403
|
+
# Pre-Delivery Checklist section
|
|
404
|
+
lines.append(section_header("PRE-DELIVERY CHECKLIST", BOX_WIDTH + 1))
|
|
405
|
+
checklist_items = [
|
|
406
|
+
"[ ] No emojis as icons (use SVG: Heroicons/Lucide)",
|
|
407
|
+
"[ ] cursor-pointer on all clickable elements",
|
|
408
|
+
"[ ] Hover states with smooth transitions (150-300ms)",
|
|
409
|
+
"[ ] Light mode: text contrast 4.5:1 minimum",
|
|
410
|
+
"[ ] Focus states visible for keyboard nav",
|
|
411
|
+
"[ ] prefers-reduced-motion respected",
|
|
412
|
+
"[ ] Responsive: 375px, 768px, 1024px, 1440px"
|
|
413
|
+
]
|
|
414
|
+
for item in checklist_items:
|
|
415
|
+
lines.append(f"│ {item}".ljust(BOX_WIDTH) + "│")
|
|
416
|
+
|
|
417
|
+
lines.append("└" + "─" * w + "┘")
|
|
418
|
+
|
|
419
|
+
return "\n".join(lines)
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
def format_markdown(design_system: dict) -> str:
|
|
423
|
+
"""Format design system as markdown."""
|
|
424
|
+
project = design_system.get("project_name", "PROJECT")
|
|
425
|
+
pattern = design_system.get("pattern", {})
|
|
426
|
+
style = design_system.get("style", {})
|
|
427
|
+
colors = design_system.get("colors", {})
|
|
428
|
+
typography = design_system.get("typography", {})
|
|
429
|
+
effects = design_system.get("key_effects", "")
|
|
430
|
+
anti_patterns = design_system.get("anti_patterns", "")
|
|
431
|
+
|
|
432
|
+
lines = []
|
|
433
|
+
lines.append(f"## Design System: {project}")
|
|
434
|
+
lines.append("")
|
|
435
|
+
|
|
436
|
+
# Pattern section
|
|
437
|
+
lines.append("### Pattern")
|
|
438
|
+
lines.append(f"- **Name:** {pattern.get('name', '')}")
|
|
439
|
+
if pattern.get('conversion'):
|
|
440
|
+
lines.append(f"- **Conversion Focus:** {pattern.get('conversion', '')}")
|
|
441
|
+
if pattern.get('cta_placement'):
|
|
442
|
+
lines.append(f"- **CTA Placement:** {pattern.get('cta_placement', '')}")
|
|
443
|
+
if pattern.get('color_strategy'):
|
|
444
|
+
lines.append(f"- **Color Strategy:** {pattern.get('color_strategy', '')}")
|
|
445
|
+
lines.append(f"- **Sections:** {pattern.get('sections', '')}")
|
|
446
|
+
lines.append("")
|
|
447
|
+
|
|
448
|
+
# Style section
|
|
449
|
+
lines.append("### Style")
|
|
450
|
+
lines.append(f"- **Name:** {style.get('name', '')}")
|
|
451
|
+
light = style.get("light_mode", "")
|
|
452
|
+
dark = style.get("dark_mode", "")
|
|
453
|
+
if light or dark:
|
|
454
|
+
lines.append(f"- **Mode Support:** Light {light} | Dark {dark}")
|
|
455
|
+
if style.get('keywords'):
|
|
456
|
+
lines.append(f"- **Keywords:** {style.get('keywords', '')}")
|
|
457
|
+
if style.get('best_for'):
|
|
458
|
+
lines.append(f"- **Best For:** {style.get('best_for', '')}")
|
|
459
|
+
if style.get('performance') or style.get('accessibility'):
|
|
460
|
+
lines.append(f"- **Performance:** {style.get('performance', '')} | **Accessibility:** {style.get('accessibility', '')}")
|
|
461
|
+
lines.append("")
|
|
462
|
+
|
|
463
|
+
# Colors section (extended palette)
|
|
464
|
+
lines.append("### Colors")
|
|
465
|
+
lines.append("| Role | Hex | CSS Variable |")
|
|
466
|
+
lines.append("|------|-----|--------------|")
|
|
467
|
+
md_color_entries = [
|
|
468
|
+
("Primary", "primary", "--color-primary"),
|
|
469
|
+
("On Primary", "on_primary", "--color-on-primary"),
|
|
470
|
+
("Secondary", "secondary", "--color-secondary"),
|
|
471
|
+
("Accent/CTA", "accent", "--color-accent"),
|
|
472
|
+
("Background", "background", "--color-background"),
|
|
473
|
+
("Foreground", "foreground", "--color-foreground"),
|
|
474
|
+
("Muted", "muted", "--color-muted"),
|
|
475
|
+
("Border", "border", "--color-border"),
|
|
476
|
+
("Destructive", "destructive", "--color-destructive"),
|
|
477
|
+
("Ring", "ring", "--color-ring"),
|
|
478
|
+
]
|
|
479
|
+
for label, key, css_var in md_color_entries:
|
|
480
|
+
hex_val = colors.get(key, "")
|
|
481
|
+
if hex_val:
|
|
482
|
+
lines.append(f"| {label} | `{hex_val}` | `{css_var}` |")
|
|
483
|
+
if colors.get("notes"):
|
|
484
|
+
lines.append(f"\n*Notes: {colors.get('notes', '')}*")
|
|
485
|
+
lines.append("")
|
|
486
|
+
|
|
487
|
+
# Typography section
|
|
488
|
+
lines.append("### Typography")
|
|
489
|
+
lines.append(f"- **Heading:** {typography.get('heading', '')}")
|
|
490
|
+
lines.append(f"- **Body:** {typography.get('body', '')}")
|
|
491
|
+
if typography.get("mood"):
|
|
492
|
+
lines.append(f"- **Mood:** {typography.get('mood', '')}")
|
|
493
|
+
if typography.get("best_for"):
|
|
494
|
+
lines.append(f"- **Best For:** {typography.get('best_for', '')}")
|
|
495
|
+
if typography.get("google_fonts_url"):
|
|
496
|
+
lines.append(f"- **Google Fonts:** {typography.get('google_fonts_url', '')}")
|
|
497
|
+
if typography.get("css_import"):
|
|
498
|
+
lines.append(f"- **CSS Import:**")
|
|
499
|
+
lines.append(f"```css")
|
|
500
|
+
lines.append(f"{typography.get('css_import', '')}")
|
|
501
|
+
lines.append(f"```")
|
|
502
|
+
lines.append("")
|
|
503
|
+
|
|
504
|
+
# Key Effects section
|
|
505
|
+
if effects:
|
|
506
|
+
lines.append("### Key Effects")
|
|
507
|
+
lines.append(f"{effects}")
|
|
508
|
+
lines.append("")
|
|
509
|
+
|
|
510
|
+
# Anti-patterns section
|
|
511
|
+
if anti_patterns:
|
|
512
|
+
lines.append("### Avoid (Anti-patterns)")
|
|
513
|
+
newline_bullet = '\n- '
|
|
514
|
+
lines.append(f"- {anti_patterns.replace(' + ', newline_bullet)}")
|
|
515
|
+
lines.append("")
|
|
516
|
+
|
|
517
|
+
# Pre-Delivery Checklist section
|
|
518
|
+
lines.append("### Pre-Delivery Checklist")
|
|
519
|
+
lines.append("- [ ] No emojis as icons (use SVG: Heroicons/Lucide)")
|
|
520
|
+
lines.append("- [ ] cursor-pointer on all clickable elements")
|
|
521
|
+
lines.append("- [ ] Hover states with smooth transitions (150-300ms)")
|
|
522
|
+
lines.append("- [ ] Light mode: text contrast 4.5:1 minimum")
|
|
523
|
+
lines.append("- [ ] Focus states visible for keyboard nav")
|
|
524
|
+
lines.append("- [ ] prefers-reduced-motion respected")
|
|
525
|
+
lines.append("- [ ] Responsive: 375px, 768px, 1024px, 1440px")
|
|
526
|
+
lines.append("")
|
|
527
|
+
|
|
528
|
+
return "\n".join(lines)
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
# ============ MAIN ENTRY POINT ============
|
|
532
|
+
def generate_design_system(query: str, project_name: str = None, output_format: str = "ascii",
|
|
533
|
+
persist: bool = False, page: str = None, output_dir: str = None) -> str:
|
|
534
|
+
"""
|
|
535
|
+
Main entry point for design system generation.
|
|
536
|
+
|
|
537
|
+
Args:
|
|
538
|
+
query: Search query (e.g., "SaaS dashboard", "e-commerce luxury")
|
|
539
|
+
project_name: Optional project name for output header
|
|
540
|
+
output_format: "ascii" (default) or "markdown"
|
|
541
|
+
persist: If True, save design system to design-system/ folder
|
|
542
|
+
page: Optional page name for page-specific override file
|
|
543
|
+
output_dir: Optional output directory (defaults to current working directory)
|
|
544
|
+
|
|
545
|
+
Returns:
|
|
546
|
+
Formatted design system string
|
|
547
|
+
"""
|
|
548
|
+
generator = DesignSystemGenerator()
|
|
549
|
+
design_system = generator.generate(query, project_name)
|
|
550
|
+
|
|
551
|
+
# Persist to files if requested
|
|
552
|
+
if persist:
|
|
553
|
+
persist_design_system(design_system, page, output_dir, query)
|
|
554
|
+
|
|
555
|
+
if output_format == "markdown":
|
|
556
|
+
return format_markdown(design_system)
|
|
557
|
+
return format_ascii_box(design_system)
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
# ============ PERSISTENCE FUNCTIONS ============
|
|
561
|
+
def persist_design_system(design_system: dict, page: str = None, output_dir: str = None, page_query: str = None) -> dict:
|
|
562
|
+
"""
|
|
563
|
+
Persist design system to design-system/<project>/ folder using Master + Overrides pattern.
|
|
564
|
+
|
|
565
|
+
Args:
|
|
566
|
+
design_system: The generated design system dictionary
|
|
567
|
+
page: Optional page name for page-specific override file
|
|
568
|
+
output_dir: Optional output directory (defaults to current working directory)
|
|
569
|
+
page_query: Optional query string for intelligent page override generation
|
|
570
|
+
|
|
571
|
+
Returns:
|
|
572
|
+
dict with created file paths and status
|
|
573
|
+
"""
|
|
574
|
+
base_dir = Path(output_dir) if output_dir else Path.cwd()
|
|
575
|
+
|
|
576
|
+
# Use project name for project-specific folder
|
|
577
|
+
project_name = design_system.get("project_name", "default")
|
|
578
|
+
project_slug = project_name.lower().replace(' ', '-')
|
|
579
|
+
|
|
580
|
+
design_system_dir = base_dir / "design-system" / project_slug
|
|
581
|
+
pages_dir = design_system_dir / "pages"
|
|
582
|
+
|
|
583
|
+
created_files = []
|
|
584
|
+
|
|
585
|
+
# Create directories
|
|
586
|
+
design_system_dir.mkdir(parents=True, exist_ok=True)
|
|
587
|
+
pages_dir.mkdir(parents=True, exist_ok=True)
|
|
588
|
+
|
|
589
|
+
master_file = design_system_dir / "MASTER.md"
|
|
590
|
+
|
|
591
|
+
# Generate and write MASTER.md
|
|
592
|
+
master_content = format_master_md(design_system)
|
|
593
|
+
with open(master_file, 'w', encoding='utf-8') as f:
|
|
594
|
+
f.write(master_content)
|
|
595
|
+
created_files.append(str(master_file))
|
|
596
|
+
|
|
597
|
+
# If page is specified, create page override file with intelligent content
|
|
598
|
+
if page:
|
|
599
|
+
page_file = pages_dir / f"{page.lower().replace(' ', '-')}.md"
|
|
600
|
+
page_content = format_page_override_md(design_system, page, page_query)
|
|
601
|
+
with open(page_file, 'w', encoding='utf-8') as f:
|
|
602
|
+
f.write(page_content)
|
|
603
|
+
created_files.append(str(page_file))
|
|
604
|
+
|
|
605
|
+
return {
|
|
606
|
+
"status": "success",
|
|
607
|
+
"design_system_dir": str(design_system_dir),
|
|
608
|
+
"created_files": created_files
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
def format_master_md(design_system: dict) -> str:
|
|
613
|
+
"""Format design system as MASTER.md with hierarchical override logic."""
|
|
614
|
+
project = design_system.get("project_name", "PROJECT")
|
|
615
|
+
pattern = design_system.get("pattern", {})
|
|
616
|
+
style = design_system.get("style", {})
|
|
617
|
+
colors = design_system.get("colors", {})
|
|
618
|
+
typography = design_system.get("typography", {})
|
|
619
|
+
effects = design_system.get("key_effects", "")
|
|
620
|
+
anti_patterns = design_system.get("anti_patterns", "")
|
|
621
|
+
|
|
622
|
+
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
623
|
+
|
|
624
|
+
lines = []
|
|
625
|
+
|
|
626
|
+
# Logic header
|
|
627
|
+
lines.append("# Design System Master File")
|
|
628
|
+
lines.append("")
|
|
629
|
+
lines.append("> **LOGIC:** When building a specific page, first check `design-system/pages/[page-name].md`.")
|
|
630
|
+
lines.append("> If that file exists, its rules **override** this Master file.")
|
|
631
|
+
lines.append("> If not, strictly follow the rules below.")
|
|
632
|
+
lines.append("")
|
|
633
|
+
lines.append("---")
|
|
634
|
+
lines.append("")
|
|
635
|
+
lines.append(f"**Project:** {project}")
|
|
636
|
+
lines.append(f"**Generated:** {timestamp}")
|
|
637
|
+
lines.append(f"**Category:** {design_system.get('category', 'General')}")
|
|
638
|
+
lines.append("")
|
|
639
|
+
lines.append("---")
|
|
640
|
+
lines.append("")
|
|
641
|
+
|
|
642
|
+
# Global Rules section
|
|
643
|
+
lines.append("## Global Rules")
|
|
644
|
+
lines.append("")
|
|
645
|
+
|
|
646
|
+
# Color Palette
|
|
647
|
+
lines.append("### Color Palette")
|
|
648
|
+
lines.append("")
|
|
649
|
+
lines.append("| Role | Hex | CSS Variable |")
|
|
650
|
+
lines.append("|------|-----|--------------|")
|
|
651
|
+
master_color_entries = [
|
|
652
|
+
("Primary", "primary", "--color-primary"),
|
|
653
|
+
("On Primary", "on_primary", "--color-on-primary"),
|
|
654
|
+
("Secondary", "secondary", "--color-secondary"),
|
|
655
|
+
("Accent/CTA", "accent", "--color-accent"),
|
|
656
|
+
("Background", "background", "--color-background"),
|
|
657
|
+
("Foreground", "foreground", "--color-foreground"),
|
|
658
|
+
("Muted", "muted", "--color-muted"),
|
|
659
|
+
("Border", "border", "--color-border"),
|
|
660
|
+
("Destructive", "destructive", "--color-destructive"),
|
|
661
|
+
("Ring", "ring", "--color-ring"),
|
|
662
|
+
]
|
|
663
|
+
for label, key, css_var in master_color_entries:
|
|
664
|
+
hex_val = colors.get(key, "")
|
|
665
|
+
if hex_val:
|
|
666
|
+
lines.append(f"| {label} | `{hex_val}` | `{css_var}` |")
|
|
667
|
+
lines.append("")
|
|
668
|
+
if colors.get("notes"):
|
|
669
|
+
lines.append(f"**Color Notes:** {colors.get('notes', '')}")
|
|
670
|
+
lines.append("")
|
|
671
|
+
|
|
672
|
+
# Typography
|
|
673
|
+
lines.append("### Typography")
|
|
674
|
+
lines.append("")
|
|
675
|
+
lines.append(f"- **Heading Font:** {typography.get('heading', 'Inter')}")
|
|
676
|
+
lines.append(f"- **Body Font:** {typography.get('body', 'Inter')}")
|
|
677
|
+
if typography.get("mood"):
|
|
678
|
+
lines.append(f"- **Mood:** {typography.get('mood', '')}")
|
|
679
|
+
if typography.get("google_fonts_url"):
|
|
680
|
+
lines.append(f"- **Google Fonts:** [{typography.get('heading', '')} + {typography.get('body', '')}]({typography.get('google_fonts_url', '')})")
|
|
681
|
+
lines.append("")
|
|
682
|
+
if typography.get("css_import"):
|
|
683
|
+
lines.append("**CSS Import:**")
|
|
684
|
+
lines.append("```css")
|
|
685
|
+
lines.append(typography.get("css_import", ""))
|
|
686
|
+
lines.append("```")
|
|
687
|
+
lines.append("")
|
|
688
|
+
|
|
689
|
+
# Spacing Variables
|
|
690
|
+
lines.append("### Spacing Variables")
|
|
691
|
+
lines.append("")
|
|
692
|
+
lines.append("| Token | Value | Usage |")
|
|
693
|
+
lines.append("|-------|-------|-------|")
|
|
694
|
+
lines.append("| `--space-xs` | `4px` / `0.25rem` | Tight gaps |")
|
|
695
|
+
lines.append("| `--space-sm` | `8px` / `0.5rem` | Icon gaps, inline spacing |")
|
|
696
|
+
lines.append("| `--space-md` | `16px` / `1rem` | Standard padding |")
|
|
697
|
+
lines.append("| `--space-lg` | `24px` / `1.5rem` | Section padding |")
|
|
698
|
+
lines.append("| `--space-xl` | `32px` / `2rem` | Large gaps |")
|
|
699
|
+
lines.append("| `--space-2xl` | `48px` / `3rem` | Section margins |")
|
|
700
|
+
lines.append("| `--space-3xl` | `64px` / `4rem` | Hero padding |")
|
|
701
|
+
lines.append("")
|
|
702
|
+
|
|
703
|
+
# Shadow Depths
|
|
704
|
+
lines.append("### Shadow Depths")
|
|
705
|
+
lines.append("")
|
|
706
|
+
lines.append("| Level | Value | Usage |")
|
|
707
|
+
lines.append("|-------|-------|-------|")
|
|
708
|
+
lines.append("| `--shadow-sm` | `0 1px 2px rgba(0,0,0,0.05)` | Subtle lift |")
|
|
709
|
+
lines.append("| `--shadow-md` | `0 4px 6px rgba(0,0,0,0.1)` | Cards, buttons |")
|
|
710
|
+
lines.append("| `--shadow-lg` | `0 10px 15px rgba(0,0,0,0.1)` | Modals, dropdowns |")
|
|
711
|
+
lines.append("| `--shadow-xl` | `0 20px 25px rgba(0,0,0,0.15)` | Hero images, featured cards |")
|
|
712
|
+
lines.append("")
|
|
713
|
+
|
|
714
|
+
# Component Specs section
|
|
715
|
+
lines.append("---")
|
|
716
|
+
lines.append("")
|
|
717
|
+
lines.append("## Component Specs")
|
|
718
|
+
lines.append("")
|
|
719
|
+
|
|
720
|
+
# Buttons
|
|
721
|
+
lines.append("### Buttons")
|
|
722
|
+
lines.append("")
|
|
723
|
+
lines.append("```css")
|
|
724
|
+
lines.append("/* Primary Button */")
|
|
725
|
+
lines.append(".btn-primary {")
|
|
726
|
+
lines.append(f" background: {colors.get('cta', '#F97316')};")
|
|
727
|
+
lines.append(" color: white;")
|
|
728
|
+
lines.append(" padding: 12px 24px;")
|
|
729
|
+
lines.append(" border-radius: 8px;")
|
|
730
|
+
lines.append(" font-weight: 600;")
|
|
731
|
+
lines.append(" transition: all 200ms ease;")
|
|
732
|
+
lines.append(" cursor: pointer;")
|
|
733
|
+
lines.append("}")
|
|
734
|
+
lines.append("")
|
|
735
|
+
lines.append(".btn-primary:hover {")
|
|
736
|
+
lines.append(" opacity: 0.9;")
|
|
737
|
+
lines.append(" transform: translateY(-1px);")
|
|
738
|
+
lines.append("}")
|
|
739
|
+
lines.append("")
|
|
740
|
+
lines.append("/* Secondary Button */")
|
|
741
|
+
lines.append(".btn-secondary {")
|
|
742
|
+
lines.append(f" background: transparent;")
|
|
743
|
+
lines.append(f" color: {colors.get('primary', '#2563EB')};")
|
|
744
|
+
lines.append(f" border: 2px solid {colors.get('primary', '#2563EB')};")
|
|
745
|
+
lines.append(" padding: 12px 24px;")
|
|
746
|
+
lines.append(" border-radius: 8px;")
|
|
747
|
+
lines.append(" font-weight: 600;")
|
|
748
|
+
lines.append(" transition: all 200ms ease;")
|
|
749
|
+
lines.append(" cursor: pointer;")
|
|
750
|
+
lines.append("}")
|
|
751
|
+
lines.append("```")
|
|
752
|
+
lines.append("")
|
|
753
|
+
|
|
754
|
+
# Cards
|
|
755
|
+
lines.append("### Cards")
|
|
756
|
+
lines.append("")
|
|
757
|
+
lines.append("```css")
|
|
758
|
+
lines.append(".card {")
|
|
759
|
+
lines.append(f" background: {colors.get('background', '#FFFFFF')};")
|
|
760
|
+
lines.append(" border-radius: 12px;")
|
|
761
|
+
lines.append(" padding: 24px;")
|
|
762
|
+
lines.append(" box-shadow: var(--shadow-md);")
|
|
763
|
+
lines.append(" transition: all 200ms ease;")
|
|
764
|
+
lines.append(" cursor: pointer;")
|
|
765
|
+
lines.append("}")
|
|
766
|
+
lines.append("")
|
|
767
|
+
lines.append(".card:hover {")
|
|
768
|
+
lines.append(" box-shadow: var(--shadow-lg);")
|
|
769
|
+
lines.append(" transform: translateY(-2px);")
|
|
770
|
+
lines.append("}")
|
|
771
|
+
lines.append("```")
|
|
772
|
+
lines.append("")
|
|
773
|
+
|
|
774
|
+
# Inputs
|
|
775
|
+
lines.append("### Inputs")
|
|
776
|
+
lines.append("")
|
|
777
|
+
lines.append("```css")
|
|
778
|
+
lines.append(".input {")
|
|
779
|
+
lines.append(" padding: 12px 16px;")
|
|
780
|
+
lines.append(" border: 1px solid #E2E8F0;")
|
|
781
|
+
lines.append(" border-radius: 8px;")
|
|
782
|
+
lines.append(" font-size: 16px;")
|
|
783
|
+
lines.append(" transition: border-color 200ms ease;")
|
|
784
|
+
lines.append("}")
|
|
785
|
+
lines.append("")
|
|
786
|
+
lines.append(".input:focus {")
|
|
787
|
+
lines.append(f" border-color: {colors.get('primary', '#2563EB')};")
|
|
788
|
+
lines.append(" outline: none;")
|
|
789
|
+
lines.append(f" box-shadow: 0 0 0 3px {colors.get('primary', '#2563EB')}20;")
|
|
790
|
+
lines.append("}")
|
|
791
|
+
lines.append("```")
|
|
792
|
+
lines.append("")
|
|
793
|
+
|
|
794
|
+
# Modals
|
|
795
|
+
lines.append("### Modals")
|
|
796
|
+
lines.append("")
|
|
797
|
+
lines.append("```css")
|
|
798
|
+
lines.append(".modal-overlay {")
|
|
799
|
+
lines.append(" background: rgba(0, 0, 0, 0.5);")
|
|
800
|
+
lines.append(" backdrop-filter: blur(4px);")
|
|
801
|
+
lines.append("}")
|
|
802
|
+
lines.append("")
|
|
803
|
+
lines.append(".modal {")
|
|
804
|
+
lines.append(" background: white;")
|
|
805
|
+
lines.append(" border-radius: 16px;")
|
|
806
|
+
lines.append(" padding: 32px;")
|
|
807
|
+
lines.append(" box-shadow: var(--shadow-xl);")
|
|
808
|
+
lines.append(" max-width: 500px;")
|
|
809
|
+
lines.append(" width: 90%;")
|
|
810
|
+
lines.append("}")
|
|
811
|
+
lines.append("```")
|
|
812
|
+
lines.append("")
|
|
813
|
+
|
|
814
|
+
# Style section
|
|
815
|
+
lines.append("---")
|
|
816
|
+
lines.append("")
|
|
817
|
+
lines.append("## Style Guidelines")
|
|
818
|
+
lines.append("")
|
|
819
|
+
lines.append(f"**Style:** {style.get('name', 'Minimalism')}")
|
|
820
|
+
lines.append("")
|
|
821
|
+
if style.get("keywords"):
|
|
822
|
+
lines.append(f"**Keywords:** {style.get('keywords', '')}")
|
|
823
|
+
lines.append("")
|
|
824
|
+
if style.get("best_for"):
|
|
825
|
+
lines.append(f"**Best For:** {style.get('best_for', '')}")
|
|
826
|
+
lines.append("")
|
|
827
|
+
if effects:
|
|
828
|
+
lines.append(f"**Key Effects:** {effects}")
|
|
829
|
+
lines.append("")
|
|
830
|
+
|
|
831
|
+
# Layout Pattern
|
|
832
|
+
lines.append("### Page Pattern")
|
|
833
|
+
lines.append("")
|
|
834
|
+
lines.append(f"**Pattern Name:** {pattern.get('name', '')}")
|
|
835
|
+
lines.append("")
|
|
836
|
+
if pattern.get('conversion'):
|
|
837
|
+
lines.append(f"- **Conversion Strategy:** {pattern.get('conversion', '')}")
|
|
838
|
+
if pattern.get('cta_placement'):
|
|
839
|
+
lines.append(f"- **CTA Placement:** {pattern.get('cta_placement', '')}")
|
|
840
|
+
lines.append(f"- **Section Order:** {pattern.get('sections', '')}")
|
|
841
|
+
lines.append("")
|
|
842
|
+
|
|
843
|
+
# Anti-Patterns section
|
|
844
|
+
lines.append("---")
|
|
845
|
+
lines.append("")
|
|
846
|
+
lines.append("## Anti-Patterns (Do NOT Use)")
|
|
847
|
+
lines.append("")
|
|
848
|
+
if anti_patterns:
|
|
849
|
+
anti_list = [a.strip() for a in anti_patterns.split("+")]
|
|
850
|
+
for anti in anti_list:
|
|
851
|
+
if anti:
|
|
852
|
+
lines.append(f"- ❌ {anti}")
|
|
853
|
+
lines.append("")
|
|
854
|
+
lines.append("### Additional Forbidden Patterns")
|
|
855
|
+
lines.append("")
|
|
856
|
+
lines.append("- ❌ **Emojis as icons** — Use SVG icons (Heroicons, Lucide, Simple Icons)")
|
|
857
|
+
lines.append("- ❌ **Missing cursor:pointer** — All clickable elements must have cursor:pointer")
|
|
858
|
+
lines.append("- ❌ **Layout-shifting hovers** — Avoid scale transforms that shift layout")
|
|
859
|
+
lines.append("- ❌ **Low contrast text** — Maintain 4.5:1 minimum contrast ratio")
|
|
860
|
+
lines.append("- ❌ **Instant state changes** — Always use transitions (150-300ms)")
|
|
861
|
+
lines.append("- ❌ **Invisible focus states** — Focus states must be visible for a11y")
|
|
862
|
+
lines.append("")
|
|
863
|
+
|
|
864
|
+
# Pre-Delivery Checklist
|
|
865
|
+
lines.append("---")
|
|
866
|
+
lines.append("")
|
|
867
|
+
lines.append("## Pre-Delivery Checklist")
|
|
868
|
+
lines.append("")
|
|
869
|
+
lines.append("Before delivering any UI code, verify:")
|
|
870
|
+
lines.append("")
|
|
871
|
+
lines.append("- [ ] No emojis used as icons (use SVG instead)")
|
|
872
|
+
lines.append("- [ ] All icons from consistent icon set (Heroicons/Lucide)")
|
|
873
|
+
lines.append("- [ ] `cursor-pointer` on all clickable elements")
|
|
874
|
+
lines.append("- [ ] Hover states with smooth transitions (150-300ms)")
|
|
875
|
+
lines.append("- [ ] Light mode: text contrast 4.5:1 minimum")
|
|
876
|
+
lines.append("- [ ] Focus states visible for keyboard navigation")
|
|
877
|
+
lines.append("- [ ] `prefers-reduced-motion` respected")
|
|
878
|
+
lines.append("- [ ] Responsive: 375px, 768px, 1024px, 1440px")
|
|
879
|
+
lines.append("- [ ] No content hidden behind fixed navbars")
|
|
880
|
+
lines.append("- [ ] No horizontal scroll on mobile")
|
|
881
|
+
lines.append("")
|
|
882
|
+
|
|
883
|
+
return "\n".join(lines)
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
def format_page_override_md(design_system: dict, page_name: str, page_query: str = None) -> str:
|
|
887
|
+
"""Format a page-specific override file with intelligent AI-generated content."""
|
|
888
|
+
project = design_system.get("project_name", "PROJECT")
|
|
889
|
+
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
890
|
+
page_title = page_name.replace("-", " ").replace("_", " ").title()
|
|
891
|
+
|
|
892
|
+
# Detect page type and generate intelligent overrides
|
|
893
|
+
page_overrides = _generate_intelligent_overrides(page_name, page_query, design_system)
|
|
894
|
+
|
|
895
|
+
lines = []
|
|
896
|
+
|
|
897
|
+
lines.append(f"# {page_title} Page Overrides")
|
|
898
|
+
lines.append("")
|
|
899
|
+
lines.append(f"> **PROJECT:** {project}")
|
|
900
|
+
lines.append(f"> **Generated:** {timestamp}")
|
|
901
|
+
lines.append(f"> **Page Type:** {page_overrides.get('page_type', 'General')}")
|
|
902
|
+
lines.append("")
|
|
903
|
+
lines.append("> ⚠️ **IMPORTANT:** Rules in this file **override** the Master file (`design-system/MASTER.md`).")
|
|
904
|
+
lines.append("> Only deviations from the Master are documented here. For all other rules, refer to the Master.")
|
|
905
|
+
lines.append("")
|
|
906
|
+
lines.append("---")
|
|
907
|
+
lines.append("")
|
|
908
|
+
|
|
909
|
+
# Page-specific rules with actual content
|
|
910
|
+
lines.append("## Page-Specific Rules")
|
|
911
|
+
lines.append("")
|
|
912
|
+
|
|
913
|
+
# Layout Overrides
|
|
914
|
+
lines.append("### Layout Overrides")
|
|
915
|
+
lines.append("")
|
|
916
|
+
layout = page_overrides.get("layout", {})
|
|
917
|
+
if layout:
|
|
918
|
+
for key, value in layout.items():
|
|
919
|
+
lines.append(f"- **{key}:** {value}")
|
|
920
|
+
else:
|
|
921
|
+
lines.append("- No overrides — use Master layout")
|
|
922
|
+
lines.append("")
|
|
923
|
+
|
|
924
|
+
# Spacing Overrides
|
|
925
|
+
lines.append("### Spacing Overrides")
|
|
926
|
+
lines.append("")
|
|
927
|
+
spacing = page_overrides.get("spacing", {})
|
|
928
|
+
if spacing:
|
|
929
|
+
for key, value in spacing.items():
|
|
930
|
+
lines.append(f"- **{key}:** {value}")
|
|
931
|
+
else:
|
|
932
|
+
lines.append("- No overrides — use Master spacing")
|
|
933
|
+
lines.append("")
|
|
934
|
+
|
|
935
|
+
# Typography Overrides
|
|
936
|
+
lines.append("### Typography Overrides")
|
|
937
|
+
lines.append("")
|
|
938
|
+
typography = page_overrides.get("typography", {})
|
|
939
|
+
if typography:
|
|
940
|
+
for key, value in typography.items():
|
|
941
|
+
lines.append(f"- **{key}:** {value}")
|
|
942
|
+
else:
|
|
943
|
+
lines.append("- No overrides — use Master typography")
|
|
944
|
+
lines.append("")
|
|
945
|
+
|
|
946
|
+
# Color Overrides
|
|
947
|
+
lines.append("### Color Overrides")
|
|
948
|
+
lines.append("")
|
|
949
|
+
colors = page_overrides.get("colors", {})
|
|
950
|
+
if colors:
|
|
951
|
+
for key, value in colors.items():
|
|
952
|
+
lines.append(f"- **{key}:** {value}")
|
|
953
|
+
else:
|
|
954
|
+
lines.append("- No overrides — use Master colors")
|
|
955
|
+
lines.append("")
|
|
956
|
+
|
|
957
|
+
# Component Overrides
|
|
958
|
+
lines.append("### Component Overrides")
|
|
959
|
+
lines.append("")
|
|
960
|
+
components = page_overrides.get("components", [])
|
|
961
|
+
if components:
|
|
962
|
+
for comp in components:
|
|
963
|
+
lines.append(f"- {comp}")
|
|
964
|
+
else:
|
|
965
|
+
lines.append("- No overrides — use Master component specs")
|
|
966
|
+
lines.append("")
|
|
967
|
+
|
|
968
|
+
# Page-Specific Components
|
|
969
|
+
lines.append("---")
|
|
970
|
+
lines.append("")
|
|
971
|
+
lines.append("## Page-Specific Components")
|
|
972
|
+
lines.append("")
|
|
973
|
+
unique_components = page_overrides.get("unique_components", [])
|
|
974
|
+
if unique_components:
|
|
975
|
+
for comp in unique_components:
|
|
976
|
+
lines.append(f"- {comp}")
|
|
977
|
+
else:
|
|
978
|
+
lines.append("- No unique components for this page")
|
|
979
|
+
lines.append("")
|
|
980
|
+
|
|
981
|
+
# Recommendations
|
|
982
|
+
lines.append("---")
|
|
983
|
+
lines.append("")
|
|
984
|
+
lines.append("## Recommendations")
|
|
985
|
+
lines.append("")
|
|
986
|
+
recommendations = page_overrides.get("recommendations", [])
|
|
987
|
+
if recommendations:
|
|
988
|
+
for rec in recommendations:
|
|
989
|
+
lines.append(f"- {rec}")
|
|
990
|
+
lines.append("")
|
|
991
|
+
|
|
992
|
+
return "\n".join(lines)
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
def _generate_intelligent_overrides(page_name: str, page_query: str, design_system: dict) -> dict:
|
|
996
|
+
"""
|
|
997
|
+
Generate intelligent overrides based on page type using layered search.
|
|
998
|
+
|
|
999
|
+
Uses the existing search infrastructure to find relevant style, UX, and layout
|
|
1000
|
+
data instead of hardcoded page types.
|
|
1001
|
+
"""
|
|
1002
|
+
from core import search
|
|
1003
|
+
|
|
1004
|
+
page_lower = page_name.lower()
|
|
1005
|
+
query_lower = (page_query or "").lower()
|
|
1006
|
+
combined_context = f"{page_lower} {query_lower}"
|
|
1007
|
+
|
|
1008
|
+
# Search across multiple domains for page-specific guidance
|
|
1009
|
+
style_search = search(combined_context, "style", max_results=1)
|
|
1010
|
+
ux_search = search(combined_context, "ux", max_results=3)
|
|
1011
|
+
landing_search = search(combined_context, "landing", max_results=1)
|
|
1012
|
+
|
|
1013
|
+
# Extract results from search response
|
|
1014
|
+
style_results = style_search.get("results", [])
|
|
1015
|
+
ux_results = ux_search.get("results", [])
|
|
1016
|
+
landing_results = landing_search.get("results", [])
|
|
1017
|
+
|
|
1018
|
+
# Detect page type from search results or context
|
|
1019
|
+
page_type = _detect_page_type(combined_context, style_results)
|
|
1020
|
+
|
|
1021
|
+
# Build overrides from search results
|
|
1022
|
+
layout = {}
|
|
1023
|
+
spacing = {}
|
|
1024
|
+
typography = {}
|
|
1025
|
+
colors = {}
|
|
1026
|
+
components = []
|
|
1027
|
+
unique_components = []
|
|
1028
|
+
recommendations = []
|
|
1029
|
+
|
|
1030
|
+
# Extract style-based overrides
|
|
1031
|
+
if style_results:
|
|
1032
|
+
style = style_results[0]
|
|
1033
|
+
style_name = style.get("Style Category", "")
|
|
1034
|
+
keywords = style.get("Keywords", "")
|
|
1035
|
+
best_for = style.get("Best For", "")
|
|
1036
|
+
effects = style.get("Effects & Animation", "")
|
|
1037
|
+
|
|
1038
|
+
# Infer layout from style keywords
|
|
1039
|
+
if any(kw in keywords.lower() for kw in ["data", "dense", "dashboard", "grid"]):
|
|
1040
|
+
layout["Max Width"] = "1400px or full-width"
|
|
1041
|
+
layout["Grid"] = "12-column grid for data flexibility"
|
|
1042
|
+
spacing["Content Density"] = "High — optimize for information display"
|
|
1043
|
+
elif any(kw in keywords.lower() for kw in ["minimal", "simple", "clean", "single"]):
|
|
1044
|
+
layout["Max Width"] = "800px (narrow, focused)"
|
|
1045
|
+
layout["Layout"] = "Single column, centered"
|
|
1046
|
+
spacing["Content Density"] = "Low — focus on clarity"
|
|
1047
|
+
else:
|
|
1048
|
+
layout["Max Width"] = "1200px (standard)"
|
|
1049
|
+
layout["Layout"] = "Full-width sections, centered content"
|
|
1050
|
+
|
|
1051
|
+
if effects:
|
|
1052
|
+
recommendations.append(f"Effects: {effects}")
|
|
1053
|
+
|
|
1054
|
+
# Extract UX guidelines as recommendations
|
|
1055
|
+
for ux in ux_results:
|
|
1056
|
+
category = ux.get("Category", "")
|
|
1057
|
+
do_text = ux.get("Do", "")
|
|
1058
|
+
dont_text = ux.get("Don't", "")
|
|
1059
|
+
if do_text:
|
|
1060
|
+
recommendations.append(f"{category}: {do_text}")
|
|
1061
|
+
if dont_text:
|
|
1062
|
+
components.append(f"Avoid: {dont_text}")
|
|
1063
|
+
|
|
1064
|
+
# Extract landing pattern info for section structure
|
|
1065
|
+
if landing_results:
|
|
1066
|
+
landing = landing_results[0]
|
|
1067
|
+
sections = landing.get("Section Order", "")
|
|
1068
|
+
cta_placement = landing.get("Primary CTA Placement", "")
|
|
1069
|
+
color_strategy = landing.get("Color Strategy", "")
|
|
1070
|
+
|
|
1071
|
+
if sections:
|
|
1072
|
+
layout["Sections"] = sections
|
|
1073
|
+
if cta_placement:
|
|
1074
|
+
recommendations.append(f"CTA Placement: {cta_placement}")
|
|
1075
|
+
if color_strategy:
|
|
1076
|
+
colors["Strategy"] = color_strategy
|
|
1077
|
+
|
|
1078
|
+
# Add page-type specific defaults if no search results
|
|
1079
|
+
if not layout:
|
|
1080
|
+
layout["Max Width"] = "1200px"
|
|
1081
|
+
layout["Layout"] = "Responsive grid"
|
|
1082
|
+
|
|
1083
|
+
if not recommendations:
|
|
1084
|
+
recommendations = [
|
|
1085
|
+
"Refer to MASTER.md for all design rules",
|
|
1086
|
+
"Add specific overrides as needed for this page"
|
|
1087
|
+
]
|
|
1088
|
+
|
|
1089
|
+
return {
|
|
1090
|
+
"page_type": page_type,
|
|
1091
|
+
"layout": layout,
|
|
1092
|
+
"spacing": spacing,
|
|
1093
|
+
"typography": typography,
|
|
1094
|
+
"colors": colors,
|
|
1095
|
+
"components": components,
|
|
1096
|
+
"unique_components": unique_components,
|
|
1097
|
+
"recommendations": recommendations
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
def _detect_page_type(context: str, style_results: list) -> str:
|
|
1102
|
+
"""Detect page type from context and search results."""
|
|
1103
|
+
context_lower = context.lower()
|
|
1104
|
+
|
|
1105
|
+
# Check for common page type patterns
|
|
1106
|
+
page_patterns = [
|
|
1107
|
+
(["dashboard", "admin", "analytics", "data", "metrics", "stats", "monitor", "overview"], "Dashboard / Data View"),
|
|
1108
|
+
(["checkout", "payment", "cart", "purchase", "order", "billing"], "Checkout / Payment"),
|
|
1109
|
+
(["settings", "profile", "account", "preferences", "config"], "Settings / Profile"),
|
|
1110
|
+
(["landing", "marketing", "homepage", "hero", "home", "promo"], "Landing / Marketing"),
|
|
1111
|
+
(["login", "signin", "signup", "register", "auth", "password"], "Authentication"),
|
|
1112
|
+
(["pricing", "plans", "subscription", "tiers", "packages"], "Pricing / Plans"),
|
|
1113
|
+
(["blog", "article", "post", "news", "content", "story"], "Blog / Article"),
|
|
1114
|
+
(["product", "item", "detail", "pdp", "shop", "store"], "Product Detail"),
|
|
1115
|
+
(["search", "results", "browse", "filter", "catalog", "list"], "Search Results"),
|
|
1116
|
+
(["empty", "404", "error", "not found", "zero"], "Empty State"),
|
|
1117
|
+
]
|
|
1118
|
+
|
|
1119
|
+
for keywords, page_type in page_patterns:
|
|
1120
|
+
if any(kw in context_lower for kw in keywords):
|
|
1121
|
+
return page_type
|
|
1122
|
+
|
|
1123
|
+
# Fallback: try to infer from style results
|
|
1124
|
+
if style_results:
|
|
1125
|
+
style_name = style_results[0].get("Style Category", "").lower()
|
|
1126
|
+
best_for = style_results[0].get("Best For", "").lower()
|
|
1127
|
+
|
|
1128
|
+
if "dashboard" in best_for or "data" in best_for:
|
|
1129
|
+
return "Dashboard / Data View"
|
|
1130
|
+
elif "landing" in best_for or "marketing" in best_for:
|
|
1131
|
+
return "Landing / Marketing"
|
|
1132
|
+
|
|
1133
|
+
return "General"
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
# ============ CLI SUPPORT ============
|
|
1137
|
+
if __name__ == "__main__":
|
|
1138
|
+
import argparse
|
|
1139
|
+
|
|
1140
|
+
parser = argparse.ArgumentParser(description="Generate Design System")
|
|
1141
|
+
parser.add_argument("query", help="Search query (e.g., 'SaaS dashboard')")
|
|
1142
|
+
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name")
|
|
1143
|
+
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format")
|
|
1144
|
+
|
|
1145
|
+
args = parser.parse_args()
|
|
1146
|
+
|
|
1147
|
+
result = generate_design_system(args.query, args.project_name, args.format)
|
|
1148
|
+
print(result)
|