refacil-sdd-ai 4.0.5 → 4.0.6

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.
Files changed (2) hide show
  1. package/bin/cli.js +20 -8
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -55,14 +55,26 @@ function notifyUpdate() {
55
55
  try { info = JSON.parse(fs.readFileSync(flagPath, 'utf8')); } catch (_) {}
56
56
 
57
57
  const fromLabel = info.from ? `v${info.from}` : 'version anterior';
58
- const msg =
59
- `[refacil-sdd-ai] Actualizacion de metodologia detectada (${fromLabel} → v${info.to}).\n` +
60
- `Tu mensaje fue pausado. ¿Deseas aplicar las migraciones pendientes antes de continuar?\n` +
61
- ` • Si: ejecuta /refacil:update\n` +
62
- ` • No: reenvía tu mensaje anterior para continuar sin actualizar.`;
63
- process.stdout.write(msg + '\n');
64
- process.stderr.write(msg + '\n');
65
- process.exit(2);
58
+
59
+ if (!info.shown) {
60
+ // Primera vez: bloquear al usuario para que lo vea claramente
61
+ try { fs.writeFileSync(flagPath, JSON.stringify({ ...info, shown: true })); } catch (_) {}
62
+ const msg =
63
+ `[refacil-sdd-ai] Actualizacion de metodologia detectada (${fromLabel} v${info.to}).\n` +
64
+ `Tu mensaje fue pausado. ¿Deseas aplicar las migraciones pendientes antes de continuar?\n` +
65
+ ` • Si: ejecuta /refacil:update\n` +
66
+ ` • No: reenvía tu mensaje anterior para continuar sin actualizar.`;
67
+ process.stdout.write(msg + '\n');
68
+ process.stderr.write(msg + '\n');
69
+ process.exit(2);
70
+ } else {
71
+ // Segunda vez: dejar pasar pero avisar al LLM para que lo gestione
72
+ try { fs.unlinkSync(flagPath); } catch (_) {}
73
+ console.log(
74
+ `[refacil-sdd-ai] IMPORTANTE: hay una actualizacion de la metodologia SDD-AI pendiente (${fromLabel} → v${info.to}). ` +
75
+ `Antes de responder al usuario, preguntale si desea ejecutar /refacil:update ahora.`,
76
+ );
77
+ }
66
78
  }
67
79
 
68
80
  function repoIsInitialized() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "refacil-sdd-ai",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "SDD-AI: Specification-Driven Development with AI — metodologia de desarrollo con IA usando OpenSpec, Claude Code y Cursor",
5
5
  "bin": {
6
6
  "refacil-sdd-ai": "./bin/cli.js"