@saulwade/swl-ses 1.6.0 → 1.6.3
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 +32 -61
- package/README.md +4 -4
- package/agentes/_intent-spec.md +73 -0
- package/agentes/auto-evolucion-swl.md +24 -0
- package/agentes/cloud-infra-swl.md +25 -0
- package/agentes/datos-swl.md +24 -1
- package/agentes/devops-ci-swl.md +24 -0
- package/agentes/frontend-angular-swl.md +7 -7
- package/agentes/frontend-css-swl.md +4 -4
- package/agentes/frontend-react-swl.md +7 -7
- package/agentes/frontend-swl.md +9 -9
- package/agentes/frontend-tailwind-swl.md +4 -4
- package/agentes/migrador-swl.md +22 -0
- package/agentes/pagos-swl.md +25 -0
- package/agentes/release-manager-swl.md +24 -0
- package/agentes/rendimiento-swl.md +2 -2
- package/agentes/sre-swl.md +24 -0
- package/comandos/swl/brainstorm.md +1 -0
- package/comandos/swl/compactar.md +1 -1
- package/comandos/swl/discutir-fase.md +15 -1
- package/comandos/swl/mapear-codebase.md +1 -1
- package/comandos/swl/nemesis.md +29 -0
- package/comandos/swl/planear-fase.md +18 -2
- package/comandos/swl/verificar.md +4 -4
- package/habilidades/aprender-de-git-diff/SKILL.md +288 -0
- package/habilidades/aprendizaje-continuo/SKILL.md +7 -1
- package/habilidades/diseno-herramientas-agente/SKILL.md +17 -0
- package/habilidades/doc-sync/SKILL.md +441 -1
- package/habilidades/doubt-driven-review/SKILL.md +177 -171
- package/habilidades/feynman-auditor-swl/SKILL.md +129 -123
- package/habilidades/infra-github-actions/SKILL.md +172 -166
- package/habilidades/meta-skills-estandar/SKILL.md +6 -0
- package/habilidades/meta-skills-estandar/recursos/skill-judge-rubrica.md +281 -0
- package/habilidades/meta-skills-estandar/recursos/skills-as-agents.md +163 -163
- package/habilidades/nemesis-evaluacion-json/SKILL.md +5 -0
- package/habilidades/nemesis-redistribuir/SKILL.md +5 -0
- package/habilidades/node-experto/SKILL.md +197 -3
- package/habilidades/prevencion-racionalizacion/SKILL.md +1 -0
- package/habilidades/privacy-memoria/SKILL.md +1 -0
- package/habilidades/proceso-autoverificacion-evidencias/SKILL.md +258 -0
- package/habilidades/proceso-confianza-pre-implementacion/SKILL.md +246 -0
- package/habilidades/proceso-ddia-fundamentos/SKILL.md +255 -0
- package/habilidades/proceso-ddia-streaming/SKILL.md +231 -0
- package/habilidades/proceso-intent-engineering/SKILL.md +269 -0
- package/habilidades/reducir-entropia/SKILL.md +219 -0
- package/habilidades/sre-patrones/SKILL.md +1 -1
- package/habilidades/state-inconsistency-auditor-swl/SKILL.md +172 -166
- package/habilidades/tdd-workflow/SKILL.md +178 -3
- package/habilidades/verificacion-evidencia/SKILL.md +1 -0
- package/habilidades/web-fetcher-routing/SKILL.md +81 -75
- package/habilidades/workflow-claude-code/SKILL.md +2 -2
- package/hooks/lib/task-budget.js +218 -0
- package/hooks/validar-intent-spec.js +222 -0
- package/manifiestos/hooks-config.json +9 -0
- package/manifiestos/modulos.json +12 -2
- package/manifiestos/skills-lock.json +1191 -1142
- package/package.json +5 -3
- package/plugin.json +9 -2
- package/reglas/auditorias-documentales-estructurales.md +205 -0
- package/reglas/fragmentos-compartidos.md +26 -0
- package/reglas/intent-engineering.md +214 -0
- package/reglas/registro-componentes-nuevos.md +38 -0
- package/schemas/agent-frontmatter.schema.json +294 -167
- package/schemas/agent-message.schema.json +73 -53
- package/schemas/agent-output-implementacion.schema.json +114 -85
- package/schemas/agent-output-planificacion.schema.json +150 -113
- package/schemas/agent-output-review.schema.json +98 -78
- package/schemas/diary-entry.schema.json +42 -10
- package/schemas/hook-profiles.schema.json +54 -39
- package/schemas/hooks-config.schema.json +89 -74
- package/schemas/instinct.schema.json +152 -115
- package/schemas/modulos.schema.json +38 -29
- package/schemas/perfiles.schema.json +36 -28
- package/schemas/plugin.schema.json +77 -64
- package/schemas/skill-evals.schema.json +119 -95
- package/schemas/skill-frontmatter.schema.json +245 -170
- package/scripts/generar-inventario.js +452 -420
- package/scripts/lib/schema-version.js +164 -0
- package/scripts/validar-manifest.js +1 -1
- package/scripts/validar.js +3 -2
- package/scripts/verificar-docs-vs-codigo.js +654 -425
- package/scripts/verificar-evolucion.js +19 -3
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* scripts/lib/schema-version.js
|
|
5
|
+
*
|
|
6
|
+
* Helper de compatibilidad de schemas JSON aplicando reglas backward/forward
|
|
7
|
+
* del libro "Designing Data-Intensive Applications" de Martin Kleppmann
|
|
8
|
+
* (Capítulo 4, "Encoding and Evolution", p.112).
|
|
9
|
+
*
|
|
10
|
+
* Reglas implementadas (cita textual del libro):
|
|
11
|
+
*
|
|
12
|
+
* "Backward compatibility — Newer code can read data that was written by
|
|
13
|
+
* older code.
|
|
14
|
+
*
|
|
15
|
+
* Forward compatibility — Older code can read data that was written by
|
|
16
|
+
* newer code."
|
|
17
|
+
*
|
|
18
|
+
* Aplicado a SWL: cuando un schema evoluciona, el helper indica si un
|
|
19
|
+
* documento dado puede leerse con el schema dado y bajo qué modalidad
|
|
20
|
+
* de compatibilidad.
|
|
21
|
+
*
|
|
22
|
+
* Convenciones SemVer asumidas para $schemaVersion:
|
|
23
|
+
* - MAJOR (X.0.0): breaking change (renombre, cambio de tipo, eliminación)
|
|
24
|
+
* - MINOR (1.X.0): campo nuevo opcional, enum value nuevo
|
|
25
|
+
* - PATCH (1.0.X): clarificación de descripción, sin cambio estructural
|
|
26
|
+
*
|
|
27
|
+
* Skill relacionado: proceso-ddia-fundamentos § Schema Evolution.
|
|
28
|
+
* ADR: 0026 — Versionado de schemas JSON con $schemaVersion.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Parsea un string SemVer "MAJOR.MINOR.PATCH" a tupla numérica.
|
|
33
|
+
* @param {string} version
|
|
34
|
+
* @returns {[number, number, number] | null}
|
|
35
|
+
*/
|
|
36
|
+
function parsearVersion(version) {
|
|
37
|
+
if (typeof version !== 'string') return null;
|
|
38
|
+
const m = version.match(/^(\d+)\.(\d+)\.(\d+)$/);
|
|
39
|
+
if (!m) return null;
|
|
40
|
+
return [parseInt(m[1], 10), parseInt(m[2], 10), parseInt(m[3], 10)];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Verifica si un documento es compatible con un schema según sus $schemaVersion.
|
|
45
|
+
*
|
|
46
|
+
* @param {object} documento - Documento JSON con propiedad opcional $schemaVersion
|
|
47
|
+
* @param {object} schema - JSON Schema con propiedad opcional $schemaVersion
|
|
48
|
+
* @returns {{
|
|
49
|
+
* compatible: boolean,
|
|
50
|
+
* modo: "none" | "backward" | "forward" | "incompatible",
|
|
51
|
+
* advertencias: string[]
|
|
52
|
+
* }}
|
|
53
|
+
*
|
|
54
|
+
* Casos:
|
|
55
|
+
* - Ambos sin $schemaVersion → { compatible: true, modo: "none", advertencias: [warning] }
|
|
56
|
+
* - Documento sin, schema con → { compatible: true, modo: "forward", advertencias: [warning] }
|
|
57
|
+
* - Doc 1.0.0 vs Schema 1.0.0 → { compatible: true, modo: "none" }
|
|
58
|
+
* - Doc 1.0.0 vs Schema 1.1.0 → { compatible: true, modo: "forward" } (dato viejo + código nuevo)
|
|
59
|
+
* - Doc 1.1.0 vs Schema 1.0.0 → { compatible: true, modo: "backward" } (dato nuevo + código viejo)
|
|
60
|
+
* - Doc 2.0.0 vs Schema 1.0.0 → { compatible: false, modo: "incompatible" } (MAJOR rompe)
|
|
61
|
+
* - Doc 1.0.0 vs Schema 2.0.0 → { compatible: false, modo: "incompatible" }
|
|
62
|
+
* - Versión malformada → { compatible: false, modo: "incompatible", advertencias: [error] }
|
|
63
|
+
*/
|
|
64
|
+
function verificarCompatibilidad(documento, schema) {
|
|
65
|
+
const advertencias = [];
|
|
66
|
+
|
|
67
|
+
const docVerStr = documento && documento.$schemaVersion;
|
|
68
|
+
const schVerStr = schema && schema.$schemaVersion;
|
|
69
|
+
|
|
70
|
+
if (!docVerStr && !schVerStr) {
|
|
71
|
+
return {
|
|
72
|
+
compatible: true,
|
|
73
|
+
modo: 'none',
|
|
74
|
+
advertencias: [
|
|
75
|
+
'Ni documento ni schema declaran $schemaVersion. Compatibilidad asumida pero no verificable.',
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (!docVerStr && schVerStr) {
|
|
81
|
+
return {
|
|
82
|
+
compatible: true,
|
|
83
|
+
modo: 'forward',
|
|
84
|
+
advertencias: [
|
|
85
|
+
`Documento sin $schemaVersion contra schema ${schVerStr}. Asumiendo forward-compat (código nuevo lee dato viejo sin versión).`,
|
|
86
|
+
],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (docVerStr && !schVerStr) {
|
|
91
|
+
return {
|
|
92
|
+
compatible: false,
|
|
93
|
+
modo: 'incompatible',
|
|
94
|
+
advertencias: [
|
|
95
|
+
`Documento declara $schemaVersion ${docVerStr} pero schema no la declara. Schema debe actualizarse a $schemaVersion para validación correcta.`,
|
|
96
|
+
],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const docVer = parsearVersion(docVerStr);
|
|
101
|
+
const schVer = parsearVersion(schVerStr);
|
|
102
|
+
|
|
103
|
+
if (!docVer) {
|
|
104
|
+
return {
|
|
105
|
+
compatible: false,
|
|
106
|
+
modo: 'incompatible',
|
|
107
|
+
advertencias: [`Documento $schemaVersion malformada: "${docVerStr}". Debe ser MAJOR.MINOR.PATCH (ej: "1.0.0").`],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
if (!schVer) {
|
|
111
|
+
return {
|
|
112
|
+
compatible: false,
|
|
113
|
+
modo: 'incompatible',
|
|
114
|
+
advertencias: [`Schema $schemaVersion malformada: "${schVerStr}". Debe ser MAJOR.MINOR.PATCH (ej: "1.0.0").`],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const [docMaj, docMin] = docVer;
|
|
119
|
+
const [schMaj, schMin] = schVer;
|
|
120
|
+
|
|
121
|
+
// MAJOR distinto → incompatible (regla DDIA Cap 4: MAJOR es breaking)
|
|
122
|
+
if (docMaj !== schMaj) {
|
|
123
|
+
return {
|
|
124
|
+
compatible: false,
|
|
125
|
+
modo: 'incompatible',
|
|
126
|
+
advertencias: [
|
|
127
|
+
`MAJOR diferente: documento ${docVerStr} vs schema ${schVerStr}. ` +
|
|
128
|
+
`Cambios MAJOR son breaking por convención SemVer. Migración explícita requerida.`,
|
|
129
|
+
],
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Mismo MAJOR.MINOR → compatible total (PATCH no afecta estructura)
|
|
134
|
+
if (docMin === schMin) {
|
|
135
|
+
return { compatible: true, modo: 'none', advertencias: [] };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Documento MINOR menor que schema → forward (código nuevo lee dato viejo)
|
|
139
|
+
if (docMin < schMin) {
|
|
140
|
+
return {
|
|
141
|
+
compatible: true,
|
|
142
|
+
modo: 'forward',
|
|
143
|
+
advertencias: [
|
|
144
|
+
`Documento ${docVerStr} más antiguo que schema ${schVerStr}. ` +
|
|
145
|
+
`Forward-compat: código nuevo debe ignorar campos nuevos ausentes en dato viejo.`,
|
|
146
|
+
],
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Documento MINOR mayor que schema → backward (código viejo lee dato nuevo)
|
|
151
|
+
return {
|
|
152
|
+
compatible: true,
|
|
153
|
+
modo: 'backward',
|
|
154
|
+
advertencias: [
|
|
155
|
+
`Documento ${docVerStr} más nuevo que schema ${schVerStr}. ` +
|
|
156
|
+
`Backward-compat: código viejo debe ignorar campos desconocidos en dato nuevo.`,
|
|
157
|
+
],
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
module.exports = {
|
|
162
|
+
parsearVersion,
|
|
163
|
+
verificarCompatibilidad,
|
|
164
|
+
};
|
|
@@ -188,7 +188,7 @@ function main() {
|
|
|
188
188
|
const categorias = [
|
|
189
189
|
{ etiqueta: 'comandos/swl/', archivos: listarArchivos('comandos/swl', '.md') },
|
|
190
190
|
{ etiqueta: 'hooks/ (ejecutables)', archivos: hooksEjecutables },
|
|
191
|
-
{ etiqueta: 'agentes/', archivos: listarArchivos('agentes', '.md') },
|
|
191
|
+
{ etiqueta: 'agentes/', archivos: listarArchivos('agentes', '.md').filter(a => !path.basename(a).startsWith('_')) },
|
|
192
192
|
{ etiqueta: 'habilidades/ (dirs)', archivos: listarDirectoriosHabilidades() },
|
|
193
193
|
{ etiqueta: 'reglas/', archivos: listarArchivos('reglas', '.md', true) },
|
|
194
194
|
];
|
package/scripts/validar.js
CHANGED
|
@@ -63,8 +63,9 @@ if (fs.existsSync(hooksConfigPath)) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
// 5. Agentes (mínimo 12)
|
|
67
|
-
const agentes = fs.readdirSync(path.join(RAIZ, 'agentes'))
|
|
66
|
+
// 5. Agentes (mínimo 12) — excluye fragmentos compartidos (`_*.md`, ver `reglas/fragmentos-compartidos.md`)
|
|
67
|
+
const agentes = fs.readdirSync(path.join(RAIZ, 'agentes'))
|
|
68
|
+
.filter(f => f.endsWith('.md') && !f.startsWith('_'));
|
|
68
69
|
verificar(agentes.length >= 12, `Agentes: ${agentes.length} (mínimo 12)`);
|
|
69
70
|
|
|
70
71
|
// Verificar frontmatter en agentes
|