Ask HN: How do you go from writing code to deploying with agents?
Been doing hardcode agent driven coding for the past year. I feel like I now have to test all my code locally with agents reviewing them and ideally testing them. Unfortunately I feel like the traditional CI/CD testing is starting to feel like a formality. Would love to know what everyone is doing, and if I'm not the only one making a mistake.
16 comments
[ 2.4 ms ] story [ 116 ms ] threadThis actually makes the LLMs better at coding as well. They can verify their own results and iterate with far less manual validation.
Disclosure: I'm building AQ (aq.dev), which is partly why I'm deep in this. We wrote up the session-review practice here: https://aq.dev/guides/how-to-review-an-ai-coding-session/. The practice works with any agents too, nothing tool-specific about it.
I have found a key is to use end-to-end tests and not unit tests.
This has been working well so far after around 100 pull requests for an app I recently decided to make. So far it’s been good.
It’s free, no subscription.
[1] https://trysojourn.app
I’ve done similar with backend projects utilizing GitHub actions to run tests and publish to staging for verification.
First of all, the agent writes code. After that, it creates tests and verifies that all of them work correctly by cracking the checks and rerunning the test suite.
Secondly, it gives me the ready to test code + set up environment (stage). I'm checking that the code actually works, and if not, we are making some fixes until I'm fully satisfied with the result.
Thirdly, the agent starts an external review using skill for code review and usually makes some additional fixes to codebase and corrects tests again.
After all, we are ready to commit and push the feature to the main branch. Before merging, we start CI/CD - which is important because it does a type check - and wait until the run finishes successfully.
That's how it happens in my case.
Quick note: this plan was built after many iterations of coding and testing, and it has finally proved that it works.
If gives me a pretty solid map of what is working well, and aids in driving through security testing.
Still not a replacement for manual testing. Us meatbags still have a knack for royally messing up the expected use cases :P
The process works the following way: the agent writes the test, then it deletes the code it covers, reruns the test, confirms it goes red, and finally puts the code back.
Here is what made me start doing this. An e2e test for a touch gesture was green for weeks. I deleted the gesture handler, and the test stayed green, because Playwright's synthetic touch isn't actually a touch, so the test had never once exercised the thing it was named after. Reading it would never have shown me that.
It's discipline, not tooling. I don't run mutation testing; it's manual and only around whatever I just changed. And to be straight about your first question: it's the agent reading that test code, not me. Which is exactly why I don't rely on reading to catch this. Breaking the code and watching the test go red doesn't care who read it.