awc-zns-mtd 2.0.0 → 2.1.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/CHANGELOG.md +68 -0
- package/package.json +1 -1
- package/src/modules/awc-zns-mtd/config.yaml +1 -1
- package/tools/cli/awc-cli.js +16 -1
- package/tools/cli/commands/new-project.js +629 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,74 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/lang/es/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [2.1.0] - 2026-01-08
|
|
11
|
+
|
|
12
|
+
### ✨ Añadido
|
|
13
|
+
|
|
14
|
+
#### **Comando `awc new` - Crear Proyectos Completos**
|
|
15
|
+
- 🎯 Nuevo comando `awc new [project-name]` para crear proyectos desde cero
|
|
16
|
+
- 📁 Estructura de directorios estándar (8 fases)
|
|
17
|
+
- 📋 Templates automáticamente copiados a cada proyecto
|
|
18
|
+
- 🔧 Configuración AWC pre-configurada
|
|
19
|
+
- 📚 Guías START_HERE.md en cada fase
|
|
20
|
+
|
|
21
|
+
#### **Estructura de Proyecto Estándar**
|
|
22
|
+
```
|
|
23
|
+
proyecto/
|
|
24
|
+
├── 01-comercial/ # Fase 0: Comercial
|
|
25
|
+
│ ├── 01-prospection/
|
|
26
|
+
│ ├── 02-technical-proposal/
|
|
27
|
+
│ ├── 03-quotation/
|
|
28
|
+
│ └── 04-contract/
|
|
29
|
+
├── 02-inception/ # Fase 1: Inception
|
|
30
|
+
├── 03-analysis/ # Fase 2: Análisis
|
|
31
|
+
├── 04-planning/ # Fase 3: Planificación
|
|
32
|
+
├── 05-development/ # Fase 4: Desarrollo
|
|
33
|
+
│ ├── src/
|
|
34
|
+
│ ├── tests/
|
|
35
|
+
│ └── docs/
|
|
36
|
+
├── 06-qa/ # Fase 5: QA
|
|
37
|
+
├── 07-deployment/ # Fase 6: Deployment
|
|
38
|
+
├── 08-support/ # Fase 7: Soporte
|
|
39
|
+
├── docs/ # Documentación general
|
|
40
|
+
├── .awc/ # Configuración AWC
|
|
41
|
+
│ ├── agents/
|
|
42
|
+
│ ├── workflows/
|
|
43
|
+
│ ├── templates/
|
|
44
|
+
│ └── config.json
|
|
45
|
+
└── README.md
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### **Características del Comando**
|
|
49
|
+
- ✅ Crea estructura completa de 8 fases
|
|
50
|
+
- ✅ Copia todos los templates (7 documentos)
|
|
51
|
+
- ✅ Copia todos los workflows (8 workflows)
|
|
52
|
+
- ✅ Copia todos los agentes (22 agentes)
|
|
53
|
+
- ✅ Genera README.md personalizado
|
|
54
|
+
- ✅ Crea .gitignore apropiado
|
|
55
|
+
- ✅ Inicializa Git automáticamente (opcional)
|
|
56
|
+
- ✅ Crea guías START_HERE.md por fase
|
|
57
|
+
|
|
58
|
+
### 🔄 Modificado
|
|
59
|
+
|
|
60
|
+
- **CLI**: Separado `awc new` (proyectos nuevos) de `awc init` (proyectos existentes)
|
|
61
|
+
- **UX**: Experiencia mejorada con spinner y mensajes claros
|
|
62
|
+
|
|
63
|
+
### 📊 Uso
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Crear nuevo proyecto interactivo
|
|
67
|
+
awc new
|
|
68
|
+
|
|
69
|
+
# Crear proyecto con nombre
|
|
70
|
+
awc new mi-proyecto
|
|
71
|
+
|
|
72
|
+
# Crear proyecto de tipo específico
|
|
73
|
+
awc new mi-api --type api
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
10
78
|
## [2.0.0] - 2026-01-08
|
|
11
79
|
|
|
12
80
|
### 🚀 MAJOR RELEASE - Método Completo End-to-End
|
package/package.json
CHANGED
package/tools/cli/awc-cli.js
CHANGED
|
@@ -39,10 +39,25 @@ program
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
// Comando: new (crear nuevo proyecto)
|
|
43
|
+
program
|
|
44
|
+
.command('new [project-name]')
|
|
45
|
+
.description('Crear un nuevo proyecto con estructura completa AWC ZNS-MTD')
|
|
46
|
+
.option('-t, --type <type>', 'Tipo de proyecto (web, api, mobile, enterprise)')
|
|
47
|
+
.action(async (projectName, options) => {
|
|
48
|
+
try {
|
|
49
|
+
const { newProjectCommand } = require('./commands/new-project');
|
|
50
|
+
await newProjectCommand(projectName, options);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.error(chalk.red('Error creando proyecto:'), error.message);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
42
57
|
// Comando: init
|
|
43
58
|
program
|
|
44
59
|
.command('init')
|
|
45
|
-
.description('Inicializar proyecto con ZNS-MTD
|
|
60
|
+
.description('Inicializar proyecto existente con ZNS-MTD')
|
|
46
61
|
.option('-t, --type <type>', 'Tipo de proyecto (web, api, mobile, enterprise)')
|
|
47
62
|
.action(async (options) => {
|
|
48
63
|
try {
|
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comando: new
|
|
3
|
+
* Crea un nuevo proyecto con estructura completa AWC ZNS-MTD
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const fs = require('fs-extra');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const chalk = require('chalk');
|
|
9
|
+
const ora = require('ora');
|
|
10
|
+
const inquirer = require('inquirer');
|
|
11
|
+
const { displayLogo } = require('../utils/console-logger');
|
|
12
|
+
const { getVersion } = require('../utils/version');
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Comando principal para crear nuevo proyecto
|
|
16
|
+
*/
|
|
17
|
+
async function newProjectCommand(projectName, options = {}) {
|
|
18
|
+
displayLogo();
|
|
19
|
+
|
|
20
|
+
console.log(chalk.cyan('\n🚀 Crear Nuevo Proyecto AWC ZNS-MTD\n'));
|
|
21
|
+
|
|
22
|
+
// Preguntar nombre del proyecto si no se proporcionó
|
|
23
|
+
if (!projectName) {
|
|
24
|
+
const { name } = await inquirer.prompt([
|
|
25
|
+
{
|
|
26
|
+
type: 'input',
|
|
27
|
+
name: 'name',
|
|
28
|
+
message: '📦 Nombre del proyecto:',
|
|
29
|
+
validate: (input) => {
|
|
30
|
+
if (!input.trim()) return 'El nombre del proyecto es requerido';
|
|
31
|
+
if (!/^[a-zA-Z0-9-_]+$/.test(input)) {
|
|
32
|
+
return 'Solo se permiten letras, números, guiones y guiones bajos';
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]);
|
|
38
|
+
projectName = name;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Verificar si el directorio ya existe
|
|
42
|
+
const projectPath = path.join(process.cwd(), projectName);
|
|
43
|
+
if (await fs.pathExists(projectPath)) {
|
|
44
|
+
console.log(chalk.red(`\n❌ El directorio '${projectName}' ya existe.\n`));
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Preguntas de configuración
|
|
49
|
+
const answers = await inquirer.prompt([
|
|
50
|
+
{
|
|
51
|
+
type: 'list',
|
|
52
|
+
name: 'projectType',
|
|
53
|
+
message: '¿Qué tipo de proyecto es?',
|
|
54
|
+
choices: [
|
|
55
|
+
{ name: 'Web Application (Frontend + Backend)', value: 'web' },
|
|
56
|
+
{ name: 'API/Microservices', value: 'api' },
|
|
57
|
+
{ name: 'Mobile Application', value: 'mobile' },
|
|
58
|
+
{ name: 'Enterprise System', value: 'enterprise' },
|
|
59
|
+
{ name: 'Otro', value: 'other' }
|
|
60
|
+
],
|
|
61
|
+
default: options.type
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'input',
|
|
65
|
+
name: 'description',
|
|
66
|
+
message: '📝 Descripción breve del proyecto:',
|
|
67
|
+
default: `Proyecto ${projectName}`
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: 'list',
|
|
71
|
+
name: 'teamSize',
|
|
72
|
+
message: '👥 Tamaño del equipo:',
|
|
73
|
+
choices: [
|
|
74
|
+
{ name: 'Individual (1 persona)', value: 'solo' },
|
|
75
|
+
{ name: 'Pequeño (2-5 personas)', value: 'small' },
|
|
76
|
+
{ name: 'Mediano (6-15 personas)', value: 'medium' },
|
|
77
|
+
{ name: 'Grande (16+ personas)', value: 'large' }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'confirm',
|
|
82
|
+
name: 'gitInit',
|
|
83
|
+
message: '🔧 Inicializar repositorio Git?',
|
|
84
|
+
default: true
|
|
85
|
+
}
|
|
86
|
+
]);
|
|
87
|
+
|
|
88
|
+
const spinner = ora('Creando estructura del proyecto...').start();
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
// 1. Crear directorio raíz del proyecto
|
|
92
|
+
await fs.ensureDir(projectPath);
|
|
93
|
+
spinner.text = `Directorio ${projectName} creado`;
|
|
94
|
+
|
|
95
|
+
// 2. Crear estructura estándar de directorios
|
|
96
|
+
const directories = [
|
|
97
|
+
// Fase 0: Comercial
|
|
98
|
+
'01-comercial/01-prospection',
|
|
99
|
+
'01-comercial/02-technical-proposal',
|
|
100
|
+
'01-comercial/03-quotation',
|
|
101
|
+
'01-comercial/04-contract',
|
|
102
|
+
|
|
103
|
+
// Fase 1: Inception
|
|
104
|
+
'02-inception/01-kickoff',
|
|
105
|
+
'02-inception/02-prd',
|
|
106
|
+
'02-inception/03-backlog',
|
|
107
|
+
'02-inception/04-release-planning',
|
|
108
|
+
|
|
109
|
+
// Fase 2: Análisis
|
|
110
|
+
'03-analysis/01-code-audit',
|
|
111
|
+
'03-analysis/02-architecture-review',
|
|
112
|
+
'03-analysis/03-technical-debt',
|
|
113
|
+
'03-analysis/04-recommendations',
|
|
114
|
+
|
|
115
|
+
// Fase 3: Planificación
|
|
116
|
+
'04-planning/01-sprint-planning',
|
|
117
|
+
'04-planning/02-backlog-refinement',
|
|
118
|
+
'04-planning/03-release-planning',
|
|
119
|
+
'04-planning/04-roadmap',
|
|
120
|
+
|
|
121
|
+
// Fase 4: Desarrollo
|
|
122
|
+
'05-development/src',
|
|
123
|
+
'05-development/tests',
|
|
124
|
+
'05-development/docs',
|
|
125
|
+
|
|
126
|
+
// Fase 5: QA
|
|
127
|
+
'06-qa/test-plans',
|
|
128
|
+
'06-qa/test-cases',
|
|
129
|
+
'06-qa/test-results',
|
|
130
|
+
'06-qa/bug-reports',
|
|
131
|
+
|
|
132
|
+
// Fase 6: Deployment
|
|
133
|
+
'07-deployment/environments',
|
|
134
|
+
'07-deployment/scripts',
|
|
135
|
+
'07-deployment/logs',
|
|
136
|
+
|
|
137
|
+
// Fase 7: Soporte
|
|
138
|
+
'08-support/incidents',
|
|
139
|
+
'08-support/bug-fixes',
|
|
140
|
+
'08-support/maintenance',
|
|
141
|
+
|
|
142
|
+
// Documentación general
|
|
143
|
+
'docs/architecture',
|
|
144
|
+
'docs/adr',
|
|
145
|
+
'docs/api',
|
|
146
|
+
'docs/guides',
|
|
147
|
+
|
|
148
|
+
// Configuración AWC
|
|
149
|
+
'.awc/agents',
|
|
150
|
+
'.awc/workflows',
|
|
151
|
+
'.awc/templates'
|
|
152
|
+
];
|
|
153
|
+
|
|
154
|
+
for (const dir of directories) {
|
|
155
|
+
await fs.ensureDir(path.join(projectPath, dir));
|
|
156
|
+
}
|
|
157
|
+
spinner.text = 'Estructura de directorios creada';
|
|
158
|
+
|
|
159
|
+
// 3. Copiar templates
|
|
160
|
+
const srcTemplatesPath = path.join(__dirname, '../../../src/modules/awc-zns-mtd/templates');
|
|
161
|
+
const destTemplatesPath = path.join(projectPath, '.awc/templates');
|
|
162
|
+
|
|
163
|
+
if (await fs.pathExists(srcTemplatesPath)) {
|
|
164
|
+
await fs.copy(srcTemplatesPath, destTemplatesPath);
|
|
165
|
+
spinner.text = 'Templates copiados';
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 4. Copiar workflows
|
|
169
|
+
const srcWorkflowsPath = path.join(__dirname, '../../../src/modules/awc-zns-mtd/workflows');
|
|
170
|
+
const destWorkflowsPath = path.join(projectPath, '.awc/workflows');
|
|
171
|
+
|
|
172
|
+
if (await fs.pathExists(srcWorkflowsPath)) {
|
|
173
|
+
await fs.copy(srcWorkflowsPath, destWorkflowsPath);
|
|
174
|
+
spinner.text = 'Workflows copiados';
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// 5. Copiar agentes
|
|
178
|
+
const srcAgentsPath = path.join(__dirname, '../../../src/modules/awc-zns-mtd/agents');
|
|
179
|
+
const destAgentsPath = path.join(projectPath, '.awc/agents');
|
|
180
|
+
|
|
181
|
+
if (await fs.pathExists(srcAgentsPath)) {
|
|
182
|
+
await fs.copy(srcAgentsPath, destAgentsPath);
|
|
183
|
+
spinner.text = 'Agentes copiados';
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// 6. Crear archivo de configuración AWC
|
|
187
|
+
const awcConfig = {
|
|
188
|
+
version: getVersion(),
|
|
189
|
+
createdAt: new Date().toISOString(),
|
|
190
|
+
project: {
|
|
191
|
+
name: projectName,
|
|
192
|
+
description: answers.description,
|
|
193
|
+
type: answers.projectType,
|
|
194
|
+
teamSize: answers.teamSize
|
|
195
|
+
},
|
|
196
|
+
preferences: {
|
|
197
|
+
communication_language: 'Spanish',
|
|
198
|
+
document_output_language: 'Spanish',
|
|
199
|
+
code_language: 'English'
|
|
200
|
+
},
|
|
201
|
+
workflows: {
|
|
202
|
+
current_phase: 'comercial',
|
|
203
|
+
completed_phases: []
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
await fs.writeJson(
|
|
208
|
+
path.join(projectPath, '.awc/config.json'),
|
|
209
|
+
awcConfig,
|
|
210
|
+
{ spaces: 2 }
|
|
211
|
+
);
|
|
212
|
+
spinner.text = 'Configuración AWC creada';
|
|
213
|
+
|
|
214
|
+
// 7. Crear README.md del proyecto
|
|
215
|
+
const readme = createReadmeContent(projectName, answers);
|
|
216
|
+
await fs.writeFile(path.join(projectPath, 'README.md'), readme);
|
|
217
|
+
spinner.text = 'README.md creado';
|
|
218
|
+
|
|
219
|
+
// 8. Crear .gitignore
|
|
220
|
+
const gitignore = createGitignoreContent();
|
|
221
|
+
await fs.writeFile(path.join(projectPath, '.gitignore'), gitignore);
|
|
222
|
+
spinner.text = '.gitignore creado';
|
|
223
|
+
|
|
224
|
+
// 9. Crear archivo de inicio para cada fase
|
|
225
|
+
await createPhaseGuides(projectPath);
|
|
226
|
+
spinner.text = 'Guías de fase creadas';
|
|
227
|
+
|
|
228
|
+
// 10. Inicializar Git si se solicitó
|
|
229
|
+
if (answers.gitInit) {
|
|
230
|
+
const { execSync } = require('child_process');
|
|
231
|
+
try {
|
|
232
|
+
execSync('git init', { cwd: projectPath, stdio: 'ignore' });
|
|
233
|
+
execSync('git add .', { cwd: projectPath, stdio: 'ignore' });
|
|
234
|
+
execSync(`git commit -m "feat: Inicializar proyecto ${projectName} con AWC ZNS-MTD"`, {
|
|
235
|
+
cwd: projectPath,
|
|
236
|
+
stdio: 'ignore'
|
|
237
|
+
});
|
|
238
|
+
spinner.text = 'Repositorio Git inicializado';
|
|
239
|
+
} catch (error) {
|
|
240
|
+
// Git no está disponible o fallo, continuar sin git
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
spinner.succeed(chalk.green('✅ Proyecto creado exitosamente'));
|
|
245
|
+
|
|
246
|
+
// Mostrar resumen
|
|
247
|
+
console.log(chalk.cyan('\n' + '═'.repeat(60)));
|
|
248
|
+
console.log(chalk.cyan('📦 Resumen del Proyecto'));
|
|
249
|
+
console.log(chalk.cyan('═'.repeat(60) + '\n'));
|
|
250
|
+
|
|
251
|
+
console.log(`${chalk.gray('Nombre:')} ${chalk.green(projectName)}`);
|
|
252
|
+
console.log(`${chalk.gray('Tipo:')} ${chalk.yellow(answers.projectType)}`);
|
|
253
|
+
console.log(`${chalk.gray('Equipo:')} ${chalk.yellow(answers.teamSize)}`);
|
|
254
|
+
console.log(`${chalk.gray('Ubicación:')} ${chalk.blue(projectPath)}`);
|
|
255
|
+
console.log(`${chalk.gray('AWC Versión:')} ${chalk.yellow(getVersion())}\n`);
|
|
256
|
+
|
|
257
|
+
// Próximos pasos
|
|
258
|
+
console.log(chalk.cyan('📚 Próximos Pasos:\n'));
|
|
259
|
+
console.log(` ${chalk.green('1.')} cd ${projectName}`);
|
|
260
|
+
console.log(` ${chalk.green('2.')} Revisar ${chalk.yellow('01-comercial/START_HERE.md')}`);
|
|
261
|
+
console.log(` ${chalk.green('3.')} Completar discovery notes y análisis de viabilidad`);
|
|
262
|
+
console.log(` ${chalk.green('4.')} Ejecutar ${chalk.yellow('awc status')} para ver el progreso\n`);
|
|
263
|
+
|
|
264
|
+
console.log(chalk.cyan('🎯 Flujo de Trabajo Recomendado:\n'));
|
|
265
|
+
console.log(` ${chalk.gray('→')} Comercial (01-comercial/)`);
|
|
266
|
+
console.log(` ${chalk.gray('→')} Inception (02-inception/)`);
|
|
267
|
+
console.log(` ${chalk.gray('→')} Análisis (03-analysis/)`);
|
|
268
|
+
console.log(` ${chalk.gray('→')} Planificación (04-planning/)`);
|
|
269
|
+
console.log(` ${chalk.gray('→')} Desarrollo (05-development/)`);
|
|
270
|
+
console.log(` ${chalk.gray('→')} QA (06-qa/)`);
|
|
271
|
+
console.log(` ${chalk.gray('→')} Deployment (07-deployment/)`);
|
|
272
|
+
console.log(` ${chalk.gray('→')} Soporte (08-support/)\n`);
|
|
273
|
+
|
|
274
|
+
console.log(chalk.green('✨ ¡Listo para comenzar tu proyecto!\n'));
|
|
275
|
+
|
|
276
|
+
} catch (error) {
|
|
277
|
+
spinner.fail(chalk.red('❌ Error creando proyecto'));
|
|
278
|
+
throw error;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Crea el contenido del README.md
|
|
284
|
+
*/
|
|
285
|
+
function createReadmeContent(projectName, answers) {
|
|
286
|
+
return `# ${projectName}
|
|
287
|
+
|
|
288
|
+
> ${answers.description}
|
|
289
|
+
|
|
290
|
+
## 📋 Información del Proyecto
|
|
291
|
+
|
|
292
|
+
- **Tipo**: ${answers.projectType}
|
|
293
|
+
- **Equipo**: ${answers.teamSize}
|
|
294
|
+
- **Metodología**: AWC ZNS-MTD (Zen, Neutro, Sistemático)
|
|
295
|
+
|
|
296
|
+
## 🚀 Fases del Proyecto
|
|
297
|
+
|
|
298
|
+
Este proyecto sigue el método AWC ZNS-MTD con 8 fases completas:
|
|
299
|
+
|
|
300
|
+
### 📊 Fase 0: Comercial (01-comercial/)
|
|
301
|
+
- Prospección y discovery
|
|
302
|
+
- Oferta técnica
|
|
303
|
+
- Cotización
|
|
304
|
+
- Contrato
|
|
305
|
+
|
|
306
|
+
### 🎯 Fase 1: Inception (02-inception/)
|
|
307
|
+
- Kickoff meeting
|
|
308
|
+
- Product Requirements Document (PRD)
|
|
309
|
+
- Backlog inicial
|
|
310
|
+
- Release planning
|
|
311
|
+
|
|
312
|
+
### 🔍 Fase 2: Análisis (03-analysis/)
|
|
313
|
+
- Code audit (si aplica)
|
|
314
|
+
- Architecture review
|
|
315
|
+
- Technical debt assessment
|
|
316
|
+
- Recomendaciones
|
|
317
|
+
|
|
318
|
+
### 📅 Fase 3: Planificación (04-planning/)
|
|
319
|
+
- Sprint planning
|
|
320
|
+
- Backlog refinement
|
|
321
|
+
- Release planning
|
|
322
|
+
- Product roadmap
|
|
323
|
+
|
|
324
|
+
### 💻 Fase 4: Desarrollo (05-development/)
|
|
325
|
+
- Implementación TDD
|
|
326
|
+
- Code review
|
|
327
|
+
- CI/CD
|
|
328
|
+
|
|
329
|
+
### ✅ Fase 5: QA (06-qa/)
|
|
330
|
+
- Test planning
|
|
331
|
+
- Automated testing
|
|
332
|
+
- Manual testing
|
|
333
|
+
- UAT
|
|
334
|
+
|
|
335
|
+
### 🚀 Fase 6: Deployment (07-deployment/)
|
|
336
|
+
- Pre-deployment
|
|
337
|
+
- Staging
|
|
338
|
+
- Production
|
|
339
|
+
- Post-deployment
|
|
340
|
+
|
|
341
|
+
### 🛠️ Fase 7: Soporte (08-support/)
|
|
342
|
+
- Incident response
|
|
343
|
+
- Bug fixing
|
|
344
|
+
- Maintenance
|
|
345
|
+
- Monitoring
|
|
346
|
+
|
|
347
|
+
## 📚 Documentación
|
|
348
|
+
|
|
349
|
+
Toda la documentación del proyecto se encuentra en el directorio \`docs/\`:
|
|
350
|
+
|
|
351
|
+
- \`docs/architecture/\` - Diagramas y decisiones arquitectónicas
|
|
352
|
+
- \`docs/adr/\` - Architecture Decision Records
|
|
353
|
+
- \`docs/api/\` - Documentación de APIs
|
|
354
|
+
- \`docs/guides/\` - Guías de desarrollo y deployment
|
|
355
|
+
|
|
356
|
+
## 🔧 Configuración AWC
|
|
357
|
+
|
|
358
|
+
El directorio \`.awc/\` contiene:
|
|
359
|
+
|
|
360
|
+
- \`agents/\` - Agentes especializados AWC ZNS-MTD
|
|
361
|
+
- \`workflows/\` - Workflows para cada fase
|
|
362
|
+
- \`templates/\` - Templates de documentos
|
|
363
|
+
- \`config.json\` - Configuración del proyecto
|
|
364
|
+
|
|
365
|
+
## 🎯 Estado Actual
|
|
366
|
+
|
|
367
|
+
**Fase actual**: Comercial (inicio)
|
|
368
|
+
|
|
369
|
+
Revisar \`01-comercial/START_HERE.md\` para comenzar.
|
|
370
|
+
|
|
371
|
+
## 📝 Comandos AWC
|
|
372
|
+
|
|
373
|
+
\`\`\`bash
|
|
374
|
+
# Ver estado del proyecto
|
|
375
|
+
awc status
|
|
376
|
+
|
|
377
|
+
# Validar estructura
|
|
378
|
+
awc validate
|
|
379
|
+
|
|
380
|
+
# Ver configuración
|
|
381
|
+
awc config
|
|
382
|
+
\`\`\`
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
Generado con ❤️ usando AWC ZNS-MTD Method
|
|
387
|
+
`;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Crea el contenido del .gitignore
|
|
392
|
+
*/
|
|
393
|
+
function createGitignoreContent() {
|
|
394
|
+
return `# Dependencies
|
|
395
|
+
node_modules/
|
|
396
|
+
vendor/
|
|
397
|
+
bower_components/
|
|
398
|
+
|
|
399
|
+
# Build outputs
|
|
400
|
+
dist/
|
|
401
|
+
build/
|
|
402
|
+
out/
|
|
403
|
+
target/
|
|
404
|
+
*.exe
|
|
405
|
+
*.dll
|
|
406
|
+
*.so
|
|
407
|
+
*.dylib
|
|
408
|
+
|
|
409
|
+
# IDE
|
|
410
|
+
.vscode/
|
|
411
|
+
.idea/
|
|
412
|
+
*.swp
|
|
413
|
+
*.swo
|
|
414
|
+
*~
|
|
415
|
+
.DS_Store
|
|
416
|
+
|
|
417
|
+
# Logs
|
|
418
|
+
logs/
|
|
419
|
+
*.log
|
|
420
|
+
npm-debug.log*
|
|
421
|
+
yarn-debug.log*
|
|
422
|
+
yarn-error.log*
|
|
423
|
+
|
|
424
|
+
# Environment variables
|
|
425
|
+
.env
|
|
426
|
+
.env.local
|
|
427
|
+
.env.*.local
|
|
428
|
+
|
|
429
|
+
# OS
|
|
430
|
+
Thumbs.db
|
|
431
|
+
.DS_Store
|
|
432
|
+
|
|
433
|
+
# Temporary files
|
|
434
|
+
tmp/
|
|
435
|
+
temp/
|
|
436
|
+
*.tmp
|
|
437
|
+
|
|
438
|
+
# Coverage
|
|
439
|
+
coverage/
|
|
440
|
+
*.lcov
|
|
441
|
+
.nyc_output/
|
|
442
|
+
|
|
443
|
+
# Confidential (keep locally, never commit)
|
|
444
|
+
01-comercial/04-contract/*.pdf
|
|
445
|
+
**/confidential/
|
|
446
|
+
**/*-confidential.*
|
|
447
|
+
`;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Crea guías de inicio para cada fase
|
|
452
|
+
*/
|
|
453
|
+
async function createPhaseGuides(projectPath) {
|
|
454
|
+
const phases = [
|
|
455
|
+
{
|
|
456
|
+
dir: '01-comercial',
|
|
457
|
+
title: 'Fase 0: Comercial',
|
|
458
|
+
content: `# 🎯 START HERE - Fase Comercial
|
|
459
|
+
|
|
460
|
+
## Objetivo
|
|
461
|
+
Capturar requisitos del cliente, evaluar viabilidad y generar oferta comercial.
|
|
462
|
+
|
|
463
|
+
## Pasos a seguir
|
|
464
|
+
|
|
465
|
+
### 1. Discovery & Prospección
|
|
466
|
+
📂 Directorio: \`01-prospection/\`
|
|
467
|
+
|
|
468
|
+
- [ ] Completar \`.awc/templates/discovery-notes.md\`
|
|
469
|
+
- [ ] Identificar stakeholders clave
|
|
470
|
+
- [ ] Entender el problema de negocio
|
|
471
|
+
- [ ] Documentar contexto actual
|
|
472
|
+
|
|
473
|
+
### 2. Análisis de Viabilidad
|
|
474
|
+
📂 Directorio: \`01-prospection/\`
|
|
475
|
+
|
|
476
|
+
- [ ] Completar \`.awc/templates/viabilidad.md\`
|
|
477
|
+
- [ ] Evaluar viabilidad técnica
|
|
478
|
+
- [ ] Evaluar viabilidad económica
|
|
479
|
+
- [ ] Identificar riesgos principales
|
|
480
|
+
|
|
481
|
+
### 3. Oferta Técnica
|
|
482
|
+
📂 Directorio: \`02-technical-proposal/\`
|
|
483
|
+
|
|
484
|
+
- [ ] Copiar template: \`.awc/templates/oferta-comercial.md\`
|
|
485
|
+
- [ ] Definir solución propuesta
|
|
486
|
+
- [ ] Especificar stack tecnológico
|
|
487
|
+
- [ ] Definir alcance y exclusiones
|
|
488
|
+
|
|
489
|
+
### 4. Cotización
|
|
490
|
+
📂 Directorio: \`03-quotation/\`
|
|
491
|
+
|
|
492
|
+
- [ ] Copiar template: \`.awc/templates/cotizacion.md\`
|
|
493
|
+
- [ ] Estimar esfuerzo por fase
|
|
494
|
+
- [ ] Calcular costos
|
|
495
|
+
- [ ] Definir cronograma
|
|
496
|
+
|
|
497
|
+
### 5. Contrato (confidencial)
|
|
498
|
+
📂 Directorio: \`04-contract/\`
|
|
499
|
+
|
|
500
|
+
- [ ] Negociar términos
|
|
501
|
+
- [ ] Firmar contrato
|
|
502
|
+
- [ ] Mover a siguiente fase
|
|
503
|
+
|
|
504
|
+
## ✅ Criterios de Salida
|
|
505
|
+
- ✅ Contrato firmado
|
|
506
|
+
- ✅ Cliente aprobó oferta y cotización
|
|
507
|
+
- ✅ Equipo asignado
|
|
508
|
+
- ✅ Fecha de kickoff definida
|
|
509
|
+
|
|
510
|
+
## ➡️ Siguiente Fase
|
|
511
|
+
Una vez completado, pasar a **02-inception/**
|
|
512
|
+
`
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
dir: '02-inception',
|
|
516
|
+
title: 'Fase 1: Inception',
|
|
517
|
+
content: `# 🚀 START HERE - Fase Inception
|
|
518
|
+
|
|
519
|
+
## Objetivo
|
|
520
|
+
Arranque formal del proyecto, definir PRD y backlog inicial.
|
|
521
|
+
|
|
522
|
+
## Pasos a seguir
|
|
523
|
+
|
|
524
|
+
### 1. Kickoff Meeting
|
|
525
|
+
📂 Directorio: \`01-kickoff/\`
|
|
526
|
+
|
|
527
|
+
- [ ] Copiar template: \`.awc/templates/kickoff-agenda.md\`
|
|
528
|
+
- [ ] Presentar equipo
|
|
529
|
+
- [ ] Alinear expectativas
|
|
530
|
+
- [ ] Definir canales de comunicación
|
|
531
|
+
|
|
532
|
+
### 2. Product Requirements Document (PRD)
|
|
533
|
+
📂 Directorio: \`02-prd/\`
|
|
534
|
+
|
|
535
|
+
- [ ] Copiar template: \`.awc/templates/PRD-template.md\`
|
|
536
|
+
- [ ] Documentar requisitos funcionales
|
|
537
|
+
- [ ] Documentar requisitos no funcionales
|
|
538
|
+
- [ ] Definir user personas
|
|
539
|
+
- [ ] Mapear user journeys
|
|
540
|
+
|
|
541
|
+
### 3. Backlog Inicial
|
|
542
|
+
📂 Directorio: \`03-backlog/\`
|
|
543
|
+
|
|
544
|
+
- [ ] Crear user stories
|
|
545
|
+
- [ ] Priorizar backlog (MoSCoW)
|
|
546
|
+
- [ ] Estimar user stories (Planning Poker)
|
|
547
|
+
- [ ] Crear epic mapping
|
|
548
|
+
|
|
549
|
+
### 4. Release Planning
|
|
550
|
+
📂 Directorio: \`04-release-planning/\`
|
|
551
|
+
|
|
552
|
+
- [ ] Definir MVP (release 1)
|
|
553
|
+
- [ ] Planificar releases subsecuentes
|
|
554
|
+
- [ ] Crear roadmap de producto
|
|
555
|
+
- [ ] Definir milestones
|
|
556
|
+
|
|
557
|
+
## ✅ Criterios de Salida
|
|
558
|
+
- ✅ PRD aprobado por stakeholders
|
|
559
|
+
- ✅ Backlog priorizado y estimado
|
|
560
|
+
- ✅ Release plan definido
|
|
561
|
+
- ✅ Sprint 1 planificado
|
|
562
|
+
|
|
563
|
+
## ➡️ Siguiente Fase
|
|
564
|
+
Dependiendo del proyecto:
|
|
565
|
+
- Proyecto nuevo → **04-planning/** (skip análisis)
|
|
566
|
+
- Proyecto existente → **03-analysis/**
|
|
567
|
+
`
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
dir: '05-development',
|
|
571
|
+
title: 'Fase 4: Desarrollo',
|
|
572
|
+
content: `# 💻 START HERE - Fase Desarrollo
|
|
573
|
+
|
|
574
|
+
## Objetivo
|
|
575
|
+
Implementar user stories siguiendo TDD y mejores prácticas.
|
|
576
|
+
|
|
577
|
+
## Estructura
|
|
578
|
+
\`\`\`
|
|
579
|
+
05-development/
|
|
580
|
+
├── src/ # Código fuente
|
|
581
|
+
├── tests/ # Tests (unit, integration, e2e)
|
|
582
|
+
└── docs/ # Documentación técnica
|
|
583
|
+
\`\`\`
|
|
584
|
+
|
|
585
|
+
## Pasos a seguir
|
|
586
|
+
|
|
587
|
+
### 1. Feature Kickoff
|
|
588
|
+
- [ ] Seleccionar user story del sprint backlog
|
|
589
|
+
- [ ] Revisar acceptance criteria
|
|
590
|
+
- [ ] Diseño técnico (si es necesario)
|
|
591
|
+
- [ ] Crear feature branch
|
|
592
|
+
|
|
593
|
+
### 2. Development (TDD)
|
|
594
|
+
- [ ] **RED**: Escribir test que falla
|
|
595
|
+
- [ ] **GREEN**: Implementar código mínimo para pasar test
|
|
596
|
+
- [ ] **REFACTOR**: Mejorar código manteniendo tests en verde
|
|
597
|
+
- [ ] Repetir ciclo
|
|
598
|
+
|
|
599
|
+
### 3. Code Review
|
|
600
|
+
- [ ] Crear Pull Request
|
|
601
|
+
- [ ] Solicitar revisión (mínimo 2 aprobadores)
|
|
602
|
+
- [ ] Aplicar feedback
|
|
603
|
+
- [ ] Aprobar PR
|
|
604
|
+
|
|
605
|
+
### 4. Integration
|
|
606
|
+
- [ ] Merge a develop/main
|
|
607
|
+
- [ ] CI/CD automático ejecuta tests
|
|
608
|
+
- [ ] Deploy automático a dev/staging
|
|
609
|
+
|
|
610
|
+
## 🎯 Mejores Prácticas
|
|
611
|
+
- ✅ Feature branches (feature/US-123-login)
|
|
612
|
+
- ✅ Commits frecuentes y descriptivos
|
|
613
|
+
- ✅ PRs pequeños (<400 líneas)
|
|
614
|
+
- ✅ Code coverage >80%
|
|
615
|
+
- ✅ SonarQube sin critical issues
|
|
616
|
+
|
|
617
|
+
## ➡️ Siguiente Fase
|
|
618
|
+
Una vez features completas → **06-qa/**
|
|
619
|
+
`
|
|
620
|
+
}
|
|
621
|
+
];
|
|
622
|
+
|
|
623
|
+
for (const phase of phases) {
|
|
624
|
+
const filePath = path.join(projectPath, phase.dir, 'START_HERE.md');
|
|
625
|
+
await fs.writeFile(filePath, phase.content);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
module.exports = { newProjectCommand };
|