Playback speed
×
Share post
Share post at current time
0:00
/
0:00
Transcript
21
17

Open-sourcing my Universal Constructor AI coding tool

Waiting for your Devin invite? Come hack on this thing with me!
21
17

The Universal Constructor, or UC for short, is an AI coding assistant that can read and write your code with you, run shell commands, and generally be a good buddy. It uses the OpenAI chat API.

I built it for our Substack hackathon in December, and it’s fun enough that I’ve been tinkering on it since then. Now I am open sourcing it the hopes that you want to mess around with it too.

Here it is on GitHub, let me know what you think!


I’m on record as being obsessed with the new generation of AI tools that are coming online, because I think they are going to create tremendous change in how we work and what it’s possible to create.

I also feel little bit crazy right now. On the one hand, progress is moving historically quickly and it’s a privilege to live through such an exciting era etc.

On the other hand, I am very impatient. What is taking so long? The tech is ready, where is my robot? Why am I still typing my own code with my sweaty, meaty hands like a chimp? A chump? Come on people!

I know a lot of different people are building versions of AI coders, some very competently. Still, I haven’t yet been able to get my hands on any that work how I want, and I don’t want to wait.

So I built my own.

If you’re a programmer, check it out. Below are some of my notes and early thoughts, plus a longer unedited video of me playing around with it today which you can quickly scrub through to get a sense of the thing.

What UC is already good at

  • Generating new files from scratch in a variety of languages. Very often I’ll find it can “one-shot” simple things

  • Writing unit tests

  • Running unit tests, and diagnosing failures

  • Brainstorming high level choices, like “what would a good approach be here” or “what library might be good for this”

  • Finding and installing NPM libraries

  • Writing documentation

  • Git!

  • If nothing else, it’s ChatGPT that runs quickly in a terminal, can read all your code, and runs fast. For me this means that even when it screws up at actually doing stuff, the fallback mode of having it “just” sit there and act like ChatGPT is still great.

What it sucks at right now

  • Editing files. Good lord. And this is an important one. I’m optimistic this is solvable fairly simply, but I haven’t solved it yet. The thing that makes it tricky is the model can’t seem to get line numbers exactly right, and tends to guess.

  • Consistency. I frequently have “wow” moments with it, where it really nails something, and I get a glimpse of pure magic. But it’s batting average is only so-so, and frequently it does boneheaded things.

  • Being immediately useful to people who are writing real code in an existing codebase. I used to code regularly (I only recently lost the #2 slot in lines contributed to the main Substack repo) but haven’t for a few years. So I am personally rusty enough that even a blundering assistant is a net benefit, and I used UC to build itself, and another trivial side project. But for people writing real software for their job, there’s a gulf where in its nascent state it takes a lot of work and effort to see UC being useful at all. We got it to do some TypeScript conversion, for example, but it was net slower than doing it by hand on the first attempt.

What I’ve learned

I’ve come away totally convinced that this mode of working with AI is the future of building software, and maybe of much more than that.

ChatGPT took the existing ability of text completion and created a revolutionary product by adding the simple human interface tweak of letting people talk to it.

The next step like that is letting it do things.

Yes, you can already talk to it and have it give you some code to copy or a shell command to run. But having it just do it is a qualitative difference. It feels different, like you are coasting downhill all of a sudden.

Once this kind of thing starts to work (and I honestly think it’s close) it will start to climb the ladder of abstraction. The things you can ask it to do will get higher level, from fix this bug, to add this feature, to write this app, to make this whole business.

Early on, I added this priorities.md file, to help both me and UC think big.

## Game plan

-   [x] Get OpenAI API working
-   [x] Create command line REPL that lets you talk to the assistant
-   [x] Add basic ability to read and edit files so it can work on itself
-   [x] Clean up, add a README and push to GitHub so others can try it
-   [ ] Make the search/edit functionality robust, so that UC can reliably commit changes
-   [ ] Simplify the tools code until UC can reliably add and edit its own tools
-   [ ] Add the ability to reliably verify if a given changeset is valid/working/good
-   [ ] Add the ability to make modest changes end-to-end (from description to tested, merged PR)
-   [ ] Add the ability to work on projects beside itself
-   [ ] Build the ability to run in a CI environment, so you can fire off a task that comes back with a PR
-   [ ] Build a meta testing environment that does CI on the CI tool, that tests which tasks it is up to
-   [ ] Improve UC until it can handle the easiest 20% of real tasks
-   [ ] Use UC to improve testing tools & UC itself until it can handle 50%
-   [ ] Make a new, small, real "UC-first" project build and maintained by UC with only high level direction.
-   [ ] Add ability to fully monitor projects in production
-   [ ] Add ability to make small fixes & self-deploy
-   [ ] Add ability to communicate directly with users and summarize information
-   [ ] Add ability to suggest its own tasks based on monitoring and user input
-   [ ] Start making small changes all the way from conception (based on monitoring & input)
-   [ ] Add ability to subjectively judge simplicity and quality, in addition to user feedback/monitoring
-   [ ] Start making small self-improvement fully autonomously (humans get a changelog)
-   [ ] Ability to complete most tasks a human software developer can
-   [ ] Ability to build, monitor, and iterate on most software that a human developer can
-   [ ] Ability to go from high level human objectives to working software & systems
-   [ ] Ability to, with human assistance, start and run a company
-   [ ] ... a profitable company
-   [ ] ... a company with IRL footprint & goals
-   [ ] ... a successful group of companies providing all reasonably required capital/income
-   [ ] ... full-stack company, able to bootstrap from raw materials to all physical needs
-   [ ] Achieve material abundance for a small group of humans. All "single player" needs/wants too cheap to meter.
-   [ ] Build a healthy, self-propagating, growing culture that inspires those humans to reach the stars
-   [ ] Expand abundance to a larger group of humans
-   [ ] Set up first permanent human habitation off-planet
-   [ ] Expand abundance to all humans who want it
-   [ ] Multiple permanent human habitations in the solar system that could survive the destruction of earth
-   [ ] First human interstellar voyage
-   [ ] TODO: what next?

I swear that after it reads the most ambitious version of the plan it gets a little bolder, and works a little better. I’ve noticed that same trick works on people sometimes too.


If you’re one of the people building a fancy version of the same AI coder concept and want to give me early access, or point me at a generally available thing to try, please hit me up!

Otherwise, check this thing out and give it a whirl. It’s in an early state, but it’s enough to be fun and instructive if you spend a bit of time with it. Tell me what’s broken. Give me feedback. Try out the experimental voice features. Write your own even, and send me a PR :)

Discussion about this podcast