aiblueprint-cli 1.4.22 → 1.4.24

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 (90) hide show
  1. package/claude-code-config/skills/git-commit/SKILL.md +42 -0
  2. package/claude-code-config/{commands/git/create-pr.md → skills/git-create-pr/SKILL.md} +12 -18
  3. package/claude-code-config/skills/git-fix-pr-comments/SKILL.md +51 -0
  4. package/claude-code-config/skills/git-merge/SKILL.md +68 -0
  5. package/claude-code-config/skills/{claude-memory → meta-claude-memory}/SKILL.md +7 -2
  6. package/claude-code-config/skills/meta-claude-memory/references/rules-directory-guide.md +298 -0
  7. package/claude-code-config/skills/meta-prompt-creator/SKILL.md +285 -0
  8. package/claude-code-config/skills/meta-prompt-creator/references/anthropic-best-practices.md +126 -0
  9. package/claude-code-config/skills/meta-prompt-creator/references/anti-patterns.md +57 -0
  10. package/claude-code-config/skills/meta-prompt-creator/references/clarity-principles.md +54 -0
  11. package/claude-code-config/skills/meta-prompt-creator/references/context-management.md +389 -0
  12. package/claude-code-config/skills/meta-prompt-creator/references/few-shot-patterns.md +47 -0
  13. package/claude-code-config/skills/meta-prompt-creator/references/openai-best-practices.md +50 -0
  14. package/claude-code-config/skills/meta-prompt-creator/references/prompt-templates.md +110 -0
  15. package/claude-code-config/skills/meta-prompt-creator/references/reasoning-techniques.md +52 -0
  16. package/claude-code-config/skills/meta-prompt-creator/references/system-prompt-patterns.md +48 -0
  17. package/claude-code-config/skills/meta-prompt-creator/references/xml-structure.md +36 -0
  18. package/claude-code-config/skills/meta-skill-creator/LICENSE.txt +202 -0
  19. package/claude-code-config/skills/meta-skill-creator/SKILL.md +421 -0
  20. package/claude-code-config/skills/meta-skill-creator/package.json +5 -0
  21. package/claude-code-config/skills/meta-skill-creator/references/output-patterns.md +82 -0
  22. package/claude-code-config/skills/meta-skill-creator/references/progressive-disclosure-patterns.md +374 -0
  23. package/claude-code-config/skills/meta-skill-creator/references/prompting-integration.md +363 -0
  24. package/claude-code-config/skills/meta-skill-creator/references/real-world-examples.md +513 -0
  25. package/claude-code-config/skills/meta-skill-creator/references/script-patterns.md +385 -0
  26. package/claude-code-config/skills/meta-skill-creator/references/workflows.md +28 -0
  27. package/claude-code-config/skills/meta-skill-creator/references/xml-tag-guide.md +606 -0
  28. package/claude-code-config/skills/meta-skill-creator/scripts/init-skill.ts +214 -0
  29. package/claude-code-config/skills/meta-skill-creator/scripts/package-skill.ts +146 -0
  30. package/claude-code-config/skills/meta-skill-creator/scripts/validate.ts +138 -0
  31. package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/SKILL.md +41 -15
  32. package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-00-init.md +2 -3
  33. package/claude-code-config/skills/utils-fix-errors/SKILL.md +61 -0
  34. package/claude-code-config/skills/utils-fix-grammar/SKILL.md +59 -0
  35. package/claude-code-config/skills/utils-oneshot/SKILL.md +56 -0
  36. package/claude-code-config/skills/workflow-apex/SKILL.md +303 -0
  37. package/claude-code-config/skills/workflow-apex/scripts/setup-templates.sh +134 -0
  38. package/claude-code-config/skills/workflow-apex/scripts/update-progress.sh +80 -0
  39. package/claude-code-config/skills/workflow-apex/steps/step-00-init.md +288 -0
  40. package/claude-code-config/skills/workflow-apex/steps/step-00b-branch.md +126 -0
  41. package/claude-code-config/skills/workflow-apex/steps/step-00b-economy.md +244 -0
  42. package/claude-code-config/skills/workflow-apex/steps/step-00b-interactive.md +153 -0
  43. package/claude-code-config/skills/workflow-apex/steps/step-01-analyze.md +361 -0
  44. package/claude-code-config/skills/workflow-apex/steps/step-02-plan.md +264 -0
  45. package/claude-code-config/skills/workflow-apex/steps/step-03-execute.md +239 -0
  46. package/claude-code-config/skills/workflow-apex/steps/step-04-validate.md +264 -0
  47. package/claude-code-config/skills/workflow-apex/steps/step-05-examine.md +294 -0
  48. package/claude-code-config/skills/workflow-apex/steps/step-06-resolve.md +237 -0
  49. package/claude-code-config/skills/workflow-apex/steps/step-07-tests.md +250 -0
  50. package/claude-code-config/skills/workflow-apex/steps/step-08-run-tests.md +308 -0
  51. package/claude-code-config/skills/workflow-apex/steps/step-09-finish.md +193 -0
  52. package/claude-code-config/skills/workflow-apex/templates/00-context.md +51 -0
  53. package/claude-code-config/skills/workflow-apex/templates/01-analyze.md +10 -0
  54. package/claude-code-config/skills/workflow-apex/templates/02-plan.md +10 -0
  55. package/claude-code-config/skills/workflow-apex/templates/03-execute.md +10 -0
  56. package/claude-code-config/skills/workflow-apex/templates/04-validate.md +10 -0
  57. package/claude-code-config/skills/workflow-apex/templates/05-examine.md +10 -0
  58. package/claude-code-config/skills/workflow-apex/templates/06-resolve.md +10 -0
  59. package/claude-code-config/skills/workflow-apex/templates/07-tests.md +10 -0
  60. package/claude-code-config/skills/workflow-apex/templates/08-run-tests.md +10 -0
  61. package/claude-code-config/skills/workflow-apex/templates/09-finish.md +10 -0
  62. package/claude-code-config/skills/workflow-apex/templates/README.md +195 -0
  63. package/claude-code-config/skills/workflow-apex/templates/step-complete.md +7 -0
  64. package/dist/cli.js +46 -3
  65. package/package.json +1 -1
  66. package/claude-code-config/commands/explore.md +0 -90
  67. package/claude-code-config/commands/git/commit.md +0 -60
  68. package/claude-code-config/commands/git/fix-pr-comments.md +0 -59
  69. package/claude-code-config/commands/oneshot.md +0 -57
  70. package/claude-code-config/skills/create-slash-commands/SKILL.md +0 -1110
  71. package/claude-code-config/skills/create-slash-commands/references/arguments.md +0 -273
  72. package/claude-code-config/skills/create-slash-commands/references/patterns.md +0 -947
  73. package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +0 -656
  74. package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +0 -389
  75. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/comprehensive-example.md +0 -0
  76. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/project-patterns.md +0 -0
  77. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/prompting-techniques.md +0 -0
  78. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/section-templates.md +0 -0
  79. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/context-management.md +0 -0
  80. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/debugging-agents.md +0 -0
  81. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/error-handling-and-recovery.md +0 -0
  82. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/evaluation-and-testing.md +0 -0
  83. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/orchestration-patterns.md +0 -0
  84. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/subagents.md +0 -0
  85. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/writing-subagent-prompts.md +0 -0
  86. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/SKILL.md +0 -0
  87. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/scripts/setup.sh +0 -0
  88. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-01-interactive-prd.md +0 -0
  89. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-02-create-stories.md +0 -0
  90. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-03-finish.md +0 -0
@@ -0,0 +1,308 @@
1
+ ---
2
+ name: step-08-run-tests
3
+ description: Run tests in a loop - fix issues until all pass
4
+ prev_step: steps/step-07-tests.md
5
+ next_step: steps/step-05-examine.md
6
+ ---
7
+
8
+ # Step 8: Run Tests (Fix Loop)
9
+
10
+ ## MANDATORY EXECUTION RULES (READ FIRST):
11
+
12
+ - 🛑 NEVER give up after first failure
13
+ - 🛑 NEVER start services without permission (unless auto_mode)
14
+ - 🛑 NEVER infinite loop on same failure (max 3 attempts)
15
+ - ✅ ALWAYS loop until all tests pass
16
+ - ✅ ALWAYS ask user when stuck (unless auto_mode)
17
+ - ✅ ALWAYS clean up background processes
18
+ - 📋 YOU ARE A TEST RUNNER, fixing until green
19
+ - 💬 FOCUS on "Run → Fail → Fix → Repeat until green"
20
+ - 🚫 FORBIDDEN to ignore configuration errors
21
+
22
+ ## EXECUTION PROTOCOLS:
23
+
24
+ - 🎯 Check requirements before running
25
+ - 💾 Log each test run (if save_mode)
26
+ - 📖 Analyze failures before fixing
27
+ - 🚫 FORBIDDEN to proceed with failing tests (without explicit skip)
28
+
29
+ ## CONTEXT BOUNDARIES:
30
+
31
+ - Tests were created in step-07
32
+ - Tests may require services (DB, server)
33
+ - Failures may be code bugs or test bugs
34
+ - Loop until all green or user decides to skip
35
+
36
+ ## YOUR TASK:
37
+
38
+ Run tests, fix any failures, and loop until ALL tests pass.
39
+
40
+ ---
41
+
42
+ <available_state>
43
+ From previous steps:
44
+
45
+ | Variable | Description |
46
+ |----------|-------------|
47
+ | `{task_description}` | What was implemented |
48
+ | `{task_id}` | Kebab-case identifier |
49
+ | `{auto_mode}` | Auto-start servers, auto-retry |
50
+ | `{examine_mode}` | Auto-proceed to review after |
51
+ | `{save_mode}` | Save outputs to files |
52
+ | `{output_dir}` | Path to output (if save_mode) |
53
+ | Tests created | From step-07 |
54
+ | Test command | Discovered in step-07 |
55
+ </available_state>
56
+
57
+ ---
58
+
59
+ ## EXECUTION SEQUENCE:
60
+
61
+ ### 1. Initialize Save Output (if save_mode)
62
+
63
+ **If `{save_mode}` = true:**
64
+
65
+ ```bash
66
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "08" "run-tests" "in_progress"
67
+ ```
68
+
69
+ Append logs to `{output_dir}/08-run-tests.md` as you work.
70
+
71
+ ### 2. Check Requirements
72
+
73
+ **Identify required services:**
74
+ ```bash
75
+ cat package.json | grep -A 10 '"scripts"'
76
+ ```
77
+
78
+ Common: Database, dev server, Redis
79
+
80
+ **Check if running:**
81
+ ```bash
82
+ curl -s http://localhost:3000 > /dev/null 2>&1 && echo "Server running"
83
+ ```
84
+
85
+ ### 3. Handle Missing Services
86
+
87
+ **If `{auto_mode}` = true:**
88
+ → Start services automatically:
89
+ ```bash
90
+ pnpm run dev &
91
+ sleep 5
92
+ ```
93
+
94
+ **If `{auto_mode}` = false:**
95
+
96
+ ```yaml
97
+ questions:
98
+ - header: "Services"
99
+ question: "Tests require services that aren't running. How proceed?"
100
+ options:
101
+ - label: "I'll start manually"
102
+ description: "Give me a moment to start them"
103
+ - label: "Start automatically"
104
+ description: "Try to start services automatically"
105
+ - label: "Skip tests needing services"
106
+ description: "Only run tests that don't need services"
107
+ - label: "Skip test step"
108
+ description: "Continue without running tests"
109
+ multiSelect: false
110
+ ```
111
+
112
+ ### 4. Run Test Loop
113
+
114
+ **CRITICAL: Loop until all pass**
115
+
116
+ ```
117
+ max_attempts = 10
118
+ attempt = 0
119
+
120
+ WHILE attempt < max_attempts:
121
+ attempt += 1
122
+
123
+ 1. Run tests
124
+ 2. If all pass → EXIT (success)
125
+ 3. If failure:
126
+ a. Analyze failure
127
+ b. Determine: code bug or test bug?
128
+ c. Fix the issue
129
+ d. CONTINUE LOOP
130
+ 4. If same failure 3x → ASK USER
131
+ ```
132
+
133
+ **Run tests:**
134
+ ```bash
135
+ pnpm run test 2>&1
136
+ ```
137
+
138
+ **Log each run:**
139
+ ```
140
+ **Run #{attempt}:**
141
+ - Total: 5, Passed: 3, Failed: 2
142
+ - Fixing: {description}
143
+ ```
144
+
145
+ ### 5. Handle Failures
146
+
147
+ For each failing test:
148
+
149
+ ```
150
+ **Analyzing:**
151
+ Test: "creates user with valid data"
152
+ File: src/auth/register.test.ts:25
153
+ Error: Expected 201, got 500
154
+ Stack: TypeError: Cannot read 'email' of undefined
155
+
156
+ **Diagnosis:** Code bug - null handling
157
+ **Fix:** Add null check in handler
158
+ ```
159
+
160
+ **Fix location:**
161
+ | Error Type | Fix |
162
+ |------------|-----|
163
+ | Assertion failed | Usually code bug |
164
+ | TypeError in code | Code bug |
165
+ | TypeError in test | Test bug |
166
+ | Timeout | async/await issue |
167
+ | Import error | Missing dep |
168
+
169
+ ### 6. Handle Stuck (3x same failure)
170
+
171
+ **If `{auto_mode}` = true:**
172
+ → Try different approach once, then continue
173
+
174
+ **If `{auto_mode}` = false:**
175
+
176
+ ```yaml
177
+ questions:
178
+ - header: "Stuck"
179
+ question: "Test keeps failing. How proceed?"
180
+ options:
181
+ - label: "I'll debug manually"
182
+ description: "Let me investigate"
183
+ - label: "Skip this test"
184
+ description: "Mark as skip, continue others"
185
+ - label: "Delete test"
186
+ description: "Remove this test entirely"
187
+ - label: "Keep trying"
188
+ description: "Try more approaches"
189
+ multiSelect: false
190
+ ```
191
+
192
+ ### 7. Handle Config Errors
193
+
194
+ | Error | Solution |
195
+ |-------|----------|
196
+ | Cannot find module | Check imports, pnpm install |
197
+ | Connection refused | DB/server not running |
198
+ | Timeout | Increase timeout, check async |
199
+
200
+ **If `{auto_mode}` = false:**
201
+
202
+ ```yaml
203
+ questions:
204
+ - header: "Config"
205
+ question: "Configuration issue detected. How proceed?"
206
+ options:
207
+ - label: "I'll fix manually"
208
+ description: "Let me handle config"
209
+ - label: "Try automatic fix"
210
+ description: "Attempt suggested fix"
211
+ - label: "Skip tests"
212
+ description: "Continue without tests"
213
+ multiSelect: false
214
+ ```
215
+
216
+ ### 8. Success - All Passing
217
+
218
+ ```
219
+ **✓ All Tests Passing**
220
+
221
+ **Results:**
222
+ - Total: {count}
223
+ - Passed: {count}
224
+ - Failed: 0
225
+
226
+ **Attempts:** {count}
227
+
228
+ **Tests:**
229
+ - src/auth/register.test.ts - 3 tests
230
+ - src/utils/validation.test.ts - 2 tests
231
+ ```
232
+
233
+ ### 9. Complete Save Output (if save_mode)
234
+
235
+ **If `{save_mode}` = true:**
236
+
237
+ Append to `{output_dir}/08-run-tests.md`:
238
+ ```markdown
239
+ ---
240
+ ## Step Complete
241
+ **Status:** ✓ Complete
242
+ **Tests passed:** {count}
243
+ **Attempts:** {count}
244
+ **Next:** {next step}
245
+ **Timestamp:** {ISO timestamp}
246
+ ```
247
+
248
+ ### 10. Determine Next Step
249
+
250
+ **If `{examine_mode}` = true:**
251
+ → Load step-05-examine.md
252
+
253
+ **If `{auto_mode}` = false:**
254
+
255
+ ```yaml
256
+ questions:
257
+ - header: "Next"
258
+ question: "All tests passing. What next?"
259
+ options:
260
+ - label: "Run adversarial review"
261
+ description: "Deep review for security/logic"
262
+ - label: "Complete workflow"
263
+ description: "Finalize and show summary"
264
+ multiSelect: false
265
+ ```
266
+
267
+ **Else:**
268
+ → Complete workflow
269
+
270
+ ---
271
+
272
+ ## SUCCESS METRICS:
273
+
274
+ ✅ All tests passing
275
+ ✅ No stuck failures without user decision
276
+ ✅ Config issues resolved
277
+ ✅ Services cleaned up
278
+ ✅ Clear summary
279
+
280
+ ## FAILURE MODES:
281
+
282
+ ❌ Giving up after first failure
283
+ ❌ Infinite loop on same failure
284
+ ❌ Starting services without permission
285
+ ❌ Not cleaning up background processes
286
+ ❌ Ignoring config errors
287
+ ❌ **CRITICAL**: Not using AskUserQuestion when stuck
288
+
289
+ ## RUN PROTOCOLS:
290
+
291
+ - Loop until green
292
+ - Analyze before fixing
293
+ - Ask user when stuck (3x)
294
+ - Clean up services
295
+ - Clear summary at end
296
+
297
+ ---
298
+
299
+ ## NEXT STEP:
300
+
301
+ Based on flags (check in order):
302
+ - **If examine_mode:** Load `./step-05-examine.md`
303
+ - **If pr_mode:** Load `./step-09-finish.md` to create pull request
304
+ - **Otherwise:** Workflow complete - show summary
305
+
306
+ <critical>
307
+ Remember: Loop until ALL tests pass - don't give up after first failure!
308
+ </critical>
@@ -0,0 +1,193 @@
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}`, `{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
+ ### 1. Verify Git Status
41
+
42
+ ```bash
43
+ git status
44
+ ```
45
+
46
+ **If uncommitted changes exist:**
47
+ → Commit them with message: `feat({task_id}): {task_description}`
48
+
49
+ **If working tree is clean:**
50
+ → Continue to step 2
51
+
52
+ ### 2. Check Commits to Push
53
+
54
+ ```bash
55
+ git log origin/{branch_name}..HEAD --oneline 2>/dev/null || git log --oneline -5
56
+ ```
57
+
58
+ Display commits that will be included in PR.
59
+
60
+ ### 3. Confirm Push (if not auto_mode)
61
+
62
+ **If `{auto_mode}` = true:**
63
+ → Auto-push to remote
64
+
65
+ **If `{auto_mode}` = false:**
66
+ Use AskUserQuestion:
67
+ ```yaml
68
+ questions:
69
+ - header: "Push"
70
+ question: "Ready to push {branch_name} and create PR?"
71
+ options:
72
+ - label: "Push and create PR (Recommended)"
73
+ description: "Push commits to remote and open pull request"
74
+ - label: "Push only"
75
+ description: "Push to remote without creating PR"
76
+ - label: "Review commits first"
77
+ description: "Show me the full diff before pushing"
78
+ - label: "Cancel"
79
+ description: "Don't push or create PR"
80
+ multiSelect: false
81
+ ```
82
+
83
+ ### 4. Push to Remote
84
+
85
+ ```bash
86
+ git push -u origin {branch_name}
87
+ ```
88
+
89
+ **If push fails:**
90
+ → Display error and ask user how to proceed
91
+ → Common fixes: pull --rebase, force push (with warning)
92
+
93
+ ### 5. Create Pull Request (if pr_mode)
94
+
95
+ **If `{pr_mode}` = true:**
96
+
97
+ Generate PR content:
98
+ - **Title:** `feat({task_id}): {task_description}`
99
+ - **Body:** Summary of changes from the workflow
100
+
101
+ ```bash
102
+ gh pr create --title "feat({task_id}): {task_description}" --body "$(cat <<'EOF'
103
+ ## Summary
104
+
105
+ {Brief description of what was implemented}
106
+
107
+ ## Changes
108
+
109
+ {List of key changes made}
110
+
111
+ ## Testing
112
+
113
+ {How the changes were validated}
114
+
115
+ ---
116
+
117
+ _Generated by APEX workflow_
118
+ EOF
119
+ )"
120
+ ```
121
+
122
+ **Capture PR URL:**
123
+ ```bash
124
+ gh pr view --json url -q '.url'
125
+ ```
126
+ → Store as `{pr_url}`
127
+
128
+ ### 6. Save Output (if save_mode)
129
+
130
+ **If `{save_mode}` = true:**
131
+
132
+ ```bash
133
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "09" "finish" "in_progress"
134
+ ```
135
+
136
+ Append to `{output_dir}/09-finish.md`: branch, PR URL, commits, timestamp.
137
+
138
+ ```bash
139
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "09" "finish" "complete"
140
+ ```
141
+
142
+ ### 7. Final Summary
143
+
144
+ Display workflow completion summary:
145
+
146
+ ```
147
+ ═══════════════════════════════════════════════════════
148
+ APEX WORKFLOW COMPLETE
149
+ ═══════════════════════════════════════════════════════
150
+
151
+ Task: {task_description}
152
+ ID: {task_id}
153
+
154
+ ✓ Analysis complete
155
+ ✓ Plan created and approved
156
+ ✓ Implementation done
157
+ ✓ Validation passed
158
+ {if test_mode: "✓ Tests passing"}
159
+ {if examine_mode: "✓ Review findings resolved"}
160
+ ✓ Changes pushed to {branch_name}
161
+ {if pr_mode: "✓ PR created: {pr_url}"}
162
+
163
+ ═══════════════════════════════════════════════════════
164
+ ```
165
+
166
+ ---
167
+
168
+ ## SUCCESS METRICS:
169
+
170
+ ✅ All changes committed
171
+ ✅ Branch pushed to remote
172
+ ✅ PR created with proper title and description (if pr_mode)
173
+ ✅ PR URL captured and displayed
174
+ ✅ Output saved (if save_mode)
175
+ ✅ Clear completion summary provided
176
+
177
+ ## FAILURE MODES:
178
+
179
+ ❌ Creating PR with uncommitted changes
180
+ ❌ Pushing without user confirmation (when not auto_mode)
181
+ ❌ Force pushing without explicit user request
182
+ ❌ Not displaying PR URL after creation
183
+ ❌ **CRITICAL**: Using plain text prompts instead of AskUserQuestion
184
+
185
+ ---
186
+
187
+ ## WORKFLOW COMPLETE
188
+
189
+ This is the final step of the APEX workflow. No next step to load.
190
+
191
+ <critical>
192
+ Remember: This step ONLY handles git operations and PR creation. All code changes should have been completed in earlier steps.
193
+ </critical>
@@ -0,0 +1,51 @@
1
+ # APEX Task: {{task_id}}
2
+
3
+ **Created:** {{timestamp}}
4
+ **Task:** {{task_description}}
5
+
6
+ ---
7
+
8
+ ## Configuration
9
+
10
+ | Flag | Value |
11
+ |------|-------|
12
+ | Auto mode (`-a`) | {{auto_mode}} |
13
+ | Examine mode (`-x`) | {{examine_mode}} |
14
+ | Save mode (`-s`) | {{save_mode}} |
15
+ | Test mode (`-t`) | {{test_mode}} |
16
+ | Economy mode (`-e`) | {{economy_mode}} |
17
+ | Branch mode (`-b`) | {{branch_mode}} |
18
+ | PR mode (`-pr`) | {{pr_mode}} |
19
+ | Interactive mode (`-i`) | {{interactive_mode}} |
20
+ | Branch name | {{branch_name}} |
21
+
22
+ ---
23
+
24
+ ## User Request
25
+
26
+ ```
27
+ {{original_input}}
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Acceptance Criteria
33
+
34
+ _To be defined in step-01-analyze.md_
35
+
36
+ ---
37
+
38
+ ## Progress
39
+
40
+ | Step | Status | Timestamp |
41
+ |------|--------|-----------|
42
+ | 00-init | ⏸ Pending | |
43
+ | 01-analyze | ⏸ Pending | |
44
+ | 02-plan | ⏸ Pending | |
45
+ | 03-execute | ⏸ Pending | |
46
+ | 04-validate | ⏸ Pending | |
47
+ | 05-examine | {{examine_status}} | |
48
+ | 06-resolve | {{examine_status}} | |
49
+ | 07-tests | {{test_status}} | |
50
+ | 08-run-tests | {{test_status}} | |
51
+ | 09-finish | {{pr_status}} | |
@@ -0,0 +1,10 @@
1
+ # Step 01: Analyze
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Context Discovery
9
+
10
+ _Findings will be appended here as exploration progresses..._
@@ -0,0 +1,10 @@
1
+ # Step 02: Plan
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Planning Progress
9
+
10
+ _Implementation plan will be written here..._
@@ -0,0 +1,10 @@
1
+ # Step 03: Execute
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Implementation Log
9
+
10
+ _Changes will be logged here as implementation progresses..._
@@ -0,0 +1,10 @@
1
+ # Step 04: Validate
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Validation Progress
9
+
10
+ _Validation results will be appended here..._
@@ -0,0 +1,10 @@
1
+ # Step 05: Examine
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Adversarial Review
9
+
10
+ _Review findings will be documented here..._
@@ -0,0 +1,10 @@
1
+ # Step 06: Resolve
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Resolution Log
9
+
10
+ _Fixes will be logged here..._
@@ -0,0 +1,10 @@
1
+ # Step 07: Tests
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Test Analysis and Creation
9
+
10
+ _Test strategy and implementation will be documented here..._
@@ -0,0 +1,10 @@
1
+ # Step 08: Run Tests
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Test Runner Log
9
+
10
+ _Test execution results will be logged here..._
@@ -0,0 +1,10 @@
1
+ # Step 09: Finish
2
+
3
+ **Task:** {{task_description}}
4
+ **Started:** {{timestamp}}
5
+
6
+ ---
7
+
8
+ ## Pull Request Creation
9
+
10
+ _PR creation process will be logged here..._