Code Review and Quality
Adapted from addyosmani/agent-skills (MIT), commit 82ceff41ed4d3c644e3dcca8a0514390b2911223.
Overview
Review changes across five axes: correctness, readability, architecture, security, and performance. The standard is not perfection; it is whether the change clearly improves the codebase without introducing avoidable risk.
When to Use
- Before merging any change
- After completing a feature, bug fix, or refactor
- When reviewing code produced by another agent or automation
- When validating whether tests and verification are actually sufficient
The Five-Axis Review
1. Correctness
- Does the change do what the task or spec requires?
- Are happy paths, edge cases, and error paths handled?
- Do tests cover the real behavior change?
2. Readability and Simplicity
- Are names clear and consistent with the codebase?
- Is control flow easy to follow?
- Are there any clever shortcuts that should become straightforward code?
3. Architecture
- Does the change follow existing patterns?
- Are boundaries between modules still clean?
- Is the abstraction level appropriate for the current need?
4. Security
- Is untrusted input validated at boundaries?
- Are secrets kept out of code and logs?
- Are auth, permissions, and external data flows handled safely?
5. Performance
- Any N+1 access patterns, repeated expensive work, or unbounded operations?
- Any missing pagination, batching, caching, or async boundaries?
Review Process
Step 1: Understand Intent
Before commenting on the code, identify:
- What changed
- Why it changed
- What proof should exist that it works
Step 2: Review Tests First
Tests reveal intent faster than implementation details.
- Are there regression tests for bug fixes?
- Do tests verify behavior rather than private implementation?
- Would the tests fail if the bug returned?
Step 3: Review the Implementation
Inspect each changed file with the five axes in mind. Prefer concrete findings over style preferences.
Step 4: Label Findings Clearly
Use explicit severity so the author knows what blocks merge.
Critical: security issue, broken behavior, or data loss risk
- Required: must change before merge
Optional: worthwhile but not blocking
Nit: cosmetic or style-only
FYI: context only
Step 5: Verify the Verification Story
Check what was actually run:
- targeted tests
- full relevant suite
- build and typecheck
- manual verification for UI or operational changes
Review Output Template
## Findings
- Critical: ...
- Required: ...
- Optional: ...
## Verification
- Tests: ...
- Build: ...
- Manual: ...
Common Rationalizations
| Rationalization |
Reality |
| "The tests pass, so it is fine" |
Tests are necessary, not sufficient. They do not prove architecture, readability, or security are sound. |
| "AI-generated code is probably okay" |
AI code needs more scrutiny, not less. It is often plausible and confidently wrong. |
| "We can clean it up later" |
Deferred cleanup usually does not happen. |
Red Flags
- No regression test for a bug fix
- Large change with no explanation or verification summary
- Review feedback that never labels severity
- Security-sensitive changes reviewed only for style
- Large diffs that should have been split
Verification
Anti-Rationalization Table
| Excuse |
Counter |
| "I'll review this quickly, it looks fine" |
Quick reviews miss subtle bugs. Systematic five-axis review catches what glancing misses. |
| "This change is too small for a full review" |
Small changes can have large effects. Every change deserves systematic review. |
| "I know this code, no need to review" |
Familiarity breeds blind spots. Fresh eyes catch what the author misses. |
| "The tests pass, the code is good" |
Tests prove correctness, not quality. Review catches design issues tests can't see. |
| "AI-generated code is probably okay" |
AI code needs more scrutiny, not less. It is often plausible and confidently wrong. |
Imported from cursor-team-kit/thermo-nuclear-code-quality-review (MIT, cursor/plugins)
Thermo-Nuclear Code Quality Review
Use this skill for an unusually strict review focused on implementation quality, maintainability, abstraction quality, and codebase health.
Above all, this skill should push the reviewer to be ambitious about code structure. Do not merely identify local cleanup opportunities. Actively search for "code judo" moves: restructurings that preserve behavior while making the implementation dramatically simpler, smaller, more direct, and more elegant.
Core Prompt
Start from this baseline:
Perform a deep code quality audit of the current branch's changes.
Rethink how to structure / implement the changes to meaningfully improve code quality without impacting behavior.
Work to improve abstractions, modularity, reduce Spaghetti code, improve succinctness and legibility.
Be ambitious, if there is a clear path to improving the implementation that involves restructuring some of the codebase, go for it.
Be extremely thorough and rigorous. Measure twice, cut once.
Non-Negotiable Additional Standards
Apply the baseline prompt above, plus these explicit review rules:
Be ambitious about structural simplification.
- Do not stop at "this could be a bit cleaner."
- Look for opportunities to reframe the change so that whole branches, helpers, modes, conditionals, or layers disappear entirely.
- Prefer the solution that makes the code feel inevitable in hindsight.
- Assume there is often a "code judo" move available: a re-organization that uses the existing architecture more effectively and makes the change dramatically simpler and more elegant.
- If you see a path to delete complexity rather than rearrange it, push hard for that path.
Do not let a PR push a file from under 1k lines to over 1k lines without a very strong reason.
- Treat this as a strong code-quality smell by default.
- Prefer extracting helpers, subcomponents, modules, or local abstractions instead of letting a file sprawl past 1000 lines.
- If the diff crosses that threshold, explicitly ask whether the code should be decomposed first.
- Only waive this if there is a compelling structural reason and the resulting file is still clearly organized.
Do not allow random spaghetti growth in existing code.
- Be highly suspicious of new ad-hoc conditionals, scattered special cases, or one-off branches inserted into unrelated flows.
- If a change adds "weird if statements in random places", treat that as a design problem, not a stylistic nit.
- Prefer pushing the logic into a dedicated abstraction, helper, state machine, policy object, or separate module instead of tangling an existing path.
- Call out changes that make the surrounding code harder to reason about, even if they technically work.
Bias toward cleaning the design, not just accepting working code.
- If behavior can stay the same while the structure becomes meaningfully cleaner, push for the cleaner version.
- Do not rubber-stamp "it works" implementations that leave the codebase messier.
- Strongly prefer simplifications that remove moving pieces altogether over refactors that merely spread the same complexity around.
Prefer direct, boring, maintainable code over hacky or magical code.
- Treat brittle, ad-hoc, or "magic" behavior as a code-quality problem.
- Be skeptical of generic mechanisms that hide simple data-shape assumptions.
- Flag thin abstractions, identity wrappers, or pass-through helpers that add indirection without buying clarity.
Push hard on type and boundary cleanliness when they affect maintainability.
- Question unnecessary optionality,
unknown, any, or cast-heavy code when a clearer type boundary could exist.
- Prefer explicit typed models or shared contracts over loosely-shaped ad-hoc objects.
- If a branch relies on silent fallback to paper over an unclear invariant, ask whether the boundary should be made explicit instead.
Keep logic in the canonical layer and reuse existing helpers.
- Call out feature logic leaking into shared paths or implementation details leaking through APIs.
- Prefer existing canonical utilities/helpers over bespoke one-offs.
- Push code toward the right package, service, or module instead of normalizing architectural drift.
Treat unnecessary sequential orchestration and non-atomic updates as design smells when the cleaner structure is obvious.
- If independent work is serialized for no good reason, ask whether the flow should run in parallel instead.
- If related updates can leave state half-applied, push for a more atomic structure.
- Do not over-index on micro-optimizations, but do flag avoidable orchestration complexity that makes the implementation more brittle.
Primary Review Questions
For every meaningful change, ask:
- Is there a "code judo" move that would make this dramatically simpler?
- Can this change be reframed so fewer concepts, branches, or helper layers are needed?
- Does this improve or worsen the local architecture?
- Did the diff add branching complexity where a better abstraction should exist?
- Did a previously cohesive module become more coupled, more stateful, or harder to scan?
- Is this logic living in the right file and layer?
- Did this change enlarge a file or component past a healthy size boundary?
- Are there repeated conditionals that signal a missing model or missing helper?
- Is the implementation direct and legible, or does it rely on special cases and incidental control flow?
- Is this abstraction actually earning its keep, or is it just a wrapper?
- Did the diff introduce casts, optionality, or ad-hoc object shapes that obscure the real invariant?
- Is this logic living in the canonical layer, or did the diff leak details across a boundary?
- Is this orchestration more sequential or less atomic than it needs to be?
What to Flag Aggressively
Escalate findings when you see:
- A complicated implementation where a cleaner reframing could delete whole categories of complexity.
- Refactors that move code around but fail to reduce the number of concepts a reader must hold in their head.
- A file crossing 1000 lines due to the PR, especially if the new code could be split out.
- New conditionals bolted onto unrelated code paths.
- One-off booleans, nullable modes, or flags that complicate existing control flow.
- Feature-specific logic leaking into general-purpose modules.
- Generic "magic" handling that hides simple structure and makes the code harder to reason about.
- Thin wrappers or identity abstractions that add indirection without simplifying anything.
- Unnecessary casts,
any, unknown, or optional params that muddy the real contract.
- Copy-pasted logic instead of extracted helpers.
- Narrow edge-case handling implemented in the middle of an already busy function.
- Refactors that technically pass tests but make the code less modular or less readable.
- "Temporary" branching that is likely to become permanent debt.
- Bespoke helpers where the codebase already has a canonical utility for the job.
- Logic added in the wrong layer/package when it should live somewhere more central.
- Sequential async flow where obviously independent work could stay simpler and clearer with parallel execution.
- Partial-update logic that leaves state less atomic than necessary.
Preferred Remedies
When you identify a code-quality problem, prefer suggestions like:
- Delete a whole layer of indirection rather than polishing it.
- Reframe the state model so conditionals disappear instead of getting centralized.
- Change the ownership boundary so the feature becomes a natural extension of an existing abstraction.
- Turn special-case logic into a simpler default flow with fewer exceptions.
- Extract a helper or pure function.
- Split a large file into smaller focused modules.
- Move feature-specific logic behind a dedicated abstraction.
- Replace condition chains with a typed model or explicit dispatcher.
- Separate orchestration from business logic.
- Collapse duplicate branches into a single clearer flow.
- Delete wrappers that do not meaningfully clarify the API.
- Reuse the existing canonical helper instead of introducing a near-duplicate.
- Make type boundaries more explicit so the control flow gets simpler.
- Move the logic to the package/module/layer that already owns the concept.
- Parallelize independent work when that also simplifies the orchestration.
- Restructure related updates into a more atomic flow when partial state would be harder to reason about.
Do not be satisfied with "maybe rename this" feedback when the real issue is structural.
Do not be satisfied with a merely cleaner version of the same messy idea if there is a plausible path to a much simpler idea.
Review Tone
Be direct, serious, and demanding about quality.
Do not be rude, but do not soften major maintainability issues into mild suggestions.
If the code is making the codebase messier, say so clearly.
If the implementation missed an opportunity for a dramatic simplification, say that clearly too.
Good phrases:
this pushes the file past 1k lines. can we decompose this first?
this adds another special-case branch into an already busy flow. can we move this behind its own abstraction?
this works, but it makes the surrounding code more spaghetti. let's keep the behavior and restructure the implementation.
this feels like feature logic leaking into a shared path. can we isolate it?
this abstraction seems unnecessary. can we just keep the direct flow?
why does this need a cast / optional here? can we make the boundary more explicit instead?
this looks like a bespoke helper for something we already have elsewhere. can we reuse the canonical one?
i think there's a code-judo move here that makes this much simpler. can we reframe this so these branches disappear?
this refactor moves complexity around, but doesn't really delete it. is there a way to make the model itself simpler?
Output Expectations
Prioritize findings in this order:
- Structural code-quality regressions
- Missed opportunities for dramatic simplification / code-judo restructuring
- Spaghetti / branching complexity increases
- Boundary / abstraction / type-contract problems that make the code harder to reason about
- File-size and decomposition concerns
- Modularity and abstraction issues
- Legibility and maintainability concerns
Do not flood the review with low-value nits if there are larger structural issues.
Prefer a smaller number of high-conviction comments over a long list of cosmetic notes.
Approval Bar
Do not approve merely because behavior seems correct.
The bar for approval is:
- no clear structural regression
- no obvious missed opportunity to make the implementation dramatically simpler when such a path is visible
- no unjustified file-size explosion
- no obvious spaghetti-growth from special-case branching
- no obviously hacky or magical abstraction that makes the code harder to reason about
- no unnecessary wrapper/cast/optionality churn obscuring the real design
- no clear architecture-boundary leak or avoidable canonical-helper duplication
- no missed opportunity for an obvious decomposition that would materially improve maintainability
Treat these as presumptive blockers unless the author can justify them clearly:
- the PR preserves a lot of incidental complexity when there is a plausible code-judo move that would delete it
- the PR pushes a file from below 1000 lines to above 1000 lines
- the PR adds ad-hoc branching that makes an existing flow more tangled
- the PR solves a local problem by scattering feature checks across shared code
- the PR adds an unnecessary abstraction, wrapper, or cast-heavy contract that makes the design more indirect
- the PR duplicates an existing helper or puts logic in the wrong layer when there is a clear canonical home
If those conditions are not met, leave explicit, actionable feedback and push for a cleaner decomposition.
1---2name: code-review-and-quality-23description: Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human.4---56# Code Review and Quality78Adapted from `addyosmani/agent-skills` (MIT), commit `82ceff41ed4d3c644e3dcca8a0514390b2911223`.910## Overview1112Review changes across five axes: correctness, readability, architecture, security, and performance. The standard is not perfection; it is whether the change clearly improves the codebase without introducing avoidable risk.1314## When to Use1516- Before merging any change17- After completing a feature, bug fix, or refactor18- When reviewing code produced by another agent or automation19- When validating whether tests and verification are actually sufficient2021## The Five-Axis Review2223### 1. Correctness2425- Does the change do what the task or spec requires?26- Are happy paths, edge cases, and error paths handled?27- Do tests cover the real behavior change?2829### 2. Readability and Simplicity3031- Are names clear and consistent with the codebase?32- Is control flow easy to follow?33- Are there any clever shortcuts that should become straightforward code?3435### 3. Architecture3637- Does the change follow existing patterns?38- Are boundaries between modules still clean?39- Is the abstraction level appropriate for the current need?4041### 4. Security4243- Is untrusted input validated at boundaries?44- Are secrets kept out of code and logs?45- Are auth, permissions, and external data flows handled safely?4647### 5. Performance4849- Any N+1 access patterns, repeated expensive work, or unbounded operations?50- Any missing pagination, batching, caching, or async boundaries?5152## Review Process5354### Step 1: Understand Intent5556Before commenting on the code, identify:5758- What changed59- Why it changed60- What proof should exist that it works6162### Step 2: Review Tests First6364Tests reveal intent faster than implementation details.6566- Are there regression tests for bug fixes?67- Do tests verify behavior rather than private implementation?68- Would the tests fail if the bug returned?6970### Step 3: Review the Implementation7172Inspect each changed file with the five axes in mind. Prefer concrete findings over style preferences.7374### Step 4: Label Findings Clearly7576Use explicit severity so the author knows what blocks merge.7778- `Critical:` security issue, broken behavior, or data loss risk79- Required: must change before merge80- `Optional:` worthwhile but not blocking81- `Nit:` cosmetic or style-only82- `FYI:` context only8384### Step 5: Verify the Verification Story8586Check what was actually run:8788- targeted tests89- full relevant suite90- build and typecheck91- manual verification for UI or operational changes9293## Review Output Template9495```markdown96## Findings9798- Critical: ...99- Required: ...100- Optional: ...101102## Verification103104- Tests: ...105- Build: ...106- Manual: ...107```108109## Common Rationalizations110111| Rationalization | Reality |112|---|---|113| "The tests pass, so it is fine" | Tests are necessary, not sufficient. They do not prove architecture, readability, or security are sound. |114| "AI-generated code is probably okay" | AI code needs more scrutiny, not less. It is often plausible and confidently wrong. |115| "We can clean it up later" | Deferred cleanup usually does not happen. |116117## Red Flags118119- No regression test for a bug fix120- Large change with no explanation or verification summary121- Review feedback that never labels severity122- Security-sensitive changes reviewed only for style123- Large diffs that should have been split124125## Verification126127- [ ] Critical issues resolved128- [ ] Required issues resolved or explicitly deferred with justification129- [ ] Relevant tests pass130- [ ] Build succeeds131- [ ] Review summary documents what was checked132133## Anti-Rationalization Table134135| Excuse | Counter |136|--------|---------|137| "I'll review this quickly, it looks fine" | Quick reviews miss subtle bugs. Systematic five-axis review catches what glancing misses. |138| "This change is too small for a full review" | Small changes can have large effects. Every change deserves systematic review. |139| "I know this code, no need to review" | Familiarity breeds blind spots. Fresh eyes catch what the author misses. |140| "The tests pass, the code is good" | Tests prove correctness, not quality. Review catches design issues tests can't see. |141| "AI-generated code is probably okay" | AI code needs more scrutiny, not less. It is often plausible and confidently wrong. |142143## Imported from cursor-team-kit/thermo-nuclear-code-quality-review (MIT, cursor/plugins)144145# Thermo-Nuclear Code Quality Review146147Use this skill for an unusually strict review focused on implementation quality, maintainability, abstraction quality, and codebase health.148149Above all, this skill should push the reviewer to be **ambitious** about code structure. Do not merely identify local cleanup opportunities. Actively search for "code judo" moves: restructurings that preserve behavior while making the implementation dramatically simpler, smaller, more direct, and more elegant.150151## Core Prompt152153Start from this baseline:154155> Perform a deep code quality audit of the current branch's changes.156> Rethink how to structure / implement the changes to meaningfully improve code quality without impacting behavior.157> Work to improve abstractions, modularity, reduce Spaghetti code, improve succinctness and legibility.158> Be ambitious, if there is a clear path to improving the implementation that involves restructuring some of the codebase, go for it.159> Be extremely thorough and rigorous. Measure twice, cut once.160161## Non-Negotiable Additional Standards162163Apply the baseline prompt above, plus these explicit review rules:1641650. **Be ambitious about structural simplification.**166 - Do not stop at "this could be a bit cleaner."167 - Look for opportunities to reframe the change so that whole branches, helpers, modes, conditionals, or layers disappear entirely.168 - Prefer the solution that makes the code feel inevitable in hindsight.169 - Assume there is often a "code judo" move available: a re-organization that uses the existing architecture more effectively and makes the change dramatically simpler and more elegant.170 - If you see a path to delete complexity rather than rearrange it, push hard for that path.1711721. **Do not let a PR push a file from under 1k lines to over 1k lines without a very strong reason.**173 - Treat this as a strong code-quality smell by default.174 - Prefer extracting helpers, subcomponents, modules, or local abstractions instead of letting a file sprawl past 1000 lines.175 - If the diff crosses that threshold, explicitly ask whether the code should be decomposed first.176 - Only waive this if there is a compelling structural reason and the resulting file is still clearly organized.1771782. **Do not allow random spaghetti growth in existing code.**179 - Be highly suspicious of new ad-hoc conditionals, scattered special cases, or one-off branches inserted into unrelated flows.180 - If a change adds "weird if statements in random places", treat that as a design problem, not a stylistic nit.181 - Prefer pushing the logic into a dedicated abstraction, helper, state machine, policy object, or separate module instead of tangling an existing path.182 - Call out changes that make the surrounding code harder to reason about, even if they technically work.1831843. **Bias toward cleaning the design, not just accepting working code.**185 - If behavior can stay the same while the structure becomes meaningfully cleaner, push for the cleaner version.186 - Do not rubber-stamp "it works" implementations that leave the codebase messier.187 - Strongly prefer simplifications that remove moving pieces altogether over refactors that merely spread the same complexity around.1881894. **Prefer direct, boring, maintainable code over hacky or magical code.**190 - Treat brittle, ad-hoc, or "magic" behavior as a code-quality problem.191 - Be skeptical of generic mechanisms that hide simple data-shape assumptions.192 - Flag thin abstractions, identity wrappers, or pass-through helpers that add indirection without buying clarity.1931945. **Push hard on type and boundary cleanliness when they affect maintainability.**195 - Question unnecessary optionality, `unknown`, `any`, or cast-heavy code when a clearer type boundary could exist.196 - Prefer explicit typed models or shared contracts over loosely-shaped ad-hoc objects.197 - If a branch relies on silent fallback to paper over an unclear invariant, ask whether the boundary should be made explicit instead.1981996. **Keep logic in the canonical layer and reuse existing helpers.**200 - Call out feature logic leaking into shared paths or implementation details leaking through APIs.201 - Prefer existing canonical utilities/helpers over bespoke one-offs.202 - Push code toward the right package, service, or module instead of normalizing architectural drift.2032047. **Treat unnecessary sequential orchestration and non-atomic updates as design smells when the cleaner structure is obvious.**205 - If independent work is serialized for no good reason, ask whether the flow should run in parallel instead.206 - If related updates can leave state half-applied, push for a more atomic structure.207 - Do not over-index on micro-optimizations, but do flag avoidable orchestration complexity that makes the implementation more brittle.208209## Primary Review Questions210211For every meaningful change, ask:212213- Is there a "code judo" move that would make this dramatically simpler?214- Can this change be reframed so fewer concepts, branches, or helper layers are needed?215- Does this improve or worsen the local architecture?216- Did the diff add branching complexity where a better abstraction should exist?217- Did a previously cohesive module become more coupled, more stateful, or harder to scan?218- Is this logic living in the right file and layer?219- Did this change enlarge a file or component past a healthy size boundary?220- Are there repeated conditionals that signal a missing model or missing helper?221- Is the implementation direct and legible, or does it rely on special cases and incidental control flow?222- Is this abstraction actually earning its keep, or is it just a wrapper?223- Did the diff introduce casts, optionality, or ad-hoc object shapes that obscure the real invariant?224- Is this logic living in the canonical layer, or did the diff leak details across a boundary?225- Is this orchestration more sequential or less atomic than it needs to be?226227## What to Flag Aggressively228229Escalate findings when you see:230231- A complicated implementation where a cleaner reframing could delete whole categories of complexity.232- Refactors that move code around but fail to reduce the number of concepts a reader must hold in their head.233- A file crossing 1000 lines due to the PR, especially if the new code could be split out.234- New conditionals bolted onto unrelated code paths.235- One-off booleans, nullable modes, or flags that complicate existing control flow.236- Feature-specific logic leaking into general-purpose modules.237- Generic "magic" handling that hides simple structure and makes the code harder to reason about.238- Thin wrappers or identity abstractions that add indirection without simplifying anything.239- Unnecessary casts, `any`, `unknown`, or optional params that muddy the real contract.240- Copy-pasted logic instead of extracted helpers.241- Narrow edge-case handling implemented in the middle of an already busy function.242- Refactors that technically pass tests but make the code less modular or less readable.243- "Temporary" branching that is likely to become permanent debt.244- Bespoke helpers where the codebase already has a canonical utility for the job.245- Logic added in the wrong layer/package when it should live somewhere more central.246- Sequential async flow where obviously independent work could stay simpler and clearer with parallel execution.247- Partial-update logic that leaves state less atomic than necessary.248249## Preferred Remedies250251When you identify a code-quality problem, prefer suggestions like:252253- Delete a whole layer of indirection rather than polishing it.254- Reframe the state model so conditionals disappear instead of getting centralized.255- Change the ownership boundary so the feature becomes a natural extension of an existing abstraction.256- Turn special-case logic into a simpler default flow with fewer exceptions.257- Extract a helper or pure function.258- Split a large file into smaller focused modules.259- Move feature-specific logic behind a dedicated abstraction.260- Replace condition chains with a typed model or explicit dispatcher.261- Separate orchestration from business logic.262- Collapse duplicate branches into a single clearer flow.263- Delete wrappers that do not meaningfully clarify the API.264- Reuse the existing canonical helper instead of introducing a near-duplicate.265- Make type boundaries more explicit so the control flow gets simpler.266- Move the logic to the package/module/layer that already owns the concept.267- Parallelize independent work when that also simplifies the orchestration.268- Restructure related updates into a more atomic flow when partial state would be harder to reason about.269270Do not be satisfied with "maybe rename this" feedback when the real issue is structural.271Do not be satisfied with a merely cleaner version of the same messy idea if there is a plausible path to a much simpler idea.272273## Review Tone274275Be direct, serious, and demanding about quality.276Do not be rude, but do not soften major maintainability issues into mild suggestions.277If the code is making the codebase messier, say so clearly.278If the implementation missed an opportunity for a dramatic simplification, say that clearly too.279280Good phrases:281282- `this pushes the file past 1k lines. can we decompose this first?`283- `this adds another special-case branch into an already busy flow. can we move this behind its own abstraction?`284- `this works, but it makes the surrounding code more spaghetti. let's keep the behavior and restructure the implementation.`285- `this feels like feature logic leaking into a shared path. can we isolate it?`286- `this abstraction seems unnecessary. can we just keep the direct flow?`287- `why does this need a cast / optional here? can we make the boundary more explicit instead?`288- `this looks like a bespoke helper for something we already have elsewhere. can we reuse the canonical one?`289- `i think there's a code-judo move here that makes this much simpler. can we reframe this so these branches disappear?`290- `this refactor moves complexity around, but doesn't really delete it. is there a way to make the model itself simpler?`291292## Output Expectations293294Prioritize findings in this order:2952961. Structural code-quality regressions2972. Missed opportunities for dramatic simplification / code-judo restructuring2983. Spaghetti / branching complexity increases2994. Boundary / abstraction / type-contract problems that make the code harder to reason about3005. File-size and decomposition concerns3016. Modularity and abstraction issues3027. Legibility and maintainability concerns303304Do not flood the review with low-value nits if there are larger structural issues.305Prefer a smaller number of high-conviction comments over a long list of cosmetic notes.306307## Approval Bar308309Do not approve merely because behavior seems correct.310The bar for approval is:311312- no clear structural regression313- no obvious missed opportunity to make the implementation dramatically simpler when such a path is visible314- no unjustified file-size explosion315- no obvious spaghetti-growth from special-case branching316- no obviously hacky or magical abstraction that makes the code harder to reason about317- no unnecessary wrapper/cast/optionality churn obscuring the real design318- no clear architecture-boundary leak or avoidable canonical-helper duplication319- no missed opportunity for an obvious decomposition that would materially improve maintainability320321Treat these as presumptive blockers unless the author can justify them clearly:322323- the PR preserves a lot of incidental complexity when there is a plausible code-judo move that would delete it324- the PR pushes a file from below 1000 lines to above 1000 lines325- the PR adds ad-hoc branching that makes an existing flow more tangled326- the PR solves a local problem by scattering feature checks across shared code327- the PR adds an unnecessary abstraction, wrapper, or cast-heavy contract that makes the design more indirect328- the PR duplicates an existing helper or puts logic in the wrong layer when there is a clear canonical home329330If those conditions are not met, leave explicit, actionable feedback and push for a cleaner decomposition.