prjct-cli 0.5.0 → 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 +169 -1
- package/CLAUDE.md +43 -28
- package/README.md +4 -4
- 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 +274 -62
- package/core/task-schema.js +342 -0
- package/package.json +4 -3
- 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
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,174 @@ 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
|
+
|
|
162
|
+
## [0.5.1] - 2025-10-02
|
|
163
|
+
|
|
164
|
+
### Fixed
|
|
165
|
+
- **Critical: `prjct start` Command Error** - Fixed "commandInstaller.detectEditors is not a function" error
|
|
166
|
+
- **Root Cause**: v0.5.0 refactored `command-installer.js` to Claude-only architecture but didn't update calling code
|
|
167
|
+
- **Files Modified**: `core/commands.js` (lines 2227-2374)
|
|
168
|
+
- **Changes**:
|
|
169
|
+
- Refactored `start()` function to use `detectClaude()` instead of `detectEditors()`
|
|
170
|
+
- Replaced `interactiveInstall()` with `installCommands()`
|
|
171
|
+
- Removed multi-editor logic (Cursor, Windsurf references)
|
|
172
|
+
- Updated messaging to be Claude-only with download link
|
|
173
|
+
- Simplified `setup()` function with installation status checking
|
|
174
|
+
- Added `--force` flag support for reinstallation
|
|
175
|
+
- **Result**: Both `prjct start` and `prjct setup` now work correctly
|
|
176
|
+
- **Commands Installed**: Successfully installs all 21 /p:* commands to `~/.claude/commands/p/`
|
|
177
|
+
|
|
10
178
|
### Fixed
|
|
11
179
|
- **Corrected Claude Subscription Messaging** - Clarified honest pricing throughout
|
|
12
180
|
- Updated `website/src/pages/Changelog.tsx`:
|
|
@@ -913,7 +1081,7 @@ See [MIGRATION.md](MIGRATION.md) for detailed migration instructions.
|
|
|
913
1081
|
|
|
914
1082
|
### Added
|
|
915
1083
|
- Initial release of prjct-cli
|
|
916
|
-
- AI-integrated
|
|
1084
|
+
- AI-integrated developer momentum tool
|
|
917
1085
|
- Support for Claude Code, OpenAI Codex, and Terminal
|
|
918
1086
|
- Core commands: init, now, done, ship, recap, etc.
|
|
919
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
315
|
+
### Available Commands
|
|
315
316
|
|
|
316
|
-
|
|
317
|
+
The following commands are available in Claude Code (commands marked with ⚠️ are not yet implemented):
|
|
317
318
|
|
|
318
|
-
|
|
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
|
-
|
|
321
|
-
- `/p:
|
|
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
|
-
|
|
331
|
+
#### Design & Architecture
|
|
332
|
+
- `/p:design [target] --type architecture|api|component|database|flow` - Design system architecture, APIs, and component interfaces
|
|
324
333
|
|
|
325
|
-
|
|
326
|
-
- `/p:
|
|
327
|
-
- `/p:
|
|
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
|
-
|
|
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
|
-
|
|
332
|
-
- `/p:
|
|
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
|
-
|
|
351
|
+
#### Version Control
|
|
352
|
+
- ⚠️ `/p:git` - Smart git operations with context
|
|
336
353
|
|
|
337
|
-
|
|
338
|
-
- `/p:
|
|
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:
|
|
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
|
|
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
|
|
@@ -310,7 +310,7 @@ prjct recap # Show progress
|
|
|
310
310
|
- `/p:analyze` - Auto-analyze codebase
|
|
311
311
|
- `/p:analyze --sync` - Sync with implemented features
|
|
312
312
|
|
|
313
|
-
> 💡 **Tip:** Visit [prjct.
|
|
313
|
+
> 💡 **Tip:** Visit [prjct.app/commands](https://prjct.app/commands) for interactive command guide or [prjct.app/workflows-guide](https://prjct.app/workflows-guide) for step-by-step examples
|
|
314
314
|
|
|
315
315
|
## 📖 Complete Command Reference
|
|
316
316
|
|
|
@@ -362,7 +362,7 @@ prjct recap # Show progress
|
|
|
362
362
|
|
|
363
363
|
**Sprint planning:** `/p:roadmap` → Add features → `/p:now` top priority → `/p:ship` → `/p:roadmap next`
|
|
364
364
|
|
|
365
|
-
> 📚 **More workflows:** Visit [prjct.
|
|
365
|
+
> 📚 **More workflows:** Visit [prjct.app/workflows-guide](https://prjct.app/workflows-guide) for detailed interactive examples
|
|
366
366
|
|
|
367
367
|
## ❓ FAQ
|
|
368
368
|
|
|
@@ -381,7 +381,7 @@ Designed for creators and small teams (2-5 people). Each member has their own lo
|
|
|
381
381
|
**How do I migrate from Jira/Trello?**
|
|
382
382
|
No migration needed. Just `/p:init` and start working.
|
|
383
383
|
|
|
384
|
-
> 💬 **More questions?** Check [prjct.
|
|
384
|
+
> 💬 **More questions?** Check [prjct.app/faq](https://prjct.app/faq) or [open an issue](https://github.com/jlopezlira/prjct-cli/issues)
|
|
385
385
|
|
|
386
386
|
## 📂 File Structure
|
|
387
387
|
|
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:
|
|
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
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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);
|
package/core/agent-generator.js
CHANGED
|
@@ -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.
|
|
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 = ['
|
|
27
|
+
this.baseAgents = ['coordinator', 'ux', 'fe', 'be', 'qa', 'scribe']
|
|
20
28
|
|
|
21
29
|
// Agent colors for visual distinction
|
|
22
30
|
this.agentColors = {
|
|
23
|
-
|
|
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
|
-
|
|
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.
|
|
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('
|
|
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.
|
|
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('
|
|
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 =
|
|
525
|
+
module.exports = AgentGenerator
|