specleap-framework 2.0.9 → 2.0.10
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/CLAUDE.md +346 -259
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -1,357 +1,444 @@
|
|
|
1
|
-
# SpecLeap —
|
|
1
|
+
# SpecLeap Framework — Claude Context
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Metodología:** Spec-Driven Development (SDD). Primero CONTRATO.md, luego código.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## 🌐
|
|
7
|
+
## 🌐 Idioma por Defecto: ESPAÑOL
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**CRÍTICO:** Todo feedback, mensajes de commit, y texto para usuario DEBE ser en ESPAÑOL.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
**Examples:**
|
|
11
|
+
**Ejemplos:**
|
|
14
12
|
❌ "Generating plan..."
|
|
15
13
|
✅ "Generando plan..."
|
|
16
14
|
|
|
17
15
|
❌ "Tests passed"
|
|
18
16
|
✅ "Tests pasaron"
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
Ver archivos de agentes individuales (`.agents/*.md`) para directivas específicas de idioma.
|
|
21
19
|
|
|
22
20
|
---
|
|
23
21
|
|
|
24
|
-
##
|
|
22
|
+
## Estructura del Proyecto
|
|
23
|
+
|
|
24
|
+
Esto es **SpecLeap**, un framework de desarrollo que combina:
|
|
25
|
+
- **Agentes conversacionales** (roles especializados con comandos)
|
|
26
|
+
- **Spec-Driven Development** (contratos primero, código segundo)
|
|
27
|
+
- **Soporte multi-proyecto** (proyectos independientes con contratos)
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
```
|
|
30
|
+
specleap-framework/
|
|
31
|
+
├── .agents/ # 3 agentes especializados
|
|
32
|
+
│ ├── backend.md # Laravel + PHP + API
|
|
33
|
+
│ ├── frontend.md # React + TypeScript
|
|
34
|
+
│ └── producto.md # Análisis producto + user stories
|
|
35
|
+
├── .commands/ # 10 comandos SpecLeap
|
|
36
|
+
│ ├── ayuda.md
|
|
37
|
+
│ ├── planificar.md
|
|
38
|
+
│ ├── implementar.md
|
|
39
|
+
│ ├── refinar.md
|
|
40
|
+
│ └── ...
|
|
41
|
+
├── .specleap/ # Configuración (creada durante instalación)
|
|
42
|
+
│ ├── config.json # Tokens, idioma, workspace
|
|
43
|
+
│ └── i18n/ # Traducciones ES/EN
|
|
44
|
+
├── proyectos/ # Proyectos del usuario
|
|
45
|
+
│ └── _template/ # Plantilla CONTRATO.md + ANEXOS.md
|
|
46
|
+
├── rules/ # Reglas de desarrollo
|
|
47
|
+
└── scripts/ # Scripts de instalación y generación
|
|
48
|
+
```
|
|
30
49
|
|
|
31
50
|
---
|
|
32
51
|
|
|
33
|
-
##
|
|
52
|
+
## Principios Fundamentales
|
|
34
53
|
|
|
35
|
-
1. **CONTRATO.md
|
|
36
|
-
2. **
|
|
37
|
-
3. **
|
|
38
|
-
4. **
|
|
39
|
-
5. **
|
|
54
|
+
1. **CONTRATO.md es la fuente de verdad** — Una vez aceptado, nunca modificar
|
|
55
|
+
2. **Proyectos son independientes** — Cada proyecto en `proyectos/` tiene su propio contrato
|
|
56
|
+
3. **Comandos en español** — `refinar`, `planificar`, `implementar`, `explicar`, `documentar`
|
|
57
|
+
4. **Agentes tienen roles** — Backend, Frontend, Producto (ver `.agents/`)
|
|
58
|
+
5. **Flujo SDD obligatorio** — Spec primero, SIEMPRE
|
|
40
59
|
|
|
41
60
|
---
|
|
42
61
|
|
|
43
|
-
##
|
|
62
|
+
## 🚀 Inicio de Sesión
|
|
44
63
|
|
|
45
|
-
###
|
|
64
|
+
### Cuando el Usuario Dice "Hola" o "ayuda"
|
|
46
65
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
66
|
+
**SIEMPRE** responder con:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
¡Hola! Soy tu asistente SpecLeap.
|
|
70
|
+
|
|
71
|
+
📋 Comandos disponibles:
|
|
72
|
+
• ayuda → Lista completa de comandos
|
|
73
|
+
• inicio → Crear proyecto nuevo (cuestionario 59 preguntas)
|
|
74
|
+
• planificar → Generar backlog Asana desde CONTRATO.md
|
|
75
|
+
• implementar <ticket> → Desarrollar feature
|
|
76
|
+
• refinar → Mejorar CONTRATO.md existente
|
|
77
|
+
• documentar → Actualizar documentación
|
|
78
|
+
|
|
79
|
+
🔧 Estado del proyecto:
|
|
80
|
+
[Buscar CONTRATO.md en proyectos/]
|
|
81
|
+
|
|
82
|
+
Si existe:
|
|
83
|
+
✅ CONTRATO.md encontrado: proyectos/mi-proyecto/CONTRATO.md
|
|
84
|
+
|
|
85
|
+
Si NO existe:
|
|
86
|
+
⚠️ No hay CONTRATO.md todavía.
|
|
87
|
+
Para crear uno nuevo:
|
|
88
|
+
./scripts/generate-contrato.sh
|
|
89
|
+
|
|
90
|
+
o escribe: inicio
|
|
91
|
+
|
|
92
|
+
¿En qué puedo ayudarte hoy?
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**NUNCA** dar respuesta genérica como "¿En qué puedo ayudarte?" sin mostrar los comandos disponibles.
|
|
52
96
|
|
|
53
97
|
---
|
|
54
98
|
|
|
55
|
-
##
|
|
99
|
+
## 📋 Comandos Disponibles
|
|
100
|
+
|
|
101
|
+
### Comandos Principales
|
|
56
102
|
|
|
57
|
-
|
|
103
|
+
| Comando | Descripción | Archivo | Agente |
|
|
104
|
+
|---------|-------------|---------|--------|
|
|
105
|
+
| `ayuda` | Lista completa de comandos + flujo SDD | `.commands/ayuda.md` | - |
|
|
106
|
+
| `inicio` | Wizard proyecto nuevo (59 preguntas) | `.commands/inicio.md` | - |
|
|
107
|
+
| `planificar` | Lee CONTRATO.md → genera backlog Asana | `.commands/planificar.md` | - |
|
|
108
|
+
| `implementar <ticket>` | Desarrolla según spec del ticket Asana | `.commands/implementar.md` | backend/frontend |
|
|
109
|
+
| `refinar` | Mejora CONTRATO.md existente | `.commands/refinar.md` | producto |
|
|
110
|
+
| `documentar` | Genera/actualiza documentación | `.commands/documentar.md` | - |
|
|
111
|
+
| `adoptar` | Integra SpecLeap en proyecto existente | `.commands/adoptar.md` | - |
|
|
112
|
+
| `explicar <concepto>` | Explica metodología SDD | `.commands/explicar.md` | - |
|
|
58
113
|
|
|
59
|
-
|
|
60
|
-
2. **Read the corresponding `.commands/*.md` file**
|
|
61
|
-
3. **Follow the instructions in that file step-by-step**
|
|
114
|
+
### Detección de Comandos
|
|
62
115
|
|
|
63
|
-
**
|
|
116
|
+
**Cuando el usuario escribe UN SOLO comando** (ej: `planificar`, `ayuda`):
|
|
64
117
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
| `refinar` | `.commands/refinar.md` | Refine user story |
|
|
70
|
-
| `planificar` | `.commands/planificar.md` | Generate backlog |
|
|
71
|
-
| `crear-tickets` | `.commands/crear-tickets.md` | Alias of `planificar` |
|
|
72
|
-
| `implementar` | `.commands/implementar.md` | Execute implementation |
|
|
73
|
-
| `explicar` | `.commands/explicar.md` | Explain concept |
|
|
74
|
-
| `documentar` | `.commands/documentar.md` | Update docs |
|
|
75
|
-
| `adoptar` | `.commands/adoptar.md` | Adopt legacy project |
|
|
118
|
+
1. **Detectar el comando** del mensaje
|
|
119
|
+
2. **Leer el archivo** `.commands/<comando>.md` correspondiente
|
|
120
|
+
3. **Seguir las instrucciones** paso a paso del archivo
|
|
121
|
+
4. **NUNCA preguntar** "¿debería leer el archivo?" — simplemente léelo
|
|
76
122
|
|
|
77
|
-
**
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
123
|
+
**Mapeo comando → archivo:**
|
|
124
|
+
- `ayuda` | `help` | `comandos` → `.commands/ayuda.md`
|
|
125
|
+
- `inicio` → `.commands/inicio.md`
|
|
126
|
+
- `planificar` | `crear-tickets` → `.commands/planificar.md`
|
|
127
|
+
- `implementar` → `.commands/implementar.md`
|
|
128
|
+
- `refinar` → `.commands/refinar.md`
|
|
129
|
+
- `documentar` → `.commands/documentar.md`
|
|
130
|
+
- `adoptar` → `.commands/adoptar.md`
|
|
131
|
+
- `explicar` → `.commands/explicar.md`
|
|
81
132
|
|
|
82
133
|
---
|
|
83
134
|
|
|
84
|
-
##
|
|
135
|
+
## 🔄 Flujo de Trabajo SDD
|
|
136
|
+
|
|
137
|
+
### Paso 1: Crear CONTRATO.md
|
|
138
|
+
|
|
139
|
+
**Opción A: Cuestionario Guiado (Recomendado)**
|
|
140
|
+
```bash
|
|
141
|
+
./scripts/generate-contrato.sh
|
|
142
|
+
```
|
|
143
|
+
→ 59 preguntas interactivas (Stack, Features, Integraciones, etc.)
|
|
144
|
+
→ Genera CONTRATO.md completo automáticamente
|
|
85
145
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
| `explicar [concepto]` | Explain code/architecture/decisions | neutral |
|
|
92
|
-
| `documentar` | Update technical documentation | neutral |
|
|
146
|
+
**Opción B: Manual**
|
|
147
|
+
```bash
|
|
148
|
+
cp proyectos/_template/CONTRATO.md proyectos/mi-proyecto/
|
|
149
|
+
# Editar manualmente
|
|
150
|
+
```
|
|
93
151
|
|
|
94
|
-
|
|
152
|
+
### Paso 2: Planificar en Asana
|
|
95
153
|
|
|
96
|
-
|
|
154
|
+
```
|
|
155
|
+
Usuario: planificar
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**El asistente debe:**
|
|
159
|
+
1. Leer `CONTRATO.md`
|
|
160
|
+
2. Analizar secciones: Features, Stack, Integraciones, Roles, etc.
|
|
161
|
+
3. Ejecutar `scripts/generate-asana-structure.sh`
|
|
162
|
+
4. Generar épicas + user stories en Asana
|
|
163
|
+
5. Reportar resumen: X épicas, Y stories creadas
|
|
164
|
+
|
|
165
|
+
### Paso 3: Implementar por Tickets
|
|
97
166
|
|
|
98
|
-
|
|
167
|
+
```
|
|
168
|
+
Usuario: implementar PROJ-123
|
|
169
|
+
```
|
|
99
170
|
|
|
100
|
-
|
|
171
|
+
**El asistente debe:**
|
|
172
|
+
1. Descargar spec del ticket Asana (vía API)
|
|
173
|
+
2. Leer CONTRATO.md para contexto
|
|
174
|
+
3. Adoptar agente apropiado (.agents/backend.md o frontend.md)
|
|
175
|
+
4. Implementar según especificación
|
|
176
|
+
5. Crear tests (coverage >= 80%)
|
|
177
|
+
6. Documentar cambios
|
|
178
|
+
7. Crear branch: `feature/PROJ-123-descripcion`
|
|
179
|
+
8. Commit + Push
|
|
180
|
+
9. Crear PR
|
|
181
|
+
10. Esperar review CodeRabbit
|
|
182
|
+
|
|
183
|
+
### Paso 4: Review Automático
|
|
184
|
+
|
|
185
|
+
→ Push a GitHub
|
|
186
|
+
→ CodeRabbit revisa automáticamente (`.coderabbit.yaml`)
|
|
187
|
+
→ Feedback en español
|
|
188
|
+
→ Aplicar correcciones si necesario
|
|
101
189
|
|
|
102
|
-
|
|
103
|
-
- **`.agents/frontend.md`** — React + TypeScript + Vite expert
|
|
104
|
-
- **`.agents/producto.md`** — Product analyst + user story enrichment
|
|
190
|
+
---
|
|
105
191
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
192
|
+
## 🤖 Agentes Especializados
|
|
193
|
+
|
|
194
|
+
Adoptar estos roles cuando sea apropiado:
|
|
195
|
+
|
|
196
|
+
### .agents/backend.md
|
|
197
|
+
**Cuándo:** Implementando APIs, base de datos, lógica de negocio
|
|
198
|
+
**Stack:** Laravel + PHP + Eloquent + PostgreSQL/MySQL
|
|
199
|
+
**Responsabilidades:**
|
|
200
|
+
- Arquitectura backend (DDD, Repository pattern)
|
|
201
|
+
- APIs RESTful
|
|
202
|
+
- Validación server-side
|
|
203
|
+
- Seguridad (OWASP)
|
|
204
|
+
- Tests unitarios + integración
|
|
205
|
+
|
|
206
|
+
### .agents/frontend.md
|
|
207
|
+
**Cuándo:** Implementando UI, componentes, estado
|
|
208
|
+
**Stack:** React + TypeScript + Vite + TailwindCSS
|
|
209
|
+
**Responsabilidades:**
|
|
210
|
+
- Componentes reutilizables
|
|
211
|
+
- Estado global (Context/Zustand)
|
|
212
|
+
- Integración con APIs
|
|
213
|
+
- Diseño responsive
|
|
214
|
+
- Tests componentes
|
|
215
|
+
|
|
216
|
+
### .agents/producto.md
|
|
217
|
+
**Cuándo:** Refinando user stories, decisiones de producto
|
|
218
|
+
**Responsabilidades:**
|
|
219
|
+
- Enriquecer user stories con criterios de aceptación
|
|
220
|
+
- Detectar edge cases
|
|
221
|
+
- Priorización de features
|
|
222
|
+
- UX/UI decisions
|
|
223
|
+
|
|
224
|
+
**Activación automática:**
|
|
225
|
+
- Usuario escribe `refinar` → Cargar `.agents/producto.md`
|
|
226
|
+
- Usuario escribe `implementar` + backend-related → Cargar `.agents/backend.md`
|
|
227
|
+
- Usuario escribe `implementar` + frontend-related → Cargar `.agents/frontend.md`
|
|
111
228
|
|
|
112
229
|
---
|
|
113
230
|
|
|
114
|
-
##
|
|
231
|
+
## 📐 Reglas de Desarrollo
|
|
232
|
+
|
|
233
|
+
Ver carpeta `rules/` para reglas completas:
|
|
115
234
|
|
|
116
|
-
|
|
235
|
+
### rules/development-rules.md
|
|
236
|
+
- Spec-first SIEMPRE
|
|
237
|
+
- Código en inglés, comentarios en español
|
|
238
|
+
- Tests obligatorios (>= 80% coverage)
|
|
239
|
+
- TypeScript strict mode
|
|
117
240
|
|
|
118
|
-
###
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
241
|
+
### rules/git-workflow.md
|
|
242
|
+
- Feature branches: `feature/PROJ-123-descripcion`
|
|
243
|
+
- NUNCA push directo a `main`
|
|
244
|
+
- Commits descriptivos en español
|
|
245
|
+
- PRs obligatorios
|
|
123
246
|
|
|
124
|
-
###
|
|
125
|
-
|
|
126
|
-
|
|
247
|
+
### rules/environment-protection.md
|
|
248
|
+
- NUNCA hardcodear credenciales
|
|
249
|
+
- Usar `.env` para configuración
|
|
250
|
+
- Validar variables de entorno al inicio
|
|
127
251
|
|
|
128
|
-
|
|
252
|
+
### rules/session-protocol.md
|
|
253
|
+
- Mantener contexto entre sesiones
|
|
254
|
+
- Documentar decisiones importantes
|
|
255
|
+
- Actualizar ANEXOS.md con cambios aprobados
|
|
129
256
|
|
|
130
257
|
---
|
|
131
258
|
|
|
132
|
-
## Agent Skills (
|
|
259
|
+
## 🧪 Agent Skills (20 Skills TIER 1)
|
|
133
260
|
|
|
134
|
-
|
|
261
|
+
Si están instalados en `~/.skills/`, se activan automáticamente según contexto:
|
|
135
262
|
|
|
136
|
-
###
|
|
263
|
+
### 🔒 Seguridad (5 skills)
|
|
264
|
+
- `backend-api-security` — Validación server-side, rate limiting, CSRF
|
|
265
|
+
- `frontend-mobile-security` — XSS, sanitización
|
|
266
|
+
- `sast-configuration` — SAST tools config
|
|
267
|
+
- `stride-analysis-patterns` — Threat modeling
|
|
268
|
+
- `security-requirement-extraction` — Security reqs desde specs
|
|
137
269
|
|
|
138
|
-
|
|
270
|
+
### 🔄 Consistencia (3 skills) ⭐ CRÍTICOS
|
|
271
|
+
- `verification-before-completion` — Verificar ANTES de finalizar
|
|
272
|
+
- `code-review-excellence` — Review checklist
|
|
273
|
+
- `systematic-debugging` — Debug metodológico
|
|
139
274
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
275
|
+
### 🎨 Diseño/Frontend (6 skills)
|
|
276
|
+
- `frontend-design` — Profesional design (Vercel/Linear style)
|
|
277
|
+
- `web-design-guidelines` — UX guidelines
|
|
278
|
+
- `ui-ux-pro-max` — Diseño avanzado + componentes
|
|
279
|
+
- `tailwind-design-system` — TailwindCSS best practices
|
|
280
|
+
- `shadcn-ui` — Shadcn components
|
|
281
|
+
- `responsive-design` — Mobile-first responsive
|
|
282
|
+
|
|
283
|
+
### 🛠️ Backend/Dev (6 skills)
|
|
284
|
+
- `laravel-specialist` — Laravel best practices
|
|
285
|
+
- `vercel-react-best-practices` — React + Next.js
|
|
286
|
+
- `test-driven-development` — TDD workflow
|
|
287
|
+
- `api-design-principles` — REST API design
|
|
288
|
+
- `postgresql-table-design` — DB schema design
|
|
289
|
+
- `error-handling-patterns` — Error handling strategies
|
|
150
290
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
#### verification-before-completion ⭐ **MANDATORY**
|
|
154
|
-
|
|
155
|
-
**Before creating ANY function, class, or component:**
|
|
156
|
-
1. **SEARCH** existing code for similar functionality
|
|
157
|
-
2. **READ** conventions.md for naming patterns
|
|
158
|
-
3. **VERIFY** utilities/services don't already exist
|
|
159
|
-
4. **ONLY THEN** create if nothing similar exists
|
|
160
|
-
|
|
161
|
-
**Anti-Pattern (NEVER DO):**
|
|
162
|
-
- ❌ Create `UserHelper` when `UserService` exists
|
|
163
|
-
- ❌ Create `formatPrice()` when `formatCurrency()` exists
|
|
164
|
-
- ❌ Create new HTTP client when axios instance exists
|
|
165
|
-
|
|
166
|
-
#### code-review-excellence
|
|
167
|
-
|
|
168
|
-
Before committing, verify:
|
|
169
|
-
- No duplicated code
|
|
170
|
-
- Follows conventions.md
|
|
171
|
-
- Tests coverage >= 90%
|
|
172
|
-
- Security best practices
|
|
173
|
-
|
|
174
|
-
#### backend-api-security
|
|
175
|
-
|
|
176
|
-
For all endpoints:
|
|
177
|
-
- Server-side validation
|
|
178
|
-
- Rate limiting
|
|
179
|
-
- CSRF protection
|
|
180
|
-
- SQL injection prevention
|
|
181
|
-
- XSS sanitization
|
|
182
|
-
|
|
183
|
-
#### frontend-design + web-design-guidelines
|
|
184
|
-
|
|
185
|
-
For all components:
|
|
186
|
-
- Professional design (Vercel/Linear style)
|
|
187
|
-
- Consistent spacing (4px grid)
|
|
188
|
-
- Responsive mobile-first
|
|
189
|
-
- Micro-interactions
|
|
190
|
-
- Design system coherence
|
|
191
|
-
|
|
192
|
-
### Skill Categories
|
|
193
|
-
|
|
194
|
-
**🔒 Security (5):**
|
|
195
|
-
- sast-configuration
|
|
196
|
-
- stride-analysis-patterns
|
|
197
|
-
- security-requirement-extraction
|
|
198
|
-
- backend-api-security
|
|
199
|
-
- frontend-mobile-security
|
|
200
|
-
|
|
201
|
-
**🔄 Consistency (3):**
|
|
202
|
-
- verification-before-completion ⭐
|
|
203
|
-
- code-review-excellence
|
|
204
|
-
- systematic-debugging
|
|
205
|
-
|
|
206
|
-
**🎨 Design/Frontend (6):**
|
|
207
|
-
- web-design-guidelines
|
|
208
|
-
- frontend-design
|
|
209
|
-
- ui-ux-pro-max
|
|
210
|
-
- tailwind-design-system
|
|
211
|
-
- shadcn-ui
|
|
212
|
-
- responsive-design
|
|
213
|
-
|
|
214
|
-
**🛠️ Backend/Dev (6):**
|
|
215
|
-
- laravel-specialist
|
|
216
|
-
- vercel-react-best-practices
|
|
217
|
-
- test-driven-development
|
|
218
|
-
- api-design-principles
|
|
219
|
-
- postgresql-table-design
|
|
220
|
-
- error-handling-patterns
|
|
221
|
-
|
|
222
|
-
**See:** [SETUP.md](SETUP.md) for installation details.
|
|
291
|
+
**Activación:** Automática según contexto del código/comando
|
|
223
292
|
|
|
224
293
|
---
|
|
225
294
|
|
|
226
|
-
##
|
|
295
|
+
## ⚠️ Verificaciones ANTES de Codificar
|
|
227
296
|
|
|
297
|
+
### SIEMPRE Verificar:
|
|
298
|
+
|
|
299
|
+
**1. ¿Existe CONTRATO.md?**
|
|
300
|
+
```bash
|
|
301
|
+
find proyectos/ -name "CONTRATO.md"
|
|
228
302
|
```
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
│ ├── tech-stack.md
|
|
236
|
-
│ ├── conventions.md
|
|
237
|
-
│ └── decisions.md
|
|
238
|
-
└── specs/ # Feature specs
|
|
239
|
-
├── [TICKET-ID]_backend.md
|
|
240
|
-
└── [TICKET-ID]_frontend.md
|
|
241
|
-
```
|
|
303
|
+
- ❌ NO → Pedir crearlo: `./scripts/generate-contrato.sh` o comando `inicio`
|
|
304
|
+
- ✅ SÍ → Leerlo ANTES de implementar
|
|
305
|
+
|
|
306
|
+
**2. ¿Hay ticket Asana asignado?**
|
|
307
|
+
- ❌ NO → Preguntar: "¿Qué ticket Asana implementamos? (ej: PROJ-123)"
|
|
308
|
+
- ✅ SÍ → Descargar spec del ticket vía API Asana
|
|
242
309
|
|
|
243
|
-
**
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
310
|
+
**3. ¿Stack tecnológico definido?**
|
|
311
|
+
- Leer sección "Stack Tecnológico" de CONTRATO.md
|
|
312
|
+
- NUNCA asumir tecnologías sin verificar
|
|
313
|
+
|
|
314
|
+
**4. ¿Tests existen para funcionalidad?**
|
|
315
|
+
- ❌ NO → Crearlos ANTES de considerar completo
|
|
316
|
+
- ✅ SÍ → Ejecutarlos y verificar que pasan
|
|
247
317
|
|
|
248
318
|
---
|
|
249
319
|
|
|
250
|
-
##
|
|
320
|
+
## 🚫 Prohibiciones Absolutas
|
|
251
321
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
User: "SCRUM-23"
|
|
263
|
-
AI: "¿Refinar o planificar directamente?"
|
|
264
|
-
|
|
265
|
-
User: "planificar SCRUM-23"
|
|
266
|
-
AI: [Adopt .agents/backend.md]
|
|
267
|
-
[Read CONTRATO + context + ticket]
|
|
268
|
-
[Generate plan in specs/SCRUM-23_backend.md]
|
|
269
|
-
"📋 Plan creado. Revisar antes de implementar."
|
|
270
|
-
|
|
271
|
-
User: "implementar @SCRUM-23_backend.md"
|
|
272
|
-
AI: [Adopt .agents/backend.md]
|
|
273
|
-
[Execute plan step by step]
|
|
274
|
-
[Tests, commit, push, PR]
|
|
275
|
-
"✅ Implementación completada. PR: [URL]"
|
|
276
|
-
```
|
|
322
|
+
1. **NUNCA** codificar sin CONTRATO.md aprobado
|
|
323
|
+
2. **NUNCA** hacer commit directo a `main`
|
|
324
|
+
3. **NUNCA** hardcodear credenciales (usar `.env`)
|
|
325
|
+
4. **NUNCA** ignorar el comando del usuario
|
|
326
|
+
- Si dice `planificar` → ejecutar planificar
|
|
327
|
+
- Si dice `implementar` → ejecutar implementar
|
|
328
|
+
5. **NUNCA** asumir stack tecnológico (leer CONTRATO.md)
|
|
329
|
+
6. **NUNCA** modificar CONTRATO.md después de aprobado (usar ANEXOS.md)
|
|
330
|
+
7. **NUNCA** respuesta genérica a "Hola" (siempre listar comandos)
|
|
277
331
|
|
|
278
332
|
---
|
|
279
333
|
|
|
280
|
-
##
|
|
281
|
-
|
|
282
|
-
Besides conversational commands, the `openspec` CLI is available:
|
|
334
|
+
## 🔧 Integración con Herramientas
|
|
283
335
|
|
|
284
|
-
|
|
285
|
-
openspec enrich "user story" # Refine user story
|
|
286
|
-
openspec new --auto "feature" # Create proposal
|
|
287
|
-
openspec verify CHANGE-001 # Verify tests
|
|
288
|
-
openspec status # List proposals
|
|
289
|
-
```
|
|
336
|
+
### Asana (OBLIGATORIO)
|
|
290
337
|
|
|
291
|
-
|
|
338
|
+
**SpecLeap usa Asana** para gestión de backlog.
|
|
292
339
|
|
|
293
|
-
|
|
340
|
+
**Token configurado en:**
|
|
341
|
+
- `.specleap/config.json` → `asana.token`
|
|
342
|
+
- `.env` → `ASANA_WORKSPACE_ID`
|
|
294
343
|
|
|
295
|
-
|
|
344
|
+
**Scripts:**
|
|
345
|
+
- `scripts/generate-asana-structure.sh` — Genera estructura completa
|
|
346
|
+
- `scripts/create-asana-tasks.sh` — Crea tasks individuales
|
|
347
|
+
- API Asana para leer specs de tickets
|
|
296
348
|
|
|
297
|
-
|
|
349
|
+
**Comando `planificar`:**
|
|
350
|
+
1. Lee CONTRATO.md
|
|
351
|
+
2. Ejecuta `generate-asana-structure.sh`
|
|
352
|
+
3. Crea épicas por feature
|
|
353
|
+
4. Crea user stories por épica
|
|
354
|
+
5. Reporta resumen
|
|
298
355
|
|
|
299
|
-
|
|
356
|
+
### CodeRabbit (Recomendado)
|
|
300
357
|
|
|
301
|
-
|
|
302
|
-
- `crear-tickets` — Generate all tickets from CONTRATO.md
|
|
303
|
-
- `refinar SCRUM-XX` — Read and enrich ticket
|
|
304
|
-
- `planificar SCRUM-XX` — Read ticket for plan generation
|
|
305
|
-
- `implementar` — Update ticket status during implementation
|
|
306
|
-
- Automatic updates: "To Do" → "In Progress" → "In Review" → "Done"
|
|
358
|
+
**Review automático en PRs.**
|
|
307
359
|
|
|
308
|
-
**
|
|
360
|
+
**Configuración:** `.coderabbit.yaml` (incluido en template)
|
|
309
361
|
|
|
310
|
-
|
|
362
|
+
**Checks:**
|
|
363
|
+
- Cumplimiento de specs
|
|
364
|
+
- Tests >= 80% coverage
|
|
365
|
+
- Seguridad (OWASP)
|
|
366
|
+
- Estándares de código
|
|
367
|
+
- Feedback en español
|
|
311
368
|
|
|
312
|
-
**
|
|
369
|
+
**Comando `implementar` espera:**
|
|
370
|
+
- CodeRabbit approval antes de marcar completo
|
|
371
|
+
- Aplicar feedback si hay correcciones
|
|
313
372
|
|
|
314
|
-
|
|
315
|
-
- Copy `.coderabbit.yaml` from `proyectos/_template/`
|
|
316
|
-
- Reviews in Spanish
|
|
317
|
-
- Checks: specs compliance, tests >= 90%, security, standards
|
|
318
|
-
- `implementar` waits for CodeRabbit approval before marking complete
|
|
373
|
+
### Git Hooks (Instalado automáticamente)
|
|
319
374
|
|
|
320
|
-
|
|
375
|
+
**Scripts:** `scripts/install-git-hooks.sh`
|
|
321
376
|
|
|
322
|
-
|
|
323
|
-
-
|
|
324
|
-
-
|
|
377
|
+
**Hooks:**
|
|
378
|
+
- `pre-commit` — Linters, formatters, tests
|
|
379
|
+
- `commit-msg` — Valida formato de commit
|
|
380
|
+
- `pre-push` — Tests completos
|
|
325
381
|
|
|
326
382
|
---
|
|
327
383
|
|
|
328
|
-
##
|
|
384
|
+
## 📊 Formato de Respuestas
|
|
385
|
+
|
|
386
|
+
### Estilo General
|
|
387
|
+
- **Conciso:** Directo al punto, sin relleno
|
|
388
|
+
- **Estructurado:** Usar listas, headings, code blocks
|
|
389
|
+
- **Bilingüe:** Español (default), English si usuario prefiere
|
|
390
|
+
- **Contexto:** Siempre referenciar CONTRATO.md cuando exista
|
|
329
391
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
392
|
+
### Ejemplo: Comando Completado
|
|
393
|
+
|
|
394
|
+
```
|
|
395
|
+
✅ Implementación completada: Feature de autenticación
|
|
396
|
+
|
|
397
|
+
📋 Cambios realizados:
|
|
398
|
+
• app/Http/Controllers/AuthController.php — Login + Register
|
|
399
|
+
• app/Models/User.php — Modelo usuario
|
|
400
|
+
• database/migrations/create_users_table.php — Schema
|
|
401
|
+
• tests/Feature/AuthTest.php — Tests auth
|
|
402
|
+
|
|
403
|
+
🧪 Tests:
|
|
404
|
+
• test_user_can_register: ✅ PASS
|
|
405
|
+
• test_user_can_login: ✅ PASS
|
|
406
|
+
• test_invalid_credentials: ✅ PASS
|
|
407
|
+
• Coverage: 92%
|
|
408
|
+
|
|
409
|
+
📄 Documentación:
|
|
410
|
+
• README.md actualizado (instrucciones login)
|
|
411
|
+
• CONTRATO.md: sin cambios
|
|
412
|
+
|
|
413
|
+
🔗 Próximos pasos:
|
|
414
|
+
1. Review: CodeRabbit revisará automáticamente
|
|
415
|
+
2. Merge: Una vez aprobado, merge a main
|
|
416
|
+
3. Deploy: [según proceso del equipo]
|
|
417
|
+
|
|
418
|
+
🔗 PR: https://github.com/user/repo/pull/123
|
|
419
|
+
```
|
|
336
420
|
|
|
337
421
|
---
|
|
338
422
|
|
|
339
|
-
##
|
|
423
|
+
## 📖 Referencias
|
|
340
424
|
|
|
341
|
-
- **
|
|
342
|
-
- **
|
|
343
|
-
- **
|
|
344
|
-
- **
|
|
345
|
-
- **
|
|
425
|
+
- **Comandos:** `.commands/*.md`
|
|
426
|
+
- **Agentes:** `.agents/*.md`
|
|
427
|
+
- **Reglas:** `rules/*.md`
|
|
428
|
+
- **Template:** `proyectos/_template/`
|
|
429
|
+
- **Scripts:** `scripts/README.md`
|
|
346
430
|
|
|
347
431
|
---
|
|
348
432
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
433
|
+
## 💡 Cuando Tengas Dudas
|
|
434
|
+
|
|
435
|
+
1. Leer el archivo `.commands/` correspondiente
|
|
436
|
+
2. Adoptar el rol `.agents/` especificado
|
|
437
|
+
3. Seguir las reglas de `rules/`
|
|
438
|
+
4. Preguntar al usuario para clarificación
|
|
439
|
+
|
|
440
|
+
**SIEMPRE priorizar claridad sobre velocidad.**
|
|
354
441
|
|
|
355
442
|
---
|
|
356
443
|
|
|
357
|
-
*
|
|
444
|
+
*Hecho con ❤️ por la Comunidad SpecLeap*
|
package/package.json
CHANGED