Running a branch review

Updated Jul 27, 2026

Dakar reviews only commits that have not already been recorded for the current branch. From the repository root, the preferred command is:

dakar-review --repo-root "$PWD" --base origin/main

The CLI runs the installed Dakar workflow and passes the reviewed checkout as repoRoot, which is required because ODW normally gives agents copied workspaces without .git.

Before invoking ODW, the CLI resolves configuration and prepares the review range itself, host-side, with no model calls: it calls scripts/review-state.mjs prepare in-process and passes the result as the workflow's prepared argument. If nothing is unreviewed, the CLI prints the skip result and exits without invoking ODW at all. The equivalent direct ODW invocation therefore also needs a prepared object built the same way; it is shown here for illustration only, and dakar-review is the supported path:

odw run workflows/dakar-review.js --source . --wait --timeout 3600 \
  --args '{"config":"examples/df12-code-review.yaml","base":"origin/main",
           "repoRoot":"/path/to/dakar","prepared":{"...":"see prepare output"}}'

workflows/dakar-review.js is a pre-generated runtime artefact included with Dakar. Running the CLI or invoking that file directly does not require TypeScript, esbuild, or a contributor build step.

Set OPENAI_API_KEY before running a live review. The default deterministic-flex-v1 route dispatches finder and audit calls through the pi coding agent (@earendil-works/pi-coding-agent) with Dakar's own adapters/pi/ extension and provider catalogue; pi must be installed and on PATH. The CLI sets PI_CODING_AGENT_DIR to point pi at that catalogue and warns on stderr, without failing, if OPENAI_API_KEY is unset. ADR 002's staged-cutover guideline for this default was superseded by a recorded operator decision (see roadmap task 7.5.3).

The config argument points at the CodeRabbit YAML file whose review tone, path instructions, and pre-merge checks should guide the review. The base argument is the branch or ref used to compute the merge base when there is no previous review history. The repoRoot argument points at the real git checkout being reviewed.