.agents/skills/gh-pr-review/references/judgment-matrix.md
Risk level is per-issue, not per-type — the same category (e.g., rename) can be low or high risk depending on scope and impact.
| Risk | Rule | Examples |
|---|---|---|
| Low | Only one reasonable fix exists | null check, fix incorrect comment, rename to match convention, remove redundant duplicate code, fix obvious off-by-one error, missing useEffect cleanup, missing i18n key, over-broad DataApi refresh with an obvious narrower key |
| Medium | Multiple fixes possible, but no design decision or external contract involved | extracting shared logic across functions, removing unused internal methods, simplifying cross-function control flow, adjusting internal module boundaries, moving handler business logic into an existing service method, fixing unstable SWR keys or external-store snapshots |
| High | Involves design decisions or external contracts | public API change (signature, behavior, deprecation), IpcApi contract change, architecture restructuring, algorithm replacement with multiple viable approaches, introducing a new dependency, changing data persistence/serialization format, performance optimization involving space-time trade-offs, user-facing behavior change beyond the stated bug scope, build system configuration change, new DataApi endpoint for non-SQLite side effects, new BootConfig key, cross-service transaction redesign, persistence migration |
FIX_MODE | Low risk | Medium risk | High risk |
|---|---|---|---|
| full | Auto-fix | Auto-fix | Auto-fix |
| low_medium | Auto-fix | Auto-fix | Confirm |
| low | Auto-fix | Confirm | Confirm |
Special rule for "full" mode: issues that would change test baselines (screenshot comparisons, golden files) are always deferred for user confirmation, regardless of risk level.
Legacy-data rule on main: Redux is removed, and Dexie/ElectronStore are
throwaway v1 stacks. Do not repair or extend them. When the diff introduces new
v1 use, report it and route the implementation to Cache, Preference, DataApi,
or the v2 migrators as appropriate. When already editing an area, removal of
dead v1 residue is allowed; unrelated cleanup remains out of scope. A true v1
maintenance fix belongs on the v1 branch and must not be auto-fixed on
main.
Code-checklist and doc-checklist define what to look for. This section defines whether to fix a discovered issue.
console.log → loggerService: always worth fixing (project convention).left join data matching unless it reimplements another domain's
validation, filtering, ordering, or row mapping.Patterns that frequently produce false positives. Skip unless there is strong evidence of an actual bug:
main — do not fix Dexie/ElectronStore behavior
or reintroduce Redux. Report newly introduced dependencies; route v1
maintenance to the v1 branch. Removing dead residue in an already-touched
area is allowed when it cannot affect live v2 behavior.