Implementation issue split out from #107.
Replace the mock-data body in packages/ts-cloud/bin/commands/cost.ts (optimize command) with real implementation. Composes resources + resources:unused + cost:breakdown into actionable recommendations:
- Reserved Instance candidates (steady-state EC2 / RDS workloads).
- Right-sizing (EC2 / RDS instances < 20% utilization).
- Storage class transitions (S3 Standard → Intelligent-Tiering / Glacier).
- Unused resources (delete recommendation, sourced from `resources:unused`).
- CloudFront compression / caching wins (data transfer cost).
Acceptance
cloud optimizereturns real recommendations from the connected account.- Each recommendation lists current cost, projected cost, savings, and the source signal (which CloudWatch metric / Cost Explorer line item triggered it).
--profilehonored.- Replaces the
cli.warn('not implemented')guard introduced by #107.
Notes
- This is the heaviest of the five — depends on
resourcesandresources:unusedbeing real first. Last to implement. - Some recommendations (RI commitments, Compute Savings Plans) need account-level commitment-tracking data; can stub those with a flag (
--include-commitments) once the rest is real.
Related
- #107 — tactical guard