Orphaned features are different from scope creep: they are incomplete implementations that were started and abandoned. An unlinked route that handles user data is reachable by anyone who knows the URL, even if no navigation link exposes it — no access control review was ever completed because the feature was never shipped intentionally. An unqueried database table accumulates data that is never cleaned up and never audited. ISO 25010:2011 maintainability flags dead code as a direct quality defect: it increases cognitive load for future developers and creates latent risk.
Medium because orphaned routes are reachable despite appearing abandoned, creating unreviewed access surface that may handle sensitive operations without proper guards.
For each orphaned element, make an explicit keep-or-delete decision. Do not leave it in an ambiguous state.
To wire up an orphaned route, add a navigation link and verify its auth guard in src/middleware.ts:
// src/middleware.ts — ensure the orphaned route is protected
export const config = {
matcher: ['/analytics/:path*', '/dashboard/:path*']
}
To delete an orphaned route cleanly:
rm -rf src/app/analytics
# If it has an associated schema table:
npx prisma migrate dev --name drop_analytics_orphan
Also check src/components/ for defined-but-never-imported components and remove them from the component tree.
goal-alignment.scope-accuracy.no-orphaned-featuresmedium"/analytics route exists with full implementation but is not linked from navigation and has no callers. analytics_events table has no queries." Max 500 chars.src/app/ routes (add navigation links, wire up API calls) or delete it. Leaving orphaned code creates maintenance burden and can introduce security risk if the code handles sensitive operations without proper access control.