@uoyo/mvtt 2.0.0-beta.0 → 2.0.0-beta.1
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/LICENSE +21 -21
- package/README.md +131 -147
- package/dist/build/assembler.d.ts.map +1 -1
- package/dist/build/assembler.js +2 -0
- package/dist/build/assembler.js.map +1 -1
- package/dist/build/plan-validator.d.ts +26 -0
- package/dist/build/plan-validator.d.ts.map +1 -0
- package/dist/build/plan-validator.js +225 -0
- package/dist/build/plan-validator.js.map +1 -0
- package/dist/build/section-loader.d.ts.map +1 -1
- package/dist/build/section-loader.js +45 -9
- package/dist/build/section-loader.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -11
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +0 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/install.d.ts +1 -4
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +18 -14
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/migrate.d.ts +18 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +163 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +35 -2
- package/dist/commands/update.js.map +1 -1
- package/dist/fs/core-manifest.d.ts +17 -0
- package/dist/fs/core-manifest.d.ts.map +1 -0
- package/dist/fs/core-manifest.js +76 -0
- package/dist/fs/core-manifest.js.map +1 -0
- package/dist/fs/install-manifest.d.ts +1 -2
- package/dist/fs/install-manifest.d.ts.map +1 -1
- package/dist/fs/install-manifest.js +1 -2
- package/dist/fs/install-manifest.js.map +1 -1
- package/dist/fs/materialize.d.ts.map +1 -1
- package/dist/fs/materialize.js +23 -3
- package/dist/fs/materialize.js.map +1 -1
- package/dist/types/core-manifest.d.ts +12 -0
- package/dist/types/core-manifest.d.ts.map +1 -0
- package/dist/types/core-manifest.js +2 -0
- package/dist/types/core-manifest.js.map +1 -0
- package/dist/types/registry.d.ts +13 -5
- package/dist/types/registry.d.ts.map +1 -1
- package/install-manifest.yaml +31 -27
- package/package.json +57 -57
- package/registry.yaml +192 -209
- package/sources/defaults/config.yaml +27 -30
- package/sources/defaults/project-context.yaml +15 -26
- package/sources/defaults/session.yaml +31 -23
- package/sources/knowledge/core/manifest.yaml +4 -45
- package/sources/sections/activation-load-config.md +11 -5
- package/sources/sections/activation-load-context.md +26 -11
- package/sources/sections/activation-preflight.md +14 -4
- package/sources/sections/footer-next-steps.md +35 -9
- package/sources/sections/output-language-constraint.md +11 -0
- package/sources/sections/role-header.md +13 -13
- package/sources/sections/session-update.md +47 -0
- package/sources/skills/mvt-analyze/business.md +69 -33
- package/sources/skills/mvt-analyze/manifest.yaml +90 -89
- package/sources/skills/mvt-analyze-code/business.md +82 -35
- package/sources/skills/mvt-analyze-code/manifest.yaml +34 -26
- package/sources/skills/mvt-check-context/business.md +89 -42
- package/sources/skills/mvt-check-context/manifest.yaml +10 -21
- package/sources/skills/mvt-cleanup/business.md +80 -31
- package/sources/skills/mvt-cleanup/manifest.yaml +85 -93
- package/sources/skills/mvt-config/business.md +94 -26
- package/sources/skills/mvt-config/manifest.yaml +15 -27
- package/sources/skills/mvt-create-skill/business.md +224 -111
- package/sources/skills/mvt-create-skill/manifest.yaml +31 -15
- package/sources/skills/mvt-design/business.md +116 -34
- package/sources/skills/mvt-design/manifest.yaml +22 -31
- package/sources/skills/mvt-fix/business.md +103 -28
- package/sources/skills/mvt-fix/manifest.yaml +8 -22
- package/sources/skills/mvt-help/business.md +74 -70
- package/sources/skills/mvt-help/manifest.yaml +16 -10
- package/sources/skills/mvt-implement/business.md +91 -32
- package/sources/skills/mvt-implement/manifest.yaml +17 -33
- package/sources/skills/mvt-init/business.md +164 -49
- package/sources/skills/mvt-init/manifest.yaml +36 -28
- package/sources/skills/mvt-manage-context/business.md +175 -0
- package/sources/skills/mvt-manage-context/manifest.yaml +123 -0
- package/sources/skills/mvt-plan-dev/business.md +75 -0
- package/sources/skills/mvt-plan-dev/manifest.yaml +91 -0
- package/sources/skills/mvt-quick-dev/business.md +99 -0
- package/sources/skills/mvt-quick-dev/manifest.yaml +69 -0
- package/sources/skills/mvt-refactor/business.md +104 -33
- package/sources/skills/mvt-refactor/manifest.yaml +17 -32
- package/sources/skills/mvt-resume/business.md +137 -0
- package/sources/skills/mvt-resume/manifest.yaml +71 -0
- package/sources/skills/mvt-review/business.md +112 -49
- package/sources/skills/mvt-review/manifest.yaml +15 -34
- package/sources/skills/mvt-status/business.md +71 -24
- package/sources/skills/mvt-status/manifest.yaml +18 -26
- package/sources/skills/mvt-sync-context/business.md +148 -23
- package/sources/skills/mvt-sync-context/manifest.yaml +51 -39
- package/sources/skills/mvt-template/business.md +96 -49
- package/sources/skills/mvt-template/manifest.yaml +13 -21
- package/sources/skills/mvt-test/business.md +104 -36
- package/sources/skills/mvt-test/manifest.yaml +14 -23
- package/sources/skills/mvt-update-plan/business.md +72 -0
- package/sources/skills/mvt-update-plan/manifest.yaml +132 -0
- package/sources/templates/analyze-output/body.md +8 -31
- package/sources/templates/analyze-output/manifest.yaml +11 -11
- package/sources/templates/design-output/body.md +17 -50
- package/sources/templates/design-output/manifest.yaml +11 -11
- package/sources/templates/implement-output/body.md +6 -27
- package/sources/templates/implement-output/manifest.yaml +11 -11
- package/sources/templates/project-context/body.md +13 -0
- package/sources/templates/project-context/manifest.yaml +12 -0
- package/sources/templates/review-output/body.md +6 -40
- package/sources/templates/review-output/manifest.yaml +11 -11
- package/sources/templates/test-output/body.md +4 -28
- package/sources/templates/test-output/manifest.yaml +11 -11
- package/sources/knowledge/core/review-principles.md +0 -51
- package/sources/knowledge/patterns/clean-architecture/manifest.yaml +0 -66
- package/sources/knowledge/patterns/clean-architecture/review-checklist.md +0 -230
- package/sources/knowledge/patterns/ddd/manifest.yaml +0 -83
- package/sources/knowledge/patterns/ddd/review-checklist.md +0 -226
- package/sources/knowledge/patterns/ddd/tactical-patterns.md +0 -12
- package/sources/knowledge/patterns/frontend-react/manifest.yaml +0 -44
- package/sources/knowledge/patterns/frontend-react/review-checklist.md +0 -78
- package/sources/knowledge/patterns/manifest.yaml +0 -113
- package/sources/skills/mvt-add-context/business.md +0 -47
- package/sources/skills/mvt-add-context/manifest.yaml +0 -83
- package/sources/templates/analyze-code-output/body.md +0 -44
- package/sources/templates/analyze-code-output/manifest.yaml +0 -11
- package/sources/templates/cleanup-output/body.md +0 -9
- package/sources/templates/cleanup-output/manifest.yaml +0 -11
- package/sources/templates/config-output/body.md +0 -11
- package/sources/templates/config-output/manifest.yaml +0 -11
- package/sources/templates/context-check-output/body.md +0 -32
- package/sources/templates/context-check-output/manifest.yaml +0 -11
- package/sources/templates/fix-output/body.md +0 -30
- package/sources/templates/fix-output/manifest.yaml +0 -11
- package/sources/templates/init-output/body.md +0 -34
- package/sources/templates/init-output/manifest.yaml +0 -11
- package/sources/templates/refactor-output/body.md +0 -32
- package/sources/templates/refactor-output/manifest.yaml +0 -11
- package/sources/templates/status-output/body.md +0 -36
- package/sources/templates/status-output/manifest.yaml +0 -11
- package/sources/templates/sync-context-output/body.md +0 -16
- package/sources/templates/sync-context-output/manifest.yaml +0 -11
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
# Clean Architecture Review Checklist
|
|
2
|
-
|
|
3
|
-
Specific review criteria for Clean Architecture implementations.
|
|
4
|
-
|
|
5
|
-
## The Dependency Rule
|
|
6
|
-
|
|
7
|
-
### Inward Dependencies
|
|
8
|
-
|
|
9
|
-
- [ ] Entities have no outward dependencies
|
|
10
|
-
- [ ] Use Cases depend only on Entities
|
|
11
|
-
- [ ] Interface Adapters depend on Use Cases/Entities
|
|
12
|
-
- [ ] Frameworks only depend on Interface Adapters
|
|
13
|
-
|
|
14
|
-
### No Circular Dependencies
|
|
15
|
-
|
|
16
|
-
- [ ] Inner layers don't reference outer layers
|
|
17
|
-
- [ ] No imports from outer to inner
|
|
18
|
-
- [ ] Abstractions defined in inner layer
|
|
19
|
-
- [ ] Implementations provided by outer layer
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Entities Layer
|
|
24
|
-
|
|
25
|
-
### Purity
|
|
26
|
-
|
|
27
|
-
- [ ] No framework dependencies
|
|
28
|
-
- [ ] No database annotations
|
|
29
|
-
- [ ] No external library imports
|
|
30
|
-
- [ ] Pure business objects
|
|
31
|
-
|
|
32
|
-
### Business Rules
|
|
33
|
-
|
|
34
|
-
- [ ] Critical business rules in entities
|
|
35
|
-
- [ ] Enterprise-wide rules captured
|
|
36
|
-
- [ ] Behavior, not just data
|
|
37
|
-
- [ ] Reusable across applications
|
|
38
|
-
|
|
39
|
-
### Independence
|
|
40
|
-
|
|
41
|
-
- [ ] Would exist without application
|
|
42
|
-
- [ ] Not affected by use case changes
|
|
43
|
-
- [ ] Not affected by UI changes
|
|
44
|
-
- [ ] Not affected by database changes
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Use Cases Layer
|
|
49
|
-
|
|
50
|
-
### Application Logic
|
|
51
|
-
|
|
52
|
-
- [ ] Application-specific rules here
|
|
53
|
-
- [ ] Orchestrates entity behavior
|
|
54
|
-
- [ ] Coordinates data flow
|
|
55
|
-
- [ ] Single responsibility per use case
|
|
56
|
-
|
|
57
|
-
### Interface Definitions
|
|
58
|
-
|
|
59
|
-
- [ ] Input/Output ports defined here
|
|
60
|
-
- [ ] Repository interfaces defined here
|
|
61
|
-
- [ ] External service interfaces defined here
|
|
62
|
-
- [ ] Inner layer controls contracts
|
|
63
|
-
|
|
64
|
-
### Data Flow
|
|
65
|
-
|
|
66
|
-
- [ ] Request models for input
|
|
67
|
-
- [ ] Response models for output
|
|
68
|
-
- [ ] No framework objects cross boundaries
|
|
69
|
-
- [ ] Simple data structures at boundaries
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Interface Adapters Layer
|
|
74
|
-
|
|
75
|
-
### Controllers
|
|
76
|
-
|
|
77
|
-
- [ ] Receives external input
|
|
78
|
-
- [ ] Converts to use case format
|
|
79
|
-
- [ ] No business logic
|
|
80
|
-
- [ ] Thin layer
|
|
81
|
-
|
|
82
|
-
### Presenters
|
|
83
|
-
|
|
84
|
-
- [ ] Formats use case output
|
|
85
|
-
- [ ] Creates view models
|
|
86
|
-
- [ ] No business logic
|
|
87
|
-
- [ ] UI-specific formatting only
|
|
88
|
-
|
|
89
|
-
### Gateways
|
|
90
|
-
|
|
91
|
-
- [ ] Implements interfaces from use cases
|
|
92
|
-
- [ ] Converts external data formats
|
|
93
|
-
- [ ] Handles external system details
|
|
94
|
-
- [ ] Abstracts infrastructure
|
|
95
|
-
|
|
96
|
-
### Repository Implementations
|
|
97
|
-
|
|
98
|
-
- [ ] Implements domain interfaces
|
|
99
|
-
- [ ] Handles persistence details
|
|
100
|
-
- [ ] Converts between domain and persistence models
|
|
101
|
-
- [ ] No business logic
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## Frameworks Layer
|
|
106
|
-
|
|
107
|
-
### Framework Isolation
|
|
108
|
-
|
|
109
|
-
- [ ] Framework code contained here
|
|
110
|
-
- [ ] Not leaking into inner layers
|
|
111
|
-
- [ ] Configuration in this layer
|
|
112
|
-
- [ ] Easy to replace framework
|
|
113
|
-
|
|
114
|
-
### Database
|
|
115
|
-
|
|
116
|
-
- [ ] Treated as a detail
|
|
117
|
-
- [ ] Repository implementations here
|
|
118
|
-
- [ ] ORM configuration here
|
|
119
|
-
- [ ] No SQL in inner layers
|
|
120
|
-
|
|
121
|
-
### UI Framework
|
|
122
|
-
|
|
123
|
-
- [ ] Treated as a detail
|
|
124
|
-
- [ ] Views/components here
|
|
125
|
-
- [ ] Routing configuration here
|
|
126
|
-
- [ ] No UI logic in inner layers
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Boundary Crossing
|
|
131
|
-
|
|
132
|
-
### Data Transfer
|
|
133
|
-
|
|
134
|
-
- [ ] Simple data structures cross boundaries
|
|
135
|
-
- [ ] No entity leakage to outer layers
|
|
136
|
-
- [ ] Request/Response models used
|
|
137
|
-
- [ ] Mapping at boundaries
|
|
138
|
-
|
|
139
|
-
### Dependency Inversion
|
|
140
|
-
|
|
141
|
-
- [ ] Inner layer defines interfaces
|
|
142
|
-
- [ ] Outer layer implements
|
|
143
|
-
- [ ] Injection at composition root
|
|
144
|
-
- [ ] No new operator for implementations in inner layers
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Testability
|
|
149
|
-
|
|
150
|
-
### Unit Testing
|
|
151
|
-
|
|
152
|
-
- [ ] Entities testable without mocks
|
|
153
|
-
- [ ] Use cases testable with mock gateways
|
|
154
|
-
- [ ] No framework needed for core tests
|
|
155
|
-
- [ ] Fast execution
|
|
156
|
-
|
|
157
|
-
### Integration Testing
|
|
158
|
-
|
|
159
|
-
- [ ] Can test with real implementations
|
|
160
|
-
- [ ] Boundaries make integration clear
|
|
161
|
-
- [ ] External systems mockable
|
|
162
|
-
- [ ] End-to-end scenarios testable
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## Code Organization
|
|
167
|
-
|
|
168
|
-
### Package/Namespace Structure
|
|
169
|
-
|
|
170
|
-
- [ ] Clear separation by layer
|
|
171
|
-
- [ ] Consistent naming convention
|
|
172
|
-
- [ ] Easy to locate code
|
|
173
|
-
- [ ] Dependencies visible in imports
|
|
174
|
-
|
|
175
|
-
### Module Boundaries
|
|
176
|
-
|
|
177
|
-
- [ ] Modules respect layer boundaries
|
|
178
|
-
- [ ] Inter-module dependencies follow rules
|
|
179
|
-
- [ ] Clear public APIs per module
|
|
180
|
-
- [ ] Internal details hidden
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## Anti-Patterns to Watch
|
|
185
|
-
|
|
186
|
-
### Dependency Violations
|
|
187
|
-
|
|
188
|
-
- [ ] No direct database access in use cases
|
|
189
|
-
- [ ] No framework objects in entities
|
|
190
|
-
- [ ] No UI concerns in business logic
|
|
191
|
-
- [ ] No outward dependencies from core
|
|
192
|
-
|
|
193
|
-
### Bloated Layers
|
|
194
|
-
|
|
195
|
-
- [ ] Controllers are thin
|
|
196
|
-
- [ ] Use cases are focused
|
|
197
|
-
- [ ] No "god" objects
|
|
198
|
-
- [ ] Single responsibility maintained
|
|
199
|
-
|
|
200
|
-
### Missing Abstraction
|
|
201
|
-
|
|
202
|
-
- [ ] External services behind interfaces
|
|
203
|
-
- [ ] Database behind repositories
|
|
204
|
-
- [ ] Third-party libraries wrapped
|
|
205
|
-
- [ ] Detail changes don't affect core
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## Severity Levels
|
|
210
|
-
|
|
211
|
-
### Critical
|
|
212
|
-
|
|
213
|
-
- Dependencies point outward (violates core rule)
|
|
214
|
-
- Business logic in controllers/presenters
|
|
215
|
-
- Framework leakage into entities
|
|
216
|
-
- Direct database access in use cases
|
|
217
|
-
|
|
218
|
-
### Major
|
|
219
|
-
|
|
220
|
-
- Missing boundary interfaces
|
|
221
|
-
- Use case doing too much
|
|
222
|
-
- Entity with infrastructure concerns
|
|
223
|
-
- Circular dependencies
|
|
224
|
-
|
|
225
|
-
### Minor
|
|
226
|
-
|
|
227
|
-
- Inconsistent layer naming
|
|
228
|
-
- Missing mapping at boundary
|
|
229
|
-
- Test depends on framework
|
|
230
|
-
- Response model too complex
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
id: "ddd"
|
|
2
|
-
type: "pattern"
|
|
3
|
-
name: "Domain-Driven Design"
|
|
4
|
-
version: "1.0"
|
|
5
|
-
description: "Tactical and strategic patterns for complex domain modeling"
|
|
6
|
-
|
|
7
|
-
token_estimate:
|
|
8
|
-
total: 1400
|
|
9
|
-
breakdown:
|
|
10
|
-
- file: tactical-patterns.md
|
|
11
|
-
tokens: 800
|
|
12
|
-
load_priority: 1
|
|
13
|
-
summary: "DDD key rules"
|
|
14
|
-
- file: review-checklist.md
|
|
15
|
-
tokens: 600
|
|
16
|
-
load_priority: 2
|
|
17
|
-
summary: "DDD compliance checklist"
|
|
18
|
-
|
|
19
|
-
loading_strategy:
|
|
20
|
-
level_1_overview:
|
|
21
|
-
description: "Read manifest only for summary"
|
|
22
|
-
tokens: 150
|
|
23
|
-
use_case: "Check available DDD patterns"
|
|
24
|
-
|
|
25
|
-
level_2_full:
|
|
26
|
-
description: "Load complete knowledge files"
|
|
27
|
-
tokens: 1400
|
|
28
|
-
use_case: "Complete DDD implementation guidance"
|
|
29
|
-
|
|
30
|
-
loading:
|
|
31
|
-
priority: 10
|
|
32
|
-
auto_load: false
|
|
33
|
-
|
|
34
|
-
files:
|
|
35
|
-
- path: "tactical-patterns.md"
|
|
36
|
-
description: "Key rules for DDD building blocks"
|
|
37
|
-
required: true
|
|
38
|
-
tokens: 800
|
|
39
|
-
|
|
40
|
-
- path: "review-checklist.md"
|
|
41
|
-
description: "Checklist for reviewing DDD code"
|
|
42
|
-
required: false
|
|
43
|
-
tokens: 600
|
|
44
|
-
|
|
45
|
-
attributes:
|
|
46
|
-
terminology:
|
|
47
|
-
aggregate: "Aggregate"
|
|
48
|
-
aggregate_root: "Aggregate Root"
|
|
49
|
-
entity: "Entity"
|
|
50
|
-
value_object: "Value Object"
|
|
51
|
-
domain_event: "Domain Event"
|
|
52
|
-
domain_service: "Domain Service"
|
|
53
|
-
repository: "Repository"
|
|
54
|
-
factory: "Factory"
|
|
55
|
-
bounded_context: "Bounded Context"
|
|
56
|
-
ubiquitous_language: "Ubiquitous Language"
|
|
57
|
-
context_map: "Context Map"
|
|
58
|
-
anti_corruption_layer: "Anti-Corruption Layer"
|
|
59
|
-
shared_kernel: "Shared Kernel"
|
|
60
|
-
customer_supplier: "Customer-Supplier"
|
|
61
|
-
|
|
62
|
-
checklist:
|
|
63
|
-
- "Aggregate boundaries protect invariants"
|
|
64
|
-
- "Entities have identity and lifecycle"
|
|
65
|
-
- "Value objects are immutable"
|
|
66
|
-
- "Domain events capture state changes"
|
|
67
|
-
- "Repositories only for aggregates"
|
|
68
|
-
- "No anemic domain models"
|
|
69
|
-
- "Business logic in domain layer"
|
|
70
|
-
- "Ubiquitous language used consistently"
|
|
71
|
-
|
|
72
|
-
scenarios:
|
|
73
|
-
- name: "Design domain model"
|
|
74
|
-
files: ["overview.md", "tactical-patterns.md"]
|
|
75
|
-
|
|
76
|
-
- name: "Code review"
|
|
77
|
-
files: ["review-checklist.md"]
|
|
78
|
-
|
|
79
|
-
- name: "Understand DDD concepts"
|
|
80
|
-
files: ["overview.md"]
|
|
81
|
-
|
|
82
|
-
- name: "Event-driven design"
|
|
83
|
-
files: ["tactical-patterns.md"]
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
# DDD Review Checklist
|
|
2
|
-
|
|
3
|
-
Specific review criteria for Domain-Driven Design implementations.
|
|
4
|
-
|
|
5
|
-
## Aggregate Design
|
|
6
|
-
|
|
7
|
-
### Boundaries
|
|
8
|
-
|
|
9
|
-
- [ ] Aggregate boundaries align with consistency requirements
|
|
10
|
-
- [ ] Aggregates are as small as possible
|
|
11
|
-
- [ ] Cross-aggregate references are by ID, not object reference
|
|
12
|
-
- [ ] Each aggregate can be persisted independently
|
|
13
|
-
|
|
14
|
-
### Root Entity
|
|
15
|
-
|
|
16
|
-
- [ ] Only the root is accessible from outside
|
|
17
|
-
- [ ] Root enforces all aggregate invariants
|
|
18
|
-
- [ ] Root controls access to internal entities
|
|
19
|
-
- [ ] External changes go through root methods
|
|
20
|
-
|
|
21
|
-
### Invariants
|
|
22
|
-
|
|
23
|
-
- [ ] All business rules enforced within aggregate
|
|
24
|
-
- [ ] Invalid state cannot be created
|
|
25
|
-
- [ ] Invariants checked on every state change
|
|
26
|
-
- [ ] Constructors/factories ensure valid initial state
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Entity Design
|
|
31
|
-
|
|
32
|
-
### Identity
|
|
33
|
-
|
|
34
|
-
- [ ] Entity has clear identity
|
|
35
|
-
- [ ] ID type is appropriate (Guid, long, etc.)
|
|
36
|
-
- [ ] ID generation strategy is defined
|
|
37
|
-
- [ ] Equality based on ID
|
|
38
|
-
|
|
39
|
-
### Encapsulation
|
|
40
|
-
|
|
41
|
-
- [ ] Private setters for properties
|
|
42
|
-
- [ ] State changes through methods
|
|
43
|
-
- [ ] No direct collection manipulation
|
|
44
|
-
- [ ] Internal state properly protected
|
|
45
|
-
|
|
46
|
-
### Behavior
|
|
47
|
-
|
|
48
|
-
- [ ] Rich behavior, not just data
|
|
49
|
-
- [ ] Methods named using domain language
|
|
50
|
-
- [ ] Business logic in entity, not services
|
|
51
|
-
- [ ] Validation in business methods
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Value Object Design
|
|
56
|
-
|
|
57
|
-
### Immutability
|
|
58
|
-
|
|
59
|
-
- [ ] All properties are readonly
|
|
60
|
-
- [ ] No methods that modify state
|
|
61
|
-
- [ ] "Modification" returns new instance
|
|
62
|
-
- [ ] Thread-safe by design
|
|
63
|
-
|
|
64
|
-
### Equality
|
|
65
|
-
|
|
66
|
-
- [ ] Equality based on all attributes
|
|
67
|
-
- [ ] GetHashCode implemented correctly
|
|
68
|
-
- [ ] Equals handles null properly
|
|
69
|
-
- [ ] Consistent with domain semantics
|
|
70
|
-
|
|
71
|
-
### Validation
|
|
72
|
-
|
|
73
|
-
- [ ] Validated in constructor
|
|
74
|
-
- [ ] Invalid values throw exceptions
|
|
75
|
-
- [ ] No partial/invalid instances possible
|
|
76
|
-
- [ ] Error messages are meaningful
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Domain Event Design
|
|
81
|
-
|
|
82
|
-
### Structure
|
|
83
|
-
|
|
84
|
-
- [ ] Named in past tense
|
|
85
|
-
- [ ] Contains all relevant context
|
|
86
|
-
- [ ] Immutable after creation
|
|
87
|
-
- [ ] Includes timestamp
|
|
88
|
-
|
|
89
|
-
### Usage
|
|
90
|
-
|
|
91
|
-
- [ ] Events raised when significant things happen
|
|
92
|
-
- [ ] Events capture business meaning
|
|
93
|
-
- [ ] Handlers don't modify originating aggregate
|
|
94
|
-
- [ ] Event naming uses ubiquitous language
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Repository Design
|
|
99
|
-
|
|
100
|
-
### Interface
|
|
101
|
-
|
|
102
|
-
- [ ] Interface defined in Domain layer
|
|
103
|
-
- [ ] One repository per aggregate type
|
|
104
|
-
- [ ] Methods use domain language
|
|
105
|
-
- [ ] Returns domain objects, not persistence entities
|
|
106
|
-
|
|
107
|
-
### Implementation
|
|
108
|
-
|
|
109
|
-
- [ ] Implementation in Infrastructure layer
|
|
110
|
-
- [ ] Abstract persistence details
|
|
111
|
-
- [ ] Handle concurrency appropriately
|
|
112
|
-
- [ ] Efficient queries for use cases
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Domain Service Design
|
|
117
|
-
|
|
118
|
-
### Responsibility
|
|
119
|
-
|
|
120
|
-
- [ ] Stateless operations only
|
|
121
|
-
- [ ] Clear reason why not in an entity
|
|
122
|
-
- [ ] Named using domain language
|
|
123
|
-
- [ ] Single responsibility
|
|
124
|
-
|
|
125
|
-
### Dependencies
|
|
126
|
-
|
|
127
|
-
- [ ] Depends on interfaces, not implementations
|
|
128
|
-
- [ ] Can be injected
|
|
129
|
-
- [ ] Doesn't hold state between calls
|
|
130
|
-
- [ ] Accesses aggregates through repositories
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## Layer Architecture
|
|
135
|
-
|
|
136
|
-
### Domain Layer
|
|
137
|
-
|
|
138
|
-
- [ ] Contains entities, value objects, domain services
|
|
139
|
-
- [ ] No dependencies on infrastructure
|
|
140
|
-
- [ ] No framework annotations (if possible)
|
|
141
|
-
- [ ] Pure business logic only
|
|
142
|
-
|
|
143
|
-
### Application Layer
|
|
144
|
-
|
|
145
|
-
- [ ] Orchestrates domain objects
|
|
146
|
-
- [ ] Handles transactions
|
|
147
|
-
- [ ] No business logic here
|
|
148
|
-
- [ ] Coordinates between aggregates
|
|
149
|
-
|
|
150
|
-
### Infrastructure Layer
|
|
151
|
-
|
|
152
|
-
- [ ] Repository implementations
|
|
153
|
-
- [ ] External service integrations
|
|
154
|
-
- [ ] Framework-specific code
|
|
155
|
-
- [ ] Depends on domain layer
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## Ubiquitous Language
|
|
160
|
-
|
|
161
|
-
### Naming
|
|
162
|
-
|
|
163
|
-
- [ ] Code uses domain terminology
|
|
164
|
-
- [ ] Same terms as domain experts
|
|
165
|
-
- [ ] Consistent across codebase
|
|
166
|
-
- [ ] Reflects actual business concepts
|
|
167
|
-
|
|
168
|
-
### Documentation
|
|
169
|
-
|
|
170
|
-
- [ ] Domain concepts documented
|
|
171
|
-
- [ ] Glossary maintained
|
|
172
|
-
- [ ] Code comments use domain language
|
|
173
|
-
- [ ] Team understands terminology
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## Anti-Patterns to Watch
|
|
178
|
-
|
|
179
|
-
### Anemic Domain Model
|
|
180
|
-
|
|
181
|
-
- [ ] Entities have behavior, not just data
|
|
182
|
-
- [ ] Business logic not in services alone
|
|
183
|
-
- [ ] Domain objects are more than DTOs
|
|
184
|
-
|
|
185
|
-
### Big Ball of Mud
|
|
186
|
-
|
|
187
|
-
- [ ] Clear bounded contexts
|
|
188
|
-
- [ ] Explicit boundaries
|
|
189
|
-
- [ ] Context relationships defined
|
|
190
|
-
|
|
191
|
-
### God Aggregate
|
|
192
|
-
|
|
193
|
-
- [ ] Aggregates are focused
|
|
194
|
-
- [ ] Not too many entities
|
|
195
|
-
- [ ] Clear consistency needs
|
|
196
|
-
|
|
197
|
-
### Repository for Non-Aggregates
|
|
198
|
-
|
|
199
|
-
- [ ] Repositories only for aggregate roots
|
|
200
|
-
- [ ] No repositories for entities within aggregates
|
|
201
|
-
- [ ] No repositories for value objects
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## Severity Levels for DDD Issues
|
|
206
|
-
|
|
207
|
-
### Critical
|
|
208
|
-
|
|
209
|
-
- Aggregate boundaries don't protect invariants
|
|
210
|
-
- Business rules can be bypassed
|
|
211
|
-
- Invalid domain state possible
|
|
212
|
-
- Security vulnerabilities through domain bypass
|
|
213
|
-
|
|
214
|
-
### Major
|
|
215
|
-
|
|
216
|
-
- Anemic domain model
|
|
217
|
-
- Repository for non-aggregate
|
|
218
|
-
- Business logic in wrong layer
|
|
219
|
-
- Missing domain events for important occurrences
|
|
220
|
-
|
|
221
|
-
### Minor
|
|
222
|
-
|
|
223
|
-
- Naming doesn't match ubiquitous language
|
|
224
|
-
- Aggregate slightly too large
|
|
225
|
-
- Value object could be extracted
|
|
226
|
-
- Event naming not in past tense
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# DDD Tactical Patterns — Key Rules
|
|
2
|
-
|
|
3
|
-
Quick reference for key rules when applying DDD.
|
|
4
|
-
|
|
5
|
-
## Key Rules
|
|
6
|
-
|
|
7
|
-
1. **One repository per aggregate root** — never for child entities
|
|
8
|
-
2. **Reference other aggregates by ID** — not by object reference
|
|
9
|
-
3. **Keep aggregates small** — only include what must be immediately consistent
|
|
10
|
-
4. **Domain layer has zero infrastructure imports** — dependency inversion
|
|
11
|
-
5. **Events are immutable facts** — include all context needed to understand what happened
|
|
12
|
-
6. **Value Objects validate in constructor** — always valid or not created
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
id: "frontend-react"
|
|
2
|
-
type: "pattern"
|
|
3
|
-
name: "Frontend (React)"
|
|
4
|
-
version: "1.0"
|
|
5
|
-
description: "Modern React frontend application patterns"
|
|
6
|
-
|
|
7
|
-
token_estimate:
|
|
8
|
-
total: 3000
|
|
9
|
-
breakdown:
|
|
10
|
-
- file: review-checklist.md
|
|
11
|
-
tokens: 800
|
|
12
|
-
load_priority: 3
|
|
13
|
-
summary: "React code review checklist"
|
|
14
|
-
|
|
15
|
-
loading_strategy:
|
|
16
|
-
level_1_manifest_only:
|
|
17
|
-
tokens: 150
|
|
18
|
-
use_case: "Check React pattern info"
|
|
19
|
-
|
|
20
|
-
files:
|
|
21
|
-
- path: "review-checklist.md"
|
|
22
|
-
description: "React code review checklist"
|
|
23
|
-
required: false
|
|
24
|
-
tokens: 800
|
|
25
|
-
|
|
26
|
-
scenarios:
|
|
27
|
-
- name: "Code review"
|
|
28
|
-
files: ["review-checklist.md"]
|
|
29
|
-
|
|
30
|
-
applicable_project_types:
|
|
31
|
-
- web-app
|
|
32
|
-
- spa
|
|
33
|
-
- pwa
|
|
34
|
-
|
|
35
|
-
frameworks:
|
|
36
|
-
- react
|
|
37
|
-
- next.js
|
|
38
|
-
- remix
|
|
39
|
-
- vite-react
|
|
40
|
-
|
|
41
|
-
not_recommended_for:
|
|
42
|
-
- backend-api
|
|
43
|
-
- cli
|
|
44
|
-
- library (unless UI library)
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# React Code Review Checklist
|
|
2
|
-
|
|
3
|
-
## Component Structure
|
|
4
|
-
|
|
5
|
-
- [ ] Component has single responsibility
|
|
6
|
-
- [ ] Component is properly typed (TypeScript)
|
|
7
|
-
- [ ] Props interface is defined and documented
|
|
8
|
-
- [ ] Default values provided where appropriate
|
|
9
|
-
- [ ] Component handles loading states
|
|
10
|
-
- [ ] Component handles error states
|
|
11
|
-
|
|
12
|
-
## React Best Practices
|
|
13
|
-
|
|
14
|
-
- [ ] Keys are used correctly in lists (not index)
|
|
15
|
-
- [ ] useEffect dependencies are complete
|
|
16
|
-
- [ ] Cleanup functions provided in effects
|
|
17
|
-
- [ ] State updates are immutable
|
|
18
|
-
- [ ] useCallback/useMemo used appropriately (not prematurely)
|
|
19
|
-
- [ ] No direct DOM manipulation
|
|
20
|
-
|
|
21
|
-
## Performance
|
|
22
|
-
|
|
23
|
-
- [ ] No unnecessary re-renders
|
|
24
|
-
- [ ] Large lists are virtualized if needed
|
|
25
|
-
- [ ] Images are optimized
|
|
26
|
-
- [ ] Code splitting applied for large features
|
|
27
|
-
- [ ] Lazy loading used where appropriate
|
|
28
|
-
|
|
29
|
-
## State Management
|
|
30
|
-
|
|
31
|
-
- [ ] State is as local as possible
|
|
32
|
-
- [ ] Derived state is computed, not stored
|
|
33
|
-
- [ ] Context is not overused
|
|
34
|
-
- [ ] Server state uses proper solution (React Query/SWR)
|
|
35
|
-
|
|
36
|
-
## Hooks
|
|
37
|
-
|
|
38
|
-
- [ ] Custom hooks follow naming convention (use*)
|
|
39
|
-
- [ ] Hooks are at top level of component
|
|
40
|
-
- [ ] Custom hooks return stable references
|
|
41
|
-
- [ ] Hook dependencies are correct
|
|
42
|
-
|
|
43
|
-
## Accessibility
|
|
44
|
-
|
|
45
|
-
- [ ] Semantic HTML elements used
|
|
46
|
-
- [ ] ARIA attributes where needed
|
|
47
|
-
- [ ] Focus management considered
|
|
48
|
-
- [ ] Keyboard navigation works
|
|
49
|
-
- [ ] Screen reader tested
|
|
50
|
-
|
|
51
|
-
## Error Handling
|
|
52
|
-
|
|
53
|
-
- [ ] Error boundaries used appropriately
|
|
54
|
-
- [ ] API errors are handled
|
|
55
|
-
- [ ] User sees meaningful error messages
|
|
56
|
-
- [ ] Errors are logged appropriately
|
|
57
|
-
|
|
58
|
-
## Code Quality
|
|
59
|
-
|
|
60
|
-
- [ ] No console.log in production code
|
|
61
|
-
- [ ] No commented out code
|
|
62
|
-
- [ ] Consistent formatting
|
|
63
|
-
- [ ] Meaningful variable names
|
|
64
|
-
- [ ] No magic numbers/strings
|
|
65
|
-
|
|
66
|
-
## Testing
|
|
67
|
-
|
|
68
|
-
- [ ] Critical paths are tested
|
|
69
|
-
- [ ] User interactions tested
|
|
70
|
-
- [ ] Edge cases covered
|
|
71
|
-
- [ ] Accessibility tested
|
|
72
|
-
|
|
73
|
-
## Security
|
|
74
|
-
|
|
75
|
-
- [ ] No XSS vulnerabilities (dangerouslySetInnerHTML avoided)
|
|
76
|
-
- [ ] User input is sanitized
|
|
77
|
-
- [ ] Sensitive data not in client bundle
|
|
78
|
-
- [ ] Environment variables used correctly
|