prjct-cli 0.22.0 → 0.25.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.
@@ -1,695 +1,46 @@
1
1
  ---
2
- allowed-tools: [Read, Write, Bash, Task, Glob, Grep, AskUserQuestion]
3
- description: '7-phase feature development workflow'
4
- timestamp-rule: 'GetTimestamp() and GetDate() for ALL timestamps'
5
- architecture: 'Write-Through (JSON MD → Events)'
6
- storage-layer: true
7
- source-of-truth: 'storage/queue.json'
8
- claude-context: 'context/next.md'
9
- backend-sync: 'sync/pending.json'
2
+ deprecated: true
3
+ redirect-to: 'task'
4
+ allowed-tools: [Read]
5
+ description: 'DEPRECATED - Use /p:task instead'
10
6
  ---
11
7
 
12
- # /p:feature - Add Feature with 7-Phase Workflow
8
+ # /p:feature - DEPRECATED
13
9
 
14
- ## 7-Phase Development Workflow
10
+ **This command has been deprecated. Use `/p:task` instead.**
15
11
 
16
- ```
17
- Phase 1: Discovery → Understand the feature
18
- Phase 2: Exploration → Analyze existing codebase
19
- Phase 3: Questions → Clarify ambiguities
20
- Phase 4: Design → Architecture options
21
- Phase 5: Implementation → Task breakdown + start
22
- Phase 6: Review → (via /p:done, /p:ship)
23
- Phase 7: Summary → (via /p:done)
24
- ```
12
+ The `/p:task` command provides everything `/p:feature` did, plus:
13
+ - Automatic type classification (the agent determines if it's a feature, bug, etc.)
14
+ - Same 7-phase development workflow
15
+ - Git branch management
16
+ - Task breakdown and tracking
25
17
 
26
- ## Architecture: Write-Through Pattern
18
+ ## Migration
27
19
 
20
+ Replace your usage:
28
21
  ```
29
- User Action Storage (JSON) → Context (MD) → Sync Events
30
- ```
31
-
32
- **Source of Truth**: `storage/queue.json` (tasks), `storage/roadmap.json` (features)
33
- **Claude Context**: `context/next.md`, `context/roadmap.md` (generated)
34
- **Backend Sync**: `sync/pending.json` (events)
35
-
36
- ## Agent Delegation (REQUIRED)
37
-
38
- Before executing any code-related task, delegate to a specialist agent:
39
-
40
- ### Step 0: Assign Agent
41
-
42
- 1. **List agents**: `Glob("~/.prjct-cli/projects/{projectId}/agents/*.md")`
43
- 2. **Read routing**: `Read("templates/agentic/agent-routing.md")`
44
- 3. **Analyze task**: Determine domain (frontend, backend, testing, etc.)
45
- 4. **Select agent**: Match task to best agent
46
- 5. **Delegate via Task tool** (pass reference, NOT content):
47
-
48
- ```
49
- Task(
50
- subagent_type: 'general-purpose',
51
- prompt: '
52
- ## Agent Assignment
53
- Read and apply: ~/.prjct-cli/projects/{projectId}/agents/{agent-name}.md
54
-
55
- ## Task
56
- {feature description}
57
-
58
- ## Context
59
- - Project: {projectPath}
60
- - Feature: {feature}
61
-
62
- ## Flow
63
- 1. Read agent file FIRST
64
- 2. Apply agent expertise
65
- 3. Execute task
66
- 4. Return results
67
- '
68
- )
22
+ /p:feature "add authentication" -> /p:task "add authentication"
23
+ /p:feature "dark mode toggle" -> /p:task "dark mode toggle"
69
24
  ```
70
25
 
71
- **CRITICAL:** Pass file PATH, not content. Subagent reads it (~200 bytes vs 3-5KB).
26
+ The agent will automatically classify these as `feature` type based on the description.
72
27
 
73
- ## Context Variables
74
- - `{projectId}`: From `.prjct/prjct.config.json`
75
- - `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
76
- - `{queuePath}`: `{globalPath}/storage/queue.json`
77
- - `{statePath}`: `{globalPath}/storage/state.json`
78
- - `{nextContextPath}`: `{globalPath}/context/next.md`
79
- - `{syncPath}`: `{globalPath}/sync/pending.json`
80
- - `{memoryPath}`: `{globalPath}/memory/events.jsonl`
81
- - `{feature}`: User-provided feature description
28
+ ## Redirect
82
29
 
83
- ## Step 1: Read Config
84
-
85
- READ: `.prjct/prjct.config.json`
86
- EXTRACT: `projectId`
87
-
88
- IF file not found:
89
- OUTPUT: "No prjct project. Run /p:init first."
90
- STOP
91
-
92
- ## Step 2: Handle No Parameters
30
+ IF feature description provided:
31
+ OUTPUT: "Redirecting to /p:task..."
32
+ EXECUTE: /p:task "{feature}"
93
33
 
94
34
  IF no feature description provided:
95
- OUTPUT interactive menu:
96
- ```
97
- What kind of feature?
98
-
99
- 1. UI/UX - Interface improvements
100
- 2. Performance - Speed, memory, optimization
101
- 3. Features - New functionality
102
- 4. Quality - Testing, refactoring
103
- 5. Bugs - Fix issues
104
- 6. Docs - Documentation
105
-
106
- Describe your feature or choose a category.
35
+ OUTPUT:
107
36
  ```
108
- WAIT for user input
109
- CONTINUE with user's response as {feature}
110
-
111
- ---
112
-
113
- ## PHASE 1: Discovery
114
-
115
- OUTPUT: "## Phase 1: Discovery"
116
-
117
- ### 1.1 Summarize the Feature
118
- Analyze {feature} and OUTPUT:
119
- ```
120
- Building: {one-sentence summary}
37
+ /p:feature is deprecated. Use /p:task instead.
121
38
 
122
- Requirements:
123
- - {requirement 1}
124
- - {requirement 2}
125
- - {requirement 3}
39
+ Example: /p:task "add user authentication"
126
40
 
127
- Success looks like:
128
- - {success criteria 1}
129
- - {success criteria 2}
130
- ```
131
-
132
- ### 1.2 Initial Assessment
133
- Determine scope:
134
- - IF simple (1-2 files): {scope} = "small"
135
- - IF medium (3-5 files): {scope} = "medium"
136
- - IF complex (many files, new patterns): {scope} = "large"
137
-
138
- ---
139
-
140
- ## PHASE 2: Exploration
141
-
142
- OUTPUT: "## Phase 2: Codebase Exploration"
143
-
144
- ### 2.1 Find Similar Features
145
- DELEGATE to Explore agent:
146
- ```
147
- Task(
148
- subagent_type: 'Explore',
149
- prompt: 'Find code similar to "{feature}". Look for:
150
- - Existing implementations of similar functionality
151
- - Patterns used in this codebase
152
- - Key files that would be affected
153
- Return: file paths, patterns found, relevant code snippets'
154
- )
155
- ```
156
-
157
- ### 2.2 Trace Dependencies
158
- BASH: Find imports/dependencies related to the feature area
159
-
160
- ### 2.3 Report Findings
161
- OUTPUT:
162
- ```
163
- Found similar:
164
- - {similar feature 1} in {file path}
165
- - {similar feature 2} in {file path}
166
-
167
- Patterns used:
168
- - {pattern 1}: {where it's used}
169
- - {pattern 2}: {where it's used}
170
-
171
- Key files to modify:
172
- - {file 1}: {what needs to change}
173
- - {file 2}: {what needs to change}
174
- ```
175
-
176
- ---
177
-
178
- ## PHASE 3: Questions
179
-
180
- OUTPUT: "## Phase 3: Clarifying Questions"
181
-
182
- ### 3.1 Identify Ambiguities
183
- Based on discovery and exploration, identify unclear aspects:
184
-
185
- IF ambiguities exist:
186
- USE AskUserQuestion tool:
187
- ```
188
- - Scope: "Should this include {edge case}?"
189
- - Tech: "Prefer {option A} or {option B}?"
190
- - Priority: "Is {sub-feature} required now or later?"
41
+ The agent will automatically:
42
+ - Classify the task type (feature, bug, improvement, etc.)
43
+ - Run the 7-phase workflow
44
+ - Create appropriate git branch
45
+ - Break down into subtasks
191
46
  ```
192
- WAIT for answers
193
- UPDATE requirements based on answers
194
-
195
- IF no ambiguities:
196
- OUTPUT: "Requirements are clear. Proceeding to design."
197
-
198
- ---
199
-
200
- ## PHASE 4: Design
201
-
202
- OUTPUT: "## Phase 4: Architecture Design"
203
-
204
- ### 4.0 UX/UI Analysis (Frontend Features)
205
-
206
- **CRITICAL**: If feature involves UI/frontend, apply UX/UI agent FIRST.
207
-
208
- CHECK: Does feature involve frontend/UI?
209
- - Keywords: page, component, form, button, modal, dashboard, view, screen, UI, interface
210
- - File types affected: .tsx, .jsx, .vue, .svelte, .swift, .kt, .dart
211
-
212
- IF frontend feature:
213
- READ: `{globalPath}/agents/uxui.md`
214
-
215
- IF agent not found:
216
- OUTPUT: "⚠️ UX/UI agent not found. Run /p:sync to generate."
217
- CONTINUE without UX/UI analysis
218
-
219
- ELSE:
220
- OUTPUT: "### 4.0 UX/UI Analysis"
221
-
222
- ### Apply UX Checklist (MANDATORY)
223
- ```
224
- **User Analysis:**
225
- - Who: {describe the user}
226
- - Problem: {what pain point this solves}
227
- - Happy Path: {ideal flow}
228
- - Edge Cases: {what can go wrong}
229
-
230
- **UX Requirements:**
231
- - [ ] User understands action in < 3 seconds
232
- - [ ] Each action has visual feedback
233
- - [ ] Errors are clear and recoverable
234
- - [ ] Keyboard navigation supported
235
- - [ ] Contrast ratio >= 4.5:1
236
- - [ ] Touch targets >= 44px (mobile)
237
- ```
238
-
239
- ### Ask Aesthetic Direction
240
- USE AskUserQuestion:
241
- ```
242
- question: "¿Qué dirección estética para este feature?"
243
- header: "Aesthetic"
244
- options:
245
- - label: "Minimal"
246
- description: "Clean, professional. Best for B2B, productivity tools"
247
- - label: "Bold/Maximalist"
248
- description: "Striking, modern. Best for creative, entertainment"
249
- - label: "Soft/Organic"
250
- description: "Friendly, approachable. Best for wellness, lifestyle"
251
- - label: "Brutalist"
252
- description: "Raw, technical. Best for dev tools, startups"
253
- ```
254
-
255
- SET: {aestheticDirection} = user's choice
256
-
257
- OUTPUT:
258
- ```
259
- **Aesthetic:** {aestheticDirection}
260
-
261
- **UI Guidelines Applied:**
262
- - Typography: Distinctive fonts (avoiding Inter, Roboto, Arial)
263
- - Color: 60-30-10 framework with personality
264
- - Animation: Purposeful micro-interactions
265
- - Layout: Memorable composition (not generic centered)
266
- ```
267
-
268
- ### 4.1 Generate Options
269
- Based on exploration (and UX/UI analysis if frontend), design 2-3 approaches:
270
-
271
- OUTPUT:
272
- ```
273
- ### Option 1: Minimal Changes
274
- - Approach: {description}
275
- - Files: {count} files modified
276
- - Pros: Fast, low risk
277
- - Cons: {tradeoff}
278
-
279
- ### Option 2: Clean Architecture
280
- - Approach: {description}
281
- - Files: {count} files modified
282
- - Pros: Maintainable, testable
283
- - Cons: More work upfront
284
-
285
- ### Option 3: Pragmatic Balance (Recommended)
286
- - Approach: {description}
287
- - Files: {count} files modified
288
- - Pros: Balance of speed and quality
289
- - Cons: {minor tradeoff}
290
- ```
291
-
292
- ### 4.2 Get Approval
293
- USE AskUserQuestion:
294
- ```
295
- question: "Which architecture approach?"
296
- options:
297
- - "Option 1: Minimal Changes"
298
- - "Option 2: Clean Architecture"
299
- - "Option 3: Pragmatic Balance (Recommended)"
300
- ```
301
-
302
- SET: {chosenApproach} = user's choice
303
-
304
- ---
305
-
306
- ## PHASE 5: Implementation
307
-
308
- OUTPUT: "## Phase 5: Task Breakdown"
309
-
310
- ### 5.1 Generate Tasks
311
- Based on {chosenApproach}, break into tasks:
312
-
313
- Rules:
314
- 1. Each task: 30min - 2h
315
- 2. Atomic (one concern each)
316
- 3. Ordered by dependency
317
- 4. Include testing as final task
318
-
319
- GENERATE: {tasks} = list of task descriptions
320
- GENERATE: {featureId} = UUID v4
321
- SET: {now} = GetTimestamp()
322
-
323
- ### 5.2 Show Task List
324
- OUTPUT:
325
- ```
326
- Tasks for {feature}:
327
- 1. {task 1}
328
- 2. {task 2}
329
- 3. {task 3}
330
- ...
331
- n. Write tests and verify
332
- ```
333
-
334
- ### 5.3 Impact Assessment
335
- IF affects core functionality OR user-facing:
336
- {impact} = "high"
337
- ELSE IF affects internal systems:
338
- {impact} = "medium"
339
- ELSE:
340
- {impact} = "low"
341
-
342
- {effort} = estimate based on task count
343
-
344
- ---
345
-
346
- ## Step 3: Update Storage (SOURCE OF TRUTH)
347
-
348
- ### Update queue.json
349
-
350
- READ: `{queuePath}` (or create default if not exists)
351
-
352
- Default structure:
353
- ```json
354
- {
355
- "tasks": [],
356
- "lastUpdated": null
357
- }
358
- ```
359
-
360
- For each task in {tasks}, create task object:
361
- ```json
362
- {
363
- "id": "{taskId}",
364
- "description": "{taskDescription}",
365
- "type": "feature",
366
- "priority": "normal",
367
- "section": "active",
368
- "featureId": "{featureId}",
369
- "featureName": "{feature}",
370
- "createdAt": "{now}"
371
- }
372
- ```
373
-
374
- APPEND all tasks to `tasks` array
375
- SET: `lastUpdated` = {now}
376
- WRITE: `{queuePath}`
377
-
378
- ## Step 4: Generate Context (FOR CLAUDE)
379
-
380
- ### Generate context/next.md
381
-
382
- READ: `{queuePath}`
383
- TRANSFORM to markdown:
384
-
385
- ```markdown
386
- # Next
387
-
388
- ## High Priority
389
-
390
- {high priority tasks from queue}
391
-
392
- ## Normal Priority
393
-
394
- - [ ] {task1} @{featureId}
395
- - [ ] {task2} @{featureId}
396
- ...
397
-
398
- ## Low Priority
399
-
400
- {low priority tasks}
401
- ```
402
-
403
- WRITE: `{nextContextPath}`
404
-
405
- ## Step 5: Auto-Start First Task
406
-
407
- READ: `{statePath}`
408
-
409
- IF no currentTask:
410
- ### Start First Task
411
- {firstTask} = first item from {tasks}
412
- GENERATE: {sessionId} = UUID v4
413
-
414
- ### Update state.json
415
- ```json
416
- {
417
- "currentTask": {
418
- "id": "{firstTask.id}",
419
- "description": "{firstTask.description}",
420
- "sessionId": "{sessionId}",
421
- "featureId": "{featureId}",
422
- "startedAt": "{now}",
423
- "status": "active"
424
- },
425
- "pausedTask": null,
426
- "lastUpdated": "{now}"
427
- }
428
- ```
429
- WRITE: `{statePath}`
430
-
431
- ### Generate context/now.md
432
- ```markdown
433
- # NOW
434
-
435
- **{firstTask.description}**
436
-
437
- Started: {now}
438
- Session: {sessionId}
439
- Feature: {featureId}
440
- ```
441
- WRITE: `{globalPath}/context/now.md`
442
-
443
- {autoStarted} = true
444
- ELSE:
445
- {autoStarted} = false
446
-
447
- ## Step 6: Queue Sync Events
448
-
449
- READ: `{syncPath}` or create empty array
450
-
451
- ### Feature created event
452
- APPEND:
453
- ```json
454
- {
455
- "type": "feature.created",
456
- "path": ["queue"],
457
- "data": {
458
- "featureId": "{featureId}",
459
- "name": "{feature}",
460
- "impact": "{impact}",
461
- "effort": "{effort}",
462
- "taskCount": {taskCount}
463
- },
464
- "timestamp": "{now}",
465
- "projectId": "{projectId}"
466
- }
467
- ```
468
-
469
- ### Tasks added events (one per task)
470
- For each task:
471
- ```json
472
- {
473
- "type": "queue.task_added",
474
- "path": ["queue"],
475
- "data": {
476
- "taskId": "{taskId}",
477
- "description": "{taskDescription}",
478
- "featureId": "{featureId}"
479
- },
480
- "timestamp": "{now}",
481
- "projectId": "{projectId}"
482
- }
483
- ```
484
-
485
- IF {autoStarted}:
486
- ```json
487
- {
488
- "type": "task.started",
489
- "path": ["state"],
490
- "data": {
491
- "taskId": "{firstTask.id}",
492
- "sessionId": "{sessionId}",
493
- "featureId": "{featureId}"
494
- },
495
- "timestamp": "{now}",
496
- "projectId": "{projectId}"
497
- }
498
- ```
499
-
500
- WRITE: `{syncPath}`
501
-
502
- ## Step 7: Log to Memory
503
-
504
- APPEND to: `{memoryPath}`
505
- ```json
506
- {"timestamp":"{now}","action":"feature_added","featureId":"{featureId}","feature":"{feature}","tasks":{taskCount}}
507
- ```
508
-
509
- ## Output
510
-
511
- SUCCESS (with auto-start):
512
- ```
513
- ✅ Added: {feature}
514
-
515
- Impact: {impact} | Effort: {effort}
516
- Tasks: {taskCount}
517
-
518
- 🎯 Started: {firstTask.description}
519
-
520
- Next:
521
- • Work on the task
522
- • /p:done - When finished
523
- • /p:next - See full queue
524
- ```
525
-
526
- SUCCESS (without auto-start):
527
- ```
528
- ✅ Added: {feature}
529
-
530
- Impact: {impact} | Effort: {effort}
531
- Tasks: {taskCount}
532
-
533
- ⚠️ Already working on another task.
534
- Tasks added to queue.
535
-
536
- Next:
537
- • /p:done - Finish current task
538
- • /p:next - See queue
539
- ```
540
-
541
- ## Error Handling
542
-
543
- | Error | Response | Action |
544
- |-------|----------|--------|
545
- | No config | "No prjct project" | STOP |
546
- | No feature | Show category menu | WAIT |
547
- | Write fails | Log warning | CONTINUE |
548
-
549
- ## Examples
550
-
551
- ### Example 1: Full 7-Phase Workflow
552
- Input: `/p:feature add user authentication`
553
-
554
- ```
555
- ## Phase 1: Discovery
556
-
557
- Building: OAuth2 authentication with JWT tokens
558
-
559
- Requirements:
560
- - Support Google and GitHub OAuth
561
- - Session persistence
562
- - Secure token handling
563
-
564
- Success looks like:
565
- - Users can log in via OAuth
566
- - Sessions persist across browser refreshes
567
-
568
- ---
569
-
570
- ## Phase 2: Codebase Exploration
571
-
572
- Found similar:
573
- - Session middleware in src/middleware/session.ts
574
- - User model in src/models/user.ts
575
-
576
- Patterns used:
577
- - Middleware pattern for auth checks
578
- - Repository pattern for data access
579
-
580
- Key files to modify:
581
- - src/routes/auth.ts (new)
582
- - src/middleware/session.ts (extend)
583
- - src/models/user.ts (add OAuth fields)
584
-
585
- ---
586
-
587
- ## Phase 3: Clarifying Questions
588
-
589
- Which OAuth providers should we support?
590
- > [User selected: Google and GitHub]
591
-
592
- Should we support "Remember me" functionality?
593
- > [User selected: Yes, 30-day tokens]
594
-
595
- ---
596
-
597
- ## Phase 4: Architecture Design
598
-
599
- ### Option 1: Minimal Changes
600
- - Extend existing session middleware
601
- - Pros: Fast
602
- - Cons: Coupling
603
-
604
- ### Option 2: Clean Architecture
605
- - New AuthService with strategy pattern
606
- - Pros: Testable, extensible
607
- - Cons: More files
608
-
609
- ### Option 3: Pragmatic Balance (Recommended)
610
- - OAuthProvider abstraction, integrate with existing session
611
- - Pros: Clean boundaries, reuses existing code
612
- - Cons: None significant
613
-
614
- Which approach? > [User selected: Option 3]
615
-
616
- ---
617
-
618
- ## Phase 5: Task Breakdown
619
-
620
- Tasks for user authentication:
621
- 1. Create OAuthProvider interface
622
- 2. Implement GoogleOAuthProvider
623
- 3. Implement GitHubOAuthProvider
624
- 4. Add OAuth routes (/auth/google, /auth/github)
625
- 5. Extend session middleware for OAuth tokens
626
- 6. Add "Remember me" token refresh
627
- 7. Write auth integration tests
628
-
629
- Impact: high | Effort: 6-8h
630
-
631
- ---
632
-
633
- ✅ Added: add user authentication
634
-
635
- 🎯 Started: Create OAuthProvider interface
636
-
637
- Next: /p:done | /p:next
638
- ```
639
-
640
- ### Example 2: Frontend Feature with UX/UI Analysis
641
- Input: `/p:feature add dark mode toggle`
642
-
643
- ```
644
- ## Phase 1: Discovery
645
- Building: Dark mode toggle in settings
646
-
647
- ## Phase 2: Exploration
648
- Found: Theme context exists in src/context/theme.tsx
649
- Pattern: React Context for global state
650
-
651
- ## Phase 3: Questions
652
- Requirements are clear. Proceeding to design.
653
-
654
- ## Phase 4: Design
655
-
656
- ### 4.0 UX/UI Analysis
657
-
658
- **User Analysis:**
659
- - Who: Users who prefer dark interfaces or work in low-light
660
- - Problem: Eye strain, preference not respected
661
- - Happy Path: Toggle → Instant switch → Preference saved
662
- - Edge Cases: System preference, mid-animation toggle
663
-
664
- **UX Requirements:**
665
- - [x] User understands action in < 3 seconds (toggle is clear)
666
- - [x] Each action has visual feedback (instant theme switch)
667
- - [x] Errors are clear and recoverable (N/A - no error states)
668
- - [x] Keyboard navigation supported (toggle focusable)
669
- - [x] Contrast ratio >= 4.5:1 (both themes)
670
- - [x] Touch targets >= 44px (toggle size)
671
-
672
- **Aesthetic:** Minimal
673
- - Typography: System font (matches app)
674
- - Animation: Smooth 200ms transition
675
- - Layout: Toggle in settings, icon in header
676
-
677
- ### Architecture
678
- Recommending: Extend existing theme context
679
- (Simple feature, only 1 approach needed)
680
-
681
- ## Phase 5: Tasks
682
- 1. Add dark mode colors to theme context
683
- 2. Create toggle component with a11y support
684
- 3. Add smooth transition animation (200ms)
685
- 4. Persist preference to localStorage
686
- 5. Detect system preference as default
687
-
688
- ---
689
-
690
- ✅ Added: add dark mode toggle
691
-
692
- 🎯 Started: Add dark mode colors to theme context
693
-
694
- Next: /p:done | /p:next
695
- ```