claude-agent-framework 1.0.0
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/README.md +128 -0
- package/bin/claude-framework +3 -0
- package/framework/agents/design-lead.md +240 -0
- package/framework/agents/product-owner.md +179 -0
- package/framework/agents/tech-lead.md +226 -0
- package/framework/commands/ayuda.md +127 -0
- package/framework/commands/a/303/261adir.md +98 -0
- package/framework/commands/backup.md +397 -0
- package/framework/commands/cambiar.md +110 -0
- package/framework/commands/cloud.md +457 -0
- package/framework/commands/code.md +142 -0
- package/framework/commands/debug.md +334 -0
- package/framework/commands/deploy.md +383 -0
- package/framework/commands/deshacer.md +120 -0
- package/framework/commands/estado.md +218 -0
- package/framework/commands/explica.md +227 -0
- package/framework/commands/feature.md +120 -0
- package/framework/commands/git.md +427 -0
- package/framework/commands/historial.md +202 -0
- package/framework/commands/learn.md +408 -0
- package/framework/commands/movil.md +245 -0
- package/framework/commands/nuevo.md +118 -0
- package/framework/commands/plan.md +134 -0
- package/framework/commands/prd.md +113 -0
- package/framework/commands/probar.md +148 -0
- package/framework/commands/revisar.md +208 -0
- package/framework/commands/seeds.md +230 -0
- package/framework/commands/seguridad.md +226 -0
- package/framework/commands/tasks.md +157 -0
- package/framework/skills/architecture/algorithms.md +970 -0
- package/framework/skills/architecture/clean-code.md +1080 -0
- package/framework/skills/architecture/design-patterns.md +1984 -0
- package/framework/skills/architecture/functional-programming.md +972 -0
- package/framework/skills/architecture/solid.md +991 -0
- package/framework/skills/cloud/cloud-aws.md +848 -0
- package/framework/skills/cloud/cloud-azure.md +931 -0
- package/framework/skills/cloud/cloud-gcp.md +848 -0
- package/framework/skills/cloud/message-queues.md +1229 -0
- package/framework/skills/core/accessibility.md +401 -0
- package/framework/skills/core/api.md +474 -0
- package/framework/skills/core/authentication.md +306 -0
- package/framework/skills/core/authorization.md +388 -0
- package/framework/skills/core/background-jobs.md +341 -0
- package/framework/skills/core/caching.md +473 -0
- package/framework/skills/core/code-review.md +341 -0
- package/framework/skills/core/controllers.md +290 -0
- package/framework/skills/core/cua.md +285 -0
- package/framework/skills/core/documentation.md +472 -0
- package/framework/skills/core/file-uploads.md +351 -0
- package/framework/skills/core/hotwire-native.md +296 -0
- package/framework/skills/core/hotwire.md +278 -0
- package/framework/skills/core/i18n.md +334 -0
- package/framework/skills/core/imports-exports.md +750 -0
- package/framework/skills/core/infrastructure.md +337 -0
- package/framework/skills/core/models.md +228 -0
- package/framework/skills/core/notifications.md +672 -0
- package/framework/skills/core/payments.md +581 -0
- package/framework/skills/core/performance.md +361 -0
- package/framework/skills/core/rails-scaffold.md +131 -0
- package/framework/skills/core/search.md +518 -0
- package/framework/skills/core/security.md +565 -0
- package/framework/skills/core/seeds.md +307 -0
- package/framework/skills/core/seo.md +542 -0
- package/framework/skills/core/testing.md +393 -0
- package/framework/skills/core/views.md +260 -0
- package/framework/skills/core/websockets.md +564 -0
- package/framework/skills/data/advanced-sql.md +1204 -0
- package/framework/skills/data/nosql.md +1141 -0
- package/framework/skills/devops/containers-advanced.md +1237 -0
- package/framework/skills/devops/debugging.md +834 -0
- package/framework/skills/devops/git-workflow.md +752 -0
- package/framework/skills/devops/networking.md +932 -0
- package/framework/skills/devops/shell-scripting.md +1132 -0
- package/framework/sub-agents/architecture-patterns-agent.md +1450 -0
- package/framework/sub-agents/cloud-agent.md +677 -0
- package/framework/sub-agents/data.md +504 -0
- package/framework/sub-agents/debugging-agent.md +554 -0
- package/framework/sub-agents/devops.md +483 -0
- package/framework/sub-agents/docs.md +176 -0
- package/framework/sub-agents/frontend-dev.md +349 -0
- package/framework/sub-agents/git-workflow-agent.md +697 -0
- package/framework/sub-agents/integrations.md +630 -0
- package/framework/sub-agents/native-dev.md +434 -0
- package/framework/sub-agents/qa.md +138 -0
- package/framework/sub-agents/rails-dev.md +375 -0
- package/framework/sub-agents/security.md +526 -0
- package/framework/sub-agents/ui.md +437 -0
- package/framework/sub-agents/ux.md +284 -0
- package/framework/templates/api-spec.md +500 -0
- package/framework/templates/component-spec.md +248 -0
- package/framework/templates/feature.json +13 -0
- package/framework/templates/model-spec.md +318 -0
- package/framework/templates/prd-template.md +80 -0
- package/framework/templates/task-plan.md +122 -0
- package/framework/templates/task-user-story.md +52 -0
- package/framework/templates/technical-spec.md +260 -0
- package/framework/templates/user-story.md +95 -0
- package/package.json +42 -0
- package/project-templates/CLAUDE.md +42 -0
- package/project-templates/contexts/architecture.md +25 -0
- package/project-templates/contexts/conventions.md +46 -0
- package/project-templates/contexts/design-system.md +47 -0
- package/project-templates/contexts/requirements.md +38 -0
- package/project-templates/contexts/stack.md +30 -0
- package/project-templates/history/active/models.md +11 -0
- package/project-templates/history/changelog.md +15 -0
- package/project-templates/workspace/.gitkeep +0 -0
- package/src/cli.js +52 -0
- package/src/init.js +104 -0
- package/src/status.js +75 -0
- package/src/update.js +88 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
# Comando: /git
|
|
2
|
+
|
|
3
|
+
Gestión avanzada de Git con buenas prácticas y convenciones.
|
|
4
|
+
|
|
5
|
+
## Uso
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/git [acción]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Acciones disponibles
|
|
12
|
+
|
|
13
|
+
| Acción | Descripción |
|
|
14
|
+
|--------|-------------|
|
|
15
|
+
| `status` | Estado detallado con sugerencias |
|
|
16
|
+
| `branch [nombre]` | Crea rama con convención de nombres |
|
|
17
|
+
| `commit` | Genera mensaje con Conventional Commits |
|
|
18
|
+
| `pr` | Crea Pull Request con template |
|
|
19
|
+
| `merge` | Merge con estrategia recomendada |
|
|
20
|
+
| `sync` | Sincroniza con main/develop |
|
|
21
|
+
|
|
22
|
+
## Flujo de trabajo
|
|
23
|
+
|
|
24
|
+
### `/git status`
|
|
25
|
+
|
|
26
|
+
Muestra estado detallado con análisis y sugerencias.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Comandos ejecutados
|
|
30
|
+
git status
|
|
31
|
+
git log --oneline -5
|
|
32
|
+
git branch -vv
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Salida esperada:**
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
## Estado del Repositorio
|
|
39
|
+
|
|
40
|
+
📍 **Rama actual**: feature/user-auth
|
|
41
|
+
🔗 **Tracking**: origin/feature/user-auth (up to date)
|
|
42
|
+
|
|
43
|
+
### Cambios
|
|
44
|
+
|
|
45
|
+
#### Staged (listos para commit)
|
|
46
|
+
- ✅ `app/models/user.rb` (modified)
|
|
47
|
+
- ✅ `app/controllers/sessions_controller.rb` (new file)
|
|
48
|
+
|
|
49
|
+
#### Not staged (pendientes)
|
|
50
|
+
- 📝 `app/views/sessions/new.html.erb` (modified)
|
|
51
|
+
|
|
52
|
+
#### Untracked (sin seguimiento)
|
|
53
|
+
- ❓ `app/helpers/sessions_helper.rb`
|
|
54
|
+
|
|
55
|
+
### Commits recientes
|
|
56
|
+
1. `a1b2c3d` - feat: add login form
|
|
57
|
+
2. `d4e5f6g` - feat: create User model
|
|
58
|
+
3. `h7i8j9k` - chore: initial setup
|
|
59
|
+
|
|
60
|
+
### Sugerencias
|
|
61
|
+
- 💡 Tienes archivos modificados sin añadir al stage
|
|
62
|
+
- 💡 Hay 1 archivo nuevo sin seguimiento
|
|
63
|
+
- 💡 Considera hacer commit de los cambios staged
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `/git branch [nombre]`
|
|
67
|
+
|
|
68
|
+
Crea una rama siguiendo convenciones.
|
|
69
|
+
|
|
70
|
+
**Convención de nombres:**
|
|
71
|
+
|
|
72
|
+
| Tipo | Prefijo | Ejemplo |
|
|
73
|
+
|------|---------|---------|
|
|
74
|
+
| Feature | `feature/` | `feature/user-authentication` |
|
|
75
|
+
| Bug fix | `fix/` | `fix/login-redirect` |
|
|
76
|
+
| Hotfix | `hotfix/` | `hotfix/security-patch` |
|
|
77
|
+
| Refactor | `refactor/` | `refactor/user-model` |
|
|
78
|
+
| Docs | `docs/` | `docs/api-readme` |
|
|
79
|
+
| Chore | `chore/` | `chore/update-deps` |
|
|
80
|
+
|
|
81
|
+
**Flujo:**
|
|
82
|
+
|
|
83
|
+
1. Preguntar tipo si no está claro
|
|
84
|
+
2. Sanitizar nombre (kebab-case)
|
|
85
|
+
3. Crear rama desde main/develop
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Sincronizar con origin
|
|
89
|
+
git fetch origin
|
|
90
|
+
|
|
91
|
+
# Crear rama desde main
|
|
92
|
+
git checkout -b feature/nombre-feature origin/main
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Salida:**
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
✅ Rama creada: `feature/user-authentication`
|
|
99
|
+
Base: `main` (commit a1b2c3d)
|
|
100
|
+
|
|
101
|
+
📝 Próximos pasos:
|
|
102
|
+
1. Implementa los cambios
|
|
103
|
+
2. Haz commits frecuentes con `/git commit`
|
|
104
|
+
3. Cuando termines, usa `/git pr` para crear el PR
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### `/git commit`
|
|
108
|
+
|
|
109
|
+
Genera mensaje de commit siguiendo Conventional Commits.
|
|
110
|
+
|
|
111
|
+
**Formato:**
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
<tipo>(<scope>): <descripción>
|
|
115
|
+
|
|
116
|
+
[cuerpo opcional]
|
|
117
|
+
|
|
118
|
+
[footer opcional]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Tipos permitidos:**
|
|
122
|
+
|
|
123
|
+
| Tipo | Descripción |
|
|
124
|
+
|------|-------------|
|
|
125
|
+
| `feat` | Nueva funcionalidad |
|
|
126
|
+
| `fix` | Corrección de bug |
|
|
127
|
+
| `docs` | Documentación |
|
|
128
|
+
| `style` | Formato (no afecta código) |
|
|
129
|
+
| `refactor` | Refactoring |
|
|
130
|
+
| `perf` | Mejora de rendimiento |
|
|
131
|
+
| `test` | Añadir/modificar tests |
|
|
132
|
+
| `chore` | Tareas de mantenimiento |
|
|
133
|
+
|
|
134
|
+
**Flujo:**
|
|
135
|
+
|
|
136
|
+
1. Analizar archivos cambiados
|
|
137
|
+
2. Detectar tipo de cambio
|
|
138
|
+
3. Generar mensaje sugerido
|
|
139
|
+
4. Confirmar con usuario
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Ver cambios staged
|
|
143
|
+
git diff --staged --stat
|
|
144
|
+
git diff --staged
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Ejemplo de interacción:**
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
## Análisis de Cambios
|
|
151
|
+
|
|
152
|
+
### Archivos modificados
|
|
153
|
+
- `app/models/user.rb` - Añadido método `full_name`
|
|
154
|
+
- `spec/models/user_spec.rb` - Tests para `full_name`
|
|
155
|
+
|
|
156
|
+
### Mensaje sugerido
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
feat(user): add full_name method
|
|
160
|
+
|
|
161
|
+
- Combines first_name and last_name
|
|
162
|
+
- Returns "Unknown" if both are blank
|
|
163
|
+
- Includes unit tests
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
¿Confirmas este mensaje? (s/n/editar)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Comando final:**
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
git commit -m "feat(user): add full_name method
|
|
173
|
+
|
|
174
|
+
- Combines first_name and last_name
|
|
175
|
+
- Returns \"Unknown\" if both are blank
|
|
176
|
+
- Includes unit tests"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### `/git pr`
|
|
180
|
+
|
|
181
|
+
Crea Pull Request con template estructurado.
|
|
182
|
+
|
|
183
|
+
**Flujo:**
|
|
184
|
+
|
|
185
|
+
1. Verificar que hay commits para PR
|
|
186
|
+
2. Push de la rama si no está en origin
|
|
187
|
+
3. Analizar commits para generar descripción
|
|
188
|
+
4. Crear PR con gh CLI
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# Verificar estado
|
|
192
|
+
git log origin/main..HEAD --oneline
|
|
193
|
+
|
|
194
|
+
# Push si es necesario
|
|
195
|
+
git push -u origin HEAD
|
|
196
|
+
|
|
197
|
+
# Crear PR
|
|
198
|
+
gh pr create --title "..." --body "..."
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Template de PR:**
|
|
202
|
+
|
|
203
|
+
```markdown
|
|
204
|
+
## Descripción
|
|
205
|
+
|
|
206
|
+
[Resumen de los cambios basado en los commits]
|
|
207
|
+
|
|
208
|
+
## Tipo de cambio
|
|
209
|
+
|
|
210
|
+
- [ ] Nueva funcionalidad (feat)
|
|
211
|
+
- [ ] Corrección de bug (fix)
|
|
212
|
+
- [ ] Refactoring
|
|
213
|
+
- [ ] Documentación
|
|
214
|
+
- [ ] Otro: ___
|
|
215
|
+
|
|
216
|
+
## Cambios realizados
|
|
217
|
+
|
|
218
|
+
- [Lista de cambios principales]
|
|
219
|
+
|
|
220
|
+
## Checklist
|
|
221
|
+
|
|
222
|
+
- [ ] Tests añadidos/actualizados
|
|
223
|
+
- [ ] Documentación actualizada
|
|
224
|
+
- [ ] Sin errores de linting
|
|
225
|
+
- [ ] Revisé mi propio código
|
|
226
|
+
|
|
227
|
+
## Screenshots (si aplica)
|
|
228
|
+
|
|
229
|
+
[Adjuntar capturas si hay cambios visuales]
|
|
230
|
+
|
|
231
|
+
## Notas para el reviewer
|
|
232
|
+
|
|
233
|
+
[Cualquier contexto adicional]
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Salida:**
|
|
237
|
+
|
|
238
|
+
```markdown
|
|
239
|
+
✅ Pull Request creado
|
|
240
|
+
|
|
241
|
+
📎 URL: https://github.com/user/repo/pull/123
|
|
242
|
+
|
|
243
|
+
📋 Detalles:
|
|
244
|
+
- Título: feat(auth): implement user login
|
|
245
|
+
- Base: main
|
|
246
|
+
- Commits: 3
|
|
247
|
+
- Archivos: 7
|
|
248
|
+
|
|
249
|
+
🔍 Próximos pasos:
|
|
250
|
+
1. Espera la revisión del código
|
|
251
|
+
2. Resuelve los comentarios si los hay
|
|
252
|
+
3. Cuando esté aprobado, usa `/git merge`
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### `/git merge`
|
|
256
|
+
|
|
257
|
+
Merge con la estrategia recomendada.
|
|
258
|
+
|
|
259
|
+
**Estrategias:**
|
|
260
|
+
|
|
261
|
+
| Situación | Estrategia |
|
|
262
|
+
|-----------|------------|
|
|
263
|
+
| Feature pequeña | Squash merge |
|
|
264
|
+
| Feature grande | Merge commit |
|
|
265
|
+
| Hotfix | Fast-forward o merge |
|
|
266
|
+
|
|
267
|
+
**Flujo:**
|
|
268
|
+
|
|
269
|
+
1. Verificar que PR está aprobado
|
|
270
|
+
2. Verificar que CI pasa
|
|
271
|
+
3. Sugerir estrategia
|
|
272
|
+
4. Ejecutar merge
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# Verificar estado del PR
|
|
276
|
+
gh pr status
|
|
277
|
+
|
|
278
|
+
# Merge con squash (recomendado para features)
|
|
279
|
+
gh pr merge --squash
|
|
280
|
+
|
|
281
|
+
# O merge commit (para features grandes)
|
|
282
|
+
gh pr merge --merge
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**Salida:**
|
|
286
|
+
|
|
287
|
+
```markdown
|
|
288
|
+
## Merge de PR #123
|
|
289
|
+
|
|
290
|
+
### Pre-checks
|
|
291
|
+
- ✅ PR aprobado
|
|
292
|
+
- ✅ CI pasando
|
|
293
|
+
- ✅ Sin conflictos
|
|
294
|
+
|
|
295
|
+
### Estrategia recomendada: Squash merge
|
|
296
|
+
|
|
297
|
+
Esta es una feature pequeña (3 commits).
|
|
298
|
+
Squash merge mantiene el historial limpio.
|
|
299
|
+
|
|
300
|
+
¿Proceder con squash merge? (s/n)
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
✅ PR #123 mergeado exitosamente
|
|
305
|
+
|
|
306
|
+
📋 Resumen:
|
|
307
|
+
- Método: Squash merge
|
|
308
|
+
- Commit: a1b2c3d
|
|
309
|
+
- Rama eliminada: feature/user-auth
|
|
310
|
+
|
|
311
|
+
🔄 Sincroniza tu local:
|
|
312
|
+
git checkout main && git pull
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### `/git sync`
|
|
316
|
+
|
|
317
|
+
Sincroniza la rama actual con main/develop.
|
|
318
|
+
|
|
319
|
+
**Flujo:**
|
|
320
|
+
|
|
321
|
+
1. Detectar rama base (main o develop)
|
|
322
|
+
2. Fetch de cambios remotos
|
|
323
|
+
3. Rebase o merge según preferencia
|
|
324
|
+
4. Resolver conflictos si los hay
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
# Fetch cambios
|
|
328
|
+
git fetch origin
|
|
329
|
+
|
|
330
|
+
# Rebase sobre main (preferido)
|
|
331
|
+
git rebase origin/main
|
|
332
|
+
|
|
333
|
+
# O merge si hay conflictos complejos
|
|
334
|
+
git merge origin/main
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**Salida:**
|
|
338
|
+
|
|
339
|
+
```markdown
|
|
340
|
+
## Sincronización
|
|
341
|
+
|
|
342
|
+
### Estado inicial
|
|
343
|
+
- Rama actual: `feature/user-auth`
|
|
344
|
+
- Rama base: `main`
|
|
345
|
+
- Tu rama está 2 commits detrás de main
|
|
346
|
+
|
|
347
|
+
### Proceso
|
|
348
|
+
|
|
349
|
+
```
|
|
350
|
+
git fetch origin
|
|
351
|
+
git rebase origin/main
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Resultado
|
|
355
|
+
✅ Sincronización exitosa
|
|
356
|
+
|
|
357
|
+
Tu rama ahora incluye los últimos cambios de main.
|
|
358
|
+
No hubo conflictos.
|
|
359
|
+
|
|
360
|
+
### Si hubiera conflictos
|
|
361
|
+
|
|
362
|
+
```markdown
|
|
363
|
+
⚠️ Conflictos detectados en:
|
|
364
|
+
- `app/models/user.rb`
|
|
365
|
+
- `config/routes.rb`
|
|
366
|
+
|
|
367
|
+
Para resolver:
|
|
368
|
+
1. Edita los archivos marcados
|
|
369
|
+
2. `git add <archivo>`
|
|
370
|
+
3. `git rebase --continue`
|
|
371
|
+
|
|
372
|
+
¿Quieres que te ayude a resolver los conflictos?
|
|
373
|
+
```
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Buenas prácticas de Git
|
|
377
|
+
|
|
378
|
+
### Commits
|
|
379
|
+
|
|
380
|
+
- Commits pequeños y frecuentes
|
|
381
|
+
- Un commit = un cambio lógico
|
|
382
|
+
- Mensajes descriptivos en presente
|
|
383
|
+
- Referenciar issues: `fix: resolve login bug (#123)`
|
|
384
|
+
|
|
385
|
+
### Branches
|
|
386
|
+
|
|
387
|
+
- Vida corta (máximo 1-2 semanas)
|
|
388
|
+
- Sincronizar frecuentemente con main
|
|
389
|
+
- Eliminar después de merge
|
|
390
|
+
|
|
391
|
+
### Pull Requests
|
|
392
|
+
|
|
393
|
+
- PRs pequeños y enfocados
|
|
394
|
+
- Descripción clara del "qué" y "por qué"
|
|
395
|
+
- Screenshots para cambios visuales
|
|
396
|
+
- Responder a comentarios rápidamente
|
|
397
|
+
|
|
398
|
+
## Comandos útiles adicionales
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
# Ver historial visual
|
|
402
|
+
git log --oneline --graph --all
|
|
403
|
+
|
|
404
|
+
# Deshacer último commit (mantener cambios)
|
|
405
|
+
git reset --soft HEAD~1
|
|
406
|
+
|
|
407
|
+
# Stash de cambios
|
|
408
|
+
git stash
|
|
409
|
+
git stash pop
|
|
410
|
+
|
|
411
|
+
# Cherry-pick de un commit
|
|
412
|
+
git cherry-pick <commit-hash>
|
|
413
|
+
|
|
414
|
+
# Ver quién cambió cada línea
|
|
415
|
+
git blame <archivo>
|
|
416
|
+
|
|
417
|
+
# Buscar en el historial
|
|
418
|
+
git log -S "texto a buscar"
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
## Notas importantes
|
|
422
|
+
|
|
423
|
+
- NUNCA hacer force push a main/develop
|
|
424
|
+
- NUNCA commitear secretos o credenciales
|
|
425
|
+
- Siempre revisar `git diff` antes de commit
|
|
426
|
+
- Usar `.gitignore` para archivos locales
|
|
427
|
+
- Hacer backup antes de operaciones destructivas
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Comando: /historial
|
|
2
|
+
|
|
3
|
+
Muestra el historial de cambios realizados en el proyecto.
|
|
4
|
+
|
|
5
|
+
## Flujo de trabajo
|
|
6
|
+
|
|
7
|
+
### Paso 1: Leer el historial
|
|
8
|
+
|
|
9
|
+
Leer `.claude/history/changelog.md` y archivos en `.claude/history/active/`
|
|
10
|
+
|
|
11
|
+
### Paso 2: Formatear la salida
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
# Historial de Cambios
|
|
15
|
+
|
|
16
|
+
## Resumen
|
|
17
|
+
- Total de cambios registrados: X
|
|
18
|
+
- Primer cambio: [fecha]
|
|
19
|
+
- Último cambio: [fecha]
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Cambios Recientes
|
|
24
|
+
|
|
25
|
+
### [Fecha más reciente] - [Título]
|
|
26
|
+
**Tipo**: Añadido/Modificado/Eliminado
|
|
27
|
+
**Descripción**: [Descripción del cambio]
|
|
28
|
+
**Archivos afectados**:
|
|
29
|
+
- `path/to/file1.rb`
|
|
30
|
+
- `path/to/file2.erb`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### [Fecha anterior] - [Título]
|
|
35
|
+
**Tipo**: Añadido/Modificado/Eliminado
|
|
36
|
+
**Descripción**: [Descripción del cambio]
|
|
37
|
+
**Archivos afectados**:
|
|
38
|
+
- `path/to/file.rb`
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
[... más cambios ...]
|
|
43
|
+
|
|
44
|
+
## Estadísticas
|
|
45
|
+
|
|
46
|
+
| Mes | Cambios | Tipo más común |
|
|
47
|
+
|-----|---------|----------------|
|
|
48
|
+
| [Mes actual] | X | Añadidos |
|
|
49
|
+
| [Mes anterior] | Y | Modificaciones |
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Paso 3: Mostrar opciones
|
|
53
|
+
|
|
54
|
+
"¿Qué te gustaría hacer?"
|
|
55
|
+
- Ver más detalles de algún cambio
|
|
56
|
+
- Deshacer algún cambio
|
|
57
|
+
- Filtrar por fecha o tipo
|
|
58
|
+
|
|
59
|
+
## Variantes del comando
|
|
60
|
+
|
|
61
|
+
### `/historial [n]`
|
|
62
|
+
Muestra los últimos N cambios.
|
|
63
|
+
```
|
|
64
|
+
/historial 5 → Muestra los últimos 5 cambios
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `/historial [fecha]`
|
|
68
|
+
Muestra cambios de una fecha específica.
|
|
69
|
+
```
|
|
70
|
+
/historial 2024-01-15 → Cambios del 15 de enero
|
|
71
|
+
/historial enero → Cambios de enero
|
|
72
|
+
/historial hoy → Cambios de hoy
|
|
73
|
+
/historial ayer → Cambios de ayer
|
|
74
|
+
/historial semana → Cambios de esta semana
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### `/historial [tipo]`
|
|
78
|
+
Filtra por tipo de cambio.
|
|
79
|
+
```
|
|
80
|
+
/historial añadidos → Solo funcionalidades añadidas
|
|
81
|
+
/historial modificados → Solo modificaciones
|
|
82
|
+
/historial eliminados → Solo eliminaciones
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### `/historial [archivo]`
|
|
86
|
+
Muestra historial de un archivo específico.
|
|
87
|
+
```
|
|
88
|
+
/historial app/models/user.rb → Cambios en User model
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Formato del changelog
|
|
92
|
+
|
|
93
|
+
El archivo `.claude/history/changelog.md` debe seguir este formato:
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
# Changelog
|
|
97
|
+
|
|
98
|
+
## [2024-01-15] - Añadido sistema de comentarios
|
|
99
|
+
|
|
100
|
+
### Tipo
|
|
101
|
+
Añadido
|
|
102
|
+
|
|
103
|
+
### Descripción
|
|
104
|
+
Se implementó un sistema de comentarios para los artículos. Los usuarios
|
|
105
|
+
autenticados pueden dejar comentarios en cualquier artículo publicado.
|
|
106
|
+
|
|
107
|
+
### Cambios
|
|
108
|
+
- Nuevo modelo: `Comment`
|
|
109
|
+
- Nueva migración: `create_comments`
|
|
110
|
+
- Nuevas vistas: `comments/_form`, `comments/_comment`
|
|
111
|
+
- Modificado: `Article` model (has_many :comments)
|
|
112
|
+
- Nuevos tests: `spec/models/comment_spec.rb`
|
|
113
|
+
|
|
114
|
+
### Archivos creados
|
|
115
|
+
- `app/models/comment.rb`
|
|
116
|
+
- `app/controllers/comments_controller.rb`
|
|
117
|
+
- `app/views/comments/_form.html.erb`
|
|
118
|
+
- `app/views/comments/_comment.html.erb`
|
|
119
|
+
- `db/migrate/XXXX_create_comments.rb`
|
|
120
|
+
- `spec/models/comment_spec.rb`
|
|
121
|
+
|
|
122
|
+
### Archivos modificados
|
|
123
|
+
- `app/models/article.rb`
|
|
124
|
+
- `app/views/articles/show.html.erb`
|
|
125
|
+
- `config/routes.rb`
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## [2024-01-14] - Modificado estilo del header
|
|
130
|
+
|
|
131
|
+
### Tipo
|
|
132
|
+
Modificado
|
|
133
|
+
|
|
134
|
+
### Descripción
|
|
135
|
+
Se cambió el color del header de azul a verde según solicitud del usuario.
|
|
136
|
+
|
|
137
|
+
### Cambios
|
|
138
|
+
- Modificado: `app/views/layouts/application.html.erb`
|
|
139
|
+
|
|
140
|
+
### Estado anterior
|
|
141
|
+
```erb
|
|
142
|
+
<header class="bg-blue-600">
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Estado nuevo
|
|
146
|
+
```erb
|
|
147
|
+
<header class="bg-green-600">
|
|
148
|
+
```
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Estructura de archivos de historial
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
.claude/history/
|
|
155
|
+
├── changelog.md # Log principal de cambios
|
|
156
|
+
├── active/ # Estado actual documentado
|
|
157
|
+
│ ├── models.md # Modelos actuales
|
|
158
|
+
│ ├── controllers.md # Controladores actuales
|
|
159
|
+
│ ├── views.md # Vistas actuales
|
|
160
|
+
│ ├── features.md # Funcionalidades actuales
|
|
161
|
+
│ └── architecture.md # Arquitectura actual
|
|
162
|
+
└── legacy/ # Backups de estados anteriores
|
|
163
|
+
├── 20240115_pre_comments/
|
|
164
|
+
│ └── ...
|
|
165
|
+
└── 20240114_pre_header_change/
|
|
166
|
+
└── ...
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Ejemplo de salida
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
📜 Historial del Proyecto
|
|
173
|
+
|
|
174
|
+
Últimos 5 cambios:
|
|
175
|
+
|
|
176
|
+
1. 🟢 Hace 2 horas - Añadido sistema de comentarios
|
|
177
|
+
Archivos: +5 nuevos, 3 modificados
|
|
178
|
+
|
|
179
|
+
2. 🟡 Ayer - Modificado estilo del header
|
|
180
|
+
Archivos: 1 modificado
|
|
181
|
+
|
|
182
|
+
3. 🟢 Hace 3 días - Añadida paginación
|
|
183
|
+
Archivos: +2 nuevos, 4 modificados
|
|
184
|
+
|
|
185
|
+
4. 🔴 Hace 1 semana - Eliminado campo obsoleto
|
|
186
|
+
Archivos: 2 modificados
|
|
187
|
+
|
|
188
|
+
5. 🟢 Hace 1 semana - Añadido perfil de usuario
|
|
189
|
+
Archivos: +4 nuevos, 2 modificados
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
¿Quieres ver más detalles de algún cambio? (escribe el número)
|
|
193
|
+
¿O deshacer alguno? (escribe "deshacer [número]")
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Notas importantes
|
|
197
|
+
|
|
198
|
+
- Mantener el changelog actualizado con cada cambio
|
|
199
|
+
- Incluir suficiente detalle para poder deshacer si es necesario
|
|
200
|
+
- Guardar backups de cambios importantes en `legacy/`
|
|
201
|
+
- Usar fechas ISO (YYYY-MM-DD) para consistencia
|
|
202
|
+
- Incluir el "antes y después" en modificaciones importantes
|