@jhm1909/ag-kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/ARCHITECTURE.md +189 -0
- package/.agent/known-registries.json +181 -0
- package/.agent/mcp_config.json +19 -0
- package/.agent/rules/clean-code.md +107 -0
- package/.agent/rules/documents.md +177 -0
- package/.agent/rules/git-workflow.md +68 -0
- package/.agent/rules/nano-banana.md +46 -0
- package/.agent/rules/research.md +35 -0
- package/.agent/rules/skill-loading.md +100 -0
- package/.agent/rules/skill-suggestion.md +47 -0
- package/.agent/rules/testing.md +52 -0
- package/.agent/rules/workflow-advisor.md +108 -0
- package/.agent/rules/workflow-skill-convention.md +127 -0
- package/.agent/skills/ai-engineer/SKILL.md +824 -0
- package/.agent/skills/ai-engineer/references/agentic-patterns.md +329 -0
- package/.agent/skills/ai-engineer/references/evaluation.md +493 -0
- package/.agent/skills/ai-engineer/references/llm.md +490 -0
- package/.agent/skills/ai-engineer/references/rag-advanced.md +444 -0
- package/.agent/skills/ai-engineer/references/serving-optimization.md +531 -0
- package/.agent/skills/ai-engineer/vector-db/README.md +137 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +41 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/.agent/skills/backend-developer/SKILL.md +763 -0
- package/.agent/skills/backend-developer/references/general-patterns.md +65 -0
- package/.agent/skills/backend-developer/references/go-echo.md +68 -0
- package/.agent/skills/backend-developer/references/go-gin.md +76 -0
- package/.agent/skills/backend-developer/references/java-springboot.md +83 -0
- package/.agent/skills/backend-developer/references/node-express.md +64 -0
- package/.agent/skills/backend-developer/references/node-nestjs.md +69 -0
- package/.agent/skills/backend-developer/references/python-django.md +67 -0
- package/.agent/skills/backend-developer/references/python-fastapi.md +80 -0
- package/.agent/skills/blockchain-engineer/SKILL.md +975 -0
- package/.agent/skills/blockchain-engineer/references/deployment.md +28 -0
- package/.agent/skills/blockchain-engineer/references/evm.md +14 -0
- package/.agent/skills/blockchain-engineer/references/mechanisms.md +32 -0
- package/.agent/skills/blockchain-engineer/references/solidity.md +32 -0
- package/.agent/skills/business-analysis/SKILL.md +85 -0
- package/.agent/skills/business-analysis/references/best-practices/diagrams.md +141 -0
- package/.agent/skills/business-analysis/references/domains/ai-agent.md +94 -0
- package/.agent/skills/business-analysis/references/domains/blockchain-dapp.md +86 -0
- package/.agent/skills/business-analysis/references/domains/ecommerce.md +77 -0
- package/.agent/skills/business-analysis/references/domains/education.md +42 -0
- package/.agent/skills/business-analysis/references/domains/fintech.md +44 -0
- package/.agent/skills/business-analysis/references/domains/fnb.md +82 -0
- package/.agent/skills/business-analysis/references/domains/healthtech.md +44 -0
- package/.agent/skills/business-analysis/references/domains/internal-tools.md +38 -0
- package/.agent/skills/business-analysis/references/domains/marketplace.md +52 -0
- package/.agent/skills/business-analysis/references/domains/saas.md +36 -0
- package/.agent/skills/business-analysis/references/workflows/collaboration.md +41 -0
- package/.agent/skills/business-analysis/scripts/verify_mermaid.py +86 -0
- package/.agent/skills/business-analysis/templates/brd.md +46 -0
- package/.agent/skills/business-analysis/templates/change-request.md +41 -0
- package/.agent/skills/business-analysis/templates/prd-functional.md +38 -0
- package/.agent/skills/business-analysis/templates/use-case.md +40 -0
- package/.agent/skills/business-analysis/templates/user-story-detailed.md +36 -0
- package/.agent/skills/code-review/SKILL.md +113 -0
- package/.agent/skills/code-review/references/code-review-reception.md +209 -0
- package/.agent/skills/code-review/references/differential_review.md +59 -0
- package/.agent/skills/code-review/references/requesting-code-review.md +105 -0
- package/.agent/skills/code-review/references/spec_compliance.md +43 -0
- package/.agent/skills/code-review/references/verification-before-completion.md +139 -0
- package/.agent/skills/context-engineering/SKILL.md +68 -0
- package/.agent/skills/context-engineering/references/context-compression.md +84 -0
- package/.agent/skills/context-engineering/references/context-degradation.md +93 -0
- package/.agent/skills/context-engineering/references/context-fundamentals.md +75 -0
- package/.agent/skills/context-engineering/references/context-optimization.md +82 -0
- package/.agent/skills/context-engineering/references/evaluation.md +89 -0
- package/.agent/skills/context-engineering/references/memory-systems.md +88 -0
- package/.agent/skills/context-engineering/references/multi-agent-patterns.md +90 -0
- package/.agent/skills/context-engineering/references/project-development.md +97 -0
- package/.agent/skills/context-engineering/references/tool-design.md +86 -0
- package/.agent/skills/debugging/SKILL.md +60 -0
- package/.agent/skills/debugging/references/defense-in-depth.md +130 -0
- package/.agent/skills/debugging/references/root-cause-tracing.md +177 -0
- package/.agent/skills/debugging/references/systematic-debugging.md +295 -0
- package/.agent/skills/debugging/references/verification-before-completion.md +142 -0
- package/.agent/skills/designer/SKILL.md +159 -0
- package/.agent/skills/designer/concepts/apple-glass.md +48 -0
- package/.agent/skills/designer/concepts/aurora-gradients.md +26 -0
- package/.agent/skills/designer/concepts/bento-grids.md +14 -0
- package/.agent/skills/designer/concepts/claymorphism.md +27 -0
- package/.agent/skills/designer/concepts/neo-brutalism.md +32 -0
- package/.agent/skills/designer/data/app-interface.csv +31 -0
- package/.agent/skills/designer/data/charts.csv +26 -0
- package/.agent/skills/designer/data/colors.csv +162 -0
- package/.agent/skills/designer/data/design.csv +1776 -0
- package/.agent/skills/designer/data/icons.csv +106 -0
- package/.agent/skills/designer/data/landing.csv +35 -0
- package/.agent/skills/designer/data/products.csv +162 -0
- package/.agent/skills/designer/data/react-performance.csv +45 -0
- package/.agent/skills/designer/data/styles.csv +85 -0
- package/.agent/skills/designer/data/typography.csv +74 -0
- package/.agent/skills/designer/data/ui-reasoning.csv +162 -0
- package/.agent/skills/designer/data/ux-guidelines.csv +100 -0
- package/.agent/skills/designer/references/accessibility.md +172 -0
- package/.agent/skills/designer/references/branding.md +88 -0
- package/.agent/skills/designer/references/color-theory.md +139 -0
- package/.agent/skills/designer/references/creation.md +118 -0
- package/.agent/skills/designer/references/design-systems.md +219 -0
- package/.agent/skills/designer/references/frontend_design_aesthetics.md +57 -0
- package/.agent/skills/designer/references/layout.md +200 -0
- package/.agent/skills/designer/references/motion.md +92 -0
- package/.agent/skills/designer/references/review.md +100 -0
- package/.agent/skills/designer/references/trends.md +209 -0
- package/.agent/skills/designer/references/typography.md +190 -0
- package/.agent/skills/designer/scripts/remove_background.py +135 -0
- package/.agent/skills/designer/scripts/ui-search/__pycache__/core.cpython-314.pyc +0 -0
- package/.agent/skills/designer/scripts/ui-search/__pycache__/design_system.cpython-314.pyc +0 -0
- package/.agent/skills/designer/scripts/ui-search/core.py +217 -0
- package/.agent/skills/designer/scripts/ui-search/design_system.py +1067 -0
- package/.agent/skills/designer/scripts/ui-search/search.py +114 -0
- package/.agent/skills/designer/templates/design-motion-spec.md +30 -0
- package/.agent/skills/devops-engineer/SKILL.md +90 -0
- package/.agent/skills/devops-engineer/docker-compose/README.md +47 -0
- package/.agent/skills/devops-engineer/references/ci-cd-pipelines.md +76 -0
- package/.agent/skills/devops-engineer/references/cloud-providers.md +57 -0
- package/.agent/skills/devops-engineer/references/codebase-normalization.md +104 -0
- package/.agent/skills/devops-engineer/references/container-orchestration.md +69 -0
- package/.agent/skills/devops-engineer/references/iac-tools.md +63 -0
- package/.agent/skills/devops-engineer/references/observability-security.md +45 -0
- package/.agent/skills/devops-engineer/references/vercel-supabase.md +17 -0
- package/.agent/skills/devops-engineer/templates/release-notes.md +8 -0
- package/.agent/skills/frontend-developer/SKILL.md +125 -0
- package/.agent/skills/frontend-developer/react-nextjs/README.md +90 -0
- package/.agent/skills/frontend-developer/references/angular.md +52 -0
- package/.agent/skills/frontend-developer/references/composition_patterns.md +60 -0
- package/.agent/skills/frontend-developer/references/core-performance.md +68 -0
- package/.agent/skills/frontend-developer/references/modern-signals.md +43 -0
- package/.agent/skills/frontend-developer/references/react_performance_rules.md +55 -0
- package/.agent/skills/frontend-developer/references/vue-nuxt.md +55 -0
- package/.agent/skills/frontend-developer/scripts/validate_compliance.py +65 -0
- package/.agent/skills/frontend-developer/threejs/README.md +89 -0
- package/.agent/skills/frontend-developer/threejs/animation.md +552 -0
- package/.agent/skills/frontend-developer/threejs/fundamentals.md +488 -0
- package/.agent/skills/frontend-developer/threejs/geometry.md +548 -0
- package/.agent/skills/frontend-developer/threejs/interaction.md +660 -0
- package/.agent/skills/frontend-developer/threejs/lighting.md +481 -0
- package/.agent/skills/frontend-developer/threejs/loaders.md +623 -0
- package/.agent/skills/frontend-developer/threejs/materials.md +520 -0
- package/.agent/skills/frontend-developer/threejs/postprocessing.md +602 -0
- package/.agent/skills/frontend-developer/threejs/router.json +181 -0
- package/.agent/skills/frontend-developer/threejs/shaders.md +642 -0
- package/.agent/skills/frontend-developer/threejs/textures.md +628 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/.agent/skills/game-development/SKILL.md +167 -0
- package/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/.agent/skills/lead-architect/SKILL.md +85 -0
- package/.agent/skills/lead-architect/references/application-architecture.md +70 -0
- package/.agent/skills/lead-architect/references/infrastructure.md +51 -0
- package/.agent/skills/lead-architect/references/process.md +42 -0
- package/.agent/skills/lead-architect/references/system-architecture.md +62 -0
- package/.agent/skills/lead-architect/references/web-fullstack.md +82 -0
- package/.agent/skills/lead-architect/templates/adr.md +62 -0
- package/.agent/skills/lead-architect/templates/rfc.md +46 -0
- package/.agent/skills/lead-architect/templates/sdd.md +62 -0
- package/.agent/skills/lead-architect/templates/technical-spec.md +61 -0
- package/.agent/skills/marketer/SKILL.md +66 -0
- package/.agent/skills/marketer/remotion-best-practices/SKILL.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/3d.md +86 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/animations.md +29 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/assets.md +78 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/audio.md +172 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/calculate-metadata.md +104 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/can-decode.md +75 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/charts.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/compositions.md +146 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/display-captions.md +126 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/extract-frames.md +229 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/fonts.md +152 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/get-video-duration.md +58 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/gifs.md +138 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/images.md +130 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/import-srt-captions.md +67 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/lottie.md +68 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/measuring-text.md +143 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/sequencing.md +106 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/tailwind.md +11 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/text-animations.md +20 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/timing.md +179 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/transcribe-captions.md +19 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/transitions.md +122 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/trimming.md +53 -0
- package/.agent/skills/marketer/remotion-best-practices/rules/videos.md +171 -0
- package/.agent/skills/mcp-builder/SKILL.md +76 -0
- package/.agent/skills/mcp-builder/references/evaluation.md +602 -0
- package/.agent/skills/mcp-builder/references/mcp_best_practices.md +249 -0
- package/.agent/skills/mcp-builder/references/node_mcp_server.md +970 -0
- package/.agent/skills/mcp-builder/references/python_mcp_server.md +719 -0
- package/.agent/skills/mobile-developer/SKILL.md +83 -0
- package/.agent/skills/mobile-developer/api-routes/SKILL.md +389 -0
- package/.agent/skills/mobile-developer/building-ui/SKILL.md +335 -0
- package/.agent/skills/mobile-developer/building-ui/references/animations.md +220 -0
- package/.agent/skills/mobile-developer/building-ui/references/controls.md +270 -0
- package/.agent/skills/mobile-developer/building-ui/references/form-sheet.md +227 -0
- package/.agent/skills/mobile-developer/building-ui/references/gradients.md +106 -0
- package/.agent/skills/mobile-developer/building-ui/references/icons.md +213 -0
- package/.agent/skills/mobile-developer/building-ui/references/media.md +198 -0
- package/.agent/skills/mobile-developer/building-ui/references/route-structure.md +229 -0
- package/.agent/skills/mobile-developer/building-ui/references/search.md +248 -0
- package/.agent/skills/mobile-developer/building-ui/references/storage.md +121 -0
- package/.agent/skills/mobile-developer/building-ui/references/tabs.md +368 -0
- package/.agent/skills/mobile-developer/building-ui/references/visual-effects.md +197 -0
- package/.agent/skills/mobile-developer/building-ui/references/webgpu-three.md +605 -0
- package/.agent/skills/mobile-developer/cicd-workflows/SKILL.md +107 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/fetch.js +109 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/package.json +11 -0
- package/.agent/skills/mobile-developer/cicd-workflows/scripts/validate.js +84 -0
- package/.agent/skills/mobile-developer/data-fetching/SKILL.md +508 -0
- package/.agent/skills/mobile-developer/deployment/SKILL.md +207 -0
- package/.agent/skills/mobile-developer/deployment/references/app-store-metadata.md +479 -0
- package/.agent/skills/mobile-developer/deployment/references/ios-app-store.md +355 -0
- package/.agent/skills/mobile-developer/deployment/references/play-store.md +246 -0
- package/.agent/skills/mobile-developer/deployment/references/testflight.md +58 -0
- package/.agent/skills/mobile-developer/deployment/references/workflows.md +200 -0
- package/.agent/skills/mobile-developer/dev-client/SKILL.md +181 -0
- package/.agent/skills/mobile-developer/tailwind-setup/SKILL.md +501 -0
- package/.agent/skills/mobile-developer/upgrading-expo/SKILL.md +116 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/new-architecture.md +79 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/react-19.md +79 -0
- package/.agent/skills/mobile-developer/upgrading-expo/references/react-compiler.md +59 -0
- package/.agent/skills/mobile-developer/use-dom/SKILL.md +434 -0
- package/.agent/skills/modern-python/SKILL.md +122 -0
- package/.agent/skills/project-manager/SKILL.md +110 -0
- package/.agent/skills/project-manager/references/ba-collaboration.md +62 -0
- package/.agent/skills/project-manager/references/discovery_process.md +52 -0
- package/.agent/skills/project-manager/references/jobs_to_be_done.md +51 -0
- package/.agent/skills/project-manager/references/prd_development.md +52 -0
- package/.agent/skills/project-manager/references/rules-guide.md +55 -0
- package/.agent/skills/project-manager/references/skill-creation.md +98 -0
- package/.agent/skills/project-manager/references/strategic-frameworks.md +62 -0
- package/.agent/skills/project-manager/references/task-decomposition.md +194 -0
- package/.agent/skills/project-manager/references/workflows-guide.md +44 -0
- package/.agent/skills/project-manager/router.json +160 -0
- package/.agent/skills/project-manager/scripts/compare_skill.py +177 -0
- package/.agent/skills/project-manager/scripts/encoding_utils.py +36 -0
- package/.agent/skills/project-manager/scripts/init_skill.py +190 -0
- package/.agent/skills/project-manager/scripts/quick_validate.py +123 -0
- package/.agent/skills/project-manager/templates/pm-strategy-one-pager.md +6 -0
- package/.agent/skills/project-manager/templates/prd-strategic.md +38 -0
- package/.agent/skills/project-manager/templates/skill-questionnaire.md +118 -0
- package/.agent/skills/project-manager/templates/user-story-simple.md +14 -0
- package/.agent/skills/prompt-engineer/SKILL.md +319 -0
- package/.agent/skills/prompt-engineer/skill-creator/README.md +47 -0
- package/.agent/skills/qa-tester/SKILL.md +142 -0
- package/.agent/skills/qa-tester/assets/README.md +8 -0
- package/.agent/skills/qa-tester/references/accessibility_testing.md +35 -0
- package/.agent/skills/qa-tester/references/agent_browser.md +38 -0
- package/.agent/skills/qa-tester/references/automation/api_testing.md +23 -0
- package/.agent/skills/qa-tester/references/automation/best_practices.md +14 -0
- package/.agent/skills/qa-tester/references/automation/jest_vitest.md +26 -0
- package/.agent/skills/qa-tester/references/automation/playwright.md +30 -0
- package/.agent/skills/qa-tester/references/e2e_testing.md +46 -0
- package/.agent/skills/qa-tester/references/integration_testing.md +39 -0
- package/.agent/skills/qa-tester/references/performance_testing.md +44 -0
- package/.agent/skills/qa-tester/references/property_based_testing.md +44 -0
- package/.agent/skills/qa-tester/references/security_audit.md +53 -0
- package/.agent/skills/qa-tester/references/security_testing.md +30 -0
- package/.agent/skills/qa-tester/references/sharp_edges.md +49 -0
- package/.agent/skills/qa-tester/references/static_analysis.md +52 -0
- package/.agent/skills/qa-tester/references/supply_chain_audit.md +54 -0
- package/.agent/skills/qa-tester/references/test_case_standards.md +96 -0
- package/.agent/skills/qa-tester/references/test_report_template.md +32 -0
- package/.agent/skills/qa-tester/references/unit_testing.md +50 -0
- package/.agent/skills/qa-tester/references/visual_testing.md +32 -0
- package/.agent/skills/qa-tester/templates/uat-plan.md +34 -0
- package/.agent/skills/research-first/SKILL.md +118 -0
- package/.agent/skills-manifest.json +264 -0
- package/.agent/workflows/absorb.md +176 -0
- package/.agent/workflows/bootstrap.md +91 -0
- package/.agent/workflows/brainstorm.md +168 -0
- package/.agent/workflows/break-tasks.md +77 -0
- package/.agent/workflows/commit.md +349 -0
- package/.agent/workflows/custom-behavior.md +64 -0
- package/.agent/workflows/debug.md +65 -0
- package/.agent/workflows/development.md +49 -0
- package/.agent/workflows/documentation.md +221 -0
- package/.agent/workflows/gen-tests.md +53 -0
- package/.agent/workflows/guide.md +196 -0
- package/.agent/workflows/implement-feature.md +182 -0
- package/.agent/workflows/install-skill.md +193 -0
- package/.agent/workflows/qa.md +54 -0
- package/.agent/workflows/ui-ux-design.md +108 -0
- package/LICENSE +21 -0
- package/README.md +258 -0
- package/cli/index.js +345 -0
- package/cli/migrate-skills.js +113 -0
- package/cli/verify.js +291 -0
- package/package.json +49 -0
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
python search.py "<query>" --design-system --persist [-p "Project Name"] [--page "dashboard"]
|
|
8
|
+
|
|
9
|
+
Domains: style, prompt, color, chart, landing, product, ux, typography, google-fonts
|
|
10
|
+
Stacks: html-tailwind, react, nextjs
|
|
11
|
+
|
|
12
|
+
Persistence (Master + Overrides pattern):
|
|
13
|
+
--persist Save design system to design-system/MASTER.md
|
|
14
|
+
--page Also create a page-specific override file in design-system/pages/
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import sys
|
|
19
|
+
import io
|
|
20
|
+
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
|
21
|
+
from design_system import generate_design_system, persist_design_system
|
|
22
|
+
|
|
23
|
+
# Force UTF-8 for stdout/stderr to handle emojis on Windows (cp1252 default)
|
|
24
|
+
if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
|
|
25
|
+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
26
|
+
if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8':
|
|
27
|
+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def format_output(result):
|
|
31
|
+
"""Format results for Claude consumption (token-optimized)"""
|
|
32
|
+
if "error" in result:
|
|
33
|
+
return f"Error: {result['error']}"
|
|
34
|
+
|
|
35
|
+
output = []
|
|
36
|
+
if result.get("stack"):
|
|
37
|
+
output.append(f"## UI Pro Max Stack Guidelines")
|
|
38
|
+
output.append(f"**Stack:** {result['stack']} | **Query:** {result['query']}")
|
|
39
|
+
else:
|
|
40
|
+
output.append(f"## UI Pro Max Search Results")
|
|
41
|
+
output.append(f"**Domain:** {result['domain']} | **Query:** {result['query']}")
|
|
42
|
+
output.append(f"**Source:** {result['file']} | **Found:** {result['count']} results\n")
|
|
43
|
+
|
|
44
|
+
for i, row in enumerate(result['results'], 1):
|
|
45
|
+
output.append(f"### Result {i}")
|
|
46
|
+
for key, value in row.items():
|
|
47
|
+
value_str = str(value)
|
|
48
|
+
if len(value_str) > 300:
|
|
49
|
+
value_str = value_str[:300] + "..."
|
|
50
|
+
output.append(f"- **{key}:** {value_str}")
|
|
51
|
+
output.append("")
|
|
52
|
+
|
|
53
|
+
return "\n".join(output)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
parser = argparse.ArgumentParser(description="UI Pro Max Search")
|
|
58
|
+
parser.add_argument("query", help="Search query")
|
|
59
|
+
parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain")
|
|
60
|
+
parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help="Stack-specific search (html-tailwind, react, nextjs)")
|
|
61
|
+
parser.add_argument("--max-results", "-n", type=int, default=MAX_RESULTS, help="Max results (default: 3)")
|
|
62
|
+
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
|
63
|
+
# Design system generation
|
|
64
|
+
parser.add_argument("--design-system", "-ds", action="store_true", help="Generate complete design system recommendation")
|
|
65
|
+
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name for design system output")
|
|
66
|
+
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format for design system")
|
|
67
|
+
# Persistence (Master + Overrides pattern)
|
|
68
|
+
parser.add_argument("--persist", action="store_true", help="Save design system to design-system/MASTER.md (creates hierarchical structure)")
|
|
69
|
+
parser.add_argument("--page", type=str, default=None, help="Create page-specific override file in design-system/pages/")
|
|
70
|
+
parser.add_argument("--output-dir", "-o", type=str, default=None, help="Output directory for persisted files (default: current directory)")
|
|
71
|
+
|
|
72
|
+
args = parser.parse_args()
|
|
73
|
+
|
|
74
|
+
# Design system takes priority
|
|
75
|
+
if args.design_system:
|
|
76
|
+
result = generate_design_system(
|
|
77
|
+
args.query,
|
|
78
|
+
args.project_name,
|
|
79
|
+
args.format,
|
|
80
|
+
persist=args.persist,
|
|
81
|
+
page=args.page,
|
|
82
|
+
output_dir=args.output_dir
|
|
83
|
+
)
|
|
84
|
+
print(result)
|
|
85
|
+
|
|
86
|
+
# Print persistence confirmation
|
|
87
|
+
if args.persist:
|
|
88
|
+
project_slug = args.project_name.lower().replace(' ', '-') if args.project_name else "default"
|
|
89
|
+
print("\n" + "=" * 60)
|
|
90
|
+
print(f"✅ Design system persisted to design-system/{project_slug}/")
|
|
91
|
+
print(f" 📄 design-system/{project_slug}/MASTER.md (Global Source of Truth)")
|
|
92
|
+
if args.page:
|
|
93
|
+
page_filename = args.page.lower().replace(' ', '-')
|
|
94
|
+
print(f" 📄 design-system/{project_slug}/pages/{page_filename}.md (Page Overrides)")
|
|
95
|
+
print("")
|
|
96
|
+
print(f"📖 Usage: When building a page, check design-system/{project_slug}/pages/[page].md first.")
|
|
97
|
+
print(f" If exists, its rules override MASTER.md. Otherwise, use MASTER.md.")
|
|
98
|
+
print("=" * 60)
|
|
99
|
+
# Stack search
|
|
100
|
+
elif args.stack:
|
|
101
|
+
result = search_stack(args.query, args.stack, args.max_results)
|
|
102
|
+
if args.json:
|
|
103
|
+
import json
|
|
104
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
105
|
+
else:
|
|
106
|
+
print(format_output(result))
|
|
107
|
+
# Domain search
|
|
108
|
+
else:
|
|
109
|
+
result = search(args.query, args.domain, args.max_results)
|
|
110
|
+
if args.json:
|
|
111
|
+
import json
|
|
112
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
113
|
+
else:
|
|
114
|
+
print(format_output(result))
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: MOTION-SPEC-{ID}
|
|
3
|
+
type: specification
|
|
4
|
+
status: draft
|
|
5
|
+
owner: @designer
|
|
6
|
+
linked-to: [[User-Story-ID]]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Motion Specification: {Title}
|
|
10
|
+
|
|
11
|
+
**Purpose**: {Why are we animating this? Orientation / Feedback / Focus / Delight}
|
|
12
|
+
**Trigger**: {Load / Hover / Click / Scroll / State Change}
|
|
13
|
+
**Element**: {Component or Element Name, e.g., Primary Button, Hero Image}
|
|
14
|
+
|
|
15
|
+
## Animation Timeline
|
|
16
|
+
|
|
17
|
+
| Time | Element | Property | Start Value | End Value | Duration | Easing | Delay |
|
|
18
|
+
| :--- | :-------- | :------- | :---------- | :-------- | :------- | :------- | :---- |
|
|
19
|
+
| 0ms | Container | Scale | 0.9 | 1.0 | 300ms | ease-out | 0ms |
|
|
20
|
+
| 50ms | Icon | Opacity | 0 | 1 | 200ms | linear | 50ms |
|
|
21
|
+
| ... | ... | ... | ... | ... | ... | ... | ... |
|
|
22
|
+
|
|
23
|
+
## Behavior Description
|
|
24
|
+
|
|
25
|
+
{Describe the behavior in plain English. Example: "The container should spring open, and then the icon fades in slightly later to lead the eye."}
|
|
26
|
+
|
|
27
|
+
## Development Reference
|
|
28
|
+
|
|
29
|
+
- **Standard Curve**: `cubic-bezier(0, 0, 0.2, 1)` (Decelerate)
|
|
30
|
+
- **Reduced Motion**: {Fade in only / None}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devops-engineer
|
|
3
|
+
description: >
|
|
4
|
+
CI/CD, multi-cloud infrastructure, and observability. Use for AWS/GCP/Azure, Docker, Kubernetes, and SRE practices.
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Claude Code, Cursor, Gemini CLI, GitHub Copilot
|
|
7
|
+
metadata:
|
|
8
|
+
author: jhm1909
|
|
9
|
+
version: "2.0.0"
|
|
10
|
+
domain: infra
|
|
11
|
+
estimated_tokens: 6000
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# DevOps Engineer
|
|
15
|
+
|
|
16
|
+
Infrastructure automation, deployment pipelines, and observability systems.
|
|
17
|
+
|
|
18
|
+
## Knowledge Graph
|
|
19
|
+
|
|
20
|
+
- **extends**: []
|
|
21
|
+
- **requires**: []
|
|
22
|
+
- **suggests**: []
|
|
23
|
+
- **conflicts**: []
|
|
24
|
+
- **enhances**: [[backend-developer]], [[mobile-developer]] (EAS CI/CD)
|
|
25
|
+
- **moc**: [[infrastructure-moc]]
|
|
26
|
+
|
|
27
|
+
## Capability Add-ons
|
|
28
|
+
|
|
29
|
+
| Sub-capability | Location | Use For |
|
|
30
|
+
|:---------------|:---------|:--------|
|
|
31
|
+
| Docker Compose | `docker-compose/` | Local development environments |
|
|
32
|
+
| Kubernetes | Load `kubernetes/` reference | Container orchestration |
|
|
33
|
+
| Observability | Load `observability/` reference | Monitoring & logging |
|
|
34
|
+
|
|
35
|
+
## Using Sub-capabilities
|
|
36
|
+
|
|
37
|
+
When a task requires Docker Compose expertise:
|
|
38
|
+
|
|
39
|
+
1. Load `docker-compose/README.md` from this skill directory
|
|
40
|
+
2. Apply patterns for multi-container local development
|
|
41
|
+
3. Reference docker-compose.yml examples provided
|
|
42
|
+
|
|
43
|
+
Example workflow:
|
|
44
|
+
```
|
|
45
|
+
User: "Set up local dev environment with Postgres and Redis"
|
|
46
|
+
→ Load devops-engineer/docker-compose/README.md
|
|
47
|
+
→ Define services, volumes, networks
|
|
48
|
+
→ Provide docker-compose.yml configuration
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Core Philosophy
|
|
52
|
+
|
|
53
|
+
1. **Automate Everything** — If done twice, script it
|
|
54
|
+
2. **Infrastructure as Code** — No click-ops (Terraform, Pulumi)
|
|
55
|
+
3. **Security First** — Secrets via Vault/KMS, not env vars
|
|
56
|
+
4. **Observability** — Logs, Metrics, Traces are mandatory
|
|
57
|
+
|
|
58
|
+
## Stack Selection
|
|
59
|
+
|
|
60
|
+
| Component | Options | Best For |
|
|
61
|
+
|:----------|:--------|:---------|
|
|
62
|
+
| **Cloud** | AWS / GCP / Azure | AWS=Enterprise, GCP=Data/AI, Azure=Windows |
|
|
63
|
+
| **IaC** | Terraform / Pulumi / CDK | TF=Standard, Pulumi=Dev-friendly |
|
|
64
|
+
| **CI/CD** | GitHub Actions / GitLab CI / Jenkins | GHA=Open Source, GitLab=DevSecOps |
|
|
65
|
+
| **Containers** | Docker / Kubernetes | Docker=Simple, K8s=Orchestration |
|
|
66
|
+
| **Observability** | Datadog / Grafana / CloudWatch | Full stack monitoring |
|
|
67
|
+
|
|
68
|
+
## Security Standards
|
|
69
|
+
|
|
70
|
+
- **Least Privilege** — IAM strictly scoped
|
|
71
|
+
- **Encryption** — At rest (KMS) and in transit (TLS 1.2+)
|
|
72
|
+
- **Scanning** — SAST, DAST, Container scanning (Trivy)
|
|
73
|
+
|
|
74
|
+
## References
|
|
75
|
+
|
|
76
|
+
- `cloud-providers.md` — AWS/GCP/Azure specifics
|
|
77
|
+
- `iac-tools.md` — Terraform/Pulumi patterns
|
|
78
|
+
- `ci-cd-pipelines.md` — Pipeline design
|
|
79
|
+
- `container-orchestration.md` — Docker/Kubernetes
|
|
80
|
+
- `observability-security.md` — Monitoring, logging
|
|
81
|
+
|
|
82
|
+
## Related Skills
|
|
83
|
+
|
|
84
|
+
- [[backend-developer]] — Application deployment
|
|
85
|
+
- [[mobile-developer]] — EAS CI/CD for mobile
|
|
86
|
+
- [[lead-architect]] — High-level infrastructure decisions
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
*Part of [[infrastructure-moc]] | Foundation for all deployments*
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docker-compose
|
|
3
|
+
type: capability
|
|
4
|
+
domain: infra
|
|
5
|
+
status: draft
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
estimated_tokens: 5000
|
|
8
|
+
description: Docker Compose for local development and multi-container apps.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Docker Compose
|
|
12
|
+
|
|
13
|
+
Container orchestration for local development.
|
|
14
|
+
|
|
15
|
+
## Knowledge Graph
|
|
16
|
+
|
|
17
|
+
- **extends**: []
|
|
18
|
+
- **requires**: [[devops-engineer]]
|
|
19
|
+
- **suggests**: []
|
|
20
|
+
- **conflicts": []
|
|
21
|
+
- **enhances": [[devops-engineer]], [[backend-developer]]
|
|
22
|
+
- **moc**: [[infrastructure-moc]]
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
This skill covers:
|
|
27
|
+
- docker-compose.yml structure
|
|
28
|
+
- Multi-service applications
|
|
29
|
+
- Environment configuration
|
|
30
|
+
- Volume management
|
|
31
|
+
- Local development workflows
|
|
32
|
+
|
|
33
|
+
## Use Cases
|
|
34
|
+
|
|
35
|
+
- Local development environment
|
|
36
|
+
- Integration testing
|
|
37
|
+
- CI/CD pipelines
|
|
38
|
+
- Quick prototyping
|
|
39
|
+
|
|
40
|
+
## Related
|
|
41
|
+
|
|
42
|
+
- [[devops-engineer]] — Container fundamentals
|
|
43
|
+
- [[kubernetes]] — Production orchestration
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
*Part of [[infrastructure-moc]]*
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# CI/CD Pipelines
|
|
2
|
+
|
|
3
|
+
## GitHub Actions
|
|
4
|
+
|
|
5
|
+
### Workflow Structure (`.github/workflows/main.yml`)
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
name: Production Build
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
branches: ["main"]
|
|
12
|
+
pull_request:
|
|
13
|
+
branches: ["main"]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- name: Setup Node
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: "20"
|
|
24
|
+
cache: "npm"
|
|
25
|
+
- run: npm ci
|
|
26
|
+
- run: npm test
|
|
27
|
+
|
|
28
|
+
deploy:
|
|
29
|
+
needs: test
|
|
30
|
+
if: github.ref == 'refs/heads/main'
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
- name: Deploy
|
|
35
|
+
env:
|
|
36
|
+
API_KEY: ${{ secrets.PROD_API_KEY }}
|
|
37
|
+
run: ./deploy.sh
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Best Practices
|
|
41
|
+
|
|
42
|
+
- **Secrets**: NEVER hardcode. Use `${{ secrets.NAME }}`.
|
|
43
|
+
- **Caching**: Use `setup-node` (or equivalent) built-in caching or `actions/cache`.
|
|
44
|
+
- **Reusable Workflows**: Use `workflow_call` for shared logic.
|
|
45
|
+
|
|
46
|
+
## GitLab CI
|
|
47
|
+
|
|
48
|
+
### Workflow Structure (`.gitlab-ci.yml`)
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
stages:
|
|
52
|
+
- test
|
|
53
|
+
- build
|
|
54
|
+
- deploy
|
|
55
|
+
|
|
56
|
+
test_job:
|
|
57
|
+
stage: test
|
|
58
|
+
image: node:20
|
|
59
|
+
script:
|
|
60
|
+
- npm ci
|
|
61
|
+
- npm test
|
|
62
|
+
|
|
63
|
+
deploy_prod:
|
|
64
|
+
stage: deploy
|
|
65
|
+
script:
|
|
66
|
+
- ./deploy.sh
|
|
67
|
+
only:
|
|
68
|
+
- main
|
|
69
|
+
environment: production
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Best Practices
|
|
73
|
+
|
|
74
|
+
- **Templates**: Use `include:` to share config across projects.
|
|
75
|
+
- **Runners**: Tag jobs to run on specific runners (`tags: [docker]`).
|
|
76
|
+
- **Artifacts**: Use `artifacts` to pass binaries/files between stages.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Cloud Providers Reference
|
|
2
|
+
|
|
3
|
+
## Service Mapping Cheat Sheet
|
|
4
|
+
|
|
5
|
+
| Service Category | Amazon Web Services (AWS) | Google Cloud Platform (GCP) | Microsoft Azure |
|
|
6
|
+
| :------------------------ | :------------------------ | :-------------------------- | :---------------------------------- |
|
|
7
|
+
| **Compute - VM** | EC2 | Compute Engine | Virtual Machines |
|
|
8
|
+
| **Compute - Serverless** | Lambda | Cloud Functions | Azure Functions |
|
|
9
|
+
| **Compute - Managed K8s** | EKS | GKE | AKS |
|
|
10
|
+
| **Compute - Containers** | ECS / Fargate | Cloud Run | Container Instances / Apps |
|
|
11
|
+
| **Storage - Object** | S3 | Cloud Storage (GCS) | Blob Storage |
|
|
12
|
+
| **Storage - Block** | EBS | Persistent Disk | Disk Storage |
|
|
13
|
+
| **Storage - File** | EFS | Filestore | Azure Files |
|
|
14
|
+
| **Database - RDBMS** | RDS / Aurora | Cloud SQL / Spanner | Azure SQL / Database for PostgreSQL |
|
|
15
|
+
| **Database - NoSQL** | DynamoDB | Firestore / BigTable | Cosmos DB |
|
|
16
|
+
| **Caching** | ElastiCache | Memorystore | Azure Cache for Redis |
|
|
17
|
+
| **Networking - CDN** | CloudFront | Cloud CDN | Azure Front Door / CDN |
|
|
18
|
+
| **Networking - DNS** | Route 53 | Cloud DNS | Azure DNS |
|
|
19
|
+
| **IaC** | CloudFormation / CDK | Deployment Manager | ARM Templates / Bicep |
|
|
20
|
+
|
|
21
|
+
## AWS (Amazon Web Services)
|
|
22
|
+
|
|
23
|
+
### Quick Start
|
|
24
|
+
|
|
25
|
+
- **CLI**: `aws`
|
|
26
|
+
- **Auth**: `aws configure` (requires `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)
|
|
27
|
+
|
|
28
|
+
### Best Practices
|
|
29
|
+
|
|
30
|
+
- **Roles**: Use IAM Roles for EC2/Lambda, never baked-in credentials.
|
|
31
|
+
- **Regions**: Always specify regions in code (e.g., `us-east-1`).
|
|
32
|
+
- **Cost**: Use Budgets and Cost Explorer alarms.
|
|
33
|
+
|
|
34
|
+
## GCP (Google Cloud Platform)
|
|
35
|
+
|
|
36
|
+
### Quick Start
|
|
37
|
+
|
|
38
|
+
- **CLI**: `gcloud`
|
|
39
|
+
- **Auth**: `gcloud auth login` or service account JSON (`GOOGLE_APPLICATION_CREDENTIALS`).
|
|
40
|
+
|
|
41
|
+
### Best Practices
|
|
42
|
+
|
|
43
|
+
- **Projects**: Use hierarchal project structure (Folder -> Project).
|
|
44
|
+
- **APIs**: Explicitly enable required APIs in Terraform (`google_project_service`).
|
|
45
|
+
- **Network**: Use VPC-native clusters for GKE.
|
|
46
|
+
|
|
47
|
+
## Azure
|
|
48
|
+
|
|
49
|
+
### Quick Start
|
|
50
|
+
|
|
51
|
+
- **CLI**: `az`
|
|
52
|
+
- **Auth**: `az login` or Service Principal (`ARM_CLIENT_ID`, `ARM_CLIENT_SECRET`).
|
|
53
|
+
|
|
54
|
+
### Best Practices
|
|
55
|
+
|
|
56
|
+
- **Resource Groups**: Logical container for lifecycle management.
|
|
57
|
+
- **Policies**: Use Azure Policy for governance (e.g., allow regions).
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Codebase Normalization & Quality Gates
|
|
2
|
+
|
|
3
|
+
This guide outlines standards and instructions for implementing codebase normalization tools to ensure code quality, consistency, and stability.
|
|
4
|
+
|
|
5
|
+
## 🧰 Toolchain Selection
|
|
6
|
+
|
|
7
|
+
| Feature | Husky + Lint-staged | Lefthook | Biome | ESLint + Prettier |
|
|
8
|
+
| :----------------- | :----------------------------- | :----------------------------------- | :------------------------------ | :----------------------------- |
|
|
9
|
+
| **Role** | Git Hooks Manager | Git Hooks Manager | Formatter + Linter | Linter + Formatter |
|
|
10
|
+
| **Speed** | Standard | Fast (Go-based) | Extremely Fast (Rust) | Standard |
|
|
11
|
+
| **Usage** | Industry Standard for Node.js | Growing popularity, multi-language | Modern, zero-config replacement | Mature, vast ecosystem |
|
|
12
|
+
| **Recommendation** | **Default** for JS/TS projects | Projects with heavy pre-commit tasks | Greenfields needing speed | Legacy or complex custom rules |
|
|
13
|
+
|
|
14
|
+
## 🚀 Implementation Guides
|
|
15
|
+
|
|
16
|
+
### 1. Husky & Lint-staged (Standard)
|
|
17
|
+
|
|
18
|
+
Use this setup to enforce checks before every commit.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# 1. Install dependencies
|
|
22
|
+
npm install --save-dev husky lint-staged
|
|
23
|
+
|
|
24
|
+
# 2. Initialize Husky
|
|
25
|
+
npx husky init
|
|
26
|
+
|
|
27
|
+
# 3. Configure lint-staged in package.json
|
|
28
|
+
# Add this to your package.json
|
|
29
|
+
"lint-staged": {
|
|
30
|
+
"*.{js,ts,jsx,tsx}": [
|
|
31
|
+
"eslint --fix",
|
|
32
|
+
"prettier --write"
|
|
33
|
+
],
|
|
34
|
+
"*.{json,md}": [
|
|
35
|
+
"prettier --write"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# 4. Create pre-commit hook
|
|
40
|
+
# In .husky/pre-commit
|
|
41
|
+
echo "npx lint-staged" > .husky/pre-commit
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Commitlint (Conventional Commits)
|
|
45
|
+
|
|
46
|
+
Enforce meaningful commit messages.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# 1. Install dependencies
|
|
50
|
+
npm install --save-dev @commitlint/{cli,config-conventional}
|
|
51
|
+
|
|
52
|
+
# 2. Configure Commitlint
|
|
53
|
+
echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
|
|
54
|
+
|
|
55
|
+
# 3. Add commit-msg hook
|
|
56
|
+
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. Biome (All-in-one Alternative)
|
|
60
|
+
|
|
61
|
+
Replace ESLint & Prettier for performance.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# 1. Install Biome
|
|
65
|
+
npm install --save-dev --save-exact @biomejs/biome
|
|
66
|
+
|
|
67
|
+
# 2. Initialize
|
|
68
|
+
npx @biomejs/biome init
|
|
69
|
+
|
|
70
|
+
# 3. Use in lint-staged
|
|
71
|
+
"lint-staged": {
|
|
72
|
+
"*.{js,ts,jsx,tsx,json}": [
|
|
73
|
+
"npx @biomejs/biome check --apply"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 🏗️ Workflow Integration
|
|
79
|
+
|
|
80
|
+
### Pre-commit Strategy
|
|
81
|
+
|
|
82
|
+
- **Goal**: Prevent bad code from entering the repo.
|
|
83
|
+
- **Scope**: Run ONLY on staged files (don't lint the whole repo).
|
|
84
|
+
- **Checks**:
|
|
85
|
+
- Linting (ESLint/Biome)
|
|
86
|
+
- Formatting (Prettier/Biome)
|
|
87
|
+
- Type Checking (tsc --noEmit) -> _Note: tsc often needs the whole project, consider running in CI instead or using `tsc-files` for partial checks._
|
|
88
|
+
- Unit Tests (related files only)
|
|
89
|
+
|
|
90
|
+
### CI Strategy
|
|
91
|
+
|
|
92
|
+
- **Goal**: Verify state of the branch.
|
|
93
|
+
- **Scope**: Run on all files.
|
|
94
|
+
- **Checks**:
|
|
95
|
+
- Full Lint
|
|
96
|
+
- Full Type Check
|
|
97
|
+
- Full Audit (`npm audit`)
|
|
98
|
+
- Integration/E2E tests
|
|
99
|
+
|
|
100
|
+
## 🛡️ Best Practices
|
|
101
|
+
|
|
102
|
+
1. **Keep Hooks Fast**: Developers hate waiting. If pre-commit takes >5s, move heavy tasks to CI.
|
|
103
|
+
2. **Escape Hatches**: Allow `--no-verify` for emergencies, but log it.
|
|
104
|
+
3. **Consistency**: Ensure local checks match CI checks exactly.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Container Orchestration
|
|
2
|
+
|
|
3
|
+
## Docker
|
|
4
|
+
|
|
5
|
+
### Dockerfile Best Practices
|
|
6
|
+
|
|
7
|
+
1. **Multi-Stage Builds**: Keep final images small.
|
|
8
|
+
|
|
9
|
+
```dockerfile
|
|
10
|
+
# Build Stage
|
|
11
|
+
FROM node:20-alpine AS builder
|
|
12
|
+
WORKDIR /app
|
|
13
|
+
COPY . .
|
|
14
|
+
RUN npm ci && npm run build
|
|
15
|
+
|
|
16
|
+
# Run Stage
|
|
17
|
+
FROM node:20-alpine
|
|
18
|
+
WORKDIR /app
|
|
19
|
+
COPY --from=builder /app/dist ./dist
|
|
20
|
+
COPY --from=builder /app/node_modules ./node_modules
|
|
21
|
+
CMD ["node", "dist/index.js"]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
2. **.dockerignore**: Always include one to avoid context bloat.
|
|
25
|
+
3. **User**: Run as non-root user (`USER node`).
|
|
26
|
+
|
|
27
|
+
## Kubernetes (K8s)
|
|
28
|
+
|
|
29
|
+
### Core Resources
|
|
30
|
+
|
|
31
|
+
- **Pod**: Smallest deployable unit (containers).
|
|
32
|
+
- **Deployment**: Manages Pod replicas and rollouts.
|
|
33
|
+
- **Service**: Exposes network access (ClusterIP, LoadBalancer).
|
|
34
|
+
- **Ingress**: HTTP/HTTPS routing.
|
|
35
|
+
- **ConfigMap/Secret**: Configuration separation.
|
|
36
|
+
|
|
37
|
+
### Manifest Example (`deployment.yaml`)
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
apiVersion: apps/v1
|
|
41
|
+
kind: Deployment
|
|
42
|
+
metadata:
|
|
43
|
+
name: my-app
|
|
44
|
+
spec:
|
|
45
|
+
replicas: 3
|
|
46
|
+
selector:
|
|
47
|
+
matchLabels:
|
|
48
|
+
app: my-app
|
|
49
|
+
template:
|
|
50
|
+
metadata:
|
|
51
|
+
labels:
|
|
52
|
+
app: my-app
|
|
53
|
+
spec:
|
|
54
|
+
containers:
|
|
55
|
+
- name: my-app
|
|
56
|
+
image: my-registry/my-app:v1
|
|
57
|
+
ports:
|
|
58
|
+
- containerPort: 8080
|
|
59
|
+
resources:
|
|
60
|
+
limits:
|
|
61
|
+
memory: "128Mi"
|
|
62
|
+
cpu: "500m"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Best Practices
|
|
66
|
+
|
|
67
|
+
- **Liveness/Readiness Probes**: Mandatory for self-healing and zero-downtime.
|
|
68
|
+
- **Resources**: ALWAYS set requests and limits.
|
|
69
|
+
- **Namespaces**: Use namespaces to isolate environments.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Infrastructure as Code (IaC) Tools
|
|
2
|
+
|
|
3
|
+
## Terraform (The Standard)
|
|
4
|
+
|
|
5
|
+
### Structure
|
|
6
|
+
|
|
7
|
+
- `main.tf`: Resources
|
|
8
|
+
- `variables.tf`: Input schemas
|
|
9
|
+
- `outputs.tf`: Return values
|
|
10
|
+
- `provider.tf`: Provider config
|
|
11
|
+
|
|
12
|
+
### Essential Commands
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
terraform init # Initialize backend
|
|
16
|
+
terraform plan -out=tfplan # Preview changes
|
|
17
|
+
terraform apply tfplan # Execute changes
|
|
18
|
+
terraform fmt -recursive # Format code
|
|
19
|
+
terraform validate # Check syntax
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Best Practices
|
|
23
|
+
|
|
24
|
+
- **Remote Backend**: Store state in S3/GCS with locking (DynamoDB).
|
|
25
|
+
- **Modules**: Use standard directory structure for reusability.
|
|
26
|
+
- **Versions**: Pin provider versions in `required_providers`.
|
|
27
|
+
|
|
28
|
+
## Pulumi (The Modern)
|
|
29
|
+
|
|
30
|
+
### Philosophy
|
|
31
|
+
|
|
32
|
+
Write infrastructure in real programming languages (TS, Python, Go).
|
|
33
|
+
|
|
34
|
+
### Essential Commands
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pulumi new aws-typescript # Start project
|
|
38
|
+
pulumi up # Plan & Apply
|
|
39
|
+
pulumi stack ls # List stacks (dev/prod)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Best Practices
|
|
43
|
+
|
|
44
|
+
- **ComponentResources**: Group multiple resources into logical components (e.g., `VpcComponent`).
|
|
45
|
+
- **Secrets**: Use `pulumi config set --secret` to encrypt values.
|
|
46
|
+
|
|
47
|
+
## Ansible (The Configurator)
|
|
48
|
+
|
|
49
|
+
### Philosophy
|
|
50
|
+
|
|
51
|
+
Agentless configuration management using YAML playbooks and SSH.
|
|
52
|
+
|
|
53
|
+
### Essential Commands
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ansible-playbook -i inventory site.yml
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Best Practices
|
|
60
|
+
|
|
61
|
+
- **Idempotency**: Ensure tasks can run multiple times without side effects.
|
|
62
|
+
- **Roles**: Organize tasks into reusable Roles (Galaxy).
|
|
63
|
+
- **Vault**: Encrypt sensitive variables with `ansible-vault`.
|