33 lines
691 B
Markdown
33 lines
691 B
Markdown
|
|
# 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)
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## MODEL SELECTION
|
||
|
|
|
||
|
|
### Default: Always use Haiku
|
||
|
|
|
||
|
|
Switch to **Sonnet** ONLY when:
|
||
|
|
- Architecture decisions
|
||
|
|
- Production-like code review
|
||
|
|
- Security analysis
|
||
|
|
- Complex debugging/reasoning
|
||
|
|
- Strategic multi-project decisions
|
||
|
|
|
||
|
|
### Decision Rule
|
||
|
|
|
||
|
|
**When in doubt:** Try Haiku first.
|
||
|
|
|
||
|
|
If Haiku struggles or gives incomplete answers, escalate to Sonnet.
|