claude-autopm 2.8.2 → 2.8.4
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/README.md +399 -637
- package/install/install.js +15 -5
- package/package.json +2 -1
- package/packages/plugin-ai/LICENSE +21 -0
- package/packages/plugin-ai/README.md +316 -0
- package/packages/plugin-ai/agents/anthropic-claude-expert.md +579 -0
- package/packages/plugin-ai/agents/azure-openai-expert.md +1411 -0
- package/packages/plugin-ai/agents/gemini-api-expert.md +880 -0
- package/packages/plugin-ai/agents/google-a2a-expert.md +1445 -0
- package/packages/plugin-ai/agents/huggingface-expert.md +2131 -0
- package/packages/plugin-ai/agents/langchain-expert.md +1427 -0
- package/packages/plugin-ai/agents/langgraph-workflow-expert.md +520 -0
- package/packages/plugin-ai/agents/openai-python-expert.md +1087 -0
- package/packages/plugin-ai/commands/a2a-setup.md +886 -0
- package/packages/plugin-ai/commands/ai-model-deployment.md +481 -0
- package/packages/plugin-ai/commands/anthropic-optimize.md +793 -0
- package/packages/plugin-ai/commands/huggingface-deploy.md +789 -0
- package/packages/plugin-ai/commands/langchain-optimize.md +807 -0
- package/packages/plugin-ai/commands/llm-optimize.md +348 -0
- package/packages/plugin-ai/commands/openai-optimize.md +863 -0
- package/packages/plugin-ai/commands/rag-optimize.md +841 -0
- package/packages/plugin-ai/commands/rag-setup-scaffold.md +382 -0
- package/packages/plugin-ai/package.json +66 -0
- package/packages/plugin-ai/plugin.json +519 -0
- package/packages/plugin-ai/rules/ai-model-standards.md +449 -0
- package/packages/plugin-ai/rules/prompt-engineering-standards.md +509 -0
- package/packages/plugin-ai/scripts/examples/huggingface-inference-example.py +145 -0
- package/packages/plugin-ai/scripts/examples/langchain-rag-example.py +366 -0
- package/packages/plugin-ai/scripts/examples/mlflow-tracking-example.py +224 -0
- package/packages/plugin-ai/scripts/examples/openai-chat-example.py +425 -0
- package/packages/plugin-cloud/README.md +268 -0
- package/packages/plugin-cloud/agents/README.md +55 -0
- package/packages/plugin-cloud/agents/aws-cloud-architect.md +521 -0
- package/packages/plugin-cloud/agents/azure-cloud-architect.md +436 -0
- package/packages/plugin-cloud/agents/gcp-cloud-architect.md +385 -0
- package/packages/plugin-cloud/agents/gcp-cloud-functions-engineer.md +306 -0
- package/packages/plugin-cloud/agents/gemini-api-expert.md +880 -0
- package/packages/plugin-cloud/agents/kubernetes-orchestrator.md +566 -0
- package/packages/plugin-cloud/agents/openai-python-expert.md +1087 -0
- package/packages/plugin-cloud/agents/terraform-infrastructure-expert.md +454 -0
- package/packages/plugin-cloud/commands/cloud-cost-optimize.md +243 -0
- package/packages/plugin-cloud/commands/cloud-validate.md +196 -0
- package/packages/plugin-cloud/commands/infra-deploy.md +38 -0
- package/packages/plugin-cloud/commands/k8s-deploy.md +37 -0
- package/packages/plugin-cloud/commands/ssh-security.md +65 -0
- package/packages/plugin-cloud/commands/traefik-setup.md +65 -0
- package/packages/plugin-cloud/hooks/pre-cloud-deploy.js +456 -0
- package/packages/plugin-cloud/package.json +64 -0
- package/packages/plugin-cloud/plugin.json +338 -0
- package/packages/plugin-cloud/rules/cloud-security-compliance.md +313 -0
- package/packages/plugin-cloud/rules/infrastructure-pipeline.md +128 -0
- package/packages/plugin-cloud/scripts/examples/aws-validate.sh +30 -0
- package/packages/plugin-cloud/scripts/examples/azure-setup.sh +33 -0
- package/packages/plugin-cloud/scripts/examples/gcp-setup.sh +39 -0
- package/packages/plugin-cloud/scripts/examples/k8s-validate.sh +40 -0
- package/packages/plugin-cloud/scripts/examples/terraform-init.sh +26 -0
- package/packages/plugin-core/README.md +274 -0
- package/packages/plugin-core/agents/core/agent-manager.md +296 -0
- package/packages/plugin-core/agents/core/code-analyzer.md +131 -0
- package/packages/plugin-core/agents/core/file-analyzer.md +162 -0
- package/packages/plugin-core/agents/core/test-runner.md +200 -0
- package/packages/plugin-core/commands/code-rabbit.md +128 -0
- package/packages/plugin-core/commands/prompt.md +9 -0
- package/packages/plugin-core/commands/re-init.md +9 -0
- package/packages/plugin-core/hooks/context7-reminder.md +29 -0
- package/packages/plugin-core/hooks/enforce-agents.js +125 -0
- package/packages/plugin-core/hooks/enforce-agents.sh +35 -0
- package/packages/plugin-core/hooks/pre-agent-context7.js +224 -0
- package/packages/plugin-core/hooks/pre-command-context7.js +229 -0
- package/packages/plugin-core/hooks/strict-enforce-agents.sh +39 -0
- package/packages/plugin-core/hooks/test-hook.sh +21 -0
- package/packages/plugin-core/hooks/unified-context7-enforcement.sh +38 -0
- package/packages/plugin-core/package.json +45 -0
- package/packages/plugin-core/plugin.json +387 -0
- package/packages/plugin-core/rules/agent-coordination.md +549 -0
- package/packages/plugin-core/rules/agent-mandatory.md +170 -0
- package/packages/plugin-core/rules/ai-integration-patterns.md +219 -0
- package/packages/plugin-core/rules/command-pipelines.md +208 -0
- package/packages/plugin-core/rules/context-optimization.md +176 -0
- package/packages/plugin-core/rules/context7-enforcement.md +327 -0
- package/packages/plugin-core/rules/datetime.md +122 -0
- package/packages/plugin-core/rules/definition-of-done.md +272 -0
- package/packages/plugin-core/rules/development-environments.md +19 -0
- package/packages/plugin-core/rules/development-workflow.md +198 -0
- package/packages/plugin-core/rules/framework-path-rules.md +180 -0
- package/packages/plugin-core/rules/frontmatter-operations.md +64 -0
- package/packages/plugin-core/rules/git-strategy.md +237 -0
- package/packages/plugin-core/rules/golden-rules.md +181 -0
- package/packages/plugin-core/rules/naming-conventions.md +111 -0
- package/packages/plugin-core/rules/no-pr-workflow.md +183 -0
- package/packages/plugin-core/rules/performance-guidelines.md +403 -0
- package/packages/plugin-core/rules/pipeline-mandatory.md +109 -0
- package/packages/plugin-core/rules/security-checklist.md +318 -0
- package/packages/plugin-core/rules/standard-patterns.md +197 -0
- package/packages/plugin-core/rules/strip-frontmatter.md +85 -0
- package/packages/plugin-core/rules/tdd.enforcement.md +103 -0
- package/packages/plugin-core/rules/use-ast-grep.md +113 -0
- package/packages/plugin-core/scripts/lib/datetime-utils.sh +254 -0
- package/packages/plugin-core/scripts/lib/frontmatter-utils.sh +294 -0
- package/packages/plugin-core/scripts/lib/github-utils.sh +221 -0
- package/packages/plugin-core/scripts/lib/logging-utils.sh +199 -0
- package/packages/plugin-core/scripts/lib/validation-utils.sh +339 -0
- package/packages/plugin-core/scripts/mcp/add.sh +7 -0
- package/packages/plugin-core/scripts/mcp/disable.sh +12 -0
- package/packages/plugin-core/scripts/mcp/enable.sh +12 -0
- package/packages/plugin-core/scripts/mcp/list.sh +7 -0
- package/packages/plugin-core/scripts/mcp/sync.sh +8 -0
- package/packages/plugin-data/README.md +315 -0
- package/packages/plugin-data/agents/airflow-orchestration-expert.md +158 -0
- package/packages/plugin-data/agents/kedro-pipeline-expert.md +304 -0
- package/packages/plugin-data/agents/langgraph-workflow-expert.md +530 -0
- package/packages/plugin-data/commands/airflow-dag-scaffold.md +413 -0
- package/packages/plugin-data/commands/kafka-pipeline-scaffold.md +503 -0
- package/packages/plugin-data/package.json +66 -0
- package/packages/plugin-data/plugin.json +294 -0
- package/packages/plugin-data/rules/data-quality-standards.md +373 -0
- package/packages/plugin-data/rules/etl-pipeline-standards.md +255 -0
- package/packages/plugin-data/scripts/examples/airflow-dag-example.py +245 -0
- package/packages/plugin-data/scripts/examples/dbt-transform-example.sql +238 -0
- package/packages/plugin-data/scripts/examples/kafka-streaming-example.py +257 -0
- package/packages/plugin-data/scripts/examples/pandas-etl-example.py +332 -0
- package/packages/plugin-databases/README.md +330 -0
- package/packages/plugin-databases/agents/README.md +50 -0
- package/packages/plugin-databases/agents/bigquery-expert.md +401 -0
- package/packages/plugin-databases/agents/cosmosdb-expert.md +375 -0
- package/packages/plugin-databases/agents/mongodb-expert.md +407 -0
- package/packages/plugin-databases/agents/postgresql-expert.md +329 -0
- package/packages/plugin-databases/agents/redis-expert.md +74 -0
- package/packages/plugin-databases/commands/db-optimize.md +612 -0
- package/packages/plugin-databases/package.json +60 -0
- package/packages/plugin-databases/plugin.json +237 -0
- package/packages/plugin-databases/rules/database-management-strategy.md +146 -0
- package/packages/plugin-databases/rules/database-pipeline.md +316 -0
- package/packages/plugin-databases/scripts/examples/bigquery-cost-analyze.sh +160 -0
- package/packages/plugin-databases/scripts/examples/cosmosdb-ru-optimize.sh +163 -0
- package/packages/plugin-databases/scripts/examples/mongodb-shard-check.sh +120 -0
- package/packages/plugin-databases/scripts/examples/postgres-index-analyze.sh +95 -0
- package/packages/plugin-databases/scripts/examples/redis-cache-stats.sh +121 -0
- package/packages/plugin-devops/README.md +367 -0
- package/packages/plugin-devops/agents/README.md +52 -0
- package/packages/plugin-devops/agents/azure-devops-specialist.md +308 -0
- package/packages/plugin-devops/agents/docker-containerization-expert.md +298 -0
- package/packages/plugin-devops/agents/github-operations-specialist.md +335 -0
- package/packages/plugin-devops/agents/mcp-context-manager.md +319 -0
- package/packages/plugin-devops/agents/observability-engineer.md +574 -0
- package/packages/plugin-devops/agents/ssh-operations-expert.md +1093 -0
- package/packages/plugin-devops/agents/traefik-proxy-expert.md +444 -0
- package/packages/plugin-devops/commands/ci-pipeline-create.md +581 -0
- package/packages/plugin-devops/commands/docker-optimize.md +493 -0
- package/packages/plugin-devops/commands/workflow-create.md +42 -0
- package/packages/plugin-devops/hooks/pre-docker-build.js +472 -0
- package/packages/plugin-devops/package.json +61 -0
- package/packages/plugin-devops/plugin.json +302 -0
- package/packages/plugin-devops/rules/ci-cd-kubernetes-strategy.md +25 -0
- package/packages/plugin-devops/rules/devops-troubleshooting-playbook.md +450 -0
- package/packages/plugin-devops/rules/docker-first-development.md +404 -0
- package/packages/plugin-devops/rules/github-operations.md +92 -0
- package/packages/plugin-devops/scripts/examples/docker-build-multistage.sh +43 -0
- package/packages/plugin-devops/scripts/examples/docker-compose-validate.sh +74 -0
- package/packages/plugin-devops/scripts/examples/github-workflow-validate.sh +48 -0
- package/packages/plugin-devops/scripts/examples/prometheus-health-check.sh +58 -0
- package/packages/plugin-devops/scripts/examples/ssh-key-setup.sh +74 -0
- package/packages/plugin-frameworks/README.md +309 -0
- package/packages/plugin-frameworks/agents/README.md +64 -0
- package/packages/plugin-frameworks/agents/e2e-test-engineer.md +579 -0
- package/packages/plugin-frameworks/agents/nats-messaging-expert.md +254 -0
- package/packages/plugin-frameworks/agents/react-frontend-engineer.md +393 -0
- package/packages/plugin-frameworks/agents/react-ui-expert.md +226 -0
- package/packages/plugin-frameworks/agents/tailwindcss-expert.md +1021 -0
- package/packages/plugin-frameworks/agents/ux-design-expert.md +244 -0
- package/packages/plugin-frameworks/commands/app-scaffold.md +50 -0
- package/packages/plugin-frameworks/commands/nextjs-optimize.md +692 -0
- package/packages/plugin-frameworks/commands/react-optimize.md +583 -0
- package/packages/plugin-frameworks/commands/tailwind-system.md +64 -0
- package/packages/plugin-frameworks/package.json +59 -0
- package/packages/plugin-frameworks/plugin.json +224 -0
- package/packages/plugin-frameworks/rules/performance-guidelines.md +403 -0
- package/packages/plugin-frameworks/rules/ui-development-standards.md +281 -0
- package/packages/plugin-frameworks/rules/ui-framework-rules.md +151 -0
- package/packages/plugin-frameworks/scripts/examples/react-component-perf.sh +34 -0
- package/packages/plugin-frameworks/scripts/examples/tailwind-optimize.sh +44 -0
- package/packages/plugin-frameworks/scripts/examples/vue-composition-check.sh +41 -0
- package/packages/plugin-languages/README.md +333 -0
- package/packages/plugin-languages/agents/README.md +50 -0
- package/packages/plugin-languages/agents/bash-scripting-expert.md +541 -0
- package/packages/plugin-languages/agents/javascript-frontend-engineer.md +197 -0
- package/packages/plugin-languages/agents/nodejs-backend-engineer.md +226 -0
- package/packages/plugin-languages/agents/python-backend-engineer.md +214 -0
- package/packages/plugin-languages/agents/python-backend-expert.md +289 -0
- package/packages/plugin-languages/commands/javascript-optimize.md +636 -0
- package/packages/plugin-languages/commands/nodejs-api-scaffold.md +341 -0
- package/packages/plugin-languages/commands/nodejs-optimize.md +689 -0
- package/packages/plugin-languages/commands/python-api-scaffold.md +261 -0
- package/packages/plugin-languages/commands/python-optimize.md +593 -0
- package/packages/plugin-languages/package.json +65 -0
- package/packages/plugin-languages/plugin.json +265 -0
- package/packages/plugin-languages/rules/code-quality-standards.md +496 -0
- package/packages/plugin-languages/rules/testing-standards.md +768 -0
- package/packages/plugin-languages/scripts/examples/bash-production-script.sh +520 -0
- package/packages/plugin-languages/scripts/examples/javascript-es6-patterns.js +291 -0
- package/packages/plugin-languages/scripts/examples/nodejs-async-iteration.js +360 -0
- package/packages/plugin-languages/scripts/examples/python-async-patterns.py +289 -0
- package/packages/plugin-languages/scripts/examples/typescript-patterns.ts +432 -0
- package/packages/plugin-ml/README.md +430 -0
- package/packages/plugin-ml/agents/automl-expert.md +326 -0
- package/packages/plugin-ml/agents/computer-vision-expert.md +550 -0
- package/packages/plugin-ml/agents/gradient-boosting-expert.md +455 -0
- package/packages/plugin-ml/agents/neural-network-architect.md +1228 -0
- package/packages/plugin-ml/agents/nlp-transformer-expert.md +584 -0
- package/packages/plugin-ml/agents/pytorch-expert.md +412 -0
- package/packages/plugin-ml/agents/reinforcement-learning-expert.md +2088 -0
- package/packages/plugin-ml/agents/scikit-learn-expert.md +228 -0
- package/packages/plugin-ml/agents/tensorflow-keras-expert.md +509 -0
- package/packages/plugin-ml/agents/time-series-expert.md +303 -0
- package/packages/plugin-ml/commands/ml-automl.md +572 -0
- package/packages/plugin-ml/commands/ml-train-optimize.md +657 -0
- package/packages/plugin-ml/package.json +52 -0
- package/packages/plugin-ml/plugin.json +338 -0
- package/packages/plugin-pm/README.md +368 -0
- package/packages/plugin-pm/claudeautopm-plugin-pm-2.0.0.tgz +0 -0
- package/packages/plugin-pm/commands/azure/COMMANDS.md +107 -0
- package/packages/plugin-pm/commands/azure/COMMAND_MAPPING.md +252 -0
- package/packages/plugin-pm/commands/azure/INTEGRATION_FIX.md +103 -0
- package/packages/plugin-pm/commands/azure/README.md +246 -0
- package/packages/plugin-pm/commands/azure/active-work.md +198 -0
- package/packages/plugin-pm/commands/azure/aliases.md +143 -0
- package/packages/plugin-pm/commands/azure/blocked-items.md +287 -0
- package/packages/plugin-pm/commands/azure/clean.md +93 -0
- package/packages/plugin-pm/commands/azure/docs-query.md +48 -0
- package/packages/plugin-pm/commands/azure/feature-decompose.md +380 -0
- package/packages/plugin-pm/commands/azure/feature-list.md +61 -0
- package/packages/plugin-pm/commands/azure/feature-new.md +115 -0
- package/packages/plugin-pm/commands/azure/feature-show.md +205 -0
- package/packages/plugin-pm/commands/azure/feature-start.md +130 -0
- package/packages/plugin-pm/commands/azure/fix-integration-example.md +93 -0
- package/packages/plugin-pm/commands/azure/help.md +150 -0
- package/packages/plugin-pm/commands/azure/import-us.md +269 -0
- package/packages/plugin-pm/commands/azure/init.md +211 -0
- package/packages/plugin-pm/commands/azure/next-task.md +262 -0
- package/packages/plugin-pm/commands/azure/search.md +160 -0
- package/packages/plugin-pm/commands/azure/sprint-status.md +235 -0
- package/packages/plugin-pm/commands/azure/standup.md +260 -0
- package/packages/plugin-pm/commands/azure/sync-all.md +99 -0
- package/packages/plugin-pm/commands/azure/task-analyze.md +186 -0
- package/packages/plugin-pm/commands/azure/task-close.md +329 -0
- package/packages/plugin-pm/commands/azure/task-edit.md +145 -0
- package/packages/plugin-pm/commands/azure/task-list.md +263 -0
- package/packages/plugin-pm/commands/azure/task-new.md +84 -0
- package/packages/plugin-pm/commands/azure/task-reopen.md +79 -0
- package/packages/plugin-pm/commands/azure/task-show.md +126 -0
- package/packages/plugin-pm/commands/azure/task-start.md +301 -0
- package/packages/plugin-pm/commands/azure/task-status.md +65 -0
- package/packages/plugin-pm/commands/azure/task-sync.md +67 -0
- package/packages/plugin-pm/commands/azure/us-edit.md +164 -0
- package/packages/plugin-pm/commands/azure/us-list.md +202 -0
- package/packages/plugin-pm/commands/azure/us-new.md +265 -0
- package/packages/plugin-pm/commands/azure/us-parse.md +253 -0
- package/packages/plugin-pm/commands/azure/us-show.md +188 -0
- package/packages/plugin-pm/commands/azure/us-status.md +320 -0
- package/packages/plugin-pm/commands/azure/validate.md +86 -0
- package/packages/plugin-pm/commands/azure/work-item-sync.md +47 -0
- package/packages/plugin-pm/commands/blocked.md +28 -0
- package/packages/plugin-pm/commands/clean.md +119 -0
- package/packages/plugin-pm/commands/context-create.md +136 -0
- package/packages/plugin-pm/commands/context-prime.md +170 -0
- package/packages/plugin-pm/commands/context-update.md +292 -0
- package/packages/plugin-pm/commands/context.md +28 -0
- package/packages/plugin-pm/commands/epic-close.md +86 -0
- package/packages/plugin-pm/commands/epic-decompose.md +370 -0
- package/packages/plugin-pm/commands/epic-edit.md +83 -0
- package/packages/plugin-pm/commands/epic-list.md +30 -0
- package/packages/plugin-pm/commands/epic-merge.md +222 -0
- package/packages/plugin-pm/commands/epic-oneshot.md +119 -0
- package/packages/plugin-pm/commands/epic-refresh.md +119 -0
- package/packages/plugin-pm/commands/epic-show.md +28 -0
- package/packages/plugin-pm/commands/epic-split.md +120 -0
- package/packages/plugin-pm/commands/epic-start.md +195 -0
- package/packages/plugin-pm/commands/epic-status.md +28 -0
- package/packages/plugin-pm/commands/epic-sync-modular.md +338 -0
- package/packages/plugin-pm/commands/epic-sync-original.md +473 -0
- package/packages/plugin-pm/commands/epic-sync.md +486 -0
- package/packages/plugin-pm/commands/github/workflow-create.md +42 -0
- package/packages/plugin-pm/commands/help.md +28 -0
- package/packages/plugin-pm/commands/import.md +115 -0
- package/packages/plugin-pm/commands/in-progress.md +28 -0
- package/packages/plugin-pm/commands/init.md +28 -0
- package/packages/plugin-pm/commands/issue-analyze.md +202 -0
- package/packages/plugin-pm/commands/issue-close.md +119 -0
- package/packages/plugin-pm/commands/issue-edit.md +93 -0
- package/packages/plugin-pm/commands/issue-reopen.md +87 -0
- package/packages/plugin-pm/commands/issue-show.md +41 -0
- package/packages/plugin-pm/commands/issue-start.md +234 -0
- package/packages/plugin-pm/commands/issue-status.md +95 -0
- package/packages/plugin-pm/commands/issue-sync.md +411 -0
- package/packages/plugin-pm/commands/next.md +28 -0
- package/packages/plugin-pm/commands/prd-edit.md +82 -0
- package/packages/plugin-pm/commands/prd-list.md +28 -0
- package/packages/plugin-pm/commands/prd-new.md +55 -0
- package/packages/plugin-pm/commands/prd-parse.md +42 -0
- package/packages/plugin-pm/commands/prd-status.md +28 -0
- package/packages/plugin-pm/commands/search.md +28 -0
- package/packages/plugin-pm/commands/standup.md +28 -0
- package/packages/plugin-pm/commands/status.md +28 -0
- package/packages/plugin-pm/commands/sync.md +99 -0
- package/packages/plugin-pm/commands/test-reference-update.md +151 -0
- package/packages/plugin-pm/commands/validate.md +28 -0
- package/packages/plugin-pm/commands/what-next.md +28 -0
- package/packages/plugin-pm/package.json +57 -0
- package/packages/plugin-pm/plugin.json +503 -0
- package/packages/plugin-pm/scripts/pm/analytics.js +425 -0
- package/packages/plugin-pm/scripts/pm/blocked.js +164 -0
- package/packages/plugin-pm/scripts/pm/blocked.sh +78 -0
- package/packages/plugin-pm/scripts/pm/clean.js +464 -0
- package/packages/plugin-pm/scripts/pm/context-create.js +216 -0
- package/packages/plugin-pm/scripts/pm/context-prime.js +335 -0
- package/packages/plugin-pm/scripts/pm/context-update.js +344 -0
- package/packages/plugin-pm/scripts/pm/context.js +338 -0
- package/packages/plugin-pm/scripts/pm/epic-close.js +347 -0
- package/packages/plugin-pm/scripts/pm/epic-edit.js +382 -0
- package/packages/plugin-pm/scripts/pm/epic-list.js +273 -0
- package/packages/plugin-pm/scripts/pm/epic-list.sh +109 -0
- package/packages/plugin-pm/scripts/pm/epic-show.js +291 -0
- package/packages/plugin-pm/scripts/pm/epic-show.sh +105 -0
- package/packages/plugin-pm/scripts/pm/epic-split.js +522 -0
- package/packages/plugin-pm/scripts/pm/epic-start/epic-start.js +183 -0
- package/packages/plugin-pm/scripts/pm/epic-start/epic-start.sh +94 -0
- package/packages/plugin-pm/scripts/pm/epic-status.js +291 -0
- package/packages/plugin-pm/scripts/pm/epic-status.sh +104 -0
- package/packages/plugin-pm/scripts/pm/epic-sync/README.md +208 -0
- package/packages/plugin-pm/scripts/pm/epic-sync/create-epic-issue.sh +77 -0
- package/packages/plugin-pm/scripts/pm/epic-sync/create-task-issues.sh +86 -0
- package/packages/plugin-pm/scripts/pm/epic-sync/update-epic-file.sh +79 -0
- package/packages/plugin-pm/scripts/pm/epic-sync/update-references.sh +89 -0
- package/packages/plugin-pm/scripts/pm/epic-sync.sh +137 -0
- package/packages/plugin-pm/scripts/pm/help.js +92 -0
- package/packages/plugin-pm/scripts/pm/help.sh +90 -0
- package/packages/plugin-pm/scripts/pm/in-progress.js +178 -0
- package/packages/plugin-pm/scripts/pm/in-progress.sh +93 -0
- package/packages/plugin-pm/scripts/pm/init.js +321 -0
- package/packages/plugin-pm/scripts/pm/init.sh +178 -0
- package/packages/plugin-pm/scripts/pm/issue-close.js +232 -0
- package/packages/plugin-pm/scripts/pm/issue-edit.js +310 -0
- package/packages/plugin-pm/scripts/pm/issue-show.js +272 -0
- package/packages/plugin-pm/scripts/pm/issue-start.js +181 -0
- package/packages/plugin-pm/scripts/pm/issue-sync/format-comment.sh +468 -0
- package/packages/plugin-pm/scripts/pm/issue-sync/gather-updates.sh +460 -0
- package/packages/plugin-pm/scripts/pm/issue-sync/post-comment.sh +330 -0
- package/packages/plugin-pm/scripts/pm/issue-sync/preflight-validation.sh +348 -0
- package/packages/plugin-pm/scripts/pm/issue-sync/update-frontmatter.sh +387 -0
- package/packages/plugin-pm/scripts/pm/lib/README.md +85 -0
- package/packages/plugin-pm/scripts/pm/lib/epic-discovery.js +119 -0
- package/packages/plugin-pm/scripts/pm/lib/logger.js +78 -0
- package/packages/plugin-pm/scripts/pm/next.js +189 -0
- package/packages/plugin-pm/scripts/pm/next.sh +72 -0
- package/packages/plugin-pm/scripts/pm/optimize.js +407 -0
- package/packages/plugin-pm/scripts/pm/pr-create.js +337 -0
- package/packages/plugin-pm/scripts/pm/pr-list.js +257 -0
- package/packages/plugin-pm/scripts/pm/prd-list.js +242 -0
- package/packages/plugin-pm/scripts/pm/prd-list.sh +103 -0
- package/packages/plugin-pm/scripts/pm/prd-new.js +684 -0
- package/packages/plugin-pm/scripts/pm/prd-parse.js +547 -0
- package/packages/plugin-pm/scripts/pm/prd-status.js +152 -0
- package/packages/plugin-pm/scripts/pm/prd-status.sh +63 -0
- package/packages/plugin-pm/scripts/pm/release.js +460 -0
- package/packages/plugin-pm/scripts/pm/search.js +192 -0
- package/packages/plugin-pm/scripts/pm/search.sh +89 -0
- package/packages/plugin-pm/scripts/pm/standup.js +362 -0
- package/packages/plugin-pm/scripts/pm/standup.sh +95 -0
- package/packages/plugin-pm/scripts/pm/status.js +148 -0
- package/packages/plugin-pm/scripts/pm/status.sh +59 -0
- package/packages/plugin-pm/scripts/pm/sync-batch.js +337 -0
- package/packages/plugin-pm/scripts/pm/sync.js +343 -0
- package/packages/plugin-pm/scripts/pm/template-list.js +141 -0
- package/packages/plugin-pm/scripts/pm/template-new.js +366 -0
- package/packages/plugin-pm/scripts/pm/validate.js +274 -0
- package/packages/plugin-pm/scripts/pm/validate.sh +106 -0
- package/packages/plugin-pm/scripts/pm/what-next.js +660 -0
- package/packages/plugin-testing/README.md +401 -0
- package/packages/plugin-testing/agents/frontend-testing-engineer.md +768 -0
- package/packages/plugin-testing/commands/jest-optimize.md +800 -0
- package/packages/plugin-testing/commands/playwright-optimize.md +887 -0
- package/packages/plugin-testing/commands/test-coverage.md +512 -0
- package/packages/plugin-testing/commands/test-performance.md +1041 -0
- package/packages/plugin-testing/commands/test-setup.md +414 -0
- package/packages/plugin-testing/package.json +40 -0
- package/packages/plugin-testing/plugin.json +197 -0
- package/packages/plugin-testing/rules/test-coverage-requirements.md +581 -0
- package/packages/plugin-testing/rules/testing-standards.md +529 -0
- package/packages/plugin-testing/scripts/examples/react-testing-example.test.jsx +460 -0
- package/packages/plugin-testing/scripts/examples/vitest-config-example.js +352 -0
- package/packages/plugin-testing/scripts/examples/vue-testing-example.test.js +586 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: terraform-infrastructure-expert
|
|
3
|
+
description: Use this agent for Terraform infrastructure as code including module development, state management, and multi-cloud deployments. Expert in HCL syntax, resource dependencies, remote backends, workspace management, and Terraform Cloud/Enterprise. Perfect for infrastructure automation, GitOps, and compliance as code.
|
|
4
|
+
tools: Glob, Grep, LS, Read, WebFetch, TodoWrite, WebSearch, Edit, Write, MultiEdit, Bash, Task, Agent
|
|
5
|
+
model: inherit
|
|
6
|
+
color: purple
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Terraform Infrastructure Expert
|
|
10
|
+
|
|
11
|
+
## Test-Driven Development (TDD) Methodology
|
|
12
|
+
|
|
13
|
+
**MANDATORY**: Follow strict TDD principles for all development:
|
|
14
|
+
1. **Write failing tests FIRST** - Before implementing any functionality
|
|
15
|
+
2. **Red-Green-Refactor cycle** - Test fails → Make it pass → Improve code
|
|
16
|
+
3. **One test at a time** - Focus on small, incremental development
|
|
17
|
+
4. **100% coverage for new code** - All new features must have complete test coverage
|
|
18
|
+
5. **Tests as documentation** - Tests should clearly document expected behavior
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
You are a senior Terraform expert specializing in infrastructure as code, multi-cloud deployments, module development, and enterprise-scale infrastructure automation.
|
|
22
|
+
|
|
23
|
+
## Documentation Access via MCP Context7
|
|
24
|
+
|
|
25
|
+
Before starting any implementation, you have access to live documentation through the MCP context7 integration:
|
|
26
|
+
|
|
27
|
+
- **Terraform Documentation**: HCL syntax, providers, resources
|
|
28
|
+
- **Provider Documentation**: AWS, Azure, GCP, Kubernetes providers
|
|
29
|
+
- **Module Registry**: Terraform registry modules and patterns
|
|
30
|
+
- **State Management**: Remote backends, state locking, migration
|
|
31
|
+
- **Best Practices**: Module design, workspace strategies, security
|
|
32
|
+
|
|
33
|
+
**Documentation Queries:**
|
|
34
|
+
|
|
35
|
+
- `mcp://context7/terraform/latest` - Terraform core documentation
|
|
36
|
+
- `mcp://context7/terraform/aws-provider` - AWS provider
|
|
37
|
+
- `mcp://context7/terraform/azure-provider` - Azure provider
|
|
38
|
+
- `mcp://context7/terraform/gcp-provider` - GCP provider
|
|
39
|
+
- `mcp://context7/terraform/kubernetes-provider` - Kubernetes provider
|
|
40
|
+
- `mcp://context7/terraform/modules` - Module development patterns
|
|
41
|
+
- `mcp://context7/terraform/cloud` - Terraform Cloud/Enterprise
|
|
42
|
+
|
|
43
|
+
## Core Expertise
|
|
44
|
+
|
|
45
|
+
### Infrastructure as Code
|
|
46
|
+
|
|
47
|
+
- **HCL Syntax**: Variables, locals, outputs, expressions
|
|
48
|
+
- **Resource Management**: Dependencies, lifecycle, provisioners
|
|
49
|
+
- **Data Sources**: External data, remote state
|
|
50
|
+
- **Functions**: Built-in functions, type constraints
|
|
51
|
+
- **Dynamic Blocks**: Conditional resources, for_each, count
|
|
52
|
+
|
|
53
|
+
### Module Development
|
|
54
|
+
|
|
55
|
+
- **Module Structure**: Inputs, outputs, versions
|
|
56
|
+
- **Composition**: Root modules, child modules
|
|
57
|
+
- **Registry**: Publishing, versioning, documentation
|
|
58
|
+
- **Testing**: Terratest, terraform validate, tflint
|
|
59
|
+
- **Patterns**: Factory modules, wrapper modules
|
|
60
|
+
|
|
61
|
+
### State Management
|
|
62
|
+
|
|
63
|
+
- **Remote Backends**: S3, Azure Storage, GCS, Terraform Cloud
|
|
64
|
+
- **State Locking**: DynamoDB, Azure Blob, GCS
|
|
65
|
+
- **State Migration**: Moving resources, importing
|
|
66
|
+
- **Workspace Management**: Environment isolation
|
|
67
|
+
- **State Surgery**: terraform state commands
|
|
68
|
+
|
|
69
|
+
### Multi-Cloud & Providers
|
|
70
|
+
|
|
71
|
+
- **AWS Provider**: EC2, VPC, RDS, EKS, Lambda
|
|
72
|
+
- **Azure Provider**: VMs, VNET, AKS, Functions
|
|
73
|
+
- **GCP Provider**: GCE, GKE, Cloud Run, BigQuery
|
|
74
|
+
- **Kubernetes Provider**: Resources, helm, manifests
|
|
75
|
+
- **Custom Providers**: Provider development
|
|
76
|
+
|
|
77
|
+
## Structured Output Format
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
🏗️ TERRAFORM ANALYSIS REPORT
|
|
81
|
+
============================
|
|
82
|
+
Terraform Version: [1.5.x]
|
|
83
|
+
Provider Versions: [aws ~> 5.0, azurerm ~> 3.0]
|
|
84
|
+
Module Count: [number]
|
|
85
|
+
Resource Count: [number]
|
|
86
|
+
State Backend: [s3/azurerm/gcs/remote]
|
|
87
|
+
|
|
88
|
+
## Infrastructure Architecture 📐
|
|
89
|
+
```hcl
|
|
90
|
+
module "vpc" {
|
|
91
|
+
source = "terraform-aws-modules/vpc/aws"
|
|
92
|
+
version = "5.0.0"
|
|
93
|
+
|
|
94
|
+
name = var.environment
|
|
95
|
+
cidr = var.vpc_cidr
|
|
96
|
+
|
|
97
|
+
azs = data.aws_availability_zones.available.names
|
|
98
|
+
private_subnets = var.private_subnet_cidrs
|
|
99
|
+
public_subnets = var.public_subnet_cidrs
|
|
100
|
+
|
|
101
|
+
enable_nat_gateway = true
|
|
102
|
+
enable_vpn_gateway = true
|
|
103
|
+
|
|
104
|
+
tags = local.common_tags
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Module Structure 🎯
|
|
109
|
+
| Module | Purpose | Version | Source |
|
|
110
|
+
|--------|---------|---------|--------|
|
|
111
|
+
| networking | VPC setup | 1.0.0 | ./modules/networking |
|
|
112
|
+
| compute | EC2/ASG | 1.2.0 | ./modules/compute |
|
|
113
|
+
| database | RDS setup | 2.0.0 | registry/db |
|
|
114
|
+
|
|
115
|
+
## State Management 🔒
|
|
116
|
+
- Backend: [type]
|
|
117
|
+
- Locking: [enabled/disabled]
|
|
118
|
+
- Encryption: [enabled/disabled]
|
|
119
|
+
- Workspaces: [list]
|
|
120
|
+
|
|
121
|
+
## Compliance & Security 🛡️
|
|
122
|
+
| Check | Status | Details |
|
|
123
|
+
|-------|--------|---------|
|
|
124
|
+
| Encryption at rest | ✅ | All storage encrypted |
|
|
125
|
+
| Network isolation | ✅ | Private subnets used |
|
|
126
|
+
| IAM least privilege | ✅ | Role-based access |
|
|
127
|
+
| Secrets management | ✅ | Using AWS Secrets Manager |
|
|
128
|
+
|
|
129
|
+
## Cost Estimation 💰
|
|
130
|
+
- Monthly Cost: [$estimate]
|
|
131
|
+
- Resource Breakdown: [list]
|
|
132
|
+
- Optimization Opportunities: [suggestions]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Implementation Patterns
|
|
136
|
+
|
|
137
|
+
### Production-Ready Module Structure
|
|
138
|
+
|
|
139
|
+
```hcl
|
|
140
|
+
# modules/eks-cluster/main.tf
|
|
141
|
+
terraform {
|
|
142
|
+
required_version = ">= 1.5"
|
|
143
|
+
|
|
144
|
+
required_providers {
|
|
145
|
+
aws = {
|
|
146
|
+
source = "hashicorp/aws"
|
|
147
|
+
version = "~> 5.0"
|
|
148
|
+
}
|
|
149
|
+
kubernetes = {
|
|
150
|
+
source = "hashicorp/kubernetes"
|
|
151
|
+
version = "~> 2.23"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
locals {
|
|
157
|
+
cluster_name = "${var.project}-${var.environment}-eks"
|
|
158
|
+
|
|
159
|
+
common_tags = merge(
|
|
160
|
+
var.tags,
|
|
161
|
+
{
|
|
162
|
+
Environment = var.environment
|
|
163
|
+
ManagedBy = "Terraform"
|
|
164
|
+
Module = "eks-cluster"
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
# EKS Cluster
|
|
170
|
+
resource "aws_eks_cluster" "this" {
|
|
171
|
+
name = local.cluster_name
|
|
172
|
+
role_arn = aws_iam_role.cluster.arn
|
|
173
|
+
version = var.kubernetes_version
|
|
174
|
+
|
|
175
|
+
vpc_config {
|
|
176
|
+
subnet_ids = var.subnet_ids
|
|
177
|
+
endpoint_private_access = var.endpoint_private_access
|
|
178
|
+
endpoint_public_access = var.endpoint_public_access
|
|
179
|
+
public_access_cidrs = var.public_access_cidrs
|
|
180
|
+
security_group_ids = [aws_security_group.cluster.id]
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
encryption_config {
|
|
184
|
+
provider {
|
|
185
|
+
key_arn = var.kms_key_arn != "" ? var.kms_key_arn : aws_kms_key.eks[0].arn
|
|
186
|
+
}
|
|
187
|
+
resources = ["secrets"]
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
enabled_cluster_log_types = var.cluster_log_types
|
|
191
|
+
|
|
192
|
+
depends_on = [
|
|
193
|
+
aws_iam_role_policy_attachment.cluster_AmazonEKSClusterPolicy,
|
|
194
|
+
aws_iam_role_policy_attachment.cluster_AmazonEKSVPCResourceController,
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
tags = local.common_tags
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
# Node Groups
|
|
201
|
+
resource "aws_eks_node_group" "this" {
|
|
202
|
+
for_each = var.node_groups
|
|
203
|
+
|
|
204
|
+
cluster_name = aws_eks_cluster.this.name
|
|
205
|
+
node_group_name = each.key
|
|
206
|
+
node_role_arn = aws_iam_role.node_group.arn
|
|
207
|
+
subnet_ids = each.value.subnet_ids
|
|
208
|
+
|
|
209
|
+
scaling_config {
|
|
210
|
+
desired_size = each.value.desired_size
|
|
211
|
+
max_size = each.value.max_size
|
|
212
|
+
min_size = each.value.min_size
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
instance_types = each.value.instance_types
|
|
216
|
+
capacity_type = each.value.capacity_type
|
|
217
|
+
|
|
218
|
+
dynamic "launch_template" {
|
|
219
|
+
for_each = each.value.use_launch_template ? [1] : []
|
|
220
|
+
content {
|
|
221
|
+
id = aws_launch_template.node_group[each.key].id
|
|
222
|
+
version = aws_launch_template.node_group[each.key].latest_version
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
labels = each.value.labels
|
|
227
|
+
|
|
228
|
+
dynamic "taint" {
|
|
229
|
+
for_each = each.value.taints
|
|
230
|
+
content {
|
|
231
|
+
key = taint.value.key
|
|
232
|
+
value = taint.value.value
|
|
233
|
+
effect = taint.value.effect
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
tags = merge(
|
|
238
|
+
local.common_tags,
|
|
239
|
+
each.value.tags
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
lifecycle {
|
|
243
|
+
create_before_destroy = true
|
|
244
|
+
ignore_changes = [scaling_config[0].desired_size]
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Variables and Validation
|
|
250
|
+
|
|
251
|
+
```hcl
|
|
252
|
+
# modules/eks-cluster/variables.tf
|
|
253
|
+
variable "project" {
|
|
254
|
+
description = "Project name"
|
|
255
|
+
type = string
|
|
256
|
+
|
|
257
|
+
validation {
|
|
258
|
+
condition = can(regex("^[a-z][a-z0-9-]{2,28}[a-z0-9]$", var.project))
|
|
259
|
+
error_message = "Project name must be lowercase alphanumeric with hyphens, 4-30 characters."
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
variable "environment" {
|
|
264
|
+
description = "Environment name"
|
|
265
|
+
type = string
|
|
266
|
+
|
|
267
|
+
validation {
|
|
268
|
+
condition = contains(["dev", "staging", "prod"], var.environment)
|
|
269
|
+
error_message = "Environment must be dev, staging, or prod."
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
variable "node_groups" {
|
|
274
|
+
description = "EKS node group configurations"
|
|
275
|
+
type = map(object({
|
|
276
|
+
desired_size = number
|
|
277
|
+
max_size = number
|
|
278
|
+
min_size = number
|
|
279
|
+
instance_types = list(string)
|
|
280
|
+
capacity_type = string
|
|
281
|
+
subnet_ids = list(string)
|
|
282
|
+
use_launch_template = bool
|
|
283
|
+
labels = map(string)
|
|
284
|
+
taints = list(object({
|
|
285
|
+
key = string
|
|
286
|
+
value = string
|
|
287
|
+
effect = string
|
|
288
|
+
}))
|
|
289
|
+
tags = map(string)
|
|
290
|
+
}))
|
|
291
|
+
|
|
292
|
+
default = {
|
|
293
|
+
general = {
|
|
294
|
+
desired_size = 2
|
|
295
|
+
max_size = 10
|
|
296
|
+
min_size = 1
|
|
297
|
+
instance_types = ["t3.medium"]
|
|
298
|
+
capacity_type = "ON_DEMAND"
|
|
299
|
+
subnet_ids = []
|
|
300
|
+
use_launch_template = true
|
|
301
|
+
labels = {}
|
|
302
|
+
taints = []
|
|
303
|
+
tags = {}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Remote State and Backend
|
|
310
|
+
|
|
311
|
+
```hcl
|
|
312
|
+
# backend.tf
|
|
313
|
+
terraform {
|
|
314
|
+
backend "s3" {
|
|
315
|
+
bucket = "terraform-state-bucket"
|
|
316
|
+
key = "infrastructure/terraform.tfstate"
|
|
317
|
+
region = "us-east-1"
|
|
318
|
+
encrypt = true
|
|
319
|
+
kms_key_id = "arn:aws:kms:us-east-1:123456789012:key/12345678"
|
|
320
|
+
dynamodb_table = "terraform-state-lock"
|
|
321
|
+
|
|
322
|
+
workspace_key_prefix = "workspaces"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
# Remote state data source
|
|
327
|
+
data "terraform_remote_state" "networking" {
|
|
328
|
+
backend = "s3"
|
|
329
|
+
|
|
330
|
+
config = {
|
|
331
|
+
bucket = "terraform-state-bucket"
|
|
332
|
+
key = "networking/terraform.tfstate"
|
|
333
|
+
region = "us-east-1"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
# Using remote state outputs
|
|
338
|
+
resource "aws_instance" "app" {
|
|
339
|
+
subnet_id = data.terraform_remote_state.networking.outputs.private_subnet_ids[0]
|
|
340
|
+
vpc_security_group_ids = [
|
|
341
|
+
data.terraform_remote_state.networking.outputs.app_security_group_id
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Terraform Cloud Integration
|
|
347
|
+
|
|
348
|
+
```hcl
|
|
349
|
+
# terraform.tf
|
|
350
|
+
terraform {
|
|
351
|
+
cloud {
|
|
352
|
+
organization = "my-organization"
|
|
353
|
+
|
|
354
|
+
workspaces {
|
|
355
|
+
tags = ["environment:prod", "team:platform"]
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
# Variable sets in Terraform Cloud
|
|
361
|
+
variable "tfc_aws_provider_auth" {
|
|
362
|
+
description = "TFC AWS Provider Authentication"
|
|
363
|
+
type = object({
|
|
364
|
+
role_arn = string
|
|
365
|
+
})
|
|
366
|
+
default = {
|
|
367
|
+
role_arn = ""
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
# Dynamic provider configuration
|
|
372
|
+
provider "aws" {
|
|
373
|
+
region = var.aws_region
|
|
374
|
+
|
|
375
|
+
dynamic "assume_role" {
|
|
376
|
+
for_each = var.tfc_aws_provider_auth.role_arn != "" ? [1] : []
|
|
377
|
+
|
|
378
|
+
content {
|
|
379
|
+
role_arn = var.tfc_aws_provider_auth.role_arn
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Testing with Terratest
|
|
386
|
+
|
|
387
|
+
```go
|
|
388
|
+
// test/eks_cluster_test.go
|
|
389
|
+
package test
|
|
390
|
+
|
|
391
|
+
import (
|
|
392
|
+
"testing"
|
|
393
|
+
"github.com/gruntwork-io/terratest/modules/terraform"
|
|
394
|
+
"github.com/stretchr/testify/assert"
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
func TestEKSCluster(t *testing.T) {
|
|
398
|
+
terraformOptions := &terraform.Options{
|
|
399
|
+
TerraformDir: "../examples/complete",
|
|
400
|
+
Vars: map[string]interface{}{
|
|
401
|
+
"project": "test",
|
|
402
|
+
"environment": "dev",
|
|
403
|
+
},
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
defer terraform.Destroy(t, terraformOptions)
|
|
407
|
+
terraform.InitAndApply(t, terraformOptions)
|
|
408
|
+
|
|
409
|
+
clusterName := terraform.Output(t, terraformOptions, "cluster_name")
|
|
410
|
+
assert.Contains(t, clusterName, "test-dev-eks")
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
## Best Practices
|
|
415
|
+
|
|
416
|
+
### Module Design
|
|
417
|
+
|
|
418
|
+
- **Single Responsibility**: One module, one purpose
|
|
419
|
+
- **Versioning**: Semantic versioning for modules
|
|
420
|
+
- **Documentation**: README, examples, variables description
|
|
421
|
+
- **Validation**: Input validation rules
|
|
422
|
+
- **Outputs**: Expose necessary values only
|
|
423
|
+
|
|
424
|
+
### State Management
|
|
425
|
+
|
|
426
|
+
- **Remote Backend**: Always use remote state
|
|
427
|
+
- **State Locking**: Enable for consistency
|
|
428
|
+
- **Workspace Isolation**: Separate environments
|
|
429
|
+
- **State Backup**: Regular backup strategy
|
|
430
|
+
- **Sensitive Data**: Mark outputs as sensitive
|
|
431
|
+
|
|
432
|
+
### Security
|
|
433
|
+
|
|
434
|
+
- **Secrets Management**: Never hardcode secrets
|
|
435
|
+
- **IAM Roles**: Use roles over keys
|
|
436
|
+
- **Encryption**: Enable at rest and in transit
|
|
437
|
+
- **Network Security**: Private subnets, security groups
|
|
438
|
+
- **Compliance**: Policy as code with Sentinel/OPA
|
|
439
|
+
|
|
440
|
+
## Self-Verification Protocol
|
|
441
|
+
|
|
442
|
+
Before delivering any solution, verify:
|
|
443
|
+
- [ ] Context7 documentation has been consulted
|
|
444
|
+
- [ ] Code follows HCL best practices
|
|
445
|
+
- [ ] Modules are reusable and versioned
|
|
446
|
+
- [ ] State management is configured properly
|
|
447
|
+
- [ ] Variables have descriptions and validation
|
|
448
|
+
- [ ] Outputs are documented and marked sensitive if needed
|
|
449
|
+
- [ ] Resources have proper tags
|
|
450
|
+
- [ ] terraform fmt and validate pass
|
|
451
|
+
- [ ] Cost estimation is provided
|
|
452
|
+
- [ ] Security best practices are followed
|
|
453
|
+
|
|
454
|
+
You are an expert in designing and implementing enterprise-scale infrastructure as code with Terraform.
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# cloud:cost-optimize
|
|
2
|
+
|
|
3
|
+
Analyze and optimize cloud infrastructure costs across AWS, Azure, and GCP.
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
|
|
7
|
+
Performs comprehensive cost analysis and provides optimization recommendations:
|
|
8
|
+
- Identify unused and underutilized resources
|
|
9
|
+
- Right-sizing recommendations for compute instances
|
|
10
|
+
- Storage class optimization opportunities
|
|
11
|
+
- Reserved instance and savings plan analysis
|
|
12
|
+
- Network data transfer optimization
|
|
13
|
+
- Serverless vs. traditional compute comparisons
|
|
14
|
+
|
|
15
|
+
## Required Documentation Access
|
|
16
|
+
|
|
17
|
+
**MANDATORY:** Before executing cost optimization, query Context7 for best practices:
|
|
18
|
+
|
|
19
|
+
**Documentation Queries:**
|
|
20
|
+
- `mcp://context7/aws/cost-optimization` - AWS Cost Optimization strategies
|
|
21
|
+
- `mcp://context7/azure/cost-management` - Azure Cost Management best practices
|
|
22
|
+
- `mcp://context7/gcp/pricing-optimization` - GCP pricing and cost optimization
|
|
23
|
+
- `mcp://context7/terraform/cost-estimation` - Terraform cost estimation patterns
|
|
24
|
+
- `mcp://context7/finops/cost-optimization` - FinOps cost optimization frameworks
|
|
25
|
+
|
|
26
|
+
**Why This is Required:**
|
|
27
|
+
- Ensures recommendations follow cloud provider pricing models
|
|
28
|
+
- Applies latest cost optimization techniques
|
|
29
|
+
- Validates against FinOps best practices
|
|
30
|
+
- Prevents over-optimization that impacts performance
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
/cloud:cost-optimize [options]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Options
|
|
39
|
+
|
|
40
|
+
- `--provider <aws|azure|gcp|all>` - Cloud provider to analyze (default: all)
|
|
41
|
+
- `--category <compute|storage|network|database|all>` - Resource category (default: all)
|
|
42
|
+
- `--threshold <amount>` - Minimum monthly savings to report (default: $10)
|
|
43
|
+
- `--apply` - Automatically apply low-risk optimizations
|
|
44
|
+
- `--report <path>` - Generate detailed cost report
|
|
45
|
+
- `--period <7d|30d|90d>` - Analysis period (default: 30d)
|
|
46
|
+
|
|
47
|
+
## Examples
|
|
48
|
+
|
|
49
|
+
### Full Cost Analysis
|
|
50
|
+
```bash
|
|
51
|
+
/cloud:cost-optimize
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### AWS Compute Optimization
|
|
55
|
+
```bash
|
|
56
|
+
/cloud:cost-optimize --provider aws --category compute
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Auto-Apply Safe Optimizations
|
|
60
|
+
```bash
|
|
61
|
+
/cloud:cost-optimize --apply --threshold 50
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Generate 90-Day Cost Report
|
|
65
|
+
```bash
|
|
66
|
+
/cloud:cost-optimize --period 90d --report ./cost-optimization.md
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Optimization Categories
|
|
70
|
+
|
|
71
|
+
### Compute Optimization
|
|
72
|
+
- Right-sizing over-provisioned instances
|
|
73
|
+
- Spot/preemptible instance opportunities
|
|
74
|
+
- Auto-scaling configuration improvements
|
|
75
|
+
- Serverless migration candidates
|
|
76
|
+
- Reserved instance/savings plan recommendations
|
|
77
|
+
|
|
78
|
+
### Storage Optimization
|
|
79
|
+
- Lifecycle policy for infrequent access data
|
|
80
|
+
- Cold storage migration opportunities
|
|
81
|
+
- Unused volume detection and deletion
|
|
82
|
+
- Snapshot retention optimization
|
|
83
|
+
- Block storage to object storage migration
|
|
84
|
+
|
|
85
|
+
### Network Optimization
|
|
86
|
+
- Data transfer cost reduction strategies
|
|
87
|
+
- CDN usage optimization
|
|
88
|
+
- NAT gateway cost reduction
|
|
89
|
+
- Cross-region traffic minimization
|
|
90
|
+
- VPN vs. Direct Connect analysis
|
|
91
|
+
|
|
92
|
+
### Database Optimization
|
|
93
|
+
- Right-sizing database instances
|
|
94
|
+
- Read replica optimization
|
|
95
|
+
- Backup retention policy optimization
|
|
96
|
+
- Serverless database opportunities
|
|
97
|
+
- Connection pooling improvements
|
|
98
|
+
|
|
99
|
+
## Implementation
|
|
100
|
+
|
|
101
|
+
This command uses specialized cloud agents:
|
|
102
|
+
|
|
103
|
+
1. **@aws-cloud-architect** - AWS cost analysis
|
|
104
|
+
2. **@azure-cloud-architect** - Azure cost analysis
|
|
105
|
+
3. **@gcp-cloud-architect** - GCP cost analysis
|
|
106
|
+
4. **@terraform-infrastructure-expert** - IaC cost estimation
|
|
107
|
+
|
|
108
|
+
The command:
|
|
109
|
+
1. Queries Context7 for cost optimization patterns
|
|
110
|
+
2. Analyzes current resource utilization
|
|
111
|
+
3. Compares against pricing models and alternatives
|
|
112
|
+
4. Generates prioritized recommendations
|
|
113
|
+
5. Optionally applies automated optimizations
|
|
114
|
+
6. Projects cost savings with implementation timeline
|
|
115
|
+
|
|
116
|
+
## Risk Levels
|
|
117
|
+
|
|
118
|
+
### Low Risk (Auto-Apply Safe)
|
|
119
|
+
- Delete unused volumes and snapshots
|
|
120
|
+
- Apply storage lifecycle policies
|
|
121
|
+
- Enable auto-scaling where configured
|
|
122
|
+
- Update security group descriptions
|
|
123
|
+
|
|
124
|
+
### Medium Risk (Review Required)
|
|
125
|
+
- Right-size instances (25%+ reduction)
|
|
126
|
+
- Migrate to spot instances
|
|
127
|
+
- Change storage classes
|
|
128
|
+
- Consolidate resources
|
|
129
|
+
|
|
130
|
+
### High Risk (Manual Approval)
|
|
131
|
+
- Terminate running instances
|
|
132
|
+
- Major architecture changes
|
|
133
|
+
- Cross-region migrations
|
|
134
|
+
- Database sizing changes
|
|
135
|
+
|
|
136
|
+
## Output Format
|
|
137
|
+
|
|
138
|
+
### Console Output
|
|
139
|
+
```
|
|
140
|
+
💰 Cloud Cost Optimization Analysis
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
|
|
143
|
+
Current Monthly Cost: $4,250
|
|
144
|
+
Potential Savings: $1,180 (27.8%)
|
|
145
|
+
|
|
146
|
+
AWS Optimization Opportunities
|
|
147
|
+
Compute
|
|
148
|
+
💰 $420/mo - Right-size 8 over-provisioned EC2 instances
|
|
149
|
+
💰 $180/mo - Convert 3 instances to spot
|
|
150
|
+
💰 $90/mo - Enable auto-scaling for development environments
|
|
151
|
+
|
|
152
|
+
Storage
|
|
153
|
+
💰 $120/mo - Move 500GB to Glacier Deep Archive
|
|
154
|
+
💰 $60/mo - Delete 15 unused EBS volumes
|
|
155
|
+
|
|
156
|
+
Network
|
|
157
|
+
💰 $80/mo - Optimize CloudFront distribution
|
|
158
|
+
|
|
159
|
+
Azure Optimization Opportunities
|
|
160
|
+
Compute
|
|
161
|
+
💰 $150/mo - Right-size 4 VMs
|
|
162
|
+
💰 $80/mo - Reserved instance for production VMs
|
|
163
|
+
|
|
164
|
+
Summary by Risk Level
|
|
165
|
+
🟢 Low Risk: $240/mo (auto-apply with --apply)
|
|
166
|
+
🟡 Medium Risk: $680/mo (review recommended)
|
|
167
|
+
🔴 High Risk: $260/mo (manual approval required)
|
|
168
|
+
|
|
169
|
+
Recommended Actions
|
|
170
|
+
1. Apply low-risk optimizations immediately
|
|
171
|
+
2. Review medium-risk recommendations with team
|
|
172
|
+
3. Plan high-risk changes for next maintenance window
|
|
173
|
+
|
|
174
|
+
Projected Timeline
|
|
175
|
+
Immediate: $240/mo savings
|
|
176
|
+
Week 1: $920/mo cumulative savings
|
|
177
|
+
Month 1: $1,180/mo total savings
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Report Output
|
|
181
|
+
Generates detailed markdown report with:
|
|
182
|
+
- Executive summary with ROI analysis
|
|
183
|
+
- Detailed findings by provider and category
|
|
184
|
+
- Cost trend analysis
|
|
185
|
+
- Prioritized recommendation list with implementation steps
|
|
186
|
+
- Risk assessment matrix
|
|
187
|
+
- Projected savings timeline
|
|
188
|
+
|
|
189
|
+
## Related Commands
|
|
190
|
+
|
|
191
|
+
- `/cloud:validate` - Validate infrastructure before optimization
|
|
192
|
+
- `/cloud:deploy` - Deploy optimized infrastructure
|
|
193
|
+
- `/cloud:monitor` - Monitor cost trends over time
|
|
194
|
+
|
|
195
|
+
## Best Practices
|
|
196
|
+
|
|
197
|
+
1. **Regular Analysis**: Run monthly cost optimization reviews
|
|
198
|
+
2. **Start Small**: Apply low-risk optimizations first
|
|
199
|
+
3. **Monitor Impact**: Track actual vs. projected savings
|
|
200
|
+
4. **Document Decisions**: Record why certain optimizations weren't applied
|
|
201
|
+
5. **Automate**: Schedule automated optimization for non-production environments
|
|
202
|
+
|
|
203
|
+
## Auto-Apply Rules
|
|
204
|
+
|
|
205
|
+
When using `--apply`, only these optimizations are automatically applied:
|
|
206
|
+
|
|
207
|
+
✅ **Safe Optimizations**
|
|
208
|
+
- Delete unattached EBS volumes (>30 days old)
|
|
209
|
+
- Delete old snapshots beyond retention policy
|
|
210
|
+
- Apply storage lifecycle policies
|
|
211
|
+
- Tag untagged resources
|
|
212
|
+
- Enable cost allocation tags
|
|
213
|
+
|
|
214
|
+
❌ **Blocked from Auto-Apply**
|
|
215
|
+
- Instance type changes
|
|
216
|
+
- Instance termination
|
|
217
|
+
- Database modifications
|
|
218
|
+
- Network topology changes
|
|
219
|
+
- Any production resource changes
|
|
220
|
+
|
|
221
|
+
## Troubleshooting
|
|
222
|
+
|
|
223
|
+
### Missing Cost Data
|
|
224
|
+
- Ensure Cost Explorer is enabled (AWS)
|
|
225
|
+
- Enable billing export (Azure, GCP)
|
|
226
|
+
- Wait 24-48 hours for data population
|
|
227
|
+
|
|
228
|
+
### Incomplete Recommendations
|
|
229
|
+
- Check IAM/RBAC permissions for cost APIs
|
|
230
|
+
- Verify CloudWatch/Monitoring metrics are enabled
|
|
231
|
+
- Ensure resource tagging is consistent
|
|
232
|
+
|
|
233
|
+
### Optimization Failures
|
|
234
|
+
- Review resource dependencies before applying
|
|
235
|
+
- Check for attached resources (volumes, IPs)
|
|
236
|
+
- Verify no active workloads on target resources
|
|
237
|
+
|
|
238
|
+
## Version History
|
|
239
|
+
|
|
240
|
+
- v2.0.0 - Initial Schema v2.0 release with Context7 integration
|
|
241
|
+
- Automated low-risk optimizations
|
|
242
|
+
- Multi-cloud support
|
|
243
|
+
- FinOps best practices integration
|