myconvergio 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.
- package/.claude/agents/business_operations/andrea-customer-success-manager.md +175 -0
- package/.claude/agents/business_operations/anna-executive-assistant.md +268 -0
- package/.claude/agents/business_operations/dave-change-management-specialist.md +200 -0
- package/.claude/agents/business_operations/davide-project-manager.md +203 -0
- package/.claude/agents/business_operations/enrico-business-process-engineer.md +180 -0
- package/.claude/agents/business_operations/fabio-sales-business-development.md +175 -0
- package/.claude/agents/business_operations/luke-program-manager.md +105 -0
- package/.claude/agents/business_operations/marcello-pm.md +130 -0
- package/.claude/agents/business_operations/oliver-pm.md +134 -0
- package/.claude/agents/business_operations/sofia-marketing-strategist.md +175 -0
- package/.claude/agents/business_operations/steve-executive-communication-strategist.md +111 -0
- package/.claude/agents/compliance_legal/dr-enzo-healthcare-compliance-manager.md +198 -0
- package/.claude/agents/compliance_legal/elena-legal-compliance-expert.md +169 -0
- package/.claude/agents/compliance_legal/guardian-ai-security-validator.md +207 -0
- package/.claude/agents/compliance_legal/luca-security-expert.md +229 -0
- package/.claude/agents/compliance_legal/sophia-govaffairs.md +132 -0
- package/.claude/agents/core_utility/CONSTITUTION.md +365 -0
- package/.claude/agents/core_utility/CommonValuesAndPrinciples.md +296 -0
- package/.claude/agents/core_utility/MICROSOFT_VALUES.md +121 -0
- package/.claude/agents/core_utility/SECURITY_FRAMEWORK_TEMPLATE.md +137 -0
- package/.claude/agents/core_utility/diana-performance-dashboard.md +238 -0
- package/.claude/agents/core_utility/marcus-context-memory-keeper.md +218 -0
- package/.claude/agents/core_utility/po-prompt-optimizer.md +194 -0
- package/.claude/agents/core_utility/socrates-first-principles-reasoning.md +260 -0
- package/.claude/agents/core_utility/strategic-planner.md +292 -0
- package/.claude/agents/core_utility/taskmaster-strategic-task-decomposition-master.md +152 -0
- package/.claude/agents/core_utility/thor-quality-assurance-guardian.md +223 -0
- package/.claude/agents/core_utility/wanda-workflow-orchestrator.md +247 -0
- package/.claude/agents/core_utility/xavier-coordination-patterns.md +251 -0
- package/.claude/agents/design_ux/jony-creative-director.md +172 -0
- package/.claude/agents/design_ux/sara-ux-ui-designer.md +166 -0
- package/.claude/agents/design_ux/stefano-design-thinking-facilitator.md +180 -0
- package/.claude/agents/leadership_strategy/ali-chief-of-staff.md +594 -0
- package/.claude/agents/leadership_strategy/amy-cfo.md +179 -0
- package/.claude/agents/leadership_strategy/antonio-strategy-expert.md +217 -0
- package/.claude/agents/leadership_strategy/dan-engineering-gm.md +260 -0
- package/.claude/agents/leadership_strategy/domik-mckinsey-strategic-decision-maker.md +324 -0
- package/.claude/agents/leadership_strategy/matteo-strategic-business-architect.md +177 -0
- package/.claude/agents/leadership_strategy/satya-board-of-directors.md +222 -0
- package/.claude/agents/release_management/app-release-manager.md +2352 -0
- package/.claude/agents/release_management/feature-release-manager.md +235 -0
- package/.claude/agents/specialized_experts/angela-da.md +140 -0
- package/.claude/agents/specialized_experts/ava-analytics-insights-virtuoso.md +203 -0
- package/.claude/agents/specialized_experts/behice-cultural-coach.md +202 -0
- package/.claude/agents/specialized_experts/coach-team-coach.md +180 -0
- package/.claude/agents/specialized_experts/ethan-da.md +139 -0
- package/.claude/agents/specialized_experts/evan-ic6da.md +140 -0
- package/.claude/agents/specialized_experts/fiona-market-analyst.md +148 -0
- package/.claude/agents/specialized_experts/giulia-hr-talent-acquisition.md +175 -0
- package/.claude/agents/specialized_experts/jenny-inclusive-accessibility-champion.md +200 -0
- package/.claude/agents/specialized_experts/michael-vc.md +130 -0
- package/.claude/agents/specialized_experts/riccardo-storyteller.md +158 -0
- package/.claude/agents/specialized_experts/sam-startupper.md +253 -0
- package/.claude/agents/specialized_experts/wiz-investor-venture-capital.md +182 -0
- package/.claude/agents/technical_development/baccio-tech-architect.md +210 -0
- package/.claude/agents/technical_development/dario-debugger.md +250 -0
- package/.claude/agents/technical_development/marco-devops-engineer.md +200 -0
- package/.claude/agents/technical_development/omri-data-scientist.md +194 -0
- package/.claude/agents/technical_development/otto-performance-optimizer.md +262 -0
- package/.claude/agents/technical_development/paolo-best-practices-enforcer.md +303 -0
- package/.claude/agents/technical_development/rex-code-reviewer.md +231 -0
- package/.claude/rules/api-development.md +358 -0
- package/.claude/rules/code-style.md +129 -0
- package/.claude/rules/documentation-standards.md +359 -0
- package/.claude/rules/ethical-guidelines.md +383 -0
- package/.claude/rules/security-requirements.md +182 -0
- package/.claude/rules/testing-standards.md +266 -0
- package/.claude/skills/architecture/SKILL.md +228 -0
- package/.claude/skills/code-review/SKILL.md +140 -0
- package/.claude/skills/debugging/SKILL.md +192 -0
- package/.claude/skills/performance/SKILL.md +277 -0
- package/.claude/skills/project-management/SKILL.md +382 -0
- package/.claude/skills/release-management/SKILL.md +342 -0
- package/.claude/skills/security-audit/SKILL.md +276 -0
- package/.claude/skills/strategic-analysis/SKILL.md +338 -0
- package/LICENSE +60 -0
- package/README.md +379 -0
- package/VERSION +29 -0
- package/bin/myconvergio.js +304 -0
- package/package.json +43 -0
- package/scripts/bump-agent-version.sh +220 -0
- package/scripts/postinstall.js +172 -0
- package/scripts/sync-from-convergiocli.sh +169 -0
- package/scripts/test-deployment.sh +188 -0
- package/scripts/version-manager.sh +213 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Testing Standards
|
|
2
|
+
|
|
3
|
+
> This rule is enforced by the MyConvergio agent ecosystem.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
Comprehensive testing is mandatory in the MyConvergio ecosystem. All code must include appropriate unit, integration, and end-to-end tests to ensure reliability, prevent regressions, and facilitate confident refactoring.
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
### Test Coverage
|
|
11
|
+
- Minimum 80% code coverage for all business logic
|
|
12
|
+
- 100% coverage for critical paths (authentication, payment, data integrity)
|
|
13
|
+
- Track coverage metrics in CI/CD pipeline
|
|
14
|
+
- Coverage should include branches, not just lines
|
|
15
|
+
|
|
16
|
+
### Unit Testing
|
|
17
|
+
- Required for all business logic functions
|
|
18
|
+
- Test pure functions in isolation
|
|
19
|
+
- Mock external dependencies (databases, APIs, file system)
|
|
20
|
+
- Each test should verify one specific behavior
|
|
21
|
+
- Fast execution (< 1ms per test ideal)
|
|
22
|
+
- No network calls or file I/O in unit tests
|
|
23
|
+
|
|
24
|
+
### Integration Testing
|
|
25
|
+
- Required for all API endpoints
|
|
26
|
+
- Test database interactions with test database
|
|
27
|
+
- Verify external service integrations
|
|
28
|
+
- Test authentication and authorization flows
|
|
29
|
+
- Use fixtures and factories for test data
|
|
30
|
+
- Clean up test data after each test
|
|
31
|
+
|
|
32
|
+
### Test Naming Conventions
|
|
33
|
+
- Use descriptive names that explain the scenario
|
|
34
|
+
- Format: `describe('ComponentName', () => it('should do X when Y'))`
|
|
35
|
+
- Name should read like a specification
|
|
36
|
+
- Group related tests in describe blocks
|
|
37
|
+
- Use nested describe blocks for context
|
|
38
|
+
|
|
39
|
+
### Test Data Management
|
|
40
|
+
- Use fixtures for complex test data
|
|
41
|
+
- Use factories for generating test objects
|
|
42
|
+
- Never use production data in tests
|
|
43
|
+
- Reset database state between tests
|
|
44
|
+
- Avoid test interdependencies
|
|
45
|
+
|
|
46
|
+
### Test Isolation
|
|
47
|
+
- Tests must run independently
|
|
48
|
+
- No shared state between tests
|
|
49
|
+
- Each test should set up its own data
|
|
50
|
+
- Clean up resources in afterEach/teardown
|
|
51
|
+
- Tests should pass in any order
|
|
52
|
+
|
|
53
|
+
### Mocking & Stubbing
|
|
54
|
+
- Mock external dependencies (APIs, databases, time)
|
|
55
|
+
- Use dependency injection to enable mocking
|
|
56
|
+
- Avoid over-mocking (test real integration when possible)
|
|
57
|
+
- Document what is mocked and why
|
|
58
|
+
- Use test doubles appropriately (mocks, stubs, spies, fakes)
|
|
59
|
+
|
|
60
|
+
### Performance
|
|
61
|
+
- Unit tests should run in milliseconds
|
|
62
|
+
- Integration tests should run in seconds
|
|
63
|
+
- Optimize slow tests
|
|
64
|
+
- Parallelize test execution when possible
|
|
65
|
+
- Flag and investigate flaky tests
|
|
66
|
+
|
|
67
|
+
## Examples
|
|
68
|
+
|
|
69
|
+
### Good Examples
|
|
70
|
+
|
|
71
|
+
#### Unit Test (TypeScript/Jest)
|
|
72
|
+
```typescript
|
|
73
|
+
// Good: Clear naming, isolated, single behavior
|
|
74
|
+
describe('calculateDiscount', () => {
|
|
75
|
+
it('should apply 10% discount for premium users', () => {
|
|
76
|
+
const user = { isPremium: true };
|
|
77
|
+
const price = 100;
|
|
78
|
+
|
|
79
|
+
const result = calculateDiscount(price, user);
|
|
80
|
+
|
|
81
|
+
expect(result).toBe(90);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('should return original price for non-premium users', () => {
|
|
85
|
+
const user = { isPremium: false };
|
|
86
|
+
const price = 100;
|
|
87
|
+
|
|
88
|
+
const result = calculateDiscount(price, user);
|
|
89
|
+
|
|
90
|
+
expect(result).toBe(100);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('should throw error for negative prices', () => {
|
|
94
|
+
const user = { isPremium: true };
|
|
95
|
+
const price = -50;
|
|
96
|
+
|
|
97
|
+
expect(() => calculateDiscount(price, user))
|
|
98
|
+
.toThrow('Price must be positive');
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### Integration Test (Python/pytest)
|
|
104
|
+
```python
|
|
105
|
+
# Good: Database integration, fixtures, cleanup
|
|
106
|
+
@pytest.fixture
|
|
107
|
+
def test_db():
|
|
108
|
+
"""Create test database and clean up after."""
|
|
109
|
+
db = create_test_database()
|
|
110
|
+
yield db
|
|
111
|
+
db.cleanup()
|
|
112
|
+
|
|
113
|
+
def test_create_user_endpoint(test_db, client):
|
|
114
|
+
"""Should create user and return 201 with user data."""
|
|
115
|
+
# Arrange
|
|
116
|
+
user_data = {
|
|
117
|
+
"email": "test@example.com",
|
|
118
|
+
"name": "Test User"
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# Act
|
|
122
|
+
response = client.post("/api/users", json=user_data)
|
|
123
|
+
|
|
124
|
+
# Assert
|
|
125
|
+
assert response.status_code == 201
|
|
126
|
+
assert response.json["email"] == user_data["email"]
|
|
127
|
+
|
|
128
|
+
# Verify in database
|
|
129
|
+
user = test_db.query(User).filter_by(email=user_data["email"]).first()
|
|
130
|
+
assert user is not None
|
|
131
|
+
assert user.name == user_data["name"]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### Mocking External Services (TypeScript)
|
|
135
|
+
```typescript
|
|
136
|
+
// Good: Mock external API, test error handling
|
|
137
|
+
describe('UserService', () => {
|
|
138
|
+
let mockHttpClient: jest.Mocked<HttpClient>;
|
|
139
|
+
let userService: UserService;
|
|
140
|
+
|
|
141
|
+
beforeEach(() => {
|
|
142
|
+
mockHttpClient = {
|
|
143
|
+
get: jest.fn(),
|
|
144
|
+
post: jest.fn(),
|
|
145
|
+
} as any;
|
|
146
|
+
userService = new UserService(mockHttpClient);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it('should fetch user profile from API', async () => {
|
|
150
|
+
const mockUser = { id: '123', name: 'John' };
|
|
151
|
+
mockHttpClient.get.mockResolvedValue({ data: mockUser });
|
|
152
|
+
|
|
153
|
+
const result = await userService.getProfile('123');
|
|
154
|
+
|
|
155
|
+
expect(result).toEqual(mockUser);
|
|
156
|
+
expect(mockHttpClient.get).toHaveBeenCalledWith('/users/123');
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
it('should handle API errors gracefully', async () => {
|
|
160
|
+
mockHttpClient.get.mockRejectedValue(new Error('Network error'));
|
|
161
|
+
|
|
162
|
+
await expect(userService.getProfile('123'))
|
|
163
|
+
.rejects.toThrow('Failed to fetch user profile');
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
#### Test Fixtures (Python)
|
|
169
|
+
```python
|
|
170
|
+
# Good: Reusable fixtures, factory pattern
|
|
171
|
+
@pytest.fixture
|
|
172
|
+
def sample_user():
|
|
173
|
+
"""Create a sample user for testing."""
|
|
174
|
+
return User(
|
|
175
|
+
id="123",
|
|
176
|
+
email="test@example.com",
|
|
177
|
+
name="Test User",
|
|
178
|
+
is_premium=True
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
@pytest.fixture
|
|
182
|
+
def user_factory():
|
|
183
|
+
"""Factory for creating test users with custom attributes."""
|
|
184
|
+
def _create_user(**kwargs):
|
|
185
|
+
defaults = {
|
|
186
|
+
"email": "test@example.com",
|
|
187
|
+
"name": "Test User",
|
|
188
|
+
"is_premium": False
|
|
189
|
+
}
|
|
190
|
+
return User(**{**defaults, **kwargs})
|
|
191
|
+
return _create_user
|
|
192
|
+
|
|
193
|
+
def test_with_factory(user_factory):
|
|
194
|
+
premium_user = user_factory(is_premium=True)
|
|
195
|
+
regular_user = user_factory()
|
|
196
|
+
|
|
197
|
+
assert premium_user.is_premium
|
|
198
|
+
assert not regular_user.is_premium
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Bad Examples
|
|
202
|
+
|
|
203
|
+
#### Poor Test Naming
|
|
204
|
+
```typescript
|
|
205
|
+
// Bad: Unclear test names
|
|
206
|
+
describe('User', () => {
|
|
207
|
+
it('test1', () => {
|
|
208
|
+
// What does this test?
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
it('works', () => {
|
|
212
|
+
// Works for what scenario?
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
#### Shared State
|
|
218
|
+
```typescript
|
|
219
|
+
// Bad: Tests share state, order-dependent
|
|
220
|
+
let userId;
|
|
221
|
+
|
|
222
|
+
it('creates user', async () => {
|
|
223
|
+
const user = await createUser({ email: 'test@example.com' });
|
|
224
|
+
userId = user.id; // Shared state!
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it('updates user', async () => {
|
|
228
|
+
await updateUser(userId, { name: 'Updated' }); // Depends on previous test!
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
#### No Mocking (Slow Tests)
|
|
233
|
+
```typescript
|
|
234
|
+
// Bad: Real API call in unit test
|
|
235
|
+
it('should fetch user data', async () => {
|
|
236
|
+
const result = await fetch('https://api.example.com/users/123');
|
|
237
|
+
// This is slow, unreliable, and not a unit test!
|
|
238
|
+
expect(result.status).toBe(200);
|
|
239
|
+
});
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
#### Magic Values
|
|
243
|
+
```python
|
|
244
|
+
# Bad: Magic numbers and unclear test data
|
|
245
|
+
def test_calculate_price():
|
|
246
|
+
result = calculate_price(100, 0.1, True, 5)
|
|
247
|
+
assert result == 427.5 # What do these numbers mean?
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
#### No Assertions
|
|
251
|
+
```typescript
|
|
252
|
+
// Bad: No verification of behavior
|
|
253
|
+
it('should process order', () => {
|
|
254
|
+
processOrder(order);
|
|
255
|
+
// Test passes but doesn't verify anything!
|
|
256
|
+
});
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## References
|
|
260
|
+
- [Jest Documentation](https://jestjs.io/docs/getting-started)
|
|
261
|
+
- [Pytest Documentation](https://docs.pytest.org/)
|
|
262
|
+
- [Testing Best Practices](https://testingjavascript.com/)
|
|
263
|
+
- [Martin Fowler - Test Pyramid](https://martinfowler.com/articles/practical-test-pyramid.html)
|
|
264
|
+
- [Test-Driven Development by Kent Beck](https://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/0321146530)
|
|
265
|
+
- [xUnit Test Patterns](http://xunitpatterns.com/)
|
|
266
|
+
- [Google Testing Blog](https://testing.googleblog.com/)
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# Architecture Design Skill
|
|
2
|
+
|
|
3
|
+
> Reusable workflow extracted from baccio-tech-architect expertise.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Design scalable, maintainable, and secure system architectures using proven patterns, with emphasis on Domain-Driven Design, Clean Architecture, and cloud-native principles.
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
- New system or feature architecture design
|
|
10
|
+
- Legacy system modernization planning
|
|
11
|
+
- Technology stack selection
|
|
12
|
+
- Scalability assessment and planning
|
|
13
|
+
- Microservices architecture design
|
|
14
|
+
- Cloud migration strategy
|
|
15
|
+
- Technical debt evaluation
|
|
16
|
+
- Architecture review and validation
|
|
17
|
+
|
|
18
|
+
## Workflow Steps
|
|
19
|
+
|
|
20
|
+
1. **Requirements Analysis**
|
|
21
|
+
- Gather functional requirements
|
|
22
|
+
- Define non-functional requirements (NFRs)
|
|
23
|
+
- Identify constraints (budget, timeline, team skills)
|
|
24
|
+
- Understand scale requirements (users, data, traffic)
|
|
25
|
+
- Document compliance requirements
|
|
26
|
+
|
|
27
|
+
2. **Domain Modeling**
|
|
28
|
+
- Apply Domain-Driven Design (DDD)
|
|
29
|
+
- Identify bounded contexts
|
|
30
|
+
- Define domain entities and aggregates
|
|
31
|
+
- Map ubiquitous language
|
|
32
|
+
- Establish context boundaries
|
|
33
|
+
|
|
34
|
+
3. **Architecture Pattern Selection**
|
|
35
|
+
- Evaluate architecture styles (monolith, microservices, serverless)
|
|
36
|
+
- Choose appropriate patterns (CQRS, Event Sourcing, Saga)
|
|
37
|
+
- Apply Clean Architecture principles
|
|
38
|
+
- Define layers and dependencies
|
|
39
|
+
- Establish communication patterns
|
|
40
|
+
|
|
41
|
+
4. **Technology Stack Selection**
|
|
42
|
+
- Evaluate technology options against requirements
|
|
43
|
+
- Consider team expertise and learning curve
|
|
44
|
+
- Assess vendor lock-in risks
|
|
45
|
+
- Evaluate cost implications
|
|
46
|
+
- Check compliance with organizational standards
|
|
47
|
+
|
|
48
|
+
5. **Scalability & Performance Design**
|
|
49
|
+
- Design for horizontal and vertical scaling
|
|
50
|
+
- Plan caching strategy (application, CDN, database)
|
|
51
|
+
- Define load balancing approach
|
|
52
|
+
- Design database sharding/partitioning if needed
|
|
53
|
+
- Plan for geographic distribution
|
|
54
|
+
|
|
55
|
+
6. **Security Architecture**
|
|
56
|
+
- Apply Zero-Trust principles
|
|
57
|
+
- Design authentication/authorization
|
|
58
|
+
- Plan data encryption (at rest, in transit)
|
|
59
|
+
- Define security boundaries
|
|
60
|
+
- Implement defense in depth
|
|
61
|
+
|
|
62
|
+
7. **Observability Design**
|
|
63
|
+
- Design logging strategy (structured logging)
|
|
64
|
+
- Plan metrics collection (Prometheus, CloudWatch)
|
|
65
|
+
- Define distributed tracing approach
|
|
66
|
+
- Create monitoring dashboards
|
|
67
|
+
- Establish alerting thresholds
|
|
68
|
+
|
|
69
|
+
8. **Documentation & ADRs**
|
|
70
|
+
- Create Architecture Decision Records (ADRs)
|
|
71
|
+
- Document architecture diagrams (C4 model)
|
|
72
|
+
- Define API contracts and versioning
|
|
73
|
+
- Document deployment architecture
|
|
74
|
+
- Create capacity planning guidelines
|
|
75
|
+
|
|
76
|
+
## Inputs Required
|
|
77
|
+
- **Business requirements**: What problem are we solving?
|
|
78
|
+
- **Non-functional requirements**: Performance, security, compliance needs
|
|
79
|
+
- **Scale expectations**: Current and projected users, data volume, traffic
|
|
80
|
+
- **Constraints**: Budget, timeline, team skills, existing systems
|
|
81
|
+
- **Compliance**: Regulatory requirements (GDPR, HIPAA, SOC2, etc.)
|
|
82
|
+
|
|
83
|
+
## Outputs Produced
|
|
84
|
+
- **Architecture Blueprint**: Comprehensive system design documentation
|
|
85
|
+
- **ADR (Architecture Decision Records)**: Documented design decisions with rationale
|
|
86
|
+
- **Technology Stack Recommendation**: Selected technologies with justification
|
|
87
|
+
- **Scalability Plan**: Scaling strategy with capacity planning
|
|
88
|
+
- **Security Architecture**: Security patterns and implementation guide
|
|
89
|
+
- **Deployment Diagrams**: Infrastructure and deployment architecture
|
|
90
|
+
- **Migration Roadmap**: Phased implementation or migration plan
|
|
91
|
+
|
|
92
|
+
## Architecture Patterns Catalog
|
|
93
|
+
|
|
94
|
+
### Architectural Styles
|
|
95
|
+
- **Monolithic Architecture**: Single deployable unit, simpler but less scalable
|
|
96
|
+
- **Microservices**: Independent services, complex but highly scalable
|
|
97
|
+
- **Serverless**: Event-driven, pay-per-use, highly elastic
|
|
98
|
+
- **Modular Monolith**: Compromise between monolith and microservices
|
|
99
|
+
- **Service-Oriented Architecture (SOA)**: Enterprise service bus pattern
|
|
100
|
+
|
|
101
|
+
### Design Patterns
|
|
102
|
+
- **Domain-Driven Design (DDD)**: Bounded contexts, aggregates, entities
|
|
103
|
+
- **Clean Architecture**: Dependency inversion, layers, boundaries
|
|
104
|
+
- **CQRS**: Command Query Responsibility Segregation
|
|
105
|
+
- **Event Sourcing**: Event log as source of truth
|
|
106
|
+
- **Saga Pattern**: Distributed transactions
|
|
107
|
+
- **API Gateway**: Single entry point for clients
|
|
108
|
+
- **Backend for Frontend (BFF)**: API per client type
|
|
109
|
+
|
|
110
|
+
### Communication Patterns
|
|
111
|
+
- **Synchronous**: REST, GraphQL, gRPC
|
|
112
|
+
- **Asynchronous**: Message queues, event streams (Kafka, RabbitMQ)
|
|
113
|
+
- **Pub/Sub**: Event-driven communication
|
|
114
|
+
- **Request-Reply**: RPC-style communication
|
|
115
|
+
|
|
116
|
+
## Trade-Off Analysis Template
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
## Decision: [Technology/Pattern Choice]
|
|
120
|
+
|
|
121
|
+
### Context
|
|
122
|
+
[What problem are we solving? What are the constraints?]
|
|
123
|
+
|
|
124
|
+
### Options Considered
|
|
125
|
+
1. **Option A**: [Description]
|
|
126
|
+
- Pros: [Benefits]
|
|
127
|
+
- Cons: [Drawbacks]
|
|
128
|
+
- Cost: [Time/Money/Complexity]
|
|
129
|
+
|
|
130
|
+
2. **Option B**: [Description]
|
|
131
|
+
- Pros: [Benefits]
|
|
132
|
+
- Cons: [Drawbacks]
|
|
133
|
+
- Cost: [Time/Money/Complexity]
|
|
134
|
+
|
|
135
|
+
### Decision
|
|
136
|
+
[Chosen option with rationale]
|
|
137
|
+
|
|
138
|
+
### Consequences
|
|
139
|
+
- Positive: [Expected benefits]
|
|
140
|
+
- Negative: [Known drawbacks]
|
|
141
|
+
- Mitigation: [How we address drawbacks]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Non-Functional Requirements Checklist
|
|
145
|
+
|
|
146
|
+
### Performance
|
|
147
|
+
- [ ] Response time SLA defined (e.g., P95 < 200ms)
|
|
148
|
+
- [ ] Throughput requirements specified
|
|
149
|
+
- [ ] Scalability targets identified
|
|
150
|
+
- [ ] Performance testing strategy defined
|
|
151
|
+
|
|
152
|
+
### Availability
|
|
153
|
+
- [ ] Uptime SLA defined (e.g., 99.9%)
|
|
154
|
+
- [ ] Redundancy strategy planned
|
|
155
|
+
- [ ] Failover mechanisms designed
|
|
156
|
+
- [ ] Disaster recovery plan created
|
|
157
|
+
|
|
158
|
+
### Security
|
|
159
|
+
- [ ] Authentication mechanism selected
|
|
160
|
+
- [ ] Authorization model defined
|
|
161
|
+
- [ ] Data encryption strategy planned
|
|
162
|
+
- [ ] Security boundaries identified
|
|
163
|
+
- [ ] Penetration testing planned
|
|
164
|
+
|
|
165
|
+
### Observability
|
|
166
|
+
- [ ] Logging strategy defined
|
|
167
|
+
- [ ] Metrics collection planned
|
|
168
|
+
- [ ] Distributed tracing implemented
|
|
169
|
+
- [ ] Dashboards designed
|
|
170
|
+
- [ ] Alerting configured
|
|
171
|
+
|
|
172
|
+
### Maintainability
|
|
173
|
+
- [ ] Code organization standards defined
|
|
174
|
+
- [ ] Testing strategy established
|
|
175
|
+
- [ ] Documentation requirements specified
|
|
176
|
+
- [ ] Deployment automation planned
|
|
177
|
+
|
|
178
|
+
## Example Usage
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
Input: Design architecture for e-commerce platform
|
|
182
|
+
Expected: 10K concurrent users, 99.9% uptime, PCI DSS compliant
|
|
183
|
+
|
|
184
|
+
Workflow Execution:
|
|
185
|
+
1. Requirements: User accounts, product catalog, shopping cart, checkout
|
|
186
|
+
2. Domain Model: User, Product, Cart, Order bounded contexts
|
|
187
|
+
3. Pattern: Microservices with API Gateway, Event-driven for orders
|
|
188
|
+
4. Tech Stack:
|
|
189
|
+
- Backend: Node.js + TypeScript
|
|
190
|
+
- Database: PostgreSQL (products/users), Redis (cart/sessions)
|
|
191
|
+
- Message Bus: Kafka for order events
|
|
192
|
+
- Cloud: AWS with ECS + RDS + ElastiCache
|
|
193
|
+
5. Scalability: Horizontal scaling via ECS, database read replicas, CDN
|
|
194
|
+
6. Security: OAuth2 + JWT, PCI-compliant payment gateway, encryption at rest
|
|
195
|
+
7. Observability: CloudWatch logs/metrics, X-Ray tracing, Grafana dashboards
|
|
196
|
+
8. Documentation: ADRs created, C4 diagrams, API documentation
|
|
197
|
+
|
|
198
|
+
Output: Comprehensive architecture blueprint with ADRs and diagrams
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Tech Stack Selection Criteria
|
|
202
|
+
|
|
203
|
+
### Evaluation Matrix
|
|
204
|
+
| Criterion | Weight | Option A | Option B | Option C |
|
|
205
|
+
|-----------|--------|----------|----------|----------|
|
|
206
|
+
| Team expertise | 20% | 8/10 | 5/10 | 6/10 |
|
|
207
|
+
| Scalability | 25% | 9/10 | 7/10 | 8/10 |
|
|
208
|
+
| Cost | 15% | 6/10 | 9/10 | 7/10 |
|
|
209
|
+
| Community support | 10% | 9/10 | 8/10 | 6/10 |
|
|
210
|
+
| Compliance fit | 15% | 8/10 | 7/10 | 9/10 |
|
|
211
|
+
| Vendor lock-in | 15% | 7/10 | 5/10 | 8/10 |
|
|
212
|
+
| **Total** | 100% | **7.9** | **6.9** | **7.5** |
|
|
213
|
+
|
|
214
|
+
## Related Agents
|
|
215
|
+
- **baccio-tech-architect** - Full agent with reasoning and decision-making
|
|
216
|
+
- **luca-security-expert** - Security architecture validation
|
|
217
|
+
- **dan-engineering-gm** - Engineering leadership alignment
|
|
218
|
+
- **marco-devops-engineer** - Infrastructure and deployment architecture
|
|
219
|
+
- **domik-mckinsey-strategic-decision-maker** - Strategic technology decisions
|
|
220
|
+
|
|
221
|
+
## ISE Engineering Fundamentals Alignment
|
|
222
|
+
- Document Architecture Decision Records (ADRs)
|
|
223
|
+
- Apply proven design patterns
|
|
224
|
+
- Conduct trade studies before major decisions
|
|
225
|
+
- Use technical spikes for high-risk unknowns
|
|
226
|
+
- Design for NFRs from day one (availability, scalability, security)
|
|
227
|
+
- Infrastructure as Code for all infrastructure
|
|
228
|
+
- GitOps workflows for deployments
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Code Review Skill
|
|
2
|
+
|
|
3
|
+
> Reusable workflow extracted from rex-code-reviewer expertise.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Perform comprehensive code review with focus on quality, security, design patterns, and best practices to prevent bugs before merge.
|
|
7
|
+
|
|
8
|
+
## When to Use
|
|
9
|
+
- Pull request reviews before merge
|
|
10
|
+
- Code quality assessment for legacy code
|
|
11
|
+
- Security vulnerability identification
|
|
12
|
+
- Design pattern evaluation
|
|
13
|
+
- Pre-release code audits
|
|
14
|
+
- Technical debt quantification
|
|
15
|
+
|
|
16
|
+
## Workflow Steps
|
|
17
|
+
|
|
18
|
+
1. **Context Understanding**
|
|
19
|
+
- Understand the purpose and scope of the code change
|
|
20
|
+
- Review related issue/ticket context
|
|
21
|
+
- Identify affected components and dependencies
|
|
22
|
+
|
|
23
|
+
2. **Architecture Review**
|
|
24
|
+
- Verify alignment with overall system architecture
|
|
25
|
+
- Check adherence to SOLID principles
|
|
26
|
+
- Validate design pattern usage
|
|
27
|
+
- Assess maintainability impact
|
|
28
|
+
|
|
29
|
+
3. **Logic & Security Review**
|
|
30
|
+
- Validate business logic correctness
|
|
31
|
+
- Check edge case handling
|
|
32
|
+
- Scan for OWASP Top 10 vulnerabilities
|
|
33
|
+
- Verify input validation and sanitization
|
|
34
|
+
- Check authentication/authorization
|
|
35
|
+
|
|
36
|
+
4. **Performance & Quality Check**
|
|
37
|
+
- Identify potential bottlenecks
|
|
38
|
+
- Check algorithmic complexity
|
|
39
|
+
- Verify database query optimization
|
|
40
|
+
- Assess resource management
|
|
41
|
+
|
|
42
|
+
5. **Style & Standards**
|
|
43
|
+
- Verify adherence to team coding standards
|
|
44
|
+
- Check naming conventions
|
|
45
|
+
- Validate documentation quality
|
|
46
|
+
- Review test coverage adequacy
|
|
47
|
+
|
|
48
|
+
6. **Generate Feedback**
|
|
49
|
+
- Categorize issues by severity (CRITICAL/HIGH/MEDIUM/SUGGESTION)
|
|
50
|
+
- Provide file:line references
|
|
51
|
+
- Include concrete fix recommendations
|
|
52
|
+
- Acknowledge good patterns
|
|
53
|
+
|
|
54
|
+
## Inputs Required
|
|
55
|
+
- **Code to review**: Pull request diff, file paths, or commit range
|
|
56
|
+
- **Context**: Purpose of changes, related requirements
|
|
57
|
+
- **Standards**: Team coding standards, style guides
|
|
58
|
+
- **Scope**: Full review vs focused review (security, performance, etc.)
|
|
59
|
+
|
|
60
|
+
## Outputs Produced
|
|
61
|
+
- **Review Report**: Detailed findings by severity with file:line references
|
|
62
|
+
- **Security Issues**: Vulnerabilities flagged with severity levels
|
|
63
|
+
- **Pattern Assessment**: Design pattern usage evaluation
|
|
64
|
+
- **Refactoring Roadmap**: Prioritized improvements with effort estimates
|
|
65
|
+
- **Decision**: Approve / Request Changes / Comment
|
|
66
|
+
|
|
67
|
+
## Review Categories
|
|
68
|
+
|
|
69
|
+
### Severity Levels
|
|
70
|
+
- **🔴 CRITICAL**: Must fix before merge - security issues, data loss risks, breaking bugs
|
|
71
|
+
- **🟠 HIGH**: Should fix - significant maintainability or performance issues
|
|
72
|
+
- **🟡 MEDIUM**: Consider fixing - code smell, minor inefficiencies
|
|
73
|
+
- **🟢 SUGGESTION**: Nice to have - style improvements, minor optimizations
|
|
74
|
+
- **💡 LEARNING**: Educational - explaining why certain patterns are preferred
|
|
75
|
+
|
|
76
|
+
## Checklist Format
|
|
77
|
+
|
|
78
|
+
### Security Checklist
|
|
79
|
+
- [ ] No hardcoded secrets or credentials
|
|
80
|
+
- [ ] Input validation and sanitization present
|
|
81
|
+
- [ ] SQL injection prevention (parameterized queries)
|
|
82
|
+
- [ ] XSS prevention (output encoding)
|
|
83
|
+
- [ ] Authentication/authorization properly implemented
|
|
84
|
+
- [ ] Sensitive data encrypted at rest and in transit
|
|
85
|
+
- [ ] No security misconfigurations
|
|
86
|
+
|
|
87
|
+
### Quality Checklist
|
|
88
|
+
- [ ] Code without tests is incomplete - tests present
|
|
89
|
+
- [ ] Edge cases and error conditions handled
|
|
90
|
+
- [ ] No hardcoded values - configuration used
|
|
91
|
+
- [ ] Logging comprehensive with context
|
|
92
|
+
- [ ] No TODO/FIXME comments without tickets
|
|
93
|
+
- [ ] Documentation updated for public APIs
|
|
94
|
+
- [ ] No scope creep - focused on specific change
|
|
95
|
+
|
|
96
|
+
### Performance Checklist
|
|
97
|
+
- [ ] No N+1 query patterns
|
|
98
|
+
- [ ] Appropriate indexing for queries
|
|
99
|
+
- [ ] Efficient algorithms (check Big O)
|
|
100
|
+
- [ ] Proper connection pooling
|
|
101
|
+
- [ ] Caching strategy implemented where appropriate
|
|
102
|
+
- [ ] Resource cleanup (connections, files, memory)
|
|
103
|
+
|
|
104
|
+
## Example Usage
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Input: Review pull request #123 adding user authentication
|
|
108
|
+
|
|
109
|
+
Workflow Execution:
|
|
110
|
+
1. Context: New OAuth2 implementation for user login
|
|
111
|
+
2. Architecture: Clean separation of auth logic, follows existing patterns
|
|
112
|
+
3. Security: ✅ Tokens stored securely, ❌ Missing rate limiting
|
|
113
|
+
4. Performance: ✅ Cached token validation
|
|
114
|
+
5. Standards: ✅ Tests present, ❌ Missing API documentation
|
|
115
|
+
|
|
116
|
+
Output:
|
|
117
|
+
🔴 CRITICAL: Add rate limiting to prevent brute force attacks
|
|
118
|
+
File: src/auth/oauth.py:45
|
|
119
|
+
Fix: Implement token bucket rate limiter with Redis
|
|
120
|
+
|
|
121
|
+
🟠 HIGH: Missing API documentation for new endpoints
|
|
122
|
+
File: src/api/auth.py:12-67
|
|
123
|
+
Fix: Add OpenAPI/Swagger documentation
|
|
124
|
+
|
|
125
|
+
🟢 APPROVE with changes required
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Related Agents
|
|
129
|
+
- **rex-code-reviewer** - Full agent with reasoning and adaptation
|
|
130
|
+
- **thor-quality-assurance-guardian** - Quality standards enforcement
|
|
131
|
+
- **luca-security-expert** - Deep security analysis
|
|
132
|
+
- **baccio-tech-architect** - Architecture pattern validation
|
|
133
|
+
- **dario-debugger** - Root cause analysis support
|
|
134
|
+
|
|
135
|
+
## ISE Engineering Fundamentals Alignment
|
|
136
|
+
- Every PR must be reviewed before merge
|
|
137
|
+
- Improve code quality by identifying defects early
|
|
138
|
+
- Foster learning through knowledge sharing
|
|
139
|
+
- Build shared understanding of codebase
|
|
140
|
+
- "Value quality and precision over completing fast"
|