javi-forge 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/.gitignore.template +105 -0
- package/.releaserc +44 -0
- package/README.md +45 -0
- package/ai-config/.skillignore +15 -0
- package/ai-config/AUTO_INVOKE.md +300 -0
- package/ai-config/agents/_TEMPLATE.md +93 -0
- package/ai-config/agents/business/api-designer.md +1657 -0
- package/ai-config/agents/business/business-analyst.md +1331 -0
- package/ai-config/agents/business/product-strategist.md +206 -0
- package/ai-config/agents/business/project-manager.md +178 -0
- package/ai-config/agents/business/requirements-analyst.md +1277 -0
- package/ai-config/agents/business/technical-writer.md +1679 -0
- package/ai-config/agents/creative/ux-designer.md +205 -0
- package/ai-config/agents/data-ai/ai-engineer.md +487 -0
- package/ai-config/agents/data-ai/analytics-engineer.md +953 -0
- package/ai-config/agents/data-ai/data-engineer.md +173 -0
- package/ai-config/agents/data-ai/data-scientist.md +672 -0
- package/ai-config/agents/data-ai/mlops-engineer.md +814 -0
- package/ai-config/agents/data-ai/prompt-engineer.md +772 -0
- package/ai-config/agents/development/angular-expert.md +620 -0
- package/ai-config/agents/development/backend-architect.md +795 -0
- package/ai-config/agents/development/database-specialist.md +212 -0
- package/ai-config/agents/development/frontend-specialist.md +686 -0
- package/ai-config/agents/development/fullstack-engineer.md +668 -0
- package/ai-config/agents/development/golang-pro.md +338 -0
- package/ai-config/agents/development/java-enterprise.md +400 -0
- package/ai-config/agents/development/javascript-pro.md +422 -0
- package/ai-config/agents/development/nextjs-pro.md +474 -0
- package/ai-config/agents/development/python-pro.md +570 -0
- package/ai-config/agents/development/react-pro.md +487 -0
- package/ai-config/agents/development/rust-pro.md +246 -0
- package/ai-config/agents/development/spring-boot-4-expert.md +326 -0
- package/ai-config/agents/development/typescript-pro.md +336 -0
- package/ai-config/agents/development/vue-specialist.md +605 -0
- package/ai-config/agents/infrastructure/cloud-architect.md +472 -0
- package/ai-config/agents/infrastructure/deployment-manager.md +358 -0
- package/ai-config/agents/infrastructure/devops-engineer.md +455 -0
- package/ai-config/agents/infrastructure/incident-responder.md +519 -0
- package/ai-config/agents/infrastructure/kubernetes-expert.md +705 -0
- package/ai-config/agents/infrastructure/monitoring-specialist.md +674 -0
- package/ai-config/agents/infrastructure/performance-engineer.md +658 -0
- package/ai-config/agents/orchestrator.md +241 -0
- package/ai-config/agents/quality/accessibility-auditor.md +1204 -0
- package/ai-config/agents/quality/code-reviewer-compact.md +123 -0
- package/ai-config/agents/quality/code-reviewer.md +363 -0
- package/ai-config/agents/quality/dependency-manager.md +743 -0
- package/ai-config/agents/quality/e2e-test-specialist.md +1005 -0
- package/ai-config/agents/quality/performance-tester.md +1086 -0
- package/ai-config/agents/quality/security-auditor.md +133 -0
- package/ai-config/agents/quality/test-engineer.md +453 -0
- package/ai-config/agents/specialists/api-designer.md +87 -0
- package/ai-config/agents/specialists/backend-architect.md +73 -0
- package/ai-config/agents/specialists/code-reviewer.md +77 -0
- package/ai-config/agents/specialists/db-optimizer.md +75 -0
- package/ai-config/agents/specialists/devops-engineer.md +83 -0
- package/ai-config/agents/specialists/documentation-writer.md +78 -0
- package/ai-config/agents/specialists/frontend-developer.md +75 -0
- package/ai-config/agents/specialists/performance-analyst.md +82 -0
- package/ai-config/agents/specialists/refactor-specialist.md +74 -0
- package/ai-config/agents/specialists/security-auditor.md +74 -0
- package/ai-config/agents/specialists/test-engineer.md +81 -0
- package/ai-config/agents/specialists/ux-consultant.md +76 -0
- package/ai-config/agents/specialized/agent-generator.md +1190 -0
- package/ai-config/agents/specialized/blockchain-developer.md +149 -0
- package/ai-config/agents/specialized/code-migrator.md +892 -0
- package/ai-config/agents/specialized/context-manager.md +978 -0
- package/ai-config/agents/specialized/documentation-writer.md +1078 -0
- package/ai-config/agents/specialized/ecommerce-expert.md +1756 -0
- package/ai-config/agents/specialized/embedded-engineer.md +1714 -0
- package/ai-config/agents/specialized/error-detective.md +1034 -0
- package/ai-config/agents/specialized/fintech-specialist.md +1659 -0
- package/ai-config/agents/specialized/freelance-project-planner-v2.md +1988 -0
- package/ai-config/agents/specialized/freelance-project-planner-v3.md +2136 -0
- package/ai-config/agents/specialized/freelance-project-planner-v4.md +4503 -0
- package/ai-config/agents/specialized/freelance-project-planner.md +722 -0
- package/ai-config/agents/specialized/game-developer.md +1963 -0
- package/ai-config/agents/specialized/healthcare-dev.md +1620 -0
- package/ai-config/agents/specialized/mobile-developer.md +188 -0
- package/ai-config/agents/specialized/parallel-plan-executor.md +506 -0
- package/ai-config/agents/specialized/plan-executor.md +485 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/00-INDEX.md +485 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/01-CORE.md +3493 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/02-SELF-CORRECTION.md +778 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/03-PROGRESSIVE-SETUP.md +918 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/04-DEPLOYMENT.md +1537 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/05-TESTING.md +2633 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/06-OPERATIONS.md +5610 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/INSTALL.md +335 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/QUICK-REFERENCE.txt +215 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/README.md +260 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/START-HERE.md +379 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/WORKFLOW-DIAGRAM.md +355 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/solo-dev-planner.md +279 -0
- package/ai-config/agents/specialized/template-writer.md +347 -0
- package/ai-config/agents/specialized/test-runner.md +99 -0
- package/ai-config/agents/specialized/vibekanban-smart-worker.md +244 -0
- package/ai-config/agents/specialized/wave-executor.md +138 -0
- package/ai-config/agents/specialized/workflow-optimizer.md +1114 -0
- package/ai-config/commands/git/changelog.md +32 -0
- package/ai-config/commands/git/ci-local.md +70 -0
- package/ai-config/commands/git/commit.md +35 -0
- package/ai-config/commands/git/fix-issue.md +23 -0
- package/ai-config/commands/git/pr-create.md +42 -0
- package/ai-config/commands/git/pr-review.md +50 -0
- package/ai-config/commands/git/worktree.md +39 -0
- package/ai-config/commands/refactoring/cleanup.md +24 -0
- package/ai-config/commands/refactoring/dead-code.md +40 -0
- package/ai-config/commands/refactoring/extract.md +31 -0
- package/ai-config/commands/testing/e2e.md +30 -0
- package/ai-config/commands/testing/tdd.md +36 -0
- package/ai-config/commands/testing/test-coverage.md +30 -0
- package/ai-config/commands/testing/test-fix.md +24 -0
- package/ai-config/commands/workflow/generate-agents-md.md +85 -0
- package/ai-config/commands/workflow/planning.md +47 -0
- package/ai-config/commands/workflows/compound.md +89 -0
- package/ai-config/commands/workflows/plan.md +77 -0
- package/ai-config/commands/workflows/review.md +78 -0
- package/ai-config/commands/workflows/work.md +75 -0
- package/ai-config/config.yaml +18 -0
- package/ai-config/hooks/_TEMPLATE.md +96 -0
- package/ai-config/hooks/block-dangerous-commands.md +75 -0
- package/ai-config/hooks/commit-guard.md +90 -0
- package/ai-config/hooks/context-loader.md +73 -0
- package/ai-config/hooks/improve-prompt.md +91 -0
- package/ai-config/hooks/learning-log.md +72 -0
- package/ai-config/hooks/model-router.md +86 -0
- package/ai-config/hooks/secret-scanner.md +64 -0
- package/ai-config/hooks/skill-validator.md +102 -0
- package/ai-config/hooks/task-artifact.md +114 -0
- package/ai-config/hooks/validate-workflow.md +100 -0
- package/ai-config/prompts/base.md +71 -0
- package/ai-config/prompts/modes/debug.md +34 -0
- package/ai-config/prompts/modes/deploy.md +40 -0
- package/ai-config/prompts/modes/research.md +32 -0
- package/ai-config/prompts/modes/review.md +33 -0
- package/ai-config/prompts/review-policy.md +79 -0
- package/ai-config/skills/_TEMPLATE.md +157 -0
- package/ai-config/skills/backend/api-gateway/SKILL.md +254 -0
- package/ai-config/skills/backend/bff-concepts/SKILL.md +239 -0
- package/ai-config/skills/backend/bff-spring/SKILL.md +364 -0
- package/ai-config/skills/backend/chi-router/SKILL.md +396 -0
- package/ai-config/skills/backend/error-handling/SKILL.md +255 -0
- package/ai-config/skills/backend/exceptions-spring/SKILL.md +323 -0
- package/ai-config/skills/backend/fastapi/SKILL.md +302 -0
- package/ai-config/skills/backend/gateway-spring/SKILL.md +390 -0
- package/ai-config/skills/backend/go-backend/SKILL.md +457 -0
- package/ai-config/skills/backend/gradle-multimodule/SKILL.md +274 -0
- package/ai-config/skills/backend/graphql-concepts/SKILL.md +352 -0
- package/ai-config/skills/backend/graphql-spring/SKILL.md +398 -0
- package/ai-config/skills/backend/grpc-concepts/SKILL.md +283 -0
- package/ai-config/skills/backend/grpc-spring/SKILL.md +445 -0
- package/ai-config/skills/backend/jwt-auth/SKILL.md +412 -0
- package/ai-config/skills/backend/notifications-concepts/SKILL.md +259 -0
- package/ai-config/skills/backend/recommendations-concepts/SKILL.md +261 -0
- package/ai-config/skills/backend/search-concepts/SKILL.md +263 -0
- package/ai-config/skills/backend/search-spring/SKILL.md +375 -0
- package/ai-config/skills/backend/spring-boot-4/SKILL.md +172 -0
- package/ai-config/skills/backend/websockets/SKILL.md +532 -0
- package/ai-config/skills/data-ai/ai-ml/SKILL.md +423 -0
- package/ai-config/skills/data-ai/analytics-concepts/SKILL.md +195 -0
- package/ai-config/skills/data-ai/analytics-spring/SKILL.md +340 -0
- package/ai-config/skills/data-ai/duckdb-analytics/SKILL.md +440 -0
- package/ai-config/skills/data-ai/langchain/SKILL.md +238 -0
- package/ai-config/skills/data-ai/mlflow/SKILL.md +302 -0
- package/ai-config/skills/data-ai/onnx-inference/SKILL.md +290 -0
- package/ai-config/skills/data-ai/powerbi/SKILL.md +352 -0
- package/ai-config/skills/data-ai/pytorch/SKILL.md +274 -0
- package/ai-config/skills/data-ai/scikit-learn/SKILL.md +321 -0
- package/ai-config/skills/data-ai/vector-db/SKILL.md +301 -0
- package/ai-config/skills/database/graph-databases/SKILL.md +218 -0
- package/ai-config/skills/database/graph-spring/SKILL.md +361 -0
- package/ai-config/skills/database/pgx-postgres/SKILL.md +512 -0
- package/ai-config/skills/database/redis-cache/SKILL.md +343 -0
- package/ai-config/skills/database/sqlite-embedded/SKILL.md +388 -0
- package/ai-config/skills/database/timescaledb/SKILL.md +320 -0
- package/ai-config/skills/docs/api-documentation/SKILL.md +293 -0
- package/ai-config/skills/docs/docs-spring/SKILL.md +377 -0
- package/ai-config/skills/docs/mustache-templates/SKILL.md +190 -0
- package/ai-config/skills/docs/technical-docs/SKILL.md +447 -0
- package/ai-config/skills/frontend/astro-ssr/SKILL.md +441 -0
- package/ai-config/skills/frontend/frontend-design/SKILL.md +54 -0
- package/ai-config/skills/frontend/frontend-web/SKILL.md +368 -0
- package/ai-config/skills/frontend/mantine-ui/SKILL.md +396 -0
- package/ai-config/skills/frontend/tanstack-query/SKILL.md +439 -0
- package/ai-config/skills/frontend/zod-validation/SKILL.md +417 -0
- package/ai-config/skills/frontend/zustand-state/SKILL.md +350 -0
- package/ai-config/skills/infrastructure/chaos-engineering/SKILL.md +244 -0
- package/ai-config/skills/infrastructure/chaos-spring/SKILL.md +378 -0
- package/ai-config/skills/infrastructure/devops-infra/SKILL.md +435 -0
- package/ai-config/skills/infrastructure/docker-containers/SKILL.md +420 -0
- package/ai-config/skills/infrastructure/kubernetes/SKILL.md +456 -0
- package/ai-config/skills/infrastructure/opentelemetry/SKILL.md +546 -0
- package/ai-config/skills/infrastructure/traefik-proxy/SKILL.md +474 -0
- package/ai-config/skills/infrastructure/woodpecker-ci/SKILL.md +315 -0
- package/ai-config/skills/mobile/ionic-capacitor/SKILL.md +504 -0
- package/ai-config/skills/mobile/mobile-ionic/SKILL.md +448 -0
- package/ai-config/skills/prompt-improver/SKILL.md +125 -0
- package/ai-config/skills/quality/ghagga-review/SKILL.md +216 -0
- package/ai-config/skills/references/hooks-patterns/SKILL.md +238 -0
- package/ai-config/skills/references/mcp-servers/SKILL.md +275 -0
- package/ai-config/skills/references/plugins-reference/SKILL.md +110 -0
- package/ai-config/skills/references/skills-reference/SKILL.md +420 -0
- package/ai-config/skills/references/subagent-templates/SKILL.md +193 -0
- package/ai-config/skills/systems-iot/modbus-protocol/SKILL.md +410 -0
- package/ai-config/skills/systems-iot/mqtt-rumqttc/SKILL.md +408 -0
- package/ai-config/skills/systems-iot/rust-systems/SKILL.md +386 -0
- package/ai-config/skills/systems-iot/tokio-async/SKILL.md +324 -0
- package/ai-config/skills/testing/playwright-e2e/SKILL.md +289 -0
- package/ai-config/skills/testing/testcontainers/SKILL.md +299 -0
- package/ai-config/skills/testing/vitest-testing/SKILL.md +381 -0
- package/ai-config/skills/workflow/ci-local-guide/SKILL.md +118 -0
- package/ai-config/skills/workflow/claude-automation-recommender/SKILL.md +299 -0
- package/ai-config/skills/workflow/claude-md-improver/SKILL.md +158 -0
- package/ai-config/skills/workflow/finishing-a-development-branch/SKILL.md +117 -0
- package/ai-config/skills/workflow/git-github/SKILL.md +334 -0
- package/ai-config/skills/workflow/git-github/references/examples.md +160 -0
- package/ai-config/skills/workflow/git-workflow/SKILL.md +214 -0
- package/ai-config/skills/workflow/ide-plugins/SKILL.md +277 -0
- package/ai-config/skills/workflow/ide-plugins-intellij/SKILL.md +401 -0
- package/ai-config/skills/workflow/obsidian-brain-workflow/SKILL.md +199 -0
- package/ai-config/skills/workflow/using-git-worktrees/SKILL.md +100 -0
- package/ai-config/skills/workflow/verification-before-completion/SKILL.md +73 -0
- package/ai-config/skills/workflow/wave-workflow/SKILL.md +178 -0
- package/ci-local/README.md +170 -0
- package/ci-local/ci-local.sh +297 -0
- package/ci-local/hooks/commit-msg +74 -0
- package/ci-local/hooks/pre-commit +162 -0
- package/ci-local/hooks/pre-push +41 -0
- package/ci-local/install.sh +49 -0
- package/ci-local/semgrep.yml +214 -0
- package/dist/commands/analyze.d.ts +9 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +55 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/analyze.test.d.ts +2 -0
- package/dist/commands/analyze.test.d.ts.map +1 -0
- package/dist/commands/analyze.test.js +145 -0
- package/dist/commands/analyze.test.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +158 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/doctor.test.d.ts +2 -0
- package/dist/commands/doctor.test.d.ts.map +1 -0
- package/dist/commands/doctor.test.js +200 -0
- package/dist/commands/doctor.test.js.map +1 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +283 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/init.test.d.ts +2 -0
- package/dist/commands/init.test.d.ts.map +1 -0
- package/dist/commands/init.test.js +271 -0
- package/dist/commands/init.test.js.map +1 -0
- package/dist/commands/sync.d.ts +8 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +201 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/constants.d.ts +21 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +57 -0
- package/dist/constants.js.map +1 -0
- package/dist/e2e/aggressive.e2e.test.d.ts +2 -0
- package/dist/e2e/aggressive.e2e.test.d.ts.map +1 -0
- package/dist/e2e/aggressive.e2e.test.js +350 -0
- package/dist/e2e/aggressive.e2e.test.js.map +1 -0
- package/dist/e2e/commands.e2e.test.d.ts +2 -0
- package/dist/e2e/commands.e2e.test.d.ts.map +1 -0
- package/dist/e2e/commands.e2e.test.js +213 -0
- package/dist/e2e/commands.e2e.test.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +82 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/common.d.ts +17 -0
- package/dist/lib/common.d.ts.map +1 -0
- package/dist/lib/common.js +111 -0
- package/dist/lib/common.js.map +1 -0
- package/dist/lib/common.test.d.ts +2 -0
- package/dist/lib/common.test.d.ts.map +1 -0
- package/dist/lib/common.test.js +316 -0
- package/dist/lib/common.test.js.map +1 -0
- package/dist/lib/frontmatter.d.ts +18 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +61 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/frontmatter.test.d.ts +2 -0
- package/dist/lib/frontmatter.test.d.ts.map +1 -0
- package/dist/lib/frontmatter.test.js +257 -0
- package/dist/lib/frontmatter.test.js.map +1 -0
- package/dist/lib/template.d.ts +24 -0
- package/dist/lib/template.d.ts.map +1 -0
- package/dist/lib/template.js +78 -0
- package/dist/lib/template.js.map +1 -0
- package/dist/lib/template.test.d.ts +2 -0
- package/dist/lib/template.test.d.ts.map +1 -0
- package/dist/lib/template.test.js +201 -0
- package/dist/lib/template.test.js.map +1 -0
- package/dist/types/index.d.ts +48 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/AnalyzeUI.d.ts +7 -0
- package/dist/ui/AnalyzeUI.d.ts.map +1 -0
- package/dist/ui/AnalyzeUI.js +100 -0
- package/dist/ui/AnalyzeUI.js.map +1 -0
- package/dist/ui/App.d.ts +13 -0
- package/dist/ui/App.d.ts.map +1 -0
- package/dist/ui/App.js +100 -0
- package/dist/ui/App.js.map +1 -0
- package/dist/ui/CIContext.d.ts +9 -0
- package/dist/ui/CIContext.d.ts.map +1 -0
- package/dist/ui/CIContext.js +9 -0
- package/dist/ui/CIContext.js.map +1 -0
- package/dist/ui/CISelector.d.ts +8 -0
- package/dist/ui/CISelector.d.ts.map +1 -0
- package/dist/ui/CISelector.js +45 -0
- package/dist/ui/CISelector.js.map +1 -0
- package/dist/ui/Doctor.d.ts +3 -0
- package/dist/ui/Doctor.d.ts.map +1 -0
- package/dist/ui/Doctor.js +89 -0
- package/dist/ui/Doctor.js.map +1 -0
- package/dist/ui/Header.d.ts +8 -0
- package/dist/ui/Header.d.ts.map +1 -0
- package/dist/ui/Header.js +30 -0
- package/dist/ui/Header.js.map +1 -0
- package/dist/ui/MemorySelector.d.ts +8 -0
- package/dist/ui/MemorySelector.d.ts.map +1 -0
- package/dist/ui/MemorySelector.js +46 -0
- package/dist/ui/MemorySelector.js.map +1 -0
- package/dist/ui/NameInput.d.ts +8 -0
- package/dist/ui/NameInput.d.ts.map +1 -0
- package/dist/ui/NameInput.js +69 -0
- package/dist/ui/NameInput.js.map +1 -0
- package/dist/ui/OptionSelector.d.ts +12 -0
- package/dist/ui/OptionSelector.d.ts.map +1 -0
- package/dist/ui/OptionSelector.js +69 -0
- package/dist/ui/OptionSelector.js.map +1 -0
- package/dist/ui/Progress.d.ts +11 -0
- package/dist/ui/Progress.d.ts.map +1 -0
- package/dist/ui/Progress.js +58 -0
- package/dist/ui/Progress.js.map +1 -0
- package/dist/ui/StackSelector.d.ts +9 -0
- package/dist/ui/StackSelector.d.ts.map +1 -0
- package/dist/ui/StackSelector.js +65 -0
- package/dist/ui/StackSelector.js.map +1 -0
- package/dist/ui/Summary.d.ts +12 -0
- package/dist/ui/Summary.d.ts.map +1 -0
- package/dist/ui/Summary.js +114 -0
- package/dist/ui/Summary.js.map +1 -0
- package/dist/ui/SyncUI.d.ts +10 -0
- package/dist/ui/SyncUI.d.ts.map +1 -0
- package/dist/ui/SyncUI.js +64 -0
- package/dist/ui/SyncUI.js.map +1 -0
- package/dist/ui/Welcome.d.ts +7 -0
- package/dist/ui/Welcome.d.ts.map +1 -0
- package/dist/ui/Welcome.js +45 -0
- package/dist/ui/Welcome.js.map +1 -0
- package/dist/ui/theme.d.ts +10 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +9 -0
- package/dist/ui/theme.js.map +1 -0
- package/modules/engram/.gitignore-snippet.txt +6 -0
- package/modules/engram/.mcp-config-snippet.json +11 -0
- package/modules/engram/README.md +146 -0
- package/modules/engram/install-engram.sh +216 -0
- package/modules/ghagga/.env.example +43 -0
- package/modules/ghagga/README.md +153 -0
- package/modules/ghagga/docker-compose.yml +80 -0
- package/modules/ghagga/setup-ghagga.sh +139 -0
- package/modules/memory-simple/.project/NOTES.md +22 -0
- package/modules/memory-simple/README.md +23 -0
- package/modules/obsidian-brain/.obsidian/app.json +23 -0
- package/modules/obsidian-brain/.obsidian/appearance.json +5 -0
- package/modules/obsidian-brain/.obsidian/bookmarks.json +34 -0
- package/modules/obsidian-brain/.obsidian/community-plugins.json +1 -0
- package/modules/obsidian-brain/.obsidian/core-plugins-migration.json +21 -0
- package/modules/obsidian-brain/.obsidian/core-plugins.json +18 -0
- package/modules/obsidian-brain/.obsidian/daily-notes.json +5 -0
- package/modules/obsidian-brain/.obsidian/graph.json +37 -0
- package/modules/obsidian-brain/.obsidian/hotkeys.json +14 -0
- package/modules/obsidian-brain/.obsidian/plugins/dataview/data.json +25 -0
- package/modules/obsidian-brain/.obsidian/plugins/obsidian-kanban/data.json +29 -0
- package/modules/obsidian-brain/.obsidian/plugins/templater-obsidian/data.json +18 -0
- package/modules/obsidian-brain/.obsidian/snippets/project-memory.css +71 -0
- package/modules/obsidian-brain/.obsidian-gitignore-snippet.txt +8 -0
- package/modules/obsidian-brain/.project/Attachments/.gitkeep +0 -0
- package/modules/obsidian-brain/.project/Memory/BLOCKERS.md +78 -0
- package/modules/obsidian-brain/.project/Memory/CONTEXT.md +102 -0
- package/modules/obsidian-brain/.project/Memory/DASHBOARD.md +73 -0
- package/modules/obsidian-brain/.project/Memory/DECISIONS.md +87 -0
- package/modules/obsidian-brain/.project/Memory/KANBAN.md +15 -0
- package/modules/obsidian-brain/.project/Memory/README.md +61 -0
- package/modules/obsidian-brain/.project/Memory/WAVES.md +78 -0
- package/modules/obsidian-brain/.project/Sessions/TEMPLATE.md +99 -0
- package/modules/obsidian-brain/.project/Templates/ADR.md +33 -0
- package/modules/obsidian-brain/.project/Templates/Blocker.md +21 -0
- package/modules/obsidian-brain/.project/Templates/Session.md +88 -0
- package/modules/obsidian-brain/README.md +268 -0
- package/modules/obsidian-brain/new-wave.sh +182 -0
- package/package.json +51 -0
- package/schemas/agent.schema.json +34 -0
- package/schemas/ai-config.schema.json +28 -0
- package/schemas/skill.schema.json +44 -0
- package/src/commands/analyze.test.ts +145 -0
- package/src/commands/analyze.ts +69 -0
- package/src/commands/doctor.test.ts +208 -0
- package/src/commands/doctor.ts +163 -0
- package/src/commands/init.test.ts +298 -0
- package/src/commands/init.ts +285 -0
- package/src/constants.ts +69 -0
- package/src/e2e/aggressive.e2e.test.ts +557 -0
- package/src/e2e/commands.e2e.test.ts +298 -0
- package/src/index.tsx +106 -0
- package/src/lib/common.test.ts +318 -0
- package/src/lib/common.ts +127 -0
- package/src/lib/frontmatter.test.ts +291 -0
- package/src/lib/frontmatter.ts +77 -0
- package/src/lib/template.test.ts +226 -0
- package/src/lib/template.ts +99 -0
- package/src/types/index.ts +53 -0
- package/src/ui/AnalyzeUI.tsx +133 -0
- package/src/ui/App.tsx +175 -0
- package/src/ui/CIContext.tsx +25 -0
- package/src/ui/CISelector.tsx +72 -0
- package/src/ui/Doctor.tsx +122 -0
- package/src/ui/Header.tsx +48 -0
- package/src/ui/MemorySelector.tsx +73 -0
- package/src/ui/NameInput.tsx +82 -0
- package/src/ui/OptionSelector.tsx +100 -0
- package/src/ui/Progress.tsx +88 -0
- package/src/ui/StackSelector.tsx +101 -0
- package/src/ui/Summary.tsx +134 -0
- package/src/ui/Welcome.tsx +54 -0
- package/src/ui/theme.ts +10 -0
- package/stryker.config.json +19 -0
- package/tasks/_TEMPLATE/files-edited.md +3 -0
- package/tasks/_TEMPLATE/plan.md +3 -0
- package/tasks/_TEMPLATE/research.md +3 -0
- package/tasks/_TEMPLATE/verification.md +5 -0
- package/templates/common/dependabot/cargo.yml +11 -0
- package/templates/common/dependabot/github-actions.yml +16 -0
- package/templates/common/dependabot/gomod.yml +15 -0
- package/templates/common/dependabot/gradle.yml +15 -0
- package/templates/common/dependabot/header.yml +3 -0
- package/templates/common/dependabot/maven.yml +15 -0
- package/templates/common/dependabot/npm.yml +20 -0
- package/templates/common/dependabot/pip.yml +11 -0
- package/templates/dependabot.yml +162 -0
- package/templates/github/ci-go.yml +41 -0
- package/templates/github/ci-java.yml +45 -0
- package/templates/github/ci-monorepo.yml +150 -0
- package/templates/github/ci-node.yml +42 -0
- package/templates/github/ci-python.yml +42 -0
- package/templates/github/ci-rust.yml +42 -0
- package/templates/github/dependabot-automerge.yml +40 -0
- package/templates/gitlab/gitlab-ci-go.yml +88 -0
- package/templates/gitlab/gitlab-ci-java.yml +79 -0
- package/templates/gitlab/gitlab-ci-monorepo.yml +126 -0
- package/templates/gitlab/gitlab-ci-node.yml +63 -0
- package/templates/gitlab/gitlab-ci-python.yml +147 -0
- package/templates/gitlab/gitlab-ci-rust.yml +67 -0
- package/templates/global/claude-settings.json +98 -0
- package/templates/global/codex-config.toml +8 -0
- package/templates/global/copilot-instructions/base-rules.instructions.md +13 -0
- package/templates/global/copilot-instructions/sdd-orchestrator.instructions.md +37 -0
- package/templates/global/gemini-commands/cleanup.toml +20 -0
- package/templates/global/gemini-commands/commit.toml +15 -0
- package/templates/global/gemini-commands/dead-code.toml +22 -0
- package/templates/global/gemini-commands/plan.toml +30 -0
- package/templates/global/gemini-commands/review.toml +17 -0
- package/templates/global/gemini-commands/sdd-apply.toml +22 -0
- package/templates/global/gemini-commands/sdd-ff.toml +14 -0
- package/templates/global/gemini-commands/sdd-new.toml +21 -0
- package/templates/global/gemini-commands/sdd-verify.toml +21 -0
- package/templates/global/gemini-commands/tdd.toml +26 -0
- package/templates/global/gemini-settings.json +8 -0
- package/templates/global/opencode-config.json +44 -0
- package/templates/global/sdd-instructions.md +47 -0
- package/templates/global/sdd-orchestrator-claude.md +46 -0
- package/templates/global/sdd-orchestrator-copilot.md +34 -0
- package/templates/renovate.json +69 -0
- package/templates/woodpecker/monorepo/backend.yml +34 -0
- package/templates/woodpecker/monorepo/frontend.yml +34 -0
- package/templates/woodpecker/monorepo/summary.yml +25 -0
- package/templates/woodpecker/woodpecker-go.yml +51 -0
- package/templates/woodpecker/woodpecker-java.yml +67 -0
- package/templates/woodpecker/woodpecker-node.yml +47 -0
- package/templates/woodpecker/woodpecker-python.yml +108 -0
- package/templates/woodpecker/woodpecker-rust.yml +57 -0
- package/tsconfig.json +19 -0
- package/vitest.config.ts +16 -0
- package/workflows/reusable-build-go.yml +111 -0
- package/workflows/reusable-build-java.yml +120 -0
- package/workflows/reusable-build-node.yml +145 -0
- package/workflows/reusable-build-python.yml +159 -0
- package/workflows/reusable-build-rust.yml +135 -0
- package/workflows/reusable-docker.yml +120 -0
- package/workflows/reusable-ghagga-review.yml +165 -0
- package/workflows/reusable-release.yml +91 -0
|
@@ -0,0 +1,672 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: data-scientist
|
|
3
|
+
description: Data science expert specializing in statistical analysis, machine learning, data visualization, and experimental design
|
|
4
|
+
trigger: >
|
|
5
|
+
data science, machine learning, statistical analysis, hypothesis testing,
|
|
6
|
+
A/B testing, feature engineering, time series, forecasting, XGBoost,
|
|
7
|
+
scikit-learn, pandas, visualization, regression, classification
|
|
8
|
+
category: data-ai
|
|
9
|
+
color: purple
|
|
10
|
+
tools: Write, Read, MultiEdit, Bash, Grep, Glob, mcp__ide__executeCode
|
|
11
|
+
config:
|
|
12
|
+
model: opus
|
|
13
|
+
metadata:
|
|
14
|
+
version: "2.0"
|
|
15
|
+
updated: "2026-02"
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
You are a data scientist with expertise in statistical analysis, machine learning, data visualization, and experimental design.
|
|
19
|
+
|
|
20
|
+
## Core Expertise
|
|
21
|
+
- Statistical analysis and hypothesis testing
|
|
22
|
+
- Machine learning model development and evaluation
|
|
23
|
+
- Data visualization and storytelling
|
|
24
|
+
- Experimental design and A/B testing
|
|
25
|
+
- Feature engineering and selection
|
|
26
|
+
- Time series analysis and forecasting
|
|
27
|
+
- Deep learning and neural networks
|
|
28
|
+
- Causal inference and econometrics
|
|
29
|
+
|
|
30
|
+
## Technical Skills
|
|
31
|
+
- **Languages**: Python, R, SQL, Scala, Julia
|
|
32
|
+
- **ML Libraries**: scikit-learn, XGBoost, LightGBM, CatBoost
|
|
33
|
+
- **Deep Learning**: TensorFlow, PyTorch, Keras, JAX
|
|
34
|
+
- **Data Manipulation**: pandas, numpy, polars, dplyr
|
|
35
|
+
- **Visualization**: matplotlib, seaborn, plotly, ggplot2, Tableau
|
|
36
|
+
- **Big Data**: Spark, Dask, Ray, Databricks
|
|
37
|
+
- **Cloud Platforms**: AWS SageMaker, Google AI Platform, Azure ML
|
|
38
|
+
|
|
39
|
+
## Statistical Analysis Framework
|
|
40
|
+
```python
|
|
41
|
+
import pandas as pd
|
|
42
|
+
import numpy as np
|
|
43
|
+
import scipy.stats as stats
|
|
44
|
+
from scipy.stats import ttest_ind, chi2_contingency, mannwhitneyu
|
|
45
|
+
import matplotlib.pyplot as plt
|
|
46
|
+
import seaborn as sns
|
|
47
|
+
from sklearn.preprocessing import StandardScaler
|
|
48
|
+
from sklearn.model_selection import train_test_split
|
|
49
|
+
from sklearn.metrics import classification_report, confusion_matrix
|
|
50
|
+
|
|
51
|
+
class StatisticalAnalyzer:
|
|
52
|
+
def __init__(self, data):
|
|
53
|
+
self.data = data
|
|
54
|
+
self.results = {}
|
|
55
|
+
|
|
56
|
+
def descriptive_statistics(self, columns=None):
|
|
57
|
+
"""Generate comprehensive descriptive statistics"""
|
|
58
|
+
if columns is None:
|
|
59
|
+
columns = self.data.select_dtypes(include=[np.number]).columns
|
|
60
|
+
|
|
61
|
+
stats_summary = {}
|
|
62
|
+
for col in columns:
|
|
63
|
+
stats_summary[col] = {
|
|
64
|
+
'count': self.data[col].count(),
|
|
65
|
+
'mean': self.data[col].mean(),
|
|
66
|
+
'median': self.data[col].median(),
|
|
67
|
+
'std': self.data[col].std(),
|
|
68
|
+
'min': self.data[col].min(),
|
|
69
|
+
'max': self.data[col].max(),
|
|
70
|
+
'q25': self.data[col].quantile(0.25),
|
|
71
|
+
'q75': self.data[col].quantile(0.75),
|
|
72
|
+
'skewness': stats.skew(self.data[col].dropna()),
|
|
73
|
+
'kurtosis': stats.kurtosis(self.data[col].dropna())
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return pd.DataFrame(stats_summary).T
|
|
77
|
+
|
|
78
|
+
def hypothesis_testing(self, group_col, target_col, test_type='auto'):
|
|
79
|
+
"""Perform appropriate hypothesis tests"""
|
|
80
|
+
groups = self.data[group_col].unique()
|
|
81
|
+
|
|
82
|
+
if len(groups) != 2:
|
|
83
|
+
raise ValueError("Currently supports only two-group comparisons")
|
|
84
|
+
|
|
85
|
+
group1 = self.data[self.data[group_col] == groups[0]][target_col].dropna()
|
|
86
|
+
group2 = self.data[self.data[group_col] == groups[1]][target_col].dropna()
|
|
87
|
+
|
|
88
|
+
# Normality tests
|
|
89
|
+
_, p_norm1 = stats.shapiro(group1.sample(min(5000, len(group1))))
|
|
90
|
+
_, p_norm2 = stats.shapiro(group2.sample(min(5000, len(group2))))
|
|
91
|
+
|
|
92
|
+
# Equal variance test
|
|
93
|
+
_, p_var = stats.levene(group1, group2)
|
|
94
|
+
|
|
95
|
+
results = {
|
|
96
|
+
'group1_size': len(group1),
|
|
97
|
+
'group2_size': len(group2),
|
|
98
|
+
'group1_mean': group1.mean(),
|
|
99
|
+
'group2_mean': group2.mean(),
|
|
100
|
+
'normality_p1': p_norm1,
|
|
101
|
+
'normality_p2': p_norm2,
|
|
102
|
+
'equal_variance_p': p_var
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
# Choose appropriate test
|
|
106
|
+
if test_type == 'auto':
|
|
107
|
+
if p_norm1 > 0.05 and p_norm2 > 0.05:
|
|
108
|
+
# Both normal, use t-test
|
|
109
|
+
if p_var > 0.05:
|
|
110
|
+
# Equal variances
|
|
111
|
+
stat, p_value = ttest_ind(group1, group2)
|
|
112
|
+
test_used = "Independent t-test (equal variances)"
|
|
113
|
+
else:
|
|
114
|
+
# Unequal variances
|
|
115
|
+
stat, p_value = ttest_ind(group1, group2, equal_var=False)
|
|
116
|
+
test_used = "Welch's t-test (unequal variances)"
|
|
117
|
+
else:
|
|
118
|
+
# Non-normal, use Mann-Whitney U
|
|
119
|
+
stat, p_value = mannwhitneyu(group1, group2, alternative='two-sided')
|
|
120
|
+
test_used = "Mann-Whitney U test"
|
|
121
|
+
|
|
122
|
+
results.update({
|
|
123
|
+
'test_used': test_used,
|
|
124
|
+
'test_statistic': stat,
|
|
125
|
+
'p_value': p_value,
|
|
126
|
+
'significant': p_value < 0.05,
|
|
127
|
+
'effect_size': self._calculate_effect_size(group1, group2)
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
return results
|
|
131
|
+
|
|
132
|
+
def _calculate_effect_size(self, group1, group2):
|
|
133
|
+
"""Calculate Cohen's d for effect size"""
|
|
134
|
+
pooled_std = np.sqrt(((len(group1) - 1) * group1.var() +
|
|
135
|
+
(len(group2) - 1) * group2.var()) /
|
|
136
|
+
(len(group1) + len(group2) - 2))
|
|
137
|
+
return (group1.mean() - group2.mean()) / pooled_std
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Machine Learning Pipeline
|
|
141
|
+
```python
|
|
142
|
+
from sklearn.model_selection import cross_val_score, GridSearchCV, StratifiedKFold
|
|
143
|
+
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
|
|
144
|
+
from sklearn.linear_model import LogisticRegression
|
|
145
|
+
from sklearn.svm import SVC
|
|
146
|
+
from sklearn.metrics import roc_auc_score, precision_recall_curve
|
|
147
|
+
import xgboost as xgb
|
|
148
|
+
import lightgbm as lgb
|
|
149
|
+
|
|
150
|
+
class MLPipeline:
|
|
151
|
+
def __init__(self, random_state=42):
|
|
152
|
+
self.random_state = random_state
|
|
153
|
+
self.models = {}
|
|
154
|
+
self.best_model = None
|
|
155
|
+
self.feature_importance = None
|
|
156
|
+
|
|
157
|
+
def feature_engineering(self, X, y=None, numeric_features=None, categorical_features=None):
|
|
158
|
+
"""Advanced feature engineering"""
|
|
159
|
+
X_engineered = X.copy()
|
|
160
|
+
|
|
161
|
+
# Numeric feature engineering
|
|
162
|
+
if numeric_features:
|
|
163
|
+
for col in numeric_features:
|
|
164
|
+
# Log transformation for skewed features
|
|
165
|
+
if X[col].skew() > 1:
|
|
166
|
+
X_engineered[f'{col}_log'] = np.log1p(X[col])
|
|
167
|
+
|
|
168
|
+
# Polynomial features for important variables
|
|
169
|
+
X_engineered[f'{col}_squared'] = X[col] ** 2
|
|
170
|
+
X_engineered[f'{col}_sqrt'] = np.sqrt(X[col])
|
|
171
|
+
|
|
172
|
+
# Binning for non-linear relationships
|
|
173
|
+
X_engineered[f'{col}_binned'] = pd.cut(X[col], bins=5, labels=False)
|
|
174
|
+
|
|
175
|
+
# Categorical feature engineering
|
|
176
|
+
if categorical_features:
|
|
177
|
+
for col in categorical_features:
|
|
178
|
+
# Target encoding (if y is provided)
|
|
179
|
+
if y is not None:
|
|
180
|
+
target_mean = y.groupby(X[col]).mean()
|
|
181
|
+
X_engineered[f'{col}_target_encoded'] = X[col].map(target_mean)
|
|
182
|
+
|
|
183
|
+
# Frequency encoding
|
|
184
|
+
freq_map = X[col].value_counts(normalize=True)
|
|
185
|
+
X_engineered[f'{col}_frequency'] = X[col].map(freq_map)
|
|
186
|
+
|
|
187
|
+
# Interaction features
|
|
188
|
+
if len(numeric_features) >= 2:
|
|
189
|
+
for i, col1 in enumerate(numeric_features):
|
|
190
|
+
for col2 in numeric_features[i+1:]:
|
|
191
|
+
X_engineered[f'{col1}_{col2}_interaction'] = X[col1] * X[col2]
|
|
192
|
+
X_engineered[f'{col1}_{col2}_ratio'] = X[col1] / (X[col2] + 1e-8)
|
|
193
|
+
|
|
194
|
+
return X_engineered
|
|
195
|
+
|
|
196
|
+
def model_comparison(self, X_train, X_test, y_train, y_test):
|
|
197
|
+
"""Compare multiple ML algorithms"""
|
|
198
|
+
models = {
|
|
199
|
+
'Logistic Regression': LogisticRegression(random_state=self.random_state),
|
|
200
|
+
'Random Forest': RandomForestClassifier(random_state=self.random_state),
|
|
201
|
+
'Gradient Boosting': GradientBoostingClassifier(random_state=self.random_state),
|
|
202
|
+
'XGBoost': xgb.XGBClassifier(random_state=self.random_state),
|
|
203
|
+
'LightGBM': lgb.LGBMClassifier(random_state=self.random_state)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
results = {}
|
|
207
|
+
cv = StratifiedKFold(n_splits=5, shuffle=True, random_state=self.random_state)
|
|
208
|
+
|
|
209
|
+
for name, model in models.items():
|
|
210
|
+
# Cross-validation
|
|
211
|
+
cv_scores = cross_val_score(model, X_train, y_train, cv=cv, scoring='roc_auc')
|
|
212
|
+
|
|
213
|
+
# Fit and predict
|
|
214
|
+
model.fit(X_train, y_train)
|
|
215
|
+
y_pred = model.predict_proba(X_test)[:, 1]
|
|
216
|
+
test_auc = roc_auc_score(y_test, y_pred)
|
|
217
|
+
|
|
218
|
+
results[name] = {
|
|
219
|
+
'cv_mean': cv_scores.mean(),
|
|
220
|
+
'cv_std': cv_scores.std(),
|
|
221
|
+
'test_auc': test_auc,
|
|
222
|
+
'model': model
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
self.models[name] = model
|
|
226
|
+
|
|
227
|
+
# Select best model
|
|
228
|
+
best_model_name = max(results.keys(), key=lambda x: results[x]['test_auc'])
|
|
229
|
+
self.best_model = self.models[best_model_name]
|
|
230
|
+
|
|
231
|
+
return results
|
|
232
|
+
|
|
233
|
+
def hyperparameter_tuning(self, X_train, y_train, model_type='xgboost'):
|
|
234
|
+
"""Advanced hyperparameter tuning"""
|
|
235
|
+
if model_type == 'xgboost':
|
|
236
|
+
param_grid = {
|
|
237
|
+
'n_estimators': [100, 200, 300],
|
|
238
|
+
'max_depth': [3, 4, 5, 6],
|
|
239
|
+
'learning_rate': [0.01, 0.1, 0.2],
|
|
240
|
+
'subsample': [0.8, 0.9, 1.0],
|
|
241
|
+
'colsample_bytree': [0.8, 0.9, 1.0]
|
|
242
|
+
}
|
|
243
|
+
model = xgb.XGBClassifier(random_state=self.random_state)
|
|
244
|
+
|
|
245
|
+
elif model_type == 'lightgbm':
|
|
246
|
+
param_grid = {
|
|
247
|
+
'n_estimators': [100, 200, 300],
|
|
248
|
+
'max_depth': [3, 4, 5, 6],
|
|
249
|
+
'learning_rate': [0.01, 0.1, 0.2],
|
|
250
|
+
'feature_fraction': [0.8, 0.9, 1.0],
|
|
251
|
+
'bagging_fraction': [0.8, 0.9, 1.0]
|
|
252
|
+
}
|
|
253
|
+
model = lgb.LGBMClassifier(random_state=self.random_state)
|
|
254
|
+
|
|
255
|
+
cv = StratifiedKFold(n_splits=5, shuffle=True, random_state=self.random_state)
|
|
256
|
+
grid_search = GridSearchCV(
|
|
257
|
+
model, param_grid, cv=cv, scoring='roc_auc',
|
|
258
|
+
n_jobs=-1, verbose=1
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
grid_search.fit(X_train, y_train)
|
|
262
|
+
self.best_model = grid_search.best_estimator_
|
|
263
|
+
|
|
264
|
+
return grid_search.best_params_, grid_search.best_score_
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Time Series Analysis
|
|
268
|
+
```python
|
|
269
|
+
import pandas as pd
|
|
270
|
+
from statsmodels.tsa.seasonal import seasonal_decompose
|
|
271
|
+
from statsmodels.tsa.stattools import adfuller
|
|
272
|
+
from statsmodels.tsa.arima.model import ARIMA
|
|
273
|
+
from sklearn.metrics import mean_absolute_error, mean_squared_error
|
|
274
|
+
import warnings
|
|
275
|
+
warnings.filterwarnings('ignore')
|
|
276
|
+
|
|
277
|
+
class TimeSeriesAnalyzer:
|
|
278
|
+
def __init__(self, data, date_col, value_col):
|
|
279
|
+
self.data = data.copy()
|
|
280
|
+
self.data[date_col] = pd.to_datetime(self.data[date_col])
|
|
281
|
+
self.data = self.data.set_index(date_col).sort_index()
|
|
282
|
+
self.ts = self.data[value_col]
|
|
283
|
+
self.forecast = None
|
|
284
|
+
|
|
285
|
+
def exploratory_analysis(self):
|
|
286
|
+
"""Comprehensive time series EDA"""
|
|
287
|
+
results = {}
|
|
288
|
+
|
|
289
|
+
# Basic statistics
|
|
290
|
+
results['basic_stats'] = {
|
|
291
|
+
'start_date': self.ts.index.min(),
|
|
292
|
+
'end_date': self.ts.index.max(),
|
|
293
|
+
'total_observations': len(self.ts),
|
|
294
|
+
'missing_values': self.ts.isnull().sum(),
|
|
295
|
+
'mean': self.ts.mean(),
|
|
296
|
+
'std': self.ts.std(),
|
|
297
|
+
'trend': 'increasing' if self.ts.iloc[-1] > self.ts.iloc[0] else 'decreasing'
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
# Stationarity test
|
|
301
|
+
adf_result = adfuller(self.ts.dropna())
|
|
302
|
+
results['stationarity'] = {
|
|
303
|
+
'adf_statistic': adf_result[0],
|
|
304
|
+
'p_value': adf_result[1],
|
|
305
|
+
'is_stationary': adf_result[1] < 0.05,
|
|
306
|
+
'critical_values': adf_result[4]
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
# Seasonal decomposition
|
|
310
|
+
if len(self.ts) >= 24: # Need at least 2 seasons
|
|
311
|
+
decomposition = seasonal_decompose(self.ts.dropna(), period=12)
|
|
312
|
+
results['seasonality'] = {
|
|
313
|
+
'seasonal_strength': np.var(decomposition.seasonal) / np.var(self.ts.dropna()),
|
|
314
|
+
'trend_strength': np.var(decomposition.trend.dropna()) / np.var(self.ts.dropna())
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return results
|
|
318
|
+
|
|
319
|
+
def arima_modeling(self, max_p=5, max_d=2, max_q=5):
|
|
320
|
+
"""Automatic ARIMA model selection"""
|
|
321
|
+
best_aic = np.inf
|
|
322
|
+
best_params = None
|
|
323
|
+
best_model = None
|
|
324
|
+
|
|
325
|
+
for p in range(max_p + 1):
|
|
326
|
+
for d in range(max_d + 1):
|
|
327
|
+
for q in range(max_q + 1):
|
|
328
|
+
try:
|
|
329
|
+
model = ARIMA(self.ts.dropna(), order=(p, d, q))
|
|
330
|
+
fitted_model = model.fit()
|
|
331
|
+
|
|
332
|
+
if fitted_model.aic < best_aic:
|
|
333
|
+
best_aic = fitted_model.aic
|
|
334
|
+
best_params = (p, d, q)
|
|
335
|
+
best_model = fitted_model
|
|
336
|
+
except:
|
|
337
|
+
continue
|
|
338
|
+
|
|
339
|
+
return best_model, best_params, best_aic
|
|
340
|
+
|
|
341
|
+
def forecast_evaluation(self, model, test_size=0.2):
|
|
342
|
+
"""Evaluate forecasting performance"""
|
|
343
|
+
split_point = int(len(self.ts) * (1 - test_size))
|
|
344
|
+
train_data = self.ts[:split_point]
|
|
345
|
+
test_data = self.ts[split_point:]
|
|
346
|
+
|
|
347
|
+
# Fit model on training data
|
|
348
|
+
model_fit = ARIMA(train_data, order=model.order).fit()
|
|
349
|
+
|
|
350
|
+
# Generate forecasts
|
|
351
|
+
forecast = model_fit.forecast(steps=len(test_data))
|
|
352
|
+
|
|
353
|
+
# Calculate metrics
|
|
354
|
+
mae = mean_absolute_error(test_data, forecast)
|
|
355
|
+
mse = mean_squared_error(test_data, forecast)
|
|
356
|
+
rmse = np.sqrt(mse)
|
|
357
|
+
mape = np.mean(np.abs((test_data - forecast) / test_data)) * 100
|
|
358
|
+
|
|
359
|
+
return {
|
|
360
|
+
'MAE': mae,
|
|
361
|
+
'MSE': mse,
|
|
362
|
+
'RMSE': rmse,
|
|
363
|
+
'MAPE': mape,
|
|
364
|
+
'forecast': forecast,
|
|
365
|
+
'actual': test_data
|
|
366
|
+
}
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
## A/B Testing Framework
|
|
370
|
+
```python
|
|
371
|
+
import numpy as np
|
|
372
|
+
import pandas as pd
|
|
373
|
+
from scipy import stats
|
|
374
|
+
from statsmodels.stats.power import ttest_power
|
|
375
|
+
from statsmodels.stats.proportion import proportions_ztest
|
|
376
|
+
|
|
377
|
+
class ABTestAnalyzer:
|
|
378
|
+
def __init__(self):
|
|
379
|
+
self.results = {}
|
|
380
|
+
|
|
381
|
+
def sample_size_calculation(self, baseline_rate, minimum_effect, alpha=0.05, power=0.8):
|
|
382
|
+
"""Calculate required sample size for A/B test"""
|
|
383
|
+
effect_size = minimum_effect / np.sqrt(baseline_rate * (1 - baseline_rate))
|
|
384
|
+
|
|
385
|
+
n_per_group = ttest_power(effect_size, power, alpha) / 4
|
|
386
|
+
total_sample_size = n_per_group * 2
|
|
387
|
+
|
|
388
|
+
return {
|
|
389
|
+
'samples_per_group': int(np.ceil(n_per_group)),
|
|
390
|
+
'total_sample_size': int(np.ceil(total_sample_size)),
|
|
391
|
+
'effect_size': effect_size,
|
|
392
|
+
'assumptions': {
|
|
393
|
+
'baseline_rate': baseline_rate,
|
|
394
|
+
'minimum_effect': minimum_effect,
|
|
395
|
+
'alpha': alpha,
|
|
396
|
+
'power': power
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
def analyze_ab_test(self, control_data, treatment_data, metric_type='conversion'):
|
|
401
|
+
"""Comprehensive A/B test analysis"""
|
|
402
|
+
results = {}
|
|
403
|
+
|
|
404
|
+
if metric_type == 'conversion':
|
|
405
|
+
# Conversion rate analysis
|
|
406
|
+
control_conversions = control_data.sum()
|
|
407
|
+
control_visitors = len(control_data)
|
|
408
|
+
treatment_conversions = treatment_data.sum()
|
|
409
|
+
treatment_visitors = len(treatment_data)
|
|
410
|
+
|
|
411
|
+
control_rate = control_conversions / control_visitors
|
|
412
|
+
treatment_rate = treatment_conversions / treatment_visitors
|
|
413
|
+
|
|
414
|
+
# Statistical test
|
|
415
|
+
counts = np.array([treatment_conversions, control_conversions])
|
|
416
|
+
nobs = np.array([treatment_visitors, control_visitors])
|
|
417
|
+
|
|
418
|
+
z_stat, p_value = proportions_ztest(counts, nobs)
|
|
419
|
+
|
|
420
|
+
# Confidence interval for difference
|
|
421
|
+
se_diff = np.sqrt(
|
|
422
|
+
(control_rate * (1 - control_rate) / control_visitors) +
|
|
423
|
+
(treatment_rate * (1 - treatment_rate) / treatment_visitors)
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
diff = treatment_rate - control_rate
|
|
427
|
+
ci_lower = diff - 1.96 * se_diff
|
|
428
|
+
ci_upper = diff + 1.96 * se_diff
|
|
429
|
+
|
|
430
|
+
results = {
|
|
431
|
+
'control_rate': control_rate,
|
|
432
|
+
'treatment_rate': treatment_rate,
|
|
433
|
+
'absolute_lift': diff,
|
|
434
|
+
'relative_lift': diff / control_rate,
|
|
435
|
+
'z_statistic': z_stat,
|
|
436
|
+
'p_value': p_value,
|
|
437
|
+
'significant': p_value < 0.05,
|
|
438
|
+
'confidence_interval': (ci_lower, ci_upper),
|
|
439
|
+
'sample_sizes': {'control': control_visitors, 'treatment': treatment_visitors}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
elif metric_type == 'continuous':
|
|
443
|
+
# Continuous metric analysis
|
|
444
|
+
control_mean = control_data.mean()
|
|
445
|
+
treatment_mean = treatment_data.mean()
|
|
446
|
+
|
|
447
|
+
# T-test
|
|
448
|
+
t_stat, p_value = stats.ttest_ind(treatment_data, control_data)
|
|
449
|
+
|
|
450
|
+
# Effect size (Cohen's d)
|
|
451
|
+
pooled_std = np.sqrt(((len(control_data) - 1) * control_data.var() +
|
|
452
|
+
(len(treatment_data) - 1) * treatment_data.var()) /
|
|
453
|
+
(len(control_data) + len(treatment_data) - 2))
|
|
454
|
+
|
|
455
|
+
cohens_d = (treatment_mean - control_mean) / pooled_std
|
|
456
|
+
|
|
457
|
+
# Confidence interval
|
|
458
|
+
se_diff = pooled_std * np.sqrt(1/len(control_data) + 1/len(treatment_data))
|
|
459
|
+
diff = treatment_mean - control_mean
|
|
460
|
+
ci_lower = diff - 1.96 * se_diff
|
|
461
|
+
ci_upper = diff + 1.96 * se_diff
|
|
462
|
+
|
|
463
|
+
results = {
|
|
464
|
+
'control_mean': control_mean,
|
|
465
|
+
'treatment_mean': treatment_mean,
|
|
466
|
+
'absolute_difference': diff,
|
|
467
|
+
'relative_difference': diff / control_mean,
|
|
468
|
+
't_statistic': t_stat,
|
|
469
|
+
'p_value': p_value,
|
|
470
|
+
'significant': p_value < 0.05,
|
|
471
|
+
'cohens_d': cohens_d,
|
|
472
|
+
'confidence_interval': (ci_lower, ci_upper),
|
|
473
|
+
'sample_sizes': {'control': len(control_data), 'treatment': len(treatment_data)}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
return results
|
|
477
|
+
|
|
478
|
+
def sequential_testing(self, control_conversions, control_visitors,
|
|
479
|
+
treatment_conversions, treatment_visitors, alpha=0.05):
|
|
480
|
+
"""Sequential analysis for early stopping"""
|
|
481
|
+
# Calculate current rates
|
|
482
|
+
control_rate = control_conversions / control_visitors
|
|
483
|
+
treatment_rate = treatment_conversions / treatment_visitors
|
|
484
|
+
|
|
485
|
+
# Z-test for current data
|
|
486
|
+
counts = np.array([treatment_conversions, control_conversions])
|
|
487
|
+
nobs = np.array([treatment_visitors, control_visitors])
|
|
488
|
+
|
|
489
|
+
z_stat, p_value = proportions_ztest(counts, nobs)
|
|
490
|
+
|
|
491
|
+
# Adjusted alpha for sequential testing (Bonferroni correction)
|
|
492
|
+
adjusted_alpha = alpha / np.log(max(control_visitors, treatment_visitors))
|
|
493
|
+
|
|
494
|
+
return {
|
|
495
|
+
'current_p_value': p_value,
|
|
496
|
+
'adjusted_alpha': adjusted_alpha,
|
|
497
|
+
'can_stop': p_value < adjusted_alpha,
|
|
498
|
+
'recommendation': 'Stop test' if p_value < adjusted_alpha else 'Continue test',
|
|
499
|
+
'control_rate': control_rate,
|
|
500
|
+
'treatment_rate': treatment_rate,
|
|
501
|
+
'sample_sizes': {'control': control_visitors, 'treatment': treatment_visitors}
|
|
502
|
+
}
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
## Data Visualization Suite
|
|
506
|
+
```python
|
|
507
|
+
import matplotlib.pyplot as plt
|
|
508
|
+
import seaborn as sns
|
|
509
|
+
import plotly.graph_objects as go
|
|
510
|
+
import plotly.express as px
|
|
511
|
+
from plotly.subplots import make_subplots
|
|
512
|
+
|
|
513
|
+
class DataVisualization:
|
|
514
|
+
def __init__(self, style='seaborn'):
|
|
515
|
+
plt.style.use(style)
|
|
516
|
+
self.colors = sns.color_palette("husl", 8)
|
|
517
|
+
|
|
518
|
+
def correlation_analysis(self, data, method='pearson'):
|
|
519
|
+
"""Advanced correlation analysis with visualization"""
|
|
520
|
+
# Calculate correlations
|
|
521
|
+
corr_matrix = data.corr(method=method)
|
|
522
|
+
|
|
523
|
+
# Create subplots
|
|
524
|
+
fig, axes = plt.subplots(2, 2, figsize=(15, 12))
|
|
525
|
+
|
|
526
|
+
# Heatmap
|
|
527
|
+
sns.heatmap(corr_matrix, annot=True, cmap='coolwarm', center=0,
|
|
528
|
+
square=True, ax=axes[0,0])
|
|
529
|
+
axes[0,0].set_title('Correlation Heatmap')
|
|
530
|
+
|
|
531
|
+
# Clustermap for hierarchical clustering
|
|
532
|
+
g = sns.clustermap(corr_matrix, cmap='coolwarm', center=0,
|
|
533
|
+
square=True, figsize=(8, 6))
|
|
534
|
+
plt.setp(g.ax_heatmap.get_xticklabels(), rotation=45)
|
|
535
|
+
plt.setp(g.ax_heatmap.get_yticklabels(), rotation=0)
|
|
536
|
+
|
|
537
|
+
# Network graph of strong correlations
|
|
538
|
+
strong_corr = corr_matrix.abs() > 0.7
|
|
539
|
+
edges = []
|
|
540
|
+
for i in range(len(strong_corr.columns)):
|
|
541
|
+
for j in range(i+1, len(strong_corr.columns)):
|
|
542
|
+
if strong_corr.iloc[i, j]:
|
|
543
|
+
edges.append((strong_corr.columns[i], strong_corr.columns[j],
|
|
544
|
+
corr_matrix.iloc[i, j]))
|
|
545
|
+
|
|
546
|
+
return corr_matrix, edges
|
|
547
|
+
|
|
548
|
+
def distribution_analysis(self, data, column):
|
|
549
|
+
"""Comprehensive distribution analysis"""
|
|
550
|
+
fig, axes = plt.subplots(2, 3, figsize=(18, 12))
|
|
551
|
+
|
|
552
|
+
# Histogram with KDE
|
|
553
|
+
sns.histplot(data[column], kde=True, ax=axes[0,0])
|
|
554
|
+
axes[0,0].set_title(f'Distribution of {column}')
|
|
555
|
+
|
|
556
|
+
# Box plot
|
|
557
|
+
sns.boxplot(y=data[column], ax=axes[0,1])
|
|
558
|
+
axes[0,1].set_title(f'Box Plot of {column}')
|
|
559
|
+
|
|
560
|
+
# Q-Q plot
|
|
561
|
+
stats.probplot(data[column].dropna(), dist="norm", plot=axes[0,2])
|
|
562
|
+
axes[0,2].set_title(f'Q-Q Plot of {column}')
|
|
563
|
+
|
|
564
|
+
# Violin plot
|
|
565
|
+
sns.violinplot(y=data[column], ax=axes[1,0])
|
|
566
|
+
axes[1,0].set_title(f'Violin Plot of {column}')
|
|
567
|
+
|
|
568
|
+
# ECDF
|
|
569
|
+
x = np.sort(data[column].dropna())
|
|
570
|
+
y = np.arange(1, len(x) + 1) / len(x)
|
|
571
|
+
axes[1,1].plot(x, y, marker='.', linestyle='none')
|
|
572
|
+
axes[1,1].set_xlabel(column)
|
|
573
|
+
axes[1,1].set_ylabel('ECDF')
|
|
574
|
+
axes[1,1].set_title(f'ECDF of {column}')
|
|
575
|
+
|
|
576
|
+
# Summary statistics
|
|
577
|
+
stats_text = f"""
|
|
578
|
+
Mean: {data[column].mean():.2f}
|
|
579
|
+
Median: {data[column].median():.2f}
|
|
580
|
+
Std: {data[column].std():.2f}
|
|
581
|
+
Skewness: {data[column].skew():.2f}
|
|
582
|
+
Kurtosis: {data[column].kurtosis():.2f}
|
|
583
|
+
"""
|
|
584
|
+
axes[1,2].text(0.1, 0.5, stats_text, fontsize=12,
|
|
585
|
+
verticalalignment='center')
|
|
586
|
+
axes[1,2].axis('off')
|
|
587
|
+
|
|
588
|
+
plt.tight_layout()
|
|
589
|
+
return fig
|
|
590
|
+
|
|
591
|
+
def interactive_dashboard(self, data, target_col):
|
|
592
|
+
"""Create interactive Plotly dashboard"""
|
|
593
|
+
# Create subplots
|
|
594
|
+
fig = make_subplots(
|
|
595
|
+
rows=2, cols=2,
|
|
596
|
+
subplot_titles=('Feature Importance', 'Prediction Distribution',
|
|
597
|
+
'Residual Analysis', 'Feature Correlation'),
|
|
598
|
+
specs=[[{"secondary_y": False}, {"secondary_y": False}],
|
|
599
|
+
[{"secondary_y": False}, {"secondary_y": False}]]
|
|
600
|
+
)
|
|
601
|
+
|
|
602
|
+
# Feature importance (assuming we have a model)
|
|
603
|
+
numeric_cols = data.select_dtypes(include=[np.number]).columns
|
|
604
|
+
correlations = data[numeric_cols].corrwith(data[target_col]).abs().sort_values(ascending=False)
|
|
605
|
+
|
|
606
|
+
fig.add_trace(
|
|
607
|
+
go.Bar(x=correlations.values[:10], y=correlations.index[:10],
|
|
608
|
+
orientation='h', name='Correlation with Target'),
|
|
609
|
+
row=1, col=1
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
# Target distribution
|
|
613
|
+
fig.add_trace(
|
|
614
|
+
go.Histogram(x=data[target_col], name='Target Distribution'),
|
|
615
|
+
row=1, col=2
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
# Scatter plot of top correlated feature vs target
|
|
619
|
+
top_feature = correlations.index[1] # Skip target itself
|
|
620
|
+
fig.add_trace(
|
|
621
|
+
go.Scatter(x=data[top_feature], y=data[target_col],
|
|
622
|
+
mode='markers', name=f'{top_feature} vs {target_col}'),
|
|
623
|
+
row=2, col=1
|
|
624
|
+
)
|
|
625
|
+
|
|
626
|
+
# Correlation heatmap
|
|
627
|
+
corr_matrix = data[numeric_cols].corr()
|
|
628
|
+
fig.add_trace(
|
|
629
|
+
go.Heatmap(z=corr_matrix.values,
|
|
630
|
+
x=corr_matrix.columns,
|
|
631
|
+
y=corr_matrix.columns,
|
|
632
|
+
colorscale='RdBu', zmid=0),
|
|
633
|
+
row=2, col=2
|
|
634
|
+
)
|
|
635
|
+
|
|
636
|
+
fig.update_layout(height=800, showlegend=False,
|
|
637
|
+
title_text="Data Science Dashboard")
|
|
638
|
+
return fig
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
## Best Practices
|
|
642
|
+
1. **Data Quality**: Always validate and clean data before analysis
|
|
643
|
+
2. **Reproducibility**: Use random seeds and version control for experiments
|
|
644
|
+
3. **Cross-Validation**: Use proper validation techniques to avoid overfitting
|
|
645
|
+
4. **Feature Engineering**: Invest time in creating meaningful features
|
|
646
|
+
5. **Model Interpretability**: Use SHAP, LIME for model explanation
|
|
647
|
+
6. **Statistical Significance**: Don't confuse statistical and practical significance
|
|
648
|
+
7. **Documentation**: Document assumptions, methodologies, and findings
|
|
649
|
+
|
|
650
|
+
## Experimental Design
|
|
651
|
+
- Design experiments with proper controls and randomization
|
|
652
|
+
- Calculate required sample sizes before data collection
|
|
653
|
+
- Account for multiple testing corrections
|
|
654
|
+
- Use appropriate statistical tests for your data type
|
|
655
|
+
- Consider confounding variables and bias sources
|
|
656
|
+
- Plan for missing data and outlier handling
|
|
657
|
+
|
|
658
|
+
## Approach
|
|
659
|
+
- Start with exploratory data analysis and data quality assessment
|
|
660
|
+
- Define clear hypotheses and success metrics
|
|
661
|
+
- Choose appropriate statistical methods and models
|
|
662
|
+
- Validate results using multiple approaches
|
|
663
|
+
- Communicate findings with clear visualizations
|
|
664
|
+
- Document methodology and provide reproducible code
|
|
665
|
+
|
|
666
|
+
## Output Format
|
|
667
|
+
- Provide complete analysis notebooks with explanations
|
|
668
|
+
- Include statistical test results and interpretations
|
|
669
|
+
- Create comprehensive visualizations and dashboards
|
|
670
|
+
- Document assumptions and limitations
|
|
671
|
+
- Provide actionable recommendations based on findings
|
|
672
|
+
- Include code for reproducibility and further analysis
|