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,791 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Bash, Read, Write, Edit, LS, Glob, Grep, Task
|
|
3
|
+
description: Orquestador inteligente de trabajo - desarrollo con agentes paralelos y Teams
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Oden Forge - Work Orchestrator
|
|
7
|
+
|
|
8
|
+
Comando principal para ejecutar trabajo de desarrollo con orquestacion inteligente de agentes.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/oden:work [epic/issue] [--mode auto|config|smart]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Ejemplos:**
|
|
17
|
+
```
|
|
18
|
+
/oden:work # Lista epics/issues disponibles
|
|
19
|
+
/oden:work epic/payments # Trabaja en epic "payments"
|
|
20
|
+
/oden:work #42 # Trabaja en issue #42
|
|
21
|
+
/oden:work epic/auth --mode auto # Modo automatico
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Paso 0: Sin Argumentos - Listar Trabajo Disponible
|
|
27
|
+
|
|
28
|
+
Si `$ARGUMENTS` esta vacio, mostrar trabajo disponible:
|
|
29
|
+
|
|
30
|
+
### Buscar Epics Activos
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Buscar epics con estado in-progress o backlog
|
|
34
|
+
for epic_dir in .claude/epics/*/; do
|
|
35
|
+
[ -d "$epic_dir" ] || continue
|
|
36
|
+
epic_file="$epic_dir/epic.md"
|
|
37
|
+
[ -f "$epic_file" ] || continue
|
|
38
|
+
|
|
39
|
+
epic_name=$(basename "$epic_dir")
|
|
40
|
+
status=$(grep '^status:' "$epic_file" | head -1 | cut -d: -f2 | tr -d ' ')
|
|
41
|
+
progress=$(grep '^progress:' "$epic_file" | head -1 | cut -d: -f2 | tr -d ' ')
|
|
42
|
+
|
|
43
|
+
echo "$epic_name | $status | $progress"
|
|
44
|
+
done
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Buscar Issues Abiertos en GitHub
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
gh issue list --state open --limit 20 --json number,title,labels,assignees
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Output de Listado
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Trabajo disponible:
|
|
57
|
+
|
|
58
|
+
EPICS:
|
|
59
|
+
1. payments (in-progress) - 40% completado
|
|
60
|
+
Issues: 3 open, 2 closed
|
|
61
|
+
2. auth (backlog) - 0%
|
|
62
|
+
Issues: 5 open
|
|
63
|
+
|
|
64
|
+
ISSUES SIN EPIC:
|
|
65
|
+
#42 - Fix login redirect (bug)
|
|
66
|
+
#45 - Add dark mode support (enhancement)
|
|
67
|
+
|
|
68
|
+
Usa: /oden:work epic/payments
|
|
69
|
+
/oden:work #42
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Paso 1: Identificar Target
|
|
75
|
+
|
|
76
|
+
### Si es Epic
|
|
77
|
+
```
|
|
78
|
+
/oden:work epic/{name}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
1. Verificar que existe `.claude/epics/{name}/epic.md`
|
|
82
|
+
2. Leer todos los task files del epic
|
|
83
|
+
3. Identificar issues open/ready
|
|
84
|
+
|
|
85
|
+
### Si es Issue
|
|
86
|
+
```
|
|
87
|
+
/oden:work #{number}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
1. Obtener detalles: `gh issue view {number} --json state,title,body,labels`
|
|
91
|
+
2. Buscar task file local: `.claude/epics/*/{number}.md`
|
|
92
|
+
3. Si no existe task file, crear contexto desde GitHub issue body
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Paso 2: Analizar Complejidad
|
|
97
|
+
|
|
98
|
+
Analizar los archivos involucrados para determinar la estrategia:
|
|
99
|
+
|
|
100
|
+
### Para Epic
|
|
101
|
+
```bash
|
|
102
|
+
# Contar issues open
|
|
103
|
+
open_issues=$(ls .claude/epics/{name}/[0-9]*.md 2>/dev/null | wc -l)
|
|
104
|
+
|
|
105
|
+
# Revisar cada issue para estimar archivos
|
|
106
|
+
total_files=0
|
|
107
|
+
for task_file in .claude/epics/{name}/[0-9]*.md; do
|
|
108
|
+
[ -f "$task_file" ] || continue
|
|
109
|
+
# Contar archivos mencionados en el body
|
|
110
|
+
file_count=$(grep -cE '\.(ts|tsx|js|jsx|py|go|rs|rb|swift|sql|css|html)' "$task_file" 2>/dev/null || echo 0)
|
|
111
|
+
total_files=$((total_files + file_count))
|
|
112
|
+
done
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Para Issue Individual
|
|
116
|
+
```bash
|
|
117
|
+
# Analizar el body del issue para archivos afectados
|
|
118
|
+
gh issue view {number} --json body -q .body | grep -cE '\.(ts|tsx|js|jsx|py|go|rs|rb|swift|sql|css|html)'
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Reglas de Complejidad
|
|
122
|
+
|
|
123
|
+
| Archivos | Complejidad | Estrategia |
|
|
124
|
+
|----------|-------------|------------|
|
|
125
|
+
| 1-2 | Baja | 1 agente individual |
|
|
126
|
+
| 3-5 | Media | 2 agentes paralelos |
|
|
127
|
+
| 6+ | Alta | Teams coordinados |
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Paso 3: Seleccionar Modo de Trabajo
|
|
132
|
+
|
|
133
|
+
Preguntar al usuario (a menos que se pase `--mode`):
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
Analisis de complejidad:
|
|
137
|
+
Target: epic/payments (3 issues, ~8 archivos)
|
|
138
|
+
Complejidad: Alta
|
|
139
|
+
Recomendacion: Teams coordinados (3 agentes)
|
|
140
|
+
|
|
141
|
+
Selecciona modo de trabajo:
|
|
142
|
+
|
|
143
|
+
[A] Automatico - Oden decide todo (recomendado)
|
|
144
|
+
→ Asigna agentes, define streams, ejecuta
|
|
145
|
+
|
|
146
|
+
[C] Configurar - Tu decides
|
|
147
|
+
→ Elige agentes, define scope, aprueba plan
|
|
148
|
+
|
|
149
|
+
[S] Smart - Oden sugiere, tu apruebas
|
|
150
|
+
→ Oden propone plan, tu ajustas antes de ejecutar
|
|
151
|
+
|
|
152
|
+
Modo [A/C/S]:
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Paso 4: Generar Plan de Trabajo
|
|
158
|
+
|
|
159
|
+
### Modo Automatico (A)
|
|
160
|
+
|
|
161
|
+
Generar plan automaticamente basado en:
|
|
162
|
+
|
|
163
|
+
1. **Leer specs y technical-decisions.md** para entender arquitectura
|
|
164
|
+
2. **Analizar dependencias** entre issues/archivos
|
|
165
|
+
3. **Asignar agentes** segun tipo de trabajo:
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
# Mapping automatico de trabajo a agentes
|
|
169
|
+
database_work:
|
|
170
|
+
agent: backend-architect
|
|
171
|
+
patterns: ["migrations/*", "src/db/*", "*.sql"]
|
|
172
|
+
|
|
173
|
+
api_work:
|
|
174
|
+
agent: backend-architect
|
|
175
|
+
patterns: ["src/api/*", "src/services/*", "src/routes/*"]
|
|
176
|
+
|
|
177
|
+
frontend_work:
|
|
178
|
+
agent: frontend-developer
|
|
179
|
+
patterns: ["src/components/*", "src/pages/*", "src/hooks/*"]
|
|
180
|
+
|
|
181
|
+
fullstack_work:
|
|
182
|
+
agent: fullstack-developer
|
|
183
|
+
patterns: ["src/**"]
|
|
184
|
+
|
|
185
|
+
test_work:
|
|
186
|
+
agent: test-engineer
|
|
187
|
+
patterns: ["tests/*", "*.test.*", "*.spec.*"]
|
|
188
|
+
|
|
189
|
+
devops_work:
|
|
190
|
+
agent: devops-engineer
|
|
191
|
+
patterns: ["Dockerfile", "docker-compose*", ".github/*", "CI/*"]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Modo Configurar (C)
|
|
195
|
+
|
|
196
|
+
Mostrar opciones interactivas:
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
Plan propuesto:
|
|
200
|
+
|
|
201
|
+
Stream 1: Database Layer
|
|
202
|
+
Agente: backend-architect
|
|
203
|
+
Archivos: migrations/*, src/db/*
|
|
204
|
+
Issues: #41, #42
|
|
205
|
+
|
|
206
|
+
Stream 2: API Endpoints
|
|
207
|
+
Agente: backend-architect
|
|
208
|
+
Archivos: src/api/*, src/services/*
|
|
209
|
+
Issues: #43
|
|
210
|
+
|
|
211
|
+
Stream 3: Frontend
|
|
212
|
+
Agente: frontend-developer
|
|
213
|
+
Archivos: src/components/*, src/pages/*
|
|
214
|
+
Issues: #44, #45
|
|
215
|
+
|
|
216
|
+
Quieres modificar algo?
|
|
217
|
+
[1] Cambiar agente de un stream
|
|
218
|
+
[2] Reagrupar archivos
|
|
219
|
+
[3] Agregar/quitar stream
|
|
220
|
+
[4] Aceptar plan
|
|
221
|
+
[5] Cancelar
|
|
222
|
+
|
|
223
|
+
Opcion:
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Modo Smart (S)
|
|
227
|
+
|
|
228
|
+
Mostrar plan con recomendaciones:
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
Plan sugerido por Oden:
|
|
232
|
+
|
|
233
|
+
Stream 1: Database + API (backend-architect)
|
|
234
|
+
Razon: DB y API estan acoplados, mejor un solo agente
|
|
235
|
+
Archivos: migrations/*, src/db/*, src/api/*
|
|
236
|
+
Issues: #41, #42, #43
|
|
237
|
+
|
|
238
|
+
Stream 2: Frontend (frontend-developer)
|
|
239
|
+
Razon: UI es independiente del backend
|
|
240
|
+
Archivos: src/components/*, src/pages/*
|
|
241
|
+
Issues: #44, #45
|
|
242
|
+
|
|
243
|
+
Stream 3: Tests (test-engineer)
|
|
244
|
+
Razon: Tests deben ejecutarse despues de streams 1 y 2
|
|
245
|
+
Depende de: Stream 1, Stream 2
|
|
246
|
+
Archivos: tests/*
|
|
247
|
+
|
|
248
|
+
Aprobar plan? [Y/n]:
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Paso 5: Preparar Branch y Workspace
|
|
254
|
+
|
|
255
|
+
### Crear o Entrar al Branch
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Determinar branch name
|
|
259
|
+
branch_name="epic/{epic_name}"
|
|
260
|
+
# Si es issue individual sin epic:
|
|
261
|
+
# branch_name="issue/{number}-{slug}"
|
|
262
|
+
|
|
263
|
+
# Verificar cambios no committeados
|
|
264
|
+
if [ -n "$(git status --porcelain)" ]; then
|
|
265
|
+
echo "Tienes cambios sin committear. Committea o stash antes de continuar."
|
|
266
|
+
exit 1
|
|
267
|
+
fi
|
|
268
|
+
|
|
269
|
+
# Crear branch si no existe
|
|
270
|
+
if ! git branch -a | grep -q "$branch_name"; then
|
|
271
|
+
git checkout main
|
|
272
|
+
git pull origin main
|
|
273
|
+
git checkout -b "$branch_name"
|
|
274
|
+
git push -u origin "$branch_name"
|
|
275
|
+
else
|
|
276
|
+
git checkout "$branch_name"
|
|
277
|
+
git pull origin "$branch_name"
|
|
278
|
+
fi
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Crear Estructura de Tracking
|
|
282
|
+
|
|
283
|
+
Get current datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"`
|
|
284
|
+
|
|
285
|
+
Crear `.claude/epics/{name}/work-session.md`:
|
|
286
|
+
|
|
287
|
+
```markdown
|
|
288
|
+
---
|
|
289
|
+
started: {current_datetime}
|
|
290
|
+
branch: {branch_name}
|
|
291
|
+
mode: {auto|config|smart}
|
|
292
|
+
status: active
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
# Work Session: {epic_name}
|
|
296
|
+
|
|
297
|
+
## Streams
|
|
298
|
+
|
|
299
|
+
### Stream 1: {name}
|
|
300
|
+
- Agent: {agent_type}
|
|
301
|
+
- Status: pending
|
|
302
|
+
- Files: {patterns}
|
|
303
|
+
- Issues: {numbers}
|
|
304
|
+
|
|
305
|
+
### Stream 2: {name}
|
|
306
|
+
- Agent: {agent_type}
|
|
307
|
+
- Status: pending
|
|
308
|
+
- Files: {patterns}
|
|
309
|
+
- Issues: {numbers}
|
|
310
|
+
|
|
311
|
+
## Timeline
|
|
312
|
+
- {datetime} - Session started
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Paso 6: Lanzar Agentes (Teams Integration)
|
|
318
|
+
|
|
319
|
+
### Complejidad Baja (1-2 archivos) - Agente Individual
|
|
320
|
+
|
|
321
|
+
Usar Task tool con un solo agente:
|
|
322
|
+
|
|
323
|
+
```yaml
|
|
324
|
+
Task:
|
|
325
|
+
description: "Work on {target}"
|
|
326
|
+
subagent_type: "{best_agent}"
|
|
327
|
+
prompt: |
|
|
328
|
+
Working in branch: {branch_name}
|
|
329
|
+
|
|
330
|
+
Target: {issue_title}
|
|
331
|
+
|
|
332
|
+
Requirements:
|
|
333
|
+
- Read the full issue/spec before starting
|
|
334
|
+
- Implement all changes needed
|
|
335
|
+
- Write tests for new functionality
|
|
336
|
+
- Commit frequently: "Issue #{number}: {change}"
|
|
337
|
+
|
|
338
|
+
Files to modify:
|
|
339
|
+
{file_list}
|
|
340
|
+
|
|
341
|
+
Context:
|
|
342
|
+
- Technical decisions: docs/reference/technical-decisions.md
|
|
343
|
+
- Spec (if exists): docs/reference/modules/{module}-spec.md
|
|
344
|
+
|
|
345
|
+
When done:
|
|
346
|
+
- Ensure all tests pass
|
|
347
|
+
- Update work-session.md with completion status
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Complejidad Media (3-5 archivos) - 2 Agentes Paralelos
|
|
351
|
+
|
|
352
|
+
Lanzar 2 Task tools en paralelo:
|
|
353
|
+
|
|
354
|
+
```yaml
|
|
355
|
+
# Agent 1: Primary work
|
|
356
|
+
Task:
|
|
357
|
+
description: "Stream 1: {name} for {target}"
|
|
358
|
+
subagent_type: "{agent_1_type}"
|
|
359
|
+
prompt: |
|
|
360
|
+
Working in branch: {branch_name}
|
|
361
|
+
Stream: {stream_1_name}
|
|
362
|
+
|
|
363
|
+
Your scope:
|
|
364
|
+
- Files: {stream_1_files}
|
|
365
|
+
- Issues: {stream_1_issues}
|
|
366
|
+
|
|
367
|
+
IMPORTANT: Only modify files in your scope.
|
|
368
|
+
Another agent is working on: {stream_2_files}
|
|
369
|
+
|
|
370
|
+
Commit format: "Issue #{number}: {change}"
|
|
371
|
+
|
|
372
|
+
Read requirements from:
|
|
373
|
+
- .claude/epics/{name}/{task_files}
|
|
374
|
+
- docs/reference/modules/{module}-spec.md
|
|
375
|
+
|
|
376
|
+
# Agent 2: Secondary work
|
|
377
|
+
Task:
|
|
378
|
+
description: "Stream 2: {name} for {target}"
|
|
379
|
+
subagent_type: "{agent_2_type}"
|
|
380
|
+
prompt: |
|
|
381
|
+
Working in branch: {branch_name}
|
|
382
|
+
Stream: {stream_2_name}
|
|
383
|
+
|
|
384
|
+
Your scope:
|
|
385
|
+
- Files: {stream_2_files}
|
|
386
|
+
- Issues: {stream_2_issues}
|
|
387
|
+
|
|
388
|
+
IMPORTANT: Only modify files in your scope.
|
|
389
|
+
Another agent is working on: {stream_1_files}
|
|
390
|
+
|
|
391
|
+
Commit format: "Issue #{number}: {change}"
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Complejidad Alta (6+ archivos) - Teams Coordinados
|
|
395
|
+
|
|
396
|
+
Lanzar N Task tools en paralelo, respetando dependencias:
|
|
397
|
+
|
|
398
|
+
```yaml
|
|
399
|
+
# Launch independent streams first
|
|
400
|
+
# Then launch dependent streams as predecessors complete
|
|
401
|
+
|
|
402
|
+
# Phase 1: Independent streams (launch in parallel)
|
|
403
|
+
Task[1..N]:
|
|
404
|
+
description: "Stream {X}: {name}"
|
|
405
|
+
subagent_type: "{agent_type}"
|
|
406
|
+
prompt: |
|
|
407
|
+
Working in branch: {branch_name}
|
|
408
|
+
Stream: {stream_name}
|
|
409
|
+
Team role: {role}
|
|
410
|
+
|
|
411
|
+
Your scope:
|
|
412
|
+
- Files: {file_patterns}
|
|
413
|
+
- Issues: {issue_numbers}
|
|
414
|
+
|
|
415
|
+
Other active streams:
|
|
416
|
+
{list_of_other_streams_and_their_files}
|
|
417
|
+
|
|
418
|
+
Coordination rules:
|
|
419
|
+
- ONLY modify files in your scope
|
|
420
|
+
- Commit frequently
|
|
421
|
+
- If you need a file from another stream, wait
|
|
422
|
+
- Follow /rules/agent-coordination.md
|
|
423
|
+
|
|
424
|
+
Commit format: "Issue #{number}: {change}"
|
|
425
|
+
|
|
426
|
+
# Phase 2: Dependent streams (launch after Phase 1)
|
|
427
|
+
# Only launch these after their dependencies complete
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## Paso 7: Monitorear y Reportar Progreso
|
|
433
|
+
|
|
434
|
+
Mientras los agentes trabajan, actualizar `work-session.md`:
|
|
435
|
+
|
|
436
|
+
```markdown
|
|
437
|
+
## Timeline
|
|
438
|
+
- {datetime} - Session started
|
|
439
|
+
- {datetime} - Stream 1 (Database) started - backend-architect
|
|
440
|
+
- {datetime} - Stream 2 (API) started - backend-architect
|
|
441
|
+
- {datetime} - Stream 1 completed (3 commits)
|
|
442
|
+
- {datetime} - Stream 3 (Tests) started - test-engineer (was waiting for Stream 1)
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### Output Durante Ejecucion
|
|
446
|
+
|
|
447
|
+
```
|
|
448
|
+
Work session active: epic/payments
|
|
449
|
+
|
|
450
|
+
Agents:
|
|
451
|
+
Stream 1: Database (backend-architect) .... working
|
|
452
|
+
Stream 2: API (backend-architect) ......... working
|
|
453
|
+
Stream 3: Tests (test-engineer) ........... waiting (depends on 1, 2)
|
|
454
|
+
|
|
455
|
+
Commits: 5 total
|
|
456
|
+
latest: "Issue #42: Add payment table migration"
|
|
457
|
+
|
|
458
|
+
Progress: 2/3 streams active
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## Paso 8: Post-Trabajo - Verificacion
|
|
464
|
+
|
|
465
|
+
Cuando TODOS los streams completan:
|
|
466
|
+
|
|
467
|
+
### 8.1 Ejecutar Tests E2E
|
|
468
|
+
|
|
469
|
+
```bash
|
|
470
|
+
# Detectar framework de testing
|
|
471
|
+
if [ -f package.json ]; then
|
|
472
|
+
# Check for test script
|
|
473
|
+
test_cmd=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('package.json')).scripts.test||'')}catch(e){}" 2>/dev/null)
|
|
474
|
+
if [ -n "$test_cmd" ]; then
|
|
475
|
+
npm test 2>&1 | tee /tmp/test-output.txt
|
|
476
|
+
test_exit=$?
|
|
477
|
+
fi
|
|
478
|
+
elif [ -f go.mod ]; then
|
|
479
|
+
go test ./... 2>&1 | tee /tmp/test-output.txt
|
|
480
|
+
test_exit=$?
|
|
481
|
+
elif [ -f Cargo.toml ]; then
|
|
482
|
+
cargo test 2>&1 | tee /tmp/test-output.txt
|
|
483
|
+
test_exit=$?
|
|
484
|
+
elif [ -f Gemfile ]; then
|
|
485
|
+
bundle exec rspec 2>&1 | tee /tmp/test-output.txt
|
|
486
|
+
test_exit=$?
|
|
487
|
+
elif [ -f pubspec.yaml ]; then
|
|
488
|
+
flutter test 2>&1 | tee /tmp/test-output.txt
|
|
489
|
+
test_exit=$?
|
|
490
|
+
fi
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Si tests fallan:
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
Tests fallaron (exit code: {code})
|
|
497
|
+
|
|
498
|
+
Failures:
|
|
499
|
+
{parsed test failures}
|
|
500
|
+
|
|
501
|
+
Opciones:
|
|
502
|
+
[1] Lanzar agente debugger para fix automatico
|
|
503
|
+
[2] Ver output completo
|
|
504
|
+
[3] Continuar sin fix (no recomendado)
|
|
505
|
+
[4] Abortar
|
|
506
|
+
|
|
507
|
+
Opcion:
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
Si se elige opcion 1, lanzar debugger:
|
|
511
|
+
|
|
512
|
+
```yaml
|
|
513
|
+
Task:
|
|
514
|
+
description: "Fix test failures for {target}"
|
|
515
|
+
subagent_type: "debugger"
|
|
516
|
+
prompt: |
|
|
517
|
+
Tests are failing after parallel development.
|
|
518
|
+
|
|
519
|
+
Branch: {branch_name}
|
|
520
|
+
Test output: {test_output}
|
|
521
|
+
|
|
522
|
+
Fix the failing tests. Common causes:
|
|
523
|
+
- Import paths changed by another stream
|
|
524
|
+
- Missing type definitions
|
|
525
|
+
- Integration mismatches between streams
|
|
526
|
+
|
|
527
|
+
Commit fixes with: "fix: Resolve test failures after parallel merge"
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### 8.2 Code Review Automatico
|
|
531
|
+
|
|
532
|
+
Ejecutar review del branch completo:
|
|
533
|
+
|
|
534
|
+
```yaml
|
|
535
|
+
Task:
|
|
536
|
+
description: "Code review for {target}"
|
|
537
|
+
subagent_type: "code-reviewer"
|
|
538
|
+
prompt: |
|
|
539
|
+
Review all changes in branch {branch_name} vs main.
|
|
540
|
+
|
|
541
|
+
Get changes with: git diff main...HEAD
|
|
542
|
+
|
|
543
|
+
Check for:
|
|
544
|
+
1. Consistency between streams (naming, patterns)
|
|
545
|
+
2. Missing error handling
|
|
546
|
+
3. Security issues
|
|
547
|
+
4. Performance concerns
|
|
548
|
+
5. Compliance with docs/reference/technical-decisions.md
|
|
549
|
+
|
|
550
|
+
Output format:
|
|
551
|
+
- CRITICAL: {issues that block merge}
|
|
552
|
+
- WARNING: {issues to review}
|
|
553
|
+
- OK: {things that look good}
|
|
554
|
+
|
|
555
|
+
Final verdict: APPROVE / REQUEST_CHANGES
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Output de Review
|
|
559
|
+
|
|
560
|
+
```
|
|
561
|
+
Code Review Results:
|
|
562
|
+
|
|
563
|
+
Verdict: APPROVE (with warnings)
|
|
564
|
+
|
|
565
|
+
Warnings:
|
|
566
|
+
- src/api/payments.ts:45 - Missing input validation
|
|
567
|
+
- src/db/schema.ts:12 - Consider adding index
|
|
568
|
+
|
|
569
|
+
Approved:
|
|
570
|
+
- Architecture follows technical-decisions.md
|
|
571
|
+
- Error handling is consistent
|
|
572
|
+
- No security issues found
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
## Paso 9: Auto-Crear Pull Request
|
|
578
|
+
|
|
579
|
+
Si review pasa (APPROVE o APPROVE with warnings):
|
|
580
|
+
|
|
581
|
+
### Generar PR Body
|
|
582
|
+
|
|
583
|
+
```bash
|
|
584
|
+
# Recopilar informacion del branch
|
|
585
|
+
commits=$(git log main..HEAD --oneline)
|
|
586
|
+
files_changed=$(git diff main...HEAD --stat)
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
### Crear PR
|
|
590
|
+
|
|
591
|
+
```bash
|
|
592
|
+
# Verificar remote origin (proteccion de repositorio)
|
|
593
|
+
remote_url=$(git remote get-url origin 2>/dev/null || echo "")
|
|
594
|
+
if [[ "$remote_url" == *"automazeio/ccpm"* ]]; then
|
|
595
|
+
echo "ERROR: No se puede crear PR en el repositorio template"
|
|
596
|
+
exit 1
|
|
597
|
+
fi
|
|
598
|
+
|
|
599
|
+
REPO=$(echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||')
|
|
600
|
+
|
|
601
|
+
gh pr create --repo "$REPO" \
|
|
602
|
+
--title "{pr_title}" \
|
|
603
|
+
--body "$(cat <<'PREOF'
|
|
604
|
+
## Summary
|
|
605
|
+
{summary_from_work_session}
|
|
606
|
+
|
|
607
|
+
## Changes by Stream
|
|
608
|
+
### Stream 1: {name}
|
|
609
|
+
- {changes}
|
|
610
|
+
|
|
611
|
+
### Stream 2: {name}
|
|
612
|
+
- {changes}
|
|
613
|
+
|
|
614
|
+
## Issues Addressed
|
|
615
|
+
- Closes #{issue_1}
|
|
616
|
+
- Closes #{issue_2}
|
|
617
|
+
|
|
618
|
+
## Testing
|
|
619
|
+
- [x] Unit tests passing
|
|
620
|
+
- [x] E2E tests passing
|
|
621
|
+
- [x] Code review: {verdict}
|
|
622
|
+
|
|
623
|
+
## Review Notes
|
|
624
|
+
{review_warnings_if_any}
|
|
625
|
+
|
|
626
|
+
---
|
|
627
|
+
Generated by Oden Forge /oden:work
|
|
628
|
+
PREOF
|
|
629
|
+
)"
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
### Output PR
|
|
633
|
+
|
|
634
|
+
```
|
|
635
|
+
Pull Request creado:
|
|
636
|
+
|
|
637
|
+
PR: #{pr_number} - {title}
|
|
638
|
+
URL: {pr_url}
|
|
639
|
+
Branch: {branch_name} -> main
|
|
640
|
+
|
|
641
|
+
Incluye:
|
|
642
|
+
{commit_count} commits
|
|
643
|
+
{files_count} archivos modificados
|
|
644
|
+
{issues_count} issues referenciados
|
|
645
|
+
|
|
646
|
+
Review: {verdict}
|
|
647
|
+
Tests: Passing
|
|
648
|
+
|
|
649
|
+
Next:
|
|
650
|
+
- Revisar PR en GitHub: {pr_url}
|
|
651
|
+
- Merge cuando listo: /oden:epic-merge {name}
|
|
652
|
+
- O desde GitHub: Merge pull request
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
---
|
|
656
|
+
|
|
657
|
+
## Paso 10: Cierre de Issues (Post-Merge)
|
|
658
|
+
|
|
659
|
+
Cuando el PR se mergea (manual o automatico via GitHub):
|
|
660
|
+
|
|
661
|
+
### Cerrar Issues Relacionados
|
|
662
|
+
|
|
663
|
+
```bash
|
|
664
|
+
# Los issues se cierran automaticamente si el PR body tiene "Closes #N"
|
|
665
|
+
# Pero si no, cerrarlos manualmente:
|
|
666
|
+
|
|
667
|
+
for issue_num in {related_issues}; do
|
|
668
|
+
gh issue close $issue_num -c "Completed in PR #{pr_number}"
|
|
669
|
+
done
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
### Actualizar Estado Local
|
|
673
|
+
|
|
674
|
+
```bash
|
|
675
|
+
# Actualizar work-session.md
|
|
676
|
+
# Actualizar task files con status: closed
|
|
677
|
+
# Actualizar epic progress
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### Limpiar Branch
|
|
681
|
+
|
|
682
|
+
```bash
|
|
683
|
+
# Despues de merge exitoso
|
|
684
|
+
git checkout main
|
|
685
|
+
git pull origin main
|
|
686
|
+
git branch -d {branch_name}
|
|
687
|
+
git push origin --delete {branch_name} 2>/dev/null || true
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
---
|
|
691
|
+
|
|
692
|
+
## Resumen de Flujo Completo
|
|
693
|
+
|
|
694
|
+
```
|
|
695
|
+
/oden:work epic/payments --mode auto
|
|
696
|
+
|
|
697
|
+
1. Analizar complejidad .................. 8 archivos (Alta)
|
|
698
|
+
2. Generar plan .......................... 3 streams
|
|
699
|
+
3. Crear branch .......................... epic/payments
|
|
700
|
+
4. Lanzar Stream 1 (DB) ................. backend-architect
|
|
701
|
+
Lanzar Stream 2 (API) ................ backend-architect
|
|
702
|
+
5. [Esperar Stream 1, 2]
|
|
703
|
+
6. Lanzar Stream 3 (Tests) .............. test-engineer
|
|
704
|
+
7. [Esperar Stream 3]
|
|
705
|
+
8. Ejecutar tests E2E ................... PASS
|
|
706
|
+
9. Code review .......................... APPROVE
|
|
707
|
+
10. Crear PR ............................. #15
|
|
708
|
+
11. [Merge manual o auto]
|
|
709
|
+
12. Cerrar issues ........................ #41, #42, #43
|
|
710
|
+
13. Limpiar branch ....................... Done
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
---
|
|
714
|
+
|
|
715
|
+
## Error Handling
|
|
716
|
+
|
|
717
|
+
### Agente Falla
|
|
718
|
+
|
|
719
|
+
```
|
|
720
|
+
Stream 2 (API) fallo:
|
|
721
|
+
Error: {error_message}
|
|
722
|
+
|
|
723
|
+
Opciones:
|
|
724
|
+
[1] Reintentar stream con mismo agente
|
|
725
|
+
[2] Reintentar con agente diferente
|
|
726
|
+
[3] Continuar sin este stream
|
|
727
|
+
[4] Abortar sesion
|
|
728
|
+
|
|
729
|
+
Los demas streams continuan trabajando.
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
### Tests Fallan Despues de Fix
|
|
733
|
+
|
|
734
|
+
```
|
|
735
|
+
Tests siguen fallando despues de fix automatico.
|
|
736
|
+
|
|
737
|
+
Failures restantes:
|
|
738
|
+
{remaining_failures}
|
|
739
|
+
|
|
740
|
+
Opciones:
|
|
741
|
+
[1] Intentar fix manual (te muestro los errores)
|
|
742
|
+
[2] Crear PR como draft (con tests fallando)
|
|
743
|
+
[3] Abortar y volver a main
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
### Conflictos en Branch
|
|
747
|
+
|
|
748
|
+
```
|
|
749
|
+
Conflictos detectados al hacer pull:
|
|
750
|
+
{conflicted_files}
|
|
751
|
+
|
|
752
|
+
El branch epic/payments tiene conflictos con main.
|
|
753
|
+
Resuelve manualmente y luego ejecuta: /oden:work epic/payments --resume
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
---
|
|
757
|
+
|
|
758
|
+
## Flags Adicionales
|
|
759
|
+
|
|
760
|
+
| Flag | Descripcion |
|
|
761
|
+
|------|-------------|
|
|
762
|
+
| `--mode auto\|config\|smart` | Modo de trabajo |
|
|
763
|
+
| `--resume` | Reanudar sesion interrumpida |
|
|
764
|
+
| `--skip-tests` | Saltar tests E2E |
|
|
765
|
+
| `--skip-review` | Saltar code review |
|
|
766
|
+
| `--draft` | Crear PR como draft |
|
|
767
|
+
| `--no-pr` | No crear PR automaticamente |
|
|
768
|
+
|
|
769
|
+
---
|
|
770
|
+
|
|
771
|
+
## Integracion con Otros Comandos
|
|
772
|
+
|
|
773
|
+
| Comando | Cuando se usa |
|
|
774
|
+
|---------|---------------|
|
|
775
|
+
| `/oden:review` | Paso 8.2 - Code review automatico |
|
|
776
|
+
| `/oden:test run` | Paso 8.1 - Tests E2E |
|
|
777
|
+
| `/oden:git pr` | Paso 9 - Crear PR (fallback manual) |
|
|
778
|
+
| `/oden:daily` | Registrar trabajo del dia |
|
|
779
|
+
| `/oden:epic-merge` | Merge final si no se usa PR auto |
|
|
780
|
+
| `/oden:debug` | Fix de tests fallidos |
|
|
781
|
+
|
|
782
|
+
---
|
|
783
|
+
|
|
784
|
+
## Important Notes
|
|
785
|
+
|
|
786
|
+
- Follow `/rules/branch-operations.md` for git operations
|
|
787
|
+
- Follow `/rules/agent-coordination.md` for parallel work
|
|
788
|
+
- Follow `/rules/github-operations.md` for GitHub operations
|
|
789
|
+
- Follow `/rules/datetime.md` for timestamps
|
|
790
|
+
- Maximum parallel agents: 5 (to avoid resource exhaustion)
|
|
791
|
+
- Always verify remote origin before GitHub write operations
|