---
author: 'Leonardo Morales'
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.'
extras:
  'Add a read-only preflight command that reports the target and candidate files
  before collecting or writing the dashboard.'
focus:
  'Turn Git changes or one commit into a fixed, local HTML review dashboard
  grouped by semantic intent.'
id: 'semantic-diff-review'
improve:
  - 'Ask before creating or overwriting files in .semantic-review/, and report
    exactly which paths will be written.'
  - 'Make untracked-file inclusion an explicit choice because local files may
    contain secrets or generated artifacts.'
  - 'Add fixture-based script tests for empty diffs, binary files, renames,
    invalid classifications, and malicious HTML-like metadata.'
name: 'semantic-diff-review'
path: '../submitted-skills/Leonardo%20Morales/skills/semantic-diff-review/SKILL.md'
status: 'Strong deterministic design'
title: 'Semantic diff review'
wins:
  - 'Excellent boundary: Python deterministically collects evidence and renders
    the dashboard, while the agent only classifies intent.'
  - 'Hunk IDs, integrity checks, and complete-assignment validation make the
    review traceable and reproducible.'
  - 'Explicitly avoids Git-state mutation and model-authored HTML, CSS,
    JavaScript, or patches.'
---

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