CRITICAL: The compliance checker MUST NOT use heuristics to determine which pages should be checked. Heuristics indicate poor design and make the system unpredictable.
All pages are checked for compliance by default. Only pages that explicitly handle browser routing errors are excluded from LOW PRIORITY checks.
The compliance checker maintains an explicit list of pages that handle browser routing errors:
const ROUTING_ERROR_PAGES = [
'NotFound', // 404 error page
'DashboardRedirect' // Redirect utility page
];These pages handle browser routing errors and should not be flagged for optional service integrations because:
- NotFound - The 404 error page handles invalid routes and should remain simple
- DashboardRedirect - A simple redirect utility that forwards users to the correct page
- PageLayout wrapper
- Unique pageName prop
- Framework hooks usage
- No manual ContextualHelpMascot imports
- No custom headers
- No nested layouts
- Profile creation compliance
These checks apply to ALL pages without exception.
- User access integration
- Background styling
- Staging ground integration (for asset editors)
- Data access layer usage
- Branch context awareness (for DAK components)
These checks apply to ALL pages without exception.
- Issue tracking service integration (Check 13)
- Bookmark service integration (Check 14)
- Help content registration (Check 15)
- Tutorial integration (Check 16)
These checks apply to ALL pages EXCEPT those in the ROUTING_ERROR_PAGES list.
To add a new page to the exclusion list:
- Verify the page handles browser routing errors - Only pages that deal with routing errors (404, redirects, etc.) should be excluded
- Add to the ROUTING_ERROR_PAGES list - Add the exact component name
- Document why - Add a comment explaining why this page handles routing errors
DO NOT add pages to the exclusion list for any other reason. If a page doesn't need certain integrations, that indicates a design issue with either the page or the compliance requirements themselves.
const ROUTING_ERROR_PAGES = [
'NotFound', // Handles 404 errors
'DashboardRedirect', // Handles redirects for missing context
'ErrorBoundary' // Handles runtime errors (if such a page exists)
];// WRONG - Using heuristics
const ROUTING_ERROR_PAGES = componentName.includes('Viewer') ? [] : ['NotFound'];
// WRONG - Excluding based on page complexity
const ROUTING_ERROR_PAGES = fileSize < 1000 ? ['NotFound', 'SimplePages'] : ['NotFound'];
// WRONG - Excluding selection pages
const ROUTING_ERROR_PAGES = ['NotFound', 'OrganizationSelection', 'DAKSelection'];- Explicit Lists Only - All exclusions must be in the
ROUTING_ERROR_PAGESconstant - No Pattern Matching - Do not use regex or string matching to determine exclusions
- No Content Analysis - Do not analyze file size, imports, or content to determine exclusions
- No Conditional Logic - Do not use if/else logic to build exclusion lists dynamically
- Clear Documentation - Every excluded page must have a comment explaining why
This design ensures:
- Predictability - Developers know exactly which pages are excluded and why
- Maintainability - Easy to understand and modify the exclusion list
- No Surprises - No hidden logic that might exclude pages unexpectedly
- Clear Intent - The exclusion list documents the design decision explicitly
This design principle is MANDATORY for all contributors. Pull requests that introduce heuristics will be rejected.
If you find yourself wanting to add heuristics, it's a sign that either:
- The compliance requirements need to be reconsidered
- The page design needs to be improved
- The page actually does handle routing errors and should be explicitly added to the list
Do not work around the issue with heuristics - address the root cause instead.