claude-autopm 2.7.0 β 2.8.2
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 +307 -56
- package/autopm/.claude/.env +158 -0
- package/autopm/.claude/settings.local.json +9 -0
- package/bin/autopm.js +11 -2
- package/bin/commands/epic.js +23 -3
- package/bin/commands/plugin.js +395 -0
- package/bin/commands/team.js +184 -10
- package/install/install.js +223 -4
- package/lib/cli/commands/issue.js +360 -20
- package/lib/plugins/PluginManager.js +1328 -0
- package/lib/plugins/PluginManager.old.js +400 -0
- package/lib/providers/AzureDevOpsProvider.js +575 -0
- package/lib/providers/GitHubProvider.js +475 -0
- package/lib/services/EpicService.js +1092 -3
- package/lib/services/IssueService.js +991 -0
- package/package.json +9 -1
- package/scripts/publish-plugins.sh +166 -0
- package/autopm/.claude/agents/cloud/README.md +0 -55
- package/autopm/.claude/agents/cloud/aws-cloud-architect.md +0 -521
- package/autopm/.claude/agents/cloud/azure-cloud-architect.md +0 -436
- package/autopm/.claude/agents/cloud/gcp-cloud-architect.md +0 -385
- package/autopm/.claude/agents/cloud/gcp-cloud-functions-engineer.md +0 -306
- package/autopm/.claude/agents/cloud/gemini-api-expert.md +0 -880
- package/autopm/.claude/agents/cloud/kubernetes-orchestrator.md +0 -566
- package/autopm/.claude/agents/cloud/openai-python-expert.md +0 -1087
- package/autopm/.claude/agents/cloud/terraform-infrastructure-expert.md +0 -454
- package/autopm/.claude/agents/core/agent-manager.md +0 -296
- package/autopm/.claude/agents/core/code-analyzer.md +0 -131
- package/autopm/.claude/agents/core/file-analyzer.md +0 -162
- package/autopm/.claude/agents/core/test-runner.md +0 -200
- 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/data/langgraph-workflow-expert.md +0 -520
- package/autopm/.claude/agents/databases/README.md +0 -50
- package/autopm/.claude/agents/databases/bigquery-expert.md +0 -392
- package/autopm/.claude/agents/databases/cosmosdb-expert.md +0 -368
- package/autopm/.claude/agents/databases/mongodb-expert.md +0 -398
- package/autopm/.claude/agents/databases/postgresql-expert.md +0 -321
- package/autopm/.claude/agents/databases/redis-expert.md +0 -52
- package/autopm/.claude/agents/devops/README.md +0 -52
- package/autopm/.claude/agents/devops/azure-devops-specialist.md +0 -308
- package/autopm/.claude/agents/devops/docker-containerization-expert.md +0 -298
- package/autopm/.claude/agents/devops/github-operations-specialist.md +0 -335
- package/autopm/.claude/agents/devops/mcp-context-manager.md +0 -319
- package/autopm/.claude/agents/devops/observability-engineer.md +0 -574
- package/autopm/.claude/agents/devops/ssh-operations-expert.md +0 -1093
- package/autopm/.claude/agents/devops/traefik-proxy-expert.md +0 -444
- package/autopm/.claude/agents/frameworks/README.md +0 -64
- package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +0 -360
- package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +0 -254
- package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +0 -217
- package/autopm/.claude/agents/frameworks/react-ui-expert.md +0 -226
- package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +0 -770
- package/autopm/.claude/agents/frameworks/ux-design-expert.md +0 -244
- package/autopm/.claude/agents/integration/message-queue-engineer.md +0 -794
- package/autopm/.claude/agents/languages/README.md +0 -50
- package/autopm/.claude/agents/languages/bash-scripting-expert.md +0 -541
- package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +0 -197
- package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +0 -226
- package/autopm/.claude/agents/languages/python-backend-engineer.md +0 -214
- package/autopm/.claude/agents/languages/python-backend-expert.md +0 -289
- package/autopm/.claude/agents/testing/frontend-testing-engineer.md +0 -395
- package/autopm/.claude/commands/ai/langgraph-workflow.md +0 -65
- package/autopm/.claude/commands/ai/openai-chat.md +0 -65
- package/autopm/.claude/commands/azure/COMMANDS.md +0 -107
- package/autopm/.claude/commands/azure/COMMAND_MAPPING.md +0 -252
- package/autopm/.claude/commands/azure/INTEGRATION_FIX.md +0 -103
- package/autopm/.claude/commands/azure/README.md +0 -246
- package/autopm/.claude/commands/azure/active-work.md +0 -198
- package/autopm/.claude/commands/azure/aliases.md +0 -143
- package/autopm/.claude/commands/azure/blocked-items.md +0 -287
- package/autopm/.claude/commands/azure/clean.md +0 -93
- package/autopm/.claude/commands/azure/docs-query.md +0 -48
- package/autopm/.claude/commands/azure/feature-decompose.md +0 -380
- package/autopm/.claude/commands/azure/feature-list.md +0 -61
- package/autopm/.claude/commands/azure/feature-new.md +0 -115
- package/autopm/.claude/commands/azure/feature-show.md +0 -205
- package/autopm/.claude/commands/azure/feature-start.md +0 -130
- package/autopm/.claude/commands/azure/fix-integration-example.md +0 -93
- package/autopm/.claude/commands/azure/help.md +0 -150
- package/autopm/.claude/commands/azure/import-us.md +0 -269
- package/autopm/.claude/commands/azure/init.md +0 -211
- package/autopm/.claude/commands/azure/next-task.md +0 -262
- package/autopm/.claude/commands/azure/search.md +0 -160
- package/autopm/.claude/commands/azure/sprint-status.md +0 -235
- package/autopm/.claude/commands/azure/standup.md +0 -260
- package/autopm/.claude/commands/azure/sync-all.md +0 -99
- package/autopm/.claude/commands/azure/task-analyze.md +0 -186
- package/autopm/.claude/commands/azure/task-close.md +0 -329
- package/autopm/.claude/commands/azure/task-edit.md +0 -145
- package/autopm/.claude/commands/azure/task-list.md +0 -263
- package/autopm/.claude/commands/azure/task-new.md +0 -84
- package/autopm/.claude/commands/azure/task-reopen.md +0 -79
- package/autopm/.claude/commands/azure/task-show.md +0 -126
- package/autopm/.claude/commands/azure/task-start.md +0 -301
- package/autopm/.claude/commands/azure/task-status.md +0 -65
- package/autopm/.claude/commands/azure/task-sync.md +0 -67
- package/autopm/.claude/commands/azure/us-edit.md +0 -164
- package/autopm/.claude/commands/azure/us-list.md +0 -202
- package/autopm/.claude/commands/azure/us-new.md +0 -265
- package/autopm/.claude/commands/azure/us-parse.md +0 -253
- package/autopm/.claude/commands/azure/us-show.md +0 -188
- package/autopm/.claude/commands/azure/us-status.md +0 -320
- package/autopm/.claude/commands/azure/validate.md +0 -86
- package/autopm/.claude/commands/azure/work-item-sync.md +0 -47
- package/autopm/.claude/commands/cloud/infra-deploy.md +0 -38
- package/autopm/.claude/commands/github/workflow-create.md +0 -42
- package/autopm/.claude/commands/infrastructure/ssh-security.md +0 -65
- package/autopm/.claude/commands/infrastructure/traefik-setup.md +0 -65
- package/autopm/.claude/commands/kubernetes/deploy.md +0 -37
- package/autopm/.claude/commands/playwright/test-scaffold.md +0 -38
- package/autopm/.claude/commands/pm/blocked.md +0 -28
- package/autopm/.claude/commands/pm/clean.md +0 -119
- package/autopm/.claude/commands/pm/context-create.md +0 -136
- package/autopm/.claude/commands/pm/context-prime.md +0 -170
- package/autopm/.claude/commands/pm/context-update.md +0 -292
- package/autopm/.claude/commands/pm/context.md +0 -28
- package/autopm/.claude/commands/pm/epic-close.md +0 -86
- package/autopm/.claude/commands/pm/epic-decompose.md +0 -370
- package/autopm/.claude/commands/pm/epic-edit.md +0 -83
- package/autopm/.claude/commands/pm/epic-list.md +0 -30
- package/autopm/.claude/commands/pm/epic-merge.md +0 -222
- package/autopm/.claude/commands/pm/epic-oneshot.md +0 -119
- package/autopm/.claude/commands/pm/epic-refresh.md +0 -119
- package/autopm/.claude/commands/pm/epic-show.md +0 -28
- package/autopm/.claude/commands/pm/epic-split.md +0 -120
- package/autopm/.claude/commands/pm/epic-start.md +0 -195
- package/autopm/.claude/commands/pm/epic-status.md +0 -28
- package/autopm/.claude/commands/pm/epic-sync-modular.md +0 -338
- package/autopm/.claude/commands/pm/epic-sync-original.md +0 -473
- package/autopm/.claude/commands/pm/epic-sync.md +0 -486
- package/autopm/.claude/commands/pm/help.md +0 -28
- package/autopm/.claude/commands/pm/import.md +0 -115
- package/autopm/.claude/commands/pm/in-progress.md +0 -28
- package/autopm/.claude/commands/pm/init.md +0 -28
- package/autopm/.claude/commands/pm/issue-analyze.md +0 -202
- package/autopm/.claude/commands/pm/issue-close.md +0 -119
- package/autopm/.claude/commands/pm/issue-edit.md +0 -93
- package/autopm/.claude/commands/pm/issue-reopen.md +0 -87
- package/autopm/.claude/commands/pm/issue-show.md +0 -41
- package/autopm/.claude/commands/pm/issue-start.md +0 -234
- package/autopm/.claude/commands/pm/issue-status.md +0 -95
- package/autopm/.claude/commands/pm/issue-sync.md +0 -411
- package/autopm/.claude/commands/pm/next.md +0 -28
- package/autopm/.claude/commands/pm/prd-edit.md +0 -82
- package/autopm/.claude/commands/pm/prd-list.md +0 -28
- package/autopm/.claude/commands/pm/prd-new.md +0 -55
- package/autopm/.claude/commands/pm/prd-parse.md +0 -42
- package/autopm/.claude/commands/pm/prd-status.md +0 -28
- package/autopm/.claude/commands/pm/search.md +0 -28
- package/autopm/.claude/commands/pm/standup.md +0 -28
- package/autopm/.claude/commands/pm/status.md +0 -28
- package/autopm/.claude/commands/pm/sync.md +0 -99
- package/autopm/.claude/commands/pm/test-reference-update.md +0 -151
- package/autopm/.claude/commands/pm/validate.md +0 -28
- package/autopm/.claude/commands/pm/what-next.md +0 -28
- package/autopm/.claude/commands/python/api-scaffold.md +0 -50
- package/autopm/.claude/commands/python/docs-query.md +0 -48
- package/autopm/.claude/commands/react/app-scaffold.md +0 -50
- 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/commands/ui/tailwind-system.md +0 -64
- package/autopm/.claude/rules/ai-integration-patterns.md +0 -219
- package/autopm/.claude/rules/ci-cd-kubernetes-strategy.md +0 -25
- package/autopm/.claude/rules/database-management-strategy.md +0 -17
- package/autopm/.claude/rules/database-pipeline.md +0 -94
- package/autopm/.claude/rules/devops-troubleshooting-playbook.md +0 -450
- package/autopm/.claude/rules/docker-first-development.md +0 -404
- package/autopm/.claude/rules/infrastructure-pipeline.md +0 -128
- package/autopm/.claude/rules/performance-guidelines.md +0 -403
- package/autopm/.claude/rules/ui-development-standards.md +0 -281
- package/autopm/.claude/rules/ui-framework-rules.md +0 -151
- 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/autopm/.claude/scripts/pm/analytics.js +0 -425
- package/autopm/.claude/scripts/pm/blocked.js +0 -164
- package/autopm/.claude/scripts/pm/blocked.sh +0 -78
- package/autopm/.claude/scripts/pm/clean.js +0 -464
- package/autopm/.claude/scripts/pm/context-create.js +0 -216
- package/autopm/.claude/scripts/pm/context-prime.js +0 -335
- package/autopm/.claude/scripts/pm/context-update.js +0 -344
- package/autopm/.claude/scripts/pm/context.js +0 -338
- package/autopm/.claude/scripts/pm/epic-close.js +0 -347
- package/autopm/.claude/scripts/pm/epic-edit.js +0 -382
- package/autopm/.claude/scripts/pm/epic-list.js +0 -273
- package/autopm/.claude/scripts/pm/epic-list.sh +0 -109
- package/autopm/.claude/scripts/pm/epic-show.js +0 -291
- package/autopm/.claude/scripts/pm/epic-show.sh +0 -105
- package/autopm/.claude/scripts/pm/epic-split.js +0 -522
- package/autopm/.claude/scripts/pm/epic-start/epic-start.js +0 -183
- package/autopm/.claude/scripts/pm/epic-start/epic-start.sh +0 -94
- package/autopm/.claude/scripts/pm/epic-status.js +0 -291
- package/autopm/.claude/scripts/pm/epic-status.sh +0 -104
- package/autopm/.claude/scripts/pm/epic-sync/README.md +0 -208
- package/autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh +0 -77
- package/autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh +0 -86
- package/autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh +0 -79
- package/autopm/.claude/scripts/pm/epic-sync/update-references.sh +0 -89
- package/autopm/.claude/scripts/pm/epic-sync.sh +0 -137
- package/autopm/.claude/scripts/pm/help.js +0 -92
- package/autopm/.claude/scripts/pm/help.sh +0 -90
- package/autopm/.claude/scripts/pm/in-progress.js +0 -178
- package/autopm/.claude/scripts/pm/in-progress.sh +0 -93
- package/autopm/.claude/scripts/pm/init.js +0 -321
- package/autopm/.claude/scripts/pm/init.sh +0 -178
- package/autopm/.claude/scripts/pm/issue-close.js +0 -232
- package/autopm/.claude/scripts/pm/issue-edit.js +0 -310
- package/autopm/.claude/scripts/pm/issue-show.js +0 -272
- package/autopm/.claude/scripts/pm/issue-start.js +0 -181
- package/autopm/.claude/scripts/pm/issue-sync/format-comment.sh +0 -468
- package/autopm/.claude/scripts/pm/issue-sync/gather-updates.sh +0 -460
- package/autopm/.claude/scripts/pm/issue-sync/post-comment.sh +0 -330
- package/autopm/.claude/scripts/pm/issue-sync/preflight-validation.sh +0 -348
- package/autopm/.claude/scripts/pm/issue-sync/update-frontmatter.sh +0 -387
- package/autopm/.claude/scripts/pm/lib/README.md +0 -85
- package/autopm/.claude/scripts/pm/lib/epic-discovery.js +0 -119
- package/autopm/.claude/scripts/pm/lib/logger.js +0 -78
- package/autopm/.claude/scripts/pm/next.js +0 -189
- package/autopm/.claude/scripts/pm/next.sh +0 -72
- package/autopm/.claude/scripts/pm/optimize.js +0 -407
- package/autopm/.claude/scripts/pm/pr-create.js +0 -337
- package/autopm/.claude/scripts/pm/pr-list.js +0 -257
- package/autopm/.claude/scripts/pm/prd-list.js +0 -242
- package/autopm/.claude/scripts/pm/prd-list.sh +0 -103
- package/autopm/.claude/scripts/pm/prd-new.js +0 -684
- package/autopm/.claude/scripts/pm/prd-parse.js +0 -547
- package/autopm/.claude/scripts/pm/prd-status.js +0 -152
- package/autopm/.claude/scripts/pm/prd-status.sh +0 -63
- package/autopm/.claude/scripts/pm/release.js +0 -460
- package/autopm/.claude/scripts/pm/search.js +0 -192
- package/autopm/.claude/scripts/pm/search.sh +0 -89
- package/autopm/.claude/scripts/pm/standup.js +0 -362
- package/autopm/.claude/scripts/pm/standup.sh +0 -95
- package/autopm/.claude/scripts/pm/status.js +0 -148
- package/autopm/.claude/scripts/pm/status.sh +0 -59
- package/autopm/.claude/scripts/pm/sync-batch.js +0 -337
- package/autopm/.claude/scripts/pm/sync.js +0 -343
- package/autopm/.claude/scripts/pm/template-list.js +0 -141
- package/autopm/.claude/scripts/pm/template-new.js +0 -366
- package/autopm/.claude/scripts/pm/validate.js +0 -274
- package/autopm/.claude/scripts/pm/validate.sh +0 -106
- package/autopm/.claude/scripts/pm/what-next.js +0 -660
- package/bin/node/azure-feature-show.js +0 -7
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Analytics Command
|
|
4
|
-
*
|
|
5
|
-
* Display analytics and insights for PRDs/Epics/Tasks
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* autopm analytics:epic <epic-id> # Epic analytics with burndown
|
|
9
|
-
* autopm analytics:team # Team metrics
|
|
10
|
-
* autopm analytics:velocity # Velocity trends
|
|
11
|
-
* autopm analytics:export <epic-id> # Export to JSON/CSV
|
|
12
|
-
*
|
|
13
|
-
* Features:
|
|
14
|
-
* - Epic analytics (velocity, progress, blockers)
|
|
15
|
-
* - Burndown charts (ASCII visualization)
|
|
16
|
-
* - Team metrics (completion rate, duration)
|
|
17
|
-
* - Dependency analysis (bottlenecks, critical path)
|
|
18
|
-
* - Export to JSON/CSV
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
const AnalyticsEngine = require('../../../../lib/analytics-engine');
|
|
22
|
-
const BurndownChart = require('../../../../lib/burndown-chart');
|
|
23
|
-
const DependencyAnalyzer = require('../../../../lib/dependency-analyzer');
|
|
24
|
-
|
|
25
|
-
class AnalyticsCommand {
|
|
26
|
-
constructor() {
|
|
27
|
-
this.basePath = '.claude';
|
|
28
|
-
this.engine = new AnalyticsEngine({ basePath: this.basePath });
|
|
29
|
-
this.chartGenerator = new BurndownChart();
|
|
30
|
-
this.dependencyAnalyzer = new DependencyAnalyzer();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Show epic analytics with burndown chart
|
|
35
|
-
*/
|
|
36
|
-
async showEpicAnalytics(epicId) {
|
|
37
|
-
console.log(`\nπ Epic Analytics: ${epicId}\n`);
|
|
38
|
-
console.log('β'.repeat(70));
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
// Get epic analytics
|
|
42
|
-
const analytics = await this.engine.analyzeEpic(epicId);
|
|
43
|
-
|
|
44
|
-
// Display basic info
|
|
45
|
-
console.log(`\nπ ${analytics.title}`);
|
|
46
|
-
console.log(` ID: ${analytics.epicId}`);
|
|
47
|
-
console.log(` Status: ${this.getStatusEmoji(analytics.progress.percentage)} ${analytics.progress.percentage}% complete`);
|
|
48
|
-
|
|
49
|
-
// Status breakdown
|
|
50
|
-
console.log(`\nπ Status Breakdown:`);
|
|
51
|
-
console.log(` β
Completed: ${analytics.status.completed.toString().padStart(3)} tasks`);
|
|
52
|
-
console.log(` π In Progress: ${analytics.status.in_progress.toString().padStart(3)} tasks`);
|
|
53
|
-
console.log(` βΈ Pending: ${analytics.status.pending.toString().padStart(3)} tasks`);
|
|
54
|
-
console.log(` π¦ Total: ${analytics.status.total.toString().padStart(3)} tasks`);
|
|
55
|
-
|
|
56
|
-
// Velocity
|
|
57
|
-
console.log(`\nβ‘ Velocity:`);
|
|
58
|
-
console.log(` Current: ${analytics.velocity.current.toFixed(1)} tasks/week`);
|
|
59
|
-
console.log(` Average: ${analytics.velocity.average.toFixed(1)} tasks/week`);
|
|
60
|
-
console.log(` Trend: ${this.getTrendEmoji(analytics.velocity.trend)} ${analytics.velocity.trend}`);
|
|
61
|
-
|
|
62
|
-
// Timeline
|
|
63
|
-
console.log(`\nπ
Timeline:`);
|
|
64
|
-
console.log(` Started: ${analytics.timeline.started}`);
|
|
65
|
-
console.log(` Last Update: ${analytics.timeline.lastUpdate}`);
|
|
66
|
-
console.log(` Days Active: ${analytics.timeline.daysActive}`);
|
|
67
|
-
if (analytics.timeline.estimatedCompletion) {
|
|
68
|
-
console.log(` Est. Complete: ${analytics.timeline.estimatedCompletion}`);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Blockers
|
|
72
|
-
if (analytics.blockers && analytics.blockers.length > 0) {
|
|
73
|
-
console.log(`\nπ§ Blockers (${analytics.blockers.length}):`);
|
|
74
|
-
analytics.blockers.slice(0, 5).forEach(blocker => {
|
|
75
|
-
console.log(` β’ ${blocker.taskId}: ${blocker.reason}`);
|
|
76
|
-
});
|
|
77
|
-
if (analytics.blockers.length > 5) {
|
|
78
|
-
console.log(` ... and ${analytics.blockers.length - 5} more`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Dependencies
|
|
83
|
-
if (analytics.dependencies) {
|
|
84
|
-
console.log(`\nπ Dependencies:`);
|
|
85
|
-
console.log(` Blocked by: ${analytics.dependencies.blocked} tasks`);
|
|
86
|
-
console.log(` Blocking: ${analytics.dependencies.blocking} tasks`);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Generate burndown chart
|
|
90
|
-
console.log(`\nπ Burndown Chart:\n`);
|
|
91
|
-
const chart = await this.chartGenerator.generate(epicId);
|
|
92
|
-
console.log(chart);
|
|
93
|
-
|
|
94
|
-
console.log('\n' + 'β'.repeat(70));
|
|
95
|
-
|
|
96
|
-
} catch (error) {
|
|
97
|
-
console.error(`\nβ Error analyzing epic: ${error.message}`);
|
|
98
|
-
process.exit(1);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Show team metrics
|
|
104
|
-
*/
|
|
105
|
-
async showTeamMetrics(periodDays = 30) {
|
|
106
|
-
console.log(`\nπ Team Metrics (Last ${periodDays} Days)\n`);
|
|
107
|
-
console.log('β'.repeat(70));
|
|
108
|
-
|
|
109
|
-
try {
|
|
110
|
-
const metrics = await this.engine.getTeamMetrics({ period: periodDays });
|
|
111
|
-
|
|
112
|
-
// Period
|
|
113
|
-
console.log(`\nπ
Period: ${metrics.period.start} to ${metrics.period.end}`);
|
|
114
|
-
|
|
115
|
-
// Completion
|
|
116
|
-
console.log(`\nβ
Completion:`);
|
|
117
|
-
console.log(` Completed: ${metrics.completion.completed}/${metrics.completion.total} items`);
|
|
118
|
-
console.log(` Rate: ${(metrics.completion.rate * 100).toFixed(1)}%`);
|
|
119
|
-
|
|
120
|
-
// Velocity
|
|
121
|
-
console.log(`\nβ‘ Velocity:`);
|
|
122
|
-
console.log(` Tasks/week: ${metrics.velocity.tasksPerWeek.toFixed(1)}`);
|
|
123
|
-
console.log(` Epics/month: ${metrics.velocity.epicsPerMonth.toFixed(1)}`);
|
|
124
|
-
|
|
125
|
-
// Duration
|
|
126
|
-
console.log(`\nβ±οΈ Average Duration:`);
|
|
127
|
-
console.log(` Task: ${metrics.duration.averageTaskDays.toFixed(1)} days`);
|
|
128
|
-
console.log(` Epic: ${metrics.duration.averageEpicDays.toFixed(1)} days`);
|
|
129
|
-
|
|
130
|
-
// Breakdown
|
|
131
|
-
console.log(`\nπ¦ Breakdown by Type:`);
|
|
132
|
-
Object.entries(metrics.breakdown).forEach(([type, stats]) => {
|
|
133
|
-
const rate = stats.total > 0 ? ((stats.completed / stats.total) * 100).toFixed(1) : '0.0';
|
|
134
|
-
console.log(` ${type.toUpperCase().padEnd(6)}: ${stats.completed}/${stats.total} (${rate}%)`);
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
console.log('\n' + 'β'.repeat(70));
|
|
138
|
-
|
|
139
|
-
} catch (error) {
|
|
140
|
-
console.error(`\nβ Error calculating team metrics: ${error.message}`);
|
|
141
|
-
process.exit(1);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Show velocity trends
|
|
147
|
-
*/
|
|
148
|
-
async showVelocity(periodDays = 30) {
|
|
149
|
-
console.log(`\nβ‘ Velocity Trends (Last ${periodDays} Days)\n`);
|
|
150
|
-
console.log('β'.repeat(70));
|
|
151
|
-
|
|
152
|
-
try {
|
|
153
|
-
// Get all epics
|
|
154
|
-
const FilterEngine = require('../../../../lib/filter-engine');
|
|
155
|
-
const filterEngine = new FilterEngine({ basePath: this.basePath });
|
|
156
|
-
const epics = await filterEngine.loadFiles(`${this.basePath}/epics/*/epic.md`);
|
|
157
|
-
|
|
158
|
-
if (epics.length === 0) {
|
|
159
|
-
console.log('\nβΉοΈ No epics found.');
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
console.log(`\nπ Epic Velocities:\n`);
|
|
164
|
-
|
|
165
|
-
for (const epic of epics.slice(0, 10)) {
|
|
166
|
-
try {
|
|
167
|
-
const analytics = await this.engine.analyzeEpic(epic.frontmatter.id);
|
|
168
|
-
const trend = this.getTrendEmoji(analytics.velocity.trend);
|
|
169
|
-
|
|
170
|
-
console.log(` ${epic.frontmatter.id.padEnd(15)} ${trend} ${analytics.velocity.current.toFixed(1)} tasks/week (avg: ${analytics.velocity.average.toFixed(1)})`);
|
|
171
|
-
} catch (err) {
|
|
172
|
-
// Skip epics with errors
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (epics.length > 10) {
|
|
177
|
-
console.log(`\n ... and ${epics.length - 10} more epics`);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
console.log('\n' + 'β'.repeat(70));
|
|
181
|
-
|
|
182
|
-
} catch (error) {
|
|
183
|
-
console.error(`\nβ Error calculating velocity: ${error.message}`);
|
|
184
|
-
process.exit(1);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Export analytics to file
|
|
190
|
-
*/
|
|
191
|
-
async exportAnalytics(epicId, format = 'json', outputFile = null) {
|
|
192
|
-
console.log(`\nπ€ Exporting analytics for ${epicId}...\n`);
|
|
193
|
-
|
|
194
|
-
try {
|
|
195
|
-
const analytics = await this.engine.analyzeEpic(epicId);
|
|
196
|
-
const exported = await this.engine.export(analytics, format);
|
|
197
|
-
|
|
198
|
-
const fs = require('fs');
|
|
199
|
-
const path = require('path');
|
|
200
|
-
|
|
201
|
-
if (!outputFile) {
|
|
202
|
-
outputFile = `${epicId}-analytics.${format}`;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
fs.writeFileSync(outputFile, exported);
|
|
206
|
-
|
|
207
|
-
console.log(`β
Exported to: ${path.resolve(outputFile)}`);
|
|
208
|
-
console.log(` Format: ${format.toUpperCase()}`);
|
|
209
|
-
console.log(` Size: ${exported.length} bytes`);
|
|
210
|
-
|
|
211
|
-
} catch (error) {
|
|
212
|
-
console.error(`\nβ Error exporting analytics: ${error.message}`);
|
|
213
|
-
process.exit(1);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Show dependency analysis
|
|
219
|
-
*/
|
|
220
|
-
async showDependencies(epicId) {
|
|
221
|
-
console.log(`\nπ Dependency Analysis: ${epicId}\n`);
|
|
222
|
-
console.log('β'.repeat(70));
|
|
223
|
-
|
|
224
|
-
try {
|
|
225
|
-
const analysis = await this.dependencyAnalyzer.analyze(epicId);
|
|
226
|
-
|
|
227
|
-
// Graph overview
|
|
228
|
-
console.log(`\nπ Graph Overview:`);
|
|
229
|
-
console.log(` Tasks: ${analysis.graph.nodes.length}`);
|
|
230
|
-
console.log(` Dependencies: ${analysis.graph.edges.length}`);
|
|
231
|
-
|
|
232
|
-
// Bottlenecks
|
|
233
|
-
if (analysis.bottlenecks.length > 0) {
|
|
234
|
-
console.log(`\nπ§ Bottlenecks (${analysis.bottlenecks.length}):`);
|
|
235
|
-
analysis.bottlenecks.slice(0, 5).forEach(bottleneck => {
|
|
236
|
-
const impactEmoji = bottleneck.impact === 'high' ? 'π΄' :
|
|
237
|
-
bottleneck.impact === 'medium' ? 'π‘' : 'π’';
|
|
238
|
-
console.log(` ${impactEmoji} ${bottleneck.taskId}: blocks ${bottleneck.blocking} tasks`);
|
|
239
|
-
console.log(` ${bottleneck.reason}`);
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// Critical path
|
|
244
|
-
if (analysis.criticalPath.length > 0) {
|
|
245
|
-
console.log(`\nπ― Critical Path (${analysis.criticalPath.length} tasks):`);
|
|
246
|
-
console.log(` ${analysis.criticalPath.join(' β ')}`);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// Parallelizable
|
|
250
|
-
if (analysis.parallelizable.length > 0) {
|
|
251
|
-
console.log(`\nβ‘ Parallelizable Groups (${analysis.parallelizable.length}):`);
|
|
252
|
-
analysis.parallelizable.slice(0, 3).forEach((group, i) => {
|
|
253
|
-
console.log(` Group ${i + 1}: ${group.join(', ')}`);
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Circular dependencies
|
|
258
|
-
if (analysis.circularDependencies && analysis.circularDependencies.length > 0) {
|
|
259
|
-
console.log(`\nβ οΈ Circular Dependencies (${analysis.circularDependencies.length}):`);
|
|
260
|
-
analysis.circularDependencies.forEach(cycle => {
|
|
261
|
-
console.log(` ${cycle.join(' β ')}`);
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
console.log('\n' + 'β'.repeat(70));
|
|
266
|
-
|
|
267
|
-
} catch (error) {
|
|
268
|
-
console.error(`\nβ Error analyzing dependencies: ${error.message}`);
|
|
269
|
-
process.exit(1);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Show help
|
|
275
|
-
*/
|
|
276
|
-
showHelp() {
|
|
277
|
-
console.log(`
|
|
278
|
-
π Analytics Command
|
|
279
|
-
|
|
280
|
-
Display analytics and insights for PRDs/Epics/Tasks
|
|
281
|
-
|
|
282
|
-
Usage:
|
|
283
|
-
autopm analytics:epic <epic-id> Epic analytics with burndown
|
|
284
|
-
autopm analytics:team [--period 30] Team metrics (default: 30 days)
|
|
285
|
-
autopm analytics:velocity [--period 30] Velocity trends
|
|
286
|
-
autopm analytics:dependencies <epic-id> Dependency analysis
|
|
287
|
-
autopm analytics:export <epic-id> [--format json|csv] [--output file.json]
|
|
288
|
-
|
|
289
|
-
Examples:
|
|
290
|
-
autopm analytics:epic epic-001
|
|
291
|
-
autopm analytics:team --period 60
|
|
292
|
-
autopm analytics:export epic-001 --format csv --output report.csv
|
|
293
|
-
|
|
294
|
-
Options:
|
|
295
|
-
--period <days> Time period for metrics (default: 30)
|
|
296
|
-
--format <type> Export format: json or csv (default: json)
|
|
297
|
-
--output <file> Output file (default: <epic-id>-analytics.<format>)
|
|
298
|
-
--help Show this help
|
|
299
|
-
`);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Helper: Get status emoji
|
|
304
|
-
*/
|
|
305
|
-
getStatusEmoji(percentage) {
|
|
306
|
-
if (percentage >= 80) return 'π’';
|
|
307
|
-
if (percentage >= 50) return 'π‘';
|
|
308
|
-
if (percentage >= 20) return 'π ';
|
|
309
|
-
return 'π΄';
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Helper: Get trend emoji
|
|
314
|
-
*/
|
|
315
|
-
getTrendEmoji(trend) {
|
|
316
|
-
if (trend === 'increasing') return 'π';
|
|
317
|
-
if (trend === 'decreasing') return 'π';
|
|
318
|
-
return 'β‘οΈ';
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Parse arguments
|
|
323
|
-
*/
|
|
324
|
-
parseArgs(args) {
|
|
325
|
-
const options = {
|
|
326
|
-
command: null,
|
|
327
|
-
epicId: null,
|
|
328
|
-
period: 30,
|
|
329
|
-
format: 'json',
|
|
330
|
-
output: null
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
for (let i = 0; i < args.length; i++) {
|
|
334
|
-
const arg = args[i];
|
|
335
|
-
|
|
336
|
-
if (arg === '--help' || arg === '-h') {
|
|
337
|
-
this.showHelp();
|
|
338
|
-
process.exit(0);
|
|
339
|
-
} else if (arg === '--period' || arg === '-p') {
|
|
340
|
-
options.period = parseInt(args[++i], 10);
|
|
341
|
-
} else if (arg === '--format' || arg === '-f') {
|
|
342
|
-
options.format = args[++i];
|
|
343
|
-
} else if (arg === '--output' || arg === '-o') {
|
|
344
|
-
options.output = args[++i];
|
|
345
|
-
} else if (!options.command) {
|
|
346
|
-
options.command = arg;
|
|
347
|
-
} else if (!options.epicId) {
|
|
348
|
-
options.epicId = arg;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
return options;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Run command
|
|
357
|
-
*/
|
|
358
|
-
async run(args) {
|
|
359
|
-
const options = this.parseArgs(args);
|
|
360
|
-
|
|
361
|
-
if (!options.command) {
|
|
362
|
-
this.showHelp();
|
|
363
|
-
process.exit(1);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
try {
|
|
367
|
-
switch (options.command) {
|
|
368
|
-
case 'epic':
|
|
369
|
-
if (!options.epicId) {
|
|
370
|
-
console.error('β Error: Epic ID required');
|
|
371
|
-
console.error('Usage: autopm analytics:epic <epic-id>');
|
|
372
|
-
process.exit(1);
|
|
373
|
-
}
|
|
374
|
-
await this.showEpicAnalytics(options.epicId);
|
|
375
|
-
break;
|
|
376
|
-
|
|
377
|
-
case 'team':
|
|
378
|
-
await this.showTeamMetrics(options.period);
|
|
379
|
-
break;
|
|
380
|
-
|
|
381
|
-
case 'velocity':
|
|
382
|
-
await this.showVelocity(options.period);
|
|
383
|
-
break;
|
|
384
|
-
|
|
385
|
-
case 'dependencies':
|
|
386
|
-
if (!options.epicId) {
|
|
387
|
-
console.error('β Error: Epic ID required');
|
|
388
|
-
console.error('Usage: autopm analytics:dependencies <epic-id>');
|
|
389
|
-
process.exit(1);
|
|
390
|
-
}
|
|
391
|
-
await this.showDependencies(options.epicId);
|
|
392
|
-
break;
|
|
393
|
-
|
|
394
|
-
case 'export':
|
|
395
|
-
if (!options.epicId) {
|
|
396
|
-
console.error('β Error: Epic ID required');
|
|
397
|
-
console.error('Usage: autopm analytics:export <epic-id> [--format json|csv]');
|
|
398
|
-
process.exit(1);
|
|
399
|
-
}
|
|
400
|
-
await this.exportAnalytics(options.epicId, options.format, options.output);
|
|
401
|
-
break;
|
|
402
|
-
|
|
403
|
-
default:
|
|
404
|
-
console.error(`β Unknown command: ${options.command}`);
|
|
405
|
-
this.showHelp();
|
|
406
|
-
process.exit(1);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
} catch (error) {
|
|
410
|
-
console.error(`\nβ Error: ${error.message}`);
|
|
411
|
-
if (process.env.DEBUG) {
|
|
412
|
-
console.error(error.stack);
|
|
413
|
-
}
|
|
414
|
-
process.exit(1);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
// Main execution
|
|
420
|
-
if (require.main === module) {
|
|
421
|
-
const command = new AnalyticsCommand();
|
|
422
|
-
command.run(process.argv.slice(2));
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
module.exports = AnalyticsCommand;
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* PM Blocked Script - Node.js Implementation
|
|
5
|
-
*
|
|
6
|
-
* Migrated from blocked.sh to show blocked tasks with dependencies
|
|
7
|
-
* Maintains full compatibility with the original bash implementation
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
const fs = require('fs');
|
|
11
|
-
const path = require('path');
|
|
12
|
-
|
|
13
|
-
function getBlockedTasks() {
|
|
14
|
-
const result = {
|
|
15
|
-
blockedTasks: [],
|
|
16
|
-
totalBlocked: 0
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
if (!fs.existsSync('.claude/epics')) {
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
const epicDirs = fs.readdirSync('.claude/epics', { withFileTypes: true })
|
|
25
|
-
.filter(dirent => dirent.isDirectory())
|
|
26
|
-
.map(dirent => dirent.name);
|
|
27
|
-
|
|
28
|
-
for (const epicName of epicDirs) {
|
|
29
|
-
const epicPath = path.join('.claude/epics', epicName);
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
const files = fs.readdirSync(epicPath)
|
|
33
|
-
.filter(file => /^\d+\.md$/.test(file))
|
|
34
|
-
.sort((a, b) => parseInt(a) - parseInt(b));
|
|
35
|
-
|
|
36
|
-
for (const file of files) {
|
|
37
|
-
const taskFilePath = path.join(epicPath, file);
|
|
38
|
-
const taskNum = path.basename(file, '.md');
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
const taskContent = fs.readFileSync(taskFilePath, 'utf8');
|
|
42
|
-
|
|
43
|
-
// Check if task is open
|
|
44
|
-
const statusMatch = taskContent.match(/^status:\s*(.*)$/m);
|
|
45
|
-
const status = statusMatch ? statusMatch[1].trim() : '';
|
|
46
|
-
|
|
47
|
-
if (status !== 'open' && status !== '') {
|
|
48
|
-
continue; // Skip non-open tasks
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Check for dependencies
|
|
52
|
-
const depsMatch = taskContent.match(/^depends_on:\s*(.*)$/m);
|
|
53
|
-
if (!depsMatch) {
|
|
54
|
-
continue; // Skip tasks without dependencies
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const depsString = depsMatch[1].trim();
|
|
58
|
-
|
|
59
|
-
// Parse dependencies - handle [1, 2, 3] format
|
|
60
|
-
let dependencies = [];
|
|
61
|
-
if (depsString.includes('[') && depsString.includes(']')) {
|
|
62
|
-
const depsContent = depsString.replace(/[\[\]]/g, '').trim();
|
|
63
|
-
if (depsContent && depsContent !== 'depends_on:') {
|
|
64
|
-
dependencies = depsContent.split(',').map(dep => dep.trim()).filter(dep => dep);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (dependencies.length === 0) {
|
|
69
|
-
continue; // Skip if no valid dependencies found
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Get task name
|
|
73
|
-
const nameMatch = taskContent.match(/^name:\s*(.*)$/m);
|
|
74
|
-
const taskName = nameMatch ? nameMatch[1].trim() : `Task #${taskNum}`;
|
|
75
|
-
|
|
76
|
-
// Check status of dependencies
|
|
77
|
-
const openDependencies = [];
|
|
78
|
-
for (const dep of dependencies) {
|
|
79
|
-
const depFile = path.join(epicPath, `${dep}.md`);
|
|
80
|
-
|
|
81
|
-
if (fs.existsSync(depFile)) {
|
|
82
|
-
try {
|
|
83
|
-
const depContent = fs.readFileSync(depFile, 'utf8');
|
|
84
|
-
const depStatusMatch = depContent.match(/^status:\s*(.*)$/m);
|
|
85
|
-
const depStatus = depStatusMatch ? depStatusMatch[1].trim() : '';
|
|
86
|
-
|
|
87
|
-
if (depStatus === 'open' || depStatus === '') {
|
|
88
|
-
openDependencies.push(dep);
|
|
89
|
-
}
|
|
90
|
-
} catch (error) {
|
|
91
|
-
// If we can't read the dependency file, consider it open/blocking
|
|
92
|
-
openDependencies.push(dep);
|
|
93
|
-
}
|
|
94
|
-
} else {
|
|
95
|
-
// Non-existent dependency files are considered blocking
|
|
96
|
-
openDependencies.push(dep);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (openDependencies.length > 0) {
|
|
101
|
-
result.blockedTasks.push({
|
|
102
|
-
taskNum,
|
|
103
|
-
taskName,
|
|
104
|
-
epicName,
|
|
105
|
-
dependencies,
|
|
106
|
-
openDependencies
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
result.totalBlocked++;
|
|
110
|
-
}
|
|
111
|
-
} catch (error) {
|
|
112
|
-
// Skip unreadable task files
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
} catch (error) {
|
|
117
|
-
// Skip unreadable epic directories
|
|
118
|
-
continue;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
} catch (error) {
|
|
122
|
-
// Directory doesn't exist or can't be read
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return result;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function formatBlockedOutput(data) {
|
|
129
|
-
let output = 'Getting tasks...\n\n\n';
|
|
130
|
-
output += 'π« Blocked Tasks\n';
|
|
131
|
-
output += '================\n\n';
|
|
132
|
-
|
|
133
|
-
if (data.blockedTasks.length === 0) {
|
|
134
|
-
output += 'No blocked tasks found!\n\n';
|
|
135
|
-
output += 'π‘ All tasks with dependencies are either completed or in progress.\n';
|
|
136
|
-
} else {
|
|
137
|
-
for (const task of data.blockedTasks) {
|
|
138
|
-
output += `βΈοΈ Task #${task.taskNum} - ${task.taskName}\n`;
|
|
139
|
-
output += ` Epic: ${task.epicName}\n`;
|
|
140
|
-
output += ` Blocked by: [${task.dependencies.join(', ')}]\n`;
|
|
141
|
-
|
|
142
|
-
if (task.openDependencies.length > 0) {
|
|
143
|
-
const waitingFor = task.openDependencies.map(dep => `#${dep}`).join(' ');
|
|
144
|
-
output += ` Waiting for:${waitingFor}\n`;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
output += '\n';
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
output += `π Total blocked: ${data.totalBlocked} tasks\n`;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return output;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// CommonJS export for testing
|
|
157
|
-
module.exports = getBlockedTasks;
|
|
158
|
-
|
|
159
|
-
// CLI execution
|
|
160
|
-
if (require.main === module) {
|
|
161
|
-
const data = getBlockedTasks();
|
|
162
|
-
console.log(formatBlockedOutput(data));
|
|
163
|
-
process.exit(0);
|
|
164
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# PM Blocked Script - Wrapper for Node.js implementation
|
|
4
|
-
# This wrapper maintains backward compatibility while delegating to the Node.js version
|
|
5
|
-
|
|
6
|
-
# Get the directory of this script
|
|
7
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
|
|
9
|
-
# Check if Node.js is available
|
|
10
|
-
if command -v node >/dev/null 2>&1; then
|
|
11
|
-
# Use the Node.js implementation
|
|
12
|
-
node "$SCRIPT_DIR/blocked.js"
|
|
13
|
-
exit $?
|
|
14
|
-
else
|
|
15
|
-
# Fallback to the original bash implementation if Node.js is not available
|
|
16
|
-
echo "β οΈ Node.js not found, falling back to bash implementation"
|
|
17
|
-
echo ""
|
|
18
|
-
|
|
19
|
-
# Original bash implementation (preserved for fallback)
|
|
20
|
-
echo "Getting tasks..."
|
|
21
|
-
echo ""
|
|
22
|
-
echo ""
|
|
23
|
-
|
|
24
|
-
echo "π« Blocked Tasks"
|
|
25
|
-
echo "================"
|
|
26
|
-
echo ""
|
|
27
|
-
|
|
28
|
-
found=0
|
|
29
|
-
|
|
30
|
-
for epic_dir in .claude/epics/*/; do
|
|
31
|
-
[ -d "$epic_dir" ] || continue
|
|
32
|
-
epic_name=$(basename "$epic_dir")
|
|
33
|
-
|
|
34
|
-
for task_file in "$epic_dir"[0-9]*.md; do
|
|
35
|
-
[ -f "$task_file" ] || continue
|
|
36
|
-
|
|
37
|
-
# Check if task is open
|
|
38
|
-
status=$(grep "^status:" "$task_file" | head -1 | sed 's/^status: *//')
|
|
39
|
-
[ "$status" != "open" ] && [ -n "$status" ] && continue
|
|
40
|
-
|
|
41
|
-
# Check for dependencies
|
|
42
|
-
deps=$(grep "^depends_on:" "$task_file" | head -1 | sed 's/^depends_on: *\[//' | sed 's/\]//' | sed 's/,/ /g')
|
|
43
|
-
|
|
44
|
-
if [ -n "$deps" ] && [ "$deps" != "depends_on:" ]; then
|
|
45
|
-
task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//')
|
|
46
|
-
task_num=$(basename "$task_file" .md)
|
|
47
|
-
|
|
48
|
-
echo "βΈοΈ Task #$task_num - $task_name"
|
|
49
|
-
echo " Epic: $epic_name"
|
|
50
|
-
echo " Blocked by: [$deps]"
|
|
51
|
-
|
|
52
|
-
# Check status of dependencies
|
|
53
|
-
open_deps=""
|
|
54
|
-
for dep in $deps; do
|
|
55
|
-
dep_file="$epic_dir$dep.md"
|
|
56
|
-
if [ -f "$dep_file" ]; then
|
|
57
|
-
dep_status=$(grep "^status:" "$dep_file" | head -1 | sed 's/^status: *//')
|
|
58
|
-
[ "$dep_status" = "open" ] && open_deps="$open_deps #$dep"
|
|
59
|
-
fi
|
|
60
|
-
done
|
|
61
|
-
|
|
62
|
-
[ -n "$open_deps" ] && echo " Waiting for:$open_deps"
|
|
63
|
-
echo ""
|
|
64
|
-
((found++))
|
|
65
|
-
fi
|
|
66
|
-
done
|
|
67
|
-
done
|
|
68
|
-
|
|
69
|
-
if [ $found -eq 0 ]; then
|
|
70
|
-
echo "No blocked tasks found!"
|
|
71
|
-
echo ""
|
|
72
|
-
echo "π‘ All tasks with dependencies are either completed or in progress."
|
|
73
|
-
else
|
|
74
|
-
echo "π Total blocked: $found tasks"
|
|
75
|
-
fi
|
|
76
|
-
|
|
77
|
-
exit 0
|
|
78
|
-
fi
|