prjct-cli 0.4.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 (71) hide show
  1. package/CHANGELOG.md +312 -0
  2. package/CLAUDE.md +300 -0
  3. package/LICENSE +21 -0
  4. package/README.md +424 -0
  5. package/bin/prjct +214 -0
  6. package/core/agent-detector.js +249 -0
  7. package/core/agents/claude-agent.js +250 -0
  8. package/core/agents/codex-agent.js +256 -0
  9. package/core/agents/terminal-agent.js +465 -0
  10. package/core/analyzer.js +596 -0
  11. package/core/animations-simple.js +240 -0
  12. package/core/animations.js +277 -0
  13. package/core/author-detector.js +218 -0
  14. package/core/capability-installer.js +190 -0
  15. package/core/command-installer.js +775 -0
  16. package/core/commands.js +2050 -0
  17. package/core/config-manager.js +335 -0
  18. package/core/migrator.js +784 -0
  19. package/core/path-manager.js +324 -0
  20. package/core/project-capabilities.js +144 -0
  21. package/core/session-manager.js +439 -0
  22. package/core/version.js +107 -0
  23. package/core/workflow-engine.js +213 -0
  24. package/core/workflow-prompts.js +192 -0
  25. package/core/workflow-rules.js +147 -0
  26. package/package.json +80 -0
  27. package/scripts/install.sh +433 -0
  28. package/scripts/verify-installation.sh +158 -0
  29. package/templates/agents/AGENTS.md +164 -0
  30. package/templates/commands/analyze.md +125 -0
  31. package/templates/commands/cleanup.md +102 -0
  32. package/templates/commands/context.md +105 -0
  33. package/templates/commands/design.md +113 -0
  34. package/templates/commands/done.md +44 -0
  35. package/templates/commands/fix.md +87 -0
  36. package/templates/commands/git.md +79 -0
  37. package/templates/commands/help.md +72 -0
  38. package/templates/commands/idea.md +50 -0
  39. package/templates/commands/init.md +237 -0
  40. package/templates/commands/next.md +74 -0
  41. package/templates/commands/now.md +35 -0
  42. package/templates/commands/progress.md +92 -0
  43. package/templates/commands/recap.md +86 -0
  44. package/templates/commands/roadmap.md +107 -0
  45. package/templates/commands/ship.md +41 -0
  46. package/templates/commands/stuck.md +48 -0
  47. package/templates/commands/task.md +97 -0
  48. package/templates/commands/test.md +94 -0
  49. package/templates/commands/workflow.md +224 -0
  50. package/templates/examples/natural-language-examples.md +320 -0
  51. package/templates/mcp-config.json +8 -0
  52. package/templates/workflows/analyze.md +159 -0
  53. package/templates/workflows/cleanup.md +73 -0
  54. package/templates/workflows/context.md +72 -0
  55. package/templates/workflows/design.md +88 -0
  56. package/templates/workflows/done.md +20 -0
  57. package/templates/workflows/fix.md +201 -0
  58. package/templates/workflows/git.md +192 -0
  59. package/templates/workflows/help.md +13 -0
  60. package/templates/workflows/idea.md +22 -0
  61. package/templates/workflows/init.md +80 -0
  62. package/templates/workflows/natural-language-handler.md +183 -0
  63. package/templates/workflows/next.md +44 -0
  64. package/templates/workflows/now.md +19 -0
  65. package/templates/workflows/progress.md +113 -0
  66. package/templates/workflows/recap.md +66 -0
  67. package/templates/workflows/roadmap.md +95 -0
  68. package/templates/workflows/ship.md +18 -0
  69. package/templates/workflows/stuck.md +25 -0
  70. package/templates/workflows/task.md +109 -0
  71. package/templates/workflows/test.md +243 -0
@@ -0,0 +1,92 @@
1
+ ---
2
+ allowed-tools: [Read, Glob]
3
+ description: "Show progress metrics for specified period"
4
+ ---
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:progress - Progress Metrics
15
+
16
+ ## Purpose
17
+ Display detailed progress metrics and trends for a specified time period.
18
+
19
+ ## Usage
20
+ ```
21
+ /p:progress [day|week|month]
22
+ ```
23
+
24
+ Default: week
25
+
26
+ ## Execution
27
+ 1. Read from `.prjct/progress/shipped.md` for shipped features
28
+ 2. Aggregate metrics from `.prjct/progress/metrics.md`
29
+ 3. Calculate velocity and trends across layers
30
+ 4. Cross-reference with planning and analysis layers
31
+ 5. Display comprehensive progress indicators
32
+
33
+ ## Implementation
34
+
35
+ 1. **Parse timeframe**:
36
+ - day: last 24 hours
37
+ - week: current ISO week
38
+ - month: current calendar month
39
+
40
+ 2. **Calculate layered metrics**:
41
+ - **Progress Layer**: Features shipped, velocity, trends
42
+ - **Core Layer**: Task completion rate, focus time
43
+ - **Planning Layer**: Roadmap progress, idea conversion rate
44
+ - **Memory Layer**: Decision impact, learning velocity
45
+
46
+ 3. **Enhanced response format**:
47
+ ```
48
+ 📈 PROGRESS - This Week
49
+ ━━━━━━━━━━━━━━━━━━━━━━━
50
+
51
+ 🚀 SHIPPED FEATURES
52
+ Count: 7 features (↗ +40% vs last week)
53
+ Velocity: 1.4 features/day
54
+ Quality: 95% passed validation
55
+
56
+ ⚡ CORE PRODUCTIVITY
57
+ Tasks completed: 12 (avg 1.7/day)
58
+ Focus time: 28h (70% efficiency)
59
+ Context switches: 3 (↘ -50%)
60
+
61
+ 💡 PLANNING EXECUTION
62
+ Roadmap progress: 23% complete
63
+ Ideas converted: 4/8 (50% rate)
64
+ Strategic alignment: High
65
+
66
+ 🧠 LEARNING & DECISIONS
67
+ Decisions logged: 3 critical
68
+ Key insights: Architecture patterns
69
+ Knowledge growth: +15% complexity
70
+
71
+ Recent ships:
72
+ • ✅ User authentication (2h ago)
73
+ • ✅ Dashboard redesign (1d ago)
74
+ • ✅ API optimization (2d ago)
75
+
76
+ 🏆 Best day: Tuesday (3 features)
77
+ 🔥 Current streak: 5 days
78
+
79
+ 📂 Deep dive:
80
+ - Metrics: .prjct/progress/metrics.md
81
+ - Shipped: .prjct/progress/shipped.md
82
+ ```
83
+
84
+ 4. **Visual indicators**:
85
+ - 📈 Improving
86
+ - ➡️ Steady
87
+ - 📉 Declining
88
+
89
+ 5. **Motivational insights**:
90
+ - "You're 40% more productive than last week!"
91
+ - "On track to ship 10 features this week!"
92
+ - "Your best week yet!"
@@ -0,0 +1,86 @@
1
+ ---
2
+ allowed-tools: [Read, Glob]
3
+ description: "Show project status overview"
4
+ ---
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:recap - Project Recap
15
+
16
+ ## Purpose
17
+ Display a comprehensive overview of project status and progress.
18
+
19
+ ## Usage
20
+ ```
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
34
+
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
41
+
42
+ 2. **Enhanced response format**:
43
+ ```
44
+ 📊 PROJECT RECAP
45
+ ━━━━━━━━━━━━━━━━━━━
46
+
47
+ 🎯 FOCUS
48
+ Current: [task] (2h 15m)
49
+ Queue: [N] tasks pending
50
+
51
+ 📈 PROGRESS
52
+ Shipped: [X] this week, [Y] total
53
+ Velocity: [X.X] features/day
54
+ Streak: [N] days shipping
55
+
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!"
82
+
83
+ ## Visual Elements
84
+ - Use progress bars for completion
85
+ - Show week-over-week trends
86
+ - Highlight achievements
@@ -0,0 +1,107 @@
1
+ ---
2
+ allowed-tools: [Read, Write, Edit, TodoWrite]
3
+ description: "Strategic planning and feature roadmap management"
4
+ ---
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.
18
+
19
+ ## Usage
20
+ ```
21
+ /p:roadmap [show|add|complete|next]
22
+ ```
23
+
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
45
+
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**:
69
+ ```
70
+ 📍 PRODUCT ROADMAP
71
+
72
+ 🚀 Current Sprint (23% complete)
73
+ ├── ✅ User authentication
74
+ ├── 🔄 Dashboard redesign (in progress)
75
+ └── ⏳ API optimization
76
+
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"
93
+
94
+ 📍 Prioritized as: Next Up #1
95
+ ⚡ Estimated effort: Medium (3-5 days)
96
+ 🎯 Impact score: High
97
+ 🔗 Dependencies: User authentication ✅
98
+
99
+ 📋 Updated roadmap in .prjct/planning/roadmap.md
100
+ ```
101
+
102
+ ## Features
103
+ - Visual progress tracking
104
+ - Smart prioritization
105
+ - Sprint management
106
+ - Velocity tracking
107
+ - Strategic alignment
@@ -0,0 +1,41 @@
1
+ ---
2
+ allowed-tools: [Read, Write, Edit, TodoWrite]
3
+ description: "Ship a feature"
4
+ ---
5
+
6
+ # /p:ship
7
+
8
+ ## Usage
9
+ ```
10
+ /p:ship <feature>
11
+ ```
12
+
13
+ ## Execution
14
+
15
+ 1. Add to `~/.prjct-cli/projects/{id}/progress/shipped.md`:
16
+ ```markdown
17
+ ## Week [W], [YEAR]
18
+ - ✅ [feature] ([timestamp])
19
+ ```
20
+
21
+ 2. Update `progress/metrics.md` (count, velocity, streak)
22
+ 3. Update `core/context.md`
23
+ 4. Log to `memory/context.jsonl`:
24
+ ```json
25
+ {"action":"ship","feature":"[desc]","timestamp":"[ISO]","week":"[w]","layer":"progress","total":[n]}
26
+ ```
27
+
28
+ 5. Response:
29
+ ```
30
+ 🚀 [feature name] shipped!
31
+
32
+ 📈 This week: [count] | Total: [total]
33
+ Velocity: [X] features/day
34
+
35
+ Keep the momentum!
36
+ • "start next task" → Keep building
37
+ • "see my progress" → View stats
38
+ • "plan ahead" → Strategic thinking
39
+
40
+ Or: /p:now | /p:recap | /p:roadmap
41
+ ```
@@ -0,0 +1,48 @@
1
+ ---
2
+ allowed-tools: [Read]
3
+ description: "Get unstuck"
4
+ ---
5
+
6
+ # /p:stuck
7
+
8
+ ## Usage
9
+ ```
10
+ /p:stuck <issue>
11
+ ```
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]
37
+
38
+ Let's break it down:
39
+ 1. [subtask 1] (~15min)
40
+ 2. [subtask 2] (~30min)
41
+
42
+ Ready to start?
43
+ • "start the first part" → Begin small
44
+ • "add these as tasks" → Queue them
45
+ • "think more" → Capture ideas
46
+
47
+ Or: /p:now "[first subtask]" | /p:task | /p:idea
48
+ ```
@@ -0,0 +1,97 @@
1
+ ---
2
+ allowed-tools: [Read, Write, Edit, TodoWrite, Bash, Glob]
3
+ description: "Break down and execute complex tasks systematically"
4
+ ---
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:task - Complex Task Execution
15
+
16
+ ## Purpose
17
+ Handle complex features by breaking them down, executing systematically, and tracking progress. No overwhelm.
18
+
19
+ ## Usage
20
+ ```
21
+ /p:task <description>
22
+ ```
23
+
24
+ ## Execution
25
+ 1. Analyze task complexity
26
+ 2. Break into 3-7 subtasks automatically
27
+ 3. Create execution plan in `.prjct/planning/tasks/`
28
+ 4. Execute each subtask with validation
29
+ 5. Track progress and update metrics
30
+
31
+ ## Implementation
32
+
33
+ **Task breakdown**:
34
+ - Identify main components needed
35
+ - Order by dependencies
36
+ - Estimate time for each
37
+ - Create actionable subtasks
38
+
39
+ **Example breakdown**:
40
+ ```
41
+ /p:task "implement user authentication"
42
+
43
+ 📋 Task Plan Created:
44
+
45
+ 1. Database schema (15 min)
46
+ - User table with email/password
47
+ - Sessions table
48
+
49
+ 2. Auth middleware (30 min)
50
+ - JWT token generation
51
+ - Route protection
52
+
53
+ 3. API endpoints (45 min)
54
+ - POST /auth/signup
55
+ - POST /auth/login
56
+ - POST /auth/logout
57
+
58
+ 4. Frontend forms (30 min)
59
+ - Login component
60
+ - Signup component
61
+
62
+ 5. Testing (20 min)
63
+ - Auth flow tests
64
+ - Security tests
65
+
66
+ 🚀 Starting execution...
67
+ [1/5] Creating database schema... ✅
68
+ [2/5] Building auth middleware... 🔄
69
+ ```
70
+
71
+ **Progress tracking**:
72
+ - Real-time status updates
73
+ - Save progress between sessions
74
+ - Resume interrupted tasks
75
+ - Log to `.prjct/memory/context.jsonl`
76
+
77
+ **Response format**:
78
+ ```
79
+ ✅ Task completed: User authentication
80
+
81
+ 📊 Execution Summary:
82
+ • Time: 2h 15min (estimated 2h 20min)
83
+ • Subtasks: 5/5 completed
84
+ • Tests: All passing
85
+ • Files: 12 created/modified
86
+
87
+ 📝 Logged to: .prjct/planning/tasks/auth_system.md
88
+
89
+ 💡 Next: /p:ship "user authentication"
90
+ ```
91
+
92
+ ## Features
93
+ - Automatic task decomposition
94
+ - Progress persistence
95
+ - Time tracking
96
+ - Dependency management
97
+ - Smart validation gates
@@ -0,0 +1,94 @@
1
+ ---
2
+ allowed-tools: [Bash, Read, Edit, Glob]
3
+ description: "Run tests and auto-fix simple failures"
4
+ ---
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:test - Smart Test Execution
15
+
16
+ ## Purpose
17
+ Run tests, show failures clearly, and auto-fix obvious issues. Ship with confidence.
18
+
19
+ ## Usage
20
+ ```
21
+ /p:test [all|unit|e2e|failed]
22
+ ```
23
+
24
+ Default: all
25
+
26
+ ## Execution
27
+ 1. Detect test runner (jest/vitest/mocha/pytest)
28
+ 2. Run tests with appropriate command
29
+ 3. Parse and display results with clarity
30
+ 4. Auto-fix simple test failures
31
+ 5. Update `.prjct/progress/metrics.md` with coverage
32
+
33
+ ## Implementation
34
+
35
+ **Test detection**:
36
+ ```bash
37
+ # Auto-detect test command from package.json or config
38
+ - npm test / npm run test
39
+ - pytest / python -m pytest
40
+ - go test ./...
41
+ - cargo test
42
+ ```
43
+
44
+ **Auto-fixable issues**:
45
+ - Snapshot updates → Update automatically
46
+ - Timeout errors → Increase timeout
47
+ - Import errors → Fix imports
48
+ - Expected vs received → Show diff clearly
49
+
50
+ **Response format for success**:
51
+ ```
52
+ ✅ All tests passing!
53
+
54
+ 📊 Test Results:
55
+ • Unit: 45/45 passed
56
+ • Integration: 12/12 passed
57
+ • E2E: 8/8 passed
58
+
59
+ 🎯 Coverage: 87% (+2%)
60
+ ⚡ Time: 4.2s
61
+
62
+ 🚀 Ready to ship!
63
+ ```
64
+
65
+ **Response format for failures**:
66
+ ```
67
+ ❌ 3 tests failing
68
+
69
+ 1️⃣ UserService.test.js:
70
+ Expected: "John Doe"
71
+ Received: "John"
72
+
73
+ 💡 Auto-fix available: /p:test fix
74
+
75
+ 2️⃣ auth.e2e.js:
76
+ Timeout after 5000ms
77
+
78
+ 💡 Increasing timeout to 10000ms...
79
+
80
+ 📊 Summary: 62/65 passed (95%)
81
+ ```
82
+
83
+ **Quick commands**:
84
+ - `/p:test` - Run all tests
85
+ - `/p:test failed` - Re-run only failed tests
86
+ - `/p:test watch` - Run in watch mode
87
+ - `/p:test fix` - Apply available auto-fixes
88
+
89
+ ## Features
90
+ - Smart failure detection
91
+ - Clear error messages
92
+ - Auto-fix common issues
93
+ - Coverage tracking
94
+ - Performance monitoring