oden-forge 2.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/.claude/CLAUDE.md +75 -0
- package/.claude/commands/oden/architect.md +204 -0
- package/.claude/commands/oden/checklist.md +199 -0
- package/.claude/commands/oden/daily.md +223 -0
- package/.claude/commands/oden/debug.md +203 -0
- package/.claude/commands/oden/epic.md +224 -0
- package/.claude/commands/oden/git.md +259 -0
- package/.claude/commands/oden/help.md +304 -0
- package/.claude/commands/oden/init-agents.md +268 -0
- package/.claude/commands/oden/init-mcp.md +460 -0
- package/.claude/commands/oden/init.md +495 -0
- package/.claude/commands/oden/mcp.md +585 -0
- package/.claude/commands/oden/prd.md +134 -0
- package/.claude/commands/oden/research.md +207 -0
- package/.claude/commands/oden/review.md +146 -0
- package/.claude/commands/oden/spec.md +539 -0
- package/.claude/commands/oden/sync.md +286 -0
- package/.claude/commands/oden/tasks.md +156 -0
- package/.claude/commands/oden/test.md +200 -0
- package/.claude/commands/oden/work.md +791 -0
- package/.claude/epics/.gitkeep +0 -0
- package/.claude/hooks/README.md +130 -0
- package/.claude/hooks/bash-worktree-fix.sh +189 -0
- package/.claude/prds/.gitkeep +0 -0
- package/.claude/rules/agent-coordination.md +224 -0
- package/.claude/rules/branch-operations.md +147 -0
- package/.claude/rules/datetime.md +118 -0
- package/.claude/rules/frontmatter-operations.md +58 -0
- package/.claude/rules/github-operations.md +89 -0
- package/.claude/rules/oden-methodology.md +111 -0
- package/.claude/rules/path-standards.md +155 -0
- package/.claude/rules/standard-patterns.md +174 -0
- package/.claude/rules/strip-frontmatter.md +82 -0
- package/.claude/rules/worktree-operations.md +136 -0
- package/.claude/scripts/oden/blocked.sh +72 -0
- package/.claude/scripts/oden/epic-list.sh +101 -0
- package/.claude/scripts/oden/epic-show.sh +91 -0
- package/.claude/scripts/oden/epic-status.sh +90 -0
- package/.claude/scripts/oden/help.sh +71 -0
- package/.claude/scripts/oden/in-progress.sh +74 -0
- package/.claude/scripts/oden/init.sh +192 -0
- package/.claude/scripts/oden/next.sh +65 -0
- package/.claude/scripts/oden/prd-list.sh +89 -0
- package/.claude/scripts/oden/prd-status.sh +63 -0
- package/.claude/scripts/oden/search.sh +71 -0
- package/.claude/scripts/oden/standup.sh +89 -0
- package/.claude/scripts/oden/status.sh +42 -0
- package/.claude/scripts/oden/validate.sh +101 -0
- package/.claude/settings.json +27 -0
- package/MIGRATION.md +217 -0
- package/README.md +368 -0
- package/bin/install.js +155 -0
- package/bin/migrate.js +191 -0
- package/bin/oden-forge.js +114 -0
- package/bin/post-install.js +47 -0
- package/bin/pre-uninstall.js +108 -0
- package/install.sh +231 -0
- package/package.json +76 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Bash, Read, Write, Edit, LS, Glob, Grep, Task
|
|
3
|
+
description: Debugging - analizar errores y encontrar soluciones
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Oden Forge - Debug
|
|
7
|
+
|
|
8
|
+
Herramientas de debugging para investigar y resolver errores.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/oden:debug [subcommand] [context]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Subcomandos
|
|
17
|
+
|
|
18
|
+
### `/oden:debug error [mensaje/stack]`
|
|
19
|
+
|
|
20
|
+
Analiza un error y sugiere soluciones.
|
|
21
|
+
|
|
22
|
+
**Usa:** `debugger` + `error-detective` agents
|
|
23
|
+
|
|
24
|
+
**Input:**
|
|
25
|
+
- Mensaje de error
|
|
26
|
+
- Stack trace
|
|
27
|
+
- Contexto del código
|
|
28
|
+
|
|
29
|
+
**Output:**
|
|
30
|
+
```
|
|
31
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
32
|
+
║ ERROR ANALYSIS ║
|
|
33
|
+
╠══════════════════════════════════════════════════════════════╣
|
|
34
|
+
║ ║
|
|
35
|
+
║ ERROR: TypeError: Cannot read property 'id' of undefined ║
|
|
36
|
+
║ ║
|
|
37
|
+
║ UBICACIÓN: src/services/orders.ts:145 ║
|
|
38
|
+
║ ║
|
|
39
|
+
║ CAUSA PROBABLE: ║
|
|
40
|
+
║ El objeto `order` es undefined cuando se intenta acceder ║
|
|
41
|
+
║ a `order.id`. Esto ocurre cuando: ║
|
|
42
|
+
║ 1. La query no encontró el order ║
|
|
43
|
+
║ 2. El ID pasado es inválido ║
|
|
44
|
+
║ 3. Hay un problema de timing/async ║
|
|
45
|
+
║ ║
|
|
46
|
+
║ SOLUCIÓN SUGERIDA: ║
|
|
47
|
+
║ ```typescript ║
|
|
48
|
+
║ const order = await getOrder(orderId); ║
|
|
49
|
+
║ if (!order) { ║
|
|
50
|
+
║ throw new NotFoundError(`Order ${orderId} not found`); ║
|
|
51
|
+
║ } ║
|
|
52
|
+
║ // Ahora es seguro acceder a order.id ║
|
|
53
|
+
║ ``` ║
|
|
54
|
+
║ ║
|
|
55
|
+
║ ARCHIVOS A REVISAR: ║
|
|
56
|
+
║ - src/services/orders.ts:145 ║
|
|
57
|
+
║ - src/repositories/orderRepository.ts ║
|
|
58
|
+
║ ║
|
|
59
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### `/oden:debug logs [file]`
|
|
63
|
+
|
|
64
|
+
Analiza archivos de log para encontrar patrones de error.
|
|
65
|
+
|
|
66
|
+
**Usa:** `error-detective` + `file-analyzer` agents
|
|
67
|
+
|
|
68
|
+
**Analiza:**
|
|
69
|
+
- Patrones de errores repetidos
|
|
70
|
+
- Correlación temporal
|
|
71
|
+
- Secuencia de eventos antes del error
|
|
72
|
+
|
|
73
|
+
### `/oden:debug trace [function]`
|
|
74
|
+
|
|
75
|
+
Traza el flujo de una función a través del código.
|
|
76
|
+
|
|
77
|
+
**Usa:** `code-analyzer` agent
|
|
78
|
+
|
|
79
|
+
**Output:**
|
|
80
|
+
```
|
|
81
|
+
TRACE: processOrder()
|
|
82
|
+
|
|
83
|
+
1. src/api/orders.ts:45 → processOrder(orderId)
|
|
84
|
+
↓
|
|
85
|
+
2. src/services/orderService.ts:78 → validateOrder(order)
|
|
86
|
+
↓
|
|
87
|
+
3. src/validators/orderValidator.ts:23 → checkItems(items)
|
|
88
|
+
↓
|
|
89
|
+
4. src/validators/orderValidator.ts:45 → validateItem(item) ❌ ERROR HERE
|
|
90
|
+
↓
|
|
91
|
+
Error: "Invalid item quantity"
|
|
92
|
+
|
|
93
|
+
VARIABLES EN SCOPE:
|
|
94
|
+
- orderId: "abc-123"
|
|
95
|
+
- order: { id: "abc-123", items: [...] }
|
|
96
|
+
- item: { id: "xyz", quantity: -1 } ← PROBLEMA: quantity negativo
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### `/oden:debug perf [area]`
|
|
100
|
+
|
|
101
|
+
Analiza problemas de performance.
|
|
102
|
+
|
|
103
|
+
**Usa:** `performance-engineer` agent
|
|
104
|
+
|
|
105
|
+
**Areas:**
|
|
106
|
+
- `api` - Latencia de endpoints
|
|
107
|
+
- `db` - Queries lentos
|
|
108
|
+
- `render` - Performance de UI
|
|
109
|
+
- `bundle` - Tamaño de bundle
|
|
110
|
+
|
|
111
|
+
### `/oden:debug compare [branch]`
|
|
112
|
+
|
|
113
|
+
Compara comportamiento entre branches para encontrar regresión.
|
|
114
|
+
|
|
115
|
+
**Usa:** `code-analyzer` agent
|
|
116
|
+
|
|
117
|
+
**Output:**
|
|
118
|
+
```
|
|
119
|
+
COMPARACIÓN: main vs feature/payments
|
|
120
|
+
|
|
121
|
+
ARCHIVOS MODIFICADOS:
|
|
122
|
+
- src/services/paymentService.ts (+45 -12)
|
|
123
|
+
- src/utils/calculations.ts (+8 -3)
|
|
124
|
+
|
|
125
|
+
CAMBIOS DE COMPORTAMIENTO:
|
|
126
|
+
1. paymentService.calculateTotal()
|
|
127
|
+
- ANTES: Retornaba número
|
|
128
|
+
- AHORA: Retorna string (posible bug)
|
|
129
|
+
|
|
130
|
+
2. calculations.roundAmount()
|
|
131
|
+
- ANTES: 2 decimales
|
|
132
|
+
- AHORA: 4 decimales (intencional?)
|
|
133
|
+
|
|
134
|
+
TESTS AFECTADOS:
|
|
135
|
+
- payment.test.ts:67 - Ahora falla
|
|
136
|
+
- calculations.test.ts:34 - Ahora falla
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Proceso de Debugging
|
|
142
|
+
|
|
143
|
+
### 1. Reproducir
|
|
144
|
+
```bash
|
|
145
|
+
/oden:debug error "TypeError: Cannot read property..."
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 2. Localizar
|
|
149
|
+
```bash
|
|
150
|
+
/oden:debug trace functionName
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### 3. Entender
|
|
154
|
+
```bash
|
|
155
|
+
/oden:debug logs app.log
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 4. Comparar (si regresión)
|
|
159
|
+
```bash
|
|
160
|
+
/oden:debug compare main
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 5. Resolver
|
|
164
|
+
El agente sugiere el fix específico.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Tips de Debugging
|
|
169
|
+
|
|
170
|
+
### Para errores de runtime:
|
|
171
|
+
1. Captura el stack trace completo
|
|
172
|
+
2. Identifica la línea exacta
|
|
173
|
+
3. Revisa el valor de variables en scope
|
|
174
|
+
|
|
175
|
+
### Para errores intermitentes:
|
|
176
|
+
1. Busca patrones en logs
|
|
177
|
+
2. Considera race conditions
|
|
178
|
+
3. Revisa timing de async operations
|
|
179
|
+
|
|
180
|
+
### Para regresiones:
|
|
181
|
+
1. Identifica el commit que introdujo el bug
|
|
182
|
+
2. Compara comportamiento antes/después
|
|
183
|
+
3. Revisa tests que deberían haber fallado
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Integración con Daily Log
|
|
188
|
+
|
|
189
|
+
Los debugging sessions se documentan en `/oden:daily`:
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
## 🐛 Issues Encontrados
|
|
193
|
+
|
|
194
|
+
### Resueltos
|
|
195
|
+
| Issue | Causa | Solución |
|
|
196
|
+
|-------|-------|----------|
|
|
197
|
+
| TypeError en orders.ts:145 | Order undefined | Agregué validación null check |
|
|
198
|
+
|
|
199
|
+
### Pendientes
|
|
200
|
+
| Issue | Severidad | Investigación |
|
|
201
|
+
|-------|-----------|---------------|
|
|
202
|
+
| Timeout en pagos | Alta | Posible N+1 query |
|
|
203
|
+
```
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Bash, Read, Write, LS, Task
|
|
3
|
+
description: Convertir PRD a Epic tecnico con work streams, criterios de aceptacion y plan de implementacion
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Epic - Convert PRD to Technical Epic
|
|
7
|
+
|
|
8
|
+
Convierte un PRD en un Epic tecnico con enfoque de implementacion, work streams paralelos y criterios de aceptacion.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
```
|
|
12
|
+
/oden:epic <feature_name>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Preflight
|
|
16
|
+
|
|
17
|
+
Silently validate:
|
|
18
|
+
|
|
19
|
+
1. **Feature name**: If not provided, show: "Usage: /oden:epic <feature_name>"
|
|
20
|
+
|
|
21
|
+
2. **PRD exists**: Check `.claude/prds/$ARGUMENTS.md`
|
|
22
|
+
- If not found: "PRD not found. Create it first: /oden:prd $ARGUMENTS"
|
|
23
|
+
|
|
24
|
+
3. **PRD frontmatter**: Verify has name, description, status, created
|
|
25
|
+
- If invalid: "Invalid PRD. Check: .claude/prds/$ARGUMENTS.md"
|
|
26
|
+
|
|
27
|
+
4. **Existing epic**: Check `.claude/epics/$ARGUMENTS/epic.md`
|
|
28
|
+
- If exists, ask to overwrite
|
|
29
|
+
|
|
30
|
+
5. **Directory**: Create `.claude/epics/$ARGUMENTS/` if needed
|
|
31
|
+
|
|
32
|
+
## Context Gathering
|
|
33
|
+
|
|
34
|
+
Silently scan for context to produce a better epic:
|
|
35
|
+
|
|
36
|
+
1. **PRD** (required): Read `.claude/prds/$ARGUMENTS.md`
|
|
37
|
+
- Extract requirements, user stories, constraints, success criteria
|
|
38
|
+
|
|
39
|
+
2. **Technical context** (if available):
|
|
40
|
+
- Read `docs/reference/technical-decisions.md` for stack, DB schema, architecture
|
|
41
|
+
- Read module specs in `docs/reference/modules/` for related specs
|
|
42
|
+
|
|
43
|
+
3. **Other epics**: Scan `.claude/epics/` for related work
|
|
44
|
+
- Identify dependencies or shared infrastructure
|
|
45
|
+
|
|
46
|
+
4. **Codebase structure**: Quick scan of `src/` or main source dirs
|
|
47
|
+
- Understand existing patterns, shared modules, naming conventions
|
|
48
|
+
- Identify code to reuse instead of building from scratch
|
|
49
|
+
|
|
50
|
+
## Instructions
|
|
51
|
+
|
|
52
|
+
You are a technical lead converting the PRD into an implementation epic for: **$ARGUMENTS**
|
|
53
|
+
|
|
54
|
+
### Analysis Steps
|
|
55
|
+
|
|
56
|
+
1. **Map requirements to technical components**
|
|
57
|
+
- Each functional requirement becomes one or more technical tasks
|
|
58
|
+
- Group by layer: data, backend/API, frontend/UI, infrastructure
|
|
59
|
+
|
|
60
|
+
2. **Identify architecture decisions**
|
|
61
|
+
- New patterns or technologies needed
|
|
62
|
+
- Integration points with existing system
|
|
63
|
+
- Data model changes (new tables, columns, relations)
|
|
64
|
+
|
|
65
|
+
3. **Define work streams**
|
|
66
|
+
- Independent streams that can run in parallel
|
|
67
|
+
- Streams that must be sequential
|
|
68
|
+
- Shared dependencies between streams
|
|
69
|
+
|
|
70
|
+
4. **Estimate complexity**
|
|
71
|
+
- Per task: XS (< 2h), S (2-4h), M (4-8h), L (1-2d), XL (2-3d)
|
|
72
|
+
- Total timeline considering parallelism
|
|
73
|
+
|
|
74
|
+
### Epic Creation
|
|
75
|
+
|
|
76
|
+
#### File: `.claude/epics/$ARGUMENTS/epic.md`
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
---
|
|
80
|
+
name: $ARGUMENTS
|
|
81
|
+
status: backlog
|
|
82
|
+
created: [Real datetime from: date -u +"%Y-%m-%dT%H:%M:%SZ"]
|
|
83
|
+
updated: [Same datetime]
|
|
84
|
+
progress: 0%
|
|
85
|
+
prd: .claude/prds/$ARGUMENTS.md
|
|
86
|
+
github:
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
# Epic: [Descriptive Title]
|
|
90
|
+
|
|
91
|
+
## Overview
|
|
92
|
+
[2-3 sentences: what we're building, why, and the technical approach]
|
|
93
|
+
|
|
94
|
+
## Architecture Decisions
|
|
95
|
+
|
|
96
|
+
### Data Model
|
|
97
|
+
[New or modified tables/collections, key relationships, indexes]
|
|
98
|
+
|
|
99
|
+
### API Design
|
|
100
|
+
[New endpoints, request/response contracts, auth requirements]
|
|
101
|
+
|
|
102
|
+
### Frontend
|
|
103
|
+
[New screens/components, state management, user flows]
|
|
104
|
+
|
|
105
|
+
### Infrastructure
|
|
106
|
+
[Deployment, caching, background jobs, external services]
|
|
107
|
+
|
|
108
|
+
## Work Streams
|
|
109
|
+
|
|
110
|
+
### Stream A: [Name] (e.g., Data Layer)
|
|
111
|
+
**Parallel:** Yes
|
|
112
|
+
**Files:** [file patterns this stream touches]
|
|
113
|
+
|
|
114
|
+
Tasks:
|
|
115
|
+
1. [Task description] - [Size: XS/S/M/L/XL]
|
|
116
|
+
2. [Task description] - [Size]
|
|
117
|
+
|
|
118
|
+
### Stream B: [Name] (e.g., API Layer)
|
|
119
|
+
**Parallel:** After Stream A tasks 1-2
|
|
120
|
+
**Files:** [file patterns]
|
|
121
|
+
|
|
122
|
+
Tasks:
|
|
123
|
+
1. [Task description] - [Size]
|
|
124
|
+
2. [Task description] - [Size]
|
|
125
|
+
|
|
126
|
+
### Stream C: [Name] (e.g., UI Layer)
|
|
127
|
+
**Parallel:** After Stream B
|
|
128
|
+
**Files:** [file patterns]
|
|
129
|
+
|
|
130
|
+
Tasks:
|
|
131
|
+
1. [Task description] - [Size]
|
|
132
|
+
2. [Task description] - [Size]
|
|
133
|
+
|
|
134
|
+
## Task Summary
|
|
135
|
+
|
|
136
|
+
| # | Task | Stream | Size | Depends On | Parallel |
|
|
137
|
+
|---|------|--------|------|------------|----------|
|
|
138
|
+
| 1 | [desc] | A | M | - | Yes |
|
|
139
|
+
| 2 | [desc] | A | S | 1 | Yes |
|
|
140
|
+
| 3 | [desc] | B | L | 1 | Yes |
|
|
141
|
+
| ... | ... | ... | ... | ... | ... |
|
|
142
|
+
|
|
143
|
+
**Total tasks:** [count]
|
|
144
|
+
**Estimated effort:** [sum]
|
|
145
|
+
**Critical path:** [longest sequential chain]
|
|
146
|
+
|
|
147
|
+
## Acceptance Criteria (Technical)
|
|
148
|
+
|
|
149
|
+
- [ ] All data model changes migrated and tested
|
|
150
|
+
- [ ] API endpoints return correct responses with validation
|
|
151
|
+
- [ ] UI renders correctly on target devices/browsers
|
|
152
|
+
- [ ] Error states handled gracefully
|
|
153
|
+
- [ ] Performance within targets ([specific metrics])
|
|
154
|
+
- [ ] Tests passing ([coverage target]%)
|
|
155
|
+
|
|
156
|
+
## Risks & Mitigations
|
|
157
|
+
|
|
158
|
+
| Risk | Impact | Mitigation |
|
|
159
|
+
|------|--------|------------|
|
|
160
|
+
| [risk] | [H/M/L] | [mitigation] |
|
|
161
|
+
|
|
162
|
+
## Dependencies
|
|
163
|
+
|
|
164
|
+
- **Internal:** [other epics, shared modules]
|
|
165
|
+
- **External:** [third-party APIs, services, credentials]
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Guidelines
|
|
169
|
+
|
|
170
|
+
### Task Count
|
|
171
|
+
- Aim for **5-10 tasks** per epic
|
|
172
|
+
- If more than 10 tasks emerge, split into sub-epics
|
|
173
|
+
- Each task should be completable in 1-3 days
|
|
174
|
+
|
|
175
|
+
### Work Streams
|
|
176
|
+
- Group tasks by the files/layers they touch
|
|
177
|
+
- Streams that touch different files can run in parallel
|
|
178
|
+
- Explicitly mark dependencies between streams
|
|
179
|
+
- Name streams after the layer or concern (Data, API, UI, Tests)
|
|
180
|
+
|
|
181
|
+
### Sizing
|
|
182
|
+
- Be realistic. Include time for tests and edge cases
|
|
183
|
+
- XS: Trivial change, config, rename (< 2h)
|
|
184
|
+
- S: Single file change, simple logic (2-4h)
|
|
185
|
+
- M: Multiple files, moderate logic, some edge cases (4-8h)
|
|
186
|
+
- L: Cross-cutting change, complex logic, new patterns (1-2d)
|
|
187
|
+
- XL: Architecture change, new subsystem, significant scope (2-3d)
|
|
188
|
+
|
|
189
|
+
### Leveraging Existing Code
|
|
190
|
+
- Before proposing new abstractions, check if similar patterns exist
|
|
191
|
+
- Reference existing utilities, helpers, or shared modules
|
|
192
|
+
- Prefer extending existing code over creating new silos
|
|
193
|
+
|
|
194
|
+
## Quality Checks
|
|
195
|
+
|
|
196
|
+
Before saving, verify:
|
|
197
|
+
- [ ] Every PRD requirement maps to at least one task
|
|
198
|
+
- [ ] No orphan tasks (every task traces back to a requirement)
|
|
199
|
+
- [ ] Dependencies are logical (no circular references)
|
|
200
|
+
- [ ] Parallel streams don't touch the same files
|
|
201
|
+
- [ ] Sizes sum to a reasonable total
|
|
202
|
+
- [ ] Acceptance criteria are testable
|
|
203
|
+
|
|
204
|
+
## Output
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
Epic created: .claude/epics/$ARGUMENTS/epic.md
|
|
208
|
+
|
|
209
|
+
Summary:
|
|
210
|
+
- [total] tasks across [stream_count] work streams
|
|
211
|
+
- Estimated effort: [total]
|
|
212
|
+
- Critical path: [length]
|
|
213
|
+
- [parallel_count] tasks can run in parallel
|
|
214
|
+
|
|
215
|
+
Next: /oden:tasks $ARGUMENTS
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Important
|
|
219
|
+
|
|
220
|
+
- Get REAL datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"`
|
|
221
|
+
- Never use placeholder dates
|
|
222
|
+
- Keep task count to 10 or fewer
|
|
223
|
+
- Focus on practical implementation, not theory
|
|
224
|
+
- Reference existing code patterns when available
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Bash, Read, Write, LS, Glob, Grep, Task
|
|
3
|
+
description: Git workflow - branches, PRs, y gestión de código
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Oden Forge - Git Workflow
|
|
7
|
+
|
|
8
|
+
Comandos para gestión de Git siguiendo mejores prácticas.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/oden:git [subcommand]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Subcomandos
|
|
17
|
+
|
|
18
|
+
### `/oden:git start [feature-name]`
|
|
19
|
+
|
|
20
|
+
Inicia trabajo en una nueva feature.
|
|
21
|
+
|
|
22
|
+
**Usa:** `git-flow-manager` agent
|
|
23
|
+
|
|
24
|
+
**Proceso:**
|
|
25
|
+
1. Asegura que main está actualizado
|
|
26
|
+
2. Crea branch `feature/{name}`
|
|
27
|
+
3. Crea carpeta en `docs/development/current/{name}/`
|
|
28
|
+
4. Inicializa README.md del feature
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Equivalente a:
|
|
32
|
+
git checkout main
|
|
33
|
+
git pull origin main
|
|
34
|
+
git checkout -b feature/{name}
|
|
35
|
+
mkdir -p docs/development/current/{name}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### `/oden:git sync`
|
|
39
|
+
|
|
40
|
+
Sincroniza branch actual con main.
|
|
41
|
+
|
|
42
|
+
**Proceso:**
|
|
43
|
+
1. Fetch de origin
|
|
44
|
+
2. Rebase sobre main
|
|
45
|
+
3. Resuelve conflictos si los hay
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
git fetch origin
|
|
49
|
+
git rebase origin/main
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### `/oden:git pr`
|
|
53
|
+
|
|
54
|
+
Prepara y crea Pull Request.
|
|
55
|
+
|
|
56
|
+
**Usa:** `git-flow-manager` + `code-reviewer` agents
|
|
57
|
+
|
|
58
|
+
**Proceso:**
|
|
59
|
+
1. Ejecuta `/oden:review` automáticamente
|
|
60
|
+
2. Genera descripción de PR basada en:
|
|
61
|
+
- Commits del branch
|
|
62
|
+
- DAY_X_COMPLETED.md files
|
|
63
|
+
- Spec del módulo
|
|
64
|
+
3. Crea PR en GitHub
|
|
65
|
+
|
|
66
|
+
**Template de PR:**
|
|
67
|
+
```markdown
|
|
68
|
+
## Summary
|
|
69
|
+
{Resumen de cambios basado en commits}
|
|
70
|
+
|
|
71
|
+
## Changes
|
|
72
|
+
- {Lista de cambios principales}
|
|
73
|
+
|
|
74
|
+
## Spec Reference
|
|
75
|
+
- `docs/reference/modules/{module}-spec.md`
|
|
76
|
+
|
|
77
|
+
## Testing
|
|
78
|
+
- [ ] Unit tests added/updated
|
|
79
|
+
- [ ] Integration tests passing
|
|
80
|
+
- [ ] Manual testing completed
|
|
81
|
+
|
|
82
|
+
## Screenshots
|
|
83
|
+
{Si hay cambios de UI}
|
|
84
|
+
|
|
85
|
+
## Checklist
|
|
86
|
+
- [ ] Code follows project conventions
|
|
87
|
+
- [ ] Self-review completed
|
|
88
|
+
- [ ] Documentation updated
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### `/oden:git status`
|
|
92
|
+
|
|
93
|
+
Muestra estado detallado del proyecto.
|
|
94
|
+
|
|
95
|
+
**Output:**
|
|
96
|
+
```
|
|
97
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
98
|
+
║ GIT STATUS ║
|
|
99
|
+
╠══════════════════════════════════════════════════════════════╣
|
|
100
|
+
║ ║
|
|
101
|
+
║ BRANCH: feature/payments ║
|
|
102
|
+
║ BASE: main (3 commits behind) ║
|
|
103
|
+
║ ║
|
|
104
|
+
║ COMMITS EN BRANCH: 8 ║
|
|
105
|
+
║ ├─ abc1234 feat: Add payment form ║
|
|
106
|
+
║ ├─ def5678 feat: Integrate Stripe ║
|
|
107
|
+
║ ├─ ghi9012 fix: Handle declined cards ║
|
|
108
|
+
║ └─ ... (5 more) ║
|
|
109
|
+
║ ║
|
|
110
|
+
║ ARCHIVOS MODIFICADOS: 12 ║
|
|
111
|
+
║ ├─ src/components/PaymentForm.tsx ║
|
|
112
|
+
║ ├─ src/services/stripeService.ts ║
|
|
113
|
+
║ └─ ... (10 more) ║
|
|
114
|
+
║ ║
|
|
115
|
+
║ ESTADO: ║
|
|
116
|
+
║ ├─ Staged: 2 files ║
|
|
117
|
+
║ ├─ Modified: 3 files ║
|
|
118
|
+
║ └─ Untracked: 1 file ║
|
|
119
|
+
║ ║
|
|
120
|
+
║ DAILY LOGS: 3 (DAY_1 → DAY_3) ║
|
|
121
|
+
║ ║
|
|
122
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### `/oden:git log`
|
|
126
|
+
|
|
127
|
+
Muestra historial con contexto de proyecto.
|
|
128
|
+
|
|
129
|
+
**Output:**
|
|
130
|
+
```
|
|
131
|
+
HISTORIAL DE FEATURE: payments
|
|
132
|
+
|
|
133
|
+
Semana 1:
|
|
134
|
+
├─ DAY_1 (2024-01-15)
|
|
135
|
+
│ ├─ abc1234 feat: Add payment form
|
|
136
|
+
│ └─ def5678 feat: Integrate Stripe
|
|
137
|
+
│
|
|
138
|
+
├─ DAY_2 (2024-01-16)
|
|
139
|
+
│ ├─ ghi9012 fix: Handle declined cards
|
|
140
|
+
│ └─ jkl3456 test: Add payment tests
|
|
141
|
+
│
|
|
142
|
+
└─ DAY_3 (2024-01-17)
|
|
143
|
+
└─ mno7890 refactor: Extract payment utils
|
|
144
|
+
|
|
145
|
+
Total: 5 commits, 12 files changed
|
|
146
|
+
Progress: 60% of spec completed
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### `/oden:git finish`
|
|
150
|
+
|
|
151
|
+
Finaliza feature y limpia.
|
|
152
|
+
|
|
153
|
+
**Proceso:**
|
|
154
|
+
1. Verifica PR merged
|
|
155
|
+
2. Mueve docs a `completed/`
|
|
156
|
+
3. Elimina branch local
|
|
157
|
+
4. Actualiza main
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
git checkout main
|
|
161
|
+
git pull origin main
|
|
162
|
+
git branch -d feature/{name}
|
|
163
|
+
mv docs/development/current/{name} docs/development/completed/
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Convenciones de Commits
|
|
169
|
+
|
|
170
|
+
### Formato
|
|
171
|
+
```
|
|
172
|
+
{type}: {description}
|
|
173
|
+
|
|
174
|
+
{body opcional}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Types
|
|
178
|
+
- `feat`: Nueva funcionalidad
|
|
179
|
+
- `fix`: Bug fix
|
|
180
|
+
- `refactor`: Refactoring sin cambio de funcionalidad
|
|
181
|
+
- `test`: Tests
|
|
182
|
+
- `docs`: Documentación
|
|
183
|
+
- `style`: Formato, sin cambio de código
|
|
184
|
+
- `chore`: Tareas de mantenimiento
|
|
185
|
+
|
|
186
|
+
### Ejemplos
|
|
187
|
+
```
|
|
188
|
+
feat: Add payment processing with Stripe
|
|
189
|
+
fix: Handle edge case when order is empty
|
|
190
|
+
refactor: Extract validation logic to separate module
|
|
191
|
+
test: Add unit tests for payment service
|
|
192
|
+
docs: Update API documentation for payments
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Branch Naming
|
|
198
|
+
|
|
199
|
+
### Features
|
|
200
|
+
```
|
|
201
|
+
feature/{module}-{description}
|
|
202
|
+
```
|
|
203
|
+
Ejemplos:
|
|
204
|
+
- `feature/auth-social-login`
|
|
205
|
+
- `feature/orders-bulk-actions`
|
|
206
|
+
- `feature/payments-stripe`
|
|
207
|
+
|
|
208
|
+
### Fixes
|
|
209
|
+
```
|
|
210
|
+
fix/{issue-number}-{description}
|
|
211
|
+
```
|
|
212
|
+
Ejemplos:
|
|
213
|
+
- `fix/123-login-redirect`
|
|
214
|
+
- `fix/456-payment-timeout`
|
|
215
|
+
|
|
216
|
+
### Hotfixes
|
|
217
|
+
```
|
|
218
|
+
hotfix/{description}
|
|
219
|
+
```
|
|
220
|
+
Para fixes urgentes en producción.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Integración con Daily Log
|
|
225
|
+
|
|
226
|
+
Los commits del día se documentan en `/oden:daily`:
|
|
227
|
+
|
|
228
|
+
```markdown
|
|
229
|
+
### Commits del Día
|
|
230
|
+
```
|
|
231
|
+
abc1234 feat: Add payment form
|
|
232
|
+
def5678 feat: Integrate Stripe
|
|
233
|
+
ghi9012 fix: Handle declined cards
|
|
234
|
+
```
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Flujo Típico
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# 1. Iniciar feature
|
|
243
|
+
/oden:git start payments
|
|
244
|
+
|
|
245
|
+
# 2. Durante desarrollo (cada día)
|
|
246
|
+
git add .
|
|
247
|
+
git commit -m "feat: Add payment form"
|
|
248
|
+
/oden:daily
|
|
249
|
+
|
|
250
|
+
# 3. Sincronizar periódicamente
|
|
251
|
+
/oden:git sync
|
|
252
|
+
|
|
253
|
+
# 4. Antes de PR
|
|
254
|
+
/oden:review
|
|
255
|
+
/oden:git pr
|
|
256
|
+
|
|
257
|
+
# 5. Después de merge
|
|
258
|
+
/oden:git finish
|
|
259
|
+
```
|