pub fn find_project_root(pwd: &str) -> Option<String> {
    const PROJECT_MARKERS: &[&str] = &[
        ".git",
        "Cargo.toml",
        "package.json",
        "pyproject.toml",
        "go.mod",
        "Makefile",
        ".hg",
    ];
    let mut path = std::path::Path::new(pwd);
    loop {
        for marker in PROJECT_MARKERS {
            if path.join(marker).exists() {
                return Some(path.to_string_lossy().to_string());
            }
        }
        path = path.parent()?;
    }
}
