zugzbot 1.0.42 → 1.0.43
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/agents/sdd-coder.md +1 -1
- package/.opencode/agents/sdd-deployer.md +1 -1
- package/.opencode/agents/sdd-orchestrator.md +1 -1
- package/.opencode/agents/sdd-reviewer.md +1 -1
- package/.opencode/agents/sdd-spec-writer.md +1 -1
- package/.opencode/agents/sdd-tester.md +1 -1
- package/.opencode/rules/sdd-global.md +6 -0
- package/.opencode/tools/sdd_bootstrap.ts +83 -3
- package/opencode.json +3 -3
- package/package.json +1 -1
|
@@ -74,3 +74,9 @@ Para optimizar el diseño, evitar cambios de arquitectura estructurales a mitad
|
|
|
74
74
|
Para mantener la limpieza y disciplina en la ventana de contexto de la sesión:
|
|
75
75
|
- **Orquestador No-Coder:** El orquestador principal (`sdd-orchestrator`) tiene estrictamente prohibido usar herramientas de edición (`edit` o `write`) para modificar código de producción o archivos de test.
|
|
76
76
|
- **Rollback Disciplinado:** Si en la fase `F3_VERIFICATION` el linter o los tests reportan errores, el orquestador **debe** transicionar el estado a `F2_IMPLEMENTATION` mediante `sdd_core_set_phase` y re-invocar al subagente experto (`sdd-coder`) para que realice la corrección cleanly. No se permiten parches rápidos a mitad de fase de test.
|
|
77
|
+
|
|
78
|
+
## 9. Segmentación de Specs y Compilación Atómica (Evitar Coder-Exhaustion)
|
|
79
|
+
Para evitar que los subagentes se queden sin pasos (step/token exhaustion) o acumulen errores difíciles de depurar al final de la sesión:
|
|
80
|
+
- **Regla de Micro-Specs:** Si una funcionalidad requiere implementar múltiples vistas complejas o formularios densos, el Spec-Writer **debe** dividirla obligatoriamente en specs incrementales secuenciales de máximo 3 componentes principales por contrato. No intentes implementar todo un panel de administración en una sola iteración de contrato.
|
|
81
|
+
- **Compilación Atómica:** El Coder **debe** implementar y compilar exitosamente cada archivo de forma individual antes de escribir el siguiente. Está estrictamente prohibido escribir todos los componentes de golpe sin ejecutar validaciones intermedias de TypeScript (`tsc --noEmit`).
|
|
82
|
+
- **Verificación Temprana de Dependencias:** El Coder **debe** comprobar en el primer paso de F2 que dependencias de pruebas críticas como `@testing-library/dom` estén correctamente instaladas en proyectos React 19 para evitar fallos intermitentes de tipado en Vitest.
|
|
@@ -99,6 +99,59 @@ function detectPythonPackageManager(root: string): "uv" | "pip" {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
const DEFAULT_PACKAGE_JSON = {
|
|
103
|
+
"name": "nextjs-shadcn-sdd",
|
|
104
|
+
"version": "0.1.0",
|
|
105
|
+
"private": true,
|
|
106
|
+
"scripts": {
|
|
107
|
+
"dev": "next dev",
|
|
108
|
+
"build": "next build",
|
|
109
|
+
"start": "next start",
|
|
110
|
+
"lint": "next lint",
|
|
111
|
+
"typecheck": "tsc --noEmit",
|
|
112
|
+
"test": "vitest run"
|
|
113
|
+
},
|
|
114
|
+
"dependencies": {
|
|
115
|
+
"next": "^15.1.0",
|
|
116
|
+
"react": "^19.0.0",
|
|
117
|
+
"react-dom": "^19.0.0",
|
|
118
|
+
"lucide-react": "^0.468.0",
|
|
119
|
+
"clsx": "^2.1.1",
|
|
120
|
+
"tailwind-merge": "^2.5.5",
|
|
121
|
+
"class-variance-authority": "^0.7.1",
|
|
122
|
+
"recharts": "^2.15.0",
|
|
123
|
+
"next-themes": "^0.4.4"
|
|
124
|
+
},
|
|
125
|
+
"devDependencies": {
|
|
126
|
+
"typescript": "^5.7.2",
|
|
127
|
+
"@types/node": "^20.17.9",
|
|
128
|
+
"@types/react": "^19.0.1",
|
|
129
|
+
"@types/react-dom": "^19.0.2",
|
|
130
|
+
"tailwindcss": "^4.0.0-alpha.30",
|
|
131
|
+
"@tailwindcss/postcss": "^4.0.0-alpha.30",
|
|
132
|
+
"postcss": "^8.4.49",
|
|
133
|
+
"eslint": "^9.16.0",
|
|
134
|
+
"eslint-config-next": "^15.1.0",
|
|
135
|
+
"vitest": "^2.1.8",
|
|
136
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
137
|
+
"jsdom": "^25.0.1",
|
|
138
|
+
"@testing-library/react": "^16.1.0",
|
|
139
|
+
"@testing-library/dom": "^10.4.0"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const getTemplatePackageJson = (templateDir: string): any => {
|
|
144
|
+
const tmplPkgPath = path.join(templateDir, "package.json")
|
|
145
|
+
if (fs.existsSync(tmplPkgPath)) {
|
|
146
|
+
try {
|
|
147
|
+
return JSON.parse(fs.readFileSync(tmplPkgPath, "utf8"))
|
|
148
|
+
} catch {
|
|
149
|
+
// ignore
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return DEFAULT_PACKAGE_JSON
|
|
153
|
+
}
|
|
154
|
+
|
|
102
155
|
// Tool: sdd_bootstrap_status
|
|
103
156
|
export const bootstrap_status = tool({
|
|
104
157
|
description: "Reporta el estado de bootstrap del proyecto.",
|
|
@@ -141,6 +194,8 @@ export const bootstrap_status = tool({
|
|
|
141
194
|
}
|
|
142
195
|
})
|
|
143
196
|
|
|
197
|
+
export const status = bootstrap_status
|
|
198
|
+
|
|
144
199
|
// Tool: sdd_bootstrap_nextjs_shadcn
|
|
145
200
|
export const bootstrap_nextjs_shadcn = tool({
|
|
146
201
|
description: "Inicializa un proyecto Next.js 16 + Shadcn UI + Tailwind v4 + Vitest.",
|
|
@@ -206,10 +261,11 @@ export const bootstrap_nextjs_shadcn = tool({
|
|
|
206
261
|
|
|
207
262
|
const userPkgPath = path.resolve(targetPath, "package.json")
|
|
208
263
|
let mergedPkg: any = null
|
|
264
|
+
const tmplPkg = getTemplatePackageJson(templateDir)
|
|
265
|
+
|
|
209
266
|
if (fs.existsSync(userPkgPath) && !args.force) {
|
|
210
267
|
try {
|
|
211
268
|
const userPkg = JSON.parse(fs.readFileSync(userPkgPath, "utf8"))
|
|
212
|
-
const tmplPkg = JSON.parse(fs.readFileSync(path.join(templateDir, "package.json"), "utf8"))
|
|
213
269
|
for (const key of ["dependencies", "devDependencies", "peerDependencies"]) {
|
|
214
270
|
if (tmplPkg[key]) {
|
|
215
271
|
userPkg[key] = { ...tmplPkg[key], ...(userPkg[key] || {}) }
|
|
@@ -220,10 +276,12 @@ export const bootstrap_nextjs_shadcn = tool({
|
|
|
220
276
|
fs.writeFileSync(userPkgPath, JSON.stringify(userPkg, null, 2), "utf8")
|
|
221
277
|
filesCopied.push("package.json (merged)")
|
|
222
278
|
} catch (e) {
|
|
223
|
-
|
|
279
|
+
fs.writeFileSync(userPkgPath, JSON.stringify(tmplPkg, null, 2), "utf8")
|
|
280
|
+
filesCopied.push("package.json")
|
|
224
281
|
}
|
|
225
282
|
} else {
|
|
226
|
-
|
|
283
|
+
fs.writeFileSync(userPkgPath, JSON.stringify(tmplPkg, null, 2), "utf8")
|
|
284
|
+
filesCopied.push("package.json")
|
|
227
285
|
}
|
|
228
286
|
|
|
229
287
|
const userNextConfig = path.resolve(targetPath, "next.config.ts")
|
|
@@ -266,6 +324,28 @@ export const bootstrap_nextjs_shadcn = tool({
|
|
|
266
324
|
]
|
|
267
325
|
for (const f of standardFiles) copyFileSafe(f)
|
|
268
326
|
|
|
327
|
+
if (targetDir !== ".") {
|
|
328
|
+
const configFiles = [
|
|
329
|
+
"tsconfig.json",
|
|
330
|
+
"vitest.config.ts",
|
|
331
|
+
"components.json",
|
|
332
|
+
"next.config.ts",
|
|
333
|
+
"eslint.config.mjs",
|
|
334
|
+
"postcss.config.mjs",
|
|
335
|
+
]
|
|
336
|
+
for (const file of configFiles) {
|
|
337
|
+
const rootFile = path.resolve(root, file)
|
|
338
|
+
if (fs.existsSync(rootFile)) {
|
|
339
|
+
try {
|
|
340
|
+
fs.unlinkSync(rootFile)
|
|
341
|
+
filesCopied.push(`${file} (cleaned from root)`)
|
|
342
|
+
} catch {
|
|
343
|
+
// ignore
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
269
349
|
const pm = detectPackageManager(targetPath)
|
|
270
350
|
|
|
271
351
|
let installDuration = 0
|
package/opencode.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"permission": {
|
|
7
7
|
"webfetch": "deny"
|
|
8
8
|
},
|
|
9
|
-
"model": "
|
|
9
|
+
"model": "deepseek/deepseek-v4-flash"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"permission": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"./.opencode/oh-my-design/packages/mcp/dist/index.mjs"
|
|
44
44
|
],
|
|
45
45
|
"enabled": true,
|
|
46
|
-
"purpose": "Busca, consulta y aplica temas de
|
|
46
|
+
"purpose": "Busca, consulta y aplica temas de diseño (Toss, Stripe, Supabase, etc.)."
|
|
47
47
|
},
|
|
48
48
|
"shadcn": {
|
|
49
49
|
"type": "local",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"--isolated"
|
|
77
77
|
],
|
|
78
78
|
"enabled": true,
|
|
79
|
-
"purpose": "Ejecuta pruebas de
|
|
79
|
+
"purpose": "Ejecuta pruebas de regresión visual y capturas de pantalla de Playwright."
|
|
80
80
|
},
|
|
81
81
|
"next-devtools": {
|
|
82
82
|
"type": "local",
|