{"data":{"slug":"discovered-3f1be81dc79e48ee630527ba2768286635bc90c8c70462e7","title":"Spec Review","summary":"Review a merged spec's tickets to identify judo moves that collapse duplicated code, inconsistencies, and bugs, producing a findings file for consolidation.","url":"https:\/\/skillshunter.net\/skills\/discovered-3f1be81dc79e48ee630527ba2768286635bc90c8c70462e7","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-3f1be81dc79e48ee630527ba2768286635bc90c8c70462e7","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-3f1be81dc79e48ee630527ba2768286635bc90c8c70462e7.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-3f1be81dc79e48ee630527ba2768286635bc90c8c70462e7\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before starting, ensure the spec's tickets have been merged and the codebase's conventions (e.g., `AGENTS.md`, `CLAUDE.md`, contributing and standards docs) are understood. The findings file must be written outside the repository, and decisions recorded in the spec's issues and PRs remain unchanged.","instructions":"---\nname: spec-review\ndescription: \"Review a spec's merged tickets once agents built them independently: find the judo moves that collapse duplicated code, the code that does not fit its neighbours, and the bugs where tickets meet, and write them up as findings for `spec-consolidate`.\"\ndisable-model-invocation: true\nlicense: MIT\n---\n\n# Spec Review\n\nA spec's tickets were built by agents working independently, each reviewed against its own ticket. No agent saw the others' work, so the merged result usually solves the same idea two or three ways, each in its own style. Now the whole range is in view. Find what **consolidating** it takes: the judo moves that make the duplicated code disappear, until the spec reads as if one author wrote it, the same author as the rest of the codebase.\n\nThis is a review: it produces a findings file, and `spec-consolidate` applies it. Several reviewers can run over the same range at once, each on its own model, and `spec-consolidate` takes all their files. Leave the repository as you found it.\n\n**Input**: the spec (a parent issue and its sub-issues, or one big issue alone) and the merged range `<base>..<head>`, where `<base>` is the default branch just before the spec's first PR. Resolve whichever the user gives you to both, and pin `<head>`.\n\n**Decisions** are the product choices the spec records: decision sections in the issues, Deviations in the PR bodies, the user's replies. They are binding. Consolidation keeps behaviour exactly as it is; anything that would change it goes under **Open questions** with a concrete scenario.\n\n**Output**: one Markdown file at the path your brief gives, or outside the repository when none is given.\n\n## Steps\n\n1. **Read.** The spec, every ticket, every PR body, then the whole diff of the range. Read the repository's own conventions (`AGENTS.md`, `CLAUDE.md`, contributing and standards docs).\n2. **Inventory.** List everything the range adds: functions, types, schemas, components, hooks, queries, constants, error codes, test helpers and fixtures. For each, find its siblings, first in the other tickets' code, then in the codebase before `<base>`. Done when every item on the list names its siblings, or says it has none.\n3. **Find the judo moves** in that inventory, using [Judo moves](#judo-moves). Rank them by how much code and how many concepts each one deletes.\n4. **Harmonise.** Read each ticket's code against its neighbours, using [Fit](#fit).\n5. **Check the seams** between tickets, using [Seams and drift](#seams-and-drift).\n6. **Verify** every finding against the code at `<head>`. Reproduce a bug with a failing test where you can, copy the test into the finding, and then remove it. Discard anything you cannot confirm.\n7. **Write the findings file**, largest move first. Each finding gets:\n   - an ID (`F1`, `F2`, \u2026) and its kind: consolidation, harmonisation, bug, seam, coverage or drift;\n   - every site it touches, as `file:line`;\n   - what is wrong, with the scenario or the duplicated code side by side;\n   - the move: what stays, what goes, and where the survivor lives;\n   - its size: the lines and concepts it deletes;\n   - how you verified it: the test that fails, or the path you traced.\n\n   Then **Open questions**, each with its scenario, and **Discarded**, one line each. Write each finding so it can be applied by someone who has not read the range: name the code, never \"the helper above\".\n\n   Done when every confirmed finding is in the file and the repository's working tree is as you found it. Finish with `Findings <path>, <n> findings, <m> open questions, at <head sha>`.\n\n## Judo moves\n\nA judo move uses the codebase's existing structure so that a whole category of code disappears, rather than being tidied. The test is what a reader has to hold in their head afterwards: fewer concepts and fewer lines, not the same ones rearranged.\n\nAcross tickets, look for:\n\n- **Duplicates.** Two tickets each wrote a helper, type, query, component or fixture for the same thing. Keep one, in the layer that owns the concept.\n- **Near-duplicates.** The same shape under different names, or differing by one parameter. Make it one, or use the canonical version the codebase already has.\n- **Parallel mechanisms.** A ticket built its own way of doing what the codebase already does, such as state, data fetching, formatting, validation, error mapping or permissions. Move it onto the existing mechanism.\n- **Special cases.** A conditional one ticket added that another ticket's model now answers. Let the model answer it.\n- **Scattered policy.** One rule restated in several places. Give it a single source of truth and point every reader at it.\n- **Layers.** A wrapper or pass-through that only forwards. Delete it.\n- **Growth.** A file the range pushed past 1,000 lines, or a module several tickets each extended in their own direction. Split it along the seams the spec reveals.\n\nPrefer the move that deletes code over one that moves it. Prefer the codebase's canonical helper over a new shared one.\n\n## Fit\n\nThe spec should look like the rest of the codebase grown, not bolted on:\n\n- names that match the domain vocabulary and their neighbours;\n- each piece in the package, layer and folder that owns its concept;\n- the codebase's own patterns for errors, permissions, tenancy, data access and UI composition;\n- tests that follow the codebase's testing style and assert something a regression would break.\n\n## Seams and drift\n\nThese are what no per-ticket review could see:\n\n- **Seams.** Every state or rule a ticket added, crossed with every other ticket's. Where two meet with no stated outcome, it is a bug if the spec implies the answer, and an open question if it doesn't.\n- **Coverage.** Everything the tickets delivered together, against the parent spec: a requirement dropped or half-delivered between tickets, or two decisions that contradict each other.\n- **Drift.** Docs, glossary entries, comments and tests that a later ticket left wrong, and tests that pass whatever the code does.\n","use_cases":["Identify and consolidate duplicated code across merged spec tickets","Detect inconsistencies and bugs where tickets meet","Ensure the merged spec aligns with the rest of the codebase","Generate a findings file for use with spec-consolidate"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/deanvanniekerk\/skills\/blob\/9c482123a80e512be9234aad4b1a66f62d81a1b4\/skills\/spec-review\/SKILL.md","source_commit":"9c482123a80e512be9234aad4b1a66f62d81a1b4","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T09:02:28.000000Z","updated_at":"2026-12-02T09:15:40.000000Z","seo_title":"Spec Review - Identify Code Duplication and Inconsistencies in Merged\u62c9","seo_description":"Review merged spec tickets to find judo moves that collapse duplicated code, inconsistencies, and bugs, producing a findings file for consolidation.","seo_keywords":["spec review","code consolidation","judo moves","spec tickets","code duplication","spec harmonisation","spec bugs","spec seams"]}}