description: Enforce web project standards across all categories name: audit-web user-invocable: true
Audit the web project against the checklist below.
Skip paths in .gitignore.
Code Quality
- TypeScript strict mode with zero type errors
- ESLint passing with zero errors
- No unsafe type casts or type holes
- No dead code or unused dependencies
- No
console.logordebuggerin production - HTML valid with no parsing errors
- Path aliases configured for imports
Security
- Secrets excluded from version control and client bundles
- Input validation and sanitization on all user data
- XSS prevention with output encoding and CSP headers
- CSRF protection on state-changing requests
- Security headers: X-Frame-Options, Referrer-Policy, HSTS
- Dependency vulnerabilities scanned
- Rate limiting on API endpoints
Accessibility
- Semantic HTML with logical heading hierarchy
- Keyboard navigation with visible focus indicators
- Color contrast meets WCAG AA: 4.5:1 for text, 3:1 for UI
- Images have descriptive alt text or are marked decorative
- Form inputs have associated labels and error announcements
- ARIA labels and roles on elements without visible text
- No information conveyed by color alone
- Decorative elements hidden from assistive technology
- Reduced motion respected via
prefers-reduced-motion - Page functional at 200% zoom
- Skip link to bypass navigation
Performance
- Core Web Vitals: LCP < 2.5s, INP < 200ms, CLS < 0.1
- Lighthouse performance score 90+ on mobile
- No render-blocking resources in critical path
- JavaScript bundle minimized with tree shaking and code splitting
- Images optimized: modern formats, srcset, lazy loading, dimensions set
- Critical CSS inlined, non-critical deferred
- Fonts preloaded with font-display swap
- Assets compressed and cached
- Third-party scripts async or deferred
- No unused dependencies in production bundle
- HTTP requests minimized and batched
- Preconnect hints for third-party origins
Testing
- All tests passing in CI before merge
- E2E tests cover critical user flows
- Unit tests cover critical functions and utilities
- Integration tests verify module interactions
- Accessibility tests automated
Error Handling
- Error boundaries catch component failures
- 404 and error pages styled and helpful
- API errors show user-friendly messages
- Graceful degradation when features unavailable
- Network failures trigger retry logic
- Fallback UI for failed component loads
- Errors logged to monitoring service
Responsiveness
- No horizontal scroll at any viewport
- Mobile layout functional from 320px
- Navigation adapts per breakpoint
- Touch targets minimum 44x44px
- Typography scales with readable line lengths
- Large screens capped with max-width container
- Tables scroll or stack on mobile
Visuals
- Typography hierarchy consistent
- Hover and focus states visible on all interactive elements
- Transitions and animations use shared durations and easing
- Spacing uses design tokens
- UI components visually consistent across pages
- Icons consistent in style and sizing
- Loading and skeleton states for async content
- Empty and error states designed
- Visual alignment follows grid rhythm
Interactivity
- Interactive elements respond immediately
- Focus trapped in modals and restored on close
- Disabled states prevent interaction and appear muted
- Form inputs validate inline with error messages
- Scroll behavior smooth with anchor offsets
- Double-submit prevented on forms
SEO
- Meta title and description unique per page
- Canonical URLs prevent duplicate content
- Open Graph tags for social sharing
- Structured data with JSON-LD
- Descriptive URL structure
- XML sitemap submitted and updated
- Robots.txt configured
- Favicon in multiple formats
Project Structure
- Folder structure with separation of concerns
- File naming convention consistent throughout
- .gitignore excludes build artifacts and dependencies
- Package.json scripts documented
- README with setup and usage instructions
- Environment example file provided
Compatibility
- Cross-browser: Chrome, Firefox, Safari, Edge
- Mobile: iOS and Android
- Input methods: mouse, touch, keyboard
- Progressive enhancement without JS
- High DPI display support
Content
- All links functional
- No placeholder text or dummy data
- Spelling, grammar, and punctuation correct
- Dates and numbers formatted for locale
DevOps
- CI/CD pipeline passes all checks before deploy
- Monitoring and alerting for errors
- Environment variables configured per deploy context
- Staging environment mirrors production
- Smoke tests run post-deploy
- Rollback mechanism tested
- Logs aggregated and searchable
Legal
- Privacy policy present and linked
- Cookie consent with opt-in controls
- Third-party tracking disclosed
- Copyright notice current
- Licensed assets attributed
Rules
- Only report files with issues
- Report issues in a table with columns: File, Lines, Issue
- Report only. No recommendations, no editorializing, no offering to fix.
- Get user approval before making any fixes
- No logic changes. Report and flag only.
- Run
bun run lintafter all changes are applied