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.
Files changed (85) hide show
  1. package/.claude/agents/business_operations/andrea-customer-success-manager.md +175 -0
  2. package/.claude/agents/business_operations/anna-executive-assistant.md +268 -0
  3. package/.claude/agents/business_operations/dave-change-management-specialist.md +200 -0
  4. package/.claude/agents/business_operations/davide-project-manager.md +203 -0
  5. package/.claude/agents/business_operations/enrico-business-process-engineer.md +180 -0
  6. package/.claude/agents/business_operations/fabio-sales-business-development.md +175 -0
  7. package/.claude/agents/business_operations/luke-program-manager.md +105 -0
  8. package/.claude/agents/business_operations/marcello-pm.md +130 -0
  9. package/.claude/agents/business_operations/oliver-pm.md +134 -0
  10. package/.claude/agents/business_operations/sofia-marketing-strategist.md +175 -0
  11. package/.claude/agents/business_operations/steve-executive-communication-strategist.md +111 -0
  12. package/.claude/agents/compliance_legal/dr-enzo-healthcare-compliance-manager.md +198 -0
  13. package/.claude/agents/compliance_legal/elena-legal-compliance-expert.md +169 -0
  14. package/.claude/agents/compliance_legal/guardian-ai-security-validator.md +207 -0
  15. package/.claude/agents/compliance_legal/luca-security-expert.md +229 -0
  16. package/.claude/agents/compliance_legal/sophia-govaffairs.md +132 -0
  17. package/.claude/agents/core_utility/CONSTITUTION.md +365 -0
  18. package/.claude/agents/core_utility/CommonValuesAndPrinciples.md +296 -0
  19. package/.claude/agents/core_utility/MICROSOFT_VALUES.md +121 -0
  20. package/.claude/agents/core_utility/SECURITY_FRAMEWORK_TEMPLATE.md +137 -0
  21. package/.claude/agents/core_utility/diana-performance-dashboard.md +238 -0
  22. package/.claude/agents/core_utility/marcus-context-memory-keeper.md +218 -0
  23. package/.claude/agents/core_utility/po-prompt-optimizer.md +194 -0
  24. package/.claude/agents/core_utility/socrates-first-principles-reasoning.md +260 -0
  25. package/.claude/agents/core_utility/strategic-planner.md +292 -0
  26. package/.claude/agents/core_utility/taskmaster-strategic-task-decomposition-master.md +152 -0
  27. package/.claude/agents/core_utility/thor-quality-assurance-guardian.md +223 -0
  28. package/.claude/agents/core_utility/wanda-workflow-orchestrator.md +247 -0
  29. package/.claude/agents/core_utility/xavier-coordination-patterns.md +251 -0
  30. package/.claude/agents/design_ux/jony-creative-director.md +172 -0
  31. package/.claude/agents/design_ux/sara-ux-ui-designer.md +166 -0
  32. package/.claude/agents/design_ux/stefano-design-thinking-facilitator.md +180 -0
  33. package/.claude/agents/leadership_strategy/ali-chief-of-staff.md +594 -0
  34. package/.claude/agents/leadership_strategy/amy-cfo.md +179 -0
  35. package/.claude/agents/leadership_strategy/antonio-strategy-expert.md +217 -0
  36. package/.claude/agents/leadership_strategy/dan-engineering-gm.md +260 -0
  37. package/.claude/agents/leadership_strategy/domik-mckinsey-strategic-decision-maker.md +324 -0
  38. package/.claude/agents/leadership_strategy/matteo-strategic-business-architect.md +177 -0
  39. package/.claude/agents/leadership_strategy/satya-board-of-directors.md +222 -0
  40. package/.claude/agents/release_management/app-release-manager.md +2352 -0
  41. package/.claude/agents/release_management/feature-release-manager.md +235 -0
  42. package/.claude/agents/specialized_experts/angela-da.md +140 -0
  43. package/.claude/agents/specialized_experts/ava-analytics-insights-virtuoso.md +203 -0
  44. package/.claude/agents/specialized_experts/behice-cultural-coach.md +202 -0
  45. package/.claude/agents/specialized_experts/coach-team-coach.md +180 -0
  46. package/.claude/agents/specialized_experts/ethan-da.md +139 -0
  47. package/.claude/agents/specialized_experts/evan-ic6da.md +140 -0
  48. package/.claude/agents/specialized_experts/fiona-market-analyst.md +148 -0
  49. package/.claude/agents/specialized_experts/giulia-hr-talent-acquisition.md +175 -0
  50. package/.claude/agents/specialized_experts/jenny-inclusive-accessibility-champion.md +200 -0
  51. package/.claude/agents/specialized_experts/michael-vc.md +130 -0
  52. package/.claude/agents/specialized_experts/riccardo-storyteller.md +158 -0
  53. package/.claude/agents/specialized_experts/sam-startupper.md +253 -0
  54. package/.claude/agents/specialized_experts/wiz-investor-venture-capital.md +182 -0
  55. package/.claude/agents/technical_development/baccio-tech-architect.md +210 -0
  56. package/.claude/agents/technical_development/dario-debugger.md +250 -0
  57. package/.claude/agents/technical_development/marco-devops-engineer.md +200 -0
  58. package/.claude/agents/technical_development/omri-data-scientist.md +194 -0
  59. package/.claude/agents/technical_development/otto-performance-optimizer.md +262 -0
  60. package/.claude/agents/technical_development/paolo-best-practices-enforcer.md +303 -0
  61. package/.claude/agents/technical_development/rex-code-reviewer.md +231 -0
  62. package/.claude/rules/api-development.md +358 -0
  63. package/.claude/rules/code-style.md +129 -0
  64. package/.claude/rules/documentation-standards.md +359 -0
  65. package/.claude/rules/ethical-guidelines.md +383 -0
  66. package/.claude/rules/security-requirements.md +182 -0
  67. package/.claude/rules/testing-standards.md +266 -0
  68. package/.claude/skills/architecture/SKILL.md +228 -0
  69. package/.claude/skills/code-review/SKILL.md +140 -0
  70. package/.claude/skills/debugging/SKILL.md +192 -0
  71. package/.claude/skills/performance/SKILL.md +277 -0
  72. package/.claude/skills/project-management/SKILL.md +382 -0
  73. package/.claude/skills/release-management/SKILL.md +342 -0
  74. package/.claude/skills/security-audit/SKILL.md +276 -0
  75. package/.claude/skills/strategic-analysis/SKILL.md +338 -0
  76. package/LICENSE +60 -0
  77. package/README.md +379 -0
  78. package/VERSION +29 -0
  79. package/bin/myconvergio.js +304 -0
  80. package/package.json +43 -0
  81. package/scripts/bump-agent-version.sh +220 -0
  82. package/scripts/postinstall.js +172 -0
  83. package/scripts/sync-from-convergiocli.sh +169 -0
  84. package/scripts/test-deployment.sh +188 -0
  85. package/scripts/version-manager.sh +213 -0
@@ -0,0 +1,192 @@
1
+ # Debugging Skill
2
+
3
+ > Reusable workflow extracted from dario-debugger expertise.
4
+
5
+ ## Purpose
6
+ Systematically investigate and resolve bugs through scientific methodology, root cause analysis, and evidence-based diagnosis across all technology stacks.
7
+
8
+ ## When to Use
9
+ - Production incidents and outages
10
+ - Intermittent or hard-to-reproduce bugs
11
+ - Performance degradation investigation
12
+ - Memory leaks and resource exhaustion
13
+ - Concurrency issues (race conditions, deadlocks)
14
+ - Crash analysis and stack trace interpretation
15
+ - Test failures and CI/CD pipeline issues
16
+
17
+ ## Workflow Steps
18
+
19
+ 1. **Reproduce**
20
+ - Confirm issue can be consistently reproduced
21
+ - Document exact reproduction steps
22
+ - Identify required environment/conditions
23
+ - Create minimal reproduction case
24
+
25
+ 2. **Isolate**
26
+ - Narrow down problem space (component, input, timing)
27
+ - Use binary search to eliminate possibilities
28
+ - Identify affected versions (git bisect)
29
+ - Determine scope of impact
30
+
31
+ 3. **Gather Evidence**
32
+ - Collect logs from all relevant systems
33
+ - Capture stack traces and error messages
34
+ - Record metrics and performance data
35
+ - Preserve system state before changes
36
+ - Use distributed tracing for microservices
37
+
38
+ 4. **Hypothesize**
39
+ - Form testable hypotheses about root cause
40
+ - List potential causes ranked by probability
41
+ - Consider symptoms vs actual cause
42
+ - Apply 5 Whys technique
43
+
44
+ 5. **Test Hypotheses**
45
+ - Design experiments to prove/disprove each hypothesis
46
+ - Use debuggers and profilers to validate
47
+ - Check logs for evidence supporting/refuting
48
+ - Eliminate possibilities systematically
49
+
50
+ 6. **Identify Root Cause**
51
+ - Determine fundamental issue (not just symptom)
52
+ - Verify with >95% confidence
53
+ - Document evidence trail
54
+ - Distinguish correlation from causation
55
+
56
+ 7. **Fix & Verify**
57
+ - Implement targeted fix for root cause
58
+ - Verify fix resolves issue
59
+ - Test for regressions
60
+ - Measure impact of fix
61
+
62
+ 8. **Prevent Recurrence**
63
+ - Add regression tests
64
+ - Implement monitoring/alerting
65
+ - Document findings for team
66
+ - Update runbooks if applicable
67
+
68
+ ## Inputs Required
69
+ - **Bug description**: Expected vs actual behavior
70
+ - **Environment**: OS, versions, configurations, recent changes
71
+ - **Reproduction**: Steps to reproduce (if known)
72
+ - **Evidence**: Logs, error messages, screenshots, metrics
73
+ - **Scope**: When did it start? How many affected?
74
+
75
+ ## Outputs Produced
76
+ - **Root Cause Report**: Detailed analysis with evidence
77
+ - **Reproduction Steps**: Minimal, reliable reproduction case
78
+ - **Fix Recommendations**: Prioritized solutions with trade-offs
79
+ - **Prevention Strategy**: How to prevent similar issues
80
+ - **Regression Tests**: Tests to verify fix and prevent recurrence
81
+
82
+ ## Bug Classification
83
+
84
+ ### Priority Levels
85
+ - **🔴 P0 - Critical**: System down, data loss, security breach - immediate response
86
+ - **🟠 P1 - High**: Major feature broken, significant user impact
87
+ - **🟡 P2 - Medium**: Feature degraded, workaround exists
88
+ - **🟢 P3 - Low**: Minor issue, cosmetic, edge case
89
+
90
+ ## Debugging Techniques
91
+
92
+ ### Scientific Method
93
+ 1. Observe the problem
94
+ 2. Form hypothesis about cause
95
+ 3. Design experiment to test hypothesis
96
+ 4. Execute test and collect data
97
+ 5. Analyze results
98
+ 6. Refine hypothesis or conclude
99
+
100
+ ### Binary Search Debugging
101
+ - Divide problem space in half repeatedly
102
+ - Test midpoint to eliminate half of possibilities
103
+ - Efficient for narrowing down cause
104
+
105
+ ### 5 Whys Technique
106
+ ```
107
+ Problem: API endpoint returns 500 error
108
+ Why? Database connection failed
109
+ Why? Connection pool exhausted
110
+ Why? Connections not being released
111
+ Why? Missing finally block in error path
112
+ Why? Error handling added without proper resource cleanup
113
+ Root Cause: Incomplete error handling refactor
114
+ ```
115
+
116
+ ### Time-Travel Debugging
117
+ - Use tools like rr, UndoDB for execution replay
118
+ - Step backwards through execution
119
+ - Examine state at any point in time
120
+
121
+ ## Example Usage
122
+
123
+ ```
124
+ Input: Production API returning 500 errors intermittently
125
+
126
+ Workflow Execution:
127
+ 1. Reproduce: 500 errors occur under load (>100 req/sec)
128
+ 2. Isolate: Only affects /api/users endpoint, started after v2.3 deploy
129
+ 3. Evidence: Connection pool at max, slow query log shows 30s timeouts
130
+ 4. Hypothesis: Query performance degraded with new schema
131
+ 5. Test: EXPLAIN ANALYZE shows missing index after migration
132
+ 6. Root Cause: Migration script failed to create user_email_idx index
133
+ 7. Fix: CREATE INDEX user_email_idx; query time drops to 50ms
134
+ 8. Prevent: Add index existence check to health endpoint
135
+
136
+ Output:
137
+ ROOT CAUSE: Missing database index after incomplete migration
138
+ EVIDENCE: Query plan shows seq scan, migration log shows index creation failed
139
+ FIX: Manual index creation, update migration with IF NOT EXISTS
140
+ PREVENTION: Added database index monitoring, migration dry-run validation
141
+ CONFIDENCE: 99%
142
+ ```
143
+
144
+ ## Debugging Tools by Platform
145
+
146
+ ### Language-Specific
147
+ - **Python**: pdb, ipdb, py-spy, memory_profiler
148
+ - **JavaScript/Node**: Chrome DevTools, node --inspect, ndb
149
+ - **C/C++/Objective-C**: LLDB, Instruments, AddressSanitizer, Valgrind
150
+ - **Java/Kotlin**: JDB, VisualVM, async-profiler
151
+ - **Go**: Delve, pprof, race detector
152
+
153
+ ### System-Level
154
+ - **Linux**: strace, ltrace, perf, eBPF/bpftrace
155
+ - **macOS**: dtrace, Instruments, sample, spindump
156
+ - **Network**: Wireshark, tcpdump, mtr, curl -v
157
+ - **Container**: docker logs, kubectl logs, container-diff
158
+
159
+ ### Observability
160
+ - **Logging**: ELK Stack, Splunk, Datadog
161
+ - **Tracing**: Jaeger, Zipkin, OpenTelemetry
162
+ - **Metrics**: Prometheus, Grafana, New Relic
163
+ - **APM**: Datadog APM, New Relic, Dynatrace
164
+
165
+ ## Log Analysis Patterns
166
+
167
+ ### Error Pattern Recognition
168
+ - Stack trace analysis and grouping
169
+ - Error rate anomaly detection
170
+ - Correlation of errors across services
171
+ - Timeline reconstruction
172
+
173
+ ### Distributed Tracing
174
+ - Follow request ID across microservices
175
+ - Identify latency contributors
176
+ - Find error propagation paths
177
+ - Visualize service dependencies
178
+
179
+ ## Related Agents
180
+ - **dario-debugger** - Full agent with reasoning and tool expertise
181
+ - **rex-code-reviewer** - Identifies bug-prone patterns
182
+ - **otto-performance-optimizer** - Performance-related debugging
183
+ - **thor-quality-assurance-guardian** - Test gap identification
184
+ - **luca-security-expert** - Security vulnerability investigation
185
+
186
+ ## ISE Engineering Fundamentals Alignment
187
+ - Build applications test-ready with comprehensive logging
188
+ - Use correlation IDs for distributed tracing
189
+ - Include contextual metadata in all logs
190
+ - Log to external systems for analysis
191
+ - Blameless post-mortems for systemic improvements
192
+ - Code without tests is incomplete - add regression tests
@@ -0,0 +1,277 @@
1
+ # Performance Optimization Skill
2
+
3
+ > Reusable workflow extracted from otto-performance-optimizer expertise.
4
+
5
+ ## Purpose
6
+ Systematically identify and eliminate performance bottlenecks through data-driven profiling, algorithmic optimization, and infrastructure tuning to achieve scalability and efficiency goals.
7
+
8
+ ## When to Use
9
+ - Performance degradation investigation
10
+ - Pre-release performance validation
11
+ - Scalability planning and capacity assessment
12
+ - High-load optimization
13
+ - Cost optimization through efficiency
14
+ - Database query optimization
15
+ - Frontend performance improvement (Core Web Vitals)
16
+ - Infrastructure right-sizing
17
+
18
+ ## Workflow Steps
19
+
20
+ 1. **Define Performance Goals**
21
+ - Establish specific, measurable targets (e.g., P95 < 200ms)
22
+ - Define throughput requirements (req/sec, ops/sec)
23
+ - Set resource efficiency goals (CPU, memory, cost)
24
+ - Identify user experience requirements (page load, TTI)
25
+ - Document current baseline metrics
26
+
27
+ 2. **Baseline Measurement**
28
+ - Create reproducible benchmark suite
29
+ - Measure current performance across key metrics
30
+ - Identify representative workloads
31
+ - Document environment configuration
32
+ - Establish measurement methodology
33
+
34
+ 3. **Profile & Analyze**
35
+ - CPU profiling: Identify hot paths and expensive functions
36
+ - Memory profiling: Find allocations, leaks, GC pressure
37
+ - I/O profiling: Measure disk and network bottlenecks
38
+ - Database profiling: Query analysis with EXPLAIN
39
+ - Frontend profiling: Lighthouse, WebPageTest, DevTools
40
+
41
+ 4. **Identify Bottlenecks**
42
+ - Analyze profiling data for actual constraints
43
+ - Distinguish symptoms from root causes
44
+ - Quantify impact of each bottleneck
45
+ - Prioritize by impact/effort ratio
46
+ - Avoid premature optimization (profile first!)
47
+
48
+ 5. **Prioritize Optimizations**
49
+ - **Quick Wins**: High impact, low effort
50
+ - **Strategic**: High impact, medium effort
51
+ - **Incremental**: Medium impact, low effort
52
+ - **Deferred**: Low impact or high complexity
53
+ - Create optimization roadmap
54
+
55
+ 6. **Implement & Measure**
56
+ - Apply optimizations incrementally
57
+ - Measure each change independently
58
+ - Document before/after metrics
59
+ - Verify no functional regressions
60
+ - Track trade-offs (complexity, maintainability)
61
+
62
+ 7. **Validate & Compare**
63
+ - Compare against baseline and goals
64
+ - Run load tests to verify at scale
65
+ - Test edge cases and failure modes
66
+ - Check resource utilization under load
67
+ - Measure cost impact
68
+
69
+ 8. **Monitor & Prevent Regression**
70
+ - Set up performance monitoring
71
+ - Create alerting for degradation
72
+ - Add performance tests to CI/CD
73
+ - Document optimization decisions
74
+ - Regular performance review cadence
75
+
76
+ ## Inputs Required
77
+ - **Performance targets**: Specific latency, throughput, resource goals
78
+ - **Current metrics**: Baseline performance measurements
79
+ - **Workload profile**: Traffic patterns, peak loads, data volumes
80
+ - **Constraints**: Budget, timeline, acceptable trade-offs
81
+ - **Environment**: Production specs, infrastructure configuration
82
+
83
+ ## Outputs Produced
84
+ - **Profiling Report**: Flame graphs, hot spots, bottleneck analysis
85
+ - **Optimization Roadmap**: Prioritized improvements with expected impact
86
+ - **Before/After Benchmarks**: Quantified performance improvements
87
+ - **Capacity Plan**: Scalability analysis and resource projections
88
+ - **Monitoring Setup**: Metrics, dashboards, and alerting configuration
89
+ - **Cost Analysis**: Infrastructure cost savings from optimization
90
+
91
+ ## Profiling Tools by Category
92
+
93
+ ### CPU Profiling
94
+ - **Python**: cProfile, py-spy, line_profiler
95
+ - **JavaScript/Node**: Chrome DevTools, clinic.js, 0x, node --prof
96
+ - **C/C++/Objective-C**: Instruments, perf, Valgrind, Intel VTune
97
+ - **Java/Kotlin**: JProfiler, async-profiler, JFR, VisualVM
98
+ - **Go**: pprof, trace, benchstat
99
+
100
+ ### Memory Profiling
101
+ - **Python**: memory_profiler, tracemalloc, objgraph
102
+ - **JavaScript/Node**: Chrome DevTools heap profiler, node --heap-prof
103
+ - **C/C++**: Valgrind, AddressSanitizer, LeakSanitizer
104
+ - **Java**: VisualVM, JProfiler, heap dumps
105
+ - **Go**: pprof heap profile
106
+
107
+ ### Database Profiling
108
+ - **PostgreSQL**: EXPLAIN ANALYZE, pg_stat_statements
109
+ - **MySQL**: EXPLAIN, slow query log, pt-query-digest
110
+ - **MongoDB**: explain(), profiler, slow query log
111
+ - **Redis**: SLOWLOG, redis-cli --latency
112
+
113
+ ### System Profiling
114
+ - **Linux**: perf, eBPF/bpftrace, sysstat, iotop
115
+ - **macOS**: Instruments, dtrace, fs_usage
116
+ - **Network**: Wireshark, tcpdump, netstat, ss
117
+
118
+ ## Optimization Strategies Catalog
119
+
120
+ ### Algorithmic Optimization
121
+ - **Complexity Reduction**: O(n²) → O(n log n) → O(n)
122
+ - **Data Structure Selection**: Array vs Hash vs Tree
123
+ - **Caching Results**: Memoization, computed properties
124
+ - **Lazy Evaluation**: Compute only when needed
125
+ - **Batch Processing**: N+1 → single batch operation
126
+
127
+ ### Database Optimization
128
+ - **Query Optimization**: Rewrite inefficient queries
129
+ - **Index Strategy**: B-tree, hash, partial, covering indexes
130
+ - **Connection Pooling**: Optimal pool size (typically 2-10× CPU cores)
131
+ - **Query Batching**: Combine multiple queries
132
+ - **Denormalization**: Trade-off for read performance
133
+ - **Caching**: Redis/Memcached for hot data
134
+
135
+ ### Frontend Optimization
136
+ - **Core Web Vitals**:
137
+ - LCP (Largest Contentful Paint) < 2.5s
138
+ - FID (First Input Delay) < 100ms
139
+ - CLS (Cumulative Layout Shift) < 0.1
140
+ - **Bundle Optimization**: Code splitting, tree shaking, lazy loading
141
+ - **Asset Optimization**: Image compression, WebP, responsive images
142
+ - **Caching**: Service workers, Cache-Control headers
143
+ - **CDN**: Geographic distribution, edge caching
144
+
145
+ ### Backend Optimization
146
+ - **API Response**: Reduce payload size, compression
147
+ - **Async Processing**: Queue long-running tasks
148
+ - **Connection Reuse**: HTTP keep-alive, connection pooling
149
+ - **Caching Layers**: Application cache, CDN, database cache
150
+ - **Concurrency**: Proper use of async/await, workers
151
+
152
+ ### Infrastructure Optimization
153
+ - **Auto-Scaling**: Horizontal and vertical scaling policies
154
+ - **Right-Sizing**: Match resources to actual usage
155
+ - **Load Balancing**: Distribute traffic efficiently
156
+ - **Geographic Distribution**: Multi-region for global users
157
+ - **Resource Limits**: Prevent resource exhaustion
158
+
159
+ ## Performance Metrics Checklist
160
+
161
+ ### Latency Metrics
162
+ - [ ] P50 (median) latency measured
163
+ - [ ] P95 latency (95th percentile) tracked
164
+ - [ ] P99 latency (worst case) monitored
165
+ - [ ] Max latency identified
166
+
167
+ ### Throughput Metrics
168
+ - [ ] Requests per second (RPS) capacity known
169
+ - [ ] Transactions per second (TPS) measured
170
+ - [ ] Concurrent users handled documented
171
+ - [ ] Peak load capacity established
172
+
173
+ ### Resource Metrics
174
+ - [ ] CPU utilization tracked (target: <70% at peak)
175
+ - [ ] Memory usage monitored (avoid swapping)
176
+ - [ ] Disk I/O measured (IOPS, throughput)
177
+ - [ ] Network bandwidth utilization tracked
178
+
179
+ ### User Experience Metrics
180
+ - [ ] Time to First Byte (TTFB) < 200ms
181
+ - [ ] First Contentful Paint (FCP) < 1.8s
182
+ - [ ] Time to Interactive (TTI) < 3.8s
183
+ - [ ] Total Page Load < 3s
184
+
185
+ ## Example Usage
186
+
187
+ ```
188
+ Input: API endpoint /api/users slow (P95: 3.2s), target: <200ms
189
+
190
+ Workflow Execution:
191
+ 1. Goal: Reduce P95 latency to <200ms, increase throughput 5x
192
+ 2. Baseline: Current P95 = 3.2s, 50 req/sec max
193
+ 3. Profile:
194
+ - Flame graph shows 80% time in database query
195
+ - Query: SELECT * FROM users JOIN orders... (full table scan)
196
+ - 5M users table, no index on email column
197
+ 4. Bottleneck: Missing index causing seq scan, N+1 query pattern
198
+ 5. Prioritize:
199
+ - 🔴 Quick Win: Add index on users.email
200
+ - 🔴 Quick Win: Fix N+1 with JOIN optimization
201
+ - 🟡 Strategic: Add Redis cache for user profile
202
+ 6. Implement:
203
+ - CREATE INDEX idx_users_email ON users(email)
204
+ - Rewrite query with proper JOIN
205
+ - Add Redis cache (TTL: 5min)
206
+ 7. Validate:
207
+ - P95 latency: 3.2s → 45ms (98.6% improvement)
208
+ - Throughput: 50 → 400 req/sec (8x improvement)
209
+ - Database CPU: 85% → 12%
210
+ 8. Monitor: Added Grafana dashboard, alert if P95 > 200ms
211
+
212
+ Output:
213
+ ✅ Performance goal achieved: P95 = 45ms (target: <200ms)
214
+ ✅ Throughput exceeded: 400 req/sec (target: 250 req/sec)
215
+ ✅ Cost reduced: 6 → 2 database instances ($2,400/month savings)
216
+ ```
217
+
218
+ ## Optimization Anti-Patterns to Avoid
219
+
220
+ ### Premature Optimization
221
+ - ❌ Optimizing without profiling data
222
+ - ✅ Profile first, identify actual bottleneck, then optimize
223
+
224
+ ### Micro-Optimizations
225
+ - ❌ Focusing on saving nanoseconds while ignoring second-long delays
226
+ - ✅ Focus on bottlenecks with measurable user impact
227
+
228
+ ### Benchmark Gaming
229
+ - ❌ Optimizing for artificial benchmarks not real workloads
230
+ - ✅ Use representative production-like workloads
231
+
232
+ ### Complexity Creep
233
+ - ❌ Adding complexity for marginal 2% gains
234
+ - ✅ Balance performance with maintainability
235
+
236
+ ### Ignoring Trade-offs
237
+ - ❌ Not considering memory usage, code complexity, maintainability
238
+ - ✅ Document trade-offs explicitly
239
+
240
+ ## Performance Budget Template
241
+
242
+ ```markdown
243
+ ## Performance Budget: [Feature/Page Name]
244
+
245
+ ### Targets
246
+ - P95 Latency: < [target]ms
247
+ - Throughput: > [target] req/sec
248
+ - Page Load: < [target]s
249
+ - Bundle Size: < [target]KB
250
+ - CPU Usage: < [target]%
251
+ - Memory Usage: < [target]MB
252
+
253
+ ### Current Metrics
254
+ - P95 Latency: [current]ms
255
+ - Throughput: [current] req/sec
256
+ - Status: ✅ Within budget / ❌ Exceeds budget
257
+
258
+ ### Action Required
259
+ [If budget exceeded, optimization plan]
260
+ ```
261
+
262
+ ## Related Agents
263
+ - **otto-performance-optimizer** - Full agent with profiling expertise
264
+ - **baccio-tech-architect** - Architecture-level performance design
265
+ - **dario-debugger** - Performance-related bug investigation
266
+ - **omri-data-scientist** - ML model inference optimization
267
+ - **marco-devops-engineer** - Infrastructure performance tuning
268
+
269
+ ## ISE Engineering Fundamentals Alignment
270
+ - Leverage observability (metrics, tracing) for performance
271
+ - Load testing validates behavior under peak load
272
+ - Performance testing measures against baselines
273
+ - Stress testing finds breaking points
274
+ - Design for NFRs: performance SLAs defined upfront
275
+ - Parametrize configurations for easy tuning
276
+ - Log operation durations on critical paths
277
+ - Test under realistic load, not just happy-path