build
Autonomously analyze a project, decompose a plain-English goal into tasks, edit code, and verify each change through build/test/lint/typecheck gates, reverting regressions. Preview with dry_run, cap cost with budget.
Instructions
Autonomously plan AND execute a goal in a project, from scratch.
Use when: you have a goal but no existing task plan — ``build`` analyzes the
project, decomposes ``goal`` into tasks, edits the code, and verifies each
change through build/test/lint/typecheck gates, reverting anything that
regresses. Do NOT use when: a task plan already exists and you just want to
execute it (use ``run``), or the working tree is dirty (commit/stash first).
Related: ``run`` (execute an existing plan), ``status`` (inspect tasks).
DESTRUCTIVE side effects: edits files and makes git commits, and calls an
external LLM provider (open-world, non-idempotent). It refuses to run on a
dirty working tree. ``dry_run=True`` previews without changing anything;
``budget`` caps spend; ``max_tasks`` caps scope.
Returns a compact text report: what was done, per-gate results, and cost.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | Plain-English description of what to build, or a mode word: 'debug' (fix what's broken), 'complete' (finish unfinished work), or 'review'. Example: 'add rate limiting to the public API'. | |
| path | Yes | Absolute path to the project directory to build (containing project.yaml). Its git working tree must be clean. Example: '/Users/me/code/my-api'. | |
| budget | No | Maximum US dollars to spend on this run. Must be > 0; the run halts when reached. Example: 5.0. | |
| dry_run | No | When true, plan and preview the tasks without editing any code or spending beyond planning. Example: true. | |
| parallel | No | When true, run independent tasks concurrently in isolated git worktrees. Example: false. | |
| max_tasks | No | Cap how many tasks are planned/executed (bounds cost and scope). Must be >= 1; omit for no cap. Example: 5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |