awc-zns-mtd 2.5.0 → 2.6.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/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.6.0] - 2026-01-08
11
+
12
+ ### 🎯 FLUJO DE INICIALIZACIÓN PROFESIONAL
13
+
14
+ #### ✨ Cambios Importantes
15
+
16
+ **awc new → Solo Estructura Base**
17
+ - ✅ Pide únicamente: nombre y responsable del proyecto
18
+ - ✅ Crea directorio base + .awc/ (agentes, workflows, templates)
19
+ - ✅ NO crea estructura de fases todavía
20
+ - ✅ Genera NEXT_STEPS.md explicando qué hacer después
21
+
22
+ **awc init → Inicialización Inteligente**
23
+ - 🎯 Pregunta tipo de proyecto:
24
+ * 🔍 Auditoría de Código Existente
25
+ * 🆕 Desarrollo Desde Cero
26
+ * 🔄 Migración/Modernización
27
+ * 🛠️ Mantenimiento/Soporte
28
+ * 📱 Aplicación Móvil
29
+ * 🌐 API/Microservicios
30
+ * 🏢 Sistema Empresarial
31
+
32
+ - ⚡ Pregunta workflow (Quick, Standard, Enterprise)
33
+ - 🛠️ Pregunta stack tecnológico (Java, .NET, Python, React, etc.)
34
+
35
+ **Estructura Personalizada**
36
+ - ✅ Crea SOLO las fases necesarias según tipo de proyecto
37
+ - ✅ Auditoría: 01-comercial, 03-analysis (principal), 04-planning, 08-support
38
+ - ✅ Greenfield: 01-comercial, 02-inception, 04-planning, 05-development (principal), 06-qa, 07-deployment
39
+ - ✅ Migración: 01-comercial, 03-analysis (legacy), 04-planning, 05-development, 07-deployment
40
+ - ✅ Maintenance: 08-support (principal), 03-analysis, 01-comercial
41
+ - ✅ Mobile: 02-inception (UX/UI), 05-development (iOS/Android), 06-qa, 07-deployment
42
+ - ✅ API: 02-inception (diseño API), 05-development, 06-qa, 07-deployment
43
+
44
+ **client-docs/ Específicos**
45
+ - 📂 Solo se crean los directorios client-docs/ relevantes para el tipo de proyecto
46
+ - 📄 README.md contextualizados por tipo de proyecto
47
+
48
+ **Agentes Recomendados**
49
+ - 🤖 Sugiere agentes especializados según tipo de proyecto y stack
50
+ - 🎯 Auditoría → backend-audit, frontend-audit, obsolescence-analyst
51
+ - 🆕 Greenfield → product-owner, solution-architect, technical-stories
52
+ - 🔄 Migración → backend-audit, solution-architect, database-engineer
53
+
54
+ #### 📋 Flujo Nuevo
55
+
56
+ ```bash
57
+ # 1. Crear proyecto base
58
+ awc new mi-proyecto
59
+ → Pide: nombre, responsable
60
+ → Crea: directorio + .awc/
61
+ → Mensaje: "Ejecuta 'awc init' para continuar"
62
+
63
+ # 2. Inicializar tipo de proyecto
64
+ cd mi-proyecto
65
+ awc init
66
+ → Pregunta: tipo, workflow, tecnologías
67
+ → Crea: estructura personalizada
68
+ → Muestra: agentes recomendados
69
+
70
+ # 3. Comenzar a trabajar
71
+ → Ir a fase inicial (ej: 01-comercial/)
72
+ → Leer START_HERE.md
73
+ → Usar agentes especializados
74
+ ```
75
+
76
+ ---
77
+
10
78
  ## [2.5.0] - 2026-01-08
11
79
 
12
80
  ### 🎯 ESTRUCTURA CLIENT-DOCS AUTOMÁTICA
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "awc-zns-mtd",
4
- "version": "2.5.0",
4
+ "version": "2.6.1",
5
5
  "description": "AWC ZNS-MTD Method - Metodología de Transformación Digital Zen, Neutro y Sistemático",
6
6
  "keywords": [
7
7
  "awc",
@@ -4,7 +4,7 @@
4
4
 
5
5
  module_name: "AWC ZNS-MTD Method"
6
6
  module_code: "awc-zns-mtd"
7
- version: "2.5.0"
7
+ version: "2.6.1"
8
8
  author: "AWC Team"
9
9
  description: "Metodología de Transformación Digital - Zen, Neutro, Sistemático"
10
10
 
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Comando: init
3
+ * Inicializa el proyecto con ZNS-MTD y analiza contexto
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 { analyzeProject } = require('../utils/project-analyzer');
11
+ const { loadConfig, updateConfig } = require('../utils/file-utils');
12
+ const { displayLogo } = require('../utils/console-logger');
13
+
14
+ async function initCommand(options = {}) {
15
+ const cwd = process.cwd();
16
+ const awcDir = path.join(cwd, '.awc');
17
+
18
+ displayLogo();
19
+
20
+ console.log(chalk.cyan('\n🎯 Inicialización de Proyecto ZNS-MTD\n'));
21
+
22
+ // Verificar instalación
23
+ if (!(await fs.pathExists(awcDir))) {
24
+ console.log(chalk.red('❌ AWC ZNS-MTD no está instalado.'));
25
+ console.log(chalk.yellow(`\n💡 Ejecuta primero ${chalk.green('awc install')}\n`));
26
+ return;
27
+ }
28
+
29
+ const spinner = ora('Analizando proyecto...').start();
30
+
31
+ try {
32
+ // Analizar proyecto
33
+ const analysis = await analyzeProject(cwd);
34
+
35
+ spinner.succeed(chalk.green('✅ Análisis completado'));
36
+
37
+ // Mostrar resultados
38
+ console.log(chalk.cyan('\n📊 Resultados del Análisis:\n'));
39
+ console.log(chalk.gray('─'.repeat(60)));
40
+
41
+ console.log(chalk.cyan('Tecnologías Detectadas:'));
42
+ if (analysis.technologies.length > 0) {
43
+ analysis.technologies.forEach(tech => {
44
+ console.log(` ${chalk.green('✓')} ${tech}`);
45
+ });
46
+ } else {
47
+ console.log(chalk.yellow(' No se detectaron tecnologías conocidas'));
48
+ }
49
+
50
+ console.log(chalk.cyan('\nEstructura del Proyecto:'));
51
+ console.log(` Archivos totales: ${chalk.yellow(analysis.fileCount)}`);
52
+ console.log(` Directorios: ${chalk.yellow(analysis.directoryCount)}`);
53
+ console.log(` Lenguajes: ${chalk.yellow(analysis.languages.join(', ') || 'N/A')}`);
54
+
55
+ console.log(chalk.cyan('\nComplejidad Estimada:'));
56
+ console.log(` Nivel: ${getComplexityColor(analysis.complexity)}`);
57
+ console.log(` Tamaño: ${getSizeColor(analysis.size)}`);
58
+
59
+ console.log(chalk.gray('─'.repeat(60)));
60
+
61
+ // Recomendación de workflow
62
+ console.log(chalk.cyan('\n🎯 Workflow Recomendado:\n'));
63
+
64
+ const recommendedWorkflow = getRecommendedWorkflow(analysis);
65
+
66
+ console.log(` ${chalk.green('→')} ${chalk.bold(recommendedWorkflow.name)}`);
67
+ console.log(` ${chalk.gray(recommendedWorkflow.description)}`);
68
+ console.log(` ${chalk.gray('Duración estimada:')} ${chalk.yellow(recommendedWorkflow.duration)}\n`);
69
+
70
+ // Guardar análisis en configuración
71
+ const config = await loadConfig(awcDir);
72
+ config.lastAnalysis = {
73
+ date: new Date().toISOString(),
74
+ ...analysis,
75
+ recommendedWorkflow: recommendedWorkflow.id
76
+ };
77
+ await updateConfig(awcDir, config);
78
+
79
+ // Próximos pasos
80
+ console.log(chalk.cyan('📚 Próximos Pasos:\n'));
81
+ console.log(` 1. Carga el agente ${chalk.green('ZEN MASTER')} en tu IDE`);
82
+ console.log(` 2. Ejecuta ${chalk.green('*' + recommendedWorkflow.command)} para comenzar`);
83
+ console.log(` 3. Sigue las recomendaciones del workflow\n`);
84
+
85
+ } catch (error) {
86
+ spinner.fail(chalk.red('❌ Error en el análisis'));
87
+ throw error;
88
+ }
89
+ }
90
+
91
+ /**
92
+ * Determina el workflow recomendado basado en el análisis
93
+ */
94
+ function getRecommendedWorkflow(analysis) {
95
+ const { complexity, size, fileCount } = analysis;
96
+
97
+ // Enterprise Flow
98
+ if (complexity === 'high' || size === 'large' || fileCount > 1000) {
99
+ return {
100
+ id: 'enterprise-flow',
101
+ name: 'Enterprise Flow',
102
+ command: 'zns-enterprise-flow',
103
+ description: 'Para sistemas complejos con múltiples stakeholders',
104
+ duration: '< 2 horas'
105
+ };
106
+ }
107
+
108
+ // Quick Flow
109
+ if (complexity === 'low' && size === 'small' && fileCount < 50) {
110
+ return {
111
+ id: 'quick-flow',
112
+ name: 'Quick Flow',
113
+ command: 'zns-quick-flow',
114
+ description: 'Para cambios rápidos y bugs menores',
115
+ duration: '< 10 minutos'
116
+ };
117
+ }
118
+
119
+ // Standard Flow (default)
120
+ return {
121
+ id: 'standard-flow',
122
+ name: 'Standard Flow',
123
+ command: 'zns-standard-flow',
124
+ description: 'Para features medias y refactorizaciones',
125
+ duration: '< 30 minutos'
126
+ };
127
+ }
128
+
129
+ function getComplexityColor(complexity) {
130
+ const colors = {
131
+ 'low': chalk.green('Baja'),
132
+ 'medium': chalk.yellow('Media'),
133
+ 'high': chalk.red('Alta')
134
+ };
135
+ return colors[complexity] || chalk.gray('Desconocida');
136
+ }
137
+
138
+ function getSizeColor(size) {
139
+ const colors = {
140
+ 'small': chalk.green('Pequeño'),
141
+ 'medium': chalk.yellow('Mediano'),
142
+ 'large': chalk.red('Grande')
143
+ };
144
+ return colors[size] || chalk.gray('Desconocido');
145
+ }
146
+
147
+ module.exports = { initCommand };