feat(orchestration): Add PROJECT-PROFILE.yml for propagation agent
Defines project structure, module mapping, entity adaptations, terminology, and propagation rules for the Automatic Propagation Agent. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
faeb932c89
commit
c9b37cb794
454
orchestration/PROJECT-PROFILE.yml
Normal file
454
orchestration/PROJECT-PROFILE.yml
Normal file
@ -0,0 +1,454 @@
|
||||
# PROJECT-PROFILE.yml - clinica-veterinaria
|
||||
# Perfil de proyecto para el Agente de Propagación Automático
|
||||
# Version: 1.0.0
|
||||
# Fecha: 2026-01-18
|
||||
|
||||
project:
|
||||
name: "clinica-veterinaria"
|
||||
code: "VET"
|
||||
type: "SUB-VERTICAL"
|
||||
level: "SUB-CONSUMER"
|
||||
giro: "veterinaria"
|
||||
version: "1.0.0"
|
||||
completeness: 15
|
||||
|
||||
description: |
|
||||
ERP sub-vertical para clínicas y hospitales veterinarios:
|
||||
- Medicina de pequeñas especies (perros, gatos)
|
||||
- Medicina de grandes especies (equinos, bovinos)
|
||||
- Animales exóticos
|
||||
- Cirugía veterinaria
|
||||
- Estética y grooming
|
||||
- Pensión y hospedaje
|
||||
Hereda de erp-clinicas y especializa para veterinaria.
|
||||
|
||||
# =============================================================================
|
||||
# JERARQUÍA DE HERENCIA
|
||||
# =============================================================================
|
||||
|
||||
inheritance:
|
||||
parent: "erp-clinicas"
|
||||
grandparent: "erp-core"
|
||||
chain: ["erp-core", "erp-clinicas", "clinica-veterinaria"]
|
||||
|
||||
# =============================================================================
|
||||
# ESTRUCTURA DEL PROYECTO
|
||||
# =============================================================================
|
||||
|
||||
structure:
|
||||
type: "monorepo"
|
||||
root_path: "projects/clinica-veterinaria"
|
||||
|
||||
apps:
|
||||
backend:
|
||||
path: "apps/backend"
|
||||
framework: "NestJS"
|
||||
modules_path: "src/modules"
|
||||
entities_path: "src/modules/*/entities"
|
||||
|
||||
frontend:
|
||||
path: "apps/frontend"
|
||||
framework: "React"
|
||||
features_path: "src/features"
|
||||
pages_path: "src/pages"
|
||||
|
||||
database:
|
||||
path: "apps/database"
|
||||
ddl_path: "ddl"
|
||||
|
||||
# =============================================================================
|
||||
# MAPEO DE MÓDULOS: clinicas → veterinaria
|
||||
# =============================================================================
|
||||
|
||||
module_mapping:
|
||||
# Heredados de erp-clinicas (se mantienen)
|
||||
auth: "auth"
|
||||
users: "users"
|
||||
roles: "roles"
|
||||
tenants: "tenants"
|
||||
catalogs: "catalogs"
|
||||
patients: "pet-patients" # Pacientes → Mascotas/Animales
|
||||
medical-supplies: "vet-supplies"
|
||||
financial: "financial"
|
||||
appointments: "vet-appointments"
|
||||
purchases: "purchases"
|
||||
patient-relations: "owner-relations" # Relación con dueños
|
||||
audit: "audit"
|
||||
notifications: "notifications"
|
||||
clinical-reports: "vet-reports"
|
||||
|
||||
# De erp-clinicas que se especializan
|
||||
medical-records: "vet-records"
|
||||
scheduling: "vet-scheduling"
|
||||
prescriptions: "vet-prescriptions"
|
||||
insurance: "pet-insurance"
|
||||
lab-integration: "vet-lab"
|
||||
|
||||
# =============================================================================
|
||||
# ADAPTACIONES ESPECÍFICAS DE VETERINARIA
|
||||
# =============================================================================
|
||||
|
||||
adaptations:
|
||||
entities:
|
||||
# Desde erp-clinicas
|
||||
Patient: "Pet" # Paciente → Mascota
|
||||
MedicalSupply: "VetSupply"
|
||||
Appointment: "VetAppointment"
|
||||
MedicalRecord: "VetRecord"
|
||||
|
||||
# Entidad adicional: Owner (dueño de la mascota)
|
||||
new_entities:
|
||||
- name: "Owner"
|
||||
description: "Dueño/propietario de la mascota"
|
||||
based_on: "Partner" # Basado en Partner de erp-core
|
||||
|
||||
fields_additions:
|
||||
Pet:
|
||||
- name: "owner_id"
|
||||
type: "uuid"
|
||||
fk: "owners.owners.id"
|
||||
nullable: false
|
||||
reason: "Dueño de la mascota"
|
||||
|
||||
- name: "species"
|
||||
type: "varchar(50)"
|
||||
enum: ["dog", "cat", "bird", "rabbit", "hamster", "fish", "reptile", "horse", "cattle", "pig", "other"]
|
||||
nullable: false
|
||||
reason: "Especie del animal"
|
||||
|
||||
- name: "breed"
|
||||
type: "varchar(100)"
|
||||
nullable: true
|
||||
reason: "Raza"
|
||||
|
||||
- name: "sex"
|
||||
type: "varchar(10)"
|
||||
enum: ["male", "female", "unknown"]
|
||||
reason: "Sexo del animal"
|
||||
|
||||
- name: "is_neutered"
|
||||
type: "boolean"
|
||||
default: false
|
||||
reason: "Si está esterilizado/castrado"
|
||||
|
||||
- name: "color"
|
||||
type: "varchar(100)"
|
||||
nullable: true
|
||||
reason: "Color del pelaje/plumaje"
|
||||
|
||||
- name: "weight_kg"
|
||||
type: "decimal(6,2)"
|
||||
nullable: true
|
||||
reason: "Peso en kilogramos"
|
||||
|
||||
- name: "microchip_number"
|
||||
type: "varchar(50)"
|
||||
nullable: true
|
||||
reason: "Número de microchip"
|
||||
|
||||
- name: "tattoo_number"
|
||||
type: "varchar(50)"
|
||||
nullable: true
|
||||
reason: "Número de tatuaje (si aplica)"
|
||||
|
||||
- name: "vaccination_status"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Estado de vacunación"
|
||||
|
||||
- name: "diet_type"
|
||||
type: "varchar(50)"
|
||||
nullable: true
|
||||
reason: "Tipo de dieta"
|
||||
|
||||
- name: "behavioral_notes"
|
||||
type: "text"
|
||||
nullable: true
|
||||
reason: "Notas de comportamiento (agresivo, miedoso, etc.)"
|
||||
|
||||
Owner:
|
||||
- name: "pets"
|
||||
type: "relation"
|
||||
relation_type: "one_to_many"
|
||||
target: "Pet"
|
||||
reason: "Un dueño puede tener múltiples mascotas"
|
||||
|
||||
- name: "preferred_vet_id"
|
||||
type: "uuid"
|
||||
fk: "auth.users.id"
|
||||
nullable: true
|
||||
reason: "Veterinario preferido"
|
||||
|
||||
- name: "emergency_authorized"
|
||||
type: "boolean"
|
||||
default: false
|
||||
reason: "Autoriza procedimientos de emergencia"
|
||||
|
||||
VetSupply:
|
||||
- name: "species_applicable"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Especies para las que aplica"
|
||||
|
||||
- name: "weight_based_dosing"
|
||||
type: "boolean"
|
||||
default: true
|
||||
reason: "Si la dosis es por peso"
|
||||
|
||||
- name: "dosing_per_kg"
|
||||
type: "decimal(10,4)"
|
||||
nullable: true
|
||||
reason: "Dosis por kg de peso"
|
||||
|
||||
- name: "withdrawal_period_days"
|
||||
type: "integer"
|
||||
nullable: true
|
||||
reason: "Período de retiro (para animales de consumo)"
|
||||
|
||||
VetAppointment:
|
||||
- name: "pet_id"
|
||||
type: "uuid"
|
||||
fk: "pets.pets.id"
|
||||
reason: "Mascota a atender"
|
||||
|
||||
- name: "reason_for_visit"
|
||||
type: "varchar(50)"
|
||||
enum: ["checkup", "vaccination", "illness", "injury", "surgery", "grooming", "boarding", "emergency", "follow_up"]
|
||||
reason: "Motivo de la visita"
|
||||
|
||||
- name: "weight_at_visit"
|
||||
type: "decimal(6,2)"
|
||||
nullable: true
|
||||
reason: "Peso registrado en la visita"
|
||||
|
||||
- name: "temperature"
|
||||
type: "decimal(4,1)"
|
||||
nullable: true
|
||||
reason: "Temperatura corporal"
|
||||
|
||||
- name: "heart_rate"
|
||||
type: "integer"
|
||||
nullable: true
|
||||
reason: "Frecuencia cardíaca"
|
||||
|
||||
- name: "respiratory_rate"
|
||||
type: "integer"
|
||||
nullable: true
|
||||
reason: "Frecuencia respiratoria"
|
||||
|
||||
- name: "hospitalization_required"
|
||||
type: "boolean"
|
||||
default: false
|
||||
reason: "Si requiere hospitalización"
|
||||
|
||||
VetRecord:
|
||||
- name: "vaccination_history"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Historial de vacunación"
|
||||
|
||||
- name: "deworming_history"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Historial de desparasitación"
|
||||
|
||||
- name: "surgeries"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Cirugías realizadas"
|
||||
|
||||
- name: "chronic_conditions"
|
||||
type: "jsonb"
|
||||
nullable: true
|
||||
reason: "Condiciones crónicas"
|
||||
|
||||
fields_removals:
|
||||
Pet:
|
||||
- "date_of_birth" # Se usa birth_date heredado, pero...
|
||||
- "emergency_contact" # El contacto es el owner
|
||||
|
||||
# =============================================================================
|
||||
# MÓDULOS ESPECÍFICOS DE VETERINARIA
|
||||
# =============================================================================
|
||||
|
||||
vertical_modules:
|
||||
- id: "VET-001"
|
||||
name: "vaccination"
|
||||
description: "Control de vacunación"
|
||||
status: "planned"
|
||||
priority: "P0"
|
||||
entities:
|
||||
- VaccinationRecord
|
||||
- VaccinationSchedule
|
||||
- Vaccine
|
||||
|
||||
- id: "VET-002"
|
||||
name: "boarding"
|
||||
description: "Pensión y hospedaje"
|
||||
status: "planned"
|
||||
priority: "P1"
|
||||
entities:
|
||||
- BoardingReservation
|
||||
- Kennel
|
||||
- BoardingFee
|
||||
- FeedingSchedule
|
||||
|
||||
- id: "VET-003"
|
||||
name: "grooming"
|
||||
description: "Estética y grooming"
|
||||
status: "planned"
|
||||
priority: "P1"
|
||||
entities:
|
||||
- GroomingAppointment
|
||||
- GroomingService
|
||||
- GroomingPackage
|
||||
|
||||
- id: "VET-004"
|
||||
name: "surgery"
|
||||
description: "Cirugías veterinarias"
|
||||
status: "planned"
|
||||
priority: "P1"
|
||||
entities:
|
||||
- SurgeryRecord
|
||||
- AnesthesiaLog
|
||||
- PostOpCare
|
||||
|
||||
- id: "VET-005"
|
||||
name: "vet-pharmacy"
|
||||
description: "Farmacia veterinaria"
|
||||
status: "planned"
|
||||
priority: "P1"
|
||||
entities:
|
||||
- VetPrescription
|
||||
- Medication
|
||||
- ControlledSubstance
|
||||
|
||||
- id: "VET-006"
|
||||
name: "pet-shop"
|
||||
description: "Venta de productos para mascotas"
|
||||
status: "planned"
|
||||
priority: "P2"
|
||||
entities:
|
||||
- PetProduct
|
||||
- ProductCategory
|
||||
- Promotion
|
||||
|
||||
# =============================================================================
|
||||
# TERMINOLOGÍA VETERINARIA
|
||||
# =============================================================================
|
||||
|
||||
terminology:
|
||||
# Heredado de clínicas adaptado
|
||||
paciente: "paciente/mascota"
|
||||
cita: "cita veterinaria"
|
||||
consulta: "consulta veterinaria"
|
||||
receta: "receta veterinaria"
|
||||
|
||||
# Específico de veterinaria
|
||||
mascota: "mascota/animal"
|
||||
dueno: "propietario/dueño"
|
||||
especie: "especie"
|
||||
raza: "raza"
|
||||
vacuna: "vacuna"
|
||||
desparasitacion: "desparasitación"
|
||||
castracion: "castración/esterilización"
|
||||
microchip: "microchip"
|
||||
pension: "pensión/hospedaje"
|
||||
estetica: "estética/grooming"
|
||||
|
||||
# =============================================================================
|
||||
# ESPECIES SOPORTADAS
|
||||
# =============================================================================
|
||||
|
||||
species_config:
|
||||
small_animals:
|
||||
- code: "dog"
|
||||
name: "Perro"
|
||||
common_vaccines: ["rabies", "distemper", "parvovirus", "hepatitis", "leptospirosis"]
|
||||
|
||||
- code: "cat"
|
||||
name: "Gato"
|
||||
common_vaccines: ["rabies", "feline_distemper", "calicivirus", "rhinotracheitis", "leukemia"]
|
||||
|
||||
- code: "rabbit"
|
||||
name: "Conejo"
|
||||
common_vaccines: ["myxomatosis", "vhd"]
|
||||
|
||||
exotic:
|
||||
- code: "bird"
|
||||
name: "Ave"
|
||||
- code: "reptile"
|
||||
name: "Reptil"
|
||||
- code: "hamster"
|
||||
name: "Hámster"
|
||||
|
||||
large_animals:
|
||||
- code: "horse"
|
||||
name: "Caballo"
|
||||
requires_field_service: true
|
||||
|
||||
- code: "cattle"
|
||||
name: "Bovino"
|
||||
requires_field_service: true
|
||||
food_animal: true
|
||||
|
||||
# =============================================================================
|
||||
# REGLAS DE PROPAGACIÓN
|
||||
# =============================================================================
|
||||
|
||||
propagation_rules:
|
||||
accept_from:
|
||||
- erp-clinicas # Padre directo
|
||||
- erp-core # Si erp-clinicas lo propaga
|
||||
|
||||
auto_accept:
|
||||
- documentation
|
||||
- definitions
|
||||
- security_fixes
|
||||
- bug_fixes
|
||||
- patient_base_changes
|
||||
|
||||
require_adaptation:
|
||||
- entities
|
||||
- ddl_schema
|
||||
- medical_records # Adaptar a registros veterinarios
|
||||
|
||||
require_review:
|
||||
- breaking_changes
|
||||
- schema_migrations
|
||||
- controlled_substances # Medicamentos controlados
|
||||
|
||||
reject:
|
||||
- dental_features
|
||||
- human_medical_features
|
||||
|
||||
# =============================================================================
|
||||
# VALIDACIONES ESPECÍFICAS
|
||||
# =============================================================================
|
||||
|
||||
validations:
|
||||
pre_propagation:
|
||||
- "Verificar que módulo padre (erp-clinicas) está actualizado"
|
||||
- "Validar que entity mapping está definido"
|
||||
|
||||
post_propagation:
|
||||
- "npm run build"
|
||||
- "npm run lint"
|
||||
- "npm run test:affected"
|
||||
|
||||
business_rules:
|
||||
- "Mascotas requieren dueño asignado"
|
||||
- "Mascotas requieren especie"
|
||||
- "Vacunas tienen calendario según especie"
|
||||
- "Medicamentos controlados requieren receta especial"
|
||||
- "Animales de consumo tienen período de retiro"
|
||||
- "Hospitalización requiere kennel asignado"
|
||||
|
||||
# =============================================================================
|
||||
# HISTORIAL
|
||||
# =============================================================================
|
||||
|
||||
history:
|
||||
- date: "2026-01-18"
|
||||
action: "Creación de PROJECT-PROFILE.yml"
|
||||
author: "Claude-Opus-4.5"
|
||||
Loading…
Reference in New Issue
Block a user