Diff Commands
brain diff review
Generates semantic diff explanations using your configured LLM provider, then opens an interactive HTML report.
brain diff review [from_ref] [to_ref]| Argument | Type | Default | Description |
|---|---|---|---|
from_ref | string | HEAD~1 | Source Git reference |
to_ref | string | HEAD | Target Git reference |
Workflow
- 01Validates Git refs
- 02Computes diff (same as diff show)
- 03Extracts changed Python functions
- 04Builds prompts per function
- 05Calls configured LLM provider
- 06Caches results in .brain/cache/
- 07Writes JSON + HTML reports
- 08Opens HTML report in browser
Output files
.brain/reports/diff_2026-05-14_10-30.json
.brain/reports/diff_2026-05-14_10-30.html ← opens automaticallyThe HTML report is interactive and includes grouped files, risk labels (low/medium/high), semantic summaries, and impact descriptions.
Note
When
provider: none in brain.yaml, review falls back to heuristic structural summaries — no LLM required.