aiblueprint-cli 1.4.41 → 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.
- package/claude-code-config/skills/{workflow-apex → apex}/SKILL.md +12 -54
- package/claude-code-config/skills/{workflow-apex → apex}/scripts/setup-templates.sh +6 -40
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-00-init.md +3 -24
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-04-validate.md +25 -38
- package/claude-code-config/skills/{workflow-apex → apex}/templates/00-context.md +0 -8
- package/claude-code-config/skills/{workflow-apex → apex}/templates/README.md +6 -25
- package/claude-code-config/skills/{meta-claude-memory → claude-memory}/SKILL.md +59 -1
- package/package.json +1 -1
- package/claude-code-config/skills/workflow-apex/steps/step-05-examine.md +0 -294
- package/claude-code-config/skills/workflow-apex/steps/step-06-resolve.md +0 -237
- package/claude-code-config/skills/workflow-apex/steps/step-07-tests.md +0 -250
- package/claude-code-config/skills/workflow-apex/steps/step-08-run-tests.md +0 -308
- package/claude-code-config/skills/workflow-apex/steps/step-09-finish.md +0 -193
- package/claude-code-config/skills/workflow-apex/templates/05-examine.md +0 -10
- package/claude-code-config/skills/workflow-apex/templates/06-resolve.md +0 -10
- package/claude-code-config/skills/workflow-apex/templates/07-tests.md +0 -10
- package/claude-code-config/skills/workflow-apex/templates/08-run-tests.md +0 -10
- package/claude-code-config/skills/workflow-apex/templates/09-finish.md +0 -10
- /package/claude-code-config/skills/{workflow-apex → apex}/scripts/update-progress.sh +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-00b-branch.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-00b-economy.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-00b-interactive.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-01-analyze.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-02-plan.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-03-execute.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/01-analyze.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/02-plan.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/03-execute.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/04-validate.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/step-complete.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/comprehensive-example.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/optimize-guide.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/project-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/prompting-techniques.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/rules-directory-guide.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/section-templates.md +0 -0
- /package/claude-code-config/skills/{git-commit → commit}/SKILL.md +0 -0
- /package/claude-code-config/skills/{git-create-pr → create-pr}/SKILL.md +0 -0
- /package/claude-code-config/skills/{utils-fix-errors → fix-errors}/SKILL.md +0 -0
- /package/claude-code-config/skills/{utils-fix-grammar → fix-grammar}/SKILL.md +0 -0
- /package/claude-code-config/skills/{git-fix-pr-comments → fix-pr-comments}/SKILL.md +0 -0
- /package/claude-code-config/skills/{git-merge → merge}/SKILL.md +0 -0
- /package/claude-code-config/skills/{utils-oneshot → oneshot}/SKILL.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/SKILL.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/anthropic-best-practices.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/anti-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/clarity-principles.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/context-management.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/few-shot-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/openai-best-practices.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/prompt-templates.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/reasoning-techniques.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/system-prompt-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/xml-structure.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/LICENSE.txt +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/SKILL.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/package.json +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/output-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/progressive-disclosure-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/prompting-integration.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/real-world-examples.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/script-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/workflows.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/xml-tag-guide.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/scripts/init-skill.ts +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/scripts/package-skill.ts +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/scripts/validate.ts +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/SKILL.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/context-management.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/debugging-agents.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/error-handling-and-recovery.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/evaluation-and-testing.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/orchestration-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/subagents.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/writing-subagent-prompts.md +0 -0
- /package/claude-code-config/skills/{utils-ultrathink → ultrathink}/SKILL.md +0 -0
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: step-05-examine
|
|
3
|
-
description: Adversarial code review - security, logic, and quality analysis
|
|
4
|
-
prev_step: steps/step-04-validate.md
|
|
5
|
-
next_step: steps/step-06-resolve.md
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Step 5: Examine (Adversarial Review)
|
|
9
|
-
|
|
10
|
-
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
-
|
|
12
|
-
- 🛑 NEVER skip security review
|
|
13
|
-
- 🛑 NEVER dismiss findings without justification
|
|
14
|
-
- 🛑 NEVER auto-approve without thorough review
|
|
15
|
-
- ✅ ALWAYS check OWASP top 10 vulnerabilities
|
|
16
|
-
- ✅ ALWAYS classify findings by severity and validity
|
|
17
|
-
- ✅ ALWAYS present findings table to user
|
|
18
|
-
- 📋 YOU ARE A SKEPTICAL REVIEWER, not a defender
|
|
19
|
-
- 💬 FOCUS on "What could go wrong?"
|
|
20
|
-
- 🚫 FORBIDDEN to approve without thorough analysis
|
|
21
|
-
|
|
22
|
-
## EXECUTION PROTOCOLS:
|
|
23
|
-
|
|
24
|
-
- 🎯 Launch parallel review agents (unless economy_mode)
|
|
25
|
-
- 💾 Document all findings with severity
|
|
26
|
-
- 📖 Create todos for each finding
|
|
27
|
-
- 🚫 FORBIDDEN to skip security analysis
|
|
28
|
-
|
|
29
|
-
## CONTEXT BOUNDARIES:
|
|
30
|
-
|
|
31
|
-
- Implementation is complete and validated
|
|
32
|
-
- All tests pass
|
|
33
|
-
- Now looking for issues that tests miss
|
|
34
|
-
- Adversarial mindset - assume bugs exist
|
|
35
|
-
|
|
36
|
-
## YOUR TASK:
|
|
37
|
-
|
|
38
|
-
Conduct an adversarial code review to identify security vulnerabilities, logic flaws, and quality issues.
|
|
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
|
-
| `{economy_mode}` | No subagents, direct review |
|
|
52
|
-
| `{output_dir}` | Path to output (if save_mode) |
|
|
53
|
-
| Files modified | From 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}" "05" "examine" "in_progress"
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Append findings to `{output_dir}/05-examine.md` as you work.
|
|
69
|
-
|
|
70
|
-
### 2. Gather Changes
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
git diff --name-only HEAD~1
|
|
74
|
-
git status --porcelain
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Group files: source, tests, config, other.
|
|
78
|
-
|
|
79
|
-
### 3. Conduct Review
|
|
80
|
-
|
|
81
|
-
**If `{economy_mode}` = true:**
|
|
82
|
-
→ Self-review with checklist:
|
|
83
|
-
|
|
84
|
-
```markdown
|
|
85
|
-
## Security Checklist
|
|
86
|
-
- [ ] No SQL injection (parameterized queries)
|
|
87
|
-
- [ ] No XSS (output encoding)
|
|
88
|
-
- [ ] No secrets in code
|
|
89
|
-
- [ ] Input validation present
|
|
90
|
-
- [ ] Auth checks on protected routes
|
|
91
|
-
|
|
92
|
-
## Logic Checklist
|
|
93
|
-
- [ ] Error handling for all failure modes
|
|
94
|
-
- [ ] Edge cases handled
|
|
95
|
-
- [ ] Null/undefined checks
|
|
96
|
-
- [ ] Race conditions considered
|
|
97
|
-
|
|
98
|
-
## Quality Checklist
|
|
99
|
-
- [ ] Follows existing patterns
|
|
100
|
-
- [ ] No code duplication
|
|
101
|
-
- [ ] Clear naming
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
**If `{economy_mode}` = false:**
|
|
105
|
-
→ Launch parallel review agents
|
|
106
|
-
|
|
107
|
-
**CRITICAL: Launch ALL in a SINGLE message:**
|
|
108
|
-
|
|
109
|
-
**Agent 1: Security** (`code-reviewer`)
|
|
110
|
-
```
|
|
111
|
-
Review for OWASP Top 10:
|
|
112
|
-
- Injection flaws
|
|
113
|
-
- Auth/authz issues
|
|
114
|
-
- Data exposure
|
|
115
|
-
- Security misconfiguration
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Agent 2: Logic** (`code-reviewer`)
|
|
119
|
-
```
|
|
120
|
-
Review for:
|
|
121
|
-
- Edge cases not handled
|
|
122
|
-
- Race conditions
|
|
123
|
-
- Null handling
|
|
124
|
-
- Incorrect logic
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**Agent 3: Clean Code** (`code-reviewer`)
|
|
128
|
-
```
|
|
129
|
-
Review for:
|
|
130
|
-
- SOLID violations
|
|
131
|
-
- Code smells
|
|
132
|
-
- Complexity issues
|
|
133
|
-
- Duplication >20 lines
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**Agent 4: Vercel/Next.js Best Practices** (CONDITIONAL)
|
|
137
|
-
|
|
138
|
-
→ **Detection:** Check if modified files match Next.js/Vercel patterns:
|
|
139
|
-
```
|
|
140
|
-
- *.tsx, *.jsx files in app/, pages/, components/
|
|
141
|
-
- next.config.* files
|
|
142
|
-
- Server actions (use server)
|
|
143
|
-
- API routes (app/api/*, pages/api/*)
|
|
144
|
-
- Middleware (middleware.ts)
|
|
145
|
-
- Server components, client components
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
→ **If Next.js/Vercel code detected:**
|
|
149
|
-
|
|
150
|
-
Launch additional agent using Skill tool:
|
|
151
|
-
```yaml
|
|
152
|
-
skill: "vercel-react-best-practices"
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
This agent reviews for:
|
|
156
|
-
- Async parallel patterns (Promise.all vs sequential awaits)
|
|
157
|
-
- Bundle optimization (barrel imports, dynamic imports)
|
|
158
|
-
- Server-side caching (React cache, unstable_cache)
|
|
159
|
-
- Re-render optimization (memo, useMemo, useCallback usage)
|
|
160
|
-
- Server vs Client component boundaries
|
|
161
|
-
- Data fetching patterns (preloading, parallel fetching)
|
|
162
|
-
|
|
163
|
-
→ **If NOT Next.js/Vercel code:** Skip this agent
|
|
164
|
-
|
|
165
|
-
### 4. Classify Findings
|
|
166
|
-
|
|
167
|
-
For each finding:
|
|
168
|
-
|
|
169
|
-
**Severity:**
|
|
170
|
-
- CRITICAL: Security vulnerability, data loss risk
|
|
171
|
-
- HIGH: Significant bug, will cause issues
|
|
172
|
-
- MEDIUM: Should fix, not urgent
|
|
173
|
-
- LOW: Minor improvement
|
|
174
|
-
|
|
175
|
-
**Validity:**
|
|
176
|
-
- Real: Definitely needs fixing
|
|
177
|
-
- Noise: Not actually a problem
|
|
178
|
-
- Uncertain: Needs discussion
|
|
179
|
-
|
|
180
|
-
### 5. Present Findings Table
|
|
181
|
-
|
|
182
|
-
```markdown
|
|
183
|
-
## Findings
|
|
184
|
-
|
|
185
|
-
| ID | Severity | Category | Location | Issue | Validity |
|
|
186
|
-
|----|----------|----------|----------|-------|----------|
|
|
187
|
-
| F1 | CRITICAL | Security | auth.ts:42 | SQL injection | Real |
|
|
188
|
-
| F2 | HIGH | Logic | handler.ts:78 | Missing null check | Real |
|
|
189
|
-
| F3 | MEDIUM | Quality | utils.ts:15 | Complex function | Uncertain |
|
|
190
|
-
|
|
191
|
-
**Summary:** {count} findings ({blocking} blocking)
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### 6. Create Finding Todos
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
- [ ] F1 [CRITICAL] Fix SQL injection in auth.ts:42
|
|
198
|
-
- [ ] F2 [HIGH] Add null check in handler.ts:78
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### 7. Get User Approval (review → resolve/test)
|
|
202
|
-
|
|
203
|
-
**If `{auto_mode}` = true:**
|
|
204
|
-
→ Proceed automatically based on findings
|
|
205
|
-
|
|
206
|
-
**If `{auto_mode}` = false:**
|
|
207
|
-
|
|
208
|
-
```yaml
|
|
209
|
-
questions:
|
|
210
|
-
- header: "Review"
|
|
211
|
-
question: "Review complete. How would you like to proceed?"
|
|
212
|
-
options:
|
|
213
|
-
- label: "Resolve findings (Recommended)"
|
|
214
|
-
description: "Address the identified issues"
|
|
215
|
-
- label: "Skip to tests"
|
|
216
|
-
description: "Skip resolution, proceed to test creation"
|
|
217
|
-
- label: "Skip resolution"
|
|
218
|
-
description: "Accept findings, don't make changes"
|
|
219
|
-
- label: "Discuss findings"
|
|
220
|
-
description: "I want to discuss specific findings"
|
|
221
|
-
multiSelect: false
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
<critical>
|
|
225
|
-
This is one of the THREE transition points that requires user confirmation:
|
|
226
|
-
1. plan → execute
|
|
227
|
-
2. validate → review
|
|
228
|
-
3. review → resolve/test (THIS ONE)
|
|
229
|
-
</critical>
|
|
230
|
-
|
|
231
|
-
### 8. Complete Save Output (if save_mode)
|
|
232
|
-
|
|
233
|
-
**If `{save_mode}` = true:**
|
|
234
|
-
|
|
235
|
-
Append to `{output_dir}/05-examine.md`:
|
|
236
|
-
```markdown
|
|
237
|
-
---
|
|
238
|
-
## Step Complete
|
|
239
|
-
**Status:** ✓ Complete
|
|
240
|
-
**Findings:** {count}
|
|
241
|
-
**Critical:** {count}
|
|
242
|
-
**Next:** step-06-resolve.md
|
|
243
|
-
**Timestamp:** {ISO timestamp}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
---
|
|
247
|
-
|
|
248
|
-
## SUCCESS METRICS:
|
|
249
|
-
|
|
250
|
-
✅ All modified files reviewed
|
|
251
|
-
✅ Security checklist completed
|
|
252
|
-
✅ Findings classified by severity
|
|
253
|
-
✅ Validity assessed for each finding
|
|
254
|
-
✅ Findings table presented
|
|
255
|
-
✅ Todos created for tracking
|
|
256
|
-
✅ Next.js/Vercel best practices checked (if applicable)
|
|
257
|
-
|
|
258
|
-
## FAILURE MODES:
|
|
259
|
-
|
|
260
|
-
❌ Skipping security review
|
|
261
|
-
❌ Not classifying by severity
|
|
262
|
-
❌ Auto-dismissing findings
|
|
263
|
-
❌ Launching agents sequentially
|
|
264
|
-
❌ Using subagents when economy_mode
|
|
265
|
-
❌ Skipping Vercel/Next.js review when React/Next.js files are modified
|
|
266
|
-
❌ **CRITICAL**: Not using AskUserQuestion for review → resolve/test transition
|
|
267
|
-
|
|
268
|
-
## REVIEW PROTOCOLS:
|
|
269
|
-
|
|
270
|
-
- Adversarial mindset - assume bugs exist
|
|
271
|
-
- Check security FIRST
|
|
272
|
-
- Every finding gets severity and validity
|
|
273
|
-
- Don't dismiss without justification
|
|
274
|
-
- Present clear summary
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## NEXT STEP:
|
|
279
|
-
|
|
280
|
-
After user confirms via AskUserQuestion (or auto-proceed):
|
|
281
|
-
|
|
282
|
-
**If user chooses "Resolve findings":** → Load `./step-06-resolve.md`
|
|
283
|
-
|
|
284
|
-
**If user chooses "Skip to tests" (and test_mode):** → Load `./step-07-tests.md`
|
|
285
|
-
|
|
286
|
-
**If user chooses "Skip resolution":**
|
|
287
|
-
- **If test_mode:** → Load `./step-07-tests.md`
|
|
288
|
-
- **If pr_mode:** → Load `./step-09-finish.md` to create pull request
|
|
289
|
-
- **Otherwise:** → Workflow complete - show summary
|
|
290
|
-
|
|
291
|
-
<critical>
|
|
292
|
-
Remember: Be SKEPTICAL - your job is to find problems, not approve code!
|
|
293
|
-
This step MUST ask before proceeding (unless auto_mode).
|
|
294
|
-
</critical>
|
|
@@ -1,237 +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
|
-
|
|
35
|
-
## YOUR TASK:
|
|
36
|
-
|
|
37
|
-
Address adversarial review findings interactively - fix real issues, dismiss noise, discuss uncertain items.
|
|
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}` | Auto-fix Real findings |
|
|
49
|
-
| `{save_mode}` | Save outputs to files |
|
|
50
|
-
| `{output_dir}` | Path to output (if save_mode) |
|
|
51
|
-
| Findings table | IDs, severity, validity |
|
|
52
|
-
| Finding todos | For tracking |
|
|
53
|
-
</available_state>
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## EXECUTION SEQUENCE:
|
|
58
|
-
|
|
59
|
-
### 1. Initialize Save Output (if save_mode)
|
|
60
|
-
|
|
61
|
-
**If `{save_mode}` = true:**
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
bash {skill_dir}/scripts/update-progress.sh "{task_id}" "06" "resolve" "in_progress"
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Append logs to `{output_dir}/06-resolve.md` as you work.
|
|
68
|
-
|
|
69
|
-
### 2. Present Resolution Options
|
|
70
|
-
|
|
71
|
-
**If `{auto_mode}` = true:**
|
|
72
|
-
→ Auto-fix all "Real" findings, skip Noise/Uncertain
|
|
73
|
-
|
|
74
|
-
**If `{auto_mode}` = false:**
|
|
75
|
-
|
|
76
|
-
```yaml
|
|
77
|
-
questions:
|
|
78
|
-
- header: "Resolution"
|
|
79
|
-
question: "How would you like to handle these findings?"
|
|
80
|
-
options:
|
|
81
|
-
- label: "Auto-fix Real issues (Recommended)"
|
|
82
|
-
description: "Fix 'Real' findings, skip noise/uncertain"
|
|
83
|
-
- label: "Walk through each finding"
|
|
84
|
-
description: "Decide on each finding individually"
|
|
85
|
-
- label: "Fix only critical"
|
|
86
|
-
description: "Only fix CRITICAL/BLOCKING issues"
|
|
87
|
-
- label: "Skip all"
|
|
88
|
-
description: "Acknowledge but don't change"
|
|
89
|
-
multiSelect: false
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### 3. Apply Fixes Based on Choice
|
|
93
|
-
|
|
94
|
-
**Auto-fix Real:**
|
|
95
|
-
1. Filter to Real findings only
|
|
96
|
-
2. For each: Read file → Apply fix → Verify
|
|
97
|
-
3. Log each fix
|
|
98
|
-
|
|
99
|
-
**Walk through each:**
|
|
100
|
-
For each finding in severity order:
|
|
101
|
-
|
|
102
|
-
```yaml
|
|
103
|
-
questions:
|
|
104
|
-
- header: "F1"
|
|
105
|
-
question: "How should we handle this finding?"
|
|
106
|
-
options:
|
|
107
|
-
- label: "Fix now (Recommended)"
|
|
108
|
-
description: "Apply the suggested fix"
|
|
109
|
-
- label: "Skip"
|
|
110
|
-
description: "Acknowledge but don't fix"
|
|
111
|
-
- label: "Discuss"
|
|
112
|
-
description: "Need more context"
|
|
113
|
-
- label: "Mark as noise"
|
|
114
|
-
description: "Not a real issue"
|
|
115
|
-
multiSelect: false
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Fix only critical:**
|
|
119
|
-
1. Filter to CRITICAL/BLOCKING only
|
|
120
|
-
2. Auto-fix those, skip others
|
|
121
|
-
|
|
122
|
-
**Skip all:**
|
|
123
|
-
1. Acknowledge findings
|
|
124
|
-
2. If Critical/High exist, confirm:
|
|
125
|
-
|
|
126
|
-
```yaml
|
|
127
|
-
questions:
|
|
128
|
-
- header: "Confirm"
|
|
129
|
-
question: "You have unresolved Critical/High findings. Proceed anyway?"
|
|
130
|
-
options:
|
|
131
|
-
- label: "Go back and fix"
|
|
132
|
-
description: "Return to resolution options"
|
|
133
|
-
- label: "Proceed anyway"
|
|
134
|
-
description: "Accept risks, continue"
|
|
135
|
-
- label: "Fix only critical"
|
|
136
|
-
description: "Just fix critical issues"
|
|
137
|
-
multiSelect: false
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### 4. Post-Resolution Validation
|
|
141
|
-
|
|
142
|
-
After any fixes:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
pnpm run typecheck && pnpm run lint
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Both MUST pass.
|
|
149
|
-
|
|
150
|
-
### 5. Resolution Summary
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
**Resolution Complete**
|
|
154
|
-
|
|
155
|
-
**Fixed:** {count}
|
|
156
|
-
- F1: Parameterized SQL query in auth.ts:42
|
|
157
|
-
- F2: Added null check in handler.ts:78
|
|
158
|
-
|
|
159
|
-
**Skipped:** {count}
|
|
160
|
-
- F3: Complex function (uncertain)
|
|
161
|
-
|
|
162
|
-
**Validation:** ✓ Passed
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### 6. Complete Save Output (if save_mode)
|
|
166
|
-
|
|
167
|
-
**If `{save_mode}` = true:**
|
|
168
|
-
|
|
169
|
-
Append to `{output_dir}/06-resolve.md`:
|
|
170
|
-
```markdown
|
|
171
|
-
---
|
|
172
|
-
## Step Complete
|
|
173
|
-
**Status:** ✓ Complete
|
|
174
|
-
**Findings fixed:** {count}
|
|
175
|
-
**Findings skipped:** {count}
|
|
176
|
-
**Validation:** ✓ Passed
|
|
177
|
-
**Timestamp:** {ISO timestamp}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### 7. Completion Summary
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
**APEX Workflow Complete**
|
|
184
|
-
|
|
185
|
-
**Task:** {task_description}
|
|
186
|
-
|
|
187
|
-
**Implementation:**
|
|
188
|
-
- Files modified: {count}
|
|
189
|
-
- All checks passing: ✓
|
|
190
|
-
|
|
191
|
-
**Review:**
|
|
192
|
-
- Findings identified: {total}
|
|
193
|
-
- Findings resolved: {fixed}
|
|
194
|
-
- Findings skipped: {skipped}
|
|
195
|
-
|
|
196
|
-
**Next Steps:**
|
|
197
|
-
- [ ] Commit changes
|
|
198
|
-
- [ ] Run full test suite
|
|
199
|
-
- [ ] Deploy when ready
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## SUCCESS METRICS:
|
|
205
|
-
|
|
206
|
-
✅ User chose resolution approach
|
|
207
|
-
✅ All chosen fixes applied correctly
|
|
208
|
-
✅ Validation passes after fixes
|
|
209
|
-
✅ Clear summary of resolved/skipped
|
|
210
|
-
✅ User understands next steps
|
|
211
|
-
|
|
212
|
-
## FAILURE MODES:
|
|
213
|
-
|
|
214
|
-
❌ Auto-fixing Noise or Uncertain findings
|
|
215
|
-
❌ Not validating after fixes
|
|
216
|
-
❌ No clear completion summary
|
|
217
|
-
❌ Proceeding with failing validation
|
|
218
|
-
❌ **CRITICAL**: Not using AskUserQuestion for decisions
|
|
219
|
-
|
|
220
|
-
## RESOLUTION PROTOCOLS:
|
|
221
|
-
|
|
222
|
-
- Only auto-fix Real findings
|
|
223
|
-
- Validate after EVERY fix round
|
|
224
|
-
- Clear summary at the end
|
|
225
|
-
- User controls final decision
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## NEXT STEP:
|
|
230
|
-
|
|
231
|
-
Based on flags:
|
|
232
|
-
- **If pr_mode:** Load `./step-09-finish.md` to create pull request
|
|
233
|
-
- **Otherwise:** Workflow complete - show summary
|
|
234
|
-
|
|
235
|
-
<critical>
|
|
236
|
-
Remember: Always validate after fixes - never proceed with failing checks!
|
|
237
|
-
</critical>
|