@saulwade/swl-ses 2.3.1 → 2.4.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/CLAUDE.md +241 -240
- package/README.md +597 -597
- package/agentes/_intent-spec.md +73 -73
- package/agentes/_propose-step.md +90 -90
- package/agentes/accesibilidad-wcag-swl.md +690 -690
- package/agentes/arquitecto-swl.md +267 -267
- package/agentes/auto-evolucion-swl.md +908 -908
- package/agentes/backend-api-swl.md +472 -472
- package/agentes/backend-csharp-swl.md +420 -420
- package/agentes/backend-go-swl.md +390 -390
- package/agentes/backend-java-swl.md +281 -281
- package/agentes/backend-node-swl.md +479 -479
- package/agentes/backend-python-swl.md +605 -605
- package/agentes/backend-rust-swl.md +364 -364
- package/agentes/backend-workers-swl.md +482 -482
- package/agentes/cloud-infra-swl.md +509 -509
- package/agentes/consolidador-swl.md +541 -541
- package/agentes/datos-swl.md +605 -605
- package/agentes/depurador-swl.md +352 -352
- package/agentes/devops-ci-swl.md +400 -400
- package/agentes/disenador-ui-swl.md +569 -569
- package/agentes/documentador-swl.md +345 -345
- package/agentes/frontend-angular-swl.md +621 -621
- package/agentes/frontend-css-swl.md +716 -716
- package/agentes/frontend-react-swl.md +692 -692
- package/agentes/frontend-swl.md +496 -496
- package/agentes/frontend-tailwind-swl.md +826 -826
- package/agentes/gh-fix-ci-swl.md +275 -275
- package/agentes/implementador-swl.md +328 -328
- package/agentes/investigador-swl.md +432 -432
- package/agentes/investigador-ux-swl.md +505 -505
- package/agentes/llm-apps-swl.md +278 -278
- package/agentes/migrador-swl.md +442 -442
- package/agentes/mobile-android-swl.md +511 -511
- package/agentes/mobile-cross-swl.md +541 -541
- package/agentes/mobile-ios-swl.md +502 -502
- package/agentes/mobile-testing-swl.md +302 -302
- package/agentes/nemesis-auditor-swl.md +285 -285
- package/agentes/notificador-swl.md +918 -918
- package/agentes/observabilidad-swl.md +438 -438
- package/agentes/orquestador-swl.md +1053 -1026
- package/agentes/pagos-swl.md +310 -310
- package/agentes/perfilador-usuario-swl.md +321 -321
- package/agentes/planificador-swl.md +399 -399
- package/agentes/producto-prd-swl.md +589 -589
- package/agentes/red-team-swl.md +218 -218
- package/agentes/release-manager-swl.md +590 -590
- package/agentes/rendimiento-swl.md +713 -713
- package/agentes/resolutor-build-swl.md +245 -245
- package/agentes/revisor-angular-swl.md +278 -278
- package/agentes/revisor-codigo-swl.md +538 -505
- package/agentes/revisor-csharp-swl.md +264 -264
- package/agentes/revisor-go-swl.md +259 -259
- package/agentes/revisor-java-swl.md +257 -257
- package/agentes/revisor-kotlin-swl.md +273 -273
- package/agentes/revisor-nextjs-swl.md +281 -281
- package/agentes/revisor-php-swl.md +271 -271
- package/agentes/revisor-react-swl.md +278 -278
- package/agentes/revisor-rust-swl.md +346 -346
- package/agentes/revisor-seguridad-swl.md +399 -399
- package/agentes/revisor-swift-swl.md +268 -268
- package/agentes/revisor-typescript-swl.md +346 -346
- package/agentes/sre-swl.md +291 -291
- package/agentes/tdd-qa-swl.md +393 -393
- package/comandos/swl/contexto.md +0 -2
- package/comandos/swl/deuda-codigo.md +97 -0
- package/habilidades/angular-moderno/SKILL.md +5 -1
- package/habilidades/contenedores-docker/SKILL.md +3 -1
- package/habilidades/ejecutar-task-iterativo/SKILL.md +278 -278
- package/habilidades/harness-claude-code/SKILL.md +4 -4
- package/habilidades/harness-claude-code/recursos/disciplina-harness-regla.md +6 -5
- package/habilidades/legacy-code-rescue/SKILL.md +2 -1
- package/habilidades/meta-skills-estandar/SKILL.md +1 -1
- package/habilidades/meta-skills-estandar/recursos/skills-as-agents.md +2 -2
- package/habilidades/postgresql-experto/SKILL.md +3 -1
- package/habilidades/prevencion-sobreingenieria/SKILL.md +70 -92
- package/habilidades/prevencion-sobreingenieria/recursos/soluciones-nativas.md +166 -0
- package/habilidades/prevencion-sobreingenieria/recursos/variables-residuales-post-refactor.md +85 -0
- package/hooks/audit-trail.js +4 -4
- package/hooks/calidad-pre-commit.js +15 -11
- package/hooks/captura-acciones-post.js +3 -2
- package/hooks/captura-acciones-session.js +3 -2
- package/hooks/contexto-iteracion.js +2 -1
- package/hooks/contexto-subagente.js +68 -0
- package/hooks/guardrail-modelo.js +13 -3
- package/hooks/inyeccion-contexto.js +12 -12
- package/hooks/registro-turnos.js +5 -4
- package/hooks/spec-gate.js +2 -1
- package/hooks/sugerir-contribuir.js +2 -1
- package/hooks/sugerir-regenerar-inventario.js +3 -2
- package/hooks/tdd-gate.js +2 -1
- package/llms.txt +3 -3
- package/manifiestos/canonical-hashes.json +667 -10
- package/manifiestos/hook-profiles.json +0 -2
- package/manifiestos/hooks-config.json +469 -477
- package/manifiestos/invariantes-criticos.json +30 -0
- package/manifiestos/modulos.json +1390 -1390
- package/manifiestos/skills-lock.json +24 -24
- package/package.json +93 -93
- package/plugin.json +369 -371
- package/schemas/agent-frontmatter.schema.json +3 -1
- package/scripts/instalador.js +4 -1
- package/scripts/lib/expandir-targets.js +71 -71
- package/scripts/lib/preservar-usuario.js +39 -5
- package/scripts/lib/toml-merge.js +204 -204
- package/scripts/mcp-server/auth.js +105 -105
- package/scripts/mcp-server/cache.js +106 -106
- package/scripts/validar.js +1 -1
- package/scripts/verificar-release.js +51 -0
- package/hooks/lib/context-compressor.js +0 -657
- package/hooks/linea-estado.js +0 -328
- package/hooks/monitor-contexto.js +0 -373
|
@@ -29,7 +29,12 @@ const path = require('path');
|
|
|
29
29
|
// Guard de opt-in — zero-config por defecto
|
|
30
30
|
// ---------------------------------------------------------------------------
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
// Entrypoint: ejecución directa o wrapper `node -e "require(...)"` de
|
|
33
|
+
// settings.json, donde require.main es undefined. Al requerir desde tests,
|
|
34
|
+
// require.main es el runner (definido y ≠ este módulo) → sin efectos.
|
|
35
|
+
const ES_ENTRYPOINT = !require.main || require.main === module;
|
|
36
|
+
|
|
37
|
+
if (ES_ENTRYPOINT && !process.env.SWL_GUARDRAIL_MODELO) {
|
|
33
38
|
process.exit(0);
|
|
34
39
|
}
|
|
35
40
|
|
|
@@ -102,11 +107,12 @@ function razonTripwire(texto, trivialLen, tareaLigera) {
|
|
|
102
107
|
/**
|
|
103
108
|
* Determina el modelo sugerido por degradación según modelo actual del agente.
|
|
104
109
|
*
|
|
105
|
-
* @param {string} modeloActual - Identificador del modelo actual ('opus'|'sonnet'|'haiku'|...).
|
|
110
|
+
* @param {string} modeloActual - Identificador del modelo actual ('fable'|'opus'|'sonnet'|'haiku'|...).
|
|
106
111
|
* @returns {string} Modelo sugerido.
|
|
107
112
|
*/
|
|
108
113
|
function modeloSugerido(modeloActual) {
|
|
109
114
|
const m = (modeloActual || '').toLowerCase();
|
|
115
|
+
if (m.includes('fable')) return 'claude-opus-4-8';
|
|
110
116
|
if (m.includes('opus')) return 'claude-sonnet-5';
|
|
111
117
|
if (m.includes('sonnet')) return 'claude-haiku-4-5-20251001';
|
|
112
118
|
// haiku o inherit — no hay degradación posible
|
|
@@ -244,4 +250,8 @@ async function main() {
|
|
|
244
250
|
process.exit(0);
|
|
245
251
|
}
|
|
246
252
|
|
|
247
|
-
|
|
253
|
+
if (ES_ENTRYPOINT) {
|
|
254
|
+
main().catch(() => process.exit(0));
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
module.exports = { modeloSugerido, esTrivialPorLongitud, esTareaLigera };
|
|
@@ -34,7 +34,6 @@ let _techDetector = null;
|
|
|
34
34
|
try { _techDetector = require('./lib/tech-skills-map'); } catch (_) {}
|
|
35
35
|
|
|
36
36
|
// Solo inyectar en la primera invocación
|
|
37
|
-
const MAX_INVOCACION_PARA_INYECTAR = 1;
|
|
38
37
|
|
|
39
38
|
function leerSesionAnterior(cwd) {
|
|
40
39
|
const latestPath = path.join(cwd, '.planning', 'sessions', 'latest.json');
|
|
@@ -192,16 +191,17 @@ process.stdin.on('end', () => {
|
|
|
192
191
|
const data = JSON.parse(inputRaw);
|
|
193
192
|
const sessionId = String(data.session_id || 'default');
|
|
194
193
|
|
|
195
|
-
//
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
// Estado propio del hook (una inyección por sesión). Histórico: hasta
|
|
195
|
+
// 2026-07-03 leía el bridge swl-ctx-* de linea-estado.js (hook eliminado);
|
|
196
|
+
// ahora este archivo es de su exclusiva propiedad.
|
|
197
|
+
const estadoPath = path.join(os.tmpdir(), `swl-inyeccion-${sessionId}.json`);
|
|
198
|
+
let estado = {};
|
|
198
199
|
try {
|
|
199
|
-
|
|
200
|
+
estado = JSON.parse(fs.readFileSync(estadoPath, 'utf8'));
|
|
200
201
|
} catch (_) {}
|
|
201
202
|
|
|
202
|
-
// Solo inyectar
|
|
203
|
-
|
|
204
|
-
if (invocaciones > MAX_INVOCACION_PARA_INYECTAR || bridge.contextoInyectado) {
|
|
203
|
+
// Solo inyectar una vez por sesión
|
|
204
|
+
if (estado.contextoInyectado) {
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
207
|
|
|
@@ -230,11 +230,11 @@ process.stdin.on('end', () => {
|
|
|
230
230
|
contexto = scanResult.content; // Original o con advertencia
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
// Marcar como inyectado en
|
|
233
|
+
// Marcar como inyectado en el estado propio
|
|
234
234
|
try {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
fs.writeFileSync(
|
|
235
|
+
estado.contextoInyectado = true;
|
|
236
|
+
estado.contextoTimestamp = new Date().toISOString();
|
|
237
|
+
fs.writeFileSync(estadoPath, JSON.stringify(estado, null, 2), 'utf8');
|
|
238
238
|
} catch (_) {}
|
|
239
239
|
|
|
240
240
|
// Emitir contexto de sesión anterior
|
package/hooks/registro-turnos.js
CHANGED
|
@@ -159,16 +159,17 @@ function extraerInfoTurno(data) {
|
|
|
159
159
|
return turno;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
// Solo registrar listeners de stdin en modo
|
|
162
|
+
// Solo registrar listeners de stdin en modo entrypoint. Cuando se importa como
|
|
163
163
|
// módulo (tests), registrar listeners mantiene el event loop vivo
|
|
164
164
|
// indefinidamente porque stdin nunca emite 'end' en ese contexto, lo que
|
|
165
|
-
// hace que la suite de tests cuelgue hasta el timeout. El hook real
|
|
166
|
-
//
|
|
165
|
+
// hace que la suite de tests cuelgue hasta el timeout. El hook real invocado
|
|
166
|
+
// por Claude Code corre vía el wrapper `node -e "require(...)"` donde
|
|
167
|
+
// require.main es undefined (NO como require.main del proceso).
|
|
167
168
|
//
|
|
168
169
|
// El opt-in via SWL_REGISTRO_TURNOS también se evalúa aquí adentro: si
|
|
169
170
|
// estuviera en el top-level del archivo, importar el módulo desde un
|
|
170
171
|
// test sin la env var mataría al test runner via process.exit(0).
|
|
171
|
-
if (require.main === module) {
|
|
172
|
+
if (!require.main || require.main === module) {
|
|
172
173
|
if (process.env.SWL_REGISTRO_TURNOS !== '1') {
|
|
173
174
|
// OPT-IN: hook inactivo por default. Salir silencioso sin leer stdin.
|
|
174
175
|
process.exit(0);
|
package/hooks/spec-gate.js
CHANGED
|
@@ -210,7 +210,8 @@ function ejecutarComoHook() {
|
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
|
|
213
|
+
// Entrypoint directo o wrapper `node -e "require(...)"` (require.main undefined).
|
|
214
|
+
if (!require.main || require.main === module) {
|
|
214
215
|
ejecutarComoHook();
|
|
215
216
|
}
|
|
216
217
|
|
|
@@ -155,8 +155,9 @@ function ejecutarComoHook() {
|
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
// Solo escuchar stdin cuando
|
|
159
|
-
|
|
158
|
+
// Solo escuchar stdin cuando corre como entrypoint: directo o wrapper
|
|
159
|
+
// `node -e "require(...)"` (require.main undefined). No al importar para tests.
|
|
160
|
+
if (!require.main || require.main === module) {
|
|
160
161
|
ejecutarComoHook();
|
|
161
162
|
}
|
|
162
163
|
|
package/hooks/tdd-gate.js
CHANGED
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# swl-ses (@saulwade/swl-ses)
|
|
2
2
|
|
|
3
|
-
> Sistema de ingeniería de software auto-evolutivo multi-runtime polyglot (SDLC completo), distribuido como paquete npm y plugin de Claude Code. 60 agentes, 182 habilidades,
|
|
3
|
+
> Sistema de ingeniería de software auto-evolutivo multi-runtime polyglot (SDLC completo), distribuido como paquete npm y plugin de Claude Code. 60 agentes, 182 habilidades, 45 comandos, 37 reglas base y 49 hooks. Soporta 11 lenguajes y 7 runtimes (Claude Code, OpenClaude, OpenCode, Gemini, Cursor, Codex, Copilot). Versión 2.3.1.
|
|
4
4
|
|
|
5
5
|
Archivo generado por `node scripts/generar-inventario.js` — no editar a mano. Las cifras se sincronizan con INVENTARIO.md en cada regeneración.
|
|
6
6
|
|
|
@@ -18,9 +18,9 @@ Archivo generado por `node scripts/generar-inventario.js` — no editar a mano.
|
|
|
18
18
|
|
|
19
19
|
- 60 agentes especializados en `agentes/` (orquestación, implementación por stack, revisión, calidad, diseño)
|
|
20
20
|
- 182 habilidades cargables bajo demanda en `habilidades/` (conocimiento operacional con divulgación progresiva)
|
|
21
|
-
-
|
|
21
|
+
- 45 comandos `/swl:*` en `comandos/swl/` (ciclo GSD, calidad, release, diagnóstico)
|
|
22
22
|
- 37 reglas base + 40 reglas por lenguaje en `reglas/` (políticas obligatorias por matcher)
|
|
23
|
-
-
|
|
23
|
+
- 49 hooks en `hooks/` (telemetría, validación, seguridad; zero-deps, escrituras atómicas)
|
|
24
24
|
|
|
25
25
|
## Opcional
|
|
26
26
|
|