# Patterns ## Entry Template ``` date: YYYY-MM-DD author: scope: type: pattern rationale: impact: status: accepted|superseded Pattern: When to use: Example paths: ``` --- ### P-001: Thin Pages, Reusable Logic Elsewhere date: 2026-03-11 author: Cline scope: `pages/`, `components/`, `lib/`, `actions/` type: pattern rationale: Improve maintainability and reduce route-level complexity. impact: Better testability and safer incremental changes. status: accepted Pattern: Keep route pages focused on composition and orchestration; place reusable behavior in `lib/`, `components/`, or `actions/`. When to use: - New features in existing routes - Refactors reducing duplication across pages/components Example paths: - `pages/newappeal/**` - `components/newappeal/**` - `actions/index.js` ### P-002: EN/CY Parity for User-Facing Changes date: 2026-03-11 author: Cline scope: `locales/`, `i18n.js`, `next.config.js`, user-facing pages type: pattern rationale: Service requires bilingual consistency and reliable route behavior. impact: Prevents locale divergence and citizen confusion. status: accepted Pattern: Any user-facing change should include EN and CY text/route validation as part of done checks. When to use: - New/changed labels, messages, headings - New/changed route aliases or rewrites Example paths: - `locales/en/**`, `locales/cy/**` - `next.config.js`, `i18n.js`