#!/bin/bash
# Auto-update SANDBOX-BRIEFING.md with current status
cd ~/firefrost-work/firefrost-operations-manual

# Extract current phase status from Infrastructure Manifest
PHASE_STATUS=$(grep -A 20 "## 1. Management Services" Firefrost_Infrastructure_Manifest.md | grep -E "✅|⏳" | head -7)

# Extract monitoring status
MONITORING=$(grep -A 10 "## 7. Monitoring Status" Firefrost_Infrastructure_Manifest.md)

# Update the Phase 0.5 section in sandbox briefing
sed -i '/### Phase 0.5/,/### Phase 1/{
    /### Phase 0.5/!{/### Phase 1/!d;}
}' docs/SANDBOX-BRIEFING.md

# Insert updated phase status
sed -i "/### Phase 0.5/a\\
**Management Services Migration to VPS Tier:**\\
$(echo "$PHASE_STATUS" | sed 's/^//')\\
\\
**Last Updated:** $(date '+%B %d, %Y')\\
" docs/SANDBOX-BRIEFING.md

echo "Sandbox briefing auto-updated with current phase status"
