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 stock trading platform. The current stock price feed we receive is incredibly noisy and jittery. This makes the UI feel unstable and difficult for users to read.
We need to implement a feature that receives raw price updates (JSON packets) and displays a smoothed average of the last 10 prices. This smoothed value should be updated every time a new price comes in.
The application must be designed to handle high-frequency updates efficiently. The core logic for calculating the average and managing the price history must be robust and separated from any specific UI framework, as we plan to use it across multiple platforms (web, mobile, and desktop).
Please implement this feature, ensuring a clear separation between the data processing logic and the presentation layer.
The output should include: