I love Kotlin, and despite lack of tooling, I beli...
# ai
k
I love Kotlin, and despite lack of tooling, I believe it's actually one of the most potent languages when it comes to AI based development, where my claudine AI agent is writing majority of the code. Kotlin code generated by Anthropic's models is usually flawless, allowing me to generate complete Kotlin based products in the span of minutes. The fact that Kotlin is a compiled language, allows to detect problems very early, and lets LLM correct them. When working in typical TDD workflow: • I load the whole project source code into the token window. • Then I ask AI to generate a suite of comprehensive test cases for the requested feature, under my supervision, and Kotlin based DSLs are unbelievably practical in this case. • Then we proceed with implementation, which might involve thousands lines of code. With each iteration AI agent can execute the build and verify the outcome in the feedback loop. Sometimes it's going in circles. Sometimes I need to intervene. Sometimes it is forgetting some test case and removing it for no reason from the code. Working with version control during iterations is crucial. However, overall, it is order of magnitude more efficient workflow than me implementing a complete product or library myself. I wonder how are you using AI in your Kotlin projects?
😯 1
g
this is very interesting. i would love to see the commands you are using to do this. i’m not sure it would work for me because most of the codebase i work on is in a monorepo with a pretty significant number of tokens. but maybe i can load subsets when i’m working on a small slice of files
k
Example: "Clone this repository git@github.com:xemantic/claudine.git . It's your own source code. Analyze the whole code base and then add a tool which allows you to make any API call with the HTTP protocol."
Loading subsets should work as well. We had UI/UX, than DX - dev experience to make SDKs, APIs as friendly as possible for developers. And now we have AIX apparently. How to make our code bases approachable for AI. This has been my focus in the last 2 months. Total modularization is a part of it. I am finishing my own gradle plugin for ensuring conventions across atomic projects. But also what I call semantic input. Next to structured output, which is a cornerstone for building our AI agents, we need to give them an input which is neither a structure, nor chaos. In particular most of the junit assertions, designed for humans, are not worth much for LLMs.
c
@Kazik Pogoda Thanks for sharing. How does your self-built stuff compare to JetBrains AI?
k
JetBrains AI is meant as an assistant, not an autonomous agent driven by described requirements and software architecture. Now it is possible to achieve something similar to my self-built tools using Claude Desktop + model context protocol from Anthropic, in particular mcp-plugin from JetBrains. I was advising JetBrains folks how to optimize it for code-focused agentic use. I believe the new JetBrains Junie is also an agent, but I haven't tried it yet.
👍 3