.opencode/skills/arquitectura/SKILL.md
Arquitectura real del proyecto zona_raiz — Clean/Hexagonal con Next.js 16 App Router. Usar SIEMPRE al crear features nuevas, módulos, rutas, componentes, o cuando el usuario pregunte dónde va un archivo o cómo organizar código nuevo.
npx skillsauth add jstcode99/zona_raiz arquitecturaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
app/, features/ ← Presentación (UI, rutas)
application/ ← Aplicación (actions, validation, mappers, modules)
infrastructure/ ← Infraestructura (adapters, db, config)
domain/ ← Dominio puro (entities, ports, services, errors)
La dependencia siempre va hacia adentro: app → application → domain ← infrastructure
Nunca importes infrastructure/ desde domain/.
zona_raiz/
├── app/[lang]/ # App Router con i18n obligatoria
│ ├── auth/ # sign-in, sign-up, otp, callback, sign-out
│ ├── dashboard/ # properties, listings, users, enquiries, profile
│ ├── onboarding/ # primer acceso, registro inmobiliaria
│ ├── listing/[slug]/ # página pública de listado
│ ├── estate/[slug]/ # página pública de inmobiliaria
│ ├── [..location]/ # búsqueda por ubicación
│ ├── layout.tsx, page.tsx # landing
│ └── providers.tsx # ThemeProvider, ReactQueryProvider, etc.
│
├── application/
│ ├── actions/ # Server Actions por entidad
│ ├── mappers/ # row DB → entidad de dominio
│ ├── modules/app.module.ts # único punto de composición DI
│ ├── validation/ # schemas Yup (base/ + por entidad)
│ └── errors/ # handle-error.ts, to-action-result.ts
│
├── domain/
│ ├── entities/ # tipos puros del negocio + enums
│ ├── ports/ # interfaces que la infra debe implementar
│ ├── services/ # lógica de negocio + unstable_cache
│ ├── errors/ # domain-error.ts, auth-error.ts, user.error.ts
│ └── types/ # tipos auxiliares de dominio
│
├── infrastructure/
│ ├── adapters/supabase/ # implementaciones de puertos con Supabase
│ ├── cookies/cookies.adapter.ts # implementa CookiesPort
│ ├── db/
│ │ ├── supabase.server.ts # cliente server (SSR)
│ │ ├── supabase.server-admin.ts # cliente admin (service_role)
│ │ └── supabase.proxy.ts # proxy para server components
│ ├── config/
│ │ ├── constants.ts # CACHE_TAGS, COOKIE_NAMES, STORAGE_BUCKETS, FILE_LIMITS
│ │ ├── routes.ts # ROUTES + createRouter(lang)
│ │ └── cache.ts # CacheConfig interface
│ └── notifications/ # notification.service.ts
│
├── features/ # componentes UI agrupados por dominio
│ ├── agents/, auth/, dashboard/
│ ├── properties/, listings/, real-states/
│ ├── users/, enquiries/, profile/
│ ├── favorites/, image-manager/, import/
│ ├── places/, landing/, navigation/
│ └── onboarding/, loader/
│
├── shared/
│ ├── hooks/
│ │ ├── with-server-action.ts # wrapper que produce ActionResult
│ │ ├── use-server-mutation.hook.ts # hook cliente para invocar actions
│ │ └── to-action-result.ts # convierte errores a ActionResult
│ ├── redirect.ts
│ └── utils/lang.ts # getLangServerSide()
│
├── app/components/ui/ # componentes shadcn/ui base
├── app/hooks/ # hooks de app (use-mobile, use-routes, etc.)
├── app/lib/
│ ├── supabase.client.ts # cliente browser para Client Components
│ └── utils.ts # cn, flatten, generateSlug
│
├── i18n/ # settings, server, client, router, provider
├── locales/[en|es]/ # archivos JSON de traducción
├── interfaces/http/http-context.ts # CookieContext type
└── supabase/migrations/ # migraciones SQL
| Qué creas | Dónde |
|---|---|
| Entidad de negocio | domain/entities/<entidad>.entity.ts |
| Enum de dominio | domain/entities/<entidad>.enums.ts |
| Interfaz de repositorio | domain/ports/<entidad>.port.ts |
| Lógica de negocio | domain/services/<entidad>.service.ts |
| Implementación Supabase | infrastructure/adapters/supabase/supabase-<entidad>.adapter.ts |
| Schema de validación | application/validation/<entidad>.validation.ts o .schema.ts |
| Server Action | application/actions/<entidad>.actions.ts |
| Mapper DB→entidad | application/mappers/<entidad>.mapper.ts |
| Componente de feature | features/<dominio>/<componente>.tsx |
| Componente UI base | app/components/ui/<componente>.tsx |
| Página de ruta | app/[lang]/<ruta>/page.tsx |
| Hook del cliente | app/hooks/use-<nombre>.ts |
| Migración SQL | supabase/migrations/<timestamp>_<descripcion>.sql |
| Cache tag nuevo | infrastructure/config/constants.ts → CACHE_TAGS |
| Bucket nuevo | infrastructure/config/constants.ts → STORAGE_BUCKETS |
auth, profile, real-estate, agent, property, listing, property-image, inquiry, favorite, session, user, import
Al añadir una entidad nueva, sigue este orden:
domain/entities/ → entidad + enumsdomain/ports/ → interfazdomain/services/ → servicioinfrastructure/adapters/supabase/ → adapterapplication/validation/ → schema Yupapplication/mappers/ → mapperapplication/modules/app.module.ts → registrarapplication/actions/ → Server Actionsfeatures/<dominio>/ → componentes UIapp/[lang]/ → rutas/páginasdevelopment
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.