claude-autopm 2.8.1 → 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 (273) hide show
  1. package/README.md +116 -8
  2. package/bin/autopm.js +2 -0
  3. package/bin/commands/plugin.js +395 -0
  4. package/bin/commands/team.js +184 -10
  5. package/install/install.js +223 -4
  6. package/lib/plugins/PluginManager.js +1328 -0
  7. package/lib/plugins/PluginManager.old.js +400 -0
  8. package/package.json +4 -1
  9. package/scripts/publish-plugins.sh +166 -0
  10. package/autopm/.claude/agents/cloud/README.md +0 -55
  11. package/autopm/.claude/agents/cloud/aws-cloud-architect.md +0 -521
  12. package/autopm/.claude/agents/cloud/azure-cloud-architect.md +0 -436
  13. package/autopm/.claude/agents/cloud/gcp-cloud-architect.md +0 -385
  14. package/autopm/.claude/agents/cloud/gcp-cloud-functions-engineer.md +0 -306
  15. package/autopm/.claude/agents/cloud/gemini-api-expert.md +0 -880
  16. package/autopm/.claude/agents/cloud/kubernetes-orchestrator.md +0 -566
  17. package/autopm/.claude/agents/cloud/openai-python-expert.md +0 -1087
  18. package/autopm/.claude/agents/cloud/terraform-infrastructure-expert.md +0 -454
  19. package/autopm/.claude/agents/core/agent-manager.md +0 -296
  20. package/autopm/.claude/agents/core/code-analyzer.md +0 -131
  21. package/autopm/.claude/agents/core/file-analyzer.md +0 -162
  22. package/autopm/.claude/agents/core/test-runner.md +0 -200
  23. package/autopm/.claude/agents/data/airflow-orchestration-expert.md +0 -52
  24. package/autopm/.claude/agents/data/kedro-pipeline-expert.md +0 -50
  25. package/autopm/.claude/agents/data/langgraph-workflow-expert.md +0 -520
  26. package/autopm/.claude/agents/databases/README.md +0 -50
  27. package/autopm/.claude/agents/databases/bigquery-expert.md +0 -392
  28. package/autopm/.claude/agents/databases/cosmosdb-expert.md +0 -368
  29. package/autopm/.claude/agents/databases/mongodb-expert.md +0 -398
  30. package/autopm/.claude/agents/databases/postgresql-expert.md +0 -321
  31. package/autopm/.claude/agents/databases/redis-expert.md +0 -52
  32. package/autopm/.claude/agents/devops/README.md +0 -52
  33. package/autopm/.claude/agents/devops/azure-devops-specialist.md +0 -308
  34. package/autopm/.claude/agents/devops/docker-containerization-expert.md +0 -298
  35. package/autopm/.claude/agents/devops/github-operations-specialist.md +0 -335
  36. package/autopm/.claude/agents/devops/mcp-context-manager.md +0 -319
  37. package/autopm/.claude/agents/devops/observability-engineer.md +0 -574
  38. package/autopm/.claude/agents/devops/ssh-operations-expert.md +0 -1093
  39. package/autopm/.claude/agents/devops/traefik-proxy-expert.md +0 -444
  40. package/autopm/.claude/agents/frameworks/README.md +0 -64
  41. package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +0 -360
  42. package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +0 -254
  43. package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +0 -217
  44. package/autopm/.claude/agents/frameworks/react-ui-expert.md +0 -226
  45. package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +0 -770
  46. package/autopm/.claude/agents/frameworks/ux-design-expert.md +0 -244
  47. package/autopm/.claude/agents/integration/message-queue-engineer.md +0 -794
  48. package/autopm/.claude/agents/languages/README.md +0 -50
  49. package/autopm/.claude/agents/languages/bash-scripting-expert.md +0 -541
  50. package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +0 -197
  51. package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +0 -226
  52. package/autopm/.claude/agents/languages/python-backend-engineer.md +0 -214
  53. package/autopm/.claude/agents/languages/python-backend-expert.md +0 -289
  54. package/autopm/.claude/agents/testing/frontend-testing-engineer.md +0 -395
  55. package/autopm/.claude/commands/ai/langgraph-workflow.md +0 -65
  56. package/autopm/.claude/commands/ai/openai-chat.md +0 -65
  57. package/autopm/.claude/commands/azure/COMMANDS.md +0 -107
  58. package/autopm/.claude/commands/azure/COMMAND_MAPPING.md +0 -252
  59. package/autopm/.claude/commands/azure/INTEGRATION_FIX.md +0 -103
  60. package/autopm/.claude/commands/azure/README.md +0 -246
  61. package/autopm/.claude/commands/azure/active-work.md +0 -198
  62. package/autopm/.claude/commands/azure/aliases.md +0 -143
  63. package/autopm/.claude/commands/azure/blocked-items.md +0 -287
  64. package/autopm/.claude/commands/azure/clean.md +0 -93
  65. package/autopm/.claude/commands/azure/docs-query.md +0 -48
  66. package/autopm/.claude/commands/azure/feature-decompose.md +0 -380
  67. package/autopm/.claude/commands/azure/feature-list.md +0 -61
  68. package/autopm/.claude/commands/azure/feature-new.md +0 -115
  69. package/autopm/.claude/commands/azure/feature-show.md +0 -205
  70. package/autopm/.claude/commands/azure/feature-start.md +0 -130
  71. package/autopm/.claude/commands/azure/fix-integration-example.md +0 -93
  72. package/autopm/.claude/commands/azure/help.md +0 -150
  73. package/autopm/.claude/commands/azure/import-us.md +0 -269
  74. package/autopm/.claude/commands/azure/init.md +0 -211
  75. package/autopm/.claude/commands/azure/next-task.md +0 -262
  76. package/autopm/.claude/commands/azure/search.md +0 -160
  77. package/autopm/.claude/commands/azure/sprint-status.md +0 -235
  78. package/autopm/.claude/commands/azure/standup.md +0 -260
  79. package/autopm/.claude/commands/azure/sync-all.md +0 -99
  80. package/autopm/.claude/commands/azure/task-analyze.md +0 -186
  81. package/autopm/.claude/commands/azure/task-close.md +0 -329
  82. package/autopm/.claude/commands/azure/task-edit.md +0 -145
  83. package/autopm/.claude/commands/azure/task-list.md +0 -263
  84. package/autopm/.claude/commands/azure/task-new.md +0 -84
  85. package/autopm/.claude/commands/azure/task-reopen.md +0 -79
  86. package/autopm/.claude/commands/azure/task-show.md +0 -126
  87. package/autopm/.claude/commands/azure/task-start.md +0 -301
  88. package/autopm/.claude/commands/azure/task-status.md +0 -65
  89. package/autopm/.claude/commands/azure/task-sync.md +0 -67
  90. package/autopm/.claude/commands/azure/us-edit.md +0 -164
  91. package/autopm/.claude/commands/azure/us-list.md +0 -202
  92. package/autopm/.claude/commands/azure/us-new.md +0 -265
  93. package/autopm/.claude/commands/azure/us-parse.md +0 -253
  94. package/autopm/.claude/commands/azure/us-show.md +0 -188
  95. package/autopm/.claude/commands/azure/us-status.md +0 -320
  96. package/autopm/.claude/commands/azure/validate.md +0 -86
  97. package/autopm/.claude/commands/azure/work-item-sync.md +0 -47
  98. package/autopm/.claude/commands/cloud/infra-deploy.md +0 -38
  99. package/autopm/.claude/commands/github/workflow-create.md +0 -42
  100. package/autopm/.claude/commands/infrastructure/ssh-security.md +0 -65
  101. package/autopm/.claude/commands/infrastructure/traefik-setup.md +0 -65
  102. package/autopm/.claude/commands/kubernetes/deploy.md +0 -37
  103. package/autopm/.claude/commands/playwright/test-scaffold.md +0 -38
  104. package/autopm/.claude/commands/pm/blocked.md +0 -28
  105. package/autopm/.claude/commands/pm/clean.md +0 -119
  106. package/autopm/.claude/commands/pm/context-create.md +0 -136
  107. package/autopm/.claude/commands/pm/context-prime.md +0 -170
  108. package/autopm/.claude/commands/pm/context-update.md +0 -292
  109. package/autopm/.claude/commands/pm/context.md +0 -28
  110. package/autopm/.claude/commands/pm/epic-close.md +0 -86
  111. package/autopm/.claude/commands/pm/epic-decompose.md +0 -370
  112. package/autopm/.claude/commands/pm/epic-edit.md +0 -83
  113. package/autopm/.claude/commands/pm/epic-list.md +0 -30
  114. package/autopm/.claude/commands/pm/epic-merge.md +0 -222
  115. package/autopm/.claude/commands/pm/epic-oneshot.md +0 -119
  116. package/autopm/.claude/commands/pm/epic-refresh.md +0 -119
  117. package/autopm/.claude/commands/pm/epic-show.md +0 -28
  118. package/autopm/.claude/commands/pm/epic-split.md +0 -120
  119. package/autopm/.claude/commands/pm/epic-start.md +0 -195
  120. package/autopm/.claude/commands/pm/epic-status.md +0 -28
  121. package/autopm/.claude/commands/pm/epic-sync-modular.md +0 -338
  122. package/autopm/.claude/commands/pm/epic-sync-original.md +0 -473
  123. package/autopm/.claude/commands/pm/epic-sync.md +0 -486
  124. package/autopm/.claude/commands/pm/help.md +0 -28
  125. package/autopm/.claude/commands/pm/import.md +0 -115
  126. package/autopm/.claude/commands/pm/in-progress.md +0 -28
  127. package/autopm/.claude/commands/pm/init.md +0 -28
  128. package/autopm/.claude/commands/pm/issue-analyze.md +0 -202
  129. package/autopm/.claude/commands/pm/issue-close.md +0 -119
  130. package/autopm/.claude/commands/pm/issue-edit.md +0 -93
  131. package/autopm/.claude/commands/pm/issue-reopen.md +0 -87
  132. package/autopm/.claude/commands/pm/issue-show.md +0 -41
  133. package/autopm/.claude/commands/pm/issue-start.md +0 -234
  134. package/autopm/.claude/commands/pm/issue-status.md +0 -95
  135. package/autopm/.claude/commands/pm/issue-sync.md +0 -411
  136. package/autopm/.claude/commands/pm/next.md +0 -28
  137. package/autopm/.claude/commands/pm/prd-edit.md +0 -82
  138. package/autopm/.claude/commands/pm/prd-list.md +0 -28
  139. package/autopm/.claude/commands/pm/prd-new.md +0 -55
  140. package/autopm/.claude/commands/pm/prd-parse.md +0 -42
  141. package/autopm/.claude/commands/pm/prd-status.md +0 -28
  142. package/autopm/.claude/commands/pm/search.md +0 -28
  143. package/autopm/.claude/commands/pm/standup.md +0 -28
  144. package/autopm/.claude/commands/pm/status.md +0 -28
  145. package/autopm/.claude/commands/pm/sync.md +0 -99
  146. package/autopm/.claude/commands/pm/test-reference-update.md +0 -151
  147. package/autopm/.claude/commands/pm/validate.md +0 -28
  148. package/autopm/.claude/commands/pm/what-next.md +0 -28
  149. package/autopm/.claude/commands/python/api-scaffold.md +0 -50
  150. package/autopm/.claude/commands/python/docs-query.md +0 -48
  151. package/autopm/.claude/commands/react/app-scaffold.md +0 -50
  152. package/autopm/.claude/commands/testing/prime.md +0 -314
  153. package/autopm/.claude/commands/testing/run.md +0 -125
  154. package/autopm/.claude/commands/ui/bootstrap-scaffold.md +0 -65
  155. package/autopm/.claude/commands/ui/tailwind-system.md +0 -64
  156. package/autopm/.claude/rules/ai-integration-patterns.md +0 -219
  157. package/autopm/.claude/rules/ci-cd-kubernetes-strategy.md +0 -25
  158. package/autopm/.claude/rules/database-management-strategy.md +0 -17
  159. package/autopm/.claude/rules/database-pipeline.md +0 -94
  160. package/autopm/.claude/rules/devops-troubleshooting-playbook.md +0 -450
  161. package/autopm/.claude/rules/docker-first-development.md +0 -404
  162. package/autopm/.claude/rules/infrastructure-pipeline.md +0 -128
  163. package/autopm/.claude/rules/performance-guidelines.md +0 -403
  164. package/autopm/.claude/rules/ui-development-standards.md +0 -281
  165. package/autopm/.claude/rules/ui-framework-rules.md +0 -151
  166. package/autopm/.claude/rules/ux-design-rules.md +0 -209
  167. package/autopm/.claude/rules/visual-testing.md +0 -223
  168. package/autopm/.claude/scripts/azure/README.md +0 -192
  169. package/autopm/.claude/scripts/azure/active-work.js +0 -524
  170. package/autopm/.claude/scripts/azure/active-work.sh +0 -20
  171. package/autopm/.claude/scripts/azure/blocked.js +0 -520
  172. package/autopm/.claude/scripts/azure/blocked.sh +0 -20
  173. package/autopm/.claude/scripts/azure/daily.js +0 -533
  174. package/autopm/.claude/scripts/azure/daily.sh +0 -20
  175. package/autopm/.claude/scripts/azure/dashboard.js +0 -970
  176. package/autopm/.claude/scripts/azure/dashboard.sh +0 -20
  177. package/autopm/.claude/scripts/azure/feature-list.js +0 -254
  178. package/autopm/.claude/scripts/azure/feature-list.sh +0 -20
  179. package/autopm/.claude/scripts/azure/feature-show.js +0 -7
  180. package/autopm/.claude/scripts/azure/feature-show.sh +0 -20
  181. package/autopm/.claude/scripts/azure/feature-status.js +0 -604
  182. package/autopm/.claude/scripts/azure/feature-status.sh +0 -20
  183. package/autopm/.claude/scripts/azure/help.js +0 -342
  184. package/autopm/.claude/scripts/azure/help.sh +0 -20
  185. package/autopm/.claude/scripts/azure/next-task.js +0 -508
  186. package/autopm/.claude/scripts/azure/next-task.sh +0 -20
  187. package/autopm/.claude/scripts/azure/search.js +0 -469
  188. package/autopm/.claude/scripts/azure/search.sh +0 -20
  189. package/autopm/.claude/scripts/azure/setup.js +0 -745
  190. package/autopm/.claude/scripts/azure/setup.sh +0 -20
  191. package/autopm/.claude/scripts/azure/sprint-report.js +0 -1012
  192. package/autopm/.claude/scripts/azure/sprint-report.sh +0 -20
  193. package/autopm/.claude/scripts/azure/sync.js +0 -563
  194. package/autopm/.claude/scripts/azure/sync.sh +0 -20
  195. package/autopm/.claude/scripts/azure/us-list.js +0 -210
  196. package/autopm/.claude/scripts/azure/us-list.sh +0 -20
  197. package/autopm/.claude/scripts/azure/us-status.js +0 -238
  198. package/autopm/.claude/scripts/azure/us-status.sh +0 -20
  199. package/autopm/.claude/scripts/azure/validate.js +0 -626
  200. package/autopm/.claude/scripts/azure/validate.sh +0 -20
  201. package/autopm/.claude/scripts/azure/wrapper-template.sh +0 -20
  202. package/autopm/.claude/scripts/github/dependency-tracker.js +0 -554
  203. package/autopm/.claude/scripts/github/dependency-validator.js +0 -545
  204. package/autopm/.claude/scripts/github/dependency-visualizer.js +0 -477
  205. package/autopm/.claude/scripts/pm/analytics.js +0 -425
  206. package/autopm/.claude/scripts/pm/blocked.js +0 -164
  207. package/autopm/.claude/scripts/pm/blocked.sh +0 -78
  208. package/autopm/.claude/scripts/pm/clean.js +0 -464
  209. package/autopm/.claude/scripts/pm/context-create.js +0 -216
  210. package/autopm/.claude/scripts/pm/context-prime.js +0 -335
  211. package/autopm/.claude/scripts/pm/context-update.js +0 -344
  212. package/autopm/.claude/scripts/pm/context.js +0 -338
  213. package/autopm/.claude/scripts/pm/epic-close.js +0 -347
  214. package/autopm/.claude/scripts/pm/epic-edit.js +0 -382
  215. package/autopm/.claude/scripts/pm/epic-list.js +0 -273
  216. package/autopm/.claude/scripts/pm/epic-list.sh +0 -109
  217. package/autopm/.claude/scripts/pm/epic-show.js +0 -291
  218. package/autopm/.claude/scripts/pm/epic-show.sh +0 -105
  219. package/autopm/.claude/scripts/pm/epic-split.js +0 -522
  220. package/autopm/.claude/scripts/pm/epic-start/epic-start.js +0 -183
  221. package/autopm/.claude/scripts/pm/epic-start/epic-start.sh +0 -94
  222. package/autopm/.claude/scripts/pm/epic-status.js +0 -291
  223. package/autopm/.claude/scripts/pm/epic-status.sh +0 -104
  224. package/autopm/.claude/scripts/pm/epic-sync/README.md +0 -208
  225. package/autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh +0 -77
  226. package/autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh +0 -86
  227. package/autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh +0 -79
  228. package/autopm/.claude/scripts/pm/epic-sync/update-references.sh +0 -89
  229. package/autopm/.claude/scripts/pm/epic-sync.sh +0 -137
  230. package/autopm/.claude/scripts/pm/help.js +0 -92
  231. package/autopm/.claude/scripts/pm/help.sh +0 -90
  232. package/autopm/.claude/scripts/pm/in-progress.js +0 -178
  233. package/autopm/.claude/scripts/pm/in-progress.sh +0 -93
  234. package/autopm/.claude/scripts/pm/init.js +0 -321
  235. package/autopm/.claude/scripts/pm/init.sh +0 -178
  236. package/autopm/.claude/scripts/pm/issue-close.js +0 -232
  237. package/autopm/.claude/scripts/pm/issue-edit.js +0 -310
  238. package/autopm/.claude/scripts/pm/issue-show.js +0 -272
  239. package/autopm/.claude/scripts/pm/issue-start.js +0 -181
  240. package/autopm/.claude/scripts/pm/issue-sync/format-comment.sh +0 -468
  241. package/autopm/.claude/scripts/pm/issue-sync/gather-updates.sh +0 -460
  242. package/autopm/.claude/scripts/pm/issue-sync/post-comment.sh +0 -330
  243. package/autopm/.claude/scripts/pm/issue-sync/preflight-validation.sh +0 -348
  244. package/autopm/.claude/scripts/pm/issue-sync/update-frontmatter.sh +0 -387
  245. package/autopm/.claude/scripts/pm/lib/README.md +0 -85
  246. package/autopm/.claude/scripts/pm/lib/epic-discovery.js +0 -119
  247. package/autopm/.claude/scripts/pm/lib/logger.js +0 -78
  248. package/autopm/.claude/scripts/pm/next.js +0 -189
  249. package/autopm/.claude/scripts/pm/next.sh +0 -72
  250. package/autopm/.claude/scripts/pm/optimize.js +0 -407
  251. package/autopm/.claude/scripts/pm/pr-create.js +0 -337
  252. package/autopm/.claude/scripts/pm/pr-list.js +0 -257
  253. package/autopm/.claude/scripts/pm/prd-list.js +0 -242
  254. package/autopm/.claude/scripts/pm/prd-list.sh +0 -103
  255. package/autopm/.claude/scripts/pm/prd-new.js +0 -684
  256. package/autopm/.claude/scripts/pm/prd-parse.js +0 -547
  257. package/autopm/.claude/scripts/pm/prd-status.js +0 -152
  258. package/autopm/.claude/scripts/pm/prd-status.sh +0 -63
  259. package/autopm/.claude/scripts/pm/release.js +0 -460
  260. package/autopm/.claude/scripts/pm/search.js +0 -192
  261. package/autopm/.claude/scripts/pm/search.sh +0 -89
  262. package/autopm/.claude/scripts/pm/standup.js +0 -362
  263. package/autopm/.claude/scripts/pm/standup.sh +0 -95
  264. package/autopm/.claude/scripts/pm/status.js +0 -148
  265. package/autopm/.claude/scripts/pm/status.sh +0 -59
  266. package/autopm/.claude/scripts/pm/sync-batch.js +0 -337
  267. package/autopm/.claude/scripts/pm/sync.js +0 -343
  268. package/autopm/.claude/scripts/pm/template-list.js +0 -141
  269. package/autopm/.claude/scripts/pm/template-new.js +0 -366
  270. package/autopm/.claude/scripts/pm/validate.js +0 -274
  271. package/autopm/.claude/scripts/pm/validate.sh +0 -106
  272. package/autopm/.claude/scripts/pm/what-next.js +0 -660
  273. package/bin/node/azure-feature-show.js +0 -7
@@ -1,310 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Issue Edit - Edit issue details
4
- */
5
-
6
- const fs = require('fs');
7
- const path = require('path');
8
- const readline = require('readline');
9
-
10
- class IssueEditor {
11
- constructor() {
12
- this.issueDir = path.join('.claude', 'issues');
13
- this.activeWorkFile = path.join('.claude', 'active-work.json');
14
- }
15
-
16
- loadActiveWork() {
17
- if (!fs.existsSync(this.activeWorkFile)) {
18
- return { issues: [], epics: [] };
19
- }
20
- try {
21
- return JSON.parse(fs.readFileSync(this.activeWorkFile, 'utf8'));
22
- } catch {
23
- return { issues: [], epics: [] };
24
- }
25
- }
26
-
27
- async editIssue(issueId) {
28
- console.log(`\nšŸ“ Editing Issue: ${issueId}`);
29
- console.log(`${'═'.repeat(50)}\n`);
30
-
31
- // Find issue file
32
- const issueFile = path.join(this.issueDir, `${issueId}.md`);
33
- if (!fs.existsSync(issueFile)) {
34
- console.error(`āŒ Issue file not found: ${issueId}`);
35
- console.log('\nšŸ’” Available issues:');
36
- this.listAvailableIssues();
37
- return false;
38
- }
39
-
40
- // Read current content
41
- const currentContent = fs.readFileSync(issueFile, 'utf8');
42
- console.log('Current issue content:');
43
- console.log(`${'─'.repeat(50)}`);
44
- console.log(currentContent.substring(0, 500));
45
- if (currentContent.length > 500) {
46
- console.log('... (truncated)');
47
- }
48
- console.log(`${'─'.repeat(50)}\n`);
49
-
50
- // Create interface for editing
51
- const rl = readline.createInterface({
52
- input: process.stdin,
53
- output: process.stdout
54
- });
55
-
56
- const prompt = (question) => new Promise((resolve) => {
57
- rl.question(question, resolve);
58
- });
59
-
60
- try {
61
- // Edit menu
62
- console.log('What would you like to edit?');
63
- console.log(' 1. Title');
64
- console.log(' 2. Description');
65
- console.log(' 3. Add task');
66
- console.log(' 4. Mark task complete');
67
- console.log(' 5. Add note');
68
- console.log(' 6. Change status');
69
- console.log(' 7. Open in editor');
70
- console.log(' 0. Cancel');
71
-
72
- const choice = await prompt('\nEnter choice (0-7): ');
73
-
74
- switch (choice) {
75
- case '1':
76
- await this.editTitle(issueFile, currentContent, rl, prompt);
77
- break;
78
- case '2':
79
- await this.editDescription(issueFile, currentContent, rl, prompt);
80
- break;
81
- case '3':
82
- await this.addTask(issueFile, currentContent, rl, prompt);
83
- break;
84
- case '4':
85
- await this.markTaskComplete(issueFile, currentContent, rl, prompt);
86
- break;
87
- case '5':
88
- await this.addNote(issueFile, currentContent, rl, prompt);
89
- break;
90
- case '6':
91
- await this.changeStatus(issueFile, currentContent, rl, prompt);
92
- break;
93
- case '7':
94
- await this.openInEditor(issueFile);
95
- break;
96
- case '0':
97
- console.log('Edit cancelled.');
98
- break;
99
- default:
100
- console.log('Invalid choice.');
101
- }
102
- } finally {
103
- rl.close();
104
- }
105
-
106
- // Show updated content
107
- if (choice !== '0' && choice !== '7') {
108
- const updatedContent = fs.readFileSync(issueFile, 'utf8');
109
- console.log('\nāœ… Issue updated successfully!');
110
- console.log('\nUpdated content preview:');
111
- console.log(`${'─'.repeat(50)}`);
112
- console.log(updatedContent.substring(0, 300));
113
- if (updatedContent.length > 300) {
114
- console.log('... (truncated)');
115
- }
116
- }
117
-
118
- return true;
119
- }
120
-
121
- async editTitle(issueFile, content, rl, prompt) {
122
- const newTitle = await prompt('Enter new title: ');
123
- if (newTitle) {
124
- const updated = content.replace(/^# .+$/m, `# Issue: ${newTitle}`);
125
- fs.writeFileSync(issueFile, updated);
126
- console.log('āœ… Title updated');
127
- }
128
- }
129
-
130
- async editDescription(issueFile, content, rl, prompt) {
131
- console.log('Enter new description (end with empty line):');
132
- let description = '';
133
- let line;
134
- while ((line = await prompt('')) !== '') {
135
- description += line + '\n';
136
- }
137
-
138
- if (description) {
139
- const updated = content.replace(
140
- /(## Description\n)([\s\S]*?)(\n##|$)/,
141
- `$1${description}$3`
142
- );
143
- fs.writeFileSync(issueFile, updated);
144
- console.log('āœ… Description updated');
145
- }
146
- }
147
-
148
- async addTask(issueFile, content, rl, prompt) {
149
- const task = await prompt('Enter new task: ');
150
- if (task) {
151
- const updated = content.replace(
152
- /(## Tasks\n([\s\S]*?))\n(\n##|$)/,
153
- `$1\n- [ ] ${task}\n$3`
154
- );
155
- fs.writeFileSync(issueFile, updated);
156
- console.log('āœ… Task added');
157
- }
158
- }
159
-
160
- async markTaskComplete(issueFile, content, rl, prompt) {
161
- // Extract tasks
162
- const taskMatches = content.match(/- \[ \] .+/g) || [];
163
-
164
- if (taskMatches.length === 0) {
165
- console.log('No incomplete tasks found.');
166
- return;
167
- }
168
-
169
- console.log('\nIncomplete tasks:');
170
- taskMatches.forEach((task, index) => {
171
- console.log(` ${index + 1}. ${task.replace('- [ ] ', '')}`);
172
- });
173
-
174
- const taskNum = await prompt(`\nSelect task to complete (1-${taskMatches.length}): `);
175
- const index = parseInt(taskNum) - 1;
176
-
177
- if (index >= 0 && index < taskMatches.length) {
178
- const taskToComplete = taskMatches[index];
179
- const updated = content.replace(
180
- taskToComplete,
181
- taskToComplete.replace('- [ ]', '- [x]')
182
- );
183
- fs.writeFileSync(issueFile, updated);
184
- console.log('āœ… Task marked as complete');
185
- }
186
- }
187
-
188
- async addNote(issueFile, content, rl, prompt) {
189
- const note = await prompt('Enter note: ');
190
- if (note) {
191
- const timestamp = new Date().toISOString();
192
- const noteEntry = `- ${timestamp}: ${note}\n`;
193
-
194
- if (!content.includes('## Notes')) {
195
- // Add notes section
196
- const updated = content + `\n## Notes\n${noteEntry}`;
197
- fs.writeFileSync(issueFile, updated);
198
- } else {
199
- // Add to existing notes
200
- const updated = content.replace(
201
- /(## Notes\n([\s\S]*?))\n(\n##|$)/,
202
- `$1\n${noteEntry}$3`
203
- );
204
- fs.writeFileSync(issueFile, updated);
205
- }
206
- console.log('āœ… Note added');
207
- }
208
- }
209
-
210
- async changeStatus(issueFile, content, rl, prompt) {
211
- console.log('\nSelect new status:');
212
- console.log(' 1. Not Started');
213
- console.log(' 2. In Progress');
214
- console.log(' 3. Blocked');
215
- console.log(' 4. Review');
216
- console.log(' 5. Completed');
217
-
218
- const choice = await prompt('Enter choice (1-5): ');
219
- const statuses = ['Not Started', 'In Progress', 'Blocked', 'Review', 'Completed'];
220
-
221
- if (choice >= '1' && choice <= '5') {
222
- const newStatus = statuses[parseInt(choice) - 1];
223
- const updated = content.replace(
224
- /\*\*State\*\*: .+/,
225
- `**State**: ${newStatus}`
226
- );
227
- fs.writeFileSync(issueFile, updated);
228
- console.log(`āœ… Status changed to: ${newStatus}`);
229
-
230
- // Update active work if needed
231
- if (newStatus === 'In Progress') {
232
- this.updateActiveWork(path.basename(issueFile, '.md'), newStatus);
233
- }
234
- }
235
- }
236
-
237
- updateActiveWork(issueId, status) {
238
- const activeWork = this.loadActiveWork();
239
- const issue = activeWork.issues.find(i => i.id === issueId);
240
- if (issue) {
241
- issue.status = status.toLowerCase().replace(' ', '-');
242
- fs.writeFileSync(this.activeWorkFile, JSON.stringify(activeWork, null, 2));
243
- }
244
- }
245
-
246
- async openInEditor(issueFile) {
247
- const { exec } = require('child_process');
248
- const editor = process.env.EDITOR || 'vi';
249
-
250
- console.log(`Opening in ${editor}...`);
251
- exec(`${editor} "${issueFile}"`, (error) => {
252
- if (error) {
253
- console.error(`Failed to open editor: ${error.message}`);
254
- } else {
255
- console.log('āœ… Editor closed');
256
- }
257
- });
258
- }
259
-
260
- listAvailableIssues() {
261
- if (fs.existsSync(this.issueDir)) {
262
- const issues = fs.readdirSync(this.issueDir)
263
- .filter(f => f.endsWith('.md'))
264
- .map(f => f.replace('.md', ''));
265
-
266
- if (issues.length > 0) {
267
- issues.forEach(issue => {
268
- console.log(` • ${issue}`);
269
- });
270
- } else {
271
- console.log(' No issues found');
272
- }
273
- }
274
-
275
- // Also show from active work
276
- const activeWork = this.loadActiveWork();
277
- if (activeWork.issues.length > 0) {
278
- console.log('\nActive issues:');
279
- activeWork.issues.forEach(issue => {
280
- console.log(` • ${issue.id}`);
281
- });
282
- }
283
- }
284
-
285
- async run(args) {
286
- const issueId = args[0];
287
-
288
- if (!issueId) {
289
- console.error('āŒ Error: Issue ID required');
290
- console.error('Usage: pm issue-edit <issue-id>');
291
- console.log('\nAvailable issues:');
292
- this.listAvailableIssues();
293
- process.exit(1);
294
- }
295
-
296
- const success = await this.editIssue(issueId);
297
- process.exit(success ? 0 : 1);
298
- }
299
- }
300
-
301
- // Main execution
302
- if (require.main === module) {
303
- const editor = new IssueEditor();
304
- editor.run(process.argv.slice(2)).catch(error => {
305
- console.error('āŒ Error:', error.message);
306
- process.exit(1);
307
- });
308
- }
309
-
310
- module.exports = IssueEditor;
@@ -1,272 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Issue Show - Display issue details
4
- */
5
-
6
- const fs = require('fs');
7
- const path = require('path');
8
- const { execSync } = require('child_process');
9
-
10
- class IssueShower {
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
- loadCompletedWork() {
47
- if (!fs.existsSync(this.completedFile)) {
48
- return { issues: [], epics: [] };
49
- }
50
- try {
51
- return JSON.parse(fs.readFileSync(this.completedFile, 'utf8'));
52
- } catch {
53
- return { issues: [], epics: [] };
54
- }
55
- }
56
-
57
- formatDuration(startTime, endTime = null) {
58
- const start = new Date(startTime);
59
- const end = endTime ? new Date(endTime) : new Date();
60
- const diff = end - start;
61
-
62
- const days = Math.floor(diff / (1000 * 60 * 60 * 24));
63
- const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
64
- const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
65
-
66
- if (days > 0) {
67
- return `${days} day${days > 1 ? 's' : ''} ${hours}h`;
68
- } else if (hours > 0) {
69
- return `${hours}h ${minutes}m`;
70
- } else {
71
- return `${minutes} minute${minutes > 1 ? 's' : ''}`;
72
- }
73
- }
74
-
75
- async showIssue(issueId, options = {}) {
76
- const provider = options.provider || this.detectProvider();
77
-
78
- console.log(`\nšŸ“‹ Issue Details: ${issueId}`);
79
- console.log(`${'─'.repeat(50)}\n`);
80
-
81
- // Try provider-specific show command first
82
- const providerScript = path.join(this.providersDir, provider, 'issue-show.js');
83
- if (fs.existsSync(providerScript) && !options.local) {
84
- try {
85
- console.log(`šŸ“¦ Provider: ${provider}\n`);
86
- require(providerScript);
87
- return;
88
- } catch (error) {
89
- console.log(`āš ļø Provider script failed, showing local data\n`);
90
- }
91
- }
92
-
93
- // Check if issue is in active work
94
- const activeWork = this.loadActiveWork();
95
- const activeIssue = activeWork.issues.find(i => i.id === issueId);
96
-
97
- // Check if issue is in completed work
98
- const completedWork = this.loadCompletedWork();
99
- const completedIssue = completedWork.issues.find(i => i.id === issueId);
100
-
101
- // Show status from tracking
102
- if (activeIssue || completedIssue) {
103
- const issue = activeIssue || completedIssue;
104
- console.log('šŸ“Š Status Information:');
105
- console.log(` • State: ${issue.status === 'completed' ? 'āœ… Completed' : 'šŸ”„ In Progress'}`);
106
- console.log(` • Provider: ${issue.provider}`);
107
- console.log(` • Started: ${new Date(issue.startedAt).toLocaleString()}`);
108
-
109
- if (completedIssue) {
110
- console.log(` • Completed: ${new Date(completedIssue.completedAt).toLocaleString()}`);
111
- console.log(` • Duration: ${completedIssue.duration || this.formatDuration(completedIssue.startedAt, completedIssue.completedAt)}`);
112
- } else {
113
- console.log(` • Duration: ${this.formatDuration(activeIssue.startedAt)} (ongoing)`);
114
- }
115
- console.log('');
116
- }
117
-
118
- // Show local issue file if exists
119
- const issueFile = path.join(this.issueDir, `${issueId}.md`);
120
- if (fs.existsSync(issueFile)) {
121
- console.log('šŸ“„ Issue Content:');
122
- console.log(`${'─'.repeat(50)}`);
123
-
124
- const content = fs.readFileSync(issueFile, 'utf8');
125
- const lines = content.split('\n');
126
-
127
- let inSection = false;
128
- let sectionContent = [];
129
-
130
- lines.forEach(line => {
131
- // Skip the main title
132
- if (line.startsWith('# Issue')) return;
133
-
134
- // Handle sections
135
- if (line.startsWith('## ')) {
136
- if (sectionContent.length > 0) {
137
- console.log(sectionContent.join('\n'));
138
- sectionContent = [];
139
- }
140
- console.log(`\n${line.replace('## ', 'šŸ”¹ ').toUpperCase()}`);
141
- console.log(`${'─'.repeat(30)}`);
142
- inSection = true;
143
- } else if (inSection && line.trim()) {
144
- // Format different types of content
145
- if (line.startsWith('- [x]')) {
146
- console.log(' āœ…' + line.substring(5));
147
- } else if (line.startsWith('- [ ]')) {
148
- console.log(' ⬜' + line.substring(5));
149
- } else if (line.startsWith('- ')) {
150
- console.log(' •' + line.substring(1));
151
- } else if (line.startsWith('**')) {
152
- console.log(' ' + line);
153
- } else {
154
- console.log(' ' + line);
155
- }
156
- }
157
- });
158
-
159
- console.log('');
160
- } else if (!activeIssue && !completedIssue) {
161
- console.log('āŒ Issue not found locally\n');
162
-
163
- // Suggest checking with provider
164
- if (!options.local) {
165
- console.log(`šŸ’” Try fetching from ${provider}:`);
166
- console.log(` pm issue-show ${issueId} --fetch`);
167
- }
168
- }
169
-
170
- // Show related issues if any
171
- if (activeWork.issues.length > 1 || completedWork.issues.length > 0) {
172
- console.log(`${'─'.repeat(50)}`);
173
- console.log('\nšŸ“š Related Issues:');
174
-
175
- if (activeWork.issues.length > 0) {
176
- console.log('\nšŸ”„ Active:');
177
- activeWork.issues
178
- .filter(i => i.id !== issueId)
179
- .slice(0, 3)
180
- .forEach(issue => {
181
- const duration = this.formatDuration(issue.startedAt);
182
- console.log(` • ${issue.id} - ${duration} elapsed`);
183
- });
184
- }
185
-
186
- if (completedWork.issues.length > 0) {
187
- console.log('\nāœ… Recently Completed:');
188
- completedWork.issues
189
- .filter(i => i.id !== issueId)
190
- .slice(0, 3)
191
- .forEach(issue => {
192
- const date = new Date(issue.completedAt).toLocaleDateString();
193
- console.log(` • ${issue.id} - completed ${date}`);
194
- });
195
- }
196
- }
197
-
198
- // Show available actions
199
- console.log(`\n${'─'.repeat(50)}`);
200
- console.log('\nšŸ’” Available Actions:');
201
-
202
- if (activeIssue) {
203
- console.log(' • Close issue: pm issue-close', issueId);
204
- console.log(' • Edit issue: pm issue-edit', issueId);
205
- } else if (completedIssue) {
206
- console.log(' • Reopen issue: pm issue-reopen', issueId);
207
- } else {
208
- console.log(' • Start work: pm issue-start', issueId);
209
- }
210
-
211
- console.log(' • List all issues: pm in-progress');
212
- console.log(' • View status: pm status');
213
- }
214
-
215
- async run(args) {
216
- const issueId = args[0];
217
-
218
- if (!issueId) {
219
- console.error('āŒ Error: Issue ID required');
220
- console.error('Usage: pm issue-show <issue-id> [--local] [--fetch]');
221
-
222
- // Show recent issues
223
- const activeWork = this.loadActiveWork();
224
- const completedWork = this.loadCompletedWork();
225
-
226
- if (activeWork.issues.length > 0 || completedWork.issues.length > 0) {
227
- console.log('\nšŸ“‹ Recent issues:');
228
-
229
- if (activeWork.issues.length > 0) {
230
- console.log('\nActive:');
231
- activeWork.issues.slice(0, 3).forEach(issue => {
232
- console.log(` • ${issue.id} - ${issue.status}`);
233
- });
234
- }
235
-
236
- if (completedWork.issues.length > 0) {
237
- console.log('\nCompleted:');
238
- completedWork.issues.slice(0, 3).forEach(issue => {
239
- const date = new Date(issue.completedAt).toLocaleDateString();
240
- console.log(` • ${issue.id} - ${date}`);
241
- });
242
- }
243
- }
244
-
245
- process.exit(1);
246
- }
247
-
248
- const options = {};
249
- args.slice(1).forEach(arg => {
250
- if (arg === '--local') {
251
- options.local = true;
252
- } else if (arg === '--fetch') {
253
- options.fetch = true;
254
- } else if (arg.startsWith('--provider=')) {
255
- options.provider = arg.split('=')[1];
256
- }
257
- });
258
-
259
- await this.showIssue(issueId, options);
260
- }
261
- }
262
-
263
- // Main execution
264
- if (require.main === module) {
265
- const shower = new IssueShower();
266
- shower.run(process.argv.slice(2)).catch(error => {
267
- console.error('āŒ Error:', error.message);
268
- process.exit(1);
269
- });
270
- }
271
-
272
- module.exports = IssueShower;