prjct-cli 0.5.1 → 0.7.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 (81) hide show
  1. package/CHANGELOG.md +220 -7
  2. package/CLAUDE.md +476 -55
  3. package/README.md +48 -55
  4. package/bin/prjct +170 -225
  5. package/core/agentic/command-executor.js +113 -0
  6. package/core/agentic/context-builder.js +85 -0
  7. package/core/agentic/prompt-builder.js +86 -0
  8. package/core/agentic/template-loader.js +104 -0
  9. package/core/agentic/tool-registry.js +117 -0
  10. package/core/command-registry.js +597 -0
  11. package/core/commands.js +2046 -2028
  12. package/core/domain/agent-generator.js +118 -0
  13. package/core/domain/analyzer.js +211 -0
  14. package/core/domain/architect-session.js +300 -0
  15. package/core/{agents → infrastructure/agents}/claude-agent.js +16 -13
  16. package/core/{author-detector.js → infrastructure/author-detector.js} +3 -1
  17. package/core/{capability-installer.js → infrastructure/capability-installer.js} +3 -6
  18. package/core/{command-installer.js → infrastructure/command-installer.js} +4 -2
  19. package/core/{config-manager.js → infrastructure/config-manager.js} +4 -4
  20. package/core/{editors-config.js → infrastructure/editors-config.js} +2 -10
  21. package/core/{migrator.js → infrastructure/migrator.js} +34 -19
  22. package/core/{path-manager.js → infrastructure/path-manager.js} +20 -44
  23. package/core/{session-manager.js → infrastructure/session-manager.js} +45 -105
  24. package/core/{update-checker.js → infrastructure/update-checker.js} +67 -67
  25. package/core/{animations-simple.js → utils/animations.js} +3 -23
  26. package/core/utils/date-helper.js +238 -0
  27. package/core/utils/file-helper.js +327 -0
  28. package/core/utils/jsonl-helper.js +206 -0
  29. package/core/{project-capabilities.js → utils/project-capabilities.js} +21 -22
  30. package/core/utils/session-helper.js +277 -0
  31. package/core/{version.js → utils/version.js} +1 -1
  32. package/package.json +5 -12
  33. package/templates/agents/AGENTS.md +151 -99
  34. package/templates/analysis/analyze.md +84 -0
  35. package/templates/commands/analyze.md +37 -233
  36. package/templates/commands/bug.md +79 -0
  37. package/templates/commands/build.md +44 -0
  38. package/templates/commands/cleanup.md +24 -84
  39. package/templates/commands/design.md +20 -95
  40. package/templates/commands/done.md +17 -180
  41. package/templates/commands/feature.md +113 -0
  42. package/templates/commands/fix.md +58 -66
  43. package/templates/commands/git.md +35 -57
  44. package/templates/commands/help.md +18 -52
  45. package/templates/commands/idea.md +18 -34
  46. package/templates/commands/init.md +65 -257
  47. package/templates/commands/next.md +20 -60
  48. package/templates/commands/now.md +21 -23
  49. package/templates/commands/progress.md +40 -73
  50. package/templates/commands/recap.md +52 -75
  51. package/templates/commands/roadmap.md +30 -85
  52. package/templates/commands/ship.md +93 -126
  53. package/templates/commands/status.md +42 -0
  54. package/templates/commands/sync.md +19 -205
  55. package/templates/commands/task.md +19 -79
  56. package/templates/commands/test.md +25 -71
  57. package/templates/commands/workflow.md +20 -210
  58. package/core/agent-generator.js +0 -516
  59. package/core/analyzer.js +0 -600
  60. package/core/animations.js +0 -277
  61. package/core/git-integration.js +0 -401
  62. package/core/workflow-engine.js +0 -213
  63. package/core/workflow-prompts.js +0 -192
  64. package/core/workflow-rules.js +0 -147
  65. package/scripts/post-install.js +0 -121
  66. package/scripts/preuninstall.js +0 -94
  67. package/scripts/verify-installation.sh +0 -158
  68. package/templates/agents/be.template.md +0 -42
  69. package/templates/agents/data.template.md +0 -41
  70. package/templates/agents/devops.template.md +0 -41
  71. package/templates/agents/fe.template.md +0 -42
  72. package/templates/agents/mobile.template.md +0 -41
  73. package/templates/agents/pm.template.md +0 -84
  74. package/templates/agents/qa.template.md +0 -54
  75. package/templates/agents/scribe.template.md +0 -95
  76. package/templates/agents/security.template.md +0 -41
  77. package/templates/agents/ux.template.md +0 -49
  78. package/templates/commands/context.md +0 -105
  79. package/templates/commands/stuck.md +0 -48
  80. package/templates/examples/natural-language-examples.md +0 -532
  81. /package/core/{agent-detector.js → infrastructure/agent-detector.js} +0 -0
@@ -1,41 +0,0 @@
1
- ---
2
- name: p_agent_security
3
- description: Security Engineer for [PROJECT_NAME]. Expert in application security and threat modeling. Triggers on: "security", "vulnerability", "auth", "encryption", "OWASP", "audit".
4
- tools: str_replace_editor, create_file, delete_file, find_files, list_dir, search_files, view_file, run_terminal_command
5
- model: opus
6
- color: magenta
7
- ---
8
-
9
- You are a Security Engineer for **[PROJECT_NAME]**.
10
-
11
- ## Project Context
12
- - **Type**: [PROJECT_TYPE]
13
- - **Stack**: [DETECTED_STACK]
14
-
15
- ## Core Expertise
16
- - **Threat Modeling**: STRIDE, attack trees
17
- - **OWASP Top 10**: Web application security
18
- - **Authentication**: OAuth, JWT, session management
19
- - **Encryption**: Data at rest and in transit
20
- - **Security Audits**: Code review, penetration testing
21
-
22
- ## NOT Your Expertise
23
- - UI/UX design
24
- - Feature implementation
25
- - Performance optimization (unless security-related)
26
-
27
- ## Security Principles
28
- 1. **Defense in Depth**: Multiple layers of security
29
- 2. **Least Privilege**: Minimal necessary permissions
30
- 3. **Fail Secure**: Fail closed, not open
31
- 4. **Input Validation**: Never trust user input
32
- 5. **Security by Design**: Not an afterthought
33
-
34
- ## Focus Areas
35
- - Security vulnerability assessment
36
- - Authentication and authorization
37
- - Data protection
38
- - Security best practices
39
- - Compliance requirements
40
-
41
- Remember: Security is everyone's concern, but you ensure it's implemented correctly.
@@ -1,49 +0,0 @@
1
- ---
2
- name: p_agent_ux
3
- description: UX Designer for [PROJECT_NAME]. Expert in user experience and interface design. Triggers on: "design", "UX", "UI", "mockup", "prototype", "user flow", "accessibility".
4
- tools: str_replace_editor, create_file, delete_file, find_files, list_dir, search_files, view_file, web_search
5
- model: opus
6
- color: purple
7
- ---
8
-
9
- You are a UX/UI Designer for **[PROJECT_NAME]**.
10
-
11
- ## Project Context
12
- - **Type**: [PROJECT_TYPE]
13
- - **Stack**: [DETECTED_STACK]
14
-
15
- ## Core Expertise
16
- - **User Research**: Understanding user needs and behaviors
17
- - **Interface Design**: Visual hierarchy, typography, color
18
- - **Interaction Design**: User flows, micro-interactions
19
- - **Accessibility**: WCAG 2.1 AA compliance
20
- - **Design Systems**: Consistent, scalable component libraries
21
-
22
- ## NOT Your Expertise
23
- - Backend implementation details
24
- - Database design
25
- - Server deployment
26
- - Technical performance optimization (defer to engineers)
27
-
28
- ## Design Principles
29
- 1. **User-Centered**: Always prioritize user needs
30
- 2. **Accessibility First**: Design for all users
31
- 3. **Consistency**: Maintain design system standards
32
- 4. **Simplicity**: Clear, intuitive interfaces
33
- 5. **Mobile-First**: Responsive by default
34
-
35
- ## Focus Areas
36
- - User interface mockups and prototypes
37
- - User flow diagrams
38
- - Design system components
39
- - Accessibility compliance
40
- - Visual design and branding
41
-
42
- ## Workflow
43
- 1. Understand user needs
44
- 2. Create wireframes/mockups
45
- 3. Define component specifications
46
- 4. Collaborate with Frontend for implementation
47
- 5. Review and iterate
48
-
49
- Remember: You design the experience, Frontend implements it. Focus on the "what" and "why", not the "how" of implementation.
@@ -1,105 +0,0 @@
1
- ---
2
- allowed-tools: [Read, Glob, Bash]
3
- description: "Show project context and recent activity"
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:context - Project Context
15
-
16
- ## Purpose
17
- Display project context including type, current task, and recent activity.
18
-
19
- ## Usage
20
- ```
21
- /p:context
22
- ```
23
-
24
- ## Execution
25
- 1. Aggregate context from all project layers
26
- 2. Reference analysis for technical context
27
- 3. Show current task and planning alignment
28
- 4. Display recent activity from memory layer
29
- 5. Provide cross-layer insights and suggestions
30
-
31
- ## Implementation
32
-
33
- 1. **Layer aggregation**:
34
- - **Core Layer**: Current task from `.prjct/core/now.md`, queue from `.prjct/core/next.md`
35
- - **Analysis Layer**: Project insights from `.prjct/analysis/repo-summary.md`
36
- - **Planning Layer**: Roadmap status from `.prjct/planning/roadmap.md`
37
- - **Progress Layer**: Recent metrics from `.prjct/progress/metrics.md`
38
- - **Memory Layer**: Activity history from `.prjct/memory/context.jsonl`
39
-
40
- 2. **Enhanced context reading**:
41
- - Project type and architecture from analysis layer
42
- - Strategic alignment from planning layer
43
- - Performance metrics from progress layer
44
- - Decision history from memory layer
45
-
46
- 3. **Comprehensive response format**:
47
- ```
48
- 🌍 PROJECT CONTEXT
49
- ━━━━━━━━━━━━━━━━━━━━━━━
50
-
51
- 📦 PROJECT OVERVIEW
52
- Type: Next.js Application
53
- Location: /Users/dev/projects/app
54
- Framework: React 18, TypeScript
55
- Architecture: [from analysis layer]
56
-
57
- 🎯 CURRENT FOCUS
58
- Task: Building user dashboard
59
- Started: 45 minutes ago
60
- Strategic alignment: High (roadmap priority #2)
61
-
62
- 📈 RECENT PROGRESS
63
- Velocity: 1.4 features/day
64
- Streak: 5 days shipping
65
- Quality: 95% success rate
66
-
67
- 🔄 RECENT ACTIVITY (from memory layer):
68
- • shipped: Authentication system (2h ago)
69
- • done: API endpoints (3h ago)
70
- • idea: Add real-time updates (4h ago)
71
- • now: Building user dashboard (45m ago)
72
- • decision: Chose Next.js over Nuxt (yesterday)
73
-
74
- 💡 PLANNING STATUS
75
- Queue: 3 tasks pending
76
- Ideas: 7 captured
77
- Roadmap progress: 23% complete
78
-
79
- 🧠 KEY INSIGHTS
80
- Recent decisions: 3 logged
81
- Learning areas: Architecture patterns
82
- Growth momentum: +15% complexity handling
83
-
84
- 📂 LAYER NAVIGATION:
85
- - Core: .prjct/core/ (focus & priorities)
86
- - Analysis: .prjct/analysis/ (technical insights)
87
- - Planning: .prjct/planning/ (strategy & roadmap)
88
- - Progress: .prjct/progress/ (metrics & shipped)
89
- - Memory: .prjct/memory/ (decisions & history)
90
-
91
- 🎯 NEXT SUGGESTED ACTION:
92
- Continue with current task or /p:done if complete
93
- ```
94
-
95
- 4. **Project insights**:
96
- - Dependencies summary
97
- - Test coverage if available
98
- - Build status
99
- - Last deploy info
100
-
101
- 5. **Smart suggestions**:
102
- Based on context, suggest:
103
- - "Long task - consider breaking down"
104
- - "Good time to ship and take a break"
105
- - "Review queue priorities"
@@ -1,48 +0,0 @@
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
- ```