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,181 +1,148 @@
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 complete automated workflow'
4
4
  ---
5
5
 
6
6
  # /p:ship
7
7
 
8
8
  ## Usage
9
+
9
10
  ```
10
- /p:ship <feature>
11
+ /p:ship # Current task
12
+ /p:ship "<feature>" # Named feature
11
13
  ```
12
14
 
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. **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
- ```
15
+ ## Complete Workflow (Automated)
34
16
 
35
- 6. Response:
36
- ```
37
- 🚀 [feature name] shipped!
17
+ 1. ✅ **Lint checks** → Run project linters
18
+ 2. ✅ **Run tests** → Execute test suite (does NOT block if fail)
19
+ 3. **Update docs** → Update relevant documentation
20
+ 4. ✅ **Update version** → Bump version (patch/minor based on changes)
21
+ 5. ✅ **Update CHANGELOG** → Add entry with changes
22
+ 6. ✅ **Git commit** → Create commit with metadata
23
+ 7. ✅ **Git push** → Push to remote
24
+ 8. ✅ **Recommend compact** → Suggest conversation compacting
38
25
 
39
- 📈 This week: [count] | Total: [total]
40
- Velocity: [X] features/day
26
+ ## Workflow Steps Detail
41
27
 
42
- Keep the momentum!
43
- • "start next task" → Keep building
44
- • "see my progress" → View stats
45
- • "plan ahead" → Strategic thinking
28
+ ### Step 1: Lint Checks
46
29
 
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:
30
+ ```bash
31
+ npm run lint || yarn lint || pnpm lint
32
+ # If fails: Show errors but continue
33
+ ```
53
34
 
54
- ### Step 1: Detect Changes
55
- ```javascript
56
- const gitIntegration = require('../core/git-integration')
35
+ ### Step 2: Run Tests
57
36
 
58
- // Get files changed for this feature
59
- const changes = await gitIntegration.getChangesSince(featureStartTime)
37
+ ```bash
38
+ npm test || yarn test || pnpm test
39
+ # If fails: Show results but DO NOT block (no infinite loop)
40
+ # User decides if acceptable to ship
60
41
  ```
61
42
 
62
- ### Step 2: Generate Documentation
63
- Invoke Scribe agent with prompt:
64
- ```
65
- Document the following shipped feature:
43
+ ### Step 3: Update Docs
66
44
 
67
- Feature: "[feature description]"
68
- Shipped: [timestamp]
69
- Files changed:
70
- ${changes.files.join('\n')}
45
+ - Update README if needed
46
+ - Update API docs if endpoints changed
47
+ - Update component docs if UI changed
71
48
 
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
49
+ ### Step 4: Update Version
78
50
 
79
- Keep it concise and user-focused (< 300 words).
51
+ ```json
52
+ // package.json
53
+ "version": "X.Y.Z" → "X.Y.(Z+1)" // patch for fixes
54
+ "version": "X.Y.Z" → "X.(Y+1).0" // minor for features
80
55
  ```
81
56
 
82
- ### Step 3: Show Draft & Request Confirmation
83
- ```
84
- 📝 Scribe Agent Feature Documentation
57
+ ### Step 5: Update CHANGELOG
85
58
 
86
- ## Feature: [feature description]
59
+ ```markdown
60
+ ## [X.Y.Z] - YYYY-MM-DD
87
61
 
88
- **Shipped**: [date]
89
- **Impact**: [user-facing impact]
62
+ ### Added / Changed / Fixed
90
63
 
91
- **Overview**:
92
- [AI-generated feature summary]
64
+ - {feature_description}
65
+ - Agent: {agent}
66
+ - Time: {actual_time}
67
+ ```
93
68
 
94
- **Technical Details**:
95
- - [Implementation highlights]
96
- - [Key components]
69
+ ### Step 6-7: Git Commit + Push
97
70
 
98
- **Usage**:
99
- [Examples if applicable]
71
+ Auto-commit with metadata and push
100
72
 
101
- **Breaking Changes**: [None / List]
73
+ ### Step 8: Log to Session
102
74
 
103
- ─────────────────────────────────────
75
+ Append to `progress/sessions/{YYYY-MM}/{YYYY-MM-DD}.jsonl`:
104
76
 
105
- Save this documentation? (y/n): _
77
+ ```jsonl
78
+ {"ts":"2025-10-04T18:00:00Z","type":"feature_ship","name":"{feature}","tasks_done":{N},"duration":"{Xh}","agent":"{agent}","version":"{X.Y.Z}"}
106
79
  ```
107
80
 
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
- ```
81
+ ### Step 9: Update Index
118
82
 
119
- ## Example with Scribe
83
+ Prepend to `progress/shipped.md` (keep only last 30 days):
120
84
 
85
+ ```markdown
86
+ ## 2025-10-04
87
+ - ✅ {feature_name} ({Xh}, {N} tasks, v{X.Y.Z})
121
88
  ```
122
- /p:ship "authentication system"
123
89
 
124
- 🚀 authentication system shipped!
90
+ If shipped.md has entries > 30 days old, archive to `progress/archive/shipped-{YYYY-MM}.md`
125
91
 
126
- 📝 Scribe Agent is documenting your feature...
92
+ ### Step 10: Update Roadmap
127
93
 
128
- ─────────────────────────────────────────────
94
+ Mark feature as complete in `planning/roadmap.md`:
129
95
 
130
- ## Feature: authentication system
96
+ ```markdown
97
+ ## Completed
98
+ - [x] {feature_name} - Shipped 2025-10-04
99
+ ```
131
100
 
132
- **Shipped**: 2025-10-02
133
- **Impact**: Users can now securely log in and manage sessions
101
+ ### Step 11: Recommend Compact
134
102
 
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.
103
+ Suggest compacting conversation after ship
137
104
 
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
105
+ ## Commit Message Format
144
106
 
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)
107
+ ```
108
+ feat: {feature_name}
150
109
 
151
- **Breaking Changes**: None
110
+ Agent: {agent}
111
+ Dev: @{github_dev}
112
+ Complexity: {complexity}
113
+ Time: {actual_time}
152
114
 
153
- **Usage**:
154
- ```javascript
155
- // Protected route example
156
- app.get('/api/profile', jwtMiddleware, profileController.get)
115
+ 🤖 Generated with [p/](https://www.prjct.app/)
116
+ Designed for [Claude](https://www.anthropic.com/claude)
157
117
  ```
158
118
 
159
- ─────────────────────────────────────────────
119
+ **IMPORTANT**: This footer format MUST be used in ALL commits made by prjct.
120
+
121
+ ## Response
160
122
 
161
- Save this documentation? (y/n): y
123
+ ```
124
+ 🚀 {feature} shipped!
162
125
 
163
- Feature documentation saved to analysis/feature-docs/!
126
+ Workflow completed:
127
+ ✅ Lint checks: {pass/fail_continued}
128
+ ✅ Tests: {pass/fail_continued}
129
+ ✅ Docs: updated
130
+ ✅ Version: {old} → {new}
131
+ ✅ CHANGELOG: updated
132
+ ✅ Git: committed + pushed
164
133
 
165
- 📈 This week: 3 | Total: 15
166
- Velocity: 2.1 features/day
134
+ {agent_icon} {agent} {actual_time}
167
135
 
168
- Keep the momentum!
169
- "start next task" Keep building
170
- • "see my progress" → View stats
136
+ 💡 Recommendation: Compact conversation now
137
+ (Keeps context clean for next feature)
171
138
 
172
- Or: /p:now | /p:recap
139
+ /p:feature | /p:done
173
140
  ```
174
141
 
175
- ## Notes
142
+ ## Important Notes
176
143
 
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
144
+ - **Tests/Lint failures DO NOT block shipping**
145
+ - User sees results and decides
146
+ - Prevents infinite loop of "fix → test → fail → fix"
147
+ - ALWAYS updates version and CHANGELOG
148
+ - ALWAYS commits and pushes if workflow completes
@@ -0,0 +1,42 @@
1
+ ---
2
+ allowed-tools: [Read]
3
+ description: 'KPI dashboard with ASCII graphics'
4
+ ---
5
+
6
+ # /p:status
7
+
8
+ ## Flow
9
+
10
+ 1. Read: all core files + progress files
11
+ 2. Calculate: metrics (sprint %, tasks complete, days since ship, etc.)
12
+ 3. Render: `ASCIIGraphics.createDashboard(data)`
13
+
14
+ ## Data Structure
15
+
16
+ ```js
17
+ {
18
+ sprintProgress: (complete / total) * 100,
19
+ tasksComplete: count,
20
+ tasksTotal: count,
21
+ ideasCount: count,
22
+ daysSinceShip: days,
23
+ currentTask: string,
24
+ taskTime: 'Xh Ym ago'
25
+ }
26
+ ```
27
+
28
+ ## Output (Catppuccin Mocha)
29
+
30
+ ```
31
+ ┌─ Project Status ────────────────┐
32
+ │ Sprint Progress [████░] 80% │
33
+ │ Tasks Complete 12/15 │
34
+ │ Ideas Backlog 8 │
35
+ │ Days Since Ship 3 │
36
+ ├─ Current Focus ─────────────────┤
37
+ │ → {current_task} │
38
+ │ Started: {time_ago} │
39
+ └─────────────────────────────────┘
40
+ ```
41
+
42
+ **Colors**: Mauve borders, Teal progress, Sapphire highlights, Green/Yellow/Red for status
@@ -1,220 +1,34 @@
1
1
  ---
2
- allowed-tools: [Read, Write, Bash, Glob, Grep, TodoWrite]
3
- description: "Sync project state and update AI agents based on latest analysis"
2
+ allowed-tools: [Read, Write, Bash, TodoWrite]
3
+ description: 'Sync project state and generate dynamic agents'
4
4
  ---
5
5
 
6
- # /p:sync - Sync Project State
6
+ # /p:sync
7
7
 
8
- ## Purpose
9
- Re-analyze the project and update all AI agents with current project state, stack changes, and new requirements.
8
+ ## Flow
10
9
 
11
- ## Global Architecture
12
- This command uses the global prjct architecture:
13
- - Data stored in: `~/.prjct-cli/projects/{id}/`
14
- - Config stored in: `{project}/.prjct/prjct.config.json`
15
- - Agents updated in: `~/.claude/agents/`
10
+ 1. Run: `/p:analyze` → get current state
11
+ 2. **Read**: `analysis/repo-summary.md`
12
+ 3. **Generate**: Dynamic agents for each technology
13
+ 4. Log: changes to `memory/context.jsonl`
16
14
 
17
- ## Usage
18
- ```
19
- /p:sync
20
- ```
21
-
22
- ## When to Run
23
- - After major dependency changes
24
- - When adding new frameworks or tools
25
- - After significant architecture changes
26
- - When project type changes (e.g., adding mobile support)
27
- - Periodically to keep agents up-to-date
28
-
29
- ## Execution Flow
30
-
31
- ### 1. Re-run Project Analysis
32
-
33
- Execute `/p:analyze` to get current project state:
34
- ```javascript
35
- // This will:
36
- // 1. Scan all files and directories
37
- // 2. Detect current stack and frameworks
38
- // 3. Check git status
39
- // 4. Compare with previous analysis
40
- // 5. Identify what changed
41
- ```
42
-
43
- ### 2. Detect Changes
44
-
45
- Compare new analysis with previous:
46
- ```javascript
47
- const previousAnalysis = await readFile('.prjct/analysis/repo-summary.md')
48
- const currentAnalysis = await runAnalyze()
49
-
50
- const changes = {
51
- newDependencies: [],
52
- removedDependencies: [],
53
- newFrameworks: [],
54
- stackChanges: [],
55
- structureChanges: []
56
- }
57
-
58
- // Detect what changed
59
- if (currentAnalysis.frameworks !== previousAnalysis.frameworks) {
60
- changes.newFrameworks = difference(current, previous)
61
- }
62
- ```
63
-
64
- ### 3. Update Existing Agents
65
-
66
- Regenerate all current agents with new context:
67
- ```javascript
68
- const agentGenerator = require('../core/agent-generator')
15
+ ## Agent Generation
69
16
 
70
- // Update all existing agents
71
- const updated = await agentGenerator.updateExistingAgents(currentAnalysis)
17
+ **See `templates/agents/AGENTS.md` for complete reference** with examples and guidelines.
72
18
 
73
- console.log(`↻ Updated ${updated.length} agents with new context`)
74
- ```
75
-
76
- ### 4. Add New Agents
77
-
78
- Generate any newly required agents:
79
- ```javascript
80
- // Detect newly required agents
81
- const existingAgents = await listAgentFiles()
82
- const requiredAgents = detectRequiredAgents(currentAnalysis)
83
- const newAgents = requiredAgents.filter(a => !existingAgents.includes(a))
84
-
85
- if (newAgents.length > 0) {
86
- for (const agentType of newAgents) {
87
- await agentGenerator.generateAgent(agentType, currentAnalysis)
88
- console.log(`✅ Added ${agentType} agent`)
89
- }
90
- }
91
- ```
92
-
93
- ### 5. Remove Obsolete Agents (Optional)
94
-
95
- Ask user if agents should be removed:
96
- ```javascript
97
- const obsoleteAgents = existingAgents.filter(a => !requiredAgents.includes(a))
19
+ Use `generator.generateDynamicAgent(name, config)` for each specialist.
98
20
 
99
- if (obsoleteAgents.length > 0) {
100
- console.log(`\n⚠️ The following agents may no longer be needed:`)
101
- obsoleteAgents.forEach(a => console.log(` - ${a}`))
21
+ ## Response
102
22
 
103
- const shouldRemove = await confirmWithUser('\nRemove these agents? (y/n): ')
104
-
105
- if (shouldRemove) {
106
- await agentGenerator.cleanupObsoleteAgents(requiredAgents)
107
- }
108
- }
109
23
  ```
24
+ 🔄 Sync complete!
110
25
 
111
- ### 6. Update Analysis File
112
-
113
- Save new analysis:
114
- ```bash
115
- # Backup previous analysis
116
- cp .prjct/analysis/repo-summary.md .prjct/analysis/repo-summary.backup.md
117
-
118
- # Save new analysis
119
- # (already saved by /p:analyze)
120
- ```
121
-
122
- ### 7. Update Memory Log
123
-
124
- Log sync action:
125
- ```jsonl
126
- {"timestamp":"2025-10-02T14:30:00Z","action":"sync","author":"Name","changes":{"addedAgents":["mobile"],"updatedAgents":["fe","be"],"removedAgents":[],"stackChanges":["added react-native"]}}
127
- ```
26
+ 🤖 Agents Generated:
27
+ • {agent_name_1} - {role}
28
+ {agent_name_2} - {role}
128
29
 
129
- ## Output Examples
30
+ 📋 Based on: analysis/repo-summary.md
31
+ 💡 See templates/agents/AGENTS.md for generation reference
130
32
 
131
- ### No Changes
33
+ /p:context
132
34
  ```
133
- 🔄 Syncing project state...
134
-
135
- 📊 Analysis Complete
136
- No significant changes detected
137
-
138
- 🤖 Agents Status
139
- ✓ All 7 agents are up-to-date
140
-
141
- ✅ Sync complete! Everything is current.
142
- ```
143
-
144
- ### With Changes
145
- ```
146
- 🔄 Syncing project state...
147
-
148
- 📊 Changes Detected
149
- ✅ New dependency: @tanstack/react-query
150
- ✅ New framework: Expo (React Native)
151
- ℹ️ Architecture: Still feature-based
152
-
153
- 🤖 Agent Updates
154
- ↻ FE agent - Added React Query patterns
155
- ↻ BE agent - Updated API integration context
156
- ✅ Mobile agent - ADDED (React Native detected)
157
- ✓ Other agents - No changes needed
158
-
159
- ⚠️ Obsolete Agents
160
- - devops (Docker removed from project)
161
-
162
- Remove obsolete agents? (y/n): _
163
-
164
- ✅ Sync complete!
165
- - 2 agents updated
166
- - 1 agent added
167
- - 1 agent removed
168
- ```
169
-
170
- ### Stack Migration
171
- ```
172
- 🔄 Syncing project state...
173
-
174
- 📊 Major Changes Detected
175
- ⚠️ Framework changed: Vue → React
176
- ⚠️ Build tool changed: Webpack → Vite
177
- ✅ New: TypeScript added
178
-
179
- 🤖 Full Agent Regeneration
180
- ↻ PM - Updated with React patterns
181
- ↻ UX - Updated component guidelines
182
- ↻ FE - COMPLETELY REGENERATED for React + TS
183
- ↻ BE - Updated API patterns
184
- ↻ QA - Updated test framework context
185
- ↻ Scribe - Updated documentation style
186
-
187
- ✅ Sync complete! All agents updated for new stack.
188
-
189
- 💡 Tip: Review agent descriptions to see new capabilities.
190
- ```
191
-
192
- ## Error Handling
193
-
194
- - **No .prjct/**: Error - Project not initialized, run `/p:init` first
195
- - **No analysis file**: Warning - Running first-time analysis
196
- - **Agent generation fails**: Warn but continue with others
197
- - **Permission issues**: Suggest checking `~/.claude/agents/` permissions
198
-
199
- ## Notes
200
-
201
- - Sync is safe to run anytime
202
- - Existing agents are updated, not deleted (unless confirmed)
203
- - Git status is refreshed during sync
204
- - Analysis diff helps track project evolution
205
- - Agents get project-specific context from analysis
206
-
207
- ## Related Commands
208
-
209
- - `/p:analyze` - Just analyze without updating agents
210
- - `/p:init` - Initialize project (first-time setup)
211
- - `/p:context` - View current project context
212
-
213
- ## Implementation Notes
214
-
215
- The sync command should:
216
- 1. Be idempotent (safe to run multiple times)
217
- 2. Preserve manual agent customizations (warn if detected)
218
- 3. Create backups before major changes
219
- 4. Provide clear diff of what changed
220
- 5. Allow granular control (which agents to update)
@@ -1,97 +1,37 @@
1
1
  ---
2
- allowed-tools: [Read, Write, Edit, TodoWrite, Bash, Glob]
3
- description: "Break down and execute complex tasks systematically"
2
+ allowed-tools: [Read, Write, TodoWrite]
3
+ description: 'Break down complex tasks'
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:task - Complex Task Execution
15
-
16
- ## Purpose
17
- Handle complex features by breaking them down, executing systematically, and tracking progress. No overwhelm.
6
+ # /p:task
18
7
 
19
8
  ## Usage
9
+
20
10
  ```
21
11
  /p:task <description>
22
12
  ```
23
13
 
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
14
+ ## Flow
30
15
 
31
- ## Implementation
16
+ 1. Analyze: task complexity
17
+ 2. Break down: into 3-7 subtasks
18
+ 3. Create: execution plan
19
+ 4. Execute: each subtask with validation
20
+ 5. Track: progress in `planning/tasks/`
32
21
 
33
- **Task breakdown**:
34
- - Identify main components needed
35
- - Order by dependencies
36
- - Estimate time for each
37
- - Create actionable subtasks
22
+ ## Response
38
23
 
39
- **Example breakdown**:
40
24
  ```
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
25
+ 📋 Task Plan: {description}
57
26
 
58
- 4. Frontend forms (30 min)
59
- - Login component
60
- - Signup component
27
+ Breakdown:
28
+ 1. {subtask} (~{time})
29
+ 2. {subtask} (~{time})
30
+ 3. {subtask} (~{time})
61
31
 
62
- 5. Testing (20 min)
63
- - Auth flow tests
64
- - Security tests
32
+ Est total: {total_time}
65
33
 
66
34
  🚀 Starting execution...
67
- [1/5] Creating database schema... ✅
68
- [2/5] Building auth middleware... 🔄
35
+ [1/{N}] {subtask}... ✅
36
+ [2/{N}] {subtask}... 🔄
69
37
  ```
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