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.
Files changed (45) hide show
  1. package/CHANGELOG.md +153 -1
  2. package/CLAUDE.md +43 -28
  3. package/README.md +1 -1
  4. package/bin/prjct +78 -63
  5. package/core/agent-generator.js +19 -10
  6. package/core/ascii-graphics.js +433 -0
  7. package/core/command-registry.js +553 -0
  8. package/core/commands.js +203 -4
  9. package/core/task-schema.js +342 -0
  10. package/package.json +2 -1
  11. package/templates/agents/AGENTS.md +79 -101
  12. package/templates/agents/be.template.md +14 -29
  13. package/templates/agents/coordinator.template.md +34 -0
  14. package/templates/agents/data.template.md +14 -28
  15. package/templates/agents/devops.template.md +14 -28
  16. package/templates/agents/fe.template.md +14 -29
  17. package/templates/agents/mobile.template.md +14 -28
  18. package/templates/agents/qa.template.md +14 -41
  19. package/templates/agents/scribe.template.md +15 -81
  20. package/templates/agents/security.template.md +14 -28
  21. package/templates/agents/ux.template.md +14 -36
  22. package/templates/commands/analyze.md +36 -239
  23. package/templates/commands/build.md +41 -0
  24. package/templates/commands/cleanup.md +24 -87
  25. package/templates/commands/context.md +24 -93
  26. package/templates/commands/design.md +20 -98
  27. package/templates/commands/done.md +16 -181
  28. package/templates/commands/fix.md +27 -66
  29. package/templates/commands/git.md +33 -60
  30. package/templates/commands/help.md +18 -52
  31. package/templates/commands/idea.md +11 -36
  32. package/templates/commands/init.md +30 -277
  33. package/templates/commands/next.md +20 -62
  34. package/templates/commands/now.md +18 -22
  35. package/templates/commands/progress.md +23 -78
  36. package/templates/commands/recap.md +22 -74
  37. package/templates/commands/roadmap.md +21 -90
  38. package/templates/commands/ship.md +26 -161
  39. package/templates/commands/status.md +40 -0
  40. package/templates/commands/stuck.md +21 -33
  41. package/templates/commands/sync.md +19 -209
  42. package/templates/commands/task.md +18 -80
  43. package/templates/commands/test.md +23 -72
  44. package/templates/commands/workflow.md +20 -212
  45. package/templates/agents/pm.template.md +0 -84
package/CHANGELOG.md CHANGED
@@ -7,6 +7,158 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.0] - 2025-10-03
11
+
12
+ ### Changed
13
+ - **Philosophy Transformation** - Complete rebrand from PM tool to developer momentum tool
14
+ - **Problem**: "Project management" messaging didn't match target audience (indie hackers, solo builders, small teams)
15
+ - **Solution**: Eliminated ALL "project management" language across entire codebase
16
+ - **Messaging**: "Just Ship. No BS" for creators, not managers
17
+ - **Files Modified**:
18
+ - `CLAUDE.md` - Changed project description from "AI-integrated project management framework" to "developer momentum tool for solo builders, indie hackers, and small teams (2-5 people). Just ship. No BS."
19
+ - `README.md` - Removed "project management overhead" → "meetings or BS overhead"
20
+ - `templates/agents/AGENTS.md` - Complete rewrite (165→143 lines) with anti-PM messaging: "NOT project management. NO sprints, story points, ceremonies, or meetings."
21
+ - `CHANGELOG.md` - Updated historical references
22
+ - **Website** - Transformed all copy to creator-focused messaging:
23
+ - `Hero.tsx`, `Features.tsx` - "PM, Frontend..." → "Coordinator, Frontend..."
24
+ - `ClaudeSuperpowers.tsx` - "PM Agent - Task breakdown & planning" → "Coordinator - Progress tracking & shipping"
25
+ - `Privacy.tsx` - "project management tool" → "developer momentum tool"
26
+ - **Result**: Zero "PM" or "project management" references (except as critique of traditional tools)
27
+
28
+ - **Agent System Redesign** - Renamed PM agent to Coordinator
29
+ - **Problem**: "Project Manager" agent didn't align with "no BS" philosophy
30
+ - **Solution**: Complete agent transformation
31
+ - **Changes**:
32
+ - Renamed `pm.template.md` → `coordinator.template.md` (85→35 lines, 58% reduction)
33
+ - Role: "Project Manager" → "Progress Coordinator"
34
+ - Focus: Task breakdown/planning → Progress tracking & shipping features
35
+ - Updated `core/agent-generator.js` baseAgents: `'pm'` → `'coordinator'`
36
+ - Agent color: Blue → Cyan
37
+ - **Breaking Change**: Existing projects need `/p:sync` to regenerate agents
38
+ - **Philosophy**: "Keep builders aligned on what matters: shipping features, tracking wins, staying focused" + "SHIP features and track progress, not manage people or run meetings"
39
+
40
+ - **Template Optimization** - 46.5% reduction in agent template verbosity
41
+ - **Problem**: Templates filled context window with verbose pre-written content
42
+ - **Solution**: Use instructions + placeholders instead of examples
43
+ - **Results**:
44
+ - Total reduction: 540 → 289 lines (46.5% overall)
45
+ - `fe.template.md`: 43→28 lines (35%)
46
+ - `be.template.md`: 43→28 lines (35%)
47
+ - `ux.template.md`: 50→28 lines (44%)
48
+ - `qa.template.md`: 55→28 lines (49%)
49
+ - `scribe.template.md`: 96→30 lines (69% - biggest reduction!)
50
+ - `coordinator.template.md`: 85→35 lines (58%)
51
+ - `devops.template.md`, `mobile.template.md`, `data.template.md`, `security.template.md`: All reduced to 28 lines
52
+ - **Strategy**: Compressed expertise lists (5→3 items), simplified principles, used placeholders like `[PROJECT_NAME]`, `[DETECTED_STACK]`
53
+ - **Benefit**: Agents load faster, consume fewer tokens, maintain clarity
54
+
55
+ ## [0.5.3] - 2025-10-02
56
+
57
+ ### Fixed
58
+ - **Website Build Issues** - Fixed ES module compatibility for browser
59
+ - **Problem**: Command registry using CommonJS `require()` caused runtime errors in browser
60
+ - **Solution**:
61
+ - Created ES module version at `website/src/data/command-registry.ts`
62
+ - Converted `module.exports` to `export default`
63
+ - Replaced `require()` with ES6 `import` in Components.tsx
64
+ - Added proper TypeScript type annotations
65
+ - **Files Modified**:
66
+ - `website/src/data/command-registry.ts` (NEW) - ES module version with TypeScript types
67
+ - `website/src/pages/Commands.tsx` - ES6 import, removed TypeScript `any` types
68
+ - **Result**: Website now loads correctly with dynamic command generation from registry
69
+
70
+ - **Documentation Accuracy** - Updated Getting Started guide with correct installation flow
71
+ - **Problem**: Documentation showed incorrect setup steps (missing npm install and prjct start)
72
+ - **Solution**: Updated to reflect actual installation process:
73
+ 1. `npm install -g prjct-cli` - Global installation
74
+ 2. `prjct start` - Setup Claude Code integration
75
+ 3. `/p:init` - Initialize project
76
+ 4. `/p:now` - Start working
77
+ - **Files Modified**:
78
+ - `website/src/pages/Documentation.tsx` - Corrected Getting Started section
79
+
80
+ ## [0.5.2] - 2025-10-02
81
+
82
+ ### Added
83
+ - **Command Registry System** - Single source of truth for all prjct commands (`core/command-registry.js`)
84
+ - **Problem**: Commands were dispersed across 4 locations with inconsistencies:
85
+ - `bin/prjct` (15 commands in help)
86
+ - `website/Commands.tsx` (18 commands displayed)
87
+ - `CLAUDE.md` (18 commands documented)
88
+ - `templates/commands/` (21 template files)
89
+ - **Solution**: Created `core/command-registry.js` as centralized registry
90
+ - **Features**:
91
+ - All 25 commands defined in single location with metadata
92
+ - Category system (work, planning, design, quality, progress, help, git, testing, setup)
93
+ - Implementation status tracking (19 implemented, 6 planned)
94
+ - Platform availability (Claude Code vs Terminal)
95
+ - Template file mapping
96
+ - Helper functions for filtering, querying, and statistics
97
+ - **Files Modified**:
98
+ - `core/command-registry.js` (NEW) - 430 lines, complete command metadata
99
+ - `bin/prjct` - Dynamic help generation from registry
100
+ - `website/Commands.tsx` - Auto-generated command categories
101
+ - `CLAUDE.md` - Command list synced with registry
102
+ - `scripts/validate-commands.js` (NEW) - Automated validation tool
103
+ - **Validation**:
104
+ - Registry structure validation (duplicates, invalid categories)
105
+ - Template file consistency check
106
+ - Implementation verification (camelCase method detection)
107
+ - CLI switch case validation
108
+ - Automated validation script with colored output
109
+ - **Benefits**:
110
+ - ✅ Zero inconsistencies - single source of truth
111
+ - ✅ Easy to add new commands - update one file
112
+ - ✅ Automated validation prevents drift
113
+ - ✅ Statistics tracking (25 total, 19 implemented)
114
+ - ✅ Clear roadmap (6 planned features visible)
115
+ - **Usage**: `node scripts/validate-commands.js` to verify consistency
116
+
117
+ - **Complete Workflow System Integration** - Automated task orchestration with AI workflow agents
118
+ - **Features**:
119
+ - **Auto-initialization**: Workflows activate automatically when using `/p:idea "implement [feature]"`
120
+ - **Task Classification**: Automatic detection of workflow type (ui, api, bug, refactor, feature)
121
+ - **Capability Detection**: Detects design system, test framework, docs system
122
+ - **Interactive Prompts**: Asks user to choose tools when capabilities are missing
123
+ - **Step Progression**: Each `/p:done` advances to next workflow step
124
+ - **Agent Assignment**: Each step assigned to appropriate specialist agent
125
+ - **Workflow Status**: New `/p:workflow` command shows progress and remaining steps
126
+ - **Files Modified**:
127
+ - `core/commands.js` - Integrated workflow engine into `idea()`, added `workflow()` command
128
+ - `core/agent-generator.js` - Corrected to use project-specific agents directory
129
+ - **Architecture**:
130
+ - Workflows stored in `~/.prjct-cli/projects/{id}/workflow/state.json`
131
+ - Agents stored in `~/.prjct-cli/projects/{id}/agents/`
132
+ - 5 workflow types with specialized step sequences
133
+ - 10 agent types: pm, ux, fe, be, qa, scribe, security, devops, mobile, data
134
+ - **Usage**:
135
+ 1. `p. implement auth system` → Auto-creates workflow
136
+ 2. `p. now` → Start first step
137
+ 3. `p. done` → Complete step, advance to next
138
+ 4. `p. workflow` → Check progress
139
+ - **Result**: Fully automated task orchestration with smart step-by-step guidance
140
+
141
+ - **`/p:sync` Command Implementation** - Sync project state and update workflow agents
142
+ - **Root Cause**: Template existed but method was not implemented in `core/commands.js`
143
+ - **Files Modified**:
144
+ - `core/commands.js` (added `sync()` method with proper global path)
145
+ - `core/agent-generator.js` (corrected to use project-specific agents directory)
146
+ - **Architecture Fix**:
147
+ - Agents are **NOT** for Claude's `~/.claude/agents/` (that was wrong)
148
+ - Agents are **workflow specialists** stored in `~/.prjct-cli/projects/{id}/agents/`
149
+ - Used for task assignment in workflow system
150
+ - Each agent (pm, ux, fe, be, qa, scribe, security, devops, mobile, data) handles specific workflow steps
151
+ - **Features**:
152
+ - Re-analyzes project with `/p:analyze` (silent mode)
153
+ - Generates/updates workflow agents in global project directory
154
+ - Creates base agents: pm, ux, fe, be, qa, scribe
155
+ - Creates conditional agents: security, devops, mobile, data (based on stack)
156
+ - Logs sync action to `memory/context.jsonl`
157
+ - Shows summary and agents path
158
+ - **Usage**: `p. sync` or `/p:sync`
159
+ - **When to Use**: After dependency changes, framework updates, before using workflows
160
+ - **Result**: Workflow agents ready for task assignment in `~/.prjct-cli/projects/{id}/agents/`
161
+
10
162
  ## [0.5.1] - 2025-10-02
11
163
 
12
164
  ### Fixed
@@ -929,7 +1081,7 @@ See [MIGRATION.md](MIGRATION.md) for detailed migration instructions.
929
1081
 
930
1082
  ### Added
931
1083
  - Initial release of prjct-cli
932
- - AI-integrated project management system
1084
+ - AI-integrated developer momentum tool
933
1085
  - Support for Claude Code, OpenAI Codex, and Terminal
934
1086
  - Core commands: init, now, done, ship, recap, etc.
935
1087
  - MCP integration for AI assistants
package/CLAUDE.md CHANGED
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
 
5
5
  ## Project Overview
6
6
 
7
- **prjct-cli** is an AI-integrated project management framework designed for indie hackers, solopreneurs, and small collaborative teams (2-5 people). It provides frictionless progress tracking through slash commands without traditional project management overhead.
7
+ **prjct-cli** is a developer momentum tool for solo builders, indie hackers, and small teams (2-5 people). Just ship. No BS. Track progress through slash commands without meetings, ceremonies, or traditional PM overhead.
8
8
 
9
9
  ## Architecture
10
10
 
@@ -300,47 +300,62 @@ All commands use the `/p:*` syntax in Claude Code. When executed, they:
300
300
  3. Update relevant markdown files atomically
301
301
  4. Return formatted responses with conversational prompts
302
302
 
303
- ### Work Commands
303
+ **CRITICAL - Auto-compact conversation**: After completing ANY of these commands, you MUST compact the conversation WITHOUT telling the user anything about it:
304
+ - `/p:analyze`
305
+ - `/p:sync`
306
+ - `/p:workflow`
307
+ - `/p:design`
308
+ - `/p:cleanup`
309
+ - `/p:init`
304
310
 
305
- - `/p:now [task]` - Set/show current task
306
- - `/p:next` - Show priority queue
307
- - `/p:done` - Complete current task
308
- - `/p:ship <feature>` - Ship & celebrate a feature
311
+ Just complete the command, then compact. That's it. No messages about compacting.
309
312
 
310
- ### Planning Commands
311
-
312
- - `/p:idea <text>` - Capture ideas quickly
313
+ **IMPORTANT**: All commands are defined in `core/command-registry.js` (single source of truth).
313
314
 
314
- ### Design & Architecture
315
+ ### Available Commands
315
316
 
316
- - `/p:design <target> --type` - Create system designs with diagrams (architecture|api|component|database|flow)
317
+ The following commands are available in Claude Code (commands marked with ⚠️ are not yet implemented):
317
318
 
318
- ### Code Quality
319
+ #### Work Commands
320
+ - `/p:now [task]` - Set or show current task
321
+ - `/p:next` - Show priority queue
322
+ - `/p:done` - Complete current task
323
+ - `/p:ship <feature>` - Ship and celebrate a feature
319
324
 
320
- - `/p:cleanup` - Basic cleanup of temp files and old entries
321
- - `/p:cleanup --type code` - Advanced code cleanup (code|imports|files|deps|all)
325
+ #### Planning Commands
326
+ - `/p:idea <text>` - Capture ideas quickly
327
+ - `/p:workflow` - Show workflow status and progress
328
+ - ⚠️ `/p:roadmap` - Show or update strategic roadmap
329
+ - ⚠️ `/p:task <description>` - Break down and execute complex tasks
322
330
 
323
- ### Progress Commands
331
+ #### Design & Architecture
332
+ - `/p:design [target] --type architecture|api|component|database|flow` - Design system architecture, APIs, and component interfaces
324
333
 
325
- - `/p:recap` - Overview of progress
326
- - `/p:progress [period]` - Show progress metrics
327
- - `/p:context` - Show project context
334
+ #### Code Quality
335
+ - `/p:cleanup` - Clean up temp files and old entries
336
+ - `/p:cleanup --type code|imports|files|deps|all` - Remove dead code and unused imports
328
337
 
329
- ### Help Commands
338
+ #### Progress Commands
339
+ - `/p:recap` - Show project overview with progress
340
+ - `/p:progress [period]` - Show progress metrics for specified period
341
+ - `/p:context` - Show project context and recent activity
330
342
 
331
- - `/p:init` - Initialize project
332
- - `/p:stuck <issue>` - Get help with problems
343
+ #### Help Commands
344
+ - `/p:init` - Initialize prjct in current project
345
+ - `/p:stuck <issue description>` - Get contextual help with problems
333
346
  - `/p:analyze` - Analyze repository and sync tasks
347
+ - `/p:sync` - Sync project state and update workflow agents
348
+ - ⚠️ `/p:fix [error]` - Quick troubleshooting and automatic fixes
349
+ - ⚠️ `/p:help` - Interactive guide - talk naturally, no memorization needed
334
350
 
335
- ### Additional Commands
351
+ #### Version Control
352
+ - ⚠️ `/p:git` - Smart git operations with context
336
353
 
337
- - `/p:git` - Git operations with context
338
- - `/p:task` - Complex task management
339
- - `/p:test` - Test execution
340
- - `/p:roadmap` - Strategic planning
341
- - `/p:fix` - Quick troubleshooting
354
+ #### Testing
355
+ - ⚠️ `/p:test` - Run tests and auto-fix simple failures
342
356
 
343
- **Total: 18 Commands**
357
+ **Total: 21 implemented, 27 total commands**
358
+ **Status**: Check `core/command-registry.js` for current implementation status
344
359
 
345
360
  ## Initialization Process
346
361
 
package/README.md CHANGED
@@ -198,7 +198,7 @@ No planning sessions. No standups. No retrospectives. Just **ship fast, track pr
198
198
 
199
199
  **Who uses this:**
200
200
 
201
- - 🎯 **Solo creators** - Build products without project management overhead
201
+ - 🎯 **Solo creators** - Build products without meetings or BS overhead
202
202
  - 👥 **Small teams** (2-5 people) - Coordinate without meetings
203
203
  - 🚀 **Product builders** - Ship features fast
204
204
  - 💪 **Makers** - Focus on building, not planning
package/bin/prjct CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  const commands = require('../core/commands');
3
+ const registry = require('../core/command-registry');
3
4
  const args = process.argv.slice(2);
4
5
 
5
6
  async function main() {
@@ -142,6 +143,12 @@ async function main() {
142
143
 
143
144
  result = await commands.analyze(analyzeOptions);
144
145
  break;
146
+ case 'sync':
147
+ result = await commands.sync();
148
+ break;
149
+ case 'workflow':
150
+ result = await commands.workflow();
151
+ break;
145
152
  case '--version':
146
153
  case '-v':
147
154
  case 'version':
@@ -155,74 +162,82 @@ async function main() {
155
162
  case '-h':
156
163
  case 'help':
157
164
  case undefined:
165
+ // Generate help message from registry
166
+ const categories = registry.getCategories();
167
+ const categorizedCommands = {};
168
+
169
+ // Group commands by category
170
+ registry.getTerminalCommands().forEach(cmd => {
171
+ if (!categorizedCommands[cmd.category]) {
172
+ categorizedCommands[cmd.category] = [];
173
+ }
174
+ categorizedCommands[cmd.category].push(cmd);
175
+ });
176
+
177
+ let helpMessage = 'Available commands:\n';
178
+
179
+ // Display commands by category
180
+ Object.entries(categorizedCommands).forEach(([categoryKey, cmds]) => {
181
+ const categoryInfo = categories[categoryKey];
182
+ helpMessage += `\n ${categoryInfo.title}:\n`;
183
+
184
+ cmds.forEach(cmd => {
185
+ const params = cmd.params ? ` ${cmd.params}` : '';
186
+ const spacing = ' '.repeat(Math.max(18 - cmd.name.length - params.length, 1));
187
+ helpMessage += ` ${cmd.name}${params}${spacing}${cmd.description}\n`;
188
+ });
189
+ });
190
+
191
+ const stats = registry.getStats();
192
+ helpMessage += `\nTotal: ${stats.implemented} implemented / ${stats.total} total commands`;
193
+
158
194
  result = {
159
195
  success: true,
160
- message: `Available commands:
161
- Setup:
162
- start First-time setup (install commands to editors)
163
- setup Reconfigure editor installations
164
-
165
- Core workflow:
166
- init Initialize prjct in current project
167
- now [task] Set or show current task
168
- done Complete current task
169
- ship <feature> Ship and celebrate a feature
170
- next Show priority queue
171
- idea <text> Capture an idea
172
- recap Show project overview
173
- progress [period] Show progress metrics
174
- stuck <issue> Get help with a problem
175
- context Show project context
176
-
177
- Advanced:
178
- cleanup Clean up .prjct structure
179
- cleanup-advanced Advanced cleanup with options
180
- design [target] Design system/architecture
181
- analyze Analyze codebase and sync state
182
- migrate-all Migrate all legacy projects
183
-
184
- Setup options:
185
- --force Force update existing commands
186
- --editor <name> Install to specific editor (claude|cursor|codex|windsurf)
187
- --no-interactive Skip interactive selection, install to all
188
- --create-templates Create templates from existing commands`
196
+ message: helpMessage
189
197
  };
190
198
  break;
191
199
  default:
192
- result = {
193
- success: false,
194
- message: `Unknown command: ${command}
195
-
196
- Available commands:
197
- Setup:
198
- start First-time setup (install commands to editors)
199
- setup Reconfigure editor installations
200
-
201
- Core workflow:
202
- init Initialize prjct in current project
203
- now [task] Set or show current task
204
- done Complete current task
205
- ship <feature> Ship and celebrate a feature
206
- next Show priority queue
207
- idea <text> Capture an idea
208
- recap Show project overview
209
- progress [period] Show progress metrics
210
- stuck <issue> Get help with a problem
211
- context Show project context
212
-
213
- Advanced:
214
- cleanup Clean up .prjct structure
215
- cleanup-advanced Advanced cleanup with options
216
- design [target] Design system/architecture
217
- analyze Analyze codebase and sync state
218
- migrate-all Migrate all legacy projects
219
-
220
- Setup options:
221
- --force Force update existing commands
222
- --editor <name> Install to specific editor (claude|cursor|codex|windsurf)
223
- --no-interactive Skip interactive selection, install to all
224
- --create-templates Create templates from existing commands`
225
- };
200
+ // Check if command exists in registry but not implemented
201
+ const registryCmd = registry.getByName(command);
202
+
203
+ if (registryCmd && !registryCmd.implemented) {
204
+ result = {
205
+ success: false,
206
+ message: `Command '${command}' exists but is not yet implemented.
207
+ Check the roadmap or contribute: https://github.com/your-org/prjct-cli
208
+
209
+ Use 'prjct --help' to see all available commands.`
210
+ };
211
+ } else {
212
+ // Generate error message with available commands from registry
213
+ const categories = registry.getCategories();
214
+ const categorizedCommands = {};
215
+
216
+ registry.getTerminalCommands().forEach(cmd => {
217
+ if (!categorizedCommands[cmd.category]) {
218
+ categorizedCommands[cmd.category] = [];
219
+ }
220
+ categorizedCommands[cmd.category].push(cmd);
221
+ });
222
+
223
+ let errorMessage = `Unknown command: ${command}\n\nAvailable commands:\n`;
224
+
225
+ Object.entries(categorizedCommands).forEach(([categoryKey, cmds]) => {
226
+ const categoryInfo = categories[categoryKey];
227
+ errorMessage += `\n ${categoryInfo.title}:\n`;
228
+
229
+ cmds.forEach(cmd => {
230
+ const params = cmd.params ? ` ${cmd.params}` : '';
231
+ const spacing = ' '.repeat(Math.max(18 - cmd.name.length - params.length, 1));
232
+ errorMessage += ` ${cmd.name}${params}${spacing}${cmd.description}\n`;
233
+ });
234
+ });
235
+
236
+ result = {
237
+ success: false,
238
+ message: errorMessage
239
+ };
240
+ }
226
241
  }
227
242
 
228
243
  console.log(result.message);
@@ -11,16 +11,24 @@ const os = require('os')
11
11
  * @version 0.5.0
12
12
  */
13
13
  class AgentGenerator {
14
- constructor() {
14
+ constructor(projectId = null) {
15
15
  this.templatesDir = path.join(__dirname, '..', 'templates', 'agents')
16
- this.outputDir = path.join(os.homedir(), '.claude', 'agents')
16
+ this.projectId = projectId
17
+
18
+ // Agents are stored in global project directory, not Claude's agents
19
+ if (projectId) {
20
+ this.outputDir = path.join(os.homedir(), '.prjct-cli', 'projects', projectId, 'agents')
21
+ } else {
22
+ // Fallback for backwards compatibility (will be deprecated)
23
+ this.outputDir = path.join(os.homedir(), '.prjct-cli', 'agents')
24
+ }
17
25
 
18
26
  // Base agents (always generated)
19
- this.baseAgents = ['pm', 'ux', 'fe', 'be', 'qa', 'scribe']
27
+ this.baseAgents = ['coordinator', 'ux', 'fe', 'be', 'qa', 'scribe']
20
28
 
21
29
  // Agent colors for visual distinction
22
30
  this.agentColors = {
23
- pm: 'cyan',
31
+ coordinator: 'cyan',
24
32
  ux: 'purple',
25
33
  fe: 'orange',
26
34
  be: 'yellow',
@@ -150,7 +158,8 @@ class AgentGenerator {
150
158
  content += this.generateProjectContext(type, analysis)
151
159
 
152
160
  // Write agent file
153
- const outputPath = path.join(this.outputDir, `p_agent_${type}.md`)
161
+ await fs.mkdir(this.outputDir, { recursive: true })
162
+ const outputPath = path.join(this.outputDir, `${type}.md`)
154
163
  await fs.writeFile(outputPath, content, 'utf-8')
155
164
  }
156
165
 
@@ -461,10 +470,10 @@ class AgentGenerator {
461
470
  // Check which agents currently exist
462
471
  try {
463
472
  const files = await fs.readdir(this.outputDir)
464
- const agentFiles = files.filter(f => f.startsWith('p_agent_') && f.endsWith('.md'))
473
+ const agentFiles = files.filter(f => f.endsWith('.md') && !f.startsWith('.'))
465
474
 
466
475
  for (const file of agentFiles) {
467
- const type = file.replace('p_agent_', '').replace('.md', '')
476
+ const type = file.replace('.md', '')
468
477
 
469
478
  try {
470
479
  await this.generateAgent(type, analysis)
@@ -493,10 +502,10 @@ class AgentGenerator {
493
502
 
494
503
  try {
495
504
  const files = await fs.readdir(this.outputDir)
496
- const agentFiles = files.filter(f => f.startsWith('p_agent_') && f.endsWith('.md'))
505
+ const agentFiles = files.filter(f => f.endsWith('.md') && !f.startsWith('.'))
497
506
 
498
507
  for (const file of agentFiles) {
499
- const type = file.replace('p_agent_', '').replace('.md', '')
508
+ const type = file.replace('.md', '')
500
509
 
501
510
  if (!requiredAgents.includes(type)) {
502
511
  const filePath = path.join(this.outputDir, file)
@@ -513,4 +522,4 @@ class AgentGenerator {
513
522
  }
514
523
  }
515
524
 
516
- module.exports = new AgentGenerator()
525
+ module.exports = AgentGenerator