moicle 1.1.1 → 1.1.2
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/README.md +12 -2
- package/assets/architecture/go-backend.md +930 -108
- package/assets/commands/brainstorm.md +1 -0
- package/assets/skills/api-integration/SKILL.md +883 -0
- package/assets/skills/deprecation/SKILL.md +923 -0
- package/assets/skills/documentation/SKILL.md +1333 -0
- package/assets/skills/fix-pr-comment/SKILL.md +283 -0
- package/assets/skills/go-module/SKILL.md +77 -0
- package/assets/skills/incident-response/SKILL.md +946 -0
- package/assets/skills/onboarding/SKILL.md +607 -0
- package/assets/skills/pr-review/SKILL.md +620 -0
- package/assets/skills/refactor/SKILL.md +756 -0
- package/assets/skills/spike/SKILL.md +535 -0
- package/assets/skills/tdd/SKILL.md +828 -0
- package/bin/cli.js +2 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +20 -2
- package/dist/commands/install.js.map +1 -1
- package/dist/utils/symlink.d.ts +1 -0
- package/dist/utils/symlink.d.ts.map +1 -1
- package/dist/utils/symlink.js +1 -0
- package/dist/utils/symlink.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr-review
|
|
3
|
+
description: Thorough pull request review workflow with architecture compliance checks. Use when reviewing pull requests, checking code changes, or when user says "review pr", "check pr", "review code", "pr review", "review pull request".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pull Request Review Workflow
|
|
7
|
+
|
|
8
|
+
Comprehensive workflow for reviewing pull requests with architecture compliance and quality gates.
|
|
9
|
+
|
|
10
|
+
## IMPORTANT: Read Architecture First
|
|
11
|
+
|
|
12
|
+
**Before reviewing any code, you MUST read the appropriate architecture reference:**
|
|
13
|
+
|
|
14
|
+
### Global Architecture Files
|
|
15
|
+
```
|
|
16
|
+
~/.claude/architecture/
|
|
17
|
+
├── clean-architecture.md # Core principles for all projects
|
|
18
|
+
├── flutter-mobile.md # Flutter + Riverpod
|
|
19
|
+
├── react-frontend.md # React + Vite + TypeScript
|
|
20
|
+
├── go-backend.md # Go + Gin
|
|
21
|
+
├── laravel-backend.md # Laravel + PHP
|
|
22
|
+
├── remix-fullstack.md # Remix fullstack
|
|
23
|
+
└── monorepo.md # Monorepo structure
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Project-specific (if exists)
|
|
27
|
+
```
|
|
28
|
+
.claude/architecture/ # Project overrides
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Review must verify compliance with architecture patterns defined in these files.**
|
|
32
|
+
|
|
33
|
+
## Recommended Agents
|
|
34
|
+
|
|
35
|
+
| Phase | Agent | Purpose |
|
|
36
|
+
|-------|-------|---------|
|
|
37
|
+
| ANALYZE | `@clean-architect` | Architecture compliance check |
|
|
38
|
+
| REVIEW | `@code-reviewer` | Code quality and best practices |
|
|
39
|
+
| REVIEW | `@security-audit` | Security vulnerabilities scan |
|
|
40
|
+
| REVIEW | `@perf-optimizer` | Performance analysis |
|
|
41
|
+
| REVIEW | `@test-writer` | Test coverage and quality |
|
|
42
|
+
|
|
43
|
+
## Workflow Overview
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
47
|
+
│ 1. FETCH │──▶│2. ANALYZE│──▶│ 3. REVIEW│──▶│4. FEEDBACK
|
|
48
|
+
└──────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
49
|
+
│
|
|
50
|
+
▼
|
|
51
|
+
┌───────────────────────┐
|
|
52
|
+
│ Quality Gates Check │
|
|
53
|
+
│ ✓ Architecture │
|
|
54
|
+
│ ✓ Security │
|
|
55
|
+
│ ✓ Performance │
|
|
56
|
+
│ ✓ Tests │
|
|
57
|
+
└───────────────────────┘
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Phase 1: FETCH
|
|
63
|
+
|
|
64
|
+
**Goal**: Gather all PR information and context
|
|
65
|
+
|
|
66
|
+
### Actions
|
|
67
|
+
1. Fetch PR details:
|
|
68
|
+
```bash
|
|
69
|
+
gh pr view [PR_NUMBER] --json number,title,body,author,state,commits,reviews,files
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
2. Get the diff:
|
|
73
|
+
```bash
|
|
74
|
+
gh pr diff [PR_NUMBER]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
3. List all commits:
|
|
78
|
+
```bash
|
|
79
|
+
gh pr view [PR_NUMBER] --json commits --jq '.commits[] | "\(.oid[:7]) \(.messageHeadline)"'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
4. Check CI/CD status:
|
|
83
|
+
```bash
|
|
84
|
+
gh pr checks [PR_NUMBER]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
5. **Identify project stack** from PR files and read architecture doc
|
|
88
|
+
|
|
89
|
+
### Output
|
|
90
|
+
```markdown
|
|
91
|
+
## PR #[NUMBER]: [TITLE]
|
|
92
|
+
|
|
93
|
+
### Metadata
|
|
94
|
+
- **Author**: [author]
|
|
95
|
+
- **State**: [open/merged/closed]
|
|
96
|
+
- **Stack**: [Flutter/React/Go/Laravel/Remix]
|
|
97
|
+
- **Architecture Doc**: [path to doc]
|
|
98
|
+
- **Files Changed**: [count]
|
|
99
|
+
- **Additions**: +[count] / **Deletions**: -[count]
|
|
100
|
+
|
|
101
|
+
### Commits
|
|
102
|
+
1. [commit 1]
|
|
103
|
+
2. [commit 2]
|
|
104
|
+
|
|
105
|
+
### Description
|
|
106
|
+
[PR body]
|
|
107
|
+
|
|
108
|
+
### CI/CD Status
|
|
109
|
+
[pass/fail status]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Gate
|
|
113
|
+
- [ ] PR details fetched
|
|
114
|
+
- [ ] Diff obtained
|
|
115
|
+
- [ ] Commits listed
|
|
116
|
+
- [ ] Stack identified
|
|
117
|
+
- [ ] Architecture doc identified
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Phase 2: ANALYZE
|
|
122
|
+
|
|
123
|
+
**Goal**: Understand the changes and identify affected areas
|
|
124
|
+
|
|
125
|
+
### Actions
|
|
126
|
+
1. **Read the architecture doc** for this stack
|
|
127
|
+
2. Analyze what changed:
|
|
128
|
+
- Which layers are affected? (per architecture doc)
|
|
129
|
+
- What's the scope? (feature/fix/refactor/docs)
|
|
130
|
+
- Are there breaking changes?
|
|
131
|
+
|
|
132
|
+
3. Identify impact areas based on architecture:
|
|
133
|
+
- Frontend/Backend/Database?
|
|
134
|
+
- Which modules/packages?
|
|
135
|
+
- Dependencies changed?
|
|
136
|
+
|
|
137
|
+
4. Check for red flags:
|
|
138
|
+
- [ ] Large PR (>500 lines)?
|
|
139
|
+
- [ ] Multiple unrelated changes?
|
|
140
|
+
- [ ] Conflicts with architecture patterns?
|
|
141
|
+
- [ ] Missing tests?
|
|
142
|
+
- [ ] No description?
|
|
143
|
+
|
|
144
|
+
### Analysis Output
|
|
145
|
+
```markdown
|
|
146
|
+
## Change Analysis
|
|
147
|
+
|
|
148
|
+
### Architecture Reference
|
|
149
|
+
- Doc: [path to architecture doc]
|
|
150
|
+
- Pattern: [pattern from doc]
|
|
151
|
+
|
|
152
|
+
### Scope
|
|
153
|
+
- Type: [Feature/Fix/Refactor/Docs/Chore]
|
|
154
|
+
- Breaking Changes: [Yes/No]
|
|
155
|
+
|
|
156
|
+
### Layers Affected (from architecture doc)
|
|
157
|
+
- Layer 1: [files]
|
|
158
|
+
- Layer 2: [files]
|
|
159
|
+
- Layer 3: [files]
|
|
160
|
+
|
|
161
|
+
### Impact Areas
|
|
162
|
+
- [Module 1]: [description]
|
|
163
|
+
- [Module 2]: [description]
|
|
164
|
+
|
|
165
|
+
### Red Flags
|
|
166
|
+
- [ ] Issue 1
|
|
167
|
+
- [ ] Issue 2
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Gate
|
|
171
|
+
- [ ] Architecture doc read
|
|
172
|
+
- [ ] Changes understood
|
|
173
|
+
- [ ] Impact areas identified
|
|
174
|
+
- [ ] Red flags noted
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Phase 3: REVIEW
|
|
179
|
+
|
|
180
|
+
**Goal**: Thorough code review against multiple quality dimensions
|
|
181
|
+
|
|
182
|
+
### Review Dimensions
|
|
183
|
+
|
|
184
|
+
#### 1. Architecture Compliance ⚠️ CRITICAL
|
|
185
|
+
|
|
186
|
+
**Read architecture doc and verify:**
|
|
187
|
+
|
|
188
|
+
- [ ] **Layer Boundaries**: Dependencies flow correctly per doc?
|
|
189
|
+
- [ ] **Directory Structure**: Files in correct locations per doc?
|
|
190
|
+
- [ ] **Naming Conventions**: Follows conventions from doc?
|
|
191
|
+
- [ ] **Design Patterns**: Uses patterns defined in doc?
|
|
192
|
+
- [ ] **Data Flow**: Follows data flow pattern from doc?
|
|
193
|
+
- [ ] **Dependency Injection**: Follows DI pattern from doc?
|
|
194
|
+
|
|
195
|
+
**Template:**
|
|
196
|
+
```markdown
|
|
197
|
+
### Architecture Compliance: [✅ PASS / ❌ FAIL]
|
|
198
|
+
|
|
199
|
+
Reference: [architecture doc path]
|
|
200
|
+
|
|
201
|
+
**Layer Boundaries**: [Pass/Fail]
|
|
202
|
+
- [Finding 1]
|
|
203
|
+
- [Finding 2]
|
|
204
|
+
|
|
205
|
+
**Structure**: [Pass/Fail]
|
|
206
|
+
- [Finding 1]
|
|
207
|
+
|
|
208
|
+
**Patterns**: [Pass/Fail]
|
|
209
|
+
- [Finding 1]
|
|
210
|
+
|
|
211
|
+
**Violations** (if any):
|
|
212
|
+
- [ ] Critical: [description]
|
|
213
|
+
- [ ] Major: [description]
|
|
214
|
+
- [ ] Minor: [description]
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
#### 2. Code Quality
|
|
218
|
+
|
|
219
|
+
- [ ] **Readability**: Code is clear and self-documenting
|
|
220
|
+
- [ ] **Naming**: Variables/functions named meaningfully
|
|
221
|
+
- [ ] **Complexity**: No overly complex functions (McCabe < 10)
|
|
222
|
+
- [ ] **DRY**: No unnecessary code duplication
|
|
223
|
+
- [ ] **Comments**: Complex logic is explained
|
|
224
|
+
- [ ] **Error Handling**: Proper error handling and logging
|
|
225
|
+
- [ ] **Type Safety**: Proper types (TypeScript/Dart/Go/PHP)
|
|
226
|
+
|
|
227
|
+
**Template:**
|
|
228
|
+
```markdown
|
|
229
|
+
### Code Quality: [Good/Needs Work/Poor]
|
|
230
|
+
|
|
231
|
+
**Strengths**:
|
|
232
|
+
- [strength 1]
|
|
233
|
+
- [strength 2]
|
|
234
|
+
|
|
235
|
+
**Issues**:
|
|
236
|
+
- [ ] [file:line] - [issue description]
|
|
237
|
+
- [ ] [file:line] - [issue description]
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
#### 3. Security 🔒
|
|
241
|
+
|
|
242
|
+
- [ ] **Input Validation**: All inputs validated/sanitized
|
|
243
|
+
- [ ] **Authentication**: Proper auth checks
|
|
244
|
+
- [ ] **Authorization**: Proper permission checks
|
|
245
|
+
- [ ] **SQL Injection**: Parameterized queries used
|
|
246
|
+
- [ ] **XSS Prevention**: Output properly escaped
|
|
247
|
+
- [ ] **Secrets**: No hardcoded secrets/keys
|
|
248
|
+
- [ ] **Dependencies**: No vulnerable dependencies
|
|
249
|
+
|
|
250
|
+
**Template:**
|
|
251
|
+
```markdown
|
|
252
|
+
### Security: [✅ SECURE / ⚠️ ISSUES / 🚨 CRITICAL]
|
|
253
|
+
|
|
254
|
+
**Vulnerabilities**:
|
|
255
|
+
- [ ] 🚨 Critical: [description + location]
|
|
256
|
+
- [ ] ⚠️ High: [description + location]
|
|
257
|
+
- [ ] ℹ️ Low: [description + location]
|
|
258
|
+
|
|
259
|
+
**Recommendations**:
|
|
260
|
+
- [recommendation 1]
|
|
261
|
+
- [recommendation 2]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
#### 4. Performance ⚡
|
|
265
|
+
|
|
266
|
+
- [ ] **Database**: Queries optimized, indexes used?
|
|
267
|
+
- [ ] **N+1 Queries**: No N+1 query problems
|
|
268
|
+
- [ ] **Caching**: Appropriate caching used (if in doc)?
|
|
269
|
+
- [ ] **Memory**: No obvious memory leaks
|
|
270
|
+
- [ ] **Algorithms**: Efficient algorithms used
|
|
271
|
+
- [ ] **Network**: Minimal API calls
|
|
272
|
+
- [ ] **Bundle Size**: No large bundle additions (frontend)
|
|
273
|
+
|
|
274
|
+
**Template:**
|
|
275
|
+
```markdown
|
|
276
|
+
### Performance: [✅ OPTIMIZED / ⚠️ CONCERNS / 🐌 ISSUES]
|
|
277
|
+
|
|
278
|
+
**Concerns**:
|
|
279
|
+
- [ ] [file:line] - [performance issue]
|
|
280
|
+
- [ ] [file:line] - [performance issue]
|
|
281
|
+
|
|
282
|
+
**Suggestions**:
|
|
283
|
+
- [optimization 1]
|
|
284
|
+
- [optimization 2]
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### 5. Testing 🧪
|
|
288
|
+
|
|
289
|
+
- [ ] **Test Existence**: Tests exist for new code
|
|
290
|
+
- [ ] **Test Quality**: Tests follow patterns from architecture doc
|
|
291
|
+
- [ ] **Test Coverage**: Critical paths covered
|
|
292
|
+
- [ ] **Test Types**: Unit + Integration (as per doc)
|
|
293
|
+
- [ ] **Edge Cases**: Edge cases tested
|
|
294
|
+
- [ ] **Mocking**: Proper mocking patterns (from doc)
|
|
295
|
+
|
|
296
|
+
**Template:**
|
|
297
|
+
```markdown
|
|
298
|
+
### Testing: [✅ WELL TESTED / ⚠️ GAPS / ❌ MISSING]
|
|
299
|
+
|
|
300
|
+
**Coverage**:
|
|
301
|
+
- Unit Tests: [Good/Partial/Missing]
|
|
302
|
+
- Integration Tests: [Good/Partial/Missing]
|
|
303
|
+
- E2E Tests: [Good/Partial/Missing]
|
|
304
|
+
|
|
305
|
+
**Gaps**:
|
|
306
|
+
- [ ] Missing test for [scenario]
|
|
307
|
+
- [ ] Missing test for [edge case]
|
|
308
|
+
|
|
309
|
+
**Test Quality** (per architecture doc): [Pass/Fail]
|
|
310
|
+
- [finding]
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Review Checklist
|
|
314
|
+
|
|
315
|
+
Use this for every PR:
|
|
316
|
+
|
|
317
|
+
```markdown
|
|
318
|
+
## Review Checklist
|
|
319
|
+
|
|
320
|
+
### Architecture (from [doc])
|
|
321
|
+
- [ ] Layer boundaries respected
|
|
322
|
+
- [ ] Structure follows doc
|
|
323
|
+
- [ ] Patterns used correctly
|
|
324
|
+
- [ ] Dependencies flow correctly
|
|
325
|
+
|
|
326
|
+
### Code Quality
|
|
327
|
+
- [ ] Readable and maintainable
|
|
328
|
+
- [ ] Follows naming conventions
|
|
329
|
+
- [ ] No unnecessary complexity
|
|
330
|
+
- [ ] Proper error handling
|
|
331
|
+
|
|
332
|
+
### Security
|
|
333
|
+
- [ ] No security vulnerabilities
|
|
334
|
+
- [ ] Input validation present
|
|
335
|
+
- [ ] No secrets in code
|
|
336
|
+
- [ ] Auth/authz correct
|
|
337
|
+
|
|
338
|
+
### Performance
|
|
339
|
+
- [ ] No obvious bottlenecks
|
|
340
|
+
- [ ] Queries optimized
|
|
341
|
+
- [ ] Caching appropriate
|
|
342
|
+
- [ ] Efficient algorithms
|
|
343
|
+
|
|
344
|
+
### Testing
|
|
345
|
+
- [ ] Tests present
|
|
346
|
+
- [ ] Tests follow doc patterns
|
|
347
|
+
- [ ] Good coverage
|
|
348
|
+
- [ ] Edge cases covered
|
|
349
|
+
|
|
350
|
+
### Documentation
|
|
351
|
+
- [ ] PR description clear
|
|
352
|
+
- [ ] Complex code commented
|
|
353
|
+
- [ ] README updated (if needed)
|
|
354
|
+
- [ ] API docs updated (if needed)
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Gate
|
|
358
|
+
- [ ] All 5 dimensions reviewed
|
|
359
|
+
- [ ] Findings documented
|
|
360
|
+
- [ ] Severity assessed
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Phase 4: FEEDBACK
|
|
365
|
+
|
|
366
|
+
**Goal**: Provide clear, actionable feedback
|
|
367
|
+
|
|
368
|
+
### Feedback Structure
|
|
369
|
+
|
|
370
|
+
#### Option A: APPROVE ✅
|
|
371
|
+
|
|
372
|
+
Use when:
|
|
373
|
+
- Architecture compliance: PASS
|
|
374
|
+
- Security: SECURE
|
|
375
|
+
- No critical issues
|
|
376
|
+
- Minor issues acceptable
|
|
377
|
+
|
|
378
|
+
```markdown
|
|
379
|
+
## Review: ✅ APPROVED
|
|
380
|
+
|
|
381
|
+
### Summary
|
|
382
|
+
[Brief summary of changes]
|
|
383
|
+
|
|
384
|
+
### Architecture Compliance
|
|
385
|
+
✅ Follows [architecture doc name] patterns correctly
|
|
386
|
+
|
|
387
|
+
### Strengths
|
|
388
|
+
- [strength 1]
|
|
389
|
+
- [strength 2]
|
|
390
|
+
- [strength 3]
|
|
391
|
+
|
|
392
|
+
### Minor Suggestions (Optional)
|
|
393
|
+
- [ ] [suggestion 1]
|
|
394
|
+
- [ ] [suggestion 2]
|
|
395
|
+
|
|
396
|
+
### Recommendation
|
|
397
|
+
**APPROVE** - Ready to merge
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
#### Option B: REQUEST CHANGES ⚠️
|
|
401
|
+
|
|
402
|
+
Use when:
|
|
403
|
+
- Architecture violations
|
|
404
|
+
- Security issues
|
|
405
|
+
- Critical bugs
|
|
406
|
+
- Missing tests
|
|
407
|
+
|
|
408
|
+
```markdown
|
|
409
|
+
## Review: ⚠️ CHANGES REQUESTED
|
|
410
|
+
|
|
411
|
+
### Summary
|
|
412
|
+
[Brief summary of changes]
|
|
413
|
+
|
|
414
|
+
### Critical Issues (Must Fix)
|
|
415
|
+
1. **[Category]** - [file:line]
|
|
416
|
+
- Issue: [description]
|
|
417
|
+
- Fix: [how to fix]
|
|
418
|
+
- Reference: [architecture doc section if applicable]
|
|
419
|
+
|
|
420
|
+
2. **[Category]** - [file:line]
|
|
421
|
+
- Issue: [description]
|
|
422
|
+
- Fix: [how to fix]
|
|
423
|
+
|
|
424
|
+
### Non-Critical Issues (Should Fix)
|
|
425
|
+
- [ ] [file:line] - [description]
|
|
426
|
+
- [ ] [file:line] - [description]
|
|
427
|
+
|
|
428
|
+
### Suggestions (Optional)
|
|
429
|
+
- [suggestion 1]
|
|
430
|
+
- [suggestion 2]
|
|
431
|
+
|
|
432
|
+
### Recommendation
|
|
433
|
+
**REQUEST CHANGES** - Please address critical issues
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
#### Option C: COMMENT 💬
|
|
437
|
+
|
|
438
|
+
Use when:
|
|
439
|
+
- Need clarification
|
|
440
|
+
- Questions about approach
|
|
441
|
+
- Discussion needed
|
|
442
|
+
|
|
443
|
+
```markdown
|
|
444
|
+
## Review: 💬 COMMENTS
|
|
445
|
+
|
|
446
|
+
### Questions
|
|
447
|
+
1. [Question about approach/design]
|
|
448
|
+
2. [Question about implementation]
|
|
449
|
+
|
|
450
|
+
### Discussion Points
|
|
451
|
+
- [Point 1]
|
|
452
|
+
- [Point 2]
|
|
453
|
+
|
|
454
|
+
### Recommendation
|
|
455
|
+
**COMMENT** - Let's discuss before proceeding
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Actions
|
|
459
|
+
|
|
460
|
+
1. Post review on GitHub:
|
|
461
|
+
```bash
|
|
462
|
+
# Approve
|
|
463
|
+
gh pr review [PR_NUMBER] --approve --body "[feedback]"
|
|
464
|
+
|
|
465
|
+
# Request changes
|
|
466
|
+
gh pr review [PR_NUMBER] --request-changes --body "[feedback]"
|
|
467
|
+
|
|
468
|
+
# Comment
|
|
469
|
+
gh pr review [PR_NUMBER] --comment --body "[feedback]"
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
2. Add inline comments for specific issues:
|
|
473
|
+
```bash
|
|
474
|
+
gh pr comment [PR_NUMBER] --body "[comment]"
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
3. Update PR status if needed:
|
|
478
|
+
```bash
|
|
479
|
+
# Add labels
|
|
480
|
+
gh pr edit [PR_NUMBER] --add-label "needs-changes"
|
|
481
|
+
gh pr edit [PR_NUMBER] --add-label "security-review"
|
|
482
|
+
gh pr edit [PR_NUMBER] --add-label "architecture-review"
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### Feedback Principles
|
|
486
|
+
|
|
487
|
+
1. **Be Specific**: Point to exact file and line
|
|
488
|
+
2. **Be Constructive**: Suggest solutions, not just problems
|
|
489
|
+
3. **Be Kind**: Assume good intent
|
|
490
|
+
4. **Reference Docs**: Link to architecture docs when relevant
|
|
491
|
+
5. **Prioritize**: Separate critical from optional
|
|
492
|
+
6. **Explain Why**: Help author learn
|
|
493
|
+
|
|
494
|
+
### Example Inline Comment
|
|
495
|
+
```markdown
|
|
496
|
+
**[file.ts:123]** - Architecture Violation
|
|
497
|
+
|
|
498
|
+
Issue: Business logic in presentation layer
|
|
499
|
+
Reference: `react-frontend.md` - Section 3.2
|
|
500
|
+
|
|
501
|
+
This violates the architecture pattern. Business logic should be in:
|
|
502
|
+
- `src/domain/usecases/`
|
|
503
|
+
|
|
504
|
+
Suggested fix:
|
|
505
|
+
1. Create `src/domain/usecases/calculateTotal.ts`
|
|
506
|
+
2. Move logic there
|
|
507
|
+
3. Call from component
|
|
508
|
+
|
|
509
|
+
Example:
|
|
510
|
+
\`\`\`typescript
|
|
511
|
+
// Component
|
|
512
|
+
const total = await calculateTotalUseCase.execute(items);
|
|
513
|
+
|
|
514
|
+
// Usecase
|
|
515
|
+
export class CalculateTotalUseCase {
|
|
516
|
+
execute(items: Item[]): number {
|
|
517
|
+
// logic here
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
\`\`\`
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
### Gate
|
|
524
|
+
- [ ] Feedback provided
|
|
525
|
+
- [ ] Decision made (approve/request/comment)
|
|
526
|
+
- [ ] Review posted to GitHub
|
|
527
|
+
|
|
528
|
+
---
|
|
529
|
+
|
|
530
|
+
## Quick Reference
|
|
531
|
+
|
|
532
|
+
### Architecture Docs
|
|
533
|
+
| Stack | Doc |
|
|
534
|
+
|-------|-----|
|
|
535
|
+
| All | `clean-architecture.md` |
|
|
536
|
+
| Flutter | `flutter-mobile.md` |
|
|
537
|
+
| React | `react-frontend.md` |
|
|
538
|
+
| Go | `go-backend.md` |
|
|
539
|
+
| Laravel | `laravel-backend.md` |
|
|
540
|
+
| Remix | `remix-fullstack.md` |
|
|
541
|
+
| Monorepo | `monorepo.md` |
|
|
542
|
+
|
|
543
|
+
### Review Dimensions
|
|
544
|
+
| Dimension | Focus |
|
|
545
|
+
|-----------|-------|
|
|
546
|
+
| Architecture | Layer boundaries, patterns, structure per doc |
|
|
547
|
+
| Code Quality | Readability, naming, complexity, DRY |
|
|
548
|
+
| Security | Validation, auth, secrets, vulnerabilities |
|
|
549
|
+
| Performance | Queries, caching, algorithms, memory |
|
|
550
|
+
| Testing | Coverage, quality, edge cases per doc |
|
|
551
|
+
|
|
552
|
+
### Severity Levels
|
|
553
|
+
|
|
554
|
+
| Level | Action | Examples |
|
|
555
|
+
|-------|--------|----------|
|
|
556
|
+
| 🚨 **Critical** | Must fix before merge | Security holes, architecture violations, data loss bugs |
|
|
557
|
+
| ⚠️ **High** | Should fix before merge | Missing tests, poor error handling, performance issues |
|
|
558
|
+
| ℹ️ **Medium** | Can fix after merge | Code smells, minor refactoring, missing comments |
|
|
559
|
+
| 💡 **Low** | Optional | Style suggestions, micro-optimizations |
|
|
560
|
+
|
|
561
|
+
### Common Issues Checklist
|
|
562
|
+
|
|
563
|
+
**Architecture** (check against doc):
|
|
564
|
+
- [ ] Business logic in UI layer
|
|
565
|
+
- [ ] UI code in domain layer
|
|
566
|
+
- [ ] Direct database access from UI
|
|
567
|
+
- [ ] Circular dependencies
|
|
568
|
+
- [ ] Wrong folder structure
|
|
569
|
+
|
|
570
|
+
**Security**:
|
|
571
|
+
- [ ] Hardcoded secrets
|
|
572
|
+
- [ ] SQL injection risks
|
|
573
|
+
- [ ] XSS vulnerabilities
|
|
574
|
+
- [ ] Missing auth checks
|
|
575
|
+
- [ ] Sensitive data logged
|
|
576
|
+
|
|
577
|
+
**Performance**:
|
|
578
|
+
- [ ] N+1 queries
|
|
579
|
+
- [ ] Missing indexes
|
|
580
|
+
- [ ] Inefficient algorithms
|
|
581
|
+
- [ ] Memory leaks
|
|
582
|
+
- [ ] Large bundle sizes
|
|
583
|
+
|
|
584
|
+
**Testing**:
|
|
585
|
+
- [ ] No tests for new code
|
|
586
|
+
- [ ] Tests not following doc patterns
|
|
587
|
+
- [ ] Missing edge cases
|
|
588
|
+
- [ ] Flaky tests
|
|
589
|
+
|
|
590
|
+
### GitHub CLI Commands
|
|
591
|
+
|
|
592
|
+
```bash
|
|
593
|
+
# Fetch PR
|
|
594
|
+
gh pr view [NUMBER]
|
|
595
|
+
gh pr diff [NUMBER]
|
|
596
|
+
gh pr checks [NUMBER]
|
|
597
|
+
|
|
598
|
+
# Review
|
|
599
|
+
gh pr review [NUMBER] --approve
|
|
600
|
+
gh pr review [NUMBER] --request-changes
|
|
601
|
+
gh pr review [NUMBER] --comment
|
|
602
|
+
|
|
603
|
+
# Comment
|
|
604
|
+
gh pr comment [NUMBER] --body "comment"
|
|
605
|
+
|
|
606
|
+
# Labels
|
|
607
|
+
gh pr edit [NUMBER] --add-label "label"
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
---
|
|
611
|
+
|
|
612
|
+
## Success Criteria
|
|
613
|
+
|
|
614
|
+
PR review is complete when:
|
|
615
|
+
1. All 5 review dimensions checked
|
|
616
|
+
2. Architecture compliance verified against doc
|
|
617
|
+
3. Clear feedback provided
|
|
618
|
+
4. Decision made (approve/request/comment)
|
|
619
|
+
5. Review posted to GitHub
|
|
620
|
+
6. Author knows exactly what to do next
|