awc-zns-mtd 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/.editorconfig +21 -0
  2. package/CHANGELOG.md +210 -0
  3. package/LICENSE +21 -0
  4. package/README.md +439 -0
  5. package/docs/examples/example-feature.md +94 -0
  6. package/docs/getting-started/quick-start.md +85 -0
  7. package/docs/guides/agent-guide.md +56 -0
  8. package/docs/guides/workflow-guide.md +49 -0
  9. package/docs/reference/commands-reference.md +93 -0
  10. package/docs/reference/methodology-design.md +193 -0
  11. package/package.json +66 -0
  12. package/src/modules/awc-zns-mtd/agents/architect-senior.agent.yaml +159 -0
  13. package/src/modules/awc-zns-mtd/agents/developer-pro.agent.yaml +197 -0
  14. package/src/modules/awc-zns-mtd/agents/qa-specialist.agent.yaml +225 -0
  15. package/src/modules/awc-zns-mtd/agents/zen-master.agent.yaml +142 -0
  16. package/src/modules/awc-zns-mtd/config.yaml +412 -0
  17. package/src/modules/awc-zns-mtd/templates/PRD-template.md +490 -0
  18. package/src/modules/awc-zns-mtd/templates/arquitectura-conceptual.md +431 -0
  19. package/src/modules/awc-zns-mtd/templates/cotizacion.md +333 -0
  20. package/src/modules/awc-zns-mtd/templates/discovery-notes.md +205 -0
  21. package/src/modules/awc-zns-mtd/templates/kickoff-agenda.md +297 -0
  22. package/src/modules/awc-zns-mtd/templates/oferta-comercial.md +279 -0
  23. package/src/modules/awc-zns-mtd/templates/viabilidad.md +281 -0
  24. package/src/modules/awc-zns-mtd/workflows/analisis-flow/workflow.yaml +500 -0
  25. package/src/modules/awc-zns-mtd/workflows/comercial-flow/workflow.yaml +444 -0
  26. package/src/modules/awc-zns-mtd/workflows/deployment-flow/workflow.yaml +395 -0
  27. package/src/modules/awc-zns-mtd/workflows/development-flow/workflow.yaml +321 -0
  28. package/src/modules/awc-zns-mtd/workflows/enterprise-flow/workflow.yaml +276 -0
  29. package/src/modules/awc-zns-mtd/workflows/inception-flow/workflow.yaml +588 -0
  30. package/src/modules/awc-zns-mtd/workflows/planificacion-flow/workflow.yaml +526 -0
  31. package/src/modules/awc-zns-mtd/workflows/qa-flow/workflow.yaml +291 -0
  32. package/src/modules/awc-zns-mtd/workflows/quick-flow/workflow.yaml +121 -0
  33. package/src/modules/awc-zns-mtd/workflows/standard-flow/workflow.yaml +181 -0
  34. package/src/modules/awc-zns-mtd/workflows/support-flow/workflow.yaml +438 -0
  35. package/src/modules/custom-agents/ARCHITECTURE.md +566 -0
  36. package/src/modules/custom-agents/CONVERSION_SUMMARY.md +315 -0
  37. package/src/modules/custom-agents/FINAL_SUMMARY.md +296 -0
  38. package/src/modules/custom-agents/README.md +628 -0
  39. package/src/modules/custom-agents/USAGE_GUIDE.md +306 -0
  40. package/src/modules/custom-agents/agents/aspnet-core-architect-senior.agent.yaml +368 -0
  41. package/src/modules/custom-agents/agents/backend-audit-master.agent.yaml +376 -0
  42. package/src/modules/custom-agents/agents/backend-java-senior.agent.yaml +606 -0
  43. package/src/modules/custom-agents/agents/c4-diagram-specialist.agent.yaml +345 -0
  44. package/src/modules/custom-agents/agents/consolidation-context-master.agent.yaml +318 -0
  45. package/src/modules/custom-agents/agents/cost-estimator-senior.agent.yaml +369 -0
  46. package/src/modules/custom-agents/agents/database-engineer-senior.agent.yaml +331 -0
  47. package/src/modules/custom-agents/agents/devsecops-onpremise-senior.agent.yaml +370 -0
  48. package/src/modules/custom-agents/agents/document-export-specialist.agent.yaml +355 -0
  49. package/src/modules/custom-agents/agents/dotnet-core-senior.agent.yaml +258 -0
  50. package/src/modules/custom-agents/agents/frontend-audit-master.agent.yaml +356 -0
  51. package/src/modules/custom-agents/agents/frontend-react-senior.agent.yaml +470 -0
  52. package/src/modules/custom-agents/agents/obsolescence-analyst-senior.agent.yaml +339 -0
  53. package/src/modules/custom-agents/agents/php-senior.agent.yaml +277 -0
  54. package/src/modules/custom-agents/agents/product-owner-business-analyst.agent.yaml +315 -0
  55. package/src/modules/custom-agents/agents/prompt-architect-senior.agent.yaml +398 -0
  56. package/src/modules/custom-agents/agents/prompt-engineer-senior.agent.yaml +431 -0
  57. package/src/modules/custom-agents/agents/python-senior.agent.yaml +347 -0
  58. package/src/modules/custom-agents/agents/react-native-senior.agent.yaml +292 -0
  59. package/src/modules/custom-agents/agents/solution-architect-senior.agent.yaml +496 -0
  60. package/src/modules/custom-agents/agents/technical-stories-architect.agent.yaml +402 -0
  61. package/src/modules/custom-agents/agents/validation-quality-master.agent.yaml +377 -0
  62. package/src/modules/custom-agents/cli/.awc-agents/aspnet-core-architect-senior.agent.yaml +368 -0
  63. package/src/modules/custom-agents/cli/.awc-agents/backend-audit-master.agent.yaml +376 -0
  64. package/src/modules/custom-agents/cli/.awc-agents/backend-java-senior.agent.yaml +606 -0
  65. package/src/modules/custom-agents/cli/.awc-agents/c4-diagram-specialist.agent.yaml +345 -0
  66. package/src/modules/custom-agents/cli/.awc-agents/consolidation-context-master.agent.yaml +318 -0
  67. package/src/modules/custom-agents/cli/.awc-agents/cost-estimator-senior.agent.yaml +369 -0
  68. package/src/modules/custom-agents/cli/.awc-agents/database-engineer-senior.agent.yaml +331 -0
  69. package/src/modules/custom-agents/cli/.awc-agents/devsecops-onpremise-senior.agent.yaml +370 -0
  70. package/src/modules/custom-agents/cli/.awc-agents/document-export-specialist.agent.yaml +355 -0
  71. package/src/modules/custom-agents/cli/.awc-agents/dotnet-core-senior.agent.yaml +258 -0
  72. package/src/modules/custom-agents/cli/.awc-agents/frontend-audit-master.agent.yaml +356 -0
  73. package/src/modules/custom-agents/cli/.awc-agents/frontend-react-senior.agent.yaml +470 -0
  74. package/src/modules/custom-agents/cli/.awc-agents/obsolescence-analyst-senior.agent.yaml +339 -0
  75. package/src/modules/custom-agents/cli/.awc-agents/php-senior.agent.yaml +277 -0
  76. package/src/modules/custom-agents/cli/.awc-agents/product-owner-business-analyst.agent.yaml +315 -0
  77. package/src/modules/custom-agents/cli/.awc-agents/prompt-architect-senior.agent.yaml +398 -0
  78. package/src/modules/custom-agents/cli/.awc-agents/prompt-engineer-senior.agent.yaml +431 -0
  79. package/src/modules/custom-agents/cli/.awc-agents/python-senior.agent.yaml +347 -0
  80. package/src/modules/custom-agents/cli/.awc-agents/react-native-senior.agent.yaml +292 -0
  81. package/src/modules/custom-agents/cli/.awc-agents/solution-architect-senior.agent.yaml +496 -0
  82. package/src/modules/custom-agents/cli/.awc-agents/technical-stories-architect.agent.yaml +402 -0
  83. package/src/modules/custom-agents/cli/.awc-agents/validation-quality-master.agent.yaml +377 -0
  84. package/src/modules/custom-agents/cli/CHANGELOG.md +77 -0
  85. package/src/modules/custom-agents/cli/LICENSE +21 -0
  86. package/src/modules/custom-agents/cli/PUBLISH.md +292 -0
  87. package/src/modules/custom-agents/cli/README.md +333 -0
  88. package/src/modules/custom-agents/cli/agents-data/aspnet-core-architect-senior.agent.yaml +368 -0
  89. package/src/modules/custom-agents/cli/agents-data/backend-audit-master.agent.yaml +376 -0
  90. package/src/modules/custom-agents/cli/agents-data/backend-java-senior.agent.yaml +606 -0
  91. package/src/modules/custom-agents/cli/agents-data/c4-diagram-specialist.agent.yaml +345 -0
  92. package/src/modules/custom-agents/cli/agents-data/consolidation-context-master.agent.yaml +318 -0
  93. package/src/modules/custom-agents/cli/agents-data/cost-estimator-senior.agent.yaml +369 -0
  94. package/src/modules/custom-agents/cli/agents-data/database-engineer-senior.agent.yaml +331 -0
  95. package/src/modules/custom-agents/cli/agents-data/devsecops-onpremise-senior.agent.yaml +370 -0
  96. package/src/modules/custom-agents/cli/agents-data/document-export-specialist.agent.yaml +355 -0
  97. package/src/modules/custom-agents/cli/agents-data/dotnet-core-senior.agent.yaml +258 -0
  98. package/src/modules/custom-agents/cli/agents-data/frontend-audit-master.agent.yaml +356 -0
  99. package/src/modules/custom-agents/cli/agents-data/frontend-react-senior.agent.yaml +470 -0
  100. package/src/modules/custom-agents/cli/agents-data/obsolescence-analyst-senior.agent.yaml +339 -0
  101. package/src/modules/custom-agents/cli/agents-data/php-senior.agent.yaml +277 -0
  102. package/src/modules/custom-agents/cli/agents-data/product-owner-business-analyst.agent.yaml +315 -0
  103. package/src/modules/custom-agents/cli/agents-data/prompt-architect-senior.agent.yaml +398 -0
  104. package/src/modules/custom-agents/cli/agents-data/prompt-engineer-senior.agent.yaml +431 -0
  105. package/src/modules/custom-agents/cli/agents-data/python-senior.agent.yaml +347 -0
  106. package/src/modules/custom-agents/cli/agents-data/react-native-senior.agent.yaml +292 -0
  107. package/src/modules/custom-agents/cli/agents-data/solution-architect-senior.agent.yaml +496 -0
  108. package/src/modules/custom-agents/cli/agents-data/technical-stories-architect.agent.yaml +402 -0
  109. package/src/modules/custom-agents/cli/agents-data/validation-quality-master.agent.yaml +377 -0
  110. package/src/modules/custom-agents/cli/awc-agent.js +372 -0
  111. package/src/modules/custom-agents/cli/config.yaml +478 -0
  112. package/src/modules/custom-agents/cli/package.json +63 -0
  113. package/src/modules/custom-agents/config.yaml +478 -0
  114. package/templates/.github/copilot-instructions.md +120 -0
  115. package/tools/cli/awc-cli.js +137 -0
  116. package/tools/cli/commands/config.js +148 -0
  117. package/tools/cli/commands/init.js +147 -0
  118. package/tools/cli/commands/install.js +188 -0
  119. package/tools/cli/commands/status.js +128 -0
  120. package/tools/cli/commands/validate.js +147 -0
  121. package/tools/cli/commands/version.js +49 -0
  122. package/tools/cli/utils/console-logger.js +153 -0
  123. package/tools/cli/utils/file-utils.js +178 -0
  124. package/tools/cli/utils/project-analyzer.js +280 -0
  125. package/tools/cli/utils/version.js +126 -0
  126. package/tools/version/README.md +272 -0
  127. package/tools/version/changelog-manager.js +288 -0
  128. package/tools/version/update-checker.js +234 -0
  129. package/tools/version/version-bump.js +90 -0
  130. package/tools/version/version-manager.js +224 -0
@@ -0,0 +1,431 @@
1
+ # Arquitectura Conceptual de Alto Nivel
2
+ ## {Nombre del Proyecto}
3
+
4
+ **Versión:** 1.0
5
+ **Fecha:** {DD/MM/AAAA}
6
+ **Arquitecto:** {Nombre del Solution Architect}
7
+ **Estado:** Draft | Review | Approved
8
+
9
+ ---
10
+
11
+ ## 📋 Resumen Ejecutivo
12
+
13
+ **Tipo de Arquitectura:** Monolítica | Microservicios | Serverless | Híbrida
14
+ **Patrón Principal:** MVC | MVVM | Clean Architecture | Hexagonal | Event-Driven
15
+ **Deployment:** On-Premise | Cloud | Híbrido
16
+
17
+ **Decisiones Arquitectónicas Clave:**
18
+ 1. {Decisión clave #1 - ej: Arquitectura de microservicios para escalabilidad}
19
+ 2. {Decisión clave #2 - ej: Base de datos PostgreSQL por consistencia ACID}
20
+ 3. {Decisión clave #3 - ej: Event-driven para procesamiento asíncrono}
21
+
22
+ ---
23
+
24
+ ## 🎯 Objetivos de Arquitectura
25
+
26
+ ### Drivers de Calidad (Quality Attributes)
27
+
28
+ | Atributo | Prioridad | Target | Justificación |
29
+ |----------|-----------|--------|---------------|
30
+ | **Performance** | Alta | Response time < 2s (P95) | Experiencia de usuario crítica |
31
+ | **Escalabilidad** | Alta | 10,000 usuarios concurrentes | Crecimiento proyectado |
32
+ | **Disponibilidad** | Alta | 99.9% uptime | SLA contractual |
33
+ | **Seguridad** | Crítica | OWASP Top 10 | Manejo de datos sensibles |
34
+ | **Mantenibilidad** | Media | Modular, testeable | Evolución futura |
35
+ | **Portabilidad** | Baja | Cloud-agnostic preferido | Evitar vendor lock-in |
36
+
37
+ ---
38
+
39
+ ## 🏗️ Diagrama C4 - Nivel 1: Contexto
40
+
41
+ ```
42
+ ┌─────────────────────────────────────────────────────────────────┐
43
+ │ SISTEMA: {Nombre del Sistema} │
44
+ │ │
45
+ │ ┌──────────┐ ┌──────────┐ │
46
+ │ │ Usuario │──────────────────────────────────▶ Frontend │ │
47
+ │ │ Final │ │ Web │ │
48
+ │ └──────────┘ └─────┬────┘ │
49
+ │ │ │
50
+ │ ▼ │
51
+ │ ┌──────────┐ │
52
+ │ │ Backend │ │
53
+ │ │ API │ │
54
+ │ └─────┬────┘ │
55
+ │ │ │
56
+ │ ▼ │
57
+ │ ┌──────────┐ │
58
+ │ │ Database │ │
59
+ │ └──────────┘ │
60
+ └─────────────────────────────────────────────────────────────────┘
61
+
62
+ Sistemas Externos:
63
+ - {Sistema Externo #1}: {Propósito de integración}
64
+ - {Sistema Externo #2}: {Propósito de integración}
65
+ ```
66
+
67
+ ### Actores Principales
68
+
69
+ 1. **Usuario Final ({Tipo de Usuario})**
70
+ - Accede via: Web Browser / Mobile App
71
+ - Autenticación: OAuth 2.0 / SAML / Basic Auth
72
+ - Acciones principales: {Listar acciones clave}
73
+
74
+ 2. **Administrador del Sistema**
75
+ - Accede via: Admin Panel
76
+ - Permisos: Full CRUD + Config
77
+ - Acciones: Gestión de usuarios, configuración
78
+
79
+ 3. **{Sistema Externo #1}**
80
+ - Tipo de integración: REST API / SOAP / Message Queue
81
+ - Datos intercambiados: {Descripción}
82
+
83
+ ---
84
+
85
+ ## 🏗️ Diagrama C4 - Nivel 2: Contenedores
86
+
87
+ ```
88
+ ┌─────────────────────────────────────────────────────────────────┐
89
+ │ │
90
+ │ ┌────────────────┐ ┌────────────────┐ │
91
+ │ │ Web Client │────────▶│ API Gateway │ │
92
+ │ │ (React/Vue/Ng) │ HTTPS │ (Kong/NGINX) │ │
93
+ │ └────────────────┘ └────────┬───────┘ │
94
+ │ │ │
95
+ │ ┌─────────────────┼─────────────────┐ │
96
+ │ │ │ │ │
97
+ │ ▼ ▼ ▼ │
98
+ │ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
99
+ │ │ Service │ │ Service │ │ Service │ │
100
+ │ │ A │ │ B │ │ C │ │
101
+ │ │ (Node.js) │ │ (Java) │ │ (Python) │ │
102
+ │ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ │
103
+ │ │ │ │ │
104
+ │ └─────────┬───────┴─────────────────┘ │
105
+ │ ▼ │
106
+ │ ┌─────────────────┐ │
107
+ │ │ PostgreSQL │ │
108
+ │ │ Database │ │
109
+ │ └─────────────────┘ │
110
+ │ │
111
+ │ ┌────────────────┐ ┌────────────────┐ │
112
+ │ │ Redis │ │ RabbitMQ │ │
113
+ │ │ Cache │ │ Message Queue │ │
114
+ │ └────────────────┘ └────────────────┘ │
115
+ │ │
116
+ └─────────────────────────────────────────────────────────────────┘
117
+ ```
118
+
119
+ ### Descripción de Contenedores
120
+
121
+ | Contenedor | Tecnología | Propósito | Puerto |
122
+ |------------|------------|-----------|--------|
123
+ | **Web Client** | {React 18 / Vue 3 / Angular} | UI/UX interactiva | 443 (HTTPS) |
124
+ | **API Gateway** | {Kong / NGINX / AWS API Gateway} | Routing, rate limiting, auth | 443 |
125
+ | **Service A** | {Node.js 20 / Express} | {Lógica de negocio específica} | 3000 |
126
+ | **Service B** | {Java 17 / Spring Boot} | {Lógica de negocio específica} | 8080 |
127
+ | **Service C** | {Python 3.11 / FastAPI} | {Lógica de negocio específica} | 8000 |
128
+ | **Database** | PostgreSQL 15 | Persistencia de datos | 5432 |
129
+ | **Cache** | Redis 7 | Caché de sesiones y datos frecuentes | 6379 |
130
+ | **Message Queue** | RabbitMQ 3 | Comunicación asíncrona entre servicios | 5672 |
131
+
132
+ ---
133
+
134
+ ## 📦 Stack Tecnológico Detallado
135
+
136
+ ### Frontend
137
+
138
+ | Componente | Tecnología | Versión | Justificación |
139
+ |------------|------------|---------|---------------|
140
+ | Framework | {React / Vue / Angular} | {X.Y} | {Razón técnica} |
141
+ | State Management | {Redux / Vuex / Pinia} | {X.Y} | {Razón} |
142
+ | UI Library | {Material-UI / Tailwind} | {X.Y} | {Razón} |
143
+ | Build Tool | {Vite / Webpack} | {X.Y} | {Razón} |
144
+ | Package Manager | {npm / yarn / pnpm} | {X.Y} | {Razón} |
145
+
146
+ ### Backend
147
+
148
+ | Componente | Tecnología | Versión | Justificación |
149
+ |------------|------------|---------|---------------|
150
+ | Runtime | {Node.js / Java JDK / Python} | {X.Y} | {Razón} |
151
+ | Framework | {Express / Spring Boot / FastAPI} | {X.Y} | {Razón} |
152
+ | ORM | {Prisma / Hibernate / SQLAlchemy} | {X.Y} | {Razón} |
153
+ | API Spec | {OpenAPI / GraphQL} | {X.Y} | {Razón} |
154
+ | Auth | {JWT / OAuth 2.0 / Passport.js} | {X.Y} | {Razón} |
155
+
156
+ ### Data Layer
157
+
158
+ | Componente | Tecnología | Versión | Justificación |
159
+ |------------|------------|---------|---------------|
160
+ | Database | {PostgreSQL / MongoDB / MySQL} | {X.Y} | {Razón - ACID / NoSQL} |
161
+ | Cache | {Redis / Memcached} | {X.Y} | {Razón} |
162
+ | Search Engine | {Elasticsearch / Algolia} | {X.Y} | {Razón - si aplica} |
163
+ | Object Storage | {S3 / Azure Blob / MinIO} | - | {Razón} |
164
+
165
+ ### Messaging & Events
166
+
167
+ | Componente | Tecnología | Versión | Justificación |
168
+ |------------|------------|---------|---------------|
169
+ | Message Queue | {RabbitMQ / Kafka / SQS} | {X.Y} | {Razón} |
170
+ | Event Bus | {EventBridge / Pub/Sub} | - | {Razón - si aplica} |
171
+
172
+ ### Infrastructure & DevOps
173
+
174
+ | Componente | Tecnología | Versión | Justificación |
175
+ |------------|------------|---------|---------------|
176
+ | Cloud Provider | {AWS / Azure / GCP} | - | {Razón} |
177
+ | Container | Docker | 24.x | Portabilidad, aislamiento |
178
+ | Orchestration | {Kubernetes / ECS / App Service} | - | {Razón} |
179
+ | CI/CD | {GitHub Actions / GitLab CI / Jenkins} | - | {Razón} |
180
+ | IaC | {Terraform / Bicep / CloudFormation} | {X.Y} | {Razón} |
181
+ | Monitoring | {Datadog / New Relic / CloudWatch} | - | {Razón} |
182
+ | Logs | {ELK Stack / Splunk / CloudWatch Logs} | - | {Razón} |
183
+
184
+ ---
185
+
186
+ ## 🔐 Seguridad
187
+
188
+ ### Autenticación y Autorización
189
+
190
+ **Mecanismo de Autenticación:**
191
+ - Protocolo: OAuth 2.0 + OpenID Connect
192
+ - Proveedor: {Auth0 / Azure AD / AWS Cognito / Custom}
193
+ - Token: JWT (JSON Web Tokens)
194
+ - Expiración: 1 hora (access token), 7 días (refresh token)
195
+
196
+ **Autorización:**
197
+ - Modelo: RBAC (Role-Based Access Control)
198
+ - Roles definidos:
199
+ - Admin: Full access
200
+ - User: CRUD own resources
201
+ - Guest: Read-only
202
+
203
+ ### Seguridad de Datos
204
+
205
+ | Capa | Mecanismo | Estándar |
206
+ |------|-----------|----------|
207
+ | **Datos en Tránsito** | TLS 1.3 | HTTPS everywhere |
208
+ | **Datos en Reposo** | AES-256 | Encryption at rest |
209
+ | **Contraseñas** | bcrypt / Argon2 | Hashing + salt |
210
+ | **Secretos** | {AWS Secrets Manager / Vault} | Rotación automática |
211
+ | **API Keys** | Rotating keys | 90 días rotación |
212
+
213
+ ### Cumplimiento
214
+
215
+ - ✅ OWASP Top 10 (mitigaciones implementadas)
216
+ - ✅ GDPR compliant (si aplica en EU)
217
+ - ✅ SOC 2 Type II (si aplica)
218
+ - ✅ Auditoría de logs (retention 90 días)
219
+
220
+ ---
221
+
222
+ ## 📈 Escalabilidad
223
+
224
+ ### Estrategia de Escalamiento
225
+
226
+ | Componente | Estrategia | Trigger | Max Instances |
227
+ |------------|------------|---------|---------------|
228
+ | Frontend | CDN + Static Hosting | N/A | Global |
229
+ | API Gateway | Horizontal (auto-scale) | CPU > 70% | 10 |
230
+ | Backend Services | Horizontal (auto-scale) | CPU > 70% o RPS > 1000 | 20 |
231
+ | Database | Vertical + Read Replicas | Connections > 80% | 1 master + 3 replicas |
232
+ | Cache | Horizontal (cluster) | Memory > 80% | 6 nodes |
233
+
234
+ ### Capacity Planning
235
+
236
+ **Usuarios esperados:**
237
+ - Año 1: {X,XXX} usuarios activos mensuales
238
+ - Año 2: {XX,XXX} usuarios activos mensuales
239
+ - Año 3: {XXX,XXX} usuarios activos mensuales
240
+
241
+ **RPS (Requests Per Second) estimado:**
242
+ - Promedio: {XXX} RPS
243
+ - Pico (peak): {X,XXX} RPS (horario {HH:MM - HH:MM})
244
+
245
+ ---
246
+
247
+ ## 🔄 Flujos de Datos Críticos
248
+
249
+ ### Flujo 1: {Nombre del Flujo - ej: Creación de Usuario}
250
+
251
+ ```
252
+ 1. Usuario envía request POST /api/users
253
+ 2. API Gateway valida JWT token
254
+ 3. Backend Service valida datos (schema validation)
255
+ 4. Backend consulta si email ya existe (Database)
256
+ 5. Backend crea usuario (Database write)
257
+ 6. Backend publica evento "UserCreated" (Message Queue)
258
+ 7. Email Service consume evento y envía email de bienvenida
259
+ 8. Backend retorna 201 Created con user object
260
+ ```
261
+
262
+ **Latencia esperada:** < 500ms
263
+
264
+ ### Flujo 2: {Nombre del Flujo}
265
+ {Descripción paso a paso}
266
+
267
+ ---
268
+
269
+ ## 🗄️ Modelo de Datos (High-Level)
270
+
271
+ ### Entidades Principales
272
+
273
+ **Entidad: User**
274
+ ```
275
+ User {
276
+ id: UUID (PK)
277
+ email: String (unique)
278
+ password_hash: String
279
+ role: Enum (admin, user, guest)
280
+ created_at: Timestamp
281
+ updated_at: Timestamp
282
+ }
283
+ ```
284
+
285
+ **Entidad: {Entidad #2}**
286
+ ```
287
+ {Entidad} {
288
+ id: UUID (PK)
289
+ {campo1}: {tipo}
290
+ {campo2}: {tipo}
291
+ {foreign_key}: UUID (FK → {Entidad})
292
+ }
293
+ ```
294
+
295
+ ### Relaciones
296
+ - User 1:N {Entidad}
297
+ - {Entidad A} N:M {Entidad B}
298
+
299
+ ---
300
+
301
+ ## 🌐 Integraciones Externas
302
+
303
+ | Sistema | Tipo | Protocolo | Datos | SLA |
304
+ |---------|------|-----------|-------|-----|
305
+ | {Sistema #1} | {Proveedor} | REST API | {Descripción} | 99.9% |
306
+ | {Sistema #2} | {Proveedor} | SOAP | {Descripción} | 99.5% |
307
+ | {Sistema #3} | {Proveedor} | Webhook | {Descripción} | 99% |
308
+
309
+ ### Manejo de Fallos en Integraciones
310
+ - **Retry Policy:** 3 intentos con exponential backoff
311
+ - **Circuit Breaker:** Después de 5 fallos consecutivos
312
+ - **Fallback:** {Estrategia de fallback}
313
+
314
+ ---
315
+
316
+ ## 🚀 Estrategia de Deployment
317
+
318
+ ### Ambientes
319
+
320
+ | Ambiente | Propósito | Infraestructura | URL |
321
+ |----------|-----------|-----------------|-----|
322
+ | **Development** | Desarrollo local | Docker Compose | localhost |
323
+ | **Staging** | Pre-producción, testing | {Cloud staging} | staging.{dominio} |
324
+ | **Production** | Producción | {Cloud production} | www.{dominio} |
325
+
326
+ ### CI/CD Pipeline
327
+
328
+ ```
329
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
330
+ │ Commit │───▶│ Tests │───▶│ Build │───▶│ Deploy │
331
+ │ Code │ │ (CI) │ │ Image │ │ (CD) │
332
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘
333
+ │ │
334
+ ▼ ▼
335
+ ┌──────────┐ ┌──────────┐
336
+ │ Lint │ │ Staging │
337
+ │ Tests │ │ Deploy │
338
+ └──────────┘ └──────────┘
339
+
340
+ ┌───────────┴────────┐
341
+ │ Manual Approval │
342
+ │ for Production │
343
+ └──────────┬─────────┘
344
+
345
+ ┌──────────┐
346
+ │Production│
347
+ │ Deploy │
348
+ └──────────┘
349
+ ```
350
+
351
+ ### Deployment Strategy
352
+ - **Estrategia:** Blue-Green | Rolling | Canary
353
+ - **Rollback time:** < 5 minutos
354
+ - **Zero-downtime:** ✅ Sí
355
+
356
+ ---
357
+
358
+ ## 📊 Monitoreo y Observabilidad
359
+
360
+ ### Métricas a Monitorear
361
+
362
+ **Application Metrics:**
363
+ - Request Rate (RPS)
364
+ - Error Rate (%)
365
+ - Latency (P50, P95, P99)
366
+ - Saturation (CPU, Memory, Disk)
367
+
368
+ **Business Metrics:**
369
+ - {Métrica de negocio #1}
370
+ - {Métrica de negocio #2}
371
+
372
+ ### Alertas Críticas
373
+
374
+ | Alerta | Condición | Severidad | Acción |
375
+ |--------|-----------|-----------|--------|
376
+ | High Error Rate | Error rate > 5% por 5 min | P1 | PagerDuty |
377
+ | Database Down | Database unreachable | P0 | PagerDuty + SMS |
378
+ | High Latency | P95 latency > 5s | P2 | Slack alert |
379
+
380
+ ---
381
+
382
+ ## 📋 Decisiones Arquitectónicas (ADRs)
383
+
384
+ ### ADR-001: {Título de la Decisión}
385
+ **Fecha:** {DD/MM/AAAA}
386
+ **Status:** Accepted | Deprecated | Superseded
387
+
388
+ **Context:**
389
+ {Descripción del problema o contexto que requiere una decisión}
390
+
391
+ **Decision:**
392
+ {Decisión tomada}
393
+
394
+ **Consequences:**
395
+ ✅ **Pros:**
396
+ - {Ventaja #1}
397
+ - {Ventaja #2}
398
+
399
+ ❌ **Cons:**
400
+ - {Desventaja #1}
401
+ - {Desventaja #2}
402
+
403
+ **Alternatives Considered:**
404
+ - {Alternativa #1}: {Por qué se descartó}
405
+ - {Alternativa #2}: {Por qué se descartó}
406
+
407
+ ---
408
+
409
+ ## 🔮 Evolución Futura
410
+
411
+ ### Roadmap Técnico
412
+
413
+ **Fase 1 (MVP):**
414
+ - Arquitectura básica funcional
415
+ - Componentes core implementados
416
+
417
+ **Fase 2 (Post-MVP):**
418
+ - {Mejora #1 - ej: Implementar GraphQL}
419
+ - {Mejora #2 - ej: Microservicios adicionales}
420
+
421
+ **Fase 3 (Optimización):**
422
+ - {Mejora #1 - ej: Migrar a Serverless}
423
+ - {Mejora #2 - ej: Implementar ML pipeline}
424
+
425
+ ---
426
+
427
+ **Elaborado por:** {Nombre del Arquitecto}
428
+ **Revisado por:** {Nombre del Reviewer}
429
+ **Aprobado por:** {Nombre del Aprobador}
430
+ **Fecha:** {DD/MM/AAAA}
431
+ **Versión:** 1.0