prjct-cli 0.7.2 → 0.8.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.
@@ -0,0 +1,555 @@
1
+ ---
2
+ allowed-tools: [Read]
3
+ description: 'Context-aware suggestions based on project state and momentum'
4
+ ---
5
+
6
+ # /p:suggest
7
+
8
+ ## Purpose
9
+
10
+ Analyze project state and recommend next best actions based on:
11
+ - Current task status
12
+ - Queue state
13
+ - Time since last ship
14
+ - Recent velocity
15
+ - Patterns and momentum
16
+
17
+ ## Usage
18
+
19
+ ```
20
+ /p:suggest
21
+ ```
22
+
23
+ ## Flow
24
+
25
+ 1. **Read state files**:
26
+ - `core/now.md` → Current task
27
+ - `core/next.md` → Queue
28
+ - `progress/shipped.md` → Recent ships
29
+ - `planning/roadmap.md` → Active features
30
+ - Sessions from last 7 days (if available)
31
+
32
+ 2. **Calculate metrics**:
33
+ - Days since last ship
34
+ - Active task duration
35
+ - Queue size
36
+ - Velocity (features/week)
37
+ - Completion rate
38
+
39
+ 3. **Detect patterns**:
40
+ - Long-running task (>1 day)
41
+ - Stale queue (not updated recently)
42
+ - High velocity (shipping frequently)
43
+ - Low activity (no movement)
44
+ - Blocked tasks
45
+
46
+ 4. **Generate recommendations**:
47
+ - Immediate action (what to do RIGHT NOW)
48
+ - Urgency alerts (if any)
49
+ - Momentum tips (maintain or improve)
50
+ - Strategic suggestions (longer-term)
51
+
52
+ ## Analysis Logic
53
+
54
+ ### Scenario 1: No Active Task + Queue Has Tasks
55
+
56
+ **Pattern**: Ready to work, tasks available
57
+
58
+ **Recommendation**:
59
+ ```
60
+ ⚡ ACCIÓN INMEDIATA
61
+ Tienes {N} tareas esperando
62
+ → /p:next (ver prioridades)
63
+ → /p:build 1 (empezar top priority)
64
+ ```
65
+
66
+ ### Scenario 2: Active Task + Long Duration (>4h)
67
+
68
+ **Pattern**: Might be stuck or need break
69
+
70
+ **Recommendation**:
71
+ ```
72
+ ⏱️ ALERTA DE TIEMPO
73
+ Tarea "{task}" lleva {duration}
74
+
75
+ ¿Estás atorado?
76
+ → /p:stuck "{descripción}" (pedir ayuda)
77
+ → /p:done (si ya terminaste y olvidaste marcar)
78
+
79
+ ¿Es muy grande?
80
+ → Considera dividirla en tareas más pequeñas
81
+ ```
82
+
83
+ ### Scenario 3: No Ships in 3+ Days
84
+
85
+ **Pattern**: Losing momentum
86
+
87
+ **Recommendation**:
88
+ ```
89
+ 🔥 URGENTE: {N} días sin ship
90
+
91
+ Acción recomendada:
92
+ → Completa algo HOY (aunque sea pequeño)
93
+ → /p:next → pick quick win → /p:ship
94
+
95
+ Momentum = Motivation
96
+ No dejes que se enfríe!
97
+ ```
98
+
99
+ ### Scenario 4: Empty Queue + No Active Task
100
+
101
+ **Pattern**: Need planning
102
+
103
+ **Recommendation**:
104
+ ```
105
+ 💡 NECESITAS PLANEAR
106
+
107
+ Opciones:
108
+
109
+ 1. Agregar nueva feature
110
+ /p:feature "{descripción}"
111
+
112
+ 2. Analizar proyecto
113
+ /p:analyze
114
+ → Descubre TODOs y mejoras
115
+
116
+ 3. Revisar roadmap
117
+ /p:roadmap
118
+ → Ver features planificadas
119
+
120
+ 4. Reportar bug
121
+ /p:bug "{descripción}"
122
+ ```
123
+
124
+ ### Scenario 5: High Velocity (2+ ships/week)
125
+
126
+ **Pattern**: Great momentum!
127
+
128
+ **Recommendation**:
129
+ ```
130
+ 🚀 EXCELENTE RITMO!
131
+
132
+ Velocidad: {X} features/semana
133
+
134
+ Mantén el momentum:
135
+ → Sigue con el siguiente task
136
+ → Considera agregar tests si no los tienes
137
+ → Documenta mientras shipeas
138
+
139
+ ¡Vas muy bien! 🎉
140
+ ```
141
+
142
+ ### Scenario 6: Queue Growing (10+ tasks)
143
+
144
+ **Pattern**: Over-planning, under-doing
145
+
146
+ **Recommendation**:
147
+ ```
148
+ ⚠️ COLA MUY GRANDE ({N} tareas)
149
+
150
+ Recomendación:
151
+ → STOP agregando tareas
152
+ → START completándolas
153
+
154
+ Acción:
155
+ /p:build 1 → /p:done → repeat
156
+
157
+ Ship > Plan
158
+ ```
159
+
160
+ ## Response Format
161
+
162
+ ```
163
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
164
+ 💡 SUGERENCIAS PERSONALIZADAS
165
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
166
+
167
+ 📊 ANÁLISIS:
168
+ • Tarea activa: {current_task | "ninguna"}
169
+ • En cola: {N} tareas
170
+ • Último ship: {time_ago}
171
+ • Velocidad: {X} features/semana
172
+
173
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
174
+
175
+ {urgency_section_if_applicable}
176
+
177
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
178
+
179
+ 🎯 TE RECOMIENDO:
180
+
181
+ 1. ⚡ ACCIÓN INMEDIATA
182
+ {immediate_action}
183
+ → {command_1}
184
+ → {command_2}
185
+
186
+ 2. 💡 {category_2}
187
+ {suggestion_2}
188
+ → {command}
189
+
190
+ 3. 🎯 {category_3}
191
+ {suggestion_3}
192
+ → {optional_command}
193
+
194
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
195
+
196
+ {motivational_message}
197
+
198
+ ¿Qué prefieres hacer?
199
+ ```
200
+
201
+ ## Examples
202
+
203
+ ### Example 1: Ready to Work
204
+
205
+ ```
206
+ /p:suggest
207
+
208
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
209
+ 💡 SUGERENCIAS PERSONALIZADAS
210
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
211
+
212
+ 📊 ANÁLISIS:
213
+ • Tarea activa: ninguna
214
+ • En cola: 5 tareas
215
+ • Último ship: hace 1 día
216
+ • Velocidad: 3 features/semana
217
+
218
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
219
+
220
+ 🎯 TE RECOMIENDO:
221
+
222
+ 1. ⚡ ACCIÓN INMEDIATA
223
+ Tienes 5 tareas esperando y buen momentum
224
+ → /p:next (ver prioridades)
225
+ → /p:build 1 (empezar top priority)
226
+
227
+ 2. 🚀 MOMENTUM
228
+ Estás en excelente ritmo (3 features/semana)
229
+ → Mantén el flow
230
+ → Shiped ayer, hoy puedes completar otra
231
+
232
+ 3. 💡 CALIDAD
233
+ Con esta velocidad, considera:
234
+ → Agregar tests si no los tienes
235
+ → Documentar mientras shipeas
236
+ → Code review de features recientes
237
+
238
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
239
+
240
+ ¡Vas muy bien! Sigue así 🎉
241
+
242
+ ¿Empezamos con /p:next?
243
+ ```
244
+
245
+ ### Example 2: Stuck on Task
246
+
247
+ ```
248
+ /p:suggest
249
+
250
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
251
+ 💡 SUGERENCIAS PERSONALIZADAS
252
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
253
+
254
+ 📊 ANÁLISIS:
255
+ • Tarea activa: "implement websocket connection"
256
+ • Duración: 6 horas
257
+ • En cola: 3 tareas
258
+ • Último ship: hace 3 días
259
+
260
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
261
+
262
+ ⚠️ ALERTA: Tarea larga + Sin ships recientes
263
+
264
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
265
+
266
+ 🎯 TE RECOMIENDO:
267
+
268
+ 1. ⚡ ACCIÓN INMEDIATA
269
+ ¿Estás atorado con websockets?
270
+
271
+ Opciones:
272
+ → /p:stuck "websocket issues" (pedir ayuda)
273
+ → /p:done (si ya terminaste y olvidaste)
274
+
275
+ ¿La tarea es muy grande?
276
+ → Considera dividirla:
277
+ - Setup básico de websocket
278
+ - Implementar eventos
279
+ - Testing y manejo de errores
280
+
281
+ 2. 🔥 URGENTE
282
+ 3 días sin ship → Momentum en riesgo
283
+
284
+ → Completa ALGO hoy (aunque sea pequeño)
285
+ → Ship > Perfect
286
+ → Puedes iterar después
287
+
288
+ 3. 💡 ALTERNATIVA
289
+ Si websockets está bloqueado:
290
+ → /p:next (ver otras tareas)
291
+ → Trabaja en algo más mientras investigas
292
+ → Mantén el momentum
293
+
294
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
295
+
296
+ No te quedes atascado! Pide ayuda o ship algo más pequeño.
297
+
298
+ ¿Necesitas ayuda con websockets?
299
+ ```
300
+
301
+ ### Example 3: Losing Momentum
302
+
303
+ ```
304
+ /p:suggest
305
+
306
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
307
+ 💡 SUGERENCIAS PERSONALIZADAS
308
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
309
+
310
+ 📊 ANÁLISIS:
311
+ • Tarea activa: ninguna
312
+ • En cola: 8 tareas
313
+ • Último ship: hace 5 días ⚠️
314
+ • Velocidad: 0.4 features/semana
315
+
316
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
317
+
318
+ 🔥 URGENTE: 5 DÍAS SIN SHIP
319
+
320
+ El momentum se está perdiendo!
321
+
322
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
323
+
324
+ 🎯 TE RECOMIENDO:
325
+
326
+ 1. ⚡ ACCIÓN INMEDIATA (HOY)
327
+ Completa UNA tarea pequeña
328
+
329
+ → /p:next (busca quick win)
330
+ → /p:build {la más fácil}
331
+ → /p:done → /p:ship MISMO DÍA
332
+
333
+ Objetivo: Romper el ciclo de inactividad
334
+
335
+ 2. 🎯 ESTRATEGIA
336
+ Tienes 8 tareas en cola
337
+ → Demasiado planning, poco doing
338
+
339
+ STOP: Agregar más tareas
340
+ START: Completar las existentes
341
+
342
+ Ship > Plan
343
+
344
+ 3. 💡 MANTÉN MOMENTUM
345
+ Una vez que ships hoy:
346
+ → Ship algo cada 1-2 días
347
+ → Tareas pequeñas > Tareas grandes
348
+ → Celebra cada win (por pequeño que sea)
349
+
350
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
351
+
352
+ Momentum = Motivation
353
+ ¡Vamos a shipear algo HOY! 🚀
354
+
355
+ ¿Listo para ver tu cola y elegir un quick win?
356
+ ```
357
+
358
+ ### Example 4: Need Planning
359
+
360
+ ```
361
+ /p:suggest
362
+
363
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
364
+ 💡 SUGERENCIAS PERSONALIZADAS
365
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
366
+
367
+ 📊 ANÁLISIS:
368
+ • Tarea activa: ninguna
369
+ • En cola: 0 tareas
370
+ • Último ship: hace 2 horas ✅
371
+ • Velocidad: 4 features/semana
372
+
373
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
374
+
375
+ 🎯 TE RECOMIENDO:
376
+
377
+ 1. 💡 PLANEAR SIGUIENTE FEATURE
378
+ Acabas de ship → Excelente!
379
+ Cola vacía → Necesitas planear
380
+
381
+ Opciones:
382
+
383
+ A) Agregar nueva feature
384
+ /p:feature "{descripción}"
385
+ → Análisis de valor
386
+ → Task breakdown
387
+ → Auto-start
388
+
389
+ B) Analizar proyecto
390
+ /p:analyze
391
+ → Descubre TODOs automáticamente
392
+ → Identifica mejoras
393
+ → Genera tareas
394
+
395
+ C) Revisar roadmap
396
+ /p:roadmap
397
+ → Ver features planificadas
398
+ → Decidir siguiente
399
+
400
+ 2. 🚀 MOMENTUM EXCELENTE
401
+ 4 features/semana → Top tier!
402
+
403
+ → Mantén este ritmo
404
+ → Considera refactors si no los has hecho
405
+ → Tests, docs, optimizaciones
406
+
407
+ 3. 🎯 CALIDAD
408
+ Con alta velocidad, asegura:
409
+ → Code quality (linting, formatting)
410
+ → Test coverage
411
+ → Documentation
412
+ → No technical debt
413
+
414
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
415
+
416
+ ¡Excelente trabajo! Sigue así 🎉
417
+
418
+ ¿Qué feature quieres agregar?
419
+ ```
420
+
421
+ ### Example 5: Over-Planning
422
+
423
+ ```
424
+ /p:suggest
425
+
426
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
427
+ 💡 SUGERENCIAS PERSONALIZADAS
428
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
429
+
430
+ 📊 ANÁLISIS:
431
+ • Tarea activa: ninguna
432
+ • En cola: 15 tareas ⚠️
433
+ • Último ship: hace 1 día
434
+ • Velocidad: 2 features/semana
435
+
436
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
437
+
438
+ ⚠️ ALERTA: COLA MUY GRANDE
439
+
440
+ Ratio planning/doing desbalanceado
441
+
442
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
443
+
444
+ 🎯 TE RECOMIENDO:
445
+
446
+ 1. ⚡ ACCIÓN INMEDIATA
447
+ STOP → Agregar más tareas
448
+ START → Completar las existentes
449
+
450
+ → /p:next (ver top 5)
451
+ → /p:build 1
452
+ → /p:done
453
+ → Repeat
454
+
455
+ Objetivo: Reducir cola a <5 tareas
456
+
457
+ 2. 🎯 ESTRATEGIA
458
+ Con 15 tareas y velocidad de 2/semana:
459
+ → Necesitas 7+ semanas para completar
460
+ → Muchas tareas se volverán obsoletas
461
+
462
+ Mejor enfoque:
463
+ → Completa 5-7 tareas
464
+ → Reevalúa el resto
465
+ → Elimina las que ya no son relevantes
466
+
467
+ 3. 💡 PRINCIPIO
468
+ Ship Fast No BS
469
+
470
+ → Tareas en cola NO agregan valor
471
+ → Solo las completadas cuentan
472
+ → Small batches > Big queues
473
+
474
+ Execution > Planning
475
+
476
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
477
+
478
+ Menos planning, más shipping! 🚀
479
+
480
+ ¿Listo para empezar a vaciar esa cola?
481
+ ```
482
+
483
+ ## Urgency Levels
484
+
485
+ ### 🟢 Green (All Good)
486
+ - Active task or ready to start
487
+ - Shipped within last 2 days
488
+ - Good velocity (2+ features/week)
489
+
490
+ **Message**: Positive reinforcement, keep momentum
491
+
492
+ ### 🟡 Yellow (Attention Needed)
493
+ - Task running >4 hours
494
+ - 3-4 days since last ship
495
+ - Queue growing (>7 tasks)
496
+
497
+ **Message**: Gentle nudge, suggest action
498
+
499
+ ### 🔴 Red (Urgent)
500
+ - 5+ days since last ship
501
+ - Task running >24 hours
502
+ - Queue >10 tasks with no activity
503
+
504
+ **Message**: Direct call to action, break the pattern
505
+
506
+ ## Key Principles
507
+
508
+ 1. **Data-driven**: Base suggestions on actual metrics
509
+ 2. **Actionable**: Always provide specific commands
510
+ 3. **Motivational**: Encourage without being annoying
511
+ 4. **Honest**: If momentum is low, say it
512
+ 5. **Pattern recognition**: Detect stuck/blocked scenarios
513
+ 6. **Contextual**: Suggestions fit current state
514
+ 7. **Bilingual**: Support both English and Spanish
515
+
516
+ ## Validation
517
+
518
+ - **Requires init**: Must have prjct project
519
+ - **Read-only**: Never modifies files
520
+ - **No parameters**: Just analyzes current state
521
+
522
+ ## Edge Cases
523
+
524
+ ### Incomplete data
525
+ ```
526
+ 📊 Limited data available
527
+
528
+ Based on what I can see:
529
+ {partial_analysis}
530
+
531
+ Tip: Use prjct more to get better suggestions!
532
+ - /p:build → Track tasks
533
+ - /p:done → Record completions
534
+ - /p:ship → Celebrate wins
535
+ ```
536
+
537
+ ### First time usage
538
+ ```
539
+ 👋 First time using /p:suggest!
540
+
541
+ I'll analyze your project and suggest next steps.
542
+
543
+ {standard_analysis}
544
+
545
+ Tip: Use /p:suggest anytime you're wondering "what should I do now?"
546
+ ```
547
+
548
+ ## Success Criteria
549
+
550
+ After using `/p:suggest`, user should:
551
+ - ✅ Know exactly what to do next
552
+ - ✅ Understand WHY that's the best action
553
+ - ✅ Feel motivated to act
554
+ - ✅ Have specific commands to run
555
+ - ✅ Understand their momentum/velocity