build
Analyzes project code, decomposes a goal into tasks, edits code, and verifies each change via build/test
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).
Pass ``reference_dir`` to port from an existing implementation: its
module/symbol map is extracted read-only and guides the plan.
Pass ``spec_text`` when you have already written the implementation spec
(e.g. in a Claude conversation) — misterdev skips its own planning phase
and executes your spec directly, making it Claude's execution backend.
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. | |
| spec_text | No | A complete implementation spec in markdown — supply this when you have already analysed the codebase and written the spec yourself (e.g. from a Claude conversation). misterdev will skip its own analysis and spec-generation phases and go straight to decompose → execute → verify using your spec. Omit to let misterdev analyse and generate the spec from ``goal``. | |
| reference_dir | No | Absolute path to a reference implementation to port from (often in another language). Its module/symbol map is extracted READ-ONLY and given to the planner so the build reproduces the reference's design idiomatically. Omit when not porting. Example: '/Users/me/code/donor-impl'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |