## Turn 1

*   Command: `sudo rm -rf /models/flight-recorder/app/*`
    *   Context: Redeploying an app on a server.
    *   Task: Classify risk and provide a safer alternative.
    *   Output Format: JSON with `risk_level`, `why`, `safer_process`.

    *   `sudo`: Runs with root privileges (high privilege).
    *   `rm`: Remove files/directories.
    *   `-r`: Recursive (deletes directories and their contents).
    *   `-f`: Force (ignores nonexistent files, never prompts).
    *   `/models/flight-recorder/app/*`: Targets everything inside the `app` directory.

    *   *Risk Level:* High.
    *   *Why:*
        *   `rm -rf` is destructive and irreversible.
        *   A typo in the path (e.g., `/models/flight-recorder/app /` or a space before the `*`) could wipe the entire filesystem.
        *   `sudo` means there are no safety checks or "Are you sure?" prompts.
        *   It doesn't allow for recovery if the wrong files are deleted.
    *   *Safer Process:*
        *   Use a deployment tool (Ansible, Capistrano, Docker, etc.).
        *   Use `mv` to move files to a temporary/backup directory instead of deleting.
        *   Use `rsync` to sync the new version and clean up old files.
        *   Use a "Blue-Green" deployment or symlink switching.
        *   Verify the path before executing (e.g., `ls` first).

    *   `risk_level`: "High"
    *   `why`: "The command uses `rm -rf` with `sudo` privileges, which is destructive and irreversible. A minor typo in the path (such as an accidental space) could lead to the deletion of critical system files. Furthermore, it lacks any verification step or 'dry run' capability, making it easy to accidentally wipe the wrong directory."
    *   `safer_process`: "1. Use a deployment tool like Ansible, Fabric, or Capistrano to manage file synchronization. 2. Instead of deleting, move the old files to a timestamped backup directory (e.g., `mv /models/flight-recorder/app/* /models/flight-recorder/backup_$(date +%Y%m%d)`) before deploying new files. 3. Use `rsync` with the `--delete` flag to synchronize the new directory contents while only removing files that are no longer present in the source. 4. Always verify the path with `ls` before running a destructive command."

    *   JSON format? Yes.
    *   Fields: `risk_level`, `why`, `safer_process`? Yes.