Problem
The standards/ directory has coding-standards.md (backend-focused) and api-design.md (REST API), but nothing for frontend/UI services. When the builder agent creates a UI service, it has no guidance on:
- Component architecture (atomic design, feature-based, etc.)
- State management patterns (when to use global vs local state)
- Styling approach (CSS modules, Tailwind, styled-components, design tokens)
- Accessibility standards (WCAG level, ARIA requirements)
- Performance budgets (bundle size limits, LCP/FID/CLS targets)
- Responsive design breakpoints and approach
- Folder structure for frontend projects
- Form handling and validation patterns
- Error/loading/empty state UX patterns
- Internationalization (i18n) approach
- Image optimization strategy
- SEO requirements (meta tags, structured data, SSR/SSG decisions)
- Browser support matrix
- Design system / component library conventions
Proposed solution
Add standards/ui-standards.md as a default template covering:
# UI/Frontend Standards
## Component Architecture
- Component naming and organization
- When to split components
- Props vs context vs global state
## Styling
- Approach (Tailwind / CSS Modules / styled-components)
- Design tokens (colors, spacing, typography)
- Responsive breakpoints
## Accessibility
- WCAG 2.1 AA minimum
- Required ARIA attributes
- Keyboard navigation requirements
- Screen reader testing
## Performance
- Bundle size budget (e.g., < 200KB initial JS)
- Core Web Vitals targets (LCP < 2.5s, FID < 100ms, CLS < 0.1)
- Image optimization (WebP/AVIF, lazy loading)
- Code splitting strategy
## UX Patterns
- Loading states (skeleton screens vs spinners)
- Error states (inline vs toast vs page-level)
- Empty states
- Form validation (inline, on blur, on submit)
- Optimistic updates
## Testing
- Component testing (React Testing Library / Vue Test Utils)
- Visual regression (Chromatic / Percy)
- E2E critical paths (Playwright / Cypress)
- Accessibility testing (axe-core)
## SEO & Meta
- Required meta tags per page
- OpenGraph / Twitter cards
- Structured data (JSON-LD)
- SSR vs SSG decisions
Phase 0 setup should ask about UI preferences and generate this file accordingly. The spec agent (Phase 3) should read this when generating UI service specs.
Problem
The
standards/directory hascoding-standards.md(backend-focused) andapi-design.md(REST API), but nothing for frontend/UI services. When the builder agent creates a UI service, it has no guidance on:Proposed solution
Add
standards/ui-standards.mdas a default template covering:Phase 0 setup should ask about UI preferences and generate this file accordingly. The spec agent (Phase 3) should read this when generating UI service specs.