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.
- package/README.md +399 -529
- package/bin/autopm.js +2 -0
- package/bin/commands/plugin.js +395 -0
- package/bin/commands/team.js +184 -10
- package/install/install.js +223 -4
- package/lib/plugins/PluginManager.js +1328 -0
- package/lib/plugins/PluginManager.old.js +400 -0
- package/package.json +5 -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/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/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/gemini-api-expert.md +880 -0
- package/packages/plugin-cloud/agents/openai-python-expert.md +1087 -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/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/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/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/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/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/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/bigquery-expert.md +24 -15
- package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/cosmosdb-expert.md +22 -15
- package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/mongodb-expert.md +24 -15
- package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/postgresql-expert.md +23 -15
- package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/redis-expert.md +29 -7
- 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/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/github-operations-specialist.md +1 -1
- 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/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/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/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/e2e-test-engineer.md +219 -0
- package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/react-frontend-engineer.md +176 -0
- package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/tailwindcss-expert.md +251 -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/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/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/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/github/workflow-create.md +42 -0
- package/packages/plugin-pm/package.json +57 -0
- package/packages/plugin-pm/plugin.json +503 -0
- package/packages/plugin-testing/README.md +401 -0
- package/{autopm/.claude/agents/testing → packages/plugin-testing/agents}/frontend-testing-engineer.md +373 -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
- package/scripts/publish-plugins.sh +166 -0
- package/autopm/.claude/agents/data/airflow-orchestration-expert.md +0 -52
- package/autopm/.claude/agents/data/kedro-pipeline-expert.md +0 -50
- package/autopm/.claude/agents/integration/message-queue-engineer.md +0 -794
- package/autopm/.claude/commands/ai/langgraph-workflow.md +0 -65
- package/autopm/.claude/commands/ai/openai-chat.md +0 -65
- package/autopm/.claude/commands/playwright/test-scaffold.md +0 -38
- package/autopm/.claude/commands/python/api-scaffold.md +0 -50
- package/autopm/.claude/commands/python/docs-query.md +0 -48
- package/autopm/.claude/commands/testing/prime.md +0 -314
- package/autopm/.claude/commands/testing/run.md +0 -125
- package/autopm/.claude/commands/ui/bootstrap-scaffold.md +0 -65
- package/autopm/.claude/rules/database-management-strategy.md +0 -17
- package/autopm/.claude/rules/database-pipeline.md +0 -94
- package/autopm/.claude/rules/ux-design-rules.md +0 -209
- package/autopm/.claude/rules/visual-testing.md +0 -223
- package/autopm/.claude/scripts/azure/README.md +0 -192
- package/autopm/.claude/scripts/azure/active-work.js +0 -524
- package/autopm/.claude/scripts/azure/active-work.sh +0 -20
- package/autopm/.claude/scripts/azure/blocked.js +0 -520
- package/autopm/.claude/scripts/azure/blocked.sh +0 -20
- package/autopm/.claude/scripts/azure/daily.js +0 -533
- package/autopm/.claude/scripts/azure/daily.sh +0 -20
- package/autopm/.claude/scripts/azure/dashboard.js +0 -970
- package/autopm/.claude/scripts/azure/dashboard.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-list.js +0 -254
- package/autopm/.claude/scripts/azure/feature-list.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-show.js +0 -7
- package/autopm/.claude/scripts/azure/feature-show.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-status.js +0 -604
- package/autopm/.claude/scripts/azure/feature-status.sh +0 -20
- package/autopm/.claude/scripts/azure/help.js +0 -342
- package/autopm/.claude/scripts/azure/help.sh +0 -20
- package/autopm/.claude/scripts/azure/next-task.js +0 -508
- package/autopm/.claude/scripts/azure/next-task.sh +0 -20
- package/autopm/.claude/scripts/azure/search.js +0 -469
- package/autopm/.claude/scripts/azure/search.sh +0 -20
- package/autopm/.claude/scripts/azure/setup.js +0 -745
- package/autopm/.claude/scripts/azure/setup.sh +0 -20
- package/autopm/.claude/scripts/azure/sprint-report.js +0 -1012
- package/autopm/.claude/scripts/azure/sprint-report.sh +0 -20
- package/autopm/.claude/scripts/azure/sync.js +0 -563
- package/autopm/.claude/scripts/azure/sync.sh +0 -20
- package/autopm/.claude/scripts/azure/us-list.js +0 -210
- package/autopm/.claude/scripts/azure/us-list.sh +0 -20
- package/autopm/.claude/scripts/azure/us-status.js +0 -238
- package/autopm/.claude/scripts/azure/us-status.sh +0 -20
- package/autopm/.claude/scripts/azure/validate.js +0 -626
- package/autopm/.claude/scripts/azure/validate.sh +0 -20
- package/autopm/.claude/scripts/azure/wrapper-template.sh +0 -20
- package/autopm/.claude/scripts/github/dependency-tracker.js +0 -554
- package/autopm/.claude/scripts/github/dependency-validator.js +0 -545
- package/autopm/.claude/scripts/github/dependency-visualizer.js +0 -477
- package/bin/node/azure-feature-show.js +0 -7
- /package/{autopm/.claude/agents/cloud → packages/plugin-ai/agents}/gemini-api-expert.md +0 -0
- /package/{autopm/.claude/agents/data → packages/plugin-ai/agents}/langgraph-workflow-expert.md +0 -0
- /package/{autopm/.claude/agents/cloud → packages/plugin-ai/agents}/openai-python-expert.md +0 -0
- /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/README.md +0 -0
- /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/aws-cloud-architect.md +0 -0
- /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/azure-cloud-architect.md +0 -0
- /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/gcp-cloud-architect.md +0 -0
- /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/gcp-cloud-functions-engineer.md +0 -0
- /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/kubernetes-orchestrator.md +0 -0
- /package/{autopm/.claude/agents/cloud → packages/plugin-cloud/agents}/terraform-infrastructure-expert.md +0 -0
- /package/{autopm/.claude/commands/cloud → packages/plugin-cloud/commands}/infra-deploy.md +0 -0
- /package/{autopm/.claude/commands/kubernetes/deploy.md → packages/plugin-cloud/commands/k8s-deploy.md} +0 -0
- /package/{autopm/.claude/commands/infrastructure → packages/plugin-cloud/commands}/ssh-security.md +0 -0
- /package/{autopm/.claude/commands/infrastructure → packages/plugin-cloud/commands}/traefik-setup.md +0 -0
- /package/{autopm/.claude → packages/plugin-cloud}/rules/infrastructure-pipeline.md +0 -0
- /package/{autopm/.claude → packages/plugin-core}/agents/core/agent-manager.md +0 -0
- /package/{autopm/.claude → packages/plugin-core}/agents/core/code-analyzer.md +0 -0
- /package/{autopm/.claude → packages/plugin-core}/agents/core/file-analyzer.md +0 -0
- /package/{autopm/.claude → packages/plugin-core}/agents/core/test-runner.md +0 -0
- /package/{autopm/.claude → packages/plugin-core}/rules/ai-integration-patterns.md +0 -0
- /package/{autopm/.claude → packages/plugin-core}/rules/performance-guidelines.md +0 -0
- /package/{autopm/.claude/agents/databases → packages/plugin-databases/agents}/README.md +0 -0
- /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/README.md +0 -0
- /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/azure-devops-specialist.md +0 -0
- /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/docker-containerization-expert.md +0 -0
- /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/mcp-context-manager.md +0 -0
- /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/observability-engineer.md +0 -0
- /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/ssh-operations-expert.md +0 -0
- /package/{autopm/.claude/agents/devops → packages/plugin-devops/agents}/traefik-proxy-expert.md +0 -0
- /package/{autopm/.claude/commands/github → packages/plugin-devops/commands}/workflow-create.md +0 -0
- /package/{autopm/.claude → packages/plugin-devops}/rules/ci-cd-kubernetes-strategy.md +0 -0
- /package/{autopm/.claude → packages/plugin-devops}/rules/devops-troubleshooting-playbook.md +0 -0
- /package/{autopm/.claude → packages/plugin-devops}/rules/docker-first-development.md +0 -0
- /package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/README.md +0 -0
- /package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/nats-messaging-expert.md +0 -0
- /package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/react-ui-expert.md +0 -0
- /package/{autopm/.claude/agents/frameworks → packages/plugin-frameworks/agents}/ux-design-expert.md +0 -0
- /package/{autopm/.claude/commands/react → packages/plugin-frameworks/commands}/app-scaffold.md +0 -0
- /package/{autopm/.claude/commands/ui → packages/plugin-frameworks/commands}/tailwind-system.md +0 -0
- /package/{autopm/.claude → packages/plugin-frameworks}/rules/ui-development-standards.md +0 -0
- /package/{autopm/.claude → packages/plugin-frameworks}/rules/ui-framework-rules.md +0 -0
- /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/README.md +0 -0
- /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/bash-scripting-expert.md +0 -0
- /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/javascript-frontend-engineer.md +0 -0
- /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/nodejs-backend-engineer.md +0 -0
- /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/python-backend-engineer.md +0 -0
- /package/{autopm/.claude/agents/languages → packages/plugin-languages/agents}/python-backend-expert.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/COMMANDS.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/COMMAND_MAPPING.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/INTEGRATION_FIX.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/README.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/active-work.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/aliases.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/blocked-items.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/clean.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/docs-query.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-decompose.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-list.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-new.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-show.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/feature-start.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/fix-integration-example.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/help.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/import-us.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/init.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/next-task.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/search.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/sprint-status.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/standup.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/sync-all.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-analyze.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-close.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-edit.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-list.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-new.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-reopen.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-show.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-start.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-status.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/task-sync.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-edit.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-list.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-new.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-parse.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-show.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/us-status.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/validate.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/commands/azure/work-item-sync.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/blocked.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/clean.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/context-create.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/context-prime.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/context-update.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/context.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-close.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-decompose.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-edit.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-list.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-merge.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-oneshot.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-refresh.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-show.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-split.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-start.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-status.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-sync-modular.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-sync-original.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/epic-sync.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/help.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/import.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/in-progress.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/init.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-analyze.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-close.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-edit.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-reopen.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-show.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-start.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-status.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/issue-sync.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/next.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-edit.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-list.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-new.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-parse.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/prd-status.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/search.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/standup.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/status.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/sync.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/test-reference-update.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/validate.md +0 -0
- /package/{autopm/.claude/commands/pm → packages/plugin-pm/commands}/what-next.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/analytics.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/blocked.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/blocked.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/clean.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/context-create.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/context-prime.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/context-update.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/context.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-close.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-edit.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-list.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-list.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-show.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-show.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-split.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-start/epic-start.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-start/epic-start.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-status.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-status.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/README.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/create-epic-issue.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/create-task-issues.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/update-epic-file.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync/update-references.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/epic-sync.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/help.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/help.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/in-progress.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/in-progress.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/init.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/init.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-close.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-edit.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-show.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-start.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/format-comment.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/gather-updates.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/post-comment.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/preflight-validation.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/issue-sync/update-frontmatter.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/lib/README.md +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/lib/epic-discovery.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/lib/logger.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/next.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/next.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/optimize.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/pr-create.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/pr-list.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-list.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-list.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-new.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-parse.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-status.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/prd-status.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/release.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/search.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/search.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/standup.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/standup.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/status.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/status.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/sync-batch.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/sync.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/template-list.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/template-new.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/validate.js +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/validate.sh +0 -0
- /package/{autopm/.claude → packages/plugin-pm}/scripts/pm/what-next.js +0 -0
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
# Azure DevOps Shell Scripts
|
|
2
|
-
|
|
3
|
-
Automation scripts for Azure DevOps integration.
|
|
4
|
-
|
|
5
|
-
## Available Scripts
|
|
6
|
-
|
|
7
|
-
### setup.sh
|
|
8
|
-
**Initial setup and configuration**
|
|
9
|
-
```bash
|
|
10
|
-
./setup.sh
|
|
11
|
-
```
|
|
12
|
-
- Configures Azure DevOps credentials
|
|
13
|
-
- Tests connection
|
|
14
|
-
- Creates directory structure
|
|
15
|
-
- Generates configuration files
|
|
16
|
-
|
|
17
|
-
### daily.sh
|
|
18
|
-
**Daily workflow automation**
|
|
19
|
-
```bash
|
|
20
|
-
./daily.sh
|
|
21
|
-
```
|
|
22
|
-
- Shows standup summary
|
|
23
|
-
- Lists active work
|
|
24
|
-
- Checks for blockers
|
|
25
|
-
- Suggests next task
|
|
26
|
-
|
|
27
|
-
### sprint-report.sh
|
|
28
|
-
**Generate sprint reports**
|
|
29
|
-
```bash
|
|
30
|
-
./sprint-report.sh [sprint-name]
|
|
31
|
-
./sprint-report.sh current
|
|
32
|
-
./sprint-report.sh "Sprint 2"
|
|
33
|
-
```
|
|
34
|
-
- Sprint progress and metrics
|
|
35
|
-
- Burndown analysis
|
|
36
|
-
- Team performance
|
|
37
|
-
- Risk assessment
|
|
38
|
-
|
|
39
|
-
### sync.sh
|
|
40
|
-
**Synchronize with Azure DevOps**
|
|
41
|
-
```bash
|
|
42
|
-
./sync.sh --quick # Recent changes only
|
|
43
|
-
./sync.sh --full # Full synchronization
|
|
44
|
-
```
|
|
45
|
-
- Syncs work items to local cache
|
|
46
|
-
- Detects conflicts
|
|
47
|
-
- Cleans old cache files
|
|
48
|
-
|
|
49
|
-
## Usage Examples
|
|
50
|
-
|
|
51
|
-
### Morning Routine
|
|
52
|
-
```bash
|
|
53
|
-
# Start your day
|
|
54
|
-
./daily.sh
|
|
55
|
-
|
|
56
|
-
# Get detailed sprint status
|
|
57
|
-
./sprint-report.sh current
|
|
58
|
-
|
|
59
|
-
# Sync recent changes
|
|
60
|
-
./sync.sh --quick
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Weekly Tasks
|
|
64
|
-
```bash
|
|
65
|
-
# Full sync on Monday
|
|
66
|
-
./sync.sh --full
|
|
67
|
-
|
|
68
|
-
# Generate sprint report
|
|
69
|
-
./sprint-report.sh > reports/week-$(date +%U).txt
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### First Time Setup
|
|
73
|
-
```bash
|
|
74
|
-
# Run setup wizard
|
|
75
|
-
./setup.sh
|
|
76
|
-
|
|
77
|
-
# Verify connection
|
|
78
|
-
./daily.sh
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Environment Variables
|
|
82
|
-
|
|
83
|
-
Required in `.claude/.env`:
|
|
84
|
-
```bash
|
|
85
|
-
AZURE_DEVOPS_PAT=your_personal_access_token
|
|
86
|
-
AZURE_DEVOPS_ORG=your_organization
|
|
87
|
-
AZURE_DEVOPS_PROJECT=your_project
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## Automation
|
|
91
|
-
|
|
92
|
-
### Cron Jobs
|
|
93
|
-
Add to crontab for automation:
|
|
94
|
-
```bash
|
|
95
|
-
# Daily standup at 9 AM
|
|
96
|
-
0 9 * * 1-5 cd /path/to/project && ./claude/scripts/azure/daily.sh
|
|
97
|
-
|
|
98
|
-
# Sync every hour during work hours
|
|
99
|
-
0 9-18 * * 1-5 cd /path/to/project && ./claude/scripts/azure/sync.sh --quick
|
|
100
|
-
|
|
101
|
-
# Weekly sprint report on Friday
|
|
102
|
-
0 16 * * 5 cd /path/to/project && ./claude/scripts/azure/sprint-report.sh
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Git Hooks
|
|
106
|
-
Link to git hooks for automation:
|
|
107
|
-
```bash
|
|
108
|
-
# .git/hooks/pre-commit
|
|
109
|
-
#!/bin/bash
|
|
110
|
-
# Sync before commit
|
|
111
|
-
.claude/scripts/azure/sync.sh --quick
|
|
112
|
-
|
|
113
|
-
# .git/hooks/post-commit
|
|
114
|
-
#!/bin/bash
|
|
115
|
-
# Link commit to Azure DevOps
|
|
116
|
-
# (Add work item ID detection logic)
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Troubleshooting
|
|
120
|
-
|
|
121
|
-
### Connection Issues
|
|
122
|
-
```bash
|
|
123
|
-
# Test API connection
|
|
124
|
-
curl -u ":$AZURE_DEVOPS_PAT" \
|
|
125
|
-
"https://dev.azure.com/$AZURE_DEVOPS_ORG/_apis/projects?api-version=7.0"
|
|
126
|
-
|
|
127
|
-
# Check credentials
|
|
128
|
-
echo $AZURE_DEVOPS_PAT | head -c 10
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Permission Errors
|
|
132
|
-
```bash
|
|
133
|
-
# Make scripts executable
|
|
134
|
-
chmod +x .claude/scripts/azure/*.sh
|
|
135
|
-
|
|
136
|
-
# Check file permissions
|
|
137
|
-
ls -la .claude/scripts/azure/
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Cache Issues
|
|
141
|
-
```bash
|
|
142
|
-
# Clear cache
|
|
143
|
-
rm -rf .claude/azure/cache/*
|
|
144
|
-
|
|
145
|
-
# Rebuild cache
|
|
146
|
-
./sync.sh --full
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Advanced Usage
|
|
150
|
-
|
|
151
|
-
### Custom Queries
|
|
152
|
-
Edit scripts to add custom WIQL queries:
|
|
153
|
-
```bash
|
|
154
|
-
# Example: Find high priority bugs
|
|
155
|
-
query='SELECT [System.Id] FROM workitems
|
|
156
|
-
WHERE [System.WorkItemType] = "Bug"
|
|
157
|
-
AND [Microsoft.VSTS.Common.Priority] = 1'
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Export Formats
|
|
161
|
-
Scripts support various output formats:
|
|
162
|
-
```bash
|
|
163
|
-
# JSON output
|
|
164
|
-
./sprint-report.sh --json > report.json
|
|
165
|
-
|
|
166
|
-
# CSV export
|
|
167
|
-
./daily.sh --csv > daily.csv
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### Integration with CI/CD
|
|
171
|
-
Use in CI/CD pipelines:
|
|
172
|
-
```yaml
|
|
173
|
-
# Azure Pipelines example
|
|
174
|
-
- script: |
|
|
175
|
-
./claude/scripts/azure/sync.sh --full
|
|
176
|
-
./claude/scripts/azure/sprint-report.sh
|
|
177
|
-
displayName: 'Sync and Report'
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
## Contributing
|
|
181
|
-
|
|
182
|
-
To add new scripts:
|
|
183
|
-
1. Create script in `.claude/scripts/azure/`
|
|
184
|
-
2. Make executable: `chmod +x script.sh`
|
|
185
|
-
3. Add documentation here
|
|
186
|
-
4. Test thoroughly
|
|
187
|
-
|
|
188
|
-
## Support
|
|
189
|
-
|
|
190
|
-
- Azure DevOps API: https://docs.microsoft.com/en-us/rest/api/azure/devops/
|
|
191
|
-
- Script issues: Create issue in project repository
|
|
192
|
-
- Command help: `/azure:help`
|
|
@@ -1,524 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Azure DevOps Active Work Viewer
|
|
5
|
-
* Shows all active work items across the team with full API integration
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const path = require('path');
|
|
9
|
-
const fs = require('fs');
|
|
10
|
-
const chalk = require('chalk');
|
|
11
|
-
const AzureDevOpsClient = require('../../providers/azure/lib/client');
|
|
12
|
-
const AzureFormatter = require('../../providers/azure/lib/formatter');
|
|
13
|
-
const { table } = require('table');
|
|
14
|
-
|
|
15
|
-
class AzureActiveWork {
|
|
16
|
-
constructor(options = {}) {
|
|
17
|
-
this.silent = options.silent || false;
|
|
18
|
-
this.format = options.format || 'table'; // table, json, csv
|
|
19
|
-
this.groupBy = options.groupBy || 'assignee'; // assignee, state, type, priority
|
|
20
|
-
this.includeUnassigned = options.includeUnassigned !== false;
|
|
21
|
-
this.user = options.user || null; // Filter by specific user or 'me'
|
|
22
|
-
this.state = options.state || null; // Filter by specific states
|
|
23
|
-
this.type = options.type || null; // Filter by work item types
|
|
24
|
-
this.testMode = options.testMode || false;
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
// Load environment variables from .env file if it exists
|
|
28
|
-
const envPath = path.join(process.cwd(), '.env');
|
|
29
|
-
if (fs.existsSync(envPath)) {
|
|
30
|
-
require('dotenv').config({ path: envPath });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Also check .claude/.env
|
|
34
|
-
const claudeEnvPath = path.join(process.cwd(), '.claude', '.env');
|
|
35
|
-
if (fs.existsSync(claudeEnvPath)) {
|
|
36
|
-
require('dotenv').config({ path: claudeEnvPath });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Initialize Azure DevOps client
|
|
40
|
-
this.client = new AzureDevOpsClient();
|
|
41
|
-
} catch (error) {
|
|
42
|
-
this.handleInitError(error);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
handleInitError(error) {
|
|
47
|
-
if (error.message.includes('Missing required environment variables')) {
|
|
48
|
-
// Check if we should throw the error (for tests that expect it)
|
|
49
|
-
const hasNoEnvVars = !process.env.AZURE_DEVOPS_PAT &&
|
|
50
|
-
!process.env.AZURE_DEVOPS_ORG &&
|
|
51
|
-
!process.env.AZURE_DEVOPS_PROJECT;
|
|
52
|
-
|
|
53
|
-
if (hasNoEnvVars && !this.testMode) {
|
|
54
|
-
throw error; // Re-throw for tests that expect it
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// In production mode when run directly, show error and exit
|
|
58
|
-
if (require.main === module) {
|
|
59
|
-
console.error('❌ Azure DevOps configuration missing!\n');
|
|
60
|
-
console.error('Please set the following environment variables:');
|
|
61
|
-
console.error(' - AZURE_DEVOPS_ORG: Your Azure DevOps organization');
|
|
62
|
-
console.error(' - AZURE_DEVOPS_PROJECT: Your project name');
|
|
63
|
-
console.error(' - AZURE_DEVOPS_PAT: Your Personal Access Token\n');
|
|
64
|
-
console.error('You can set these in .env or .claude/.env file\n');
|
|
65
|
-
process.exit(1);
|
|
66
|
-
}
|
|
67
|
-
// Set client to null for test mode
|
|
68
|
-
this.client = null;
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
throw error;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
async getActiveWork() {
|
|
75
|
-
try {
|
|
76
|
-
if (!this.silent && this.format !== "json") {
|
|
77
|
-
console.log(chalk.cyan.bold('\n💼 Fetching Active Work Items...\n'));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Build WIQL query for active work items
|
|
81
|
-
const states = this.state ?
|
|
82
|
-
this.state.split(',').map(s => `'${s.trim()}'`).join(', ') :
|
|
83
|
-
"'New', 'Active', 'In Progress', 'Committed'";
|
|
84
|
-
|
|
85
|
-
const types = this.type ?
|
|
86
|
-
this.type.split(',').map(t => `'${t.trim()}'`).join(', ') :
|
|
87
|
-
"'Task', 'Bug', 'User Story', 'Feature'";
|
|
88
|
-
|
|
89
|
-
let query = `
|
|
90
|
-
SELECT [System.Id],
|
|
91
|
-
[System.Title],
|
|
92
|
-
[System.State],
|
|
93
|
-
[System.WorkItemType],
|
|
94
|
-
[System.AssignedTo],
|
|
95
|
-
[Microsoft.VSTS.Scheduling.RemainingWork],
|
|
96
|
-
[Microsoft.VSTS.Common.Priority],
|
|
97
|
-
[System.CreatedDate],
|
|
98
|
-
[System.ChangedDate],
|
|
99
|
-
[System.Tags],
|
|
100
|
-
[System.IterationPath]
|
|
101
|
-
FROM workitems
|
|
102
|
-
WHERE [System.State] IN (${states})
|
|
103
|
-
AND [System.WorkItemType] IN (${types})
|
|
104
|
-
AND [System.TeamProject] = '${this.client?.project || 'TestProject'}'
|
|
105
|
-
`;
|
|
106
|
-
|
|
107
|
-
// Add user filter if specified
|
|
108
|
-
if (this.user) {
|
|
109
|
-
const userEmail = this.user === 'me' ? '@Me' : this.user;
|
|
110
|
-
query += ` AND [System.AssignedTo] = '${userEmail}'`;
|
|
111
|
-
} else if (!this.includeUnassigned) {
|
|
112
|
-
query += ` AND [System.AssignedTo] <> ''`;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
query += ` ORDER BY [Microsoft.VSTS.Common.Priority] ASC, [System.ChangedDate] DESC`;
|
|
116
|
-
|
|
117
|
-
// Execute query
|
|
118
|
-
if (!this.client) {
|
|
119
|
-
// Return mock data for testing
|
|
120
|
-
return this.getMockActiveWork();
|
|
121
|
-
}
|
|
122
|
-
const queryResult = await this.client.executeWiql(query);
|
|
123
|
-
|
|
124
|
-
if (!queryResult || !queryResult.workItems || queryResult.workItems.length === 0) {
|
|
125
|
-
if (!this.silent) {
|
|
126
|
-
console.log(chalk.yellow('No active work items found.'));
|
|
127
|
-
}
|
|
128
|
-
return { summary: { total: 0 }, items: [] };
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Get full work item details
|
|
132
|
-
const ids = queryResult.workItems.map(item => item.id);
|
|
133
|
-
const workItems = await this.client.getWorkItems(ids);
|
|
134
|
-
|
|
135
|
-
// Get current sprint info
|
|
136
|
-
const currentSprint = await this.client.getCurrentSprint();
|
|
137
|
-
|
|
138
|
-
// Process and organize work items
|
|
139
|
-
const processedData = this.processWorkItems(workItems, currentSprint);
|
|
140
|
-
|
|
141
|
-
// Mock data structure for compatibility - will be replaced with real data
|
|
142
|
-
const activeWorkData = {
|
|
143
|
-
...processedData,
|
|
144
|
-
rawItems: workItems
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
if (!this.silent && this.format !== "json") {
|
|
148
|
-
this.displayActiveWork(activeWorkData);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
return activeWorkData;
|
|
152
|
-
} catch (error) {
|
|
153
|
-
console.error('Error:', error.message);
|
|
154
|
-
process.exit(1);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
displayActiveWork(data) {
|
|
159
|
-
switch (this.format) {
|
|
160
|
-
case 'json':
|
|
161
|
-
console.log(JSON.stringify(data, null, 2));
|
|
162
|
-
break;
|
|
163
|
-
case 'csv':
|
|
164
|
-
this.displayCSV(data);
|
|
165
|
-
break;
|
|
166
|
-
default:
|
|
167
|
-
this.displayTable(data);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
displayTable(data) {
|
|
172
|
-
// Display summary
|
|
173
|
-
console.log(chalk.cyan.bold('📊 Summary'));
|
|
174
|
-
const summary = data.summary;
|
|
175
|
-
console.log(`Sprint: ${chalk.blue(summary.sprint)}`);
|
|
176
|
-
console.log(`Total Active Items: ${chalk.green(summary.total)}`);
|
|
177
|
-
console.log(`In Progress: ${chalk.yellow(summary.inProgress)} | Active: ${chalk.blue(summary.active)} | New: ${chalk.gray(summary.new)}`);
|
|
178
|
-
console.log(`Average Days in Progress: ${summary.avgDaysInProgress}`);
|
|
179
|
-
if (summary.totalRemaining > 0) {
|
|
180
|
-
console.log(`Total Remaining Work: ${chalk.yellow(summary.totalRemaining + 'h')}`);
|
|
181
|
-
}
|
|
182
|
-
console.log('');
|
|
183
|
-
|
|
184
|
-
// Display by group
|
|
185
|
-
if (this.groupBy === 'assignee') {
|
|
186
|
-
this.displayByAssignee(data.byAssignee);
|
|
187
|
-
} else if (this.groupBy === 'state') {
|
|
188
|
-
this.displayByState(data.byState, data.byAssignee);
|
|
189
|
-
} else if (this.groupBy === 'type') {
|
|
190
|
-
this.displayByType(data.byType, data.byAssignee);
|
|
191
|
-
} else if (this.groupBy === 'priority') {
|
|
192
|
-
this.displayByPriority(data.byPriority);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// Display blocked items
|
|
196
|
-
if (data.blockedItems && data.blockedItems.length > 0) {
|
|
197
|
-
console.log(chalk.red.bold('\n🚫 Blocked Items'));
|
|
198
|
-
data.blockedItems.forEach(item => {
|
|
199
|
-
console.log(` [${chalk.red(item.id)}] ${item.title}`);
|
|
200
|
-
console.log(` Assigned to: ${item.assignedTo}`);
|
|
201
|
-
console.log(` Tags/Reason: ${chalk.yellow(item.blockedBy)}`);
|
|
202
|
-
console.log(` Days blocked: ${chalk.red(item.daysBlocked)}`);
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
getMockActiveWork() {
|
|
208
|
-
// Return mock data for testing
|
|
209
|
-
return {
|
|
210
|
-
items: [
|
|
211
|
-
{
|
|
212
|
-
id: 101,
|
|
213
|
-
fields: {
|
|
214
|
-
'System.Title': 'Test Task 1',
|
|
215
|
-
'System.WorkItemType': 'Task',
|
|
216
|
-
'System.State': 'Active',
|
|
217
|
-
'System.AssignedTo': { displayName: 'John Doe' },
|
|
218
|
-
'Microsoft.VSTS.Scheduling.RemainingWork': 8,
|
|
219
|
-
'Microsoft.VSTS.Common.Priority': 1,
|
|
220
|
-
'System.ChangedDate': new Date().toISOString()
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
id: 102,
|
|
225
|
-
fields: {
|
|
226
|
-
'System.Title': 'Test Bug 1',
|
|
227
|
-
'System.WorkItemType': 'Bug',
|
|
228
|
-
'System.State': 'In Progress',
|
|
229
|
-
'System.AssignedTo': { displayName: 'Jane Smith' },
|
|
230
|
-
'Microsoft.VSTS.Scheduling.RemainingWork': 4,
|
|
231
|
-
'Microsoft.VSTS.Common.Priority': 2,
|
|
232
|
-
'System.ChangedDate': new Date().toISOString()
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
],
|
|
236
|
-
summary: {
|
|
237
|
-
total: 2,
|
|
238
|
-
totalRemaining: 12
|
|
239
|
-
},
|
|
240
|
-
byState: { 'Active': 1, 'In Progress': 1 },
|
|
241
|
-
byType: { 'Task': 1, 'Bug': 1 },
|
|
242
|
-
byAssignee: {
|
|
243
|
-
'John Doe': [{ id: 101 }],
|
|
244
|
-
'Jane Smith': [{ id: 102 }]
|
|
245
|
-
},
|
|
246
|
-
byPriority: { 1: [{ id: 101 }], 2: [{ id: 102 }] },
|
|
247
|
-
blockedItems: []
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
processWorkItems(workItems, currentSprint) {
|
|
252
|
-
const byAssignee = {};
|
|
253
|
-
const byState = {};
|
|
254
|
-
const byType = {};
|
|
255
|
-
const byPriority = {};
|
|
256
|
-
const blockedItems = [];
|
|
257
|
-
let totalRemaining = 0;
|
|
258
|
-
let totalItems = 0;
|
|
259
|
-
let totalDaysInProgress = 0;
|
|
260
|
-
let inProgressCount = 0;
|
|
261
|
-
|
|
262
|
-
workItems.forEach(item => {
|
|
263
|
-
const fields = item.fields || {};
|
|
264
|
-
const assignedTo = fields['System.AssignedTo'] ?
|
|
265
|
-
(fields['System.AssignedTo'].displayName || fields['System.AssignedTo'].uniqueName || 'Unknown') :
|
|
266
|
-
'Unassigned';
|
|
267
|
-
const state = fields['System.State'] || 'Unknown';
|
|
268
|
-
const type = fields['System.WorkItemType'] || 'Unknown';
|
|
269
|
-
const priority = fields['Microsoft.VSTS.Common.Priority'] || 999;
|
|
270
|
-
const remainingWork = fields['Microsoft.VSTS.Scheduling.RemainingWork'] || 0;
|
|
271
|
-
const tags = fields['System.Tags'] || '';
|
|
272
|
-
|
|
273
|
-
// Calculate days in current state
|
|
274
|
-
const changedDate = new Date(fields['System.ChangedDate']);
|
|
275
|
-
const now = new Date();
|
|
276
|
-
const daysInState = Math.floor((now - changedDate) / (1000 * 60 * 60 * 24));
|
|
277
|
-
|
|
278
|
-
// Check if item is blocked
|
|
279
|
-
const isBlocked = tags.toLowerCase().includes('blocked') ||
|
|
280
|
-
tags.toLowerCase().includes('waiting');
|
|
281
|
-
|
|
282
|
-
const workItemData = {
|
|
283
|
-
id: item.id,
|
|
284
|
-
title: fields['System.Title'],
|
|
285
|
-
type: type,
|
|
286
|
-
state: state,
|
|
287
|
-
priority: priority,
|
|
288
|
-
daysInState: daysInState,
|
|
289
|
-
remainingWork: remainingWork,
|
|
290
|
-
tags: tags,
|
|
291
|
-
iteration: fields['System.IterationPath']
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
// Group by assignee
|
|
295
|
-
if (!byAssignee[assignedTo]) byAssignee[assignedTo] = [];
|
|
296
|
-
byAssignee[assignedTo].push(workItemData);
|
|
297
|
-
|
|
298
|
-
// Group by state
|
|
299
|
-
byState[state] = (byState[state] || 0) + 1;
|
|
300
|
-
|
|
301
|
-
// Group by type
|
|
302
|
-
byType[type] = (byType[type] || 0) + 1;
|
|
303
|
-
|
|
304
|
-
// Group by priority
|
|
305
|
-
if (!byPriority[priority]) byPriority[priority] = [];
|
|
306
|
-
byPriority[priority].push(workItemData);
|
|
307
|
-
|
|
308
|
-
// Track blocked items
|
|
309
|
-
if (isBlocked) {
|
|
310
|
-
blockedItems.push({
|
|
311
|
-
...workItemData,
|
|
312
|
-
assignedTo: assignedTo,
|
|
313
|
-
blockedBy: tags,
|
|
314
|
-
daysBlocked: daysInState
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Calculate stats
|
|
319
|
-
totalRemaining += remainingWork;
|
|
320
|
-
totalItems++;
|
|
321
|
-
if (state === 'In Progress' || state === 'Active') {
|
|
322
|
-
totalDaysInProgress += daysInState;
|
|
323
|
-
inProgressCount++;
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
const avgDaysInProgress = inProgressCount > 0 ?
|
|
328
|
-
(totalDaysInProgress / inProgressCount).toFixed(1) : 0;
|
|
329
|
-
|
|
330
|
-
return {
|
|
331
|
-
summary: {
|
|
332
|
-
total: totalItems,
|
|
333
|
-
inProgress: byState['In Progress'] || 0,
|
|
334
|
-
active: byState['Active'] || 0,
|
|
335
|
-
new: byState['New'] || 0,
|
|
336
|
-
avgDaysInProgress: parseFloat(avgDaysInProgress),
|
|
337
|
-
totalRemaining: totalRemaining,
|
|
338
|
-
sprint: currentSprint ? currentSprint.name : 'No active sprint'
|
|
339
|
-
},
|
|
340
|
-
byAssignee: byAssignee,
|
|
341
|
-
byState: byState,
|
|
342
|
-
byType: byType,
|
|
343
|
-
byPriority: byPriority,
|
|
344
|
-
blockedItems: blockedItems
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
displayByAssignee(byAssignee) {
|
|
349
|
-
console.log(chalk.green.bold('👥 Work by Assignee\n'));
|
|
350
|
-
|
|
351
|
-
// Sort assignees with Unassigned last
|
|
352
|
-
const sortedAssignees = Object.keys(byAssignee).sort((a, b) => {
|
|
353
|
-
if (a === 'Unassigned') return 1;
|
|
354
|
-
if (b === 'Unassigned') return -1;
|
|
355
|
-
return a.localeCompare(b);
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
sortedAssignees.forEach(assignee => {
|
|
359
|
-
const items = byAssignee[assignee];
|
|
360
|
-
if (items.length === 0) return;
|
|
361
|
-
|
|
362
|
-
const totalRemaining = items.reduce((sum, item) => sum + (item.remainingWork || 0), 0);
|
|
363
|
-
console.log(chalk.yellow.bold(`${assignee} (${items.length} items, ${totalRemaining}h remaining):`));
|
|
364
|
-
|
|
365
|
-
// Sort items by priority
|
|
366
|
-
items.sort((a, b) => a.priority - b.priority);
|
|
367
|
-
|
|
368
|
-
items.forEach(item => {
|
|
369
|
-
const stateColor = this.getStateColor(item.state);
|
|
370
|
-
const priorityLabel = item.priority <= 3 ? chalk.red(`P${item.priority}`) : `P${item.priority}`;
|
|
371
|
-
console.log(` [${chalk.blue(item.id)}] ${item.title}`);
|
|
372
|
-
console.log(` Type: ${item.type} | State: ${stateColor} | Priority: ${priorityLabel}`);
|
|
373
|
-
console.log(` Days in state: ${item.daysInState} | Remaining: ${item.remainingWork || 0}h`);
|
|
374
|
-
if (item.tags) {
|
|
375
|
-
console.log(` Tags: ${chalk.dim(item.tags)}`);
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
console.log('');
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
displayByState(byState, byAssignee) {
|
|
383
|
-
console.log(chalk.green.bold('📋 Work by State\n'));
|
|
384
|
-
|
|
385
|
-
Object.entries(byState).forEach(([state, count]) => {
|
|
386
|
-
const stateColor = this.getStateColor(state);
|
|
387
|
-
console.log(`${stateColor}: ${count} items`);
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
displayByType(byType) {
|
|
392
|
-
console.log(chalk.green.bold('📝 Work by Type\n'));
|
|
393
|
-
|
|
394
|
-
Object.entries(byType).forEach(([type, count]) => {
|
|
395
|
-
console.log(`${type}: ${count} items`);
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
displayByPriority(byPriority) {
|
|
400
|
-
console.log(chalk.green.bold('⚡ Work by Priority\n'));
|
|
401
|
-
|
|
402
|
-
const priorities = Object.keys(byPriority).sort((a, b) => parseInt(a) - parseInt(b));
|
|
403
|
-
|
|
404
|
-
priorities.forEach(priority => {
|
|
405
|
-
const items = byPriority[priority];
|
|
406
|
-
if (!items || items.length === 0) return;
|
|
407
|
-
|
|
408
|
-
const priorityLabel = priority <= 3 ?
|
|
409
|
-
chalk.red.bold(`Priority ${priority} (High)`) :
|
|
410
|
-
chalk.yellow.bold(`Priority ${priority}`);
|
|
411
|
-
|
|
412
|
-
console.log(`\n${priorityLabel}:`);
|
|
413
|
-
items.forEach(item => {
|
|
414
|
-
const stateColor = this.getStateColor(item.state);
|
|
415
|
-
console.log(` [${chalk.blue(item.id)}] ${item.title}`);
|
|
416
|
-
console.log(` ${item.type} | ${stateColor} | ${item.remainingWork || 0}h remaining`);
|
|
417
|
-
});
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
displayCSV(data) {
|
|
422
|
-
console.log('ID,Title,Type,State,Priority,Assigned To,Days in State,Remaining Work');
|
|
423
|
-
|
|
424
|
-
Object.entries(data.byAssignee).forEach(([assignee, items]) => {
|
|
425
|
-
items.forEach(item => {
|
|
426
|
-
console.log(`${item.id},"${item.title}",${item.type},${item.state},${item.priority},"${assignee}",${item.daysInState},${item.remainingWork}`);
|
|
427
|
-
});
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
getStateColor(state) {
|
|
432
|
-
const colors = {
|
|
433
|
-
'New': chalk.blue(state),
|
|
434
|
-
'Active': chalk.yellow(state),
|
|
435
|
-
'In Progress': chalk.cyan(state),
|
|
436
|
-
'Resolved': chalk.green(state),
|
|
437
|
-
'Closed': chalk.gray(state),
|
|
438
|
-
'Done': chalk.green(state)
|
|
439
|
-
};
|
|
440
|
-
return colors[state] || chalk.white(state);
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
static parseArguments(args = process.argv) {
|
|
444
|
-
const options = {};
|
|
445
|
-
|
|
446
|
-
args.forEach((arg, index) => {
|
|
447
|
-
if (arg === '--group-by' && args[index + 1]) {
|
|
448
|
-
options.groupBy = args[index + 1];
|
|
449
|
-
} else if (arg === '--format' && args[index + 1]) {
|
|
450
|
-
options.format = args[index + 1];
|
|
451
|
-
} else if (arg === '--user' && args[index + 1]) {
|
|
452
|
-
options.user = args[index + 1];
|
|
453
|
-
} else if (arg === '--state' && args[index + 1]) {
|
|
454
|
-
options.state = args[index + 1];
|
|
455
|
-
} else if (arg === '--type' && args[index + 1]) {
|
|
456
|
-
options.type = args[index + 1];
|
|
457
|
-
} else if (arg === '--no-unassigned') {
|
|
458
|
-
options.includeUnassigned = false;
|
|
459
|
-
} else if (arg === '--json') {
|
|
460
|
-
options.format = 'json';
|
|
461
|
-
} else if (arg === '--csv') {
|
|
462
|
-
options.format = 'csv';
|
|
463
|
-
} else if (arg === '--silent' || arg === '-s') {
|
|
464
|
-
options.silent = true;
|
|
465
|
-
} else if (arg === '--help' || arg === '-h') {
|
|
466
|
-
console.log(chalk.cyan.bold('\nAzure DevOps Active Work Viewer\n'));
|
|
467
|
-
console.log('Usage: azure-active-work [options]\n');
|
|
468
|
-
console.log('Options:');
|
|
469
|
-
console.log(' --user <email|me> Filter by user (use "me" for current user)');
|
|
470
|
-
console.log(' --state <states> Filter by states (comma-separated)');
|
|
471
|
-
console.log(' --type <types> Filter by work item types (comma-separated)');
|
|
472
|
-
console.log(' --group-by <field> Group results by: assignee, state, type, priority');
|
|
473
|
-
console.log(' --format <format> Output format: table, json, csv');
|
|
474
|
-
console.log(' --no-unassigned Exclude unassigned items');
|
|
475
|
-
console.log(' --json Output as JSON');
|
|
476
|
-
console.log(' --csv Output as CSV');
|
|
477
|
-
console.log(' --silent, -s Silent mode (suppress non-data output)');
|
|
478
|
-
console.log(' --help, -h Show this help\n');
|
|
479
|
-
console.log('Examples:');
|
|
480
|
-
console.log(' azure-active-work --user me');
|
|
481
|
-
console.log(' azure-active-work --state "Active,In Progress" --type Task');
|
|
482
|
-
console.log(' azure-active-work --group-by priority --json');
|
|
483
|
-
process.exit(0);
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
|
|
487
|
-
return options;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
// Run if called directly
|
|
492
|
-
if (require.main === module) {
|
|
493
|
-
const options = AzureActiveWork.parseArguments();
|
|
494
|
-
const activeWork = new AzureActiveWork(options);
|
|
495
|
-
|
|
496
|
-
activeWork.getActiveWork()
|
|
497
|
-
.then(() => {
|
|
498
|
-
if (activeWork.client) {
|
|
499
|
-
const stats = activeWork.client.getCacheStats();
|
|
500
|
-
if (!options.silent && process.env.DEBUG) {
|
|
501
|
-
console.log(chalk.dim(`\nCache stats: ${JSON.stringify(stats)}`));
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
})
|
|
505
|
-
.catch(error => {
|
|
506
|
-
console.error('Error:', error.message);
|
|
507
|
-
process.exit(1);
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
// Export class and helper functions for testing
|
|
512
|
-
module.exports = {
|
|
513
|
-
AzureActiveWork,
|
|
514
|
-
parseArguments: AzureActiveWork.parseArguments,
|
|
515
|
-
getStateColor: (state) => new AzureActiveWork().getStateColor(state),
|
|
516
|
-
getMockActiveWork: () => new AzureActiveWork().getMockActiveWork(),
|
|
517
|
-
processWorkItems: (workItems, currentSprint) => new AzureActiveWork().processWorkItems(workItems, currentSprint),
|
|
518
|
-
displayTable: (data) => new AzureActiveWork().displayTable(data),
|
|
519
|
-
displayByAssignee: (byAssignee) => new AzureActiveWork().displayByAssignee(byAssignee),
|
|
520
|
-
displayByState: (byState, byAssignee) => new AzureActiveWork().displayByState(byState, byAssignee),
|
|
521
|
-
displayByType: (byType) => new AzureActiveWork().displayByType(byType),
|
|
522
|
-
displayByPriority: (byPriority) => new AzureActiveWork().displayByPriority(byPriority),
|
|
523
|
-
displayCSV: (data) => new AzureActiveWork().displayCSV(data)
|
|
524
|
-
};
|