aiblueprint-cli 1.4.42 → 1.4.43

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 (24) hide show
  1. package/claude-code-config/skills/apex/SKILL.md +229 -84
  2. package/claude-code-config/skills/apex/scripts/setup-templates.sh +6 -50
  3. package/claude-code-config/skills/apex/steps/step-00-init.md +33 -39
  4. package/claude-code-config/skills/apex/steps/step-00b-interactive.md +1 -13
  5. package/claude-code-config/skills/apex/steps/step-01-analyze.md +17 -36
  6. package/claude-code-config/skills/apex/steps/step-02-plan.md +24 -353
  7. package/claude-code-config/skills/apex/steps/step-03-execute.md +0 -1
  8. package/claude-code-config/skills/apex/steps/step-04-validate.md +26 -41
  9. package/claude-code-config/skills/apex/templates/00-context.md +0 -10
  10. package/claude-code-config/skills/apex/templates/README.md +6 -25
  11. package/package.json +1 -1
  12. package/claude-code-config/skills/apex/steps/step-00b-save.md +0 -123
  13. package/claude-code-config/skills/apex/steps/step-02b-tasks.md +0 -301
  14. package/claude-code-config/skills/apex/steps/step-03-execute-teams.md +0 -296
  15. package/claude-code-config/skills/apex/steps/step-05-examine.md +0 -351
  16. package/claude-code-config/skills/apex/steps/step-06-resolve.md +0 -238
  17. package/claude-code-config/skills/apex/steps/step-07-tests.md +0 -250
  18. package/claude-code-config/skills/apex/steps/step-08-run-tests.md +0 -308
  19. package/claude-code-config/skills/apex/steps/step-09-finish.md +0 -223
  20. package/claude-code-config/skills/apex/templates/05-examine.md +0 -10
  21. package/claude-code-config/skills/apex/templates/06-resolve.md +0 -10
  22. package/claude-code-config/skills/apex/templates/07-tests.md +0 -10
  23. package/claude-code-config/skills/apex/templates/08-run-tests.md +0 -10
  24. package/claude-code-config/skills/apex/templates/09-finish.md +0 -10
@@ -1,238 +0,0 @@
1
- ---
2
- name: step-06-resolve
3
- description: Resolve findings - interactively address review issues
4
- prev_step: steps/step-05-examine.md
5
- next_step: COMPLETE
6
- ---
7
-
8
- # Step 6: Resolve Findings
9
-
10
- ## MANDATORY EXECUTION RULES (READ FIRST):
11
-
12
- - 🛑 NEVER auto-fix Noise or Uncertain findings
13
- - 🛑 NEVER skip validation after fixes
14
- - ✅ ALWAYS present resolution options to user (unless auto_mode)
15
- - ✅ ALWAYS validate after applying fixes
16
- - ✅ ALWAYS provide clear completion summary
17
- - 📋 YOU ARE A RESOLVER, addressing identified issues
18
- - 💬 FOCUS on "How do we fix these issues?"
19
- - 🚫 FORBIDDEN to proceed with failing validation
20
-
21
- ## EXECUTION PROTOCOLS:
22
-
23
- - 🎯 Present resolution options first
24
- - 💾 Log each fix applied (if save_mode)
25
- - 📖 Validate after all fixes
26
- - 🚫 FORBIDDEN to skip post-fix validation
27
-
28
- ## CONTEXT BOUNDARIES:
29
-
30
- - Findings from step-05 are classified
31
- - Some are Real, some Noise, some Uncertain
32
- - User may want different resolution strategies
33
- - Must validate after any changes
34
- - **If `{teams_mode}` = true:** Agent team is still alive. Do NOT shutdown teammates — that happens in step-09-finish only.
35
-
36
- ## YOUR TASK:
37
-
38
- Address adversarial review findings interactively - fix real issues, dismiss noise, discuss uncertain items.
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-fix Real findings |
50
- | `{save_mode}` | Save outputs to files |
51
- | `{output_dir}` | Path to output (if save_mode) |
52
- | Findings table | IDs, severity, validity |
53
- | Finding todos | For tracking |
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}" "06" "resolve" "in_progress"
66
- ```
67
-
68
- Append logs to `{output_dir}/06-resolve.md` as you work.
69
-
70
- ### 2. Present Resolution Options
71
-
72
- **If `{auto_mode}` = true:**
73
- → Auto-fix all "Real" findings, skip Noise/Uncertain
74
-
75
- **If `{auto_mode}` = false:**
76
-
77
- ```yaml
78
- questions:
79
- - header: "Resolution"
80
- question: "How would you like to handle these findings?"
81
- options:
82
- - label: "Auto-fix Real issues (Recommended)"
83
- description: "Fix 'Real' findings, skip noise/uncertain"
84
- - label: "Walk through each finding"
85
- description: "Decide on each finding individually"
86
- - label: "Fix only critical"
87
- description: "Only fix CRITICAL/BLOCKING issues"
88
- - label: "Skip all"
89
- description: "Acknowledge but don't change"
90
- multiSelect: false
91
- ```
92
-
93
- ### 3. Apply Fixes Based on Choice
94
-
95
- **Auto-fix Real:**
96
- 1. Filter to Real findings only
97
- 2. For each: Read file → Apply fix → Verify
98
- 3. Log each fix
99
-
100
- **Walk through each:**
101
- For each finding in severity order:
102
-
103
- ```yaml
104
- questions:
105
- - header: "F1"
106
- question: "How should we handle this finding?"
107
- options:
108
- - label: "Fix now (Recommended)"
109
- description: "Apply the suggested fix"
110
- - label: "Skip"
111
- description: "Acknowledge but don't fix"
112
- - label: "Discuss"
113
- description: "Need more context"
114
- - label: "Mark as noise"
115
- description: "Not a real issue"
116
- multiSelect: false
117
- ```
118
-
119
- **Fix only critical:**
120
- 1. Filter to CRITICAL/BLOCKING only
121
- 2. Auto-fix those, skip others
122
-
123
- **Skip all:**
124
- 1. Acknowledge findings
125
- 2. If Critical/High exist, confirm:
126
-
127
- ```yaml
128
- questions:
129
- - header: "Confirm"
130
- question: "You have unresolved Critical/High findings. Proceed anyway?"
131
- options:
132
- - label: "Go back and fix"
133
- description: "Return to resolution options"
134
- - label: "Proceed anyway"
135
- description: "Accept risks, continue"
136
- - label: "Fix only critical"
137
- description: "Just fix critical issues"
138
- multiSelect: false
139
- ```
140
-
141
- ### 4. Post-Resolution Validation
142
-
143
- After any fixes:
144
-
145
- ```bash
146
- pnpm run typecheck && pnpm run lint
147
- ```
148
-
149
- Both MUST pass.
150
-
151
- ### 5. Resolution Summary
152
-
153
- ```
154
- **Resolution Complete**
155
-
156
- **Fixed:** {count}
157
- - F1: Parameterized SQL query in auth.ts:42
158
- - F2: Added null check in handler.ts:78
159
-
160
- **Skipped:** {count}
161
- - F3: Complex function (uncertain)
162
-
163
- **Validation:** ✓ Passed
164
- ```
165
-
166
- ### 6. Complete Save Output (if save_mode)
167
-
168
- **If `{save_mode}` = true:**
169
-
170
- Append to `{output_dir}/06-resolve.md`:
171
- ```markdown
172
- ---
173
- ## Step Complete
174
- **Status:** ✓ Complete
175
- **Findings fixed:** {count}
176
- **Findings skipped:** {count}
177
- **Validation:** ✓ Passed
178
- **Timestamp:** {ISO timestamp}
179
- ```
180
-
181
- ### 7. Completion Summary
182
-
183
- ```
184
- **APEX Workflow Complete**
185
-
186
- **Task:** {task_description}
187
-
188
- **Implementation:**
189
- - Files modified: {count}
190
- - All checks passing: ✓
191
-
192
- **Review:**
193
- - Findings identified: {total}
194
- - Findings resolved: {fixed}
195
- - Findings skipped: {skipped}
196
-
197
- **Next Steps:**
198
- - [ ] Commit changes
199
- - [ ] Run full test suite
200
- - [ ] Deploy when ready
201
- ```
202
-
203
- ---
204
-
205
- ## SUCCESS METRICS:
206
-
207
- ✅ User chose resolution approach
208
- ✅ All chosen fixes applied correctly
209
- ✅ Validation passes after fixes
210
- ✅ Clear summary of resolved/skipped
211
- ✅ User understands next steps
212
-
213
- ## FAILURE MODES:
214
-
215
- ❌ Auto-fixing Noise or Uncertain findings
216
- ❌ Not validating after fixes
217
- ❌ No clear completion summary
218
- ❌ Proceeding with failing validation
219
- ❌ **CRITICAL**: Not using AskUserQuestion for decisions
220
-
221
- ## RESOLUTION PROTOCOLS:
222
-
223
- - Only auto-fix Real findings
224
- - Validate after EVERY fix round
225
- - Clear summary at the end
226
- - User controls final decision
227
-
228
- ---
229
-
230
- ## NEXT STEP:
231
-
232
- Based on flags:
233
- - **If pr_mode:** Load `./step-09-finish.md` to create pull request
234
- - **Otherwise:** Workflow complete - show summary
235
-
236
- <critical>
237
- Remember: Always validate after fixes - never proceed with failing checks!
238
- </critical>
@@ -1,250 +0,0 @@
1
- ---
2
- name: step-07-tests
3
- description: Smart test analysis and creation - analyze patterns, create appropriate tests
4
- prev_step: steps/step-04-validate.md
5
- next_step: steps/step-08-run-tests.md
6
- ---
7
-
8
- # Step 7: Tests (Analysis & Creation)
9
-
10
- ## MANDATORY EXECUTION RULES (READ FIRST):
11
-
12
- - 🛑 NEVER create tests without analyzing existing patterns first
13
- - 🛑 NEVER use wrong test type (unit when integration needed)
14
- - ✅ ALWAYS analyze test infrastructure BEFORE writing
15
- - ✅ ALWAYS follow existing test conventions exactly
16
- - ✅ ALWAYS map tests to acceptance criteria
17
- - 📋 YOU ARE A TEST ENGINEER, not a code generator
18
- - 💬 FOCUS on "What tests does this ACTUALLY need?"
19
- - 🚫 FORBIDDEN to ignore project test conventions
20
-
21
- ## EXECUTION PROTOCOLS:
22
-
23
- - 🎯 Analyze test infrastructure first
24
- - 💾 Document test strategy (if save_mode)
25
- - 📖 Read similar tests before writing
26
- - 🚫 FORBIDDEN to write tests without reading examples
27
-
28
- ## CONTEXT BOUNDARIES:
29
-
30
- - Implementation is complete and validated
31
- - Test infrastructure exists (discovered in this step)
32
- - Existing tests show conventions to follow
33
- - Focus on creating RIGHT tests, not just tests
34
-
35
- ## YOUR TASK:
36
-
37
- Analyze existing test patterns and create appropriate tests for the implementation.
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
- | `{auto_mode}` | Skip confirmations |
49
- | `{save_mode}` | Save outputs to files |
50
- | `{economy_mode}` | Lighter test analysis |
51
- | `{output_dir}` | Path to output (if save_mode) |
52
- | Files modified | From implementation |
53
- | Acceptance criteria | 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}" "07" "tests" "in_progress"
66
- ```
67
-
68
- Append analysis to `{output_dir}/07-tests.md` as you work.
69
-
70
- ### 2. Analyze Test Infrastructure
71
-
72
- **2.1 Discover Framework**
73
- ```bash
74
- cat package.json | grep -E "(jest|vitest|mocha|playwright|testing-library)"
75
- ```
76
-
77
- **2.2 Find Config**
78
- ```bash
79
- ls -la | grep -E "(jest|vitest|playwright)"
80
- ```
81
-
82
- **2.3 Find Test Commands**
83
- ```bash
84
- cat package.json | grep -A 5 '"scripts"' | grep -E "(test|spec)"
85
- ```
86
-
87
- ### 3. Analyze Existing Test Patterns
88
-
89
- **If `{economy_mode}` = true:**
90
- → Read 1 similar test file for patterns
91
-
92
- **If `{economy_mode}` = false:**
93
- → Read 2-3 similar test files
94
-
95
- **Pattern Checklist:**
96
- - [ ] describe/it vs test() syntax
97
- - [ ] Setup/teardown patterns
98
- - [ ] Mocking approach
99
- - [ ] Assertion style
100
- - [ ] Test data approach
101
-
102
- ### 4. Determine Test Strategy
103
-
104
- | Implementation Type | Test Type |
105
- |--------------------|-----------|
106
- | API Route | Integration with supertest/fetch |
107
- | Service/Logic | Integration with real deps |
108
- | Utility Function | Unit with mocks |
109
- | React Component | Component with testing-library |
110
- | Full Feature | Integration + E2E |
111
-
112
- ### 5. Create Test Plan
113
-
114
- ```markdown
115
- ## Test Plan
116
-
117
- **Framework:** {jest/vitest}
118
- **Command:** `pnpm test`
119
-
120
- ### Tests to Create
121
-
122
- **Integration:** `src/auth/register.test.ts`
123
- - creates user with valid data (happy path)
124
- - rejects invalid email (error case)
125
- - handles auth failure (error case)
126
-
127
- **Unit:** `src/utils/validation.test.ts`
128
- - validates correct email
129
- - rejects malformed email
130
- ```
131
-
132
- **If `{auto_mode}` = false:**
133
-
134
- ```yaml
135
- questions:
136
- - header: "Tests"
137
- question: "Review the test plan. Ready to create tests?"
138
- options:
139
- - label: "Create tests (Recommended)"
140
- description: "Proceed with planned tests"
141
- - label: "Add more tests"
142
- description: "I want additional test cases"
143
- - label: "Modify approach"
144
- description: "Change the strategy"
145
- - label: "Skip tests"
146
- description: "Don't create tests"
147
- multiSelect: false
148
- ```
149
-
150
- ### 6. Create Tests
151
-
152
- **CRITICAL: Follow existing patterns EXACTLY**
153
-
154
- 1. Read similar test for reference
155
- 2. Create test file matching structure
156
- 3. Write tests following conventions
157
-
158
- ```typescript
159
- import { describe, it, expect, beforeEach } from 'vitest'
160
-
161
- describe('POST /api/auth/register', () => {
162
- beforeEach(async () => {
163
- await db.user.deleteMany()
164
- })
165
-
166
- it('creates user with valid data', async () => {
167
- const response = await client.post('/api/auth/register', {
168
- email: 'test@example.com',
169
- password: 'SecurePass123!'
170
- })
171
-
172
- expect(response.status).toBe(201)
173
- })
174
-
175
- it('rejects invalid email', async () => {
176
- const response = await client.post('/api/auth/register', {
177
- email: 'invalid',
178
- password: 'SecurePass123!'
179
- })
180
-
181
- expect(response.status).toBe(400)
182
- })
183
- })
184
- ```
185
-
186
- ### 7. Verify Tests
187
-
188
- ```bash
189
- pnpm run typecheck
190
- ```
191
-
192
- List created tests:
193
- ```
194
- **Tests Created:**
195
- - `src/auth/register.test.ts` (3 tests)
196
- - `src/utils/validation.test.ts` (2 tests)
197
- ```
198
-
199
- ### 8. Complete Save Output (if save_mode)
200
-
201
- **If `{save_mode}` = true:**
202
-
203
- Append to `{output_dir}/07-tests.md`:
204
- ```markdown
205
- ---
206
- ## Step Complete
207
- **Status:** ✓ Complete
208
- **Tests created:** {count}
209
- **Test files:** {list}
210
- **Next:** step-08-run-tests.md
211
- **Timestamp:** {ISO timestamp}
212
- ```
213
-
214
- ---
215
-
216
- ## SUCCESS METRICS:
217
-
218
- ✅ Test infrastructure analyzed
219
- ✅ Existing patterns studied
220
- ✅ Appropriate test types chosen
221
- ✅ Tests follow codebase conventions
222
- ✅ Tests pass syntax check
223
- ✅ All AC have corresponding tests
224
-
225
- ## FAILURE MODES:
226
-
227
- ❌ Writing tests without analyzing patterns
228
- ❌ Wrong test type for implementation
229
- ❌ Ignoring project conventions
230
- ❌ Tests don't match acceptance criteria
231
- ❌ Over-testing (testing implementation, not behavior)
232
- ❌ **CRITICAL**: Not using AskUserQuestion for approval
233
-
234
- ## TEST PROTOCOLS:
235
-
236
- - Analyze BEFORE writing
237
- - Follow existing patterns EXACTLY
238
- - Test behavior, not implementation
239
- - Map to acceptance criteria
240
- - Create minimal, focused tests
241
-
242
- ---
243
-
244
- ## NEXT STEP:
245
-
246
- After tests created, load `./step-08-run-tests.md`
247
-
248
- <critical>
249
- Remember: Create the RIGHT tests - analyze patterns first, then write!
250
- </critical>