zugzbot-sdd 1.5.20 → 1.5.22
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/.opencode/tools/sdd_bdd_tester.js +5 -1
- package/.opencode/tools/sdd_compact_context.js +4 -1
- package/.opencode/tools/sdd_requirement_tracker.js +5 -1
- package/.opencode/tools/sdd_security_vulnerability_scanner.js +4 -1
- package/.opencode/tools/sdd_spec_validator.js +5 -7
- package/.opencode/tools/sdd_transition.js +5 -1
- package/.opencode/tools/sdd_ui_auditor.js +5 -1
- package/bin/zugzbot.js +8 -0
- package/package.json +1 -1
- package/tools/sdd_bdd_tester.ts +5 -1
- package/tools/sdd_compact_context.ts +4 -1
- package/tools/sdd_requirement_tracker.ts +5 -1
- package/tools/sdd_security_vulnerability_scanner.ts +4 -1
- package/tools/sdd_spec_validator.ts +5 -7
- package/tools/sdd_transition.ts +5 -1
- package/tools/sdd_ui_auditor.ts +5 -1
|
@@ -30,7 +30,11 @@ export default tool({
|
|
|
30
30
|
return `[BDD Tester Blocked] Error: No hay un cambio de desarrollo activo especificado o registrado en el sdd-lock.`;
|
|
31
31
|
}
|
|
32
32
|
// 2. Localizar spec.md
|
|
33
|
-
const
|
|
33
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", changeName);
|
|
34
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
35
|
+
if (!fs.existsSync(specPath)) {
|
|
36
|
+
specPath = path.join(changeDir, "spec.md");
|
|
37
|
+
}
|
|
34
38
|
if (!fs.existsSync(specPath)) {
|
|
35
39
|
return `[BDD Tester Blocked] Error: No se pudo localizar el archivo de especificación en '${path.relative(projectRoot, specPath)}'.`;
|
|
36
40
|
}
|
|
@@ -33,7 +33,10 @@ export default tool({
|
|
|
33
33
|
}
|
|
34
34
|
// 2. Leer artefactos individuales
|
|
35
35
|
const proposalPath = path.join(changeDir, "proposal.md");
|
|
36
|
-
|
|
36
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
37
|
+
if (!fs.existsSync(specPath)) {
|
|
38
|
+
specPath = path.join(changeDir, "spec.md");
|
|
39
|
+
}
|
|
37
40
|
const archPath = path.join(changeDir, "orchestrator_architecture.md");
|
|
38
41
|
const tasksPath = path.join(changeDir, "orchestrator_tasks.md");
|
|
39
42
|
let proposalSummary = "No disponible";
|
|
@@ -44,7 +44,11 @@ export default tool({
|
|
|
44
44
|
}, null, 2);
|
|
45
45
|
}
|
|
46
46
|
// 2. Leer spec.md
|
|
47
|
-
const
|
|
47
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", changeName);
|
|
48
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
49
|
+
if (!fs.existsSync(specPath)) {
|
|
50
|
+
specPath = path.join(changeDir, "spec.md");
|
|
51
|
+
}
|
|
48
52
|
if (!fs.existsSync(specPath)) {
|
|
49
53
|
return JSON.stringify({
|
|
50
54
|
status: "FAILED",
|
|
@@ -14,7 +14,10 @@ export default tool({
|
|
|
14
14
|
let filesToScan = [];
|
|
15
15
|
try {
|
|
16
16
|
// Intenta obtener los archivos modificados desde la spec o diagnostics
|
|
17
|
-
|
|
17
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
18
|
+
if (!fs.existsSync(specPath)) {
|
|
19
|
+
specPath = path.join(changeDir, "spec.md");
|
|
20
|
+
}
|
|
18
21
|
if (fs.existsSync(specPath)) {
|
|
19
22
|
const specContent = fs.readFileSync(specPath, "utf-8");
|
|
20
23
|
const fileMatches = specContent.match(/`([^`\s\/]+(?:\.[a-zA-Z0-9]+)+)`/g);
|
|
@@ -26,17 +26,15 @@ export default tool({
|
|
|
26
26
|
}
|
|
27
27
|
catch (e) { }
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, null, 2);
|
|
29
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", changeName || "nuevo-cambio");
|
|
30
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
31
|
+
if (!fs.existsSync(specPath)) {
|
|
32
|
+
specPath = path.join(changeDir, "spec.md");
|
|
34
33
|
}
|
|
35
|
-
const specPath = path.join(projectRoot, ".openspec/changes", changeName, "specs/spec.md");
|
|
36
34
|
if (!fs.existsSync(specPath)) {
|
|
37
35
|
return JSON.stringify({
|
|
38
36
|
status: "FAILED",
|
|
39
|
-
reason: `No se encuentra el archivo de especificación
|
|
37
|
+
reason: `No se encuentra el archivo de especificación spec.md para el cambio '${changeName || "nuevo-cambio"}'. Ruta esperada: .openspec/changes/${changeName || "nuevo-cambio"}/[specs/]spec.md`
|
|
40
38
|
}, null, 2);
|
|
41
39
|
}
|
|
42
40
|
const specContent = fs.readFileSync(specPath, "utf-8");
|
|
@@ -120,7 +120,11 @@ export default tool({
|
|
|
120
120
|
}
|
|
121
121
|
catch (e) { }
|
|
122
122
|
// Extracción de checklist de tareas desde spec.md para el monitor de estados
|
|
123
|
-
const
|
|
123
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", activeChangeName);
|
|
124
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
125
|
+
if (!fs.existsSync(specPath)) {
|
|
126
|
+
specPath = path.join(changeDir, "spec.md");
|
|
127
|
+
}
|
|
124
128
|
if (fs.existsSync(specPath)) {
|
|
125
129
|
try {
|
|
126
130
|
const specContent = fs.readFileSync(specPath, "utf-8");
|
|
@@ -156,7 +156,11 @@ export default tool({
|
|
|
156
156
|
catch (e) { }
|
|
157
157
|
}
|
|
158
158
|
// B. Buscar archivos listados en el spec.md activo
|
|
159
|
-
const
|
|
159
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", changeName);
|
|
160
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
161
|
+
if (!fs.existsSync(specPath)) {
|
|
162
|
+
specPath = path.join(changeDir, "spec.md");
|
|
163
|
+
}
|
|
160
164
|
if (fs.existsSync(specPath)) {
|
|
161
165
|
try {
|
|
162
166
|
const specContent = fs.readFileSync(specPath, "utf-8");
|
package/bin/zugzbot.js
CHANGED
|
@@ -252,6 +252,7 @@ function init() {
|
|
|
252
252
|
fs.mkdirSync(path.join(INSTALL_DIR, ".openspec/changes"), { recursive: true })
|
|
253
253
|
fs.mkdirSync(path.join(INSTALL_DIR, ".opencode/plugins"), { recursive: true })
|
|
254
254
|
fs.mkdirSync(path.join(INSTALL_DIR, ".opencode/skills"), { recursive: true })
|
|
255
|
+
fs.mkdirSync(path.join(INSTALL_DIR, ".opencode/tools"), { recursive: true })
|
|
255
256
|
green("Directorios creados")
|
|
256
257
|
|
|
257
258
|
header("📝 Creando archivos de configuración...")
|
|
@@ -325,6 +326,13 @@ function init() {
|
|
|
325
326
|
green("Skills del Swarm copiadas")
|
|
326
327
|
}
|
|
327
328
|
|
|
329
|
+
const sourceToolsDir = path.join(PKG_ROOT, ".opencode/tools")
|
|
330
|
+
const localToolsDir = path.join(INSTALL_DIR, ".opencode/tools")
|
|
331
|
+
if (fs.existsSync(sourceToolsDir)) {
|
|
332
|
+
copyRecursiveSync(sourceToolsDir, localToolsDir)
|
|
333
|
+
green("Herramientas del Swarm copiadas")
|
|
334
|
+
}
|
|
335
|
+
|
|
328
336
|
console.log(`
|
|
329
337
|
╔══════════════════════════════════════════════════════════╗
|
|
330
338
|
║ ✅ Zugzbot SDD Plugin instalado correctamente! ║
|
package/package.json
CHANGED
package/tools/sdd_bdd_tester.ts
CHANGED
|
@@ -33,7 +33,11 @@ export default tool({
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// 2. Localizar spec.md
|
|
36
|
-
const
|
|
36
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", changeName);
|
|
37
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
38
|
+
if (!fs.existsSync(specPath)) {
|
|
39
|
+
specPath = path.join(changeDir, "spec.md");
|
|
40
|
+
}
|
|
37
41
|
if (!fs.existsSync(specPath)) {
|
|
38
42
|
return `[BDD Tester Blocked] Error: No se pudo localizar el archivo de especificación en '${path.relative(projectRoot, specPath)}'.`;
|
|
39
43
|
}
|
|
@@ -37,7 +37,10 @@ export default tool({
|
|
|
37
37
|
|
|
38
38
|
// 2. Leer artefactos individuales
|
|
39
39
|
const proposalPath = path.join(changeDir, "proposal.md");
|
|
40
|
-
|
|
40
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
41
|
+
if (!fs.existsSync(specPath)) {
|
|
42
|
+
specPath = path.join(changeDir, "spec.md");
|
|
43
|
+
}
|
|
41
44
|
const archPath = path.join(changeDir, "orchestrator_architecture.md");
|
|
42
45
|
const tasksPath = path.join(changeDir, "orchestrator_tasks.md");
|
|
43
46
|
|
|
@@ -47,7 +47,11 @@ export default tool({
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
// 2. Leer spec.md
|
|
50
|
-
const
|
|
50
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", changeName);
|
|
51
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
52
|
+
if (!fs.existsSync(specPath)) {
|
|
53
|
+
specPath = path.join(changeDir, "spec.md");
|
|
54
|
+
}
|
|
51
55
|
if (!fs.existsSync(specPath)) {
|
|
52
56
|
return JSON.stringify({
|
|
53
57
|
status: "FAILED",
|
|
@@ -17,7 +17,10 @@ export default tool({
|
|
|
17
17
|
|
|
18
18
|
try {
|
|
19
19
|
// Intenta obtener los archivos modificados desde la spec o diagnostics
|
|
20
|
-
|
|
20
|
+
let specPath = path.join(changeDir, "specs/spec.md")
|
|
21
|
+
if (!fs.existsSync(specPath)) {
|
|
22
|
+
specPath = path.join(changeDir, "spec.md")
|
|
23
|
+
}
|
|
21
24
|
if (fs.existsSync(specPath)) {
|
|
22
25
|
const specContent = fs.readFileSync(specPath, "utf-8")
|
|
23
26
|
const fileMatches = specContent.match(/`([^`\s\/]+(?:\.[a-zA-Z0-9]+)+)`/g)
|
|
@@ -28,18 +28,16 @@ export default tool({
|
|
|
28
28
|
} catch (e) {}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, null, 2);
|
|
31
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", changeName || "nuevo-cambio");
|
|
32
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
33
|
+
if (!fs.existsSync(specPath)) {
|
|
34
|
+
specPath = path.join(changeDir, "spec.md");
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
const specPath = path.join(projectRoot, ".openspec/changes", changeName, "specs/spec.md");
|
|
39
37
|
if (!fs.existsSync(specPath)) {
|
|
40
38
|
return JSON.stringify({
|
|
41
39
|
status: "FAILED",
|
|
42
|
-
reason: `No se encuentra el archivo de especificación
|
|
40
|
+
reason: `No se encuentra el archivo de especificación spec.md para el cambio '${changeName || "nuevo-cambio"}'. Ruta esperada: .openspec/changes/${changeName || "nuevo-cambio"}/[specs/]spec.md`
|
|
43
41
|
}, null, 2);
|
|
44
42
|
}
|
|
45
43
|
|
package/tools/sdd_transition.ts
CHANGED
|
@@ -129,7 +129,11 @@ export default tool({
|
|
|
129
129
|
} catch (e) {}
|
|
130
130
|
|
|
131
131
|
// Extracción de checklist de tareas desde spec.md para el monitor de estados
|
|
132
|
-
const
|
|
132
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", activeChangeName);
|
|
133
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
134
|
+
if (!fs.existsSync(specPath)) {
|
|
135
|
+
specPath = path.join(changeDir, "spec.md");
|
|
136
|
+
}
|
|
133
137
|
if (fs.existsSync(specPath)) {
|
|
134
138
|
try {
|
|
135
139
|
const specContent = fs.readFileSync(specPath, "utf-8");
|
package/tools/sdd_ui_auditor.ts
CHANGED
|
@@ -153,7 +153,11 @@ export default tool({
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
// B. Buscar archivos listados en el spec.md activo
|
|
156
|
-
const
|
|
156
|
+
const changeDir = path.join(projectRoot, ".openspec/changes", changeName);
|
|
157
|
+
let specPath = path.join(changeDir, "specs/spec.md");
|
|
158
|
+
if (!fs.existsSync(specPath)) {
|
|
159
|
+
specPath = path.join(changeDir, "spec.md");
|
|
160
|
+
}
|
|
157
161
|
if (fs.existsSync(specPath)) {
|
|
158
162
|
try {
|
|
159
163
|
const specContent = fs.readFileSync(specPath, "utf-8");
|