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,970 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Azure DevOps Dashboard
|
|
5
|
-
* Provides a comprehensive dashboard view of project metrics and status
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const path = require('path');
|
|
9
|
-
const fs = require('fs');
|
|
10
|
-
const AzureDevOpsClient = require('../../providers/azure/lib/client');
|
|
11
|
-
|
|
12
|
-
// Simple chalk replacement for stub
|
|
13
|
-
const chalk = {
|
|
14
|
-
red: (str) => str,
|
|
15
|
-
green: (str) => str,
|
|
16
|
-
blue: (str) => str,
|
|
17
|
-
yellow: (str) => str,
|
|
18
|
-
cyan: (str) => str,
|
|
19
|
-
magenta: (str) => str,
|
|
20
|
-
gray: (str) => str,
|
|
21
|
-
white: (str) => str,
|
|
22
|
-
bold: (str) => str,
|
|
23
|
-
dim: (str) => str
|
|
24
|
-
};
|
|
25
|
-
chalk.red.bold = (str) => str;
|
|
26
|
-
chalk.green.bold = (str) => str;
|
|
27
|
-
chalk.blue.bold = (str) => str;
|
|
28
|
-
chalk.blue.underline = (str) => str;
|
|
29
|
-
chalk.yellow.bold = (str) => str;
|
|
30
|
-
chalk.cyan.bold = (str) => str;
|
|
31
|
-
chalk.magenta.bold = (str) => str;
|
|
32
|
-
chalk.gray.bold = (str) => str;
|
|
33
|
-
|
|
34
|
-
class AzureDashboard {
|
|
35
|
-
constructor(options = {}) {
|
|
36
|
-
this.options = options;
|
|
37
|
-
this.silent = options.silent || false;
|
|
38
|
-
this.format = options.format || 'table'; // table, json, html
|
|
39
|
-
this.refresh = options.refresh || false;
|
|
40
|
-
this.sections = options.sections || 'all'; // all, sprint, team, quality, velocity
|
|
41
|
-
this.projectPath = options.projectPath || process.cwd();
|
|
42
|
-
this.envPath = path.join(this.projectPath, '.claude', '.env');
|
|
43
|
-
|
|
44
|
-
// Setup colors based on silent mode
|
|
45
|
-
this.colors = {
|
|
46
|
-
green: this.silent ? '' : '\x1b[32m',
|
|
47
|
-
yellow: this.silent ? '' : '\x1b[33m',
|
|
48
|
-
red: this.silent ? '' : '\x1b[31m',
|
|
49
|
-
blue: this.silent ? '' : '\x1b[34m',
|
|
50
|
-
cyan: this.silent ? '' : '\x1b[36m',
|
|
51
|
-
magenta: this.silent ? '' : '\x1b[35m',
|
|
52
|
-
gray: this.silent ? '' : '\x1b[90m',
|
|
53
|
-
reset: this.silent ? '' : '\x1b[0m',
|
|
54
|
-
bold: this.silent ? '' : '\x1b[1m'
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
try {
|
|
58
|
-
// Load environment variables from .env file if it exists
|
|
59
|
-
const envPath = path.join(this.projectPath, '.env');
|
|
60
|
-
if (fs.existsSync(envPath)) {
|
|
61
|
-
require('dotenv').config({ path: envPath });
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Also check .claude/.env
|
|
65
|
-
const claudeEnvPath = path.join(this.projectPath, '.claude', '.env');
|
|
66
|
-
if (fs.existsSync(claudeEnvPath)) {
|
|
67
|
-
require('dotenv').config({ path: claudeEnvPath });
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Initialize Azure DevOps client
|
|
71
|
-
this.client = new AzureDevOpsClient();
|
|
72
|
-
} catch (error) {
|
|
73
|
-
// In test mode or when credentials are missing, we might not have a real client
|
|
74
|
-
if (options.testMode || options.silent || error.message.includes('Missing required environment variables')) {
|
|
75
|
-
this.client = null;
|
|
76
|
-
} else {
|
|
77
|
-
this.handleInitError(error);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
handleInitError(error) {
|
|
83
|
-
if (error.message.includes('Missing required environment variables')) {
|
|
84
|
-
console.error('❌ Azure DevOps configuration missing!\n');
|
|
85
|
-
console.error('Please set the following environment variables:');
|
|
86
|
-
console.error(' - AZURE_DEVOPS_ORG: Your Azure DevOps organization');
|
|
87
|
-
console.error(' - AZURE_DEVOPS_PROJECT: Your project name');
|
|
88
|
-
console.error(' - AZURE_DEVOPS_PAT: Your Personal Access Token\n');
|
|
89
|
-
console.error('You can set these in .env or .claude/.env file\n');
|
|
90
|
-
process.exit(1);
|
|
91
|
-
}
|
|
92
|
-
throw error;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
async loadEnvironment() {
|
|
96
|
-
// Initialize credentials object
|
|
97
|
-
this.credentials = {};
|
|
98
|
-
|
|
99
|
-
// Load environment variables from .env file if it exists
|
|
100
|
-
const envPath = path.join(this.projectPath, '.env');
|
|
101
|
-
if (fs.existsSync(envPath)) {
|
|
102
|
-
require('dotenv').config({ path: envPath });
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Also check .claude/.env
|
|
106
|
-
const claudeEnvPath = path.join(this.projectPath, '.claude', '.env');
|
|
107
|
-
let foundEnvFile = false;
|
|
108
|
-
|
|
109
|
-
if (fs.existsSync(claudeEnvPath)) {
|
|
110
|
-
foundEnvFile = true;
|
|
111
|
-
require('dotenv').config({ path: claudeEnvPath });
|
|
112
|
-
|
|
113
|
-
// Also read the file to populate credentials
|
|
114
|
-
const envContent = fs.readFileSync(claudeEnvPath, 'utf8');
|
|
115
|
-
const lines = envContent.split('\n');
|
|
116
|
-
|
|
117
|
-
lines.forEach(line => {
|
|
118
|
-
const trimmedLine = line.trim();
|
|
119
|
-
if (trimmedLine && !trimmedLine.startsWith('#')) {
|
|
120
|
-
const [key, ...valueParts] = trimmedLine.split('=');
|
|
121
|
-
if (key) {
|
|
122
|
-
const value = valueParts.join('=').trim();
|
|
123
|
-
this.credentials[key.trim()] = value;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Ensure we have all credentials from process.env
|
|
130
|
-
this.credentials.AZURE_DEVOPS_PAT = this.credentials.AZURE_DEVOPS_PAT || process.env.AZURE_DEVOPS_PAT;
|
|
131
|
-
this.credentials.AZURE_DEVOPS_ORG = this.credentials.AZURE_DEVOPS_ORG || process.env.AZURE_DEVOPS_ORG;
|
|
132
|
-
this.credentials.AZURE_DEVOPS_PROJECT = this.credentials.AZURE_DEVOPS_PROJECT || process.env.AZURE_DEVOPS_PROJECT;
|
|
133
|
-
|
|
134
|
-
// Check if we have all required credentials
|
|
135
|
-
const required = ['AZURE_DEVOPS_PAT', 'AZURE_DEVOPS_ORG', 'AZURE_DEVOPS_PROJECT'];
|
|
136
|
-
const missing = required.filter(key => !this.credentials[key]);
|
|
137
|
-
|
|
138
|
-
if (missing.length > 0 && !foundEnvFile && !fs.existsSync(envPath)) {
|
|
139
|
-
throw new Error('Azure DevOps credentials not configured. Please create .claude/.env file.');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return this.credentials;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
async getSprintInfo() {
|
|
146
|
-
if (!this.client) {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const sprint = await this.client.getCurrentSprint();
|
|
151
|
-
if (!sprint) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const sprintPath = `${this.client.project}\\${sprint.name}`;
|
|
156
|
-
const workItems = await this.client.getSprintWorkItems(sprintPath);
|
|
157
|
-
|
|
158
|
-
const progress = this.calculateSprintProgress(workItems);
|
|
159
|
-
const burndown = await this.getBurndownData(sprint, workItems);
|
|
160
|
-
const velocity = this.calculateVelocity(workItems);
|
|
161
|
-
|
|
162
|
-
return {
|
|
163
|
-
name: sprint.name,
|
|
164
|
-
startDate: sprint.attributes?.startDate,
|
|
165
|
-
endDate: sprint.attributes?.finishDate,
|
|
166
|
-
path: sprintPath,
|
|
167
|
-
daysRemaining: this.calculateDaysRemaining(sprint.attributes?.finishDate),
|
|
168
|
-
progress,
|
|
169
|
-
burndown,
|
|
170
|
-
velocity
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
calculateSprintProgress(workItems) {
|
|
175
|
-
const summary = {
|
|
176
|
-
completed: 0,
|
|
177
|
-
inProgress: 0,
|
|
178
|
-
new: 0,
|
|
179
|
-
total: workItems.length,
|
|
180
|
-
completionRate: '0%',
|
|
181
|
-
totalPoints: 0,
|
|
182
|
-
completedPoints: 0,
|
|
183
|
-
remainingWork: 0
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
workItems.forEach(item => {
|
|
187
|
-
const state = item.fields?.['System.State'];
|
|
188
|
-
const storyPoints = item.fields?.['Microsoft.VSTS.Scheduling.StoryPoints'] || 0;
|
|
189
|
-
const remaining = item.fields?.['Microsoft.VSTS.Scheduling.RemainingWork'] || 0;
|
|
190
|
-
|
|
191
|
-
if (state === 'Closed' || state === 'Resolved' || state === 'Done') {
|
|
192
|
-
summary.completed++;
|
|
193
|
-
summary.completedPoints += storyPoints;
|
|
194
|
-
} else if (state === 'Active' || state === 'In Progress') {
|
|
195
|
-
summary.inProgress++;
|
|
196
|
-
} else if (state === 'New' || state === 'Proposed') {
|
|
197
|
-
summary.new++;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
summary.totalPoints += storyPoints;
|
|
201
|
-
summary.remainingWork += remaining;
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
if (summary.total > 0) {
|
|
205
|
-
summary.completionRate = `${((summary.completed / summary.total) * 100).toFixed(1)}%`;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return summary;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
calculateDaysRemaining(endDate) {
|
|
212
|
-
if (!endDate) return 0;
|
|
213
|
-
const end = new Date(endDate);
|
|
214
|
-
const now = new Date();
|
|
215
|
-
const diffTime = end - now;
|
|
216
|
-
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
217
|
-
return Math.max(0, diffDays);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
async getBurndownData(sprint, workItems) {
|
|
221
|
-
// Calculate ideal burndown
|
|
222
|
-
const startDate = new Date(sprint.attributes?.startDate);
|
|
223
|
-
const endDate = new Date(sprint.attributes?.finishDate);
|
|
224
|
-
const totalDays = Math.ceil((endDate - startDate) / (1000 * 60 * 60 * 24));
|
|
225
|
-
|
|
226
|
-
const totalWork = workItems.reduce((sum, item) => {
|
|
227
|
-
return sum + (item.fields?.['Microsoft.VSTS.Scheduling.OriginalEstimate'] || 0);
|
|
228
|
-
}, 0);
|
|
229
|
-
|
|
230
|
-
const ideal = [];
|
|
231
|
-
const actual = [];
|
|
232
|
-
|
|
233
|
-
for (let i = 0; i <= totalDays; i++) {
|
|
234
|
-
ideal.push(totalWork - (totalWork / totalDays) * i);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// For actual, we would need historical data - simplified for now
|
|
238
|
-
const daysElapsed = Math.ceil((new Date() - startDate) / (1000 * 60 * 60 * 24));
|
|
239
|
-
const remainingWork = workItems.reduce((sum, item) => {
|
|
240
|
-
const state = item.fields?.['System.State'];
|
|
241
|
-
if (state !== 'Closed' && state !== 'Done' && state !== 'Resolved') {
|
|
242
|
-
return sum + (item.fields?.['Microsoft.VSTS.Scheduling.RemainingWork'] || 0);
|
|
243
|
-
}
|
|
244
|
-
return sum;
|
|
245
|
-
}, 0);
|
|
246
|
-
|
|
247
|
-
// Simplified actual burndown
|
|
248
|
-
for (let i = 0; i <= Math.min(daysElapsed, totalDays); i++) {
|
|
249
|
-
if (i === 0) {
|
|
250
|
-
actual.push(totalWork);
|
|
251
|
-
} else if (i === daysElapsed) {
|
|
252
|
-
actual.push(remainingWork);
|
|
253
|
-
} else {
|
|
254
|
-
// Linear interpolation for simplicity
|
|
255
|
-
actual.push(totalWork - ((totalWork - remainingWork) / daysElapsed) * i);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
const trend = remainingWork > ideal[daysElapsed] ? 'behind schedule' : 'on track';
|
|
260
|
-
|
|
261
|
-
return {
|
|
262
|
-
ideal,
|
|
263
|
-
actual,
|
|
264
|
-
trend,
|
|
265
|
-
remainingWork,
|
|
266
|
-
totalWork
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
calculateVelocity(workItems) {
|
|
271
|
-
const completedPoints = workItems
|
|
272
|
-
.filter(item => {
|
|
273
|
-
const state = item.fields?.['System.State'];
|
|
274
|
-
return state === 'Closed' || state === 'Done' || state === 'Resolved';
|
|
275
|
-
})
|
|
276
|
-
.reduce((sum, item) => {
|
|
277
|
-
return sum + (item.fields?.['Microsoft.VSTS.Scheduling.StoryPoints'] || 0);
|
|
278
|
-
}, 0);
|
|
279
|
-
|
|
280
|
-
return {
|
|
281
|
-
current: completedPoints,
|
|
282
|
-
average: completedPoints, // Would need historical data for true average
|
|
283
|
-
trend: 'stable'
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
async getWorkItemsBreakdown() {
|
|
288
|
-
if (!this.client) {
|
|
289
|
-
return {};
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
// Get all active work items
|
|
293
|
-
const query = `
|
|
294
|
-
SELECT [System.Id], [System.Title], [System.State],
|
|
295
|
-
[System.WorkItemType], [System.AssignedTo],
|
|
296
|
-
[Microsoft.VSTS.Common.Priority],
|
|
297
|
-
[Microsoft.VSTS.Scheduling.RemainingWork]
|
|
298
|
-
FROM workitems
|
|
299
|
-
WHERE [System.State] NOT IN ('Closed', 'Done', 'Resolved', 'Removed')
|
|
300
|
-
AND [System.WorkItemType] IN ('Task', 'Bug', 'User Story', 'Feature')
|
|
301
|
-
ORDER BY [Microsoft.VSTS.Common.Priority] ASC
|
|
302
|
-
`;
|
|
303
|
-
|
|
304
|
-
const result = await this.client.executeWiql(query);
|
|
305
|
-
if (!result || !result.workItems) return {};
|
|
306
|
-
|
|
307
|
-
const ids = result.workItems.map(item => item.id);
|
|
308
|
-
const workItems = await this.client.getWorkItems(ids);
|
|
309
|
-
|
|
310
|
-
const breakdown = {
|
|
311
|
-
byType: {},
|
|
312
|
-
byState: {},
|
|
313
|
-
byPriority: {},
|
|
314
|
-
byAssignee: {},
|
|
315
|
-
total: workItems.length
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
workItems.forEach(item => {
|
|
319
|
-
const type = item.fields?.['System.WorkItemType'] || 'Unknown';
|
|
320
|
-
const state = item.fields?.['System.State'] || 'Unknown';
|
|
321
|
-
const priority = item.fields?.['Microsoft.VSTS.Common.Priority'] || 999;
|
|
322
|
-
const assignee = item.fields?.['System.AssignedTo']?.displayName || 'Unassigned';
|
|
323
|
-
|
|
324
|
-
// By type
|
|
325
|
-
breakdown.byType[type] = (breakdown.byType[type] || 0) + 1;
|
|
326
|
-
|
|
327
|
-
// By state
|
|
328
|
-
breakdown.byState[state] = (breakdown.byState[state] || 0) + 1;
|
|
329
|
-
|
|
330
|
-
// By priority
|
|
331
|
-
breakdown.byPriority[priority] = (breakdown.byPriority[priority] || 0) + 1;
|
|
332
|
-
|
|
333
|
-
// By assignee
|
|
334
|
-
if (!breakdown.byAssignee[assignee]) {
|
|
335
|
-
breakdown.byAssignee[assignee] = {
|
|
336
|
-
count: 0,
|
|
337
|
-
remainingWork: 0
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
breakdown.byAssignee[assignee].count++;
|
|
341
|
-
breakdown.byAssignee[assignee].remainingWork +=
|
|
342
|
-
(item.fields?.['Microsoft.VSTS.Scheduling.RemainingWork'] || 0);
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
return breakdown;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
async getRiskIndicators() {
|
|
349
|
-
const risks = [];
|
|
350
|
-
|
|
351
|
-
if (!this.client) {
|
|
352
|
-
return risks;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
// Get blocked items
|
|
356
|
-
const blockedQuery = `
|
|
357
|
-
SELECT [System.Id], [System.Title], [System.Tags]
|
|
358
|
-
FROM workitems
|
|
359
|
-
WHERE [System.State] NOT IN ('Closed', 'Done', 'Resolved')
|
|
360
|
-
AND ([System.Tags] CONTAINS 'blocked' OR [System.Tags] CONTAINS 'impediment')
|
|
361
|
-
`;
|
|
362
|
-
|
|
363
|
-
try {
|
|
364
|
-
const blockedResult = await this.client.executeWiql(blockedQuery);
|
|
365
|
-
if (blockedResult?.workItems?.length > 0) {
|
|
366
|
-
risks.push({
|
|
367
|
-
level: 'high',
|
|
368
|
-
type: 'blocked',
|
|
369
|
-
description: `${blockedResult.workItems.length} blocked items`,
|
|
370
|
-
count: blockedResult.workItems.length
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
} catch (error) {
|
|
374
|
-
// Ignore query errors
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
// Get high priority bugs
|
|
378
|
-
const criticalBugsQuery = `
|
|
379
|
-
SELECT [System.Id], [System.Title]
|
|
380
|
-
FROM workitems
|
|
381
|
-
WHERE [System.WorkItemType] = 'Bug'
|
|
382
|
-
AND [System.State] NOT IN ('Closed', 'Resolved')
|
|
383
|
-
AND [Microsoft.VSTS.Common.Priority] = 1
|
|
384
|
-
`;
|
|
385
|
-
|
|
386
|
-
try {
|
|
387
|
-
const bugsResult = await this.client.executeWiql(criticalBugsQuery);
|
|
388
|
-
if (bugsResult?.workItems?.length > 0) {
|
|
389
|
-
risks.push({
|
|
390
|
-
level: 'high',
|
|
391
|
-
type: 'bugs',
|
|
392
|
-
description: `${bugsResult.workItems.length} critical bugs`,
|
|
393
|
-
count: bugsResult.workItems.length
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
} catch (error) {
|
|
397
|
-
// Ignore query errors
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
// Get overdue items
|
|
401
|
-
const overdueQuery = `
|
|
402
|
-
SELECT [System.Id], [System.Title], [Microsoft.VSTS.Scheduling.TargetDate]
|
|
403
|
-
FROM workitems
|
|
404
|
-
WHERE [System.State] NOT IN ('Closed', 'Done', 'Resolved')
|
|
405
|
-
AND [Microsoft.VSTS.Scheduling.TargetDate] < @today
|
|
406
|
-
`;
|
|
407
|
-
|
|
408
|
-
try {
|
|
409
|
-
const overdueResult = await this.client.executeWiql(overdueQuery);
|
|
410
|
-
if (overdueResult?.workItems?.length > 0) {
|
|
411
|
-
risks.push({
|
|
412
|
-
level: 'medium',
|
|
413
|
-
type: 'overdue',
|
|
414
|
-
description: `${overdueResult.workItems.length} overdue items`,
|
|
415
|
-
count: overdueResult.workItems.length
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
} catch (error) {
|
|
419
|
-
// Ignore query errors
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
return risks;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
async generateDashboard() {
|
|
426
|
-
try {
|
|
427
|
-
if (!this.silent && this.format !== "json") {
|
|
428
|
-
console.log(chalk.cyan.bold('\n📊 Project Dashboard\n'));
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
// Gather all dashboard data
|
|
432
|
-
const sprintInfo = await this.getSprintInfo();
|
|
433
|
-
const workItemsBreakdown = await this.getWorkItemsBreakdown();
|
|
434
|
-
const riskIndicators = await this.getRiskIndicators();
|
|
435
|
-
|
|
436
|
-
const dashboard = {
|
|
437
|
-
project: {
|
|
438
|
-
name: this.client?.project || 'Unknown Project',
|
|
439
|
-
organization: this.client?.organization || 'Unknown Org',
|
|
440
|
-
lastUpdated: new Date().toISOString()
|
|
441
|
-
},
|
|
442
|
-
sprint: sprintInfo || {
|
|
443
|
-
name: 'No active sprint',
|
|
444
|
-
startDate: null,
|
|
445
|
-
endDate: null,
|
|
446
|
-
daysRemaining: 0,
|
|
447
|
-
progress: {
|
|
448
|
-
completed: 0,
|
|
449
|
-
inProgress: 0,
|
|
450
|
-
new: 0,
|
|
451
|
-
total: 0,
|
|
452
|
-
completionRate: '0%',
|
|
453
|
-
totalPoints: 0,
|
|
454
|
-
completedPoints: 0,
|
|
455
|
-
remainingWork: 0
|
|
456
|
-
},
|
|
457
|
-
burndown: {
|
|
458
|
-
ideal: [],
|
|
459
|
-
actual: [],
|
|
460
|
-
trend: 'no data'
|
|
461
|
-
},
|
|
462
|
-
velocity: {
|
|
463
|
-
current: 0,
|
|
464
|
-
average: 0,
|
|
465
|
-
trend: 'no data'
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
workItems: workItemsBreakdown,
|
|
469
|
-
risks: riskIndicators,
|
|
470
|
-
team: {
|
|
471
|
-
members: Object.keys(workItemsBreakdown.byAssignee || {}).length,
|
|
472
|
-
workDistribution: workItemsBreakdown.byAssignee || {},
|
|
473
|
-
velocity: sprintInfo?.velocity || { current: 0, average: 0, trend: 'no data' }
|
|
474
|
-
},
|
|
475
|
-
quality: {
|
|
476
|
-
bugs: {
|
|
477
|
-
active: workItemsBreakdown.byType?.Bug || 0,
|
|
478
|
-
critical: riskIndicators.filter(r => r.type === 'bugs')[0]?.count || 0
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
if (!this.silent && this.format !== "json") {
|
|
484
|
-
this.displayDashboard(dashboard);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
return dashboard;
|
|
488
|
-
} catch (error) {
|
|
489
|
-
console.error('Error:', error.message);
|
|
490
|
-
process.exit(1);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
displayDashboard(data) {
|
|
495
|
-
switch (this.format) {
|
|
496
|
-
case 'json':
|
|
497
|
-
console.log(JSON.stringify(data, null, 2));
|
|
498
|
-
break;
|
|
499
|
-
case 'html':
|
|
500
|
-
this.displayHTML(data);
|
|
501
|
-
break;
|
|
502
|
-
default:
|
|
503
|
-
this.displayTable(data);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
displayTable(data) {
|
|
508
|
-
// Header
|
|
509
|
-
console.log(chalk.cyan.bold('═'.repeat(60)));
|
|
510
|
-
console.log(chalk.cyan.bold(` ${data.project.name} - Dashboard`));
|
|
511
|
-
console.log(chalk.gray(` Last Updated: ${new Date(data.project.lastUpdated).toLocaleString()}`));
|
|
512
|
-
console.log(chalk.cyan.bold('═'.repeat(60)) + '\n');
|
|
513
|
-
|
|
514
|
-
// Sprint Section
|
|
515
|
-
if (this.sections === 'all' || this.sections === 'sprint') {
|
|
516
|
-
console.log(chalk.green.bold('🏃 Sprint Status'));
|
|
517
|
-
console.log('─'.repeat(40));
|
|
518
|
-
if (data.sprint && data.sprint.name !== 'No active sprint') {
|
|
519
|
-
console.log(`Current Sprint: ${data.sprint.name}`);
|
|
520
|
-
console.log(`Period: ${data.sprint.startDate} to ${data.sprint.endDate}`);
|
|
521
|
-
console.log(`Days Remaining: ${data.sprint.daysRemaining}`);
|
|
522
|
-
console.log(`\nProgress:`);
|
|
523
|
-
const p = data.sprint.progress;
|
|
524
|
-
console.log(` Completed: ${chalk.green(p.completed)} | In Progress: ${chalk.yellow(p.inProgress)} | New: ${chalk.blue(p.new)}`);
|
|
525
|
-
console.log(` Total: ${p.total} | Completion: ${p.completionRate}`);
|
|
526
|
-
console.log(` Story Points: ${p.completedPoints}/${p.totalPoints} | Remaining Work: ${p.remainingWork}h`);
|
|
527
|
-
console.log(` Burndown Trend: ${this.getTrendColor(data.sprint.burndown.trend)}\n`);
|
|
528
|
-
} else {
|
|
529
|
-
console.log('No active sprint\n');
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
// Team Section
|
|
534
|
-
if (this.sections === 'all' || this.sections === 'team') {
|
|
535
|
-
console.log(chalk.blue.bold('👥 Team Performance'));
|
|
536
|
-
console.log('─'.repeat(40));
|
|
537
|
-
console.log(`Team Size: ${data.team.members}`);
|
|
538
|
-
console.log(`Velocity: ${data.team.velocity.current} (avg: ${data.team.velocity.average})`);
|
|
539
|
-
console.log(`Velocity Trend: ${this.getTrendColor(data.team.velocity.trend)}`);
|
|
540
|
-
console.log(`\nWork Distribution:`);
|
|
541
|
-
if (data.team.workDistribution) {
|
|
542
|
-
const topContributors = Object.entries(data.team.workDistribution)
|
|
543
|
-
.sort((a, b) => b[1].count - a[1].count)
|
|
544
|
-
.slice(0, 5);
|
|
545
|
-
topContributors.forEach(([name, work]) => {
|
|
546
|
-
console.log(` ${name}: ${work.count} items, ${work.remainingWork}h remaining`);
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
console.log('');
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
// Work Items Section
|
|
553
|
-
if ((this.sections === 'all' || this.sections === 'workitems') && data.workItems) {
|
|
554
|
-
console.log(chalk.yellow.bold('📋 Work Items Breakdown'));
|
|
555
|
-
console.log('─'.repeat(40));
|
|
556
|
-
console.log(`Total Active Items: ${data.workItems.total || 0}`);
|
|
557
|
-
|
|
558
|
-
if (data.workItems.byType) {
|
|
559
|
-
console.log('\nBy Type:');
|
|
560
|
-
Object.entries(data.workItems.byType).forEach(([type, count]) => {
|
|
561
|
-
console.log(` ${type}: ${count}`);
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
if (data.workItems.byState) {
|
|
566
|
-
console.log('\nBy State:');
|
|
567
|
-
Object.entries(data.workItems.byState).forEach(([state, count]) => {
|
|
568
|
-
const color = state === 'Active' || state === 'In Progress' ? chalk.yellow :
|
|
569
|
-
state === 'New' ? chalk.blue : chalk.gray;
|
|
570
|
-
console.log(` ${state}: ${color(count)}`);
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
if (data.workItems.byPriority) {
|
|
575
|
-
console.log('\nBy Priority:');
|
|
576
|
-
Object.entries(data.workItems.byPriority)
|
|
577
|
-
.sort((a, b) => a[0] - b[0])
|
|
578
|
-
.forEach(([priority, count]) => {
|
|
579
|
-
const color = priority === '1' ? chalk.red :
|
|
580
|
-
priority === '2' ? chalk.yellow : chalk.gray;
|
|
581
|
-
console.log(` Priority ${priority}: ${color(count)}`);
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
console.log('');
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
// Quality Section
|
|
588
|
-
if (this.sections === 'all' || this.sections === 'quality') {
|
|
589
|
-
console.log(chalk.yellow.bold('🐛 Quality Metrics'));
|
|
590
|
-
console.log('─'.repeat(40));
|
|
591
|
-
if (data.quality) {
|
|
592
|
-
const q = data.quality;
|
|
593
|
-
console.log(`Active Bugs: ${chalk.red(q.bugs.active || 0)}`);
|
|
594
|
-
if (q.bugs.critical > 0) {
|
|
595
|
-
console.log(chalk.red(`⚠️ Critical Bugs: ${q.bugs.critical}`));
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
console.log('');
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
// Risks Section
|
|
603
|
-
if (data.risks && data.risks.length > 0) {
|
|
604
|
-
console.log(chalk.red.bold('⚠️ Risk Indicators'));
|
|
605
|
-
console.log('─'.repeat(40));
|
|
606
|
-
data.risks.forEach(risk => {
|
|
607
|
-
const icon = risk.level === 'high' ? '🔴' : risk.level === 'medium' ? '🟡' : '🟢';
|
|
608
|
-
console.log(` ${icon} ${risk.description}`);
|
|
609
|
-
});
|
|
610
|
-
console.log('');
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
console.log(chalk.cyan.bold('═'.repeat(60)));
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
displayHTML(data) {
|
|
617
|
-
console.log('<!DOCTYPE html>');
|
|
618
|
-
console.log('<html><head><title>Dashboard</title></head><body>');
|
|
619
|
-
console.log(`<h1>${data.project.name} Dashboard</h1>`);
|
|
620
|
-
console.log('<p>HTML output is a stub - implement full HTML generation as needed</p>');
|
|
621
|
-
console.log('</body></html>');
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
getTrendColor(trend) {
|
|
625
|
-
if (trend.includes('increasing') || trend.includes('ahead')) {
|
|
626
|
-
return chalk.green(trend);
|
|
627
|
-
} else if (trend.includes('behind') || trend.includes('decreasing')) {
|
|
628
|
-
return chalk.red(trend);
|
|
629
|
-
} else {
|
|
630
|
-
return chalk.yellow(trend);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
async getCurrentSprintInfo() {
|
|
635
|
-
return this.fetchSprintInfo();
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
async fetchSprintInfo() {
|
|
639
|
-
// For testing, always return mock data if no client
|
|
640
|
-
if (!this.client) {
|
|
641
|
-
return {
|
|
642
|
-
name: 'Sprint 1 - 2024.1',
|
|
643
|
-
startDate: '2024-01-01',
|
|
644
|
-
endDate: '2024-01-14',
|
|
645
|
-
daysRemaining: 5,
|
|
646
|
-
progress: {
|
|
647
|
-
completed: 15,
|
|
648
|
-
inProgress: 8,
|
|
649
|
-
new: 5,
|
|
650
|
-
total: 28,
|
|
651
|
-
completionRate: '53.6%',
|
|
652
|
-
totalPoints: 50,
|
|
653
|
-
completedPoints: 27,
|
|
654
|
-
remainingWork: 120
|
|
655
|
-
},
|
|
656
|
-
burndown: {
|
|
657
|
-
ideal: [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0],
|
|
658
|
-
actual: [100, 95, 85, 78, 70, 65],
|
|
659
|
-
trend: 'slightly behind'
|
|
660
|
-
},
|
|
661
|
-
velocity: {
|
|
662
|
-
current: 45,
|
|
663
|
-
average: 42,
|
|
664
|
-
trend: 'increasing'
|
|
665
|
-
}
|
|
666
|
-
};
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
const sprintInfo = await this.getSprintInfo();
|
|
670
|
-
return sprintInfo || null;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
calculateProgress(sprintInfo) {
|
|
674
|
-
if (!sprintInfo || !sprintInfo.progress) {
|
|
675
|
-
return {
|
|
676
|
-
percentage: 0,
|
|
677
|
-
completed: 0,
|
|
678
|
-
total: 0,
|
|
679
|
-
remaining: 0
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
const p = sprintInfo.progress;
|
|
684
|
-
const percentage = p.total > 0 ? Math.round((p.completed / p.total) * 100) : 0;
|
|
685
|
-
|
|
686
|
-
return {
|
|
687
|
-
percentage,
|
|
688
|
-
completed: p.completed,
|
|
689
|
-
total: p.total,
|
|
690
|
-
remaining: p.total - p.completed
|
|
691
|
-
};
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
calculateSprintProgress(sprintInfo) {
|
|
695
|
-
// For compatibility with tests that expect a number
|
|
696
|
-
if (!sprintInfo || !sprintInfo.progress) {
|
|
697
|
-
return 0;
|
|
698
|
-
}
|
|
699
|
-
const p = sprintInfo.progress;
|
|
700
|
-
return p.total > 0 ? Math.round((p.completed / p.total) * 100) : 0;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
generateProgressBar(progress) {
|
|
704
|
-
const barLength = 30;
|
|
705
|
-
|
|
706
|
-
// Handle both object and number input
|
|
707
|
-
let percentage;
|
|
708
|
-
if (typeof progress === 'number') {
|
|
709
|
-
percentage = progress;
|
|
710
|
-
} else if (progress && typeof progress.percentage === 'number') {
|
|
711
|
-
percentage = progress.percentage;
|
|
712
|
-
} else {
|
|
713
|
-
percentage = 0;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
const filled = Math.round((percentage / 100) * barLength);
|
|
717
|
-
const empty = barLength - filled;
|
|
718
|
-
|
|
719
|
-
return '█'.repeat(filled) + '░'.repeat(empty) + ` ${percentage}%`;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
generateSprintProgressBar(sprintInfo) {
|
|
723
|
-
const percentage = this.calculateSprintProgress(sprintInfo);
|
|
724
|
-
return this.generateProgressBar(percentage);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
async getWorkItemsSummary() {
|
|
728
|
-
return this.fetchWorkItems();
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
async fetchWorkItems() {
|
|
732
|
-
// For testing, always return mock data if no client
|
|
733
|
-
if (!this.client) {
|
|
734
|
-
return {
|
|
735
|
-
byType: {
|
|
736
|
-
'Task': 15,
|
|
737
|
-
'User Story': 8,
|
|
738
|
-
'Bug': 5,
|
|
739
|
-
'Feature': 2
|
|
740
|
-
},
|
|
741
|
-
byState: {
|
|
742
|
-
'New': 5,
|
|
743
|
-
'Active': 8,
|
|
744
|
-
'Resolved': 10,
|
|
745
|
-
'Closed': 7
|
|
746
|
-
},
|
|
747
|
-
byPriority: {
|
|
748
|
-
1: 3,
|
|
749
|
-
2: 10,
|
|
750
|
-
3: 12,
|
|
751
|
-
4: 5
|
|
752
|
-
},
|
|
753
|
-
byAssignee: {
|
|
754
|
-
'John Doe': { count: 8, remainingWork: 32 },
|
|
755
|
-
'Jane Smith': { count: 7, remainingWork: 28 },
|
|
756
|
-
'Bob Johnson': { count: 5, remainingWork: 20 },
|
|
757
|
-
'Unassigned': { count: 10, remainingWork: 40 }
|
|
758
|
-
},
|
|
759
|
-
total: 30
|
|
760
|
-
};
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
const breakdown = await this.getWorkItemsBreakdown();
|
|
764
|
-
return breakdown;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
categorizeWorkItems(workItems) {
|
|
768
|
-
return {
|
|
769
|
-
byState: workItems.byState || {},
|
|
770
|
-
byType: workItems.byType || {},
|
|
771
|
-
byPriority: workItems.byPriority || {},
|
|
772
|
-
total: workItems.total || 0
|
|
773
|
-
};
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
async calculateBurndown(sprintInfo) {
|
|
777
|
-
if (!sprintInfo || !sprintInfo.burndown) {
|
|
778
|
-
return {
|
|
779
|
-
ideal: [],
|
|
780
|
-
actual: [],
|
|
781
|
-
trend: 'no data'
|
|
782
|
-
};
|
|
783
|
-
}
|
|
784
|
-
return sprintInfo.burndown;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
calculateVelocity(sprintInfo) {
|
|
788
|
-
if (!sprintInfo || !sprintInfo.velocity) {
|
|
789
|
-
return {
|
|
790
|
-
current: 0,
|
|
791
|
-
average: 0,
|
|
792
|
-
percentage: 0
|
|
793
|
-
};
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
const velocity = sprintInfo.velocity;
|
|
797
|
-
const percentage = velocity.average > 0 ?
|
|
798
|
-
Math.round((velocity.current / velocity.average) * 100) : 0;
|
|
799
|
-
|
|
800
|
-
return {
|
|
801
|
-
current: velocity.current,
|
|
802
|
-
average: velocity.average,
|
|
803
|
-
percentage
|
|
804
|
-
};
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
async analyzeTeamActivity(days = 7) {
|
|
808
|
-
// For testing, return mock data if no client
|
|
809
|
-
if (!this.client) {
|
|
810
|
-
return {
|
|
811
|
-
topContributors: [
|
|
812
|
-
{ name: 'John Doe', changes: 45, items: 12 },
|
|
813
|
-
{ name: 'Jane Smith', changes: 38, items: 10 },
|
|
814
|
-
{ name: 'Bob Johnson', changes: 28, items: 8 },
|
|
815
|
-
{ name: 'Alice Brown', changes: 22, items: 6 },
|
|
816
|
-
{ name: 'Charlie Wilson', changes: 18, items: 5 }
|
|
817
|
-
],
|
|
818
|
-
totalChanges: 151
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
// This would need historical data in real implementation
|
|
823
|
-
return {
|
|
824
|
-
topContributors: [],
|
|
825
|
-
totalChanges: 0
|
|
826
|
-
};
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
async detectAlerts() {
|
|
830
|
-
const risks = await this.getRiskIndicators();
|
|
831
|
-
|
|
832
|
-
// For testing, return mock data if no client
|
|
833
|
-
if ((!risks || risks.length === 0) && !this.client) {
|
|
834
|
-
return {
|
|
835
|
-
blocked: [
|
|
836
|
-
{ level: 'high', type: 'blocked', description: '3 blocked items', count: 3 }
|
|
837
|
-
],
|
|
838
|
-
highPriority: [
|
|
839
|
-
{ level: 'high', type: 'bugs', description: '2 critical bugs', count: 2 }
|
|
840
|
-
],
|
|
841
|
-
stale: [
|
|
842
|
-
{ level: 'medium', type: 'overdue', description: '5 overdue items', count: 5 }
|
|
843
|
-
]
|
|
844
|
-
};
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
return {
|
|
848
|
-
blocked: risks.filter(r => r.type === 'blocked'),
|
|
849
|
-
highPriority: risks.filter(r => r.type === 'bugs'),
|
|
850
|
-
stale: risks.filter(r => r.type === 'overdue')
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
async fetchRecentCompletions(days = 7) {
|
|
855
|
-
// For testing, return mock data if no client
|
|
856
|
-
if (!this.client) {
|
|
857
|
-
return [
|
|
858
|
-
{ id: 101, type: 'Task', title: 'Implement user authentication', icon: '✓' },
|
|
859
|
-
{ id: 102, type: 'Bug', title: 'Fix login issue', icon: '🐛' },
|
|
860
|
-
{ id: 103, type: 'User Story', title: 'Add password reset', icon: '📋' },
|
|
861
|
-
{ id: 104, type: 'Task', title: 'Update documentation', icon: '✓' },
|
|
862
|
-
{ id: 105, type: 'Feature', title: 'OAuth integration', icon: '⭐' }
|
|
863
|
-
];
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
// Would need to fetch completed items from last N days
|
|
867
|
-
return [];
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
generateOutput() {
|
|
871
|
-
// Generate dashboard output - this is called by generateDashboard
|
|
872
|
-
return this.generateDashboard();
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
// Additional methods for test compatibility
|
|
876
|
-
async getWorkItemsOverview() {
|
|
877
|
-
return this.fetchWorkItems();
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
async getSprintBurndown() {
|
|
881
|
-
const sprintInfo = await this.fetchSprintInfo();
|
|
882
|
-
return this.calculateBurndown(sprintInfo);
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
async getTeamActivity() {
|
|
886
|
-
return this.analyzeTeamActivity();
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
async getTeamActivitySummary() {
|
|
890
|
-
const activity = await this.analyzeTeamActivity();
|
|
891
|
-
return {
|
|
892
|
-
contributors: activity.topContributors || [],
|
|
893
|
-
totalChanges: activity.totalChanges || 0
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
async getSprintVelocity(sprintInfo) {
|
|
898
|
-
if (!sprintInfo) {
|
|
899
|
-
sprintInfo = await this.fetchSprintInfo();
|
|
900
|
-
}
|
|
901
|
-
return this.calculateVelocity(sprintInfo);
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
async getBlockedItems() {
|
|
905
|
-
const alerts = await this.detectAlerts();
|
|
906
|
-
return alerts.blocked || [];
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
async getHighPriorityItems() {
|
|
910
|
-
const alerts = await this.detectAlerts();
|
|
911
|
-
return alerts.highPriority || [];
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
async getStaleItems() {
|
|
915
|
-
const alerts = await this.detectAlerts();
|
|
916
|
-
return alerts.stale || [];
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
async getRecentCompletions() {
|
|
920
|
-
return this.fetchRecentCompletions();
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
async getDashboardSummary() {
|
|
924
|
-
return this.generateDashboard();
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
static parseArguments(args = process.argv) {
|
|
928
|
-
const options = {};
|
|
929
|
-
|
|
930
|
-
args.forEach((arg, index) => {
|
|
931
|
-
if (arg === '--sections' && args[index + 1]) {
|
|
932
|
-
options.sections = args[index + 1];
|
|
933
|
-
} else if (arg === '--format' && args[index + 1]) {
|
|
934
|
-
options.format = args[index + 1];
|
|
935
|
-
} else if (arg === '--refresh') {
|
|
936
|
-
options.refresh = true;
|
|
937
|
-
} else if (arg === '--json') {
|
|
938
|
-
options.format = 'json';
|
|
939
|
-
} else if (arg === '--html') {
|
|
940
|
-
options.format = 'html';
|
|
941
|
-
} else if (arg === '--silent' || arg === '-s') {
|
|
942
|
-
options.silent = true;
|
|
943
|
-
}
|
|
944
|
-
});
|
|
945
|
-
|
|
946
|
-
return options;
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
// Run if called directly
|
|
951
|
-
if (require.main === module) {
|
|
952
|
-
const options = AzureDashboard.parseArguments();
|
|
953
|
-
const dashboard = new AzureDashboard(options);
|
|
954
|
-
|
|
955
|
-
dashboard.generateDashboard()
|
|
956
|
-
.then(() => {
|
|
957
|
-
if (dashboard.client) {
|
|
958
|
-
const stats = dashboard.client.getCacheStats();
|
|
959
|
-
if (!options.silent && process.env.DEBUG) {
|
|
960
|
-
console.log(chalk.dim(`\nCache stats: ${JSON.stringify(stats)}`));
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
})
|
|
964
|
-
.catch(error => {
|
|
965
|
-
console.error('Error:', error.message);
|
|
966
|
-
process.exit(1);
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
module.exports = AzureDashboard;
|