specleap-framework 2.1.8 → 2.1.9
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 +24 -0
- package/README.md +1 -1
- package/bin/specleap +122 -33
- package/package.json +1 -1
- package/setup.sh +30 -10
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.1.9] - 2026-04-30
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Interactive base-folder prompt during `npx specleap-framework@latest`.** The installer now asks where to install before copying anything. Previously it dropped the `specleap-framework/` folder silently into the user's current working directory, leaving them unsure of the final location.
|
|
15
|
+
|
|
16
|
+
#### How it works
|
|
17
|
+
|
|
18
|
+
- `bin/specleap` (the entry point invoked by `npx`) now accepts an optional CLI argument with the base folder, e.g. `npx specleap-framework@latest ~/Downloads`. If the argument is omitted, an interactive bilingual prompt asks for the base folder, with the current working directory as default.
|
|
19
|
+
- The folder name is **always** `specleap-framework` (not configurable). If the user wants a different name, they rename it after install with `mv`.
|
|
20
|
+
- The base path supports `~`, `~/relative`, plain relative paths, and absolute paths. The resolved path is shown back to the user before copying.
|
|
21
|
+
- If the resolved target already exists, the installer aborts with a clear bilingual message instead of silently overwriting.
|
|
22
|
+
- The installer creates the base folder if it does not exist.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **Final summary of `setup.sh` now prints the absolute install path prominently.** Block at the end of the installer reads `📍 SpecLeap instalado en: <ruta>` (or `📍 SpecLeap installed at: <path>` in English). Reported by Styng during v2.1.8 testing — after a long setup, the path was effectively lost in the scrollback.
|
|
27
|
+
- **Next-steps list now starts with `cd "<install_path>"`** so the user knows how to reach the project regardless of where they ran `npx` from.
|
|
28
|
+
|
|
29
|
+
### Notes
|
|
30
|
+
|
|
31
|
+
- Backwards compatible: existing scripts that depend on `setup.sh` running from the project root still work — the env var `SPECLEAP_INSTALL_PATH` is set by `bin/specleap` but `setup.sh` falls back to `pwd` if absent.
|
|
32
|
+
- The folder-name decision (always `specleap-framework`) keeps documentation, generated paths and tutorials consistent across users.
|
|
33
|
+
|
|
10
34
|
## [2.1.8] - 2026-04-26
|
|
11
35
|
|
|
12
36
|
### Fixed
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
SpecLeap convierte cualquier IDE con asistente de IA en un entorno de desarrollo spec-first. Combina un contrato de proyecto inmutable, agentes conversacionales especializados, 34 Agent Skills profesionales y un pipeline de validación en tres capas para entregar código consistente y probado sin improvisación.
|
|
22
22
|
|
|
23
|
-
**Versión actual:** 2.1.
|
|
23
|
+
**Versión actual:** 2.1.9 · **Licencia:** MIT · **Autor:** Styng Arias ([ConceptualCreative](https://conceptualcreative.com))
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
package/bin/specleap
CHANGED
|
@@ -3,48 +3,137 @@
|
|
|
3
3
|
const { spawn, execSync } = require('child_process');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const fs = require('fs');
|
|
6
|
+
const readline = require('readline');
|
|
7
|
+
const os = require('os');
|
|
6
8
|
|
|
7
|
-
//
|
|
9
|
+
// Nombre fijo de la carpeta destino. NO es configurable: si el usuario
|
|
10
|
+
// quiere otro nombre, renombra la carpeta a posteriori con `mv`.
|
|
11
|
+
const FOLDER_NAME = 'specleap-framework';
|
|
12
|
+
|
|
13
|
+
// Directorio del paquete npm (donde están todos los archivos a copiar)
|
|
8
14
|
const packageDir = path.join(__dirname, '..');
|
|
9
15
|
|
|
10
|
-
//
|
|
11
|
-
|
|
16
|
+
// Resolver una ruta base introducida por el usuario:
|
|
17
|
+
// - "~" o "~/algo" → expande a $HOME
|
|
18
|
+
// - relativa → se resuelve contra cwd
|
|
19
|
+
// - absoluta → se queda igual
|
|
20
|
+
function resolveBasePath(input) {
|
|
21
|
+
const trimmed = input.trim();
|
|
22
|
+
if (!trimmed) return process.cwd();
|
|
23
|
+
if (trimmed === '~') return os.homedir();
|
|
24
|
+
if (trimmed.startsWith('~/')) return path.join(os.homedir(), trimmed.slice(2));
|
|
25
|
+
if (path.isAbsolute(trimmed)) return trimmed;
|
|
26
|
+
return path.resolve(process.cwd(), trimmed);
|
|
27
|
+
}
|
|
12
28
|
|
|
13
|
-
//
|
|
14
|
-
|
|
29
|
+
// Pregunta interactiva al usuario por la carpeta base.
|
|
30
|
+
// Bilingüe en el prompt porque el idioma de SpecLeap se elige más tarde
|
|
31
|
+
// dentro de setup.sh — aquí todavía no lo sabemos.
|
|
32
|
+
function askBasePath(defaultBase) {
|
|
33
|
+
return new Promise((resolve) => {
|
|
34
|
+
const rl = readline.createInterface({
|
|
35
|
+
input: process.stdin,
|
|
36
|
+
output: process.stdout
|
|
37
|
+
});
|
|
15
38
|
|
|
16
|
-
console.log('
|
|
39
|
+
console.log('');
|
|
40
|
+
console.log('📁 ¿En qué carpeta base instalar SpecLeap?');
|
|
41
|
+
console.log(' Where do you want to install SpecLeap?');
|
|
42
|
+
console.log('');
|
|
43
|
+
console.log(` Se creará / Will create: <base>/${FOLDER_NAME}`);
|
|
44
|
+
console.log(` Default: ${defaultBase}`);
|
|
45
|
+
console.log('');
|
|
46
|
+
console.log(' Ejemplos / Examples:');
|
|
47
|
+
console.log(' ~/Downloads → ~/Downloads/specleap-framework');
|
|
48
|
+
console.log(' ~/Desktop/work → ~/Desktop/work/specleap-framework');
|
|
49
|
+
console.log(' . → ./specleap-framework');
|
|
50
|
+
console.log(' (Enter) → default arriba');
|
|
51
|
+
console.log('');
|
|
17
52
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
53
|
+
rl.question('Carpeta base / Base folder: ', (answer) => {
|
|
54
|
+
rl.close();
|
|
55
|
+
resolve(resolveBasePath(answer));
|
|
56
|
+
});
|
|
57
|
+
});
|
|
23
58
|
}
|
|
24
59
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// Copiar todos los archivos del paquete
|
|
30
|
-
execSync(`cp -R "${packageDir}"/* "${targetDir}"/`, { stdio: 'inherit' });
|
|
31
|
-
execSync(`cp -R "${packageDir}"/.??* "${targetDir}"/ 2>/dev/null || true`, { stdio: 'ignore' });
|
|
32
|
-
|
|
33
|
-
console.log(`✅ Archivos copiados a: ${targetDir}\n`);
|
|
34
|
-
|
|
35
|
-
} catch (err) {
|
|
36
|
-
console.error('❌ Error copiando archivos:', err.message);
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
60
|
+
async function main() {
|
|
61
|
+
// Argumento CLI opcional: `npx specleap-framework@latest ~/Downloads`
|
|
62
|
+
const args = process.argv.slice(2);
|
|
63
|
+
const argBase = args.find((a) => !a.startsWith('-'));
|
|
39
64
|
|
|
40
|
-
//
|
|
41
|
-
|
|
65
|
+
// Si no hay argumento, preguntar interactivamente con default = cwd
|
|
66
|
+
let basePath;
|
|
67
|
+
if (argBase) {
|
|
68
|
+
basePath = resolveBasePath(argBase);
|
|
69
|
+
console.log(`\n📁 Carpeta base: ${basePath}`);
|
|
70
|
+
} else {
|
|
71
|
+
basePath = await askBasePath(process.cwd());
|
|
72
|
+
}
|
|
42
73
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
74
|
+
// Verificar que la carpeta base existe (o se puede crear)
|
|
75
|
+
if (!fs.existsSync(basePath)) {
|
|
76
|
+
try {
|
|
77
|
+
fs.mkdirSync(basePath, { recursive: true });
|
|
78
|
+
console.log(`📂 Carpeta base creada / Base folder created: ${basePath}`);
|
|
79
|
+
} catch (err) {
|
|
80
|
+
console.error(`\n❌ No se pudo crear la carpeta base / Could not create base folder: ${basePath}`);
|
|
81
|
+
console.error(` ${err.message}\n`);
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Verificar que sea un directorio (no un archivo con ese nombre)
|
|
87
|
+
const baseStat = fs.statSync(basePath);
|
|
88
|
+
if (!baseStat.isDirectory()) {
|
|
89
|
+
console.error(`\n❌ La ruta no es una carpeta / Path is not a directory: ${basePath}\n`);
|
|
90
|
+
process.exit(1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Construir el destino final: <basePath>/specleap-framework
|
|
94
|
+
const targetDir = path.join(basePath, FOLDER_NAME);
|
|
47
95
|
|
|
48
|
-
|
|
49
|
-
|
|
96
|
+
// No sobrescribir si ya existe
|
|
97
|
+
if (fs.existsSync(targetDir)) {
|
|
98
|
+
console.error(`\n❌ Ya existe / Already exists: ${targetDir}`);
|
|
99
|
+
console.error(' Elige otra carpeta base o elimina la existente.');
|
|
100
|
+
console.error(' Choose another base folder or delete the existing one.\n');
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
console.log(`\n🚀 Copiando SpecLeap Framework a / Copying SpecLeap Framework to:`);
|
|
105
|
+
console.log(` ${targetDir}\n`);
|
|
106
|
+
|
|
107
|
+
// Crear destino y copiar archivos
|
|
108
|
+
try {
|
|
109
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
110
|
+
execSync(`cp -R "${packageDir}"/* "${targetDir}"/`, { stdio: 'inherit' });
|
|
111
|
+
execSync(`cp -R "${packageDir}"/.??* "${targetDir}"/ 2>/dev/null || true`, { stdio: 'ignore' });
|
|
112
|
+
console.log(`✅ Archivos copiados / Files copied\n`);
|
|
113
|
+
} catch (err) {
|
|
114
|
+
console.error('❌ Error copiando archivos / Error copying files:', err.message);
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Ejecutar setup.sh DESDE el directorio copiado, exportando la ruta
|
|
119
|
+
// para que setup.sh la use en el mensaje final.
|
|
120
|
+
const setupPath = path.join(targetDir, 'setup.sh');
|
|
121
|
+
|
|
122
|
+
const setup = spawn('bash', [setupPath], {
|
|
123
|
+
stdio: 'inherit',
|
|
124
|
+
cwd: targetDir,
|
|
125
|
+
env: {
|
|
126
|
+
...process.env,
|
|
127
|
+
SPECLEAP_INSTALL_PATH: targetDir
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
setup.on('close', (code) => {
|
|
132
|
+
process.exit(code);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
main().catch((err) => {
|
|
137
|
+
console.error('\n❌ Error inesperado / Unexpected error:', err.message);
|
|
138
|
+
process.exit(1);
|
|
50
139
|
});
|
package/package.json
CHANGED
package/setup.sh
CHANGED
|
@@ -516,43 +516,63 @@ echo " ✅ $MSG_SUCCESS"
|
|
|
516
516
|
echo -e "${NC}${GREEN}${LINE}${NC}"
|
|
517
517
|
echo ""
|
|
518
518
|
|
|
519
|
+
# Ruta de instalación: viene de bin/specleap como env var SPECLEAP_INSTALL_PATH.
|
|
520
|
+
# Fallback a $PWD si alguien ejecutó setup.sh directamente sin pasar por bin.
|
|
521
|
+
INSTALL_PATH="${SPECLEAP_INSTALL_PATH:-$(pwd)}"
|
|
522
|
+
|
|
523
|
+
if [ "$LANG" = "es" ]; then
|
|
524
|
+
echo -e "${CYAN}${BOLD}📍 SpecLeap instalado en:${NC}"
|
|
525
|
+
else
|
|
526
|
+
echo -e "${CYAN}${BOLD}📍 SpecLeap installed at:${NC}"
|
|
527
|
+
fi
|
|
528
|
+
echo -e " ${BOLD}${GREEN}$INSTALL_PATH${NC}"
|
|
529
|
+
echo ""
|
|
530
|
+
echo -e "${CYAN}${LINE}${NC}"
|
|
531
|
+
echo ""
|
|
532
|
+
|
|
519
533
|
echo -e "${YELLOW}${BOLD}$MSG_NEXT_STEPS${NC}"
|
|
520
534
|
echo ""
|
|
521
535
|
|
|
522
536
|
if [ "$LANG" = "es" ]; then
|
|
523
|
-
echo " ${BOLD}1.
|
|
537
|
+
echo " ${BOLD}1. Entra a la carpeta del proyecto:${NC}"
|
|
538
|
+
echo " ${GREEN}cd \"$INSTALL_PATH\"${NC}"
|
|
539
|
+
echo ""
|
|
540
|
+
echo " ${BOLD}2. Instalar CodeRabbit en GitHub:${NC}"
|
|
524
541
|
echo " ${CYAN}https://github.com/apps/coderabbitai${NC}"
|
|
525
542
|
echo ""
|
|
526
|
-
echo " ${BOLD}
|
|
543
|
+
echo " ${BOLD}3. Ejecutar cuestionario (20 min):${NC}"
|
|
527
544
|
echo " ${GREEN}./scripts/generate-contrato.sh${NC}"
|
|
528
545
|
echo ""
|
|
529
|
-
echo " ${BOLD}
|
|
546
|
+
echo " ${BOLD}4. Push a GitHub:${NC}"
|
|
530
547
|
echo " ${GREEN}git init && git add . && git commit -m 'init: SpecLeap setup'${NC}"
|
|
531
548
|
echo " ${GREEN}git push origin main${NC}"
|
|
532
549
|
echo ""
|
|
533
|
-
echo " ${BOLD}
|
|
550
|
+
echo " ${BOLD}5. Abrir en tu IDE:${NC}"
|
|
534
551
|
echo " ${GREEN}code .${NC} (VSCode)"
|
|
535
552
|
echo " ${GREEN}cursor .${NC} (Cursor)"
|
|
536
553
|
echo ""
|
|
537
|
-
echo " ${BOLD}
|
|
554
|
+
echo " ${BOLD}6. En el chat con la IA, escribe:${NC}"
|
|
538
555
|
echo " ${GREEN}ayuda${NC}"
|
|
539
556
|
echo ""
|
|
540
557
|
else
|
|
541
|
-
echo " ${BOLD}1.
|
|
558
|
+
echo " ${BOLD}1. Enter the project folder:${NC}"
|
|
559
|
+
echo " ${GREEN}cd \"$INSTALL_PATH\"${NC}"
|
|
560
|
+
echo ""
|
|
561
|
+
echo " ${BOLD}2. Install CodeRabbit on GitHub:${NC}"
|
|
542
562
|
echo " ${CYAN}https://github.com/apps/coderabbitai${NC}"
|
|
543
563
|
echo ""
|
|
544
|
-
echo " ${BOLD}
|
|
564
|
+
echo " ${BOLD}3. Run questionnaire (20 min):${NC}"
|
|
545
565
|
echo " ${GREEN}./scripts/generate-contrato.sh${NC}"
|
|
546
566
|
echo ""
|
|
547
|
-
echo " ${BOLD}
|
|
567
|
+
echo " ${BOLD}4. Push to GitHub:${NC}"
|
|
548
568
|
echo " ${GREEN}git init && git add . && git commit -m 'init: SpecLeap setup'${NC}"
|
|
549
569
|
echo " ${GREEN}git push origin main${NC}"
|
|
550
570
|
echo ""
|
|
551
|
-
echo " ${BOLD}
|
|
571
|
+
echo " ${BOLD}5. Open in your IDE:${NC}"
|
|
552
572
|
echo " ${GREEN}code .${NC} (VSCode)"
|
|
553
573
|
echo " ${GREEN}cursor .${NC} (Cursor)"
|
|
554
574
|
echo ""
|
|
555
|
-
echo " ${BOLD}
|
|
575
|
+
echo " ${BOLD}6. In AI chat, type:${NC}"
|
|
556
576
|
echo " ${GREEN}ayuda${NC}"
|
|
557
577
|
echo ""
|
|
558
578
|
fi
|