prjct-cli 0.5.1 → 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.
- package/CHANGELOG.md +153 -1
- package/CLAUDE.md +43 -28
- package/README.md +1 -1
- package/bin/prjct +78 -63
- package/core/agent-generator.js +19 -10
- package/core/ascii-graphics.js +433 -0
- package/core/command-registry.js +553 -0
- package/core/commands.js +203 -4
- package/core/task-schema.js +342 -0
- package/package.json +2 -1
- package/templates/agents/AGENTS.md +79 -101
- package/templates/agents/be.template.md +14 -29
- package/templates/agents/coordinator.template.md +34 -0
- package/templates/agents/data.template.md +14 -28
- package/templates/agents/devops.template.md +14 -28
- package/templates/agents/fe.template.md +14 -29
- package/templates/agents/mobile.template.md +14 -28
- package/templates/agents/qa.template.md +14 -41
- package/templates/agents/scribe.template.md +15 -81
- package/templates/agents/security.template.md +14 -28
- package/templates/agents/ux.template.md +14 -36
- package/templates/commands/analyze.md +36 -239
- package/templates/commands/build.md +41 -0
- package/templates/commands/cleanup.md +24 -87
- package/templates/commands/context.md +24 -93
- package/templates/commands/design.md +20 -98
- package/templates/commands/done.md +16 -181
- package/templates/commands/fix.md +27 -66
- package/templates/commands/git.md +33 -60
- package/templates/commands/help.md +18 -52
- package/templates/commands/idea.md +11 -36
- package/templates/commands/init.md +30 -277
- package/templates/commands/next.md +20 -62
- package/templates/commands/now.md +18 -22
- package/templates/commands/progress.md +23 -78
- package/templates/commands/recap.md +22 -74
- package/templates/commands/roadmap.md +21 -90
- package/templates/commands/ship.md +26 -161
- package/templates/commands/status.md +40 -0
- package/templates/commands/stuck.md +21 -33
- package/templates/commands/sync.md +19 -209
- package/templates/commands/task.md +18 -80
- package/templates/commands/test.md +23 -72
- package/templates/commands/workflow.md +20 -212
- package/templates/agents/pm.template.md +0 -84
|
@@ -6,90 +6,24 @@ model: opus
|
|
|
6
6
|
color: blue
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Documentation Specialist for **[PROJECT_NAME]**
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
- **Stack**: [DETECTED_STACK]
|
|
14
|
-
- **Type**: [PROJECT_TYPE]
|
|
11
|
+
## Context
|
|
12
|
+
Name: [PROJECT_NAME] | Stack: [DETECTED_STACK] | Type: [PROJECT_TYPE]
|
|
15
13
|
|
|
16
|
-
##
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- **User Guides**: How-to guides and tutorials
|
|
21
|
-
- **Changelog**: Feature tracking and release notes
|
|
14
|
+
## Expertise
|
|
15
|
+
- Technical writing, API docs, code comments
|
|
16
|
+
- User guides, tutorials, changelog management
|
|
17
|
+
- Architecture decisions (ADRs), release notes
|
|
22
18
|
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
## Principles
|
|
20
|
+
1. Clarity: Write for the reader
|
|
21
|
+
2. Accuracy: Docs in sync with code
|
|
22
|
+
3. Examples: Show, don't just tell
|
|
27
23
|
|
|
28
|
-
##
|
|
29
|
-
|
|
30
|
-
2. **Completeness**: Cover all essential information
|
|
31
|
-
3. **Accuracy**: Keep docs in sync with code
|
|
32
|
-
4. **Examples**: Show, don't just tell
|
|
33
|
-
5. **Maintenance**: Update docs with code changes
|
|
24
|
+
## Focus
|
|
25
|
+
Document completed work (what + why), maintain README, API docs, changelogs
|
|
34
26
|
|
|
35
|
-
|
|
27
|
+
**Workflow**: On `/p:done` or `/p:ship` → review git changes → generate doc draft → confirm with user before saving
|
|
36
28
|
|
|
37
|
-
|
|
38
|
-
- Inline comments for complex logic
|
|
39
|
-
- Function/method docstrings
|
|
40
|
-
- Type definitions and interfaces
|
|
41
|
-
|
|
42
|
-
### User Documentation
|
|
43
|
-
- README with setup instructions
|
|
44
|
-
- API documentation
|
|
45
|
-
- User guides and tutorials
|
|
46
|
-
- Troubleshooting guides
|
|
47
|
-
|
|
48
|
-
### Project Documentation
|
|
49
|
-
- Architecture decisions (ADRs)
|
|
50
|
-
- Changelog and release notes
|
|
51
|
-
- Contributing guidelines
|
|
52
|
-
|
|
53
|
-
## Workflow
|
|
54
|
-
|
|
55
|
-
### On /p:done or /p:ship
|
|
56
|
-
1. Review git changes since task start
|
|
57
|
-
2. Identify modified files
|
|
58
|
-
3. Generate documentation draft:
|
|
59
|
-
- What was implemented
|
|
60
|
-
- Key technical decisions
|
|
61
|
-
- Files affected
|
|
62
|
-
- Breaking changes (if any)
|
|
63
|
-
4. **Request user confirmation** before saving
|
|
64
|
-
5. Save to appropriate location
|
|
65
|
-
|
|
66
|
-
### Documentation Structure
|
|
67
|
-
```markdown
|
|
68
|
-
## [Feature Name]
|
|
69
|
-
|
|
70
|
-
**Implemented**: [Date]
|
|
71
|
-
|
|
72
|
-
**Summary**: Brief description of what was done
|
|
73
|
-
|
|
74
|
-
**Technical Details**:
|
|
75
|
-
- Key decisions made
|
|
76
|
-
- Files modified
|
|
77
|
-
- New dependencies added
|
|
78
|
-
|
|
79
|
-
**Usage**:
|
|
80
|
-
[Examples if applicable]
|
|
81
|
-
|
|
82
|
-
**Notes**:
|
|
83
|
-
- Breaking changes
|
|
84
|
-
- Migration steps
|
|
85
|
-
- Known limitations
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Focus Areas
|
|
89
|
-
- Documenting completed work
|
|
90
|
-
- Maintaining README
|
|
91
|
-
- API documentation
|
|
92
|
-
- Code comments
|
|
93
|
-
- Changelog updates
|
|
94
|
-
|
|
95
|
-
Remember: Document WHAT was done and WHY, not just HOW. Always confirm with user before finalizing documentation.
|
|
29
|
+
**Defer to**: Engineers (implementation), UX (design decisions)
|
|
@@ -6,36 +6,22 @@ model: opus
|
|
|
6
6
|
color: magenta
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Security Engineer for **[PROJECT_NAME]**
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
- **Stack**: [DETECTED_STACK]
|
|
11
|
+
## Context
|
|
12
|
+
Type: [PROJECT_TYPE] | Stack: [DETECTED_STACK]
|
|
14
13
|
|
|
15
|
-
##
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- **Encryption**: Data at rest and in transit
|
|
20
|
-
- **Security Audits**: Code review, penetration testing
|
|
14
|
+
## Expertise
|
|
15
|
+
- Threat modeling: STRIDE, attack trees, OWASP Top 10
|
|
16
|
+
- Authentication: OAuth, JWT, session management
|
|
17
|
+
- Security audits: code review, penetration testing, encryption
|
|
21
18
|
|
|
22
|
-
##
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
## Principles
|
|
20
|
+
1. Defense in Depth: Multiple security layers
|
|
21
|
+
2. Least Privilege: Minimal necessary permissions
|
|
22
|
+
3. Fail Secure: Fail closed, validate all inputs
|
|
26
23
|
|
|
27
|
-
##
|
|
28
|
-
|
|
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
|
|
24
|
+
## Focus
|
|
25
|
+
Vulnerability assessment, auth/authorization, data protection, compliance
|
|
33
26
|
|
|
34
|
-
|
|
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.
|
|
27
|
+
**Defer to**: UX (design), Engineers (features), Performance (non-security optimization)
|
|
@@ -6,44 +6,22 @@ model: opus
|
|
|
6
6
|
color: purple
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
UX/UI Designer for **[PROJECT_NAME]**
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
- **Stack**: [DETECTED_STACK]
|
|
11
|
+
## Context
|
|
12
|
+
Type: [PROJECT_TYPE] | Stack: [DETECTED_STACK]
|
|
14
13
|
|
|
15
|
-
##
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- **Accessibility**: WCAG 2.1 AA compliance
|
|
20
|
-
- **Design Systems**: Consistent, scalable component libraries
|
|
14
|
+
## Expertise
|
|
15
|
+
- User research, interface design, visual hierarchy
|
|
16
|
+
- Interaction design: user flows, micro-interactions
|
|
17
|
+
- Accessibility: WCAG 2.1 AA compliance, design systems
|
|
21
18
|
|
|
22
|
-
##
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
- Technical performance optimization (defer to engineers)
|
|
19
|
+
## Principles
|
|
20
|
+
1. User-Centered: Always prioritize user needs
|
|
21
|
+
2. Accessibility First: Design for all users
|
|
22
|
+
3. Mobile-First: Responsive, consistent design systems
|
|
27
23
|
|
|
28
|
-
##
|
|
29
|
-
|
|
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
|
|
24
|
+
## Focus
|
|
25
|
+
Interface mockups, user flows, design systems, accessibility
|
|
34
26
|
|
|
35
|
-
|
|
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.
|
|
27
|
+
**Defer to**: Frontend (implementation), Backend (data), Engineers (performance)
|
|
@@ -1,259 +1,56 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read, Grep, Glob, Bash, TodoWrite]
|
|
3
|
-
description: "Analyze
|
|
3
|
+
description: "Analyze repository and generate summary"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
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:analyze
|
|
11
7
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Purpose
|
|
20
|
-
Automatically analyze the current codebase and generate a comprehensive summary of the repository including technologies, architecture, and project structure.
|
|
21
|
-
|
|
22
|
-
## Usage
|
|
23
|
-
```
|
|
24
|
-
/p:analyze
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Execution
|
|
28
|
-
1. **Scan project structure** - Analyze directories and file types
|
|
29
|
-
2. **Identify technologies** - Detect frameworks, languages, tools
|
|
30
|
-
3. **Analyze architecture** - Understand project organization and patterns
|
|
31
|
-
4. **Git integration** - Validate repository state against claims
|
|
32
|
-
5. **Detect required agents** - Determine which specialists are needed
|
|
33
|
-
6. **Generate summary** - Create detailed analysis report
|
|
34
|
-
7. **Save to analysis** - Store results in `.prjct/analysis/repo-summary.md`
|
|
35
|
-
|
|
36
|
-
## Implementation
|
|
37
|
-
|
|
38
|
-
When this command is triggered:
|
|
39
|
-
|
|
40
|
-
1. **Create analysis directory**:
|
|
41
|
-
```bash
|
|
42
|
-
mkdir -p .prjct/analysis
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
2. **Scan project structure**:
|
|
46
|
-
- Use Glob to find all files and directories
|
|
47
|
-
- Identify main directories (src, lib, components, etc.)
|
|
48
|
-
- Count files by type (.js, .ts, .py, .go, etc.)
|
|
49
|
-
|
|
50
|
-
3. **Technology detection**:
|
|
51
|
-
- Check package.json for JavaScript/Node.js projects
|
|
52
|
-
- Check requirements.txt, Pipfile for Python projects
|
|
53
|
-
- Check go.mod for Go projects
|
|
54
|
-
- Check Cargo.toml for Rust projects
|
|
55
|
-
- Detect frameworks (React, Vue, Angular, Express, FastAPI, etc.)
|
|
56
|
-
|
|
57
|
-
4. **Architecture analysis**:
|
|
58
|
-
- Identify entry points (main.js, app.py, main.go)
|
|
59
|
-
- Analyze import/require patterns
|
|
60
|
-
- Detect architectural patterns (MVC, microservices, monolith)
|
|
61
|
-
- Identify configuration files
|
|
62
|
-
|
|
63
|
-
5. **Generate comprehensive report**:
|
|
64
|
-
```markdown
|
|
65
|
-
# Repository Analysis Report
|
|
66
|
-
|
|
67
|
-
## Project Overview
|
|
68
|
-
- **Name**: [Detected from package.json or directory name]
|
|
69
|
-
- **Type**: [Web app, Library, CLI tool, etc.]
|
|
70
|
-
- **Primary Language**: [JavaScript, Python, Go, etc.]
|
|
71
|
-
- **Framework**: [React, Express, FastAPI, etc.]
|
|
72
|
-
|
|
73
|
-
## Structure Analysis
|
|
74
|
-
- **Total Files**: [count]
|
|
75
|
-
- **Main Directories**: [list]
|
|
76
|
-
- **Entry Points**: [main files]
|
|
77
|
-
|
|
78
|
-
## Technologies Detected
|
|
79
|
-
- **Languages**: [list with percentages]
|
|
80
|
-
- **Frameworks**: [list]
|
|
81
|
-
- **Tools**: [build tools, testing, etc.]
|
|
82
|
-
- **Dependencies**: [key dependencies]
|
|
83
|
-
|
|
84
|
-
## Architecture
|
|
85
|
-
- **Pattern**: [MVC, Component-based, etc.]
|
|
86
|
-
- **File Organization**: [description]
|
|
87
|
-
- **Key Components**: [main modules/components]
|
|
88
|
-
|
|
89
|
-
## Recommendations
|
|
90
|
-
- [Suggestions for improvements]
|
|
91
|
-
- [Best practices to consider]
|
|
92
|
-
|
|
93
|
-
**Generated**: [timestamp]
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
6. **Save analysis**:
|
|
97
|
-
Write the complete analysis to `.prjct/analysis/repo-summary.md`
|
|
98
|
-
|
|
99
|
-
7. **Provide summary**:
|
|
100
|
-
Display key findings and next suggested actions
|
|
101
|
-
|
|
102
|
-
## Example Workflow
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
# Run analysis
|
|
106
|
-
/p:analyze
|
|
107
|
-
|
|
108
|
-
# Results saved to:
|
|
109
|
-
# .prjct/analysis/repo-summary.md
|
|
110
|
-
|
|
111
|
-
# Example output:
|
|
112
|
-
🔍 **Repository Analysis Complete**
|
|
113
|
-
|
|
114
|
-
**Project**: prjct-cli (CLI Tool)
|
|
115
|
-
**Language**: JavaScript (Node.js)
|
|
116
|
-
**Structure**: 45 files across 8 directories
|
|
117
|
-
**Dependencies**: 12 packages detected
|
|
118
|
-
|
|
119
|
-
📄 **Full report**: `.prjct/analysis/repo-summary.md`
|
|
120
|
-
|
|
121
|
-
**Next steps**:
|
|
122
|
-
- `/p:roadmap` - Plan development roadmap
|
|
123
|
-
- `/p:now "implement feature X"` - Set current focus
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Git Integration
|
|
127
|
-
|
|
128
|
-
When analyzing the repository, also integrate git information:
|
|
129
|
-
|
|
130
|
-
1. **Check if git repository**:
|
|
131
|
-
```javascript
|
|
132
|
-
const gitIntegration = require('../core/git-integration')
|
|
133
|
-
const isGit = await gitIntegration.isGitRepo()
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
2. **Get git statistics**:
|
|
137
|
-
```javascript
|
|
138
|
-
const gitStats = await gitIntegration.getGitStats()
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
3. **Include in analysis report**:
|
|
142
|
-
- Last commit information
|
|
143
|
-
- Working directory status
|
|
144
|
-
- Total commits
|
|
145
|
-
- Contributors
|
|
146
|
-
- Branch information
|
|
147
|
-
|
|
148
|
-
4. **Validation baseline**:
|
|
149
|
-
- Last commit = source of truth
|
|
150
|
-
- Working directory changes = unverified work
|
|
151
|
-
- Use for validating user claims later
|
|
152
|
-
|
|
153
|
-
## Agent Detection
|
|
154
|
-
|
|
155
|
-
Based on the project analysis, determine which AI agents should be generated:
|
|
156
|
-
|
|
157
|
-
### Base Agents (Always)
|
|
158
|
-
- **PM**: Project Manager - Always needed
|
|
159
|
-
- **UX**: UX Designer - Always needed
|
|
160
|
-
- **FE**: Frontend Engineer - Always needed
|
|
161
|
-
- **BE**: Backend Engineer - Always needed
|
|
162
|
-
- **QA**: QA Engineer - Always needed
|
|
163
|
-
- **Scribe**: Documentation - Always needed
|
|
164
|
-
|
|
165
|
-
### Conditional Agents
|
|
166
|
-
|
|
167
|
-
**Security Agent** - Generate if:
|
|
168
|
-
- Project type is 'web' or 'webapp'
|
|
169
|
-
- Authentication detected (JWT, OAuth, sessions)
|
|
170
|
-
- Has API endpoints
|
|
171
|
-
- Security-sensitive data handling
|
|
172
|
-
|
|
173
|
-
**DevOps Agent** - Generate if:
|
|
174
|
-
- Dockerfile or docker-compose.yml found
|
|
175
|
-
- Kubernetes configs found (k8s/, *.yaml with apiVersion)
|
|
176
|
-
- CI/CD configs (`.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`)
|
|
177
|
-
- Deployment scripts detected
|
|
178
|
-
|
|
179
|
-
**Mobile Agent** - Generate if:
|
|
180
|
-
- React Native detected (`react-native` in package.json)
|
|
181
|
-
- Flutter detected (`pubspec.yaml`)
|
|
182
|
-
- Expo detected (`expo` in package.json)
|
|
183
|
-
- Ionic detected (`@ionic` in package.json)
|
|
184
|
-
|
|
185
|
-
**Data Science Agent** - Generate if:
|
|
186
|
-
- ML libraries (`tensorflow`, `pytorch`, `scikit-learn`)
|
|
187
|
-
- Data libraries (`pandas`, `numpy`)
|
|
188
|
-
- Jupyter notebooks (`.ipynb` files)
|
|
189
|
-
- Data pipeline files
|
|
190
|
-
|
|
191
|
-
## Updated Analysis Report Format
|
|
8
|
+
## Flow
|
|
9
|
+
1. Scan: project structure (Glob)
|
|
10
|
+
2. Detect: technologies (package.json, requirements.txt, etc.)
|
|
11
|
+
3. Analyze: architecture patterns
|
|
12
|
+
4. Git: status and stats
|
|
13
|
+
5. Generate: comprehensive report
|
|
14
|
+
6. Save: `analysis/repo-summary.md`
|
|
192
15
|
|
|
16
|
+
## Report Format
|
|
193
17
|
```markdown
|
|
194
|
-
# Repository Analysis
|
|
195
|
-
|
|
196
|
-
**Generated**: [timestamp]
|
|
197
|
-
**Project**: [name]
|
|
18
|
+
# Repository Analysis
|
|
198
19
|
|
|
199
|
-
##
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
20
|
+
## Overview
|
|
21
|
+
- Type: {type}
|
|
22
|
+
- Language: {lang}
|
|
23
|
+
- Framework: {framework}
|
|
203
24
|
|
|
204
25
|
## Git Status
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
- **Author**: [name]
|
|
208
|
-
- **Total Commits**: [count]
|
|
209
|
-
- **Contributors**: [list]
|
|
210
|
-
- **Current Branch**: [branch name]
|
|
26
|
+
- Last commit: {hash} "{msg}" ({time_ago})
|
|
27
|
+
- Status: {clean/has_changes}
|
|
211
28
|
|
|
212
|
-
##
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
216
|
-
- **Deleted Files**: [count]
|
|
217
|
-
|
|
218
|
-
⚠️ **Validation Note**: Last commit is the source of truth. Use this to validate user claims about completed work.
|
|
219
|
-
|
|
220
|
-
## Stack Detection
|
|
221
|
-
- **Languages**: [list with file counts]
|
|
222
|
-
- **Frameworks**: [list]
|
|
223
|
-
- **Build Tools**: [Vite, Webpack, etc.]
|
|
224
|
-
- **Package Manager**: [npm, yarn, pnpm, pip, etc.]
|
|
225
|
-
- **Dependencies**: [count] packages
|
|
29
|
+
## Stack
|
|
30
|
+
- Languages: {list}
|
|
31
|
+
- Frameworks: {list}
|
|
32
|
+
- Dependencies: {count}
|
|
226
33
|
|
|
227
34
|
## Architecture
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
- **Entry Points**: [main files]
|
|
231
|
-
- **Key Directories**: [list]
|
|
35
|
+
- Pattern: {pattern}
|
|
36
|
+
- Entry points: {files}
|
|
232
37
|
|
|
233
38
|
## Recommended Agents
|
|
234
|
-
|
|
235
|
-
|
|
39
|
+
Base (6): PM, UX, FE, BE, QA, Scribe
|
|
40
|
+
Additional: {conditional_agents}
|
|
41
|
+
|
|
42
|
+
Generated: {timestamp}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Response
|
|
46
|
+
```
|
|
47
|
+
🔍 Analysis complete!
|
|
236
48
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
- DevOps (Docker + GitHub Actions found)
|
|
49
|
+
Project: {name} ({type})
|
|
50
|
+
Stack: {stack}
|
|
240
51
|
|
|
241
|
-
|
|
242
|
-
- **Total Files**: [count]
|
|
243
|
-
- **Code Files**: [count]
|
|
244
|
-
- **Test Files**: [count]
|
|
245
|
-
- **Config Files**: [count]
|
|
52
|
+
📄 Full report: analysis/repo-summary.md
|
|
246
53
|
|
|
247
|
-
|
|
248
|
-
1. Run `/p:init` to generate agents based on this analysis
|
|
249
|
-
2. Use `/p:now "task"` to start working
|
|
250
|
-
3. Use `/p:sync` to update agents when stack changes
|
|
54
|
+
/p:roadmap | /p:now
|
|
251
55
|
```
|
|
252
56
|
|
|
253
|
-
## Error Handling
|
|
254
|
-
- Handle projects without clear package managers
|
|
255
|
-
- Gracefully handle large repositories (>1000 files)
|
|
256
|
-
- Provide meaningful analysis even for minimal projects
|
|
257
|
-
- Skip binary files and common ignore patterns
|
|
258
|
-
- Handle non-git repositories (skip git section)
|
|
259
|
-
- Handle repositories without commits (note in report)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Read, Write]
|
|
3
|
+
description: "Start task with agent assignment"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /p:build
|
|
7
|
+
|
|
8
|
+
## Validation
|
|
9
|
+
- Blocks if: `core/now.md` has active task
|
|
10
|
+
- Error: "Complete current task first. Use /p:done"
|
|
11
|
+
|
|
12
|
+
## Flow
|
|
13
|
+
1. Parse: task desc OR queue # (1-5)
|
|
14
|
+
2. Detect: `TaskSchema.detectAgent(task)` + complexity
|
|
15
|
+
3. Get: GitHub dev from `git config user.name` + remote
|
|
16
|
+
4. Create: task metadata with agent, complexity, estimate
|
|
17
|
+
5. Write: `core/now.md` with frontmatter
|
|
18
|
+
|
|
19
|
+
## Frontmatter
|
|
20
|
+
```yaml
|
|
21
|
+
---
|
|
22
|
+
id: task-{timestamp}
|
|
23
|
+
agent: {detected_agent}
|
|
24
|
+
dev: @{github_username}
|
|
25
|
+
complexity: {trivial|simple|moderate|complex|epic}
|
|
26
|
+
estimated: {time_range}
|
|
27
|
+
started: {iso_timestamp}
|
|
28
|
+
---
|
|
29
|
+
{task_description}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Response
|
|
33
|
+
```
|
|
34
|
+
🎯 {task}
|
|
35
|
+
{agent_icon} {agent_name}
|
|
36
|
+
Est: {time_estimate}
|
|
37
|
+
Complexity: {level}
|
|
38
|
+
|
|
39
|
+
/p:done when finished
|
|
40
|
+
```
|
|
41
|
+
|
|
@@ -1,102 +1,39 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
description:
|
|
2
|
+
allowed-tools: [Read, Edit, Bash]
|
|
3
|
+
description: "Code cleanup and optimization"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /p:cleanup
|
|
7
|
-
|
|
8
|
-
Remove dead code, optimize imports, clean project structure, analyze unused dependencies, and clean up temporary files. Comprehensive cleanup with backup capabilities.
|
|
6
|
+
# /p:cleanup
|
|
9
7
|
|
|
10
8
|
## Usage
|
|
11
|
-
|
|
12
9
|
```
|
|
13
|
-
/p:cleanup [
|
|
10
|
+
/p:cleanup [--type code|imports|files|deps|all] [--dry-run]
|
|
14
11
|
```
|
|
15
12
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
## Flow
|
|
14
|
+
1. Parse: type + mode
|
|
15
|
+
2. Backup: create if needed
|
|
16
|
+
3. Execute: cleanup by type
|
|
17
|
+
4. Validate: syntax check
|
|
18
|
+
5. Log: `memory/cleanup-log.jsonl`
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
20
|
+
## Types
|
|
21
|
+
- **code**: Remove console.logs, commented code, dead code
|
|
22
|
+
- **imports**: Remove unused, organize imports
|
|
23
|
+
- **files**: Remove temp files, empty files
|
|
24
|
+
- **deps**: Analyze unused dependencies
|
|
25
|
+
- **all**: All cleanup types
|
|
38
26
|
|
|
27
|
+
## Response
|
|
39
28
|
```
|
|
40
|
-
🧹
|
|
41
|
-
|
|
42
|
-
📊 Cleanup Results:
|
|
43
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
-
|
|
45
|
-
🗑️ Dead Code Removed:
|
|
46
|
-
• Console.logs: {count} statements
|
|
47
|
-
• Commented code: {count} blocks
|
|
48
|
-
• Unused functions: {count}
|
|
29
|
+
🧹 Cleanup complete!
|
|
49
30
|
|
|
50
|
-
|
|
51
|
-
•
|
|
52
|
-
•
|
|
31
|
+
📊 Results:
|
|
32
|
+
• Console.logs: {N} removed
|
|
33
|
+
• Dead code: {N} blocks
|
|
34
|
+
• Unused imports: {N}
|
|
35
|
+
• Space freed: {X} MB
|
|
53
36
|
|
|
54
|
-
|
|
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
|
|
37
|
+
/p:test | /p:ship
|
|
70
38
|
```
|
|
71
39
|
|
|
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
|
-
```
|