claude-autopm 1.31.0 → 2.1.1
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/README.md +57 -5
- package/autopm/.claude/mcp/test-server.md +10 -0
- package/bin/autopm-poc.js +176 -44
- package/bin/autopm.js +97 -179
- package/lib/ai-providers/AbstractAIProvider.js +524 -0
- package/lib/ai-providers/ClaudeProvider.js +359 -48
- package/lib/ai-providers/TemplateProvider.js +432 -0
- package/lib/cli/commands/agent.js +206 -0
- package/lib/cli/commands/config.js +488 -0
- package/lib/cli/commands/prd.js +345 -0
- package/lib/cli/commands/task.js +206 -0
- package/lib/config/ConfigManager.js +531 -0
- package/lib/errors/AIProviderError.js +164 -0
- package/lib/services/AgentService.js +557 -0
- package/lib/services/EpicService.js +609 -0
- package/lib/services/PRDService.js +928 -103
- package/lib/services/TaskService.js +760 -0
- package/lib/services/interfaces.js +753 -0
- package/lib/utils/CircuitBreaker.js +165 -0
- package/lib/utils/Encryption.js +201 -0
- package/lib/utils/RateLimiter.js +241 -0
- package/lib/utils/ServiceFactory.js +165 -0
- package/package.json +6 -5
- package/scripts/config/get.js +108 -0
- package/scripts/config/init.js +100 -0
- package/scripts/config/list-providers.js +93 -0
- package/scripts/config/set-api-key.js +107 -0
- package/scripts/config/set-provider.js +201 -0
- package/scripts/config/set.js +139 -0
- package/scripts/config/show.js +181 -0
- package/autopm/.claude/.env +0 -158
- package/autopm/.claude/settings.local.json +0 -9
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Transform your development workflow with intelligent automation, parallel AI age
|
|
|
15
15
|
|
|
16
16
|
ClaudeAutoPM is a comprehensive project management and development automation framework designed specifically for [Claude Code](https://claude.ai/code). It combines:
|
|
17
17
|
|
|
18
|
-
- **
|
|
18
|
+
- **112+ CLI commands** for deterministic operations (scaffolding, templates, automation)
|
|
19
19
|
- **39 specialized AI agents** for intelligent tasks (analysis, design, development)
|
|
20
20
|
- **Dynamic team management** with automatic agent switching
|
|
21
21
|
- **Hybrid execution modes** - choose between templates or AI assistance
|
|
@@ -44,7 +44,58 @@ PRD → Epic Decomposition → Parallel Development → Testing → Production
|
|
|
44
44
|
|
|
45
45
|
## ✨ Key Features
|
|
46
46
|
|
|
47
|
-
### 🆕 **NEW in
|
|
47
|
+
### 🆕 **NEW in v2.1.0: STANDALONE CLI Commands - Direct Service Access!**
|
|
48
|
+
|
|
49
|
+
**Three New CLI Commands** - Direct access to service layer without AI overhead
|
|
50
|
+
- 🎯 **Deterministic Operations** - Fast, predictable, no AI required
|
|
51
|
+
- 🎨 **Modern UX** - Progress spinners, color-coded output, streaming support
|
|
52
|
+
- ⚡ **High Performance** - Direct service layer access for instant results
|
|
53
|
+
- 🧪 **100% Test Coverage** - 65 CLI tests passing, full TDD methodology
|
|
54
|
+
|
|
55
|
+
**New Commands:**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# PRD Management
|
|
59
|
+
autopm prd parse my-prd --ai # AI-powered PRD parsing
|
|
60
|
+
autopm prd parse my-prd --stream # Real-time streaming output
|
|
61
|
+
autopm prd extract-epics my-prd # Extract epics from PRD
|
|
62
|
+
autopm prd summarize my-prd # Generate comprehensive summary
|
|
63
|
+
autopm prd validate my-prd # Validate structure & quality
|
|
64
|
+
|
|
65
|
+
# Task Management
|
|
66
|
+
autopm task list epic-001 # Display all tasks from epic
|
|
67
|
+
autopm task prioritize epic-001 # AI-powered prioritization
|
|
68
|
+
|
|
69
|
+
# Agent Invocation
|
|
70
|
+
autopm agent list # Display available agents
|
|
71
|
+
autopm agent search "kubernetes" # Search agents by keyword
|
|
72
|
+
autopm agent invoke aws-architect "Design VPC" # Invoke agent with task
|
|
73
|
+
autopm agent invoke --stream agent-name "task" # Streaming invocation
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**User Experience Features:**
|
|
77
|
+
- 🔄 Progress indicators with ora spinners
|
|
78
|
+
- 🎨 Color-coded output (green=success, red=error, yellow=warning)
|
|
79
|
+
- 📡 Streaming support for real-time AI responses
|
|
80
|
+
- ❌ Comprehensive error handling with user-friendly messages
|
|
81
|
+
- 📋 Consistent patterns across all commands
|
|
82
|
+
|
|
83
|
+
**Technical Implementation:**
|
|
84
|
+
- Extended PRDService with 4 non-streaming methods
|
|
85
|
+
- All services support both streaming and non-streaming modes
|
|
86
|
+
- Proper separation of concerns (CLI → Service → Provider)
|
|
87
|
+
- Zero breaking changes to existing functionality
|
|
88
|
+
- CommonJS compatibility maintained
|
|
89
|
+
|
|
90
|
+
**Test Coverage:**
|
|
91
|
+
- 28 new tests across 3 CLI command suites
|
|
92
|
+
- 65 total CLI tests passing (100% pass rate)
|
|
93
|
+
- Full TDD methodology with Jest
|
|
94
|
+
- Comprehensive coverage of success, error, and streaming scenarios
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### 🎉 **v1.30.0: Advanced Conflict Resolution - Complete Sync Safety!**
|
|
48
99
|
|
|
49
100
|
**Three-Way Merge Conflict Resolution** - Safe GitHub synchronization
|
|
50
101
|
- 🔒 **Intelligent Merge** - Three-way diff (local/remote/base) with conflict detection
|
|
@@ -341,7 +392,7 @@ claude --dangerously-skip-permissions .
|
|
|
341
392
|
│ │
|
|
342
393
|
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
343
394
|
│ │ CLI Layer │ │ Agent Teams │ │ MCP Servers │ │
|
|
344
|
-
│ │ (
|
|
395
|
+
│ │ (112 cmds) │ │ (39 agents) │ │ (Context7) │ │
|
|
345
396
|
│ └──────┬──────┘ └──────┬───────┘ └──────┬───────┘ │
|
|
346
397
|
│ │ │ │ │
|
|
347
398
|
│ └─────────────────┼──────────────────┘ │
|
|
@@ -351,6 +402,7 @@ claude --dangerously-skip-permissions .
|
|
|
351
402
|
│ │ - Sequential / Adaptive / Hybrid │ │
|
|
352
403
|
│ │ - Parallel agent coordination │ │
|
|
353
404
|
│ │ - Context optimization │ │
|
|
405
|
+
│ │ - STANDALONE mode (direct service access) │ │
|
|
354
406
|
│ └────────────────────────┬─────────────────────────┘ │
|
|
355
407
|
│ │ │
|
|
356
408
|
│ ┌────────────────────────┴─────────────────────────┐ │
|
|
@@ -405,8 +457,8 @@ claude --dangerously-skip-permissions .
|
|
|
405
457
|
|
|
406
458
|
## 📦 What's Included
|
|
407
459
|
|
|
408
|
-
### CLI Commands (
|
|
409
|
-
- **Project Management**: PRD, Epic, Issue, Task management
|
|
460
|
+
### CLI Commands (112 total)
|
|
461
|
+
- **Project Management**: PRD, Epic, Issue, Task management (3 new STANDALONE commands in v2.1.0)
|
|
410
462
|
- **Development**: Scaffolding, testing, deployment
|
|
411
463
|
- **Configuration**: Provider setup, team management, MCP servers
|
|
412
464
|
- **DevOps**: Docker, Kubernetes, CI/CD automation
|
package/bin/autopm-poc.js
CHANGED
|
@@ -16,30 +16,38 @@ const fs = require('fs');
|
|
|
16
16
|
const path = require('path');
|
|
17
17
|
const ClaudeProvider = require('../lib/ai-providers/ClaudeProvider');
|
|
18
18
|
const PRDService = require('../lib/services/PRDService');
|
|
19
|
+
const EpicService = require('../lib/services/EpicService');
|
|
20
|
+
const ConfigManager = require('../lib/config/ConfigManager');
|
|
21
|
+
const ServiceFactory = require('../lib/utils/ServiceFactory');
|
|
19
22
|
|
|
20
23
|
/**
|
|
21
24
|
* Print usage information
|
|
22
25
|
*/
|
|
23
26
|
function printUsage() {
|
|
24
27
|
console.log(`
|
|
25
|
-
AutoPM POC - Claude API Integration Demo
|
|
26
|
-
|
|
28
|
+
AutoPM POC - Claude API Integration Demo (Streaming Support)
|
|
29
|
+
=============================================================
|
|
27
30
|
|
|
28
31
|
Usage:
|
|
29
|
-
autopm-poc parse <prd-file> Parse PRD with streaming
|
|
30
|
-
autopm-poc
|
|
31
|
-
autopm-poc summarize <prd-file> Get
|
|
32
|
+
autopm-poc parse <prd-file> Parse PRD with streaming AI analysis
|
|
33
|
+
autopm-poc extract-epics <prd-file> Extract epics from PRD (streaming)
|
|
34
|
+
autopm-poc summarize <prd-file> Get PRD summary (streaming)
|
|
35
|
+
autopm-poc decompose <epic-file> Decompose epic into tasks (streaming)
|
|
36
|
+
autopm-poc analyze <prd-file> Epic-level PRD analysis (streaming)
|
|
32
37
|
autopm-poc test Test API connection
|
|
33
38
|
autopm-poc help Show this help message
|
|
34
39
|
|
|
35
40
|
Environment Variables:
|
|
36
41
|
ANTHROPIC_API_KEY Required - Your Anthropic API key
|
|
42
|
+
AUTOPM_MASTER_PASSWORD Optional - For encrypted config
|
|
37
43
|
|
|
38
44
|
Examples:
|
|
39
45
|
export ANTHROPIC_API_KEY="sk-ant-..."
|
|
40
46
|
autopm-poc parse examples/sample-prd.md
|
|
47
|
+
autopm-poc extract-epics examples/sample-prd.md
|
|
41
48
|
autopm-poc summarize examples/sample-prd.md
|
|
42
|
-
autopm-poc
|
|
49
|
+
autopm-poc decompose .claude/epics/user-auth.md
|
|
50
|
+
autopm-poc analyze examples/sample-prd.md
|
|
43
51
|
`);
|
|
44
52
|
}
|
|
45
53
|
|
|
@@ -89,39 +97,97 @@ async function parsePRDStream(service, content) {
|
|
|
89
97
|
}
|
|
90
98
|
|
|
91
99
|
/**
|
|
92
|
-
*
|
|
100
|
+
* Extract epics from PRD with streaming output
|
|
93
101
|
*/
|
|
94
|
-
async function
|
|
95
|
-
console.log('🔍 Extracting epics from PRD...\n');
|
|
102
|
+
async function extractEpicsStream(service, content) {
|
|
103
|
+
console.log('🔍 Extracting epics from PRD with Claude AI...\n');
|
|
104
|
+
console.log('📝 Streaming response:\n');
|
|
105
|
+
console.log('─'.repeat(60));
|
|
106
|
+
|
|
107
|
+
let fullResponse = '';
|
|
108
|
+
try {
|
|
109
|
+
for await (const chunk of service.extractEpicsStream(content)) {
|
|
110
|
+
process.stdout.write(chunk);
|
|
111
|
+
fullResponse += chunk;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
console.log('\n' + '─'.repeat(60));
|
|
115
|
+
console.log('\n✅ Epic extraction complete!');
|
|
116
|
+
console.log(`📊 Total response length: ${fullResponse.length} characters\n`);
|
|
117
|
+
} catch (error) {
|
|
118
|
+
console.error('\n❌ Error during epic extraction:', error.message);
|
|
119
|
+
process.exit(1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
96
122
|
|
|
123
|
+
/**
|
|
124
|
+
* Summarize PRD with streaming output
|
|
125
|
+
*/
|
|
126
|
+
async function summarizePRDStream(service, content) {
|
|
127
|
+
console.log('🔍 Summarizing PRD with Claude AI...\n');
|
|
128
|
+
console.log('📝 Streaming response:\n');
|
|
129
|
+
console.log('─'.repeat(60));
|
|
130
|
+
|
|
131
|
+
let fullResponse = '';
|
|
97
132
|
try {
|
|
98
|
-
const
|
|
133
|
+
for await (const chunk of service.summarizeStream(content)) {
|
|
134
|
+
process.stdout.write(chunk);
|
|
135
|
+
fullResponse += chunk;
|
|
136
|
+
}
|
|
99
137
|
|
|
100
|
-
console.log('
|
|
101
|
-
console.log('
|
|
102
|
-
console.log(
|
|
103
|
-
console.log(`\n📊 Found ${Array.isArray(epics) ? epics.length : 0} epic(s)\n`);
|
|
138
|
+
console.log('\n' + '─'.repeat(60));
|
|
139
|
+
console.log('\n✅ Summary complete!');
|
|
140
|
+
console.log(`📊 Total response length: ${fullResponse.length} characters\n`);
|
|
104
141
|
} catch (error) {
|
|
105
|
-
console.error('❌ Error during
|
|
142
|
+
console.error('\n❌ Error during summarization:', error.message);
|
|
106
143
|
process.exit(1);
|
|
107
144
|
}
|
|
108
145
|
}
|
|
109
146
|
|
|
110
147
|
/**
|
|
111
|
-
*
|
|
148
|
+
* Decompose epic into tasks with streaming output
|
|
112
149
|
*/
|
|
113
|
-
async function
|
|
114
|
-
console.log('🔍
|
|
150
|
+
async function decomposeEpicStream(epicService, content) {
|
|
151
|
+
console.log('🔍 Decomposing epic into tasks with Claude AI...\n');
|
|
152
|
+
console.log('📝 Streaming response:\n');
|
|
153
|
+
console.log('─'.repeat(60));
|
|
115
154
|
|
|
155
|
+
let fullResponse = '';
|
|
116
156
|
try {
|
|
117
|
-
const
|
|
157
|
+
for await (const chunk of epicService.decomposeStream(content)) {
|
|
158
|
+
process.stdout.write(chunk);
|
|
159
|
+
fullResponse += chunk;
|
|
160
|
+
}
|
|
118
161
|
|
|
119
|
-
console.log('
|
|
120
|
-
console.log('
|
|
121
|
-
console.log(
|
|
122
|
-
console.log();
|
|
162
|
+
console.log('\n' + '─'.repeat(60));
|
|
163
|
+
console.log('\n✅ Task decomposition complete!');
|
|
164
|
+
console.log(`📊 Total response length: ${fullResponse.length} characters\n`);
|
|
123
165
|
} catch (error) {
|
|
124
|
-
console.error('❌ Error during
|
|
166
|
+
console.error('\n❌ Error during decomposition:', error.message);
|
|
167
|
+
process.exit(1);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Analyze PRD for epic breakdown with streaming output
|
|
173
|
+
*/
|
|
174
|
+
async function analyzePRDStream(epicService, content) {
|
|
175
|
+
console.log('🔍 Analyzing PRD for epic breakdown with Claude AI...\n');
|
|
176
|
+
console.log('📝 Streaming response:\n');
|
|
177
|
+
console.log('─'.repeat(60));
|
|
178
|
+
|
|
179
|
+
let fullResponse = '';
|
|
180
|
+
try {
|
|
181
|
+
for await (const chunk of epicService.analyzeStream(content)) {
|
|
182
|
+
process.stdout.write(chunk);
|
|
183
|
+
fullResponse += chunk;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
console.log('\n' + '─'.repeat(60));
|
|
187
|
+
console.log('\n✅ PRD analysis complete!');
|
|
188
|
+
console.log(`📊 Total response length: ${fullResponse.length} characters\n`);
|
|
189
|
+
} catch (error) {
|
|
190
|
+
console.error('\n❌ Error during PRD analysis:', error.message);
|
|
125
191
|
process.exit(1);
|
|
126
192
|
}
|
|
127
193
|
}
|
|
@@ -139,18 +205,55 @@ async function main() {
|
|
|
139
205
|
process.exit(0);
|
|
140
206
|
}
|
|
141
207
|
|
|
142
|
-
//
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
208
|
+
// Try ConfigManager first, fallback to environment variable
|
|
209
|
+
let prdService;
|
|
210
|
+
let epicService;
|
|
211
|
+
let provider;
|
|
212
|
+
let configManager;
|
|
213
|
+
|
|
214
|
+
const configPath = path.join(process.cwd(), '.autopm', 'config.json');
|
|
215
|
+
if (fs.existsSync(configPath)) {
|
|
216
|
+
try {
|
|
217
|
+
configManager = new ConfigManager(configPath);
|
|
218
|
+
|
|
219
|
+
// Check for master password
|
|
220
|
+
const password = process.env.AUTOPM_MASTER_PASSWORD;
|
|
221
|
+
if (password) {
|
|
222
|
+
configManager.setMasterPassword(password);
|
|
223
|
+
|
|
224
|
+
// Use ServiceFactory to create services and provider
|
|
225
|
+
const factory = new ServiceFactory(configManager);
|
|
226
|
+
provider = factory.createProvider();
|
|
227
|
+
prdService = factory.createPRDService({ provider });
|
|
228
|
+
epicService = factory.createEpicService({ provider });
|
|
229
|
+
console.log('✅ Using configuration from .autopm/config.json\n');
|
|
230
|
+
} else {
|
|
231
|
+
console.log('⚠️ Config file found but AUTOPM_MASTER_PASSWORD not set');
|
|
232
|
+
console.log(' Falling back to ANTHROPIC_API_KEY environment variable\n');
|
|
233
|
+
}
|
|
234
|
+
} catch (error) {
|
|
235
|
+
console.log(`⚠️ Error loading config: ${error.message}`);
|
|
236
|
+
console.log(' Falling back to ANTHROPIC_API_KEY environment variable\n');
|
|
237
|
+
}
|
|
149
238
|
}
|
|
150
239
|
|
|
151
|
-
//
|
|
152
|
-
|
|
153
|
-
|
|
240
|
+
// Fallback to environment variable
|
|
241
|
+
if (!prdService) {
|
|
242
|
+
const apiKey = process.env.ANTHROPIC_API_KEY;
|
|
243
|
+
if (!apiKey) {
|
|
244
|
+
console.error('❌ Error: No API key found\n');
|
|
245
|
+
console.error('Either:');
|
|
246
|
+
console.error(' 1. Run: autopm config:init (recommended)');
|
|
247
|
+
console.error(' Then: export AUTOPM_MASTER_PASSWORD="your-password"');
|
|
248
|
+
console.error(' 2. Set: export ANTHROPIC_API_KEY="sk-ant-..."\n');
|
|
249
|
+
process.exit(1);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
provider = new ClaudeProvider(apiKey);
|
|
253
|
+
prdService = new PRDService({ provider });
|
|
254
|
+
epicService = new EpicService({ prdService, provider });
|
|
255
|
+
console.log('✅ Using ANTHROPIC_API_KEY from environment\n');
|
|
256
|
+
}
|
|
154
257
|
|
|
155
258
|
// Handle test command
|
|
156
259
|
if (command === 'test') {
|
|
@@ -158,8 +261,8 @@ async function main() {
|
|
|
158
261
|
process.exit(success ? 0 : 1);
|
|
159
262
|
}
|
|
160
263
|
|
|
161
|
-
// Handle parse
|
|
162
|
-
if (
|
|
264
|
+
// Handle PRD commands (parse, extract-epics, summarize, analyze)
|
|
265
|
+
if (['parse', 'extract-epics', 'summarize', 'analyze'].includes(command)) {
|
|
163
266
|
const file = args[1];
|
|
164
267
|
|
|
165
268
|
if (!file) {
|
|
@@ -187,20 +290,49 @@ async function main() {
|
|
|
187
290
|
|
|
188
291
|
// Execute command
|
|
189
292
|
if (command === 'parse') {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
await parsePRDJson(service, content);
|
|
194
|
-
} else {
|
|
195
|
-
await parsePRDStream(service, content);
|
|
196
|
-
}
|
|
293
|
+
await parsePRDStream(prdService, content);
|
|
294
|
+
} else if (command === 'extract-epics') {
|
|
295
|
+
await extractEpicsStream(prdService, content);
|
|
197
296
|
} else if (command === 'summarize') {
|
|
198
|
-
await
|
|
297
|
+
await summarizePRDStream(prdService, content);
|
|
298
|
+
} else if (command === 'analyze') {
|
|
299
|
+
await analyzePRDStream(epicService, content);
|
|
199
300
|
}
|
|
200
301
|
|
|
201
302
|
process.exit(0);
|
|
202
303
|
}
|
|
203
304
|
|
|
305
|
+
// Handle decompose command (for epic files)
|
|
306
|
+
if (command === 'decompose') {
|
|
307
|
+
const file = args[1];
|
|
308
|
+
|
|
309
|
+
if (!file) {
|
|
310
|
+
console.error(`❌ Error: Epic file required for 'decompose' command\n`);
|
|
311
|
+
console.error(`Usage: autopm-poc decompose <epic-file>\n`);
|
|
312
|
+
process.exit(1);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Check if file exists
|
|
316
|
+
if (!fs.existsSync(file)) {
|
|
317
|
+
console.error(`❌ Error: File not found: ${file}\n`);
|
|
318
|
+
process.exit(1);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Read file content
|
|
322
|
+
const content = fs.readFileSync(file, 'utf8');
|
|
323
|
+
|
|
324
|
+
if (!content.trim()) {
|
|
325
|
+
console.error('❌ Error: Epic file is empty\n');
|
|
326
|
+
process.exit(1);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
console.log(`📄 Reading Epic from: ${file}`);
|
|
330
|
+
console.log(`📏 File size: ${content.length} characters\n`);
|
|
331
|
+
|
|
332
|
+
await decomposeEpicStream(epicService, content);
|
|
333
|
+
process.exit(0);
|
|
334
|
+
}
|
|
335
|
+
|
|
204
336
|
// Unknown command
|
|
205
337
|
console.error(`❌ Error: Unknown command: ${command}\n`);
|
|
206
338
|
printUsage();
|