From a8871a9575f66b109a20f1e22747ae4f61591c3e Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Mon, 15 Sep 2025 17:25:58 -0300 Subject: [PATCH] docs: update build and formatting instructions in AGENT.md --- AGENT.md | 25 ++++++++++++++++++------- Cargo.lock | 10 ++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/AGENT.md b/AGENT.md index bf38437..17aada7 100644 --- a/AGENT.md +++ b/AGENT.md @@ -56,10 +56,21 @@ ### Fix build problems -Use this plan with sequential thinking: -- Check the project using `TERM=dumb cargo check` -- Identify the cause of any errors and warnings -- If there are no errors or warnings, stop -- If there are errors are warnings, create a plan to fix errors and warnings -- Fix the files one at a time, not in parallel -- Use the `write_file` tool to output the complete version of the corrected file +1. Build the project: `TERM=dumb cargo build`. +2. If there are errors or warnings, create a new sub agent (expert rust developer) that uses the `TERM=dumb cargo build` output as input, planned using strategic thinking. + a. Read all affected files + d. Plan the fixes using strategic thinking: + - Read other files if they provide context or examples + - Look up relevant API information + - Do not downgrade versions + - Preserve functionality + - Use `TERM=dumb cargo fix` if appropriate. + - Prefer the `write_file` tool if there is evidence of double escaping + - You must generate the full file contents when using `write_file` or it will be truncated. + c. Return the list of files modified +3. If any files were modified, loop back to 1. + +### Fix formatting + +1. Format the project the project: `TERM=dumb cargo fmt` +2. Continue with the fix build problems procedure. diff --git a/Cargo.lock b/Cargo.lock index 782192b..935a5c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -649,6 +649,15 @@ dependencies = [ "dirs-sys", ] +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + [[package]] name = "dirs-sys" version = "0.5.0" @@ -1377,6 +1386,7 @@ dependencies = [ "ctor", "derive_more", "directories", + "dirs", "dns-lookup", "enum-map", "flate2",