---
name: semantic-diff-review
description: Create a local, fixed-layout HTML dashboard that groups Git changes or one commit by semantic intent. Use when reviewing staged, unstaged, or selected commit changes without altering Git state.
---

# semantic-diff-review

## Inputs
A repository path and exactly one target: working-tree changes or a commit revision. Confirm whether untracked files should be included.

## Workflow
1. State the target and the files that will be written under `.semantic-review/`. Ask before creating or replacing them.
2. Run the bundled collector. It alone gathers patches and assigns hunk IDs using read-only Git commands.
3. Classify every collected hunk once by behavioral purpose. Keep related implementation, tests, docs, configuration, and migrations together only when they form one reviewable change.
4. Write only the classification JSON in the documented schema; never add patch, HTML, CSS, JavaScript, or source fields.
5. Run the bundled renderer and report its validation result and dashboard path.

## Rules
- Do not stage, restore, reset, commit, check out, stash, clean, or otherwise change Git state.
- Never hand-author or modify collected patch evidence or the dashboard renderer.
- Treat untracked files as potentially sensitive; exclude them unless the user confirms their inclusion.
- If collection evidence changes, recollect and reclassify instead of patching around validation failures.

## Output
Return the reviewed target, written paths, hunk and group counts, validation result, dashboard path, and confirmation that Git state was untouched.
