aiblueprint-cli 1.4.42 → 1.4.44
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.
- package/claude-code-config/skills/apex/SKILL.md +229 -84
- package/claude-code-config/skills/apex/scripts/setup-templates.sh +6 -50
- package/claude-code-config/skills/apex/steps/step-00-init.md +33 -39
- package/claude-code-config/skills/apex/steps/step-00b-interactive.md +1 -13
- package/claude-code-config/skills/apex/steps/step-01-analyze.md +17 -36
- package/claude-code-config/skills/apex/steps/step-02-plan.md +24 -353
- package/claude-code-config/skills/apex/steps/step-03-execute.md +0 -1
- package/claude-code-config/skills/apex/steps/step-04-validate.md +26 -41
- package/claude-code-config/skills/apex/templates/00-context.md +0 -10
- package/claude-code-config/skills/apex/templates/README.md +6 -25
- package/dist/cli.js +27 -1
- package/package.json +1 -1
- package/claude-code-config/skills/apex/steps/step-00b-save.md +0 -123
- package/claude-code-config/skills/apex/steps/step-02b-tasks.md +0 -301
- package/claude-code-config/skills/apex/steps/step-03-execute-teams.md +0 -296
- package/claude-code-config/skills/apex/steps/step-05-examine.md +0 -351
- package/claude-code-config/skills/apex/steps/step-06-resolve.md +0 -238
- package/claude-code-config/skills/apex/steps/step-07-tests.md +0 -250
- package/claude-code-config/skills/apex/steps/step-08-run-tests.md +0 -308
- package/claude-code-config/skills/apex/steps/step-09-finish.md +0 -223
- package/claude-code-config/skills/apex/templates/05-examine.md +0 -10
- package/claude-code-config/skills/apex/templates/06-resolve.md +0 -10
- package/claude-code-config/skills/apex/templates/07-tests.md +0 -10
- package/claude-code-config/skills/apex/templates/08-run-tests.md +0 -10
- package/claude-code-config/skills/apex/templates/09-finish.md +0 -10
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: step-09-finish
|
|
3
|
-
description: Finish APEX workflow and create pull request
|
|
4
|
-
previous_step: step-08-run-tests.md (or step-04-validate.md if no tests)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Step 9: Finish & Create PR
|
|
8
|
-
|
|
9
|
-
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
10
|
-
|
|
11
|
-
- 🛑 NEVER push without user confirmation (unless auto_mode)
|
|
12
|
-
- 🛑 NEVER create PR if there are uncommitted changes
|
|
13
|
-
- ✅ ALWAYS verify all changes are committed
|
|
14
|
-
- ✅ ALWAYS push to remote before creating PR
|
|
15
|
-
- 📋 YOU ARE A FINISHER, completing the workflow
|
|
16
|
-
- 💬 FOCUS on PR creation and workflow summary
|
|
17
|
-
- 🚫 FORBIDDEN to make code changes in this step
|
|
18
|
-
|
|
19
|
-
## EXECUTION PROTOCOLS:
|
|
20
|
-
|
|
21
|
-
- 🎯 Verify git status before any push/PR operations
|
|
22
|
-
- 💾 Save PR details to output file if save_mode enabled
|
|
23
|
-
- 📖 Provide clear workflow summary
|
|
24
|
-
- 🚫 FORBIDDEN to proceed with uncommitted changes
|
|
25
|
-
|
|
26
|
-
## CONTEXT BOUNDARIES:
|
|
27
|
-
|
|
28
|
-
- Variables available: `{task_id}`, `{task_description}`, `{branch_name}`, `{pr_mode}`, `{auto_mode}`, `{save_mode}`, `{teams_mode}`, `{output_dir}`
|
|
29
|
-
- Previous steps completed: analyze, plan, execute, validate (+ optional: tests, examine)
|
|
30
|
-
- All implementation should be done at this point
|
|
31
|
-
|
|
32
|
-
## YOUR TASK:
|
|
33
|
-
|
|
34
|
-
Finalize the APEX workflow by committing remaining changes, pushing to remote, and creating a pull request.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## EXECUTION SEQUENCE:
|
|
39
|
-
|
|
40
|
-
### 0. Shutdown Agent Team (if teams_mode)
|
|
41
|
-
|
|
42
|
-
<critical>
|
|
43
|
-
This is the ONLY step where team shutdown should happen.
|
|
44
|
-
All previous steps (validate, examine, resolve) keep the team alive.
|
|
45
|
-
</critical>
|
|
46
|
-
|
|
47
|
-
**If `{teams_mode}` = true:**
|
|
48
|
-
|
|
49
|
-
1. Send shutdown_request to each teammate:
|
|
50
|
-
```
|
|
51
|
-
SendMessage:
|
|
52
|
-
type: "shutdown_request"
|
|
53
|
-
recipient: "impl-{name}"
|
|
54
|
-
content: "APEX workflow complete. Shutting down team."
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
2. Wait for all teammates to confirm shutdown.
|
|
58
|
-
|
|
59
|
-
3. Delete the team:
|
|
60
|
-
```
|
|
61
|
-
TeamDelete
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
→ This cleans up team files and task directories.
|
|
65
|
-
|
|
66
|
-
### 1. Verify Git Status
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
git status
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**If uncommitted changes exist:**
|
|
73
|
-
→ Commit them with message: `feat({task_id}): {task_description}`
|
|
74
|
-
|
|
75
|
-
**If working tree is clean:**
|
|
76
|
-
→ Continue to step 2
|
|
77
|
-
|
|
78
|
-
### 2. Check Commits to Push
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
git log origin/{branch_name}..HEAD --oneline 2>/dev/null || git log --oneline -5
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Display commits that will be included in PR.
|
|
85
|
-
|
|
86
|
-
### 3. Confirm Push (if not auto_mode)
|
|
87
|
-
|
|
88
|
-
**If `{auto_mode}` = true:**
|
|
89
|
-
→ Auto-push to remote
|
|
90
|
-
|
|
91
|
-
**If `{auto_mode}` = false:**
|
|
92
|
-
Use AskUserQuestion:
|
|
93
|
-
```yaml
|
|
94
|
-
questions:
|
|
95
|
-
- header: "Push"
|
|
96
|
-
question: "Ready to push {branch_name} and create PR?"
|
|
97
|
-
options:
|
|
98
|
-
- label: "Push and create PR (Recommended)"
|
|
99
|
-
description: "Push commits to remote and open pull request"
|
|
100
|
-
- label: "Push only"
|
|
101
|
-
description: "Push to remote without creating PR"
|
|
102
|
-
- label: "Review commits first"
|
|
103
|
-
description: "Show me the full diff before pushing"
|
|
104
|
-
- label: "Cancel"
|
|
105
|
-
description: "Don't push or create PR"
|
|
106
|
-
multiSelect: false
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 4. Push to Remote
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
git push -u origin {branch_name}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**If push fails:**
|
|
116
|
-
→ Display error and ask user how to proceed
|
|
117
|
-
→ Common fixes: pull --rebase, force push (with warning)
|
|
118
|
-
|
|
119
|
-
### 5. Create Pull Request (if pr_mode)
|
|
120
|
-
|
|
121
|
-
**If `{pr_mode}` = true:**
|
|
122
|
-
|
|
123
|
-
Generate PR content:
|
|
124
|
-
- **Title:** `feat({task_id}): {task_description}`
|
|
125
|
-
- **Body:** Summary of changes from the workflow
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
gh pr create --title "feat({task_id}): {task_description}" --body "$(cat <<'EOF'
|
|
129
|
-
## Summary
|
|
130
|
-
|
|
131
|
-
{Brief description of what was implemented}
|
|
132
|
-
|
|
133
|
-
## Changes
|
|
134
|
-
|
|
135
|
-
{List of key changes made}
|
|
136
|
-
|
|
137
|
-
## Testing
|
|
138
|
-
|
|
139
|
-
{How the changes were validated}
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
_Generated by APEX workflow_
|
|
144
|
-
EOF
|
|
145
|
-
)"
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**Capture PR URL:**
|
|
149
|
-
```bash
|
|
150
|
-
gh pr view --json url -q '.url'
|
|
151
|
-
```
|
|
152
|
-
→ Store as `{pr_url}`
|
|
153
|
-
|
|
154
|
-
### 6. Save Output (if save_mode)
|
|
155
|
-
|
|
156
|
-
**If `{save_mode}` = true:**
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
bash {skill_dir}/scripts/update-progress.sh "{task_id}" "09" "finish" "in_progress"
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Append to `{output_dir}/09-finish.md`: branch, PR URL, commits, timestamp.
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
bash {skill_dir}/scripts/update-progress.sh "{task_id}" "09" "finish" "complete"
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### 7. Final Summary
|
|
169
|
-
|
|
170
|
-
Display workflow completion summary:
|
|
171
|
-
|
|
172
|
-
```
|
|
173
|
-
═══════════════════════════════════════════════════════
|
|
174
|
-
APEX WORKFLOW COMPLETE
|
|
175
|
-
═══════════════════════════════════════════════════════
|
|
176
|
-
|
|
177
|
-
Task: {task_description}
|
|
178
|
-
ID: {task_id}
|
|
179
|
-
|
|
180
|
-
✓ Analysis complete
|
|
181
|
-
✓ Plan created and approved
|
|
182
|
-
✓ Implementation done
|
|
183
|
-
✓ Validation passed
|
|
184
|
-
{if test_mode: "✓ Tests passing"}
|
|
185
|
-
{if examine_mode: "✓ Review findings resolved"}
|
|
186
|
-
✓ Changes pushed to {branch_name}
|
|
187
|
-
{if pr_mode: "✓ PR created: {pr_url}"}
|
|
188
|
-
|
|
189
|
-
═══════════════════════════════════════════════════════
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## SUCCESS METRICS:
|
|
195
|
-
|
|
196
|
-
✅ Agent team shut down gracefully via SendMessage shutdown_request (if teams_mode)
|
|
197
|
-
✅ TeamDelete called to clean up team resources (if teams_mode)
|
|
198
|
-
✅ All changes committed
|
|
199
|
-
✅ Branch pushed to remote
|
|
200
|
-
✅ PR created with proper title and description (if pr_mode)
|
|
201
|
-
✅ PR URL captured and displayed
|
|
202
|
-
✅ Output saved (if save_mode)
|
|
203
|
-
✅ Clear completion summary provided
|
|
204
|
-
|
|
205
|
-
## FAILURE MODES:
|
|
206
|
-
|
|
207
|
-
❌ Creating PR with uncommitted changes
|
|
208
|
-
❌ Pushing without user confirmation (when not auto_mode)
|
|
209
|
-
❌ Force pushing without explicit user request
|
|
210
|
-
❌ Not displaying PR URL after creation
|
|
211
|
-
❌ **CRITICAL**: Using plain text prompts instead of AskUserQuestion
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## WORKFLOW COMPLETE
|
|
216
|
-
|
|
217
|
-
This is the final step of the APEX workflow. No next step to load.
|
|
218
|
-
|
|
219
|
-
<critical>
|
|
220
|
-
Remember: This step handles git operations, PR creation, AND team shutdown (if teams_mode).
|
|
221
|
-
All code changes should have been completed in earlier steps.
|
|
222
|
-
Team shutdown MUST happen here — step 0 of execution sequence — before git operations.
|
|
223
|
-
</critical>
|