claude-autopm 1.20.1 → 1.22.0

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 (141) hide show
  1. package/README.md +255 -878
  2. package/autopm/.claude/agents/cloud/gcp-cloud-functions-engineer.md +5 -10
  3. package/autopm/.claude/agents/cloud/gemini-api-expert.md +1 -1
  4. package/autopm/.claude/agents/cloud/openai-python-expert.md +1 -1
  5. package/autopm/.claude/agents/cloud/terraform-infrastructure-expert.md +7 -11
  6. package/autopm/.claude/agents/core/mcp-manager.md +7 -0
  7. package/autopm/.claude/agents/data/airflow-orchestration-expert.md +1 -1
  8. package/autopm/.claude/agents/data/kedro-pipeline-expert.md +1 -1
  9. package/autopm/.claude/agents/data/langgraph-workflow-expert.md +1 -1
  10. package/autopm/.claude/agents/databases/bigquery-expert.md +1 -1
  11. package/autopm/.claude/agents/databases/cosmosdb-expert.md +1 -1
  12. package/autopm/.claude/agents/databases/mongodb-expert.md +1 -1
  13. package/autopm/.claude/agents/databases/postgresql-expert.md +1 -1
  14. package/autopm/.claude/agents/databases/redis-expert.md +1 -1
  15. package/autopm/.claude/agents/decision-matrices/playwright-testing-selection.md +6 -0
  16. package/autopm/.claude/agents/decision-matrices/python-backend-selection.md +7 -0
  17. package/autopm/.claude/agents/decision-matrices/ui-framework-selection.md +7 -0
  18. package/autopm/.claude/agents/devops/azure-devops-specialist.md +1 -1
  19. package/autopm/.claude/agents/devops/github-operations-specialist.md +7 -0
  20. package/autopm/.claude/agents/devops/mcp-context-manager.md +7 -0
  21. package/autopm/.claude/agents/devops/ssh-operations-expert.md +1 -1
  22. package/autopm/.claude/agents/devops/traefik-proxy-expert.md +1 -1
  23. package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +1 -1
  24. package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +1 -1
  25. package/autopm/.claude/agents/languages/bash-scripting-expert.md +1 -1
  26. package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +1 -1
  27. package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +3 -7
  28. package/autopm/.claude/agents/languages/python-backend-engineer.md +1 -1
  29. package/autopm/.claude/commands/ai/langgraph-workflow.md +17 -0
  30. package/autopm/.claude/commands/ai/openai-chat.md +17 -0
  31. package/autopm/.claude/commands/azure/active-work.md +17 -0
  32. package/autopm/.claude/commands/azure/aliases.md +17 -0
  33. package/autopm/.claude/commands/azure/blocked-items.md +17 -0
  34. package/autopm/.claude/commands/azure/clean.md +17 -0
  35. package/autopm/.claude/commands/azure/docs-query.md +17 -0
  36. package/autopm/.claude/commands/azure/feature-decompose.md +17 -0
  37. package/autopm/.claude/commands/azure/feature-list.md +17 -0
  38. package/autopm/.claude/commands/azure/feature-new.md +17 -0
  39. package/autopm/.claude/commands/azure/feature-show.md +17 -0
  40. package/autopm/.claude/commands/azure/feature-start.md +17 -0
  41. package/autopm/.claude/commands/azure/fix-integration-example.md +17 -0
  42. package/autopm/.claude/commands/azure/help.md +17 -0
  43. package/autopm/.claude/commands/azure/import-us.md +17 -0
  44. package/autopm/.claude/commands/azure/init.md +17 -0
  45. package/autopm/.claude/commands/azure/next-task.md +17 -0
  46. package/autopm/.claude/commands/azure/search.md +17 -0
  47. package/autopm/.claude/commands/azure/sprint-status.md +17 -0
  48. package/autopm/.claude/commands/azure/standup.md +17 -0
  49. package/autopm/.claude/commands/azure/sync-all.md +17 -0
  50. package/autopm/.claude/commands/azure/task-analyze.md +17 -0
  51. package/autopm/.claude/commands/azure/task-close.md +17 -0
  52. package/autopm/.claude/commands/azure/task-edit.md +17 -0
  53. package/autopm/.claude/commands/azure/task-list.md +17 -0
  54. package/autopm/.claude/commands/azure/task-new.md +17 -0
  55. package/autopm/.claude/commands/azure/task-reopen.md +17 -0
  56. package/autopm/.claude/commands/azure/task-show.md +17 -0
  57. package/autopm/.claude/commands/azure/task-start.md +17 -0
  58. package/autopm/.claude/commands/azure/task-status.md +17 -0
  59. package/autopm/.claude/commands/azure/task-sync.md +17 -0
  60. package/autopm/.claude/commands/azure/us-edit.md +17 -0
  61. package/autopm/.claude/commands/azure/us-list.md +17 -0
  62. package/autopm/.claude/commands/azure/us-new.md +17 -0
  63. package/autopm/.claude/commands/azure/us-parse.md +17 -0
  64. package/autopm/.claude/commands/azure/us-show.md +17 -0
  65. package/autopm/.claude/commands/azure/us-status.md +17 -0
  66. package/autopm/.claude/commands/azure/validate.md +17 -0
  67. package/autopm/.claude/commands/azure/work-item-sync.md +17 -0
  68. package/autopm/.claude/commands/cloud/infra-deploy.md +17 -0
  69. package/autopm/.claude/commands/config/toggle-features.md +15 -0
  70. package/autopm/.claude/commands/context/create.md +16 -0
  71. package/autopm/.claude/commands/context/prime.md +16 -0
  72. package/autopm/.claude/commands/context/update.md +16 -0
  73. package/autopm/.claude/commands/github/workflow-create.md +17 -0
  74. package/autopm/.claude/commands/infrastructure/ssh-security.md +17 -0
  75. package/autopm/.claude/commands/infrastructure/traefik-setup.md +17 -0
  76. package/autopm/.claude/commands/kubernetes/deploy.md +16 -0
  77. package/autopm/.claude/commands/mcp/context-setup.md +17 -0
  78. package/autopm/.claude/commands/mcp/docs-refresh.md +17 -0
  79. package/autopm/.claude/commands/playwright/test-scaffold.md +17 -0
  80. package/autopm/.claude/commands/pm/blocked.md +17 -0
  81. package/autopm/.claude/commands/pm/clean.md +17 -0
  82. package/autopm/.claude/commands/pm/context.md +17 -0
  83. package/autopm/.claude/commands/pm/epic-close.md +17 -0
  84. package/autopm/.claude/commands/pm/epic-decompose.md +16 -0
  85. package/autopm/.claude/commands/pm/epic-edit.md +17 -0
  86. package/autopm/.claude/commands/pm/epic-list.md +17 -0
  87. package/autopm/.claude/commands/pm/epic-merge.md +17 -0
  88. package/autopm/.claude/commands/pm/epic-oneshot.md +17 -0
  89. package/autopm/.claude/commands/pm/epic-refresh.md +17 -0
  90. package/autopm/.claude/commands/pm/epic-show.md +17 -0
  91. package/autopm/.claude/commands/pm/epic-split.md +17 -0
  92. package/autopm/.claude/commands/pm/epic-start.md +17 -0
  93. package/autopm/.claude/commands/pm/epic-status.md +17 -0
  94. package/autopm/.claude/commands/pm/epic-sync-modular.md +17 -0
  95. package/autopm/.claude/commands/pm/epic-sync-original.md +17 -0
  96. package/autopm/.claude/commands/pm/epic-sync.md +54 -4
  97. package/autopm/.claude/commands/pm/help.md +17 -0
  98. package/autopm/.claude/commands/pm/import.md +17 -0
  99. package/autopm/.claude/commands/pm/in-progress.md +17 -0
  100. package/autopm/.claude/commands/pm/init.md +17 -0
  101. package/autopm/.claude/commands/pm/issue-analyze.md +17 -0
  102. package/autopm/.claude/commands/pm/issue-close.md +17 -0
  103. package/autopm/.claude/commands/pm/issue-edit.md +17 -0
  104. package/autopm/.claude/commands/pm/issue-reopen.md +17 -0
  105. package/autopm/.claude/commands/pm/issue-show.md +17 -0
  106. package/autopm/.claude/commands/pm/issue-start.md +16 -0
  107. package/autopm/.claude/commands/pm/issue-status.md +17 -0
  108. package/autopm/.claude/commands/pm/issue-sync.md +17 -0
  109. package/autopm/.claude/commands/pm/next.md +17 -0
  110. package/autopm/.claude/commands/pm/prd-edit.md +17 -0
  111. package/autopm/.claude/commands/pm/prd-list.md +17 -0
  112. package/autopm/.claude/commands/pm/prd-new.md +16 -0
  113. package/autopm/.claude/commands/pm/prd-parse.md +17 -0
  114. package/autopm/.claude/commands/pm/prd-status.md +17 -0
  115. package/autopm/.claude/commands/pm/search.md +17 -0
  116. package/autopm/.claude/commands/pm/standup.md +17 -0
  117. package/autopm/.claude/commands/pm/status.md +17 -0
  118. package/autopm/.claude/commands/pm/sync.md +17 -0
  119. package/autopm/.claude/commands/pm/test-reference-update.md +17 -0
  120. package/autopm/.claude/commands/pm/validate.md +17 -0
  121. package/autopm/.claude/commands/pm/what-next.md +17 -0
  122. package/autopm/.claude/commands/python/api-scaffold.md +17 -0
  123. package/autopm/.claude/commands/python/docs-query.md +17 -0
  124. package/autopm/.claude/commands/react/app-scaffold.md +17 -0
  125. package/autopm/.claude/commands/testing/prime.md +17 -0
  126. package/autopm/.claude/commands/testing/run.md +17 -0
  127. package/autopm/.claude/commands/ui/bootstrap-scaffold.md +17 -0
  128. package/autopm/.claude/commands/ui/tailwind-system.md +17 -0
  129. package/autopm/.claude/hooks/pre-agent-context7.js +224 -0
  130. package/autopm/.claude/hooks/pre-command-context7.js +229 -0
  131. package/autopm/.claude/rules/context7-enforcement.md +292 -0
  132. package/autopm/.claude/rules/framework-path-rules.md +180 -0
  133. package/autopm/.claude/scripts/pm/epic-sync/README.md +208 -0
  134. package/autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh +68 -192
  135. package/autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh +60 -328
  136. package/autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh +61 -354
  137. package/autopm/.claude/scripts/pm/epic-sync/update-references.sh +67 -305
  138. package/autopm/.claude/scripts/pm/epic-sync.sh +137 -0
  139. package/package.json +4 -2
  140. package/scripts/add-context7-to-commands.js +351 -0
  141. package/scripts/validate-framework-paths.sh +104 -0
@@ -1,354 +1,86 @@
1
1
  #!/bin/bash
2
- # Create Task Issues Script
3
- # Creates GitHub issues for all tasks in an epic with parallel execution support
2
+ # Create Task Issues
3
+ # Creates GitHub issues for all tasks and generates mapping file
4
4
 
5
5
  set -euo pipefail
6
6
 
7
- # Load libraries
8
7
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9
- source "${SCRIPT_DIR}/../../lib/logging-utils.sh"
10
- source "${SCRIPT_DIR}/../../lib/github-utils.sh"
11
- source "${SCRIPT_DIR}/../../lib/frontmatter-utils.sh"
12
- source "${SCRIPT_DIR}/../../lib/validation-utils.sh"
8
+ EPIC_NAME="${1:-}"
9
+ EPIC_NUMBER="${2:-}"
13
10
 
14
- # Script configuration
15
- readonly EPIC_NAME="${1:-}"
16
- readonly EPIC_NUMBER="${2:-}"
17
- readonly PARALLEL_THRESHOLD="${AUTOPM_PARALLEL_THRESHOLD:-5}"
18
-
19
- # Global variables
20
- declare -g use_subissues=false
21
- declare -g temp_dir=""
22
- declare -g mapping_file=""
23
-
24
- # Main function
25
- main() {
26
- print_banner "Task Issues Creator" "1.0.0"
27
-
28
- # Validate inputs
29
- log_info "Validating inputs: epic=$EPIC_NAME, epic_number=$EPIC_NUMBER"
30
- validate_inputs || exit 1
31
-
32
- # Setup workspace
33
- setup_workspace
34
-
35
- # Check GitHub capabilities
36
- check_github_capabilities
37
-
38
- # Get task files and determine strategy
39
- local task_files
40
- readarray -t task_files < <(find ".claude/epics/$EPIC_NAME" -name '[0-9][0-9][0-9].md' -type f | sort)
41
- local task_count=${#task_files[@]}
42
-
43
- log_info "Found $task_count task files"
44
-
45
- if [[ $task_count -eq 0 ]]; then
46
- log_error "No task files found in epic directory"
47
- echo "❌ No tasks to sync. Run: /pm:epic-decompose $EPIC_NAME"
48
- exit 1
49
- fi
50
-
51
- # Create issues based on count
52
- if [[ $task_count -lt $PARALLEL_THRESHOLD ]]; then
53
- log_info "Using sequential creation for $task_count tasks"
54
- create_tasks_sequential "${task_files[@]}"
55
- else
56
- log_info "Using parallel creation for $task_count tasks"
57
- create_tasks_parallel "${task_files[@]}"
58
- fi
59
-
60
- # Output results
61
- display_results "$task_count"
62
-
63
- # Return mapping file path for further processing
64
- echo "$mapping_file"
65
- }
66
-
67
- # Validate script inputs
68
- validate_inputs() {
69
- log_function_entry "validate_inputs"
70
-
71
- validate_epic_name "$EPIC_NAME" || return 1
72
- validate_issue_number "$EPIC_NUMBER" || return 1
73
- validate_epic_structure "$EPIC_NAME" || return 1
74
- validate_github_auth || return 1
75
-
76
- log_function_exit "validate_inputs"
77
- return 0
78
- }
79
-
80
- # Setup temporary workspace
81
- setup_workspace() {
82
- log_function_entry "setup_workspace"
83
-
84
- temp_dir="/tmp/task-issues-$$"
85
- mapping_file="$temp_dir/task-mapping.txt"
86
-
87
- log_info "Creating workspace: $temp_dir"
88
- mkdir -p "$temp_dir"
89
-
90
- # Initialize mapping file
91
- > "$mapping_file"
92
-
93
- # Cleanup on exit
94
- trap "cleanup_workspace" EXIT
95
-
96
- log_function_exit "setup_workspace"
97
- }
98
-
99
- # Cleanup workspace
100
- cleanup_workspace() {
101
- if [[ -n "$temp_dir" ]] && [[ -d "$temp_dir" ]]; then
102
- log_debug "Cleaning up workspace: $temp_dir"
103
- rm -rf "$temp_dir"
104
- fi
105
- }
106
-
107
- # Check GitHub capabilities (sub-issues extension)
108
- check_github_capabilities() {
109
- log_function_entry "check_github_capabilities"
110
-
111
- if gh extension list | grep -q "yahsan2/gh-sub-issue"; then
112
- use_subissues=true
113
- log_info "gh-sub-issue extension detected - using sub-issues"
114
- else
115
- use_subissues=false
116
- log_warning "gh-sub-issue extension not available - using regular issues"
117
- fi
118
-
119
- log_function_exit "check_github_capabilities"
120
- }
121
-
122
- # Create tasks sequentially (for small batches)
123
- create_tasks_sequential() {
124
- local task_files=("$@")
125
-
126
- log_function_entry "create_tasks_sequential" "${#task_files[@]} tasks"
127
-
128
- local labels="task,epic:$EPIC_NAME"
129
- local processed=0
130
-
131
- for task_file in "${task_files[@]}"; do
132
- [[ -f "$task_file" ]] || continue
133
-
134
- log_info "Processing task file: $(basename "$task_file")"
135
-
136
- # Extract task name from frontmatter
137
- local task_name
138
- task_name=$(get_frontmatter_field "$task_file" "name")
139
-
140
- if [[ -z "$task_name" ]]; then
141
- log_error "No task name found in $task_file"
142
- continue
143
- fi
144
-
145
- # Strip frontmatter for issue body
146
- local task_body_file="$temp_dir/task-body-$(basename "$task_file")"
147
- strip_frontmatter "$task_file" "$task_body_file"
148
-
149
- # Create issue
150
- local task_number
151
- if [[ "$use_subissues" == "true" ]]; then
152
- task_number=$(create_github_subissue "$EPIC_NUMBER" "$task_name" "$task_body_file" "$labels")
153
- else
154
- task_number=$(create_github_issue "$task_name" "$task_body_file" "$labels")
155
- fi
11
+ if [[ -z "$EPIC_NAME" ]] || [[ -z "$EPIC_NUMBER" ]]; then
12
+ echo "❌ Error: Epic name and epic number required"
13
+ echo "Usage: $0 <epic_name> <epic_number>"
14
+ exit 1
15
+ fi
156
16
 
157
- if [[ -n "$task_number" ]]; then
158
- # Record mapping
159
- echo "$task_file:$task_number" >> "$mapping_file"
160
- processed=$((processed + 1))
161
- log_success "Created task issue #$task_number: $task_name"
162
- else
163
- log_error "Failed to create issue for $task_file"
164
- fi
165
- done
17
+ EPIC_DIR=".claude/epics/$EPIC_NAME"
166
18
 
167
- log_info "Sequential creation completed: $processed/$# tasks created"
168
- log_function_exit "create_tasks_sequential"
169
- }
19
+ if [[ ! -d "$EPIC_DIR" ]]; then
20
+ echo "❌ Error: Epic directory not found: $EPIC_DIR"
21
+ exit 1
22
+ fi
170
23
 
171
- # Create tasks in parallel (for large batches)
172
- create_tasks_parallel() {
173
- local task_files=("$@")
24
+ # Mapping file - PERSISTENT location (not in /tmp)
25
+ MAPPING_FILE="$EPIC_DIR/.task-mapping.txt"
26
+ > "$MAPPING_FILE" # Clear/create file
174
27
 
175
- log_function_entry "create_tasks_parallel" "${#task_files[@]} tasks"
28
+ echo "📋 Creating task issues for epic #$EPIC_NUMBER"
176
29
 
177
- local batch_size=4
178
- local batches=()
179
- local batch_count=0
30
+ # Find all task files (sequential numbered files)
31
+ task_files=$(find "$EPIC_DIR" -name "[0-9]*.md" -type f | sort)
180
32
 
181
- # Split tasks into batches
182
- for ((i=0; i<${#task_files[@]}; i+=batch_size)); do
183
- local batch=("${task_files[@]:$i:$batch_size}")
184
- batches+=("$(printf '%s\n' "${batch[@]}")")
185
- batch_count=$((batch_count + 1))
186
- done
33
+ if [[ -z "$task_files" ]]; then
34
+ echo "❌ Error: No task files found in $EPIC_DIR"
35
+ exit 1
36
+ fi
187
37
 
188
- log_info "Split into $batch_count batches of up to $batch_size tasks each"
38
+ task_count=$(echo "$task_files" | wc -l)
39
+ echo " Found $task_count tasks to create"
189
40
 
190
- # Process batches in parallel using background jobs
191
- local pids=()
192
- local batch_mapping_files=()
41
+ current=0
193
42
 
194
- for ((b=0; b<batch_count; b++)); do
195
- local batch_mapping="$temp_dir/batch-$b-mapping.txt"
196
- batch_mapping_files+=("$batch_mapping")
43
+ # Create issues for each task
44
+ for task_file in $task_files; do
45
+ ((current++))
197
46
 
198
- # Create batch in background
199
- (
200
- log_info "Starting batch $((b+1))/$batch_count"
201
- process_task_batch "$b" "$batch_mapping" <<< "${batches[$b]}"
202
- ) &
47
+ task_basename=$(basename "$task_file" .md)
203
48
 
204
- pids+=($!)
205
- done
49
+ # Strip frontmatter and get content
50
+ task_content=$(awk 'BEGIN{p=0} /^---$/{p++; next} p==2{print}' "$task_file")
206
51
 
207
- # Wait for all batches to complete
208
- log_info "Waiting for $batch_count parallel batches to complete..."
209
- local failed_batches=0
52
+ # Extract title from first heading or use basename
53
+ task_title=$(echo "$task_content" | grep -m1 "^#" | sed 's/^# *//' || echo "Task $task_basename")
210
54
 
211
- for ((p=0; p<${#pids[@]}; p++)); do
212
- if wait "${pids[$p]}"; then
213
- log_success "Batch $((p+1)) completed successfully"
214
- else
215
- log_error "Batch $((p+1)) failed"
216
- failed_batches=$((failed_batches + 1))
217
- fi
218
- done
55
+ echo -n " [$current/$task_count] Creating issue for task $task_basename... "
219
56
 
220
- # Consolidate results
221
- log_info "Consolidating results from $batch_count batches"
222
- for batch_mapping in "${batch_mapping_files[@]}"; do
223
- if [[ -f "$batch_mapping" ]]; then
224
- cat "$batch_mapping" >> "$mapping_file"
225
- fi
226
- done
57
+ # Create task issue
58
+ issue_number=$(gh issue create \
59
+ --title "$task_title" \
60
+ --body "$task_content
227
61
 
228
- local total_created
229
- total_created=$(wc -l < "$mapping_file" 2>/dev/null || echo 0)
62
+ ---
63
+ **Task Information:**
64
+ - Epic: #$EPIC_NUMBER
65
+ - Original ID: $task_basename
66
+ - Created: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
67
+ " \
68
+ --label "task,epic:$EPIC_NAME" \
69
+ 2>&1 | grep -oP '(?<=#)[0-9]+' | head -1)
230
70
 
231
- if [[ $failed_batches -gt 0 ]]; then
232
- log_warning "Parallel creation completed with $failed_batches failed batches"
233
- log_warning "Created $total_created/${#task_files[@]} task issues"
71
+ if [[ -n "$issue_number" ]]; then
72
+ echo "#$issue_number "
73
+ # Save mapping: old_name -> new_number
74
+ echo "$task_basename $issue_number" >> "$MAPPING_FILE"
234
75
  else
235
- log_success "Parallel creation completed successfully"
236
- log_success "Created $total_created/${#task_files[@]} task issues"
237
- fi
238
-
239
- log_function_exit "create_tasks_parallel"
240
- }
241
-
242
- # Process a single batch of tasks
243
- process_task_batch() {
244
- local batch_number="$1"
245
- local batch_mapping_file="$2"
246
- local labels="task,epic:$EPIC_NAME"
247
-
248
- # Read task files from stdin
249
- local task_files=()
250
- while IFS= read -r task_file; do
251
- [[ -n "$task_file" ]] && task_files+=("$task_file")
252
- done
253
-
254
- log_debug "Batch $batch_number processing ${#task_files[@]} tasks"
255
-
256
- > "$batch_mapping_file" # Initialize batch mapping file
257
-
258
- for task_file in "${task_files[@]}"; do
259
- [[ -f "$task_file" ]] || continue
260
-
261
- # Extract task name
262
- local task_name
263
- task_name=$(get_frontmatter_field "$task_file" "name")
264
-
265
- if [[ -z "$task_name" ]]; then
266
- log_error "No task name in $task_file"
267
- continue
268
- fi
269
-
270
- # Strip frontmatter
271
- local task_body_file="$temp_dir/batch-$batch_number-$(basename "$task_file")"
272
- strip_frontmatter "$task_file" "$task_body_file"
273
-
274
- # Create issue
275
- local task_number
276
- if [[ "$use_subissues" == "true" ]]; then
277
- task_number=$(create_github_subissue "$EPIC_NUMBER" "$task_name" "$task_body_file" "$labels")
278
- else
279
- task_number=$(create_github_issue "$task_name" "$task_body_file" "$labels")
280
- fi
281
-
282
- if [[ -n "$task_number" ]]; then
283
- echo "$task_file:$task_number" >> "$batch_mapping_file"
284
- log_debug "Batch $batch_number: Created #$task_number for $(basename "$task_file")"
285
- else
286
- log_error "Batch $batch_number: Failed to create issue for $(basename "$task_file")"
287
- fi
288
- done
289
-
290
- log_debug "Batch $batch_number completed"
291
- }
292
-
293
- # Display creation results
294
- display_results() {
295
- local task_count="$1"
296
- local created_count
297
- created_count=$(wc -l < "$mapping_file" 2>/dev/null || echo 0)
298
-
299
- print_section "✅ Task Issues Creation Results"
300
-
301
- echo "Epic: $EPIC_NAME (Issue #$EPIC_NUMBER)"
302
- echo "Strategy: $([[ $task_count -lt $PARALLEL_THRESHOLD ]] && echo "Sequential" || echo "Parallel")"
303
- echo "Sub-issues: $([[ "$use_subissues" == "true" ]] && echo "Enabled" || echo "Disabled")"
304
- echo "Created: $created_count/$task_count task issues"
305
-
306
- if [[ $created_count -gt 0 ]]; then
307
- echo ""
308
- echo "Task mappings:"
309
- while IFS=: read -r task_file issue_number; do
310
- local task_name
311
- task_name=$(basename "$task_file" .md)
312
- echo " #$issue_number: $task_name"
313
- done < "$mapping_file"
314
- fi
315
-
316
- if [[ $created_count -lt $task_count ]]; then
317
- echo ""
318
- echo "⚠️ Some issues failed to create. Check logs for details."
76
+ echo "FAILED"
77
+ echo "⚠️ Failed to create issue for $task_basename"
319
78
  fi
320
- }
79
+ done
321
80
 
322
- # Error handling
323
- handle_error() {
324
- local exit_code=$?
325
- log_error "Script failed with exit code: $exit_code"
326
- log_error "Task issues creation failed for epic: $EPIC_NAME"
327
- exit "$exit_code"
328
- }
329
-
330
- # Set up error handling
331
- trap handle_error ERR
332
-
333
- # Validate arguments
334
- if [[ $# -lt 2 ]]; then
335
- echo "Usage: $0 <epic_name> <epic_issue_number>"
336
- echo ""
337
- echo "Creates GitHub issues for all tasks in the specified epic."
338
- echo ""
339
- echo "Arguments:"
340
- echo " epic_name Name of the epic directory"
341
- echo " epic_issue_number GitHub issue number of the parent epic"
342
- echo ""
343
- echo "Environment Variables:"
344
- echo " AUTOPM_PARALLEL_THRESHOLD Minimum tasks for parallel execution (default: 5)"
345
- echo ""
346
- echo "Examples:"
347
- echo " $0 authentication 123"
348
- echo " AUTOPM_PARALLEL_THRESHOLD=3 $0 user-dashboard 456"
349
- echo ""
350
- exit 1
351
- fi
81
+ echo ""
82
+ echo "✅ Created $current task issues"
83
+ echo " Mapping saved to: $MAPPING_FILE"
352
84
 
353
- # Run main function
354
- main "$@"
85
+ # Output the mapping file path for next script
86
+ echo "$MAPPING_FILE"