prjct-cli 0.5.0 → 0.6.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +169 -1
  2. package/CLAUDE.md +43 -28
  3. package/README.md +4 -4
  4. package/bin/prjct +78 -63
  5. package/core/agent-generator.js +19 -10
  6. package/core/ascii-graphics.js +433 -0
  7. package/core/command-registry.js +553 -0
  8. package/core/commands.js +274 -62
  9. package/core/task-schema.js +342 -0
  10. package/package.json +4 -3
  11. package/templates/agents/AGENTS.md +79 -101
  12. package/templates/agents/be.template.md +14 -29
  13. package/templates/agents/coordinator.template.md +34 -0
  14. package/templates/agents/data.template.md +14 -28
  15. package/templates/agents/devops.template.md +14 -28
  16. package/templates/agents/fe.template.md +14 -29
  17. package/templates/agents/mobile.template.md +14 -28
  18. package/templates/agents/qa.template.md +14 -41
  19. package/templates/agents/scribe.template.md +15 -81
  20. package/templates/agents/security.template.md +14 -28
  21. package/templates/agents/ux.template.md +14 -36
  22. package/templates/commands/analyze.md +36 -239
  23. package/templates/commands/build.md +41 -0
  24. package/templates/commands/cleanup.md +24 -87
  25. package/templates/commands/context.md +24 -93
  26. package/templates/commands/design.md +20 -98
  27. package/templates/commands/done.md +16 -181
  28. package/templates/commands/fix.md +27 -66
  29. package/templates/commands/git.md +33 -60
  30. package/templates/commands/help.md +18 -52
  31. package/templates/commands/idea.md +11 -36
  32. package/templates/commands/init.md +30 -277
  33. package/templates/commands/next.md +20 -62
  34. package/templates/commands/now.md +18 -22
  35. package/templates/commands/progress.md +23 -78
  36. package/templates/commands/recap.md +22 -74
  37. package/templates/commands/roadmap.md +21 -90
  38. package/templates/commands/ship.md +26 -161
  39. package/templates/commands/status.md +40 -0
  40. package/templates/commands/stuck.md +21 -33
  41. package/templates/commands/sync.md +19 -209
  42. package/templates/commands/task.md +18 -80
  43. package/templates/commands/test.md +23 -72
  44. package/templates/commands/workflow.md +20 -212
  45. package/templates/agents/pm.template.md +0 -84
@@ -1,86 +1,34 @@
1
1
  ---
2
- allowed-tools: [Read, Glob]
3
- description: "Show project status overview"
2
+ allowed-tools: [Read]
3
+ description: "Project status overview"
4
4
  ---
5
5
 
6
- ## Global Architecture
7
- This command uses the global prjct architecture:
8
- - Data stored in: `~/.prjct-cli/projects/{id}/`
9
- - Config stored in: `{project}/.prjct/prjct.config.json`
10
- - Commands synchronized across all editors
6
+ # /p:recap
11
7
 
8
+ ## Flow
9
+ 1. Read: all data layers (core, progress, planning, analysis, memory)
10
+ 2. Aggregate: metrics and status from each layer
11
+ 3. Display: comprehensive overview
12
12
 
13
-
14
- # /p:recap - Project Recap
15
-
16
- ## Purpose
17
- Display a comprehensive overview of project status and progress.
18
-
19
- ## Usage
13
+ ## Response
20
14
  ```
21
- /p:recap
22
- ```
23
-
24
- ## Execution
25
- 1. Read current task from `.prjct/core/now.md`
26
- 2. Aggregate metrics from `.prjct/progress/metrics.md`
27
- 3. Count shipped features from `.prjct/progress/shipped.md`
28
- 4. Count queue items from `.prjct/core/next.md`
29
- 5. Count ideas from `.prjct/planning/ideas.md`
30
- 6. Reference project analysis and context
31
- 7. Display comprehensive layered summary
32
-
33
- ## Implementation
15
+ 📊 PROJECT RECAP
16
+ ━━━━━━━━━━━━━━━━
34
17
 
35
- 1. **Gather cross-layer metrics**:
36
- - **Core Layer**: Current task and duration, next queue
37
- - **Progress Layer**: Shipped features, metrics, velocity trends
38
- - **Planning Layer**: Ideas count, roadmap progress
39
- - **Analysis Layer**: Repository insights, technical context
40
- - **Memory Layer**: Decision history, learnings
18
+ 🎯 FOCUS
19
+ Current: {task} ({duration})
20
+ Queue: {N} tasks
41
21
 
42
- 2. **Enhanced response format**:
43
- ```
44
- 📊 PROJECT RECAP
45
- ━━━━━━━━━━━━━━━━━━━
22
+ 📈 PROGRESS
23
+ Shipped: {X} this week
24
+ Velocity: {X.X} features/day
46
25
 
47
- 🎯 FOCUS
48
- Current: [task] (2h 15m)
49
- Queue: [N] tasks pending
26
+ 💡 PLANNING
27
+ Ideas: {M} captured
28
+ Roadmap: {X}% complete
50
29
 
51
- 📈 PROGRESS
52
- Shipped: [X] this week, [Y] total
53
- Velocity: [X.X] features/day
54
- Streak: [N] days shipping
30
+ {motivational_message}
55
31
 
56
- 💡 PLANNING
57
- Ideas: [M] captured
58
- Roadmap: [X]% complete
59
-
60
- 🔍 INSIGHTS
61
- Repository: [project_type] with [tech_stack]
62
- Architecture: [key_patterns]
63
-
64
- 🧠 MEMORY
65
- Decisions: [N] logged
66
- Learnings: [key_insights]
67
-
68
- [Motivational message based on metrics]
69
-
70
- 📂 Quick Access:
71
- - Core: .prjct/core/ (focus & priorities)
72
- - Progress: .prjct/progress/ (metrics & shipped)
73
- - Planning: .prjct/planning/ (ideas & roadmap)
74
- - Analysis: .prjct/analysis/ (technical insights)
75
- ```
76
-
77
- 3. **Motivational messages**:
78
- - High velocity: "🔥 You're on fire! Keep shipping!"
79
- - Many ideas: "💡 Creative flow is strong!"
80
- - Long streak: "🏆 Consistency champion!"
81
- - Empty queue: "🎆 Time to dream bigger!"
32
+ /p:now | /p:status | /p:next
33
+ ```
82
34
 
83
- ## Visual Elements
84
- - Use progress bars for completion
85
- - Show week-over-week trends
86
- - Highlight achievements
@@ -1,107 +1,38 @@
1
1
  ---
2
- allowed-tools: [Read, Write, Edit, TodoWrite]
3
- description: "Strategic planning and feature roadmap management"
2
+ allowed-tools: [Read, Write]
3
+ description: "Strategic roadmap management"
4
4
  ---
5
5
 
6
- ## Global Architecture
7
- This command uses the global prjct architecture:
8
- - Data stored in: `~/.prjct-cli/projects/{id}/`
9
- - Config stored in: `{project}/.prjct/prjct.config.json`
10
- - Commands synchronized across all editors
11
-
12
-
13
-
14
- # /p:roadmap - Strategic Planning
15
-
16
- ## Purpose
17
- Plan features, track strategic progress, and stay aligned with goals. Zero PM overhead.
6
+ # /p:roadmap
18
7
 
19
8
  ## Usage
20
9
  ```
21
- /p:roadmap [show|add|complete|next]
10
+ /p:roadmap [show|add|complete|next] # Default: show
22
11
  ```
23
12
 
24
- Default: show
25
-
26
- ## Execution
27
-
28
- ### `/p:roadmap` or `/p:roadmap show`
29
- Display current roadmap with progress
30
-
31
- ### `/p:roadmap add <feature>`
32
- Add feature to roadmap with smart prioritization
33
-
34
- ### `/p:roadmap complete <feature>`
35
- Mark feature as shipped and celebrate
36
-
37
- ### `/p:roadmap next`
38
- Show next priority item to work on
39
-
40
- ## Implementation
41
-
42
- **Roadmap structure** in `.prjct/planning/roadmap.md`:
43
- ```markdown
44
- # Product Roadmap
13
+ ## Flow
14
+ 1. Parse: action (show/add/complete/next)
15
+ 2. Read: `planning/roadmap.md`
16
+ 3. Execute: based on action
17
+ 4. Update: roadmap file if needed
45
18
 
46
- ## 🚀 Current Sprint (Week X)
47
- - [x] User authentication
48
- - [ ] Dashboard redesign
49
- - [ ] API optimization
50
-
51
- ## 📅 Next Up
52
- - [ ] Real-time notifications
53
- - [ ] Data export feature
54
- - [ ] Mobile responsive design
55
-
56
- ## 🌟 Future Vision
57
- - [ ] AI recommendations
58
- - [ ] Team collaboration
59
- - [ ] Analytics dashboard
60
- ```
61
-
62
- **Smart prioritization**:
63
- - Impact vs effort matrix
64
- - User value scoring
65
- - Technical dependencies
66
- - Strategic alignment
67
-
68
- **Response format for show**:
19
+ ## Response (show)
69
20
  ```
70
21
  📍 PRODUCT ROADMAP
71
22
 
72
- 🚀 Current Sprint (23% complete)
73
- ├── ✅ User authentication
74
- ├── 🔄 Dashboard redesign (in progress)
75
- └── ⏳ API optimization
23
+ 🚀 Current Sprint ({X}% complete)
24
+ ├── ✅ {feature}
25
+ ├── 🔄 {feature} (in progress)
26
+ └── ⏳ {feature}
76
27
 
77
- 📅 Next Up (3 features)
78
- ├── Real-time notifications
79
- ├── Data export feature
80
- └── Mobile responsive design
81
-
82
- 📊 Progress Metrics:
83
- • Sprint velocity: 1.4 features/week
84
- • On track for: Dec 15 completion
85
- • Strategic alignment: High
86
-
87
- 💡 Start next: /p:now "Dashboard redesign"
88
- ```
89
-
90
- **Response format for add**:
91
- ```
92
- ✅ Added to roadmap: "Payment integration"
28
+ 📅 Next Up ({N} features)
29
+ ├── {feature}
30
+ └── {feature}
93
31
 
94
- 📍 Prioritized as: Next Up #1
95
- Estimated effort: Medium (3-5 days)
96
- 🎯 Impact score: High
97
- 🔗 Dependencies: User authentication ✅
32
+ 📊 Progress:
33
+ Velocity: {X.X} features/week
34
+ On track: {date}
98
35
 
99
- 📋 Updated roadmap in .prjct/planning/roadmap.md
36
+ /p:now "{next_feature}"
100
37
  ```
101
38
 
102
- ## Features
103
- - Visual progress tracking
104
- - Smart prioritization
105
- - Sprint management
106
- - Velocity tracking
107
- - Strategic alignment
@@ -1,181 +1,46 @@
1
1
  ---
2
- allowed-tools: [Read, Write, Edit, TodoWrite]
3
- description: "Ship a feature"
2
+ allowed-tools: [Read, Write, Bash]
3
+ description: "Ship feature with Git commit/push"
4
4
  ---
5
5
 
6
6
  # /p:ship
7
7
 
8
8
  ## Usage
9
9
  ```
10
- /p:ship <feature>
10
+ /p:ship # Current task
11
+ /p:ship <feature> # Named feature
11
12
  ```
12
13
 
13
- ## Execution
14
+ ## Flow
15
+ 1. Get: feature name (from arg or `core/now.md`)
16
+ 2. Git: `add .` → check status
17
+ 3. Create: commit message with metadata
18
+ 4. Commit: with message
19
+ 5. Prompt: "Push? (y/n)"
20
+ 6. If yes: `git push`
21
+ 7. Update: `progress/shipped.md`, clear `core/now.md`
22
+ 8. Log: `memory/context.jsonl`
14
23
 
15
- 1. Add to `~/.prjct-cli/projects/{id}/progress/shipped.md`:
16
- ```markdown
17
- ## Week [W], [YEAR]
18
- - ✅ [feature] ([timestamp])
19
- ```
20
-
21
- 2. **Trigger Scribe Agent** (Documentation):
22
- - Get git changes for the feature: `git diff --name-only`
23
- - Invoke Scribe agent to document the shipped feature
24
- - Show documentation draft to user
25
- - **Request confirmation** before saving
26
- - Save to `analysis/feature-docs/[feature-id].md` if confirmed
27
-
28
- 3. Update `progress/metrics.md` (count, velocity, streak)
29
- 4. Update `core/context.md`
30
- 5. Log to `memory/context.jsonl`:
31
- ```json
32
- {"action":"ship","feature":"[desc]","timestamp":"[ISO]","week":"[w]","layer":"progress","total":[n],"documented":true}
33
- ```
34
-
35
- 6. Response:
36
- ```
37
- 🚀 [feature name] shipped!
38
-
39
- 📈 This week: [count] | Total: [total]
40
- Velocity: [X] features/day
41
-
42
- Keep the momentum!
43
- • "start next task" → Keep building
44
- • "see my progress" → View stats
45
- • "plan ahead" → Strategic thinking
46
-
47
- Or: /p:now | /p:recap | /p:roadmap
48
- ```
49
-
50
- ## Scribe Agent Workflow
51
-
52
- When a feature is shipped, the Scribe agent is automatically invoked to document changes:
53
-
54
- ### Step 1: Detect Changes
55
- ```javascript
56
- const gitIntegration = require('../core/git-integration')
57
-
58
- // Get files changed for this feature
59
- const changes = await gitIntegration.getChangesSince(featureStartTime)
60
- ```
61
-
62
- ### Step 2: Generate Documentation
63
- Invoke Scribe agent with prompt:
24
+ ## Commit Message
64
25
  ```
65
- Document the following shipped feature:
66
-
67
- Feature: "[feature description]"
68
- Shipped: [timestamp]
69
- Files changed:
70
- ${changes.files.join('\n')}
26
+ feat: {feature_name}
71
27
 
72
- Generate release documentation including:
73
- 1. Feature overview and user impact
74
- 2. Technical implementation summary
75
- 3. Key files and components affected
76
- 4. Breaking changes or migration notes (if any)
77
- 5. Usage examples
28
+ Agent: {agent}
29
+ Dev: @{github_dev}
30
+ Complexity: {complexity}
31
+ Time: {actual_time}
78
32
 
79
- Keep it concise and user-focused (< 300 words).
33
+ Generated-by: prjct/cli
34
+ Co-Authored-By: @{github_dev}
80
35
  ```
81
36
 
82
- ### Step 3: Show Draft & Request Confirmation
37
+ ## Response
83
38
  ```
84
- 📝 Scribe Agent Feature Documentation
85
-
86
- ## Feature: [feature description]
87
-
88
- **Shipped**: [date]
89
- **Impact**: [user-facing impact]
90
-
91
- **Overview**:
92
- [AI-generated feature summary]
93
-
94
- **Technical Details**:
95
- - [Implementation highlights]
96
- - [Key components]
39
+ 🚀 {feature} shipped!
97
40
 
98
- **Usage**:
99
- [Examples if applicable]
41
+ ✅ Committed {+ pushed}
42
+ {agent_icon} {agent} • {actual_time}
100
43
 
101
- **Breaking Changes**: [None / List]
102
-
103
- ─────────────────────────────────────
104
-
105
- Save this documentation? (y/n): _
44
+ /p:next | /p:status
106
45
  ```
107
46
 
108
- ### Step 4: Save if Confirmed
109
- ```javascript
110
- if (userConfirms) {
111
- const docPath = `~/.prjct-cli/projects/{id}/analysis/feature-docs/${featureId}.md`
112
- await saveDocumentation(docPath, documentation)
113
- console.log('✅ Feature documentation saved!')
114
- } else {
115
- console.log('ℹ️ Documentation discarded')
116
- }
117
- ```
118
-
119
- ## Example with Scribe
120
-
121
- ```
122
- /p:ship "authentication system"
123
-
124
- 🚀 authentication system shipped!
125
-
126
- 📝 Scribe Agent is documenting your feature...
127
-
128
- ─────────────────────────────────────────────
129
-
130
- ## Feature: authentication system
131
-
132
- **Shipped**: 2025-10-02
133
- **Impact**: Users can now securely log in and manage sessions
134
-
135
- **Overview**:
136
- Implemented JWT-based authentication with login, registration, and password reset. Added middleware for protected routes and session management with automatic token refresh.
137
-
138
- **Technical Details**:
139
- - JWT authentication with bcrypt password hashing
140
- - Login/register/reset endpoints in auth.controller.ts
141
- - JWT middleware for route protection
142
- - Redis-based session management with 7-day expiry
143
- - Email verification workflow
144
-
145
- **Files Modified**:
146
- - src/features/auth/auth.service.ts (new)
147
- - src/features/auth/auth.controller.ts (new)
148
- - src/middleware/jwt.middleware.ts (new)
149
- - src/config/redis.config.ts (modified)
150
-
151
- **Breaking Changes**: None
152
-
153
- **Usage**:
154
- ```javascript
155
- // Protected route example
156
- app.get('/api/profile', jwtMiddleware, profileController.get)
157
- ```
158
-
159
- ─────────────────────────────────────────────
160
-
161
- Save this documentation? (y/n): y
162
-
163
- ✅ Feature documentation saved to analysis/feature-docs/!
164
-
165
- 📈 This week: 3 | Total: 15
166
- Velocity: 2.1 features/day
167
-
168
- Keep the momentum!
169
- • "start next task" → Keep building
170
- • "see my progress" → View stats
171
-
172
- Or: /p:now | /p:recap
173
- ```
174
-
175
- ## Notes
176
-
177
- - Scribe agent uses git history to understand feature scope
178
- - Documentation is saved per-feature for release notes
179
- - User confirmation prevents unwanted documentation
180
- - Can skip documentation by saying "no"
181
- - Feature docs help with changelog generation and onboarding
@@ -0,0 +1,40 @@
1
+ ---
2
+ allowed-tools: [Read]
3
+ description: "KPI dashboard with ASCII graphics"
4
+ ---
5
+
6
+ # /p:status
7
+
8
+ ## Flow
9
+ 1. Read: all core files + progress files
10
+ 2. Calculate: metrics (sprint %, tasks complete, days since ship, etc.)
11
+ 3. Render: `ASCIIGraphics.createDashboard(data)`
12
+
13
+ ## Data Structure
14
+ ```js
15
+ {
16
+ sprintProgress: (complete / total) * 100,
17
+ tasksComplete: count,
18
+ tasksTotal: count,
19
+ ideasCount: count,
20
+ daysSinceShip: days,
21
+ currentTask: string,
22
+ taskTime: 'Xh Ym ago'
23
+ }
24
+ ```
25
+
26
+ ## Output (Catppuccin Mocha)
27
+ ```
28
+ ┌─ Project Status ────────────────┐
29
+ │ Sprint Progress [████░] 80% │
30
+ │ Tasks Complete 12/15 │
31
+ │ Ideas Backlog 8 │
32
+ │ Days Since Ship 3 │
33
+ ├─ Current Focus ─────────────────┤
34
+ │ → {current_task} │
35
+ │ Started: {time_ago} │
36
+ └─────────────────────────────────┘
37
+ ```
38
+
39
+ **Colors**: Mauve borders, Teal progress, Sapphire highlights, Green/Yellow/Red for status
40
+
@@ -10,39 +10,27 @@ description: "Get unstuck"
10
10
  /p:stuck <issue>
11
11
  ```
12
12
 
13
- ## Execution
14
-
15
- 1. Detect issue type (bug/design/perf/feature)
16
- 2. Check context:
17
- - `~/.prjct-cli/projects/{id}/analysis/repo-summary.md`
18
- - `~/.prjct-cli/projects/{id}/memory/context.jsonl`
19
- 3. Log to `memory/context.jsonl`:
20
- ```json
21
- {"action":"stuck","issue":"[desc]","category":"[type]","approach":"[steps]","status":"in_progress"}
22
- ```
23
-
24
- 4. Response by type:
25
-
26
- **Bug**: `🔍 1. Check logs 2. Isolate problem 3. Search error`
27
-
28
- **Design**: `🎨 1. Define requirements 2. Start simple 3. Ship MVP`
29
-
30
- **Performance**: `⚡ 1. Profile first 2. Fix slowest 3. Cache operations`
31
-
32
- **Default**: `💡 1. Break into tasks 2. Start smallest 3. Ship it`
33
-
34
- 5. Suggest breakdown + next actions:
35
- ```
36
- 💡 [Type-specific guidance above]
13
+ ## Flow
14
+ 1. Detect: issue type (bug/design/perf/feature)
15
+ 2. Check: context from analysis + memory
16
+ 3. Provide: type-specific guidance
17
+ 4. Suggest: breakdown + next actions
18
+ 5. Log: `memory/context.jsonl`
19
+
20
+ ## Guidance by Type
21
+ - **Bug**: 🔍 Check logs → Isolate → Search error
22
+ - **Design**: 🎨 Define requirements → Start simple → Ship MVP
23
+ - **Performance**: ⚡ Profile first → Fix slowest → Cache ops
24
+ - **Default**: 💡 Break into tasks → Start smallest → Ship it
25
+
26
+ ## Response
27
+ ```
28
+ 💡 {type_guidance}
37
29
 
38
- Let's break it down:
39
- 1. [subtask 1] (~15min)
40
- 2. [subtask 2] (~30min)
30
+ Let's break it down:
31
+ 1. {subtask} (~{time})
32
+ 2. {subtask} (~{time})
41
33
 
42
- Ready to start?
43
- • "start the first part" → Begin small
44
- • "add these as tasks" → Queue them
45
- • "think more" → Capture ideas
34
+ /p:now "{first}" | /p:task
35
+ ```
46
36
 
47
- Or: /p:now "[first subtask]" | /p:task | /p:idea
48
- ```