@saulwade/swl-ses 1.8.0 → 1.9.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 (44) hide show
  1. package/CLAUDE.md +3 -3
  2. package/README.md +5 -5
  3. package/agentes/orquestador-swl.md +89 -1
  4. package/agentes/revisor-codigo-swl.md +34 -10
  5. package/agentes/revisor-seguridad-swl.md +7 -0
  6. package/agentes/tdd-qa-swl.md +23 -2
  7. package/comandos/swl/autoresearch.md +102 -6
  8. package/comandos/swl/metricas.md +34 -0
  9. package/comandos/swl/nemesis.md +42 -1
  10. package/comandos/swl/planear-fase.md +8 -0
  11. package/comandos/swl/predecir.md +139 -0
  12. package/comandos/swl/verificar.md +50 -7
  13. package/habilidades/angular-moderno/SKILL.md +44 -1
  14. package/habilidades/autoresearch/SKILL.md +15 -1
  15. package/habilidades/calidad-mutation-testing/SKILL.md +170 -0
  16. package/habilidades/changelog-generator/scripts/parse-commits.js +2 -1
  17. package/habilidades/checklist-seguridad/SKILL.md +29 -1
  18. package/habilidades/checklist-seguridad/recursos/stride-cobertura.md +60 -0
  19. package/habilidades/css-moderno/SKILL.md +3 -1
  20. package/habilidades/fastapi-experto/SKILL.md +56 -5
  21. package/habilidades/patrones-python/SKILL.md +8 -5
  22. package/habilidades/proceso-debate-adversarial/SKILL.md +164 -0
  23. package/habilidades/proceso-debate-adversarial/recursos/personas.md +105 -0
  24. package/habilidades/proceso-dynamic-workflows/SKILL.md +138 -0
  25. package/habilidades/proceso-dynamic-workflows/recursos/template-adversarial-verify.js +65 -0
  26. package/habilidades/proceso-dynamic-workflows/recursos/template-triage.js +65 -0
  27. package/habilidades/tdd-workflow/SKILL.md +14 -1
  28. package/habilidades/tdd-workflow/recursos/gherkin-bdd.md +111 -0
  29. package/hooks/contexto-iteracion.js +144 -0
  30. package/hooks/lib/loop-telemetry.js +321 -0
  31. package/hooks/notificacion-telegram.js +11 -3
  32. package/llms.txt +29 -0
  33. package/manifiestos/hooks-config.json +10 -1
  34. package/manifiestos/modulos.json +7 -1
  35. package/manifiestos/skills-lock.json +45 -24
  36. package/package.json +4 -3
  37. package/plugin.json +5 -2
  38. package/reglas/arquitectura.evolved.json +7 -0
  39. package/reglas/arquitectura.md +65 -0
  40. package/reglas/seguridad.evolved.json +7 -0
  41. package/reglas/seguridad.md +144 -0
  42. package/scripts/generar-inventario.js +64 -1
  43. package/scripts/instalador.js +32 -2
  44. package/scripts/smoke-test.js +24 -2
@@ -161,7 +161,8 @@ function verificarArchivosEnDestino(destino, archivosEsperados) {
161
161
 
162
162
  function faseInstall(tmp, home) {
163
163
  log("\n[FASE 1/3] install --profile completo --global --all-langs");
164
- // --all-langs evita el filtrado por stack detectado (tmp está vacío, no detectaría lenguajes).
164
+ // --all-langs evita el filtrado por stack; en scope GLOBAL las reglas por-lenguaje
165
+ // se excluyen SIEMPRE (viven project-scoped) para no saturar el contexto de subagentes.
165
166
  const r = correrCli(
166
167
  [
167
168
  "install",
@@ -199,9 +200,14 @@ function faseInstall(tmp, home) {
199
200
  // Verificar que todos los archivos esperados se copiaron
200
201
  const destino = path.join(home, ".claude");
201
202
  const esperados = archivosEsperadosEnPerfil("completo");
203
+ // Install --global: las reglas por-lenguaje NO se instalan en scope global
204
+ // (se instalan project-scoped, filtradas por stack). Excluirlas de lo esperado.
205
+ const esperadosGlobal = new Set(
206
+ [...esperados].filter((rel) => !rel.startsWith("reglas/lenguajes/")),
207
+ );
202
208
  const { faltantes, totalEsperados } = verificarArchivosEnDestino(
203
209
  destino,
204
- esperados,
210
+ esperadosGlobal,
205
211
  );
206
212
 
207
213
  if (faltantes.length > 0) {
@@ -216,6 +222,22 @@ function faseInstall(tmp, home) {
216
222
  log(
217
223
  ` [OK] ${totalEsperados}/${totalEsperados} archivos presentes en el destino`,
218
224
  );
225
+
226
+ // Verificación del fix anti-thrashing (Opción B): ninguna regla por-lenguaje
227
+ // debe existir en ~/.claude/rules/{LANG}/ tras un install global — saturarían
228
+ // la ventana de todo subagente que herede ~/.claude/rules/.
229
+ const reglasGlobalDir = path.join(destino, "rules");
230
+ const LANGS_REGLAS = ["csharp", "go", "java", "kotlin", "nextjs", "php", "rust", "swift"];
231
+ const langsPresentes = LANGS_REGLAS.filter((l) =>
232
+ fs.existsSync(path.join(reglasGlobalDir, l)),
233
+ );
234
+ if (langsPresentes.length > 0) {
235
+ log(
236
+ ` [FALLA] reglas por-lenguaje presentes en scope global (deberían excluirse): ${langsPresentes.join(", ")}`,
237
+ );
238
+ return { ok: false };
239
+ }
240
+ log(" [OK] reglas por-lenguaje correctamente excluidas del scope global");
219
241
  return { ok: true };
220
242
  }
221
243