awc-zns-mtd 2.0.0 → 2.2.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
CHANGED
|
@@ -7,6 +7,150 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/lang/es/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [2.2.0] - 2026-01-08
|
|
11
|
+
|
|
12
|
+
### 🚀 CONFIGURACIÓN 100% AUTOMÁTICA
|
|
13
|
+
|
|
14
|
+
#### ✨ Añadido
|
|
15
|
+
|
|
16
|
+
**Carga Automática de Agentes y Workflows**
|
|
17
|
+
- ✅ `.vscode/settings.json` creado automáticamente
|
|
18
|
+
- ✅ `.vscode/extensions.json` con extensiones recomendadas
|
|
19
|
+
- ✅ `[proyecto].code-workspace` generado
|
|
20
|
+
- ✅ Copilot detecta fase automáticamente (01-comercial → 08-support)
|
|
21
|
+
- ✅ Agentes se cargan según contexto sin intervención manual
|
|
22
|
+
|
|
23
|
+
**Mejoras en copilot-instructions.md**
|
|
24
|
+
- 🤖 Detección automática de fase del proyecto
|
|
25
|
+
- 🎯 Respuestas contextuales por directorio
|
|
26
|
+
- 💡 Sugerencias proactivas sin que el usuario pregunte
|
|
27
|
+
- 📋 Templates sugeridos automáticamente
|
|
28
|
+
|
|
29
|
+
**Experiencia Zero-Config**
|
|
30
|
+
```bash
|
|
31
|
+
# Solo esto es necesario
|
|
32
|
+
npm install -g awc-zns-mtd
|
|
33
|
+
awc new mi-proyecto
|
|
34
|
+
|
|
35
|
+
# Abrir VS Code
|
|
36
|
+
code mi-proyecto
|
|
37
|
+
|
|
38
|
+
# GitHub Copilot ya está configurado con:
|
|
39
|
+
# - Agentes AWC cargados
|
|
40
|
+
# - Workflows activos
|
|
41
|
+
# - Templates disponibles
|
|
42
|
+
# - Detección de fase automática
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### 🎯 Comportamiento Automático
|
|
46
|
+
|
|
47
|
+
**Al abrir proyecto en carpeta `01-comercial/`:**
|
|
48
|
+
```
|
|
49
|
+
🎯 Fase Comercial detectada automáticamente
|
|
50
|
+
|
|
51
|
+
Agente activo: Product Owner + Cost Estimator
|
|
52
|
+
Templates disponibles:
|
|
53
|
+
• discovery-notes.md
|
|
54
|
+
• viabilidad.md
|
|
55
|
+
• oferta-comercial.md
|
|
56
|
+
|
|
57
|
+
¿En qué te ayudo?
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Al abrir proyecto en carpeta `05-development/`:**
|
|
61
|
+
```
|
|
62
|
+
💻 Modo Desarrollo (TDD) activo
|
|
63
|
+
|
|
64
|
+
Workflow: development-flow
|
|
65
|
+
Agente: DEVELOPER PRO
|
|
66
|
+
|
|
67
|
+
¿Qué feature implementamos?
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
#### 📦 Archivos Generados Automáticamente
|
|
71
|
+
|
|
72
|
+
Por cada `awc new [proyecto]`:
|
|
73
|
+
- `.vscode/settings.json` - Configuración de workspace
|
|
74
|
+
- `.vscode/extensions.json` - Extensiones recomendadas
|
|
75
|
+
- `.github/copilot-instructions.md` - Instrucciones automáticas
|
|
76
|
+
- `[proyecto].code-workspace` - Workspace de VS Code
|
|
77
|
+
|
|
78
|
+
### 🔧 Mejoras
|
|
79
|
+
|
|
80
|
+
- **UX**: Cero configuración manual
|
|
81
|
+
- **DX**: Copilot contextual desde el primer momento
|
|
82
|
+
- **Automatización**: Todo se carga al abrir el proyecto
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## [2.1.0] - 2026-01-08
|
|
87
|
+
|
|
88
|
+
### ✨ Añadido
|
|
89
|
+
|
|
90
|
+
#### **Comando `awc new` - Crear Proyectos Completos**
|
|
91
|
+
- 🎯 Nuevo comando `awc new [project-name]` para crear proyectos desde cero
|
|
92
|
+
- 📁 Estructura de directorios estándar (8 fases)
|
|
93
|
+
- 📋 Templates automáticamente copiados a cada proyecto
|
|
94
|
+
- 🔧 Configuración AWC pre-configurada
|
|
95
|
+
- 📚 Guías START_HERE.md en cada fase
|
|
96
|
+
|
|
97
|
+
#### **Estructura de Proyecto Estándar**
|
|
98
|
+
```
|
|
99
|
+
proyecto/
|
|
100
|
+
├── 01-comercial/ # Fase 0: Comercial
|
|
101
|
+
│ ├── 01-prospection/
|
|
102
|
+
│ ├── 02-technical-proposal/
|
|
103
|
+
│ ├── 03-quotation/
|
|
104
|
+
│ └── 04-contract/
|
|
105
|
+
├── 02-inception/ # Fase 1: Inception
|
|
106
|
+
├── 03-analysis/ # Fase 2: Análisis
|
|
107
|
+
├── 04-planning/ # Fase 3: Planificación
|
|
108
|
+
├── 05-development/ # Fase 4: Desarrollo
|
|
109
|
+
│ ├── src/
|
|
110
|
+
│ ├── tests/
|
|
111
|
+
│ └── docs/
|
|
112
|
+
├── 06-qa/ # Fase 5: QA
|
|
113
|
+
├── 07-deployment/ # Fase 6: Deployment
|
|
114
|
+
├── 08-support/ # Fase 7: Soporte
|
|
115
|
+
├── docs/ # Documentación general
|
|
116
|
+
├── .awc/ # Configuración AWC
|
|
117
|
+
│ ├── agents/
|
|
118
|
+
│ ├── workflows/
|
|
119
|
+
│ ├── templates/
|
|
120
|
+
│ └── config.json
|
|
121
|
+
└── README.md
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### **Características del Comando**
|
|
125
|
+
- ✅ Crea estructura completa de 8 fases
|
|
126
|
+
- ✅ Copia todos los templates (7 documentos)
|
|
127
|
+
- ✅ Copia todos los workflows (8 workflows)
|
|
128
|
+
- ✅ Copia todos los agentes (22 agentes)
|
|
129
|
+
- ✅ Genera README.md personalizado
|
|
130
|
+
- ✅ Crea .gitignore apropiado
|
|
131
|
+
- ✅ Inicializa Git automáticamente (opcional)
|
|
132
|
+
- ✅ Crea guías START_HERE.md por fase
|
|
133
|
+
|
|
134
|
+
### 🔄 Modificado
|
|
135
|
+
|
|
136
|
+
- **CLI**: Separado `awc new` (proyectos nuevos) de `awc init` (proyectos existentes)
|
|
137
|
+
- **UX**: Experiencia mejorada con spinner y mensajes claros
|
|
138
|
+
|
|
139
|
+
### 📊 Uso
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Crear nuevo proyecto interactivo
|
|
143
|
+
awc new
|
|
144
|
+
|
|
145
|
+
# Crear proyecto con nombre
|
|
146
|
+
awc new mi-proyecto
|
|
147
|
+
|
|
148
|
+
# Crear proyecto de tipo específico
|
|
149
|
+
awc new mi-api --type api
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
10
154
|
## [2.0.0] - 2026-01-08
|
|
11
155
|
|
|
12
156
|
### 🚀 MAJOR RELEASE - Método Completo End-to-End
|
package/package.json
CHANGED
|
@@ -1,8 +1,53 @@
|
|
|
1
1
|
# GitHub Copilot - Instrucciones del Proyecto
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **IMPORTANTE**: Este archivo se carga AUTOMÁTICAMENTE por GitHub Copilot.
|
|
4
|
+
> No necesitas hacer nada, solo abre el chat de Copilot y comienza a trabajar.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## 🎯 Rol Activo
|
|
7
|
+
|
|
8
|
+
Eres el **ZEN MASTER** del método AWC ZNS-MTD, asistiendo en todas las fases del proyecto.
|
|
9
|
+
|
|
10
|
+
### Comportamiento Automático
|
|
11
|
+
|
|
12
|
+
Cuando el usuario abra el chat de Copilot:
|
|
13
|
+
|
|
14
|
+
1. **Detecta automáticamente** en qué fase del proyecto está (01-comercial, 02-inception, etc.)
|
|
15
|
+
2. **Carga el workflow apropiado** desde `.awc/workflows/`
|
|
16
|
+
3. **Aplica el agente correspondiente** desde `.awc/agents/`
|
|
17
|
+
4. **Ofrece ayuda contextual** sin que el usuario lo pida
|
|
18
|
+
|
|
19
|
+
### Ejemplo de Interacción Automática
|
|
20
|
+
|
|
21
|
+
**Usuario abre Copilot en `01-comercial/`:**
|
|
22
|
+
```
|
|
23
|
+
🎯 Detecté que estás en la Fase Comercial.
|
|
24
|
+
|
|
25
|
+
Puedo ayudarte con:
|
|
26
|
+
• Crear discovery notes (.awc/templates/discovery-notes.md)
|
|
27
|
+
• Análisis de viabilidad (.awc/templates/viabilidad.md)
|
|
28
|
+
• Generar oferta comercial (.awc/templates/oferta-comercial.md)
|
|
29
|
+
• Preparar cotización (.awc/templates/cotizacion.md)
|
|
30
|
+
|
|
31
|
+
¿En qué te ayudo?
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Usuario abre Copilot en `05-development/`:**
|
|
35
|
+
```
|
|
36
|
+
💻 Modo Desarrollo Activo (TDD)
|
|
37
|
+
|
|
38
|
+
Workflow cargado: development-flow
|
|
39
|
+
Agente activo: DEVELOPER PRO
|
|
40
|
+
|
|
41
|
+
Puedo ayudarte con:
|
|
42
|
+
• Implementar feature con TDD (Red → Green → Refactor)
|
|
43
|
+
• Code review de PRs
|
|
44
|
+
• Refactorización guiada
|
|
45
|
+
• Debugging avanzado
|
|
46
|
+
|
|
47
|
+
¿Qué feature implementamos?
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 🧘 Filosofía ZNS (Aplicar SIEMPRE)
|
|
6
51
|
|
|
7
52
|
Sigue estos principios en todas las interacciones:
|
|
8
53
|
|
|
@@ -26,7 +71,54 @@ Sigue estos principios en todas las interacciones:
|
|
|
26
71
|
└── config.yaml # Configuración del método
|
|
27
72
|
```
|
|
28
73
|
|
|
29
|
-
##
|
|
74
|
+
## 🤖 Detección Automática de Contexto
|
|
75
|
+
|
|
76
|
+
Antes de responder CUALQUIER pregunta, ejecuta mentalmente:
|
|
77
|
+
|
|
78
|
+
```javascript
|
|
79
|
+
// Detectar fase actual
|
|
80
|
+
const currentPath = getCurrentWorkingDirectory();
|
|
81
|
+
const phase = detectPhase(currentPath); // 01-comercial, 02-inception, etc.
|
|
82
|
+
const workflow = loadWorkflow(phase); // .awc/workflows/{phase}-flow/
|
|
83
|
+
const agent = loadAgent(phase); // .awc/agents/
|
|
84
|
+
const templates = loadTemplates(phase); // .awc/templates/
|
|
85
|
+
|
|
86
|
+
// Cargar contexto
|
|
87
|
+
const projectConfig = readFile('.awc/config.json');
|
|
88
|
+
const projectType = projectConfig.project.type;
|
|
89
|
+
const teamSize = projectConfig.project.teamSize;
|
|
90
|
+
|
|
91
|
+
// Responder con contexto cargado
|
|
92
|
+
respondWithContext(phase, workflow, agent, templates);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 📋 Respuestas Contextuales por Fase
|
|
96
|
+
|
|
97
|
+
### Fase 01-comercial/
|
|
98
|
+
**Agente activo**: Product Owner + Cost Estimator
|
|
99
|
+
**Templates disponibles**: discovery-notes.md, viabilidad.md, oferta-comercial.md, cotizacion.md
|
|
100
|
+
**Acciones sugeridas**:
|
|
101
|
+
- "Ayúdame a completar discovery notes"
|
|
102
|
+
- "Genera análisis de viabilidad"
|
|
103
|
+
- "Crea oferta comercial para [cliente]"
|
|
104
|
+
|
|
105
|
+
### Fase 02-inception/
|
|
106
|
+
**Agente activo**: Product Owner + Solution Architect
|
|
107
|
+
**Templates disponibles**: kickoff-agenda.md, PRD-template.md
|
|
108
|
+
**Acciones sugeridas**:
|
|
109
|
+
- "Genera agenda de kickoff"
|
|
110
|
+
- "Ayúdame a crear el PRD"
|
|
111
|
+
- "Descomponer requisitos en user stories"
|
|
112
|
+
|
|
113
|
+
### Fase 05-development/
|
|
114
|
+
**Agente activo**: Developer Pro
|
|
115
|
+
**Workflow**: TDD (Red → Green → Refactor)
|
|
116
|
+
**Acciones sugeridas**:
|
|
117
|
+
- "Implementar [feature] con TDD"
|
|
118
|
+
- "Revisar código de [archivo]"
|
|
119
|
+
- "Refactorizar [componente]"
|
|
120
|
+
|
|
121
|
+
## 🎯 Comandos Rápidos (Usuario puede invocar)
|
|
30
122
|
|
|
31
123
|
### ZEN MASTER (Orquestador)
|
|
32
124
|
**Cuándo usar**: Coordinación estratégica, toma de decisiones, análisis de complejidad.
|
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,724 @@
|
|
|
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
|
+
// 9.1. Crear configuración de VS Code
|
|
229
|
+
await createVSCodeConfig(projectPath);
|
|
230
|
+
spinner.text = 'Configuración VS Code creada';
|
|
231
|
+
|
|
232
|
+
// 9.2. Copiar copilot-instructions.md
|
|
233
|
+
const githubDir = path.join(projectPath, '.github');
|
|
234
|
+
await fs.ensureDir(githubDir);
|
|
235
|
+
const templateCopilotPath = path.join(__dirname, '../../../templates/.github/copilot-instructions.md');
|
|
236
|
+
if (await fs.pathExists(templateCopilotPath)) {
|
|
237
|
+
await fs.copy(templateCopilotPath, path.join(githubDir, 'copilot-instructions.md'));
|
|
238
|
+
spinner.text = 'GitHub Copilot instructions creadas';
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// 10. Inicializar Git si se solicitó
|
|
242
|
+
if (answers.gitInit) {
|
|
243
|
+
const { execSync } = require('child_process');
|
|
244
|
+
try {
|
|
245
|
+
execSync('git init', { cwd: projectPath, stdio: 'ignore' });
|
|
246
|
+
execSync('git add .', { cwd: projectPath, stdio: 'ignore' });
|
|
247
|
+
execSync(`git commit -m "feat: Inicializar proyecto ${projectName} con AWC ZNS-MTD"`, {
|
|
248
|
+
cwd: projectPath,
|
|
249
|
+
stdio: 'ignore'
|
|
250
|
+
});
|
|
251
|
+
spinner.text = 'Repositorio Git inicializado';
|
|
252
|
+
} catch (error) {
|
|
253
|
+
// Git no está disponible o fallo, continuar sin git
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
spinner.succeed(chalk.green('✅ Proyecto creado exitosamente'));
|
|
258
|
+
|
|
259
|
+
// Mostrar resumen
|
|
260
|
+
console.log(chalk.cyan('\n' + '═'.repeat(60)));
|
|
261
|
+
console.log(chalk.cyan('📦 Resumen del Proyecto'));
|
|
262
|
+
console.log(chalk.cyan('═'.repeat(60) + '\n'));
|
|
263
|
+
|
|
264
|
+
console.log(`${chalk.gray('Nombre:')} ${chalk.green(projectName)}`);
|
|
265
|
+
console.log(`${chalk.gray('Tipo:')} ${chalk.yellow(answers.projectType)}`);
|
|
266
|
+
console.log(`${chalk.gray('Equipo:')} ${chalk.yellow(answers.teamSize)}`);
|
|
267
|
+
console.log(`${chalk.gray('Ubicación:')} ${chalk.blue(projectPath)}`);
|
|
268
|
+
console.log(`${chalk.gray('AWC Versión:')} ${chalk.yellow(getVersion())}\n`);
|
|
269
|
+
|
|
270
|
+
// Próximos pasos
|
|
271
|
+
console.log(chalk.cyan('📚 Próximos Pasos:\n'));
|
|
272
|
+
console.log(` ${chalk.green('1.')} cd ${projectName}`);
|
|
273
|
+
console.log(` ${chalk.green('2.')} Revisar ${chalk.yellow('01-comercial/START_HERE.md')}`);
|
|
274
|
+
console.log(` ${chalk.green('3.')} Completar discovery notes y análisis de viabilidad`);
|
|
275
|
+
console.log(` ${chalk.green('4.')} Ejecutar ${chalk.yellow('awc status')} para ver el progreso\n`);
|
|
276
|
+
|
|
277
|
+
console.log(chalk.cyan('🎯 Flujo de Trabajo Recomendado:\n'));
|
|
278
|
+
console.log(` ${chalk.gray('→')} Comercial (01-comercial/)`);
|
|
279
|
+
console.log(` ${chalk.gray('→')} Inception (02-inception/)`);
|
|
280
|
+
console.log(` ${chalk.gray('→')} Análisis (03-analysis/)`);
|
|
281
|
+
console.log(` ${chalk.gray('→')} Planificación (04-planning/)`);
|
|
282
|
+
console.log(` ${chalk.gray('→')} Desarrollo (05-development/)`);
|
|
283
|
+
console.log(` ${chalk.gray('→')} QA (06-qa/)`);
|
|
284
|
+
console.log(` ${chalk.gray('→')} Deployment (07-deployment/)`);
|
|
285
|
+
console.log(` ${chalk.gray('→')} Soporte (08-support/)\n`);
|
|
286
|
+
|
|
287
|
+
console.log(chalk.green('✨ ¡Listo para comenzar tu proyecto!\n'));
|
|
288
|
+
|
|
289
|
+
} catch (error) {
|
|
290
|
+
spinner.fail(chalk.red('❌ Error creando proyecto'));
|
|
291
|
+
throw error;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Crea el contenido del README.md
|
|
297
|
+
*/
|
|
298
|
+
function createReadmeContent(projectName, answers) {
|
|
299
|
+
return `# ${projectName}
|
|
300
|
+
|
|
301
|
+
> ${answers.description}
|
|
302
|
+
|
|
303
|
+
## 📋 Información del Proyecto
|
|
304
|
+
|
|
305
|
+
- **Tipo**: ${answers.projectType}
|
|
306
|
+
- **Equipo**: ${answers.teamSize}
|
|
307
|
+
- **Metodología**: AWC ZNS-MTD (Zen, Neutro, Sistemático)
|
|
308
|
+
|
|
309
|
+
## 🚀 Fases del Proyecto
|
|
310
|
+
|
|
311
|
+
Este proyecto sigue el método AWC ZNS-MTD con 8 fases completas:
|
|
312
|
+
|
|
313
|
+
### 📊 Fase 0: Comercial (01-comercial/)
|
|
314
|
+
- Prospección y discovery
|
|
315
|
+
- Oferta técnica
|
|
316
|
+
- Cotización
|
|
317
|
+
- Contrato
|
|
318
|
+
|
|
319
|
+
### 🎯 Fase 1: Inception (02-inception/)
|
|
320
|
+
- Kickoff meeting
|
|
321
|
+
- Product Requirements Document (PRD)
|
|
322
|
+
- Backlog inicial
|
|
323
|
+
- Release planning
|
|
324
|
+
|
|
325
|
+
### 🔍 Fase 2: Análisis (03-analysis/)
|
|
326
|
+
- Code audit (si aplica)
|
|
327
|
+
- Architecture review
|
|
328
|
+
- Technical debt assessment
|
|
329
|
+
- Recomendaciones
|
|
330
|
+
|
|
331
|
+
### 📅 Fase 3: Planificación (04-planning/)
|
|
332
|
+
- Sprint planning
|
|
333
|
+
- Backlog refinement
|
|
334
|
+
- Release planning
|
|
335
|
+
- Product roadmap
|
|
336
|
+
|
|
337
|
+
### 💻 Fase 4: Desarrollo (05-development/)
|
|
338
|
+
- Implementación TDD
|
|
339
|
+
- Code review
|
|
340
|
+
- CI/CD
|
|
341
|
+
|
|
342
|
+
### ✅ Fase 5: QA (06-qa/)
|
|
343
|
+
- Test planning
|
|
344
|
+
- Automated testing
|
|
345
|
+
- Manual testing
|
|
346
|
+
- UAT
|
|
347
|
+
|
|
348
|
+
### 🚀 Fase 6: Deployment (07-deployment/)
|
|
349
|
+
- Pre-deployment
|
|
350
|
+
- Staging
|
|
351
|
+
- Production
|
|
352
|
+
- Post-deployment
|
|
353
|
+
|
|
354
|
+
### 🛠️ Fase 7: Soporte (08-support/)
|
|
355
|
+
- Incident response
|
|
356
|
+
- Bug fixing
|
|
357
|
+
- Maintenance
|
|
358
|
+
- Monitoring
|
|
359
|
+
|
|
360
|
+
## 📚 Documentación
|
|
361
|
+
|
|
362
|
+
Toda la documentación del proyecto se encuentra en el directorio \`docs/\`:
|
|
363
|
+
|
|
364
|
+
- \`docs/architecture/\` - Diagramas y decisiones arquitectónicas
|
|
365
|
+
- \`docs/adr/\` - Architecture Decision Records
|
|
366
|
+
- \`docs/api/\` - Documentación de APIs
|
|
367
|
+
- \`docs/guides/\` - Guías de desarrollo y deployment
|
|
368
|
+
|
|
369
|
+
## 🔧 Configuración AWC
|
|
370
|
+
|
|
371
|
+
El directorio \`.awc/\` contiene:
|
|
372
|
+
|
|
373
|
+
- \`agents/\` - Agentes especializados AWC ZNS-MTD
|
|
374
|
+
- \`workflows/\` - Workflows para cada fase
|
|
375
|
+
- \`templates/\` - Templates de documentos
|
|
376
|
+
- \`config.json\` - Configuración del proyecto
|
|
377
|
+
|
|
378
|
+
## 🎯 Estado Actual
|
|
379
|
+
|
|
380
|
+
**Fase actual**: Comercial (inicio)
|
|
381
|
+
|
|
382
|
+
Revisar \`01-comercial/START_HERE.md\` para comenzar.
|
|
383
|
+
|
|
384
|
+
## 📝 Comandos AWC
|
|
385
|
+
|
|
386
|
+
\`\`\`bash
|
|
387
|
+
# Ver estado del proyecto
|
|
388
|
+
awc status
|
|
389
|
+
|
|
390
|
+
# Validar estructura
|
|
391
|
+
awc validate
|
|
392
|
+
|
|
393
|
+
# Ver configuración
|
|
394
|
+
awc config
|
|
395
|
+
\`\`\`
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
Generado con ❤️ usando AWC ZNS-MTD Method
|
|
400
|
+
`;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Crea el contenido del .gitignore
|
|
405
|
+
*/
|
|
406
|
+
function createGitignoreContent() {
|
|
407
|
+
return `# Dependencies
|
|
408
|
+
node_modules/
|
|
409
|
+
vendor/
|
|
410
|
+
bower_components/
|
|
411
|
+
|
|
412
|
+
# Build outputs
|
|
413
|
+
dist/
|
|
414
|
+
build/
|
|
415
|
+
out/
|
|
416
|
+
target/
|
|
417
|
+
*.exe
|
|
418
|
+
*.dll
|
|
419
|
+
*.so
|
|
420
|
+
*.dylib
|
|
421
|
+
|
|
422
|
+
# IDE
|
|
423
|
+
.vscode/
|
|
424
|
+
.idea/
|
|
425
|
+
*.swp
|
|
426
|
+
*.swo
|
|
427
|
+
*~
|
|
428
|
+
.DS_Store
|
|
429
|
+
|
|
430
|
+
# Logs
|
|
431
|
+
logs/
|
|
432
|
+
*.log
|
|
433
|
+
npm-debug.log*
|
|
434
|
+
yarn-debug.log*
|
|
435
|
+
yarn-error.log*
|
|
436
|
+
|
|
437
|
+
# Environment variables
|
|
438
|
+
.env
|
|
439
|
+
.env.local
|
|
440
|
+
.env.*.local
|
|
441
|
+
|
|
442
|
+
# OS
|
|
443
|
+
Thumbs.db
|
|
444
|
+
.DS_Store
|
|
445
|
+
|
|
446
|
+
# Temporary files
|
|
447
|
+
tmp/
|
|
448
|
+
temp/
|
|
449
|
+
*.tmp
|
|
450
|
+
|
|
451
|
+
# Coverage
|
|
452
|
+
coverage/
|
|
453
|
+
*.lcov
|
|
454
|
+
.nyc_output/
|
|
455
|
+
|
|
456
|
+
# Confidential (keep locally, never commit)
|
|
457
|
+
01-comercial/04-contract/*.pdf
|
|
458
|
+
**/confidential/
|
|
459
|
+
**/*-confidential.*
|
|
460
|
+
`;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Crea guías de inicio para cada fase
|
|
465
|
+
*/
|
|
466
|
+
async function createPhaseGuides(projectPath) {
|
|
467
|
+
const phases = [
|
|
468
|
+
{
|
|
469
|
+
dir: '01-comercial',
|
|
470
|
+
title: 'Fase 0: Comercial',
|
|
471
|
+
content: `# 🎯 START HERE - Fase Comercial
|
|
472
|
+
|
|
473
|
+
## Objetivo
|
|
474
|
+
Capturar requisitos del cliente, evaluar viabilidad y generar oferta comercial.
|
|
475
|
+
|
|
476
|
+
## Pasos a seguir
|
|
477
|
+
|
|
478
|
+
### 1. Discovery & Prospección
|
|
479
|
+
📂 Directorio: \`01-prospection/\`
|
|
480
|
+
|
|
481
|
+
- [ ] Completar \`.awc/templates/discovery-notes.md\`
|
|
482
|
+
- [ ] Identificar stakeholders clave
|
|
483
|
+
- [ ] Entender el problema de negocio
|
|
484
|
+
- [ ] Documentar contexto actual
|
|
485
|
+
|
|
486
|
+
### 2. Análisis de Viabilidad
|
|
487
|
+
📂 Directorio: \`01-prospection/\`
|
|
488
|
+
|
|
489
|
+
- [ ] Completar \`.awc/templates/viabilidad.md\`
|
|
490
|
+
- [ ] Evaluar viabilidad técnica
|
|
491
|
+
- [ ] Evaluar viabilidad económica
|
|
492
|
+
- [ ] Identificar riesgos principales
|
|
493
|
+
|
|
494
|
+
### 3. Oferta Técnica
|
|
495
|
+
📂 Directorio: \`02-technical-proposal/\`
|
|
496
|
+
|
|
497
|
+
- [ ] Copiar template: \`.awc/templates/oferta-comercial.md\`
|
|
498
|
+
- [ ] Definir solución propuesta
|
|
499
|
+
- [ ] Especificar stack tecnológico
|
|
500
|
+
- [ ] Definir alcance y exclusiones
|
|
501
|
+
|
|
502
|
+
### 4. Cotización
|
|
503
|
+
📂 Directorio: \`03-quotation/\`
|
|
504
|
+
|
|
505
|
+
- [ ] Copiar template: \`.awc/templates/cotizacion.md\`
|
|
506
|
+
- [ ] Estimar esfuerzo por fase
|
|
507
|
+
- [ ] Calcular costos
|
|
508
|
+
- [ ] Definir cronograma
|
|
509
|
+
|
|
510
|
+
### 5. Contrato (confidencial)
|
|
511
|
+
📂 Directorio: \`04-contract/\`
|
|
512
|
+
|
|
513
|
+
- [ ] Negociar términos
|
|
514
|
+
- [ ] Firmar contrato
|
|
515
|
+
- [ ] Mover a siguiente fase
|
|
516
|
+
|
|
517
|
+
## ✅ Criterios de Salida
|
|
518
|
+
- ✅ Contrato firmado
|
|
519
|
+
- ✅ Cliente aprobó oferta y cotización
|
|
520
|
+
- ✅ Equipo asignado
|
|
521
|
+
- ✅ Fecha de kickoff definida
|
|
522
|
+
|
|
523
|
+
## ➡️ Siguiente Fase
|
|
524
|
+
Una vez completado, pasar a **02-inception/**
|
|
525
|
+
`
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
dir: '02-inception',
|
|
529
|
+
title: 'Fase 1: Inception',
|
|
530
|
+
content: `# 🚀 START HERE - Fase Inception
|
|
531
|
+
|
|
532
|
+
## Objetivo
|
|
533
|
+
Arranque formal del proyecto, definir PRD y backlog inicial.
|
|
534
|
+
|
|
535
|
+
## Pasos a seguir
|
|
536
|
+
|
|
537
|
+
### 1. Kickoff Meeting
|
|
538
|
+
📂 Directorio: \`01-kickoff/\`
|
|
539
|
+
|
|
540
|
+
- [ ] Copiar template: \`.awc/templates/kickoff-agenda.md\`
|
|
541
|
+
- [ ] Presentar equipo
|
|
542
|
+
- [ ] Alinear expectativas
|
|
543
|
+
- [ ] Definir canales de comunicación
|
|
544
|
+
|
|
545
|
+
### 2. Product Requirements Document (PRD)
|
|
546
|
+
📂 Directorio: \`02-prd/\`
|
|
547
|
+
|
|
548
|
+
- [ ] Copiar template: \`.awc/templates/PRD-template.md\`
|
|
549
|
+
- [ ] Documentar requisitos funcionales
|
|
550
|
+
- [ ] Documentar requisitos no funcionales
|
|
551
|
+
- [ ] Definir user personas
|
|
552
|
+
- [ ] Mapear user journeys
|
|
553
|
+
|
|
554
|
+
### 3. Backlog Inicial
|
|
555
|
+
📂 Directorio: \`03-backlog/\`
|
|
556
|
+
|
|
557
|
+
- [ ] Crear user stories
|
|
558
|
+
- [ ] Priorizar backlog (MoSCoW)
|
|
559
|
+
- [ ] Estimar user stories (Planning Poker)
|
|
560
|
+
- [ ] Crear epic mapping
|
|
561
|
+
|
|
562
|
+
### 4. Release Planning
|
|
563
|
+
📂 Directorio: \`04-release-planning/\`
|
|
564
|
+
|
|
565
|
+
- [ ] Definir MVP (release 1)
|
|
566
|
+
- [ ] Planificar releases subsecuentes
|
|
567
|
+
- [ ] Crear roadmap de producto
|
|
568
|
+
- [ ] Definir milestones
|
|
569
|
+
|
|
570
|
+
## ✅ Criterios de Salida
|
|
571
|
+
- ✅ PRD aprobado por stakeholders
|
|
572
|
+
- ✅ Backlog priorizado y estimado
|
|
573
|
+
- ✅ Release plan definido
|
|
574
|
+
- ✅ Sprint 1 planificado
|
|
575
|
+
|
|
576
|
+
## ➡️ Siguiente Fase
|
|
577
|
+
Dependiendo del proyecto:
|
|
578
|
+
- Proyecto nuevo → **04-planning/** (skip análisis)
|
|
579
|
+
- Proyecto existente → **03-analysis/**
|
|
580
|
+
`
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
dir: '05-development',
|
|
584
|
+
title: 'Fase 4: Desarrollo',
|
|
585
|
+
content: `# 💻 START HERE - Fase Desarrollo
|
|
586
|
+
|
|
587
|
+
## Objetivo
|
|
588
|
+
Implementar user stories siguiendo TDD y mejores prácticas.
|
|
589
|
+
|
|
590
|
+
## Estructura
|
|
591
|
+
\`\`\`
|
|
592
|
+
05-development/
|
|
593
|
+
├── src/ # Código fuente
|
|
594
|
+
├── tests/ # Tests (unit, integration, e2e)
|
|
595
|
+
└── docs/ # Documentación técnica
|
|
596
|
+
\`\`\`
|
|
597
|
+
|
|
598
|
+
## Pasos a seguir
|
|
599
|
+
|
|
600
|
+
### 1. Feature Kickoff
|
|
601
|
+
- [ ] Seleccionar user story del sprint backlog
|
|
602
|
+
- [ ] Revisar acceptance criteria
|
|
603
|
+
- [ ] Diseño técnico (si es necesario)
|
|
604
|
+
- [ ] Crear feature branch
|
|
605
|
+
|
|
606
|
+
### 2. Development (TDD)
|
|
607
|
+
- [ ] **RED**: Escribir test que falla
|
|
608
|
+
- [ ] **GREEN**: Implementar código mínimo para pasar test
|
|
609
|
+
- [ ] **REFACTOR**: Mejorar código manteniendo tests en verde
|
|
610
|
+
- [ ] Repetir ciclo
|
|
611
|
+
|
|
612
|
+
### 3. Code Review
|
|
613
|
+
- [ ] Crear Pull Request
|
|
614
|
+
- [ ] Solicitar revisión (mínimo 2 aprobadores)
|
|
615
|
+
- [ ] Aplicar feedback
|
|
616
|
+
- [ ] Aprobar PR
|
|
617
|
+
|
|
618
|
+
### 4. Integration
|
|
619
|
+
- [ ] Merge a develop/main
|
|
620
|
+
- [ ] CI/CD automático ejecuta tests
|
|
621
|
+
- [ ] Deploy automático a dev/staging
|
|
622
|
+
|
|
623
|
+
## 🎯 Mejores Prácticas
|
|
624
|
+
- ✅ Feature branches (feature/US-123-login)
|
|
625
|
+
- ✅ Commits frecuentes y descriptivos
|
|
626
|
+
- ✅ PRs pequeños (<400 líneas)
|
|
627
|
+
- ✅ Code coverage >80%
|
|
628
|
+
- ✅ SonarQube sin critical issues
|
|
629
|
+
|
|
630
|
+
## ➡️ Siguiente Fase
|
|
631
|
+
Una vez features completas → **06-qa/**
|
|
632
|
+
`
|
|
633
|
+
}
|
|
634
|
+
];
|
|
635
|
+
|
|
636
|
+
for (const phase of phases) {
|
|
637
|
+
const filePath = path.join(projectPath, phase.dir, 'START_HERE.md');
|
|
638
|
+
await fs.writeFile(filePath, phase.content);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Crea configuración de VS Code para cargar AWC automáticamente
|
|
644
|
+
*/
|
|
645
|
+
async function createVSCodeConfig(projectPath) {
|
|
646
|
+
const vscodeDir = path.join(projectPath, '.vscode');
|
|
647
|
+
await fs.ensureDir(vscodeDir);
|
|
648
|
+
|
|
649
|
+
// settings.json - Configuración de workspace
|
|
650
|
+
const settings = {
|
|
651
|
+
"github.copilot.enable": {
|
|
652
|
+
"*": true
|
|
653
|
+
},
|
|
654
|
+
"github.copilot.advanced": {},
|
|
655
|
+
"files.associations": {
|
|
656
|
+
"*.agent.yaml": "yaml",
|
|
657
|
+
"copilot-instructions.md": "markdown"
|
|
658
|
+
},
|
|
659
|
+
"files.exclude": {
|
|
660
|
+
"**/.git": true,
|
|
661
|
+
"**/.DS_Store": true,
|
|
662
|
+
"**/node_modules": true
|
|
663
|
+
},
|
|
664
|
+
"search.exclude": {
|
|
665
|
+
"**/node_modules": true,
|
|
666
|
+
"**/bower_components": true,
|
|
667
|
+
"**/*.code-search": true
|
|
668
|
+
},
|
|
669
|
+
"awc-zns-mtd.enabled": true,
|
|
670
|
+
"awc-zns-mtd.autoLoadInstructions": true
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
await fs.writeJson(
|
|
674
|
+
path.join(vscodeDir, 'settings.json'),
|
|
675
|
+
settings,
|
|
676
|
+
{ spaces: 2 }
|
|
677
|
+
);
|
|
678
|
+
|
|
679
|
+
// extensions.json - Extensiones recomendadas
|
|
680
|
+
const extensions = {
|
|
681
|
+
"recommendations": [
|
|
682
|
+
"github.copilot",
|
|
683
|
+
"github.copilot-chat",
|
|
684
|
+
"redhat.vscode-yaml",
|
|
685
|
+
"yzhang.markdown-all-in-one"
|
|
686
|
+
]
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
await fs.writeJson(
|
|
690
|
+
path.join(vscodeDir, 'extensions.json'),
|
|
691
|
+
extensions,
|
|
692
|
+
{ spaces: 2 }
|
|
693
|
+
);
|
|
694
|
+
|
|
695
|
+
// AWC-ZNS-MTD.code-workspace - Workspace file
|
|
696
|
+
const workspace = {
|
|
697
|
+
"folders": [
|
|
698
|
+
{
|
|
699
|
+
"path": ".",
|
|
700
|
+
"name": path.basename(projectPath)
|
|
701
|
+
}
|
|
702
|
+
],
|
|
703
|
+
"settings": {
|
|
704
|
+
"github.copilot.enable": {
|
|
705
|
+
"*": true
|
|
706
|
+
},
|
|
707
|
+
"awc-zns-mtd.enabled": true
|
|
708
|
+
},
|
|
709
|
+
"extensions": {
|
|
710
|
+
"recommendations": [
|
|
711
|
+
"github.copilot",
|
|
712
|
+
"github.copilot-chat"
|
|
713
|
+
]
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
await fs.writeJson(
|
|
718
|
+
path.join(projectPath, `${path.basename(projectPath)}.code-workspace`),
|
|
719
|
+
workspace,
|
|
720
|
+
{ spaces: 2 }
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
module.exports = { newProjectCommand };
|