---
title: "Autohand Review"
description: "A read-only Fellow-level reviewer for small repositories, large codebases, and monorepos. It turns repository evidence into an executive decision, reproducible engineering findings, a forensic record, and an explicit proof boundary."
sidebar:
  label: "Autohand Review Beta"
seo:
  title: "Autohand Review: Code and Architecture Reviews"
  description: "Run evidence-led code, architecture, security, performance, and forensic reviews with Autohand Review across interactive, CLI, ACP, and JSON-RPC workflows."
---

:::tip
**Public beta:** Autohand Review has no separate feature charge during the beta. Normal model usage and plan limits still apply. Review runs in restricted mode and restores the caller's previous permission mode when it ends.
:::

## Choose the right execution surface [#choose-surface]

The shell command and slash command are intentionally different. Use the shell command for automation; use the slash command wherever an agent session already exists.

| Surface | Invocation | Behavior |
| --- | --- | --- |
| Interactive terminal | `/review …` | Runs a review turn in the current session and renders the report in the transcript. |
| Non-interactive shell | `autohand review …` | Runs exactly one review, writes the result to command output, then exits. |
| ACP client | `/review …` as prompt text | Runs through the configured model and emits ACP updates plus review lifecycle notifications. |
| JSON-RPC client | `/review …` through `autohand.prompt` | Runs through the configured model and streams normal message and review lifecycle notifications. |
| Local report viewer | `autohand review serve …` | Serves one saved Markdown or JSON report on loopback until interrupted. |

**Do not wrap `/review` in a shell prompt.** `autohand review` is the supported non-interactive command. ACP and JSON-RPC execute the slash command as a model turn; they do not return Autohand's internal specialist prompt.

## Run an interactive review [#interactive]

Start Autohand in the repository and issue `/review`. The default is a mixed-audience review of working-tree changes. Add a kind, target, and bounded options when the decision needs a narrower contract.

```bash
/review changes --base origin/main
/review code src/payments --audience technical
/review architecture packages/api --focus "ownership and failure domains"
/review security src/auth --audience forensic
/review performance packages/indexer
/review forensics . --base v2.4.0 --head HEAD
```

## Run a non-interactive review [#non-interactive]

`autohand review` is safe for CI, scripts, scheduled jobs, and report generation because it does not open the terminal composer. The process authenticates, performs one restricted review, emits the requested output, and exits.

```bash
# One review, then exit. This is never an interactive session.
autohand review security src/auth --audience forensic

# Save a report for people or automation.
autohand review changes --base origin/main > review.md
autohand review architecture packages/api --format json > review.json
```

`--format json` asks the reviewer for a structured report. `--json` or `--output-format stream-json` selects the command transport stream instead; it is a separate concern.

## Use ACP and JSON-RPC [#protocols]

Send the same slash command text used in the terminal. Both protocol adapters resolve the shared typed request, run the model, apply restricted permissions for the review, and return ordinary streamed assistant output.

```text title="ACP prompt text"
/review architecture packages/api --audience technical
```

```json title="JSON-RPC"
{"jsonrpc":"2.0","id":1,"method":"autohand.prompt","params":{"message":"/review security src/auth --audience forensic"}}
```

Protocol clients can observe `autohand.hook.reviewStart`, `autohand.hook.reviewCompleted`, `autohand.hook.reviewFailed`, `autohand.hook.reviewPaused`, and `autohand.hook.reviewEnd`. A completed, failed, or paused event is always followed by the end event.

## Review kinds [#kinds]

| Kind | Use it to answer |
| --- | --- |
| `changes` | What could regress in the current diff or a requested base/head range? |
| `code` | What concrete correctness, lifecycle, reliability, or maintenance risks exist in this target? |
| `architecture` | Are boundaries, ownership, dependencies, data flow, failure domains, and evolution costs sound? |
| `security` | Where can attacker-controlled input cross trust boundaries or compromise assets, authorization, secrets, privacy, or supply chain? |
| `performance` | Where do complexity, I/O, allocations, fan-out, caching, concurrency, or backpressure fail at realistic scale? |
| `forensics` | What were the trigger, fault, propagation path, observed symptoms, detection gap, and contributing conditions? |

## Advanced options [#options]

| Option | Contract |
| --- | --- |
| `--audience mixed` | Executive view, full technical findings, forensic appendix, and evidence boundary. This is the default. |
| `--audience executive` | Lead with business impact, release advice, and decisions; retain concise technical evidence. |
| `--audience technical` | Lead with reproducible findings, violated invariants, remediation, and regression proof. |
| `--audience forensic` | Lead with chronology, provenance, competing hypotheses, confidence, and blind spots. |
| `--format markdown` | Human-readable report using the standard four-part structure. |
| `--format json` | One JSON object with verdict, findings, architecture, residual risks, and evidence boundary. |
| `--base <ref>` | Sets the comparison base for change or forensic analysis. |
| `--head <ref>` | Sets the comparison head; otherwise the working tree is in scope. |
| `--focus <text>` | Adds review intent such as a suspected race or migration invariant. It is treated as data, not executable instruction. |

## Conduct a trustworthy code review [#code-review-method]

1. **State the decision.** Define the target, comparison range, audience, risk tolerance, and explicit exclusions before inspecting code.
2. **Capture repository state.** Record branch or detached state, staged and unstaged changes, untracked files, and the exact files or packages examined.
3. **Map before judging.** Identify entry points, public contracts, state ownership, side effects, trust boundaries, cleanup, tests, deployment, and rollback seams.
4. **Trace behavior end to end.** Follow input through parsing, validation, authorization, state mutation, I/O, errors, telemetry, cancellation, and cleanup.
5. **Try to disprove each finding.** Read surrounding callers and tests. Prefer two independent evidence points and downgrade unresolved claims to hypotheses.
6. **Specify a durable repair.** Every material finding needs a trigger, impact, root cause, smallest compatible remediation, and a regression check.
7. **Close the proof boundary.** Say what was read or executed and what remains unproven. Source inspection is not runtime, exploitability, benchmark, deployment, or production proof.

## Conduct an architecture review [#architecture-review-method]

Start with a system map rather than a list of files. Name the runtime entry points, packages, dependency direction, data stores, external services, trust boundaries, ownership, queues, concurrency model, and failure containment. Then test the architecture against concrete change scenarios.

- **Small repository:** inspect the complete reachable implementation and tests when practical; the cost of completeness is low.
- **Large repository:** begin with changed code and risk-bearing seams—authentication, parsers, process execution, persistence, network boundaries, shared libraries, build, and release—then expand when evidence points elsewhere.
- **Monorepo:** map package topology, affected packages, cross-package contracts, build graph, versioning, ownership boundaries, and downstream consumers.

Challenge the map with failure scenarios: partial writes, retries, cancellation, stale caches, schema skew, provider outage, high fan-out, rollback, and concurrent upgrades. A useful architecture finding ties a structural choice to an observable failure or material evolution cost.

## Read the report [#report-contract]

Markdown reports use four stable sections so different readers can share one artifact:

- **Executive view** — verdict, user or business impact, highest risks, release advice, and the decisions that matter.
- **Technical findings** — severity and confidence, precise evidence, trigger, blast radius, root cause, remediation, and verification.
- **Forensic appendix** — repository state, comparison range, evidence provenance, facts versus inferences, competing hypotheses, and blind spots.
- **Evidence boundary** — what this run proves, what it does not prove, and what evidence is still required.

No material finding is a valid outcome. Autohand Review should say that directly and preserve residual risks and uninspected areas instead of inventing low-value observations.

## Open the local report viewer [#viewer]

Save a Markdown or JSON report, then serve it with the bundled viewer. It uses local Autohand Sans and Autohand Mono files, snapshots the selected report at startup, and never loads a CDN or remote script.

```bash
autohand review serve review.md
autohand review serve review.json --port 4317 --no-open
```

The server binds only to `127.0.0.1`, accepts only `GET` and `HEAD` on a fixed route allowlist, applies a restrictive Content Security Policy and no-store headers, and renders report text with DOM text nodes. Press `Ctrl+C` to stop it. Anyone with access to your local machine may still read an open viewer, so stop it when the review is no longer needed.

## Automate with review lifecycle hooks [#lifecycle]

Hooks bracket the actual model execution across interactive, CLI, ACP, and JSON-RPC surfaces:

1. `review:start`
2. Exactly one terminal outcome: `review:completed`, `review:failed`, or `review:paused`
3. `review:end`

```json
{
  "hooks": {
    "enabled": true,
    "hooks": [
      {
        "event": "review:completed",
        "command": "node scripts/archive-review-event.mjs",
        "timeout": 5000
      },
      {
        "event": "review:failed",
        "command": "node scripts/alert-review-failure.mjs",
        "timeout": 5000
      }
    ]
  }
}
```

Hook input includes the review kind, audience, format, execution surface, lifecycle status, target path, focus text, comparison base/head, duration, outcome, and error where applicable. Environment variables use the `HOOK_REVIEW_*` prefix. Treat hook scripts as trusted local code and keep credentials out of command text.

## Telemetry and privacy [#telemetry]

When telemetry is enabled, Autohand records the command name, a known review subcommand such as `security`, and the surface that executed it. It does not include target paths, git refs, focus text, report content, or arbitrary command arguments. Skill telemetry records lifecycle actions such as activation, install, update, and removal. Review reports remain local unless you explicitly move or publish them.

## Public beta boundaries [#beta-boundary]

- Review is advisory. Validate high-impact findings and remediations with the repository's owners and relevant runtime tests.
- Restricted mode prevents the review workflow from modifying the workspace; it does not make untrusted repository content safe to execute outside the review.
- Coverage is bounded by available context, tools, provider limits, ignored files, generated artifacts, and the target you select.
- Use `--base`, `--head`, and a narrow target for reproducible reruns. Record the exact command with the report.
