> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev.byterover.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Reviews

> Approve, reject, or selectively review context tree changes via CLI and web UI

When a curation operation is flagged for review, you can manage it through the CLI or the local web UI. Both interfaces operate on the same underlying review state — changes made in one are immediately reflected in the other.

## CLI commands

### List pending reviews

```bash theme={null}
brv review pending
```

This lists all pending review operations for the current project, grouped by task:

```
2 operations pending review

  Task: ddcb3dc6-d957-4a56-b9c3-d0bdc04317f3

  [UPSERT · HIGH IMPACT] - path: architecture/context/context_compression_pipeline.md
  Why:    Documenting switch to token-budget sliding window
  After:  Context compression pipeline switching from reactive-overflow to token-budget sliding window

  [UPSERT · HIGH IMPACT] - path: architecture/tools/agent_tool_registry.md
  Why:    Documenting tool registry rewrite with capability-based permissions
  After:  Agent tool registry rewrite using capability-based permissions

  To approve all:  brv review approve ddcb3dc6-d957-4a56-b9c3-d0bdc04317f3
  To reject all:   brv review reject ddcb3dc6-d957-4a56-b9c3-d0bdc04317f3
  Per file:        brv review approve/reject ddcb3dc6-... --file <path> [--file <path>]
```

Each entry shows:

* **Operation type** — DELETE, UPDATE, UPSERT, MERGE, or ADD
* **Impact level** — HIGH IMPACT operations are labeled
* **Path** — The context tree file or folder affected
* **Why** — The reason the agent curated this change
* **Before / After** — Summaries of the content before and after the change

If there are no pending reviews, the command exits cleanly with a "No pending reviews" message.

### Approve changes

Accept the curated changes and make them eligible for `brv push`:

```bash theme={null}
# Approve all operations in a task
brv review approve <taskId>
```

```
✓ Approved architecture/context/context_compression_pipeline.md
✓ Approved architecture/tools/agent_tool_registry.md

2 operations approved.
```

On approval, the backup is deleted and the current file content becomes the new baseline.

### Reject changes

Roll back the curated changes and restore the previous content from backup:

```bash theme={null}
# Reject all operations in a task
brv review reject <taskId>
```

```
✓ Rejected architecture/context/context_compression_pipeline.md (restored from backup)
✓ Rejected architecture/tools/agent_tool_registry.md (restored from backup)

2 operations rejected.
```

On rejection:

* **UPDATE / UPSERT** — The file is restored to its pre-change content.
* **DELETE** — The deleted file (or folder contents) is restored to disk.
* **MERGE** — Both the target file and the deleted source file are restored.
* **ADD** — The newly created file is removed.

### Selective review with `--file`

You don't have to approve or reject an entire task at once. Use the `--file` flag to act on specific files:

```bash theme={null}
# Approve one file, reject another
brv review approve <taskId> --file architecture/caching/caching_strategy.md
brv review reject <taskId> --file architecture/security/security_audit.md

# Multiple files in one command
brv review approve <taskId> --file auth/jwt.md --file auth/oauth.md
```

File paths are relative to the context tree root (as shown in `brv review pending` output).

### JSON output

All review commands support `--format json` for structured output:

```bash theme={null}
brv review pending --format json
brv review approve <taskId> --format json
brv review reject <taskId> --format json
```

### Disable the review log

For unattended workflows — `--detach` curates, autonomous agents, headless CI — the high-impact review prompt may be more noise than signal. You can turn the HITL review log off for the current project:

```bash theme={null}
# Show current state
brv review

# Disable for this project
brv review --disable

# Re-enable
brv review --enable
```

When the review log is disabled for a project:

* `brv curate` (sync mode) no longer prints the "*N* operations require review" prompt.
* Curate-log entries written in `--detach` mode no longer carry the per-operation review marker.
* `brv dream` no longer surfaces its own `needsReview` operations as pending reviews.
* `brv review pending` lists no new entries until the log is re-enabled.
* No review backups are written, since there is nothing to roll back from.

The setting is **project-scoped** and persists across CLI and daemon restarts. `brv review` with no flags prints the current state (also available via `--format json`).

<Note>
  Disabling the log only affects new operations. Pending reviews created before you disabled the log remain visible in `brv review pending` and can still be approved or rejected.
</Note>

### Command reference

| Command                       | Args                | Flags                               | Description                                  |
| ----------------------------- | ------------------- | ----------------------------------- | -------------------------------------------- |
| `brv review`                  | —                   | `--enable`, `--disable`, `--format` | Show or toggle the project-scoped review log |
| `brv review pending`          | —                   | `--format`                          | List all pending review operations           |
| `brv review approve <taskId>` | `taskId` (required) | `--file`, `--format`                | Approve pending operations                   |
| `brv review reject <taskId>`  | `taskId` (required) | `--file`, `--format`                | Reject and restore from backup               |

## Local web UI

<img src="https://mintcdn.com/demo-a750c123/vjrgdgOJDOMrHs6d/images/local-web-ui/changes-agent-review.png?fit=max&auto=format&n=vjrgdgOJDOMrHs6d&q=85&s=de508e45e327e804c471f3c70b8b536a" alt="Pending agent edits inline in the Changes tab" width="3282" height="2024" data-path="images/local-web-ui/changes-agent-review.png" />

Pending reviews appear inline in the [Changes tab](/local-web-ui/changes#reviewing-agent-edits) of `brv webui`, alongside your own staged and unstaged changes — there is no separate review interface. Each agent-generated file carries an op-type badge (ADD / UPDATE / UPSERT / MERGE / DELETE), an impact badge (`low impact` / `high impact`), and the agent's reason for the change.

Approve and reject map onto the buttons already in the Changes tab:

* **Stage** a pending file approves the agent's edit (and **Stage all** approves every pending file in the bucket).
* **Discard** a pending file rejects the edit and rolls it back from the backup. For an agent file, this skips the usual "discard your work?" confirmation.

The dashboard links to `http://localhost:<webui-port>/changes?project=<project>` so notifications deep-link to the right project automatically. To turn the whole flow off for a project, run `brv review --disable`.

<Tip>
  The web UI and CLI share the same review state. Approve a file in the Changes tab and reject another via `brv review reject` — both reflect immediately on the other side.
</Tip>

## Review and push

Files with pending reviews are excluded from `brv push`. You must resolve all reviews before pushing:

```bash theme={null}
# Check for pending reviews
brv review pending

# Resolve them
brv review approve <taskId>

# Now push
brv push
```

If you run `brv push` while reviews are pending, only the approved and non-reviewed files are pushed. Pending and rejected files are held back.
