Skip to content
Esc
↑↓navigate↵open⌘Jpreview
Start
On this page

Autohand Review

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.

Choose the right execution 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

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.

/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

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.

# 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

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.

/review architecture packages/api --audience technical
{"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

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

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

  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

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

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

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.

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

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
{
  "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

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

  • 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.

Last updated on

Was this helpful?

Send Feedback

Help us improve this documentation page. Your feedback is valuable.

We'll only contact you if we need clarification