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,181 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Issue Start - Start work on an issue
4
- */
5
-
6
- const fs = require('fs');
7
- const path = require('path');
8
- const { execSync } = require('child_process');
9
-
10
- class IssueStarter {
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
- }
16
-
17
- detectProvider() {
18
- // Check for Azure DevOps
19
- if (fs.existsSync('.azure') || process.env.AZURE_DEVOPS_ORG) {
20
- return 'azure';
21
- }
22
-
23
- // Check for GitHub
24
- if (fs.existsSync('.github') || fs.existsSync('.git')) {
25
- try {
26
- const remoteUrl = execSync('git remote get-url origin 2>/dev/null', { encoding: 'utf8' });
27
- if (remoteUrl.includes('github.com')) {
28
- return 'github';
29
- }
30
- } catch {}
31
- }
32
-
33
- return 'local';
34
- }
35
-
36
- loadActiveWork() {
37
- if (!fs.existsSync(this.activeWorkFile)) {
38
- return { issues: [], epics: [] };
39
- }
40
- try {
41
- return JSON.parse(fs.readFileSync(this.activeWorkFile, 'utf8'));
42
- } catch {
43
- return { issues: [], epics: [] };
44
- }
45
- }
46
-
47
- saveActiveWork(activeWork) {
48
- const dir = path.dirname(this.activeWorkFile);
49
- if (!fs.existsSync(dir)) {
50
- fs.mkdirSync(dir, { recursive: true });
51
- }
52
- fs.writeFileSync(this.activeWorkFile, JSON.stringify(activeWork, null, 2));
53
- }
54
-
55
- async startIssue(issueId, options = {}) {
56
- const provider = options.provider || this.detectProvider();
57
- console.log(`🚀 Starting work on issue: ${issueId}`);
58
- console.log(`📦 Provider: ${provider}\n`);
59
-
60
- // Update active work tracking
61
- const activeWork = this.loadActiveWork();
62
- const issueEntry = {
63
- id: issueId,
64
- provider: provider,
65
- startedAt: new Date().toISOString(),
66
- status: 'in-progress'
67
- };
68
-
69
- // Remove if already exists and add to beginning
70
- activeWork.issues = activeWork.issues.filter(i => i.id !== issueId);
71
- activeWork.issues.unshift(issueEntry);
72
-
73
- // Keep only last 10 active issues
74
- if (activeWork.issues.length > 10) {
75
- activeWork.issues = activeWork.issues.slice(0, 10);
76
- }
77
-
78
- this.saveActiveWork(activeWork);
79
-
80
- // Try to use provider-specific start command
81
- const providerScript = path.join(this.providersDir, provider, 'issue-start.js');
82
- if (fs.existsSync(providerScript)) {
83
- console.log(`Using ${provider} provider to start issue...`);
84
- try {
85
- require(providerScript);
86
- return;
87
- } catch (error) {
88
- console.log(`⚠️ Provider script failed, using local tracking`);
89
- }
90
- }
91
-
92
- // Local tracking fallback
93
- console.log('📝 Creating local issue tracking...');
94
-
95
- // Create issue file if it doesn't exist
96
- if (!fs.existsSync(this.issueDir)) {
97
- fs.mkdirSync(this.issueDir, { recursive: true });
98
- }
99
-
100
- const issueFile = path.join(this.issueDir, `${issueId}.md`);
101
- if (!fs.existsSync(issueFile)) {
102
- const template = `# Issue ${issueId}
103
-
104
- ## Status
105
- - **State**: In Progress
106
- - **Started**: ${new Date().toISOString()}
107
- - **Assigned**: ${process.env.USER || 'current-user'}
108
-
109
- ## Description
110
- [Add issue description here]
111
-
112
- ## Tasks
113
- - [ ] Task 1
114
- - [ ] Task 2
115
- - [ ] Task 3
116
-
117
- ## Notes
118
- - Started work on ${new Date().toLocaleDateString()}
119
-
120
- ## Updates
121
- - ${new Date().toISOString()}: Issue started
122
- `;
123
- fs.writeFileSync(issueFile, template);
124
- console.log(`✅ Created issue file: ${issueFile}`);
125
- }
126
-
127
- // Display status
128
- console.log('\n📊 Issue Status:');
129
- console.log(` • ID: ${issueId}`);
130
- console.log(` • Status: In Progress`);
131
- console.log(` • Started: ${new Date().toLocaleString()}`);
132
-
133
- // Show next steps
134
- console.log('\n💡 Next steps:');
135
- console.log(` • View issue: pm issue-show ${issueId}`);
136
- console.log(` • Update status: pm issue-edit ${issueId}`);
137
- console.log(` • Close issue: pm issue-close ${issueId}`);
138
- console.log(` • View all active: pm in-progress`);
139
- }
140
-
141
- async run(args) {
142
- const issueId = args[0];
143
-
144
- if (!issueId) {
145
- console.error('❌ Error: Issue ID required');
146
- console.error('Usage: pm issue-start <issue-id> [--provider=azure|github]');
147
-
148
- // Show active work if any
149
- const activeWork = this.loadActiveWork();
150
- if (activeWork.issues.length > 0) {
151
- console.log('\n📋 Currently active issues:');
152
- activeWork.issues.slice(0, 5).forEach(issue => {
153
- const date = new Date(issue.startedAt).toLocaleDateString();
154
- console.log(` • ${issue.id} (${issue.provider}) - started ${date}`);
155
- });
156
- }
157
-
158
- process.exit(1);
159
- }
160
-
161
- const options = {};
162
- args.slice(1).forEach(arg => {
163
- if (arg.startsWith('--provider=')) {
164
- options.provider = arg.split('=')[1];
165
- }
166
- });
167
-
168
- await this.startIssue(issueId, options);
169
- }
170
- }
171
-
172
- // Main execution
173
- if (require.main === module) {
174
- const starter = new IssueStarter();
175
- starter.run(process.argv.slice(2)).catch(error => {
176
- console.error('❌ Error:', error.message);
177
- process.exit(1);
178
- });
179
- }
180
-
181
- module.exports = IssueStarter;
@@ -1,468 +0,0 @@
1
- #!/bin/bash
2
- # Format Comment Script for Issue Sync
3
- # Formats consolidated updates into a GitHub issue comment
4
-
5
- set -euo pipefail
6
-
7
- # Load libraries
8
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9
- source "${SCRIPT_DIR}/../lib/logging-utils.sh"
10
- source "${SCRIPT_DIR}/../lib/frontmatter-utils.sh"
11
- source "${SCRIPT_DIR}/../lib/datetime-utils.sh"
12
-
13
- # Script configuration
14
- readonly ISSUE_NUMBER="${1:-}"
15
- readonly UPDATES_FILE="${2:-}"
16
- readonly PROGRESS_FILE="${3:-}"
17
- readonly IS_COMPLETION="${4:-false}"
18
-
19
- # Global variables
20
- declare -g formatted_comment=""
21
- declare -g temp_dir=""
22
-
23
- # Main function
24
- main() {
25
- print_banner "GitHub Comment Formatter" "1.0.0"
26
-
27
- # Validate inputs
28
- log_info "Formatting comment for issue #$ISSUE_NUMBER"
29
- validate_inputs || exit 1
30
-
31
- # Setup workspace
32
- setup_workspace
33
-
34
- # Format appropriate comment type
35
- if [[ "$IS_COMPLETION" == "true" ]]; then
36
- with_error_handling "Format completion comment" \
37
- format_completion_comment
38
- else
39
- with_error_handling "Format progress update comment" \
40
- format_progress_update_comment
41
- fi
42
-
43
- # Validate comment size
44
- with_error_handling "Validate comment size" \
45
- validate_comment_size
46
-
47
- # Output results
48
- display_results
49
-
50
- # Return path to formatted comment
51
- echo "$formatted_comment"
52
- }
53
-
54
- # Validate script inputs
55
- validate_inputs() {
56
- log_function_entry "validate_inputs"
57
-
58
- if [[ -z "$ISSUE_NUMBER" ]]; then
59
- log_error "Issue number is required"
60
- return 1
61
- fi
62
-
63
- if [[ ! -f "$UPDATES_FILE" ]]; then
64
- log_error "Updates file not found: $UPDATES_FILE"
65
- return 1
66
- fi
67
-
68
- if [[ ! -f "$PROGRESS_FILE" ]]; then
69
- log_error "Progress file not found: $PROGRESS_FILE"
70
- return 1
71
- fi
72
-
73
- log_function_exit "validate_inputs"
74
- return 0
75
- }
76
-
77
- # Setup temporary workspace
78
- setup_workspace() {
79
- log_function_entry "setup_workspace"
80
-
81
- temp_dir="/tmp/format-comment-$$"
82
- formatted_comment="$temp_dir/formatted-comment.md"
83
-
84
- log_info "Creating workspace: $temp_dir"
85
- mkdir -p "$temp_dir"
86
-
87
- # Cleanup on exit
88
- trap "cleanup_workspace" EXIT
89
-
90
- log_function_exit "setup_workspace"
91
- }
92
-
93
- # Cleanup workspace
94
- cleanup_workspace() {
95
- if [[ -n "$temp_dir" ]] && [[ -d "$temp_dir" ]]; then
96
- log_debug "Cleaning up workspace: $temp_dir"
97
- # Don't remove - calling script needs the results
98
- # rm -rf "$temp_dir"
99
- fi
100
- }
101
-
102
- # Format progress update comment
103
- format_progress_update_comment() {
104
- log_function_entry "format_progress_update_comment"
105
-
106
- local current_date
107
- current_date=$(get_current_date)
108
-
109
- local current_datetime
110
- current_datetime=$(get_current_datetime)
111
-
112
- # Get completion percentage
113
- local completion
114
- completion=$(get_frontmatter_field "$PROGRESS_FILE" "completion" 2>/dev/null || echo "0")
115
-
116
- # Parse updates file to extract sections
117
- parse_updates_file
118
-
119
- log_info "Creating progress update comment"
120
-
121
- # Create formatted comment
122
- cat > "$formatted_comment" << EOF
123
- ## 🔄 Progress Update - ${current_date}
124
-
125
- ### ✅ Completed Work
126
- $(get_section "completed" "- No completed items in this update")
127
-
128
- ### 🔄 In Progress
129
- $(get_section "in_progress" "- Continuing work on implementation")
130
-
131
- ### 📝 Technical Notes
132
- $(get_section "technical_notes" "- No new technical notes")
133
-
134
- ### 📊 Acceptance Criteria Status
135
- $(format_acceptance_criteria)
136
-
137
- ### 🚀 Next Steps
138
- $(get_section "next_steps" "- Continue with planned implementation")
139
-
140
- ### ⚠️ Blockers
141
- $(get_section "blockers" "- No current blockers")
142
-
143
- ### 💻 Recent Commits
144
- $(format_recent_commits)
145
-
146
- ---
147
- *Progress: ${completion}% | Synced from local updates at ${current_datetime}*
148
- EOF
149
-
150
- log_success "Progress update comment formatted"
151
- log_function_exit "format_progress_update_comment"
152
- }
153
-
154
- # Format completion comment
155
- format_completion_comment() {
156
- log_function_entry "format_completion_comment"
157
-
158
- local current_date
159
- current_date=$(get_current_date)
160
-
161
- local current_datetime
162
- current_datetime=$(get_current_datetime)
163
-
164
- # Parse updates file
165
- parse_updates_file
166
-
167
- log_info "Creating completion comment"
168
-
169
- # Create formatted completion comment
170
- cat > "$formatted_comment" << EOF
171
- ## ✅ Task Completed - ${current_date}
172
-
173
- ### 🎯 All Acceptance Criteria Met
174
- $(format_acceptance_criteria_completion)
175
-
176
- ### 📦 Deliverables
177
- $(get_section "deliverables" "- Implementation complete\n- Code reviewed and tested")
178
-
179
- ### 🧪 Testing
180
- $(format_testing_status)
181
-
182
- ### 📚 Documentation
183
- $(format_documentation_status)
184
-
185
- This task is ready for review and can be closed.
186
-
187
- ---
188
- *Task completed: 100% | Synced at ${current_datetime}*
189
- EOF
190
-
191
- log_success "Completion comment formatted"
192
- log_function_exit "format_completion_comment"
193
- }
194
-
195
- # Parse updates file and extract sections
196
- parse_updates_file() {
197
- log_function_entry "parse_updates_file"
198
-
199
- # Extract different sections from updates file
200
- extract_section "Progress Updates" "progress"
201
- extract_section "Technical Notes" "technical_notes"
202
- extract_section "Recent Commits" "commits"
203
- extract_section "Acceptance Criteria" "acceptance_criteria"
204
- extract_section "Next Steps" "next_steps"
205
- extract_section "Blockers" "blockers"
206
- extract_section "Completed Work" "completed"
207
- extract_section "In Progress" "in_progress"
208
- extract_section "Deliverables" "deliverables"
209
- extract_section "Testing" "testing"
210
- extract_section "Documentation" "documentation"
211
-
212
- log_debug "Updates file parsed into sections"
213
- log_function_exit "parse_updates_file"
214
- }
215
-
216
- # Extract a section from updates file
217
- extract_section() {
218
- local section_title="$1"
219
- local section_key="$2"
220
- local section_file="$temp_dir/section_${section_key}.md"
221
-
222
- log_debug "Extracting section: $section_title"
223
-
224
- # Use awk to extract section content
225
- awk -v section="## $section_title" '
226
- $0 == section { capture=1; next }
227
- /^## / && capture { capture=0 }
228
- capture && NF { print }
229
- ' "$UPDATES_FILE" > "$section_file"
230
-
231
- if [[ ! -s "$section_file" ]]; then
232
- log_debug "Section not found or empty: $section_title"
233
- fi
234
- }
235
-
236
- # Get formatted section content
237
- get_section() {
238
- local section_key="$1"
239
- local default_content="$2"
240
- local section_file="$temp_dir/section_${section_key}.md"
241
-
242
- if [[ -f "$section_file" ]] && [[ -s "$section_file" ]]; then
243
- cat "$section_file"
244
- else
245
- echo -e "$default_content"
246
- fi
247
- }
248
-
249
- # Format acceptance criteria
250
- format_acceptance_criteria() {
251
- local criteria_file="$temp_dir/section_acceptance_criteria.md"
252
-
253
- if [[ -f "$criteria_file" ]] && [[ -s "$criteria_file" ]]; then
254
- # Process existing criteria
255
- cat "$criteria_file" | while read -r line; do
256
- if [[ "$line" =~ ^-[[:space:]].*$ ]]; then
257
- # Determine status based on keywords
258
- if [[ "$line" =~ (✅|[Cc]omplete|[Dd]one|[Ff]inished) ]]; then
259
- echo "$line"
260
- elif [[ "$line" =~ (🔄|[Ii]n[[:space:]]progress|[Ww]orking|[Oo]ngoing) ]]; then
261
- echo "$line"
262
- elif [[ "$line" =~ (⚠️|⏸️|[Bb]locked|[Pp]ending|[Ww]aiting) ]]; then
263
- echo "$line"
264
- else
265
- # Default to unchecked
266
- echo "- □ ${line#- }"
267
- fi
268
- else
269
- echo "$line"
270
- fi
271
- done
272
- else
273
- # Default criteria status
274
- echo "- ✅ Initial implementation complete"
275
- echo "- 🔄 Testing in progress"
276
- echo "- □ Documentation pending"
277
- fi
278
- }
279
-
280
- # Format acceptance criteria for completion
281
- format_acceptance_criteria_completion() {
282
- local criteria_file="$temp_dir/section_acceptance_criteria.md"
283
-
284
- if [[ -f "$criteria_file" ]] && [[ -s "$criteria_file" ]]; then
285
- # Mark all as complete
286
- cat "$criteria_file" | while read -r line; do
287
- if [[ "$line" =~ ^-[[:space:]].*$ ]]; then
288
- # Remove any existing status markers and add checkmark
289
- cleaned_line=$(echo "$line" | sed 's/^-[[:space:]]*\(✅\|🔄\|⚠️\|⏸️\|□\)[[:space:]]*/- /')
290
- echo "- ✅ ${cleaned_line#- }"
291
- else
292
- echo "$line"
293
- fi
294
- done
295
- else
296
- echo "- ✅ All requirements implemented"
297
- echo "- ✅ Code quality standards met"
298
- echo "- ✅ Performance requirements satisfied"
299
- fi
300
- }
301
-
302
- # Format recent commits
303
- format_recent_commits() {
304
- local commits_file="$temp_dir/section_commits.md"
305
-
306
- if [[ -f "$commits_file" ]] && [[ -s "$commits_file" ]]; then
307
- # Limit to 10 most recent commits
308
- head -10 "$commits_file"
309
- else
310
- # Try to get recent commits from git
311
- if command -v git >/dev/null 2>&1; then
312
- local recent_commits
313
- recent_commits=$(git log --oneline -5 --no-merges 2>/dev/null || echo "")
314
-
315
- if [[ -n "$recent_commits" ]]; then
316
- echo "$recent_commits" | while read -r commit; do
317
- echo "- $commit"
318
- done
319
- else
320
- echo "- No recent commits found"
321
- fi
322
- else
323
- echo "- Commit history not available"
324
- fi
325
- fi
326
- }
327
-
328
- # Format testing status
329
- format_testing_status() {
330
- local testing_file="$temp_dir/section_testing.md"
331
-
332
- if [[ -f "$testing_file" ]] && [[ -s "$testing_file" ]]; then
333
- cat "$testing_file"
334
- else
335
- # Default testing status
336
- cat << EOF
337
- - Unit tests: ✅ Passing
338
- - Integration tests: ✅ Passing
339
- - Manual testing: ✅ Complete
340
- EOF
341
- fi
342
- }
343
-
344
- # Format documentation status
345
- format_documentation_status() {
346
- local docs_file="$temp_dir/section_documentation.md"
347
-
348
- if [[ -f "$docs_file" ]] && [[ -s "$docs_file" ]]; then
349
- cat "$docs_file"
350
- else
351
- # Default documentation status
352
- cat << EOF
353
- - Code documentation: ✅ Updated
354
- - README updates: ✅ Complete
355
- - API documentation: ✅ Current
356
- EOF
357
- fi
358
- }
359
-
360
- # Validate comment size against GitHub limits
361
- validate_comment_size() {
362
- log_function_entry "validate_comment_size"
363
-
364
- local max_size=65536 # GitHub comment size limit
365
- local comment_size
366
- comment_size=$(wc -c < "$formatted_comment")
367
-
368
- log_info "Comment size: $comment_size characters (max: $max_size)"
369
-
370
- if [[ "$comment_size" -gt "$max_size" ]]; then
371
- log_warning "Comment exceeds GitHub size limit ($comment_size > $max_size)"
372
-
373
- # Truncate comment
374
- local truncated_file="$temp_dir/truncated-comment.md"
375
- head -c 65000 "$formatted_comment" > "$truncated_file"
376
-
377
- # Add truncation notice
378
- cat >> "$truncated_file" << EOF
379
-
380
- ---
381
- ⚠️ **Comment truncated due to size limit**
382
-
383
- The full update is available in your local files at:
384
- \`.claude/epics/*/updates/$ISSUE_NUMBER/\`
385
- EOF
386
-
387
- # Replace with truncated version
388
- mv "$truncated_file" "$formatted_comment"
389
-
390
- log_info "Comment truncated to fit GitHub limits"
391
- else
392
- log_debug "Comment size is within limits"
393
- fi
394
-
395
- log_function_exit "validate_comment_size"
396
- }
397
-
398
- # Display formatting results
399
- display_results() {
400
- print_section "✅ Comment Formatting Results"
401
-
402
- echo "Issue: #$ISSUE_NUMBER"
403
- echo "Comment Type: $([[ "$IS_COMPLETION" == "true" ]] && echo "Completion" || echo "Progress Update")"
404
-
405
- # Show comment preview (first 5 lines)
406
- echo ""
407
- echo "Comment Preview:"
408
- head -5 "$formatted_comment" | sed 's/^/ /'
409
- echo " ..."
410
-
411
- # Show size info
412
- local comment_size
413
- comment_size=$(wc -c < "$formatted_comment")
414
- echo ""
415
- echo "Comment Size: $comment_size characters"
416
-
417
- if [[ "$comment_size" -gt 65536 ]]; then
418
- echo "⚠️ Comment was truncated to fit GitHub limits"
419
- fi
420
-
421
- echo ""
422
- echo "✅ Comment formatted successfully"
423
- echo "📄 Formatted comment: $formatted_comment"
424
- }
425
-
426
- # Error handling
427
- handle_error() {
428
- local exit_code=$?
429
- log_error "Comment formatting failed with exit code: $exit_code"
430
- log_error "Failed to format comment for issue: #$ISSUE_NUMBER"
431
- exit "$exit_code"
432
- }
433
-
434
- # Set up error handling
435
- trap handle_error ERR
436
-
437
- # Validate arguments
438
- if [[ $# -lt 3 ]]; then
439
- echo "Usage: $0 <issue_number> <updates_file> <progress_file> [is_completion]"
440
- echo ""
441
- echo "Formats consolidated updates into a GitHub issue comment."
442
- echo ""
443
- echo "Arguments:"
444
- echo " issue_number GitHub issue number"
445
- echo " updates_file Path to consolidated updates file"
446
- echo " progress_file Path to progress.md file"
447
- echo " is_completion Optional: 'true' if task is complete (default: false)"
448
- echo ""
449
- echo "The script will format either:"
450
- echo " - Progress update comment (default)"
451
- echo " - Completion comment (if is_completion=true)"
452
- echo ""
453
- echo "GitHub comment size limits:"
454
- echo " - Maximum: 65,536 characters"
455
- echo " - Comments will be truncated if necessary"
456
- echo ""
457
- echo "Examples:"
458
- echo " $0 123 /tmp/updates.md .claude/epics/auth/updates/123/progress.md"
459
- echo " $0 456 /tmp/updates.md ./progress.md true"
460
- echo ""
461
- echo "Output:"
462
- echo " Prints path to formatted comment file on stdout"
463
- echo ""
464
- exit 1
465
- fi
466
-
467
- # Run main function
468
- main "$@"