moicle 2.0.0 → 2.2.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/README.md +20 -9
- package/assets/architecture/_shared/severity-levels.md +34 -0
- package/assets/architecture/_shared/stack-detection.md +34 -0
- package/assets/commands/marketing.md +7 -7
- package/assets/skills/docs/sync/SKILL.md +159 -519
- package/assets/skills/docs/write/SKILL.md +89 -186
- package/assets/skills/feature/new/SKILL.md +152 -192
- package/assets/skills/feature/refactor/SKILL.md +152 -233
- package/assets/skills/fix/hotfix/SKILL.md +139 -305
- package/assets/skills/fix/incident/SKILL.md +107 -19
- package/assets/skills/fix/pr-comment/SKILL.md +98 -224
- package/assets/skills/fix/root-cause/SKILL.md +161 -104
- package/assets/skills/{docs → marketing}/content/SKILL.md +4 -4
- package/assets/skills/marketing/logo/SKILL.md +252 -0
- package/assets/skills/marketing/seo-blog/SKILL.md +367 -0
- package/assets/skills/marketing/video/SKILL.md +258 -0
- package/assets/skills/research/onboarding/SKILL.md +127 -510
- package/assets/skills/research/spike/SKILL.md +128 -436
- package/assets/skills/research/web/SKILL.md +124 -83
- package/assets/skills/review/architect/SKILL.md +157 -306
- package/assets/skills/review/branch/SKILL.md +153 -208
- package/assets/skills/review/pr/SKILL.md +129 -519
- package/assets/skills/review/tdd/SKILL.md +108 -69
- package/bin/cli.js +2 -2
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +176 -8
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +31 -1
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +30 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +64 -8
- package/dist/commands/uninstall.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 +8 -6
- package/dist/utils/symlink.js.map +1 -1
- package/package.json +1 -1
- package/assets/skills/docs/logo/SKILL.md +0 -492
- package/assets/skills/docs/video/SKILL.md +0 -666
|
@@ -5,599 +5,208 @@ description: Thorough pull request review workflow with architecture compliance
|
|
|
5
5
|
|
|
6
6
|
# Pull Request Review Workflow
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Review someone else's PR across 5 dimensions and post structured feedback to GitHub.
|
|
9
9
|
|
|
10
10
|
## When to use this skill
|
|
11
11
|
|
|
12
12
|
- ✅ Reviewing someone else's open PR (`gh pr view <number>` accessible)
|
|
13
13
|
- ✅ Need to post structured feedback (APPROVE / REQUEST CHANGES / COMMENT)
|
|
14
14
|
- ✅ Want a multi-dimensional review (architecture + security + perf + tests)
|
|
15
|
-
- ❌ Self-review of
|
|
15
|
+
- ❌ Self-review of own branch before push → use `/review:branch`
|
|
16
16
|
- ❌ Only checking DDD compliance → use `/review:architect`
|
|
17
17
|
- ❌ Addressing comments on your own PR → use `/fix:pr-comment`
|
|
18
18
|
|
|
19
19
|
## Read Architecture First
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Load `~/.claude/architecture/ddd-architecture.md` + the stack-specific doc. Detect stack via `~/.claude/architecture/_shared/stack-detection.md`.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
24
26
|
|
|
25
27
|
```
|
|
26
|
-
|
|
27
|
-
│ 1. FETCH │──▶│2. ANALYZE│──▶│ 3. REVIEW│──▶│4. FEEDBACK
|
|
28
|
-
└──────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
29
|
-
│
|
|
30
|
-
▼
|
|
31
|
-
┌───────────────────────┐
|
|
32
|
-
│ Quality Gates Check │
|
|
33
|
-
│ ✓ Architecture │
|
|
34
|
-
│ ✓ Security │
|
|
35
|
-
│ ✓ Performance │
|
|
36
|
-
│ ✓ Tests │
|
|
37
|
-
└───────────────────────┘
|
|
28
|
+
FETCH → ANALYZE → REVIEW (5 dims) → FEEDBACK → POST
|
|
38
29
|
```
|
|
39
30
|
|
|
40
31
|
---
|
|
41
32
|
|
|
42
33
|
## Phase 1: FETCH
|
|
43
34
|
|
|
44
|
-
**Goal
|
|
45
|
-
|
|
46
|
-
### Actions
|
|
47
|
-
1. Fetch PR details:
|
|
48
|
-
```bash
|
|
49
|
-
gh pr view [PR_NUMBER] --json number,title,body,author,state,commits,reviews,files
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
2. Get the diff:
|
|
53
|
-
```bash
|
|
54
|
-
gh pr diff [PR_NUMBER]
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
3. List all commits:
|
|
58
|
-
```bash
|
|
59
|
-
gh pr view [PR_NUMBER] --json commits --jq '.commits[] | "\(.oid[:7]) \(.messageHeadline)"'
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
4. Check CI/CD status:
|
|
63
|
-
```bash
|
|
64
|
-
gh pr checks [PR_NUMBER]
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
5. **Identify project stack** from PR files and read architecture doc
|
|
35
|
+
**Goal:** load PR + diff + context in one pass.
|
|
68
36
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- **State**: [open/merged/closed]
|
|
76
|
-
- **Stack**: [Flutter/React/Go/Laravel/Remix]
|
|
77
|
-
- **Architecture Doc**: [path to doc]
|
|
78
|
-
- **Files Changed**: [count]
|
|
79
|
-
- **Additions**: +[count] / **Deletions**: -[count]
|
|
80
|
-
|
|
81
|
-
### Commits
|
|
82
|
-
1. [commit 1]
|
|
83
|
-
2. [commit 2]
|
|
84
|
-
|
|
85
|
-
### Description
|
|
86
|
-
[PR body]
|
|
87
|
-
|
|
88
|
-
### CI/CD Status
|
|
89
|
-
[pass/fail status]
|
|
37
|
+
```bash
|
|
38
|
+
PR={number}
|
|
39
|
+
gh pr view $PR --json number,title,body,author,state,headRefName,baseRefName,commits,files
|
|
40
|
+
gh pr diff $PR
|
|
41
|
+
gh pr checks $PR
|
|
42
|
+
gh pr view $PR --comments
|
|
90
43
|
```
|
|
91
44
|
|
|
92
45
|
### Gate
|
|
93
|
-
- [ ] PR
|
|
94
|
-
- [ ]
|
|
95
|
-
- [ ]
|
|
96
|
-
- [ ] Stack identified
|
|
97
|
-
- [ ] Architecture doc identified
|
|
46
|
+
- [ ] PR metadata + diff + CI status loaded
|
|
47
|
+
- [ ] PR description explains "what / why" — if missing, ask author before deep review
|
|
48
|
+
- [ ] CI status known (don't review red builds — ask author to fix first)
|
|
98
49
|
|
|
99
50
|
---
|
|
100
51
|
|
|
101
52
|
## Phase 2: ANALYZE
|
|
102
53
|
|
|
103
|
-
**Goal
|
|
54
|
+
**Goal:** understand scope before going line-by-line.
|
|
104
55
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- What's the scope? (feature/fix/refactor/docs)
|
|
110
|
-
- Are there breaking changes?
|
|
111
|
-
|
|
112
|
-
3. Identify impact areas based on architecture:
|
|
113
|
-
- Frontend/Backend/Database?
|
|
114
|
-
- Which modules/packages?
|
|
115
|
-
- Dependencies changed?
|
|
116
|
-
|
|
117
|
-
4. Check for red flags:
|
|
118
|
-
- [ ] Large PR (>500 lines)?
|
|
119
|
-
- [ ] Multiple unrelated changes?
|
|
120
|
-
- [ ] Conflicts with architecture patterns?
|
|
121
|
-
- [ ] Missing tests?
|
|
122
|
-
- [ ] No description?
|
|
123
|
-
|
|
124
|
-
### Analysis Output
|
|
125
|
-
```markdown
|
|
126
|
-
## Change Analysis
|
|
127
|
-
|
|
128
|
-
### Architecture Reference
|
|
129
|
-
- Doc: [path to architecture doc]
|
|
130
|
-
- Pattern: [pattern from doc]
|
|
131
|
-
|
|
132
|
-
### Scope
|
|
133
|
-
- Type: [Feature/Fix/Refactor/Docs/Chore]
|
|
134
|
-
- Breaking Changes: [Yes/No]
|
|
135
|
-
|
|
136
|
-
### Layers Affected (from architecture doc)
|
|
137
|
-
- Layer 1: [files]
|
|
138
|
-
- Layer 2: [files]
|
|
139
|
-
- Layer 3: [files]
|
|
140
|
-
|
|
141
|
-
### Impact Areas
|
|
142
|
-
- [Module 1]: [description]
|
|
143
|
-
- [Module 2]: [description]
|
|
144
|
-
|
|
145
|
-
### Red Flags
|
|
146
|
-
- [ ] Issue 1
|
|
147
|
-
- [ ] Issue 2
|
|
148
|
-
```
|
|
56
|
+
1. **Scope check**: does the diff match the PR title / description? Mixed-scope PRs (e.g., feature + drive-by refactor) → ask author to split.
|
|
57
|
+
2. **Risk profile**: which files? domain logic, infra config, migrations, auth — high risk vs UI tweak — low risk.
|
|
58
|
+
3. **Test delta**: are new tests in the diff? coverage % up or down?
|
|
59
|
+
4. **Reference module**: open 1 existing similar module to compare conventions.
|
|
149
60
|
|
|
150
61
|
### Gate
|
|
151
|
-
- [ ]
|
|
152
|
-
- [ ]
|
|
153
|
-
- [ ]
|
|
154
|
-
- [ ] Red flags noted
|
|
62
|
+
- [ ] PR scope is single-purpose (or split requested)
|
|
63
|
+
- [ ] Risk level identified (low / medium / high)
|
|
64
|
+
- [ ] Test delta noted
|
|
155
65
|
|
|
156
66
|
---
|
|
157
67
|
|
|
158
|
-
## Phase 3: REVIEW
|
|
159
|
-
|
|
160
|
-
**Goal**: Thorough code review against multiple quality dimensions
|
|
161
|
-
|
|
162
|
-
### Review Dimensions
|
|
163
|
-
|
|
164
|
-
#### 1. Architecture Compliance ⚠️ CRITICAL
|
|
165
|
-
|
|
166
|
-
**Read architecture doc and verify:**
|
|
167
|
-
|
|
168
|
-
- [ ] **Layer Boundaries**: Dependencies flow correctly per doc?
|
|
169
|
-
- [ ] **Directory Structure**: Files in correct locations per doc?
|
|
170
|
-
- [ ] **Naming Conventions**: Follows conventions from doc?
|
|
171
|
-
- [ ] **Design Patterns**: Uses patterns defined in doc?
|
|
172
|
-
- [ ] **Data Flow**: Follows data flow pattern from doc?
|
|
173
|
-
- [ ] **Dependency Injection**: Follows DI pattern from doc?
|
|
174
|
-
|
|
175
|
-
**Template:**
|
|
176
|
-
```markdown
|
|
177
|
-
### Architecture Compliance: [✅ PASS / ❌ FAIL]
|
|
178
|
-
|
|
179
|
-
Reference: [architecture doc path]
|
|
180
|
-
|
|
181
|
-
**Layer Boundaries**: [Pass/Fail]
|
|
182
|
-
- [Finding 1]
|
|
183
|
-
- [Finding 2]
|
|
184
|
-
|
|
185
|
-
**Structure**: [Pass/Fail]
|
|
186
|
-
- [Finding 1]
|
|
187
|
-
|
|
188
|
-
**Patterns**: [Pass/Fail]
|
|
189
|
-
- [Finding 1]
|
|
190
|
-
|
|
191
|
-
**Violations** (if any):
|
|
192
|
-
- [ ] Critical: [description]
|
|
193
|
-
- [ ] Major: [description]
|
|
194
|
-
- [ ] Minor: [description]
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
#### 2. Code Quality
|
|
198
|
-
|
|
199
|
-
- [ ] **Readability**: Code is clear and self-documenting
|
|
200
|
-
- [ ] **Naming**: Variables/functions named meaningfully
|
|
201
|
-
- [ ] **Complexity**: No overly complex functions (McCabe < 10)
|
|
202
|
-
- [ ] **DRY**: No unnecessary code duplication
|
|
203
|
-
- [ ] **Comments**: Complex logic is explained
|
|
204
|
-
- [ ] **Error Handling**: Proper error handling and logging
|
|
205
|
-
- [ ] **Type Safety**: Proper types (TypeScript/Dart/Go/PHP)
|
|
206
|
-
|
|
207
|
-
**Template:**
|
|
208
|
-
```markdown
|
|
209
|
-
### Code Quality: [Good/Needs Work/Poor]
|
|
210
|
-
|
|
211
|
-
**Strengths**:
|
|
212
|
-
- [strength 1]
|
|
213
|
-
- [strength 2]
|
|
214
|
-
|
|
215
|
-
**Issues**:
|
|
216
|
-
- [ ] [file:line] - [issue description]
|
|
217
|
-
- [ ] [file:line] - [issue description]
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
#### 3. Security 🔒
|
|
221
|
-
|
|
222
|
-
- [ ] **Input Validation**: All inputs validated/sanitized
|
|
223
|
-
- [ ] **Authentication**: Proper auth checks
|
|
224
|
-
- [ ] **Authorization**: Proper permission checks
|
|
225
|
-
- [ ] **SQL Injection**: Parameterized queries used
|
|
226
|
-
- [ ] **XSS Prevention**: Output properly escaped
|
|
227
|
-
- [ ] **Secrets**: No hardcoded secrets/keys
|
|
228
|
-
- [ ] **Dependencies**: No vulnerable dependencies
|
|
229
|
-
|
|
230
|
-
**Template:**
|
|
231
|
-
```markdown
|
|
232
|
-
### Security: [✅ SECURE / ⚠️ ISSUES / 🚨 CRITICAL]
|
|
233
|
-
|
|
234
|
-
**Vulnerabilities**:
|
|
235
|
-
- [ ] 🚨 Critical: [description + location]
|
|
236
|
-
- [ ] ⚠️ High: [description + location]
|
|
237
|
-
- [ ] ℹ️ Low: [description + location]
|
|
238
|
-
|
|
239
|
-
**Recommendations**:
|
|
240
|
-
- [recommendation 1]
|
|
241
|
-
- [recommendation 2]
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
#### 4. Performance ⚡
|
|
68
|
+
## Phase 3: REVIEW — 5 dimensions
|
|
245
69
|
|
|
246
|
-
|
|
247
|
-
- [ ] **N+1 Queries**: No N+1 query problems
|
|
248
|
-
- [ ] **Caching**: Appropriate caching used (if in doc)?
|
|
249
|
-
- [ ] **Memory**: No obvious memory leaks
|
|
250
|
-
- [ ] **Algorithms**: Efficient algorithms used
|
|
251
|
-
- [ ] **Network**: Minimal API calls
|
|
252
|
-
- [ ] **Bundle Size**: No large bundle additions (frontend)
|
|
70
|
+
Severity definitions: `~/.claude/architecture/_shared/severity-levels.md` (code severity table).
|
|
253
71
|
|
|
254
|
-
|
|
255
|
-
```markdown
|
|
256
|
-
### Performance: [✅ OPTIMIZED / ⚠️ CONCERNS / 🐌 ISSUES]
|
|
72
|
+
### 3.1 Architecture (CRITICAL / HIGH)
|
|
257
73
|
|
|
258
|
-
|
|
259
|
-
-
|
|
260
|
-
-
|
|
74
|
+
For DDD-aware code, check against architecture doc:
|
|
75
|
+
- Domain has zero framework imports
|
|
76
|
+
- No cross-domain imports
|
|
77
|
+
- Business logic in usecases, not handlers / stores
|
|
78
|
+
- Ports in `ports/` dir (not inline interfaces)
|
|
79
|
+
- Entities raise events on state changes
|
|
80
|
+
- Listeners use background context, not request context
|
|
261
81
|
|
|
262
|
-
**
|
|
263
|
-
- [optimization 1]
|
|
264
|
-
- [optimization 2]
|
|
265
|
-
```
|
|
82
|
+
**For deep DDD audit:** call `/review:architect` instead and link result.
|
|
266
83
|
|
|
267
|
-
|
|
84
|
+
### 3.2 Security (CRITICAL / HIGH)
|
|
268
85
|
|
|
269
|
-
-
|
|
270
|
-
-
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
274
|
-
-
|
|
86
|
+
- Input validation at trust boundary (handler / DTO)
|
|
87
|
+
- AuthN + AuthZ checked before sensitive ops
|
|
88
|
+
- No secrets / tokens in code or logs
|
|
89
|
+
- SQL via parameterized queries / ORM — no string concatenation
|
|
90
|
+
- File paths / shell commands sanitized
|
|
91
|
+
- Rate limiting + idempotency on state-mutating endpoints
|
|
92
|
+
- Crypto: standard library, no roll-your-own
|
|
275
93
|
|
|
276
|
-
|
|
277
|
-
```markdown
|
|
278
|
-
### Testing: [✅ WELL TESTED / ⚠️ GAPS / ❌ MISSING]
|
|
94
|
+
### 3.3 Performance (HIGH / MEDIUM)
|
|
279
95
|
|
|
280
|
-
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
-
|
|
96
|
+
- No N+1 queries (eager-load relations the handler uses)
|
|
97
|
+
- Indexes match new query patterns (check `EXPLAIN`)
|
|
98
|
+
- Pagination on list endpoints (cursor preferred)
|
|
99
|
+
- Background work for slow operations (don't block request)
|
|
100
|
+
- Caching where appropriate, invalidation thought through
|
|
101
|
+
- Synchronous external API calls have timeouts
|
|
284
102
|
|
|
285
|
-
|
|
286
|
-
- [ ] Missing test for [scenario]
|
|
287
|
-
- [ ] Missing test for [edge case]
|
|
103
|
+
### 3.4 Testing (HIGH / MEDIUM)
|
|
288
104
|
|
|
289
|
-
|
|
290
|
-
-
|
|
291
|
-
|
|
105
|
+
- New business logic has unit tests (usecases, entities, value objects)
|
|
106
|
+
- New endpoints have at least 1 integration test (happy + error)
|
|
107
|
+
- Tests assert on behavior, not implementation
|
|
108
|
+
- Tests don't depend on order, time, or env
|
|
109
|
+
- Coverage didn't drop for touched files
|
|
292
110
|
|
|
293
|
-
###
|
|
111
|
+
### 3.5 Code quality (MEDIUM / LOW)
|
|
294
112
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
### Architecture (from [doc])
|
|
301
|
-
- [ ] Layer boundaries respected
|
|
302
|
-
- [ ] Structure follows doc
|
|
303
|
-
- [ ] Patterns used correctly
|
|
304
|
-
- [ ] Dependencies flow correctly
|
|
305
|
-
|
|
306
|
-
### Code Quality
|
|
307
|
-
- [ ] Readable and maintainable
|
|
308
|
-
- [ ] Follows naming conventions
|
|
309
|
-
- [ ] No unnecessary complexity
|
|
310
|
-
- [ ] Proper error handling
|
|
311
|
-
|
|
312
|
-
### Security
|
|
313
|
-
- [ ] No security vulnerabilities
|
|
314
|
-
- [ ] Input validation present
|
|
315
|
-
- [ ] No secrets in code
|
|
316
|
-
- [ ] Auth/authz correct
|
|
317
|
-
|
|
318
|
-
### Performance
|
|
319
|
-
- [ ] No obvious bottlenecks
|
|
320
|
-
- [ ] Queries optimized
|
|
321
|
-
- [ ] Caching appropriate
|
|
322
|
-
- [ ] Efficient algorithms
|
|
323
|
-
|
|
324
|
-
### Testing
|
|
325
|
-
- [ ] Tests present
|
|
326
|
-
- [ ] Tests follow doc patterns
|
|
327
|
-
- [ ] Good coverage
|
|
328
|
-
- [ ] Edge cases covered
|
|
329
|
-
|
|
330
|
-
### Documentation
|
|
331
|
-
- [ ] PR description clear
|
|
332
|
-
- [ ] Complex code commented
|
|
333
|
-
- [ ] README updated (if needed)
|
|
334
|
-
- [ ] API docs updated (if needed)
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### Gate
|
|
338
|
-
- [ ] All 5 dimensions reviewed
|
|
339
|
-
- [ ] Findings documented
|
|
340
|
-
- [ ] Severity assessed
|
|
113
|
+
- Names reveal intent (no `data`, `info`, `manager`, `helper`)
|
|
114
|
+
- Functions do one thing
|
|
115
|
+
- No dead branches or commented-out code
|
|
116
|
+
- DRY only where the duplication is real (not coincidental)
|
|
117
|
+
- Errors handled at boundary, not swallowed mid-flow
|
|
341
118
|
|
|
342
119
|
---
|
|
343
120
|
|
|
344
121
|
## Phase 4: FEEDBACK
|
|
345
122
|
|
|
346
|
-
**Goal
|
|
347
|
-
|
|
348
|
-
### Feedback Structure
|
|
349
|
-
|
|
350
|
-
#### Option A: APPROVE ✅
|
|
351
|
-
|
|
352
|
-
Use when:
|
|
353
|
-
- Architecture compliance: PASS
|
|
354
|
-
- Security: SECURE
|
|
355
|
-
- No critical issues
|
|
356
|
-
- Minor issues acceptable
|
|
357
|
-
|
|
358
|
-
```markdown
|
|
359
|
-
## Review: ✅ APPROVED
|
|
360
|
-
|
|
361
|
-
### Summary
|
|
362
|
-
[Brief summary of changes]
|
|
363
|
-
|
|
364
|
-
### Architecture Compliance
|
|
365
|
-
✅ Follows [architecture doc name] patterns correctly
|
|
366
|
-
|
|
367
|
-
### Strengths
|
|
368
|
-
- [strength 1]
|
|
369
|
-
- [strength 2]
|
|
370
|
-
- [strength 3]
|
|
371
|
-
|
|
372
|
-
### Minor Suggestions (Optional)
|
|
373
|
-
- [ ] [suggestion 1]
|
|
374
|
-
- [ ] [suggestion 2]
|
|
375
|
-
|
|
376
|
-
### Recommendation
|
|
377
|
-
**APPROVE** - Ready to merge
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
#### Option B: REQUEST CHANGES ⚠️
|
|
381
|
-
|
|
382
|
-
Use when:
|
|
383
|
-
- Architecture violations
|
|
384
|
-
- Security issues
|
|
385
|
-
- Critical bugs
|
|
386
|
-
- Missing tests
|
|
387
|
-
|
|
388
|
-
```markdown
|
|
389
|
-
## Review: ⚠️ CHANGES REQUESTED
|
|
390
|
-
|
|
391
|
-
### Summary
|
|
392
|
-
[Brief summary of changes]
|
|
123
|
+
**Goal:** turn findings into actionable comments at the right place.
|
|
393
124
|
|
|
394
|
-
###
|
|
395
|
-
1. **[Category]** - [file:line]
|
|
396
|
-
- Issue: [description]
|
|
397
|
-
- Fix: [how to fix]
|
|
398
|
-
- Reference: [architecture doc section if applicable]
|
|
125
|
+
### Decision (pick one)
|
|
399
126
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
127
|
+
| Decision | When |
|
|
128
|
+
|----------|------|
|
|
129
|
+
| **APPROVE** | 0 CRITICAL / HIGH; LOW only |
|
|
130
|
+
| **REQUEST CHANGES** | Any CRITICAL or HIGH; or multiple MEDIUM in same area |
|
|
131
|
+
| **COMMENT** | Only style / nit comments; or asking questions before final review |
|
|
403
132
|
|
|
404
|
-
###
|
|
405
|
-
- [ ] [file:line] - [description]
|
|
406
|
-
- [ ] [file:line] - [description]
|
|
133
|
+
### Inline comment format
|
|
407
134
|
|
|
408
|
-
|
|
409
|
-
- [suggestion 1]
|
|
410
|
-
- [suggestion 2]
|
|
135
|
+
Be specific. File + line + rationale + suggested fix:
|
|
411
136
|
|
|
412
|
-
### Recommendation
|
|
413
|
-
**REQUEST CHANGES** - Please address critical issues
|
|
414
137
|
```
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
### Discussion Points
|
|
431
|
-
- [Point 1]
|
|
432
|
-
- [Point 2]
|
|
433
|
-
|
|
434
|
-
### Recommendation
|
|
435
|
-
**COMMENT** - Let's discuss before proceeding
|
|
138
|
+
file: internal/wallet/usecases/withdraw.go:42
|
|
139
|
+
severity: HIGH
|
|
140
|
+
issue: Business logic in handler — `if wallet.Balance < amount` should live in
|
|
141
|
+
the Withdraw usecase, not here. The handler should just call usecase and
|
|
142
|
+
return the error.
|
|
143
|
+
suggest:
|
|
144
|
+
// handler
|
|
145
|
+
result, err := s.WithdrawUsecase.Execute(ctx, req)
|
|
146
|
+
|
|
147
|
+
// usecase
|
|
148
|
+
func (u *WithdrawUsecase) Execute(ctx, req) (Result, error) {
|
|
149
|
+
if !wallet.HasSufficientBalance(amount) { return ErrInsufficient }
|
|
150
|
+
// ...
|
|
151
|
+
}
|
|
436
152
|
```
|
|
437
153
|
|
|
438
|
-
###
|
|
439
|
-
|
|
440
|
-
1. Post review on GitHub:
|
|
441
|
-
```bash
|
|
442
|
-
# Approve
|
|
443
|
-
gh pr review [PR_NUMBER] --approve --body "[feedback]"
|
|
444
|
-
|
|
445
|
-
# Request changes
|
|
446
|
-
gh pr review [PR_NUMBER] --request-changes --body "[feedback]"
|
|
447
|
-
|
|
448
|
-
# Comment
|
|
449
|
-
gh pr review [PR_NUMBER] --comment --body "[feedback]"
|
|
450
|
-
```
|
|
451
|
-
|
|
452
|
-
2. Add inline comments for specific issues:
|
|
453
|
-
```bash
|
|
454
|
-
gh pr comment [PR_NUMBER] --body "[comment]"
|
|
455
|
-
```
|
|
154
|
+
### Summary comment (top of PR)
|
|
456
155
|
|
|
457
|
-
3. Update PR status if needed:
|
|
458
|
-
```bash
|
|
459
|
-
# Add labels
|
|
460
|
-
gh pr edit [PR_NUMBER] --add-label "needs-changes"
|
|
461
|
-
gh pr edit [PR_NUMBER] --add-label "security-review"
|
|
462
|
-
gh pr edit [PR_NUMBER] --add-label "architecture-review"
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
### Feedback Principles
|
|
466
|
-
|
|
467
|
-
1. **Be Specific**: Point to exact file and line
|
|
468
|
-
2. **Be Constructive**: Suggest solutions, not just problems
|
|
469
|
-
3. **Be Kind**: Assume good intent
|
|
470
|
-
4. **Reference Docs**: Link to architecture docs when relevant
|
|
471
|
-
5. **Prioritize**: Separate critical from optional
|
|
472
|
-
6. **Explain Why**: Help author learn
|
|
473
|
-
|
|
474
|
-
### Example Inline Comment
|
|
475
156
|
```markdown
|
|
476
|
-
|
|
157
|
+
## Review Summary
|
|
158
|
+
**Decision:** REQUEST CHANGES
|
|
477
159
|
|
|
478
|
-
|
|
479
|
-
|
|
160
|
+
**Must fix (HIGH):**
|
|
161
|
+
- [ ] `withdraw.go:42` — business logic moved out of handler
|
|
162
|
+
- [ ] `withdraw.go:88` — missing input validation on `amount`
|
|
480
163
|
|
|
481
|
-
|
|
482
|
-
- `
|
|
164
|
+
**Should fix (MEDIUM):**
|
|
165
|
+
- [ ] `withdraw_test.go` — only happy path tested, add insufficient-balance case
|
|
166
|
+
- [ ] `wallet_store.go:120` — N+1 query loading transactions
|
|
483
167
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
2. Move logic there
|
|
487
|
-
3. Call from component
|
|
168
|
+
**Nits (LOW):**
|
|
169
|
+
- [ ] `helper.go:5` — rename `helper` to something specific
|
|
488
170
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
// Component
|
|
492
|
-
const total = await calculateTotalUseCase.execute(items);
|
|
493
|
-
|
|
494
|
-
// Usecase
|
|
495
|
-
export class CalculateTotalUseCase {
|
|
496
|
-
execute(items: Item[]): number {
|
|
497
|
-
// logic here
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
\`\`\`
|
|
171
|
+
**What looked great:**
|
|
172
|
+
- Clean port interface, good test naming, clear PR description.
|
|
501
173
|
```
|
|
502
174
|
|
|
503
175
|
### Gate
|
|
504
|
-
- [ ]
|
|
505
|
-
- [ ]
|
|
506
|
-
- [ ]
|
|
176
|
+
- [ ] Decision matches severity rules
|
|
177
|
+
- [ ] Every HIGH+ has file:line + suggested fix
|
|
178
|
+
- [ ] Summary lists must-fix vs should-fix vs nits
|
|
179
|
+
- [ ] Acknowledged what's good (not just criticism)
|
|
507
180
|
|
|
508
181
|
---
|
|
509
182
|
|
|
510
|
-
##
|
|
511
|
-
|
|
512
|
-
### Architecture Docs
|
|
513
|
-
| Stack | Doc |
|
|
514
|
-
|-------|-----|
|
|
515
|
-
| All | `clean-architecture.md` |
|
|
516
|
-
| Flutter | `flutter-mobile.md` |
|
|
517
|
-
| React | `react-frontend.md` |
|
|
518
|
-
| Go | `go-backend.md` |
|
|
519
|
-
| Laravel | `laravel-backend.md` |
|
|
520
|
-
| Remix | `remix-fullstack.md` |
|
|
521
|
-
| Monorepo | `monorepo.md` |
|
|
522
|
-
|
|
523
|
-
### Review Dimensions
|
|
524
|
-
| Dimension | Focus |
|
|
525
|
-
|-----------|-------|
|
|
526
|
-
| Architecture | Layer boundaries, patterns, structure per doc |
|
|
527
|
-
| Code Quality | Readability, naming, complexity, DRY |
|
|
528
|
-
| Security | Validation, auth, secrets, vulnerabilities |
|
|
529
|
-
| Performance | Queries, caching, algorithms, memory |
|
|
530
|
-
| Testing | Coverage, quality, edge cases per doc |
|
|
531
|
-
|
|
532
|
-
### Severity Levels
|
|
533
|
-
|
|
534
|
-
| Level | Action | Examples |
|
|
535
|
-
|-------|--------|----------|
|
|
536
|
-
| 🚨 **Critical** | Must fix before merge | Security holes, architecture violations, data loss bugs |
|
|
537
|
-
| ⚠️ **High** | Should fix before merge | Missing tests, poor error handling, performance issues |
|
|
538
|
-
| ℹ️ **Medium** | Can fix after merge | Code smells, minor refactoring, missing comments |
|
|
539
|
-
| 💡 **Low** | Optional | Style suggestions, micro-optimizations |
|
|
540
|
-
|
|
541
|
-
### Common Issues Checklist
|
|
542
|
-
|
|
543
|
-
**Architecture** (check against doc):
|
|
544
|
-
- [ ] Business logic in UI layer
|
|
545
|
-
- [ ] UI code in domain layer
|
|
546
|
-
- [ ] Direct database access from UI
|
|
547
|
-
- [ ] Circular dependencies
|
|
548
|
-
- [ ] Wrong folder structure
|
|
549
|
-
|
|
550
|
-
**Security**:
|
|
551
|
-
- [ ] Hardcoded secrets
|
|
552
|
-
- [ ] SQL injection risks
|
|
553
|
-
- [ ] XSS vulnerabilities
|
|
554
|
-
- [ ] Missing auth checks
|
|
555
|
-
- [ ] Sensitive data logged
|
|
556
|
-
|
|
557
|
-
**Performance**:
|
|
558
|
-
- [ ] N+1 queries
|
|
559
|
-
- [ ] Missing indexes
|
|
560
|
-
- [ ] Inefficient algorithms
|
|
561
|
-
- [ ] Memory leaks
|
|
562
|
-
- [ ] Large bundle sizes
|
|
563
|
-
|
|
564
|
-
**Testing**:
|
|
565
|
-
- [ ] No tests for new code
|
|
566
|
-
- [ ] Tests not following doc patterns
|
|
567
|
-
- [ ] Missing edge cases
|
|
568
|
-
- [ ] Flaky tests
|
|
569
|
-
|
|
570
|
-
### GitHub CLI Commands
|
|
183
|
+
## Phase 5: POST
|
|
571
184
|
|
|
572
185
|
```bash
|
|
573
|
-
#
|
|
574
|
-
gh pr
|
|
575
|
-
|
|
576
|
-
gh pr
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
gh pr
|
|
582
|
-
|
|
583
|
-
# Comment
|
|
584
|
-
gh pr comment [NUMBER] --body "comment"
|
|
585
|
-
|
|
586
|
-
# Labels
|
|
587
|
-
gh pr edit [NUMBER] --add-label "label"
|
|
186
|
+
# Inline comments (one per finding)
|
|
187
|
+
gh pr review $PR --request-changes --body "$(cat summary.md)"
|
|
188
|
+
# or
|
|
189
|
+
gh pr review $PR --approve --body "LGTM, see one nit"
|
|
190
|
+
# or
|
|
191
|
+
gh pr review $PR --comment --body "Questions before final review"
|
|
192
|
+
|
|
193
|
+
# Optional: label
|
|
194
|
+
gh pr edit $PR --add-label "needs-changes"
|
|
588
195
|
```
|
|
589
196
|
|
|
197
|
+
### Gate
|
|
198
|
+
- [ ] Review posted to GitHub
|
|
199
|
+
- [ ] Author has clear next-step list
|
|
200
|
+
|
|
590
201
|
---
|
|
591
202
|
|
|
592
|
-
##
|
|
203
|
+
## Hard Rules
|
|
593
204
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
5. Review posted to GitHub
|
|
600
|
-
6. Author knows exactly what to do next
|
|
205
|
+
- **Don't review red CI** — ask author to fix tests / lint first
|
|
206
|
+
- **Don't bikeshed style** when the team has a linter — let the tool flag it
|
|
207
|
+
- **Always include "what went well"** — pure-criticism reviews demoralize
|
|
208
|
+
- **One severity per finding** — don't grade-inflate to push for a fix
|
|
209
|
+
- **File:line for every HIGH+** — author shouldn't have to grep for what you mean
|
|
601
210
|
|
|
602
211
|
---
|
|
603
212
|
|
|
@@ -614,8 +223,9 @@ PR review is complete when:
|
|
|
614
223
|
|
|
615
224
|
| Phase | Agent | Purpose |
|
|
616
225
|
|-------|-------|---------|
|
|
617
|
-
| ANALYZE | `@clean-architect` | Architecture
|
|
618
|
-
| REVIEW | `@
|
|
619
|
-
| REVIEW | `@security-audit` | Security
|
|
620
|
-
| REVIEW | `@perf-optimizer` |
|
|
621
|
-
| REVIEW | `@test-writer` |
|
|
226
|
+
| ANALYZE | `@clean-architect` | Architecture context |
|
|
227
|
+
| REVIEW 3.1 | `@clean-architect` | Architecture compliance |
|
|
228
|
+
| REVIEW 3.2 | `@security-audit` | Security findings |
|
|
229
|
+
| REVIEW 3.3 | `@perf-optimizer` | N+1, indexes, slow paths |
|
|
230
|
+
| REVIEW 3.4 | `@test-writer` | Coverage + test quality |
|
|
231
|
+
| REVIEW 3.5 | `@code-reviewer` | Naming + quality |
|