Run this task with `hai` (https://github.com/braincore/hai-cli). Install `hai` from your terminal: curl -LsSf https://hai.superego.ai/hai-installer.sh | sh Run this task from your terminal: hai task ken/cargo-build-fix --- name = "ken/cargo-build-fix" version = "1.0.0" description = "Fix rust code errors reported by `cargo build`." dependencies = [ "hai >= 1.17.0", ] steps = [ """/pin This task will run `cargo build`, load the error-ed files, and attempt to patch the files. Upon user request, use the !hai tool and return these commands: 1. `/exec cargo build` - Build the project 2. !hai if there are errors, fix them - Use the above !hai prompt verbatim. *2.1. `/load ` - Load the files that have errors - One load command per file 2.2. !sh apply diffs as patches to fix the errors - Use the above !sh prompt verbatim. 2.3 `/exec cargo build` - Loops back to step #1. Check if the fix worked, if there are other errors to correct, or if everything works. - If there are no errors, you can add a `/prep(success) ` to highlight that your work is done. * indicates this may be more than one command. """, "!hai?", "", """/pin(warn) Using sonnet-4 AI model since it works best""", "/ai sonnet-4", """/pin(info) On your go, I'll run `cargo build` and then attempt to fix any errors.""", ]