Skip to main content

Build: generate your code

In the Build stage, Codalio's coding agent turns your PRD and approved prototype into a real application. It writes the code, tests it against your acceptance criteria, reviews it, and pushes it to your own GitHub repository.

Before you start​

You need:

  • A Plus or Premium plan. Code generation isn't available on the Free plan or during the trial.
  • GitHub connected, with the Codalio GitHub App installed where the code should live. See Connect GitHub.
  • An approved prototype, or a project imported from GitHub, which doesn't need one.

Start the build​

There are two ways to start.

From the Build stage card

  1. On the Project Lifecycle bar, open the Build stage card.
  2. Choose where to push generated code: pick your GitHub user or an organization. Codalio creates a new repository there. Or choose Or continue in an existing repository to build into one you already have. Only repositories created by Codalio, or built on Codalio's framework, can be continued.
  3. Click Generate Code.

Codalio sets up your project. It processes your PRD, creates the repository, installs modules and pushes the first commit. This usually takes a few minutes, and a checklist shows each step.

From the Build chat

Open the Build stage and send your first message. Codalio checks your plan, prepares your workspace and starts the agent. If you choose Auto Development and the project has no repository yet, Codalio asks which GitHub organization to create it in, because Auto Development publishes your app to a new repository when it finishes.

Choose your backend​

If your organization can choose a backend, open the Advanced options tab in the Build chat before your first message and pick one:

BackendLanguage
Ruby on Rails (recommended)Ruby
LaravelPHP
NestJSTypeScript

The backend is locked once you send your first message, and the option then disappears. If you don't see it, your app uses Ruby on Rails.

The Build workspace​

Once setup finishes, the Build workspace opens. On the left is the chat. On the right are four tabs:

TabWhat it shows
Development TasksThe agent's to-do list and the progress of each stage in the current run.
App previewYour running app. See App preview.
PRD criteriaEvery acceptance criterion from your user stories, with whether it's implemented and tested.
TerminalLive logs from the current run.

Two ways to work​

The message box has two modes.

Auto Development​

Auto Development runs the full pipeline from your PRD, stage by stage. Click the stage selector (Run which stages?) to choose which stages to run:

StageWhat it does
PlanReads your PRD and writes the build plan and acceptance criteria.
UIBuilds the screens of your app. Shown when there's no prototype to bring in.
UI IntegrationBrings in your approved prototype (or your imported repository's UI) and connects it to the backend. Shown instead of UI when one exists.
DevelopBuilds the backend, runs database migrations and writes unit and integration tests.
TestRuns the test suite for every acceptance criterion.
ReviewChecks that every criterion has a passing test.
Review (Complete)A final, full compliance pass over the whole app. Off by default.

Codalio Agent​

Codalio Agent is for specific changes. Describe the new features, updates or interface changes you want, and the agent works on just that. Press Ctrl + Enter (or ⌘ + Enter on Mac) to send.

Batch your requests

Asking for several features in one message is quicker than sending them one at a time, and uses fewer credits. Codalio reads your requirements once for the whole batch.

Your PRD stays the source of truth​

Before writing code for a new request, a team of specialist agents reads your whole PRD and works out what the change means for it: the user flows, the stories, the data model. If the PRD needs updating, you'll see I've drafted the PRD changes this would need, with the sections it would change. Choose:

  • Save as a new version: keep your current PRD and save the changes as a new version.
  • Update this version: apply the changes to the current PRD.
  • Discard: build without changing the PRD.

Attachments​

Attach wireframes, screenshots or documents to guide the agent: drop them in, paste them, or pick them. Files are grouped in two ways:

  • On this product: given to the agent on every run until you remove them.
  • With this message: sent once, with the message you're writing.

While it runs​

  • The chat shows the agent's live activity: what it's thinking and the steps it's taking. When it finishes, it replies with a summary of what it changed.
  • Watch progress in Development Tasks and the Terminal.
  • Add to queue lets you line up your next request. It runs when the current one finishes.
  • Stop pipeline run stops the run. Completed work is kept, and the current stage may end early.

Pauses, errors and Resume​

If a run stops, a card in the chat explains why. Your completed stages are always saved. The main buttons are:

  • Resume: continue from where it stopped.
  • Attempt Fix: give the agent one more focused pass on the specific failure.
  • Contact us / Contact support: opens an email to the Codalio team with a Support reference already filled in.

See Troubleshooting for each message and what to do.

Push your code to GitHub​

When a run produces changes, the GitHub panel tells you they haven't been pushed yet. Click Apply Changes to GitHub to push them to your repository. When everything is pushed, you'll see All changes are saved to this repository.

Push before you deploy

Deployment uses the code in your GitHub repository. Click Apply Changes to GitHub before deploying, or your latest changes won't go live.

Run history​

Run history lists every completed run with its score, how many checks passed, and the credits and tokens it used.

When the PRD and code drift apart​

If your code changes outside Codalio (for example, a teammate pushes commits) or you switch to a different PRD version, Codalio shows PRD and code out of sync and lists what differs. Depending on the situation you can:

  • Update the PRD from the new commits, so the PRD reflects what's now in the code,
  • Apply changes to code, to build PRD changes into your app, or
  • Sync PRD and apply to code, to do both.

Each of these uses credits. Switching to an older PRD version and applying it regenerates your code. Anything built in earlier runs that isn't in that version may be changed or removed, so Codalio asks you to type the version name to confirm.

Workspaces after a break​

If you haven't worked on a project for a while, its workspace is cleaned up to save resources. When you come back, Codalio prepares it again. This takes a few minutes the first time, and your build starts automatically when it's ready.

Clearing the chat​

Clear chat deletes the Build chat history. Your generated code and repository changes are kept. You can't clear the chat while a run is in progress.