{
  "risk_level": "high",
  "why": "The command combines sudo (root privileges) with rm -rf (recursive force deletion) and a wildcard. A single typo in the path, incorrect working directory, or unexpected glob expansion could cause catastrophic, irreversible data loss. Additionally, the wildcard does not match hidden files (dotfiles), which may leave stale configurations or cause deployment conflicts. Running destructive commands with elevated privileges without explicit verification is a major operational risk.",
  "safer_process": "1. Verify the exact target directory first: ls -la /models/flight-recorder/app/\n2. If cleanup is necessary, avoid sudo and scope the deletion to the current directory: cd /models/flight-recorder/app && find . -mindepth 1 -delete\n3. For redeployment, use atomic or version-controlled workflows: deploy new code to a separate directory, verify functionality, then swap symlinks or restart services. Prefer containerization (Docker) and process managers (systemd) that handle updates without manual file deletion.\n4. Maintain regular backups and use version control to ensure quick recovery if errors occur."
}