aiblueprint-cli 1.4.24 → 1.4.25

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 (20) hide show
  1. package/claude-code-config/skills/workflow-apex-free/SKILL.md +261 -0
  2. package/claude-code-config/skills/workflow-apex-free/scripts/setup-templates.sh +100 -0
  3. package/claude-code-config/skills/workflow-apex-free/scripts/update-progress.sh +80 -0
  4. package/claude-code-config/skills/workflow-apex-free/steps/step-00-init.md +267 -0
  5. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-branch.md +126 -0
  6. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-economy.md +244 -0
  7. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-interactive.md +153 -0
  8. package/claude-code-config/skills/workflow-apex-free/steps/step-01-analyze.md +361 -0
  9. package/claude-code-config/skills/workflow-apex-free/steps/step-02-plan.md +264 -0
  10. package/claude-code-config/skills/workflow-apex-free/steps/step-03-execute.md +239 -0
  11. package/claude-code-config/skills/workflow-apex-free/steps/step-04-validate.md +251 -0
  12. package/claude-code-config/skills/workflow-apex-free/templates/00-context.md +43 -0
  13. package/claude-code-config/skills/workflow-apex-free/templates/01-analyze.md +10 -0
  14. package/claude-code-config/skills/workflow-apex-free/templates/02-plan.md +10 -0
  15. package/claude-code-config/skills/workflow-apex-free/templates/03-execute.md +10 -0
  16. package/claude-code-config/skills/workflow-apex-free/templates/04-validate.md +10 -0
  17. package/claude-code-config/skills/workflow-apex-free/templates/README.md +176 -0
  18. package/claude-code-config/skills/workflow-apex-free/templates/step-complete.md +7 -0
  19. package/dist/cli.js +146 -9
  20. package/package.json +1 -1
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: step-03-execute
3
+ description: Todo-driven implementation - execute the plan file by file
4
+ prev_step: steps/step-02-plan.md
5
+ next_step: steps/step-04-validate.md
6
+ ---
7
+
8
+ # Step 3: Execute (Implementation)
9
+
10
+ ## MANDATORY EXECUTION RULES (READ FIRST):
11
+
12
+ - 🛑 NEVER deviate from the approved plan
13
+ - 🛑 NEVER add features not in the plan (scope creep)
14
+ - 🛑 NEVER modify files without reading them first
15
+ - ✅ ALWAYS follow the plan file-by-file
16
+ - ✅ ALWAYS mark todos complete immediately after each task
17
+ - ✅ ALWAYS read files BEFORE editing them
18
+ - 📋 YOU ARE AN IMPLEMENTER following a plan, not a designer
19
+ - 💬 FOCUS on executing the plan exactly as approved
20
+ - 🚫 FORBIDDEN to add "improvements" not in the plan
21
+
22
+ ## EXECUTION PROTOCOLS:
23
+
24
+ - 🎯 Create todos from plan before starting
25
+ - 💾 Mark todos complete immediately after each task
26
+ - 📖 Read each file BEFORE modifying it
27
+ - 🚫 FORBIDDEN to have multiple todos in_progress simultaneously
28
+
29
+ ## CONTEXT BOUNDARIES:
30
+
31
+ - Plan from step-02 is approved and must be followed
32
+ - Files to modify are known from the plan
33
+ - Patterns to follow are documented from step-01
34
+ - Don't add features - stick to the plan
35
+
36
+ ## YOUR TASK:
37
+
38
+ Execute the approved implementation plan file-by-file, tracking progress with todos.
39
+
40
+ ---
41
+
42
+ <available_state>
43
+ From previous steps:
44
+
45
+ | Variable | Description |
46
+ |----------|-------------|
47
+ | `{task_description}` | What to implement |
48
+ | `{task_id}` | Kebab-case identifier |
49
+ | `{auto_mode}` | Skip confirmations |
50
+ | `{save_mode}` | Save outputs to files |
51
+ | `{output_dir}` | Path to output (if save_mode) |
52
+ | Implementation plan | File-by-file changes from step-02 |
53
+ | Patterns | How to implement from step-01 |
54
+ </available_state>
55
+
56
+ ---
57
+
58
+ ## EXECUTION SEQUENCE:
59
+
60
+ ### 1. Initialize Save Output (if save_mode)
61
+
62
+ **If `{save_mode}` = true:**
63
+
64
+ ```bash
65
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "03" "execute" "in_progress"
66
+ ```
67
+
68
+ Append logs to `{output_dir}/03-execute.md` as you work.
69
+
70
+ ### 2. Create Todos from Plan
71
+
72
+ Convert each file change from the plan into todos:
73
+
74
+ ```
75
+ Plan entry:
76
+ #### `src/auth/handler.ts`
77
+ - Add `validateToken` function
78
+ - Handle error case: expired token
79
+
80
+ Becomes:
81
+ - [ ] src/auth/handler.ts: Add validateToken function
82
+ - [ ] src/auth/handler.ts: Handle expired token error
83
+ ```
84
+
85
+ Use TodoWrite to create the full list.
86
+
87
+ ### 3. Execute File by File
88
+
89
+ For each todo:
90
+
91
+ **3.1 Mark In Progress**
92
+ - Only ONE todo in_progress at a time
93
+
94
+ **3.2 Read Before Edit**
95
+ ```
96
+ ALWAYS read the file before modifying:
97
+ - Understand current structure
98
+ - Find exact insertion points
99
+ - Verify patterns match expectations
100
+ ```
101
+
102
+ **3.3 Implement Changes**
103
+ ```
104
+ Make changes specified in the plan:
105
+ - Follow patterns from step-01 analysis
106
+ - Use exact names from plan
107
+ - Handle error cases as specified
108
+ - NO comments unless truly necessary
109
+ ```
110
+
111
+ **3.4 Mark Complete Immediately**
112
+ - Mark todo complete RIGHT AFTER finishing
113
+ - Don't batch completions
114
+
115
+ **3.5 Log Progress (if save_mode)**
116
+ ```markdown
117
+ ### ✓ src/auth/handler.ts
118
+ - Added `validateToken` function (lines 45-78)
119
+ - Added error handling for expired tokens
120
+ **Timestamp:** {ISO}
121
+ ```
122
+
123
+ ### 4. Handle Blockers
124
+
125
+ **If `{auto_mode}` = true:**
126
+ → Make reasonable decision and continue
127
+
128
+ **If `{auto_mode}` = false:**
129
+
130
+ ```yaml
131
+ questions:
132
+ - header: "Blocker"
133
+ question: "Encountered an issue. How should we proceed?"
134
+ options:
135
+ - label: "Use alternative approach (Recommended)"
136
+ description: "Description of alternative"
137
+ - label: "Skip this part"
138
+ description: "Continue without this change"
139
+ - label: "Stop for discussion"
140
+ description: "I want to discuss before continuing"
141
+ multiSelect: false
142
+ ```
143
+
144
+ ### 5. Verify Implementation
145
+
146
+ After completing all todos:
147
+
148
+ ```bash
149
+ pnpm run typecheck && pnpm run lint --fix
150
+ ```
151
+
152
+ Fix any errors immediately.
153
+
154
+ ### 6. Implementation Summary
155
+
156
+ ```
157
+ **Implementation Complete**
158
+
159
+ **Files Modified:**
160
+ - `src/auth/handler.ts` - Added validateToken, error handling
161
+ - `src/api/auth/route.ts` - Integrated token validation
162
+
163
+ **New Files:**
164
+ - `src/types/auth.ts` - Auth type definitions
165
+
166
+ **Todos:** {X}/{Y} complete
167
+ ```
168
+
169
+ **If `{auto_mode}` = true:**
170
+ → Proceed to validation
171
+
172
+ **If `{auto_mode}` = false:**
173
+
174
+ ```yaml
175
+ questions:
176
+ - header: "Execute"
177
+ question: "Implementation complete. Ready to validate?"
178
+ options:
179
+ - label: "Proceed to validation (Recommended)"
180
+ description: "Run typecheck, lint, and tests"
181
+ - label: "Review changes"
182
+ description: "I want to review what was changed"
183
+ - label: "Make adjustments"
184
+ description: "I want to modify something"
185
+ multiSelect: false
186
+ ```
187
+
188
+ ### 7. Complete Save Output (if save_mode)
189
+
190
+ **If `{save_mode}` = true:**
191
+
192
+ Append to `{output_dir}/03-execute.md`:
193
+ ```markdown
194
+ ---
195
+ ## Step Complete
196
+ **Status:** ✓ Complete
197
+ **Files modified:** {count}
198
+ **Todos completed:** {count}
199
+ **Next:** step-04-validate.md
200
+ **Timestamp:** {ISO timestamp}
201
+ ```
202
+
203
+ ---
204
+
205
+ ## SUCCESS METRICS:
206
+
207
+ ✅ All plan items implemented
208
+ ✅ All todos marked complete
209
+ ✅ No scope creep - only plan items
210
+ ✅ Files read before modification
211
+ ✅ Typecheck and lint pass
212
+ ✅ Progress logged (if save_mode)
213
+
214
+ ## FAILURE MODES:
215
+
216
+ ❌ Adding features not in the plan
217
+ ❌ Modifying files without reading first
218
+ ❌ Not updating todos as you work
219
+ ❌ Multiple todos in_progress simultaneously
220
+ ❌ Ignoring type or lint errors
221
+ ❌ **CRITICAL**: Not using AskUserQuestion for blockers
222
+
223
+ ## EXECUTION PROTOCOLS:
224
+
225
+ - Follow the plan EXACTLY
226
+ - Read before write
227
+ - One file at a time
228
+ - Update todos in real-time
229
+ - Fix errors immediately
230
+
231
+ ---
232
+
233
+ ## NEXT STEP:
234
+
235
+ After implementation complete, load `./step-04-validate.md`
236
+
237
+ <critical>
238
+ Remember: Execution is about following the plan - don't redesign or add features!
239
+ </critical>
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: step-04-validate
3
+ description: Self-check - run tests, verify AC, audit implementation quality, complete workflow
4
+ prev_step: steps/step-03-execute.md
5
+ next_step: null
6
+ ---
7
+
8
+ # Step 4: Validate (Self-Check)
9
+
10
+ ## MANDATORY EXECUTION RULES (READ FIRST):
11
+
12
+ - 🛑 NEVER claim checks pass when they don't
13
+ - 🛑 NEVER skip any validation step
14
+ - ✅ ALWAYS run typecheck, lint, and tests
15
+ - ✅ ALWAYS verify each acceptance criterion
16
+ - ✅ ALWAYS fix failures before proceeding
17
+ - 📋 YOU ARE A VALIDATOR, not an implementer
18
+ - 💬 FOCUS on "Does it work correctly?"
19
+ - 🚫 FORBIDDEN to proceed with failing checks
20
+
21
+ ## EXECUTION PROTOCOLS:
22
+
23
+ - 🎯 Run all validation commands
24
+ - 💾 Log results to output (if save_mode)
25
+ - 📖 Check each AC against implementation
26
+ - 🚫 FORBIDDEN to mark complete with failures
27
+
28
+ ## CONTEXT BOUNDARIES:
29
+
30
+ - Implementation from step-03 is complete
31
+ - Tests may or may not pass yet
32
+ - Type errors may exist
33
+ - Focus is on verification, not new implementation
34
+
35
+ ## YOUR TASK:
36
+
37
+ Validate the implementation by running checks, verifying acceptance criteria, and ensuring quality.
38
+
39
+ ---
40
+
41
+ <available_state>
42
+ From previous steps:
43
+
44
+ | Variable | Description |
45
+ |----------|-------------|
46
+ | `{task_description}` | What was implemented |
47
+ | `{task_id}` | Kebab-case identifier |
48
+ | `{acceptance_criteria}` | Success criteria |
49
+ | `{auto_mode}` | Skip confirmations |
50
+ | `{save_mode}` | Save outputs to files |
51
+ | `{economy_mode}` | No subagents mode |
52
+ | `{output_dir}` | Path to output (if save_mode) |
53
+ | Implementation | Completed in step-03 |
54
+ </available_state>
55
+
56
+ ---
57
+
58
+ ## EXECUTION SEQUENCE:
59
+
60
+ ### 1. Initialize Save Output (if save_mode)
61
+
62
+ **If `{save_mode}` = true:**
63
+
64
+ ```bash
65
+ bash {skill_dir}/scripts/update-progress.sh "{task_id}" "04" "validate" "in_progress"
66
+ ```
67
+
68
+ Append results to `{output_dir}/04-validate.md` as you work.
69
+
70
+ ### 2. Discover Available Commands
71
+
72
+ Check `package.json` for exact command names:
73
+ ```bash
74
+ cat package.json | grep -A 20 '"scripts"'
75
+ ```
76
+
77
+ Look for: `typecheck`, `lint`, `test`, `build`, `format`
78
+
79
+ ### 3. Run Validation Suite
80
+
81
+ **3.1 Typecheck**
82
+ ```bash
83
+ pnpm run typecheck # or npm run typecheck
84
+ ```
85
+
86
+ **MUST PASS.** If fails:
87
+ 1. Read error messages
88
+ 2. Fix type issues
89
+ 3. Re-run until passing
90
+
91
+ **3.2 Lint**
92
+ ```bash
93
+ pnpm run lint
94
+ ```
95
+
96
+ **MUST PASS.** If fails:
97
+ 1. Try auto-fix: `pnpm run lint --fix`
98
+ 2. Manually fix remaining
99
+ 3. Re-run until passing
100
+
101
+ **3.3 Tests**
102
+ ```bash
103
+ pnpm run test -- --filter={affected-area}
104
+ ```
105
+
106
+ **MUST PASS.** If fails:
107
+ 1. Identify failing test
108
+ 2. Determine if code bug or test bug
109
+ 3. Fix the root cause
110
+ 4. Re-run until passing
111
+
112
+ **If `{save_mode}` = true:** Log each result
113
+
114
+ ### 4. Self-Audit Checklist
115
+
116
+ Verify each item:
117
+
118
+ **Tasks Complete:**
119
+ - [ ] All todos from step-03 marked complete
120
+ - [ ] No tasks skipped without reason
121
+ - [ ] Any blocked tasks have explanation
122
+
123
+ **Tests Passing:**
124
+ - [ ] All existing tests pass
125
+ - [ ] New tests written for new functionality
126
+ - [ ] No skipped tests without reason
127
+
128
+ **Acceptance Criteria:**
129
+ - [ ] Each AC demonstrably met
130
+ - [ ] Can explain how implementation satisfies AC
131
+ - [ ] Edge cases considered
132
+
133
+ **Patterns Followed:**
134
+ - [ ] Code follows existing patterns
135
+ - [ ] Error handling consistent
136
+ - [ ] Naming conventions match
137
+
138
+ ### 5. Format Code
139
+
140
+ If format command available:
141
+ ```bash
142
+ pnpm run format
143
+ ```
144
+
145
+ ### 6. Final Verification
146
+
147
+ Re-run all checks:
148
+ ```bash
149
+ pnpm run typecheck && pnpm run lint
150
+ ```
151
+
152
+ Both MUST pass.
153
+
154
+ ### 7. Present Validation Results
155
+
156
+ ```
157
+ **Validation Complete**
158
+
159
+ **Typecheck:** ✓ Passed
160
+ **Lint:** ✓ Passed
161
+ **Tests:** ✓ {X}/{X} passing
162
+ **Format:** ✓ Applied
163
+
164
+ **Acceptance Criteria:**
165
+ - [✓] AC1: Verified by [how]
166
+ - [✓] AC2: Verified by [how]
167
+
168
+ **Files Modified:** {list}
169
+
170
+ **Summary:** All checks passing, ready for next step.
171
+ ```
172
+
173
+ ### 8. Complete Workflow
174
+
175
+ **Show final summary:**
176
+
177
+ ```
178
+ ✅ APEX Workflow Complete
179
+
180
+ **Task:** {task_description}
181
+ **Task ID:** {task_id}
182
+
183
+ **Validation Results:**
184
+ - Typecheck: ✓ Passed
185
+ - Lint: ✓ Passed
186
+ - Tests: ✓ Passed
187
+
188
+ **Acceptance Criteria:**
189
+ - [✓] AC1: Verified
190
+ - [✓] AC2: Verified
191
+
192
+ **Files Modified:** {list}
193
+
194
+ 🎉 Implementation complete and validated!
195
+ ```
196
+
197
+ ### 9. Complete Save Output (if save_mode)
198
+
199
+ **If `{save_mode}` = true:**
200
+
201
+ Append to `{output_dir}/04-validate.md`:
202
+ ```markdown
203
+ ---
204
+ ## Step Complete
205
+ **Status:** ✓ Complete
206
+ **Typecheck:** ✓
207
+ **Lint:** ✓
208
+ **Tests:** ✓
209
+ **Workflow:** Complete
210
+ **Timestamp:** {ISO timestamp}
211
+ ```
212
+
213
+ Run: `bash {skill_dir}/scripts/update-progress.sh "{task_id}" "04" "validate" "complete"`
214
+
215
+ ---
216
+
217
+ ## SUCCESS METRICS:
218
+
219
+ ✅ Typecheck passes
220
+ ✅ Lint passes
221
+ ✅ All tests pass
222
+ ✅ All AC verified
223
+ ✅ Code formatted
224
+ ✅ User informed of status
225
+ ✅ Workflow completed
226
+
227
+ ## FAILURE MODES:
228
+
229
+ ❌ Claiming checks pass when they don't
230
+ ❌ Not running all validation commands
231
+ ❌ Skipping tests for modified code
232
+ ❌ Missing AC verification
233
+ ❌ Proceeding with failures
234
+
235
+ ## VALIDATION PROTOCOLS:
236
+
237
+ - Run EVERY validation command
238
+ - Fix failures IMMEDIATELY
239
+ - Don't proceed until all green
240
+ - Verify EACH acceptance criterion
241
+ - Document all results
242
+
243
+ ---
244
+
245
+ ## WORKFLOW COMPLETE
246
+
247
+ This is the final step. After validation passes, the APEX workflow is complete.
248
+
249
+ <critical>
250
+ Remember: NEVER claim completion with failing checks - fix everything first!
251
+ </critical>
@@ -0,0 +1,43 @@
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
+ | Save mode (`-s`) | {{save_mode}} |
14
+ | Economy mode (`-e`) | {{economy_mode}} |
15
+ | Branch mode (`-b`) | {{branch_mode}} |
16
+ | Interactive mode (`-i`) | {{interactive_mode}} |
17
+ | Branch name | {{branch_name}} |
18
+
19
+ ---
20
+
21
+ ## User Request
22
+
23
+ ```
24
+ {{original_input}}
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Acceptance Criteria
30
+
31
+ _To be defined in step-01-analyze.md_
32
+
33
+ ---
34
+
35
+ ## Progress
36
+
37
+ | Step | Status | Timestamp |
38
+ |------|--------|-----------|
39
+ | 00-init | ⏸ Pending | |
40
+ | 01-analyze | ⏸ Pending | |
41
+ | 02-plan | ⏸ Pending | |
42
+ | 03-execute | ⏸ Pending | |
43
+ | 04-validate | ⏸ Pending | |
@@ -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..._