Make AI make code
… while you just tell it where and how.
- Make sure you have
OPENAI_API_KEY
in your env. - Clone,
go build
. ./aimake clean cmd/clean.go
git diff
to see the code that just went missing../aimake gen cmd/clean.go
to see it come back in some form.- (And maybe another
./aimake gen cmd/clean.go
to give the llm another stab at it.)
Yes.
- Edit prompt in some_file.
aimake generate some_file
aimake clean --all
- Not sure yet.
- Until we get to Milestone 2, it won't be possible to fully develop aimake using aimake. What I'm doing instead is using the function prompts/definitions in each file and feeding that to GH Copilot.
- PRs must contain prompts that generated the code. Human-only code edits would be cheating.
- You can pretend code changes have been fully generated using the attached prompt. I won't notice.
Do licenses make sense if the whole thing is AI-generated? And AI-regeneratable?
What happens if you AI-rewrite the existing prompts and then AI-generate fresh code based on them?
- Working
clean
- Working
generate
, at least for basic use cases
-
generate
is advanced enough to regenerate all files in this project, including ones with external dependencies (likemain.go
)
- Multi-shot
gen
(-i arg?); feeds the prompt+code N times with same or slightly modified prompts- Defaults to >=2 for more reliable
gen
?
- Defaults to >=2 for more reliable
- Support other models (anthropic, self-hosted, etc.)
- Come up with automatic evaluation of generated code
- Once automatic evaluation works, come up with automatic iterative optimization (generate code in multiple ways, automatically figure out which seems like the best one)
- Automated multi-shot if first try doesn't build/work (related to previous point)
- Automatic dependency analysis and interface extraction for
generate
- Example:
generate main.go
notices it depends on a function incmd.go
, that function declaration is extracted and injected into the prompt for generatingmain.go
- Example:
- Full codebase analysis for
generate --all
that can figure out the file generation order (starts with standalone files with no external dependencies) - Single-shot prompts:
generate --prompt
or maybe a separate command likego