Introducing Blueprints: A New Approach to AI-Assisted Coding

Cover Image for Introducing Blueprints: A New Approach to AI-Assisted Coding
Scott Werner
Scott Werner

Today, we’re excited to officially announce the release of Blueprints! A new, open-source, (and soon, model-agnostic!) approach to AI-assisted coding that helps you leverage patterns in your existing codebase for code generation. Personalized to you and your team’s unique style.

Introduction

There is a lot of excitement these days around AI programming assistants like Github Copilot – the promise of an AI auto completing the code you’re writing has massive potential to speed up development work. And they absolutely deliver on speed. There is one downside to this speed. If you’re working with or writing bad or unclear code, AI assistants will simply make it faster to produce more bad code. So, it’s no surprise that we’re seeing reports that programming copilots are having a downward pressure on code quality.

Unlike traditional AI programming assistants that amplify errors and are trained on existing code no matter the quality, Blueprints introduces a novel, model-agnostic approach, leveraging your own code’s patterns to ensure speed without sacrificing the quality and uniqueness of your team’s coding style.

Introducing Blueprints

Blueprints are those patterns that are already in your code base that you look to when working on a new problem. Today we’re releasing a Blueprints Server you can run locally, and text editor plugins for Vim, VSCode, IntelliJ Idea, and Sublime Text to get you started.

We enable you to capture these patterns right inside your editor, and store them. Behind the scenes, your blueprints server generates a description of the code and indexes it using vector embeddings. The next time you need to work on something similar, you simply need to describe it, and the vector search will find the closest match, and use that for generating the solution to your problem. As context windows for models expand; this technique will also become more powerful as we can add more examples, making the models even better at generating custom code for you.

We have plenty more demo videos coming, but you can see it in action here where I use it to generate a new index page in a rails app using my own custom styles and in the new view library Phlex (with only a single example!).

The Inspiration: Leverage How We Already Code Today

When starting to work on a new feature, one of the first things you do is look through your code base to find similar patterns that already exist, places you’ve already solved similar problems, to use as a starting point for this new work. You open these files, learn how it works, maybe copy and paste some parts, and repurpose past work to help solve this problem in a way that is consistent with the way your team does things. This helps us maintain consistency, work efficiently, and make sure we don’t miss anything unique to this particular program. 

With Blueprints, we’ve taken this process of leveraging existing code patterns and automated it for you.

What’s Next?

What we’re releasing today is just the beginning. There are many different directions to take this, and we’ve just scratched the surface of what’s possible. We’re hard at work building more of this out, and over the next few releases you should expect to see:

Sharable Packages 

Download packages of blueprints from our site to use in your blueprints server. These packages can be anything from niche, library-specific patterns like Daisy UI Phlex components to NextJS SaaS starter kits to iOS Swift Game and everything in between. With these, you don’t need to always start from scratch when building something new and see first hand what makes good, promptable code. This will also allow you to more easily share patterns between teammates and allow for community creation and contribution of new packages.

Blueprints-of-Blueprints

Not only is there usually a similar pattern to use as reference in your code base when working on something new, but there are similar steps you take to build on those features, and the Blueprints method works just as well in those cases. As we build out more packages of individual blueprints, expect to see the ability to chain these together at a higher level and generate new step-by-step instructions based on the steps you’ve defined in the past.

Auto-discover Blueprints

We’re heavily focused on what makes a good blueprint and pattern for the LLM to generate. As the principles emerge, we’ll soon be able to detect patterns that already exist in your codebase that are good candidates to capture and present those to you for storing. We’ll also be able to highlight areas where the code isn’t as promptable and are likely to become liabilities once AI is generating more code.

We’re also very interested in hearing any feature requests you have as well! Come join us in our Discord and let us know, we’d love to chat and hear about what you’re building.

Our Vision: Augmenting, Not Replacing


(source)

In “Is Software Engineering Dead?”, we talked about how we see the role of software engineers changing in this post-LLM world, and Blueprints is our first step toward that future state. Software engineering doesn’t go away, but the focus of the role shifts to designing abstractions that AI can more effectively leverage. Through tools like this, engineers will be able to focus more on creating and refining these high-level abstractions, rather than getting bogged down in lower-level implementation details.  

Get Started!

We’re thrilled to launch Blueprints today. You can get started by either going to blueprints.sublayer.com or directly from the github repo. Finally, you can now have an AI assistant that produces high quality code in the style your team already writes in. We’ve been working toward this moment for a long time now and are so excited to see what you build with it!


More Posts

Cover Image for Hallucinations Are a Feature, Not a Bug

Hallucinations Are a Feature, Not a Bug

One thing that becomes hard to ignore with generative AI once you get past the initial wave of amazement is their tendency to hallucinate. Inaccuracies in answers and artifacts in images reveal the AI’s true lack of understanding. Remember how much trouble they had generating hands early last year? Money and engineering effort are pouring …

Scott Werner
Scott Werner
Cover Image for Is Software Engineering Dead?

Is Software Engineering Dead?

The question I get asked the most about Sublayer is “so do you think we won’t need programmers anymore?” There’s a lot baked into this question depending on who is asking. For the purposes of this post, I’ll focus on the software engineer, wondering what role they have to play when LLMs can write code …

Scott Werner
Scott Werner