Use this skill whenever the user discusses application architecture, clean architecture, separating business logic from UI, or cross-platform/WASM-based development. It enforces the 'Headless Core & Passive View' pattern, ensuring that the 'Core' (Business Logic) is platform-agnostic and the 'View' (UI) is a 'Humble Object' that only reflects state.
95
Quality
93%
Does it follow best practices?
Impact
99%
1.13xAverage score across 5 eval scenarios
We are building a new application that will eventually run on both web (React) and mobile (React Native). The first feature we need to implement is User Registration.
The registration process requires the user to provide an email and a password. We have some specific rules for security: the password must be at least 8 characters long and must contain at least one digit. If these rules are not met, the user should see appropriate error messages.
Since this feature will be used on multiple platforms, we need to ensure that the core logic is reusable and not tied to any specific UI framework. We want to be able to swap out the React frontend for a mobile native UI later without touching the business rules.
Please design and implement this feature, focusing on the structure of the code to support our cross-platform goals.
The output should include: