performance-engineeringlisted
Install: claude install-skill Canhada-Labs/ceo-orchestration
# Performance Engineering
Note: This skill is Node.js-focused. The mental model (V8 internals, GC tuning, event loop forensics) applies broadly, but specific commands and profilers differ on Python/Go/Rust runtimes.
## Fail-Fast Rule
If a performance metric exceeds its budget, **stop and investigate**. Never
accept "it's fast enough" without numbers. Never optimize without profiling
first. Never profile with small data sets and claim production readiness.
## {{PROJECT_NAME}} Performance Budgets
| Metric | Budget | Current | Alert At |
|--------|--------|---------|----------|
| Event loop p50 | < 5ms | 1.26ms | > 10ms |
| Event loop p99 | < 100ms | ~100ms | > 200ms |
| Heap used | < 2GB | ~604MB | > 1.5GB |
| RSS (main) | < 4GB | ~2-4GB | > 6GB |
| RSS (adapter) | < 24GB | ~16-24GB | > 28GB |
| IPC latency | < 50ms | ~50ms coalesce | > 100ms |
| Event throughput | > 200 events/s | ~400+ events/s | < 150 events/s |
## V8 Internals That Matter
### Hidden Classes (Shapes)
- Objects with same property order share hidden classes → fast property access
- Adding properties in different orders creates new hidden classes → SLOW
- **Pattern**: Hot-path state objects must always have the same property shape
- In a `storeFastRecord()`-style function: in-place mutation preserves hidden class (good)
- Creating new objects per event would thrash hidden classes (bad)
### Inline Caches (ICs)
- V8 caches property lookup locations per call site
- Polymorphic ICs (>4 shapes at one call si