sdd-scaffolder 1.1.0__tar.gz
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.
- sdd_scaffolder-1.1.0/LICENSE +21 -0
- sdd_scaffolder-1.1.0/PKG-INFO +259 -0
- sdd_scaffolder-1.1.0/README.md +213 -0
- sdd_scaffolder-1.1.0/pyproject.toml +44 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/__init__.py +75 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/blueprint.py +191 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/cli.py +392 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/config.py +73 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/doctor.py +198 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/generator.py +54 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/git_ops.py +31 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/ide_builders.py +428 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/ide_profiles.py +166 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/mcp_catalog.py +243 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/presets.py +58 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/specs.py +140 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/AGENTS.md.tmpl +22 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/MEMORY.md.tmpl +20 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/constitution.md.tmpl +28 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/gitignore_generic.tmpl +15 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/gitignore_node.tmpl +20 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/gitignore_python.tmpl +24 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/claude.md.tmpl +10 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/claude_command.md.tmpl +8 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/codex_config.toml.tmpl +11 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/copilot_instructions.md.tmpl +8 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/cursor_rule.mdc.tmpl +10 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/gemini.md.tmpl +10 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/github_prompt.md.tmpl +9 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/grok.md.tmpl +10 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/grok_config.toml.tmpl +7 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/sdd_rule.md.tmpl +6 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/ide/sdd_skill.md.tmpl +18 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/opencode_commands/implement.md.tmpl +14 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/opencode_commands/plan.md.tmpl +13 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/opencode_commands/spec.md.tmpl +13 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/opencode_commands/tasks.md.tmpl +13 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/plan.md.tmpl +23 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/spec.md.tmpl +31 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/template_files/tasks.md.tmpl +11 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/templates.py +265 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/tree_formatter.py +46 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder/validators.py +164 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder.egg-info/PKG-INFO +259 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder.egg-info/SOURCES.txt +55 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder.egg-info/dependency_links.txt +1 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder.egg-info/entry_points.txt +3 -0
- sdd_scaffolder-1.1.0/sdd_scaffolder.egg-info/top_level.txt +1 -0
- sdd_scaffolder-1.1.0/setup.cfg +4 -0
- sdd_scaffolder-1.1.0/tests/test_build_binary.py +38 -0
- sdd_scaffolder-1.1.0/tests/test_cli.py +203 -0
- sdd_scaffolder-1.1.0/tests/test_doctor.py +106 -0
- sdd_scaffolder-1.1.0/tests/test_generator.py +289 -0
- sdd_scaffolder-1.1.0/tests/test_ide_profiles.py +177 -0
- sdd_scaffolder-1.1.0/tests/test_mcp_catalog.py +82 -0
- sdd_scaffolder-1.1.0/tests/test_specs.py +74 -0
- sdd_scaffolder-1.1.0/tests/test_validators.py +50 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kniball4726
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sdd-scaffolder
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Automatización en Python para generar, extender y auditar proyectos de Spec-Driven Development (SDD) multi-IDE.
|
|
5
|
+
Author: Kniball4726
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Kniball4726
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/Kniball4726/EstructuraSDD
|
|
29
|
+
Project-URL: Repository, https://github.com/Kniball4726/EstructuraSDD
|
|
30
|
+
Project-URL: Issues, https://github.com/Kniball4726/EstructuraSDD/issues
|
|
31
|
+
Keywords: sdd,spec-driven-development,scaffolding,cli,opencode,antigravity,mcp
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Environment :: Console
|
|
34
|
+
Classifier: Intended Audience :: Developers
|
|
35
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
36
|
+
Classifier: Operating System :: OS Independent
|
|
37
|
+
Classifier: Programming Language :: Python :: 3
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
41
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
42
|
+
Requires-Python: >=3.11
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
License-File: LICENSE
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
|
|
47
|
+
# Generador de Scaffolding SDD
|
|
48
|
+
|
|
49
|
+
[](https://github.com/Kniball4726/EstructuraSDD/actions/workflows/ci.yml)
|
|
50
|
+
[](https://github.com/Kniball4726/EstructuraSDD/actions/workflows/release.yml)
|
|
51
|
+
[](https://www.python.org/downloads/)
|
|
52
|
+
[](LICENSE)
|
|
53
|
+
|
|
54
|
+
Automatización en Python (sin dependencias externas en ejecución) para crear proyectos con estructura **Spec-Driven Development (SDD)** adaptada a 8 IDEs/agentes, con perfiles por stack, soporte Git, generación secuencial de nuevas specs y compilación a ejecutable `.exe`.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Guía paso a paso en CMD (Windows)
|
|
59
|
+
|
|
60
|
+
Sigue estos pasos en orden desde **CMD (Símbolo del sistema)** ubicado en la raíz de este repositorio (`C:\Users\glrd4\Desktop\EstructuraSDD`):
|
|
61
|
+
|
|
62
|
+
### Paso 1: Crear y activar el entorno virtual (`.venv`)
|
|
63
|
+
|
|
64
|
+
```bat
|
|
65
|
+
python -m venv .venv
|
|
66
|
+
.venv\Scripts\activate.bat
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
> **Si usas PowerShell en lugar de CMD:**
|
|
70
|
+
> ```powershell
|
|
71
|
+
> python -m venv .venv
|
|
72
|
+
> .\.venv\Scripts\Activate.ps1
|
|
73
|
+
> ```
|
|
74
|
+
> Verás el prefijo `(.venv)` al inicio de la línea cuando esté activo.
|
|
75
|
+
|
|
76
|
+
### Paso 2: Instalar dependencias y generar `requirements.txt`
|
|
77
|
+
|
|
78
|
+
Si ya tienes `requirements.txt`, instala todo con:
|
|
79
|
+
|
|
80
|
+
```bat
|
|
81
|
+
python -m pip install --upgrade pip
|
|
82
|
+
pip install -r requirements.txt
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Si estás armando el entorno desde cero (o instalaste paquetes nuevos) y quieres generar o actualizar `requirements.txt`:
|
|
86
|
+
|
|
87
|
+
```bat
|
|
88
|
+
pip install pyinstaller setuptools
|
|
89
|
+
pip freeze > requirements.txt
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Paso 3: Crear el archivo ejecutable standalone (`dist\sdd-init.exe`)
|
|
93
|
+
|
|
94
|
+
Puedes compilar y verificar automáticamente el ejecutable con el script multiplataforma del repositorio:
|
|
95
|
+
|
|
96
|
+
```bat
|
|
97
|
+
python scripts\build_binary.py
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
O ejecutar PyInstaller directamente incluyendo la carpeta de plantillas externas (`template_files`):
|
|
101
|
+
|
|
102
|
+
```bat
|
|
103
|
+
pyinstaller --onefile --name sdd-init --add-data "sdd_scaffolder\template_files;sdd_scaffolder\template_files" create_sdd.py
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Al terminar, el ejecutable quedará en:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
dist\sdd-init.exe
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
> **Importante:** el parámetro `--add-data "sdd_scaffolder\template_files;sdd_scaffolder\template_files"` es obligatorio para que el `.exe` empaquete las plantillas `.tmpl` de todos los IDEs y perfiles.
|
|
113
|
+
|
|
114
|
+
*(Alternativa sin compilar `.exe`: instalar el comando editable dentro del entorno con `pip install -e .` para tener `sdd-init` y `sdd`.)*
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Cómo utilizar el CLI correctamente (paso a paso)
|
|
119
|
+
|
|
120
|
+
### 1. Crear un proyecto en modo interactivo (recomendado)
|
|
121
|
+
|
|
122
|
+
1. Abre **CMD** o **PowerShell** en la carpeta donde quieras crear tu nuevo proyecto.
|
|
123
|
+
2. Ejecuta el ejecutable (o `python create_sdd.py`):
|
|
124
|
+
```bat
|
|
125
|
+
C:\Users\glrd4\Desktop\EstructuraSDD\dist\sdd-init.exe
|
|
126
|
+
```
|
|
127
|
+
*(Si agregaste `dist\` a tu `PATH` de Windows, basta con escribir `sdd-init`.)*
|
|
128
|
+
3. **Ingresa el nombre del proyecto** cuando te lo pida (por ejemplo `mi-proyecto-sdd`) y presiona **Enter**.
|
|
129
|
+
4. **Elige el IDE o agente** con el que vas a trabajar escribiendo su número (o varios separados por coma, ej. `1,2,7`, o `all` para todos, o **Enter** para OpenCode por defecto).
|
|
130
|
+
5. **Elige servidores MCP opcionales** (si seleccionaste un IDE con configuración MCP de proyecto como OpenCode, Claude Code, Cursor, VS Code o Grok): escribe números separados por coma (ej. `1,3`) o presiona **Enter** para dejar solo el ejemplo deshabilitado.
|
|
131
|
+
6. Revisa el árbol generado en consola y entra a tu carpeta con `cd mi-proyecto-sdd`.
|
|
132
|
+
|
|
133
|
+
### 2. Crear un proyecto directamente con parámetros (sin preguntas)
|
|
134
|
+
|
|
135
|
+
```bat
|
|
136
|
+
:: Elegir IDE + servidores MCP + perfil de stack + inicializar Git
|
|
137
|
+
sdd-init mi-api --ide opencode,antigravity --mcp filesystem,context7,github --preset python --git
|
|
138
|
+
|
|
139
|
+
:: Combinar varios IDEs en el mismo repositorio
|
|
140
|
+
sdd-init mi-web --ide opencode,antigravity,codex --preset node --git
|
|
141
|
+
|
|
142
|
+
:: Crear en una ruta de destino específica y con carpeta de código personalizada
|
|
143
|
+
sdd-init mi-app --ide grok --mcp filesystem,postgres --output C:\Proyectos --src-dir app
|
|
144
|
+
|
|
145
|
+
:: Sobrescribir plantillas usando una carpeta propia de archivos .tmpl
|
|
146
|
+
sdd-init mi-app --templates-dir C:\mis-plantillas-sdd
|
|
147
|
+
|
|
148
|
+
:: Sobrescribir si la carpeta del proyecto ya existe
|
|
149
|
+
sdd-init mi-app --force
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 3. Agregar nuevas iteraciones en `specs/` (`002/`, `003/`, ...)
|
|
153
|
+
|
|
154
|
+
Cuando termines la especificación `001/` y quieras abrir la siguiente iteración:
|
|
155
|
+
|
|
156
|
+
1. Ubícate dentro de la carpeta del proyecto (o pasa la ruta como argumento).
|
|
157
|
+
2. Ejecuta `add-spec`:
|
|
158
|
+
```bat
|
|
159
|
+
:: Desde dentro del proyecto
|
|
160
|
+
sdd-init add-spec --title "Autenticación de usuarios"
|
|
161
|
+
|
|
162
|
+
:: O indicando la ruta desde fuera
|
|
163
|
+
sdd-init add-spec C:\Proyectos\mi-api --title "Módulo de pagos" --preset python
|
|
164
|
+
```
|
|
165
|
+
3. El CLI detectará el último número en `specs/` y creará automáticamente `specs/002/` (o `003/`, etc.) con `spec.md`, `plan.md` y `tasks.md`.
|
|
166
|
+
|
|
167
|
+
### 4. Auditar un proyecto existente (`status` / `doctor`)
|
|
168
|
+
|
|
169
|
+
```bat
|
|
170
|
+
:: Ver estado general, IDEs detectados y avance de tareas en cada spec
|
|
171
|
+
sdd-init status C:\Proyectos\mi-api
|
|
172
|
+
|
|
173
|
+
:: Modo auditoría estricta (retorna código 1 si falta algún archivo clave SDD)
|
|
174
|
+
sdd-init doctor C:\Proyectos\mi-api
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 5. Consultar la ayuda de cualquier comando
|
|
178
|
+
|
|
179
|
+
```bat
|
|
180
|
+
sdd-init --help
|
|
181
|
+
sdd-init add-spec --help
|
|
182
|
+
sdd-init doctor --help
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### 6. (Opcional) Agregar `dist\` al `PATH` para usar `sdd-init` desde cualquier carpeta
|
|
186
|
+
|
|
187
|
+
En CMD (como usuario actual, luego abre una ventana nueva de CMD):
|
|
188
|
+
|
|
189
|
+
```bat
|
|
190
|
+
setx PATH "%PATH%;C:\Users\glrd4\Desktop\EstructuraSDD\dist"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## IDEs y agentes soportados (`--ide`)
|
|
196
|
+
|
|
197
|
+
| # | Clave `--ide` | Entorno | Scaffolding específico generado |
|
|
198
|
+
| --- | --- | --- | --- |
|
|
199
|
+
| 1 | `opencode` | **OpenCode** *(por defecto)* | `.opencode/commands/` (`/spec`, `/plan`, `/tasks`, `/implement`), `.agents/skills/`, `opencode.json` (MCP) |
|
|
200
|
+
| 2 | `antigravity` | **Antigravity** | `GEMINI.md`, `.agents/rules/sdd.md`, `.agents/skills/sdd-workflow/SKILL.md` |
|
|
201
|
+
| 3 | `spec-kit` | **GitHub Spec Kit** | `.specify/memory/constitution.md`, `.specify/templates/`, `.specify/scripts/`, `.github/prompts/speckit.*.prompt.md` |
|
|
202
|
+
| 4 | `claude-code` | **Claude Code** | `CLAUDE.md`, `.claude/commands/`, `.claude/skills/sdd-workflow/SKILL.md`, `.mcp.json` |
|
|
203
|
+
| 5 | `cursor` | **Cursor** | `.cursor/rules/sdd.mdc`, `.cursor/mcp.json` |
|
|
204
|
+
| 6 | `vscode-copilot` | **VS Code + GitHub Copilot** | `.github/copilot-instructions.md`, `.github/prompts/`, `.vscode/mcp.json` |
|
|
205
|
+
| 7 | `codex` | **ChatGPT / Codex** | `.codex/config.toml`, `.agents/skills/sdd-workflow/SKILL.md`, `AGENTS.md` |
|
|
206
|
+
| 8 | `grok` | **Grok** | `GROK.md`, `.grok/config.toml`, `.grok/rules/sdd.md`, `.grok/skills/sdd-workflow/SKILL.md` |
|
|
207
|
+
|
|
208
|
+
Perfiles de stack (`--preset`): `generic` *(por defecto)*, `python`, `node`.
|
|
209
|
+
|
|
210
|
+
Servidores MCP disponibles (`--mcp`): `filesystem`, `github`, `context7`, `memory`, `sqlite`, `postgres` (o `all` / `none`). Se renderizan automáticamente en el formato nativo de cada IDE (`opencode.json`, `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `.grok/config.toml`).
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Estructura base común generada
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
<nombre-del-proyecto>/
|
|
218
|
+
├── <carpetas y archivos del IDE/agente elegido>
|
|
219
|
+
├── docs/constitution.md (o .specify/memory/constitution.md en spec-kit)
|
|
220
|
+
├── specs/
|
|
221
|
+
│ └── 001/
|
|
222
|
+
│ ├── plan.md
|
|
223
|
+
│ ├── spec.md
|
|
224
|
+
│ └── tasks.md
|
|
225
|
+
├── src/
|
|
226
|
+
│ └── .gitkeep
|
|
227
|
+
├── tests/
|
|
228
|
+
│ └── .gitkeep
|
|
229
|
+
├── .gitignore
|
|
230
|
+
├── AGENTS.md
|
|
231
|
+
└── MEMORY.md
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## CI/CD y Releases multiplataforma (GitHub Actions)
|
|
237
|
+
|
|
238
|
+
El repositorio incluye dos workflows automáticos:
|
|
239
|
+
|
|
240
|
+
- **CI (`.github/workflows/ci.yml`):** se ejecuta en cada `push` y `pull_request`, corriendo todas las pruebas y la verificación de instalación en **Windows, Ubuntu y macOS** con Python **3.11, 3.12 y 3.13**.
|
|
241
|
+
- **CD / Release (`.github/workflows/release.yml`):** al publicar un tag `v*`, ejecuta las pruebas, compila y prueba los binarios standalone para **Windows (`sdd-init-windows-x64.exe`)**, **Linux (`sdd-init-linux-x64`)** y **macOS (`sdd-init-macos-arm64`)**, genera `SHA256SUMS.txt` y crea automáticamente el **GitHub Release**.
|
|
242
|
+
- **Publicación opcional en PyPI (Trusted Publishing OIDC):** incluida en `release.yml` mediante el job `publish-pypi`. Para activarla:
|
|
243
|
+
1. En [PyPI](https://pypi.org/manage/account/publishing/), agrega un *Trusted Publisher* apuntando a `Kniball4726/EstructuraSDD`, workflow `release.yml` y entorno `pypi`.
|
|
244
|
+
2. En tu repo de GitHub (*Settings → Secrets and variables → Actions → Variables*), crea la variable `ENABLE_PYPI` con valor `true`.
|
|
245
|
+
|
|
246
|
+
Para publicar una nueva versión desde CMD/PowerShell:
|
|
247
|
+
|
|
248
|
+
```bat
|
|
249
|
+
git tag v1.1.0
|
|
250
|
+
git push origin v1.1.0
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Ejecutar pruebas automatizadas
|
|
256
|
+
|
|
257
|
+
```bat
|
|
258
|
+
.venv\Scripts\python.exe -m unittest discover -s tests -v
|
|
259
|
+
```
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Generador de Scaffolding SDD
|
|
2
|
+
|
|
3
|
+
[](https://github.com/Kniball4726/EstructuraSDD/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/Kniball4726/EstructuraSDD/actions/workflows/release.yml)
|
|
5
|
+
[](https://www.python.org/downloads/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
Automatización en Python (sin dependencias externas en ejecución) para crear proyectos con estructura **Spec-Driven Development (SDD)** adaptada a 8 IDEs/agentes, con perfiles por stack, soporte Git, generación secuencial de nuevas specs y compilación a ejecutable `.exe`.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Guía paso a paso en CMD (Windows)
|
|
13
|
+
|
|
14
|
+
Sigue estos pasos en orden desde **CMD (Símbolo del sistema)** ubicado en la raíz de este repositorio (`C:\Users\glrd4\Desktop\EstructuraSDD`):
|
|
15
|
+
|
|
16
|
+
### Paso 1: Crear y activar el entorno virtual (`.venv`)
|
|
17
|
+
|
|
18
|
+
```bat
|
|
19
|
+
python -m venv .venv
|
|
20
|
+
.venv\Scripts\activate.bat
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
> **Si usas PowerShell en lugar de CMD:**
|
|
24
|
+
> ```powershell
|
|
25
|
+
> python -m venv .venv
|
|
26
|
+
> .\.venv\Scripts\Activate.ps1
|
|
27
|
+
> ```
|
|
28
|
+
> Verás el prefijo `(.venv)` al inicio de la línea cuando esté activo.
|
|
29
|
+
|
|
30
|
+
### Paso 2: Instalar dependencias y generar `requirements.txt`
|
|
31
|
+
|
|
32
|
+
Si ya tienes `requirements.txt`, instala todo con:
|
|
33
|
+
|
|
34
|
+
```bat
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
pip install -r requirements.txt
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Si estás armando el entorno desde cero (o instalaste paquetes nuevos) y quieres generar o actualizar `requirements.txt`:
|
|
40
|
+
|
|
41
|
+
```bat
|
|
42
|
+
pip install pyinstaller setuptools
|
|
43
|
+
pip freeze > requirements.txt
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Paso 3: Crear el archivo ejecutable standalone (`dist\sdd-init.exe`)
|
|
47
|
+
|
|
48
|
+
Puedes compilar y verificar automáticamente el ejecutable con el script multiplataforma del repositorio:
|
|
49
|
+
|
|
50
|
+
```bat
|
|
51
|
+
python scripts\build_binary.py
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
O ejecutar PyInstaller directamente incluyendo la carpeta de plantillas externas (`template_files`):
|
|
55
|
+
|
|
56
|
+
```bat
|
|
57
|
+
pyinstaller --onefile --name sdd-init --add-data "sdd_scaffolder\template_files;sdd_scaffolder\template_files" create_sdd.py
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Al terminar, el ejecutable quedará en:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
dist\sdd-init.exe
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
> **Importante:** el parámetro `--add-data "sdd_scaffolder\template_files;sdd_scaffolder\template_files"` es obligatorio para que el `.exe` empaquete las plantillas `.tmpl` de todos los IDEs y perfiles.
|
|
67
|
+
|
|
68
|
+
*(Alternativa sin compilar `.exe`: instalar el comando editable dentro del entorno con `pip install -e .` para tener `sdd-init` y `sdd`.)*
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Cómo utilizar el CLI correctamente (paso a paso)
|
|
73
|
+
|
|
74
|
+
### 1. Crear un proyecto en modo interactivo (recomendado)
|
|
75
|
+
|
|
76
|
+
1. Abre **CMD** o **PowerShell** en la carpeta donde quieras crear tu nuevo proyecto.
|
|
77
|
+
2. Ejecuta el ejecutable (o `python create_sdd.py`):
|
|
78
|
+
```bat
|
|
79
|
+
C:\Users\glrd4\Desktop\EstructuraSDD\dist\sdd-init.exe
|
|
80
|
+
```
|
|
81
|
+
*(Si agregaste `dist\` a tu `PATH` de Windows, basta con escribir `sdd-init`.)*
|
|
82
|
+
3. **Ingresa el nombre del proyecto** cuando te lo pida (por ejemplo `mi-proyecto-sdd`) y presiona **Enter**.
|
|
83
|
+
4. **Elige el IDE o agente** con el que vas a trabajar escribiendo su número (o varios separados por coma, ej. `1,2,7`, o `all` para todos, o **Enter** para OpenCode por defecto).
|
|
84
|
+
5. **Elige servidores MCP opcionales** (si seleccionaste un IDE con configuración MCP de proyecto como OpenCode, Claude Code, Cursor, VS Code o Grok): escribe números separados por coma (ej. `1,3`) o presiona **Enter** para dejar solo el ejemplo deshabilitado.
|
|
85
|
+
6. Revisa el árbol generado en consola y entra a tu carpeta con `cd mi-proyecto-sdd`.
|
|
86
|
+
|
|
87
|
+
### 2. Crear un proyecto directamente con parámetros (sin preguntas)
|
|
88
|
+
|
|
89
|
+
```bat
|
|
90
|
+
:: Elegir IDE + servidores MCP + perfil de stack + inicializar Git
|
|
91
|
+
sdd-init mi-api --ide opencode,antigravity --mcp filesystem,context7,github --preset python --git
|
|
92
|
+
|
|
93
|
+
:: Combinar varios IDEs en el mismo repositorio
|
|
94
|
+
sdd-init mi-web --ide opencode,antigravity,codex --preset node --git
|
|
95
|
+
|
|
96
|
+
:: Crear en una ruta de destino específica y con carpeta de código personalizada
|
|
97
|
+
sdd-init mi-app --ide grok --mcp filesystem,postgres --output C:\Proyectos --src-dir app
|
|
98
|
+
|
|
99
|
+
:: Sobrescribir plantillas usando una carpeta propia de archivos .tmpl
|
|
100
|
+
sdd-init mi-app --templates-dir C:\mis-plantillas-sdd
|
|
101
|
+
|
|
102
|
+
:: Sobrescribir si la carpeta del proyecto ya existe
|
|
103
|
+
sdd-init mi-app --force
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 3. Agregar nuevas iteraciones en `specs/` (`002/`, `003/`, ...)
|
|
107
|
+
|
|
108
|
+
Cuando termines la especificación `001/` y quieras abrir la siguiente iteración:
|
|
109
|
+
|
|
110
|
+
1. Ubícate dentro de la carpeta del proyecto (o pasa la ruta como argumento).
|
|
111
|
+
2. Ejecuta `add-spec`:
|
|
112
|
+
```bat
|
|
113
|
+
:: Desde dentro del proyecto
|
|
114
|
+
sdd-init add-spec --title "Autenticación de usuarios"
|
|
115
|
+
|
|
116
|
+
:: O indicando la ruta desde fuera
|
|
117
|
+
sdd-init add-spec C:\Proyectos\mi-api --title "Módulo de pagos" --preset python
|
|
118
|
+
```
|
|
119
|
+
3. El CLI detectará el último número en `specs/` y creará automáticamente `specs/002/` (o `003/`, etc.) con `spec.md`, `plan.md` y `tasks.md`.
|
|
120
|
+
|
|
121
|
+
### 4. Auditar un proyecto existente (`status` / `doctor`)
|
|
122
|
+
|
|
123
|
+
```bat
|
|
124
|
+
:: Ver estado general, IDEs detectados y avance de tareas en cada spec
|
|
125
|
+
sdd-init status C:\Proyectos\mi-api
|
|
126
|
+
|
|
127
|
+
:: Modo auditoría estricta (retorna código 1 si falta algún archivo clave SDD)
|
|
128
|
+
sdd-init doctor C:\Proyectos\mi-api
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### 5. Consultar la ayuda de cualquier comando
|
|
132
|
+
|
|
133
|
+
```bat
|
|
134
|
+
sdd-init --help
|
|
135
|
+
sdd-init add-spec --help
|
|
136
|
+
sdd-init doctor --help
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 6. (Opcional) Agregar `dist\` al `PATH` para usar `sdd-init` desde cualquier carpeta
|
|
140
|
+
|
|
141
|
+
En CMD (como usuario actual, luego abre una ventana nueva de CMD):
|
|
142
|
+
|
|
143
|
+
```bat
|
|
144
|
+
setx PATH "%PATH%;C:\Users\glrd4\Desktop\EstructuraSDD\dist"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## IDEs y agentes soportados (`--ide`)
|
|
150
|
+
|
|
151
|
+
| # | Clave `--ide` | Entorno | Scaffolding específico generado |
|
|
152
|
+
| --- | --- | --- | --- |
|
|
153
|
+
| 1 | `opencode` | **OpenCode** *(por defecto)* | `.opencode/commands/` (`/spec`, `/plan`, `/tasks`, `/implement`), `.agents/skills/`, `opencode.json` (MCP) |
|
|
154
|
+
| 2 | `antigravity` | **Antigravity** | `GEMINI.md`, `.agents/rules/sdd.md`, `.agents/skills/sdd-workflow/SKILL.md` |
|
|
155
|
+
| 3 | `spec-kit` | **GitHub Spec Kit** | `.specify/memory/constitution.md`, `.specify/templates/`, `.specify/scripts/`, `.github/prompts/speckit.*.prompt.md` |
|
|
156
|
+
| 4 | `claude-code` | **Claude Code** | `CLAUDE.md`, `.claude/commands/`, `.claude/skills/sdd-workflow/SKILL.md`, `.mcp.json` |
|
|
157
|
+
| 5 | `cursor` | **Cursor** | `.cursor/rules/sdd.mdc`, `.cursor/mcp.json` |
|
|
158
|
+
| 6 | `vscode-copilot` | **VS Code + GitHub Copilot** | `.github/copilot-instructions.md`, `.github/prompts/`, `.vscode/mcp.json` |
|
|
159
|
+
| 7 | `codex` | **ChatGPT / Codex** | `.codex/config.toml`, `.agents/skills/sdd-workflow/SKILL.md`, `AGENTS.md` |
|
|
160
|
+
| 8 | `grok` | **Grok** | `GROK.md`, `.grok/config.toml`, `.grok/rules/sdd.md`, `.grok/skills/sdd-workflow/SKILL.md` |
|
|
161
|
+
|
|
162
|
+
Perfiles de stack (`--preset`): `generic` *(por defecto)*, `python`, `node`.
|
|
163
|
+
|
|
164
|
+
Servidores MCP disponibles (`--mcp`): `filesystem`, `github`, `context7`, `memory`, `sqlite`, `postgres` (o `all` / `none`). Se renderizan automáticamente en el formato nativo de cada IDE (`opencode.json`, `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `.grok/config.toml`).
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Estructura base común generada
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
<nombre-del-proyecto>/
|
|
172
|
+
├── <carpetas y archivos del IDE/agente elegido>
|
|
173
|
+
├── docs/constitution.md (o .specify/memory/constitution.md en spec-kit)
|
|
174
|
+
├── specs/
|
|
175
|
+
│ └── 001/
|
|
176
|
+
│ ├── plan.md
|
|
177
|
+
│ ├── spec.md
|
|
178
|
+
│ └── tasks.md
|
|
179
|
+
├── src/
|
|
180
|
+
│ └── .gitkeep
|
|
181
|
+
├── tests/
|
|
182
|
+
│ └── .gitkeep
|
|
183
|
+
├── .gitignore
|
|
184
|
+
├── AGENTS.md
|
|
185
|
+
└── MEMORY.md
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## CI/CD y Releases multiplataforma (GitHub Actions)
|
|
191
|
+
|
|
192
|
+
El repositorio incluye dos workflows automáticos:
|
|
193
|
+
|
|
194
|
+
- **CI (`.github/workflows/ci.yml`):** se ejecuta en cada `push` y `pull_request`, corriendo todas las pruebas y la verificación de instalación en **Windows, Ubuntu y macOS** con Python **3.11, 3.12 y 3.13**.
|
|
195
|
+
- **CD / Release (`.github/workflows/release.yml`):** al publicar un tag `v*`, ejecuta las pruebas, compila y prueba los binarios standalone para **Windows (`sdd-init-windows-x64.exe`)**, **Linux (`sdd-init-linux-x64`)** y **macOS (`sdd-init-macos-arm64`)**, genera `SHA256SUMS.txt` y crea automáticamente el **GitHub Release**.
|
|
196
|
+
- **Publicación opcional en PyPI (Trusted Publishing OIDC):** incluida en `release.yml` mediante el job `publish-pypi`. Para activarla:
|
|
197
|
+
1. En [PyPI](https://pypi.org/manage/account/publishing/), agrega un *Trusted Publisher* apuntando a `Kniball4726/EstructuraSDD`, workflow `release.yml` y entorno `pypi`.
|
|
198
|
+
2. En tu repo de GitHub (*Settings → Secrets and variables → Actions → Variables*), crea la variable `ENABLE_PYPI` con valor `true`.
|
|
199
|
+
|
|
200
|
+
Para publicar una nueva versión desde CMD/PowerShell:
|
|
201
|
+
|
|
202
|
+
```bat
|
|
203
|
+
git tag v1.1.0
|
|
204
|
+
git push origin v1.1.0
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Ejecutar pruebas automatizadas
|
|
210
|
+
|
|
211
|
+
```bat
|
|
212
|
+
.venv\Scripts\python.exe -m unittest discover -s tests -v
|
|
213
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sdd-scaffolder"
|
|
7
|
+
version = "1.1.0"
|
|
8
|
+
description = "Automatización en Python para generar, extender y auditar proyectos de Spec-Driven Development (SDD) multi-IDE."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
authors = [{ name = "Kniball4726" }]
|
|
13
|
+
keywords = ["sdd", "spec-driven-development", "scaffolding", "cli", "opencode", "antigravity", "mcp"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Topic :: Software Development :: Code Generators",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://github.com/Kniball4726/EstructuraSDD"
|
|
29
|
+
Repository = "https://github.com/Kniball4726/EstructuraSDD"
|
|
30
|
+
Issues = "https://github.com/Kniball4726/EstructuraSDD/issues"
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
sdd-init = "sdd_scaffolder.cli:main"
|
|
34
|
+
sdd = "sdd_scaffolder.cli:main"
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.packages.find]
|
|
37
|
+
include = ["sdd_scaffolder*"]
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.package-data]
|
|
40
|
+
sdd_scaffolder = [
|
|
41
|
+
"template_files/*.tmpl",
|
|
42
|
+
"template_files/opencode_commands/*.tmpl",
|
|
43
|
+
"template_files/ide/*.tmpl",
|
|
44
|
+
]
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Generador automatizado de scaffolding para Spec-Driven Development (SDD)."""
|
|
2
|
+
|
|
3
|
+
from .blueprint import build_scaffold_plan
|
|
4
|
+
from .config import (
|
|
5
|
+
DEFAULT_AGENT_DIRS,
|
|
6
|
+
DEFAULT_AGENT_SUBDIRS,
|
|
7
|
+
DEFAULT_SRC_DIR,
|
|
8
|
+
INITIAL_SPEC_ID,
|
|
9
|
+
ScaffoldConfig,
|
|
10
|
+
ScaffoldPlan,
|
|
11
|
+
ScaffoldResult,
|
|
12
|
+
SpecResult,
|
|
13
|
+
)
|
|
14
|
+
from .doctor import ProjectAudit, SpecAudit, audit_sdd_project, format_audit_report
|
|
15
|
+
from .generator import ProjectExistsError, create_sdd_project
|
|
16
|
+
from .git_ops import GitInitError, init_git_repository
|
|
17
|
+
from .ide_profiles import (
|
|
18
|
+
DEFAULT_IDE,
|
|
19
|
+
DEFAULT_IDES,
|
|
20
|
+
IDE_ORDER,
|
|
21
|
+
IDE_PROFILES,
|
|
22
|
+
IdeProfile,
|
|
23
|
+
parse_ide_selection,
|
|
24
|
+
)
|
|
25
|
+
from .mcp_catalog import (
|
|
26
|
+
DEFAULT_MCPS,
|
|
27
|
+
MCP_CATALOG,
|
|
28
|
+
MCP_ORDER,
|
|
29
|
+
McpServerDef,
|
|
30
|
+
ides_support_project_mcp,
|
|
31
|
+
parse_mcp_selection,
|
|
32
|
+
)
|
|
33
|
+
from .presets import DEFAULT_PRESET_NAME, PRESETS, ProjectPreset, get_preset
|
|
34
|
+
from .specs import InvalidProjectError, add_spec_iteration, find_next_spec_id
|
|
35
|
+
from .validators import ValidationError
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"DEFAULT_AGENT_DIRS",
|
|
39
|
+
"DEFAULT_AGENT_SUBDIRS",
|
|
40
|
+
"DEFAULT_IDE",
|
|
41
|
+
"DEFAULT_IDES",
|
|
42
|
+
"DEFAULT_MCPS",
|
|
43
|
+
"DEFAULT_PRESET_NAME",
|
|
44
|
+
"DEFAULT_SRC_DIR",
|
|
45
|
+
"IDE_ORDER",
|
|
46
|
+
"IDE_PROFILES",
|
|
47
|
+
"INITIAL_SPEC_ID",
|
|
48
|
+
"MCP_CATALOG",
|
|
49
|
+
"MCP_ORDER",
|
|
50
|
+
"PRESETS",
|
|
51
|
+
"GitInitError",
|
|
52
|
+
"IdeProfile",
|
|
53
|
+
"InvalidProjectError",
|
|
54
|
+
"McpServerDef",
|
|
55
|
+
"ProjectAudit",
|
|
56
|
+
"ProjectExistsError",
|
|
57
|
+
"ProjectPreset",
|
|
58
|
+
"ScaffoldConfig",
|
|
59
|
+
"ScaffoldPlan",
|
|
60
|
+
"ScaffoldResult",
|
|
61
|
+
"SpecAudit",
|
|
62
|
+
"SpecResult",
|
|
63
|
+
"ValidationError",
|
|
64
|
+
"add_spec_iteration",
|
|
65
|
+
"audit_sdd_project",
|
|
66
|
+
"build_scaffold_plan",
|
|
67
|
+
"create_sdd_project",
|
|
68
|
+
"find_next_spec_id",
|
|
69
|
+
"format_audit_report",
|
|
70
|
+
"get_preset",
|
|
71
|
+
"ides_support_project_mcp",
|
|
72
|
+
"init_git_repository",
|
|
73
|
+
"parse_ide_selection",
|
|
74
|
+
"parse_mcp_selection",
|
|
75
|
+
]
|