claude-autopm 1.11.5 → 1.11.6
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.
|
@@ -22,29 +22,53 @@ Before proceeding, complete these validation steps.
|
|
|
22
22
|
Do not bother the user with preflight checks progress ("I'm not going to ..."). Just do them and move on.
|
|
23
23
|
|
|
24
24
|
1. **Verify epic exists:**
|
|
25
|
-
- Check if `.claude/epics/$ARGUMENTS
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
25
|
+
- Check if `.claude/epics/$ARGUMENTS` directory exists
|
|
26
|
+
- Check for either:
|
|
27
|
+
a) Single epic: `.claude/epics/$ARGUMENTS/epic.md` exists
|
|
28
|
+
b) Multiple epics: Subdirectories like `.claude/epics/$ARGUMENTS/01-infrastructure/epic.md`
|
|
29
|
+
- If neither found, tell user: "❌ Epic not found: $ARGUMENTS. First create it with: /pm:prd-parse $ARGUMENTS or /pm:epic-split $ARGUMENTS"
|
|
30
|
+
- Stop execution if no epics found
|
|
31
|
+
|
|
32
|
+
2. **Detect epic structure:**
|
|
33
|
+
- If `.claude/epics/$ARGUMENTS/epic.md` exists → Single epic mode
|
|
34
|
+
- If subdirectories with epic.md files exist → Multi-epic mode
|
|
35
|
+
- Store the mode for later processing
|
|
36
|
+
|
|
37
|
+
3. **Check for existing tasks:**
|
|
38
|
+
- For single epic: Check `.claude/epics/$ARGUMENTS/` for numbered task files
|
|
39
|
+
- For multi-epic: Check each subdirectory for numbered task files
|
|
31
40
|
- If tasks exist, list them and ask: "⚠️ Found {count} existing tasks. Delete and recreate all tasks? (yes/no)"
|
|
32
41
|
- Only proceed with explicit 'yes' confirmation
|
|
33
42
|
- If user says no, suggest: "View existing tasks with: /pm:epic-show $ARGUMENTS"
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
- Verify epic has valid frontmatter
|
|
37
|
-
-
|
|
44
|
+
4. **Validate epic frontmatter:**
|
|
45
|
+
- For single epic: Verify `.claude/epics/$ARGUMENTS/epic.md` has valid frontmatter
|
|
46
|
+
- For multi-epic: Verify each subdirectory's epic.md has valid frontmatter
|
|
47
|
+
- If invalid, tell user which epic file has invalid frontmatter
|
|
38
48
|
|
|
39
|
-
|
|
40
|
-
-
|
|
49
|
+
5. **Check epic status:**
|
|
50
|
+
- For each epic, check if status is already "completed"
|
|
51
|
+
- If any epic is completed, warn user: "⚠️ Epic(s) marked as completed. Are you sure you want to decompose again?"
|
|
41
52
|
|
|
42
53
|
## Instructions
|
|
43
54
|
|
|
44
|
-
You are decomposing
|
|
55
|
+
You are decomposing epic(s) into specific, actionable tasks for: **$ARGUMENTS**
|
|
56
|
+
|
|
57
|
+
### 1. Determine Processing Mode
|
|
58
|
+
|
|
59
|
+
**Single Epic Mode:**
|
|
60
|
+
- Process `.claude/epics/$ARGUMENTS/epic.md`
|
|
61
|
+
- Create tasks in `.claude/epics/$ARGUMENTS/`
|
|
45
62
|
|
|
46
|
-
|
|
47
|
-
-
|
|
63
|
+
**Multi-Epic Mode (from epic-split):**
|
|
64
|
+
- Find all subdirectories in `.claude/epics/$ARGUMENTS/`
|
|
65
|
+
- Process each subdirectory's epic.md file separately
|
|
66
|
+
- Create tasks in each respective subdirectory
|
|
67
|
+
- Show progress for each epic being processed
|
|
68
|
+
|
|
69
|
+
### 2. Read the Epic(s)
|
|
70
|
+
- For single epic: Load from `.claude/epics/$ARGUMENTS/epic.md`
|
|
71
|
+
- For multi-epic: Load each `.claude/epics/$ARGUMENTS/*/epic.md`
|
|
48
72
|
- Understand the technical approach and requirements
|
|
49
73
|
- Review the task breakdown preview
|
|
50
74
|
|
|
@@ -127,9 +151,17 @@ Clear, concise description of what needs to be done
|
|
|
127
151
|
```
|
|
128
152
|
|
|
129
153
|
### 3. Task Naming Convention
|
|
154
|
+
|
|
155
|
+
**For Single Epic:**
|
|
130
156
|
Save tasks as: `.claude/epics/$ARGUMENTS/{task_number}.md`
|
|
157
|
+
|
|
158
|
+
**For Multi-Epic:**
|
|
159
|
+
Save tasks as: `.claude/epics/$ARGUMENTS/{epic_folder}/{task_number}.md`
|
|
160
|
+
Example: `.claude/epics/ecommerce/01-infrastructure/001.md`
|
|
161
|
+
|
|
131
162
|
- Use sequential numbering: 001.md, 002.md, etc.
|
|
132
163
|
- Keep task titles short but descriptive
|
|
164
|
+
- Each epic gets its own task number sequence
|
|
133
165
|
|
|
134
166
|
### 4. Frontmatter Guidelines
|
|
135
167
|
- **name**: Use a descriptive task title (without "Task:" prefix)
|
|
@@ -178,6 +210,23 @@ Spawning 3 agents for parallel task creation:
|
|
|
178
210
|
- Agent 3: Creating tasks 007-009 (UI layer)
|
|
179
211
|
```
|
|
180
212
|
|
|
213
|
+
**Multi-Epic Processing Example:**
|
|
214
|
+
```markdown
|
|
215
|
+
Processing multiple epics from split:
|
|
216
|
+
|
|
217
|
+
📂 01-infrastructure/epic.md
|
|
218
|
+
Creating 8 tasks...
|
|
219
|
+
✅ Done
|
|
220
|
+
|
|
221
|
+
📂 02-auth-backend/epic.md
|
|
222
|
+
Creating 12 tasks...
|
|
223
|
+
✅ Done
|
|
224
|
+
|
|
225
|
+
📂 03-frontend/epic.md
|
|
226
|
+
Creating 10 tasks...
|
|
227
|
+
✅ Done
|
|
228
|
+
```
|
|
229
|
+
|
|
181
230
|
### 8. Task Dependency Validation
|
|
182
231
|
|
|
183
232
|
When creating tasks with dependencies:
|
|
@@ -212,6 +261,7 @@ Before finalizing tasks, verify:
|
|
|
212
261
|
|
|
213
262
|
### 10. Post-Decomposition
|
|
214
263
|
|
|
264
|
+
**For Single Epic:**
|
|
215
265
|
After successfully creating tasks:
|
|
216
266
|
1. Confirm: "✅ Created {count} tasks for epic: $ARGUMENTS"
|
|
217
267
|
2. Show summary:
|
|
@@ -220,6 +270,24 @@ After successfully creating tasks:
|
|
|
220
270
|
- Total estimated effort
|
|
221
271
|
3. Suggest next step: "Ready to sync to GitHub? Run: /pm:epic-sync $ARGUMENTS"
|
|
222
272
|
|
|
273
|
+
**For Multi-Epic:**
|
|
274
|
+
After processing all epics:
|
|
275
|
+
1. Show per-epic summary:
|
|
276
|
+
```
|
|
277
|
+
✅ Epic Decomposition Complete
|
|
278
|
+
|
|
279
|
+
📂 01-infrastructure: 8 tasks created
|
|
280
|
+
📂 02-auth-backend: 12 tasks created
|
|
281
|
+
📂 03-frontend: 10 tasks created
|
|
282
|
+
|
|
283
|
+
Total: 30 tasks across 3 epics
|
|
284
|
+
```
|
|
285
|
+
2. Show combined statistics:
|
|
286
|
+
- Total tasks across all epics
|
|
287
|
+
- Total estimated effort
|
|
288
|
+
- Breakdown by epic
|
|
289
|
+
3. Suggest next step: "Ready to sync all epics? Run: /pm:epic-sync $ARGUMENTS"
|
|
290
|
+
|
|
223
291
|
## Error Recovery
|
|
224
292
|
|
|
225
293
|
If any step fails:
|
|
@@ -14,11 +14,18 @@ Push epic and tasks to GitHub as issues using modular scripts.
|
|
|
14
14
|
## Quick Check
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
#
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# Count task files
|
|
21
|
-
ls .claude/epics/$ARGUMENTS/*.md 2>/dev/null | grep -v epic.md | wc -l
|
|
17
|
+
# Check for single epic or multi-epic structure
|
|
18
|
+
if [ -f ".claude/epics/$ARGUMENTS/epic.md" ]; then
|
|
19
|
+
echo "Single epic mode detected"
|
|
20
|
+
# Count task files
|
|
21
|
+
ls .claude/epics/$ARGUMENTS/*.md 2>/dev/null | grep -v epic.md | wc -l
|
|
22
|
+
elif [ -d ".claude/epics/$ARGUMENTS" ] && ls .claude/epics/$ARGUMENTS/*/epic.md 2>/dev/null | head -1; then
|
|
23
|
+
echo "Multi-epic mode detected (from epic-split)"
|
|
24
|
+
# Count task files in all subdirectories
|
|
25
|
+
find .claude/epics/$ARGUMENTS -name "*.md" ! -name "epic.md" ! -name "meta.yaml" | wc -l
|
|
26
|
+
else
|
|
27
|
+
echo "❌ Epic not found. Run: /pm:prd-parse $ARGUMENTS or /pm:epic-split $ARGUMENTS"
|
|
28
|
+
fi
|
|
22
29
|
```
|
|
23
30
|
|
|
24
31
|
If no tasks found: "❌ No tasks to sync. Run: /pm:epic-decompose $ARGUMENTS"
|
|
@@ -27,6 +34,18 @@ If no tasks found: "❌ No tasks to sync. Run: /pm:epic-decompose $ARGUMENTS"
|
|
|
27
34
|
|
|
28
35
|
The epic sync process is now modularized into 4 specialized scripts that handle different aspects of the synchronization. Each script is designed for reliability, testability, and maintainability.
|
|
29
36
|
|
|
37
|
+
### Processing Mode Detection
|
|
38
|
+
|
|
39
|
+
**Single Epic Mode:**
|
|
40
|
+
- Process `.claude/epics/$ARGUMENTS/epic.md` and its tasks
|
|
41
|
+
- Create one epic issue with all tasks linked
|
|
42
|
+
|
|
43
|
+
**Multi-Epic Mode (from epic-split):**
|
|
44
|
+
- Process each subdirectory separately
|
|
45
|
+
- Create separate epic issues for each subdirectory
|
|
46
|
+
- Maintain epic dependencies as specified in meta.yaml
|
|
47
|
+
- Show progress for each epic being synced
|
|
48
|
+
|
|
30
49
|
### 1. Repository Protection Check
|
|
31
50
|
|
|
32
51
|
This is handled automatically by our modular scripts, but you can run the check manually:
|
|
@@ -137,9 +156,11 @@ git push -u origin epic/$ARGUMENTS
|
|
|
137
156
|
echo "✅ Created branch: epic/$ARGUMENTS"
|
|
138
157
|
```
|
|
139
158
|
|
|
140
|
-
## Complete Workflow
|
|
159
|
+
## Complete Workflow Examples
|
|
141
160
|
|
|
142
|
-
|
|
161
|
+
### Single Epic Workflow
|
|
162
|
+
|
|
163
|
+
Here's the complete modular epic sync workflow for a single epic:
|
|
143
164
|
|
|
144
165
|
```bash
|
|
145
166
|
#!/bin/bash
|
|
@@ -215,6 +236,100 @@ echo " - Or work on single issue: /pm:issue-start <issue_number>"
|
|
|
215
236
|
echo ""
|
|
216
237
|
```
|
|
217
238
|
|
|
239
|
+
### Multi-Epic Workflow (from epic-split)
|
|
240
|
+
|
|
241
|
+
Here's the workflow for syncing multiple epics created by epic-split:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
#!/bin/bash
|
|
245
|
+
# Sync multiple epics from split structure
|
|
246
|
+
|
|
247
|
+
FEATURE_NAME="$ARGUMENTS"
|
|
248
|
+
EPICS_DIR=".claude/epics/$FEATURE_NAME"
|
|
249
|
+
|
|
250
|
+
echo "🚀 Starting multi-epic sync for: $FEATURE_NAME"
|
|
251
|
+
|
|
252
|
+
# Find all epic subdirectories
|
|
253
|
+
epic_dirs=$(find "$EPICS_DIR" -maxdepth 1 -type d -name "[0-9]*-*" | sort)
|
|
254
|
+
epic_count=$(echo "$epic_dirs" | wc -l)
|
|
255
|
+
|
|
256
|
+
echo "📦 Found $epic_count epics to sync"
|
|
257
|
+
|
|
258
|
+
# Track all created epic issues
|
|
259
|
+
all_epic_numbers=""
|
|
260
|
+
total_tasks=0
|
|
261
|
+
|
|
262
|
+
# Process each epic
|
|
263
|
+
for epic_dir in $epic_dirs; do
|
|
264
|
+
epic_name=$(basename "$epic_dir")
|
|
265
|
+
echo ""
|
|
266
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
267
|
+
echo "📂 Processing: $epic_name"
|
|
268
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
269
|
+
|
|
270
|
+
# Step 1: Create epic issue
|
|
271
|
+
echo "📝 Creating epic issue..."
|
|
272
|
+
epic_number=$(bash autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh "$FEATURE_NAME/$epic_name")
|
|
273
|
+
|
|
274
|
+
if [[ -z "$epic_number" ]]; then
|
|
275
|
+
echo "⚠️ Failed to create epic issue for $epic_name"
|
|
276
|
+
continue
|
|
277
|
+
fi
|
|
278
|
+
|
|
279
|
+
all_epic_numbers="$all_epic_numbers $epic_number"
|
|
280
|
+
echo "✅ Epic issue created: #$epic_number"
|
|
281
|
+
|
|
282
|
+
# Step 2: Create task issues for this epic
|
|
283
|
+
echo "📋 Creating task issues..."
|
|
284
|
+
task_mapping_file=$(bash autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh "$FEATURE_NAME/$epic_name" "$epic_number")
|
|
285
|
+
|
|
286
|
+
if [[ -f "$task_mapping_file" ]]; then
|
|
287
|
+
task_count=$(wc -l < "$task_mapping_file")
|
|
288
|
+
total_tasks=$((total_tasks + task_count))
|
|
289
|
+
echo "✅ Created $task_count task issues"
|
|
290
|
+
|
|
291
|
+
# Step 3: Update references
|
|
292
|
+
echo "🔗 Updating task references..."
|
|
293
|
+
bash autopm/.claude/scripts/pm/epic-sync/update-references.sh "$FEATURE_NAME/$epic_name" "$task_mapping_file"
|
|
294
|
+
|
|
295
|
+
# Step 4: Update epic file
|
|
296
|
+
bash autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh "$FEATURE_NAME/$epic_name" "$epic_number"
|
|
297
|
+
fi
|
|
298
|
+
done
|
|
299
|
+
|
|
300
|
+
# Create meta-branch for all epics
|
|
301
|
+
echo ""
|
|
302
|
+
echo "🌿 Creating meta-branch for feature..."
|
|
303
|
+
git checkout main
|
|
304
|
+
git pull origin main
|
|
305
|
+
git checkout -b feature/$FEATURE_NAME
|
|
306
|
+
git push -u origin feature/$FEATURE_NAME
|
|
307
|
+
|
|
308
|
+
# Final summary
|
|
309
|
+
repo=$(gh repo view --json nameWithOwner -q .nameWithOwner)
|
|
310
|
+
|
|
311
|
+
echo ""
|
|
312
|
+
echo "🎉 Multi-epic sync completed!"
|
|
313
|
+
echo ""
|
|
314
|
+
echo "📊 Summary:"
|
|
315
|
+
echo " Feature: $FEATURE_NAME"
|
|
316
|
+
echo " Epics created: $epic_count"
|
|
317
|
+
echo " Epic issues:$all_epic_numbers"
|
|
318
|
+
echo " Total tasks: $total_tasks"
|
|
319
|
+
echo " Branch: feature/$FEATURE_NAME"
|
|
320
|
+
echo ""
|
|
321
|
+
echo "🔗 Links:"
|
|
322
|
+
for epic_num in $all_epic_numbers; do
|
|
323
|
+
echo " Epic #$epic_num: https://github.com/$repo/issues/$epic_num"
|
|
324
|
+
done
|
|
325
|
+
echo " Branch: https://github.com/$repo/tree/feature/$FEATURE_NAME"
|
|
326
|
+
echo ""
|
|
327
|
+
echo "📋 Next steps:"
|
|
328
|
+
echo " - Work on P0 epics first (infrastructure, auth backend)"
|
|
329
|
+
echo " - Start specific epic: /pm:issue-start <issue_number>"
|
|
330
|
+
echo ""
|
|
331
|
+
```
|
|
332
|
+
|
|
218
333
|
## Benefits of Modular Approach
|
|
219
334
|
|
|
220
335
|
### ✅ **Reliability**
|