Loading...
Loading...
HarmonyOS ArkUI MVVM architecture skill. Use for Model/ViewModel/View layering, directory planning, component responsibilities, data flow, and MVVM refactoring. Trigger for V1 or V2 state-management MVVM development, ViewModel extraction, state-ownership fixes, and testability improvements.
npx skill4agent add onirodeveloper/hackyeah2026-challenge hmos-arkui-mvvm-pattern| Field | Content |
|---|---|
| |
| |
| |
| |
| |
| |
| |
@Observed@Track@Observed@Trackget@Observed.ets@Component@ComponentV2@Computed@Local@State@Param@Prop@Trace@Track| Principle | Description | Avoid |
|---|---|---|
| Do not store derived state | Compute values with | Store |
| Keep state local | Put state in the smallest required scope | Put one-component |
| Single source | Manage each value in one place | Store |
| Lift to common ancestor | Share state at the nearest common ancestor | Put sibling-only |
@Observed@ObservedV2utils/ets/
├── model/ # Data models + Repository
├── viewmodel/ # View models
├── views/ # Business components
├── pages/ # Page entry points
├── utils/ # Pure logic and system-capability wrappers
└── common/ # Shared constants and components| Tag | Phase | Focus |
|---|---|---|
| Requirements and design | Architecture, layering, state ownership, V1/V2 selection |
| Development | Model/ViewModel/View/Page implementation, decorators, data flow |
| Validation | Data-flow compliance, Model isolation, decorator pairing, refresh behavior |
MVVM-01scene_id: MVVM-01
name: V1 state-management MVVM development
phases: [REQ, DEV, VAL]
signals: [V1 state management, MVVM, architecture layers, Model/ViewModel/View]
not_when: V2 state management (MVVM-02) / non-MVVM architecture
ref: RSC_MVVM_01, RSC_MVVM_02MVVM-02scene_id: MVVM-02
name: V2 state-management MVVM development
phases: [REQ, DEV, VAL]
signals: [V2 state management, MVVM, architecture layers, Model/ViewModel/View]
not_when: V1 state management (MVVM-01) / non-MVVM architecture
ref: RSC_MVVM_03, RSC_MVVM_04| File | Content | Load when |
|---|---|---|
| references/anti-patterns.md | Architecture anti-patterns and scan checklist | Scanning an existing project |
| references/v1-nested-observation.md | V1 nested object and array observation | Handling nested V1 observation |
| references/v1-v2-mapping.md | V1/V2 array behavior and decorator pairing | Handling array updates or mixed versions |
| references/v2-advanced.md | AppStorageV2/PersistenceV2 signatures and selection | Using V2 global state |
| references/multi-module.md | Three-layer architecture, modules, and devices | Multi-module or multi-device projects |
devecocli --versiondevecocli build.ets