@wipal/agent-team 1.0.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/.claude/rules/common/general-rules.md +141 -0
- package/.claude/rules/lessons/lessons.md +91 -0
- package/.claude/rules/role-rules/dev-fe-rules.md +146 -0
- package/.claude/rules/role-rules/sa-rules.md +226 -0
- package/.claude/skills/SKILL-INDEX.md +299 -0
- package/.claude/skills/community/security-validator/SKILL.md +392 -0
- package/.claude/skills/core/agent-creation/SKILL.md +338 -0
- package/.claude/skills/core/code-review/SKILL.md +154 -0
- package/.claude/skills/core/git-automation/SKILL.md +93 -0
- package/.claude/skills/core/retrospect-work/SKILL.md +172 -0
- package/.claude/skills/domain/architecture/adr-writing/SKILL.md +254 -0
- package/.claude/skills/domain/architecture/adr-writing/references/adr-best-practices.md +257 -0
- package/.claude/skills/domain/architecture/adr-writing/references/adr-examples.md +246 -0
- package/.claude/skills/domain/architecture/adr-writing/references/adr-template.md +160 -0
- package/.claude/skills/domain/architecture/architecture-patterns/SKILL.md +316 -0
- package/.claude/skills/domain/architecture/architecture-patterns/references/event-driven.md +393 -0
- package/.claude/skills/domain/architecture/architecture-patterns/references/microservices.md +315 -0
- package/.claude/skills/domain/architecture/architecture-patterns/references/monolith.md +321 -0
- package/.claude/skills/domain/architecture/architecture-patterns/references/serverless.md +457 -0
- package/.claude/skills/domain/architecture/performance-engineering/SKILL.md +227 -0
- package/.claude/skills/domain/architecture/performance-engineering/references/benchmarking.md +336 -0
- package/.claude/skills/domain/architecture/performance-engineering/references/caching-strategies.md +284 -0
- package/.claude/skills/domain/architecture/performance-engineering/references/optimization.md +298 -0
- package/.claude/skills/domain/architecture/security-architecture/SKILL.md +206 -0
- package/.claude/skills/domain/architecture/security-architecture/references/auth-patterns.md +209 -0
- package/.claude/skills/domain/architecture/security-architecture/references/compliance.md +246 -0
- package/.claude/skills/domain/architecture/security-architecture/references/threat-modeling.md +219 -0
- package/.claude/skills/domain/architecture/system-design/SKILL.md +227 -0
- package/.claude/skills/domain/architecture/system-design/references/distributed-systems.md +231 -0
- package/.claude/skills/domain/architecture/system-design/references/resilience.md +344 -0
- package/.claude/skills/domain/architecture/system-design/references/scalability.md +303 -0
- package/.claude/skills/domain/architecture/tech-selection/SKILL.md +192 -0
- package/.claude/skills/domain/architecture/tech-selection/references/build-vs-buy.md +258 -0
- package/.claude/skills/domain/architecture/tech-selection/references/evaluation-framework.md +203 -0
- package/.claude/skills/domain/architecture/tech-selection/references/tech-radar.md +257 -0
- package/.claude/skills/domain/backend/api-design/SKILL.md +121 -0
- package/.claude/skills/domain/backend/database-design/SKILL.md +156 -0
- package/.claude/skills/domain/backend/performance-be/SKILL.md +210 -0
- package/.claude/skills/domain/backend/security/SKILL.md +138 -0
- package/.claude/skills/domain/backend/testing-be/SKILL.md +203 -0
- package/.claude/skills/domain/devops/ci-cd/SKILL.md +188 -0
- package/.claude/skills/domain/devops/containerization/SKILL.md +177 -0
- package/.claude/skills/domain/devops/deployment/SKILL.md +198 -0
- package/.claude/skills/domain/devops/infrastructure-as-code/SKILL.md +178 -0
- package/.claude/skills/domain/devops/monitoring/SKILL.md +163 -0
- package/.claude/skills/domain/frontend/accessibility/SKILL.md +179 -0
- package/.claude/skills/domain/frontend/frontend-design/SKILL.md +138 -0
- package/.claude/skills/domain/frontend/performance-fe/SKILL.md +195 -0
- package/.claude/skills/domain/frontend/state-management/SKILL.md +190 -0
- package/.claude/skills/domain/frontend/testing-fe/SKILL.md +193 -0
- package/.claude/skills/domain/product/requirements-gathering/SKILL.md +136 -0
- package/.claude/skills/domain/product/roadmap-planning/SKILL.md +169 -0
- package/.claude/skills/domain/product/sprint-planning/SKILL.md +151 -0
- package/.claude/skills/domain/product/stakeholder-communication/SKILL.md +162 -0
- package/.claude/skills/domain/product/user-stories/SKILL.md +141 -0
- package/.claude/skills/domain/quality/bug-reporting/SKILL.md +150 -0
- package/.claude/skills/domain/quality/regression-testing/SKILL.md +178 -0
- package/.claude/skills/domain/quality/test-automation/SKILL.md +185 -0
- package/.claude/skills/domain/quality/test-planning/SKILL.md +177 -0
- package/.claude/skills/leadership/code-review-advanced/SKILL.md +167 -0
- package/.claude/skills/leadership/mentoring/SKILL.md +151 -0
- package/.claude/skills/leadership/technical-debt/SKILL.md +166 -0
- package/.claude/skills/leadership/technical-decision/SKILL.md +160 -0
- package/.claude/skills/security-reports/.gitkeep +0 -0
- package/.claude/skills/skills-registry.yaml +441 -0
- package/README.md +232 -0
- package/bin/agent-team.js +107 -0
- package/package.json +51 -0
- package/src/commands/add.js +227 -0
- package/src/commands/init.js +136 -0
- package/src/commands/list.js +66 -0
- package/src/commands/remove.js +71 -0
- package/src/commands/switch.js +53 -0
- package/src/index.js +11 -0
- package/src/interactive/prompts.js +153 -0
- package/src/server/api/agents.js +150 -0
- package/src/server/api/roles.js +97 -0
- package/src/server/api/skills.js +79 -0
- package/src/server/index.js +78 -0
- package/src/ui/agents.html +174 -0
- package/src/ui/css/styles.css +470 -0
- package/src/ui/index.html +107 -0
- package/src/ui/roles.html +371 -0
- package/src/ui/skills.html +332 -0
- package/src/utils/file-utils.js +193 -0
- package/src/utils/skill-resolver.js +594 -0
- package/src/utils/skill-scanner.js +154 -0
- package/templates/CLAUDE.md.tmpl +42 -0
- package/templates/knowledge.md.tmpl +31 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
# Monolithic Architecture
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
A monolithic architecture builds the entire application as a single unit - one codebase, one deployment, one database.
|
|
5
|
+
|
|
6
|
+
## Types of Monoliths
|
|
7
|
+
|
|
8
|
+
### 1. Single-Layer Monolith
|
|
9
|
+
```
|
|
10
|
+
┌─────────────────────────────────────────┐
|
|
11
|
+
│ Application │
|
|
12
|
+
│ ┌─────────────────────────────────┐ │
|
|
13
|
+
│ │ UI + Business Logic + Data │ │
|
|
14
|
+
│ │ (Everything mixed) │ │
|
|
15
|
+
│ └─────────────────────────────────┘ │
|
|
16
|
+
└─────────────────────────────────────────┘
|
|
17
|
+
|
|
18
|
+
Simple but hard to maintain as it grows.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Layered Monolith (N-Tier)
|
|
22
|
+
```
|
|
23
|
+
┌─────────────────────────────────────────┐
|
|
24
|
+
│ Presentation Layer │
|
|
25
|
+
│ (Controllers, Views) │
|
|
26
|
+
├─────────────────────────────────────────┤
|
|
27
|
+
│ Business Layer │
|
|
28
|
+
│ (Services, Domain) │
|
|
29
|
+
├─────────────────────────────────────────┤
|
|
30
|
+
│ Data Access Layer │
|
|
31
|
+
│ (Repositories, DAOs) │
|
|
32
|
+
├─────────────────────────────────────────┤
|
|
33
|
+
│ Database │
|
|
34
|
+
└─────────────────────────────────────────┘
|
|
35
|
+
|
|
36
|
+
Classic separation of concerns.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 3. Modular Monolith
|
|
40
|
+
```
|
|
41
|
+
┌─────────────────────────────────────────────────┐
|
|
42
|
+
│ Application │
|
|
43
|
+
├─────────────┬─────────────┬─────────────────────┤
|
|
44
|
+
│ Users │ Orders │ Products │
|
|
45
|
+
│ Module │ Module │ Module │
|
|
46
|
+
│ ┌─────────┐ │ ┌─────────┐ │ ┌─────────────────┐ │
|
|
47
|
+
│ │ Service │ │ │ Service │ │ │ Service │ │
|
|
48
|
+
│ │ Layer │ │ │ Layer │ │ │ Layer │ │
|
|
49
|
+
│ ├─────────┤ │ ├─────────┤ │ ├─────────────────┤ │
|
|
50
|
+
│ │ Data │ │ │ Data │ │ │ Data │ │
|
|
51
|
+
│ │ Access │ │ │ Access │ │ │ Access │ │
|
|
52
|
+
│ └─────────┘ │ └─────────┘ │ └─────────────────┘ │
|
|
53
|
+
├─────────────┴─────────────┴─────────────────────┤
|
|
54
|
+
│ Shared Infrastructure │
|
|
55
|
+
└─────────────────────────────────────────────────┘
|
|
56
|
+
|
|
57
|
+
Best of both worlds: module boundaries + single deployment.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Benefits of Monolith
|
|
61
|
+
|
|
62
|
+
### 1. Simplicity
|
|
63
|
+
```
|
|
64
|
+
Development:
|
|
65
|
+
- Single codebase
|
|
66
|
+
- Single build process
|
|
67
|
+
- Single deployment artifact
|
|
68
|
+
- Easy IDE support
|
|
69
|
+
|
|
70
|
+
Testing:
|
|
71
|
+
- Simple unit tests
|
|
72
|
+
- No service mocking
|
|
73
|
+
- Fast integration tests
|
|
74
|
+
- Easier end-to-end testing
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 2. Performance
|
|
78
|
+
```
|
|
79
|
+
In-process communication:
|
|
80
|
+
- No network overhead
|
|
81
|
+
- No serialization
|
|
82
|
+
- Fast method calls
|
|
83
|
+
- Shared memory access
|
|
84
|
+
|
|
85
|
+
vs Microservices:
|
|
86
|
+
┌─────────┐ Network ┌─────────┐
|
|
87
|
+
│ Service │ ─────────▶│ Service │ ~10-100ms
|
|
88
|
+
│ A │ │ B │
|
|
89
|
+
└─────────┘ └─────────┘
|
|
90
|
+
|
|
91
|
+
┌─────────────────────────┐
|
|
92
|
+
│ Method call in-process │ ~0.001ms
|
|
93
|
+
└─────────────────────────┘
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 3. Transaction Management
|
|
97
|
+
```
|
|
98
|
+
ACID transactions are easy:
|
|
99
|
+
BEGIN TRANSACTION
|
|
100
|
+
UPDATE accounts SET balance = balance - 100 WHERE id = 1
|
|
101
|
+
UPDATE accounts SET balance = balance + 100 WHERE id = 2
|
|
102
|
+
COMMIT
|
|
103
|
+
|
|
104
|
+
vs Distributed transactions:
|
|
105
|
+
- Complex coordination
|
|
106
|
+
- Performance overhead
|
|
107
|
+
- Failure scenarios
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 4. Operational Simplicity
|
|
111
|
+
```
|
|
112
|
+
Single artifact:
|
|
113
|
+
- One deployment pipeline
|
|
114
|
+
- One set of logs
|
|
115
|
+
- One monitoring dashboard
|
|
116
|
+
- One troubleshooting session
|
|
117
|
+
|
|
118
|
+
Infrastructure:
|
|
119
|
+
- Single server (or few)
|
|
120
|
+
- Simple load balancing
|
|
121
|
+
- Single database
|
|
122
|
+
- Easy backups
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Drawbacks of Monolith
|
|
126
|
+
|
|
127
|
+
### 1. Scaling Limitations
|
|
128
|
+
```
|
|
129
|
+
To scale one feature, scale entire app:
|
|
130
|
+
|
|
131
|
+
Need: More order processing capacity
|
|
132
|
+
Result: Scale entire monolith (including unused features)
|
|
133
|
+
|
|
134
|
+
┌─────────────┐
|
|
135
|
+
│ Monolith │
|
|
136
|
+
│ ┌─────────┐ │
|
|
137
|
+
│ │ Orders │ │◀── Need to scale
|
|
138
|
+
│ ├─────────┤ │
|
|
139
|
+
│ │ Users │ │◀── Scaled unnecessarily
|
|
140
|
+
│ ├─────────┤ │
|
|
141
|
+
│ │Products │ │◀── Scaled unnecessarily
|
|
142
|
+
│ └─────────┘ │
|
|
143
|
+
└─────────────┘
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### 2. Technology Lock-in
|
|
147
|
+
```
|
|
148
|
+
Monolith is locked to:
|
|
149
|
+
- One language
|
|
150
|
+
- One framework
|
|
151
|
+
- One database type
|
|
152
|
+
- One version of everything
|
|
153
|
+
|
|
154
|
+
Migrating:
|
|
155
|
+
- Rewrite entire application
|
|
156
|
+
- High risk, high effort
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 3. Team Coordination
|
|
160
|
+
```
|
|
161
|
+
Large team on single codebase:
|
|
162
|
+
- Merge conflicts
|
|
163
|
+
- Regression bugs
|
|
164
|
+
- Deployment coordination
|
|
165
|
+
- Testing bottlenecks
|
|
166
|
+
|
|
167
|
+
┌─────────────────────────────────────────┐
|
|
168
|
+
│ Development Team │
|
|
169
|
+
│ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │
|
|
170
|
+
│ │Dev 1│ │Dev 2│ │Dev 3│ │Dev 4│ │
|
|
171
|
+
│ └──┬──┘ └──┬──┘ └──┬──┘ └──┬──┘ │
|
|
172
|
+
│ │ │ │ │ │
|
|
173
|
+
│ └───────┴───────┴───────┘ │
|
|
174
|
+
│ │ │
|
|
175
|
+
│ ▼ │
|
|
176
|
+
│ ┌─────────────────────┐ │
|
|
177
|
+
│ │ Single Codebase │ │
|
|
178
|
+
│ │ (Many conflicts!) │ │
|
|
179
|
+
│ └─────────────────────┘ │
|
|
180
|
+
└─────────────────────────────────────────┘
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 4. Deployment Risk
|
|
184
|
+
```
|
|
185
|
+
Any change = full deployment:
|
|
186
|
+
|
|
187
|
+
Change: Fix typo in about page
|
|
188
|
+
Result:
|
|
189
|
+
- Rebuild entire application
|
|
190
|
+
- Redeploy entire application
|
|
191
|
+
- Risk of breaking anything
|
|
192
|
+
- Longer deployment cycles
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Modular Monolith Best Practices
|
|
196
|
+
|
|
197
|
+
### 1. Clear Module Boundaries
|
|
198
|
+
```
|
|
199
|
+
Structure:
|
|
200
|
+
src/
|
|
201
|
+
├── modules/
|
|
202
|
+
│ ├── users/
|
|
203
|
+
│ │ ├── domain/ # Entities, value objects
|
|
204
|
+
│ │ ├── application/ # Use cases, services
|
|
205
|
+
│ │ ├── infrastructure/ # Repositories, external
|
|
206
|
+
│ │ └── interface/ # Controllers, DTOs
|
|
207
|
+
│ ├── orders/
|
|
208
|
+
│ │ ├── domain/
|
|
209
|
+
│ │ ├── application/
|
|
210
|
+
│ │ ├── infrastructure/
|
|
211
|
+
│ │ └── interface/
|
|
212
|
+
│ └── products/
|
|
213
|
+
│ └── ...
|
|
214
|
+
├── shared/ # Truly shared code
|
|
215
|
+
└── main.py # Application entry
|
|
216
|
+
|
|
217
|
+
Rules:
|
|
218
|
+
- Modules don't depend on other modules' internals
|
|
219
|
+
- Communication through well-defined interfaces
|
|
220
|
+
- Shared code is minimal
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### 2. Enforce Boundaries
|
|
224
|
+
```
|
|
225
|
+
Static Analysis:
|
|
226
|
+
- Check module dependencies
|
|
227
|
+
- Fail build on boundary violations
|
|
228
|
+
- Use package visibility
|
|
229
|
+
|
|
230
|
+
┌────────────────────────────────────────────┐
|
|
231
|
+
│ Dependency Check │
|
|
232
|
+
├────────────────────────────────────────────┤
|
|
233
|
+
│ users → orders.domain ❌ NOT ALLOWED │
|
|
234
|
+
│ users → orders.interface ✅ ALLOWED │
|
|
235
|
+
└────────────────────────────────────────────┘
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### 3. Separate Schemas (Logical)
|
|
239
|
+
```
|
|
240
|
+
Same database, separate schemas:
|
|
241
|
+
|
|
242
|
+
Database: myapp
|
|
243
|
+
├── Schema: users
|
|
244
|
+
│ ├── users
|
|
245
|
+
│ └── sessions
|
|
246
|
+
├── Schema: orders
|
|
247
|
+
│ ├── orders
|
|
248
|
+
│ └── order_items
|
|
249
|
+
└── Schema: products
|
|
250
|
+
├── products
|
|
251
|
+
└── categories
|
|
252
|
+
|
|
253
|
+
Benefits:
|
|
254
|
+
- Clear data ownership
|
|
255
|
+
- Easy to split later
|
|
256
|
+
- No cross-schema joins (enforce)
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## When to Choose Monolith
|
|
260
|
+
|
|
261
|
+
### ✅ Good Candidates
|
|
262
|
+
```
|
|
263
|
+
- Early-stage startup
|
|
264
|
+
- Small team (< 10 developers)
|
|
265
|
+
- Simple to medium domain
|
|
266
|
+
- Need fast time to market
|
|
267
|
+
- Limited operational resources
|
|
268
|
+
- Strong consistency requirements
|
|
269
|
+
- Learning/new project
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### ❌ Poor Candidates
|
|
273
|
+
```
|
|
274
|
+
- Large team (> 50 developers)
|
|
275
|
+
- Complex domain with independent parts
|
|
276
|
+
- Need independent scaling
|
|
277
|
+
- Different technology requirements
|
|
278
|
+
- Multiple deployment frequencies
|
|
279
|
+
- Need fault isolation
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Migration Path to Microservices
|
|
283
|
+
|
|
284
|
+
### Phase 1: Modularize
|
|
285
|
+
```
|
|
286
|
+
Before:
|
|
287
|
+
┌─────────────────────────────────────────┐
|
|
288
|
+
│ Spaghetti Monolith │
|
|
289
|
+
│ (everything connected to everything) │
|
|
290
|
+
└─────────────────────────────────────────┘
|
|
291
|
+
|
|
292
|
+
After:
|
|
293
|
+
┌─────────────────────────────────────────┐
|
|
294
|
+
│ Modular Monolith │
|
|
295
|
+
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
296
|
+
│ │ Module A│ │ Module B│ │ Module C│ │
|
|
297
|
+
│ └─────────┘ └─────────┘ └─────────┘ │
|
|
298
|
+
└─────────────────────────────────────────┘
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Phase 2: Extract Services
|
|
302
|
+
```
|
|
303
|
+
Use Strangler Fig Pattern:
|
|
304
|
+
|
|
305
|
+
1. Choose least coupled module
|
|
306
|
+
2. Extract as service
|
|
307
|
+
3. Route traffic to new service
|
|
308
|
+
4. Repeat for other modules
|
|
309
|
+
|
|
310
|
+
┌─────────────────┐ ┌─────────┐
|
|
311
|
+
│ Monolith │ │ Extracted│
|
|
312
|
+
│ (remaining) │ │ Service │
|
|
313
|
+
└─────────────────┘ └─────────┘
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Further Reading
|
|
317
|
+
|
|
318
|
+
- "Patterns of Enterprise Application Architecture" - Martin Fowler
|
|
319
|
+
- "Clean Architecture" - Robert C. Martin
|
|
320
|
+
- "Domain-Driven Design" - Eric Evans
|
|
321
|
+
- Kamil Grzybek's Modular Monolith articles
|