elsabro 2.0.1 → 2.2.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/commands/elsabro/add-phase.md +17 -0
- package/commands/elsabro/add-todo.md +111 -53
- package/commands/elsabro/audit-milestone.md +19 -0
- package/commands/elsabro/check-todos.md +210 -31
- package/commands/elsabro/complete-milestone.md +20 -1
- package/commands/elsabro/debug.md +19 -0
- package/commands/elsabro/discuss-phase.md +18 -1
- package/commands/elsabro/execute.md +496 -52
- package/commands/elsabro/insert-phase.md +18 -1
- package/commands/elsabro/list-phase-assumptions.md +17 -0
- package/commands/elsabro/new-milestone.md +19 -0
- package/commands/elsabro/new.md +19 -0
- package/commands/elsabro/pause-work.md +75 -0
- package/commands/elsabro/plan-milestone-gaps.md +20 -1
- package/commands/elsabro/plan.md +264 -36
- package/commands/elsabro/progress.md +203 -79
- package/commands/elsabro/quick.md +19 -0
- package/commands/elsabro/remove-phase.md +17 -0
- package/commands/elsabro/research-phase.md +18 -1
- package/commands/elsabro/resume-work.md +130 -2
- package/commands/elsabro/start.md +365 -98
- package/commands/elsabro/verify-work.md +271 -12
- package/package.json +1 -1
- package/references/SYSTEM_INDEX.md +241 -0
- package/references/command-flow.md +352 -0
- package/references/enforcement-rules.md +331 -0
- package/references/error-handling-instructions.md +26 -12
- package/references/state-sync.md +381 -0
- package/references/task-dispatcher.md +388 -0
- package/references/tasks-integration.md +380 -0
- package/skills/api-microservice.md +765 -0
- package/skills/api-setup.md +76 -3
- package/skills/auth-setup.md +46 -6
- package/skills/chrome-extension.md +584 -0
- package/skills/cicd-setup.md +1206 -0
- package/skills/cli-tool.md +884 -0
- package/skills/database-setup.md +41 -5
- package/skills/desktop-app.md +1351 -0
- package/skills/expo-app.md +35 -2
- package/skills/full-stack-app.md +543 -0
- package/skills/mobile-app.md +813 -0
- package/skills/nextjs-app.md +33 -2
- package/skills/payments-setup.md +76 -1
- package/skills/saas-starter.md +639 -0
- package/skills/sentry-setup.md +41 -7
- package/skills/testing-setup.md +1218 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
name: progress
|
|
3
3
|
description: Ver el progreso del proyecto y qué hacer siguiente
|
|
4
4
|
allowed-tools:
|
|
5
|
+
- TaskList
|
|
6
|
+
- TaskGet
|
|
5
7
|
- Read
|
|
6
8
|
- Glob
|
|
7
9
|
- Grep
|
|
@@ -11,134 +13,175 @@ allowed-tools:
|
|
|
11
13
|
# ELSABRO: Progress
|
|
12
14
|
|
|
13
15
|
<objective>
|
|
14
|
-
Mostrar el estado actual del proyecto y guiar al usuario sobre qué hacer a continuación.
|
|
16
|
+
Mostrar el estado actual del proyecto y guiar al usuario sobre qué hacer a continuación usando **Claude Code Tasks API** como fuente de verdad.
|
|
15
17
|
</objective>
|
|
16
18
|
|
|
17
19
|
<process>
|
|
18
|
-
## Paso 1:
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
## Paso 1: Cargar Estado desde Tasks API
|
|
21
|
+
|
|
22
|
+
```javascript
|
|
23
|
+
// Obtener todas las tasks
|
|
24
|
+
const allTasks = TaskList();
|
|
25
|
+
|
|
26
|
+
// Filtrar por tipo
|
|
27
|
+
const milestones = allTasks.filter(t => t.metadata?.type === "milestone");
|
|
28
|
+
const phases = allTasks.filter(t => t.metadata?.type === "phase");
|
|
29
|
+
const todos = allTasks.filter(t => t.metadata?.type === "todo");
|
|
30
|
+
const work = allTasks.filter(t => t.metadata?.type === "work");
|
|
31
|
+
|
|
32
|
+
// Estado actual
|
|
33
|
+
const inProgress = allTasks.filter(t => t.status === "in_progress");
|
|
34
|
+
const pending = allTasks.filter(t => t.status === "pending");
|
|
35
|
+
const completed = allTasks.filter(t => t.status === "completed");
|
|
36
|
+
const blocked = allTasks.filter(t => t.blockedBy?.length > 0);
|
|
23
37
|
```
|
|
24
38
|
|
|
25
|
-
### Si no
|
|
39
|
+
### Si no hay tasks
|
|
26
40
|
```
|
|
27
|
-
No hay
|
|
41
|
+
No hay tareas registradas en este proyecto.
|
|
28
42
|
|
|
29
|
-
¿Quieres empezar
|
|
43
|
+
¿Quieres empezar?
|
|
30
44
|
→ /elsabro:start
|
|
31
45
|
```
|
|
32
46
|
|
|
33
|
-
### Si
|
|
47
|
+
### Si hay tasks
|
|
34
48
|
Continuar a Paso 2.
|
|
35
49
|
|
|
36
|
-
## Paso 2:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
## Paso 2: Calcular Progreso
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
// Progreso general
|
|
54
|
+
const totalTasks = allTasks.length;
|
|
55
|
+
const completedTasks = completed.length;
|
|
56
|
+
const progressPercent = Math.round((completedTasks / totalTasks) * 100);
|
|
57
|
+
|
|
58
|
+
// Por milestone
|
|
59
|
+
const milestoneProgress = milestones.map(m => {
|
|
60
|
+
const phasesInMilestone = phases.filter(p =>
|
|
61
|
+
p.metadata?.milestone_id === m.metadata?.milestone_id
|
|
62
|
+
);
|
|
63
|
+
const completedPhases = phasesInMilestone.filter(p => p.status === "completed");
|
|
64
|
+
return {
|
|
65
|
+
name: m.subject,
|
|
66
|
+
progress: Math.round((completedPhases.length / phasesInMilestone.length) * 100),
|
|
67
|
+
phases: phasesInMilestone
|
|
68
|
+
};
|
|
69
|
+
});
|
|
52
70
|
```
|
|
53
71
|
|
|
54
|
-
## Paso
|
|
72
|
+
## Paso 3: Mostrar Resumen
|
|
55
73
|
|
|
56
74
|
```
|
|
57
75
|
┌─────────────────────────────────────────────┐
|
|
58
|
-
│ [
|
|
59
|
-
│ [Descripción
|
|
76
|
+
│ [Milestone Actual] │
|
|
77
|
+
│ [Descripción] │
|
|
60
78
|
└─────────────────────────────────────────────┘
|
|
61
79
|
|
|
62
80
|
Progreso: ████████░░ 80%
|
|
63
81
|
|
|
64
|
-
|
|
65
|
-
✓
|
|
66
|
-
✓
|
|
67
|
-
→
|
|
68
|
-
○
|
|
69
|
-
○
|
|
82
|
+
Phases:
|
|
83
|
+
✓ Phase 1: Setup inicial
|
|
84
|
+
✓ Phase 2: Autenticación
|
|
85
|
+
→ Phase 3: Dashboard (en progreso)
|
|
86
|
+
○ Phase 4: Pagos
|
|
87
|
+
○ Phase 5: Deploy
|
|
88
|
+
|
|
89
|
+
TODOs pendientes: 5 (2 high, 3 medium)
|
|
90
|
+
Tareas bloqueadas: 1
|
|
70
91
|
|
|
71
92
|
Última actividad: hace 2 horas
|
|
72
|
-
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Paso 4: Mostrar Trabajo Actual
|
|
96
|
+
|
|
97
|
+
```javascript
|
|
98
|
+
// Tareas en progreso
|
|
99
|
+
const currentWork = inProgress.map(t => ({
|
|
100
|
+
id: t.id,
|
|
101
|
+
subject: t.subject,
|
|
102
|
+
type: t.metadata?.type,
|
|
103
|
+
owner: t.owner || "unassigned"
|
|
104
|
+
}));
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
📍 En progreso ahora:
|
|
109
|
+
#<ID> Implement user dashboard [work]
|
|
110
|
+
#<ID> Fix auth token refresh [todo]
|
|
111
|
+
|
|
112
|
+
⏸️ Bloqueado:
|
|
113
|
+
#<ID> Deploy to production (blocked by #<ID>)
|
|
73
114
|
```
|
|
74
115
|
|
|
75
116
|
## Paso 5: Sugerir Siguiente Acción
|
|
76
117
|
|
|
77
|
-
|
|
118
|
+
### Si hay work in_progress:
|
|
119
|
+
```
|
|
120
|
+
Continúa con el trabajo actual:
|
|
121
|
+
→ /elsabro:execute (para continuar implementación)
|
|
122
|
+
→ /elsabro:verify-work (si crees que terminaste)
|
|
123
|
+
```
|
|
78
124
|
|
|
79
|
-
### Si hay
|
|
125
|
+
### Si hay TODOs high priority:
|
|
80
126
|
```
|
|
81
|
-
|
|
82
|
-
|
|
127
|
+
TODOs de alta prioridad pendientes:
|
|
128
|
+
#<ID> Update error messages [high]
|
|
129
|
+
#<ID> Fix validation bug [high]
|
|
83
130
|
|
|
84
|
-
|
|
85
|
-
→
|
|
86
|
-
→ Depurar problema: /elsabro:debug
|
|
131
|
+
→ /elsabro:check-todos (ver todos)
|
|
132
|
+
→ /elsabro:quick "<TODO>" (resolver uno rápido)
|
|
87
133
|
```
|
|
88
134
|
|
|
89
|
-
### Si la última
|
|
135
|
+
### Si la última phase está completada:
|
|
90
136
|
```
|
|
91
137
|
¡Excelente progreso!
|
|
92
138
|
|
|
93
|
-
Siguiente
|
|
94
|
-
→
|
|
95
|
-
|
|
96
|
-
O alternativamente:
|
|
97
|
-
→ Verificar todo: /elsabro:verify
|
|
98
|
-
→ Ver el roadmap: cat .planning/ROADMAP.md
|
|
139
|
+
Siguiente phase disponible:
|
|
140
|
+
→ /elsabro:plan (planificar siguiente)
|
|
141
|
+
→ /elsabro:add-phase (agregar nueva phase)
|
|
99
142
|
```
|
|
100
143
|
|
|
101
|
-
### Si hay
|
|
144
|
+
### Si hay tasks bloqueadas:
|
|
102
145
|
```
|
|
103
|
-
⚠ Hay
|
|
146
|
+
⚠ Hay trabajo bloqueado
|
|
104
147
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- [ ] Falta middleware de auth
|
|
148
|
+
#<ID> Deploy to production
|
|
149
|
+
Bloqueado por: #<ID> Complete security audit
|
|
108
150
|
|
|
109
|
-
|
|
110
|
-
→
|
|
111
|
-
→
|
|
151
|
+
Opciones:
|
|
152
|
+
→ Ver detalles: TaskGet #<ID>
|
|
153
|
+
→ Resolver bloqueador: /elsabro:execute
|
|
154
|
+
→ Desbloquear manualmente: /elsabro:check-todos --complete=<ID>
|
|
112
155
|
```
|
|
113
156
|
|
|
114
|
-
### Si
|
|
157
|
+
### Si todo está completado:
|
|
115
158
|
```
|
|
116
|
-
🎉 ¡
|
|
159
|
+
🎉 ¡Milestone completado!
|
|
117
160
|
|
|
118
|
-
Todas las
|
|
119
|
-
✓
|
|
120
|
-
✓
|
|
121
|
-
✓
|
|
122
|
-
✓
|
|
123
|
-
✓
|
|
161
|
+
Todas las phases verificadas:
|
|
162
|
+
✓ Phase 1: Setup inicial
|
|
163
|
+
✓ Phase 2: Autenticación
|
|
164
|
+
✓ Phase 3: Dashboard
|
|
165
|
+
✓ Phase 4: Pagos
|
|
166
|
+
✓ Phase 5: Deploy
|
|
124
167
|
|
|
125
168
|
Opciones:
|
|
126
|
-
→
|
|
127
|
-
→
|
|
128
|
-
→
|
|
169
|
+
→ Crear nuevo milestone: /elsabro:new-milestone
|
|
170
|
+
→ Agregar feature: /elsabro:plan "nueva feature"
|
|
171
|
+
→ Ver TODOs pendientes: /elsabro:check-todos
|
|
129
172
|
```
|
|
130
173
|
</process>
|
|
131
174
|
|
|
132
175
|
<visual_indicators>
|
|
133
176
|
## Indicadores Visuales
|
|
134
177
|
|
|
135
|
-
| Símbolo | Significado |
|
|
136
|
-
|
|
137
|
-
| ✓ | Completado
|
|
138
|
-
| → | En progreso
|
|
139
|
-
| ○ | Pendiente |
|
|
140
|
-
|
|
|
141
|
-
| ✗ |
|
|
178
|
+
| Símbolo | Significado | Task Status |
|
|
179
|
+
|---------|-------------|-------------|
|
|
180
|
+
| ✓ | Completado | completed |
|
|
181
|
+
| → | En progreso | in_progress |
|
|
182
|
+
| ○ | Pendiente | pending |
|
|
183
|
+
| ⏸️ | Bloqueado | pending + blockedBy |
|
|
184
|
+
| ✗ | Fallido | failed (metadata) |
|
|
142
185
|
|
|
143
186
|
## Barra de Progreso
|
|
144
187
|
|
|
@@ -151,6 +194,53 @@ Opciones:
|
|
|
151
194
|
```
|
|
152
195
|
</visual_indicators>
|
|
153
196
|
|
|
197
|
+
<tasks_summary>
|
|
198
|
+
## Resumen por Tipo de Task
|
|
199
|
+
|
|
200
|
+
```javascript
|
|
201
|
+
const summary = {
|
|
202
|
+
milestones: {
|
|
203
|
+
total: milestones.length,
|
|
204
|
+
completed: milestones.filter(t => t.status === "completed").length,
|
|
205
|
+
inProgress: milestones.filter(t => t.status === "in_progress").length
|
|
206
|
+
},
|
|
207
|
+
phases: {
|
|
208
|
+
total: phases.length,
|
|
209
|
+
completed: phases.filter(t => t.status === "completed").length,
|
|
210
|
+
inProgress: phases.filter(t => t.status === "in_progress").length
|
|
211
|
+
},
|
|
212
|
+
todos: {
|
|
213
|
+
total: todos.length,
|
|
214
|
+
critical: todos.filter(t => t.metadata?.priority === "critical").length,
|
|
215
|
+
high: todos.filter(t => t.metadata?.priority === "high").length,
|
|
216
|
+
completed: todos.filter(t => t.status === "completed").length
|
|
217
|
+
},
|
|
218
|
+
work: {
|
|
219
|
+
total: work.length,
|
|
220
|
+
inProgress: work.filter(t => t.status === "in_progress").length,
|
|
221
|
+
completed: work.filter(t => t.status === "completed").length
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Output:
|
|
227
|
+
```
|
|
228
|
+
╔══════════════════════════════════════════════════╗
|
|
229
|
+
║ PROJECT SUMMARY ║
|
|
230
|
+
╠══════════════════════════════════════════════════╣
|
|
231
|
+
║ ║
|
|
232
|
+
║ Milestones: 1/2 completed ║
|
|
233
|
+
║ Phases: 4/5 completed ║
|
|
234
|
+
║ TODOs: 8 pending (2 critical, 3 high) ║
|
|
235
|
+
║ Work items: 3 in progress ║
|
|
236
|
+
║ ║
|
|
237
|
+
║ Blocked: 1 task ║
|
|
238
|
+
║ Dependencies: 5 total ║
|
|
239
|
+
║ ║
|
|
240
|
+
╚══════════════════════════════════════════════════╝
|
|
241
|
+
```
|
|
242
|
+
</tasks_summary>
|
|
243
|
+
|
|
154
244
|
<context_awareness>
|
|
155
245
|
## Consciencia de Contexto
|
|
156
246
|
|
|
@@ -173,15 +263,49 @@ Recomendación:
|
|
|
173
263
|
```
|
|
174
264
|
|
|
175
265
|
### Tiempo desde última actividad
|
|
266
|
+
```javascript
|
|
267
|
+
// Encontrar última task actualizada
|
|
268
|
+
const lastUpdated = allTasks
|
|
269
|
+
.filter(t => t.metadata?.updated_at)
|
|
270
|
+
.sort((a, b) => new Date(b.metadata.updated_at) - new Date(a.metadata.updated_at))[0];
|
|
271
|
+
|
|
272
|
+
const hoursSince = (Date.now() - new Date(lastUpdated.metadata.updated_at)) / (1000 * 60 * 60);
|
|
273
|
+
|
|
274
|
+
if (hoursSince > 24) {
|
|
275
|
+
// Mostrar contexto de última sesión
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
176
279
|
Si han pasado más de 24 horas:
|
|
177
280
|
```
|
|
178
281
|
Ha pasado tiempo desde tu última sesión.
|
|
179
282
|
|
|
180
283
|
Resumen de dónde te quedaste:
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
284
|
+
- Última task: #<ID> Implement dashboard
|
|
285
|
+
- Estado: in_progress
|
|
286
|
+
- Hace: 2 días
|
|
184
287
|
|
|
185
288
|
¿Quieres continuar donde lo dejaste?
|
|
289
|
+
→ /elsabro:resume-work
|
|
186
290
|
```
|
|
187
291
|
</context_awareness>
|
|
292
|
+
|
|
293
|
+
<state_sync>
|
|
294
|
+
## State Sync (Tasks API)
|
|
295
|
+
|
|
296
|
+
Este comando es READ-ONLY - no modifica tasks, solo consulta.
|
|
297
|
+
|
|
298
|
+
```javascript
|
|
299
|
+
// Lectura de estado (NO escritura)
|
|
300
|
+
const state = {
|
|
301
|
+
tasks: TaskList(),
|
|
302
|
+
current: TaskList().find(t => t.status === "in_progress"),
|
|
303
|
+
blocked: TaskList().filter(t => t.blockedBy?.length > 0)
|
|
304
|
+
};
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Si necesitas actualizar estado, usa otros comandos:
|
|
308
|
+
- `/elsabro:pause-work` - Guardar contexto
|
|
309
|
+
- `/elsabro:resume-work` - Retomar trabajo
|
|
310
|
+
- `/elsabro:check-todos` - Gestionar TODOs
|
|
311
|
+
</state_sync>
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quick
|
|
3
3
|
description: Modo de ejecución rápida para tareas simples - mínima ceremonia, máxima velocidad
|
|
4
|
+
sync:
|
|
5
|
+
reads: [".elsabro/state.json"]
|
|
6
|
+
writes: [".elsabro/state.json", ".elsabro/context.md"]
|
|
4
7
|
---
|
|
5
8
|
|
|
6
9
|
# /elsabro:quick
|
|
7
10
|
|
|
11
|
+
<state_sync>
|
|
12
|
+
## SINCRONIZACION DE ESTADO
|
|
13
|
+
|
|
14
|
+
**IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
|
|
15
|
+
|
|
16
|
+
### Al Iniciar
|
|
17
|
+
- Leer `.elsabro/state.json`
|
|
18
|
+
- Verificar si hay flujo en progreso
|
|
19
|
+
- Actualizar `current_flow.command` con este comando
|
|
20
|
+
|
|
21
|
+
### Al Completar
|
|
22
|
+
- Registrar en `history`
|
|
23
|
+
- Actualizar `context` con informacion relevante
|
|
24
|
+
- Limpiar `current_flow`
|
|
25
|
+
</state_sync>
|
|
26
|
+
|
|
8
27
|
<command-name>quick</command-name>
|
|
9
28
|
|
|
10
29
|
## Propósito
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: remove-phase
|
|
3
3
|
description: Eliminar una fase del milestone (con validaciones de seguridad)
|
|
4
|
+
sync:
|
|
5
|
+
reads: [".elsabro/state.json"]
|
|
6
|
+
writes: [".elsabro/state.json"]
|
|
4
7
|
---
|
|
5
8
|
|
|
6
9
|
# /elsabro:remove-phase
|
|
7
10
|
|
|
11
|
+
<state_sync>
|
|
12
|
+
## SINCRONIZACION DE ESTADO
|
|
13
|
+
|
|
14
|
+
**IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
|
|
15
|
+
|
|
16
|
+
### Al Iniciar
|
|
17
|
+
- Leer `.elsabro/state.json`
|
|
18
|
+
- Verificar contexto actual del milestone/phase
|
|
19
|
+
|
|
20
|
+
### Al Completar
|
|
21
|
+
- Registrar cambio en `history`
|
|
22
|
+
- Actualizar `context` si corresponde
|
|
23
|
+
</state_sync>
|
|
24
|
+
|
|
8
25
|
<command-name>remove-phase</command-name>
|
|
9
26
|
|
|
10
27
|
## Propósito
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: research-phase
|
|
3
|
-
description: Investigar
|
|
3
|
+
description: Investigar tecnologias, patrones y approaches para una fase antes de planificar
|
|
4
|
+
sync:
|
|
5
|
+
reads: [".elsabro/state.json"]
|
|
6
|
+
writes: [".elsabro/state.json"]
|
|
4
7
|
---
|
|
5
8
|
|
|
6
9
|
# /elsabro:research-phase
|
|
7
10
|
|
|
11
|
+
<state_sync>
|
|
12
|
+
## SINCRONIZACION DE ESTADO
|
|
13
|
+
|
|
14
|
+
**IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
|
|
15
|
+
|
|
16
|
+
### Al Iniciar
|
|
17
|
+
- Leer `.elsabro/state.json`
|
|
18
|
+
- Verificar contexto actual del milestone/phase
|
|
19
|
+
|
|
20
|
+
### Al Completar
|
|
21
|
+
- Registrar cambio en `history`
|
|
22
|
+
- Actualizar `context` si corresponde
|
|
23
|
+
</state_sync>
|
|
24
|
+
|
|
8
25
|
<command-name>research-phase</command-name>
|
|
9
26
|
|
|
10
27
|
## Propósito
|
|
@@ -7,15 +7,81 @@ allowed-tools:
|
|
|
7
7
|
- Bash
|
|
8
8
|
- Glob
|
|
9
9
|
- Grep
|
|
10
|
+
- TaskGet
|
|
11
|
+
- TaskUpdate
|
|
12
|
+
- TaskList
|
|
13
|
+
- TaskCreate
|
|
14
|
+
sync:
|
|
15
|
+
reads: [".elsabro/state.json"]
|
|
16
|
+
writes: [".elsabro/state.json", ".elsabro/context.md"]
|
|
10
17
|
---
|
|
11
18
|
|
|
12
19
|
# /elsabro:resume-work
|
|
13
20
|
|
|
21
|
+
<state_sync>
|
|
22
|
+
## SINCRONIZACION DE ESTADO
|
|
23
|
+
|
|
24
|
+
**IMPORTAR**: Ver `/references/state-sync.md` para protocolo completo.
|
|
25
|
+
|
|
26
|
+
### Al Iniciar
|
|
27
|
+
- Leer `.elsabro/state.json`
|
|
28
|
+
- Verificar si hay flujo en progreso
|
|
29
|
+
- Actualizar `current_flow.command` con este comando
|
|
30
|
+
|
|
31
|
+
### Al Completar
|
|
32
|
+
- Registrar en `history`
|
|
33
|
+
- Actualizar `context` con informacion relevante
|
|
34
|
+
- Limpiar `current_flow`
|
|
35
|
+
</state_sync>
|
|
36
|
+
|
|
14
37
|
<command-name>resume-work</command-name>
|
|
15
38
|
|
|
16
39
|
## Propósito
|
|
17
40
|
|
|
18
|
-
Retomar trabajo en un proyecto después de una interrupción. Reconstruye contexto, muestra estado actual y sugiere siguiente paso.
|
|
41
|
+
Retomar trabajo en un proyecto después de una interrupción. Reconstruye contexto desde Tasks API, muestra estado actual y sugiere siguiente paso.
|
|
42
|
+
|
|
43
|
+
## Integración con Tasks API
|
|
44
|
+
|
|
45
|
+
Al reanudar, primero consultar el sistema de Tasks para recuperar contexto:
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
// 1. Listar todas las tasks para ver estado actual
|
|
49
|
+
TaskList()
|
|
50
|
+
// Output:
|
|
51
|
+
// ⏸ User profile page - Paused (metadata.status: "paused")
|
|
52
|
+
// ✅ Dashboard layout - Completed
|
|
53
|
+
// ⏳ Settings modal - Pending
|
|
54
|
+
|
|
55
|
+
// 2. Obtener detalles de la task pausada
|
|
56
|
+
TaskGet({ taskId: "paused-task-id" })
|
|
57
|
+
// Output:
|
|
58
|
+
// status: "in_progress" (pero metadata.status: "paused")
|
|
59
|
+
// metadata: {
|
|
60
|
+
// pausedAt: "2024-01-20T17:30:00Z",
|
|
61
|
+
// expectedReturn: "2024-01-21T09:00:00Z",
|
|
62
|
+
// lastCompletedSubtask: "validation-implementation",
|
|
63
|
+
// nextSubtask: "avatar-upload",
|
|
64
|
+
// notes: "Zod schema completo, falta avatar"
|
|
65
|
+
// }
|
|
66
|
+
|
|
67
|
+
// 3. Validar integridad del contexto
|
|
68
|
+
// - ¿Tiempo desde pausa > 7 días? → Warning
|
|
69
|
+
// - ¿Tiempo > 30 días? → Sugerir revisión completa
|
|
70
|
+
// - ¿Archivos referenciados aún existen?
|
|
71
|
+
|
|
72
|
+
// 4. Reactivar task
|
|
73
|
+
TaskUpdate({
|
|
74
|
+
taskId: "paused-task-id",
|
|
75
|
+
metadata: {
|
|
76
|
+
status: "active", // Ya no está pausada
|
|
77
|
+
resumedAt: "2024-01-21T09:15:00Z",
|
|
78
|
+
resumedFrom: "pause"
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
// 5. Eliminar reminder si existe
|
|
83
|
+
TaskUpdate({ taskId: "reminder-task-id", status: "deleted" })
|
|
84
|
+
```
|
|
19
85
|
|
|
20
86
|
## Uso
|
|
21
87
|
|
|
@@ -151,9 +217,71 @@ Implementing user profile validation
|
|
|
151
217
|
## Integración
|
|
152
218
|
|
|
153
219
|
- Paired con `/elsabro:pause-work`
|
|
154
|
-
-
|
|
220
|
+
- **Tasks API** como fuente primaria de estado
|
|
221
|
+
- Uses session data from `.planning/SESSION.md` como fallback
|
|
155
222
|
- Can trigger `/elsabro:progress` for overview
|
|
156
223
|
|
|
224
|
+
### Flujo de Recuperación con Tasks
|
|
225
|
+
|
|
226
|
+
```javascript
|
|
227
|
+
// Prioridad de fuentes de contexto:
|
|
228
|
+
// 1. Tasks API (TaskGet) → Más confiable, persistente entre sesiones
|
|
229
|
+
// 2. SESSION-STATE.json → Backup para detalles adicionales
|
|
230
|
+
// 3. SESSION.md → Fallback humano-legible
|
|
231
|
+
|
|
232
|
+
async function resumeWork() {
|
|
233
|
+
// 1. Intentar recuperar de Tasks
|
|
234
|
+
const tasks = await TaskList()
|
|
235
|
+
const pausedTask = tasks.find(t => t.metadata?.status === "paused")
|
|
236
|
+
|
|
237
|
+
if (pausedTask) {
|
|
238
|
+
const details = await TaskGet({ taskId: pausedTask.id })
|
|
239
|
+
|
|
240
|
+
// Reactivar task principal
|
|
241
|
+
await TaskUpdate({
|
|
242
|
+
taskId: pausedTask.id,
|
|
243
|
+
metadata: { ...details.metadata, status: "active", resumedAt: new Date() }
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
// Buscar y eliminar reminder task asociada
|
|
247
|
+
const reminderTask = tasks.find(t =>
|
|
248
|
+
t.metadata?.type === "reminder" &&
|
|
249
|
+
t.metadata?.pausedTaskId === pausedTask.id
|
|
250
|
+
)
|
|
251
|
+
if (reminderTask) {
|
|
252
|
+
await TaskUpdate({ taskId: reminderTask.id, status: "deleted" })
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Mostrar metadatos recuperados al usuario
|
|
256
|
+
console.log(`Recovered context:
|
|
257
|
+
- Last completed: ${details.metadata.lastCompletedSubtask}
|
|
258
|
+
- Next step: ${details.metadata.nextSubtask}
|
|
259
|
+
- Notes: ${details.metadata.notes}
|
|
260
|
+
`)
|
|
261
|
+
|
|
262
|
+
return details
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// 2. Fallback a SESSION-STATE.json
|
|
266
|
+
if (fs.existsSync('.planning/SESSION-STATE.json')) {
|
|
267
|
+
// ... recuperar de archivo ...
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// 3. Fallback final a SESSION.md
|
|
271
|
+
// ...
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Ventajas de Tasks API para Resume
|
|
276
|
+
|
|
277
|
+
| Aspecto | Antes (archivos) | Ahora (Tasks API) |
|
|
278
|
+
|---------|------------------|-------------------|
|
|
279
|
+
| Persistencia | Solo en proyecto | Entre sesiones |
|
|
280
|
+
| Recuperación | Parse manual | TaskGet directo |
|
|
281
|
+
| Integridad | Validar JSON | Sistema garantiza |
|
|
282
|
+
| Visibilidad | Leer archivo | Ctrl+T nativo |
|
|
283
|
+
| Staleness | Calcular manual | Metadata timestamps |
|
|
284
|
+
|
|
157
285
|
<session_validation>
|
|
158
286
|
## Validación de Sesión
|
|
159
287
|
|