strata # Strata Review a Git change set as a browser workspace organized by Pi into understandable layers. Use it when a diff is too large or tangled to review hunk by hunk without help. [Installation](../../README.md#install) ## First review Choose the Pi model you want to use, then run `/strata` in the repository you want to review. Strata collects tracked staged and unstaged changes against `HEAD`, asks that model to organize them, then opens a local browser review. ```text /strata ``` Narrative reviews open on **Overview** with goal, intent provenance, and before/after framing. Use **Architecture** for its summary and optional rendered diagram, then **Technical** for original diff hunks and their Details explanation. Mark hunks reviewed, then leave findings or notes. Use **Ask** when you want Pi to investigate a layer or a focused hunk. Use **Send feedback to Pi** when you want the current review feedback to start a follow-up Pi turn. Strata does not edit code, approve changes, or publish feedback to a forge. ## Choose scope - `/strata` reviews tracked staged and unstaged changes against `HEAD`. - `/strata --staged` reviews staged changes only. - `/strata --base REF` reviews changes from the merge base with `REF` through `HEAD`. - `/strata --pr [number|URL]` reviews a GitHub pull request in the current checkout. - `/strata close` stops model work, closes the workspace, and removes its Pi widget. Strata needs Git and a browser. A clean repository opens an empty review without asking the model. ## Pull requests `--pr` needs authenticated `gh` access. Strata may need a checkout at the pull request head and asks before switching a clean checkout, reusing a branch, or creating a branch. It refuses unsafe checkout changes rather than stashing or force-resetting your work. Strata never publishes to GitHub. ## Review limits Strata excludes untracked, binary, and protected content from its initial Git capture. Generated explanations and diagrams are review aids, not verified analysis. Review source, findings, and model answers can contain sensitive project information. ## Keep reviewing Sending feedback clears sent findings and notes, not reviewed markers. Refresh keeps notes and uniquely unchanged hunks, including hunks whose line numbers shifted. Changed or ambiguous hunks need reviewing again; removing orphaned findings requires confirmation. An unchanged snapshot and forge context reuse the existing plan. Shift-click two endpoints on the same hunk and side to comment on an inclusive line range. With keyboard navigation, press `v`, move with `j` or `k`, then `Space c` to comment on the range. Single-line comments remain available. When another tab has newer work, Refresh preserves your local draft separately instead of overwriting it. Open **Feedback → Local draft recovery** to inspect, explicitly merge, or discard retained work. Comments from a different snapshot require manual re-anchoring; they are not guessed onto surviving hunk IDs. Browser **Close** preserves unacknowledged drafts in the Pi session before stopping the workspace, even during Ask or after failed autosaves. Reopen `/strata` in that session to recover them. ## Browser behavior The browser opens automatically by default. Set `strata.openBrowser` to `false` when you prefer to open Strata's local URL yourself. `STRATA_NO_OPEN=1` also prevents automatic browser opening for that Pi run. ## Reference ### Commands | Command | Purpose | | --- | --- | | `/strata` | Review Git changes as semantic layers in a local browser | ### Setting names | Setting | Environment | | --- | --- | | `strata.openBrowser` | `STRATA_NO_OPEN` |