BuilderIO / micro-agent

An AI agent that writes (actually useful) code for you
https://www.builder.io/blog/micro-agent
MIT License
2.61k stars 206 forks source link

Execute test command successfully first #14

Open tpaulshippy opened 3 months ago

tpaulshippy commented 3 months ago

Should the tool execute the test command first before generating anything new, to ensure that it is passing? I tried it on a fresh app and the test command failed for structural reasons so the retries were wasteful.

steve8708 commented 3 months ago

ah yes this is a great idea, would make a great contribution

this happened to me once before, it looped endlessly not realizing the command itself was just broken

tpaulshippy commented 2 months ago

Thought of a different (better?) solution to the same root problem. What if, after the first test failure in interactive mode, the user was given options like this?

  1. Continue to retry implementation generation to maximum (current behavior)
  2. Modify the test command.
  3. Go back to iterating on the test generation.
  4. Retry implementation generation up to X times (option 1 but you can specify the maximum).

Probably could combine options 1 and 4.

Could go back to these options after the max is hit also.