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.
Files changed (281) hide show
  1. package/README.md +307 -56
  2. package/autopm/.claude/.env +158 -0
  3. package/autopm/.claude/settings.local.json +9 -0
  4. package/bin/autopm.js +11 -2
  5. package/bin/commands/epic.js +23 -3
  6. package/bin/commands/plugin.js +395 -0
  7. package/bin/commands/team.js +184 -10
  8. package/install/install.js +223 -4
  9. package/lib/cli/commands/issue.js +360 -20
  10. package/lib/plugins/PluginManager.js +1328 -0
  11. package/lib/plugins/PluginManager.old.js +400 -0
  12. package/lib/providers/AzureDevOpsProvider.js +575 -0
  13. package/lib/providers/GitHubProvider.js +475 -0
  14. package/lib/services/EpicService.js +1092 -3
  15. package/lib/services/IssueService.js +991 -0
  16. package/package.json +9 -1
  17. package/scripts/publish-plugins.sh +166 -0
  18. package/autopm/.claude/agents/cloud/README.md +0 -55
  19. package/autopm/.claude/agents/cloud/aws-cloud-architect.md +0 -521
  20. package/autopm/.claude/agents/cloud/azure-cloud-architect.md +0 -436
  21. package/autopm/.claude/agents/cloud/gcp-cloud-architect.md +0 -385
  22. package/autopm/.claude/agents/cloud/gcp-cloud-functions-engineer.md +0 -306
  23. package/autopm/.claude/agents/cloud/gemini-api-expert.md +0 -880
  24. package/autopm/.claude/agents/cloud/kubernetes-orchestrator.md +0 -566
  25. package/autopm/.claude/agents/cloud/openai-python-expert.md +0 -1087
  26. package/autopm/.claude/agents/cloud/terraform-infrastructure-expert.md +0 -454
  27. package/autopm/.claude/agents/core/agent-manager.md +0 -296
  28. package/autopm/.claude/agents/core/code-analyzer.md +0 -131
  29. package/autopm/.claude/agents/core/file-analyzer.md +0 -162
  30. package/autopm/.claude/agents/core/test-runner.md +0 -200
  31. package/autopm/.claude/agents/data/airflow-orchestration-expert.md +0 -52
  32. package/autopm/.claude/agents/data/kedro-pipeline-expert.md +0 -50
  33. package/autopm/.claude/agents/data/langgraph-workflow-expert.md +0 -520
  34. package/autopm/.claude/agents/databases/README.md +0 -50
  35. package/autopm/.claude/agents/databases/bigquery-expert.md +0 -392
  36. package/autopm/.claude/agents/databases/cosmosdb-expert.md +0 -368
  37. package/autopm/.claude/agents/databases/mongodb-expert.md +0 -398
  38. package/autopm/.claude/agents/databases/postgresql-expert.md +0 -321
  39. package/autopm/.claude/agents/databases/redis-expert.md +0 -52
  40. package/autopm/.claude/agents/devops/README.md +0 -52
  41. package/autopm/.claude/agents/devops/azure-devops-specialist.md +0 -308
  42. package/autopm/.claude/agents/devops/docker-containerization-expert.md +0 -298
  43. package/autopm/.claude/agents/devops/github-operations-specialist.md +0 -335
  44. package/autopm/.claude/agents/devops/mcp-context-manager.md +0 -319
  45. package/autopm/.claude/agents/devops/observability-engineer.md +0 -574
  46. package/autopm/.claude/agents/devops/ssh-operations-expert.md +0 -1093
  47. package/autopm/.claude/agents/devops/traefik-proxy-expert.md +0 -444
  48. package/autopm/.claude/agents/frameworks/README.md +0 -64
  49. package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +0 -360
  50. package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +0 -254
  51. package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +0 -217
  52. package/autopm/.claude/agents/frameworks/react-ui-expert.md +0 -226
  53. package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +0 -770
  54. package/autopm/.claude/agents/frameworks/ux-design-expert.md +0 -244
  55. package/autopm/.claude/agents/integration/message-queue-engineer.md +0 -794
  56. package/autopm/.claude/agents/languages/README.md +0 -50
  57. package/autopm/.claude/agents/languages/bash-scripting-expert.md +0 -541
  58. package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +0 -197
  59. package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +0 -226
  60. package/autopm/.claude/agents/languages/python-backend-engineer.md +0 -214
  61. package/autopm/.claude/agents/languages/python-backend-expert.md +0 -289
  62. package/autopm/.claude/agents/testing/frontend-testing-engineer.md +0 -395
  63. package/autopm/.claude/commands/ai/langgraph-workflow.md +0 -65
  64. package/autopm/.claude/commands/ai/openai-chat.md +0 -65
  65. package/autopm/.claude/commands/azure/COMMANDS.md +0 -107
  66. package/autopm/.claude/commands/azure/COMMAND_MAPPING.md +0 -252
  67. package/autopm/.claude/commands/azure/INTEGRATION_FIX.md +0 -103
  68. package/autopm/.claude/commands/azure/README.md +0 -246
  69. package/autopm/.claude/commands/azure/active-work.md +0 -198
  70. package/autopm/.claude/commands/azure/aliases.md +0 -143
  71. package/autopm/.claude/commands/azure/blocked-items.md +0 -287
  72. package/autopm/.claude/commands/azure/clean.md +0 -93
  73. package/autopm/.claude/commands/azure/docs-query.md +0 -48
  74. package/autopm/.claude/commands/azure/feature-decompose.md +0 -380
  75. package/autopm/.claude/commands/azure/feature-list.md +0 -61
  76. package/autopm/.claude/commands/azure/feature-new.md +0 -115
  77. package/autopm/.claude/commands/azure/feature-show.md +0 -205
  78. package/autopm/.claude/commands/azure/feature-start.md +0 -130
  79. package/autopm/.claude/commands/azure/fix-integration-example.md +0 -93
  80. package/autopm/.claude/commands/azure/help.md +0 -150
  81. package/autopm/.claude/commands/azure/import-us.md +0 -269
  82. package/autopm/.claude/commands/azure/init.md +0 -211
  83. package/autopm/.claude/commands/azure/next-task.md +0 -262
  84. package/autopm/.claude/commands/azure/search.md +0 -160
  85. package/autopm/.claude/commands/azure/sprint-status.md +0 -235
  86. package/autopm/.claude/commands/azure/standup.md +0 -260
  87. package/autopm/.claude/commands/azure/sync-all.md +0 -99
  88. package/autopm/.claude/commands/azure/task-analyze.md +0 -186
  89. package/autopm/.claude/commands/azure/task-close.md +0 -329
  90. package/autopm/.claude/commands/azure/task-edit.md +0 -145
  91. package/autopm/.claude/commands/azure/task-list.md +0 -263
  92. package/autopm/.claude/commands/azure/task-new.md +0 -84
  93. package/autopm/.claude/commands/azure/task-reopen.md +0 -79
  94. package/autopm/.claude/commands/azure/task-show.md +0 -126
  95. package/autopm/.claude/commands/azure/task-start.md +0 -301
  96. package/autopm/.claude/commands/azure/task-status.md +0 -65
  97. package/autopm/.claude/commands/azure/task-sync.md +0 -67
  98. package/autopm/.claude/commands/azure/us-edit.md +0 -164
  99. package/autopm/.claude/commands/azure/us-list.md +0 -202
  100. package/autopm/.claude/commands/azure/us-new.md +0 -265
  101. package/autopm/.claude/commands/azure/us-parse.md +0 -253
  102. package/autopm/.claude/commands/azure/us-show.md +0 -188
  103. package/autopm/.claude/commands/azure/us-status.md +0 -320
  104. package/autopm/.claude/commands/azure/validate.md +0 -86
  105. package/autopm/.claude/commands/azure/work-item-sync.md +0 -47
  106. package/autopm/.claude/commands/cloud/infra-deploy.md +0 -38
  107. package/autopm/.claude/commands/github/workflow-create.md +0 -42
  108. package/autopm/.claude/commands/infrastructure/ssh-security.md +0 -65
  109. package/autopm/.claude/commands/infrastructure/traefik-setup.md +0 -65
  110. package/autopm/.claude/commands/kubernetes/deploy.md +0 -37
  111. package/autopm/.claude/commands/playwright/test-scaffold.md +0 -38
  112. package/autopm/.claude/commands/pm/blocked.md +0 -28
  113. package/autopm/.claude/commands/pm/clean.md +0 -119
  114. package/autopm/.claude/commands/pm/context-create.md +0 -136
  115. package/autopm/.claude/commands/pm/context-prime.md +0 -170
  116. package/autopm/.claude/commands/pm/context-update.md +0 -292
  117. package/autopm/.claude/commands/pm/context.md +0 -28
  118. package/autopm/.claude/commands/pm/epic-close.md +0 -86
  119. package/autopm/.claude/commands/pm/epic-decompose.md +0 -370
  120. package/autopm/.claude/commands/pm/epic-edit.md +0 -83
  121. package/autopm/.claude/commands/pm/epic-list.md +0 -30
  122. package/autopm/.claude/commands/pm/epic-merge.md +0 -222
  123. package/autopm/.claude/commands/pm/epic-oneshot.md +0 -119
  124. package/autopm/.claude/commands/pm/epic-refresh.md +0 -119
  125. package/autopm/.claude/commands/pm/epic-show.md +0 -28
  126. package/autopm/.claude/commands/pm/epic-split.md +0 -120
  127. package/autopm/.claude/commands/pm/epic-start.md +0 -195
  128. package/autopm/.claude/commands/pm/epic-status.md +0 -28
  129. package/autopm/.claude/commands/pm/epic-sync-modular.md +0 -338
  130. package/autopm/.claude/commands/pm/epic-sync-original.md +0 -473
  131. package/autopm/.claude/commands/pm/epic-sync.md +0 -486
  132. package/autopm/.claude/commands/pm/help.md +0 -28
  133. package/autopm/.claude/commands/pm/import.md +0 -115
  134. package/autopm/.claude/commands/pm/in-progress.md +0 -28
  135. package/autopm/.claude/commands/pm/init.md +0 -28
  136. package/autopm/.claude/commands/pm/issue-analyze.md +0 -202
  137. package/autopm/.claude/commands/pm/issue-close.md +0 -119
  138. package/autopm/.claude/commands/pm/issue-edit.md +0 -93
  139. package/autopm/.claude/commands/pm/issue-reopen.md +0 -87
  140. package/autopm/.claude/commands/pm/issue-show.md +0 -41
  141. package/autopm/.claude/commands/pm/issue-start.md +0 -234
  142. package/autopm/.claude/commands/pm/issue-status.md +0 -95
  143. package/autopm/.claude/commands/pm/issue-sync.md +0 -411
  144. package/autopm/.claude/commands/pm/next.md +0 -28
  145. package/autopm/.claude/commands/pm/prd-edit.md +0 -82
  146. package/autopm/.claude/commands/pm/prd-list.md +0 -28
  147. package/autopm/.claude/commands/pm/prd-new.md +0 -55
  148. package/autopm/.claude/commands/pm/prd-parse.md +0 -42
  149. package/autopm/.claude/commands/pm/prd-status.md +0 -28
  150. package/autopm/.claude/commands/pm/search.md +0 -28
  151. package/autopm/.claude/commands/pm/standup.md +0 -28
  152. package/autopm/.claude/commands/pm/status.md +0 -28
  153. package/autopm/.claude/commands/pm/sync.md +0 -99
  154. package/autopm/.claude/commands/pm/test-reference-update.md +0 -151
  155. package/autopm/.claude/commands/pm/validate.md +0 -28
  156. package/autopm/.claude/commands/pm/what-next.md +0 -28
  157. package/autopm/.claude/commands/python/api-scaffold.md +0 -50
  158. package/autopm/.claude/commands/python/docs-query.md +0 -48
  159. package/autopm/.claude/commands/react/app-scaffold.md +0 -50
  160. package/autopm/.claude/commands/testing/prime.md +0 -314
  161. package/autopm/.claude/commands/testing/run.md +0 -125
  162. package/autopm/.claude/commands/ui/bootstrap-scaffold.md +0 -65
  163. package/autopm/.claude/commands/ui/tailwind-system.md +0 -64
  164. package/autopm/.claude/rules/ai-integration-patterns.md +0 -219
  165. package/autopm/.claude/rules/ci-cd-kubernetes-strategy.md +0 -25
  166. package/autopm/.claude/rules/database-management-strategy.md +0 -17
  167. package/autopm/.claude/rules/database-pipeline.md +0 -94
  168. package/autopm/.claude/rules/devops-troubleshooting-playbook.md +0 -450
  169. package/autopm/.claude/rules/docker-first-development.md +0 -404
  170. package/autopm/.claude/rules/infrastructure-pipeline.md +0 -128
  171. package/autopm/.claude/rules/performance-guidelines.md +0 -403
  172. package/autopm/.claude/rules/ui-development-standards.md +0 -281
  173. package/autopm/.claude/rules/ui-framework-rules.md +0 -151
  174. package/autopm/.claude/rules/ux-design-rules.md +0 -209
  175. package/autopm/.claude/rules/visual-testing.md +0 -223
  176. package/autopm/.claude/scripts/azure/README.md +0 -192
  177. package/autopm/.claude/scripts/azure/active-work.js +0 -524
  178. package/autopm/.claude/scripts/azure/active-work.sh +0 -20
  179. package/autopm/.claude/scripts/azure/blocked.js +0 -520
  180. package/autopm/.claude/scripts/azure/blocked.sh +0 -20
  181. package/autopm/.claude/scripts/azure/daily.js +0 -533
  182. package/autopm/.claude/scripts/azure/daily.sh +0 -20
  183. package/autopm/.claude/scripts/azure/dashboard.js +0 -970
  184. package/autopm/.claude/scripts/azure/dashboard.sh +0 -20
  185. package/autopm/.claude/scripts/azure/feature-list.js +0 -254
  186. package/autopm/.claude/scripts/azure/feature-list.sh +0 -20
  187. package/autopm/.claude/scripts/azure/feature-show.js +0 -7
  188. package/autopm/.claude/scripts/azure/feature-show.sh +0 -20
  189. package/autopm/.claude/scripts/azure/feature-status.js +0 -604
  190. package/autopm/.claude/scripts/azure/feature-status.sh +0 -20
  191. package/autopm/.claude/scripts/azure/help.js +0 -342
  192. package/autopm/.claude/scripts/azure/help.sh +0 -20
  193. package/autopm/.claude/scripts/azure/next-task.js +0 -508
  194. package/autopm/.claude/scripts/azure/next-task.sh +0 -20
  195. package/autopm/.claude/scripts/azure/search.js +0 -469
  196. package/autopm/.claude/scripts/azure/search.sh +0 -20
  197. package/autopm/.claude/scripts/azure/setup.js +0 -745
  198. package/autopm/.claude/scripts/azure/setup.sh +0 -20
  199. package/autopm/.claude/scripts/azure/sprint-report.js +0 -1012
  200. package/autopm/.claude/scripts/azure/sprint-report.sh +0 -20
  201. package/autopm/.claude/scripts/azure/sync.js +0 -563
  202. package/autopm/.claude/scripts/azure/sync.sh +0 -20
  203. package/autopm/.claude/scripts/azure/us-list.js +0 -210
  204. package/autopm/.claude/scripts/azure/us-list.sh +0 -20
  205. package/autopm/.claude/scripts/azure/us-status.js +0 -238
  206. package/autopm/.claude/scripts/azure/us-status.sh +0 -20
  207. package/autopm/.claude/scripts/azure/validate.js +0 -626
  208. package/autopm/.claude/scripts/azure/validate.sh +0 -20
  209. package/autopm/.claude/scripts/azure/wrapper-template.sh +0 -20
  210. package/autopm/.claude/scripts/github/dependency-tracker.js +0 -554
  211. package/autopm/.claude/scripts/github/dependency-validator.js +0 -545
  212. package/autopm/.claude/scripts/github/dependency-visualizer.js +0 -477
  213. package/autopm/.claude/scripts/pm/analytics.js +0 -425
  214. package/autopm/.claude/scripts/pm/blocked.js +0 -164
  215. package/autopm/.claude/scripts/pm/blocked.sh +0 -78
  216. package/autopm/.claude/scripts/pm/clean.js +0 -464
  217. package/autopm/.claude/scripts/pm/context-create.js +0 -216
  218. package/autopm/.claude/scripts/pm/context-prime.js +0 -335
  219. package/autopm/.claude/scripts/pm/context-update.js +0 -344
  220. package/autopm/.claude/scripts/pm/context.js +0 -338
  221. package/autopm/.claude/scripts/pm/epic-close.js +0 -347
  222. package/autopm/.claude/scripts/pm/epic-edit.js +0 -382
  223. package/autopm/.claude/scripts/pm/epic-list.js +0 -273
  224. package/autopm/.claude/scripts/pm/epic-list.sh +0 -109
  225. package/autopm/.claude/scripts/pm/epic-show.js +0 -291
  226. package/autopm/.claude/scripts/pm/epic-show.sh +0 -105
  227. package/autopm/.claude/scripts/pm/epic-split.js +0 -522
  228. package/autopm/.claude/scripts/pm/epic-start/epic-start.js +0 -183
  229. package/autopm/.claude/scripts/pm/epic-start/epic-start.sh +0 -94
  230. package/autopm/.claude/scripts/pm/epic-status.js +0 -291
  231. package/autopm/.claude/scripts/pm/epic-status.sh +0 -104
  232. package/autopm/.claude/scripts/pm/epic-sync/README.md +0 -208
  233. package/autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh +0 -77
  234. package/autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh +0 -86
  235. package/autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh +0 -79
  236. package/autopm/.claude/scripts/pm/epic-sync/update-references.sh +0 -89
  237. package/autopm/.claude/scripts/pm/epic-sync.sh +0 -137
  238. package/autopm/.claude/scripts/pm/help.js +0 -92
  239. package/autopm/.claude/scripts/pm/help.sh +0 -90
  240. package/autopm/.claude/scripts/pm/in-progress.js +0 -178
  241. package/autopm/.claude/scripts/pm/in-progress.sh +0 -93
  242. package/autopm/.claude/scripts/pm/init.js +0 -321
  243. package/autopm/.claude/scripts/pm/init.sh +0 -178
  244. package/autopm/.claude/scripts/pm/issue-close.js +0 -232
  245. package/autopm/.claude/scripts/pm/issue-edit.js +0 -310
  246. package/autopm/.claude/scripts/pm/issue-show.js +0 -272
  247. package/autopm/.claude/scripts/pm/issue-start.js +0 -181
  248. package/autopm/.claude/scripts/pm/issue-sync/format-comment.sh +0 -468
  249. package/autopm/.claude/scripts/pm/issue-sync/gather-updates.sh +0 -460
  250. package/autopm/.claude/scripts/pm/issue-sync/post-comment.sh +0 -330
  251. package/autopm/.claude/scripts/pm/issue-sync/preflight-validation.sh +0 -348
  252. package/autopm/.claude/scripts/pm/issue-sync/update-frontmatter.sh +0 -387
  253. package/autopm/.claude/scripts/pm/lib/README.md +0 -85
  254. package/autopm/.claude/scripts/pm/lib/epic-discovery.js +0 -119
  255. package/autopm/.claude/scripts/pm/lib/logger.js +0 -78
  256. package/autopm/.claude/scripts/pm/next.js +0 -189
  257. package/autopm/.claude/scripts/pm/next.sh +0 -72
  258. package/autopm/.claude/scripts/pm/optimize.js +0 -407
  259. package/autopm/.claude/scripts/pm/pr-create.js +0 -337
  260. package/autopm/.claude/scripts/pm/pr-list.js +0 -257
  261. package/autopm/.claude/scripts/pm/prd-list.js +0 -242
  262. package/autopm/.claude/scripts/pm/prd-list.sh +0 -103
  263. package/autopm/.claude/scripts/pm/prd-new.js +0 -684
  264. package/autopm/.claude/scripts/pm/prd-parse.js +0 -547
  265. package/autopm/.claude/scripts/pm/prd-status.js +0 -152
  266. package/autopm/.claude/scripts/pm/prd-status.sh +0 -63
  267. package/autopm/.claude/scripts/pm/release.js +0 -460
  268. package/autopm/.claude/scripts/pm/search.js +0 -192
  269. package/autopm/.claude/scripts/pm/search.sh +0 -89
  270. package/autopm/.claude/scripts/pm/standup.js +0 -362
  271. package/autopm/.claude/scripts/pm/standup.sh +0 -95
  272. package/autopm/.claude/scripts/pm/status.js +0 -148
  273. package/autopm/.claude/scripts/pm/status.sh +0 -59
  274. package/autopm/.claude/scripts/pm/sync-batch.js +0 -337
  275. package/autopm/.claude/scripts/pm/sync.js +0 -343
  276. package/autopm/.claude/scripts/pm/template-list.js +0 -141
  277. package/autopm/.claude/scripts/pm/template-new.js +0 -366
  278. package/autopm/.claude/scripts/pm/validate.js +0 -274
  279. package/autopm/.claude/scripts/pm/validate.sh +0 -106
  280. package/autopm/.claude/scripts/pm/what-next.js +0 -660
  281. package/bin/node/azure-feature-show.js +0 -7
@@ -1,178 +0,0 @@
1
- #!/bin/bash
2
-
3
- # PM Init 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/init.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 "Initializing..."
21
- echo ""
22
- echo ""
23
-
24
- echo " █████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ███╗ ███╗"
25
- echo "██╔══██╗██║ ██║╚══██╔══╝██╔═══██╗██╔══██╗████╗ ████║"
26
- echo "███████║██║ ██║ ██║ ██║ ██║██████╔╝██╔████╔██║"
27
- echo "██╔══██║██║ ██║ ██║ ██║ ██║██╔═══╝ ██║╚██╔╝██║"
28
- echo "██║ ██║╚██████╔╝ ██║ ╚██████╔╝██║ ██║ ╚═╝ ██║"
29
- echo "╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝"
30
-
31
- echo "┌─────────────────────────────────┐"
32
- echo "│ Claude Code Project Management │"
33
- echo "│ by https://x.com/aroussi │"
34
- echo "└─────────────────────────────────┘"
35
- echo "https://github.com/rlagowski/autopm"
36
- echo ""
37
- echo ""
38
-
39
- echo "🚀 Initializing Claude Code AutoPM System"
40
- echo "======================================"
41
- echo ""
42
-
43
- # Check for required tools
44
- echo "🔍 Checking dependencies..."
45
-
46
- # Check gh CLI
47
- if command -v gh &> /dev/null; then
48
- echo " ✅ GitHub CLI (gh) installed"
49
- else
50
- echo " ❌ GitHub CLI (gh) not found"
51
- echo ""
52
- echo " Installing gh..."
53
- if command -v brew &> /dev/null; then
54
- brew install gh
55
- elif command -v apt-get &> /dev/null; then
56
- sudo apt-get update && sudo apt-get install gh
57
- else
58
- echo " Please install GitHub CLI manually: https://cli.github.com/"
59
- exit 1
60
- fi
61
- fi
62
-
63
- # Check gh auth status
64
- echo ""
65
- echo "🔐 Checking GitHub authentication..."
66
- if gh auth status &> /dev/null; then
67
- echo " ✅ GitHub authenticated"
68
- else
69
- echo " ⚠️ GitHub not authenticated"
70
- echo " Running: gh auth login"
71
- gh auth login
72
- fi
73
-
74
- # Check for gh-sub-issue extension
75
- echo ""
76
- echo "📦 Checking gh extensions..."
77
- if gh extension list | grep -q "yahsan2/gh-sub-issue"; then
78
- echo " ✅ gh-sub-issue extension installed"
79
- else
80
- echo " 📥 Installing gh-sub-issue extension..."
81
- gh extension install yahsan2/gh-sub-issue
82
- fi
83
-
84
- # Create directory structure
85
- echo ""
86
- echo "📁 Creating directory structure..."
87
- mkdir -p .claude/prds
88
- mkdir -p .claude/epics
89
- mkdir -p .claude/rules
90
- mkdir -p .claude/agents
91
- mkdir -p .claude/scripts/pm
92
- echo " ✅ Directories created"
93
-
94
- # Copy scripts if in main repo
95
- if [ -d "scripts/pm" ] && [ ! "$(pwd)" = *"/.claude"* ]; then
96
- echo ""
97
- echo "📝 Copying PM scripts..."
98
- cp -r scripts/pm/* .claude/scripts/pm/
99
- chmod +x .claude/scripts/pm/*.sh
100
- echo " ✅ Scripts copied and made executable"
101
- fi
102
-
103
- # Check for git
104
- echo ""
105
- echo "🔗 Checking Git configuration..."
106
- if git rev-parse --git-dir > /dev/null 2>&1; then
107
- echo " ✅ Git repository detected"
108
-
109
- # Check remote
110
- if git remote -v | grep -q origin; then
111
- remote_url=$(git remote get-url origin)
112
- echo " ✅ Remote configured: $remote_url"
113
-
114
- # Check if remote is the AutoPM template repository
115
- if [[ "$remote_url" == *"rlagowski/autopm"* ]] || [[ "$remote_url" == *"rlagowski/autopm.git"* ]]; then
116
- echo ""
117
- echo " ⚠️ WARNING: Your remote origin points to the AutoPM template repository!"
118
- echo " This means any issues you create will go to the template repo, not your project."
119
- echo ""
120
- echo " To fix this:"
121
- echo " 1. Fork the repository or create your own on GitHub"
122
- echo " 2. Update your remote:"
123
- echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git"
124
- echo ""
125
- fi
126
- else
127
- echo " ⚠️ No remote configured"
128
- echo " Add with: git remote add origin <url>"
129
- fi
130
- else
131
- echo " ⚠️ Not a git repository"
132
- echo " Initialize with: git init"
133
- fi
134
-
135
- # Create CLAUDE.md if it doesn't exist
136
- if [ ! -f "CLAUDE.md" ]; then
137
- echo ""
138
- echo "📄 Creating CLAUDE.md..."
139
- cat > CLAUDE.md << 'EOF'
140
- # CLAUDE.md
141
-
142
- > Think carefully and implement the most concise solution that changes as little code as possible.
143
-
144
- ## Project-Specific Instructions
145
-
146
- Add your project-specific instructions here.
147
-
148
- ## Testing
149
-
150
- Always run tests before committing:
151
- - `npm test` or equivalent for your stack
152
-
153
- ## Code Style
154
-
155
- Follow existing patterns in the codebase.
156
- EOF
157
- echo " ✅ CLAUDE.md created"
158
- fi
159
-
160
- # Summary
161
- echo ""
162
- echo "✅ Initialization Complete!"
163
- echo "=========================="
164
- echo ""
165
- echo "📊 System Status:"
166
- gh --version | head -1
167
- echo " Extensions: $(gh extension list | wc -l) installed"
168
- echo " Auth: $(gh auth status 2>&1 | grep -o 'Logged in to [^ ]*' || echo 'Not authenticated')"
169
- echo ""
170
- echo "🎯 Next Steps:"
171
- echo " 1. Create your first PRD: /pm:prd-new <feature-name>"
172
- echo " 2. View help: /pm:help"
173
- echo " 3. Check status: /pm:status"
174
- echo ""
175
- echo "📚 Documentation: README.md"
176
-
177
- exit 0
178
- fi
@@ -1,232 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Issue Close - Close/complete an issue
4
- */
5
-
6
- const fs = require('fs');
7
- const path = require('path');
8
- const { execSync } = require('child_process');
9
-
10
- class IssueCloser {
11
- constructor() {
12
- this.providersDir = path.join(__dirname, '..', '..', 'providers');
13
- this.issueDir = path.join('.claude', 'issues');
14
- this.activeWorkFile = path.join('.claude', 'active-work.json');
15
- this.completedFile = path.join('.claude', 'completed-work.json');
16
- }
17
-
18
- detectProvider() {
19
- if (fs.existsSync('.azure') || process.env.AZURE_DEVOPS_ORG) {
20
- return 'azure';
21
- }
22
-
23
- if (fs.existsSync('.github') || fs.existsSync('.git')) {
24
- try {
25
- const remoteUrl = execSync('git remote get-url origin 2>/dev/null', { encoding: 'utf8' });
26
- if (remoteUrl.includes('github.com')) {
27
- return 'github';
28
- }
29
- } catch {}
30
- }
31
-
32
- return 'local';
33
- }
34
-
35
- loadActiveWork() {
36
- if (!fs.existsSync(this.activeWorkFile)) {
37
- return { issues: [], epics: [] };
38
- }
39
- try {
40
- return JSON.parse(fs.readFileSync(this.activeWorkFile, 'utf8'));
41
- } catch {
42
- return { issues: [], epics: [] };
43
- }
44
- }
45
-
46
- saveActiveWork(activeWork) {
47
- const dir = path.dirname(this.activeWorkFile);
48
- if (!fs.existsSync(dir)) {
49
- fs.mkdirSync(dir, { recursive: true });
50
- }
51
- fs.writeFileSync(this.activeWorkFile, JSON.stringify(activeWork, null, 2));
52
- }
53
-
54
- loadCompletedWork() {
55
- if (!fs.existsSync(this.completedFile)) {
56
- return { issues: [], epics: [] };
57
- }
58
- try {
59
- return JSON.parse(fs.readFileSync(this.completedFile, 'utf8'));
60
- } catch {
61
- return { issues: [], epics: [] };
62
- }
63
- }
64
-
65
- saveCompletedWork(completedWork) {
66
- const dir = path.dirname(this.completedFile);
67
- if (!fs.existsSync(dir)) {
68
- fs.mkdirSync(dir, { recursive: true });
69
- }
70
- fs.writeFileSync(this.completedFile, JSON.stringify(completedWork, null, 2));
71
- }
72
-
73
- async closeIssue(issueId, options = {}) {
74
- const provider = options.provider || this.detectProvider();
75
- console.log(`🔒 Closing issue: ${issueId}`);
76
- console.log(`📦 Provider: ${provider}\n`);
77
-
78
- // Move from active to completed
79
- const activeWork = this.loadActiveWork();
80
- const completedWork = this.loadCompletedWork();
81
-
82
- const activeIssue = activeWork.issues.find(i => i.id === issueId);
83
- if (activeIssue) {
84
- // Remove from active
85
- activeWork.issues = activeWork.issues.filter(i => i.id !== issueId);
86
- this.saveActiveWork(activeWork);
87
-
88
- // Add to completed
89
- const completedEntry = {
90
- ...activeIssue,
91
- completedAt: new Date().toISOString(),
92
- status: 'completed',
93
- duration: this.calculateDuration(activeIssue.startedAt)
94
- };
95
-
96
- completedWork.issues.unshift(completedEntry);
97
-
98
- // Keep only last 100 completed issues
99
- if (completedWork.issues.length > 100) {
100
- completedWork.issues = completedWork.issues.slice(0, 100);
101
- }
102
-
103
- this.saveCompletedWork(completedWork);
104
- console.log(`✅ Issue moved to completed work`);
105
- console.log(`⏱️ Duration: ${completedEntry.duration}`);
106
- }
107
-
108
- // Try to use provider-specific close command
109
- const providerScript = path.join(this.providersDir, provider, 'issue-close.js');
110
- if (fs.existsSync(providerScript)) {
111
- console.log(`\nUsing ${provider} provider to close issue...`);
112
- try {
113
- require(providerScript);
114
- return;
115
- } catch (error) {
116
- console.log(`⚠️ Provider script failed, using local tracking`);
117
- }
118
- }
119
-
120
- // Update local issue file
121
- const issueFile = path.join(this.issueDir, `${issueId}.md`);
122
- if (fs.existsSync(issueFile)) {
123
- let content = fs.readFileSync(issueFile, 'utf8');
124
-
125
- // Update status in file
126
- content = content.replace(/\*\*State\*\*: .*/g, '**State**: Closed');
127
-
128
- // Add completion note
129
- const completionNote = `\n- ${new Date().toISOString()}: Issue closed`;
130
- if (!content.includes('## Updates')) {
131
- content += '\n## Updates\n' + completionNote;
132
- } else {
133
- content = content.replace(/(## Updates[\s\S]*?)$/, '$1' + completionNote + '\n');
134
- }
135
-
136
- // Mark all tasks as complete (optional)
137
- if (options.completeTasks) {
138
- content = content.replace(/- \[ \]/g, '- [x]');
139
- }
140
-
141
- fs.writeFileSync(issueFile, content);
142
- console.log(`✅ Updated issue file: ${issueFile}`);
143
- }
144
-
145
- // Display summary
146
- console.log('\n📊 Issue Closed:');
147
- console.log(` • ID: ${issueId}`);
148
- console.log(` • Status: Closed`);
149
- console.log(` • Closed: ${new Date().toLocaleString()}`);
150
-
151
- if (activeIssue) {
152
- console.log(` • Duration: ${this.calculateDuration(activeIssue.startedAt)}`);
153
- }
154
-
155
- // Show next steps
156
- console.log('\n💡 Next steps:');
157
- console.log(` • View completed work: pm status`);
158
- console.log(` • Start new issue: pm issue-start <issue-id>`);
159
- console.log(` • View active work: pm in-progress`);
160
-
161
- // Show remaining active issues
162
- const remainingActive = this.loadActiveWork();
163
- if (remainingActive.issues.length > 0) {
164
- console.log('\n📋 Remaining active issues:');
165
- remainingActive.issues.slice(0, 3).forEach(issue => {
166
- const date = new Date(issue.startedAt).toLocaleDateString();
167
- console.log(` • ${issue.id} - started ${date}`);
168
- });
169
- }
170
- }
171
-
172
- calculateDuration(startTime) {
173
- const start = new Date(startTime);
174
- const end = new Date();
175
- const diff = end - start;
176
-
177
- const days = Math.floor(diff / (1000 * 60 * 60 * 24));
178
- const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
179
- const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
180
-
181
- if (days > 0) {
182
- return `${days}d ${hours}h`;
183
- } else if (hours > 0) {
184
- return `${hours}h ${minutes}m`;
185
- } else {
186
- return `${minutes}m`;
187
- }
188
- }
189
-
190
- async run(args) {
191
- const issueId = args[0];
192
-
193
- if (!issueId) {
194
- console.error('❌ Error: Issue ID required');
195
- console.error('Usage: pm issue-close <issue-id> [--complete-tasks] [--provider=azure|github]');
196
-
197
- // Show active work
198
- const activeWork = this.loadActiveWork();
199
- if (activeWork.issues.length > 0) {
200
- console.log('\n📋 Active issues that can be closed:');
201
- activeWork.issues.slice(0, 5).forEach(issue => {
202
- const date = new Date(issue.startedAt).toLocaleDateString();
203
- console.log(` • ${issue.id} (${issue.provider}) - started ${date}`);
204
- });
205
- }
206
-
207
- process.exit(1);
208
- }
209
-
210
- const options = {};
211
- args.slice(1).forEach(arg => {
212
- if (arg.startsWith('--provider=')) {
213
- options.provider = arg.split('=')[1];
214
- } else if (arg === '--complete-tasks') {
215
- options.completeTasks = true;
216
- }
217
- });
218
-
219
- await this.closeIssue(issueId, options);
220
- }
221
- }
222
-
223
- // Main execution
224
- if (require.main === module) {
225
- const closer = new IssueCloser();
226
- closer.run(process.argv.slice(2)).catch(error => {
227
- console.error('❌ Error:', error.message);
228
- process.exit(1);
229
- });
230
- }
231
-
232
- module.exports = IssueCloser;