Herencia SIMCO - michangarrito
Sistema: SIMCO v4.0.1 + CAPVED + SCRUM
Fecha: 2026-01-10
Version anterior: v3.8.0 (workspace-v1) + v4.0.0 (workspace-v2)
1. Configuracion del Proyecto
| Propiedad |
Valor |
| Proyecto |
Mi Changarrito - Sistema POS para Pequenos Comercios |
| Codigo v2 |
MCH |
| Nivel |
STANDALONE (Nivel 2A) |
| Padre |
workspace-v2/orchestration |
| SIMCO Version |
4.0.1 |
| CAPVED |
Habilitado |
| SCRUM |
Habilitado |
| CCA Protocol |
Habilitado |
2. Jerarquia de Herencia
Nivel 0: workspace-v2/orchestration/ <- WORKSPACE (directivas globales)
|
+-- STANDALONE: michangarrito/orchestration/ <- ESTE PROYECTO
michangarrito/docs/ <- DOCUMENTACION
Regla: Las directivas locales pueden EXTENDER las del workspace, nunca REDUCIRLAS.
Estado del Proyecto: MVP 95% Implementado
3. Directivas Heredadas de WORKSPACE (OBLIGATORIAS)
Ubicacion: workspace-v2/orchestration/
| Alias |
Archivo |
Proposito |
@CARGA-CONTEXTO |
directivas/DIRECTIVA-CARGA-CONTEXTO.md |
Como cargar contexto segun nivel |
@INDICE |
INDICE-DIRECTIVAS-WORKSPACE.yml |
Indice maestro de directivas |
4. Metodologia CAPVED+SCRUM
Este proyecto utiliza la metodologia integrada CAPVED+SCRUM definida en SIMCO v4.0.
Ciclo CAPVED dentro de Sprint
Sprint Start
|
+-- Sprint Planning (usar @TPL_SPRINT_PLANNING)
|
+-- Por cada HU:
+-- [C] Contexto -> Cargar directivas, verificar DoR
+-- [A] Analisis -> Analizar requerimientos
+-- [P] Plan -> Planificar implementacion
+-- [V] Validacion -> Validar plan tecnico
+-- [E] Ejecucion -> Implementar codigo
+-- [D] Documentar -> Actualizar docs, verificar DoD
|
+-- Sprint Review
+-- Sprint Retrospective (usar @TPL_RETROSPECTIVA)
5. Directivas SCRUM (SIMCO v4.0)
Ejecucion de Sprint
| Alias |
Directiva |
Proposito |
@SPRINT_EXECUTION |
SIMCO-SPRINT-EXECUTION.md |
Ciclo completo de Sprint |
@AGILE_METRICS |
SIMCO-AGILE-METRICS.md |
Metricas Velocity, Burndown |
@SCRUM_INTEGRATION |
SIMCO-SCRUM-INTEGRATION.md |
Integracion CAPVED+SCRUM |
Definition of Ready (DoR)
| Criterio |
Descripcion |
| ID asignado |
MCH-US-NNN |
| Historia completa |
Como/Quiero/Para |
| Criterios de aceptacion |
3-8 criterios |
| Story Points |
Fibonacci (1,2,3,5,8,13) |
| Dependencias identificadas |
Sin bloqueos |
| PO aprobado |
Si |
Definition of Done (DoD)
| Criterio |
Descripcion |
| Codigo implementado |
Segun especificacion |
| Build pasa |
Sin errores |
| Tests pasando |
Unitarios + integracion |
| Code review |
Completado |
| Documentacion |
Actualizada |
| TRACEABILITY.yml |
Actualizado |
Templates SCRUM
| Alias |
Template |
Uso |
@TPL_DEFINICION_READY |
TEMPLATE-DEFINICION-READY.md |
Validar DoR de HU |
@TPL_SPRINT_BACKLOG |
TEMPLATE-SPRINT-BACKLOG.yml |
Tracking de Sprint |
@TPL_RETROSPECTIVA |
TEMPLATE-RETROSPECTIVA.yml |
Retro Start-Stop-Continue |
@TPL_SPRINT_PLANNING |
TEMPLATE-ACTA-SPRINT-PLANNING.md |
Acta de Planning |
Checklist DoD/DoR
| Alias |
Checklist |
Items |
@CHK_DOD_DOR |
CHECKLIST-DOD-DOR.md |
32 items |
6. Directivas de Ciclo de Vida (USAR SIEMPRE)
| Alias |
Archivo |
Proposito |
@TAREA |
directivas/simco/SIMCO-TAREA.md |
Punto de entrada para toda HU |
@CAPVED |
directivas/principios/PRINCIPIO-CAPVED.md |
Ciclo de 6 fases |
@INICIALIZACION |
directivas/simco/SIMCO-INICIALIZACION.md |
Bootstrap de agentes |
@DOC-DEFINITIVA |
directivas/DIRECTIVA-DOCUMENTACION-DEFINITIVA.md |
Docs como estado final |
7. Operaciones Universales
| Alias |
Archivo |
Proposito |
@CREAR |
SIMCO-CREAR.md |
Crear archivos nuevos |
@MODIFICAR |
SIMCO-MODIFICAR.md |
Modificar existentes |
@VALIDAR |
SIMCO-VALIDAR.md |
Validar codigo |
@DOCUMENTAR |
SIMCO-DOCUMENTAR.md |
Documentar trabajo |
@BUSCAR |
SIMCO-BUSCAR.md |
Buscar informacion |
@DELEGAR |
SIMCO-DELEGACION.md |
Delegar a subagentes |
8. Directivas de Subagentes (SIMCO v4.0.0)
| Alias |
Archivo |
Descripcion |
@SUBAGENTE |
SIMCO-SUBAGENTE.md |
Protocolo cuando recibes delegacion |
@CCA_SUBAGENTE |
SIMCO-CCA-SUBAGENTE.md |
CCA ligero (~1500 tokens) |
@CONTROL_TOKENS |
SIMCO-CONTROL-TOKENS.md |
Gestion de limites de tokens |
@DELEGACION_PARALELA |
SIMCO-DELEGACION-PARALELA.md |
Delegacion a multiples agentes |
9. Directivas de Context Engineering
| Alias |
Archivo |
Descripcion |
@CONTEXT_ENGINEERING |
SIMCO-CONTEXT-ENGINEERING.md |
Ingenieria de contexto |
@CONTEXT_RESOLUTION |
SIMCO-CONTEXT-RESOLUTION.md |
Resolucion de contextos |
10. Directivas de Niveles y Propagacion
| Alias |
Archivo |
Descripcion |
@NIVELES |
SIMCO-NIVELES.md |
Jerarquia de niveles |
@PROPAGACION |
SIMCO-PROPAGACION.md |
Propagacion de directivas |
11. Directivas Git y Gobernanza
| Alias |
Archivo |
Descripcion |
@GIT |
SIMCO-GIT.md |
Operaciones Git |
@GIT_REMOTES |
SIMCO-GIT-REMOTES.md |
Gestion de remotos |
@ESCALAMIENTO |
SIMCO-ESCALAMIENTO.md |
Escalamiento de decisiones |
12. Principios Fundamentales (5)
| Alias |
Resumen |
@CAPVED |
Toda tarea pasa por 6 fases |
@DOC_PRIMERO |
Consultar docs/ antes de implementar |
@ANTI_DUP |
Verificar que no existe antes de crear |
@VALIDACION |
Build y lint DEBEN pasar |
@TOKENS |
Desglosar tareas grandes |
13. Directivas por Dominio Tecnico
| Alias |
Aplica |
Notas |
@OP_DDL |
SI |
11 schemas, 53 tablas |
@OP_BACKEND |
SI |
NestJS, 18 modulos |
@OP_FRONTEND |
SI |
React + Vite |
@OP_MOBILE |
SI |
React Native (Expo) |
@OP_ML |
NO |
(LLM via MCP, no ML propio) |
14. Directivas de Documentacion
| Alias |
Directiva |
Proposito |
@DOC_PROYECTO |
SIMCO-DOCUMENTACION-PROYECTO.md |
Estructura docs/ |
@NOMENCLATURA |
SIMCO-NOMENCLATURA.md |
Convenciones de IDs |
@ESTRUCTURA_DOCS |
SIMCO-ESTRUCTURA-DOCS.md |
Estructura interna |
@INVENTARIOS |
SIMCO-INVENTARIOS.md |
Inventarios YAML |
@MANTENIMIENTO_DOCS |
SIMCO-MANTENIMIENTO-DOCUMENTACION.md |
Ciclo mantenimiento |
@SYNC_BD |
SIMCO-SINCRONIZACION-BD.md |
Sincronizacion BD<->Docs |
@TESTING |
SIMCO-TESTING.md |
Cobertura y estandares de testing |
@MIGRACIONES |
SIMCO-MIGRACIONES-BD.md |
Migraciones y DDL |
@INTEGRACIONES |
SIMCO-INTEGRACIONES-EXTERNAS.md |
Documentacion de integraciones |
Checklists de Documentacion
| Alias |
Checklist |
Items |
@CHK_DOCUMENTACION |
CHECKLIST-DOCUMENTACION-PROYECTO.md |
44 |
@CHK_INVENTARIOS |
CHECKLIST-INVENTARIOS.md |
63 |
@CHK_NOMENCLATURA |
CHECKLIST-NOMENCLATURA.md |
40 |
@CHK_MANTENIMIENTO |
CHECKLIST-MANTENIMIENTO-DOCS.md |
80 |
@CHK_SYNC_BD |
CHECKLIST-SINCRONIZACION-BD.md |
70 |
Templates de Documentacion
| Alias |
Template |
Uso |
@TPL_INVENTARIO |
TEMPLATE-INVENTARIO-PROYECTO.md |
Crear inventarios YAML |
@TPL_INTEGRACION |
TEMPLATE-INTEGRACION-EXTERNA.md |
Documentar integraciones |
@TPL_MODULO_ESTANDAR |
TEMPLATE-MODULO-ESTANDAR.md |
Documentar modulos |
@TPL_DEPRECACION |
TEMPLATE-DEPRECACION.md |
Marcar documentos como deprecados |
15. Patrones Aplicables
| Patron |
Uso en MiChangarrito |
MAPEO-TIPOS-DDL-TYPESCRIPT.md |
11 schemas -> Entities |
PATRON-VALIDACION.md |
class-validator en DTOs |
PATRON-EXCEPTION-HANDLING.md |
Filtros NestJS |
PATRON-TESTING.md |
Jest + e2e tests |
PATRON-SEGURIDAD.md |
JWT, multi-tenant RLS |
PATRON-TRANSACCIONES.md |
TypeORM transactions |
ANTIPATRONES.md |
Evitar siempre |
16. Variables de Contexto CCA
# Identificacion del Proyecto
PROJECT_NAME: "michangarrito"
PROJECT_CODE: "MCH"
PROJECT_LEVEL: "STANDALONE"
PROJECT_ROOT: "/home/isem/workspace-v2/projects/michangarrito"
# Rutas principales
APPS_ROOT: "apps"
DOCS_ROOT: "docs"
ORCHESTRATION: "orchestration"
# Base de Datos
DB_NAME: "michangarrito"
DB_DDL_PATH: "database/schemas"
DB_SCRIPTS_PATH: "database"
DB_SEEDS_PATH: "database/seeds"
# Backend (NestJS)
BACKEND_ROOT: "apps/backend"
BACKEND_SRC: "apps/backend/src"
BACKEND_FRAMEWORK: "NestJS"
ORM: "TypeORM"
BACKEND_PORT: 3141
# Frontend (React)
FRONTEND_ROOT: "apps/web"
FRONTEND_SRC: "apps/web/src"
FRONTEND_FRAMEWORK: "React"
BUILD_TOOL: "Vite"
FRONTEND_PORT: 3140
# Mobile (React Native)
MOBILE_ROOT: "apps/mobile"
MOBILE_FRAMEWORK: "React Native (Expo)"
MOBILE_PORT: 8081
# Servicios Adicionales
MCP_SERVER_ROOT: "apps/mcp-server"
MCP_SERVER_PORT: 3142
WHATSAPP_SERVICE_ROOT: "apps/whatsapp-service"
WHATSAPP_PORT: 3143
# Multi-tenant
TENANT_COLUMN: "tenant_id"
RLS_CONTEXT: "app.current_tenant_id"
# Inventarios
MASTER_INVENTORY: "orchestration/inventarios/MASTER_INVENTORY.yml"
17. Schemas de Base de Datos (11)
| Schema |
Descripcion |
Tablas |
public |
Tenants, configuracion global |
~3 |
auth |
Autenticacion, tokens |
~4 |
catalog |
Productos, categorias |
~5 |
sales |
Ventas, transacciones, CoDi, SPEI |
~6 |
inventory |
Stock, movimientos |
~4 |
customers |
Clientes, fiados |
~4 |
orders |
Pedidos WhatsApp |
~5 |
subscriptions |
Planes, tokens, referidos |
~5 |
messaging |
Conversaciones, mensajes |
~4 |
billing |
CFDI 4.0, facturas |
~6 |
marketplace |
Proveedores B2B |
~7 |
Total: ~53 tablas
18. Integraciones Externas
Integraciones Core (INT-001 a INT-009)
| ID |
Integracion |
Proveedor |
Estado |
Doc |
| INT-001 |
WhatsApp |
Meta Business API |
Activo |
INT-001 |
| INT-002 |
Pagos |
Stripe |
Activo |
INT-002 |
| INT-003 |
Terminal |
Mercado Pago |
Activo |
INT-003 |
| INT-004 |
Terminal |
Clip |
Pendiente |
INT-004 |
| INT-005 |
CoDi |
Banxico via Openpay |
Activo |
INT-005 |
| INT-006 |
SPEI |
STP |
Activo |
INT-006 |
| INT-007 |
Facturacion |
Facturapi/PAC CFDI 4.0 |
Activo |
INT-007 |
| INT-008 |
LLM Gateway |
OpenRouter |
Activo |
INT-008 |
| INT-009 |
Push |
Firebase FCM |
Activo |
INT-009 |
Integraciones SaaS (INT-010 a INT-014)
| ID |
Integracion |
Proveedor |
Estado |
Doc |
| INT-010 |
Email Multi-Provider |
SendGrid/SES/SMTP |
Planificado |
INT-010 |
| INT-011 |
Storage Cloud |
S3/R2/MinIO |
Planificado |
INT-011 |
| INT-012 |
OAuth Social |
Google/Apple |
Planificado |
INT-012 |
| INT-013 |
Redis Cache/Queue |
Redis/BullMQ |
Planificado |
INT-013 |
| INT-014 |
Webhooks Outbound |
BullMQ |
Planificado |
INT-014 |
Integraciones Pendientes
| Integracion |
Proveedor |
Estado |
Notas |
| OCR |
Google Vision |
Backlog |
MCH-018 |
| Audio |
Whisper |
Activo |
Via OpenRouter |
| Web Push |
OneSignal/Firebase |
Backlog |
MCH-034 |
Total Integraciones: 14 documentadas (9 activas, 5 planificadas)
19. Trazabilidad v2
TRACEABILITY-MASTER.yml
Ubicacion: docs/04-modelado/trazabilidad/TRACEABILITY-MASTER.yml
Este archivo consolida:
- Mapeo de nomenclatura v1 -> v2
- Lista de epicas con estados
- Grafo de dependencias
- Health score del proyecto
Nomenclatura v2
| Tipo |
Formato |
Ejemplo |
| Epica |
MCH-NNN |
MCH-001 |
| Requerimiento |
MCH-RF-NNN |
MCH-RF-001 |
| User Story |
MCH-US-NNN |
MCH-US-001 |
| Tarea |
MCH-TT-NNN |
MCH-TT-001 |
| Bug |
MCH-BG-NNN |
MCH-BG-001 |
20. Perfiles de Agentes
| Perfil |
Especializacion |
Frecuencia |
PERFIL-DATABASE.md |
PostgreSQL, 11 schemas |
Alta |
PERFIL-BACKEND.md |
NestJS, TypeORM |
Alta |
PERFIL-FRONTEND.md |
React, Vite |
Alta |
PERFIL-MOBILE.md |
React Native, Expo |
Alta |
PERFIL-CODE-REVIEWER.md |
Revision de codigo |
Media |
PERFIL-DOC-MAINTAINER.md |
Mantenimiento docs |
Media |
21. Flujo de Trabajo Sprint (SCRUM)
# Sprint Planning
1. Cargar: @SPRINT_EXECUTION
2. Seleccionar HUs del backlog
3. Validar DoR con @CHK_DOD_DOR
4. Estimar con Planning Poker
5. Crear Sprint Backlog con @TPL_SPRINT_BACKLOG
# Durante Sprint (por HU)
1. Cargar: @TAREA + @CAPVED
2. Ejecutar ciclo CAPVED
3. Validar DoD con @CHK_DOD_DOR
4. Actualizar TRACEABILITY.yml
# Sprint Review
1. Demo de funcionalidades
2. Actualizar @AGILE_METRICS
# Sprint Retrospective
1. Usar @TPL_RETROSPECTIVA
2. Registrar Start-Stop-Continue
3. Crear action items
22. Flujo de Trabajo Desarrollo (CAPVED)
# PASO 1: Cargar contexto (CCA)
CARGAR:
- @TAREA
- @CAPVED
- @INICIALIZACION
- ./CONTEXTO-PROYECTO.md
# PASO 2: Seleccionar operacion
OPERACION:
- @OP_DDL # 11 schemas
- @OP_BACKEND # NestJS
- @OP_FRONTEND # React
- @OP_MOBILE # React Native
# PASO 3: Aplicar patrones
PATRONES:
- @PATRON-VALIDACION
- @PATRON-EXCEPTION-HANDLING
- @PATRON-SEGURIDAD
# PASO 4: Validar
VALIDAR:
- npm run build
- npm run lint
- npm run test
# PASO 5: Documentar
CIERRE:
- @DOCUMENTAR
- Actualizar inventarios
- Actualizar TRACEABILITY.yml
23. Referencias
- Directivas SIMCO:
workspace-v2/orchestration/directivas/simco/
- Principios:
workspace-v2/orchestration/directivas/principios/
- Templates SCRUM:
workspace-v2/orchestration/templates/scrum/
- Checklists:
workspace-v2/orchestration/checklists/
- Perfiles:
workspace-v2/orchestration/agents/perfiles/
- TRACEABILITY-MASTER:
docs/04-modelado/trazabilidad/TRACEABILITY-MASTER.yml
24. Roadmap SaaS (Fases 7-9)
Épicas SaaS Planificadas
| ID |
Épica |
SP |
Fase |
Sprint |
| MCH-029 |
Infraestructura SaaS |
24 |
7 |
6-7 |
| MCH-030 |
Auth Social (OAuth) |
8 |
7 |
8 |
| MCH-031 |
Auditoría Empresarial |
5 |
7 |
7 |
| MCH-032 |
Feature Flags |
5 |
7 |
8 |
| MCH-033 |
Onboarding Wizard |
3 |
8 |
9 |
Total SaaS: 45 Story Points
Capacidades SaaS Agregadas
| Capacidad |
Integración |
ADR |
Prioridad |
| Email Multi-provider |
INT-010 |
ADR-0011 |
P0 |
| Storage Abstracto |
INT-011 |
ADR-0006 |
P0 |
| Redis Cache/Queue |
INT-013 |
- |
P0 |
| Webhooks Outbound |
INT-014 |
ADR-0007 |
P1 |
| Rate Limiting |
INT-013 |
ADR-0009 |
P1 |
| OAuth Google/Apple |
INT-012 |
ADR-0010 |
P1 |
| Audit Logs |
- |
ADR-0008 |
P1 |
| Feature Flags |
INT-013 |
ADR-0005 |
P1 |
| Onboarding Wizard |
- |
- |
P2 |
Documentación SaaS
| Tipo |
Cantidad |
IDs |
| Épicas |
5 |
MCH-029 a MCH-033 |
| Integraciones |
5 |
INT-010 a INT-014 |
| ADRs |
8 |
ADR-0004 a ADR-0011 |
| Total |
18 |
- |
Sistema: SIMCO v4.0.1 + CAPVED + SCRUM + CCA Protocol
Nivel: STANDALONE (2A)
Versión HERENCIA: 2.0.0
Ultima actualizacion: 2026-01-10