awc-zns-mtd 2.0.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.
Files changed (130) hide show
  1. package/.editorconfig +21 -0
  2. package/CHANGELOG.md +210 -0
  3. package/LICENSE +21 -0
  4. package/README.md +439 -0
  5. package/docs/examples/example-feature.md +94 -0
  6. package/docs/getting-started/quick-start.md +85 -0
  7. package/docs/guides/agent-guide.md +56 -0
  8. package/docs/guides/workflow-guide.md +49 -0
  9. package/docs/reference/commands-reference.md +93 -0
  10. package/docs/reference/methodology-design.md +193 -0
  11. package/package.json +66 -0
  12. package/src/modules/awc-zns-mtd/agents/architect-senior.agent.yaml +159 -0
  13. package/src/modules/awc-zns-mtd/agents/developer-pro.agent.yaml +197 -0
  14. package/src/modules/awc-zns-mtd/agents/qa-specialist.agent.yaml +225 -0
  15. package/src/modules/awc-zns-mtd/agents/zen-master.agent.yaml +142 -0
  16. package/src/modules/awc-zns-mtd/config.yaml +412 -0
  17. package/src/modules/awc-zns-mtd/templates/PRD-template.md +490 -0
  18. package/src/modules/awc-zns-mtd/templates/arquitectura-conceptual.md +431 -0
  19. package/src/modules/awc-zns-mtd/templates/cotizacion.md +333 -0
  20. package/src/modules/awc-zns-mtd/templates/discovery-notes.md +205 -0
  21. package/src/modules/awc-zns-mtd/templates/kickoff-agenda.md +297 -0
  22. package/src/modules/awc-zns-mtd/templates/oferta-comercial.md +279 -0
  23. package/src/modules/awc-zns-mtd/templates/viabilidad.md +281 -0
  24. package/src/modules/awc-zns-mtd/workflows/analisis-flow/workflow.yaml +500 -0
  25. package/src/modules/awc-zns-mtd/workflows/comercial-flow/workflow.yaml +444 -0
  26. package/src/modules/awc-zns-mtd/workflows/deployment-flow/workflow.yaml +395 -0
  27. package/src/modules/awc-zns-mtd/workflows/development-flow/workflow.yaml +321 -0
  28. package/src/modules/awc-zns-mtd/workflows/enterprise-flow/workflow.yaml +276 -0
  29. package/src/modules/awc-zns-mtd/workflows/inception-flow/workflow.yaml +588 -0
  30. package/src/modules/awc-zns-mtd/workflows/planificacion-flow/workflow.yaml +526 -0
  31. package/src/modules/awc-zns-mtd/workflows/qa-flow/workflow.yaml +291 -0
  32. package/src/modules/awc-zns-mtd/workflows/quick-flow/workflow.yaml +121 -0
  33. package/src/modules/awc-zns-mtd/workflows/standard-flow/workflow.yaml +181 -0
  34. package/src/modules/awc-zns-mtd/workflows/support-flow/workflow.yaml +438 -0
  35. package/src/modules/custom-agents/ARCHITECTURE.md +566 -0
  36. package/src/modules/custom-agents/CONVERSION_SUMMARY.md +315 -0
  37. package/src/modules/custom-agents/FINAL_SUMMARY.md +296 -0
  38. package/src/modules/custom-agents/README.md +628 -0
  39. package/src/modules/custom-agents/USAGE_GUIDE.md +306 -0
  40. package/src/modules/custom-agents/agents/aspnet-core-architect-senior.agent.yaml +368 -0
  41. package/src/modules/custom-agents/agents/backend-audit-master.agent.yaml +376 -0
  42. package/src/modules/custom-agents/agents/backend-java-senior.agent.yaml +606 -0
  43. package/src/modules/custom-agents/agents/c4-diagram-specialist.agent.yaml +345 -0
  44. package/src/modules/custom-agents/agents/consolidation-context-master.agent.yaml +318 -0
  45. package/src/modules/custom-agents/agents/cost-estimator-senior.agent.yaml +369 -0
  46. package/src/modules/custom-agents/agents/database-engineer-senior.agent.yaml +331 -0
  47. package/src/modules/custom-agents/agents/devsecops-onpremise-senior.agent.yaml +370 -0
  48. package/src/modules/custom-agents/agents/document-export-specialist.agent.yaml +355 -0
  49. package/src/modules/custom-agents/agents/dotnet-core-senior.agent.yaml +258 -0
  50. package/src/modules/custom-agents/agents/frontend-audit-master.agent.yaml +356 -0
  51. package/src/modules/custom-agents/agents/frontend-react-senior.agent.yaml +470 -0
  52. package/src/modules/custom-agents/agents/obsolescence-analyst-senior.agent.yaml +339 -0
  53. package/src/modules/custom-agents/agents/php-senior.agent.yaml +277 -0
  54. package/src/modules/custom-agents/agents/product-owner-business-analyst.agent.yaml +315 -0
  55. package/src/modules/custom-agents/agents/prompt-architect-senior.agent.yaml +398 -0
  56. package/src/modules/custom-agents/agents/prompt-engineer-senior.agent.yaml +431 -0
  57. package/src/modules/custom-agents/agents/python-senior.agent.yaml +347 -0
  58. package/src/modules/custom-agents/agents/react-native-senior.agent.yaml +292 -0
  59. package/src/modules/custom-agents/agents/solution-architect-senior.agent.yaml +496 -0
  60. package/src/modules/custom-agents/agents/technical-stories-architect.agent.yaml +402 -0
  61. package/src/modules/custom-agents/agents/validation-quality-master.agent.yaml +377 -0
  62. package/src/modules/custom-agents/cli/.awc-agents/aspnet-core-architect-senior.agent.yaml +368 -0
  63. package/src/modules/custom-agents/cli/.awc-agents/backend-audit-master.agent.yaml +376 -0
  64. package/src/modules/custom-agents/cli/.awc-agents/backend-java-senior.agent.yaml +606 -0
  65. package/src/modules/custom-agents/cli/.awc-agents/c4-diagram-specialist.agent.yaml +345 -0
  66. package/src/modules/custom-agents/cli/.awc-agents/consolidation-context-master.agent.yaml +318 -0
  67. package/src/modules/custom-agents/cli/.awc-agents/cost-estimator-senior.agent.yaml +369 -0
  68. package/src/modules/custom-agents/cli/.awc-agents/database-engineer-senior.agent.yaml +331 -0
  69. package/src/modules/custom-agents/cli/.awc-agents/devsecops-onpremise-senior.agent.yaml +370 -0
  70. package/src/modules/custom-agents/cli/.awc-agents/document-export-specialist.agent.yaml +355 -0
  71. package/src/modules/custom-agents/cli/.awc-agents/dotnet-core-senior.agent.yaml +258 -0
  72. package/src/modules/custom-agents/cli/.awc-agents/frontend-audit-master.agent.yaml +356 -0
  73. package/src/modules/custom-agents/cli/.awc-agents/frontend-react-senior.agent.yaml +470 -0
  74. package/src/modules/custom-agents/cli/.awc-agents/obsolescence-analyst-senior.agent.yaml +339 -0
  75. package/src/modules/custom-agents/cli/.awc-agents/php-senior.agent.yaml +277 -0
  76. package/src/modules/custom-agents/cli/.awc-agents/product-owner-business-analyst.agent.yaml +315 -0
  77. package/src/modules/custom-agents/cli/.awc-agents/prompt-architect-senior.agent.yaml +398 -0
  78. package/src/modules/custom-agents/cli/.awc-agents/prompt-engineer-senior.agent.yaml +431 -0
  79. package/src/modules/custom-agents/cli/.awc-agents/python-senior.agent.yaml +347 -0
  80. package/src/modules/custom-agents/cli/.awc-agents/react-native-senior.agent.yaml +292 -0
  81. package/src/modules/custom-agents/cli/.awc-agents/solution-architect-senior.agent.yaml +496 -0
  82. package/src/modules/custom-agents/cli/.awc-agents/technical-stories-architect.agent.yaml +402 -0
  83. package/src/modules/custom-agents/cli/.awc-agents/validation-quality-master.agent.yaml +377 -0
  84. package/src/modules/custom-agents/cli/CHANGELOG.md +77 -0
  85. package/src/modules/custom-agents/cli/LICENSE +21 -0
  86. package/src/modules/custom-agents/cli/PUBLISH.md +292 -0
  87. package/src/modules/custom-agents/cli/README.md +333 -0
  88. package/src/modules/custom-agents/cli/agents-data/aspnet-core-architect-senior.agent.yaml +368 -0
  89. package/src/modules/custom-agents/cli/agents-data/backend-audit-master.agent.yaml +376 -0
  90. package/src/modules/custom-agents/cli/agents-data/backend-java-senior.agent.yaml +606 -0
  91. package/src/modules/custom-agents/cli/agents-data/c4-diagram-specialist.agent.yaml +345 -0
  92. package/src/modules/custom-agents/cli/agents-data/consolidation-context-master.agent.yaml +318 -0
  93. package/src/modules/custom-agents/cli/agents-data/cost-estimator-senior.agent.yaml +369 -0
  94. package/src/modules/custom-agents/cli/agents-data/database-engineer-senior.agent.yaml +331 -0
  95. package/src/modules/custom-agents/cli/agents-data/devsecops-onpremise-senior.agent.yaml +370 -0
  96. package/src/modules/custom-agents/cli/agents-data/document-export-specialist.agent.yaml +355 -0
  97. package/src/modules/custom-agents/cli/agents-data/dotnet-core-senior.agent.yaml +258 -0
  98. package/src/modules/custom-agents/cli/agents-data/frontend-audit-master.agent.yaml +356 -0
  99. package/src/modules/custom-agents/cli/agents-data/frontend-react-senior.agent.yaml +470 -0
  100. package/src/modules/custom-agents/cli/agents-data/obsolescence-analyst-senior.agent.yaml +339 -0
  101. package/src/modules/custom-agents/cli/agents-data/php-senior.agent.yaml +277 -0
  102. package/src/modules/custom-agents/cli/agents-data/product-owner-business-analyst.agent.yaml +315 -0
  103. package/src/modules/custom-agents/cli/agents-data/prompt-architect-senior.agent.yaml +398 -0
  104. package/src/modules/custom-agents/cli/agents-data/prompt-engineer-senior.agent.yaml +431 -0
  105. package/src/modules/custom-agents/cli/agents-data/python-senior.agent.yaml +347 -0
  106. package/src/modules/custom-agents/cli/agents-data/react-native-senior.agent.yaml +292 -0
  107. package/src/modules/custom-agents/cli/agents-data/solution-architect-senior.agent.yaml +496 -0
  108. package/src/modules/custom-agents/cli/agents-data/technical-stories-architect.agent.yaml +402 -0
  109. package/src/modules/custom-agents/cli/agents-data/validation-quality-master.agent.yaml +377 -0
  110. package/src/modules/custom-agents/cli/awc-agent.js +372 -0
  111. package/src/modules/custom-agents/cli/config.yaml +478 -0
  112. package/src/modules/custom-agents/cli/package.json +63 -0
  113. package/src/modules/custom-agents/config.yaml +478 -0
  114. package/templates/.github/copilot-instructions.md +120 -0
  115. package/tools/cli/awc-cli.js +137 -0
  116. package/tools/cli/commands/config.js +148 -0
  117. package/tools/cli/commands/init.js +147 -0
  118. package/tools/cli/commands/install.js +188 -0
  119. package/tools/cli/commands/status.js +128 -0
  120. package/tools/cli/commands/validate.js +147 -0
  121. package/tools/cli/commands/version.js +49 -0
  122. package/tools/cli/utils/console-logger.js +153 -0
  123. package/tools/cli/utils/file-utils.js +178 -0
  124. package/tools/cli/utils/project-analyzer.js +280 -0
  125. package/tools/cli/utils/version.js +126 -0
  126. package/tools/version/README.md +272 -0
  127. package/tools/version/changelog-manager.js +288 -0
  128. package/tools/version/update-checker.js +234 -0
  129. package/tools/version/version-bump.js +90 -0
  130. package/tools/version/version-manager.js +224 -0
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Version Manager
3
+ * Gestor central de versiones del sistema AWC ZNS-MTD
4
+ */
5
+
6
+ const fs = require('fs-extra');
7
+ const path = require('path');
8
+ const semver = require('semver');
9
+ const packageJson = require('../../package.json');
10
+
11
+ class VersionManager {
12
+ constructor() {
13
+ this.currentVersion = packageJson.version;
14
+ this.packageName = packageJson.name;
15
+ }
16
+
17
+ /**
18
+ * Obtiene la versión actual
19
+ */
20
+ getCurrentVersion() {
21
+ return this.currentVersion;
22
+ }
23
+
24
+ /**
25
+ * Obtiene información completa de la versión
26
+ */
27
+ getVersionInfo() {
28
+ return {
29
+ version: this.currentVersion,
30
+ major: semver.major(this.currentVersion),
31
+ minor: semver.minor(this.currentVersion),
32
+ patch: semver.patch(this.currentVersion),
33
+ name: this.packageName,
34
+ description: packageJson.description,
35
+ license: packageJson.license,
36
+ author: packageJson.author
37
+ };
38
+ }
39
+
40
+ /**
41
+ * Compara versiones
42
+ * @param {string} v1 - Primera versión
43
+ * @param {string} v2 - Segunda versión
44
+ * @returns {number} -1 si v1 < v2, 0 si iguales, 1 si v1 > v2
45
+ */
46
+ compareVersions(v1, v2) {
47
+ if (!semver.valid(v1) || !semver.valid(v2)) {
48
+ throw new Error('Versiones inválidas');
49
+ }
50
+
51
+ if (semver.lt(v1, v2)) return -1;
52
+ if (semver.gt(v1, v2)) return 1;
53
+ return 0;
54
+ }
55
+
56
+ /**
57
+ * Verifica si una versión es compatible
58
+ * @param {string} requiredVersion - Versión requerida (puede ser rango)
59
+ * @param {string} currentVersion - Versión actual (opcional)
60
+ */
61
+ isCompatible(requiredVersion, currentVersion = null) {
62
+ const version = currentVersion || this.currentVersion;
63
+
64
+ try {
65
+ return semver.satisfies(version, requiredVersion);
66
+ } catch (error) {
67
+ return false;
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Obtiene el tipo de cambio entre dos versiones
73
+ * @param {string} oldVersion - Versión anterior
74
+ * @param {string} newVersion - Versión nueva
75
+ * @returns {string} 'major' | 'minor' | 'patch' | 'none'
76
+ */
77
+ getChangeType(oldVersion, newVersion) {
78
+ if (!semver.valid(oldVersion) || !semver.valid(newVersion)) {
79
+ return 'none';
80
+ }
81
+
82
+ const diff = semver.diff(oldVersion, newVersion);
83
+
84
+ if (diff === 'major' || diff === 'premajor') return 'major';
85
+ if (diff === 'minor' || diff === 'preminor') return 'minor';
86
+ if (diff === 'patch' || diff === 'prepatch') return 'patch';
87
+
88
+ return 'none';
89
+ }
90
+
91
+ /**
92
+ * Valida si una cadena es una versión válida
93
+ */
94
+ isValidVersion(version) {
95
+ return semver.valid(version) !== null;
96
+ }
97
+
98
+ /**
99
+ * Limpia una versión (remueve prefijos v, etc)
100
+ */
101
+ cleanVersion(version) {
102
+ return semver.clean(version);
103
+ }
104
+
105
+ /**
106
+ * Incrementa la versión
107
+ * @param {string} type - Tipo: 'major', 'minor', 'patch'
108
+ * @param {string} version - Versión base (opcional)
109
+ */
110
+ incrementVersion(type, version = null) {
111
+ const baseVersion = version || this.currentVersion;
112
+
113
+ if (!['major', 'minor', 'patch'].includes(type)) {
114
+ throw new Error('Tipo de incremento inválido. Use: major, minor, patch');
115
+ }
116
+
117
+ return semver.inc(baseVersion, type);
118
+ }
119
+
120
+ /**
121
+ * Obtiene la versión instalada en un proyecto
122
+ * @param {string} projectPath - Ruta del proyecto
123
+ */
124
+ async getInstalledVersion(projectPath) {
125
+ const awcDir = path.join(projectPath, '.awc');
126
+ const configPath = path.join(awcDir, 'config.yaml');
127
+
128
+ if (!(await fs.pathExists(configPath))) {
129
+ return null;
130
+ }
131
+
132
+ try {
133
+ const yaml = require('js-yaml');
134
+ const content = await fs.readFile(configPath, 'utf8');
135
+ const config = yaml.load(content);
136
+ return config.version || null;
137
+ } catch (error) {
138
+ return null;
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Actualiza la versión en un proyecto
144
+ * @param {string} projectPath - Ruta del proyecto
145
+ * @param {string} newVersion - Nueva versión
146
+ */
147
+ async updateProjectVersion(projectPath, newVersion) {
148
+ const awcDir = path.join(projectPath, '.awc');
149
+ const configPath = path.join(awcDir, 'config.yaml');
150
+
151
+ if (!(await fs.pathExists(configPath))) {
152
+ throw new Error('Proyecto AWC ZNS-MTD no encontrado');
153
+ }
154
+
155
+ try {
156
+ const yaml = require('js-yaml');
157
+ const content = await fs.readFile(configPath, 'utf8');
158
+ const config = yaml.load(content);
159
+
160
+ config.version = newVersion;
161
+ config.updatedAt = new Date().toISOString();
162
+
163
+ const yamlContent = yaml.dump(config, {
164
+ indent: 2,
165
+ lineWidth: 80,
166
+ noRefs: true
167
+ });
168
+
169
+ await fs.writeFile(configPath, yamlContent, 'utf8');
170
+
171
+ return true;
172
+ } catch (error) {
173
+ throw new Error(`Error al actualizar versión: ${error.message}`);
174
+ }
175
+ }
176
+
177
+ /**
178
+ * Verifica compatibilidad con versión mínima requerida
179
+ */
180
+ checkMinimumVersion(minimumVersion) {
181
+ return semver.gte(this.currentVersion, minimumVersion);
182
+ }
183
+
184
+ /**
185
+ * Obtiene el rango de versiones compatibles
186
+ */
187
+ getCompatibleRange() {
188
+ const major = semver.major(this.currentVersion);
189
+ return `^${major}.0.0`;
190
+ }
191
+
192
+ /**
193
+ * Genera reporte de versión
194
+ */
195
+ generateVersionReport() {
196
+ const info = this.getVersionInfo();
197
+
198
+ return {
199
+ current: info.version,
200
+ breakdown: {
201
+ major: info.major,
202
+ minor: info.minor,
203
+ patch: info.patch
204
+ },
205
+ compatibility: {
206
+ range: this.getCompatibleRange(),
207
+ minimumNodeVersion: packageJson.engines?.node || 'N/A',
208
+ minimumNpmVersion: packageJson.engines?.npm || 'N/A'
209
+ },
210
+ metadata: {
211
+ name: info.name,
212
+ description: info.description,
213
+ license: info.license,
214
+ author: info.author
215
+ }
216
+ };
217
+ }
218
+ }
219
+
220
+ // Singleton instance
221
+ const versionManager = new VersionManager();
222
+
223
+ module.exports = versionManager;
224
+ module.exports.VersionManager = VersionManager;