moicle 2.0.0 → 2.1.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.
@@ -6,86 +6,69 @@ args: "[ARCHITECTURE_NAME] [DOMAIN]"
6
6
 
7
7
  # DDD Architecture Review
8
8
 
9
- Review codebase against DDD architecture guidelines with automated checks and a review loop that keeps fixing until all checks pass.
9
+ Audit a codebase (or a single domain) against DDD rules with automated checks, manual review, and a fix loop until score B.
10
10
 
11
11
  ## When to use this skill
12
12
 
13
- - ✅ Verify DDD compliance for a domain after `/feature:new` or `refactor`
13
+ - ✅ Verify DDD compliance after `/feature:new` or `/feature:refactor`
14
14
  - ✅ Periodic audit of an existing codebase
15
- - ✅ As a quality gate before merging architectural changes
16
- - ❌ Reviewing a PR end-to-end (code quality + arch) → use `/review:pr`
17
- - ❌ Reviewing own branch before push → use `/review:branch`
18
- - ❌ Looking for security bugs → use `@security-audit` agent
15
+ - ✅ Quality gate before merging architectural changes
16
+ - ❌ Full PR review (arch + code + security + tests) → use `/review:pr`
17
+ - ❌ Self-review own branch before push → use `/review:branch`
18
+ - ❌ Security-only audit → use `@security-audit` agent
19
19
 
20
20
  ## Usage
21
21
 
22
- ```bash
23
- /review:architect go-backend wallet
24
- /review:architect react-frontend
25
- /review:architect
26
22
  ```
23
+ /review:architect <architecture> [domain]
24
+ /review:architect # auto-detect stack
25
+ ```
26
+
27
+ Examples: `/review:architect go-backend wallet`, `/review:architect react-frontend`.
27
28
 
28
- ## Supported Architectures
29
+ ## Supported architectures
29
30
 
30
- Check for architecture files in these locations (in order):
31
- 1. **Project-specific**: `.claude/architecture/`
32
- 2. **Global**: `~/.claude/architecture/`
31
+ Aliases: `ddd → ddd-architecture`, `go go-backend`, `react react-frontend`, `flutter → flutter-mobile`, `laravel → laravel-backend`, `remix → remix-fullstack`, `nestjs → nodejs-nestjs`, `mono → monorepo`.
32
+
33
+ Files live at `.claude/architecture/{name}.md` (project) `~/.claude/architecture/{name}.md` (global).
34
+
35
+ ---
33
36
 
34
- ### Built-in Architectures
37
+ ## Workflow
35
38
 
36
- | Name | File | Aliases |
37
- |------|------|---------|
38
- | `ddd-architecture` | `ddd-architecture.md` | `ddd`, `core` |
39
- | `go-backend` | `go-backend.md` | `go` |
40
- | `react-frontend` | `react-frontend.md` | `react` |
41
- | `flutter-mobile` | `flutter-mobile.md` | `flutter` |
42
- | `laravel-backend` | `laravel-backend.md` | `laravel` |
43
- | `remix-fullstack` | `remix-fullstack.md` | `remix` |
44
- | `monorepo` | `monorepo.md` | `mono` |
39
+ ```
40
+ RESOLVE → LOAD RULES → AUTOMATED CHECKS → MANUAL REVIEW → REPORT → FIX LOOP
41
+ ```
45
42
 
46
43
  ---
47
44
 
48
45
  ## Phase 0: RESOLVE ARCHITECTURE
49
46
 
50
- ### If argument provided
51
- 1. Normalize name using alias table
52
- 2. Search: `.claude/architecture/{name}.md``~/.claude/architecture/{name}.md`
53
- 3. Found → Phase 1
54
- 4. Not found → REJECT with available architectures list. **STOP.**
55
-
56
- ### If NO argument
57
- 1. Auto-detect stack from project files:
58
- - `go.mod` → `go-backend`
59
- - `package.json` + `vite.config` → `react-frontend`
60
- - `pubspec.yaml` → `flutter-mobile`
61
- - `composer.json` → `laravel-backend`
62
- - `remix.config` → `remix-fullstack`
63
- 2. If detected → confirm with user
64
- 3. If not detected → list available, ask user to select
47
+ ### Argument provided
48
+ 1. Normalize via alias table → search project then global
49
+ 2. Found → Phase 1. Not found reject with available list, STOP.
50
+
51
+ ### No argument
52
+ 1. Detect stack via `~/.claude/architecture/_shared/stack-detection.md`
53
+ 2. Detected confirm with user. Not detected → list options, ask.
65
54
 
66
55
  ### Gate
67
56
  - [ ] Architecture file loaded
68
- - [ ] Domain name identified (if provided)
57
+ - [ ] Domain identified (if scoped)
69
58
 
70
59
  ---
71
60
 
72
- ## Phase 1: LOAD GUIDELINE & EXTRACT RULES
61
+ ## Phase 1: LOAD RULES
73
62
 
74
- Read the architecture file completely. Also read `ddd-architecture.md` (core DDD spec) as the base reference.
75
-
76
- ### Extract from architecture doc:
77
-
78
- 1. **DDD Directory Structure** — expected folder layout
79
- 2. **Layer Rules** import/dependency rules per layer
80
- 3. **Hard Rules** — forbidden imports, naming conventions
81
- 4. **Forbidden Imports** — specific packages/modules NOT allowed in domain
82
- 5. **Check Scripts** — automated bash commands for validation
83
- 6. **Wiring Pattern** — how modules are registered
84
- 7. **Test Patterns** — how each layer should be tested
63
+ Read `ddd-architecture.md` (core) + the stack doc. Extract:
64
+ - DDD directory layout
65
+ - Layer import rules + forbidden imports
66
+ - Hard rules (HR1-HR15)
67
+ - Stack-specific check scripts
68
+ - Wiring + test patterns
85
69
 
86
70
  ### Gate
87
- - [ ] Core DDD rules loaded
88
- - [ ] Stack-specific rules loaded
71
+ - [ ] Core + stack rules loaded
89
72
  - [ ] Check scripts extracted
90
73
  - [ ] Review checklist prepared
91
74
 
@@ -93,215 +76,130 @@ Read the architecture file completely. Also read `ddd-architecture.md` (core DDD
93
76
 
94
77
  ## Phase 2: AUTOMATED CHECKS
95
78
 
96
- Run the check scripts from the architecture doc. These vary per stack but follow this pattern:
97
-
98
- ### Standard Checks (all stacks)
79
+ Run the stack-specific check scripts from the architecture doc. They follow this universal pattern (adapt per stack):
99
80
 
100
81
  ```bash
101
- echo "=== R1: Build ==="
102
- {stack_build_command} && echo "PASS" || echo "FAIL"
103
-
104
- echo "=== R2: Lint/Vet ==="
105
- {stack_lint_command} && echo "PASS" || echo "FAIL"
106
-
107
- echo "=== R3: Domain Purity (no framework imports) ==="
108
- {grep_forbidden_imports_in_domain} && echo "FAIL" || echo "PASS"
109
-
110
- echo "=== R4: No Cross-Domain Imports ==="
111
- {check_domain_A_not_importing_domain_B} && echo "FAIL" || echo "PASS"
112
-
113
- echo "=== R5: No Circular Imports ==="
114
- {build_and_check_cycles} && echo "FAIL" || echo "PASS"
115
-
116
- echo "=== R6: Tests Exist ==="
117
- {find_test_files_in_domain} | wc -l
118
-
119
- echo "=== R7: Tests Pass ==="
120
- {stack_test_command} && echo "PASS" || echo "FAIL"
121
-
122
- echo "=== R8: Wiring Registered ==="
123
- {check_routes_or_providers_registered}
124
-
125
- echo "=== R9: Event Names Match Registry ==="
126
- {check_event_names_consistency}
127
-
128
- echo "=== R10: Async Context Safety ==="
129
- {check_no_request_context_in_goroutines}
82
+ echo "R1: Build" ; {build} && echo PASS || echo FAIL
83
+ echo "R2: Lint/Vet" ; {lint} && echo PASS || echo FAIL
84
+ echo "R3: Domain pure" ; {grep_forbidden in domain/} && echo FAIL || echo PASS
85
+ echo "R4: No cross-dom" ; {grep_domain_A in domain_B} && echo FAIL || echo PASS
86
+ echo "R5: No cycles" ; {cycle_check} && echo FAIL || echo PASS
87
+ echo "R6: Tests exist" ; {find_tests_in_domain} | wc -l
88
+ echo "R7: Tests pass" ; {test} && echo PASS || echo FAIL
89
+ echo "R8: Wiring reg" ; {check_routes_registered}
90
+ echo "R9: Event names" ; {check_event_consistency}
91
+ echo "R10: Async ctx" ; {check_no_request_context_in_goroutines}
130
92
  ```
131
93
 
132
- ### Stack-Specific Check Scripts
133
-
134
- Read the **Check Scripts** section from the loaded architecture doc and run those exact commands.
135
-
136
- ### Output
137
- Record PASS/FAIL for each check. Continue to Phase 3 regardless — manual review catches what automated checks miss.
94
+ Record PASS/FAIL per check. Continue to Phase 3 either way — manual review catches what automated misses.
138
95
 
139
96
  ### Gate
140
- - [ ] All automated checks executed
141
- - [ ] Results recorded
97
+ - [ ] All 10 automated checks run
98
+ - [ ] PASS/FAIL recorded
142
99
 
143
100
  ---
144
101
 
145
- ## Phase 3: ARCHITECTURE REVIEW (Manual)
146
-
147
- Read files and check DDD compliance. Focus on **architecture structure**, NOT business logic correctness.
148
-
149
- ### 3.1 Directory Structure
150
-
151
- | # | Check | What to look for |
152
- |---|-------|-----------------|
153
- | D1 | Domain dir exists | `domain/{domain}/` with proper subdirs |
154
- | D2 | Required subdirs | `entities/`, `ports/`, `usecases/` at minimum |
155
- | D3 | Value objects separate | `valueobjects/` dir, NOT mixed in `entities/` |
156
- | D4 | Events separate | `events/` dir with 1 file per event |
157
- | D5 | Application layer | `application/ports/{transport}/`, `services/`, `listeners/` |
158
- | D6 | Infrastructure layer | Implements port interfaces |
159
- | D7 | No legacy dirs | No `modules/`, `pkg/` (for Go), or flat structure |
160
-
161
- ### 3.2 Entities
162
-
163
- | # | Check | What to look for |
164
- |---|-------|-----------------|
165
- | E1 | Has constructor | Factory function/method: `New{Entity}()`, `create()`, etc. |
166
- | E2 | Has behavior methods | State transitions, calculations, guard checks — NOT anemic |
167
- | E3 | Raises domain events | Collects/emits events on state changes |
168
- | E4 | No framework imports | Only stdlib + domain/shared + valueobjects |
169
- | E5 | Has mappers (if applicable) | ToModel/FromModel or equivalent for persistence mapping |
170
-
171
- ### 3.3 Value Objects
172
-
173
- | # | Check | What to look for |
174
- |---|-------|-----------------|
175
- | VO1 | Separate directory | In `valueobjects/`, NOT in `entities/` |
176
- | VO2 | Only stdlib imports | No external packages, no domain/shared |
177
- | VO3 | Immutable with behavior | Typed values with query methods (IsPending, CanTransitionTo) |
178
- | VO4 | Used by entities/ports | Entities and ports reference VO types, not raw strings |
179
-
180
- ### 3.4 Ports
181
-
182
- | # | Check | What to look for |
183
- |---|-------|-----------------|
184
- | P1 | `ports/` folder exists | MUST have `ports/` — inline interfaces in usecases is a violation |
185
- | P2 | One file per port | `{store_name}.go/.ts/.dart/.php` not all in one file |
186
- | P3 | Interface + related DTOs | Each file has interface + its param/result types |
187
- | P4 | Domain types in signatures | Return entities/VOs, not primitives for typed values |
188
- | P5 | Platform-agnostic naming | `URLParser`, NOT `ShopeeURLParser` |
189
- | P6 | No infrastructure imports | Only stdlib + entities + valueobjects + shared |
190
-
191
- ### 3.5 Events
192
-
193
- | # | Check | What to look for |
194
- |---|-------|-----------------|
195
- | EV1 | One file per event | `{event_name}` naming, not multiple events in one file |
196
- | EV2 | Extends base event | Embeds/extends shared BaseEvent |
197
- | EV3 | Carries data for listeners | UserID, amounts, names enough for side-effects |
198
- | EV4 | Name matches registry | Event name string matches event bus registration |
199
-
200
- ### 3.6 UseCases
201
-
202
- | # | Check | What to look for |
203
- |---|-------|-----------------|
204
- | U1 | Uses port interfaces | From `ports/` package, NOT inline interface definitions |
205
- | U2 | Split by concern | One file per action group, max ~200 lines per file |
206
- | U3 | Business logic lives here | Not in controller, not in store, not in service |
207
- | U4 | No infrastructure imports | No ORM, no HTTP framework, no cache client |
208
- | U5 | Dispatches domain events | After successful persistence, dispatches collected events |
209
- | U6 | No `deps.go` or similar | Interfaces MUST be in `ports/`, not inline |
210
-
211
- ### 3.7 Services
212
-
213
- | # | Check | What to look for |
214
- |---|-------|-----------------|
215
- | SVC1 | Thin wrapper | Delegates to usecases, no business logic |
216
- | SVC2 | No infrastructure imports | No ORM, no HTTP framework |
217
-
218
- ### 3.8 Handlers/Controllers
219
-
220
- | # | Check | What to look for |
221
- |---|-------|-----------------|
222
- | H1 | Registration function | `Register{Module}Routes` or equivalent wiring |
223
- | H2 | Thin handlers | Parse input -> call service -> return output |
224
- | H3 | No business logic | Logic is in usecases, not here |
225
- | H4 | DTOs separate | Request/Response types in separate file |
226
-
227
- ### 3.9 Listeners
228
-
229
- | # | Check | What to look for |
230
- |---|-------|-----------------|
231
- | L1 | One per event | `on_{event_name}` naming |
232
- | L2 | Side-effects only | Notifications, SSE, analytics — no business logic |
233
- | L3 | Registered in event bus | Listed in registry/event bus setup |
234
- | L4 | Background context | Async work uses background context, not request context |
235
-
236
- ### 3.10 Infrastructure/Store
237
-
238
- | # | Check | What to look for |
239
- |---|-------|-----------------|
240
- | I1 | Implements port interface | All methods from the port interface |
241
- | I2 | Has mappers | Converts between domain entities and persistence models |
242
- | I3 | No business logic | Pure persistence — queries, saves, deletes |
243
- | I4 | Compile-time check | Interface compliance verified at compile time (where possible) |
102
+ ## Phase 3: MANUAL REVIEW
103
+
104
+ Focus on **architecture structure**, not business correctness. 10 areas:
105
+
106
+ ### D Directory Structure
107
+ - D1 `domain/{domain}/` exists with proper subdirs
108
+ - D2 Has `entities/`, `ports/`, `usecases/` at minimum
109
+ - D3 `valueobjects/` separate (not mixed in entities)
110
+ - D4 `events/` separate, 1 file per event
111
+ - D5 Application layer: `ports/{transport}/`, `services/`, `listeners/`
112
+ - D6 Infrastructure implements ports
113
+ - D7 No legacy dirs (`modules/`, flat structure)
114
+
115
+ ### E Entities
116
+ - E1 Has constructor (`New{Entity}` / `create()`)
117
+ - E2 Has behavior methods (NOT anemic)
118
+ - E3 Raises domain events on state change
119
+ - E4 No framework imports
120
+ - E5 Has mappers (if persisted)
121
+
122
+ ### VO Value Objects
123
+ - VO1 In `valueobjects/`, not entities
124
+ - VO2 Only stdlib imports
125
+ - VO3 Immutable with behavior methods
126
+ - VO4 Used by entities + ports (not raw strings)
127
+
128
+ ### P Ports
129
+ - P1 `ports/` dir exists (no inline interfaces in usecases)
130
+ - P2 One file per port
131
+ - P3 Each file has interface + related DTOs
132
+ - P4 Domain types in signatures (not primitives)
133
+ - P5 Platform-agnostic naming (`URLParser` not `ShopeeURLParser`)
134
+ - P6 No infrastructure imports
135
+
136
+ ### EV — Events
137
+ - EV1 One file per event
138
+ - EV2 Extends base event type
139
+ - EV3 Carries data for listeners
140
+ - EV4 Name matches registry
141
+
142
+ ### UUseCases
143
+ - U1 Uses port interfaces (not inline)
144
+ - U2 Split by concern (≤200 lines/file)
145
+ - U3 Business logic lives here (not in handler / store / service)
146
+ - U4 No infrastructure imports
147
+ - U5 Dispatches events after persistence
148
+ - U6 No `deps.go` inline interfaces
149
+
150
+ ### SVC Services
151
+ - SVC1 Thin wrapper, delegates to usecases
152
+ - SVC2 No infrastructure imports
153
+
154
+ ### HHandlers / Controllers
155
+ - H1 Has registration function
156
+ - H2 Thin (parse → service → respond)
157
+ - H3 No business logic
158
+ - H4 DTOs in separate file
159
+
160
+ ### L — Listeners
161
+ - L1 One per event (`on_{event}` naming)
162
+ - L2 Side-effects only
163
+ - L3 Registered in event bus
164
+ - L4 Background context (not request ctx)
165
+
166
+ ### I Infrastructure
167
+ - I1 Implements port interface
168
+ - I2 Has mappers (domain ↔ persistence)
169
+ - I3 No business logic
170
+ - I4 Compile-time interface check (where possible)
244
171
 
245
172
  ### Gate
246
173
  - [ ] All 10 areas reviewed
247
- - [ ] Findings categorized by severity
174
+ - [ ] Findings categorized by severity (see `~/.claude/architecture/_shared/severity-levels.md`)
248
175
 
249
176
  ---
250
177
 
251
178
  ## Phase 4: REPORT
252
179
 
253
- ### Severity Levels
254
-
255
- | Level | Meaning | Examples |
256
- |-------|---------|---------|
257
- | **CRITICAL** | Architecture broken | Build fails, circular imports, domain imports framework |
258
- | **HIGH** | DDD violation | Cross-domain import, business logic in wrong layer, no ports dir, inline interfaces |
259
- | **MEDIUM** | Structure issue | Anemic entity, fat controller, missing events, missing tests, missing json tags |
260
- | **LOW** | Convention issue | File naming, redundant code, DTOs in wrong package |
261
-
262
- **ALL levels must be fixed.**
263
-
264
- ### Report Template
265
-
266
180
  ```markdown
267
181
  ## Architecture Review: {architecture} / {domain}
268
182
 
269
- ### Automated Checks
183
+ ### Automated (R1-R10)
270
184
  | # | Check | Status |
271
185
  |---|-------|--------|
272
186
  | R1 | Build | PASS/FAIL |
273
- | R2 | Lint/Vet | PASS/FAIL |
274
- | R3 | Domain purity | PASS/FAIL |
275
- | R4 | No cross-domain imports | PASS/FAIL |
276
- | R5 | No circular imports | PASS/FAIL |
277
- | R6 | Tests exist | PASS/WARN |
278
- | R7 | Tests pass | PASS/FAIL |
279
- | R8 | Wiring registered | PASS/FAIL |
280
- | R9 | Event names consistent | PASS/N/A |
281
- | R10 | Async context safety | PASS/N/A |
282
-
283
- ### Architecture Review
187
+ | ... | ... | ... |
188
+
189
+ ### Manual review
284
190
  | Area | Status | Violations |
285
191
  |------|--------|------------|
286
- | Directory Structure (D1-D7) | OK/ISSUE | ... |
287
- | Entities (E1-E5) | OK/ISSUE | ... |
288
- | Value Objects (VO1-VO4) | OK/ISSUE | ... |
289
- | Ports (P1-P6) | OK/ISSUE | ... |
290
- | Events (EV1-EV4) | OK/N/A | ... |
291
- | UseCases (U1-U6) | OK/ISSUE | ... |
292
- | Services (SVC1-SVC2) | OK/ISSUE | ... |
293
- | Handlers (H1-H4) | OK/ISSUE | ... |
294
- | Listeners (L1-L4) | OK/N/A | ... |
295
- | Infrastructure (I1-I4) | OK/ISSUE | ... |
296
-
297
- ### Violations Found
298
- 1. [SEVERITY] Code — file:line — description
299
- 2. ...
192
+ | Directory (D1-D7) | OK / ISSUE | ... |
193
+ | Entities (E1-E5) | OK / ISSUE | ... |
194
+ | ... | ... | ... |
300
195
 
301
- ### Recommended Fixes
302
- 1. Fix description
196
+ ### Violations
197
+ 1. [SEVERITY] code:file:line — description
303
198
  2. ...
304
199
 
200
+ ### Recommended fixes
201
+ 1. ...
202
+
305
203
  ### Overall Score: {A/B/C/D/F}
306
204
  ```
307
205
 
@@ -309,97 +207,50 @@ Read files and check DDD compliance. Focus on **architecture structure**, NOT bu
309
207
 
310
208
  | Score | Criteria |
311
209
  |-------|----------|
312
- | **A** | 0 violations, all automated checks PASS |
210
+ | **A** | 0 violations, all R1-R10 PASS |
313
211
  | **B** | 0 CRITICAL/HIGH, max 3 MEDIUM |
314
212
  | **C** | 0 CRITICAL, max 2 HIGH |
315
213
  | **D** | Has CRITICAL or 3+ HIGH |
316
- | **F** | Multiple CRITICAL, architecture fundamentally broken |
214
+ | **F** | Multiple CRITICAL architecture broken |
317
215
 
318
216
  ### Gate
319
217
  - [ ] Report generated
320
218
  - [ ] Score calculated
321
- - [ ] All violations listed with file:line
219
+ - [ ] All violations have file:line
322
220
 
323
221
  ---
324
222
 
325
- ## Phase 5: REVIEW LOOP (if user confirms fix)
326
-
327
- **Keep looping until ALL checks pass and score is A or B.**
223
+ ## Phase 5: FIX LOOP (if user confirms)
328
224
 
329
225
  ```
330
226
  LOOP:
331
- 1. Fix all violations found in report
332
- 2. Run automated checks (Phase 2)
333
- 3. Run architecture review (Phase 3)
334
- 4. Collect violations
335
- 5. IF violations with severity >= MEDIUM:
336
- a. Fix violations
337
- b. GOTO 1
338
- 6. IF only LOW violations or none:
339
- BREAK → Report final status
227
+ 1. Fix all violations
228
+ 2. Re-run automated checks (Phase 2)
229
+ 3. Re-run manual review (Phase 3)
230
+ 4. IF violations severity ≥ MEDIUM → GOTO 1
231
+ 5. IF only LOW or none → BREAK, final report
340
232
  ```
341
233
 
342
- ### After Each Fix Iteration
343
- ```bash
344
- # Verify build still works
345
- {stack_build_command}
346
-
347
- # Verify tests still pass
348
- {stack_test_command}
349
-
350
- # Re-check domain purity
351
- {grep_forbidden_imports_in_domain}
352
- ```
234
+ Verify after each iteration: build passes, tests pass, domain purity holds.
353
235
 
354
236
  ---
355
237
 
356
- ## Calling from Other Skills
357
-
358
- This skill is designed to be called by `/feature:new` and `/feature:refactor`s at the end of their workflows:
238
+ ## Calling from other skills
359
239
 
360
- ```
361
- # From new-feature skill, after Phase 5 (registration):
362
- → Run /review:architect {detected_stack} {domain}
363
- → Review loop until score >= B
364
-
365
- # From refactor skill, after Phase 4 (cleanup):
366
- → Run /review:architect {detected_stack} {domain}
367
- → Review loop until score >= B
368
- ```
369
-
370
- When called from another skill:
240
+ `/feature:new` and `/feature:refactor` call this skill at the end of their workflows. When called from another skill:
371
241
  - Skip Phase 0 (architecture already known)
372
242
  - Skip user confirmation for fixes (auto-fix in loop)
373
- - Report final score back to calling skill
243
+ - Report final score back to caller
374
244
 
375
245
  ---
376
246
 
377
- ## Quick Reference
378
-
379
- ### Architecture Files Location
380
- ```
381
- .claude/architecture/{name}.md # Project-specific (priority)
382
- ~/.claude/architecture/{name}.md # Global
383
- ```
384
-
385
- ### Aliases
386
- ```
387
- ddd → ddd-architecture
388
- go → go-backend
389
- react → react-frontend
390
- flutter → flutter-mobile
391
- laravel → laravel-backend
392
- remix → remix-fullstack
393
- mono → monorepo
394
- ```
247
+ ## Hard Rules
395
248
 
396
- ### Review Areas (10)
397
- ```
398
- D: Directory Structure E: Entities VO: Value Objects
399
- P: Ports EV: Events U: UseCases
400
- SVC: Services H: Handlers L: Listeners
401
- I: Infrastructure
402
- ```
249
+ - **All CRITICAL/HIGH must be fixed** before merge
250
+ - **MEDIUM allowed with waiver** (explicit decision + comment)
251
+ - **Don't grade-inflate** if it's a HIGH, mark HIGH
252
+ - **Don't skip Phase 3** — automated checks miss structural issues
253
+ - **File:line for every violation** — author shouldn't have to grep
403
254
 
404
255
  ---
405
256
 
@@ -407,17 +258,17 @@ I: Infrastructure
407
258
 
408
259
  | When | Use |
409
260
  |------|-----|
410
- | Full PR review (arch + code quality + security + tests) | `/review:pr` |
261
+ | Full PR review (arch + code + security + tests) | `/review:pr` |
411
262
  | Self-review own branch before push | `/review:branch` |
412
- | Refactor to fix violations found here | `refactor` |
263
+ | Refactor to fix violations | `/feature:refactor` |
413
264
  | Add tests if missing | `/review:tdd` |
414
- | Called from `/feature:new` / `refactor` review loop | (automatic — no manual invoke) |
265
+ | Called from `/feature:new` / `/feature:refactor` | automatic |
415
266
 
416
267
  ## Recommended Agents
417
268
 
418
269
  | Phase | Agent | Purpose |
419
270
  |-------|-------|---------|
420
271
  | LOAD | `@clean-architect` | Interpret architecture rules |
421
- | AUTOMATED CHECKS | `@devops` | Build / lint / test scripts |
422
- | MANUAL REVIEW | `@code-reviewer` | Spot violations |
272
+ | AUTOMATED | `@devops` | Build / lint / test scripts |
273
+ | MANUAL | `@code-reviewer` | Spot violations |
423
274
  | FIX | Stack-specific dev agent | Apply fixes |