| name | cupid-app-architecture |
| description | CUPID app architecture guidance for apps/app/src/app/** |
Purpose
Use this skill when changing ownership, file placement, or structure inside apps/app/src/app/**.
This is an incremental migration guide, not a rewrite mandate.
Goals:
- keep the OpenWork app simple and predictable
- stop defaulting to
app.tsx, pages/*, and generic utils/*
- move touched code toward colocated domain ownership with minimal behavior churn
Applies to
- app architecture work in
apps/app/src/app/**
- refactors that move code between files or clarify ownership
- changes in
app.tsx, pages/dashboard.tsx, pages/session.tsx, pages/settings.tsx
Do not use this skill to justify broad rewrites. Move one coherent slice at a time.
Core rules
- Pick the owning domain before writing code.
- Keep public surfaces small and obvious.
- Prefer colocating UI, state, helpers, and transport code that belong to one workflow.
- Keep dependency direction shallow and predictable.
- Preserve behavior first; improve placement second.
- Promote code to shared only after multiple real consumers exist.
Target domain map
Use these domains for apps/app/src/app/** work:
shell
Owns app-wide composition only:
- routing and view switching
- top-level modal mounting
- runtime boot / wiring
- reload, updater, and host lifecycle surfaces
- global layout chrome
Examples today: