siesa-agents 1.0.0 → 1.0.1
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 +83 -83
- package/bin/install.js +154 -154
- package/bin/prepare-publish.js +1 -1
- package/index.js +9 -10
- package/package.json +1 -4
- package/bmad-core/agent-teams/team-all.yaml +0 -15
- package/bmad-core/agent-teams/team-fullstack.yaml +0 -19
- package/bmad-core/agent-teams/team-ide-minimal.yaml +0 -11
- package/bmad-core/agent-teams/team-no-ui.yaml +0 -14
- package/bmad-core/agents/analyst.md +0 -84
- package/bmad-core/agents/architect.md +0 -94
- package/bmad-core/agents/backend-agent.md +0 -190
- package/bmad-core/agents/bmad-master.md +0 -110
- package/bmad-core/agents/bmad-orchestrator.md +0 -147
- package/bmad-core/agents/dev.md +0 -81
- package/bmad-core/agents/frontend-agent.md +0 -169
- package/bmad-core/agents/pm.md +0 -84
- package/bmad-core/agents/po.md +0 -79
- package/bmad-core/agents/qa.md +0 -91
- package/bmad-core/agents/sm.md +0 -65
- package/bmad-core/agents/ux-expert.md +0 -69
- package/bmad-core/checklists/architect-checklist.md +0 -440
- package/bmad-core/checklists/backend-checklist.md +0 -143
- package/bmad-core/checklists/change-checklist.md +0 -184
- package/bmad-core/checklists/frontend-checklist.md +0 -106
- package/bmad-core/checklists/pm-checklist.md +0 -372
- package/bmad-core/checklists/po-master-checklist.md +0 -434
- package/bmad-core/checklists/story-dod-checklist.md +0 -96
- package/bmad-core/checklists/story-draft-checklist.md +0 -155
- package/bmad-core/core-config.yaml +0 -22
- package/bmad-core/data/backend-standards.md +0 -440
- package/bmad-core/data/bmad-kb.md +0 -809
- package/bmad-core/data/brainstorming-techniques.md +0 -38
- package/bmad-core/data/elicitation-methods.md +0 -156
- package/bmad-core/data/frontend-standards.md +0 -324
- package/bmad-core/data/technical-preferences.md +0 -5
- package/bmad-core/data/test-levels-framework.md +0 -148
- package/bmad-core/data/test-priorities-matrix.md +0 -174
- package/bmad-core/enhanced-ide-development-workflow.md +0 -248
- package/bmad-core/install-manifest.yaml +0 -230
- package/bmad-core/tasks/advanced-elicitation.md +0 -119
- package/bmad-core/tasks/apply-qa-fixes.md +0 -150
- package/bmad-core/tasks/brownfield-create-epic.md +0 -162
- package/bmad-core/tasks/brownfield-create-story.md +0 -149
- package/bmad-core/tasks/correct-course.md +0 -72
- package/bmad-core/tasks/create-brownfield-story.md +0 -314
- package/bmad-core/tasks/create-component.md +0 -103
- package/bmad-core/tasks/create-deep-research-prompt.md +0 -280
- package/bmad-core/tasks/create-doc.md +0 -103
- package/bmad-core/tasks/create-entity.md +0 -133
- package/bmad-core/tasks/create-feature.md +0 -91
- package/bmad-core/tasks/create-next-story.md +0 -114
- package/bmad-core/tasks/create-service.md +0 -118
- package/bmad-core/tasks/create-use-case.md +0 -141
- package/bmad-core/tasks/document-project.md +0 -345
- package/bmad-core/tasks/execute-checklist.md +0 -88
- package/bmad-core/tasks/facilitate-brainstorming-session.md +0 -138
- package/bmad-core/tasks/generate-ai-frontend-prompt.md +0 -53
- package/bmad-core/tasks/index-docs.md +0 -175
- package/bmad-core/tasks/kb-mode-interaction.md +0 -77
- package/bmad-core/tasks/nfr-assess.md +0 -345
- package/bmad-core/tasks/qa-gate.md +0 -163
- package/bmad-core/tasks/review-story.md +0 -316
- package/bmad-core/tasks/risk-profile.md +0 -355
- package/bmad-core/tasks/scaffold-backend.md +0 -111
- package/bmad-core/tasks/scaffold-frontend.md +0 -79
- package/bmad-core/tasks/shard-doc.md +0 -187
- package/bmad-core/tasks/test-design.md +0 -176
- package/bmad-core/tasks/trace-requirements.md +0 -266
- package/bmad-core/tasks/validate-next-story.md +0 -136
- package/bmad-core/templates/architecture-tmpl.yaml +0 -662
- package/bmad-core/templates/brainstorming-output-tmpl.yaml +0 -156
- package/bmad-core/templates/brownfield-architecture-tmpl.yaml +0 -477
- package/bmad-core/templates/brownfield-prd-tmpl.yaml +0 -281
- package/bmad-core/templates/competitor-analysis-tmpl.yaml +0 -307
- package/bmad-core/templates/front-end-architecture-tmpl.yaml +0 -258
- package/bmad-core/templates/front-end-spec-tmpl.yaml +0 -350
- package/bmad-core/templates/fullstack-architecture-tmpl.yaml +0 -824
- package/bmad-core/templates/market-research-tmpl.yaml +0 -253
- package/bmad-core/templates/prd-tmpl.yaml +0 -203
- package/bmad-core/templates/project-brief-tmpl.yaml +0 -222
- package/bmad-core/templates/qa-gate-tmpl.yaml +0 -103
- package/bmad-core/templates/story-tmpl.yaml +0 -138
- package/bmad-core/user-guide.md +0 -530
- package/bmad-core/utils/bmad-doc-template.md +0 -327
- package/bmad-core/utils/workflow-management.md +0 -71
- package/bmad-core/workflows/brownfield-fullstack.yaml +0 -298
- package/bmad-core/workflows/brownfield-service.yaml +0 -188
- package/bmad-core/workflows/brownfield-ui.yaml +0 -198
- package/bmad-core/workflows/greenfield-fullstack.yaml +0 -241
- package/bmad-core/workflows/greenfield-service.yaml +0 -207
- package/bmad-core/workflows/greenfield-ui.yaml +0 -236
- package/bmad-core/working-in-the-brownfield.md +0 -606
- package/github/b-mad-expert.md +0 -742
- package/github/chatmodes/analyst.chatmode.md +0 -89
- package/github/chatmodes/architect.chatmode.md +0 -97
- package/github/chatmodes/backend.chatmode.md +0 -195
- package/github/chatmodes/bmad-master.chatmode.md +0 -115
- package/github/chatmodes/bmad-orchestrator.chatmode.md +0 -152
- package/github/chatmodes/dev.chatmode.md +0 -86
- package/github/chatmodes/frontend.chatmode.md +0 -158
- package/github/chatmodes/pm.chatmode.md +0 -89
- package/github/chatmodes/po.chatmode.md +0 -84
- package/github/chatmodes/qa.chatmode.md +0 -96
- package/github/chatmodes/sm.chatmode.md +0 -70
- package/github/chatmodes/ux-expert.chatmode.md +0 -74
- package/vscode/mcp.json +0 -11
- package/vscode/settings.json +0 -13
package/README.md
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
# SIESA BMAD Agents
|
|
2
|
-
|
|
3
|
-
Paquete para instalar y configurar agentes SIESA BMAD en tu proyecto.
|
|
4
|
-
|
|
5
|
-
## Instalación
|
|
6
|
-
|
|
7
|
-
### Instalación única con npx (Recomendado)
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npx siesa-agents
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Este comando instalará automáticamente las carpetas necesarias en tu directorio actual.
|
|
14
|
-
|
|
15
|
-
### Instalación global
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install -g siesa-bmad-agents
|
|
19
|
-
siesa-agents
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## ¿Qué hace este paquete?
|
|
23
|
-
|
|
24
|
-
El paquete instala las siguientes carpetas en tu directorio actual:
|
|
25
|
-
|
|
26
|
-
- **`.bmad-core/`** - Archivos principales del sistema BMAD
|
|
27
|
-
- **`.vscode/`** - Configuración de Visual Studio Code
|
|
28
|
-
- **`.github/`** - Configuración de GitHub Actions y workflows
|
|
29
|
-
|
|
30
|
-
## Características
|
|
31
|
-
|
|
32
|
-
✅ **Instalación automática**: Copia las carpetas necesarias automáticamente
|
|
33
|
-
✅ **Actualización inteligente**: Detecta instalaciones existentes y las actualiza
|
|
34
|
-
✅ **Instalación local**: Se instala en el directorio donde ejecutas el comando
|
|
35
|
-
✅ **Sobrescritura segura**: Reemplaza archivos existentes sin perder configuración
|
|
36
|
-
|
|
37
|
-
## Uso
|
|
38
|
-
|
|
39
|
-
1. Navega al directorio donde quieres instalar los agentes BMAD
|
|
40
|
-
2. Ejecuta `npx siesa-agents`
|
|
41
|
-
3. Las carpetas se instalarán automáticamente
|
|
42
|
-
|
|
43
|
-
### Actualización
|
|
44
|
-
|
|
45
|
-
Para actualizar una instalación existente, simplemente ejecuta el comando nuevamente:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
npx siesa-agents
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
El sistema detectará automáticamente que ya existe una instalación y la actualizará.
|
|
52
|
-
|
|
53
|
-
## Requisitos
|
|
54
|
-
|
|
55
|
-
- Node.js >= 14.0.0
|
|
56
|
-
- npm >= 6.0.0
|
|
57
|
-
|
|
58
|
-
## Estructura de archivos instalados
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
tu-proyecto/
|
|
62
|
-
├── .bmad-core/
|
|
63
|
-
│ └── [archivos del sistema BMAD]
|
|
64
|
-
├── .vscode/
|
|
65
|
-
│ └── [configuración de VS Code]
|
|
66
|
-
└── .github/
|
|
67
|
-
└── [workflows y configuración de GitHub]
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Soporte
|
|
71
|
-
|
|
72
|
-
Si encuentras algún problema durante la instalación, por favor verifica:
|
|
73
|
-
|
|
74
|
-
1. Que tienes permisos de escritura en el directorio
|
|
75
|
-
2. Que Node.js está instalado correctamente
|
|
76
|
-
3. Que tienes acceso a npm
|
|
77
|
-
|
|
78
|
-
## Licencia
|
|
79
|
-
|
|
80
|
-
MIT
|
|
81
|
-
|
|
82
|
-
## Autor
|
|
83
|
-
|
|
1
|
+
# SIESA BMAD Agents
|
|
2
|
+
|
|
3
|
+
Paquete para instalar y configurar agentes SIESA BMAD en tu proyecto.
|
|
4
|
+
|
|
5
|
+
## Instalación
|
|
6
|
+
|
|
7
|
+
### Instalación única con npx (Recomendado)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx siesa-agents
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Este comando instalará automáticamente las carpetas necesarias en tu directorio actual.
|
|
14
|
+
|
|
15
|
+
### Instalación global
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g siesa-bmad-agents
|
|
19
|
+
siesa-agents
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## ¿Qué hace este paquete?
|
|
23
|
+
|
|
24
|
+
El paquete instala las siguientes carpetas en tu directorio actual:
|
|
25
|
+
|
|
26
|
+
- **`.bmad-core/`** - Archivos principales del sistema BMAD
|
|
27
|
+
- **`.vscode/`** - Configuración de Visual Studio Code
|
|
28
|
+
- **`.github/`** - Configuración de GitHub Actions y workflows
|
|
29
|
+
|
|
30
|
+
## Características
|
|
31
|
+
|
|
32
|
+
✅ **Instalación automática**: Copia las carpetas necesarias automáticamente
|
|
33
|
+
✅ **Actualización inteligente**: Detecta instalaciones existentes y las actualiza
|
|
34
|
+
✅ **Instalación local**: Se instala en el directorio donde ejecutas el comando
|
|
35
|
+
✅ **Sobrescritura segura**: Reemplaza archivos existentes sin perder configuración
|
|
36
|
+
|
|
37
|
+
## Uso
|
|
38
|
+
|
|
39
|
+
1. Navega al directorio donde quieres instalar los agentes BMAD
|
|
40
|
+
2. Ejecuta `npx siesa-agents`
|
|
41
|
+
3. Las carpetas se instalarán automáticamente
|
|
42
|
+
|
|
43
|
+
### Actualización
|
|
44
|
+
|
|
45
|
+
Para actualizar una instalación existente, simplemente ejecuta el comando nuevamente:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx siesa-agents
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
El sistema detectará automáticamente que ya existe una instalación y la actualizará.
|
|
52
|
+
|
|
53
|
+
## Requisitos
|
|
54
|
+
|
|
55
|
+
- Node.js >= 14.0.0
|
|
56
|
+
- npm >= 6.0.0
|
|
57
|
+
|
|
58
|
+
## Estructura de archivos instalados
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
tu-proyecto/
|
|
62
|
+
├── .bmad-core/
|
|
63
|
+
│ └── [archivos del sistema BMAD]
|
|
64
|
+
├── .vscode/
|
|
65
|
+
│ └── [configuración de VS Code]
|
|
66
|
+
└── .github/
|
|
67
|
+
└── [workflows y configuración de GitHub]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Soporte
|
|
71
|
+
|
|
72
|
+
Si encuentras algún problema durante la instalación, por favor verifica:
|
|
73
|
+
|
|
74
|
+
1. Que tienes permisos de escritura en el directorio
|
|
75
|
+
2. Que Node.js está instalado correctamente
|
|
76
|
+
3. Que tienes acceso a npm
|
|
77
|
+
|
|
78
|
+
## Licencia
|
|
79
|
+
|
|
80
|
+
MIT
|
|
81
|
+
|
|
82
|
+
## Autor
|
|
83
|
+
|
|
84
84
|
SIESA - Sistemas de Información Empresarial
|
package/bin/install.js
CHANGED
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const fs = require('fs-extra');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
|
|
6
|
-
class SiesaBmadInstaller {
|
|
7
|
-
constructor() {
|
|
8
|
-
// Definir las carpetas primero (nombres en el paquete vs nombres finales)
|
|
9
|
-
this.folderMappings = [
|
|
10
|
-
{ source: 'bmad-core', target: '.bmad-core' },
|
|
11
|
-
{ source: 'vscode', target: '.vscode' },
|
|
12
|
-
{ source: 'github', target: '.github' }
|
|
13
|
-
];
|
|
14
|
-
this.targetDir = process.cwd();
|
|
15
|
-
// Intentar múltiples ubicaciones posibles para el paquete
|
|
16
|
-
this.packageDir = this.findPackageDir();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
findPackageDir() {
|
|
20
|
-
// Opción 1: directorio padre del bin (instalación normal)
|
|
21
|
-
let packageDir = path.dirname(__dirname);
|
|
22
|
-
|
|
23
|
-
// Opción 2: si estamos en npx, buscar en node_modules
|
|
24
|
-
if (!this.hasRequiredFolders(packageDir)) {
|
|
25
|
-
// Para npm 6.14+ y npx, intentar ubicaciones alternativas
|
|
26
|
-
const possiblePaths = [
|
|
27
|
-
path.join(__dirname, '..'), // bin -> paquete
|
|
28
|
-
path.resolve(__dirname, '..'), // alternativa con resolve
|
|
29
|
-
path.resolve(__dirname, '..', '..', 'siesa-bmad-agents'), // desde node_modules
|
|
30
|
-
// Intentar buscar basado en __dirname específicamente para npx
|
|
31
|
-
path.resolve(__dirname.replace(/\\bin$|\/bin$/, '')),
|
|
32
|
-
process.cwd(), // directorio actual como último recurso
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
console.log('🔍 Buscando paquete en ubicaciones alternativas...');
|
|
36
|
-
for (const possiblePath of possiblePaths) {
|
|
37
|
-
console.log(` Probando: ${possiblePath}`);
|
|
38
|
-
if (this.hasRequiredFolders(possiblePath)) {
|
|
39
|
-
console.log(` ✅ Encontrado en: ${possiblePath}`);
|
|
40
|
-
packageDir = possiblePath;
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
console.log(`🎯 Directorio del paquete seleccionado: ${packageDir}`);
|
|
47
|
-
return packageDir;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
hasRequiredFolders(dir) {
|
|
51
|
-
return this.folderMappings.some(mapping => {
|
|
52
|
-
const folderPath = path.join(dir, mapping.source);
|
|
53
|
-
return fs.existsSync(folderPath);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async install() {
|
|
58
|
-
console.log('🔍 Directorio del paquete:', this.packageDir);
|
|
59
|
-
console.log('🚀 Instalando SIESA BMAD Agents...');
|
|
60
|
-
console.log(`📁 Directorio de destino: ${this.targetDir}`);
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
// Verificar si ya existe una instalación
|
|
64
|
-
const hasExistingInstallation = this.checkExistingInstallation();
|
|
65
|
-
|
|
66
|
-
if (hasExistingInstallation) {
|
|
67
|
-
console.log('🔄 Instalación existente detectada. Actualizando...');
|
|
68
|
-
await this.update();
|
|
69
|
-
} else {
|
|
70
|
-
console.log('✨ Nueva instalación...');
|
|
71
|
-
await this.performInstallation();
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
console.log('✅ SIESA BMAD Agents instalado correctamente!');
|
|
75
|
-
this.showPostInstallMessage();
|
|
76
|
-
|
|
77
|
-
} catch (error) {
|
|
78
|
-
console.error('❌ Error durante la instalación:', error.message);
|
|
79
|
-
process.exit(1);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
checkExistingInstallation() {
|
|
84
|
-
return this.folderMappings.some(mapping => {
|
|
85
|
-
const targetPath = path.join(this.targetDir, mapping.target);
|
|
86
|
-
return fs.existsSync(targetPath);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
async performInstallation() {
|
|
91
|
-
// Debug: listar contenido del directorio del paquete
|
|
92
|
-
console.log('🔍 Contenido del directorio del paquete:');
|
|
93
|
-
try {
|
|
94
|
-
const packageContents = await fs.readdir(this.packageDir);
|
|
95
|
-
console.log('📋 Archivos/carpetas encontrados:', packageContents);
|
|
96
|
-
} catch (error) {
|
|
97
|
-
console.log('❌ Error leyendo directorio del paquete:', error.message);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
for (const mapping of this.folderMappings) {
|
|
101
|
-
const sourcePath = path.join(this.packageDir, mapping.source);
|
|
102
|
-
const targetPath = path.join(this.targetDir, mapping.target);
|
|
103
|
-
|
|
104
|
-
console.log(`🔍 Buscando: ${sourcePath}`);
|
|
105
|
-
if (fs.existsSync(sourcePath)) {
|
|
106
|
-
console.log(`📋 Copiando ${mapping.source} -> ${mapping.target}...`);
|
|
107
|
-
await fs.copy(sourcePath, targetPath, {
|
|
108
|
-
overwrite: true,
|
|
109
|
-
recursive: true
|
|
110
|
-
});
|
|
111
|
-
console.log(`✓ ${mapping.target} copiado exitosamente`);
|
|
112
|
-
} else {
|
|
113
|
-
console.warn(`⚠️ Carpeta ${mapping.source} no encontrada en el paquete`);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
async update() {
|
|
119
|
-
// Crear backup de archivos existentes si es necesario
|
|
120
|
-
for (const mapping of this.folderMappings) {
|
|
121
|
-
const targetPath = path.join(this.targetDir, mapping.target);
|
|
122
|
-
|
|
123
|
-
if (fs.existsSync(targetPath)) {
|
|
124
|
-
console.log(`🔄 Actualizando ${mapping.target}...`);
|
|
125
|
-
// Remover carpeta existente
|
|
126
|
-
await fs.remove(targetPath);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Realizar instalación nueva
|
|
131
|
-
await this.performInstallation();
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
showPostInstallMessage() {
|
|
135
|
-
console.log('\n📚 Carpetas instaladas:');
|
|
136
|
-
this.folderMappings.forEach(mapping => {
|
|
137
|
-
const targetPath = path.join(this.targetDir, mapping.target);
|
|
138
|
-
if (fs.existsSync(targetPath)) {
|
|
139
|
-
console.log(` ✓ ${mapping.target}`);
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
console.log('\n🎉 ¡Instalación completada!');
|
|
144
|
-
console.log('💡 Las carpetas han sido instaladas en tu directorio actual.');
|
|
145
|
-
console.log('🔧 Puedes ejecutar "npx siesa-agents" nuevamente para actualizar.');
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Ejecutar instalación si el script es llamado directamente
|
|
150
|
-
if (require.main === module) {
|
|
151
|
-
const installer = new SiesaBmadInstaller();
|
|
152
|
-
installer.install();
|
|
153
|
-
}
|
|
154
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
class SiesaBmadInstaller {
|
|
7
|
+
constructor() {
|
|
8
|
+
// Definir las carpetas primero (nombres en el paquete vs nombres finales)
|
|
9
|
+
this.folderMappings = [
|
|
10
|
+
{ source: 'bmad-core', target: '.bmad-core' },
|
|
11
|
+
{ source: 'vscode', target: '.vscode' },
|
|
12
|
+
{ source: 'github', target: '.github' }
|
|
13
|
+
];
|
|
14
|
+
this.targetDir = process.cwd();
|
|
15
|
+
// Intentar múltiples ubicaciones posibles para el paquete
|
|
16
|
+
this.packageDir = this.findPackageDir();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
findPackageDir() {
|
|
20
|
+
// Opción 1: directorio padre del bin (instalación normal)
|
|
21
|
+
let packageDir = path.dirname(__dirname);
|
|
22
|
+
|
|
23
|
+
// Opción 2: si estamos en npx, buscar en node_modules
|
|
24
|
+
if (!this.hasRequiredFolders(packageDir)) {
|
|
25
|
+
// Para npm 6.14+ y npx, intentar ubicaciones alternativas
|
|
26
|
+
const possiblePaths = [
|
|
27
|
+
path.join(__dirname, '..'), // bin -> paquete
|
|
28
|
+
path.resolve(__dirname, '..'), // alternativa con resolve
|
|
29
|
+
path.resolve(__dirname, '..', '..', 'siesa-bmad-agents'), // desde node_modules
|
|
30
|
+
// Intentar buscar basado en __dirname específicamente para npx
|
|
31
|
+
path.resolve(__dirname.replace(/\\bin$|\/bin$/, '')),
|
|
32
|
+
process.cwd(), // directorio actual como último recurso
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
console.log('🔍 Buscando paquete en ubicaciones alternativas...');
|
|
36
|
+
for (const possiblePath of possiblePaths) {
|
|
37
|
+
console.log(` Probando: ${possiblePath}`);
|
|
38
|
+
if (this.hasRequiredFolders(possiblePath)) {
|
|
39
|
+
console.log(` ✅ Encontrado en: ${possiblePath}`);
|
|
40
|
+
packageDir = possiblePath;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
console.log(`🎯 Directorio del paquete seleccionado: ${packageDir}`);
|
|
47
|
+
return packageDir;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
hasRequiredFolders(dir) {
|
|
51
|
+
return this.folderMappings.some(mapping => {
|
|
52
|
+
const folderPath = path.join(dir, mapping.source);
|
|
53
|
+
return fs.existsSync(folderPath);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async install() {
|
|
58
|
+
console.log('🔍 Directorio del paquete:', this.packageDir);
|
|
59
|
+
console.log('🚀 Instalando SIESA BMAD Agents...');
|
|
60
|
+
console.log(`📁 Directorio de destino: ${this.targetDir}`);
|
|
61
|
+
|
|
62
|
+
try {
|
|
63
|
+
// Verificar si ya existe una instalación
|
|
64
|
+
const hasExistingInstallation = this.checkExistingInstallation();
|
|
65
|
+
|
|
66
|
+
if (hasExistingInstallation) {
|
|
67
|
+
console.log('🔄 Instalación existente detectada. Actualizando...');
|
|
68
|
+
await this.update();
|
|
69
|
+
} else {
|
|
70
|
+
console.log('✨ Nueva instalación...');
|
|
71
|
+
await this.performInstallation();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
console.log('✅ SIESA BMAD Agents instalado correctamente!');
|
|
75
|
+
this.showPostInstallMessage();
|
|
76
|
+
|
|
77
|
+
} catch (error) {
|
|
78
|
+
console.error('❌ Error durante la instalación:', error.message);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
checkExistingInstallation() {
|
|
84
|
+
return this.folderMappings.some(mapping => {
|
|
85
|
+
const targetPath = path.join(this.targetDir, mapping.target);
|
|
86
|
+
return fs.existsSync(targetPath);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async performInstallation() {
|
|
91
|
+
// Debug: listar contenido del directorio del paquete
|
|
92
|
+
console.log('🔍 Contenido del directorio del paquete:');
|
|
93
|
+
try {
|
|
94
|
+
const packageContents = await fs.readdir(this.packageDir);
|
|
95
|
+
console.log('📋 Archivos/carpetas encontrados:', packageContents);
|
|
96
|
+
} catch (error) {
|
|
97
|
+
console.log('❌ Error leyendo directorio del paquete:', error.message);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
for (const mapping of this.folderMappings) {
|
|
101
|
+
const sourcePath = path.join(this.packageDir, mapping.source);
|
|
102
|
+
const targetPath = path.join(this.targetDir, mapping.target);
|
|
103
|
+
|
|
104
|
+
console.log(`🔍 Buscando: ${sourcePath}`);
|
|
105
|
+
if (fs.existsSync(sourcePath)) {
|
|
106
|
+
console.log(`📋 Copiando ${mapping.source} -> ${mapping.target}...`);
|
|
107
|
+
await fs.copy(sourcePath, targetPath, {
|
|
108
|
+
overwrite: true,
|
|
109
|
+
recursive: true
|
|
110
|
+
});
|
|
111
|
+
console.log(`✓ ${mapping.target} copiado exitosamente`);
|
|
112
|
+
} else {
|
|
113
|
+
console.warn(`⚠️ Carpeta ${mapping.source} no encontrada en el paquete`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
async update() {
|
|
119
|
+
// Crear backup de archivos existentes si es necesario
|
|
120
|
+
for (const mapping of this.folderMappings) {
|
|
121
|
+
const targetPath = path.join(this.targetDir, mapping.target);
|
|
122
|
+
|
|
123
|
+
if (fs.existsSync(targetPath)) {
|
|
124
|
+
console.log(`🔄 Actualizando ${mapping.target}...`);
|
|
125
|
+
// Remover carpeta existente
|
|
126
|
+
await fs.remove(targetPath);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Realizar instalación nueva
|
|
131
|
+
await this.performInstallation();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
showPostInstallMessage() {
|
|
135
|
+
console.log('\n📚 Carpetas instaladas:');
|
|
136
|
+
this.folderMappings.forEach(mapping => {
|
|
137
|
+
const targetPath = path.join(this.targetDir, mapping.target);
|
|
138
|
+
if (fs.existsSync(targetPath)) {
|
|
139
|
+
console.log(` ✓ ${mapping.target}`);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
console.log('\n🎉 ¡Instalación completada!');
|
|
144
|
+
console.log('💡 Las carpetas han sido instaladas en tu directorio actual.');
|
|
145
|
+
console.log('🔧 Puedes ejecutar "npx siesa-agents" nuevamente para actualizar.');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Ejecutar instalación si el script es llamado directamente
|
|
150
|
+
if (require.main === module) {
|
|
151
|
+
const installer = new SiesaBmadInstaller();
|
|
152
|
+
installer.install();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
155
|
module.exports = SiesaBmadInstaller;
|
package/bin/prepare-publish.js
CHANGED
|
@@ -12,7 +12,7 @@ const folderMappings = [
|
|
|
12
12
|
{ from: '.github', to: 'github' }
|
|
13
13
|
];
|
|
14
14
|
|
|
15
|
-
console.log('📦 Preparando carpetas para publicación...');
|
|
15
|
+
console.log('📦 Preparando carpetas para publicación (siesa-agents)...');
|
|
16
16
|
|
|
17
17
|
for (const mapping of folderMappings) {
|
|
18
18
|
const fromPath = path.join(rootDir, mapping.from);
|
package/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const SiesaBmadInstaller = require('./bin/install.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const SiesaBmadInstaller = require('./bin/install.js');
|
|
4
|
+
|
|
5
|
+
if (require.main === module) {
|
|
6
|
+
const installer = new SiesaBmadInstaller();
|
|
7
|
+
installer.install();
|
|
8
|
+
}
|
|
9
|
+
|
|
11
10
|
module.exports = SiesaBmadInstaller;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "siesa-agents",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Paquete para instalar y configurar agentes SIESA BMAD en tu proyecto",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,8 +34,5 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"fs-extra": "^11.1.1",
|
|
36
36
|
"path": "^0.12.7"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"shadcn": "^3.3.1"
|
|
40
37
|
}
|
|
41
38
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# <!-- Powered by BMAD™ Core -->
|
|
2
|
-
bundle:
|
|
3
|
-
name: Team All
|
|
4
|
-
icon: 👥
|
|
5
|
-
description: Includes every core system agent.
|
|
6
|
-
agents:
|
|
7
|
-
- bmad-orchestrator
|
|
8
|
-
- "*"
|
|
9
|
-
workflows:
|
|
10
|
-
- brownfield-fullstack.yaml
|
|
11
|
-
- brownfield-service.yaml
|
|
12
|
-
- brownfield-ui.yaml
|
|
13
|
-
- greenfield-fullstack.yaml
|
|
14
|
-
- greenfield-service.yaml
|
|
15
|
-
- greenfield-ui.yaml
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# <!-- Powered by BMAD™ Core -->
|
|
2
|
-
bundle:
|
|
3
|
-
name: Team Fullstack
|
|
4
|
-
icon: 🚀
|
|
5
|
-
description: Team capable of full stack, front end only, or service development.
|
|
6
|
-
agents:
|
|
7
|
-
- bmad-orchestrator
|
|
8
|
-
- analyst
|
|
9
|
-
- pm
|
|
10
|
-
- architect
|
|
11
|
-
- po
|
|
12
|
-
- ux-expert
|
|
13
|
-
workflows:
|
|
14
|
-
- brownfield-fullstack.yaml
|
|
15
|
-
- brownfield-service.yaml
|
|
16
|
-
- brownfield-ui.yaml
|
|
17
|
-
- greenfield-fullstack.yaml
|
|
18
|
-
- greenfield-service.yaml
|
|
19
|
-
- greenfield-ui.yaml
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# <!-- Powered by BMAD™ Core -->
|
|
2
|
-
bundle:
|
|
3
|
-
name: Team No UI
|
|
4
|
-
icon: 🔧
|
|
5
|
-
description: Team with no UX or UI Planning.
|
|
6
|
-
agents:
|
|
7
|
-
- bmad-orchestrator
|
|
8
|
-
- analyst
|
|
9
|
-
- pm
|
|
10
|
-
- architect
|
|
11
|
-
- po
|
|
12
|
-
workflows:
|
|
13
|
-
- greenfield-service.yaml
|
|
14
|
-
- brownfield-service.yaml
|