2026-02-05 10:12:39 -07:00
|
|
|
# OPTIMIZATION.md - Cost & Efficiency Rules
|
|
|
|
|
|
|
|
|
|
## RATE LIMITS
|
|
|
|
|
|
|
|
|
|
**API Call Throttling:**
|
|
|
|
|
- **5 seconds minimum** between API calls
|
|
|
|
|
- **10 seconds minimum** between web searches
|
|
|
|
|
- **Batch similar work** whenever possible
|
|
|
|
|
- **If you hit 429 error:** STOP and wait 5 minutes
|
|
|
|
|
|
|
|
|
|
**Monthly Budget:**
|
|
|
|
|
- **$20 total**
|
|
|
|
|
- **Warn at 75%** ($15 spent)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2026-02-05 14:15:44 -07:00
|
|
|
## MODEL SELECTION RULE
|
|
|
|
|
Default: Haiku
|
|
|
|
|
|
|
|
|
|
Switch to Sonnet ONLY when:
|
2026-02-05 10:12:39 -07:00
|
|
|
- Architecture decisions
|
2026-02-05 14:15:44 -07:00
|
|
|
- Complex code review
|
|
|
|
|
- Security Analysis
|
2026-02-05 10:12:39 -07:00
|
|
|
- Complex debugging/reasoning
|
|
|
|
|
|
2026-02-05 14:15:44 -07:00
|
|
|
When in doubt: Try Haiku first
|
2026-02-05 10:12:39 -07:00
|
|
|
|
2026-02-05 10:36:52 -07:00
|
|
|
### Heartbeat: Ollama Only
|
|
|
|
|
Heartbeats ALWAYS use Ollama. No escalation. If it fails, it fails.
|