Repository navigation
Feature Code Hygiene Review
A Feature-Pages entry. This page explains the capability; it never redefines it — see Feature-Pages for the canonical/Wiki boundary statement that applies to every page in this pattern.
When a change adds or edits an issue-tracker reference in a comment, or introduces or renames a variable whose name may hide its intent, the review applies two narrow hygiene checks: an issue-tracker reference that is uninformative, redundant, or obsolete, and a variable name that hides intent where the surrounding code supports exactly one clearer name. It is not a linter — dead code, magic numbers, formatting, and style are out of scope, and lines the change did not touch are never reviewed.
Stale // fix for #75 comments and names like tmp make code harder to
maintain, but they rarely deserve a blocked merge. The feature gives them a
home that is visible to the author yet cannot hold up the Decision.
Conditional and automatic — no invocation option. Both Skills. It runs
only when the changed delta contains a tracker-reference comment or a
possibly unclear variable name, and is silent otherwise. A pattern match
(#75, PROJ-456, tmp) is only a candidate; it is reported only when
local context supports it.
One shared policy serves both adapters, so the same change gets the same
result in local-code-review and github-pr-review.
- Tracker references are kept — nothing reported — when they document an active workaround, a known limitation, a decision, an external contract, a compatibility constraint, or traceability the repository requires. They are flagged only when obsolete, redundant, or uninformative, with a concrete rewrite or "delete".
- Names are flagged only with one concrete suggested replacement. Loop indices, short names with clear local meaning, standard abbreviations, and project-convention names are never reported.
- Severity. The default is a severity-less observation (max 3, no ID, no blocking meaning, never counted toward the Decision). A P2 finding needs causal evidence of real maintainability cost. Never P0 or P1.
-
Delivery. An optional
Code hygiene observationssection before Validation; on GitHub it is review-body only — never inline, never a review event.
No tracker lookup: staleness is judged from local evidence only, so a reference that is live only in the tracker may be flagged when it should be kept — treat an observation as a prompt to check. Naming suggestions can miss domain vocabulary the change does not show.
// see #75 → observation: state the fact or delete
// retry: upstream limits 5 rps (#75) → kept, nothing reported
const tmp = user.sessionExpiry; → observation: rename to sessionExpiry
for (let i = 0; …) → not reported
Severity-and-Decision-Model · Specialist-Depth-Review · Feature-Rendered-UI-Inspection (the other severity-less observation section).
code-hygiene.md ·
usage guide docs/features/code-hygiene.md.
Start here
Use the Skills
- Local-Code-Review-Guide
- GitHub-PR-Review-Guide
- Review-Context-and-Existing-Evidence
- Severity-and-Decision-Model
-
Feature-Pages (all optional capabilities)
- Requirement coverage
- Runtime validation
- Relationship-aware context
- Dependency tree inspection
- Deployment and infrastructure
- Engineering design review
- Rendered UI inspection
- Code hygiene
- Multi-repository target
- Delta re-review
- GitHub publication
- GitHub merge enforcement
- Human-style output
- Reasoning checkpoint
- Review telemetry (design record)
How reviews work
Architecture
- Architecture-Overview
- Product: Shared-Review-Engine, Local-Code-Review-Architecture, GitHub-PR-Review-Architecture, Capabilities
- Distribution: Packaging-and-Portability
- Benchmark: Reliability-and-Benchmarks, Benchmark-Testing
Contribute
Background