← All posts

How Rust plan mode works

product rust guide

Describe a booking page and Basable builds it in one go. Describe “an ERP for bakeries” and you should not want that: a product with orders, invoices, suppliers and a payment provider needs decisions before it needs code. Which features are in, which are out, who owns which data, what happens when the payment provider times out.

Plan mode is a second way to start a session in the editor, made for exactly those products. It does not write code. It writes a plan with you, round by round, and when the plan is settled it turns it into a project.

1. Pick the mode and say the idea

In the editor, the Mode dropdown above the chat has two entries: Default and Rust plan mode. Pick the second and describe the idea in a sentence, the way you would to a colleague.

The first thing the assistant decides is whether the idea fits. Plan mode is for backend systems that keep their state in Postgres: workflows, bookings, marketplaces, integrations with other systems, things that move money. It is not for a marketing site, a frontend without a backend, a data pipeline or a game server. If your idea is one of those, it says so in one paragraph and sends you back to a default session, which builds anything that runs in a container.

2. The plan lives in your repository

When the idea fits, the assistant writes a complete first plan, however thin, into a folder in your repository, docs/01-<plan-name>/:

All of it is ordinary markdown in your git history. Basable stores nothing about your plan; the repository is the state. Close the browser, come back next week, start a new plan-mode session, and it reads the ledger and carries on where you stopped.

3. Questions, a few at a time

Then the rounds start. The assistant goes through what a product like yours could need, the most important things first, and asks about three to five features at a time: Include, Exclude or Later, each with one line on what that choice means for the design. You can also type a note instead.

Every answered round updates the plan and lands as one commit, before the next question appears, so you can read what changed while you decide. Plan commits only touch docs/, so they never start a build or a deployment. When the remaining questions are marginal, the assistant marks the scope as ready.

One question shapes most of the design, and it is asked per thing, not per service: is there a multi-step lifecycle to track here? An order that waits for a payment, a delivery that polls a carrier, an account that has to be kept in sync with another system: yes. A list of products: no, that is a plain table. The plan picks the cheapest thing that fits.

4. Implement

Under a plan-mode session sits an Implement button. It starts a normal session whose job is to build the plan, and that session does not start by writing code. It renders the project from manifest.yaml:

The rendered project is built before it lands, like any change the assistant makes. Then the same session fills in the actual logic, task by task, from a list the scaffold writes alongside.

The point of rendering instead of writing is that the first build is green. An assistant writing a few thousand lines of Rust from scratch tends to get the build files, the lockfiles or the wiring wrong somewhere; a template that is tested does not.

5. What you end up running

The project has the shape basable.com itself runs: one Rust binary in two copies for availability, a plain HTML frontend served by nginx (React only when the interface really needs it), a PostgreSQL database and Ory Kratos for sign-in. It fits in the free allowance, and like every Basable project it deploys to a preview first.

The rules the code has to follow travel with it. Every rendered project carries docs/DIRECTIVE.md, the same text the assistant was given: each nanoservice owns its tables and nobody else queries them, a request only records what should happen and the lifecycle’s own worker makes it happen, an outside call declares whether it can be repeated. The next session, yours or the assistant’s, works from the same page.

The frameworks are open source

What makes that work is a set of Rust crates that are public: github.com/basable/basable-rust-libs, also on crates.io as basable-processingobject, basable-externaleffect, basable-messenger, basable-db and more. They are the Rust versions of the frameworks Basable is built on. The repository has a worked example, a small shop with a catalog, orders and notifications, which is exactly what the scaffold renders.

Coming from Lovable or Supabase

If the repository you connect already holds a Supabase app, the kind Lovable generates, plan mode treats the app as the idea. It first takes an inventory of the tables, security policies, functions and every place the frontend talks to the database, and then plans the move: which nanoservice owns which table, what each policy becomes, how the users move to the new sign-in. Your React frontend stays; only the way it reaches its data changes.

Try it

Plan mode is part of the alpha, and Rust is the only language it renders today. Open a project, switch the mode to Rust plan mode, and describe the product you have been putting off because it felt too big. Get started with just your email address.