
[Prototype] Node.js Coding Agent (Early 2024)
In early 2024, before Devin, Cursor Agent, Bolt.new, or Lovable were released, I created this prototype of a Node.js code generating agent.

This AI Tool Turns Node.js Task into a Pull Request
I built this agent in about 1 month during January 2024.
The project was unique in that at the time the state of the art coding systems were Github Copilot and Cursor was still very new (probably just launched). By the time I stopped work on it, the agent was able to make improvements to itself (the last few commits are from the agent).
The code is now open-sourced at https://github.com/christopherhwood/agent2.
The agent specialized in Node.js code. It specifically worked for non-typescript javascript code (I like to play on hard-mode) that used `require` syntax.
It would start by indexing the code and creating a repository summary. This was critical for understanding the existing code and played a key role in the planning process.
Then it would analyze the task and output a PRD. This helped it to think bigger than just doing the bare minimal and to consider edge cases and niceties that could surprise and bring joy to a user.
Then it would take the PRD and repo summary and put together a technical design document. This was the concrete plan for how to actually build the code and was referred to throughout the coding process.
It also created a coding style guide for your repository by examining how you do things - learning important context like do you use Express or Koa, how much do you comment things, how do you name variables, etc. This makes the generated code look similar to your own.
Then finally it would build the code and try to run it, fixing problems iteratively until the task was complete.
It’s accessible through an HTTP REST API and builds and runs code in a docker container. You can see an example of interacting with the agent in the video above, I never built a frontend for it so I preferred to interact with it through Postman.