0:00
/
0:00
Transcript

AI Programs While I Sleep using GitHub Actions (and I'm drowning in PRs)

A brief glimpse of the future of working with automated programming AIs

This week’s Works on My Machine demo video shows code generation automations we’ve set up for the Sublayer gem that run over night to have Gemini, GPT-4o, and Claude each create new Actions for our library.

We designed the Sublayer gem so that every component can be easily generated by AI and used right away. This makes it possible for us to offer AI code generation in our CLI and directly within our docs. But those two features require a person to know what they want and to ask for it. With this process we start to move into the world of anticipatory code generation, so that anything you want is already generated and available ahead of time.

If you want to see more experiments like this, subscribe to Works on My Machine for weekly demos and insights.

What It Does

There are two main GitHub Actions here that are worth paying attention to:

First, the Daily Action Suggestion, which runs every morning at 5am ET and generates 5 new ideas for useful Sublayer Actions, selects the best one, generates the code, and creates a PR.

The other is the Merged PR Related Suggestion, which runs any time one of these AI generated PRs is merged, generates 5 ideas for new Sublayer Actions related to the one that was merged, selects the best one, generates the code, and creates a PR.

Each of these runs with Gemini 2.0 Flash, GPT-4o, and Claude Sonnet 3.5 for the ideation and the code generation, meaning that each run results in 3 new PRs.

Why It Matters

To me, this offers a clear picture of what the future has in store for a lot of us. As we all get better at designing code and architecting applications that are ergonomic for AI to work with, we’re going to see things like this pop up more and more.

The problem is that using these and other techniques, AI can generate tasks faster than anyone can keep up with, which I don’t think has a good solution. We’ve tried adding AI-generated comments to help us with reviewing, but even that doesn’t help when every PR merged spawns 3 new ones to review.

Despite that, I am also drawn to the idea of letting AI somewhat loose to work in a guided direction. These models don’t get bored or tired, and their costs keep falling. We can have them speculatively run out ahead of us in different directions so that when we need something, it’s already been generated. Imagine scaling this process up to the level of features or user stories. Could we see a world where product teams don’t write stories anymore, but are presented with stories and features that are already built to select from?

How To Get It

All of the action code is available on GitHub at sublayerapp/sublayer_actions. If you’re curious to see how we built the GitHub actions and other automations everything is available under .github/workflows. You’ll also notice that we have other utilities in there as well like updating our docs on a merged PR and notifying Discord you can check out as well if you’re curious.

Getting these GitHub Actions to work is a bit finnicky, so if you’re interested in trying it out for yourself and run into any issues, I’m usually around the Sublayer Discord and happy to help debug or explain some of the things we’re doing.

Thanks for reading Works on My Machine! This post is public so feel free to share it.

Share