<!-- TokenOS docs · Building apps · Markdown mirror of https://tokenos.ai/docs/iterate · HTML: https://tokenos.ai/docs/iterate · index: https://tokenos.ai/llms.txt -->

# Iterate & review changes

Once a project exists, the prompt bar becomes an **Update** chat about that codebase. Changes are applied to the preview immediately — Cursor-style apply-then-review — and every hunk can be accepted, rejected or undone.

### The Update chat

- Each turn costs **10 credits at the 3.4x reference, scaled by the model multiplier** (12 on Claude Fable 5.1, 5 on GPT-5.4 Mini) and is refunded automatically if the model call fails.
- The model receives the full project file tree, the previous transcript and the Web3 runtime contract, and must return complete files — no partial snippets.
- The transcript persists across reloads: `GET /api/iterate-build/{project_id}/history`.
- Prefix prompts with MODIFY / ADD / ENHANCE / FIX and name the page or file — see [Writing good prompts](https://tokenos.ai/docs/prompting).

**POST /api/iterate-build (wallet-signed)**

```json
{
  "project_id": "fae5e70e-…",
  "message": "MODIFY: show USD and token amounts side by side on the Overview cards",
  "user_wallet": "<wallet>",
  "model": "claude-fable-5-1",
  "reasoning_effort": "auto",
  "wallet_signature": "…", "wallet_nonce": "…", "wallet_timestamp": 1760000000
}
// → { "success": true, "changed_files": ["src/pages/Overview.jsx"], "previous_files": { "src/pages/Overview.jsx": "…" }, "preview_url": "…" }
```

### Inline diff review

After an update, the centre pane shows the **Review changes** pill. Open it to see each changed file as a list of hunks.

| Control | Effect |
| --- | --- |
| Accept / Reject / Undo (hunk) | Keep the hunk, revert it, or undo your last decision on it. Rejections are resolved client-side against previous_files. |
| Accept file / Revert file | Decide the whole file at once. |
| Accept all | Close the review with every change kept. |
| Close | Back to the editor; undecided hunks stay applied. |

Rejected content is written back through `POST /api/iterate-build/write-files`, which is wallet-signed and owner-bound, so nobody else can write into your project.

### Design Mode

Press `⌘/` (or the toggle above the preview). Hover highlights elements; click one and describe the change. The IDE composes a scoped prompt that names the component and the selector, then runs a normal Update turn. Messages between the preview and the IDE are checked to come from the preview iframe only.

### Sessions rail

The explorer's **Sessions** rail lists your long-running work: harness sprints, Best-of-N runs and Autopilot runs, with status pills, polled every 20 seconds from `GET /api/runs` and `GET /api/autopilots`. It asks for one wallet sign-in (a 30-minute session) and shows an *Approvals waiting* shortcut when an Autopilot is paused on you.

> **Note — Changelog**
> **Publish Changelog** in the toolbar turns the iteration history into a public, shareable changelog entry for the project (10 credits, refunded on failure).

---

*Building apps · TokenOS documentation. Canonical page: https://tokenos.ai/docs/iterate. All docs as Markdown: https://tokenos.ai/llms.txt. Payments on TokenOS are for metered usage only; nothing on this page is investment advice or a promise of income.*
