prjct-cli 0.8.6 → 0.9.1

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +216 -0
  2. package/CLAUDE.md +34 -0
  3. package/core/agentic/agent-router.js +482 -0
  4. package/core/agentic/command-executor.js +70 -15
  5. package/core/agentic/context-builder.js +4 -3
  6. package/core/agentic/context-filter.js +545 -0
  7. package/core/agentic/prompt-builder.js +48 -38
  8. package/core/agentic/tool-registry.js +35 -0
  9. package/core/command-registry.js +104 -164
  10. package/core/commands.js +84 -0
  11. package/core/domain/agent-generator.js +55 -44
  12. package/core/domain/architecture-generator.js +561 -0
  13. package/core/domain/task-stack.js +496 -0
  14. package/core/infrastructure/legacy-installer-detector.js +546 -0
  15. package/core/infrastructure/session-manager.js +14 -2
  16. package/core/infrastructure/setup.js +29 -11
  17. package/core/utils/jsonl-helper.js +137 -0
  18. package/package.json +1 -1
  19. package/scripts/install.sh +45 -8
  20. package/scripts/postinstall.js +5 -5
  21. package/templates/agents/AGENTS.md +3 -3
  22. package/templates/commands/analyze.md +10 -53
  23. package/templates/commands/ask.md +25 -338
  24. package/templates/commands/bug.md +11 -70
  25. package/templates/commands/build.md +8 -35
  26. package/templates/commands/cleanup.md +9 -32
  27. package/templates/commands/dash.md +241 -0
  28. package/templates/commands/design.md +5 -28
  29. package/templates/commands/done.md +6 -20
  30. package/templates/commands/feature.md +12 -225
  31. package/templates/commands/help.md +26 -313
  32. package/templates/commands/idea.md +7 -25
  33. package/templates/commands/init.md +15 -191
  34. package/templates/commands/migrate-all.md +25 -84
  35. package/templates/commands/next.md +6 -26
  36. package/templates/commands/now.md +6 -25
  37. package/templates/commands/pause.md +18 -0
  38. package/templates/commands/progress.md +5 -50
  39. package/templates/commands/recap.md +5 -54
  40. package/templates/commands/resume.md +97 -0
  41. package/templates/commands/ship.md +14 -135
  42. package/templates/commands/status.md +7 -32
  43. package/templates/commands/suggest.md +36 -495
  44. package/templates/commands/sync.md +7 -24
  45. package/templates/commands/work.md +44 -0
  46. package/templates/commands/workflow.md +3 -25
  47. package/templates/planning-methodology.md +195 -0
@@ -7,168 +7,48 @@ description: 'Context-aware suggestions based on project state and momentum'
7
7
 
8
8
  ## Purpose
9
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
- ```
10
+ Analyze project state and recommend next actions based on current task, queue, last ship time, velocity, and momentum patterns.
22
11
 
23
12
  ## Flow
24
13
 
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
14
+ 1. **Read state files**: `core/now.md`, `core/next.md`, `progress/shipped.md`, `planning/roadmap.md`, sessions (last 7 days)
15
+ 2. **Calculate metrics**: Days since ship, active task duration, queue size, velocity (features/week), completion rate
16
+ 3. **Detect patterns**: Long-running task (>1 day), stale queue, high velocity, low activity, blocked
17
+ 4. **Generate recommendations**: Immediate action, urgency alerts, momentum tips, strategic suggestions
102
18
 
103
- **Recommendation**:
104
- ```
105
- 💡 NECESITAS PLANEAR
106
-
107
- Opciones:
108
-
109
- 1. Agregar nueva feature
110
- /p:feature "{descripción}"
19
+ ## Scenario Patterns
111
20
 
112
- 2. Analizar proyecto
113
- /p:analyze
114
- → Descubre TODOs y mejoras
21
+ **1. No Active Task + Queue Has Tasks**
22
+ → Ready to work: `/p:next` → `/p:build 1`
115
23
 
116
- 3. Revisar roadmap
117
- /p:roadmap
118
- Ver features planificadas
24
+ **2. Active Task + Long Duration (>4h)**
25
+ → Might be stuck: `/p:stuck "{desc}"` or divide task into smaller parts
26
+ If forgot to mark: `/p:done`
119
27
 
120
- 4. Reportar bug
121
- /p:bug "{descripción}"
122
- ```
123
-
124
- ### Scenario 5: High Velocity (2+ ships/week)
28
+ **3. No Ships in 3+ Days**
29
+ → Losing momentum: Complete something TODAY, pick quick win from `/p:next` → `/p:ship` same day
125
30
 
126
- **Pattern**: Great momentum!
31
+ **4. Empty Queue + No Active Task**
32
+ → Need planning: `/p:feature "{desc}"` or `/p:analyze` or `/p:roadmap` or `/p:bug "{desc}"`
127
33
 
128
- **Recommendation**:
129
- ```
130
- 🚀 EXCELENTE RITMO!
34
+ **5. High Velocity (2+ ships/week)**
35
+ → Great momentum: Maintain rhythm, consider tests/docs, quality checks
131
36
 
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
- ```
37
+ **6. Queue Growing (10+ tasks)**
38
+ → Over-planning: STOP adding, START completing. Ship > Plan.
159
39
 
160
40
  ## Response Format
161
41
 
162
42
  ```
163
43
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━
164
- 💡 SUGERENCIAS PERSONALIZADAS
44
+ 💡 PERSONALIZED SUGGESTIONS
165
45
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━
166
46
 
167
- 📊 ANÁLISIS:
168
- Tarea activa: {current_task | "ninguna"}
169
- En cola: {N} tareas
170
- Último ship: {time_ago}
171
- Velocidad: {X} features/semana
47
+ 📊 ANALYSIS:
48
+ Active task: {current_task | "none"}
49
+ Queue: {N} tasks
50
+ Last ship: {time_ago}
51
+ Velocity: {X} features/week
172
52
 
173
53
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━
174
54
 
@@ -176,9 +56,9 @@ Ship > Plan
176
56
 
177
57
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━
178
58
 
179
- 🎯 TE RECOMIENDO:
59
+ 🎯 RECOMMENDATIONS:
180
60
 
181
- 1. ⚡ ACCIÓN INMEDIATA
61
+ 1. ⚡ IMMEDIATE ACTION
182
62
  {immediate_action}
183
63
  → {command_1}
184
64
  → {command_2}
@@ -195,361 +75,22 @@ Ship > Plan
195
75
 
196
76
  {motivational_message}
197
77
 
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?
78
+ What would you like to do?
481
79
  ```
482
80
 
483
81
  ## Urgency Levels
484
82
 
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
83
+ **🟢 Green** (All good): Active task or ready, shipped <2 days, velocity 2+ features/week → Positive reinforcement
84
+ **🟡 Yellow** (Attention): Task >4h, 3-4 days since ship, queue >7 tasks → Gentle nudge
85
+ **🔴 Red** (Urgent): 5+ days since ship, task >24h, queue >10 + no activity → Direct call to action
515
86
 
516
87
  ## Validation
517
88
 
518
- - **Requires init**: Must have prjct project
519
- - **Read-only**: Never modifies files
520
- - **No parameters**: Just analyzes current state
89
+ - Requires: `.prjct/prjct.config.json` exists
90
+ - Read-only: Never modifies files
91
+ - No parameters: Analyzes current state
521
92
 
522
93
  ## Edge Cases
523
94
 
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
95
+ **Incomplete data**: Show partial analysis + tip to use prjct more
96
+ **First time**: Explain purpose + standard analysis
@@ -1,34 +1,17 @@
1
1
  ---
2
2
  allowed-tools: [Read, Write, Bash, TodoWrite]
3
- description: 'Sync project state and generate dynamic agents'
3
+ description: 'Sync state + generate agents'
4
4
  ---
5
5
 
6
6
  # /p:sync
7
7
 
8
8
  ## Flow
9
+ 1. Execute `/p:analyze`
10
+ 2. Read `analysis/repo-summary.md`
11
+ 3. Generate agents per technology → `agents/`
12
+ 4. Log to memory
9
13
 
10
- 1. Run: `/p:analyze` → get current state
11
- 2. **Read**: `analysis/repo-summary.md`
12
- 3. **Generate**: Dynamic agents for each technology
13
- 4. Log: changes to `memory/context.jsonl`
14
-
15
- ## Agent Generation
16
-
17
- **See `templates/agents/AGENTS.md` for complete reference** with examples and guidelines.
18
-
19
- Use `generator.generateDynamicAgent(name, config)` for each specialist.
14
+ Use: `generateDynamicAgent(name, config)`
20
15
 
21
16
  ## Response
22
-
23
- ```
24
- 🔄 Sync complete!
25
-
26
- 🤖 Agents Generated:
27
- • {agent_name_1} - {role}
28
- • {agent_name_2} - {role}
29
-
30
- 📋 Based on: analysis/repo-summary.md
31
- 💡 See templates/agents/AGENTS.md for generation reference
32
-
33
- /p:context
34
- ```
17
+ `🔄 Synced | Generated: {agents} | Next: /p:context`
@@ -0,0 +1,44 @@
1
+ ---
2
+ allowed-tools: [Read, Write, GetTimestamp]
3
+ description: 'Show current task or start new one'
4
+ timestamp-rule: 'GetTimestamp() for all timestamps'
5
+ required-agent: auto-detect
6
+ enforce-agent: true
7
+ ---
8
+
9
+ # /p:work
10
+
11
+ ## Flow
12
+
13
+ **No params**: Show active task from `core/stack.jsonl`
14
+ **With task**: Start new (pause current if exists)
15
+ **With number**: Start task #N from `core/next.md`
16
+
17
+ ### Starting Task
18
+ 1. Check active → Pause if exists
19
+ 2. Parse input → String or number
20
+ 3. **ASSIGN AGENT** → Detect expertise, filter context (70-90% reduction)
21
+ 4. Create entry → status='active', agent, filtered_context
22
+ 5. Update → `core/stack.jsonl` + `core/now.md`
23
+ 6. Log → Agent usage to memory
24
+
25
+ ## Responses
26
+
27
+ **Active**: `🎯 {task} | {agent} | {duration}`
28
+ **Empty**: `💤 No active task | {paused_count} paused`
29
+ **Started**: `🚀 {task} | Agent: {agent}`
30
+ **Switched**: `⏸️ Paused {old} → Started {new}`
31
+
32
+ ## Agent Detection
33
+ Keywords → Agent:
34
+ - UI/frontend/React → `fe`
35
+ - API/backend/database → `be`
36
+ - design/UX → `ux`
37
+ - test/QA/bug → `qa`
38
+ - docs/README → `docs`
39
+ - else → `general`
40
+
41
+ ## Errors
42
+ **Active exists**: Show options (pause/done/switch)
43
+ **Invalid #**: Task not in queue
44
+ **Migration**: Replaces /p:now and /p:build
@@ -1,34 +1,12 @@
1
1
  ---
2
2
  allowed-tools: [Read, Write]
3
- description: 'Show workflow status'
3
+ description: 'Workflow status'
4
4
  ---
5
5
 
6
6
  # /p:workflow
7
7
 
8
- ## Usage
9
-
10
- ```
11
- /p:workflow # Show status
12
- /p:workflow skip # Skip current step
13
- ```
14
-
15
8
  ## Flow
16
-
17
- 1. Read: `workflow/state.json`
18
- 2. Display: current step + progress
19
- 3. Check: capabilities for next steps
9
+ Read `workflow/state.json` → Show progress
20
10
 
21
11
  ## Response
22
-
23
- ```
24
- 🔄 Workflow: {task_type}
25
-
26
- Progress: {current}/{total}
27
- Current: {step_name} ({agent})
28
- Status: {status}
29
-
30
- Next: {next_step}
31
- {capability_prompt_if_needed}
32
-
33
- /p:done | /p:workflow skip
34
- ```
12
+ `🔄 {task} | Step {N}/{total}: {step} ({agent}) | Skip: /p:workflow skip`