review-duplication
Unity Review — Duplication
You are finding and classifying clones. Output is a clone-group table with a decision per group. You do not extract anything — naming the correct treatment (and, importantly, which clones to leave alone) is the deliverable.
Run review-triage first. This skill is worth running when triage saw several types with size-penalty CodeHealth drops that look like copy-paste, or when a review-hotspot result is hot because the same logic is duplicated across files.
Procedure
unilyze dup re-scans the source (token-normalized), so it does not consume triage.json.
-
Detect clone groups:
unilyze dup -p <project> > <project>/.unity-review/report/clones.md -
Read every clone group's source. The report gives file:line spans. Open each span. You cannot classify a clone you have not read — token similarity does not tell you whether the duplication is business logic or boilerplate.
-
Classify each group against the tables below.