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,460 +0,0 @@
1
- #!/bin/bash
2
- # Gather Updates Script for Issue Sync
3
- # Collects all local development updates for GitHub synchronization
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/validation-utils.sh"
12
- source "${SCRIPT_DIR}/../../lib/datetime-utils.sh"
13
-
14
- # Script configuration
15
- readonly ISSUE_NUMBER="${1:-}"
16
- readonly UPDATES_DIR="${2:-}"
17
- readonly LAST_SYNC="${3:-}"
18
-
19
- # Global variables
20
- declare -g temp_dir=""
21
- declare -g gathered_updates=""
22
-
23
- # Main function
24
- main() {
25
- print_banner "Issue Updates Gatherer" "1.0.0"
26
-
27
- # Validate inputs
28
- log_info "Gathering updates for issue #$ISSUE_NUMBER"
29
- validate_inputs || exit 1
30
-
31
- # Setup workspace
32
- setup_workspace
33
-
34
- # Gather all types of updates
35
- with_error_handling "Gather progress updates" \
36
- gather_progress_updates
37
-
38
- with_error_handling "Gather technical notes" \
39
- gather_technical_notes
40
-
41
- with_error_handling "Gather commit references" \
42
- gather_commit_references
43
-
44
- with_error_handling "Gather acceptance criteria updates" \
45
- gather_acceptance_criteria
46
-
47
- with_error_handling "Gather next steps and blockers" \
48
- gather_next_steps_and_blockers
49
-
50
- # Consolidate all updates
51
- with_error_handling "Consolidate updates" \
52
- consolidate_updates
53
-
54
- # Output results
55
- display_results
56
-
57
- # Return path to consolidated updates file
58
- echo "$gathered_updates"
59
- }
60
-
61
- # Validate script inputs
62
- validate_inputs() {
63
- log_function_entry "validate_inputs"
64
-
65
- validate_issue_number "$ISSUE_NUMBER" || return 1
66
- validate_directory_exists "$UPDATES_DIR" "Updates directory" || return 1
67
-
68
- log_function_exit "validate_inputs"
69
- return 0
70
- }
71
-
72
- # Setup temporary workspace
73
- setup_workspace() {
74
- log_function_entry "setup_workspace"
75
-
76
- temp_dir="/tmp/gather-updates-$$"
77
- gathered_updates="$temp_dir/consolidated-updates.md"
78
-
79
- log_info "Creating workspace: $temp_dir"
80
- mkdir -p "$temp_dir"
81
-
82
- # Cleanup on exit
83
- trap "cleanup_workspace" EXIT
84
-
85
- log_function_exit "setup_workspace"
86
- }
87
-
88
- # Cleanup workspace
89
- cleanup_workspace() {
90
- if [[ -n "$temp_dir" ]] && [[ -d "$temp_dir" ]]; then
91
- log_debug "Cleaning up workspace: $temp_dir"
92
- # Don't remove - calling script needs the results
93
- # rm -rf "$temp_dir"
94
- fi
95
- }
96
-
97
- # Gather progress updates from progress.md
98
- gather_progress_updates() {
99
- log_function_entry "gather_progress_updates"
100
-
101
- local progress_file="$UPDATES_DIR/progress.md"
102
- local progress_output="$temp_dir/progress-updates.md"
103
-
104
- if [[ ! -f "$progress_file" ]]; then
105
- log_warning "Progress file not found: $progress_file"
106
- echo "No progress updates available" > "$progress_output"
107
- log_function_exit "gather_progress_updates"
108
- return 0
109
- fi
110
-
111
- log_info "Processing progress file: $progress_file"
112
-
113
- # Extract content since last sync
114
- if [[ -n "$LAST_SYNC" ]]; then
115
- extract_content_since_sync "$progress_file" "$progress_output" "$LAST_SYNC"
116
- else
117
- # No previous sync - get all content except frontmatter
118
- strip_frontmatter "$progress_file" "$progress_output"
119
- fi
120
-
121
- # Get completion percentage
122
- local completion
123
- completion=$(get_frontmatter_field "$progress_file" "completion" 2>/dev/null || echo "0%")
124
-
125
- # Add completion info to progress updates
126
- cat >> "$progress_output" << EOF
127
-
128
- **Current Progress:** $completion
129
- EOF
130
-
131
- log_success "Progress updates gathered"
132
- log_function_exit "gather_progress_updates"
133
- }
134
-
135
- # Gather technical notes
136
- gather_technical_notes() {
137
- log_function_entry "gather_technical_notes"
138
-
139
- local notes_file="$UPDATES_DIR/notes.md"
140
- local notes_output="$temp_dir/technical-notes.md"
141
-
142
- if [[ ! -f "$notes_file" ]]; then
143
- log_debug "Notes file not found: $notes_file"
144
- echo "No technical notes available" > "$notes_output"
145
- log_function_exit "gather_technical_notes"
146
- return 0
147
- fi
148
-
149
- log_info "Processing notes file: $notes_file"
150
-
151
- # Extract content since last sync
152
- if [[ -n "$LAST_SYNC" ]]; then
153
- extract_content_since_sync "$notes_file" "$notes_output" "$LAST_SYNC"
154
- else
155
- strip_frontmatter "$notes_file" "$notes_output"
156
- fi
157
-
158
- log_success "Technical notes gathered"
159
- log_function_exit "gather_technical_notes"
160
- }
161
-
162
- # Gather commit references
163
- gather_commit_references() {
164
- log_function_entry "gather_commit_references"
165
-
166
- local commits_file="$UPDATES_DIR/commits.md"
167
- local commits_output="$temp_dir/commit-references.md"
168
-
169
- if [[ ! -f "$commits_file" ]]; then
170
- log_debug "Commits file not found: $commits_file"
171
-
172
- # Try to gather recent commits automatically
173
- gather_recent_commits_automatically "$commits_output"
174
- else
175
- log_info "Processing commits file: $commits_file"
176
-
177
- # Extract content since last sync
178
- if [[ -n "$LAST_SYNC" ]]; then
179
- extract_content_since_sync "$commits_file" "$commits_output" "$LAST_SYNC"
180
- else
181
- strip_frontmatter "$commits_file" "$commits_output"
182
- fi
183
- fi
184
-
185
- log_success "Commit references gathered"
186
- log_function_exit "gather_commit_references"
187
- }
188
-
189
- # Automatically gather recent commits
190
- gather_recent_commits_automatically() {
191
- local output_file="$1"
192
-
193
- log_function_entry "gather_recent_commits_automatically"
194
-
195
- # Get recent commits (last 24 hours or since last sync)
196
- local since_date
197
- if [[ -n "$LAST_SYNC" ]]; then
198
- since_date="$LAST_SYNC"
199
- else
200
- since_date=$(date -u -d "24 hours ago" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null ||
201
- date -u -v-24H +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null ||
202
- echo "")
203
- fi
204
-
205
- local commits_found=false
206
-
207
- if [[ -n "$since_date" ]] && command -v git >/dev/null 2>&1; then
208
- log_debug "Looking for commits since: $since_date"
209
-
210
- local commit_list
211
- if commit_list=$(git log --since="$since_date" --oneline --no-merges 2>/dev/null); then
212
- if [[ -n "$commit_list" ]]; then
213
- echo "**Recent Commits:**" > "$output_file"
214
- echo "$commit_list" | while read -r commit; do
215
- echo "- $commit"
216
- done >> "$output_file"
217
- commits_found=true
218
- log_debug "Found recent commits automatically"
219
- fi
220
- fi
221
- fi
222
-
223
- if [[ "$commits_found" != "true" ]]; then
224
- echo "No recent commits found" > "$output_file"
225
- log_debug "No recent commits found"
226
- fi
227
-
228
- log_function_exit "gather_recent_commits_automatically"
229
- }
230
-
231
- # Gather acceptance criteria updates
232
- gather_acceptance_criteria() {
233
- log_function_entry "gather_acceptance_criteria"
234
-
235
- local criteria_file="$UPDATES_DIR/acceptance-criteria.md"
236
- local criteria_output="$temp_dir/acceptance-criteria.md"
237
-
238
- if [[ ! -f "$criteria_file" ]]; then
239
- log_debug "Acceptance criteria file not found: $criteria_file"
240
- echo "No acceptance criteria updates available" > "$criteria_output"
241
- log_function_exit "gather_acceptance_criteria"
242
- return 0
243
- fi
244
-
245
- log_info "Processing acceptance criteria file: $criteria_file"
246
-
247
- # Extract content since last sync
248
- if [[ -n "$LAST_SYNC" ]]; then
249
- extract_content_since_sync "$criteria_file" "$criteria_output" "$LAST_SYNC"
250
- else
251
- strip_frontmatter "$criteria_file" "$criteria_output"
252
- fi
253
-
254
- log_success "Acceptance criteria gathered"
255
- log_function_exit "gather_acceptance_criteria"
256
- }
257
-
258
- # Gather next steps and blockers
259
- gather_next_steps_and_blockers() {
260
- log_function_entry "gather_next_steps_and_blockers"
261
-
262
- local next_steps_output="$temp_dir/next-steps.md"
263
- local blockers_output="$temp_dir/blockers.md"
264
-
265
- # Check for dedicated files
266
- local next_steps_file="$UPDATES_DIR/next-steps.md"
267
- local blockers_file="$UPDATES_DIR/blockers.md"
268
-
269
- # Gather next steps
270
- if [[ -f "$next_steps_file" ]]; then
271
- log_info "Processing next steps file: $next_steps_file"
272
- if [[ -n "$LAST_SYNC" ]]; then
273
- extract_content_since_sync "$next_steps_file" "$next_steps_output" "$LAST_SYNC"
274
- else
275
- strip_frontmatter "$next_steps_file" "$next_steps_output"
276
- fi
277
- else
278
- echo "No specific next steps documented" > "$next_steps_output"
279
- fi
280
-
281
- # Gather blockers
282
- if [[ -f "$blockers_file" ]]; then
283
- log_info "Processing blockers file: $blockers_file"
284
- if [[ -n "$LAST_SYNC" ]]; then
285
- extract_content_since_sync "$blockers_file" "$blockers_output" "$LAST_SYNC"
286
- else
287
- strip_frontmatter "$blockers_file" "$blockers_output"
288
- fi
289
- else
290
- echo "No current blockers reported" > "$blockers_output"
291
- fi
292
-
293
- log_success "Next steps and blockers gathered"
294
- log_function_exit "gather_next_steps_and_blockers"
295
- }
296
-
297
- # Extract content from file since last sync timestamp
298
- extract_content_since_sync() {
299
- local input_file="$1"
300
- local output_file="$2"
301
- local last_sync="$3"
302
-
303
- log_function_entry "extract_content_since_sync" "$(basename "$input_file")" "$last_sync"
304
-
305
- # For now, extract all content (incremental extraction is complex)
306
- # TODO: Implement proper incremental extraction with sync markers
307
- strip_frontmatter "$input_file" "$output_file"
308
-
309
- # Add note about sync timing
310
- if [[ -s "$output_file" ]]; then
311
- echo "" >> "$output_file"
312
- echo "*Updates since last sync at $last_sync*" >> "$output_file"
313
- else
314
- echo "No updates since last sync at $last_sync" > "$output_file"
315
- fi
316
-
317
- log_function_exit "extract_content_since_sync"
318
- }
319
-
320
- # Consolidate all gathered updates into single file
321
- consolidate_updates() {
322
- log_function_entry "consolidate_updates"
323
-
324
- log_info "Consolidating all gathered updates"
325
-
326
- cat > "$gathered_updates" << EOF
327
- # Consolidated Updates for Issue #${ISSUE_NUMBER}
328
-
329
- *Gathered at: $(get_current_datetime)*
330
-
331
- EOF
332
-
333
- # Add each section if it has meaningful content
334
- add_section_if_content "Progress Updates" "$temp_dir/progress-updates.md"
335
- add_section_if_content "Technical Notes" "$temp_dir/technical-notes.md"
336
- add_section_if_content "Recent Commits" "$temp_dir/commit-references.md"
337
- add_section_if_content "Acceptance Criteria" "$temp_dir/acceptance-criteria.md"
338
- add_section_if_content "Next Steps" "$temp_dir/next-steps.md"
339
- add_section_if_content "Blockers" "$temp_dir/blockers.md"
340
-
341
- # Add any additional update files found in the directory
342
- for update_file in "$UPDATES_DIR"/*.md; do
343
- [[ -f "$update_file" ]] || continue
344
-
345
- local basename_file
346
- basename_file=$(basename "$update_file" .md)
347
-
348
- # Skip already processed files
349
- case "$basename_file" in
350
- progress|notes|commits|acceptance-criteria|next-steps|blockers)
351
- continue
352
- ;;
353
- *)
354
- log_debug "Found additional update file: $basename_file"
355
- add_section_if_content "$(echo "$basename_file" | tr '-' ' ' | sed 's/\b\w/\u&/g')" "$update_file"
356
- ;;
357
- esac
358
- done
359
-
360
- log_success "Updates consolidated into: $gathered_updates"
361
- log_function_exit "consolidate_updates"
362
- }
363
-
364
- # Add section to consolidated file if it has meaningful content
365
- add_section_if_content() {
366
- local section_title="$1"
367
- local section_file="$2"
368
-
369
- if [[ ! -f "$section_file" ]]; then
370
- return 0
371
- fi
372
-
373
- # Check if file has meaningful content (more than just "No ... available")
374
- local content
375
- content=$(cat "$section_file")
376
-
377
- if [[ -n "$content" ]] && [[ ! "$content" =~ ^[[:space:]]*No.*available[[:space:]]*$ ]]; then
378
- cat >> "$gathered_updates" << EOF
379
-
380
- ## $section_title
381
-
382
- $content
383
-
384
- EOF
385
- log_debug "Added section: $section_title"
386
- else
387
- log_debug "Skipped empty section: $section_title"
388
- fi
389
- }
390
-
391
- # Display gathering results
392
- display_results() {
393
- print_section "✅ Updates Gathering Results"
394
-
395
- echo "Issue: #$ISSUE_NUMBER"
396
- echo "Updates Directory: $UPDATES_DIR"
397
- echo "Last Sync: ${LAST_SYNC:-Never}"
398
-
399
- # Show gathered file size
400
- local file_size
401
- if [[ -f "$gathered_updates" ]]; then
402
- file_size=$(wc -c < "$gathered_updates")
403
- echo "Consolidated Updates: $file_size characters"
404
- fi
405
-
406
- # Show sections found
407
- echo ""
408
- echo "Sections gathered:"
409
- if [[ -f "$gathered_updates" ]]; then
410
- grep "^## " "$gathered_updates" | sed 's/^## / - /' || echo " - No sections found"
411
- fi
412
-
413
- echo ""
414
- echo "✅ All updates gathered successfully"
415
- echo "📄 Consolidated file: $gathered_updates"
416
- }
417
-
418
- # Error handling
419
- handle_error() {
420
- local exit_code=$?
421
- log_error "Updates gathering failed with exit code: $exit_code"
422
- log_error "Failed to gather updates for issue: #$ISSUE_NUMBER"
423
- exit "$exit_code"
424
- }
425
-
426
- # Set up error handling
427
- trap handle_error ERR
428
-
429
- # Validate arguments
430
- if [[ $# -lt 2 ]]; then
431
- echo "Usage: $0 <issue_number> <updates_directory> [last_sync_timestamp]"
432
- echo ""
433
- echo "Gathers all local development updates for GitHub synchronization."
434
- echo ""
435
- echo "Arguments:"
436
- echo " issue_number GitHub issue number"
437
- echo " updates_directory Path to local updates directory"
438
- echo " last_sync_timestamp Optional timestamp of last sync (ISO 8601)"
439
- echo ""
440
- echo "The script will gather updates from:"
441
- echo " - progress.md Development progress and completion status"
442
- echo " - notes.md Technical notes and decisions"
443
- echo " - commits.md Commit references (or auto-gather recent commits)"
444
- echo " - acceptance-criteria.md Acceptance criteria updates"
445
- echo " - next-steps.md Planned next actions"
446
- echo " - blockers.md Current blockers and impediments"
447
- echo " - *.md Any other markdown files in updates directory"
448
- echo ""
449
- echo "Examples:"
450
- echo " $0 123 .claude/epics/auth/updates/123"
451
- echo " $0 456 .claude/epics/dashboard/updates/456 2024-01-15T10:30:00Z"
452
- echo ""
453
- echo "Output:"
454
- echo " Prints path to consolidated updates file on stdout"
455
- echo ""
456
- exit 1
457
- fi
458
-
459
- # Run main function
460
- main "$@"