claude-autopm 1.23.1 → 1.24.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 (38) hide show
  1. package/README.md +1 -1
  2. package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +26 -1
  3. package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +28 -3
  4. package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +26 -1
  5. package/autopm/.claude/agents/frameworks/react-ui-expert.md +26 -1
  6. package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +26 -1
  7. package/autopm/.claude/agents/frameworks/ux-design-expert.md +25 -1
  8. package/autopm/.claude/agents/languages/bash-scripting-expert.md +26 -1
  9. package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +26 -1
  10. package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +27 -1
  11. package/autopm/.claude/agents/languages/python-backend-engineer.md +27 -2
  12. package/autopm/.claude/agents/languages/python-backend-expert.md +26 -1
  13. package/autopm/.claude/commands/ai/langgraph-workflow.md +6 -0
  14. package/autopm/.claude/commands/ai/openai-chat.md +6 -0
  15. package/autopm/.claude/commands/azure/feature-show.md +6 -0
  16. package/autopm/.claude/commands/azure/task-analyze.md +6 -0
  17. package/autopm/.claude/commands/config/toggle-features.md +6 -0
  18. package/autopm/.claude/commands/infrastructure/ssh-security.md +6 -0
  19. package/autopm/.claude/commands/infrastructure/traefik-setup.md +6 -0
  20. package/autopm/.claude/commands/pm/context-create.md +136 -0
  21. package/autopm/.claude/commands/pm/context-prime.md +170 -0
  22. package/autopm/.claude/commands/pm/context-update.md +292 -0
  23. package/autopm/.claude/commands/pm/epic-decompose.md +19 -0
  24. package/autopm/.claude/commands/pm/epic-merge.md +2 -2
  25. package/autopm/.claude/commands/pm/epic-split.md +6 -0
  26. package/autopm/.claude/commands/ui/bootstrap-scaffold.md +6 -0
  27. package/autopm/.claude/commands/ui/tailwind-system.md +6 -0
  28. package/autopm/.claude/commands/ui-framework-commands.md +6 -0
  29. package/autopm/.claude/commands/ux-design-commands.md +6 -0
  30. package/autopm/.claude/scripts/pm/prd-parse.js +19 -1
  31. package/autopm/.claude/templates/context-templates/progress.md.template +25 -0
  32. package/autopm/.claude/templates/context-templates/project-brief.md.template +19 -0
  33. package/autopm/.claude/templates/context-templates/project-structure.md.template +23 -0
  34. package/autopm/.claude/templates/context-templates/tech-context.md.template +23 -0
  35. package/package.json +1 -1
  36. package/scripts/fix-invalid-command-refs.sh +141 -0
  37. package/scripts/fix-invalid-refs-simple.sh +49 -0
  38. package/scripts/standardize-commands.js +161 -0
@@ -0,0 +1,141 @@
1
+ #!/bin/bash
2
+ # Fix invalid command references in documentation
3
+
4
+ set -e
5
+
6
+ echo "šŸ”§ Fixing invalid command references..."
7
+
8
+ # Replacement map (escaped for use in sed)
9
+ declare -A REPLACEMENTS=(
10
+ ["\/pm:epic-new"]="\/pm:prd-new"
11
+ ["\/pm:done"]="\/pm:issue-close"
12
+ ["\/pm:next-task"]="\/pm:next"
13
+ ["\/pm:epic-resolve"]="\/pm:epic-close"
14
+ ["\/pm:epic-stop"]="\/pm:epic-close"
15
+ ["\/pm:prd-split"]="\/pm:epic-split"
16
+ )
17
+
18
+ # Commands to remove (no replacement) - escaped
19
+ REMOVE_COMMANDS=(
20
+ "\/pm:azure-next"
21
+ "\/pm:azure-sync"
22
+ "\/pm:board"
23
+ "\/pm:build"
24
+ "\/pm:config"
25
+ "\/pm:optimize"
26
+ "\/pm:pr-create"
27
+ "\/pm:pr-list"
28
+ "\/pm:query"
29
+ "\/pm:release"
30
+ "\/pm:report"
31
+ "\/pm:resource"
32
+ "\/pm:resource-action"
33
+ "\/pm:sprint"
34
+ "\/pm:sprint-status"
35
+ "\/pm:sync-all"
36
+ "\/pm:test"
37
+ "\/pm:todo"
38
+ "\/pm:wip"
39
+ )
40
+
41
+ # Generic commands to remove (too vague) - escaped
42
+ GENERIC_COMMANDS=(
43
+ "\/pm:epic"
44
+ "\/pm:issue"
45
+ "\/pm:prd"
46
+ "\/pm:pr"
47
+ )
48
+
49
+ total_changes=0
50
+
51
+ # Function to replace in file
52
+ replace_in_file() {
53
+ local file="$1"
54
+ local old="$2"
55
+ local new="$3"
56
+
57
+ if grep -q "$old" "$file" 2>/dev/null; then
58
+ if [[ "$OSTYPE" == "darwin"* ]]; then
59
+ sed -i '' "s|$old|$new|g" "$file"
60
+ else
61
+ sed -i "s|$old|$new|g" "$file"
62
+ fi
63
+ echo " āœ“ $file: $old → $new"
64
+ ((total_changes++))
65
+ fi
66
+ }
67
+
68
+ # Function to remove command references
69
+ remove_from_file() {
70
+ local file="$1"
71
+ local cmd="$2"
72
+
73
+ if grep -q "$cmd" "$file" 2>/dev/null; then
74
+ # Remove lines containing the command
75
+ if [[ "$OSTYPE" == "darwin"* ]]; then
76
+ sed -i '' "/$cmd/d" "$file"
77
+ else
78
+ sed -i "/$cmd/d" "$file"
79
+ fi
80
+ echo " āœ— $file: removed $cmd"
81
+ ((total_changes++))
82
+ fi
83
+ }
84
+
85
+ echo ""
86
+ echo "=== Replacing commands with correct alternatives ==="
87
+ for old in "${!REPLACEMENTS[@]}"; do
88
+ new="${REPLACEMENTS[$old]}"
89
+ echo ""
90
+ echo "Replacing: $old → $new"
91
+
92
+ # Find files with this command (excluding our analysis doc and script)
93
+ while IFS= read -r file; do
94
+ if [[ "$file" != *"MISSING-COMMANDS-ANALYSIS.md"* ]] && \
95
+ [[ "$file" != *"fix-invalid-command-refs.sh"* ]]; then
96
+ replace_in_file "$file" "$old" "$new"
97
+ fi
98
+ done < <(grep -rl "$old" . --include="*.md" 2>/dev/null || true)
99
+ done
100
+
101
+ echo ""
102
+ echo "=== Removing commands with no replacement ==="
103
+ for cmd in "${REMOVE_COMMANDS[@]}"; do
104
+ echo ""
105
+ echo "Removing: $cmd"
106
+
107
+ while IFS= read -r file; do
108
+ if [[ "$file" != *"MISSING-COMMANDS-ANALYSIS.md"* ]] && \
109
+ [[ "$file" != *"fix-invalid-command-refs.sh"* ]]; then
110
+ remove_from_file "$file" "$cmd"
111
+ fi
112
+ done < <(grep -rl "$cmd" . --include="*.md" 2>/dev/null || true)
113
+ done
114
+
115
+ echo ""
116
+ echo "=== Removing generic commands (too vague) ==="
117
+ for cmd in "${GENERIC_COMMANDS[@]}"; do
118
+ echo ""
119
+ echo "Removing: $cmd (too vague - use specific commands instead)"
120
+
121
+ while IFS= read -r file; do
122
+ if [[ "$file" != *"MISSING-COMMANDS-ANALYSIS.md"* ]] && \
123
+ [[ "$file" != *"fix-invalid-command-refs.sh"* ]] && \
124
+ [[ "$file" != *"COMMANDS.md"* ]]; then
125
+ # Only remove if it's standalone, not part of a longer command
126
+ if grep -E "$cmd[[:space:]]|$cmd\$|$cmd\`" "$file" &>/dev/null; then
127
+ remove_from_file "$file" "$cmd"
128
+ fi
129
+ fi
130
+ done < <(grep -rl "$cmd" . --include="*.md" 2>/dev/null || true)
131
+ done
132
+
133
+ echo ""
134
+ echo "════════════════════════════════════════════"
135
+ echo "āœ… Complete! Total changes: $total_changes"
136
+ echo "════════════════════════════════════════════"
137
+ echo ""
138
+ echo "Next steps:"
139
+ echo "1. Review changes: git diff"
140
+ echo "2. Test affected documentation"
141
+ echo "3. Commit: git add . && git commit -m 'fix: remove invalid command references'"
@@ -0,0 +1,49 @@
1
+ #!/bin/bash
2
+ # Simple script to fix invalid command references
3
+
4
+ set -e
5
+
6
+ echo "šŸ”§ Fixing invalid command references..."
7
+ echo ""
8
+
9
+ total=0
10
+
11
+ # Function to safely replace
12
+ safe_replace() {
13
+ local old="$1"
14
+ local new="$2"
15
+ local desc="$3"
16
+
17
+ echo "Replacing: $old → $new ($desc)"
18
+
19
+ # Find and replace (exclude our analysis docs)
20
+ find . -name "*.md" -type f ! -path "*/MISSING-COMMANDS-ANALYSIS.md" ! -path "*/node_modules/*" -exec grep -l "$old" {} \; 2>/dev/null | while read file; do
21
+ if [[ "$OSTYPE" == "darwin"* ]]; then
22
+ sed -i '' "s|$old|$new|g" "$file"
23
+ else
24
+ sed -i "s|$old|$new|g" "$file"
25
+ fi
26
+ echo " āœ“ $file"
27
+ ((total++)) || true
28
+ done
29
+ }
30
+
31
+ # Replacements
32
+ echo "=== Step 1: Replacing with correct alternatives ==="
33
+ safe_replace "/pm:epic-new" "/pm:prd-new" "create PRD first"
34
+ safe_replace "/pm:done" "/pm:issue-close" "close issue"
35
+ safe_replace "/pm:next-task" "/pm:next" "get next task"
36
+ safe_replace "/pm:epic-resolve" "/pm:epic-close" "close epic"
37
+ safe_replace "/pm:epic-stop" "/pm:epic-close" "close epic"
38
+ safe_replace "/pm:prd-split" "/pm:epic-split" "split after parse"
39
+
40
+ echo ""
41
+ echo "āœ… Replacements complete!"
42
+ echo ""
43
+ echo "šŸ“ Note: The following invalid commands still exist in docs:"
44
+ echo " - Azure commands (/pm:azure-*)"
45
+ echo " - Generic commands (/pm:epic, /pm:issue, /pm:prd, /pm:pr)"
46
+ echo " - Other unimplemented commands"
47
+ echo ""
48
+ echo "These should be manually reviewed and removed/updated in context."
49
+ echo "See docs/MISSING-COMMANDS-ANALYSIS.md for full list."
@@ -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`);