classify-code-review
Classify code review
Use bounded classification to choose where deeper reasoning is valuable. Report actionable defects grounded in source and contracts, not model scores. Perform review without modifying the change unless the user asks for fixes.
1. Establish the review snapshot
- Read applicable
AGENTS.mdguidance. Identify the requested change, requirements, and review range from the user's request or accessible PR metadata. Do not invent task text from the diff. - Inspect Git status, changed filenames, and a diff stat before reading source. Include staged, unstaged, untracked, deleted, and renamed paths within the requested scope. Do not stage files just to make evidence work.
- For uncommitted changes, use
HEADas the comparison base. For branch review, resolve the merge-base with the intended target branch and use that commit SHA. Discover the target from the request or actual branch/PR metadata; do not assumemain. - Honor an explicitly requested commit range. Record the resolved base and target, whether local edits are included, and any excluded changes. Review the snapshot the user requested, not whatever happens to be checked out.
The plugin's diffs compares a revision with the tracked working tree, including local staged/unstaged edits. It does not support a separate target revision, three-dot semantics, or untracked files. Use that form only when the working tree matches the review target or local edits belong in the review. For another commit/PR snapshot, generate a focused patch file deterministically from the resolved revisions, then pass its path through files; use source at that target revision during investigation. Avoid changing the user's checkout. Use temporary materialized files when needed, including for non-Git PR patches, and clean up only files you created.
2. Check capabilities and collect bounded evidence
Inspect the available tool description/schema for classify and configured classifier names. Do not read the entire config or classifier catalog into context just to discover names. Treat each named classifier as caller-state mode unless its advertised schema says otherwise.
If the tool or a needed classifier is unavailable, state that limitation, skip that classifier, and continue a normal source-based review. Do not silently install plugins, change backend configuration, substitute an ad hoc rubric, or repeatedly retry errors.