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
|
@@ -6,327 +6,272 @@ args: "[BASE_BRANCH]"
|
|
|
6
6
|
|
|
7
7
|
# Review Local Branch Changes
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Self-review your branch vs a base branch before pushing or opening a PR. Checks architecture compliance, stack conventions, and code quality — on **changed files only**, not the whole codebase.
|
|
10
10
|
|
|
11
|
-
**ARGUMENTS:** (optional) base branch
|
|
11
|
+
**ARGUMENTS:** (optional) base branch. Default: `main` (fallback to `master`).
|
|
12
12
|
|
|
13
13
|
## When to use this skill
|
|
14
14
|
|
|
15
|
-
- ✅ Before pushing your branch / opening a PR
|
|
15
|
+
- ✅ Before pushing your branch / opening a PR
|
|
16
16
|
- ✅ Before asking a teammate to review (catch easy issues first)
|
|
17
17
|
- ✅ Quick sanity check on a feature you've been working on
|
|
18
18
|
- ❌ Reviewing someone else's PR → use `/review:pr`
|
|
19
|
-
- ❌ Only checking architecture
|
|
20
|
-
- ❌
|
|
19
|
+
- ❌ Only checking DDD architecture → use `/review:architect`
|
|
20
|
+
- ❌ Security-only sweep → use `@security-audit` agent
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
## Read Architecture First
|
|
23
|
+
|
|
24
|
+
Detect stack via `~/.claude/architecture/_shared/stack-detection.md`. Load `ddd-architecture.md` + the stack doc — extract forbidden imports + conventions before reviewing.
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
Severity definitions: `~/.claude/architecture/_shared/severity-levels.md` (code severity table).
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
---
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
| File | Stack | Architecture Doc |
|
|
30
|
-
|------|-------|------------------|
|
|
31
|
-
| `go.mod` | Go | `go-backend.md` |
|
|
32
|
-
| `package.json` + `@nestjs/core` | NestJS | `nodejs-nestjs.md` |
|
|
33
|
-
| `package.json` + `vite.config.*` | React | `react-frontend.md` |
|
|
34
|
-
| `package.json` + `remix.config.*` | Remix | `remix-fullstack.md` |
|
|
35
|
-
| `pubspec.yaml` | Flutter | `flutter-mobile.md` |
|
|
36
|
-
| `composer.json` | Laravel | `laravel-backend.md` |
|
|
30
|
+
## Workflow
|
|
37
31
|
|
|
38
|
-
### Architecture Files Location (in priority order)
|
|
39
32
|
```
|
|
40
|
-
|
|
41
|
-
~/.claude/architecture/{name}.md # Global
|
|
33
|
+
0 DETECT → 1 COLLECT → 2 BUILD+LINT → 3 ARCH → 4 CONVENTIONS → 5 QUALITY → 6 TESTS → 7 REPORT → 8 FIX
|
|
42
34
|
```
|
|
43
35
|
|
|
44
|
-
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Phase 0: DETECT
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
- [ ] Stack detected (ask user if ambiguous — e.g., multi-stack monorepo)
|
|
40
|
+
- [ ] Stack detected (ask user if ambiguous, e.g., monorepo)
|
|
48
41
|
- [ ] Architecture doc loaded
|
|
49
|
-
- [ ] Forbidden
|
|
42
|
+
- [ ] Forbidden-imports list extracted
|
|
50
43
|
|
|
51
44
|
---
|
|
52
45
|
|
|
53
|
-
## Phase 1:
|
|
46
|
+
## Phase 1: COLLECT
|
|
54
47
|
|
|
55
48
|
```bash
|
|
56
|
-
# Resolve base branch
|
|
57
49
|
BASE=${1:-main}
|
|
58
50
|
git rev-parse --verify "$BASE" >/dev/null 2>&1 || BASE=master
|
|
59
51
|
|
|
60
|
-
echo "=== Base: $BASE ==="
|
|
61
|
-
|
|
62
|
-
echo "=== Changed files ==="
|
|
63
|
-
git diff "$BASE"...HEAD --name-only --diff-filter=ACMR
|
|
64
|
-
|
|
65
|
-
echo "=== Diff stat ==="
|
|
66
|
-
git diff "$BASE"...HEAD --stat
|
|
67
|
-
|
|
68
|
-
echo "=== Commits ==="
|
|
69
52
|
git log "$BASE"..HEAD --oneline
|
|
53
|
+
git diff "$BASE"...HEAD --stat
|
|
54
|
+
git diff "$BASE"...HEAD --name-only --diff-filter=ACMR
|
|
70
55
|
```
|
|
71
56
|
|
|
72
|
-
Categorize changed files by layer
|
|
57
|
+
Categorize changed files by layer:
|
|
73
58
|
|
|
74
|
-
|
|
|
75
|
-
|
|
59
|
+
| Layer | Typical paths |
|
|
60
|
+
|-------|---------------|
|
|
76
61
|
| Domain | `domain/`, `internal/domain/`, `src/domain/`, `lib/domain/` |
|
|
77
62
|
| Application | `application/`, `internal/application/`, `src/application/` |
|
|
78
63
|
| Infrastructure | `infrastructure/`, `internal/infrastructure/`, `src/infrastructure/` |
|
|
79
64
|
| Presentation / UI | `controllers/`, `pages/`, `components/`, `views/`, `ports/http/` |
|
|
80
|
-
| Persistence
|
|
65
|
+
| Persistence | `models/`, `entities/` (ORM), `prisma/`, `migrations/` |
|
|
81
66
|
| Config / Bootstrap | `config/`, `bootstrap/`, `cmd/`, `main.*` |
|
|
82
67
|
|
|
83
|
-
Read
|
|
68
|
+
Read **all** changed files before reviewing — never skim.
|
|
84
69
|
|
|
85
70
|
---
|
|
86
71
|
|
|
87
|
-
## Phase 2:
|
|
72
|
+
## Phase 2: BUILD + LINT
|
|
88
73
|
|
|
89
|
-
Run the stack's build + lint commands
|
|
74
|
+
Run the stack's build + typecheck + lint commands. If any fail → mark **CRITICAL** and stop further review until they pass.
|
|
90
75
|
|
|
91
76
|
```bash
|
|
92
|
-
# Go
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
#
|
|
96
|
-
pnpm typecheck
|
|
97
|
-
pnpm lint || npx eslint "{src,test}/**/*.ts"
|
|
98
|
-
|
|
99
|
-
# Laravel
|
|
100
|
-
composer dump-autoload && ./vendor/bin/phpstan analyse
|
|
101
|
-
|
|
102
|
-
# Flutter
|
|
103
|
-
dart analyze
|
|
104
|
-
|
|
105
|
-
# React / Remix
|
|
106
|
-
pnpm typecheck && pnpm lint
|
|
77
|
+
# Go: go build ./... && go vet ./...
|
|
78
|
+
# NestJS: pnpm typecheck && pnpm lint
|
|
79
|
+
# Laravel: composer dump-autoload && ./vendor/bin/phpstan analyse
|
|
80
|
+
# Flutter: dart analyze
|
|
81
|
+
# React/Remix: pnpm typecheck && pnpm lint
|
|
107
82
|
```
|
|
108
83
|
|
|
109
|
-
If build/typecheck/lint fails → report immediately as **CRITICAL**. Stop further review until these pass.
|
|
110
|
-
|
|
111
84
|
---
|
|
112
85
|
|
|
113
|
-
## Phase 3:
|
|
114
|
-
|
|
115
|
-
Apply the
|
|
116
|
-
|
|
117
|
-
### 3.1 Domain
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
131
|
-
|
|
86
|
+
## Phase 3: ARCHITECTURE (changed files only)
|
|
87
|
+
|
|
88
|
+
Apply the stack's rules. Common checks per layer:
|
|
89
|
+
|
|
90
|
+
### 3.1 Domain (if changed)
|
|
91
|
+
| # | Rule |
|
|
92
|
+
|---|------|
|
|
93
|
+
| D1 | Domain purity — no forbidden imports (ORM, HTTP, cache, queue, auth SDK) |
|
|
94
|
+
| D2 | No cross-domain imports (only shared kernel allowed) |
|
|
95
|
+
| D3 | No persistence-model imports in domain |
|
|
96
|
+
| D4 | Entities have behavior (not anemic data bags) |
|
|
97
|
+
| D5 | Entities raise events on state change (if architecture uses events) |
|
|
98
|
+
| D6 | Ports in `ports/` dir (not inline in usecases) |
|
|
99
|
+
| D7 | One port per file |
|
|
100
|
+
| D8 | Ports return domain types, not primitives |
|
|
101
|
+
| D9 | Value objects stdlib-only |
|
|
102
|
+
| D10 | Usecases have no infra imports |
|
|
103
|
+
|
|
104
|
+
Quick check:
|
|
132
105
|
```bash
|
|
133
|
-
# Generic domain-purity check (adapt FORBIDDEN for stack)
|
|
134
106
|
CHANGED_DOMAIN=$(git diff "$BASE"...HEAD --name-only --diff-filter=ACMR \
|
|
135
|
-
| grep -E '^(src|internal|lib)/domain/'
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
# Go: '"gorm.io|"github.com/gin|"github.com/redis|"firebase.google.com|"github.com/hibiken'
|
|
140
|
-
# Nest: '"@nestjs/|"typeorm"|"@nestjs/typeorm|"ioredis|"bullmq|"passport'
|
|
141
|
-
# Lara: 'Illuminate\\Database|Illuminate\\Http'
|
|
142
|
-
FORBIDDEN='<PUT STACK FORBIDDEN REGEX HERE>'
|
|
143
|
-
echo "=== D1: Domain purity ==="
|
|
144
|
-
echo "$CHANGED_DOMAIN" | xargs grep -lEn "$FORBIDDEN" 2>/dev/null \
|
|
145
|
-
&& echo "FAIL" || echo "PASS"
|
|
146
|
-
fi
|
|
107
|
+
| grep -E '^(src|internal|lib)/domain/')
|
|
108
|
+
[ -n "$CHANGED_DOMAIN" ] && echo "$CHANGED_DOMAIN" \
|
|
109
|
+
| xargs grep -lEn '<STACK_FORBIDDEN_REGEX>' 2>/dev/null \
|
|
110
|
+
&& echo FAIL || echo PASS
|
|
147
111
|
```
|
|
148
112
|
|
|
149
|
-
### 3.2 Application
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
|
164
|
-
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
|
173
|
-
|
|
174
|
-
| M1 | ORM models outside domain | Persistence models live in infrastructure, NOT in domain |
|
|
175
|
-
| M2 | Migrations added for schema changes | Any schema change has a matching migration file |
|
|
176
|
-
| M3 | JSON / nullable columns correctly typed | Pointer/nullable types used where the column allows NULL |
|
|
113
|
+
### 3.2 Application (if changed)
|
|
114
|
+
| # | Rule |
|
|
115
|
+
|---|------|
|
|
116
|
+
| A1 | Handler is thin (parse → service → respond, no business logic) |
|
|
117
|
+
| A2 | Service justified only when ≥2 usecases orchestrated |
|
|
118
|
+
| A3 | Listener is side-effect only (no business logic) |
|
|
119
|
+
| A4 | Listener registered in event bus |
|
|
120
|
+
| A5 | Event name string matches registry |
|
|
121
|
+
| A6 | DTOs validated at boundary |
|
|
122
|
+
| A7 | Composition root only — no inline wiring in handlers |
|
|
123
|
+
|
|
124
|
+
### 3.3 Infrastructure (if changed)
|
|
125
|
+
| # | Rule |
|
|
126
|
+
|---|------|
|
|
127
|
+
| I1 | Repository has no business logic |
|
|
128
|
+
| I2 | Mappers exist (domain ↔ ORM model) |
|
|
129
|
+
| I3 | Implements port interface (returns domain types) |
|
|
130
|
+
| I4 | Context / transaction propagation correct |
|
|
131
|
+
|
|
132
|
+
### 3.4 Persistence models (if changed)
|
|
133
|
+
| # | Rule |
|
|
134
|
+
|---|------|
|
|
135
|
+
| M1 | ORM models in infrastructure, NOT domain |
|
|
136
|
+
| M2 | Schema change → matching migration |
|
|
137
|
+
| M3 | Nullable columns use nullable types |
|
|
177
138
|
|
|
178
139
|
---
|
|
179
140
|
|
|
180
|
-
## Phase 4:
|
|
141
|
+
## Phase 4: CONVENTIONS (cross-stack)
|
|
181
142
|
|
|
182
|
-
|
|
143
|
+
| # | Rule |
|
|
144
|
+
|---|------|
|
|
145
|
+
| G1 | No swallowed errors (no empty catch / `if err != nil {}`) |
|
|
146
|
+
| G2 | Async work uses background context, NOT request context |
|
|
147
|
+
| G3 | API-facing types have serialization tags (`json:`, decorators, etc.) |
|
|
148
|
+
| G4 | No hardcoded secrets / tokens / keys |
|
|
149
|
+
| G5 | Parameterized queries only — no string-interpolated SQL |
|
|
150
|
+
| G6 | Input validation at boundary before reaching domain |
|
|
183
151
|
|
|
184
|
-
|
|
185
|
-
|---|------|-------|
|
|
186
|
-
| G1 | No swallowed errors | No empty `catch`/`if err != nil {}` that discards errors — must handle or rethrow |
|
|
187
|
-
| G2 | Goroutine/async context | Fire-and-forget async work uses background context, NOT request context |
|
|
188
|
-
| G3 | API-facing entities have serialization tags | `json:"..."` (Go), class-transformer/serializer decorators, `JsonSerializable`, etc. |
|
|
189
|
-
| G4 | No secrets in code | No hardcoded tokens, keys, passwords |
|
|
190
|
-
| G5 | Parameterized queries | No raw string-interpolated SQL |
|
|
191
|
-
| G6 | Input validation at boundary | All external input validated before touching domain |
|
|
152
|
+
Plus any stack-specific Hard Rules from the architecture doc.
|
|
192
153
|
|
|
193
154
|
---
|
|
194
155
|
|
|
195
|
-
## Phase 5:
|
|
156
|
+
## Phase 5: QUALITY (manual)
|
|
196
157
|
|
|
197
|
-
Read the diff
|
|
158
|
+
Read the diff. Look for:
|
|
198
159
|
|
|
199
160
|
| # | Area | What to look for |
|
|
200
|
-
|
|
201
|
-
| Q1 | Logic correctness | Off-by-one, nil
|
|
202
|
-
| Q2 | Error handling | Errors
|
|
203
|
-
| Q3 | Concurrency
|
|
204
|
-
| Q4 | Resource leaks | Unclosed connections, HTTP bodies, file handles
|
|
205
|
-
| Q5 | Naming
|
|
206
|
-
| Q6 | Dead code | Unreachable
|
|
207
|
-
| Q7 | Duplication |
|
|
208
|
-
| Q8 | Breaking
|
|
209
|
-
| Q9 | Over-engineering |
|
|
161
|
+
|---|------|------------------|
|
|
162
|
+
| Q1 | Logic correctness | Off-by-one, nil deref, wrong condition, missed edge case |
|
|
163
|
+
| Q2 | Error handling | Errors propagated/wrapped, not silently ignored |
|
|
164
|
+
| Q3 | Concurrency | Race conditions, shared mutable state, async leaks |
|
|
165
|
+
| Q4 | Resource leaks | Unclosed connections, HTTP bodies, file handles |
|
|
166
|
+
| Q5 | Naming | Reveals intent (no `data`, `info`, `manager`, `helper`) |
|
|
167
|
+
| Q6 | Dead code | Unreachable, unused, commented-out |
|
|
168
|
+
| Q7 | Duplication | Real duplication across changed files (not coincidental) |
|
|
169
|
+
| Q8 | Breaking change | API contract change, removed field, behavior change |
|
|
170
|
+
| Q9 | Over-engineering | Abstraction not justified by the change |
|
|
210
171
|
| Q10 | Test coverage | New logic has tests; bug fixes have regression tests |
|
|
211
172
|
|
|
212
173
|
---
|
|
213
174
|
|
|
214
|
-
## Phase 6:
|
|
175
|
+
## Phase 6: TESTS
|
|
215
176
|
|
|
216
177
|
```bash
|
|
217
|
-
#
|
|
178
|
+
# Tests for changed domains only
|
|
218
179
|
CHANGED_DOMAINS=$(git diff "$BASE"...HEAD --name-only --diff-filter=ACMR \
|
|
219
180
|
| grep -E '/(domain|modules|features)/' \
|
|
220
|
-
| sed -E 's|.*(domain\|modules\|features)/([^/]+)/.*|\2|'
|
|
221
|
-
| sort -u)
|
|
181
|
+
| sed -E 's|.*(domain\|modules\|features)/([^/]+)/.*|\2|' | sort -u)
|
|
222
182
|
|
|
223
183
|
for d in $CHANGED_DOMAINS; do
|
|
224
|
-
|
|
225
|
-
#
|
|
226
|
-
#
|
|
227
|
-
# Lara: ./vendor/bin/phpunit --filter $d
|
|
184
|
+
# Go: go test ./internal/domain/$d/... -v
|
|
185
|
+
# NestJS: npx jest src/domain/$d
|
|
186
|
+
# Laravel: ./vendor/bin/phpunit --filter $d
|
|
228
187
|
# Flutter: flutter test test/domain/$d
|
|
188
|
+
echo "Test $d"
|
|
229
189
|
done
|
|
230
190
|
|
|
231
|
-
|
|
232
|
-
|
|
191
|
+
# Full suite
|
|
192
|
+
{full_test_command}
|
|
233
193
|
```
|
|
234
194
|
|
|
235
195
|
---
|
|
236
196
|
|
|
237
|
-
## Phase 7:
|
|
197
|
+
## Phase 7: REPORT
|
|
238
198
|
|
|
239
199
|
```markdown
|
|
240
200
|
## Code Review: {branch} → {base}
|
|
241
201
|
|
|
242
|
-
|
|
243
|
-
- **Stack:** {stack}
|
|
244
|
-
- **Architecture doc:** {path}
|
|
245
|
-
- **Commits:** {count}
|
|
246
|
-
- **Files changed:** {count} ({additions}+ / {deletions}-)
|
|
247
|
-
- **Areas affected:** {domain list / feature list}
|
|
202
|
+
**Stack:** {stack} · **Commits:** {N} · **Files:** {N} (+{add} / -{del})
|
|
248
203
|
|
|
249
|
-
### Build
|
|
204
|
+
### Build / Lint / Types
|
|
250
205
|
| Check | Status |
|
|
251
206
|
|-------|--------|
|
|
252
207
|
| Build | PASS/FAIL |
|
|
253
208
|
| Lint | PASS/FAIL |
|
|
254
209
|
| Types | PASS/FAIL |
|
|
255
210
|
|
|
256
|
-
### Architecture
|
|
257
|
-
| # | Rule | Status |
|
|
258
|
-
|
|
259
|
-
| D1 | Domain purity | PASS
|
|
260
|
-
|
|
|
261
|
-
|
|
262
|
-
### Conventions
|
|
263
|
-
| # | Rule | Status | Details |
|
|
264
|
-
|---|------|--------|---------|
|
|
265
|
-
| G1 | No swallowed errors | PASS/WARN | {file:line} |
|
|
266
|
-
|
|
267
|
-
### Code Quality
|
|
268
|
-
| # | Area | Status | Details |
|
|
269
|
-
|---|------|--------|---------|
|
|
270
|
-
| Q1 | Logic correctness | OK/ISSUE | ... |
|
|
211
|
+
### Architecture / Conventions / Quality
|
|
212
|
+
| # | Rule | Status | File:line |
|
|
213
|
+
|---|------|--------|-----------|
|
|
214
|
+
| D1 | Domain purity | PASS | — |
|
|
215
|
+
| G4 | No secrets | FAIL | `config/db.ts:42` hardcoded token |
|
|
216
|
+
| Q1 | Logic correctness | OK | — |
|
|
271
217
|
|
|
272
218
|
### Tests
|
|
273
219
|
| Check | Status |
|
|
274
220
|
|-------|--------|
|
|
275
221
|
| Changed area tests | PASS/FAIL |
|
|
276
|
-
| Full
|
|
222
|
+
| Full suite | PASS/FAIL |
|
|
277
223
|
|
|
278
|
-
### Issues
|
|
279
|
-
| # | Severity | File:
|
|
280
|
-
|
|
281
|
-
| 1 | CRITICAL
|
|
224
|
+
### Issues (sorted by severity)
|
|
225
|
+
| # | Severity | File:line | Issue | Suggested fix |
|
|
226
|
+
|---|----------|-----------|-------|---------------|
|
|
227
|
+
| 1 | CRITICAL | config/db.ts:42 | hardcoded token | move to env |
|
|
228
|
+
| 2 | HIGH | handlers/user.ts:88 | business logic in handler | extract to usecase |
|
|
282
229
|
|
|
283
230
|
### Verdict
|
|
284
231
|
{APPROVED / CHANGES REQUESTED}
|
|
285
232
|
```
|
|
286
233
|
|
|
287
|
-
|
|
234
|
+
### Verdict rules
|
|
235
|
+
- **CRITICAL or HIGH found** → CHANGES REQUESTED
|
|
236
|
+
- **MEDIUM only** → CHANGES REQUESTED (should fix)
|
|
237
|
+
- **LOW only or nothing** → APPROVED (with suggestions if any)
|
|
288
238
|
|
|
289
|
-
|
|
239
|
+
---
|
|
290
240
|
|
|
291
|
-
|
|
292
|
-
|-------|---------|---------|
|
|
293
|
-
| CRITICAL | Build fails, crash, data loss, security hole | Build error, nil deref, SQL injection, circular import, leaked secret |
|
|
294
|
-
| HIGH | Architecture violation, silent bug | Domain imports ORM, cross-domain import, swallowed error, race condition |
|
|
295
|
-
| MEDIUM | Convention violation, code smell | Missing serialization tags, business logic in handler, no tests for new logic |
|
|
296
|
-
| LOW | Style, naming, minor improvement | File naming, redundant code, unclear name |
|
|
241
|
+
## Phase 8: FIX (if user confirms)
|
|
297
242
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
243
|
+
1. Fix in order: CRITICAL → HIGH → MEDIUM → LOW
|
|
244
|
+
2. Re-run build + lint + tests after each batch
|
|
245
|
+
3. Re-run full review when all fixed
|
|
246
|
+
4. Report final status
|
|
301
247
|
|
|
302
248
|
---
|
|
303
249
|
|
|
304
|
-
##
|
|
250
|
+
## Hard Rules
|
|
305
251
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
252
|
+
- **Changed files only** — don't expand scope to drive-by reviews
|
|
253
|
+
- **Stop on CRITICAL** — fix build / lint / type errors before everything else
|
|
254
|
+
- **File:line for every issue** — no vague "somewhere in handlers"
|
|
255
|
+
- **Match severity honestly** — don't grade-inflate
|
|
256
|
+
- **Test changed areas** — don't only rely on global test run
|
|
311
257
|
|
|
312
258
|
---
|
|
313
259
|
|
|
314
260
|
## Related Skills
|
|
315
261
|
|
|
316
|
-
|
|
|
317
|
-
|
|
318
|
-
| `/review:
|
|
319
|
-
|
|
|
320
|
-
|
|
|
321
|
-
|
|
|
322
|
-
| `/fix:hotfix` | Fixing the issues found here |
|
|
262
|
+
| When | Use |
|
|
263
|
+
|------|-----|
|
|
264
|
+
| Reviewing teammate's PR | `/review:pr` |
|
|
265
|
+
| Deep DDD audit of a domain | `/review:architect` |
|
|
266
|
+
| Fixing review comments on your PR | `/fix:pr-comment` |
|
|
267
|
+
| Fixing bugs surfaced here | `/fix:hotfix` |
|
|
323
268
|
|
|
324
269
|
## Recommended Agents
|
|
325
270
|
|
|
326
271
|
| Phase | Agent | Purpose |
|
|
327
272
|
|-------|-------|---------|
|
|
328
|
-
|
|
|
329
|
-
|
|
|
330
|
-
|
|
|
331
|
-
|
|
|
332
|
-
|
|
|
273
|
+
| 3 Architecture | `@clean-architect` | DDD compliance |
|
|
274
|
+
| 4 Conventions | `@security-audit` | Vulnerability sweep |
|
|
275
|
+
| 5 Quality | `@code-reviewer` | Code smells |
|
|
276
|
+
| 6 Tests | `@test-writer` | Coverage check |
|
|
277
|
+
| 8 Fix | Stack-specific dev agent | Apply fixes |
|