devflow-kit 0.5.0 → 0.6.0
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/CHANGELOG.md +68 -0
- package/README.md +26 -9
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +12 -3
- package/dist/commands/init.js.map +1 -1
- package/package.json +1 -1
- package/src/claude/agents/devflow/audit-architecture.md +92 -110
- package/src/claude/agents/devflow/audit-complexity.md +94 -130
- package/src/claude/agents/devflow/audit-database.md +95 -136
- package/src/claude/agents/devflow/audit-dependencies.md +94 -136
- package/src/claude/agents/devflow/audit-documentation.md +82 -323
- package/src/claude/agents/devflow/audit-performance.md +212 -107
- package/src/claude/agents/devflow/audit-security.md +201 -83
- package/src/claude/agents/devflow/audit-tests.md +82 -471
- package/src/claude/agents/devflow/audit-typescript.md +83 -311
- package/src/claude/agents/devflow/pull-request.md +423 -0
- package/src/claude/commands/devflow/code-review.md +297 -248
- package/src/claude/commands/devflow/plan-next-steps.md +1 -1
- package/src/claude/commands/devflow/plan.md +485 -0
- package/src/claude/commands/devflow/pull-request.md +269 -0
- package/src/claude/commands/devflow/resolve-comments.md +583 -0
- package/src/claude/scripts/statusline.sh +0 -36
|
@@ -5,378 +5,427 @@ allowed-tools: Task, Bash, Read, Write, Grep, Glob
|
|
|
5
5
|
|
|
6
6
|
## Your Task
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Orchestrate multiple specialized audit sub-agents to review the current branch, then synthesize their findings into an actionable summary.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Step 1: Determine Review Scope
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
Get the current branch and base branch:
|
|
13
15
|
|
|
14
16
|
```bash
|
|
15
17
|
# Get current branch
|
|
16
18
|
CURRENT_BRANCH=$(git branch --show-current)
|
|
17
19
|
if [ -z "$CURRENT_BRANCH" ]; then
|
|
18
|
-
echo "❌ Not on a branch (detached HEAD)
|
|
20
|
+
echo "❌ Not on a branch (detached HEAD)"
|
|
19
21
|
exit 1
|
|
20
22
|
fi
|
|
21
23
|
|
|
22
|
-
#
|
|
24
|
+
# Find base branch
|
|
23
25
|
BASE_BRANCH=""
|
|
24
26
|
for branch in main master develop; do
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
if git show-ref --verify --quiet refs/heads/$branch; then
|
|
28
|
+
BASE_BRANCH=$branch
|
|
29
|
+
break
|
|
30
|
+
fi
|
|
29
31
|
done
|
|
30
32
|
|
|
31
33
|
if [ -z "$BASE_BRANCH" ]; then
|
|
32
|
-
echo "❌ Could not find base branch (main/master/develop)
|
|
34
|
+
echo "❌ Could not find base branch (main/master/develop)"
|
|
33
35
|
exit 1
|
|
34
36
|
fi
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
echo "Current branch: $CURRENT_BRANCH"
|
|
38
|
-
echo "Base branch: $BASE_BRANCH"
|
|
39
|
-
echo ""
|
|
40
|
-
|
|
41
|
-
# Check if there are changes to review
|
|
38
|
+
# Check for changes
|
|
42
39
|
if git diff --quiet $BASE_BRANCH...HEAD; then
|
|
43
|
-
echo "No changes between $BASE_BRANCH and $CURRENT_BRANCH"
|
|
40
|
+
echo "ℹ️ No changes between $BASE_BRANCH and $CURRENT_BRANCH"
|
|
44
41
|
exit 0
|
|
45
42
|
fi
|
|
46
43
|
|
|
47
|
-
# Show
|
|
48
|
-
echo "===
|
|
44
|
+
# Show change summary
|
|
45
|
+
echo "=== CODE REVIEW SCOPE ==="
|
|
46
|
+
echo "Branch: $CURRENT_BRANCH"
|
|
47
|
+
echo "Base: $BASE_BRANCH"
|
|
48
|
+
echo ""
|
|
49
49
|
git diff --stat $BASE_BRANCH...HEAD
|
|
50
50
|
echo ""
|
|
51
|
-
|
|
52
|
-
git log --oneline $BASE_BRANCH..HEAD
|
|
51
|
+
git log --oneline $BASE_BRANCH..HEAD | head -5
|
|
53
52
|
echo ""
|
|
54
53
|
```
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
---
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
## Step 2: Set Up Audit Structure
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
# Check if database-related files changed
|
|
62
|
-
DB_CHANGES=$(git diff --name-only $BASE_BRANCH...HEAD | grep -E '\.(sql|prisma|migration|knex|sequelize|db)' || true)
|
|
63
|
-
DB_CHANGES+=$(git diff --name-only $BASE_BRANCH...HEAD | grep -iE '(migration|schema|database|models/)' || true)
|
|
64
|
-
|
|
65
|
-
if [ -n "$DB_CHANGES" ]; then
|
|
66
|
-
echo "🗄️ Database changes detected - will run database audit"
|
|
67
|
-
INCLUDE_DB_AUDIT=true
|
|
68
|
-
else
|
|
69
|
-
echo "ℹ️ No database changes detected - skipping database audit"
|
|
70
|
-
INCLUDE_DB_AUDIT=false
|
|
71
|
-
fi
|
|
72
|
-
echo ""
|
|
59
|
+
Create directory for audit reports:
|
|
73
60
|
|
|
74
|
-
|
|
61
|
+
```bash
|
|
75
62
|
TIMESTAMP=$(date +%Y-%m-%d_%H%M)
|
|
76
63
|
AUDIT_BASE_DIR=".docs/audits/${CURRENT_BRANCH}"
|
|
77
64
|
mkdir -p "$AUDIT_BASE_DIR"
|
|
78
65
|
|
|
79
|
-
echo "📁 Audit reports
|
|
66
|
+
echo "📁 Audit reports: $AUDIT_BASE_DIR"
|
|
80
67
|
echo ""
|
|
81
68
|
```
|
|
82
69
|
|
|
83
|
-
|
|
70
|
+
---
|
|
84
71
|
|
|
85
|
-
Launch
|
|
72
|
+
## Step 3: Launch Audit Sub-Agents in Parallel
|
|
86
73
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
74
|
+
Use the Task tool to launch all audit sub-agents in parallel. Each will analyze the branch and save its report.
|
|
75
|
+
|
|
76
|
+
**Launch these sub-agents:**
|
|
77
|
+
|
|
78
|
+
Use Task tool with `subagent_type` for each audit:
|
|
91
79
|
|
|
92
|
-
Each sub-agent should save its report to:
|
|
93
|
-
```
|
|
94
|
-
${AUDIT_BASE_DIR}/<audit-type>-report.${TIMESTAMP}.md
|
|
95
80
|
```
|
|
81
|
+
1. Launch audit-security sub-agent:
|
|
82
|
+
"Analyze branch ${CURRENT_BRANCH} for security issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/security-report.${TIMESTAMP}.md"
|
|
96
83
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- `.docs/audits/feature-auth/performance-report.2025-10-18_1430.md`
|
|
84
|
+
2. Launch audit-performance sub-agent:
|
|
85
|
+
"Analyze branch ${CURRENT_BRANCH} for performance issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/performance-report.${TIMESTAMP}.md"
|
|
100
86
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
2. audit-performance sub-agent → `${AUDIT_BASE_DIR}/performance-report.${TIMESTAMP}.md`
|
|
104
|
-
3. audit-architecture sub-agent → `${AUDIT_BASE_DIR}/architecture-report.${TIMESTAMP}.md`
|
|
105
|
-
4. audit-tests sub-agent → `${AUDIT_BASE_DIR}/tests-report.${TIMESTAMP}.md`
|
|
106
|
-
5. audit-complexity sub-agent → `${AUDIT_BASE_DIR}/complexity-report.${TIMESTAMP}.md`
|
|
107
|
-
6. audit-dependencies sub-agent → `${AUDIT_BASE_DIR}/dependencies-report.${TIMESTAMP}.md`
|
|
108
|
-
7. audit-documentation sub-agent → `${AUDIT_BASE_DIR}/documentation-report.${TIMESTAMP}.md`
|
|
87
|
+
3. Launch audit-architecture sub-agent:
|
|
88
|
+
"Analyze branch ${CURRENT_BRANCH} for architecture issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/architecture-report.${TIMESTAMP}.md"
|
|
109
89
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
9. audit-database sub-agent → `${AUDIT_BASE_DIR}/database-report.${TIMESTAMP}.md`
|
|
90
|
+
4. Launch audit-tests sub-agent:
|
|
91
|
+
"Analyze branch ${CURRENT_BRANCH} for test coverage and quality issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/tests-report.${TIMESTAMP}.md"
|
|
113
92
|
|
|
114
|
-
|
|
93
|
+
5. Launch audit-complexity sub-agent:
|
|
94
|
+
"Analyze branch ${CURRENT_BRANCH} for code complexity issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/complexity-report.${TIMESTAMP}.md"
|
|
115
95
|
|
|
116
|
-
|
|
96
|
+
6. Launch audit-dependencies sub-agent:
|
|
97
|
+
"Analyze branch ${CURRENT_BRANCH} for dependency issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/dependencies-report.${TIMESTAMP}.md"
|
|
117
98
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
3. **Prioritize for PR**: Focus on merge-blocking vs nice-to-have improvements
|
|
121
|
-
4. **Create PR-Ready Review**: Structure for easy consumption by human reviewers
|
|
99
|
+
7. Launch audit-documentation sub-agent:
|
|
100
|
+
"Analyze branch ${CURRENT_BRANCH} for documentation issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/documentation-report.${TIMESTAMP}.md"
|
|
122
101
|
|
|
123
|
-
|
|
102
|
+
8. Launch audit-typescript sub-agent (if TypeScript project):
|
|
103
|
+
"Analyze branch ${CURRENT_BRANCH} for TypeScript issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/typescript-report.${TIMESTAMP}.md"
|
|
124
104
|
|
|
125
|
-
|
|
105
|
+
9. Launch audit-database sub-agent (if database changes detected):
|
|
106
|
+
"Analyze branch ${CURRENT_BRANCH} for database issues. Compare against ${BASE_BRANCH}. Save report to ${AUDIT_BASE_DIR}/database-report.${TIMESTAMP}.md"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**IMPORTANT:** Launch ALL applicable sub-agents in a single message using multiple Task tool calls for parallel execution.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Step 4: Read Audit Reports
|
|
114
|
+
|
|
115
|
+
After all sub-agents complete, read each generated report:
|
|
126
116
|
|
|
127
117
|
```bash
|
|
128
|
-
|
|
118
|
+
# List generated reports
|
|
119
|
+
ls -1 "$AUDIT_BASE_DIR"/*-report.${TIMESTAMP}.md
|
|
129
120
|
```
|
|
130
121
|
|
|
131
|
-
|
|
122
|
+
Use the Read tool to read each report file:
|
|
123
|
+
- `${AUDIT_BASE_DIR}/security-report.${TIMESTAMP}.md`
|
|
124
|
+
- `${AUDIT_BASE_DIR}/performance-report.${TIMESTAMP}.md`
|
|
125
|
+
- `${AUDIT_BASE_DIR}/architecture-report.${TIMESTAMP}.md`
|
|
126
|
+
- `${AUDIT_BASE_DIR}/tests-report.${TIMESTAMP}.md`
|
|
127
|
+
- `${AUDIT_BASE_DIR}/complexity-report.${TIMESTAMP}.md`
|
|
128
|
+
- `${AUDIT_BASE_DIR}/dependencies-report.${TIMESTAMP}.md`
|
|
129
|
+
- `${AUDIT_BASE_DIR}/documentation-report.${TIMESTAMP}.md`
|
|
130
|
+
- (Plus typescript and database reports if generated)
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Step 5: Extract Blocking Issues
|
|
135
|
+
|
|
136
|
+
From each report, extract issues from the **🔴 Issues in Your Changes** section.
|
|
137
|
+
|
|
138
|
+
These are blocking issues introduced in this branch that must be fixed before merge.
|
|
139
|
+
|
|
140
|
+
For each report:
|
|
141
|
+
1. Look for the "🔴 Issues in Your Changes (BLOCKING)" section
|
|
142
|
+
2. Extract all CRITICAL and HIGH severity issues
|
|
143
|
+
3. Note the file:line references
|
|
144
|
+
|
|
145
|
+
Create a consolidated list of all blocking issues across all audits.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Step 6: Create Summary Report
|
|
150
|
+
|
|
151
|
+
Create a comprehensive summary at `${AUDIT_BASE_DIR}/review-summary.${TIMESTAMP}.md`:
|
|
132
152
|
|
|
133
153
|
```markdown
|
|
134
|
-
#
|
|
135
|
-
|
|
136
|
-
**
|
|
137
|
-
**
|
|
138
|
-
**
|
|
139
|
-
**
|
|
140
|
-
**Reviewer**: AI Sub-Agent Orchestra
|
|
154
|
+
# Code Review Summary - ${CURRENT_BRANCH}
|
|
155
|
+
|
|
156
|
+
**Date**: $(date +%Y-%m-%d %H:%M:%S)
|
|
157
|
+
**Branch**: ${CURRENT_BRANCH}
|
|
158
|
+
**Base**: ${BASE_BRANCH}
|
|
159
|
+
**Audits Run**: {count} specialized audits
|
|
141
160
|
|
|
142
161
|
---
|
|
143
162
|
|
|
144
|
-
##
|
|
163
|
+
## 🚦 Merge Recommendation
|
|
145
164
|
|
|
146
|
-
|
|
147
|
-
**
|
|
148
|
-
**
|
|
149
|
-
**
|
|
150
|
-
**
|
|
165
|
+
{One of:}
|
|
166
|
+
- ❌ **BLOCK MERGE** - Critical issues in your changes must be fixed
|
|
167
|
+
- ⚠️ **REVIEW REQUIRED** - High priority issues need attention
|
|
168
|
+
- ✅ **APPROVED WITH CONDITIONS** - Minor issues to address
|
|
169
|
+
- ✅ **APPROVED** - No blocking issues found
|
|
151
170
|
|
|
152
|
-
|
|
153
|
-
- 🎯 **Features**: {feature_changes}
|
|
154
|
-
- 🐛 **Bug Fixes**: {bug_fixes}
|
|
155
|
-
- 🔧 **Refactoring**: {refactoring}
|
|
156
|
-
- 📚 **Documentation**: {doc_changes}
|
|
157
|
-
- 🧪 **Tests**: {test_changes}
|
|
171
|
+
**Confidence**: {High/Medium/Low}
|
|
158
172
|
|
|
159
173
|
---
|
|
160
174
|
|
|
161
|
-
##
|
|
175
|
+
## 🔴 Blocking Issues (Must Fix Before Merge)
|
|
176
|
+
|
|
177
|
+
Issues introduced in lines you added or modified:
|
|
178
|
+
|
|
179
|
+
### Security (CRITICAL: X, HIGH: Y)
|
|
180
|
+
{List critical/high issues from security audit's 🔴 section}
|
|
181
|
+
- **[Issue]** - `file:line` - {description}
|
|
182
|
+
|
|
183
|
+
### Performance (CRITICAL: X, HIGH: Y)
|
|
184
|
+
{List critical/high issues from performance audit's 🔴 section}
|
|
185
|
+
- **[Issue]** - `file:line` - {description}
|
|
162
186
|
|
|
163
|
-
###
|
|
164
|
-
|
|
187
|
+
### Architecture (HIGH: X)
|
|
188
|
+
{List high issues from architecture audit's 🔴 section}
|
|
189
|
+
- **[Issue]** - `file:line` - {description}
|
|
165
190
|
|
|
166
|
-
|
|
191
|
+
### Tests (HIGH: X)
|
|
192
|
+
{List high issues from tests audit's 🔴 section}
|
|
193
|
+
- **[Issue]** - `file:line` - {description}
|
|
167
194
|
|
|
168
|
-
###
|
|
169
|
-
|
|
170
|
-
-
|
|
195
|
+
### Complexity (HIGH: X)
|
|
196
|
+
{List high issues from complexity audit's 🔴 section}
|
|
197
|
+
- **[Issue]** - `file:line` - {description}
|
|
171
198
|
|
|
172
|
-
###
|
|
173
|
-
|
|
174
|
-
-
|
|
199
|
+
### Dependencies (CRITICAL: X, HIGH: Y)
|
|
200
|
+
{List critical/high issues from dependencies audit's 🔴 section}
|
|
201
|
+
- **[Issue]** - `file:line` - {description}
|
|
202
|
+
|
|
203
|
+
### Documentation (HIGH: X)
|
|
204
|
+
{List high issues from documentation audit's 🔴 section}
|
|
205
|
+
- **[Issue]** - `file:line` - {description}
|
|
206
|
+
|
|
207
|
+
### TypeScript (HIGH: X)
|
|
208
|
+
{If applicable - list high issues from typescript audit's 🔴 section}
|
|
209
|
+
- **[Issue]** - `file:line` - {description}
|
|
210
|
+
|
|
211
|
+
### Database (CRITICAL: X, HIGH: Y)
|
|
212
|
+
{If applicable - list critical/high issues from database audit's 🔴 section}
|
|
213
|
+
- **[Issue]** - `file:line` - {description}
|
|
175
214
|
|
|
176
215
|
---
|
|
177
216
|
|
|
178
|
-
##
|
|
217
|
+
## ⚠️ Should Fix While You're Here
|
|
179
218
|
|
|
180
|
-
|
|
181
|
-
**Risk Level**: {Low/Medium/High/Critical}
|
|
219
|
+
Issues in code you touched (from ⚠️ sections of each audit):
|
|
182
220
|
|
|
183
|
-
|
|
184
|
-
{
|
|
221
|
+
{Count of issues by audit - don't list all, just summarize}
|
|
222
|
+
- Security: {count} issues in code you touched
|
|
223
|
+
- Performance: {count} issues in code you touched
|
|
224
|
+
- Architecture: {count} issues in code you touched
|
|
225
|
+
- Tests: {count} issues in code you touched
|
|
226
|
+
- Complexity: {count} issues in code you touched
|
|
185
227
|
|
|
186
|
-
|
|
187
|
-
{specific security improvements needed}
|
|
228
|
+
See individual audit reports for details.
|
|
188
229
|
|
|
189
|
-
|
|
190
|
-
**Type Safety**: {Excellent/Good/Acceptable/Poor}
|
|
191
|
-
**Note**: Only included if TypeScript files changed or project uses TypeScript
|
|
230
|
+
---
|
|
192
231
|
|
|
193
|
-
|
|
194
|
-
{detailed type safety findings with file:line references}
|
|
232
|
+
## ℹ️ Pre-existing Issues Found
|
|
195
233
|
|
|
196
|
-
|
|
197
|
-
{specific type safety improvements needed}
|
|
234
|
+
Issues unrelated to your changes (from ℹ️ sections):
|
|
198
235
|
|
|
199
|
-
|
|
200
|
-
|
|
236
|
+
{Count by audit}
|
|
237
|
+
- Security: {count} pre-existing issues
|
|
238
|
+
- Performance: {count} pre-existing issues
|
|
239
|
+
- Architecture: {count} pre-existing issues
|
|
240
|
+
- Tests: {count} pre-existing issues
|
|
241
|
+
- Complexity: {count} pre-existing issues
|
|
242
|
+
- Dependencies: {count} pre-existing issues
|
|
243
|
+
- Documentation: {count} pre-existing issues
|
|
201
244
|
|
|
202
|
-
|
|
203
|
-
{detailed performance findings with optimizations}
|
|
245
|
+
Consider fixing in separate PRs.
|
|
204
246
|
|
|
205
|
-
|
|
206
|
-
{specific performance improvements}
|
|
247
|
+
---
|
|
207
248
|
|
|
208
|
-
|
|
209
|
-
**Architecture Quality**: {Excellent/Good/Acceptable/Poor}
|
|
249
|
+
## 📊 Summary by Category
|
|
210
250
|
|
|
211
|
-
|
|
212
|
-
|
|
251
|
+
**Your Changes (🔴 BLOCKING):**
|
|
252
|
+
- CRITICAL: {total_critical}
|
|
253
|
+
- HIGH: {total_high}
|
|
254
|
+
- MEDIUM: {total_medium}
|
|
213
255
|
|
|
214
|
-
|
|
215
|
-
|
|
256
|
+
**Code You Touched (⚠️ SHOULD FIX):**
|
|
257
|
+
- HIGH: {total_high}
|
|
258
|
+
- MEDIUM: {total_medium}
|
|
216
259
|
|
|
217
|
-
|
|
218
|
-
|
|
260
|
+
**Pre-existing (ℹ️ OPTIONAL):**
|
|
261
|
+
- MEDIUM: {total_medium}
|
|
262
|
+
- LOW: {total_low}
|
|
219
263
|
|
|
220
|
-
|
|
221
|
-
{detailed test coverage gaps and quality issues}
|
|
264
|
+
---
|
|
222
265
|
|
|
223
|
-
|
|
224
|
-
{specific tests that should be added}
|
|
266
|
+
## 🎯 Action Plan
|
|
225
267
|
|
|
226
|
-
|
|
227
|
-
**Maintainability Score**: {Excellent/Good/Acceptable/Poor}
|
|
268
|
+
**Before Merge (Priority Order):**
|
|
228
269
|
|
|
229
|
-
|
|
230
|
-
|
|
270
|
+
1. {Highest priority blocking issue from any audit}
|
|
271
|
+
- File: {file:line}
|
|
272
|
+
- Fix: {recommended fix}
|
|
231
273
|
|
|
232
|
-
|
|
233
|
-
|
|
274
|
+
2. {Second highest priority blocking issue}
|
|
275
|
+
- File: {file:line}
|
|
276
|
+
- Fix: {recommended fix}
|
|
234
277
|
|
|
235
|
-
|
|
236
|
-
|
|
278
|
+
3. {Third highest priority blocking issue}
|
|
279
|
+
- File: {file:line}
|
|
280
|
+
- Fix: {recommended fix}
|
|
237
281
|
|
|
238
|
-
|
|
239
|
-
{detailed dependency concerns and security issues}
|
|
282
|
+
{Continue for all blocking issues}
|
|
240
283
|
|
|
241
|
-
|
|
242
|
-
|
|
284
|
+
**While You're Here (Optional):**
|
|
285
|
+
- Review ⚠️ sections in individual audit reports
|
|
286
|
+
- Fix issues in code you modified
|
|
243
287
|
|
|
244
|
-
|
|
245
|
-
|
|
288
|
+
**Future Work:**
|
|
289
|
+
- Create issues for pre-existing problems
|
|
290
|
+
- Track in technical debt backlog
|
|
246
291
|
|
|
247
|
-
|
|
248
|
-
{detailed documentation drift, missing docs, stale examples}
|
|
292
|
+
---
|
|
249
293
|
|
|
250
|
-
|
|
251
|
-
{specific documentation updates needed}
|
|
294
|
+
## 📁 Individual Audit Reports
|
|
252
295
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
296
|
+
Detailed analysis available in:
|
|
297
|
+
- [Security Audit](security-report.${TIMESTAMP}.md)
|
|
298
|
+
- [Performance Audit](performance-report.${TIMESTAMP}.md)
|
|
299
|
+
- [Architecture Audit](architecture-report.${TIMESTAMP}.md)
|
|
300
|
+
- [Test Coverage Audit](tests-report.${TIMESTAMP}.md)
|
|
301
|
+
- [Complexity Audit](complexity-report.${TIMESTAMP}.md)
|
|
302
|
+
- [Dependencies Audit](dependencies-report.${TIMESTAMP}.md)
|
|
303
|
+
- [Documentation Audit](documentation-report.${TIMESTAMP}.md)
|
|
304
|
+
{If applicable:}
|
|
305
|
+
- [TypeScript Audit](typescript-report.${TIMESTAMP}.md)
|
|
306
|
+
- [Database Audit](database-report.${TIMESTAMP}.md)
|
|
256
307
|
|
|
257
|
-
|
|
258
|
-
{detailed database design, migration, and query issues}
|
|
308
|
+
---
|
|
259
309
|
|
|
260
|
-
|
|
261
|
-
|
|
310
|
+
## 💡 Next Steps
|
|
311
|
+
|
|
312
|
+
{If blocking issues exist:}
|
|
313
|
+
**Fix blocking issues then re-run `/code-review` to verify**
|
|
314
|
+
|
|
315
|
+
{If no blocking issues:}
|
|
316
|
+
**Ready to create PR:**
|
|
317
|
+
1. Run `/commit` to create final commits
|
|
318
|
+
2. Run `/pull-request` to create PR with this review as reference
|
|
319
|
+
|
|
320
|
+
{If issues in touched code:}
|
|
321
|
+
**Consider fixing ⚠️ issues while you're working in these files**
|
|
262
322
|
|
|
263
323
|
---
|
|
264
324
|
|
|
265
|
-
|
|
325
|
+
*Review generated by DevFlow audit orchestration*
|
|
326
|
+
*{Timestamp}*
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Save this summary using Write tool.
|
|
330
|
+
|
|
331
|
+
---
|
|
266
332
|
|
|
267
|
-
|
|
268
|
-
- [ ] {blocking_action_1} - {estimated_effort}
|
|
269
|
-
- [ ] {blocking_action_2} - {estimated_effort}
|
|
270
|
-
- [ ] {blocking_action_3} - {estimated_effort}
|
|
333
|
+
## Step 7: Present Results to Developer
|
|
271
334
|
|
|
272
|
-
|
|
273
|
-
- [ ] {improvement_1} - {estimated_effort}
|
|
274
|
-
- [ ] {improvement_2} - {estimated_effort}
|
|
275
|
-
- [ ] {improvement_3} - {estimated_effort}
|
|
335
|
+
Show clear, actionable summary:
|
|
276
336
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
337
|
+
```markdown
|
|
338
|
+
🔍 CODE REVIEW COMPLETE
|
|
339
|
+
|
|
340
|
+
**Branch**: ${CURRENT_BRANCH}
|
|
341
|
+
**Audits**: {count} specialized audits completed
|
|
280
342
|
|
|
281
343
|
---
|
|
282
344
|
|
|
283
|
-
##
|
|
345
|
+
## 🚦 Merge Status
|
|
346
|
+
|
|
347
|
+
{Show the merge recommendation - one of:}
|
|
348
|
+
❌ **BLOCK MERGE** - {count} critical issues in your changes
|
|
349
|
+
⚠️ **REVIEW REQUIRED** - {count} high priority issues
|
|
350
|
+
✅ **APPROVED WITH CONDITIONS** - {count} minor issues
|
|
351
|
+
✅ **APPROVED** - No blocking issues found
|
|
352
|
+
|
|
353
|
+
---
|
|
284
354
|
|
|
285
|
-
|
|
355
|
+
## 🔴 Issues You Introduced ({total_count})
|
|
286
356
|
|
|
287
|
-
|
|
288
|
-
- Security: {score}/10
|
|
289
|
-
- TypeScript: {score}/10 (if applicable)
|
|
290
|
-
- Performance: {score}/10
|
|
291
|
-
- Architecture: {score}/10
|
|
292
|
-
- Test Coverage: {score}/10
|
|
293
|
-
- Maintainability: {score}/10
|
|
294
|
-
- Dependencies: {score}/10
|
|
295
|
-
- Documentation: {score}/10
|
|
296
|
-
- Database: {score}/10 (if applicable)
|
|
357
|
+
{Show top 3-5 most critical blocking issues}
|
|
297
358
|
|
|
298
|
-
|
|
299
|
-
-
|
|
300
|
-
|
|
301
|
-
|
|
359
|
+
**Security:**
|
|
360
|
+
- {Issue 1} - `file:line`
|
|
361
|
+
|
|
362
|
+
**Performance:**
|
|
363
|
+
- {Issue 1} - `file:line`
|
|
364
|
+
|
|
365
|
+
**Architecture:**
|
|
366
|
+
- {Issue 1} - `file:line`
|
|
367
|
+
|
|
368
|
+
{Show total counts}
|
|
369
|
+
Total blocking issues: {count}
|
|
370
|
+
- CRITICAL: {count}
|
|
371
|
+
- HIGH: {count}
|
|
372
|
+
- MEDIUM: {count}
|
|
302
373
|
|
|
303
374
|
---
|
|
304
375
|
|
|
305
|
-
##
|
|
376
|
+
## ⚠️ Issues in Code You Touched ({total_count})
|
|
306
377
|
|
|
307
|
-
|
|
308
|
-
- {
|
|
309
|
-
- {
|
|
310
|
-
- {
|
|
378
|
+
{Show counts by audit}
|
|
379
|
+
- Security: {count} issues
|
|
380
|
+
- Performance: {count} issues
|
|
381
|
+
- Architecture: {count} issues
|
|
382
|
+
- Tests: {count} issues
|
|
383
|
+
- Complexity: {count} issues
|
|
311
384
|
|
|
312
|
-
|
|
313
|
-
- {related_issue_1} in {location}
|
|
314
|
-
- {related_issue_2} in {location}
|
|
385
|
+
See individual reports for details.
|
|
315
386
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
- {
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## ℹ️ Pre-existing Issues ({total_count})
|
|
390
|
+
|
|
391
|
+
{Show count by audit}
|
|
392
|
+
Found {count} legacy issues unrelated to your changes.
|
|
393
|
+
Consider fixing in separate PRs.
|
|
319
394
|
|
|
320
395
|
---
|
|
321
396
|
|
|
322
|
-
##
|
|
397
|
+
## 📁 Reports Saved
|
|
323
398
|
|
|
324
|
-
|
|
325
|
-
Based on sub-agent analysis, human reviewers should focus on:
|
|
326
|
-
1. {focus_area_1} - {reason}
|
|
327
|
-
2. {focus_area_2} - {reason}
|
|
328
|
-
3. {focus_area_3} - {reason}
|
|
399
|
+
**Summary**: ${AUDIT_BASE_DIR}/review-summary.${TIMESTAMP}.md
|
|
329
400
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
- {discussion_point_2}
|
|
333
|
-
- {discussion_point_3}
|
|
401
|
+
**Individual Audits**:
|
|
402
|
+
{List all generated reports}
|
|
334
403
|
|
|
335
404
|
---
|
|
336
405
|
|
|
337
|
-
|
|
338
|
-
*Next: Address blocking issues, then create PR with this review as reference*
|
|
339
|
-
```
|
|
406
|
+
## 🎯 Next Steps
|
|
340
407
|
|
|
341
|
-
|
|
408
|
+
{If blocking issues:}
|
|
409
|
+
1. Fix the {count} blocking issues listed above
|
|
410
|
+
2. Re-run `/code-review` to verify fixes
|
|
411
|
+
3. Then create PR with `/pull-request`
|
|
342
412
|
|
|
343
|
-
|
|
413
|
+
{If no blocking issues:}
|
|
414
|
+
1. Review ⚠️ issues (optional improvements)
|
|
415
|
+
2. Create commits: `/commit`
|
|
416
|
+
3. Create PR: `/pull-request`
|
|
344
417
|
|
|
418
|
+
{Always show:}
|
|
419
|
+
💡 Full details in: ${AUDIT_BASE_DIR}/review-summary.${TIMESTAMP}.md
|
|
345
420
|
```
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
2. {Second most critical blocking issue}
|
|
358
|
-
3. {Third most critical blocking issue}
|
|
359
|
-
|
|
360
|
-
⚡ QUICK WINS:
|
|
361
|
-
- {Easy fix 1} ({estimated time})
|
|
362
|
-
- {Easy fix 2} ({estimated time})
|
|
363
|
-
|
|
364
|
-
📄 Full review: ${AUDIT_BASE_DIR}/comprehensive-review.${TIMESTAMP}.md
|
|
365
|
-
|
|
366
|
-
📁 Individual audit reports:
|
|
367
|
-
${AUDIT_BASE_DIR}/security-report.${TIMESTAMP}.md
|
|
368
|
-
${AUDIT_BASE_DIR}/performance-report.${TIMESTAMP}.md
|
|
369
|
-
${AUDIT_BASE_DIR}/architecture-report.${TIMESTAMP}.md
|
|
370
|
-
${AUDIT_BASE_DIR}/tests-report.${TIMESTAMP}.md
|
|
371
|
-
${AUDIT_BASE_DIR}/complexity-report.${TIMESTAMP}.md
|
|
372
|
-
${AUDIT_BASE_DIR}/dependencies-report.${TIMESTAMP}.md
|
|
373
|
-
${AUDIT_BASE_DIR}/documentation-report.${TIMESTAMP}.md
|
|
374
|
-
(+ typescript-report.${TIMESTAMP}.md if applicable)
|
|
375
|
-
(+ database-report.${TIMESTAMP}.md if applicable)
|
|
376
|
-
|
|
377
|
-
🔄 NEXT STEPS:
|
|
378
|
-
1. Address blocking issues above
|
|
379
|
-
2. Run `/code-review` after fixes to verify
|
|
380
|
-
3. Create PR using this review as reference
|
|
381
|
-
4. Share review with team for human review focus
|
|
382
|
-
```
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
## Key Principles
|
|
425
|
+
|
|
426
|
+
1. **Launch sub-agents in parallel** - Use multiple Task calls in one message
|
|
427
|
+
2. **Read all reports** - Don't skip any audit results
|
|
428
|
+
3. **Extract blocking issues** - Focus on 🔴 sections from each report
|
|
429
|
+
4. **Be specific** - File:line references, exact issues, clear fixes
|
|
430
|
+
5. **Prioritize** - Blocking (must fix) vs should fix vs optional
|
|
431
|
+
6. **Be actionable** - Clear next steps based on findings
|