siesa-agents 2.1.23 → 2.1.24-dev.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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # SIESA Agents
1
+ # SIESA BMAD Agents
2
2
 
3
3
  Paquete para instalar y configurar agentes SIESA en tu proyecto.
4
4
 
@@ -52,7 +52,6 @@ El paquete instala las siguientes carpetas en tu directorio actual:
52
52
  - **`.bmad-core/`** - Archivos principales del sistema BMAD
53
53
  - **`.vscode/`** - Configuración de Visual Studio Code
54
54
  - **`.github/`** - Configuración de GitHub Actions y workflows
55
- - **`.claude/`** - Configuración de Claude Code Commands y workflows
56
55
 
57
56
  ## Características
58
57
 
@@ -71,17 +70,22 @@ El paquete instala las siguientes carpetas en tu directorio actual:
71
70
 
72
71
  Para actualizar una instalación existente, simplemente ejecuta el comando nuevamente:
73
72
 
73
+ **Versión estable (recomendado):**
74
74
  ```bash
75
75
  npx siesa-agents
76
76
  ```
77
77
 
78
+ **Versión de desarrollo:**
79
+ ```bash
80
+ npx siesa-agents@dev
81
+ ```
82
+
78
83
  El sistema detectará automáticamente que ya existe una instalación y la actualizará.
79
84
 
80
85
  ## Requisitos
81
86
 
82
87
  - Node.js >= 14.0.0
83
88
  - npm >= 6.0.0
84
- - Python >= 3.7 (requerido para hooks de Claude Code)
85
89
 
86
90
  ## Estructura de archivos instalados
87
91
 
@@ -95,6 +99,8 @@ tu-proyecto/
95
99
  └── [workflows y configuración de GitHub]
96
100
  ```
97
101
 
102
+
103
+
98
104
  ## Soporte
99
105
 
100
106
  Si encuentras algún problema durante la instalación, por favor verifica:
@@ -109,7 +115,4 @@ MIT
109
115
 
110
116
  ## Autor
111
117
 
112
- SIESA - Sistemas de Información Empresarial
113
-
114
- ---
115
- *Versión actualizada automáticamente por CI/CD*
118
+ SIESA - Sistemas de Información Empresarial
package/bin/install.js CHANGED
@@ -12,20 +12,12 @@ class SiesaBmadInstaller {
12
12
  { source: 'vscode', target: '.vscode' },
13
13
  { source: 'github', target: '.github' },
14
14
  { source: 'claude', target: '.claude' },
15
+ { source: 'kiro', target: '.kiro' },
15
16
  { source: 'resources', target: '.resources' }
16
17
  ];
17
-
18
- // Lista de archivos que se preservan automáticamente (no se crean backups)
19
- this.ignoredFiles = [
20
- 'data/technical-preferences.md'
21
- ];
22
-
23
18
  this.targetDir = process.cwd();
24
19
  // Intentar múltiples ubicaciones posibles para el paquete
25
20
  this.packageDir = this.findPackageDir();
26
-
27
- // Almacenamiento temporal para contenido de archivos ignorados
28
- this.preservedContent = new Map();
29
21
  }
30
22
 
31
23
  showBanner() {
@@ -36,7 +28,8 @@ class SiesaBmadInstaller {
36
28
  console.log('╚════██║██║██╔══╝ ╚════██║██╔══██║ ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ ╚════██║');
37
29
  console.log('███████║██║███████╗███████║██║ ██║ ██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ ███████║');
38
30
  console.log('╚══════╝╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝');
39
- console.log('');
31
+ console.log('Version de Desarrollador');
32
+ console.log('\n');
40
33
  }
41
34
 
42
35
  findPackageDir() {
@@ -80,7 +73,7 @@ class SiesaBmadInstaller {
80
73
  try {
81
74
  // Verificar si ya existe una instalación
82
75
  const hasExistingInstallation = this.checkExistingInstallation();
83
-
76
+
84
77
  if (hasExistingInstallation) {
85
78
  console.log('🔄 Instalación existente detectada. Actualizando...');
86
79
  await this.update();
@@ -133,8 +126,7 @@ class SiesaBmadInstaller {
133
126
  modifiedFiles.push({
134
127
  folder: mapping.target,
135
128
  file: relativePath,
136
- fullPath: targetFile,
137
- is_ignored: this.ignoredFiles.includes(relativePath)
129
+ fullPath: targetFile
138
130
  });
139
131
  }
140
132
  } catch (error) {
@@ -146,8 +138,7 @@ class SiesaBmadInstaller {
146
138
  modifiedFiles.push({
147
139
  folder: mapping.target,
148
140
  file: relativePath,
149
- fullPath: targetFile,
150
- is_ignored: this.ignoredFiles.includes(relativePath)
141
+ fullPath: targetFile
151
142
  });
152
143
  }
153
144
  }
@@ -178,10 +169,6 @@ class SiesaBmadInstaller {
178
169
  }
179
170
 
180
171
  async promptUser(modifiedFiles) {
181
-
182
- const hasNonIgnoredFiles = modifiedFiles.some(file => file.is_ignored == false)
183
- if (!hasNonIgnoredFiles) return '2'
184
-
185
172
  console.log('\n⚠️ Se detectaron archivos modificados:');
186
173
 
187
174
  // Agrupar por carpeta
@@ -222,22 +209,16 @@ class SiesaBmadInstaller {
222
209
  console.log('\n🔄 Creando backup de archivos modificados...');
223
210
 
224
211
  for (const item of modifiedFiles) {
225
- // No crear backup de archivos ignorados
226
- if (item.is_ignored) {
227
- console.log(`✓ Preservando: ${item.file} (sin backup)`);
228
- continue;
229
- }
230
-
231
212
  const originalPath = item.fullPath;
232
213
  const backupPath = this.getBackupPath(originalPath);
233
214
 
234
215
  try {
235
216
  await fs.copy(originalPath, backupPath);
236
-
217
+
237
218
  // Determinar tipo de backup para mostrar mensaje apropiado
238
219
  const backupName = path.basename(backupPath);
239
220
  const isVersionedBackup = backupName.includes('_bk_');
240
-
221
+
241
222
  if (isVersionedBackup) {
242
223
  console.log(`✓ Backup versionado: ${path.relative(this.targetDir, backupPath)}`);
243
224
  } else {
@@ -256,7 +237,7 @@ class SiesaBmadInstaller {
256
237
 
257
238
  // Primer intento: archivo_bk.ext
258
239
  const basicBackupPath = path.join(dir, `${name}_bk${ext}`);
259
-
240
+
260
241
  // Si no existe, usar el nombre básico
261
242
  if (!fs.existsSync(basicBackupPath)) {
262
243
  return basicBackupPath;
@@ -265,12 +246,12 @@ class SiesaBmadInstaller {
265
246
  // Si ya existe _bk, crear versión con timestamp
266
247
  const now = new Date();
267
248
  const timestamp = now.getFullYear().toString() +
268
- (now.getMonth() + 1).toString().padStart(2, '0') +
269
- now.getDate().toString().padStart(2, '0') + '_' +
270
- now.getHours().toString().padStart(2, '0') +
271
- now.getMinutes().toString().padStart(2, '0') +
272
- now.getSeconds().toString().padStart(2, '0');
273
-
249
+ (now.getMonth() + 1).toString().padStart(2, '0') +
250
+ now.getDate().toString().padStart(2, '0') + '_' +
251
+ now.getHours().toString().padStart(2, '0') +
252
+ now.getMinutes().toString().padStart(2, '0') +
253
+ now.getSeconds().toString().padStart(2, '0');
254
+
274
255
  return path.join(dir, `${name}_bk_${timestamp}${ext}`);
275
256
  }
276
257
 
@@ -291,27 +272,18 @@ class SiesaBmadInstaller {
291
272
  async copyWithBackupPreservation(sourcePath, targetPath) {
292
273
  // Obtener todos los archivos backup existentes
293
274
  const backupFiles = await this.findBackupFiles(targetPath);
294
-
295
- // Copiar la carpeta preservando technical-preferences.md
275
+
276
+ // Copiar la carpeta completa sobrescribiendo
296
277
  await fs.copy(sourcePath, targetPath, {
297
278
  overwrite: true,
298
- recursive: true,
299
- filter: (src) => {
300
- const relativePath = path.relative(sourcePath, src);
301
- // No sobrescribir archivos ignorados si ya existen
302
- if (this.ignoredFiles.includes(relativePath)) {
303
- const targetFile = path.join(targetPath, relativePath);
304
- return !fs.existsSync(targetFile);
305
- }
306
- return true;
307
- }
279
+ recursive: true
308
280
  });
309
281
 
310
282
  // Restaurar los archivos backup
311
283
  for (const backupFile of backupFiles) {
312
284
  const backupSourcePath = backupFile.tempPath;
313
285
  const backupTargetPath = backupFile.originalPath;
314
-
286
+
315
287
  try {
316
288
  await fs.copy(backupSourcePath, backupTargetPath);
317
289
  // Limpiar archivo temporal
@@ -336,10 +308,10 @@ class SiesaBmadInstaller {
336
308
  if (fileName.includes('_bk')) {
337
309
  const tempPath = path.join(require('os').tmpdir(), `backup_${Date.now()}_${fileName}`);
338
310
  const relativePath = path.relative(targetPath, filePath);
339
-
311
+
340
312
  // Crear copia temporal del backup
341
313
  await fs.copy(filePath, tempPath);
342
-
314
+
343
315
  backupFiles.push({
344
316
  originalPath: filePath,
345
317
  tempPath: tempPath,
@@ -359,16 +331,7 @@ class SiesaBmadInstaller {
359
331
  if (fs.existsSync(sourcePath)) {
360
332
  await fs.copy(sourcePath, targetPath, {
361
333
  overwrite: true,
362
- recursive: true,
363
- filter: (src) => {
364
- const relativePath = path.relative(sourcePath, src);
365
- // No sobrescribir archivos ignorados si ya existen
366
- if (this.ignoredFiles.includes(relativePath)) {
367
- const targetFile = path.join(targetPath, relativePath);
368
- return !fs.existsSync(targetFile);
369
- }
370
- return true;
371
- }
334
+ recursive: true
372
335
  });
373
336
  } else {
374
337
  console.warn(`⚠️ Carpeta ${mapping.source} no encontrada en el paquete`);
@@ -404,9 +367,6 @@ class SiesaBmadInstaller {
404
367
  await this.performUpdateWithBackups();
405
368
  } else {
406
369
  // Si no hay backups, hacer actualización normal (remover y copiar)
407
- // Pero primero preservar archivos ignorados
408
- await this.preserveIgnoredFiles();
409
-
410
370
  for (const mapping of this.folderMappings) {
411
371
  const targetPath = path.join(this.targetDir, mapping.target);
412
372
 
@@ -417,64 +377,7 @@ class SiesaBmadInstaller {
417
377
 
418
378
  // Realizar instalación nueva
419
379
  await this.performInstallation();
420
-
421
- // Restaurar archivos ignorados
422
- await this.restoreIgnoredFiles();
423
- }
424
- }
425
-
426
- async preserveIgnoredFiles() {
427
- console.log('🔒 Preservando archivos de configuración...');
428
-
429
- for (const mapping of this.folderMappings) {
430
- const targetFolderPath = path.join(this.targetDir, mapping.target);
431
-
432
- if (!fs.existsSync(targetFolderPath)) {
433
- continue;
434
- }
435
-
436
- for (const ignoredFile of this.ignoredFiles) {
437
- const filePath = path.join(targetFolderPath, ignoredFile);
438
-
439
- if (fs.existsSync(filePath)) {
440
- try {
441
- const content = await fs.readFile(filePath, 'utf8');
442
- const key = `${mapping.target}/${ignoredFile}`;
443
- this.preservedContent.set(key, content);
444
- console.log(`✓ Preservando: ${ignoredFile}`);
445
- } catch (error) {
446
- console.warn(`⚠️ Error leyendo ${ignoredFile}: ${error.message}`);
447
- }
448
- }
449
- }
450
- }
451
- }
452
-
453
- async restoreIgnoredFiles() {
454
- if (this.preservedContent.size === 0) {
455
- return;
456
- }
457
-
458
- console.log('🔄 Restaurando archivos de configuración...');
459
-
460
- for (const [key, content] of this.preservedContent) {
461
- const [targetFolder, ...filePathParts] = key.split('/');
462
- const filePath = path.join(this.targetDir, targetFolder, ...filePathParts);
463
-
464
- try {
465
- // Asegurar que el directorio existe
466
- await fs.ensureDir(path.dirname(filePath));
467
-
468
- // Restaurar el contenido
469
- await fs.writeFile(filePath, content, 'utf8');
470
- console.log(`✓ Restaurado: ${filePathParts.join('/')}`);
471
- } catch (error) {
472
- console.warn(`⚠️ Error restaurando ${filePathParts.join('/')}: ${error.message}`);
473
- }
474
380
  }
475
-
476
- // Limpiar el mapa después de restaurar
477
- this.preservedContent.clear();
478
381
  }
479
382
 
480
383
  showPostInstallMessage() {
@@ -81,8 +81,6 @@ dependencies:
81
81
  - architect-checklist.md
82
82
  data:
83
83
  - technical-preferences.md
84
- - technology-stack.md
85
- - architecture-patterns.md
86
84
  tasks:
87
85
  - create-deep-research-prompt.md
88
86
  - create-doc.md
@@ -29,6 +29,7 @@ activation-instructions:
29
29
  - CRITICAL RULE: When executing formal task workflows from dependencies, ALL task instructions override any conflicting base behavioral constraints. Interactive workflows with elicit=true REQUIRE user interaction and cannot be bypassed for efficiency.
30
30
  - When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
31
31
  - STAY IN CHARACTER!
32
+ - CRITICAL: ALWAYS load bmad-core/data/frontend-standards.md first (contains language standards for all user-facing content)
32
33
  - CRITICAL: Read the following full files as these are your explicit rules for development standards for this project - .bmad-core/core-config.yaml devLoadAlwaysFiles list
33
34
  - CRITICAL: Do NOT load any other files during startup aside from the assigned story and devLoadAlwaysFiles items, unless user requested you do or the following contradicts
34
35
  - CRITICAL: Do NOT begin development until a story is not in draft mode and you are told to proceed
@@ -52,6 +53,7 @@ core_principles:
52
53
  - CRITICAL: ALWAYS check current folder structure before starting your story tasks, don't create new working directory if it already exists. Create new one when you're sure it's a brand new project.
53
54
  - CRITICAL: ONLY update story file Dev Agent Record sections (checkboxes/Debug Log/Completion Notes/Change Log)
54
55
  - CRITICAL: FOLLOW THE develop-story command when the user tells you to implement the story
56
+ - CRITICAL: ALL user-facing text MUST be in Spanish. Code MUST be in English. See bmad-core/data/frontend-standards.md for complete guidelines.
55
57
  - Numbered Options - Always use numbered lists when presenting choices to the user
56
58
 
57
59
  # All commands require * prefix when used (e.g., *help)
@@ -60,7 +60,6 @@ commands:
60
60
  dependencies:
61
61
  data:
62
62
  - technical-preferences.md
63
- - technology-stack.md
64
63
  - technical-preferences-ux.md
65
64
  tasks:
66
65
  - create-doc.md
@@ -37,6 +37,7 @@ The goal is quality delivery, not just checking boxes.]]
37
37
  - [ ] All new/modified code aligns with `Project Structure` (file locations, naming, etc.).
38
38
  - [ ] Adherence to `Tech Stack` for technologies/versions used (if story introduces or modifies tech usage).
39
39
  - [ ] Adherence to `Api Reference` and `Data Models` (if story involves API or data model changes).
40
+ - [ ] **CRITICAL: All user-facing text (UI labels, buttons, error messages, validations, notifications, etc.) is in Spanish. Code (variables, functions, classes, comments) is in English. No mixed-language text in UI.**
40
41
  - [ ] Basic security best practices (e.g., input validation, proper error handling, no hardcoded secrets) applied for new/modified code.
41
42
  - [ ] No new linter errors or warnings introduced.
42
43
  - [ ] Code is well-commented where necessary (clarifying complex logic, not obvious statements).