claude-autopm 2.8.1 → 2.8.3

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.
Files changed (450) hide show
  1. package/README.md +399 -529
  2. package/bin/autopm.js +2 -0
  3. package/bin/commands/plugin.js +395 -0
  4. package/bin/commands/team.js +184 -10
  5. package/install/install.js +223 -4
  6. package/lib/plugins/PluginManager.js +1328 -0
  7. package/lib/plugins/PluginManager.old.js +400 -0
  8. package/package.json +5 -1
  9. package/packages/plugin-ai/LICENSE +21 -0
  10. package/packages/plugin-ai/README.md +316 -0
  11. package/packages/plugin-ai/agents/anthropic-claude-expert.md +579 -0
  12. package/packages/plugin-ai/agents/azure-openai-expert.md +1411 -0
  13. package/packages/plugin-ai/agents/google-a2a-expert.md +1445 -0
  14. package/packages/plugin-ai/agents/huggingface-expert.md +2131 -0
  15. package/packages/plugin-ai/agents/langchain-expert.md +1427 -0
  16. package/packages/plugin-ai/commands/a2a-setup.md +886 -0
  17. package/packages/plugin-ai/commands/ai-model-deployment.md +481 -0
  18. package/packages/plugin-ai/commands/anthropic-optimize.md +793 -0
  19. package/packages/plugin-ai/commands/huggingface-deploy.md +789 -0
  20. package/packages/plugin-ai/commands/langchain-optimize.md +807 -0
  21. package/packages/plugin-ai/commands/llm-optimize.md +348 -0
  22. package/packages/plugin-ai/commands/openai-optimize.md +863 -0
  23. package/packages/plugin-ai/commands/rag-optimize.md +841 -0
  24. package/packages/plugin-ai/commands/rag-setup-scaffold.md +382 -0
  25. package/packages/plugin-ai/package.json +66 -0
  26. package/packages/plugin-ai/plugin.json +519 -0
  27. package/packages/plugin-ai/rules/ai-model-standards.md +449 -0
  28. package/packages/plugin-ai/rules/prompt-engineering-standards.md +509 -0
  29. package/packages/plugin-ai/scripts/examples/huggingface-inference-example.py +145 -0
  30. package/packages/plugin-ai/scripts/examples/langchain-rag-example.py +366 -0
  31. package/packages/plugin-ai/scripts/examples/mlflow-tracking-example.py +224 -0
  32. package/packages/plugin-ai/scripts/examples/openai-chat-example.py +425 -0
  33. package/packages/plugin-cloud/README.md +268 -0
  34. package/packages/plugin-cloud/agents/gemini-api-expert.md +880 -0
  35. package/packages/plugin-cloud/agents/openai-python-expert.md +1087 -0
  36. package/packages/plugin-cloud/commands/cloud-cost-optimize.md +243 -0
  37. package/packages/plugin-cloud/commands/cloud-validate.md +196 -0
  38. package/packages/plugin-cloud/hooks/pre-cloud-deploy.js +456 -0
  39. package/packages/plugin-cloud/package.json +64 -0
  40. package/packages/plugin-cloud/plugin.json +338 -0
  41. package/packages/plugin-cloud/rules/cloud-security-compliance.md +313 -0
  42. package/packages/plugin-cloud/scripts/examples/aws-validate.sh +30 -0
  43. package/packages/plugin-cloud/scripts/examples/azure-setup.sh +33 -0
  44. package/packages/plugin-cloud/scripts/examples/gcp-setup.sh +39 -0
  45. package/packages/plugin-cloud/scripts/examples/k8s-validate.sh +40 -0
  46. package/packages/plugin-cloud/scripts/examples/terraform-init.sh +26 -0
  47. package/packages/plugin-core/README.md +274 -0
  48. package/packages/plugin-core/commands/code-rabbit.md +128 -0
  49. package/packages/plugin-core/commands/prompt.md +9 -0
  50. package/packages/plugin-core/commands/re-init.md +9 -0
  51. package/packages/plugin-core/hooks/context7-reminder.md +29 -0
  52. package/packages/plugin-core/hooks/enforce-agents.js +125 -0
  53. package/packages/plugin-core/hooks/enforce-agents.sh +35 -0
  54. package/packages/plugin-core/hooks/pre-agent-context7.js +224 -0
  55. package/packages/plugin-core/hooks/pre-command-context7.js +229 -0
  56. package/packages/plugin-core/hooks/strict-enforce-agents.sh +39 -0
  57. package/packages/plugin-core/hooks/test-hook.sh +21 -0
  58. package/packages/plugin-core/hooks/unified-context7-enforcement.sh +38 -0
  59. package/packages/plugin-core/package.json +45 -0
  60. package/packages/plugin-core/plugin.json +387 -0
  61. package/packages/plugin-core/rules/agent-coordination.md +549 -0
  62. package/packages/plugin-core/rules/agent-mandatory.md +170 -0
  63. package/packages/plugin-core/rules/command-pipelines.md +208 -0
  64. package/packages/plugin-core/rules/context-optimization.md +176 -0
  65. package/packages/plugin-core/rules/context7-enforcement.md +327 -0
  66. package/packages/plugin-core/rules/datetime.md +122 -0
  67. package/packages/plugin-core/rules/definition-of-done.md +272 -0
  68. package/packages/plugin-core/rules/development-environments.md +19 -0
  69. package/packages/plugin-core/rules/development-workflow.md +198 -0
  70. package/packages/plugin-core/rules/framework-path-rules.md +180 -0
  71. package/packages/plugin-core/rules/frontmatter-operations.md +64 -0
  72. package/packages/plugin-core/rules/git-strategy.md +237 -0
  73. package/packages/plugin-core/rules/golden-rules.md +181 -0
  74. package/packages/plugin-core/rules/naming-conventions.md +111 -0
  75. package/packages/plugin-core/rules/no-pr-workflow.md +183 -0
  76. package/packages/plugin-core/rules/pipeline-mandatory.md +109 -0
  77. package/packages/plugin-core/rules/security-checklist.md +318 -0
  78. package/packages/plugin-core/rules/standard-patterns.md +197 -0
  79. package/packages/plugin-core/rules/strip-frontmatter.md +85 -0
  80. package/packages/plugin-core/rules/tdd.enforcement.md +103 -0
  81. package/packages/plugin-core/rules/use-ast-grep.md +113 -0
  82. package/packages/plugin-core/scripts/lib/datetime-utils.sh +254 -0
  83. package/packages/plugin-core/scripts/lib/frontmatter-utils.sh +294 -0
  84. package/packages/plugin-core/scripts/lib/github-utils.sh +221 -0
  85. package/packages/plugin-core/scripts/lib/logging-utils.sh +199 -0
  86. package/packages/plugin-core/scripts/lib/validation-utils.sh +339 -0
  87. package/packages/plugin-core/scripts/mcp/add.sh +7 -0
  88. package/packages/plugin-core/scripts/mcp/disable.sh +12 -0
  89. package/packages/plugin-core/scripts/mcp/enable.sh +12 -0
  90. package/packages/plugin-core/scripts/mcp/list.sh +7 -0
  91. package/packages/plugin-core/scripts/mcp/sync.sh +8 -0
  92. package/packages/plugin-data/README.md +315 -0
  93. package/packages/plugin-data/agents/airflow-orchestration-expert.md +158 -0
  94. package/packages/plugin-data/agents/kedro-pipeline-expert.md +304 -0
  95. package/packages/plugin-data/agents/langgraph-workflow-expert.md +530 -0
  96. package/packages/plugin-data/commands/airflow-dag-scaffold.md +413 -0
  97. package/packages/plugin-data/commands/kafka-pipeline-scaffold.md +503 -0
  98. package/packages/plugin-data/package.json +66 -0
  99. package/packages/plugin-data/plugin.json +294 -0
  100. package/packages/plugin-data/rules/data-quality-standards.md +373 -0
  101. package/packages/plugin-data/rules/etl-pipeline-standards.md +255 -0
  102. package/packages/plugin-data/scripts/examples/airflow-dag-example.py +245 -0
  103. package/packages/plugin-data/scripts/examples/dbt-transform-example.sql +238 -0
  104. package/packages/plugin-data/scripts/examples/kafka-streaming-example.py +257 -0
  105. package/packages/plugin-data/scripts/examples/pandas-etl-example.py +332 -0
  106. package/packages/plugin-databases/README.md +330 -0
  107. package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/bigquery-expert.md +24 -15
  108. package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/cosmosdb-expert.md +22 -15
  109. package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/mongodb-expert.md +24 -15
  110. package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/postgresql-expert.md +23 -15
  111. package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/redis-expert.md +29 -7
  112. package/packages/plugin-databases/commands/db-optimize.md +612 -0
  113. package/packages/plugin-databases/package.json +60 -0
  114. package/packages/plugin-databases/plugin.json +237 -0
  115. package/packages/plugin-databases/rules/database-management-strategy.md +146 -0
  116. package/packages/plugin-databases/rules/database-pipeline.md +316 -0
  117. package/packages/plugin-databases/scripts/examples/bigquery-cost-analyze.sh +160 -0
  118. package/packages/plugin-databases/scripts/examples/cosmosdb-ru-optimize.sh +163 -0
  119. package/packages/plugin-databases/scripts/examples/mongodb-shard-check.sh +120 -0
  120. package/packages/plugin-databases/scripts/examples/postgres-index-analyze.sh +95 -0
  121. package/packages/plugin-databases/scripts/examples/redis-cache-stats.sh +121 -0
  122. package/packages/plugin-devops/README.md +367 -0
  123. package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/github-operations-specialist.md +1 -1
  124. package/packages/plugin-devops/commands/ci-pipeline-create.md +581 -0
  125. package/packages/plugin-devops/commands/docker-optimize.md +493 -0
  126. package/packages/plugin-devops/hooks/pre-docker-build.js +472 -0
  127. package/packages/plugin-devops/package.json +61 -0
  128. package/packages/plugin-devops/plugin.json +302 -0
  129. package/packages/plugin-devops/rules/github-operations.md +92 -0
  130. package/packages/plugin-devops/scripts/examples/docker-build-multistage.sh +43 -0
  131. package/packages/plugin-devops/scripts/examples/docker-compose-validate.sh +74 -0
  132. package/packages/plugin-devops/scripts/examples/github-workflow-validate.sh +48 -0
  133. package/packages/plugin-devops/scripts/examples/prometheus-health-check.sh +58 -0
  134. package/packages/plugin-devops/scripts/examples/ssh-key-setup.sh +74 -0
  135. package/packages/plugin-frameworks/README.md +309 -0
  136. package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/e2e-test-engineer.md +219 -0
  137. package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/react-frontend-engineer.md +176 -0
  138. package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/tailwindcss-expert.md +251 -0
  139. package/packages/plugin-frameworks/commands/nextjs-optimize.md +692 -0
  140. package/packages/plugin-frameworks/commands/react-optimize.md +583 -0
  141. package/packages/plugin-frameworks/package.json +59 -0
  142. package/packages/plugin-frameworks/plugin.json +224 -0
  143. package/packages/plugin-frameworks/rules/performance-guidelines.md +403 -0
  144. package/packages/plugin-frameworks/scripts/examples/react-component-perf.sh +34 -0
  145. package/packages/plugin-frameworks/scripts/examples/tailwind-optimize.sh +44 -0
  146. package/packages/plugin-frameworks/scripts/examples/vue-composition-check.sh +41 -0
  147. package/packages/plugin-languages/README.md +333 -0
  148. package/packages/plugin-languages/commands/javascript-optimize.md +636 -0
  149. package/packages/plugin-languages/commands/nodejs-api-scaffold.md +341 -0
  150. package/packages/plugin-languages/commands/nodejs-optimize.md +689 -0
  151. package/packages/plugin-languages/commands/python-api-scaffold.md +261 -0
  152. package/packages/plugin-languages/commands/python-optimize.md +593 -0
  153. package/packages/plugin-languages/package.json +65 -0
  154. package/packages/plugin-languages/plugin.json +265 -0
  155. package/packages/plugin-languages/rules/code-quality-standards.md +496 -0
  156. package/packages/plugin-languages/rules/testing-standards.md +768 -0
  157. package/packages/plugin-languages/scripts/examples/bash-production-script.sh +520 -0
  158. package/packages/plugin-languages/scripts/examples/javascript-es6-patterns.js +291 -0
  159. package/packages/plugin-languages/scripts/examples/nodejs-async-iteration.js +360 -0
  160. package/packages/plugin-languages/scripts/examples/python-async-patterns.py +289 -0
  161. package/packages/plugin-languages/scripts/examples/typescript-patterns.ts +432 -0
  162. package/packages/plugin-ml/README.md +430 -0
  163. package/packages/plugin-ml/agents/automl-expert.md +326 -0
  164. package/packages/plugin-ml/agents/computer-vision-expert.md +550 -0
  165. package/packages/plugin-ml/agents/gradient-boosting-expert.md +455 -0
  166. package/packages/plugin-ml/agents/neural-network-architect.md +1228 -0
  167. package/packages/plugin-ml/agents/nlp-transformer-expert.md +584 -0
  168. package/packages/plugin-ml/agents/pytorch-expert.md +412 -0
  169. package/packages/plugin-ml/agents/reinforcement-learning-expert.md +2088 -0
  170. package/packages/plugin-ml/agents/scikit-learn-expert.md +228 -0
  171. package/packages/plugin-ml/agents/tensorflow-keras-expert.md +509 -0
  172. package/packages/plugin-ml/agents/time-series-expert.md +303 -0
  173. package/packages/plugin-ml/commands/ml-automl.md +572 -0
  174. package/packages/plugin-ml/commands/ml-train-optimize.md +657 -0
  175. package/packages/plugin-ml/package.json +52 -0
  176. package/packages/plugin-ml/plugin.json +338 -0
  177. package/packages/plugin-pm/README.md +368 -0
  178. package/packages/plugin-pm/claudeautopm-plugin-pm-2.0.0.tgz +0 -0
  179. package/packages/plugin-pm/commands/github/workflow-create.md +42 -0
  180. package/packages/plugin-pm/package.json +57 -0
  181. package/packages/plugin-pm/plugin.json +503 -0
  182. package/packages/plugin-testing/README.md +401 -0
  183. package/{autopm/.claude/agents/testing → packages/plugin-testing/agents}/frontend-testing-engineer.md +373 -0
  184. package/packages/plugin-testing/commands/jest-optimize.md +800 -0
  185. package/packages/plugin-testing/commands/playwright-optimize.md +887 -0
  186. package/packages/plugin-testing/commands/test-coverage.md +512 -0
  187. package/packages/plugin-testing/commands/test-performance.md +1041 -0
  188. package/packages/plugin-testing/commands/test-setup.md +414 -0
  189. package/packages/plugin-testing/package.json +40 -0
  190. package/packages/plugin-testing/plugin.json +197 -0
  191. package/packages/plugin-testing/rules/test-coverage-requirements.md +581 -0
  192. package/packages/plugin-testing/rules/testing-standards.md +529 -0
  193. package/packages/plugin-testing/scripts/examples/react-testing-example.test.jsx +460 -0
  194. package/packages/plugin-testing/scripts/examples/vitest-config-example.js +352 -0
  195. package/packages/plugin-testing/scripts/examples/vue-testing-example.test.js +586 -0
  196. package/scripts/publish-plugins.sh +166 -0
  197. package/autopm/.claude/agents/data/airflow-orchestration-expert.md +0 -52
  198. package/autopm/.claude/agents/data/kedro-pipeline-expert.md +0 -50
  199. package/autopm/.claude/agents/integration/message-queue-engineer.md +0 -794
  200. package/autopm/.claude/commands/ai/langgraph-workflow.md +0 -65
  201. package/autopm/.claude/commands/ai/openai-chat.md +0 -65
  202. package/autopm/.claude/commands/playwright/test-scaffold.md +0 -38
  203. package/autopm/.claude/commands/python/api-scaffold.md +0 -50
  204. package/autopm/.claude/commands/python/docs-query.md +0 -48
  205. package/autopm/.claude/commands/testing/prime.md +0 -314
  206. package/autopm/.claude/commands/testing/run.md +0 -125
  207. package/autopm/.claude/commands/ui/bootstrap-scaffold.md +0 -65
  208. package/autopm/.claude/rules/database-management-strategy.md +0 -17
  209. package/autopm/.claude/rules/database-pipeline.md +0 -94
  210. package/autopm/.claude/rules/ux-design-rules.md +0 -209
  211. package/autopm/.claude/rules/visual-testing.md +0 -223
  212. package/autopm/.claude/scripts/azure/README.md +0 -192
  213. package/autopm/.claude/scripts/azure/active-work.js +0 -524
  214. package/autopm/.claude/scripts/azure/active-work.sh +0 -20
  215. package/autopm/.claude/scripts/azure/blocked.js +0 -520
  216. package/autopm/.claude/scripts/azure/blocked.sh +0 -20
  217. package/autopm/.claude/scripts/azure/daily.js +0 -533
  218. package/autopm/.claude/scripts/azure/daily.sh +0 -20
  219. package/autopm/.claude/scripts/azure/dashboard.js +0 -970
  220. package/autopm/.claude/scripts/azure/dashboard.sh +0 -20
  221. package/autopm/.claude/scripts/azure/feature-list.js +0 -254
  222. package/autopm/.claude/scripts/azure/feature-list.sh +0 -20
  223. package/autopm/.claude/scripts/azure/feature-show.js +0 -7
  224. package/autopm/.claude/scripts/azure/feature-show.sh +0 -20
  225. package/autopm/.claude/scripts/azure/feature-status.js +0 -604
  226. package/autopm/.claude/scripts/azure/feature-status.sh +0 -20
  227. package/autopm/.claude/scripts/azure/help.js +0 -342
  228. package/autopm/.claude/scripts/azure/help.sh +0 -20
  229. package/autopm/.claude/scripts/azure/next-task.js +0 -508
  230. package/autopm/.claude/scripts/azure/next-task.sh +0 -20
  231. package/autopm/.claude/scripts/azure/search.js +0 -469
  232. package/autopm/.claude/scripts/azure/search.sh +0 -20
  233. package/autopm/.claude/scripts/azure/setup.js +0 -745
  234. package/autopm/.claude/scripts/azure/setup.sh +0 -20
  235. package/autopm/.claude/scripts/azure/sprint-report.js +0 -1012
  236. package/autopm/.claude/scripts/azure/sprint-report.sh +0 -20
  237. package/autopm/.claude/scripts/azure/sync.js +0 -563
  238. package/autopm/.claude/scripts/azure/sync.sh +0 -20
  239. package/autopm/.claude/scripts/azure/us-list.js +0 -210
  240. package/autopm/.claude/scripts/azure/us-list.sh +0 -20
  241. package/autopm/.claude/scripts/azure/us-status.js +0 -238
  242. package/autopm/.claude/scripts/azure/us-status.sh +0 -20
  243. package/autopm/.claude/scripts/azure/validate.js +0 -626
  244. package/autopm/.claude/scripts/azure/validate.sh +0 -20
  245. package/autopm/.claude/scripts/azure/wrapper-template.sh +0 -20
  246. package/autopm/.claude/scripts/github/dependency-tracker.js +0 -554
  247. package/autopm/.claude/scripts/github/dependency-validator.js +0 -545
  248. package/autopm/.claude/scripts/github/dependency-visualizer.js +0 -477
  249. package/bin/node/azure-feature-show.js +0 -7
  250. /package/{autopm/.claude/agents/cloud → packages/plugin-ai/agents}/gemini-api-expert.md +0 -0
  251. /package/{autopm/.claude/agents/data → packages/plugin-ai/agents}/langgraph-workflow-expert.md +0 -0
  252. /package/{autopm/.claude/agents/cloud → packages/plugin-ai/agents}/openai-python-expert.md +0 -0
  253. /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/README.md +0 -0
  254. /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/aws-cloud-architect.md +0 -0
  255. /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/azure-cloud-architect.md +0 -0
  256. /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/gcp-cloud-architect.md +0 -0
  257. /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/gcp-cloud-functions-engineer.md +0 -0
  258. /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/kubernetes-orchestrator.md +0 -0
  259. /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/terraform-infrastructure-expert.md +0 -0
  260. /package/{autopm/.claude/commands/cloud → packages/plugin-cloud/commands}/infra-deploy.md +0 -0
  261. /package/{autopm/.claude/commands/kubernetes/deploy.md → packages/plugin-cloud/commands/k8s-deploy.md} +0 -0
  262. /package/{autopm/.claude/commands/infrastructure → packages/plugin-cloud/commands}/ssh-security.md +0 -0
  263. /package/{autopm/.claude/commands/infrastructure → packages/plugin-cloud/commands}/traefik-setup.md +0 -0
  264. /package/{autopm/.claude → packages/plugin-cloud}/rules/infrastructure-pipeline.md +0 -0
  265. /package/{autopm/.claude → packages/plugin-core}/agents/core/agent-manager.md +0 -0
  266. /package/{autopm/.claude → packages/plugin-core}/agents/core/code-analyzer.md +0 -0
  267. /package/{autopm/.claude → packages/plugin-core}/agents/core/file-analyzer.md +0 -0
  268. /package/{autopm/.claude → packages/plugin-core}/agents/core/test-runner.md +0 -0
  269. /package/{autopm/.claude → packages/plugin-core}/rules/ai-integration-patterns.md +0 -0
  270. /package/{autopm/.claude → packages/plugin-core}/rules/performance-guidelines.md +0 -0
  271. /package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/README.md +0 -0
  272. /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/README.md +0 -0
  273. /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/azure-devops-specialist.md +0 -0
  274. /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/docker-containerization-expert.md +0 -0
  275. /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/mcp-context-manager.md +0 -0
  276. /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/observability-engineer.md +0 -0
  277. /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/ssh-operations-expert.md +0 -0
  278. /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/traefik-proxy-expert.md +0 -0
  279. /package/{autopm/.claude/commands/github → packages/plugin-devops/commands}/workflow-create.md +0 -0
  280. /package/{autopm/.claude → packages/plugin-devops}/rules/ci-cd-kubernetes-strategy.md +0 -0
  281. /package/{autopm/.claude → packages/plugin-devops}/rules/devops-troubleshooting-playbook.md +0 -0
  282. /package/{autopm/.claude → packages/plugin-devops}/rules/docker-first-development.md +0 -0
  283. /package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/README.md +0 -0
  284. /package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/nats-messaging-expert.md +0 -0
  285. /package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/react-ui-expert.md +0 -0
  286. /package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/ux-design-expert.md +0 -0
  287. /package/{autopm/.claude/commands/react → packages/plugin-frameworks/commands}/app-scaffold.md +0 -0
  288. /package/{autopm/.claude/commands/ui → packages/plugin-frameworks/commands}/tailwind-system.md +0 -0
  289. /package/{autopm/.claude → packages/plugin-frameworks}/rules/ui-development-standards.md +0 -0
  290. /package/{autopm/.claude → packages/plugin-frameworks}/rules/ui-framework-rules.md +0 -0
  291. /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/README.md +0 -0
  292. /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/bash-scripting-expert.md +0 -0
  293. /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/javascript-frontend-engineer.md +0 -0
  294. /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/nodejs-backend-engineer.md +0 -0
  295. /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/python-backend-engineer.md +0 -0
  296. /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/python-backend-expert.md +0 -0
  297. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/COMMANDS.md +0 -0
  298. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/COMMAND_MAPPING.md +0 -0
  299. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/INTEGRATION_FIX.md +0 -0
  300. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/README.md +0 -0
  301. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/active-work.md +0 -0
  302. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/aliases.md +0 -0
  303. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/blocked-items.md +0 -0
  304. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/clean.md +0 -0
  305. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/docs-query.md +0 -0
  306. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-decompose.md +0 -0
  307. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-list.md +0 -0
  308. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-new.md +0 -0
  309. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-show.md +0 -0
  310. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-start.md +0 -0
  311. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/fix-integration-example.md +0 -0
  312. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/help.md +0 -0
  313. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/import-us.md +0 -0
  314. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/init.md +0 -0
  315. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/next-task.md +0 -0
  316. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/search.md +0 -0
  317. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/sprint-status.md +0 -0
  318. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/standup.md +0 -0
  319. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/sync-all.md +0 -0
  320. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-analyze.md +0 -0
  321. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-close.md +0 -0
  322. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-edit.md +0 -0
  323. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-list.md +0 -0
  324. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-new.md +0 -0
  325. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-reopen.md +0 -0
  326. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-show.md +0 -0
  327. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-start.md +0 -0
  328. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-status.md +0 -0
  329. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-sync.md +0 -0
  330. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-edit.md +0 -0
  331. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-list.md +0 -0
  332. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-new.md +0 -0
  333. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-parse.md +0 -0
  334. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-show.md +0 -0
  335. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-status.md +0 -0
  336. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/validate.md +0 -0
  337. /package/{autopm/.claude → packages/plugin-pm}/commands/azure/work-item-sync.md +0 -0
  338. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/blocked.md +0 -0
  339. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/clean.md +0 -0
  340. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/context-create.md +0 -0
  341. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/context-prime.md +0 -0
  342. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/context-update.md +0 -0
  343. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/context.md +0 -0
  344. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-close.md +0 -0
  345. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-decompose.md +0 -0
  346. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-edit.md +0 -0
  347. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-list.md +0 -0
  348. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-merge.md +0 -0
  349. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-oneshot.md +0 -0
  350. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-refresh.md +0 -0
  351. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-show.md +0 -0
  352. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-split.md +0 -0
  353. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-start.md +0 -0
  354. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-status.md +0 -0
  355. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-sync-modular.md +0 -0
  356. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-sync-original.md +0 -0
  357. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-sync.md +0 -0
  358. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/help.md +0 -0
  359. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/import.md +0 -0
  360. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/in-progress.md +0 -0
  361. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/init.md +0 -0
  362. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-analyze.md +0 -0
  363. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-close.md +0 -0
  364. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-edit.md +0 -0
  365. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-reopen.md +0 -0
  366. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-show.md +0 -0
  367. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-start.md +0 -0
  368. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-status.md +0 -0
  369. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-sync.md +0 -0
  370. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/next.md +0 -0
  371. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-edit.md +0 -0
  372. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-list.md +0 -0
  373. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-new.md +0 -0
  374. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-parse.md +0 -0
  375. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-status.md +0 -0
  376. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/search.md +0 -0
  377. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/standup.md +0 -0
  378. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/status.md +0 -0
  379. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/sync.md +0 -0
  380. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/test-reference-update.md +0 -0
  381. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/validate.md +0 -0
  382. /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/what-next.md +0 -0
  383. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/analytics.js +0 -0
  384. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/blocked.js +0 -0
  385. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/blocked.sh +0 -0
  386. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/clean.js +0 -0
  387. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/context-create.js +0 -0
  388. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/context-prime.js +0 -0
  389. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/context-update.js +0 -0
  390. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/context.js +0 -0
  391. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-close.js +0 -0
  392. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-edit.js +0 -0
  393. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-list.js +0 -0
  394. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-list.sh +0 -0
  395. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-show.js +0 -0
  396. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-show.sh +0 -0
  397. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-split.js +0 -0
  398. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-start/epic-start.js +0 -0
  399. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-start/epic-start.sh +0 -0
  400. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-status.js +0 -0
  401. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-status.sh +0 -0
  402. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/README.md +0 -0
  403. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/create-epic-issue.sh +0 -0
  404. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/create-task-issues.sh +0 -0
  405. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/update-epic-file.sh +0 -0
  406. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/update-references.sh +0 -0
  407. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync.sh +0 -0
  408. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/help.js +0 -0
  409. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/help.sh +0 -0
  410. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/in-progress.js +0 -0
  411. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/in-progress.sh +0 -0
  412. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/init.js +0 -0
  413. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/init.sh +0 -0
  414. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-close.js +0 -0
  415. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-edit.js +0 -0
  416. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-show.js +0 -0
  417. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-start.js +0 -0
  418. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/format-comment.sh +0 -0
  419. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/gather-updates.sh +0 -0
  420. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/post-comment.sh +0 -0
  421. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/preflight-validation.sh +0 -0
  422. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/update-frontmatter.sh +0 -0
  423. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/lib/README.md +0 -0
  424. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/lib/epic-discovery.js +0 -0
  425. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/lib/logger.js +0 -0
  426. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/next.js +0 -0
  427. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/next.sh +0 -0
  428. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/optimize.js +0 -0
  429. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/pr-create.js +0 -0
  430. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/pr-list.js +0 -0
  431. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-list.js +0 -0
  432. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-list.sh +0 -0
  433. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-new.js +0 -0
  434. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-parse.js +0 -0
  435. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-status.js +0 -0
  436. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-status.sh +0 -0
  437. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/release.js +0 -0
  438. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/search.js +0 -0
  439. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/search.sh +0 -0
  440. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/standup.js +0 -0
  441. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/standup.sh +0 -0
  442. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/status.js +0 -0
  443. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/status.sh +0 -0
  444. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/sync-batch.js +0 -0
  445. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/sync.js +0 -0
  446. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/template-list.js +0 -0
  447. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/template-new.js +0 -0
  448. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/validate.js +0 -0
  449. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/validate.sh +0 -0
  450. /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/what-next.js +0 -0
@@ -0,0 +1,332 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ pandas ETL Example - Context7 Best Practices
4
+
5
+ Demonstrates pandas data processing patterns from Context7:
6
+ - Vectorized operations over apply
7
+ - GroupBy aggregations
8
+ - Efficient merging and concatenation
9
+ - Data validation and quality checks
10
+ - Performance optimization
11
+
12
+ Source: /pandas-dev/pandas (7,386 snippets, trust 9.2)
13
+ """
14
+
15
+ import pandas as pd
16
+ import numpy as np
17
+ from datetime import datetime, timedelta
18
+ import logging
19
+
20
+ logging.basicConfig(level=logging.INFO)
21
+ logger = logging.getLogger(__name__)
22
+
23
+
24
+ # ===================================================================
25
+ # EXTRACTION
26
+ # ===================================================================
27
+
28
+ def extract_data() -> tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:
29
+ """
30
+ Extract data from multiple sources.
31
+
32
+ Context7 Pattern: Return DataFrames for downstream processing
33
+ """
34
+ logger.info("Extracting data from sources...")
35
+
36
+ # Generate sample data
37
+ np.random.seed(42)
38
+ n_orders = 1000
39
+
40
+ # Orders data
41
+ orders = pd.DataFrame({
42
+ 'order_id': range(1, n_orders + 1),
43
+ 'customer_id': np.random.randint(1, 201, n_orders),
44
+ 'product_id': np.random.randint(1, 51, n_orders),
45
+ 'quantity': np.random.randint(1, 11, n_orders),
46
+ 'unit_price': np.random.uniform(10, 500, n_orders).round(2),
47
+ 'order_date': [
48
+ datetime(2025, 1, 1) + timedelta(days=int(x))
49
+ for x in np.random.randint(0, 365, n_orders)
50
+ ],
51
+ })
52
+
53
+ # Customers data
54
+ customers = pd.DataFrame({
55
+ 'customer_id': range(1, 201),
56
+ 'customer_name': [f'Customer {i}' for i in range(1, 201)],
57
+ 'customer_email': [f'customer{i}@example.com' for i in range(1, 201)],
58
+ 'customer_segment': np.random.choice(
59
+ ['Enterprise', 'SMB', 'Startup'], 200
60
+ ),
61
+ })
62
+
63
+ # Products data
64
+ products = pd.DataFrame({
65
+ 'product_id': range(1, 51),
66
+ 'product_name': [f'Product {i}' for i in range(1, 51)],
67
+ 'product_category': np.random.choice(
68
+ ['Electronics', 'Software', 'Services'], 50
69
+ ),
70
+ })
71
+
72
+ logger.info(f"✓ Extracted {len(orders)} orders, {len(customers)} customers, {len(products)} products")
73
+ return orders, customers, products
74
+
75
+
76
+ # ===================================================================
77
+ # TRANSFORMATION
78
+ # ===================================================================
79
+
80
+ def transform_data(
81
+ orders: pd.DataFrame,
82
+ customers: pd.DataFrame,
83
+ products: pd.DataFrame,
84
+ ) -> pd.DataFrame:
85
+ """
86
+ Transform and enrich data with Context7 pandas patterns.
87
+
88
+ Context7 Patterns:
89
+ - Vectorized operations (avoid apply when possible)
90
+ - Efficient merging with validation
91
+ - GroupBy aggregations
92
+ """
93
+ logger.info("Transforming data...")
94
+
95
+ # ✅ CORRECT: Vectorized calculation (faster than apply)
96
+ orders['order_total'] = orders['quantity'] * orders['unit_price']
97
+
98
+ # ✅ CORRECT: Vectorized categorization
99
+ orders['order_size'] = pd.cut(
100
+ orders['quantity'],
101
+ bins=[0, 3, 7, float('inf')],
102
+ labels=['small', 'medium', 'large']
103
+ )
104
+
105
+ # ✅ CORRECT: Efficient merge with validation
106
+ enriched = orders.merge(
107
+ customers,
108
+ on='customer_id',
109
+ how='left',
110
+ validate='many_to_one' # Ensure referential integrity
111
+ )
112
+
113
+ enriched = enriched.merge(
114
+ products,
115
+ on='product_id',
116
+ how='left',
117
+ validate='many_to_one'
118
+ )
119
+
120
+ # ✅ CORRECT: GroupBy aggregations
121
+ logger.info("Calculating customer aggregations...")
122
+ customer_aggs = enriched.groupby('customer_id').agg({
123
+ 'order_total': ['sum', 'mean', 'count'],
124
+ 'order_date': 'max',
125
+ })
126
+
127
+ # Flatten column names
128
+ customer_aggs.columns = ['_'.join(col).strip() for col in customer_aggs.columns]
129
+ customer_aggs = customer_aggs.rename(columns={
130
+ 'order_total_sum': 'customer_lifetime_value',
131
+ 'order_total_mean': 'avg_order_value',
132
+ 'order_total_count': 'total_orders',
133
+ 'order_date_max': 'last_order_date',
134
+ })
135
+
136
+ # ✅ CORRECT: Merge aggregations back
137
+ enriched = enriched.merge(
138
+ customer_aggs,
139
+ left_on='customer_id',
140
+ right_index=True,
141
+ how='left'
142
+ )
143
+
144
+ # ✅ CORRECT: GroupBy for product metrics
145
+ logger.info("Calculating product aggregations...")
146
+ product_aggs = enriched.groupby('product_id')['order_total'].agg(['mean', 'count'])
147
+ product_aggs.columns = ['product_avg_order_value', 'product_order_count']
148
+
149
+ enriched = enriched.merge(
150
+ product_aggs,
151
+ left_on='product_id',
152
+ right_index=True,
153
+ how='left'
154
+ )
155
+
156
+ logger.info(f"✓ Transformed {len(enriched)} records")
157
+ return enriched
158
+
159
+
160
+ # ===================================================================
161
+ # VALIDATION
162
+ # ===================================================================
163
+
164
+ def validate_data(df: pd.DataFrame) -> pd.DataFrame:
165
+ """
166
+ Validate data quality with Context7 best practices.
167
+
168
+ Context7 Pattern: Comprehensive validation checks
169
+ """
170
+ logger.info("Validating data quality...")
171
+
172
+ # Schema validation
173
+ required_columns = [
174
+ 'order_id', 'customer_id', 'product_id', 'order_total',
175
+ 'customer_name', 'product_name'
176
+ ]
177
+ missing = [col for col in required_columns if col not in df.columns]
178
+ assert not missing, f"Missing required columns: {missing}"
179
+
180
+ # Null check
181
+ null_counts = df[required_columns].isnull().sum()
182
+ assert null_counts.sum() == 0, f"Null values found: {null_counts[null_counts > 0].to_dict()}"
183
+
184
+ # Type validation
185
+ assert pd.api.types.is_numeric_dtype(df['order_total']), "order_total must be numeric"
186
+ assert pd.api.types.is_integer_dtype(df['order_id']), "order_id must be integer"
187
+
188
+ # Range validation
189
+ assert (df['order_total'] >= 0).all(), "order_total contains negative values"
190
+ assert (df['quantity'] > 0).all(), "quantity must be positive"
191
+
192
+ # Uniqueness check
193
+ assert df['order_id'].is_unique, "Duplicate order_ids found"
194
+
195
+ # Referential integrity
196
+ assert not df['customer_id'].isnull().any(), "Orphan orders (null customer_id)"
197
+ assert not df['product_id'].isnull().any(), "Orphan orders (null product_id)"
198
+
199
+ logger.info("✓ Validation passed")
200
+ return df
201
+
202
+
203
+ # ===================================================================
204
+ # DATA QUALITY METRICS
205
+ # ===================================================================
206
+
207
+ def calculate_quality_metrics(df: pd.DataFrame) -> dict:
208
+ """
209
+ Calculate data quality metrics.
210
+
211
+ Context7 Pattern: Comprehensive metrics for monitoring
212
+ """
213
+ logger.info("Calculating quality metrics...")
214
+
215
+ metrics = {
216
+ # Completeness
217
+ 'total_records': len(df),
218
+ 'completeness_pct': ((df.size - df.isnull().sum().sum()) / df.size * 100),
219
+
220
+ # Distribution
221
+ 'orders_per_customer': {
222
+ 'mean': df.groupby('customer_id').size().mean(),
223
+ 'median': df.groupby('customer_id').size().median(),
224
+ 'max': df.groupby('customer_id').size().max(),
225
+ },
226
+
227
+ # Value ranges
228
+ 'order_total_stats': {
229
+ 'min': df['order_total'].min(),
230
+ 'max': df['order_total'].max(),
231
+ 'mean': df['order_total'].mean(),
232
+ 'median': df['order_total'].median(),
233
+ },
234
+
235
+ # Categorical distribution
236
+ 'customer_segments': df['customer_segment'].value_counts().to_dict(),
237
+ 'product_categories': df['product_category'].value_counts().to_dict(),
238
+ }
239
+
240
+ logger.info(f"✓ Calculated quality metrics")
241
+ return metrics
242
+
243
+
244
+ # ===================================================================
245
+ # LOADING
246
+ # ===================================================================
247
+
248
+ def load_data(df: pd.DataFrame, output_path: str = 'output_orders.parquet') -> None:
249
+ """
250
+ Load data to storage.
251
+
252
+ Context7 Pattern: Use Parquet for efficient storage
253
+ """
254
+ logger.info(f"Loading {len(df)} records to {output_path}...")
255
+
256
+ # ✅ CORRECT: Parquet for efficient storage
257
+ df.to_parquet(
258
+ output_path,
259
+ engine='pyarrow',
260
+ compression='snappy',
261
+ index=False
262
+ )
263
+
264
+ logger.info(f"✓ Loaded to {output_path}")
265
+
266
+
267
+ # ===================================================================
268
+ # MAIN ETL PIPELINE
269
+ # ===================================================================
270
+
271
+ def run_etl_pipeline():
272
+ """Run complete ETL pipeline with Context7 patterns."""
273
+ print("\n" + "=" * 60)
274
+ print("pandas ETL Pipeline - Context7 Best Practices")
275
+ print("=" * 60)
276
+
277
+ start_time = datetime.now()
278
+
279
+ try:
280
+ # Extract
281
+ orders, customers, products = extract_data()
282
+
283
+ # Transform
284
+ transformed = transform_data(orders, customers, products)
285
+
286
+ # Validate
287
+ validated = validate_data(transformed)
288
+
289
+ # Quality metrics
290
+ metrics = calculate_quality_metrics(validated)
291
+
292
+ # Load
293
+ load_data(validated)
294
+
295
+ # Summary
296
+ duration = (datetime.now() - start_time).total_seconds()
297
+
298
+ print("\n" + "=" * 60)
299
+ print("ETL PIPELINE COMPLETED SUCCESSFULLY")
300
+ print("=" * 60)
301
+ print(f"Duration: {duration:.2f}s")
302
+ print(f"Records processed: {metrics['total_records']:,}")
303
+ print(f"Data completeness: {metrics['completeness_pct']:.2f}%")
304
+ print(f"\nOrder Statistics:")
305
+ print(f" - Total: ${metrics['order_total_stats']['mean']:.2f} (avg)")
306
+ print(f" - Range: ${metrics['order_total_stats']['min']:.2f} - ${metrics['order_total_stats']['max']:.2f}")
307
+ print(f"\nCustomer Segments:")
308
+ for segment, count in metrics['customer_segments'].items():
309
+ print(f" - {segment}: {count}")
310
+
311
+ except Exception as e:
312
+ logger.error(f"ETL pipeline failed: {e}")
313
+ raise
314
+
315
+
316
+ if __name__ == "__main__":
317
+ print("pandas ETL Example - Context7 Best Practices")
318
+ print("=" * 60)
319
+ print("")
320
+ print("Context7 Patterns Demonstrated:")
321
+ print("1. ✅ Vectorized operations (df['col'] * df['col2'])")
322
+ print("2. ✅ Efficient merging with validation")
323
+ print("3. ✅ GroupBy aggregations with agg()")
324
+ print("4. ✅ Data validation (nulls, types, ranges)")
325
+ print("5. ✅ Quality metrics calculation")
326
+ print("6. ✅ Parquet for efficient storage")
327
+ print("7. ✅ Avoid apply() when vectorization possible")
328
+ print("8. ✅ Proper error handling and logging")
329
+ print("")
330
+ print("Source: /pandas-dev/pandas (7,386 snippets, trust 9.2)")
331
+
332
+ run_etl_pipeline()
@@ -0,0 +1,330 @@
1
+ # @claudeautopm/plugin-databases
2
+
3
+ Database and data storage specialists for PostgreSQL, MongoDB, Redis, and more.
4
+
5
+ ## 📦 Installation
6
+
7
+ ```bash
8
+ # Install the plugin package
9
+ npm install -g @claudeautopm/plugin-databases
10
+
11
+ # Install plugin agents to your project
12
+ autopm plugin install databases
13
+ ```
14
+
15
+ ## 🤖 Agents Included
16
+
17
+ ### Relational Databases
18
+ - **postgresql-expert** - PostgreSQL database specialist
19
+ - Query optimization and indexing
20
+ - Table design and normalization
21
+ - Transactions and ACID compliance
22
+ - Replication and high availability
23
+ - Performance tuning
24
+
25
+ ### NoSQL Databases
26
+ - **mongodb-expert** - MongoDB database specialist
27
+ - Document schema design
28
+ - Aggregation pipelines
29
+ - Sharding and replication
30
+ - Query optimization
31
+ - Atlas cloud management
32
+
33
+ - **cosmosdb-expert** - Azure Cosmos DB specialist
34
+ - Multi-model database design
35
+ - Consistency levels
36
+ - Partitioning strategies
37
+ - Global distribution
38
+ - Change feed patterns
39
+
40
+ ### Caching & In-Memory
41
+ - **redis-expert** - Redis caching and data structures
42
+ - Cache strategies (LRU, TTL)
43
+ - Data structures (strings, sets, sorted sets, hashes)
44
+ - Pub/Sub messaging
45
+ - Redis Cluster and Sentinel
46
+ - Performance optimization
47
+
48
+ ### Analytics & Big Data
49
+ - **bigquery-expert** - Google BigQuery analytics
50
+ - SQL query optimization
51
+ - Partitioning and clustering
52
+ - Streaming inserts
53
+ - Cost optimization
54
+ - Data warehouse design
55
+
56
+ ## 💡 Usage
57
+
58
+ ### In Claude Code
59
+
60
+ After installation, agents are available in your project:
61
+
62
+ ```markdown
63
+ <!-- CLAUDE.md -->
64
+ ## Active Team Agents
65
+
66
+ <!-- Load database agents -->
67
+ - @include .claude/agents/databases/postgresql-expert.md
68
+ - @include .claude/agents/databases/redis-expert.md
69
+ ```
70
+
71
+ Or use `autopm team load` to automatically include agents:
72
+
73
+ ```bash
74
+ # Load database-focused team
75
+ autopm team load databases
76
+
77
+ # Or include databases in fullstack team
78
+ autopm team load fullstack
79
+ ```
80
+
81
+ ### Direct Invocation
82
+
83
+ ```bash
84
+ # Invoke agent directly from CLI
85
+ autopm agent invoke postgresql-expert "Optimize slow query performance"
86
+ ```
87
+
88
+ ## 📋 Agent Capabilities
89
+
90
+ ### Database Design
91
+ - Schema design and normalization
92
+ - Indexing strategies
93
+ - Partitioning and sharding
94
+ - Data modeling best practices
95
+
96
+ ### Performance Optimization
97
+ - Query optimization
98
+ - Index tuning
99
+ - Connection pooling
100
+ - Caching strategies
101
+
102
+ ### High Availability
103
+ - Replication setup
104
+ - Failover strategies
105
+ - Backup and recovery
106
+ - Disaster recovery planning
107
+
108
+ ### Data Migration
109
+ - Schema migration
110
+ - Data transformation
111
+ - Zero-downtime migrations
112
+ - Cross-database migration
113
+
114
+ ## 🔌 MCP Servers
115
+
116
+ This plugin works with the following MCP servers for enhanced capabilities:
117
+
118
+ - **postgresql** - PostgreSQL documentation and query patterns
119
+ - **mongodb** - MongoDB documentation and best practices
120
+
121
+ Enable MCP servers:
122
+
123
+ ```bash
124
+ autopm mcp enable postgresql
125
+ autopm mcp enable mongodb
126
+ ```
127
+
128
+ ## 🚀 Examples
129
+
130
+ ### PostgreSQL Query Optimization
131
+
132
+ ```
133
+ @postgresql-expert
134
+
135
+ Optimize slow-running query:
136
+
137
+ Query:
138
+ SELECT o.*, u.name, p.title
139
+ FROM orders o
140
+ JOIN users u ON o.user_id = u.id
141
+ JOIN products p ON o.product_id = p.id
142
+ WHERE o.created_at >= '2024-01-01'
143
+ ORDER BY o.created_at DESC
144
+ LIMIT 100
145
+
146
+ Issues:
147
+ - Takes 5+ seconds on 10M rows
148
+ - High CPU usage
149
+ - Blocking other queries
150
+
151
+ Provide:
152
+ 1. Query analysis with EXPLAIN
153
+ 2. Index recommendations
154
+ 3. Optimized query
155
+ 4. Performance benchmarks
156
+ ```
157
+
158
+ ### MongoDB Schema Design
159
+
160
+ ```
161
+ @mongodb-expert
162
+
163
+ Design schema for e-commerce platform:
164
+
165
+ Requirements:
166
+ - Products with variants (color, size)
167
+ - Inventory tracking per variant
168
+ - Customer reviews and ratings
169
+ - Order history
170
+ - Fast product search
171
+
172
+ Optimize for:
173
+ - Read-heavy workload (90% reads)
174
+ - Complex product filtering
175
+ - Real-time inventory updates
176
+ - Aggregated review statistics
177
+
178
+ Include:
179
+ 1. Collection schemas
180
+ 2. Indexing strategy
181
+ 3. Aggregation pipelines
182
+ 4. Sharding recommendations
183
+ ```
184
+
185
+ ### Redis Caching Strategy
186
+
187
+ ```
188
+ @redis-expert
189
+
190
+ Implement caching layer for API:
191
+
192
+ Requirements:
193
+ - Cache frequently accessed data
194
+ - Invalidate on updates
195
+ - Handle cache stampede
196
+ - Session storage
197
+ - Rate limiting
198
+
199
+ Patterns needed:
200
+ - Cache-aside pattern
201
+ - Write-through cache
202
+ - Distributed locking
203
+ - Pub/Sub for invalidation
204
+
205
+ Include:
206
+ 1. Redis data structure choices
207
+ 2. TTL strategies
208
+ 3. Invalidation patterns
209
+ 4. Performance metrics
210
+ ```
211
+
212
+ ### BigQuery Analytics
213
+
214
+ ```
215
+ @bigquery-expert
216
+
217
+ Design data warehouse for analytics:
218
+
219
+ Data sources:
220
+ - Application logs (1TB/day)
221
+ - User events (100M events/day)
222
+ - Sales transactions (10M/day)
223
+
224
+ Requirements:
225
+ - Real-time dashboard queries
226
+ - Historical trend analysis
227
+ - Customer segmentation
228
+ - Cost optimization
229
+
230
+ Include:
231
+ 1. Table design with partitioning
232
+ 2. Clustering strategy
233
+ 3. Materialized views
234
+ 4. Cost-optimized queries
235
+ 5. Streaming insert patterns
236
+ ```
237
+
238
+ ### Cosmos DB Multi-Region Setup
239
+
240
+ ```
241
+ @cosmosdb-expert
242
+
243
+ Setup globally distributed database:
244
+
245
+ Requirements:
246
+ - 3 regions (US, EU, Asia)
247
+ - Strong consistency for writes
248
+ - Eventual consistency for reads
249
+ - Automatic failover
250
+ - Conflict resolution
251
+
252
+ Collections:
253
+ - Users (partition by country)
254
+ - Orders (partition by date)
255
+ - Products (small, replicated globally)
256
+
257
+ Include:
258
+ 1. Consistency level configuration
259
+ 2. Partition key strategy
260
+ 3. Conflict resolution policies
261
+ 4. Failover configuration
262
+ 5. Cost estimation
263
+ ```
264
+
265
+ ## 🔧 Configuration
266
+
267
+ ### Environment Variables
268
+
269
+ Some agents benefit from environment variables:
270
+
271
+ ```bash
272
+ # PostgreSQL
273
+ export PGHOST=localhost
274
+ export PGDATABASE=myapp
275
+ export PGUSER=postgres
276
+
277
+ # MongoDB
278
+ export MONGODB_URI=mongodb://localhost:27017/myapp
279
+
280
+ # Redis
281
+ export REDIS_URL=redis://localhost:6379
282
+
283
+ # BigQuery
284
+ export GOOGLE_CLOUD_PROJECT=my-project
285
+ export BIGQUERY_DATASET=analytics
286
+ ```
287
+
288
+ ### Agent Customization
289
+
290
+ You can customize agent behavior in `.claude/config.yaml`:
291
+
292
+ ```yaml
293
+ plugins:
294
+ databases:
295
+ postgresql:
296
+ default_pool_size: 20
297
+ statement_timeout: 30s
298
+ mongodb:
299
+ read_preference: secondaryPreferred
300
+ write_concern: majority
301
+ redis:
302
+ default_ttl: 3600
303
+ eviction_policy: allkeys-lru
304
+ bigquery:
305
+ default_location: US
306
+ max_query_cost: 10
307
+ ```
308
+
309
+ ## 📖 Documentation
310
+
311
+ - [PostgreSQL Expert Guide](./agents/postgresql-expert.md)
312
+ - [MongoDB Expert Guide](./agents/mongodb-expert.md)
313
+ - [Redis Expert Guide](./agents/redis-expert.md)
314
+ - [BigQuery Expert Guide](./agents/bigquery-expert.md)
315
+ - [Cosmos DB Expert Guide](./agents/cosmosdb-expert.md)
316
+
317
+ ## 🤝 Contributing
318
+
319
+ Contributions are welcome! Please see [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines.
320
+
321
+ ## 📄 License
322
+
323
+ MIT © ClaudeAutoPM Team
324
+
325
+ ## 🔗 Links
326
+
327
+ - [ClaudeAutoPM](https://github.com/rafeekpro/ClaudeAutoPM)
328
+ - [Plugin Documentation](https://github.com/rafeekpro/ClaudeAutoPM/blob/main/docs/PLUGIN-IMPLEMENTATION-PLAN.md)
329
+ - [npm Package](https://www.npmjs.com/package/@claudeautopm/plugin-databases)
330
+ - [Issues](https://github.com/rafeekpro/ClaudeAutoPM/issues)