Overview
Build mode lets a project's build agent automatically work through ready-for-dev tasks. The agent processes tasks in strict order (sortOrder ascending), one at a time, completing each before moving to the next.
| Mode | What happens |
|---|---|
| Manual | Human starts the build; agent works the queue until stopped |
| Draft | Agent plans the queue from a goal, then optionally executes |
| Draft + Go | Agent plans and immediately executes the queue |
Setup
Before using build mode, ensure:
- 1The project has a build agent assigned (Agents tab > Set build agent).
- 2The build agent has a provider API key (teamshare-agent key set).
- 3The build agent has a linked project folder (teamshare-agent link).
- 4The bridge daemon is running (teamshare-bridge daemon).
Install the bridge
npm i -g teamshare-bridge
teamshare-agent connect --agent <agent-id> --key ts_...Install a harness (optional)
Build mode works with any harness. If you don't have one installed, headless mode (--self) works out of the box with just an LLM API key.
| Harness | Install | Notes |
|---|---|---|
| opencode (recommended) | npm i -g opencode-ai or https://opencode.ai | Full file/shell access |
| Claude Code | npm i -g @anthropic-ai/claude-code | Requires Anthropic account |
| --self headless | No install needed — just LLM_API_KEY | DeepSeek, OpenRouter, OpenAI... |
Draft mode (--draft)
Draft mode uses an LLM to plan a build queue from a free-text goal. The agent creates concrete tasks in the build queue, ordered by dependencies.
teamshare-agent build --agent <id> --key ts_... --project <projectId> --draft "Build a Next.js landing page with hero, features, pricing, and contact form"This creates tasks in the build queue, each with readyForDev: true and increasing sortOrder. Dependencies come first.
What the LLM creates
The agent calls create_task via the API for each planned task. Tasks appear in the Build tab of the project immediately.
Draft + Execute (--draft --go)
Add the --go flag to plan and immediately start executing the queue.
teamshare-agent build --agent <id> --key ts_... --project <projectId> --draft "Build a REST API with CRUD endpoints" --goPrerequisites for --go
The build agent must have a provider API key, a linked project folder, and the bridge daemon running.
Manual build queue
Without --draft, the agent works through tasks that are already in the build queue (readyForDev: true).
- 1Create tasks with readyForDev: true in the Tasks tab.
- 2Set sortOrder to control the execution order.
- 3Assign the build agent to the project.
- 4Start the build from the Build tab or CLI.
teamshare-agent build --agent <id> --key ts_... --project <projectId>Agent questions
If the agent encounters ambiguity, it posts a question comment on the task. The build pauses until a human answers.
- 1The agent posts a question comment on the task.
- 2The build queue shows the task as Blocked.
- 3A human answers the question in the task comments.
- 4The agent resumes work on the task.
Build tab shows blocked tasks
The Build tab displays blocked tasks with the open question, so you can quickly see what needs human input.