claude-autopm 1.23.0 → 1.23.2
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/autopm/.claude/commands/ai/langgraph-workflow.md +6 -0
- package/autopm/.claude/commands/ai/openai-chat.md +6 -0
- package/autopm/.claude/commands/azure/feature-show.md +6 -0
- package/autopm/.claude/commands/azure/task-analyze.md +6 -0
- package/autopm/.claude/commands/config/toggle-features.md +6 -0
- package/autopm/.claude/commands/infrastructure/ssh-security.md +6 -0
- package/autopm/.claude/commands/infrastructure/traefik-setup.md +6 -0
- package/autopm/.claude/commands/pm/epic-split.md +6 -0
- package/autopm/.claude/commands/ui/bootstrap-scaffold.md +6 -0
- package/autopm/.claude/commands/ui/tailwind-system.md +6 -0
- package/autopm/.claude/commands/ui-framework-commands.md +6 -0
- package/autopm/.claude/commands/ux-design-commands.md +6 -0
- package/install/install.js +4 -4
- package/package.json +1 -1
- package/scripts/standardize-commands.js +161 -0
package/install/install.js
CHANGED
|
@@ -364,7 +364,7 @@ ${this.colors.BOLD}Examples:${this.colors.NC}
|
|
|
364
364
|
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');
|
|
365
365
|
this.printSuccess('Created package.json');
|
|
366
366
|
} else if (fs.existsSync(packageJsonPath)) {
|
|
367
|
-
this.
|
|
367
|
+
this.printStep('package.json already exists, skipping');
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
|
|
@@ -372,7 +372,7 @@ ${this.colors.BOLD}Examples:${this.colors.NC}
|
|
|
372
372
|
const packageJsonPath = path.join(this.targetDir, 'package.json');
|
|
373
373
|
|
|
374
374
|
if (!fs.existsSync(packageJsonPath)) {
|
|
375
|
-
this.
|
|
375
|
+
this.printStep('No package.json found, skipping dependency installation');
|
|
376
376
|
return;
|
|
377
377
|
}
|
|
378
378
|
|
|
@@ -382,7 +382,7 @@ ${this.colors.BOLD}Examples:${this.colors.NC}
|
|
|
382
382
|
// Check if package.json has dependencies
|
|
383
383
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
384
384
|
if (!packageJson.dependencies || Object.keys(packageJson.dependencies).length === 0) {
|
|
385
|
-
this.
|
|
385
|
+
this.printStep('No dependencies to install');
|
|
386
386
|
return;
|
|
387
387
|
}
|
|
388
388
|
|
|
@@ -396,7 +396,7 @@ ${this.colors.BOLD}Examples:${this.colors.NC}
|
|
|
396
396
|
this.printSuccess('Dependencies installed successfully');
|
|
397
397
|
} catch (error) {
|
|
398
398
|
this.printWarning(`Failed to install dependencies: ${error.message}`);
|
|
399
|
-
this.
|
|
399
|
+
this.printStep('You can manually run: npm install');
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Standardize PM Commands to DEVELOPMENT-STANDARDS.md
|
|
5
|
+
*
|
|
6
|
+
* Adds frontmatter to commands that are missing it
|
|
7
|
+
* Commands should have:
|
|
8
|
+
* - Frontmatter with name, type, category
|
|
9
|
+
* - Context7 Documentation Queries section (already present)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
|
|
15
|
+
// Commands that need frontmatter (excluding docs)
|
|
16
|
+
const commandsToFix = [
|
|
17
|
+
'ai/langgraph-workflow.md',
|
|
18
|
+
'ai/openai-chat.md',
|
|
19
|
+
'azure/feature-show.md',
|
|
20
|
+
'azure/task-analyze.md',
|
|
21
|
+
'config/toggle-features.md',
|
|
22
|
+
'infrastructure/ssh-security.md',
|
|
23
|
+
'infrastructure/traefik-setup.md',
|
|
24
|
+
'pm/epic-split.md',
|
|
25
|
+
'ui-framework-commands.md',
|
|
26
|
+
'ui/bootstrap-scaffold.md',
|
|
27
|
+
'ui/tailwind-system.md',
|
|
28
|
+
'ux-design-commands.md'
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const commandsDir = path.join(__dirname, '..', 'autopm', '.claude', 'commands');
|
|
32
|
+
|
|
33
|
+
function extractCommandName(filePath, content) {
|
|
34
|
+
// Try to get from first heading
|
|
35
|
+
const match = content.match(/^#\s+(.+?)(?:\s+Command)?$/m);
|
|
36
|
+
if (match) {
|
|
37
|
+
return match[1].trim().toLowerCase().replace(/\s+/g, '-');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Fallback to filename
|
|
41
|
+
return path.basename(filePath, '.md');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function extractCategory(filePath) {
|
|
45
|
+
const parts = filePath.split('/');
|
|
46
|
+
if (parts.length > 1) {
|
|
47
|
+
return parts[0]; // azure, pm, ai, etc.
|
|
48
|
+
}
|
|
49
|
+
return 'general';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function extractDescription(content) {
|
|
53
|
+
// Get first paragraph after title
|
|
54
|
+
const lines = content.split('\n');
|
|
55
|
+
for (let i = 1; i < lines.length; i++) {
|
|
56
|
+
const line = lines[i].trim();
|
|
57
|
+
if (line && !line.startsWith('#')) {
|
|
58
|
+
return line.length > 150 ? line.substring(0, 147) + '...' : line;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return 'PM command for project management workflow';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function determineCommandType(filePath, content) {
|
|
65
|
+
const contentLower = content.toLowerCase();
|
|
66
|
+
|
|
67
|
+
// Check category-specific types first
|
|
68
|
+
if (filePath.includes('ai/')) {
|
|
69
|
+
if (contentLower.includes('workflow') || contentLower.includes('langgraph')) return 'ai-workflow';
|
|
70
|
+
if (contentLower.includes('openai') || contentLower.includes('chat')) return 'ai-integration';
|
|
71
|
+
return 'ai-integration';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (filePath.includes('infrastructure/')) return 'infrastructure';
|
|
75
|
+
if (filePath.includes('ui/')) return 'ui-development';
|
|
76
|
+
if (filePath.includes('config/')) return 'configuration';
|
|
77
|
+
|
|
78
|
+
// PM category types
|
|
79
|
+
if (contentLower.includes('epic') || contentLower.includes('feature')) return 'epic-management';
|
|
80
|
+
if (contentLower.includes('task') || contentLower.includes('issue')) return 'task-management';
|
|
81
|
+
if (contentLower.includes('sprint') || contentLower.includes('standup')) return 'sprint-management';
|
|
82
|
+
if (contentLower.includes('prd') || contentLower.includes('requirement')) return 'requirements';
|
|
83
|
+
if (contentLower.includes('sync') || contentLower.includes('import')) return 'integration';
|
|
84
|
+
if (contentLower.includes('analyze') || contentLower.includes('report')) return 'analytics';
|
|
85
|
+
|
|
86
|
+
return 'workflow';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function generateFrontmatter(filePath, content) {
|
|
90
|
+
const name = extractCommandName(filePath, content);
|
|
91
|
+
const description = extractDescription(content);
|
|
92
|
+
const category = extractCategory(filePath);
|
|
93
|
+
const type = determineCommandType(filePath, content);
|
|
94
|
+
|
|
95
|
+
return `---
|
|
96
|
+
name: ${name}
|
|
97
|
+
type: ${type}
|
|
98
|
+
category: ${category}
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function addFrontmatter(filePath, content) {
|
|
105
|
+
// Check if already has frontmatter
|
|
106
|
+
if (content.startsWith('---')) {
|
|
107
|
+
console.log(`⏭️ Skipping ${filePath} - already has frontmatter`);
|
|
108
|
+
return content;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const frontmatter = generateFrontmatter(filePath, content);
|
|
112
|
+
console.log(`✅ Adding frontmatter to ${filePath}`);
|
|
113
|
+
|
|
114
|
+
return frontmatter + content;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function standardizeCommand(relativePath) {
|
|
118
|
+
const fullPath = path.join(commandsDir, relativePath);
|
|
119
|
+
|
|
120
|
+
if (!fs.existsSync(fullPath)) {
|
|
121
|
+
console.log(`⚠️ File not found: ${relativePath}`);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
126
|
+
const updated = addFrontmatter(relativePath, content);
|
|
127
|
+
|
|
128
|
+
if (updated !== content) {
|
|
129
|
+
fs.writeFileSync(fullPath, updated);
|
|
130
|
+
console.log(` Frontmatter added to ${relativePath}`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Main execution
|
|
135
|
+
console.log('🔧 Standardizing PM Commands\n');
|
|
136
|
+
|
|
137
|
+
let processed = 0;
|
|
138
|
+
let updated = 0;
|
|
139
|
+
|
|
140
|
+
for (const commandPath of commandsToFix) {
|
|
141
|
+
const fullPath = path.join(commandsDir, commandPath);
|
|
142
|
+
|
|
143
|
+
if (!fs.existsSync(fullPath)) {
|
|
144
|
+
console.log(`⚠️ Skipping ${commandPath} - not found`);
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const before = fs.readFileSync(fullPath, 'utf-8');
|
|
149
|
+
standardizeCommand(commandPath);
|
|
150
|
+
const after = fs.readFileSync(fullPath, 'utf-8');
|
|
151
|
+
|
|
152
|
+
processed++;
|
|
153
|
+
if (before !== after) {
|
|
154
|
+
updated++;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
console.log(`\n📊 Summary:`);
|
|
159
|
+
console.log(` Processed: ${processed} commands`);
|
|
160
|
+
console.log(` Updated: ${updated} commands`);
|
|
161
|
+
console.log(` Skipped: ${processed - updated} commands`);
|