@planu/cli 0.31.0 → 0.33.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 (122) hide show
  1. package/dist/config/license-plans.json +4 -1
  2. package/dist/config/team-templates.json +39 -0
  3. package/dist/engine/license-validator/core.d.ts.map +1 -1
  4. package/dist/engine/license-validator/core.js +7 -4
  5. package/dist/engine/license-validator/core.js.map +1 -1
  6. package/dist/engine/spec-templates/fintech-compliance.d.ts +4 -0
  7. package/dist/engine/spec-templates/fintech-compliance.d.ts.map +1 -0
  8. package/dist/engine/spec-templates/fintech-compliance.js +111 -0
  9. package/dist/engine/spec-templates/fintech-compliance.js.map +1 -0
  10. package/dist/engine/spec-templates/fintech-kyc.d.ts +4 -0
  11. package/dist/engine/spec-templates/fintech-kyc.d.ts.map +1 -0
  12. package/dist/engine/spec-templates/fintech-kyc.js +125 -0
  13. package/dist/engine/spec-templates/fintech-kyc.js.map +1 -0
  14. package/dist/engine/spec-templates/fintech-transactions.d.ts +4 -0
  15. package/dist/engine/spec-templates/fintech-transactions.d.ts.map +1 -0
  16. package/dist/engine/spec-templates/fintech-transactions.js +120 -0
  17. package/dist/engine/spec-templates/fintech-transactions.js.map +1 -0
  18. package/dist/engine/spec-templates/templates-industry-fintech.d.ts +3 -7
  19. package/dist/engine/spec-templates/templates-industry-fintech.d.ts.map +1 -1
  20. package/dist/engine/spec-templates/templates-industry-fintech.js +4 -348
  21. package/dist/engine/spec-templates/templates-industry-fintech.js.map +1 -1
  22. package/dist/engine/team-planner/distribution-planner.d.ts +7 -0
  23. package/dist/engine/team-planner/distribution-planner.d.ts.map +1 -0
  24. package/dist/engine/team-planner/distribution-planner.js +78 -0
  25. package/dist/engine/team-planner/distribution-planner.js.map +1 -0
  26. package/dist/engine/team-planner/index.d.ts +4 -0
  27. package/dist/engine/team-planner/index.d.ts.map +1 -0
  28. package/dist/engine/team-planner/index.js +5 -0
  29. package/dist/engine/team-planner/index.js.map +1 -0
  30. package/dist/engine/team-planner/prompt-builder.d.ts +7 -0
  31. package/dist/engine/team-planner/prompt-builder.d.ts.map +1 -0
  32. package/dist/engine/team-planner/prompt-builder.js +79 -0
  33. package/dist/engine/team-planner/prompt-builder.js.map +1 -0
  34. package/dist/engine/team-planner/result-validator.d.ts +7 -0
  35. package/dist/engine/team-planner/result-validator.d.ts.map +1 -0
  36. package/dist/engine/team-planner/result-validator.js +51 -0
  37. package/dist/engine/team-planner/result-validator.js.map +1 -0
  38. package/dist/index.js +2 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/tools/create-spec/post-creation.d.ts +3 -1
  41. package/dist/tools/create-spec/post-creation.d.ts.map +1 -1
  42. package/dist/tools/create-spec/post-creation.js +37 -1
  43. package/dist/tools/create-spec/post-creation.js.map +1 -1
  44. package/dist/tools/create-spec.d.ts.map +1 -1
  45. package/dist/tools/create-spec.js +6 -1
  46. package/dist/tools/create-spec.js.map +1 -1
  47. package/dist/tools/generate-teammate-prompt.d.ts +17 -0
  48. package/dist/tools/generate-teammate-prompt.d.ts.map +1 -0
  49. package/dist/tools/generate-teammate-prompt.js +86 -0
  50. package/dist/tools/generate-teammate-prompt.js.map +1 -0
  51. package/dist/tools/git/hook-ops.d.ts.map +1 -1
  52. package/dist/tools/git/hook-ops.js +10 -1
  53. package/dist/tools/git/hook-ops.js.map +1 -1
  54. package/dist/tools/init-project/handler.d.ts.map +1 -1
  55. package/dist/tools/init-project/handler.js +71 -1
  56. package/dist/tools/init-project/handler.js.map +1 -1
  57. package/dist/tools/init-project/helpers.d.ts +2 -2
  58. package/dist/tools/init-project/helpers.d.ts.map +1 -1
  59. package/dist/tools/init-project/helpers.js +3 -11
  60. package/dist/tools/init-project/helpers.js.map +1 -1
  61. package/dist/tools/init-project/result-builder.d.ts.map +1 -1
  62. package/dist/tools/init-project/result-builder.js +6 -0
  63. package/dist/tools/init-project/result-builder.js.map +1 -1
  64. package/dist/tools/list-specs.d.ts.map +1 -1
  65. package/dist/tools/list-specs.js +16 -0
  66. package/dist/tools/list-specs.js.map +1 -1
  67. package/dist/tools/plan-team-distribution.d.ts +9 -0
  68. package/dist/tools/plan-team-distribution.d.ts.map +1 -0
  69. package/dist/tools/plan-team-distribution.js +138 -0
  70. package/dist/tools/plan-team-distribution.js.map +1 -0
  71. package/dist/tools/register-team-tools.d.ts +3 -0
  72. package/dist/tools/register-team-tools.d.ts.map +1 -0
  73. package/dist/tools/register-team-tools.js +47 -0
  74. package/dist/tools/register-team-tools.js.map +1 -0
  75. package/dist/tools/update-status.d.ts.map +1 -1
  76. package/dist/tools/update-status.js +71 -3
  77. package/dist/tools/update-status.js.map +1 -1
  78. package/dist/tools/validate-team-results.d.ts +9 -0
  79. package/dist/tools/validate-team-results.d.ts.map +1 -0
  80. package/dist/tools/validate-team-results.js +82 -0
  81. package/dist/tools/validate-team-results.js.map +1 -0
  82. package/dist/types/index.d.ts +1 -0
  83. package/dist/types/index.d.ts.map +1 -1
  84. package/dist/types/index.js +1 -0
  85. package/dist/types/index.js.map +1 -1
  86. package/dist/types/project/agent.d.ts +12 -0
  87. package/dist/types/project/agent.d.ts.map +1 -0
  88. package/dist/types/project/agent.js +3 -0
  89. package/dist/types/project/agent.js.map +1 -0
  90. package/dist/types/project/architecture-detection.d.ts +23 -0
  91. package/dist/types/project/architecture-detection.d.ts.map +1 -0
  92. package/dist/types/project/architecture-detection.js +2 -0
  93. package/dist/types/project/architecture-detection.js.map +1 -0
  94. package/dist/types/project/config-metrics.d.ts +29 -0
  95. package/dist/types/project/config-metrics.d.ts.map +1 -0
  96. package/dist/types/project/config-metrics.js +2 -0
  97. package/dist/types/project/config-metrics.js.map +1 -0
  98. package/dist/types/project/constitution.d.ts +31 -0
  99. package/dist/types/project/constitution.d.ts.map +1 -0
  100. package/dist/types/project/constitution.js +3 -0
  101. package/dist/types/project/constitution.js.map +1 -0
  102. package/dist/types/project/core.d.ts +18 -163
  103. package/dist/types/project/core.d.ts.map +1 -1
  104. package/dist/types/project/core.js +7 -1
  105. package/dist/types/project/core.js.map +1 -1
  106. package/dist/types/project/mfe-detection.d.ts +18 -0
  107. package/dist/types/project/mfe-detection.d.ts.map +1 -0
  108. package/dist/types/project/mfe-detection.js +3 -0
  109. package/dist/types/project/mfe-detection.js.map +1 -0
  110. package/dist/types/project/planu-config.d.ts +59 -0
  111. package/dist/types/project/planu-config.d.ts.map +1 -0
  112. package/dist/types/project/planu-config.js +2 -0
  113. package/dist/types/project/planu-config.js.map +1 -0
  114. package/dist/types/spec/inputs.d.ts +5 -0
  115. package/dist/types/spec/inputs.d.ts.map +1 -1
  116. package/dist/types/team-planner.d.ts +183 -0
  117. package/dist/types/team-planner.d.ts.map +1 -0
  118. package/dist/types/team-planner.js +3 -0
  119. package/dist/types/team-planner.js.map +1 -0
  120. package/package.json +1 -1
  121. package/src/config/license-plans.json +4 -1
  122. package/src/config/team-templates.json +39 -0
@@ -1,350 +1,6 @@
1
- // engine/spec-templates/templates-industry-fintech.ts — Fintech industry templates.
1
+ // engine/spec-templates/templates-industry-fintech.ts — Barrel for fintech industry templates.
2
2
  // AC-04: Templates by industry — fintech vertical (KYC, transactions, compliance).
3
- /** Fintech KYC verification template. */
4
- export const FINTECH_KYC_TEMPLATE = {
5
- id: 'fintech-kyc',
6
- name: 'Verificacion de identidad (KYC)',
7
- category: 'industry',
8
- subcategory: 'fintech',
9
- description: 'Flujo de verificacion de identidad con niveles de verificacion, documentos y compliance AML.',
10
- tags: ['fintech', 'kyc', 'identity', 'compliance', 'aml'],
11
- complexityScore: 'L',
12
- estimationBase: {
13
- hoursMin: 40,
14
- hoursMax: 80,
15
- notes: 'Incluye integracion con proveedor de verificacion y flujo multi-nivel',
16
- },
17
- criteria: [
18
- { id: 'AC-1', title: 'Niveles de verificacion', required: true },
19
- { id: 'AC-2', title: 'Carga de documentos', required: true },
20
- { id: 'AC-3', title: 'Validacion automatica', required: true },
21
- { id: 'AC-4', title: 'Revision manual', required: false },
22
- { id: 'AC-5', title: 'Compliance AML', required: true },
23
- { id: 'AC-6', title: 'Auditoria', required: true },
24
- ],
25
- variables: [
26
- {
27
- key: 'ServiceName',
28
- label: 'Nombre del servicio',
29
- description: 'Nombre del servicio financiero',
30
- example: 'FinanceApp',
31
- required: true,
32
- },
33
- {
34
- key: 'KycLevels',
35
- label: 'Niveles KYC',
36
- description: 'Niveles de verificacion soportados',
37
- example: 'Basico, Intermedio, Avanzado',
38
- required: false,
39
- defaultValue: 'Basico, Intermedio, Avanzado',
40
- },
41
- ],
42
- huTemplate: `# HU: Verificacion de Identidad (KYC) — {{ServiceName}}
43
-
44
- ## Historia de Usuario
45
- Como usuario de {{ServiceName}}, quiero verificar mi identidad de forma progresiva para poder acceder a funcionalidades avanzadas del servicio.
46
-
47
- ## Criterios de Aceptacion
48
-
49
- ### AC-1: Niveles de verificacion
50
- - [ ] El sistema soporta niveles de verificacion: {{KycLevels}}
51
- - [ ] Cada nivel tiene requisitos documentales claros
52
- - [ ] El usuario puede ver su nivel actual y los requisitos del siguiente
53
- - [ ] Las funcionalidades se desbloquean segun el nivel alcanzado
54
-
55
- ### AC-2: Carga de documentos
56
- - [ ] El usuario puede subir documentos de identidad en formatos imagen y PDF
57
- - [ ] Los documentos se validan por formato, tamano y legibilidad
58
- - [ ] Se almacenan cifrados y con acceso restringido
59
- - [ ] Se genera un recibo de carga para el usuario
60
-
61
- ### AC-3: Validacion automatica
62
- - [ ] Los documentos pasan por validacion automatica (OCR + verificacion)
63
- - [ ] El resultado se comunica al usuario en tiempo real o por notificacion
64
- - [ ] Los documentos rechazados indican el motivo del rechazo
65
- - [ ] El usuario puede reintentar la verificacion con documentos nuevos
66
-
67
- ### AC-4: Revision manual
68
- - [ ] Los casos dudosos se escalan a revision manual
69
- - [ ] El revisor puede aprobar, rechazar o solicitar mas informacion
70
- - [ ] El historial de decisiones se registra para auditoria
71
-
72
- ### AC-5: Compliance AML
73
- - [ ] Se verifica contra listas de sanciones y PEP (personas expuestas politicamente)
74
- - [ ] Las alertas AML se registran y se escalan segun protocolo
75
- - [ ] La verificacion AML se repite periodicamente para usuarios existentes
76
- - [ ] Se mantiene registro de todas las verificaciones realizadas
77
-
78
- ### AC-6: Auditoria
79
- - [ ] Toda accion sobre documentos y verificaciones se registra con timestamp y actor
80
- - [ ] Los registros de auditoria son inmutables
81
- - [ ] Se puede generar reporte de auditoria por usuario o periodo
82
-
83
- ## Fuera de Alcance
84
- - Integracion con proveedores especificos de KYC (configurar en implementacion)
85
- - Verificacion biometrica (crear spec separada)
86
- `,
87
- fichaTecnicaTemplate: `# FICHA TÉCNICA: KYC — {{ServiceName}}
88
-
89
- ## Archivos Afectados
90
- - kyc/verification-levels
91
- - kyc/document-upload
92
- - kyc/automatic-validation
93
- - kyc/manual-review
94
- - kyc/aml-check
95
- - storage/documents (cifrado)
96
-
97
- ## Tipos / Entidades
98
- - \`KycLevel\`: id, name, requirements[], unlockedFeatures[]
99
- - \`VerificationDocument\`: id, userId, type, status, uploadedAt
100
- - \`AmlCheckResult\`: userId, checkDate, sanctionMatch, pepMatch, status
101
-
102
- ## Riesgos
103
- - Fuga de documentos personales → cifrado obligatorio + acceso restringido
104
- - Falsos positivos AML → flujo de revision manual requerido
105
- - Regulacion cambiante → arquitectura extensible para nuevos requisitos
106
-
107
- ## Estimacion
108
- - Dev: 40–80 horas
109
- - Review: 8–16 horas
110
- - Dificultad: 4/5
111
- `,
112
- progressTemplate: `# PROGRESS: KYC — {{ServiceName}}
113
-
114
- ## Estado: borrador
115
-
116
- ## Criterios
117
- - [ ] AC-1: Niveles de verificacion
118
- - [ ] AC-2: Carga de documentos
119
- - [ ] AC-3: Validacion automatica
120
- - [ ] AC-4: Revision manual
121
- - [ ] AC-5: Compliance AML
122
- - [ ] AC-6: Auditoria
123
- `,
124
- };
125
- /** Fintech transactions template. */
126
- export const FINTECH_TRANSACTIONS_TEMPLATE = {
127
- id: 'fintech-transactions',
128
- name: 'Gestion de transacciones financieras',
129
- category: 'industry',
130
- subcategory: 'fintech',
131
- description: 'Transacciones financieras con idempotencia, reversion, auditoria y limites.',
132
- tags: ['fintech', 'transactions', 'payments', 'idempotency', 'audit'],
133
- complexityScore: 'XL',
134
- estimationBase: {
135
- hoursMin: 80,
136
- hoursMax: 160,
137
- notes: 'Requiere idempotencia estricta y auditoria completa',
138
- },
139
- criteria: [
140
- { id: 'AC-1', title: 'Creacion de transacciones', required: true },
141
- { id: 'AC-2', title: 'Idempotencia', required: true },
142
- { id: 'AC-3', title: 'Reversion', required: true },
143
- { id: 'AC-4', title: 'Limites y controles', required: true },
144
- { id: 'AC-5', title: 'Auditoria', required: true },
145
- { id: 'AC-6', title: 'Conciliacion', required: false },
146
- ],
147
- variables: [
148
- {
149
- key: 'ServiceName',
150
- label: 'Nombre del servicio',
151
- description: 'Nombre del servicio financiero',
152
- example: 'FinanceApp',
153
- required: true,
154
- },
155
- {
156
- key: 'Currency',
157
- label: 'Moneda principal',
158
- description: 'Moneda principal del sistema',
159
- example: 'USD',
160
- required: false,
161
- defaultValue: 'USD',
162
- },
163
- ],
164
- huTemplate: `# HU: Transacciones Financieras — {{ServiceName}}
165
-
166
- ## Historia de Usuario
167
- Como usuario de {{ServiceName}}, quiero realizar transacciones financieras de forma segura y rastreable.
168
-
169
- ## Criterios de Aceptacion
170
-
171
- ### AC-1: Creacion de transacciones
172
- - [ ] Se puede crear una transaccion con monto, origen, destino y concepto
173
- - [ ] Cada transaccion recibe un ID unico e inmutable
174
- - [ ] Los montos se manejan en la menor unidad (centavos) para evitar errores de precision
175
- - [ ] La moneda ({{Currency}}) se registra explicitamente en cada transaccion
176
-
177
- ### AC-2: Idempotencia
178
- - [ ] Cada solicitud de transaccion incluye una clave de idempotencia
179
- - [ ] Solicitudes duplicadas retornan el resultado original sin ejecutar de nuevo
180
- - [ ] Las claves de idempotencia expiran despues de un periodo configurable
181
-
182
- ### AC-3: Reversion
183
- - [ ] Las transacciones pueden revertirse dentro del periodo permitido
184
- - [ ] La reversion genera una contra-transaccion (no elimina la original)
185
- - [ ] Las transacciones revertidas muestran estado "revertida" con referencia cruzada
186
-
187
- ### AC-4: Limites y controles
188
- - [ ] Limites por monto individual, diario y mensual por usuario
189
- - [ ] Transacciones que excedan limites requieren aprobacion adicional
190
- - [ ] Los limites son configurables por nivel de usuario/cuenta
191
-
192
- ### AC-5: Auditoria
193
- - [ ] Toda transaccion registra timestamp, actor, IP y dispositivo
194
- - [ ] Los registros de auditoria son inmutables (append-only)
195
- - [ ] Se puede consultar el historial completo de una transaccion
196
-
197
- ### AC-6: Conciliacion
198
- - [ ] Proceso de conciliacion periodica entre sistema interno y proveedores externos
199
- - [ ] Las discrepancias generan alertas automaticas
200
- - [ ] Reporte de conciliacion exportable
201
-
202
- ## Fuera de Alcance
203
- - Integracion con proveedores de pago especificos (ver template third-party-integration)
204
- `,
205
- fichaTecnicaTemplate: `# FICHA TÉCNICA: Transacciones — {{ServiceName}}
206
-
207
- ## Archivos Afectados
208
- - transactions/create
209
- - transactions/reverse
210
- - transactions/limits
211
- - transactions/audit-log
212
- - transactions/reconciliation
213
-
214
- ## Tipos / Entidades
215
- - \`Transaction\`: id, amount, currency, from, to, status, idempotencyKey, createdAt
216
- - \`TransactionLimit\`: userId, type (daily/monthly/single), maxAmount
217
- - \`AuditEntry\`: transactionId, action, actor, ip, timestamp
218
-
219
- ## Riesgos
220
- - Doble cargo sin idempotencia → claves de idempotencia obligatorias
221
- - Precision de montos → usar enteros (centavos), nunca floats
222
- - Reversion fuera de plazo → controles temporales estrictos
223
-
224
- ## Estimacion
225
- - Dev: 80–160 horas
226
- - Review: 16–32 horas
227
- - Dificultad: 5/5
228
- `,
229
- progressTemplate: `# PROGRESS: Transacciones — {{ServiceName}}
230
-
231
- ## Estado: borrador
232
-
233
- ## Criterios
234
- - [ ] AC-1: Creacion de transacciones
235
- - [ ] AC-2: Idempotencia
236
- - [ ] AC-3: Reversion
237
- - [ ] AC-4: Limites y controles
238
- - [ ] AC-5: Auditoria
239
- - [ ] AC-6: Conciliacion
240
- `,
241
- };
242
- /** Fintech compliance template. */
243
- export const FINTECH_COMPLIANCE_TEMPLATE = {
244
- id: 'fintech-compliance',
245
- name: 'Reportes de compliance regulatorio',
246
- category: 'industry',
247
- subcategory: 'fintech',
248
- description: 'Generacion de reportes regulatorios, retencion de datos y firma digital.',
249
- tags: ['fintech', 'compliance', 'regulatory', 'reporting', 'audit'],
250
- complexityScore: 'L',
251
- estimationBase: {
252
- hoursMin: 40,
253
- hoursMax: 80,
254
- notes: 'Depende de regulaciones locales aplicables',
255
- },
256
- criteria: [
257
- { id: 'AC-1', title: 'Generacion de reportes', required: true },
258
- { id: 'AC-2', title: 'Retencion de datos', required: true },
259
- { id: 'AC-3', title: 'Firma digital', required: false },
260
- { id: 'AC-4', title: 'Auditoria de acceso', required: true },
261
- { id: 'AC-5', title: 'Alertas de compliance', required: true },
262
- ],
263
- variables: [
264
- {
265
- key: 'ServiceName',
266
- label: 'Nombre del servicio',
267
- description: 'Nombre del servicio regulado',
268
- example: 'FinanceApp',
269
- required: true,
270
- },
271
- {
272
- key: 'Regulation',
273
- label: 'Regulacion aplicable',
274
- description: 'Regulacion principal a cumplir',
275
- example: 'PCI-DSS',
276
- required: false,
277
- defaultValue: 'regulacion local aplicable',
278
- },
279
- ],
280
- huTemplate: `# HU: Compliance Regulatorio — {{ServiceName}}
281
-
282
- ## Historia de Usuario
283
- Como responsable de compliance de {{ServiceName}}, quiero generar reportes regulatorios y mantener trazabilidad completa para cumplir con {{Regulation}}.
284
-
285
- ## Criterios de Aceptacion
286
-
287
- ### AC-1: Generacion de reportes
288
- - [ ] El sistema genera reportes regulatorios en formatos requeridos (PDF, XML, CSV)
289
- - [ ] Los reportes incluyen periodo, datos agregados y detalle por transaccion
290
- - [ ] La generacion es bajo demanda y programable (cron)
291
- - [ ] Los reportes se almacenan con hash de integridad
292
-
293
- ### AC-2: Retencion de datos
294
- - [ ] Los datos regulados se retienen por el periodo legalmente requerido
295
- - [ ] La politica de retencion es configurable por tipo de dato
296
- - [ ] Los datos expirados se eliminan de forma segura con registro de eliminacion
297
- - [ ] Se puede demostrar la cadena de custodia de cualquier dato
298
-
299
- ### AC-3: Firma digital
300
- - [ ] Los reportes pueden firmarse digitalmente antes del envio
301
- - [ ] Se verifica la integridad de reportes firmados al consultarlos
302
- - [ ] Los certificados de firma se gestionan de forma segura
303
-
304
- ### AC-4: Auditoria de acceso
305
- - [ ] Todo acceso a datos regulados se registra (quien, cuando, que)
306
- - [ ] Los registros de acceso son inmutables
307
- - [ ] Accesos anomalos generan alertas automaticas
308
-
309
- ### AC-5: Alertas de compliance
310
- - [ ] Se generan alertas cuando un proceso de compliance falla o se retrasa
311
- - [ ] Las alertas se escalan segun el protocolo definido
312
- - [ ] Se mantiene registro de alertas y sus resoluciones
313
- `,
314
- fichaTecnicaTemplate: `# FICHA TÉCNICA: Compliance — {{ServiceName}}
315
-
316
- ## Archivos Afectados
317
- - compliance/report-generator
318
- - compliance/data-retention
319
- - compliance/digital-signature
320
- - compliance/access-audit
321
- - compliance/alerts
322
-
323
- ## Tipos / Entidades
324
- - \`ComplianceReport\`: id, type, period, format, hash, signedAt
325
- - \`RetentionPolicy\`: dataType, retentionDays, deleteStrategy
326
- - \`AccessLog\`: userId, resource, action, timestamp, ip
327
-
328
- ## Riesgos
329
- - Reporte incorrecto → validacion cruzada con datos fuente
330
- - Perdida de datos antes del periodo de retencion → backups redundantes
331
- - Cambios regulatorios → arquitectura extensible para nuevas reglas
332
-
333
- ## Estimacion
334
- - Dev: 40–80 horas
335
- - Review: 8–16 horas
336
- - Dificultad: 4/5
337
- `,
338
- progressTemplate: `# PROGRESS: Compliance — {{ServiceName}}
339
-
340
- ## Estado: borrador
341
-
342
- ## Criterios
343
- - [ ] AC-1: Generacion de reportes
344
- - [ ] AC-2: Retencion de datos
345
- - [ ] AC-3: Firma digital
346
- - [ ] AC-4: Auditoria de acceso
347
- - [ ] AC-5: Alertas de compliance
348
- `,
349
- };
3
+ export { FINTECH_KYC_TEMPLATE } from './fintech-kyc.js';
4
+ export { FINTECH_TRANSACTIONS_TEMPLATE } from './fintech-transactions.js';
5
+ export { FINTECH_COMPLIANCE_TEMPLATE } from './fintech-compliance.js';
350
6
  //# sourceMappingURL=templates-industry-fintech.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates-industry-fintech.js","sourceRoot":"","sources":["../../../src/engine/spec-templates/templates-industry-fintech.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,mFAAmF;AAInF,yCAAyC;AACzC,MAAM,CAAC,MAAM,oBAAoB,GAAsB;IACrD,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,iCAAiC;IACvC,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,SAAS;IACtB,WAAW,EACT,8FAA8F;IAChG,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,CAAC;IACzD,eAAe,EAAE,GAAG;IACpB,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,uEAAuE;KAC/E;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE;QAChE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5D,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC9D,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE;QACzD,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE;QACvD,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE;KACnD;IACD,SAAS,EAAE;QACT;YACE,GAA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AAQ,EAAE,IAAI,EAAE;QAC3D,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,KAAK,EAAE;QACvD,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5D,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC/D;IACD,SAAS,EAAE;QACT;YACE,GAAG,EAAE,aAAa;YAClB,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,YAAY;YACrB,QAAQ,EAAE,IAAI;SACf;QACD;YACE,GAAG,EAAE,YAAY;YACjB,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EAAE,gCAAgC;YAC7C,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,4BAA4B;SAC3C;KACF;IACD,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCb;IACC,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;CAuBvB;IACC,gBAAgB,EAAE;;;;;;;;;;CAUnB;CACA,CAAC"}
1
+ {"version":3,"file":"templates-industry-fintech.js","sourceRoot":"","sources":["../../../src/engine/spec-templates/templates-industry-fintech.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,mFAAmF;AAEnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { TeamDistributionPlan, TeamPlannerSpecInput, TeamTemplateRef } from '../../types/index.js';
2
+ /**
3
+ * Plan how to distribute specs across a team of Claude Code agents.
4
+ * Detects file conflicts between specs and produces phased execution order.
5
+ */
6
+ export declare function planTeamDistribution(specs: TeamPlannerSpecInput[], fileOwnership: Record<string, string[]>, template?: TeamTemplateRef): TeamDistributionPlan;
7
+ //# sourceMappingURL=distribution-planner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distribution-planner.d.ts","sourceRoot":"","sources":["../../../src/engine/team-planner/distribution-planner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,oBAAoB,EAAE,EAC7B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACvC,QAAQ,CAAC,EAAE,eAAe,GACzB,oBAAoB,CAkFtB"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Plan how to distribute specs across a team of Claude Code agents.
3
+ * Detects file conflicts between specs and produces phased execution order.
4
+ */
5
+ export function planTeamDistribution(specs, fileOwnership, template) {
6
+ const templateName = template?.id ?? 'parallel-specs';
7
+ if (specs.length === 0) {
8
+ return {
9
+ teamName: `team-${templateName}`,
10
+ teamSize: 0,
11
+ teammates: [],
12
+ executionOrder: [],
13
+ estimatedDuration: '0h',
14
+ warnings: [],
15
+ };
16
+ }
17
+ const teamSize = Math.min(specs.length, 5);
18
+ const teammates = specs.slice(0, teamSize).map((s) => ({
19
+ name: `${s.id.toLowerCase()}-impl`,
20
+ role: 'implementer',
21
+ model: 'sonnet',
22
+ specs: [s.id],
23
+ ownedFiles: fileOwnership[s.id] ?? [],
24
+ prompt: '',
25
+ }));
26
+ // Detect file conflicts: specs sharing files go into sequential phases
27
+ const fileToSpecs = new Map();
28
+ for (const s of specs) {
29
+ const files = fileOwnership[s.id] ?? [];
30
+ for (const f of files) {
31
+ const existing = fileToSpecs.get(f) ?? [];
32
+ existing.push(s.id);
33
+ fileToSpecs.set(f, existing);
34
+ }
35
+ }
36
+ const conflicts = [...fileToSpecs.entries()].filter(([, sIds]) => sIds.length > 1);
37
+ const conflictingSpecs = new Set(conflicts.flatMap(([, sIds]) => sIds));
38
+ const warnings = conflicts.map(([file, sIds]) => `File conflict: ${file} shared by ${sIds.join(', ')}`);
39
+ // Build phases: non-conflicting in phase 1, conflicting in phase 2+
40
+ const phases = [];
41
+ const phase1Names = teammates
42
+ .filter((t) => !t.specs.some((id) => conflictingSpecs.has(id)))
43
+ .map((t) => t.name);
44
+ const phase2Names = teammates
45
+ .filter((t) => t.specs.some((id) => conflictingSpecs.has(id)))
46
+ .map((t) => t.name);
47
+ if (phase1Names.length > 0) {
48
+ phases.push({
49
+ phase: 1,
50
+ teammates: phase1Names,
51
+ reason: 'No file conflicts — safe for parallel execution',
52
+ });
53
+ }
54
+ if (phase2Names.length > 0) {
55
+ phases.push({
56
+ phase: phases.length + 1,
57
+ teammates: phase2Names,
58
+ reason: 'File conflicts detected — sequential execution required',
59
+ });
60
+ }
61
+ // If all are conflict-free and phases is empty, put everything in phase 1
62
+ if (phases.length === 0 && teammates.length > 0) {
63
+ phases.push({
64
+ phase: 1,
65
+ teammates: teammates.map((t) => t.name),
66
+ reason: 'No file conflicts — safe for parallel execution',
67
+ });
68
+ }
69
+ return {
70
+ teamName: `team-${templateName}`,
71
+ teamSize,
72
+ teammates,
73
+ executionOrder: phases,
74
+ estimatedDuration: `${String(teamSize * 2)}h`,
75
+ warnings,
76
+ };
77
+ }
78
+ //# sourceMappingURL=distribution-planner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distribution-planner.js","sourceRoot":"","sources":["../../../src/engine/team-planner/distribution-planner.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,KAA6B,EAC7B,aAAuC,EACvC,QAA0B;IAE1B,MAAM,YAAY,GAAG,QAAQ,EAAE,EAAE,IAAI,gBAAgB,CAAC;IAEtD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,O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C,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,MAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC;YACxB,SAAS,EAAE,WAAW;YACtB,MAAM,EAAE,yDAAyD;SAClE,CAAC,CAAC;IACL,CAAC;IACD,0EAA0E;IAC1E,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,MAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,CAAC;YACR,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACvC,MAAM,EAAE,iDAAiD;SAC1D,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,QAAQ,YAAY,EAAE;QAChC,QAAQ;QACR,SAAS;QACT,cAAc,EAAE,MAAM;QACtB,iBAAiB,EAAE,GAAG,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG;QAC7C,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { planTeamDistribution } from './distribution-planner.js';
2
+ export { buildTeammatePrompt } from './prompt-builder.js';
3
+ export { validateTeamResults } from './result-validator.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/engine/team-planner/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ // engine/team-planner/index.ts — Barrel export for team planner module (SPEC-091)
2
+ export { planTeamDistribution } from './distribution-planner.js';
3
+ export { buildTeammatePrompt } from './prompt-builder.js';
4
+ export { validateTeamResults } from './result-validator.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/engine/team-planner/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { TeammatePromptContext } from '../../types/index.js';
2
+ /**
3
+ * Build a structured prompt for a single teammate in an Agent Team.
4
+ * The prompt contains all context the teammate needs to execute independently.
5
+ */
6
+ export declare function buildTeammatePrompt(context: TeammatePromptContext): string;
7
+ //# sourceMappingURL=prompt-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-builder.d.ts","sourceRoot":"","sources":["../../../src/engine/team-planner/prompt-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAmF1E"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Build a structured prompt for a single teammate in an Agent Team.
3
+ * The prompt contains all context the teammate needs to execute independently.
4
+ */
5
+ export function buildTeammatePrompt(context) {
6
+ const sections = [];
7
+ // Header
8
+ sections.push(`# Teammate Assignment: ${context.specDetails.id}`);
9
+ sections.push('');
10
+ sections.push(`## Spec: ${context.specDetails.title}`);
11
+ sections.push('');
12
+ // Criteria
13
+ if (context.specDetails.criteria.length > 0) {
14
+ sections.push('## Acceptance Criteria');
15
+ for (const c of context.specDetails.criteria) {
16
+ sections.push(`- ${c}`);
17
+ }
18
+ sections.push('');
19
+ }
20
+ // Project context
21
+ sections.push('## Project Context');
22
+ sections.push(`- Language: ${context.projectLanguage}`);
23
+ if (context.projectFramework) {
24
+ sections.push(`- Framework: ${context.projectFramework}`);
25
+ }
26
+ sections.push(`- Architecture: ${context.architecture}`);
27
+ sections.push('');
28
+ // File ownership
29
+ if (context.ownedFiles.length > 0) {
30
+ sections.push('## Owned Files (exclusive write access)');
31
+ for (const f of context.ownedFiles) {
32
+ sections.push(`- ${f}`);
33
+ }
34
+ sections.push('');
35
+ }
36
+ // Forbidden files
37
+ if (context.forbiddenFiles.length > 0) {
38
+ sections.push('## Forbidden Files (DO NOT modify)');
39
+ for (const f of context.forbiddenFiles) {
40
+ sections.push(`- ${f}`);
41
+ }
42
+ sections.push('');
43
+ }
44
+ // Quality rules
45
+ if (context.qualityRules.length > 0) {
46
+ sections.push('## Quality Rules');
47
+ for (const r of context.qualityRules) {
48
+ sections.push(`- ${r}`);
49
+ }
50
+ sections.push('');
51
+ }
52
+ // Testing requirements
53
+ if (context.testingRequirements.length > 0) {
54
+ sections.push('## Testing Requirements');
55
+ for (const t of context.testingRequirements) {
56
+ sections.push(`- ${t}`);
57
+ }
58
+ sections.push('');
59
+ }
60
+ // Git conventions
61
+ if (context.gitConventions.length > 0) {
62
+ sections.push('## Git Conventions');
63
+ for (const g of context.gitConventions) {
64
+ sections.push(`- ${g}`);
65
+ }
66
+ sections.push('');
67
+ }
68
+ // Validation commands
69
+ if (context.validationCommands.length > 0) {
70
+ sections.push('## Validation Commands');
71
+ sections.push('Run these commands before reporting done:');
72
+ for (const v of context.validationCommands) {
73
+ sections.push(`\`\`\`bash\n${v}\n\`\`\``);
74
+ }
75
+ sections.push('');
76
+ }
77
+ return sections.join('\n');
78
+ }
79
+ //# sourceMappingURL=prompt-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-builder.js","sourceRoot":"","sources":["../../../src/engine/team-planner/prompt-builder.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAA8B;IAChE,MAAM,QAAQ,GAAa,EAAE,CAAC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AoB,CAAC,CAAC;QACpC,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;YACvC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IAED,sBAAsB;IACtB,IAAI,OAAO,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,QAAQ,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QACxC,QAAQ,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAC3D,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;YAC3C,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAC5C,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { TeamValidationResult, TeammateOutput } from '../../types/index.js';
2
+ /**
3
+ * Validate the combined results from all teammates after parallel execution.
4
+ * Checks for file conflicts between teammates and criteria coverage.
5
+ */
6
+ export declare function validateTeamResults(teammateOutputs: TeammateOutput[], expectedCriteria: Record<string, string[]>, fileOwnershipPlan: Record<string, string>): TeamValidationResult;
7
+ //# sourceMappingURL=result-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-validator.d.ts","sourceRoot":"","sources":["../../../src/engine/team-planner/result-validator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjF;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,cAAc,EAAE,EACjC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAC1C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,oBAAoB,CAkDtB"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Validate the combined results from all teammates after parallel execution.
3
+ * Checks for file conflicts between teammates and criteria coverage.
4
+ */
5
+ export function validateTeamResults(teammateOutputs, expectedCriteria, fileOwnershipPlan) {
6
+ // Detect file conflicts: same file modified by multiple teammates
7
+ const fileToTeammates = new Map();
8
+ for (const output of teammateOutputs) {
9
+ for (const file of output.modifiedFiles) {
10
+ const existing = fileToTeammates.get(file) ?? [];
11
+ existing.push(output.name);
12
+ fileToTeammates.set(file, existing);
13
+ }
14
+ }
15
+ const fileConflicts = [...fileToTeammates.entries()]
16
+ .filter(([, teammates]) => teammates.length > 1)
17
+ .map(([file, teammates]) => ({ file, teammates }));
18
+ // Also check ownership violations
19
+ for (const [file, expectedOwner] of Object.entries(fileOwnershipPlan)) {
20
+ const modifiers = fileToTeammates.get(file);
21
+ if (modifiers?.length === 1 && modifiers[0] !== expectedOwner) {
22
+ fileConflicts.push({
23
+ file,
24
+ teammates: [expectedOwner, modifiers[0] ?? 'unknown'],
25
+ });
26
+ }
27
+ }
28
+ // Check criteria coverage per spec
29
+ const allCovered = new Set(teammateOutputs.flatMap((o) => o.coveredCriteria));
30
+ const criteriaReport = [];
31
+ for (const [specId, criteria] of Object.entries(expectedCriteria)) {
32
+ const covered = criteria.filter((c) => allCovered.has(c)).length;
33
+ criteriaReport.push({ specId, covered, total: criteria.length });
34
+ }
35
+ const allCriteriaMet = criteriaReport.every((r) => r.total === 0 || r.covered === r.total);
36
+ const passed = allCriteriaMet && fileConflicts.length === 0;
37
+ return {
38
+ passed,
39
+ typecheckPassed: true, // LLM runs these commands separately
40
+ lintPassed: true,
41
+ testsPassed: true,
42
+ coveragePassed: true,
43
+ fileConflicts,
44
+ criteriaReport,
45
+ mergeOrder: teammateOutputs.map((o) => o.name),
46
+ summary: passed
47
+ ? `All ${String(teammateOutputs.length)} teammates passed validation.`
48
+ : `Validation issues: ${String(fileConflicts.length)} file conflict(s), ${String(criteriaReport.filter((r) => r.covered < r.total).length)} spec(s) with missing criteria.`,
49
+ };
50
+ }
51
+ //# sourceMappingURL=result-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-validator.js","sourceRoot":"","sources":["../../../src/engine/team-planner/result-validator.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,eAAiC,EACjC,gBAA0C,EAC1C,iBAAyC;IAEzC,kEAAkE;IAClE,MAAM,eAAe,GAAG,IAAI,GAAG,EAAoB,CAAC;IACpD,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;QACrC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;YACxC,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACjD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,MAAM,aAAa,GAAG,CAAC,GAAG,eAAe,CAAC,OAAO,EAAE,CAAC;SACjD,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;SAC/C,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;IAErD,kCAAkC;IAClC,KAAK,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACtE,MAAM,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,SAA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