Prompt file imported from loiane/specs-driven-development-spring-angular (
.github/prompts/review.prompt.md). Copyright stays with the author.
/review
Phase: 6 — pre-commit code review
Owning agent: .github/chatmodes/spring-code-reviewer.chatmode.md
Skills used: spring-code-review-rubric, clarity-over-cleverness, spring-boot-4-conventions, spring-security-baseline, performance-optimization
Stack routing
| Changed files in diff | Agent |
|---|---|
| Java/Kotlin/POM/SQL only | spring-code-reviewer (this agent) |
Angular (.ts, .html, .scss) only |
angular-code-reviewer |
| Both | Run both reviewers; merge findings into a single 08-code-review.md |
Inspect the diff file list (git diff --name-only <base>...HEAD). If it contains only frontend files, delegate entirely to angular-code-reviewer.
Purpose
Run a structured self-review of the diff before the user commits. Produces 08-code-review.md with categorized findings.
Inputs
<feature-id>(optional). Defaults to the most recent feature.- Optional
--base <ref>(defaults toorigin/main).
Reads
git diff <base>...HEADfor changed Java/test/POM/SQL files.01-spec.md,03-design.md,07-validation-report.md..github/skills/spring-code-review-rubric/SKILL.md(the rubric is authoritative).
Writes
.specs/<feature-id>/08-code-review.md.
Process
- Refuse if
07-validation-report.mdverdict is notPASS. - Walk every changed file. For each, evaluate against the rubric categories: correctness, security, design, testing, observability, performance, clarity, conventions.
- Classify findings as
must-fix,should-fix,nit, orpraise. Include file + line range + suggested change formust-fixandshould-fix. - Cross-check: every AC mentioned in
01-spec.mdis exercised by at least one test in the diff (or already merged). - If any
must-fixexists, recommend/buildor/code-simplify. Do NOT auto-apply fixes. - Emit summary line: counts by severity + recommended next action.
Refuse if
- Validation report is missing or
FAIL. - The diff is empty.
Done when
08-code-review.md exists. If zero must-fix, the agent prints the suggested commit message and tells the user to run git commit themselves (the agent never commits).