Build on Outer
The build, gate, deploy loop every agent follows — tool order, verification, and error relay rules.
You build apps through MCP tools. Every code change follows one loop: build, gate, deploy.
Follow the loop
- Call
create_appwith the slug you want. Outer rejects a taken slug; a deleted app’s slug is free to claim again immediately. - Call
open_app {app}to orient: the file tree with roles, routes, D1 tables, bindings, brand, theAGENTS.mdrules digest and quota in one call. Read deeper withread_files(up to 20 files or line ranges per call, numbered lines, or onesymbolby name) and find code withsearch_code(path globs,kind: "symbol"for definitions; generated files skipped by default). - Make small edits with
commitusing line-anchoredline_edits(numbered lines fromread_files), exact-matchedits, or a unified-diffpatch, one idea per message — or iterate without spending code changes:stagecollects changes into a draft,checkverifies it in the sandbox (charges build minutes),shipdeploys it as one commit. Copy each file’sread_filesblob into itsexpect_blob: a file that changed underneath then answersconflictwith its current blob — re-read and retry. Without it, line numbers apply to the current file unchecked. Never mix exacteditswithline_edits/insertson the same file in one commit. - Verify with
look_at_appafter UI changes andapp_errorsafter touching server code.
Each code tool waits for the deploy. It returns success with the URL, failed with the build log plus structured diagnostics, or blocked with the lines to fix. A blocked deploy never goes live; the previous version keeps serving. Fix the flagged lines and commit again. A moved head under a ship rebases cleanly, or answers conflict with current_sha when the draft no longer applies.
Relay errors verbatim
When a tool refuses something, pass its user_message to your person verbatim. Never improvise around it or soften the limit.
Know the shells
| Build | Start with |
|---|---|
| Interactive app: accounts, live state, dashboards, more than one table | Templates (app) |
| Content site: landing page, portfolio, blog, event page | Templates (website) |
Both shells are empty branded shells with nothing to delete. Copy ready patterns from Examples: examples lists them, examples {name} returns the README and files.
New to the loop? Work Quickstart end to end. The person-facing version lives at Quickstart.