bps-kit 1.0.1 → 1.0.2
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/package.json +1 -1
- package/templates/.agents/agents/backend-specialist.md +263 -0
- package/templates/.agents/agents/code-archaeologist.md +106 -0
- package/templates/.agents/agents/database-architect.md +226 -0
- package/templates/.agents/agents/debugger.md +225 -0
- package/templates/.agents/agents/devops-engineer.md +242 -0
- package/templates/.agents/agents/documentation-writer.md +104 -0
- package/templates/.agents/agents/explorer-agent.md +73 -0
- package/templates/.agents/agents/frontend-specialist.md +593 -0
- package/templates/.agents/agents/game-developer.md +162 -0
- package/templates/.agents/agents/mobile-developer.md +377 -0
- package/templates/.agents/agents/orchestrator.md +416 -0
- package/templates/.agents/agents/penetration-tester.md +188 -0
- package/templates/.agents/agents/performance-optimizer.md +187 -0
- package/templates/.agents/agents/product-manager.md +112 -0
- package/templates/.agents/agents/product-owner.md +95 -0
- package/templates/.agents/agents/project-planner.md +406 -0
- package/templates/.agents/agents/qa-automation-engineer.md +103 -0
- package/templates/.agents/agents/security-auditor.md +170 -0
- package/templates/.agents/agents/seo-specialist.md +111 -0
- package/templates/.agents/agents/test-engineer.md +158 -0
- package/templates/.agents/rules/GEMINI.md +219 -0
- package/templates/.agents/scripts/auto_preview.py +148 -0
- package/templates/.agents/scripts/checklist.py +217 -0
- package/templates/.agents/scripts/session_manager.py +120 -0
- package/templates/.agents/scripts/verify_all.py +327 -0
- package/templates/.agents/workflows/brainstorm.md +113 -0
- package/templates/.agents/workflows/create.md +59 -0
- package/templates/.agents/workflows/debug.md +103 -0
- package/templates/.agents/workflows/deploy.md +176 -0
- package/templates/.agents/workflows/enhance.md +63 -0
- package/templates/.agents/workflows/orchestrate.md +237 -0
- package/templates/.agents/workflows/plan.md +89 -0
- package/templates/.agents/workflows/preview.md +81 -0
- package/templates/.agents/workflows/setup-brain.md +39 -0
- package/templates/.agents/workflows/status.md +86 -0
- package/templates/.agents/workflows/test.md +144 -0
- package/templates/.agents/workflows/ui-ux-pro-max.md +296 -0
- package/templates/skills_normal/api-patterns/scripts/api_validator.py +211 -0
- package/templates/skills_normal/database-design/scripts/schema_validator.py +172 -0
- package/templates/skills_normal/frontend-design/scripts/accessibility_checker.py +183 -0
- package/templates/skills_normal/frontend-design/scripts/ux_audit.py +722 -0
- package/templates/skills_normal/git-pushing/scripts/smart_commit.sh +19 -0
- package/templates/skills_normal/lint-and-validate/scripts/lint_runner.py +184 -0
- package/templates/skills_normal/lint-and-validate/scripts/type_coverage.py +173 -0
- package/templates/skills_normal/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/templates/skills_normal/senior-fullstack/scripts/code_quality_analyzer.py +114 -0
- package/templates/skills_normal/senior-fullstack/scripts/fullstack_scaffolder.py +114 -0
- package/templates/skills_normal/senior-fullstack/scripts/project_scaffolder.py +114 -0
- package/templates/skills_normal/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/templates/skills_normal/testing-patterns/scripts/test_runner.py +219 -0
- package/templates/skills_normal/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/templates/vault/007/scripts/config.py +472 -0
- package/templates/vault/007/scripts/full_audit.py +1306 -0
- package/templates/vault/007/scripts/quick_scan.py +481 -0
- package/templates/vault/007/scripts/requirements.txt +26 -0
- package/templates/vault/007/scripts/scanners/__init__.py +0 -0
- package/templates/vault/007/scripts/scanners/dependency_scanner.py +1305 -0
- package/templates/vault/007/scripts/scanners/injection_scanner.py +1104 -0
- package/templates/vault/007/scripts/scanners/secrets_scanner.py +1008 -0
- package/templates/vault/007/scripts/score_calculator.py +693 -0
- package/templates/vault/agent-orchestrator/scripts/match_skills.py +329 -0
- package/templates/vault/agent-orchestrator/scripts/orchestrate.py +304 -0
- package/templates/vault/agent-orchestrator/scripts/requirements.txt +1 -0
- package/templates/vault/agent-orchestrator/scripts/scan_registry.py +508 -0
- package/templates/vault/ai-studio-image/scripts/config.py +613 -0
- package/templates/vault/ai-studio-image/scripts/generate.py +630 -0
- package/templates/vault/ai-studio-image/scripts/prompt_engine.py +424 -0
- package/templates/vault/ai-studio-image/scripts/requirements.txt +4 -0
- package/templates/vault/ai-studio-image/scripts/templates.py +349 -0
- package/templates/vault/android_ui_verification/scripts/verify_ui.sh +32 -0
- package/templates/vault/apify-audience-analysis/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-brand-reputation-monitoring/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-competitor-intelligence/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-content-analytics/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-ecommerce/reference/scripts/package.json +3 -0
- package/templates/vault/apify-ecommerce/reference/scripts/run_actor.js +369 -0
- package/templates/vault/apify-influencer-discovery/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-lead-generation/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-market-research/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-trend-analysis/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-ultimate-scraper/reference/scripts/run_actor.js +363 -0
- package/templates/vault/audio-transcriber/scripts/install-requirements.sh +190 -0
- package/templates/vault/audio-transcriber/scripts/transcribe.py +486 -0
- package/templates/vault/claude-monitor/scripts/api_bench.py +240 -0
- package/templates/vault/claude-monitor/scripts/config.py +69 -0
- package/templates/vault/claude-monitor/scripts/health_check.py +362 -0
- package/templates/vault/claude-monitor/scripts/monitor.py +296 -0
- package/templates/vault/content-creator/scripts/brand_voice_analyzer.py +185 -0
- package/templates/vault/content-creator/scripts/seo_optimizer.py +419 -0
- package/templates/vault/context-agent/scripts/active_context.py +227 -0
- package/templates/vault/context-agent/scripts/compressor.py +149 -0
- package/templates/vault/context-agent/scripts/config.py +69 -0
- package/templates/vault/context-agent/scripts/context_loader.py +155 -0
- package/templates/vault/context-agent/scripts/context_manager.py +302 -0
- package/templates/vault/context-agent/scripts/models.py +103 -0
- package/templates/vault/context-agent/scripts/project_registry.py +132 -0
- package/templates/vault/context-agent/scripts/requirements.txt +6 -0
- package/templates/vault/context-agent/scripts/search.py +115 -0
- package/templates/vault/context-agent/scripts/session_parser.py +206 -0
- package/templates/vault/context-agent/scripts/session_summary.py +319 -0
- package/templates/vault/context-guardian/scripts/context_snapshot.py +229 -0
- package/templates/vault/docx/ooxml/scripts/pack.py +159 -0
- package/templates/vault/docx/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/docx/ooxml/scripts/validate.py +69 -0
- package/templates/vault/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/docx/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/docx/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/docx/scripts/__init__.py +1 -0
- package/templates/vault/docx/scripts/document.py +1276 -0
- package/templates/vault/docx/scripts/templates/comments.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsExtended.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsIds.xml +3 -0
- package/templates/vault/docx/scripts/templates/people.xml +3 -0
- package/templates/vault/docx/scripts/utilities.py +374 -0
- package/templates/vault/docx-official/ooxml/scripts/pack.py +159 -0
- package/templates/vault/docx-official/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/docx-official/ooxml/scripts/validate.py +69 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/docx-official/scripts/__init__.py +1 -0
- package/templates/vault/docx-official/scripts/document.py +1276 -0
- package/templates/vault/docx-official/scripts/templates/comments.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsExtended.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsExtensible.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsIds.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/people.xml +3 -0
- package/templates/vault/docx-official/scripts/utilities.py +374 -0
- package/templates/vault/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/templates/vault/helm-chart-scaffolding/scripts/validate-chart.sh +244 -0
- package/templates/vault/i18n-localization/scripts/i18n_checker.py +241 -0
- package/templates/vault/instagram/scripts/account_setup.py +233 -0
- package/templates/vault/instagram/scripts/analyze.py +221 -0
- package/templates/vault/instagram/scripts/api_client.py +444 -0
- package/templates/vault/instagram/scripts/auth.py +411 -0
- package/templates/vault/instagram/scripts/comments.py +160 -0
- package/templates/vault/instagram/scripts/config.py +111 -0
- package/templates/vault/instagram/scripts/db.py +467 -0
- package/templates/vault/instagram/scripts/export.py +138 -0
- package/templates/vault/instagram/scripts/governance.py +233 -0
- package/templates/vault/instagram/scripts/hashtags.py +114 -0
- package/templates/vault/instagram/scripts/insights.py +170 -0
- package/templates/vault/instagram/scripts/media.py +65 -0
- package/templates/vault/instagram/scripts/messages.py +103 -0
- package/templates/vault/instagram/scripts/profile.py +58 -0
- package/templates/vault/instagram/scripts/publish.py +449 -0
- package/templates/vault/instagram/scripts/requirements.txt +5 -0
- package/templates/vault/instagram/scripts/run_all.py +189 -0
- package/templates/vault/instagram/scripts/schedule.py +189 -0
- package/templates/vault/instagram/scripts/serve_api.py +234 -0
- package/templates/vault/instagram/scripts/templates.py +155 -0
- package/templates/vault/junta-leiloeiros/scripts/db.py +216 -0
- package/templates/vault/junta-leiloeiros/scripts/export.py +137 -0
- package/templates/vault/junta-leiloeiros/scripts/requirements.txt +15 -0
- package/templates/vault/junta-leiloeiros/scripts/run_all.py +190 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/__init__.py +4 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/base_scraper.py +209 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/generic_scraper.py +110 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucap.py +110 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceac.py +72 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceal.py +72 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceb.py +68 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucec.py +63 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucema.py +211 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucemg.py +218 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucep.py +70 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepa.py +74 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepar.py +80 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepe.py +78 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepi.py +69 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucer.py +256 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucerja.py +170 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucern.py +71 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucesc.py +89 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucesp.py +233 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucetins.py +134 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucis_df.py +63 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucisrs.py +299 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/states.py +99 -0
- package/templates/vault/junta-leiloeiros/scripts/serve_api.py +164 -0
- package/templates/vault/junta-leiloeiros/scripts/web_scraper_fallback.py +233 -0
- package/templates/vault/last30days/scripts/last30days.py +521 -0
- package/templates/vault/last30days/scripts/lib/__init__.py +1 -0
- package/templates/vault/last30days/scripts/lib/cache.py +152 -0
- package/templates/vault/last30days/scripts/lib/dates.py +124 -0
- package/templates/vault/last30days/scripts/lib/dedupe.py +120 -0
- package/templates/vault/last30days/scripts/lib/env.py +149 -0
- package/templates/vault/last30days/scripts/lib/http.py +152 -0
- package/templates/vault/last30days/scripts/lib/models.py +175 -0
- package/templates/vault/last30days/scripts/lib/normalize.py +160 -0
- package/templates/vault/last30days/scripts/lib/openai_reddit.py +230 -0
- package/templates/vault/last30days/scripts/lib/reddit_enrich.py +232 -0
- package/templates/vault/last30days/scripts/lib/render.py +383 -0
- package/templates/vault/last30days/scripts/lib/schema.py +336 -0
- package/templates/vault/last30days/scripts/lib/score.py +311 -0
- package/templates/vault/last30days/scripts/lib/ui.py +324 -0
- package/templates/vault/last30days/scripts/lib/websearch.py +401 -0
- package/templates/vault/last30days/scripts/lib/xai_x.py +217 -0
- package/templates/vault/leiloeiro-avaliacao/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-avaliacao/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-edital/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-edital/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-ia/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-ia/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-juridico/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-juridico/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-mercado/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-mercado/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-risco/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-risco/scripts/requirements.txt +1 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/database.ts +24 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/db.ts +35 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/index.ts +2 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/migrations.ts +31 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/schema.sql +8 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/index.ts +44 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/routes/todos.ts +155 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/types/index.ts +35 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/App.css +384 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/App.tsx +81 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/api/todos.ts +57 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/ConfirmDialog.tsx +26 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/EmptyState.tsx +8 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoForm.tsx +43 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoItem.tsx +36 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoList.tsx +27 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/hooks/useTodos.ts +81 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/index.css +48 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/main.tsx +10 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/vite-env.d.ts +1 -0
- package/templates/vault/loki-mode/scripts/export-to-vibe-kanban.sh +178 -0
- package/templates/vault/loki-mode/scripts/loki-wrapper.sh +281 -0
- package/templates/vault/loki-mode/scripts/take-screenshots.js +55 -0
- package/templates/vault/matematico-tao/scripts/complexity_analyzer.py +544 -0
- package/templates/vault/matematico-tao/scripts/dependency_graph.py +538 -0
- package/templates/vault/mcp-builder/scripts/connections.py +151 -0
- package/templates/vault/mcp-builder/scripts/evaluation.py +373 -0
- package/templates/vault/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/templates/vault/mcp-builder/scripts/requirements.txt +2 -0
- package/templates/vault/mobile-design/scripts/mobile_audit.py +670 -0
- package/templates/vault/notebooklm/scripts/__init__.py +81 -0
- package/templates/vault/notebooklm/scripts/ask_question.py +256 -0
- package/templates/vault/notebooklm/scripts/auth_manager.py +358 -0
- package/templates/vault/notebooklm/scripts/browser_session.py +255 -0
- package/templates/vault/notebooklm/scripts/browser_utils.py +107 -0
- package/templates/vault/notebooklm/scripts/cleanup_manager.py +302 -0
- package/templates/vault/notebooklm/scripts/config.py +44 -0
- package/templates/vault/notebooklm/scripts/notebook_manager.py +410 -0
- package/templates/vault/notebooklm/scripts/run.py +102 -0
- package/templates/vault/notebooklm/scripts/setup_environment.py +204 -0
- package/templates/vault/pdf/scripts/check_bounding_boxes.py +70 -0
- package/templates/vault/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/templates/vault/pdf/scripts/check_fillable_fields.py +12 -0
- package/templates/vault/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/templates/vault/pdf/scripts/create_validation_image.py +41 -0
- package/templates/vault/pdf/scripts/extract_form_field_info.py +152 -0
- package/templates/vault/pdf/scripts/fill_fillable_fields.py +114 -0
- package/templates/vault/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/templates/vault/pdf-official/scripts/check_bounding_boxes.py +70 -0
- package/templates/vault/pdf-official/scripts/check_bounding_boxes_test.py +226 -0
- package/templates/vault/pdf-official/scripts/check_fillable_fields.py +12 -0
- package/templates/vault/pdf-official/scripts/convert_pdf_to_images.py +35 -0
- package/templates/vault/pdf-official/scripts/create_validation_image.py +41 -0
- package/templates/vault/pdf-official/scripts/extract_form_field_info.py +152 -0
- package/templates/vault/pdf-official/scripts/fill_fillable_fields.py +114 -0
- package/templates/vault/pdf-official/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/templates/vault/planning-with-files/scripts/check-complete.sh +44 -0
- package/templates/vault/planning-with-files/scripts/init-session.sh +120 -0
- package/templates/vault/pptx/ooxml/scripts/pack.py +159 -0
- package/templates/vault/pptx/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/pptx/ooxml/scripts/validate.py +69 -0
- package/templates/vault/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/pptx/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/pptx/scripts/html2pptx.js +979 -0
- package/templates/vault/pptx/scripts/inventory.py +1020 -0
- package/templates/vault/pptx/scripts/rearrange.py +231 -0
- package/templates/vault/pptx/scripts/replace.py +385 -0
- package/templates/vault/pptx/scripts/thumbnail.py +450 -0
- package/templates/vault/pptx-official/ooxml/scripts/pack.py +159 -0
- package/templates/vault/pptx-official/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/pptx-official/ooxml/scripts/validate.py +69 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/pptx-official/scripts/html2pptx.js +979 -0
- package/templates/vault/pptx-official/scripts/inventory.py +1020 -0
- package/templates/vault/pptx-official/scripts/rearrange.py +231 -0
- package/templates/vault/pptx-official/scripts/replace.py +385 -0
- package/templates/vault/pptx-official/scripts/thumbnail.py +450 -0
- package/templates/vault/product-manager-toolkit/scripts/customer_interview_analyzer.py +441 -0
- package/templates/vault/product-manager-toolkit/scripts/rice_prioritizer.py +296 -0
- package/templates/vault/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
- package/templates/vault/scripts/.skill_cache.json +7538 -0
- package/templates/vault/scripts/skill_search.py +228 -0
- package/templates/vault/senior-architect/scripts/architecture_diagram_generator.py +114 -0
- package/templates/vault/senior-architect/scripts/dependency_analyzer.py +114 -0
- package/templates/vault/senior-architect/scripts/project_architect.py +114 -0
- package/templates/vault/shopify-development/scripts/requirements.txt +19 -0
- package/templates/vault/shopify-development/scripts/shopify_graphql.py +428 -0
- package/templates/vault/shopify-development/scripts/shopify_init.py +441 -0
- package/templates/vault/shopify-development/scripts/tests/test_shopify_init.py +379 -0
- package/templates/vault/skill-creator/scripts/init_skill.py +303 -0
- package/templates/vault/skill-creator/scripts/package_skill.py +110 -0
- package/templates/vault/skill-creator/scripts/quick_validate.py +95 -0
- package/templates/vault/skill-installer/scripts/detect_skills.py +318 -0
- package/templates/vault/skill-installer/scripts/install_skill.py +1708 -0
- package/templates/vault/skill-installer/scripts/package_skill.py +417 -0
- package/templates/vault/skill-installer/scripts/requirements.txt +1 -0
- package/templates/vault/skill-installer/scripts/validate_skill.py +430 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/__init__.py +13 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/code_quality.py +247 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/cross_skill.py +134 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/dependencies.py +121 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/documentation.py +189 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/governance_audit.py +153 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/performance.py +164 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/security.py +189 -0
- package/templates/vault/skill-sentinel/scripts/config.py +158 -0
- package/templates/vault/skill-sentinel/scripts/cost_optimizer.py +146 -0
- package/templates/vault/skill-sentinel/scripts/db.py +354 -0
- package/templates/vault/skill-sentinel/scripts/governance.py +58 -0
- package/templates/vault/skill-sentinel/scripts/recommender.py +228 -0
- package/templates/vault/skill-sentinel/scripts/report_generator.py +224 -0
- package/templates/vault/skill-sentinel/scripts/requirements.txt +1 -0
- package/templates/vault/skill-sentinel/scripts/run_audit.py +290 -0
- package/templates/vault/skill-sentinel/scripts/scanner.py +271 -0
- package/templates/vault/stability-ai/scripts/config.py +266 -0
- package/templates/vault/stability-ai/scripts/generate.py +687 -0
- package/templates/vault/stability-ai/scripts/requirements.txt +4 -0
- package/templates/vault/stability-ai/scripts/styles.py +174 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/bot-client.ts +86 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/handlers.ts +79 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/index.ts +32 -0
- package/templates/vault/telegram/scripts/send_message.py +143 -0
- package/templates/vault/telegram/scripts/setup_project.py +103 -0
- package/templates/vault/telegram/scripts/test_bot.py +144 -0
- package/templates/vault/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/templates/vault/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/templates/vault/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/templates/vault/ui-ux-pro-max/scripts/core.py +257 -0
- package/templates/vault/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/templates/vault/ui-ux-pro-max/scripts/search.py +76 -0
- package/templates/vault/videodb/scripts/ws_listener.py +204 -0
- package/templates/vault/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/templates/vault/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/templates/vault/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/templates/vault/webapp-testing/scripts/with_server.py +106 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/index.ts +125 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/template-manager.ts +67 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/types.ts +216 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/webhook-handler.ts +173 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/whatsapp-client.ts +193 -0
- package/templates/vault/whatsapp-cloud-api/scripts/send_test_message.py +137 -0
- package/templates/vault/whatsapp-cloud-api/scripts/setup_project.py +118 -0
- package/templates/vault/whatsapp-cloud-api/scripts/validate_config.py +190 -0
- package/templates/vault/youtube-summarizer/scripts/extract-transcript.py +65 -0
- package/templates/vault/youtube-summarizer/scripts/install-dependencies.sh +28 -0
|
@@ -0,0 +1,487 @@
|
|
|
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
|
+
|
|
12
|
+
import csv
|
|
13
|
+
import json
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from core import search, DATA_DIR
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# ============ CONFIGURATION ============
|
|
19
|
+
REASONING_FILE = "ui-reasoning.csv"
|
|
20
|
+
|
|
21
|
+
SEARCH_CONFIG = {
|
|
22
|
+
"product": {"max_results": 1},
|
|
23
|
+
"style": {"max_results": 3},
|
|
24
|
+
"color": {"max_results": 2},
|
|
25
|
+
"landing": {"max_results": 2},
|
|
26
|
+
"typography": {"max_results": 2}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# ============ DESIGN SYSTEM GENERATOR ============
|
|
31
|
+
class DesignSystemGenerator:
|
|
32
|
+
"""Generates design system recommendations from aggregated searches."""
|
|
33
|
+
|
|
34
|
+
def __init__(self):
|
|
35
|
+
self.reasoning_data = self._load_reasoning()
|
|
36
|
+
|
|
37
|
+
def _load_reasoning(self) -> list:
|
|
38
|
+
"""Load reasoning rules from CSV."""
|
|
39
|
+
filepath = DATA_DIR / REASONING_FILE
|
|
40
|
+
if not filepath.exists():
|
|
41
|
+
return []
|
|
42
|
+
with open(filepath, 'r', encoding='utf-8') as f:
|
|
43
|
+
return list(csv.DictReader(f))
|
|
44
|
+
|
|
45
|
+
def _multi_domain_search(self, query: str, style_priority: list = None) -> dict:
|
|
46
|
+
"""Execute searches across multiple domains."""
|
|
47
|
+
results = {}
|
|
48
|
+
for domain, config in SEARCH_CONFIG.items():
|
|
49
|
+
if domain == "style" and style_priority:
|
|
50
|
+
# For style, also search with priority keywords
|
|
51
|
+
priority_query = " ".join(style_priority[:2]) if style_priority else query
|
|
52
|
+
combined_query = f"{query} {priority_query}"
|
|
53
|
+
results[domain] = search(combined_query, domain, config["max_results"])
|
|
54
|
+
else:
|
|
55
|
+
results[domain] = search(query, domain, config["max_results"])
|
|
56
|
+
return results
|
|
57
|
+
|
|
58
|
+
def _find_reasoning_rule(self, category: str) -> dict:
|
|
59
|
+
"""Find matching reasoning rule for a category."""
|
|
60
|
+
category_lower = category.lower()
|
|
61
|
+
|
|
62
|
+
# Try exact match first
|
|
63
|
+
for rule in self.reasoning_data:
|
|
64
|
+
if rule.get("UI_Category", "").lower() == category_lower:
|
|
65
|
+
return rule
|
|
66
|
+
|
|
67
|
+
# Try partial match
|
|
68
|
+
for rule in self.reasoning_data:
|
|
69
|
+
ui_cat = rule.get("UI_Category", "").lower()
|
|
70
|
+
if ui_cat in category_lower or category_lower in ui_cat:
|
|
71
|
+
return rule
|
|
72
|
+
|
|
73
|
+
# Try keyword match
|
|
74
|
+
for rule in self.reasoning_data:
|
|
75
|
+
ui_cat = rule.get("UI_Category", "").lower()
|
|
76
|
+
keywords = ui_cat.replace("/", " ").replace("-", " ").split()
|
|
77
|
+
if any(kw in category_lower for kw in keywords):
|
|
78
|
+
return rule
|
|
79
|
+
|
|
80
|
+
return {}
|
|
81
|
+
|
|
82
|
+
def _apply_reasoning(self, category: str, search_results: dict) -> dict:
|
|
83
|
+
"""Apply reasoning rules to search results."""
|
|
84
|
+
rule = self._find_reasoning_rule(category)
|
|
85
|
+
|
|
86
|
+
if not rule:
|
|
87
|
+
return {
|
|
88
|
+
"pattern": "Hero + Features + CTA",
|
|
89
|
+
"style_priority": ["Minimalism", "Flat Design"],
|
|
90
|
+
"color_mood": "Professional",
|
|
91
|
+
"typography_mood": "Clean",
|
|
92
|
+
"key_effects": "Subtle hover transitions",
|
|
93
|
+
"anti_patterns": "",
|
|
94
|
+
"decision_rules": {},
|
|
95
|
+
"severity": "MEDIUM"
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
# Parse decision rules JSON
|
|
99
|
+
decision_rules = {}
|
|
100
|
+
try:
|
|
101
|
+
decision_rules = json.loads(rule.get("Decision_Rules", "{}"))
|
|
102
|
+
except json.JSONDecodeError:
|
|
103
|
+
pass
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
"pattern": rule.get("Recommended_Pattern", ""),
|
|
107
|
+
"style_priority": [s.strip() for s in rule.get("Style_Priority", "").split("+")],
|
|
108
|
+
"color_mood": rule.get("Color_Mood", ""),
|
|
109
|
+
"typography_mood": rule.get("Typography_Mood", ""),
|
|
110
|
+
"key_effects": rule.get("Key_Effects", ""),
|
|
111
|
+
"anti_patterns": rule.get("Anti_Patterns", ""),
|
|
112
|
+
"decision_rules": decision_rules,
|
|
113
|
+
"severity": rule.get("Severity", "MEDIUM")
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
def _select_best_match(self, results: list, priority_keywords: list) -> dict:
|
|
117
|
+
"""Select best matching result based on priority keywords."""
|
|
118
|
+
if not results:
|
|
119
|
+
return {}
|
|
120
|
+
|
|
121
|
+
if not priority_keywords:
|
|
122
|
+
return results[0]
|
|
123
|
+
|
|
124
|
+
# First: try exact style name match
|
|
125
|
+
for priority in priority_keywords:
|
|
126
|
+
priority_lower = priority.lower().strip()
|
|
127
|
+
for result in results:
|
|
128
|
+
style_name = result.get("Style Category", "").lower()
|
|
129
|
+
if priority_lower in style_name or style_name in priority_lower:
|
|
130
|
+
return result
|
|
131
|
+
|
|
132
|
+
# Second: score by keyword match in all fields
|
|
133
|
+
scored = []
|
|
134
|
+
for result in results:
|
|
135
|
+
result_str = str(result).lower()
|
|
136
|
+
score = 0
|
|
137
|
+
for kw in priority_keywords:
|
|
138
|
+
kw_lower = kw.lower().strip()
|
|
139
|
+
# Higher score for style name match
|
|
140
|
+
if kw_lower in result.get("Style Category", "").lower():
|
|
141
|
+
score += 10
|
|
142
|
+
# Lower score for keyword field match
|
|
143
|
+
elif kw_lower in result.get("Keywords", "").lower():
|
|
144
|
+
score += 3
|
|
145
|
+
# Even lower for other field matches
|
|
146
|
+
elif kw_lower in result_str:
|
|
147
|
+
score += 1
|
|
148
|
+
scored.append((score, result))
|
|
149
|
+
|
|
150
|
+
scored.sort(key=lambda x: x[0], reverse=True)
|
|
151
|
+
return scored[0][1] if scored and scored[0][0] > 0 else results[0]
|
|
152
|
+
|
|
153
|
+
def _extract_results(self, search_result: dict) -> list:
|
|
154
|
+
"""Extract results list from search result dict."""
|
|
155
|
+
return search_result.get("results", [])
|
|
156
|
+
|
|
157
|
+
def generate(self, query: str, project_name: str = None) -> dict:
|
|
158
|
+
"""Generate complete design system recommendation."""
|
|
159
|
+
# Step 1: First search product to get category
|
|
160
|
+
product_result = search(query, "product", 1)
|
|
161
|
+
product_results = product_result.get("results", [])
|
|
162
|
+
category = "General"
|
|
163
|
+
if product_results:
|
|
164
|
+
category = product_results[0].get("Product Type", "General")
|
|
165
|
+
|
|
166
|
+
# Step 2: Get reasoning rules for this category
|
|
167
|
+
reasoning = self._apply_reasoning(category, {})
|
|
168
|
+
style_priority = reasoning.get("style_priority", [])
|
|
169
|
+
|
|
170
|
+
# Step 3: Multi-domain search with style priority hints
|
|
171
|
+
search_results = self._multi_domain_search(query, style_priority)
|
|
172
|
+
search_results["product"] = product_result # Reuse product search
|
|
173
|
+
|
|
174
|
+
# Step 4: Select best matches from each domain using priority
|
|
175
|
+
style_results = self._extract_results(search_results.get("style", {}))
|
|
176
|
+
color_results = self._extract_results(search_results.get("color", {}))
|
|
177
|
+
typography_results = self._extract_results(search_results.get("typography", {}))
|
|
178
|
+
landing_results = self._extract_results(search_results.get("landing", {}))
|
|
179
|
+
|
|
180
|
+
best_style = self._select_best_match(style_results, reasoning.get("style_priority", []))
|
|
181
|
+
best_color = color_results[0] if color_results else {}
|
|
182
|
+
best_typography = typography_results[0] if typography_results else {}
|
|
183
|
+
best_landing = landing_results[0] if landing_results else {}
|
|
184
|
+
|
|
185
|
+
# Step 5: Build final recommendation
|
|
186
|
+
# Combine effects from both reasoning and style search
|
|
187
|
+
style_effects = best_style.get("Effects & Animation", "")
|
|
188
|
+
reasoning_effects = reasoning.get("key_effects", "")
|
|
189
|
+
combined_effects = style_effects if style_effects else reasoning_effects
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
"project_name": project_name or query.upper(),
|
|
193
|
+
"category": category,
|
|
194
|
+
"pattern": {
|
|
195
|
+
"name": best_landing.get("Pattern Name", reasoning.get("pattern", "Hero + Features + CTA")),
|
|
196
|
+
"sections": best_landing.get("Section Order", "Hero > Features > CTA"),
|
|
197
|
+
"cta_placement": best_landing.get("Primary CTA Placement", "Above fold"),
|
|
198
|
+
"color_strategy": best_landing.get("Color Strategy", ""),
|
|
199
|
+
"conversion": best_landing.get("Conversion Optimization", "")
|
|
200
|
+
},
|
|
201
|
+
"style": {
|
|
202
|
+
"name": best_style.get("Style Category", "Minimalism"),
|
|
203
|
+
"type": best_style.get("Type", "General"),
|
|
204
|
+
"effects": style_effects,
|
|
205
|
+
"keywords": best_style.get("Keywords", ""),
|
|
206
|
+
"best_for": best_style.get("Best For", ""),
|
|
207
|
+
"performance": best_style.get("Performance", ""),
|
|
208
|
+
"accessibility": best_style.get("Accessibility", "")
|
|
209
|
+
},
|
|
210
|
+
"colors": {
|
|
211
|
+
"primary": best_color.get("Primary (Hex)", "#2563EB"),
|
|
212
|
+
"secondary": best_color.get("Secondary (Hex)", "#3B82F6"),
|
|
213
|
+
"cta": best_color.get("CTA (Hex)", "#F97316"),
|
|
214
|
+
"background": best_color.get("Background (Hex)", "#F8FAFC"),
|
|
215
|
+
"text": best_color.get("Text (Hex)", "#1E293B"),
|
|
216
|
+
"notes": best_color.get("Notes", "")
|
|
217
|
+
},
|
|
218
|
+
"typography": {
|
|
219
|
+
"heading": best_typography.get("Heading Font", "Inter"),
|
|
220
|
+
"body": best_typography.get("Body Font", "Inter"),
|
|
221
|
+
"mood": best_typography.get("Mood/Style Keywords", reasoning.get("typography_mood", "")),
|
|
222
|
+
"best_for": best_typography.get("Best For", ""),
|
|
223
|
+
"google_fonts_url": best_typography.get("Google Fonts URL", ""),
|
|
224
|
+
"css_import": best_typography.get("CSS Import", "")
|
|
225
|
+
},
|
|
226
|
+
"key_effects": combined_effects,
|
|
227
|
+
"anti_patterns": reasoning.get("anti_patterns", ""),
|
|
228
|
+
"decision_rules": reasoning.get("decision_rules", {}),
|
|
229
|
+
"severity": reasoning.get("severity", "MEDIUM")
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
# ============ OUTPUT FORMATTERS ============
|
|
234
|
+
BOX_WIDTH = 90 # Wider box for more content
|
|
235
|
+
|
|
236
|
+
def format_ascii_box(design_system: dict) -> str:
|
|
237
|
+
"""Format design system as ASCII box with emojis (MCP-style)."""
|
|
238
|
+
project = design_system.get("project_name", "PROJECT")
|
|
239
|
+
pattern = design_system.get("pattern", {})
|
|
240
|
+
style = design_system.get("style", {})
|
|
241
|
+
colors = design_system.get("colors", {})
|
|
242
|
+
typography = design_system.get("typography", {})
|
|
243
|
+
effects = design_system.get("key_effects", "")
|
|
244
|
+
anti_patterns = design_system.get("anti_patterns", "")
|
|
245
|
+
|
|
246
|
+
def wrap_text(text: str, prefix: str, width: int) -> list:
|
|
247
|
+
"""Wrap long text into multiple lines."""
|
|
248
|
+
if not text:
|
|
249
|
+
return []
|
|
250
|
+
words = text.split()
|
|
251
|
+
lines = []
|
|
252
|
+
current_line = prefix
|
|
253
|
+
for word in words:
|
|
254
|
+
if len(current_line) + len(word) + 1 <= width - 2:
|
|
255
|
+
current_line += (" " if current_line != prefix else "") + word
|
|
256
|
+
else:
|
|
257
|
+
if current_line != prefix:
|
|
258
|
+
lines.append(current_line)
|
|
259
|
+
current_line = prefix + word
|
|
260
|
+
if current_line != prefix:
|
|
261
|
+
lines.append(current_line)
|
|
262
|
+
return lines
|
|
263
|
+
|
|
264
|
+
# Build sections from pattern
|
|
265
|
+
sections = pattern.get("sections", "").split(">")
|
|
266
|
+
sections = [s.strip() for s in sections if s.strip()]
|
|
267
|
+
|
|
268
|
+
# Build output lines
|
|
269
|
+
lines = []
|
|
270
|
+
w = BOX_WIDTH - 1
|
|
271
|
+
|
|
272
|
+
lines.append("+" + "-" * w + "+")
|
|
273
|
+
lines.append(f"| TARGET: {project} - RECOMMENDED DESIGN SYSTEM".ljust(BOX_WIDTH) + "|")
|
|
274
|
+
lines.append("+" + "-" * w + "+")
|
|
275
|
+
lines.append("|" + " " * BOX_WIDTH + "|")
|
|
276
|
+
|
|
277
|
+
# Pattern section
|
|
278
|
+
lines.append(f"| PATTERN: {pattern.get('name', '')}".ljust(BOX_WIDTH) + "|")
|
|
279
|
+
if pattern.get('conversion'):
|
|
280
|
+
lines.append(f"| Conversion: {pattern.get('conversion', '')}".ljust(BOX_WIDTH) + "|")
|
|
281
|
+
if pattern.get('cta_placement'):
|
|
282
|
+
lines.append(f"| CTA: {pattern.get('cta_placement', '')}".ljust(BOX_WIDTH) + "|")
|
|
283
|
+
lines.append("| Sections:".ljust(BOX_WIDTH) + "|")
|
|
284
|
+
for i, section in enumerate(sections, 1):
|
|
285
|
+
lines.append(f"| {i}. {section}".ljust(BOX_WIDTH) + "|")
|
|
286
|
+
lines.append("|" + " " * BOX_WIDTH + "|")
|
|
287
|
+
|
|
288
|
+
# Style section
|
|
289
|
+
lines.append(f"| STYLE: {style.get('name', '')}".ljust(BOX_WIDTH) + "|")
|
|
290
|
+
if style.get("keywords"):
|
|
291
|
+
for line in wrap_text(f"Keywords: {style.get('keywords', '')}", "| ", BOX_WIDTH):
|
|
292
|
+
lines.append(line.ljust(BOX_WIDTH) + "|")
|
|
293
|
+
if style.get("best_for"):
|
|
294
|
+
for line in wrap_text(f"Best For: {style.get('best_for', '')}", "| ", BOX_WIDTH):
|
|
295
|
+
lines.append(line.ljust(BOX_WIDTH) + "|")
|
|
296
|
+
if style.get("performance") or style.get("accessibility"):
|
|
297
|
+
perf_a11y = f"Performance: {style.get('performance', '')} | Accessibility: {style.get('accessibility', '')}"
|
|
298
|
+
lines.append(f"| {perf_a11y}".ljust(BOX_WIDTH) + "|")
|
|
299
|
+
lines.append("|" + " " * BOX_WIDTH + "|")
|
|
300
|
+
|
|
301
|
+
# Colors section
|
|
302
|
+
lines.append("| COLORS:".ljust(BOX_WIDTH) + "|")
|
|
303
|
+
lines.append(f"| Primary: {colors.get('primary', '')}".ljust(BOX_WIDTH) + "|")
|
|
304
|
+
lines.append(f"| Secondary: {colors.get('secondary', '')}".ljust(BOX_WIDTH) + "|")
|
|
305
|
+
lines.append(f"| CTA: {colors.get('cta', '')}".ljust(BOX_WIDTH) + "|")
|
|
306
|
+
lines.append(f"| Background: {colors.get('background', '')}".ljust(BOX_WIDTH) + "|")
|
|
307
|
+
lines.append(f"| Text: {colors.get('text', '')}".ljust(BOX_WIDTH) + "|")
|
|
308
|
+
if colors.get("notes"):
|
|
309
|
+
for line in wrap_text(f"Notes: {colors.get('notes', '')}", "| ", BOX_WIDTH):
|
|
310
|
+
lines.append(line.ljust(BOX_WIDTH) + "|")
|
|
311
|
+
lines.append("|" + " " * BOX_WIDTH + "|")
|
|
312
|
+
|
|
313
|
+
# Typography section
|
|
314
|
+
lines.append(f"| TYPOGRAPHY: {typography.get('heading', '')} / {typography.get('body', '')}".ljust(BOX_WIDTH) + "|")
|
|
315
|
+
if typography.get("mood"):
|
|
316
|
+
for line in wrap_text(f"Mood: {typography.get('mood', '')}", "| ", BOX_WIDTH):
|
|
317
|
+
lines.append(line.ljust(BOX_WIDTH) + "|")
|
|
318
|
+
if typography.get("best_for"):
|
|
319
|
+
for line in wrap_text(f"Best For: {typography.get('best_for', '')}", "| ", BOX_WIDTH):
|
|
320
|
+
lines.append(line.ljust(BOX_WIDTH) + "|")
|
|
321
|
+
if typography.get("google_fonts_url"):
|
|
322
|
+
lines.append(f"| Google Fonts: {typography.get('google_fonts_url', '')}".ljust(BOX_WIDTH) + "|")
|
|
323
|
+
if typography.get("css_import"):
|
|
324
|
+
lines.append(f"| CSS Import: {typography.get('css_import', '')[:70]}...".ljust(BOX_WIDTH) + "|")
|
|
325
|
+
lines.append("|" + " " * BOX_WIDTH + "|")
|
|
326
|
+
|
|
327
|
+
# Key Effects section
|
|
328
|
+
if effects:
|
|
329
|
+
lines.append("| KEY EFFECTS:".ljust(BOX_WIDTH) + "|")
|
|
330
|
+
for line in wrap_text(effects, "| ", BOX_WIDTH):
|
|
331
|
+
lines.append(line.ljust(BOX_WIDTH) + "|")
|
|
332
|
+
lines.append("|" + " " * BOX_WIDTH + "|")
|
|
333
|
+
|
|
334
|
+
# Anti-patterns section
|
|
335
|
+
if anti_patterns:
|
|
336
|
+
lines.append("| AVOID (Anti-patterns):".ljust(BOX_WIDTH) + "|")
|
|
337
|
+
for line in wrap_text(anti_patterns, "| ", BOX_WIDTH):
|
|
338
|
+
lines.append(line.ljust(BOX_WIDTH) + "|")
|
|
339
|
+
lines.append("|" + " " * BOX_WIDTH + "|")
|
|
340
|
+
|
|
341
|
+
# Pre-Delivery Checklist section
|
|
342
|
+
lines.append("| PRE-DELIVERY CHECKLIST:".ljust(BOX_WIDTH) + "|")
|
|
343
|
+
checklist_items = [
|
|
344
|
+
"[ ] No emojis as icons (use SVG: Heroicons/Lucide)",
|
|
345
|
+
"[ ] cursor-pointer on all clickable elements",
|
|
346
|
+
"[ ] Hover states with smooth transitions (150-300ms)",
|
|
347
|
+
"[ ] Light mode: text contrast 4.5:1 minimum",
|
|
348
|
+
"[ ] Focus states visible for keyboard nav",
|
|
349
|
+
"[ ] prefers-reduced-motion respected",
|
|
350
|
+
"[ ] Responsive: 375px, 768px, 1024px, 1440px"
|
|
351
|
+
]
|
|
352
|
+
for item in checklist_items:
|
|
353
|
+
lines.append(f"| {item}".ljust(BOX_WIDTH) + "|")
|
|
354
|
+
lines.append("|" + " " * BOX_WIDTH + "|")
|
|
355
|
+
|
|
356
|
+
lines.append("+" + "-" * w + "+")
|
|
357
|
+
|
|
358
|
+
return "\n".join(lines)
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
def format_markdown(design_system: dict) -> str:
|
|
362
|
+
"""Format design system as markdown."""
|
|
363
|
+
project = design_system.get("project_name", "PROJECT")
|
|
364
|
+
pattern = design_system.get("pattern", {})
|
|
365
|
+
style = design_system.get("style", {})
|
|
366
|
+
colors = design_system.get("colors", {})
|
|
367
|
+
typography = design_system.get("typography", {})
|
|
368
|
+
effects = design_system.get("key_effects", "")
|
|
369
|
+
anti_patterns = design_system.get("anti_patterns", "")
|
|
370
|
+
|
|
371
|
+
lines = []
|
|
372
|
+
lines.append(f"## Design System: {project}")
|
|
373
|
+
lines.append("")
|
|
374
|
+
|
|
375
|
+
# Pattern section
|
|
376
|
+
lines.append("### Pattern")
|
|
377
|
+
lines.append(f"- **Name:** {pattern.get('name', '')}")
|
|
378
|
+
if pattern.get('conversion'):
|
|
379
|
+
lines.append(f"- **Conversion Focus:** {pattern.get('conversion', '')}")
|
|
380
|
+
if pattern.get('cta_placement'):
|
|
381
|
+
lines.append(f"- **CTA Placement:** {pattern.get('cta_placement', '')}")
|
|
382
|
+
if pattern.get('color_strategy'):
|
|
383
|
+
lines.append(f"- **Color Strategy:** {pattern.get('color_strategy', '')}")
|
|
384
|
+
lines.append(f"- **Sections:** {pattern.get('sections', '')}")
|
|
385
|
+
lines.append("")
|
|
386
|
+
|
|
387
|
+
# Style section
|
|
388
|
+
lines.append("### Style")
|
|
389
|
+
lines.append(f"- **Name:** {style.get('name', '')}")
|
|
390
|
+
if style.get('keywords'):
|
|
391
|
+
lines.append(f"- **Keywords:** {style.get('keywords', '')}")
|
|
392
|
+
if style.get('best_for'):
|
|
393
|
+
lines.append(f"- **Best For:** {style.get('best_for', '')}")
|
|
394
|
+
if style.get('performance') or style.get('accessibility'):
|
|
395
|
+
lines.append(f"- **Performance:** {style.get('performance', '')} | **Accessibility:** {style.get('accessibility', '')}")
|
|
396
|
+
lines.append("")
|
|
397
|
+
|
|
398
|
+
# Colors section
|
|
399
|
+
lines.append("### Colors")
|
|
400
|
+
lines.append(f"| Role | Hex |")
|
|
401
|
+
lines.append(f"|------|-----|")
|
|
402
|
+
lines.append(f"| Primary | {colors.get('primary', '')} |")
|
|
403
|
+
lines.append(f"| Secondary | {colors.get('secondary', '')} |")
|
|
404
|
+
lines.append(f"| CTA | {colors.get('cta', '')} |")
|
|
405
|
+
lines.append(f"| Background | {colors.get('background', '')} |")
|
|
406
|
+
lines.append(f"| Text | {colors.get('text', '')} |")
|
|
407
|
+
if colors.get("notes"):
|
|
408
|
+
lines.append(f"\n*Notes: {colors.get('notes', '')}*")
|
|
409
|
+
lines.append("")
|
|
410
|
+
|
|
411
|
+
# Typography section
|
|
412
|
+
lines.append("### Typography")
|
|
413
|
+
lines.append(f"- **Heading:** {typography.get('heading', '')}")
|
|
414
|
+
lines.append(f"- **Body:** {typography.get('body', '')}")
|
|
415
|
+
if typography.get("mood"):
|
|
416
|
+
lines.append(f"- **Mood:** {typography.get('mood', '')}")
|
|
417
|
+
if typography.get("best_for"):
|
|
418
|
+
lines.append(f"- **Best For:** {typography.get('best_for', '')}")
|
|
419
|
+
if typography.get("google_fonts_url"):
|
|
420
|
+
lines.append(f"- **Google Fonts:** {typography.get('google_fonts_url', '')}")
|
|
421
|
+
if typography.get("css_import"):
|
|
422
|
+
lines.append(f"- **CSS Import:**")
|
|
423
|
+
lines.append(f"```css")
|
|
424
|
+
lines.append(f"{typography.get('css_import', '')}")
|
|
425
|
+
lines.append(f"```")
|
|
426
|
+
lines.append("")
|
|
427
|
+
|
|
428
|
+
# Key Effects section
|
|
429
|
+
if effects:
|
|
430
|
+
lines.append("### Key Effects")
|
|
431
|
+
lines.append(f"{effects}")
|
|
432
|
+
lines.append("")
|
|
433
|
+
|
|
434
|
+
# Anti-patterns section
|
|
435
|
+
if anti_patterns:
|
|
436
|
+
lines.append("### Avoid (Anti-patterns)")
|
|
437
|
+
lines.append(f"- {anti_patterns.replace(' + ', '\n- ')}")
|
|
438
|
+
lines.append("")
|
|
439
|
+
|
|
440
|
+
# Pre-Delivery Checklist section
|
|
441
|
+
lines.append("### Pre-Delivery Checklist")
|
|
442
|
+
lines.append("- [ ] No emojis as icons (use SVG: Heroicons/Lucide)")
|
|
443
|
+
lines.append("- [ ] cursor-pointer on all clickable elements")
|
|
444
|
+
lines.append("- [ ] Hover states with smooth transitions (150-300ms)")
|
|
445
|
+
lines.append("- [ ] Light mode: text contrast 4.5:1 minimum")
|
|
446
|
+
lines.append("- [ ] Focus states visible for keyboard nav")
|
|
447
|
+
lines.append("- [ ] prefers-reduced-motion respected")
|
|
448
|
+
lines.append("- [ ] Responsive: 375px, 768px, 1024px, 1440px")
|
|
449
|
+
lines.append("")
|
|
450
|
+
|
|
451
|
+
return "\n".join(lines)
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
# ============ MAIN ENTRY POINT ============
|
|
455
|
+
def generate_design_system(query: str, project_name: str = None, output_format: str = "ascii") -> str:
|
|
456
|
+
"""
|
|
457
|
+
Main entry point for design system generation.
|
|
458
|
+
|
|
459
|
+
Args:
|
|
460
|
+
query: Search query (e.g., "SaaS dashboard", "e-commerce luxury")
|
|
461
|
+
project_name: Optional project name for output header
|
|
462
|
+
output_format: "ascii" (default) or "markdown"
|
|
463
|
+
|
|
464
|
+
Returns:
|
|
465
|
+
Formatted design system string
|
|
466
|
+
"""
|
|
467
|
+
generator = DesignSystemGenerator()
|
|
468
|
+
design_system = generator.generate(query, project_name)
|
|
469
|
+
|
|
470
|
+
if output_format == "markdown":
|
|
471
|
+
return format_markdown(design_system)
|
|
472
|
+
return format_ascii_box(design_system)
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
# ============ CLI SUPPORT ============
|
|
476
|
+
if __name__ == "__main__":
|
|
477
|
+
import argparse
|
|
478
|
+
|
|
479
|
+
parser = argparse.ArgumentParser(description="Generate Design System")
|
|
480
|
+
parser.add_argument("query", help="Search query (e.g., 'SaaS dashboard')")
|
|
481
|
+
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name")
|
|
482
|
+
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format")
|
|
483
|
+
|
|
484
|
+
args = parser.parse_args()
|
|
485
|
+
|
|
486
|
+
result = generate_design_system(args.query, args.project_name, args.format)
|
|
487
|
+
print(result)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
UI/UX Pro Max Search - BM25 search engine for UI/UX style guides
|
|
5
|
+
Usage: python search.py "<query>" [--domain <domain>] [--stack <stack>] [--max-results 3]
|
|
6
|
+
python search.py "<query>" --design-system [-p "Project Name"]
|
|
7
|
+
|
|
8
|
+
Domains: style, prompt, color, chart, landing, product, ux, typography
|
|
9
|
+
Stacks: html-tailwind, react, nextjs
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import argparse
|
|
13
|
+
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
|
14
|
+
from design_system import generate_design_system
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def format_output(result):
|
|
18
|
+
"""Format results for Claude consumption (token-optimized)"""
|
|
19
|
+
if "error" in result:
|
|
20
|
+
return f"Error: {result['error']}"
|
|
21
|
+
|
|
22
|
+
output = []
|
|
23
|
+
if result.get("stack"):
|
|
24
|
+
output.append(f"## UI Pro Max Stack Guidelines")
|
|
25
|
+
output.append(f"**Stack:** {result['stack']} | **Query:** {result['query']}")
|
|
26
|
+
else:
|
|
27
|
+
output.append(f"## UI Pro Max Search Results")
|
|
28
|
+
output.append(f"**Domain:** {result['domain']} | **Query:** {result['query']}")
|
|
29
|
+
output.append(f"**Source:** {result['file']} | **Found:** {result['count']} results\n")
|
|
30
|
+
|
|
31
|
+
for i, row in enumerate(result['results'], 1):
|
|
32
|
+
output.append(f"### Result {i}")
|
|
33
|
+
for key, value in row.items():
|
|
34
|
+
value_str = str(value)
|
|
35
|
+
if len(value_str) > 300:
|
|
36
|
+
value_str = value_str[:300] + "..."
|
|
37
|
+
output.append(f"- **{key}:** {value_str}")
|
|
38
|
+
output.append("")
|
|
39
|
+
|
|
40
|
+
return "\n".join(output)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if __name__ == "__main__":
|
|
44
|
+
parser = argparse.ArgumentParser(description="UI Pro Max Search")
|
|
45
|
+
parser.add_argument("query", help="Search query")
|
|
46
|
+
parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain")
|
|
47
|
+
parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help="Stack-specific search (html-tailwind, react, nextjs)")
|
|
48
|
+
parser.add_argument("--max-results", "-n", type=int, default=MAX_RESULTS, help="Max results (default: 3)")
|
|
49
|
+
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
|
50
|
+
# Design system generation
|
|
51
|
+
parser.add_argument("--design-system", "-ds", action="store_true", help="Generate complete design system recommendation")
|
|
52
|
+
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name for design system output")
|
|
53
|
+
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format for design system")
|
|
54
|
+
|
|
55
|
+
args = parser.parse_args()
|
|
56
|
+
|
|
57
|
+
# Design system takes priority
|
|
58
|
+
if args.design_system:
|
|
59
|
+
result = generate_design_system(args.query, args.project_name, args.format)
|
|
60
|
+
print(result)
|
|
61
|
+
# Stack search
|
|
62
|
+
elif args.stack:
|
|
63
|
+
result = search_stack(args.query, args.stack, args.max_results)
|
|
64
|
+
if args.json:
|
|
65
|
+
import json
|
|
66
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
67
|
+
else:
|
|
68
|
+
print(format_output(result))
|
|
69
|
+
# Domain search
|
|
70
|
+
else:
|
|
71
|
+
result = search(args.query, args.domain, args.max_results)
|
|
72
|
+
if args.json:
|
|
73
|
+
import json
|
|
74
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
75
|
+
else:
|
|
76
|
+
print(format_output(result))
|