AgentCoding
Agent coding is the use of AI agents in coding. I have a fairly negative experience with most of them. The greatest success I've had is using Jetbrains' Junie with Claude; I used it to clean up my utility monorepo, particularly in cleaning up linter errors.
However, I find that the code it generates is of dubious quality. It often works, but it's convoluted, and often duplicated.
Tips
This is a rehashing of How to control Junie's usage & quota limits, I found it generally useful.
- Use the Default AI model for Junie. According to our benchmarks, this model provides the best quality and it's considerably cheaper than alternatives. NB I found Claude works better for me, not ChatGPT (the default).
- Break large tasks into smaller ones: Smaller and concrete tasks normally take fewer tokens because Junie requires less context exploration, fewer requests to LLMs.
- Use follow-ups and "Think more" wisely: Follow-ups and improvements, as well as the "Think more" option with Junie may take more tokens. To minimize this, be sure to create clear instructions for Junie from the beginning and add them to the guidelines.
- Use Junie and AI Assistant in the same project but for different tasks: We designed Ask mode in Junie to collaborate better with the agent, e.g. brainstorm new features or ask for potential solutions. Agent consumes more quota than AI Assistant, so if you have a simple question related to your project which doesn't require working with the agent, use AI Assistant instead.
- Keep your guidelines file concise: f you use a guidelines file
(
.junie/guidelines.md), keep it short and clean to reduce quota usage. While 50 lines vs 100 lines won't make much difference, 100 vs 1000 will.
Goofs
- While writing documentation on a command that returns base64 output, I used the bytes 01:02:CA:FE as example input. It tried to complete the base64 output, but provided the output for base64("Hello World").