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,1012 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Azure DevOps Sprint Report
|
|
5
|
-
* Generates a comprehensive report for the current or specified sprint
|
|
6
|
-
* Full implementation with Azure DevOps API integration
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const path = require('path');
|
|
10
|
-
const fs = require('fs');
|
|
11
|
-
const chalk = require('chalk');
|
|
12
|
-
const AzureDevOpsClient = require('../../providers/azure/lib/client');
|
|
13
|
-
const AzureFormatter = require('../../providers/azure/lib/formatter');
|
|
14
|
-
const { table } = require('table');
|
|
15
|
-
|
|
16
|
-
class AzureSprintReport {
|
|
17
|
-
constructor(options = {}) {
|
|
18
|
-
this.silent = options.silent || false;
|
|
19
|
-
this.format = options.format || 'table'; // table, json, csv, markdown, html
|
|
20
|
-
this.sprintPath = options.sprint || null;
|
|
21
|
-
this.includeMetrics = options.metrics !== false;
|
|
22
|
-
this.includeBurndown = options.burndown !== false;
|
|
23
|
-
this.includeVelocity = options.velocity !== false;
|
|
24
|
-
this.exportPath = options.export || null;
|
|
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
|
-
console.error('❌ Azure DevOps configuration missing!\n');
|
|
49
|
-
console.error('Please set the following environment variables:');
|
|
50
|
-
console.error(' - AZURE_DEVOPS_ORG: Your Azure DevOps organization');
|
|
51
|
-
console.error(' - AZURE_DEVOPS_PROJECT: Your project name');
|
|
52
|
-
console.error(' - AZURE_DEVOPS_PAT: Your Personal Access Token\n');
|
|
53
|
-
console.error('You can set these in .env or .claude/.env file\n');
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
throw error;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async generateReport() {
|
|
60
|
-
try {
|
|
61
|
-
if (!this.silent && this.format !== "json") {
|
|
62
|
-
console.log(chalk.cyan.bold('\n📊 Generating Sprint Report...\n'));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Get current or specified sprint
|
|
66
|
-
const sprint = await this.getSprintInfo();
|
|
67
|
-
if (!sprint) {
|
|
68
|
-
if (!this.silent) {
|
|
69
|
-
console.log(chalk.yellow('No active sprint found.'));
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Fetch all work items in the sprint
|
|
75
|
-
const workItems = await this.getSprintWorkItems(sprint);
|
|
76
|
-
|
|
77
|
-
// Calculate statistics and metrics
|
|
78
|
-
const statistics = this.calculateStatistics(workItems);
|
|
79
|
-
const burndown = this.includeBurndown ? await this.calculateBurndown(sprint, workItems) : null;
|
|
80
|
-
const velocity = this.includeVelocity ? await this.calculateVelocity() : null;
|
|
81
|
-
const teamPerformance = this.includeMetrics ? await this.calculateTeamPerformance(workItems) : null;
|
|
82
|
-
|
|
83
|
-
// Identify blockers and risks
|
|
84
|
-
const blockers = this.identifyBlockers(workItems);
|
|
85
|
-
const risks = this.identifyRisks(workItems, statistics);
|
|
86
|
-
|
|
87
|
-
// Group work items by various criteria
|
|
88
|
-
const byState = this.groupByState(workItems);
|
|
89
|
-
const byAssignee = this.groupByAssignee(workItems);
|
|
90
|
-
const byType = this.groupByType(workItems);
|
|
91
|
-
|
|
92
|
-
const report = {
|
|
93
|
-
sprint: {
|
|
94
|
-
name: sprint.name,
|
|
95
|
-
path: sprint.path,
|
|
96
|
-
startDate: sprint.attributes?.startDate ?
|
|
97
|
-
new Date(sprint.attributes.startDate).toLocaleDateString() : 'N/A',
|
|
98
|
-
endDate: sprint.attributes?.finishDate ?
|
|
99
|
-
new Date(sprint.attributes.finishDate).toLocaleDateString() : 'N/A',
|
|
100
|
-
state: this.getSprintState(sprint),
|
|
101
|
-
daysRemaining: this.calculateDaysRemaining(sprint)
|
|
102
|
-
},
|
|
103
|
-
statistics,
|
|
104
|
-
byState,
|
|
105
|
-
byType,
|
|
106
|
-
byAssignee,
|
|
107
|
-
workItemDetails: this.formatWorkItemDetails(workItems),
|
|
108
|
-
blockers,
|
|
109
|
-
risks,
|
|
110
|
-
burndown,
|
|
111
|
-
velocity,
|
|
112
|
-
teamPerformance
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// Display or export the report
|
|
116
|
-
if (this.exportPath) {
|
|
117
|
-
await this.exportReport(report);
|
|
118
|
-
} else if (!this.silent) {
|
|
119
|
-
this.displayReport(report);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return report;
|
|
123
|
-
} catch (error) {
|
|
124
|
-
console.error('Error generating report:', error.message);
|
|
125
|
-
process.exit(1);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
async getSprintInfo() {
|
|
130
|
-
if (this.sprintPath) {
|
|
131
|
-
// Get specific sprint by path
|
|
132
|
-
const query = `
|
|
133
|
-
SELECT [System.Id] FROM workitems
|
|
134
|
-
WHERE [System.IterationPath] = '${this.sprintPath}'
|
|
135
|
-
AND [System.WorkItemType] IN ('Task', 'Bug', 'User Story', 'Feature')
|
|
136
|
-
`;
|
|
137
|
-
const result = await this.client.executeWiql(query);
|
|
138
|
-
if (result && result.workItems && result.workItems.length > 0) {
|
|
139
|
-
return {
|
|
140
|
-
name: this.sprintPath.split('\\').pop(),
|
|
141
|
-
path: this.sprintPath,
|
|
142
|
-
attributes: {}
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
return null;
|
|
146
|
-
} else {
|
|
147
|
-
// Get current sprint
|
|
148
|
-
return await this.client.getCurrentSprint();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
async getSprintWorkItems(sprint) {
|
|
153
|
-
const sprintPath = sprint.path || `${this.client.project}\\${sprint.name}`;
|
|
154
|
-
|
|
155
|
-
const query = `
|
|
156
|
-
SELECT [System.Id],
|
|
157
|
-
[System.Title],
|
|
158
|
-
[System.State],
|
|
159
|
-
[System.WorkItemType],
|
|
160
|
-
[System.AssignedTo],
|
|
161
|
-
[Microsoft.VSTS.Scheduling.StoryPoints],
|
|
162
|
-
[Microsoft.VSTS.Scheduling.RemainingWork],
|
|
163
|
-
[Microsoft.VSTS.Scheduling.CompletedWork],
|
|
164
|
-
[Microsoft.VSTS.Scheduling.OriginalEstimate],
|
|
165
|
-
[Microsoft.VSTS.Common.Priority],
|
|
166
|
-
[System.Tags],
|
|
167
|
-
[System.CreatedDate],
|
|
168
|
-
[System.ChangedDate],
|
|
169
|
-
[System.ClosedDate]
|
|
170
|
-
FROM workitems
|
|
171
|
-
WHERE [System.IterationPath] = '${sprintPath}'
|
|
172
|
-
AND [System.WorkItemType] IN ('Task', 'Bug', 'User Story', 'Feature', 'Epic')
|
|
173
|
-
ORDER BY [Microsoft.VSTS.Common.Priority] ASC, [System.Id] ASC
|
|
174
|
-
`;
|
|
175
|
-
|
|
176
|
-
const result = await this.client.executeWiql(query);
|
|
177
|
-
if (!result || !result.workItems || result.workItems.length === 0) {
|
|
178
|
-
return [];
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const ids = result.workItems.map(item => item.id);
|
|
182
|
-
return await this.client.getWorkItems(ids);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
calculateStatistics(workItems) {
|
|
186
|
-
const states = {
|
|
187
|
-
'New': 0,
|
|
188
|
-
'Active': 0,
|
|
189
|
-
'In Progress': 0,
|
|
190
|
-
'Resolved': 0,
|
|
191
|
-
'Closed': 0,
|
|
192
|
-
'Done': 0,
|
|
193
|
-
'Removed': 0
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
let totalStoryPoints = 0;
|
|
197
|
-
let completedStoryPoints = 0;
|
|
198
|
-
let totalRemainingWork = 0;
|
|
199
|
-
let totalCompletedWork = 0;
|
|
200
|
-
let totalOriginalEstimate = 0;
|
|
201
|
-
|
|
202
|
-
workItems.forEach(item => {
|
|
203
|
-
const fields = item.fields || {};
|
|
204
|
-
const state = fields['System.State'] || 'Unknown';
|
|
205
|
-
const storyPoints = fields['Microsoft.VSTS.Scheduling.StoryPoints'] || 0;
|
|
206
|
-
const remainingWork = fields['Microsoft.VSTS.Scheduling.RemainingWork'] || 0;
|
|
207
|
-
const completedWork = fields['Microsoft.VSTS.Scheduling.CompletedWork'] || 0;
|
|
208
|
-
const originalEstimate = fields['Microsoft.VSTS.Scheduling.OriginalEstimate'] || 0;
|
|
209
|
-
|
|
210
|
-
states[state] = (states[state] || 0) + 1;
|
|
211
|
-
totalStoryPoints += storyPoints;
|
|
212
|
-
totalRemainingWork += remainingWork;
|
|
213
|
-
totalCompletedWork += completedWork;
|
|
214
|
-
totalOriginalEstimate += originalEstimate;
|
|
215
|
-
|
|
216
|
-
if (state === 'Done' || state === 'Closed' || state === 'Resolved') {
|
|
217
|
-
completedStoryPoints += storyPoints;
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
const totalItems = workItems.length;
|
|
222
|
-
const completedItems = states['Done'] + states['Closed'] + states['Resolved'];
|
|
223
|
-
const inProgressItems = states['Active'] + states['In Progress'];
|
|
224
|
-
const newItems = states['New'];
|
|
225
|
-
const completionRate = totalItems > 0 ?
|
|
226
|
-
((completedItems / totalItems) * 100).toFixed(1) + '%' : '0%';
|
|
227
|
-
const storyPointsCompletion = totalStoryPoints > 0 ?
|
|
228
|
-
((completedStoryPoints / totalStoryPoints) * 100).toFixed(1) + '%' : '0%';
|
|
229
|
-
|
|
230
|
-
return {
|
|
231
|
-
totalItems,
|
|
232
|
-
completedItems,
|
|
233
|
-
inProgressItems,
|
|
234
|
-
newItems,
|
|
235
|
-
completionRate,
|
|
236
|
-
storyPointsCompletion,
|
|
237
|
-
totalStoryPoints,
|
|
238
|
-
completedStoryPoints,
|
|
239
|
-
remainingStoryPoints: totalStoryPoints - completedStoryPoints,
|
|
240
|
-
totalRemainingWork,
|
|
241
|
-
totalCompletedWork,
|
|
242
|
-
totalOriginalEstimate,
|
|
243
|
-
workCompletion: totalOriginalEstimate > 0 ?
|
|
244
|
-
((totalCompletedWork / totalOriginalEstimate) * 100).toFixed(1) + '%' : 'N/A',
|
|
245
|
-
velocity: completedStoryPoints,
|
|
246
|
-
burndownTrend: this.calculateBurndownTrend(totalRemainingWork, totalOriginalEstimate),
|
|
247
|
-
states
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
calculateBurndownTrend(remaining, original) {
|
|
252
|
-
if (original === 0) return 'No estimates';
|
|
253
|
-
const percentRemaining = (remaining / original) * 100;
|
|
254
|
-
if (percentRemaining > 70) return 'Behind schedule';
|
|
255
|
-
if (percentRemaining > 40) return 'On track';
|
|
256
|
-
return 'Ahead of schedule';
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
async calculateBurndown(sprint, workItems) {
|
|
260
|
-
// Simplified burndown calculation
|
|
261
|
-
// In a real implementation, this would fetch historical data
|
|
262
|
-
const startDate = sprint.attributes?.startDate ? new Date(sprint.attributes.startDate) : null;
|
|
263
|
-
const endDate = sprint.attributes?.finishDate ? new Date(sprint.attributes.finishDate) : null;
|
|
264
|
-
|
|
265
|
-
if (!startDate || !endDate) {
|
|
266
|
-
return null;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const totalDays = Math.ceil((endDate - startDate) / (1000 * 60 * 60 * 24));
|
|
270
|
-
const today = new Date();
|
|
271
|
-
const daysElapsed = Math.ceil((today - startDate) / (1000 * 60 * 60 * 24));
|
|
272
|
-
const daysRemaining = Math.max(0, totalDays - daysElapsed);
|
|
273
|
-
|
|
274
|
-
const totalWork = workItems.reduce((sum, item) => {
|
|
275
|
-
const estimate = item.fields?.['Microsoft.VSTS.Scheduling.OriginalEstimate'] || 0;
|
|
276
|
-
return sum + estimate;
|
|
277
|
-
}, 0);
|
|
278
|
-
|
|
279
|
-
const remainingWork = workItems.reduce((sum, item) => {
|
|
280
|
-
const remaining = item.fields?.['Microsoft.VSTS.Scheduling.RemainingWork'] || 0;
|
|
281
|
-
return sum + remaining;
|
|
282
|
-
}, 0);
|
|
283
|
-
|
|
284
|
-
const idealBurnRate = totalWork / totalDays;
|
|
285
|
-
const actualBurnRate = daysElapsed > 0 ? (totalWork - remainingWork) / daysElapsed : 0;
|
|
286
|
-
|
|
287
|
-
return {
|
|
288
|
-
totalDays,
|
|
289
|
-
daysElapsed,
|
|
290
|
-
daysRemaining,
|
|
291
|
-
totalWork,
|
|
292
|
-
remainingWork,
|
|
293
|
-
completedWork: totalWork - remainingWork,
|
|
294
|
-
idealBurnRate: idealBurnRate.toFixed(1),
|
|
295
|
-
actualBurnRate: actualBurnRate.toFixed(1),
|
|
296
|
-
projectedCompletion: actualBurnRate > 0 ?
|
|
297
|
-
Math.ceil(remainingWork / actualBurnRate) : 'Unknown',
|
|
298
|
-
status: actualBurnRate >= idealBurnRate ? 'On Track' : 'Behind'
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
async calculateVelocity() {
|
|
303
|
-
// Fetch historical velocity data for the last 3 sprints
|
|
304
|
-
// This is a simplified version - real implementation would query past sprints
|
|
305
|
-
const historicalVelocities = [35, 42, 38]; // Mock data
|
|
306
|
-
const averageVelocity = historicalVelocities.reduce((a, b) => a + b, 0) / historicalVelocities.length;
|
|
307
|
-
|
|
308
|
-
return {
|
|
309
|
-
historical: historicalVelocities,
|
|
310
|
-
average: averageVelocity.toFixed(1),
|
|
311
|
-
trend: this.calculateVelocityTrend(historicalVelocities)
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
calculateVelocityTrend(velocities) {
|
|
316
|
-
if (velocities.length < 2) return 'Insufficient data';
|
|
317
|
-
const recent = velocities[velocities.length - 1];
|
|
318
|
-
const previous = velocities[velocities.length - 2];
|
|
319
|
-
if (recent > previous * 1.1) return 'Improving';
|
|
320
|
-
if (recent < previous * 0.9) return 'Declining';
|
|
321
|
-
return 'Stable';
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
async calculateTeamPerformance(workItems) {
|
|
325
|
-
const byAssignee = {};
|
|
326
|
-
let totalEstimates = 0;
|
|
327
|
-
let totalCompleted = 0;
|
|
328
|
-
let bugCount = 0;
|
|
329
|
-
let totalItems = 0;
|
|
330
|
-
|
|
331
|
-
workItems.forEach(item => {
|
|
332
|
-
const fields = item.fields || {};
|
|
333
|
-
const assignee = fields['System.AssignedTo']?.displayName || 'Unassigned';
|
|
334
|
-
const type = fields['System.WorkItemType'];
|
|
335
|
-
const state = fields['System.State'];
|
|
336
|
-
const storyPoints = fields['Microsoft.VSTS.Scheduling.StoryPoints'] || 0;
|
|
337
|
-
const originalEstimate = fields['Microsoft.VSTS.Scheduling.OriginalEstimate'] || 0;
|
|
338
|
-
const completedWork = fields['Microsoft.VSTS.Scheduling.CompletedWork'] || 0;
|
|
339
|
-
|
|
340
|
-
if (!byAssignee[assignee]) {
|
|
341
|
-
byAssignee[assignee] = {
|
|
342
|
-
totalItems: 0,
|
|
343
|
-
completedItems: 0,
|
|
344
|
-
storyPoints: 0,
|
|
345
|
-
completedPoints: 0,
|
|
346
|
-
bugs: 0
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
byAssignee[assignee].totalItems++;
|
|
351
|
-
byAssignee[assignee].storyPoints += storyPoints;
|
|
352
|
-
|
|
353
|
-
if (state === 'Done' || state === 'Closed' || state === 'Resolved') {
|
|
354
|
-
byAssignee[assignee].completedItems++;
|
|
355
|
-
byAssignee[assignee].completedPoints += storyPoints;
|
|
356
|
-
totalCompleted += completedWork;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
if (type === 'Bug') {
|
|
360
|
-
byAssignee[assignee].bugs++;
|
|
361
|
-
bugCount++;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
totalEstimates += originalEstimate;
|
|
365
|
-
totalItems++;
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
const capacityUtilization = totalEstimates > 0 ?
|
|
369
|
-
((totalCompleted / totalEstimates) * 100).toFixed(1) + '%' : 'N/A';
|
|
370
|
-
const defectRate = totalItems > 0 ?
|
|
371
|
-
((bugCount / totalItems) * 100).toFixed(1) + '%' : '0%';
|
|
372
|
-
|
|
373
|
-
return {
|
|
374
|
-
byAssignee,
|
|
375
|
-
capacityUtilization,
|
|
376
|
-
defectRate,
|
|
377
|
-
bugCount,
|
|
378
|
-
teamSize: Object.keys(byAssignee).length - (byAssignee['Unassigned'] ? 1 : 0)
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
identifyBlockers(workItems) {
|
|
383
|
-
const blockers = [];
|
|
384
|
-
|
|
385
|
-
workItems.forEach(item => {
|
|
386
|
-
const fields = item.fields || {};
|
|
387
|
-
const tags = (fields['System.Tags'] || '').toLowerCase();
|
|
388
|
-
const state = fields['System.State'];
|
|
389
|
-
const title = fields['System.Title'];
|
|
390
|
-
const assignee = fields['System.AssignedTo']?.displayName || 'Unassigned';
|
|
391
|
-
|
|
392
|
-
if (tags.includes('blocked') || tags.includes('blocker')) {
|
|
393
|
-
blockers.push({
|
|
394
|
-
id: item.id,
|
|
395
|
-
title,
|
|
396
|
-
assignee,
|
|
397
|
-
reason: this.extractBlockerReason(tags),
|
|
398
|
-
daysBlocked: this.calculateDaysInState(fields['System.ChangedDate'])
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
return blockers;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
extractBlockerReason(tags) {
|
|
407
|
-
if (tags.includes('waiting')) return 'Waiting for dependencies';
|
|
408
|
-
if (tags.includes('approval')) return 'Pending approval';
|
|
409
|
-
if (tags.includes('resource')) return 'Resource constraints';
|
|
410
|
-
if (tags.includes('technical')) return 'Technical blocker';
|
|
411
|
-
return 'Unspecified blocker';
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
identifyRisks(workItems, statistics) {
|
|
415
|
-
const risks = [];
|
|
416
|
-
|
|
417
|
-
// Check completion rate
|
|
418
|
-
const completionRate = parseFloat(statistics.completionRate);
|
|
419
|
-
if (completionRate < 40) {
|
|
420
|
-
risks.push({
|
|
421
|
-
severity: 'High',
|
|
422
|
-
description: `Low completion rate (${statistics.completionRate}) - sprint goals at risk`
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
// Check for too many new items
|
|
427
|
-
if (statistics.newItems > statistics.totalItems * 0.3) {
|
|
428
|
-
risks.push({
|
|
429
|
-
severity: 'Medium',
|
|
430
|
-
description: `High number of new items (${statistics.newItems}) - scope may be unclear`
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
// Check for unassigned critical items
|
|
435
|
-
const unassignedCritical = workItems.filter(item => {
|
|
436
|
-
const fields = item.fields || {};
|
|
437
|
-
const priority = fields['Microsoft.VSTS.Common.Priority'] || 999;
|
|
438
|
-
const assignee = fields['System.AssignedTo'];
|
|
439
|
-
return priority <= 1 && !assignee;
|
|
440
|
-
});
|
|
441
|
-
|
|
442
|
-
if (unassignedCritical.length > 0) {
|
|
443
|
-
risks.push({
|
|
444
|
-
severity: 'High',
|
|
445
|
-
description: `${unassignedCritical.length} critical items are unassigned`
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
// Check burndown trend
|
|
450
|
-
if (statistics.burndownTrend === 'Behind schedule') {
|
|
451
|
-
risks.push({
|
|
452
|
-
severity: 'High',
|
|
453
|
-
description: 'Burndown indicates the team is behind schedule'
|
|
454
|
-
});
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
return risks;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
calculateDaysInState(changedDate) {
|
|
461
|
-
if (!changedDate) return 0;
|
|
462
|
-
const changed = new Date(changedDate);
|
|
463
|
-
const now = new Date();
|
|
464
|
-
return Math.floor((now - changed) / (1000 * 60 * 60 * 24));
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
calculateDaysRemaining(sprint) {
|
|
468
|
-
if (!sprint.attributes?.finishDate) return 'N/A';
|
|
469
|
-
const endDate = new Date(sprint.attributes.finishDate);
|
|
470
|
-
const now = new Date();
|
|
471
|
-
const days = Math.ceil((endDate - now) / (1000 * 60 * 60 * 24));
|
|
472
|
-
return days > 0 ? days : 0;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
getSprintState(sprint) {
|
|
476
|
-
if (!sprint.attributes) return 'Unknown';
|
|
477
|
-
const now = new Date();
|
|
478
|
-
const startDate = sprint.attributes.startDate ? new Date(sprint.attributes.startDate) : null;
|
|
479
|
-
const endDate = sprint.attributes.finishDate ? new Date(sprint.attributes.finishDate) : null;
|
|
480
|
-
|
|
481
|
-
if (!startDate || !endDate) return 'Not Scheduled';
|
|
482
|
-
if (now < startDate) return 'Future';
|
|
483
|
-
if (now > endDate) return 'Past';
|
|
484
|
-
return 'Current';
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
groupByState(workItems) {
|
|
488
|
-
const groups = {};
|
|
489
|
-
workItems.forEach(item => {
|
|
490
|
-
const state = item.fields?.['System.State'] || 'Unknown';
|
|
491
|
-
if (!groups[state]) groups[state] = [];
|
|
492
|
-
groups[state].push({
|
|
493
|
-
id: item.id,
|
|
494
|
-
title: item.fields?.['System.Title'],
|
|
495
|
-
type: item.fields?.['System.WorkItemType'],
|
|
496
|
-
assignee: item.fields?.['System.AssignedTo']?.displayName || 'Unassigned'
|
|
497
|
-
});
|
|
498
|
-
});
|
|
499
|
-
return groups;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
groupByAssignee(workItems) {
|
|
503
|
-
const groups = {};
|
|
504
|
-
workItems.forEach(item => {
|
|
505
|
-
const assignee = item.fields?.['System.AssignedTo']?.displayName || 'Unassigned';
|
|
506
|
-
if (!groups[assignee]) groups[assignee] = [];
|
|
507
|
-
groups[assignee].push({
|
|
508
|
-
id: item.id,
|
|
509
|
-
title: item.fields?.['System.Title'],
|
|
510
|
-
type: item.fields?.['System.WorkItemType'],
|
|
511
|
-
state: item.fields?.['System.State']
|
|
512
|
-
});
|
|
513
|
-
});
|
|
514
|
-
return groups;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
groupByType(workItems) {
|
|
518
|
-
const groups = {};
|
|
519
|
-
workItems.forEach(item => {
|
|
520
|
-
const type = item.fields?.['System.WorkItemType'] || 'Unknown';
|
|
521
|
-
if (!groups[type]) groups[type] = [];
|
|
522
|
-
groups[type].push({
|
|
523
|
-
id: item.id,
|
|
524
|
-
title: item.fields?.['System.Title'],
|
|
525
|
-
state: item.fields?.['System.State'],
|
|
526
|
-
assignee: item.fields?.['System.AssignedTo']?.displayName || 'Unassigned'
|
|
527
|
-
});
|
|
528
|
-
});
|
|
529
|
-
return groups;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
formatWorkItemDetails(workItems) {
|
|
533
|
-
return workItems.map(item => {
|
|
534
|
-
const fields = item.fields || {};
|
|
535
|
-
return {
|
|
536
|
-
id: item.id,
|
|
537
|
-
title: fields['System.Title'],
|
|
538
|
-
type: fields['System.WorkItemType'],
|
|
539
|
-
state: fields['System.State'],
|
|
540
|
-
assignedTo: fields['System.AssignedTo']?.displayName || 'Unassigned',
|
|
541
|
-
storyPoints: fields['Microsoft.VSTS.Scheduling.StoryPoints'] || 0,
|
|
542
|
-
remainingWork: fields['Microsoft.VSTS.Scheduling.RemainingWork'] || 0,
|
|
543
|
-
priority: fields['Microsoft.VSTS.Common.Priority'] || 999
|
|
544
|
-
};
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
displayReport(report) {
|
|
549
|
-
switch (this.format) {
|
|
550
|
-
case 'json':
|
|
551
|
-
console.log(JSON.stringify(report, null, 2));
|
|
552
|
-
break;
|
|
553
|
-
case 'csv':
|
|
554
|
-
this.displayCSV(report);
|
|
555
|
-
break;
|
|
556
|
-
case 'markdown':
|
|
557
|
-
this.displayMarkdown(report);
|
|
558
|
-
break;
|
|
559
|
-
case 'html':
|
|
560
|
-
this.displayHTML(report);
|
|
561
|
-
break;
|
|
562
|
-
default:
|
|
563
|
-
this.displayTable(report);
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
displayTable(report) {
|
|
568
|
-
console.log(chalk.cyan.bold(`🚀 ${report.sprint.name} Report`));
|
|
569
|
-
console.log(`Period: ${report.sprint.startDate} to ${report.sprint.endDate}`);
|
|
570
|
-
console.log(`Status: ${this.getStateColor(report.sprint.state)}`);
|
|
571
|
-
if (report.sprint.daysRemaining !== 'N/A') {
|
|
572
|
-
console.log(`Days Remaining: ${report.sprint.daysRemaining}\n`);
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
console.log(chalk.yellow.bold('📈 Statistics:'));
|
|
576
|
-
const stats = report.statistics;
|
|
577
|
-
console.log(` Total Items: ${chalk.blue(stats.totalItems)}`);
|
|
578
|
-
console.log(` Completed: ${chalk.green(stats.completedItems)} (${stats.completionRate})`);
|
|
579
|
-
console.log(` In Progress: ${chalk.yellow(stats.inProgressItems)}`);
|
|
580
|
-
console.log(` New: ${chalk.gray(stats.newItems)}`);
|
|
581
|
-
console.log(` Story Points: ${chalk.green(stats.completedStoryPoints)}/${stats.totalStoryPoints} (${stats.storyPointsCompletion})`);
|
|
582
|
-
console.log(` Work Hours: ${chalk.blue(stats.totalCompletedWork)}h completed, ${chalk.yellow(stats.totalRemainingWork)}h remaining`);
|
|
583
|
-
console.log(` Velocity: ${chalk.cyan(stats.velocity)} points`);
|
|
584
|
-
console.log(` Burndown: ${this.getBurndownColor(stats.burndownTrend)}\n`);
|
|
585
|
-
|
|
586
|
-
// Display burndown chart if included
|
|
587
|
-
if (report.burndown) {
|
|
588
|
-
this.displayBurndownChart(report.burndown);
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
// Display work item breakdown
|
|
592
|
-
console.log(chalk.green.bold('📋 Work Item Breakdown:'));
|
|
593
|
-
Object.entries(report.byType).forEach(([type, items]) => {
|
|
594
|
-
console.log(` ${type}: ${items.length} items`);
|
|
595
|
-
});
|
|
596
|
-
console.log('');
|
|
597
|
-
|
|
598
|
-
// Display team workload
|
|
599
|
-
console.log(chalk.blue.bold('👥 Team Workload:'));
|
|
600
|
-
const sortedAssignees = Object.entries(report.byAssignee).sort((a, b) => b[1].length - a[1].length);
|
|
601
|
-
sortedAssignees.slice(0, 5).forEach(([assignee, items]) => {
|
|
602
|
-
if (assignee !== 'Unassigned') {
|
|
603
|
-
const completed = items.filter(i => ['Done', 'Closed', 'Resolved'].includes(i.state)).length;
|
|
604
|
-
console.log(` ${assignee}: ${items.length} items (${completed} completed)`);
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
if (report.byAssignee['Unassigned']) {
|
|
608
|
-
console.log(` ${chalk.yellow('Unassigned')}: ${report.byAssignee['Unassigned'].length} items`);
|
|
609
|
-
}
|
|
610
|
-
console.log('');
|
|
611
|
-
|
|
612
|
-
// Display blockers
|
|
613
|
-
if (report.blockers && report.blockers.length > 0) {
|
|
614
|
-
console.log(chalk.red.bold('🚧 Blockers:'));
|
|
615
|
-
report.blockers.forEach(blocker => {
|
|
616
|
-
console.log(` [${chalk.red(blocker.id)}] ${blocker.title}`);
|
|
617
|
-
console.log(` Assigned to: ${blocker.assignee} | Reason: ${blocker.reason}`);
|
|
618
|
-
console.log(` Days blocked: ${chalk.red(blocker.daysBlocked)}`);
|
|
619
|
-
});
|
|
620
|
-
console.log('');
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// Display risks
|
|
624
|
-
if (report.risks && report.risks.length > 0) {
|
|
625
|
-
console.log(chalk.yellow.bold('⚠️ Risks:'));
|
|
626
|
-
report.risks.forEach(risk => {
|
|
627
|
-
const color = risk.severity === 'High' ? chalk.red : chalk.yellow;
|
|
628
|
-
console.log(` ${color(`[${risk.severity}]`)} ${risk.description}`);
|
|
629
|
-
});
|
|
630
|
-
console.log('');
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
// Display velocity trends if included
|
|
634
|
-
if (report.velocity) {
|
|
635
|
-
console.log(chalk.magenta.bold('📊 Velocity Trends:'));
|
|
636
|
-
console.log(` Historical: ${report.velocity.historical.join(', ')} points`);
|
|
637
|
-
console.log(` Average: ${report.velocity.average} points`);
|
|
638
|
-
console.log(` Trend: ${this.getTrendColor(report.velocity.trend)}\n`);
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
// Display team performance metrics if included
|
|
642
|
-
if (report.teamPerformance) {
|
|
643
|
-
console.log(chalk.cyan.bold('🎯 Team Performance:'));
|
|
644
|
-
console.log(` Team Size: ${report.teamPerformance.teamSize} members`);
|
|
645
|
-
console.log(` Capacity Utilization: ${report.teamPerformance.capacityUtilization}`);
|
|
646
|
-
console.log(` Defect Rate: ${report.teamPerformance.defectRate}`);
|
|
647
|
-
console.log(` Total Bugs: ${report.teamPerformance.bugCount}\n`);
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
displayBurndownChart(burndown) {
|
|
652
|
-
console.log(chalk.magenta.bold('📉 Burndown Analysis:'));
|
|
653
|
-
console.log(` Sprint Duration: ${burndown.totalDays} days`);
|
|
654
|
-
console.log(` Days Elapsed: ${burndown.daysElapsed} | Days Remaining: ${burndown.daysRemaining}`);
|
|
655
|
-
console.log(` Work Completed: ${chalk.green(burndown.completedWork + 'h')} / ${burndown.totalWork}h`);
|
|
656
|
-
console.log(` Ideal Burn Rate: ${burndown.idealBurnRate}h/day`);
|
|
657
|
-
console.log(` Actual Burn Rate: ${burndown.actualBurnRate}h/day`);
|
|
658
|
-
console.log(` Status: ${this.getBurndownColor(burndown.status)}`);
|
|
659
|
-
if (burndown.projectedCompletion !== 'Unknown') {
|
|
660
|
-
console.log(` Projected Completion: ${burndown.projectedCompletion} days`);
|
|
661
|
-
}
|
|
662
|
-
console.log('');
|
|
663
|
-
|
|
664
|
-
// Simple ASCII burndown chart
|
|
665
|
-
this.drawAsciiBurndown(burndown);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
drawAsciiBurndown(burndown) {
|
|
669
|
-
const width = 50;
|
|
670
|
-
const height = 10;
|
|
671
|
-
const chart = [];
|
|
672
|
-
|
|
673
|
-
// Initialize chart
|
|
674
|
-
for (let i = 0; i < height; i++) {
|
|
675
|
-
chart[i] = new Array(width).fill(' ');
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
// Draw axes
|
|
679
|
-
for (let i = 0; i < width; i++) {
|
|
680
|
-
chart[height - 1][i] = '─';
|
|
681
|
-
}
|
|
682
|
-
for (let i = 0; i < height; i++) {
|
|
683
|
-
chart[i][0] = '│';
|
|
684
|
-
}
|
|
685
|
-
chart[height - 1][0] = '└';
|
|
686
|
-
|
|
687
|
-
// Draw ideal line (diagonal from top-left to bottom-right)
|
|
688
|
-
const idealStep = burndown.totalWork / burndown.totalDays;
|
|
689
|
-
for (let day = 0; day <= burndown.totalDays && day < width - 1; day++) {
|
|
690
|
-
const idealRemaining = burndown.totalWork - (idealStep * day);
|
|
691
|
-
const y = Math.floor((height - 2) * (1 - idealRemaining / burndown.totalWork));
|
|
692
|
-
if (y >= 0 && y < height - 1) {
|
|
693
|
-
chart[y][day + 1] = '·';
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
// Draw actual line
|
|
698
|
-
const actualProgress = burndown.daysElapsed;
|
|
699
|
-
for (let day = 0; day <= actualProgress && day < width - 1; day++) {
|
|
700
|
-
const actualRemaining = burndown.totalWork - (burndown.actualBurnRate * day);
|
|
701
|
-
const y = Math.floor((height - 2) * (1 - actualRemaining / burndown.totalWork));
|
|
702
|
-
if (y >= 0 && y < height - 1) {
|
|
703
|
-
chart[y][day + 1] = '█';
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
// Print chart
|
|
708
|
-
console.log(' Burndown Chart (█ = Actual, · = Ideal):');
|
|
709
|
-
chart.forEach(row => {
|
|
710
|
-
console.log(' ' + row.join(''));
|
|
711
|
-
});
|
|
712
|
-
console.log(' Days →\n');
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
displayCSV(report) {
|
|
716
|
-
console.log('Sprint,Start Date,End Date,Total Items,Completed,In Progress,New,Completion Rate,Story Points,Velocity');
|
|
717
|
-
const s = report.statistics;
|
|
718
|
-
console.log(`"${report.sprint.name}","${report.sprint.startDate}","${report.sprint.endDate}",${s.totalItems},${s.completedItems},${s.inProgressItems},${s.newItems},"${s.completionRate}",${s.totalStoryPoints},${s.velocity}`);
|
|
719
|
-
|
|
720
|
-
if (report.workItemDetails && report.workItemDetails.length > 0) {
|
|
721
|
-
console.log('\nWork Items:');
|
|
722
|
-
console.log('ID,Title,Type,State,Assigned To,Story Points,Remaining Work,Priority');
|
|
723
|
-
report.workItemDetails.forEach(item => {
|
|
724
|
-
console.log(`${item.id},"${item.title}","${item.type}","${item.state}","${item.assignedTo}",${item.storyPoints},${item.remainingWork},${item.priority}`);
|
|
725
|
-
});
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
displayMarkdown(report) {
|
|
730
|
-
console.log(`# ${report.sprint.name} Sprint Report\n`);
|
|
731
|
-
console.log(`**Period:** ${report.sprint.startDate} to ${report.sprint.endDate}`);
|
|
732
|
-
console.log(`**Status:** ${report.sprint.state}`);
|
|
733
|
-
console.log(`**Days Remaining:** ${report.sprint.daysRemaining}\n`);
|
|
734
|
-
|
|
735
|
-
console.log('## Statistics\n');
|
|
736
|
-
const stats = report.statistics;
|
|
737
|
-
console.log('| Metric | Value |');
|
|
738
|
-
console.log('|--------|-------|');
|
|
739
|
-
console.log(`| Total Items | ${stats.totalItems} |`);
|
|
740
|
-
console.log(`| Completed | ${stats.completedItems} (${stats.completionRate}) |`);
|
|
741
|
-
console.log(`| In Progress | ${stats.inProgressItems} |`);
|
|
742
|
-
console.log(`| New | ${stats.newItems} |`);
|
|
743
|
-
console.log(`| Story Points | ${stats.completedStoryPoints}/${stats.totalStoryPoints} |`);
|
|
744
|
-
console.log(`| Velocity | ${stats.velocity} points |`);
|
|
745
|
-
console.log(`| Burndown Trend | ${stats.burndownTrend} |\n`);
|
|
746
|
-
|
|
747
|
-
if (report.blockers && report.blockers.length > 0) {
|
|
748
|
-
console.log('## Blockers\n');
|
|
749
|
-
report.blockers.forEach(blocker => {
|
|
750
|
-
console.log(`- **[${blocker.id}]** ${blocker.title}`);
|
|
751
|
-
console.log(` - Assigned to: ${blocker.assignee}`);
|
|
752
|
-
console.log(` - Reason: ${blocker.reason}`);
|
|
753
|
-
console.log(` - Days blocked: ${blocker.daysBlocked}`);
|
|
754
|
-
});
|
|
755
|
-
console.log('');
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
if (report.risks && report.risks.length > 0) {
|
|
759
|
-
console.log('## Risks\n');
|
|
760
|
-
report.risks.forEach(risk => {
|
|
761
|
-
console.log(`- **[${risk.severity}]** ${risk.description}`);
|
|
762
|
-
});
|
|
763
|
-
console.log('');
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
if (report.teamPerformance) {
|
|
767
|
-
console.log('## Team Performance\n');
|
|
768
|
-
console.log(`- **Team Size:** ${report.teamPerformance.teamSize} members`);
|
|
769
|
-
console.log(`- **Capacity Utilization:** ${report.teamPerformance.capacityUtilization}`);
|
|
770
|
-
console.log(`- **Defect Rate:** ${report.teamPerformance.defectRate}`);
|
|
771
|
-
console.log(`- **Total Bugs:** ${report.teamPerformance.bugCount}\n`);
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
displayHTML(report) {
|
|
776
|
-
const html = `
|
|
777
|
-
<!DOCTYPE html>
|
|
778
|
-
<html>
|
|
779
|
-
<head>
|
|
780
|
-
<title>${report.sprint.name} Sprint Report</title>
|
|
781
|
-
<style>
|
|
782
|
-
body { font-family: Arial, sans-serif; margin: 20px; }
|
|
783
|
-
h1 { color: #0078d4; }
|
|
784
|
-
h2 { color: #106ebe; border-bottom: 2px solid #e5e5e5; padding-bottom: 5px; }
|
|
785
|
-
table { border-collapse: collapse; width: 100%; margin: 15px 0; }
|
|
786
|
-
th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
|
|
787
|
-
th { background-color: #f2f2f2; }
|
|
788
|
-
.high-risk { color: #d83b01; font-weight: bold; }
|
|
789
|
-
.medium-risk { color: #f7630c; }
|
|
790
|
-
.blocker { background-color: #fde7e9; }
|
|
791
|
-
.metric-card { display: inline-block; padding: 15px; margin: 10px;
|
|
792
|
-
background: #f5f5f5; border-radius: 5px; min-width: 150px; }
|
|
793
|
-
.metric-value { font-size: 24px; font-weight: bold; color: #0078d4; }
|
|
794
|
-
.metric-label { color: #666; font-size: 12px; }
|
|
795
|
-
</style>
|
|
796
|
-
</head>
|
|
797
|
-
<body>
|
|
798
|
-
<h1>${report.sprint.name} Sprint Report</h1>
|
|
799
|
-
<p><strong>Period:</strong> ${report.sprint.startDate} to ${report.sprint.endDate}</p>
|
|
800
|
-
<p><strong>Status:</strong> ${report.sprint.state} | <strong>Days Remaining:</strong> ${report.sprint.daysRemaining}</p>
|
|
801
|
-
|
|
802
|
-
<h2>Key Metrics</h2>
|
|
803
|
-
<div>
|
|
804
|
-
<div class="metric-card">
|
|
805
|
-
<div class="metric-value">${report.statistics.completionRate}</div>
|
|
806
|
-
<div class="metric-label">Completion Rate</div>
|
|
807
|
-
</div>
|
|
808
|
-
<div class="metric-card">
|
|
809
|
-
<div class="metric-value">${report.statistics.velocity}</div>
|
|
810
|
-
<div class="metric-label">Velocity (Points)</div>
|
|
811
|
-
</div>
|
|
812
|
-
<div class="metric-card">
|
|
813
|
-
<div class="metric-value">${report.statistics.totalItems}</div>
|
|
814
|
-
<div class="metric-label">Total Items</div>
|
|
815
|
-
</div>
|
|
816
|
-
</div>
|
|
817
|
-
|
|
818
|
-
${this.generateHTMLTable(report)}
|
|
819
|
-
${this.generateHTMLBlockers(report.blockers)}
|
|
820
|
-
${this.generateHTMLRisks(report.risks)}
|
|
821
|
-
</body>
|
|
822
|
-
</html>`;
|
|
823
|
-
console.log(html);
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
generateHTMLTable(report) {
|
|
827
|
-
let html = '<h2>Work Items</h2><table><thead><tr>';
|
|
828
|
-
html += '<th>ID</th><th>Title</th><th>Type</th><th>State</th><th>Assigned To</th>';
|
|
829
|
-
html += '</tr></thead><tbody>';
|
|
830
|
-
|
|
831
|
-
report.workItemDetails.slice(0, 20).forEach(item => {
|
|
832
|
-
html += `<tr>`;
|
|
833
|
-
html += `<td>${item.id}</td>`;
|
|
834
|
-
html += `<td>${item.title}</td>`;
|
|
835
|
-
html += `<td>${item.type}</td>`;
|
|
836
|
-
html += `<td>${item.state}</td>`;
|
|
837
|
-
html += `<td>${item.assignedTo}</td>`;
|
|
838
|
-
html += `</tr>`;
|
|
839
|
-
});
|
|
840
|
-
|
|
841
|
-
html += '</tbody></table>';
|
|
842
|
-
return html;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
generateHTMLBlockers(blockers) {
|
|
846
|
-
if (!blockers || blockers.length === 0) return '';
|
|
847
|
-
|
|
848
|
-
let html = '<h2>Blockers</h2><table class="blocker"><thead><tr>';
|
|
849
|
-
html += '<th>ID</th><th>Title</th><th>Assigned To</th><th>Reason</th><th>Days Blocked</th>';
|
|
850
|
-
html += '</tr></thead><tbody>';
|
|
851
|
-
|
|
852
|
-
blockers.forEach(blocker => {
|
|
853
|
-
html += `<tr>`;
|
|
854
|
-
html += `<td>${blocker.id}</td>`;
|
|
855
|
-
html += `<td>${blocker.title}</td>`;
|
|
856
|
-
html += `<td>${blocker.assignee}</td>`;
|
|
857
|
-
html += `<td>${blocker.reason}</td>`;
|
|
858
|
-
html += `<td>${blocker.daysBlocked}</td>`;
|
|
859
|
-
html += `</tr>`;
|
|
860
|
-
});
|
|
861
|
-
|
|
862
|
-
html += '</tbody></table>';
|
|
863
|
-
return html;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
generateHTMLRisks(risks) {
|
|
867
|
-
if (!risks || risks.length === 0) return '';
|
|
868
|
-
|
|
869
|
-
let html = '<h2>Risks</h2><ul>';
|
|
870
|
-
risks.forEach(risk => {
|
|
871
|
-
const cssClass = risk.severity === 'High' ? 'high-risk' : 'medium-risk';
|
|
872
|
-
html += `<li class="${cssClass}">[${risk.severity}] ${risk.description}</li>`;
|
|
873
|
-
});
|
|
874
|
-
html += '</ul>';
|
|
875
|
-
return html;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
async exportReport(report) {
|
|
879
|
-
const content = this.format === 'json' ?
|
|
880
|
-
JSON.stringify(report, null, 2) :
|
|
881
|
-
this.format === 'html' ?
|
|
882
|
-
this.generateFullHTML(report) :
|
|
883
|
-
this.generateExportContent(report);
|
|
884
|
-
|
|
885
|
-
await fs.writeFile(this.exportPath, content);
|
|
886
|
-
console.log(chalk.green(`✅ Report exported to ${this.exportPath}`));
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
generateFullHTML(report) {
|
|
890
|
-
// Generate complete HTML document for export
|
|
891
|
-
return this.displayHTML(report);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
generateExportContent(report) {
|
|
895
|
-
// Generate content based on format for export
|
|
896
|
-
if (this.format === 'markdown') {
|
|
897
|
-
let content = '';
|
|
898
|
-
const originalLog = console.log;
|
|
899
|
-
console.log = (msg) => { content += msg + '\n'; };
|
|
900
|
-
this.displayMarkdown(report);
|
|
901
|
-
console.log = originalLog;
|
|
902
|
-
return content;
|
|
903
|
-
}
|
|
904
|
-
return JSON.stringify(report, null, 2);
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
getStateColor(state) {
|
|
908
|
-
const colors = {
|
|
909
|
-
'Current': chalk.green(state),
|
|
910
|
-
'Future': chalk.blue(state),
|
|
911
|
-
'Past': chalk.gray(state),
|
|
912
|
-
'Not Scheduled': chalk.yellow(state)
|
|
913
|
-
};
|
|
914
|
-
return colors[state] || chalk.white(state);
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
getBurndownColor(trend) {
|
|
918
|
-
const colors = {
|
|
919
|
-
'Ahead of schedule': chalk.green(trend),
|
|
920
|
-
'On track': chalk.blue(trend),
|
|
921
|
-
'Behind schedule': chalk.red(trend),
|
|
922
|
-
'No estimates': chalk.gray(trend)
|
|
923
|
-
};
|
|
924
|
-
return colors[trend] || chalk.white(trend);
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
getTrendColor(trend) {
|
|
928
|
-
const colors = {
|
|
929
|
-
'Improving': chalk.green(trend),
|
|
930
|
-
'Stable': chalk.blue(trend),
|
|
931
|
-
'Declining': chalk.red(trend),
|
|
932
|
-
'Insufficient data': chalk.gray(trend)
|
|
933
|
-
};
|
|
934
|
-
return colors[trend] || chalk.white(trend);
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
static parseArguments(args = process.argv) {
|
|
938
|
-
const options = {};
|
|
939
|
-
|
|
940
|
-
args.forEach((arg, index) => {
|
|
941
|
-
if (arg === '--sprint' && args[index + 1]) {
|
|
942
|
-
options.sprint = args[index + 1];
|
|
943
|
-
} else if (arg === '--format' && args[index + 1]) {
|
|
944
|
-
options.format = args[index + 1];
|
|
945
|
-
} else if (arg === '--export' && args[index + 1]) {
|
|
946
|
-
options.export = args[index + 1];
|
|
947
|
-
} else if (arg === '--no-metrics') {
|
|
948
|
-
options.metrics = false;
|
|
949
|
-
} else if (arg === '--no-burndown') {
|
|
950
|
-
options.burndown = false;
|
|
951
|
-
} else if (arg === '--no-velocity') {
|
|
952
|
-
options.velocity = false;
|
|
953
|
-
} else if (arg === '--json') {
|
|
954
|
-
options.format = 'json';
|
|
955
|
-
} else if (arg === '--csv') {
|
|
956
|
-
options.format = 'csv';
|
|
957
|
-
} else if (arg === '--markdown' || arg === '--md') {
|
|
958
|
-
options.format = 'markdown';
|
|
959
|
-
} else if (arg === '--html') {
|
|
960
|
-
options.format = 'html';
|
|
961
|
-
} else if (arg === '--silent' || arg === '-s') {
|
|
962
|
-
options.silent = true;
|
|
963
|
-
} else if (arg === '--help' || arg === '-h') {
|
|
964
|
-
console.log(chalk.cyan.bold('\nAzure DevOps Sprint Report Generator\n'));
|
|
965
|
-
console.log('Usage: azure-sprint-report [options]\n');
|
|
966
|
-
console.log('Options:');
|
|
967
|
-
console.log(' --sprint <path> Sprint iteration path');
|
|
968
|
-
console.log(' --format <format> Output format: table, json, csv, markdown, html');
|
|
969
|
-
console.log(' --export <file> Export report to file');
|
|
970
|
-
console.log(' --no-metrics Exclude team performance metrics');
|
|
971
|
-
console.log(' --no-burndown Exclude burndown analysis');
|
|
972
|
-
console.log(' --no-velocity Exclude velocity trends');
|
|
973
|
-
console.log(' --json Output as JSON');
|
|
974
|
-
console.log(' --csv Output as CSV');
|
|
975
|
-
console.log(' --markdown, --md Output as Markdown');
|
|
976
|
-
console.log(' --html Output as HTML');
|
|
977
|
-
console.log(' --silent, -s Silent mode');
|
|
978
|
-
console.log(' --help, -h Show this help\n');
|
|
979
|
-
console.log('Examples:');
|
|
980
|
-
console.log(' azure-sprint-report');
|
|
981
|
-
console.log(' azure-sprint-report --sprint "Project\\Sprint 2024.1"');
|
|
982
|
-
console.log(' azure-sprint-report --format markdown --export sprint-report.md');
|
|
983
|
-
console.log(' azure-sprint-report --no-metrics --json');
|
|
984
|
-
process.exit(0);
|
|
985
|
-
}
|
|
986
|
-
});
|
|
987
|
-
|
|
988
|
-
return options;
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
// Run if called directly
|
|
993
|
-
if (require.main === module) {
|
|
994
|
-
const options = AzureSprintReport.parseArguments();
|
|
995
|
-
const sprintReport = new AzureSprintReport(options);
|
|
996
|
-
|
|
997
|
-
sprintReport.generateReport()
|
|
998
|
-
.then(() => {
|
|
999
|
-
if (sprintReport.client) {
|
|
1000
|
-
const stats = sprintReport.client.getCacheStats();
|
|
1001
|
-
if (!options.silent && process.env.DEBUG) {
|
|
1002
|
-
console.log(chalk.dim(`\nCache stats: ${JSON.stringify(stats)}`));
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
})
|
|
1006
|
-
.catch(error => {
|
|
1007
|
-
console.error('Error:', error.message);
|
|
1008
|
-
process.exit(1);
|
|
1009
|
-
});
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
module.exports = AzureSprintReport;
|