don-cheli-sdd 1.23.0 → 1.23.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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ Todos los cambios notables en Don Cheli SDD Framework.
4
4
 
5
5
  Formato basado en [Conventional Commits](https://www.conventionalcommits.org/).
6
6
 
7
+ ## [1.23.1](https://github.com/doncheli/don-cheli-sdd/compare/v1.23.0...v1.23.1) (2026-04-07)
8
+
9
+ ### Correcciones
10
+
11
+ * auditoría completa del instalador — 11 bugs corregidos en 6 archivos ([80af310](https://github.com/doncheli/don-cheli-sdd/commit/80af310d21c5f01a2f7a9e9ac6d7500d7a1aa410))
12
+
7
13
  ## [1.23.0](https://github.com/doncheli/don-cheli-sdd/compare/v1.22.0...v1.23.0) (2026-04-07)
8
14
 
9
15
  ### Nuevas Funcionalidades
package/CLAUDE.md CHANGED
@@ -32,16 +32,24 @@ Lee bajo demanda:
32
32
 
33
33
  ## Auto-actualización al inicio de sesión
34
34
  Al inicio de la **primera interacción** de cada sesión:
35
- 1. Leer `${FRAMEWORK_HOME}/VERSION`
36
- 2. `curl -s https://raw.githubusercontent.com/doncheli/don-cheli-sdd/main/VERSION`
37
- 3. Si versiones iguales o falla el curl → silencio
38
- 4. Si hay versión mayor → **auto-actualizar** en background:
39
- a. Clonar versión nueva en temporal
40
- b. Ejecutar auditoría de seguridad rápida (`--severidad critica`) sobre los archivos cambiados
41
- c. Si hay hallazgos 🔴 Críticos → **DETENER**, notificar: `🛑 Actualización v{remota} bloqueada por hallazgos de seguridad críticos. Revisar con /dc:auditar-seguridad`
42
- d. Si pasa la auditoría aplicar actualización con `bash scripts/instalar.sh --global`
43
- e. Notificar: `✅ Don Cheli auto-actualizado: v{local} v{remota} (auditoría de seguridad: limpia)`
44
- f. Verificar conformidad Anthropic Skills 2.0 si `verificar_skills_spec: true`
35
+ 1. Leer `${FRAMEWORK_HOME}/VERSION` para obtener la versión local
36
+ 2. Ejecutar `curl -s https://raw.githubusercontent.com/doncheli/don-cheli-sdd/main/VERSION` para obtener la versión remota
37
+ 3. Si versiones iguales o falla el curl → silencio, no mostrar nada
38
+ 4. Si hay versión mayor → **notificar** al usuario (NO auto-aplicar):
39
+
40
+ **Formato de notificación (según idioma configurado):**
41
+ - **es:** `⬆️ Don Cheli v{remota} disponible (instalada: v{local}). Ejecuta /dc:actualizar para actualizar.`
42
+ - **en:** `⬆️ Don Cheli v{remote} available (installed: v{local}). Run /dc:update to upgrade.`
43
+ - **pt:** `⬆️ Don Cheli v{remota} disponível (instalada: v{local}). Execute /dc:atualizar para atualizar.`
44
+
45
+ **Alternativa rápida vía terminal:**
46
+ - `don-cheli update` (si instaló via npm)
47
+ - `bash scripts/actualizar.sh` (si instaló via git clone)
48
+
49
+ **Reglas:**
50
+ - Solo notificar **una vez por sesión** (no repetir en cada mensaje)
51
+ - Si no hay conexión o falla el curl → continuar sin notificar (no bloquear)
52
+ - **Nunca** auto-aplicar actualizaciones sin confirmación del usuario
45
53
  5. El proceso NO debe bloquear la interacción del usuario
46
54
 
47
55
  ## Idioma (i18n)
package/README.es.md CHANGED
@@ -12,7 +12,7 @@
12
12
  </p>
13
13
  <p align="center">
14
14
  <a href="#-instalación"><img src="https://img.shields.io/badge/instalación-2_minutos-brightgreen" alt="Install"></a>
15
- <img src="https://img.shields.io/badge/versión-1.23.0-blue" alt="Version">
15
+ <img src="https://img.shields.io/badge/versión-1.23.1-blue" alt="Version">
16
16
  <img src="https://img.shields.io/badge/licencia-Apache%202.0-green" alt="License">
17
17
  <img src="https://img.shields.io/badge/idiomas-ES%20|%20EN%20|%20PT-red" alt="Languages">
18
18
  <img src="https://img.shields.io/badge/comandos-85+-purple" alt="Commands">
package/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
  </p>
13
13
  <p align="center">
14
14
  <a href="#-installation"><img src="https://img.shields.io/badge/install-2_minutes-brightgreen" alt="Install"></a>
15
- <img src="https://img.shields.io/badge/version-1.23.0-blue" alt="Version">
15
+ <img src="https://img.shields.io/badge/version-1.23.1-blue" alt="Version">
16
16
  <img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License">
17
17
  <img src="https://img.shields.io/badge/languages-ES%20|%20EN%20|%20PT-red" alt="Languages">
18
18
  <img src="https://img.shields.io/badge/commands-85+-purple" alt="Commands">
package/README.pt.md CHANGED
@@ -12,7 +12,7 @@
12
12
  </p>
13
13
  <p align="center">
14
14
  <a href="#-instalação"><img src="https://img.shields.io/badge/instalação-2_minutos-brightgreen" alt="Install"></a>
15
- <img src="https://img.shields.io/badge/versão-1.23.0-blue" alt="Version">
15
+ <img src="https://img.shields.io/badge/versão-1.23.1-blue" alt="Version">
16
16
  <img src="https://img.shields.io/badge/licença-Apache%202.0-green" alt="License">
17
17
  <img src="https://img.shields.io/badge/idiomas-ES%20|%20EN%20|%20PT-red" alt="Languages">
18
18
  <img src="https://img.shields.io/badge/comandos-85+-purple" alt="Commands">
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.23.0
1
+ 1.23.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "don-cheli-sdd",
3
- "version": "1.23.0",
3
+ "version": "1.23.1",
4
4
  "description": "Framework SDD para Claude Code — 72+ comandos, 43 habilidades, 15 modelos de razonamiento. TDD como ley de hierro. EN/ES/PT.",
5
5
  "main": "bin/don-cheli.js",
6
6
  "scripts": {
@@ -1 +1 @@
1
- 1.23.0
1
+ 1.23.1
@@ -39,7 +39,7 @@ done
39
39
  # PROGRESS BAR
40
40
  # ═══════════════════════════════════════════════════════════════
41
41
 
42
- TOTAL_STEPS=10
42
+ TOTAL_STEPS=13
43
43
  CURRENT_STEP=0
44
44
 
45
45
  progress() {
@@ -274,11 +274,13 @@ git clone --depth 1 "${REPO_URL}.git" "$TEMP_DIR/don-cheli-sdd" > /dev/null 2>&1
274
274
  progress "Escaneando scripts por seguridad..."
275
275
 
276
276
  AUDIT_ISSUES=0
277
- # Check for suspicious patterns in new scripts
277
+ # Check for genuinely dangerous patterns in new scripts (not comments/strings)
278
278
  for f in "$TEMP_DIR/don-cheli-sdd/scripts/"*.sh; do
279
279
  [ -f "$f" ] || continue
280
- # Check for eval, curl|bash, base64 decode, etc.
281
- SUSPICIOUS=$(grep -cn "eval \"\$\|curl.*|.*bash\|base64.*-d\|rm -rf /\|chmod 777" "$f" 2>/dev/null || echo 0)
280
+ # Only flag REAL dangerous code, not patterns inside comments or grep patterns
281
+ # Remove comments before scanning
282
+ CLEAN=$(sed 's/#.*$//' "$f" | sed '/grep/d' | sed '/echo/d')
283
+ SUSPICIOUS=$(echo "$CLEAN" | grep -c 'eval "\$\|rm -rf /[^.]' 2>/dev/null || echo 0)
282
284
  if [ "$SUSPICIOUS" -gt 0 ]; then
283
285
  AUDIT_ISSUES=$((AUDIT_ISSUES + SUSPICIOUS))
284
286
  fi
@@ -315,7 +317,22 @@ if [ -f "$INSTALL_DIR/perfil" ]; then
315
317
  INSTALL_FLAGS="$INSTALL_FLAGS --profile $PROFILE"
316
318
  fi
317
319
 
318
- cd "$TEMP_DIR/don-cheli-sdd" && bash scripts/instalar.sh $INSTALL_FLAGS > /dev/null 2>&1
320
+ # Preserve tools if exists
321
+ if [ -f "$INSTALL_DIR/tools" ]; then
322
+ TOOLS=$(cat "$INSTALL_DIR/tools")
323
+ INSTALL_FLAGS="$INSTALL_FLAGS --tools $TOOLS"
324
+ fi
325
+
326
+ cd "$TEMP_DIR/don-cheli-sdd" && bash scripts/instalar.sh $INSTALL_FLAGS > "$TEMP_DIR/install.log" 2>&1
327
+ INSTALL_EXIT=$?
328
+
329
+ if [ "$INSTALL_EXIT" -ne 0 ]; then
330
+ echo ""
331
+ echo -e " ${RED}❌ Error durante la instalación${NC}"
332
+ echo -e " Log: $TEMP_DIR/install.log"
333
+ tail -10 "$TEMP_DIR/install.log"
334
+ exit 1
335
+ fi
319
336
 
320
337
  progress "Verificando instalación..."
321
338
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  set -euo pipefail
6
6
 
7
- VERSION="1.23.0"
7
+ VERSION="1.23.1"
8
8
  REPO_URL="https://github.com/doncheli/don-cheli-sdd"
9
9
  CLEANUP_TMPDIR=""
10
10
 
@@ -1053,7 +1053,8 @@ if [ "$INTERACTIVE_MODE" = true ] && [ -n "${SELECTED_TOOLS:-}" ]; then
1053
1053
  echo -e " ${YELLOW}⚠ generar-config.sh no encontrado, saltando generación de configs${NC}"
1054
1054
  fi
1055
1055
 
1056
- # Save profile selection
1056
+ # Save profile and tools selection (for updates)
1057
1057
  echo "$SELECTED_PROFILE" > "${FRAMEWORK_HOME}/perfil"
1058
+ echo "$SELECTED_TOOLS" > "${FRAMEWORK_HOME}/tools"
1058
1059
  echo -e " ${GREEN}✓${NC} Perfil guardado: ${SELECTED_PROFILE}"
1059
1060
  fi
@@ -39,7 +39,7 @@ done
39
39
  # PROGRESS BAR
40
40
  # ═══════════════════════════════════════════════════════════════
41
41
 
42
- TOTAL_STEPS=10
42
+ TOTAL_STEPS=13
43
43
  CURRENT_STEP=0
44
44
 
45
45
  progress() {
@@ -274,11 +274,13 @@ git clone --depth 1 "${REPO_URL}.git" "$TEMP_DIR/don-cheli-sdd" > /dev/null 2>&1
274
274
  progress "Escaneando scripts por seguridad..."
275
275
 
276
276
  AUDIT_ISSUES=0
277
- # Check for suspicious patterns in new scripts
277
+ # Check for genuinely dangerous patterns in new scripts (not comments/strings)
278
278
  for f in "$TEMP_DIR/don-cheli-sdd/scripts/"*.sh; do
279
279
  [ -f "$f" ] || continue
280
- # Check for eval, curl|bash, base64 decode, etc.
281
- SUSPICIOUS=$(grep -cn "eval \"\$\|curl.*|.*bash\|base64.*-d\|rm -rf /\|chmod 777" "$f" 2>/dev/null || echo 0)
280
+ # Only flag REAL dangerous code, not patterns inside comments or grep patterns
281
+ # Remove comments before scanning
282
+ CLEAN=$(sed 's/#.*$//' "$f" | sed '/grep/d' | sed '/echo/d')
283
+ SUSPICIOUS=$(echo "$CLEAN" | grep -c 'eval "\$\|rm -rf /[^.]' 2>/dev/null || echo 0)
282
284
  if [ "$SUSPICIOUS" -gt 0 ]; then
283
285
  AUDIT_ISSUES=$((AUDIT_ISSUES + SUSPICIOUS))
284
286
  fi
@@ -315,7 +317,22 @@ if [ -f "$INSTALL_DIR/perfil" ]; then
315
317
  INSTALL_FLAGS="$INSTALL_FLAGS --profile $PROFILE"
316
318
  fi
317
319
 
318
- cd "$TEMP_DIR/don-cheli-sdd" && bash scripts/instalar.sh $INSTALL_FLAGS > /dev/null 2>&1
320
+ # Preserve tools if exists
321
+ if [ -f "$INSTALL_DIR/tools" ]; then
322
+ TOOLS=$(cat "$INSTALL_DIR/tools")
323
+ INSTALL_FLAGS="$INSTALL_FLAGS --tools $TOOLS"
324
+ fi
325
+
326
+ cd "$TEMP_DIR/don-cheli-sdd" && bash scripts/instalar.sh $INSTALL_FLAGS > "$TEMP_DIR/install.log" 2>&1
327
+ INSTALL_EXIT=$?
328
+
329
+ if [ "$INSTALL_EXIT" -ne 0 ]; then
330
+ echo ""
331
+ echo -e " ${RED}❌ Error durante la instalación${NC}"
332
+ echo -e " Log: $TEMP_DIR/install.log"
333
+ tail -10 "$TEMP_DIR/install.log"
334
+ exit 1
335
+ fi
319
336
 
320
337
  progress "Verificando instalación..."
321
338
 
@@ -5,6 +5,23 @@
5
5
  # Intended to be sourced from instalar.sh, not run standalone.
6
6
  # Main entry point: generar_configs()
7
7
 
8
+ # Helper: detect project root from FRAMEWORK_HOME path
9
+ # .claude/don-cheli → project root is the parent
10
+ _get_project_root() {
11
+ local dir="$1"
12
+ local root
13
+ if [[ "$dir" == *".claude/don-cheli"* ]]; then
14
+ root="${dir%/.claude/don-cheli*}"
15
+ [ -z "$root" ] && root="."
16
+ elif [[ "$dir" == *".claude"* ]]; then
17
+ root="${dir%/.claude*}"
18
+ [ -z "$root" ] && root="."
19
+ else
20
+ root="$dir"
21
+ fi
22
+ echo "$root"
23
+ }
24
+
8
25
  generar_configs() {
9
26
  local tools="$1"
10
27
  local profile="$2"
@@ -114,11 +131,13 @@ _gen_claude() {
114
131
  # ─────────────────────────────────────────────
115
132
  _gen_codex() {
116
133
  local dir="$1" home="$2" locale="$3"
134
+ local project_root
135
+ project_root=$(_get_project_root "$dir")
117
136
 
118
- echo -e " ${GREEN:-}✓${NC:-} Codex → AGENTS.md"
137
+ echo -e " ${GREEN:-}✓${NC:-} Codex → AGENTS.md (en $project_root/)"
119
138
 
120
139
  if [ -f "$home/AGENTS.md" ]; then
121
- cp "$home/AGENTS.md" "$dir/" 2>/dev/null || true
140
+ cp "$home/AGENTS.md" "$project_root/" 2>/dev/null || true
122
141
  else
123
142
  # Generate a minimal AGENTS.md if template is missing
124
143
  cat > "$dir/AGENTS.md" 2>/dev/null << 'AGENTSEOF' || true
@@ -142,13 +161,15 @@ AGENTSEOF
142
161
  # ─────────────────────────────────────────────
143
162
  _gen_cursor() {
144
163
  local dir="$1" home="$2" locale="$3"
164
+ local project_root
165
+ project_root=$(_get_project_root "$dir")
145
166
 
146
- echo -e " ${GREEN:-}✓${NC:-} Cursor → .cursorrules"
167
+ echo -e " ${GREEN:-}✓${NC:-} Cursor → .cursorrules (en $project_root/)"
147
168
 
148
169
  if [ "$locale" != "en" ] && [ -f "$home/.cursorrules.${locale}" ]; then
149
- cp "$home/.cursorrules.${locale}" "$dir/.cursorrules" 2>/dev/null || true
170
+ cp "$home/.cursorrules.${locale}" "$project_root/.cursorrules" 2>/dev/null || true
150
171
  elif [ -f "$home/.cursorrules" ]; then
151
- cp "$home/.cursorrules" "$dir/" 2>/dev/null || true
172
+ cp "$home/.cursorrules" "$project_root/" 2>/dev/null || true
152
173
  else
153
174
  echo -e " ${YELLOW:-}⚠${NC:-} .cursorrules not found in $home — skipping" >&2
154
175
  fi
@@ -159,19 +180,8 @@ _gen_cursor() {
159
180
  # ─────────────────────────────────────────────
160
181
  _gen_antigravity() {
161
182
  local dir="$1" home="$2" locale="$3"
162
-
163
- # Antigravity needs files at project root, not inside .claude/don-cheli/
164
- # Detect project root: go up from .claude/don-cheli/ or use current dir
165
183
  local project_root
166
- if [[ "$dir" == *".claude/don-cheli"* ]]; then
167
- project_root="${dir%/.claude/don-cheli*}"
168
- [ -z "$project_root" ] && project_root="."
169
- elif [[ "$dir" == *".claude"* ]]; then
170
- project_root="${dir%/.claude*}"
171
- [ -z "$project_root" ] && project_root="."
172
- else
173
- project_root="$dir"
174
- fi
184
+ project_root=$(_get_project_root "$dir")
175
185
 
176
186
  echo -e " ${GREEN:-}✓${NC:-} Antigravity → GEMINI.md + .agent/ (en $project_root/)"
177
187
 
@@ -194,16 +204,17 @@ _gen_antigravity() {
194
204
  # ─────────────────────────────────────────────
195
205
  _gen_windsurf() {
196
206
  local dir="$1" home="$2" locale="$3"
207
+ local project_root
208
+ project_root=$(_get_project_root "$dir")
197
209
 
198
- echo -e " ${GREEN:-}✓${NC:-} Windsurf → .windsurf/rules/don-cheli.md"
210
+ echo -e " ${GREEN:-}✓${NC:-} Windsurf → .windsurf/rules/don-cheli.md (en $project_root/)"
199
211
 
200
- mkdir -p "$dir/.windsurf/rules" 2>/dev/null || true
212
+ mkdir -p "$project_root/.windsurf/rules" 2>/dev/null || true
201
213
 
202
- # Prefer a dedicated windsurf template; fall back to .cursorrules
203
214
  if [ -f "$home/.windsurf/rules/don-cheli.md" ]; then
204
- cp "$home/.windsurf/rules/don-cheli.md" "$dir/.windsurf/rules/don-cheli.md" 2>/dev/null || true
215
+ cp "$home/.windsurf/rules/don-cheli.md" "$project_root/.windsurf/rules/don-cheli.md" 2>/dev/null || true
205
216
  elif [ -f "$home/.cursorrules" ]; then
206
- cp "$home/.cursorrules" "$dir/.windsurf/rules/don-cheli.md" 2>/dev/null || true
217
+ cp "$home/.cursorrules" "$project_root/.windsurf/rules/don-cheli.md" 2>/dev/null || true
207
218
  else
208
219
  echo -e " ${YELLOW:-}⚠${NC:-} No Windsurf template found in $home — skipping" >&2
209
220
  fi
@@ -214,11 +225,13 @@ _gen_windsurf() {
214
225
  # ─────────────────────────────────────────────
215
226
  _gen_amp() {
216
227
  local dir="$1" home="$2" locale="$3"
228
+ local project_root
229
+ project_root=$(_get_project_root "$dir")
217
230
 
218
- echo -e " ${GREEN:-}✓${NC:-} Amp → prompt.md"
231
+ echo -e " ${GREEN:-}✓${NC:-} Amp → prompt.md (en $project_root/)"
219
232
 
220
233
  if [ -f "$home/prompt.md" ]; then
221
- cp "$home/prompt.md" "$dir/" 2>/dev/null || true
234
+ cp "$home/prompt.md" "$project_root/" 2>/dev/null || true
222
235
  else
223
236
  echo -e " ${YELLOW:-}⚠${NC:-} prompt.md not found in $home — skipping" >&2
224
237
  fi
@@ -229,19 +242,20 @@ _gen_amp() {
229
242
  # ─────────────────────────────────────────────
230
243
  _gen_continue() {
231
244
  local dir="$1" home="$2" locale="$3"
245
+ local project_root
246
+ project_root=$(_get_project_root "$dir")
232
247
 
233
- echo -e " ${GREEN:-}✓${NC:-} Continue.dev → .continue/config/don-cheli.json"
248
+ echo -e " ${GREEN:-}✓${NC:-} Continue.dev → .continue/config/don-cheli.json (en $project_root/)"
234
249
 
235
- mkdir -p "$dir/.continue/config" 2>/dev/null || true
250
+ mkdir -p "$project_root/.continue/config" 2>/dev/null || true
236
251
 
237
- # Use existing template if available; otherwise generate inline
238
252
  if [ -f "$home/.continue/config/don-cheli.json" ]; then
239
- cp "$home/.continue/config/don-cheli.json" "$dir/.continue/config/don-cheli.json" 2>/dev/null || true
253
+ cp "$home/.continue/config/don-cheli.json" "$project_root/.continue/config/don-cheli.json" 2>/dev/null || true
240
254
  else
241
- cat > "$dir/.continue/config/don-cheli.json" 2>/dev/null << 'CONTEOF' || true
255
+ cat > "$project_root/.continue/config/don-cheli.json" 2>/dev/null << 'CONTEOF' || true
242
256
  {
243
257
  "name": "don-cheli-sdd",
244
- "version": "1.23.0",
258
+ "version": "1.23.1",
245
259
  "description": "Don Cheli SDD Framework",
246
260
  "rules": [
247
261
  "All production code requires tests (TDD: RED → GREEN → REFACTOR)",
@@ -260,8 +274,19 @@ CONTEOF
260
274
  # ─────────────────────────────────────────────
261
275
  _gen_opencode() {
262
276
  local dir="$1" home="$2" locale="$3"
277
+ local project_root
278
+ project_root=$(_get_project_root "$dir")
279
+
280
+ echo -e " ${GREEN:-}✓${NC:-} OpenCode → config + .opencode/ (en $project_root/)"
263
281
 
264
- echo -e " ${GREEN:-}✓${NC:-} OpenCode → ~/.config/opencode/config.json"
282
+ # Copy opencode.json and .opencode/ to project root
283
+ if [ -f "$home/opencode.json" ]; then
284
+ cp "$home/opencode.json" "$project_root/" 2>/dev/null || true
285
+ fi
286
+ if [ -d "$home/.opencode" ]; then
287
+ mkdir -p "$project_root/.opencode/agents" 2>/dev/null || true
288
+ cp -r "$home/.opencode/"* "$project_root/.opencode/" 2>/dev/null || true
289
+ fi
265
290
 
266
291
  local opencode_config="$HOME/.config/opencode/config.json"
267
292
  local skills_path="${home}/.agent/skills"
@@ -4,7 +4,7 @@
4
4
 
5
5
  set -euo pipefail
6
6
 
7
- VERSION="1.23.0"
7
+ VERSION="1.23.1"
8
8
  REPO_URL="https://github.com/doncheli/don-cheli-sdd"
9
9
  CLEANUP_TMPDIR=""
10
10
 
@@ -1053,7 +1053,8 @@ if [ "$INTERACTIVE_MODE" = true ] && [ -n "${SELECTED_TOOLS:-}" ]; then
1053
1053
  echo -e " ${YELLOW}⚠ generar-config.sh no encontrado, saltando generación de configs${NC}"
1054
1054
  fi
1055
1055
 
1056
- # Save profile selection
1056
+ # Save profile and tools selection (for updates)
1057
1057
  echo "$SELECTED_PROFILE" > "${FRAMEWORK_HOME}/perfil"
1058
+ echo "$SELECTED_TOOLS" > "${FRAMEWORK_HOME}/tools"
1058
1059
  echo -e " ${GREEN}✓${NC} Perfil guardado: ${SELECTED_PROFILE}"
1059
1060
  fi