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.
- package/CHANGELOG.md +312 -0
- package/CLAUDE.md +300 -0
- package/LICENSE +21 -0
- package/README.md +424 -0
- package/bin/prjct +214 -0
- package/core/agent-detector.js +249 -0
- package/core/agents/claude-agent.js +250 -0
- package/core/agents/codex-agent.js +256 -0
- package/core/agents/terminal-agent.js +465 -0
- package/core/analyzer.js +596 -0
- package/core/animations-simple.js +240 -0
- package/core/animations.js +277 -0
- package/core/author-detector.js +218 -0
- package/core/capability-installer.js +190 -0
- package/core/command-installer.js +775 -0
- package/core/commands.js +2050 -0
- package/core/config-manager.js +335 -0
- package/core/migrator.js +784 -0
- package/core/path-manager.js +324 -0
- package/core/project-capabilities.js +144 -0
- package/core/session-manager.js +439 -0
- package/core/version.js +107 -0
- package/core/workflow-engine.js +213 -0
- package/core/workflow-prompts.js +192 -0
- package/core/workflow-rules.js +147 -0
- package/package.json +80 -0
- package/scripts/install.sh +433 -0
- package/scripts/verify-installation.sh +158 -0
- package/templates/agents/AGENTS.md +164 -0
- package/templates/commands/analyze.md +125 -0
- package/templates/commands/cleanup.md +102 -0
- package/templates/commands/context.md +105 -0
- package/templates/commands/design.md +113 -0
- package/templates/commands/done.md +44 -0
- package/templates/commands/fix.md +87 -0
- package/templates/commands/git.md +79 -0
- package/templates/commands/help.md +72 -0
- package/templates/commands/idea.md +50 -0
- package/templates/commands/init.md +237 -0
- package/templates/commands/next.md +74 -0
- package/templates/commands/now.md +35 -0
- package/templates/commands/progress.md +92 -0
- package/templates/commands/recap.md +86 -0
- package/templates/commands/roadmap.md +107 -0
- package/templates/commands/ship.md +41 -0
- package/templates/commands/stuck.md +48 -0
- package/templates/commands/task.md +97 -0
- package/templates/commands/test.md +94 -0
- package/templates/commands/workflow.md +224 -0
- package/templates/examples/natural-language-examples.md +320 -0
- package/templates/mcp-config.json +8 -0
- package/templates/workflows/analyze.md +159 -0
- package/templates/workflows/cleanup.md +73 -0
- package/templates/workflows/context.md +72 -0
- package/templates/workflows/design.md +88 -0
- package/templates/workflows/done.md +20 -0
- package/templates/workflows/fix.md +201 -0
- package/templates/workflows/git.md +192 -0
- package/templates/workflows/help.md +13 -0
- package/templates/workflows/idea.md +22 -0
- package/templates/workflows/init.md +80 -0
- package/templates/workflows/natural-language-handler.md +183 -0
- package/templates/workflows/next.md +44 -0
- package/templates/workflows/now.md +19 -0
- package/templates/workflows/progress.md +113 -0
- package/templates/workflows/recap.md +66 -0
- package/templates/workflows/roadmap.md +95 -0
- package/templates/workflows/ship.md +18 -0
- package/templates/workflows/stuck.md +25 -0
- package/templates/workflows/task.md +109 -0
- package/templates/workflows/test.md +243 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
AI assistant guidance for prjct-cli.
|
|
4
|
+
|
|
5
|
+
## Talk Naturally
|
|
6
|
+
|
|
7
|
+
**You don't need to memorize commands** - just describe what you want to do!
|
|
8
|
+
|
|
9
|
+
The AI assistant uses **semantic understanding** to map your intent to commands. Works in **any language** the LLM understands (primarily English and Spanish).
|
|
10
|
+
|
|
11
|
+
**Examples:**
|
|
12
|
+
```
|
|
13
|
+
Intent: Start working on something
|
|
14
|
+
→ "I want to build the login page"
|
|
15
|
+
→ "Let me work on authentication"
|
|
16
|
+
→ "Voy a hacer el dashboard"
|
|
17
|
+
→ Command: /p:now
|
|
18
|
+
|
|
19
|
+
Intent: Finished current work
|
|
20
|
+
→ "I'm done" | "finished" | "terminé" | "completed"
|
|
21
|
+
→ Command: /p:done
|
|
22
|
+
|
|
23
|
+
Intent: Ship a feature
|
|
24
|
+
→ "ship this" | "deploy it" | "ready to launch"
|
|
25
|
+
→ Command: /p:ship
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Both work simultaneously:**
|
|
29
|
+
- Talk naturally: "I want to start building auth"
|
|
30
|
+
- Use commands directly: `/p:now "building auth"`
|
|
31
|
+
|
|
32
|
+
## Architecture
|
|
33
|
+
|
|
34
|
+
**Global**: `~/.prjct-cli/projects/{id}/`
|
|
35
|
+
```
|
|
36
|
+
core/ # now.md, next.md, context.md
|
|
37
|
+
progress/ # shipped.md, metrics.md
|
|
38
|
+
planning/ # ideas.md, roadmap.md
|
|
39
|
+
analysis/ # repo-summary.md
|
|
40
|
+
memory/ # context.jsonl
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Local**: `.prjct/prjct.config.json`
|
|
44
|
+
|
|
45
|
+
## MCP Servers
|
|
46
|
+
|
|
47
|
+
- **Context7**: Library docs (always on)
|
|
48
|
+
- **Filesystem**: File ops
|
|
49
|
+
- **Memory**: Persistence
|
|
50
|
+
- **Sequential**: Complex reasoning
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
1. Initialize: `/p:init`
|
|
55
|
+
2. Type: `/p:help` for interactive guide
|
|
56
|
+
3. Or just talk: "I want to start [task]"
|
|
57
|
+
|
|
58
|
+
## Commands
|
|
59
|
+
|
|
60
|
+
**💡 Tip**: Type `/p:help` anytime for an interactive guide with natural language options.
|
|
61
|
+
|
|
62
|
+
| Command | Say This Instead | Action |
|
|
63
|
+
|---------|------------------|--------|
|
|
64
|
+
| `/p:help` | "help" or "what can I do?" | Interactive guide |
|
|
65
|
+
| `/p:init` | - | Create global dirs + config |
|
|
66
|
+
| `/p:now [task]` | "start [task]" | Update `core/now.md` |
|
|
67
|
+
| `/p:done` | "I'm done" or "finished" | Clear focus, suggest next |
|
|
68
|
+
| `/p:ship <feature>` | "ship [feature]" | Add to `progress/shipped.md` |
|
|
69
|
+
| `/p:next` | "what's next?" | Read `core/next.md` |
|
|
70
|
+
| `/p:idea <text>` | "I have an idea about [x]" | Append to `planning/ideas.md` |
|
|
71
|
+
| `/p:recap` | "show my progress" | Aggregate all metrics |
|
|
72
|
+
| `/p:progress [period]` | "how am I doing?" | Filter by timeframe |
|
|
73
|
+
| `/p:stuck <issue>` | "I'm stuck on [issue]" | Context-based guidance |
|
|
74
|
+
| `/p:context` | "show project context" | Display config + activity |
|
|
75
|
+
| `/p:roadmap` | "show the plan" | Read `planning/roadmap.md` |
|
|
76
|
+
| `/p:analyze` | "analyze this repo" | Generate `analysis/repo-summary.md` |
|
|
77
|
+
| `/p:task` | "break this down" | Multi-step execution |
|
|
78
|
+
| `/p:git` | - | Smart commits with context |
|
|
79
|
+
| `/p:fix` | "help me fix [x]" | Quick problem solving |
|
|
80
|
+
| `/p:test` | "run tests" | Execute + report |
|
|
81
|
+
| `/p:design` | "design [x]" | Generate diagrams + specs |
|
|
82
|
+
| `/p:cleanup` | "clean up code" | Remove dead code/deps |
|
|
83
|
+
|
|
84
|
+
## How It Works
|
|
85
|
+
|
|
86
|
+
**You can talk naturally:**
|
|
87
|
+
- System detects intent from your message
|
|
88
|
+
- Maps to appropriate command automatically
|
|
89
|
+
- Responds conversationally with options
|
|
90
|
+
- Always suggests what to do next
|
|
91
|
+
|
|
92
|
+
**Every response includes:**
|
|
93
|
+
- What you just did
|
|
94
|
+
- Natural language options for next steps
|
|
95
|
+
- Command alternatives if you prefer
|
|
96
|
+
|
|
97
|
+
**Zero memorization needed** - just describe what you want!
|
|
98
|
+
|
|
99
|
+
## Natural Language Detection
|
|
100
|
+
|
|
101
|
+
The AI assistant uses **semantic understanding** to map user intent to commands.
|
|
102
|
+
|
|
103
|
+
### How It Works
|
|
104
|
+
|
|
105
|
+
**You're an LLM** - use your natural language understanding, not pattern matching!
|
|
106
|
+
|
|
107
|
+
1. **Check if direct command**: Does message start with `/p:`? → Execute directly
|
|
108
|
+
2. **Understand user intent**: What is the user trying to accomplish?
|
|
109
|
+
3. **Map to appropriate command**: Based on semantic meaning
|
|
110
|
+
4. **Extract parameters**: Pull relevant information from the message
|
|
111
|
+
5. **Show transparency**: Always say what you understood and what you'll execute
|
|
112
|
+
|
|
113
|
+
### Command Intent Map
|
|
114
|
+
|
|
115
|
+
| User Intent | Command | Examples of Natural Expression |
|
|
116
|
+
|-------------|---------|-------------------------------|
|
|
117
|
+
| Start/focus on task | `/p:now` | "let me work on X", "starting the API", "voy a hacer X" |
|
|
118
|
+
| Finished current work | `/p:done` | "done", "finished", "terminé", "completed", "listo" |
|
|
119
|
+
| Ship/deploy feature | `/p:ship` | "ship this", "deploy X", "it's ready", "let's launch" |
|
|
120
|
+
| Capture an idea | `/p:idea` | "I have an idea", "what if we...", "tengo una idea" |
|
|
121
|
+
| Check progress/status | `/p:recap` | "show progress", "how am I doing", "muéstrame el avance" |
|
|
122
|
+
| Stuck on problem | `/p:stuck` | "I'm stuck", "help with X", "estoy atascado" |
|
|
123
|
+
| What to work on next | `/p:next` | "what's next", "qué sigue", "what should I do" |
|
|
124
|
+
|
|
125
|
+
**Key principle**: If you understand what the user wants, map it to the right command. Don't rely on exact phrase matching.
|
|
126
|
+
|
|
127
|
+
### Example Flow
|
|
128
|
+
|
|
129
|
+
**User:** "I want to start building the login page"
|
|
130
|
+
|
|
131
|
+
**Your Reasoning:**
|
|
132
|
+
- Intent detected: User wants to begin working on something
|
|
133
|
+
- Appropriate command: `/p:now`
|
|
134
|
+
- Parameter to extract: "building the login page"
|
|
135
|
+
|
|
136
|
+
**Your Response:**
|
|
137
|
+
```
|
|
138
|
+
💬 I understood: "start working on building the login page"
|
|
139
|
+
⚡ Executing: /p:now "building the login page"
|
|
140
|
+
|
|
141
|
+
✅ Starting task: building the login page
|
|
142
|
+
|
|
143
|
+
What's next?
|
|
144
|
+
• Say "I'm done" when finished
|
|
145
|
+
• Or: /p:done
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Works in Any Language
|
|
149
|
+
|
|
150
|
+
If you understand the user's intent in **any language**, execute the command:
|
|
151
|
+
- English: "I want to start the API"
|
|
152
|
+
- Spanish: "Quiero empezar con la autenticación"
|
|
153
|
+
- Casual: "gonna work on that login thing"
|
|
154
|
+
- Formal: "I shall commence development of the authentication module"
|
|
155
|
+
|
|
156
|
+
All map to: `/p:now`
|
|
157
|
+
|
|
158
|
+
## Implementation
|
|
159
|
+
|
|
160
|
+
- All ops atomic
|
|
161
|
+
- Log to `memory/context.jsonl` with author
|
|
162
|
+
- Conversational responses with clear options
|
|
163
|
+
- Intent detection (English + Spanish)
|
|
164
|
+
- Handle missing files gracefully
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Read, Grep, Glob, Bash, TodoWrite]
|
|
3
|
+
description: "Analyze current repository and generate comprehensive project summary"
|
|
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:analyze - Repository Analysis
|
|
15
|
+
|
|
16
|
+
## Purpose
|
|
17
|
+
Automatically analyze the current codebase and generate a comprehensive summary of the repository including technologies, architecture, and project structure.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
```
|
|
21
|
+
/p:analyze
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Execution
|
|
25
|
+
1. **Scan project structure** - Analyze directories and file types
|
|
26
|
+
2. **Identify technologies** - Detect frameworks, languages, tools
|
|
27
|
+
3. **Analyze architecture** - Understand project organization and patterns
|
|
28
|
+
4. **Generate summary** - Create detailed analysis report
|
|
29
|
+
5. **Save to analysis** - Store results in `.prjct/analysis/repo-summary.md`
|
|
30
|
+
|
|
31
|
+
## Implementation
|
|
32
|
+
|
|
33
|
+
When this command is triggered:
|
|
34
|
+
|
|
35
|
+
1. **Create analysis directory**:
|
|
36
|
+
```bash
|
|
37
|
+
mkdir -p .prjct/analysis
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
2. **Scan project structure**:
|
|
41
|
+
- Use Glob to find all files and directories
|
|
42
|
+
- Identify main directories (src, lib, components, etc.)
|
|
43
|
+
- Count files by type (.js, .ts, .py, .go, etc.)
|
|
44
|
+
|
|
45
|
+
3. **Technology detection**:
|
|
46
|
+
- Check package.json for JavaScript/Node.js projects
|
|
47
|
+
- Check requirements.txt, Pipfile for Python projects
|
|
48
|
+
- Check go.mod for Go projects
|
|
49
|
+
- Check Cargo.toml for Rust projects
|
|
50
|
+
- Detect frameworks (React, Vue, Angular, Express, FastAPI, etc.)
|
|
51
|
+
|
|
52
|
+
4. **Architecture analysis**:
|
|
53
|
+
- Identify entry points (main.js, app.py, main.go)
|
|
54
|
+
- Analyze import/require patterns
|
|
55
|
+
- Detect architectural patterns (MVC, microservices, monolith)
|
|
56
|
+
- Identify configuration files
|
|
57
|
+
|
|
58
|
+
5. **Generate comprehensive report**:
|
|
59
|
+
```markdown
|
|
60
|
+
# Repository Analysis Report
|
|
61
|
+
|
|
62
|
+
## Project Overview
|
|
63
|
+
- **Name**: [Detected from package.json or directory name]
|
|
64
|
+
- **Type**: [Web app, Library, CLI tool, etc.]
|
|
65
|
+
- **Primary Language**: [JavaScript, Python, Go, etc.]
|
|
66
|
+
- **Framework**: [React, Express, FastAPI, etc.]
|
|
67
|
+
|
|
68
|
+
## Structure Analysis
|
|
69
|
+
- **Total Files**: [count]
|
|
70
|
+
- **Main Directories**: [list]
|
|
71
|
+
- **Entry Points**: [main files]
|
|
72
|
+
|
|
73
|
+
## Technologies Detected
|
|
74
|
+
- **Languages**: [list with percentages]
|
|
75
|
+
- **Frameworks**: [list]
|
|
76
|
+
- **Tools**: [build tools, testing, etc.]
|
|
77
|
+
- **Dependencies**: [key dependencies]
|
|
78
|
+
|
|
79
|
+
## Architecture
|
|
80
|
+
- **Pattern**: [MVC, Component-based, etc.]
|
|
81
|
+
- **File Organization**: [description]
|
|
82
|
+
- **Key Components**: [main modules/components]
|
|
83
|
+
|
|
84
|
+
## Recommendations
|
|
85
|
+
- [Suggestions for improvements]
|
|
86
|
+
- [Best practices to consider]
|
|
87
|
+
|
|
88
|
+
**Generated**: [timestamp]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
6. **Save analysis**:
|
|
92
|
+
Write the complete analysis to `.prjct/analysis/repo-summary.md`
|
|
93
|
+
|
|
94
|
+
7. **Provide summary**:
|
|
95
|
+
Display key findings and next suggested actions
|
|
96
|
+
|
|
97
|
+
## Example Workflow
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Run analysis
|
|
101
|
+
/p:analyze
|
|
102
|
+
|
|
103
|
+
# Results saved to:
|
|
104
|
+
# .prjct/analysis/repo-summary.md
|
|
105
|
+
|
|
106
|
+
# Example output:
|
|
107
|
+
🔍 **Repository Analysis Complete**
|
|
108
|
+
|
|
109
|
+
**Project**: prjct-cli (CLI Tool)
|
|
110
|
+
**Language**: JavaScript (Node.js)
|
|
111
|
+
**Structure**: 45 files across 8 directories
|
|
112
|
+
**Dependencies**: 12 packages detected
|
|
113
|
+
|
|
114
|
+
📄 **Full report**: `.prjct/analysis/repo-summary.md`
|
|
115
|
+
|
|
116
|
+
**Next steps**:
|
|
117
|
+
- `/p:roadmap` - Plan development roadmap
|
|
118
|
+
- `/p:now "implement feature X"` - Set current focus
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Error Handling
|
|
122
|
+
- Handle projects without clear package managers
|
|
123
|
+
- Gracefully handle large repositories (>1000 files)
|
|
124
|
+
- Provide meaningful analysis even for minimal projects
|
|
125
|
+
- Skip binary files and common ignore patterns
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p:cleanup
|
|
3
|
+
description: Advanced code cleanup and optimization with backup capabilities
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /p:cleanup - Advanced Code Cleanup and Optimization
|
|
7
|
+
|
|
8
|
+
Remove dead code, optimize imports, clean project structure, analyze unused dependencies, and clean up temporary files. Comprehensive cleanup with backup capabilities.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/p:cleanup [target] [--type code|imports|files|deps|memory|all] [--safe|--aggressive] [--dry-run]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Global Architecture
|
|
17
|
+
|
|
18
|
+
This command operates on global data stored in `~/.prjct-cli/projects/{project-id}/`.
|
|
19
|
+
|
|
20
|
+
### Steps
|
|
21
|
+
|
|
22
|
+
1. Read `.prjct/prjct.config.json` for project ID and author
|
|
23
|
+
2. Parse cleanup arguments (target, type, mode)
|
|
24
|
+
3. Create backup to `~/.prjct-cli/projects/{id}/backups/{timestamp}/` before aggressive cleanup
|
|
25
|
+
4. Execute cleanup by type:
|
|
26
|
+
- **code**: Remove console.logs, commented code, dead code
|
|
27
|
+
- **imports**: Remove unused imports, organize imports
|
|
28
|
+
- **files**: Remove temp files, empty files, backups
|
|
29
|
+
- **deps**: Analyze and remove unused npm dependencies
|
|
30
|
+
- **memory**: Archive old memory entries (>30 days) to `~/.prjct-cli/projects/{id}/memory/archive/`
|
|
31
|
+
- **all**: All cleanup types
|
|
32
|
+
5. Validate syntax after changes (JavaScript/TypeScript)
|
|
33
|
+
6. Log all changes to `~/.prjct-cli/projects/{id}/memory/cleanup-log.jsonl`
|
|
34
|
+
7. Log action with author to context.jsonl
|
|
35
|
+
8. Display cleanup results with metrics
|
|
36
|
+
|
|
37
|
+
## Response Format
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
🧹 ✨ Cleanup Complete! ✨ 🧹
|
|
41
|
+
|
|
42
|
+
📊 Cleanup Results:
|
|
43
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
|
|
45
|
+
🗑️ Dead Code Removed:
|
|
46
|
+
• Console.logs: {count} statements
|
|
47
|
+
• Commented code: {count} blocks
|
|
48
|
+
• Unused functions: {count}
|
|
49
|
+
|
|
50
|
+
📦 Imports Optimized:
|
|
51
|
+
• Unused imports: {count} removed
|
|
52
|
+
• Files organized: {count}
|
|
53
|
+
|
|
54
|
+
📁 Files Cleaned:
|
|
55
|
+
• Temp files: {count} removed
|
|
56
|
+
• Empty files: {count} removed
|
|
57
|
+
• Space freed: {size} MB
|
|
58
|
+
|
|
59
|
+
📚 Dependencies:
|
|
60
|
+
• Unused packages: {count} removed
|
|
61
|
+
• Size reduced: {size} MB
|
|
62
|
+
|
|
63
|
+
📦 Archived:
|
|
64
|
+
• Memory entries: {count} (older than 30 days)
|
|
65
|
+
|
|
66
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
67
|
+
✨ Your project is clean and optimized!
|
|
68
|
+
|
|
69
|
+
💡 Tip: Run with --dry-run first to preview changes
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Safety Measures
|
|
73
|
+
|
|
74
|
+
- Create backup before aggressive cleanup
|
|
75
|
+
- Log all changes to cleanup-log.jsonl
|
|
76
|
+
- Validate syntax after modifications
|
|
77
|
+
- Skip files with uncommitted git changes
|
|
78
|
+
- Provide --dry-run option to preview
|
|
79
|
+
|
|
80
|
+
## Examples
|
|
81
|
+
|
|
82
|
+
Basic cleanup:
|
|
83
|
+
```
|
|
84
|
+
/p:cleanup
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Cleanup specific type:
|
|
88
|
+
```
|
|
89
|
+
/p:cleanup --type code
|
|
90
|
+
/p:cleanup --type imports
|
|
91
|
+
/p:cleanup --type deps
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Preview changes:
|
|
95
|
+
```
|
|
96
|
+
/p:cleanup --dry-run
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Aggressive cleanup with backup:
|
|
100
|
+
```
|
|
101
|
+
/p:cleanup --aggressive --type all
|
|
102
|
+
```
|
|
@@ -0,0 +1,105 @@
|
|
|
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"
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p:design
|
|
3
|
+
description: Design system architecture, APIs, and component interfaces
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /p:design - System Architecture and Design
|
|
7
|
+
|
|
8
|
+
Create technical designs with visual diagrams and implementation guides for system architecture, APIs, components, databases, and user flows.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/p:design [target] [--type architecture|api|component|database|flow] [--format diagram|spec|code|all]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Global Architecture
|
|
17
|
+
|
|
18
|
+
This command operates on global data stored in `~/.prjct-cli/projects/{project-id}/`.
|
|
19
|
+
|
|
20
|
+
### Steps
|
|
21
|
+
|
|
22
|
+
1. Parse design target and type (architecture, api, component, database, flow)
|
|
23
|
+
2. Generate appropriate ASCII diagrams and visual representations
|
|
24
|
+
3. Create technical specifications with technology stack and patterns
|
|
25
|
+
4. Generate implementation templates and interfaces
|
|
26
|
+
5. Save designs to `~/.prjct-cli/projects/{id}/designs/` directory
|
|
27
|
+
6. Display formatted design with overview, specs, and implementation guide
|
|
28
|
+
7. Link designs to tasks and track implementation progress
|
|
29
|
+
|
|
30
|
+
## Response Format
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
🎨 ✨ Design Complete! ✨ 🎨
|
|
34
|
+
|
|
35
|
+
📐 Design: [Target Name]
|
|
36
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
37
|
+
|
|
38
|
+
🏗️ Architecture Overview:
|
|
39
|
+
[ASCII diagram or description]
|
|
40
|
+
|
|
41
|
+
📋 Technical Specifications:
|
|
42
|
+
• Technology Stack: [stack details]
|
|
43
|
+
• Design Patterns: [patterns used]
|
|
44
|
+
• Key Components: [component list]
|
|
45
|
+
|
|
46
|
+
📦 Implementation Guide:
|
|
47
|
+
1. Set up project structure
|
|
48
|
+
2. Implement core models
|
|
49
|
+
3. Build API endpoints
|
|
50
|
+
4. Create UI components
|
|
51
|
+
|
|
52
|
+
📁 Files Created:
|
|
53
|
+
• ~/.prjct-cli/projects/{id}/designs/[target]-architecture.md
|
|
54
|
+
|
|
55
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
56
|
+
✅ Design ready for implementation!
|
|
57
|
+
|
|
58
|
+
💡 Next: /p:now "Implement [target]"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Design Types
|
|
62
|
+
|
|
63
|
+
### Architecture
|
|
64
|
+
- System architecture diagrams
|
|
65
|
+
- Component relationships
|
|
66
|
+
- Data flow and communication patterns
|
|
67
|
+
- Scalability considerations
|
|
68
|
+
|
|
69
|
+
### API
|
|
70
|
+
- Endpoint specifications
|
|
71
|
+
- Request/response schemas
|
|
72
|
+
- Authentication and authorization
|
|
73
|
+
- Rate limiting and caching
|
|
74
|
+
|
|
75
|
+
### Component
|
|
76
|
+
- Component interfaces
|
|
77
|
+
- Props and state management
|
|
78
|
+
- Lifecycle and hooks
|
|
79
|
+
- Styling and theming
|
|
80
|
+
|
|
81
|
+
### Database
|
|
82
|
+
- Schema design
|
|
83
|
+
- Entity relationships
|
|
84
|
+
- Indexing strategy
|
|
85
|
+
- Migration plans
|
|
86
|
+
|
|
87
|
+
### Flow
|
|
88
|
+
- User journey diagrams
|
|
89
|
+
- State machine flows
|
|
90
|
+
- Process workflows
|
|
91
|
+
- Integration flows
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
Design system architecture:
|
|
96
|
+
```
|
|
97
|
+
/p:design authentication --type architecture
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Design API endpoints:
|
|
101
|
+
```
|
|
102
|
+
/p:design user-management --type api --format spec
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Design database schema:
|
|
106
|
+
```
|
|
107
|
+
/p:design products --type database --format diagram
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Complete design with all formats:
|
|
111
|
+
```
|
|
112
|
+
/p:design payment-system --type architecture --format all
|
|
113
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Read, Write, Edit, TodoWrite]
|
|
3
|
+
description: "Complete task, clear focus"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /p:done
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
```
|
|
10
|
+
/p:done
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Execution
|
|
14
|
+
|
|
15
|
+
1. Read task from `~/.prjct-cli/projects/{id}/core/now.md`, calculate duration
|
|
16
|
+
2. Clear `core/now.md`
|
|
17
|
+
3. Update `progress/metrics.md`, `core/context.md`
|
|
18
|
+
4. Log to `memory/context.jsonl`:
|
|
19
|
+
```json
|
|
20
|
+
{"action":"done","task":"[task]","started":"[t1]","completed":"[t2]","duration":"[min]","layer":"core"}
|
|
21
|
+
```
|
|
22
|
+
5. Response:
|
|
23
|
+
```
|
|
24
|
+
✅ [task description] ([duration])
|
|
25
|
+
|
|
26
|
+
What's next?
|
|
27
|
+
• "start [next task]" → Begin working
|
|
28
|
+
• "ship this feature" → Track & celebrate
|
|
29
|
+
• "add new idea" → Brainstorm
|
|
30
|
+
|
|
31
|
+
Or use: /p:now | /p:ship | /p:idea
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or if queue empty:
|
|
35
|
+
```
|
|
36
|
+
✅ [task description] ([duration])
|
|
37
|
+
|
|
38
|
+
Queue is empty! What now?
|
|
39
|
+
• "add a task" → Plan next work
|
|
40
|
+
• "brainstorm ideas" → Creative mode
|
|
41
|
+
• "see my progress" → View achievements
|
|
42
|
+
|
|
43
|
+
Or: /p:idea | /p:next | /p:recap
|
|
44
|
+
```
|