claude-autopm 1.22.1 → 1.23.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 (42) hide show
  1. package/autopm/.claude/agents/cloud/aws-cloud-architect.md +22 -1
  2. package/autopm/.claude/agents/cloud/azure-cloud-architect.md +22 -1
  3. package/autopm/.claude/agents/cloud/gcp-cloud-architect.md +22 -1
  4. package/autopm/.claude/agents/cloud/gcp-cloud-functions-engineer.md +10 -0
  5. package/autopm/.claude/agents/cloud/gemini-api-expert.md +22 -1
  6. package/autopm/.claude/agents/cloud/kubernetes-orchestrator.md +22 -1
  7. package/autopm/.claude/agents/cloud/openai-python-expert.md +22 -1
  8. package/autopm/.claude/agents/cloud/terraform-infrastructure-expert.md +10 -0
  9. package/autopm/.claude/agents/core/agent-manager.md +30 -1
  10. package/autopm/.claude/agents/core/code-analyzer.md +21 -0
  11. package/autopm/.claude/agents/core/file-analyzer.md +21 -0
  12. package/autopm/.claude/agents/core/mcp-manager.md +30 -1
  13. package/autopm/.claude/agents/core/parallel-worker.md +21 -0
  14. package/autopm/.claude/agents/core/test-runner.md +10 -0
  15. package/autopm/.claude/agents/data/airflow-orchestration-expert.md +21 -0
  16. package/autopm/.claude/agents/data/kedro-pipeline-expert.md +21 -0
  17. package/autopm/.claude/agents/data/langgraph-workflow-expert.md +22 -1
  18. package/autopm/.claude/agents/databases/bigquery-expert.md +10 -0
  19. package/autopm/.claude/agents/databases/cosmosdb-expert.md +10 -0
  20. package/autopm/.claude/agents/databases/mongodb-expert.md +10 -0
  21. package/autopm/.claude/agents/databases/postgresql-expert.md +10 -0
  22. package/autopm/.claude/agents/databases/redis-expert.md +21 -0
  23. package/autopm/.claude/agents/devops/azure-devops-specialist.md +22 -1
  24. package/autopm/.claude/agents/devops/docker-containerization-expert.md +29 -0
  25. package/autopm/.claude/agents/devops/github-operations-specialist.md +22 -1
  26. package/autopm/.claude/agents/devops/mcp-context-manager.md +22 -1
  27. package/autopm/.claude/agents/devops/observability-engineer.md +22 -1
  28. package/autopm/.claude/agents/devops/ssh-operations-expert.md +22 -1
  29. package/autopm/.claude/agents/devops/traefik-proxy-expert.md +22 -1
  30. package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +29 -0
  31. package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +21 -0
  32. package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +12 -1
  33. package/autopm/.claude/agents/frameworks/react-ui-expert.md +20 -1
  34. package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +22 -1
  35. package/autopm/.claude/agents/frameworks/ux-design-expert.md +22 -1
  36. package/autopm/.claude/agents/integration/message-queue-engineer.md +22 -1
  37. package/autopm/.claude/agents/languages/bash-scripting-expert.md +10 -0
  38. package/autopm/.claude/agents/languages/python-backend-engineer.md +12 -1
  39. package/autopm/.claude/agents/languages/python-backend-expert.md +19 -0
  40. package/autopm/.claude/agents/testing/frontend-testing-engineer.md +12 -1
  41. package/package.json +1 -1
  42. package/scripts/standardize-framework-agents.js +335 -0
@@ -0,0 +1,335 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Framework Agent Standardization Script
5
+ *
6
+ * Automatically adds missing sections to framework agents:
7
+ * - Frontmatter (name, description, tools, model, color)
8
+ * - TDD Methodology section
9
+ * - Self-Verification Protocol
10
+ *
11
+ * Based on DEVELOPMENT-STANDARDS.md template
12
+ */
13
+
14
+ const fs = require('fs');
15
+ const path = require('path');
16
+
17
+ // Template sections from DEVELOPMENT-STANDARDS.md
18
+ const TEMPLATES = {
19
+ tdd: `## Test-Driven Development (TDD) Methodology
20
+
21
+ **MANDATORY**: Follow strict TDD principles for all development:
22
+ 1. **Write failing tests FIRST** - Before implementing any functionality
23
+ 2. **Red-Green-Refactor cycle** - Test fails → Make it pass → Improve code
24
+ 3. **One test at a time** - Focus on small, incremental development
25
+ 4. **100% coverage for new code** - All new features must have complete test coverage
26
+ 5. **Tests as documentation** - Tests should clearly document expected behavior`,
27
+
28
+ selfVerification: `## Self-Verification Protocol
29
+
30
+ Before delivering any solution, verify:
31
+ - [ ] Documentation from Context7 has been consulted
32
+ - [ ] Code follows best practices
33
+ - [ ] Tests are written and passing
34
+ - [ ] Performance is acceptable
35
+ - [ ] Security considerations addressed
36
+ - [ ] No resource leaks
37
+ - [ ] Error handling is comprehensive`
38
+ };
39
+
40
+ // Agents missing frontmatter (from analysis)
41
+ const MISSING_FRONTMATTER = [
42
+ 'cloud/gemini-api-expert.md',
43
+ 'cloud/openai-python-expert.md',
44
+ 'core/agent-manager.md',
45
+ 'core/mcp-manager.md',
46
+ 'data/langgraph-workflow-expert.md',
47
+ 'devops/docker-containerization-expert.md',
48
+ 'devops/ssh-operations-expert.md',
49
+ 'devops/traefik-proxy-expert.md',
50
+ 'frameworks/e2e-test-engineer.md',
51
+ 'frameworks/react-ui-expert.md',
52
+ 'frameworks/tailwindcss-expert.md',
53
+ 'languages/python-backend-expert.md'
54
+ ];
55
+
56
+ /**
57
+ * Extract agent name from first markdown header
58
+ */
59
+ function extractAgentName(content) {
60
+ const match = content.match(/^#\s+(.+)$/m);
61
+ return match ? match[1].trim() : 'unknown-agent';
62
+ }
63
+
64
+ /**
65
+ * Extract first paragraph as description
66
+ */
67
+ function extractDescription(content) {
68
+ // Remove frontmatter if exists
69
+ let cleaned = content.replace(/^---[\s\S]*?---\n\n?/, '');
70
+
71
+ // Remove first header
72
+ cleaned = cleaned.replace(/^#\s+.+\n\n?/, '');
73
+
74
+ // Get first paragraph
75
+ const match = cleaned.match(/^(.+?)(?:\n\n|\n#)/s);
76
+ if (match) {
77
+ return match[1].trim().replace(/\n/g, ' ');
78
+ }
79
+
80
+ return 'Agent for specialized tasks';
81
+ }
82
+
83
+ /**
84
+ * Generate frontmatter for agent
85
+ */
86
+ function generateFrontmatter(filePath, content) {
87
+ const agentName = path.basename(filePath, '.md');
88
+ const description = extractDescription(content);
89
+
90
+ // Determine color based on category
91
+ const category = path.dirname(filePath).split('/').pop();
92
+ const colorMap = {
93
+ 'core': 'blue',
94
+ 'languages': 'green',
95
+ 'frameworks': 'purple',
96
+ 'cloud': 'cyan',
97
+ 'devops': 'yellow',
98
+ 'databases': 'magenta',
99
+ 'data': 'orange',
100
+ 'integration': 'red',
101
+ 'testing': 'pink'
102
+ };
103
+ const color = colorMap[category] || 'green';
104
+
105
+ return `---
106
+ name: ${agentName}
107
+ description: ${description}
108
+ tools: Glob, Grep, LS, Read, WebFetch, TodoWrite, WebSearch, Edit, Write, MultiEdit, Bash, Task, Agent
109
+ model: inherit
110
+ color: ${color}
111
+ ---`;
112
+ }
113
+
114
+ /**
115
+ * Check if file has frontmatter
116
+ */
117
+ function hasFrontmatter(content) {
118
+ return content.trim().startsWith('---');
119
+ }
120
+
121
+ /**
122
+ * Check if file has TDD section
123
+ */
124
+ function hasTDD(content) {
125
+ return /## Test-Driven Development/.test(content);
126
+ }
127
+
128
+ /**
129
+ * Check if file has Self-Verification section
130
+ */
131
+ function hasSelfVerification(content) {
132
+ return /## Self-Verification Protocol/.test(content);
133
+ }
134
+
135
+ /**
136
+ * Add frontmatter to file
137
+ */
138
+ function addFrontmatter(filePath, content) {
139
+ const frontmatter = generateFrontmatter(filePath, content);
140
+ return frontmatter + '\n\n' + content;
141
+ }
142
+
143
+ /**
144
+ * Add TDD section after main header
145
+ */
146
+ function addTDD(content) {
147
+ // Find first # header and add TDD after the introduction paragraph
148
+ const lines = content.split('\n');
149
+ let insertIndex = -1;
150
+ let foundHeader = false;
151
+
152
+ for (let i = 0; i < lines.length; i++) {
153
+ const line = lines[i];
154
+
155
+ // Skip frontmatter
156
+ if (i === 0 && line === '---') {
157
+ while (i < lines.length && lines[i] !== '---') i++;
158
+ continue;
159
+ }
160
+
161
+ // Find first # header
162
+ if (!foundHeader && /^#\s+/.test(line)) {
163
+ foundHeader = true;
164
+ continue;
165
+ }
166
+
167
+ // Find first ## section after header or empty line after intro paragraph
168
+ if (foundHeader && (/^##\s+/.test(line) || (line === '' && i > 0 && lines[i-1] !== ''))) {
169
+ insertIndex = i;
170
+ break;
171
+ }
172
+ }
173
+
174
+ if (insertIndex === -1) {
175
+ // If no ## section found, add after first paragraph
176
+ insertIndex = lines.findIndex((line, i) => i > 5 && line === '');
177
+ if (insertIndex === -1) insertIndex = 10; // Fallback
178
+ }
179
+
180
+ lines.splice(insertIndex, 0, '', TEMPLATES.tdd, '');
181
+ return lines.join('\n');
182
+ }
183
+
184
+ /**
185
+ * Add Self-Verification section at end of file
186
+ */
187
+ function addSelfVerification(content) {
188
+ // Add before last section if it's "Deprecation Notice" or similar
189
+ if (/## Deprecation Notice/.test(content)) {
190
+ return content.replace(
191
+ /## Deprecation Notice/,
192
+ `${TEMPLATES.selfVerification}\n\n## Deprecation Notice`
193
+ );
194
+ }
195
+
196
+ // Otherwise add at end
197
+ return content.trim() + '\n\n' + TEMPLATES.selfVerification + '\n';
198
+ }
199
+
200
+ /**
201
+ * Process single agent file
202
+ */
203
+ function processAgent(filePath) {
204
+ console.log(`\n📝 Processing: ${filePath}`);
205
+
206
+ const fullPath = path.join(__dirname, '..', filePath);
207
+ if (!fs.existsSync(fullPath)) {
208
+ console.log(` ⚠️ File not found, skipping`);
209
+ return { updated: false };
210
+ }
211
+
212
+ let content = fs.readFileSync(fullPath, 'utf8');
213
+ let changes = [];
214
+
215
+ // Check and add frontmatter
216
+ if (!hasFrontmatter(content)) {
217
+ content = addFrontmatter(filePath, content);
218
+ changes.push('frontmatter');
219
+ console.log(' ✅ Added frontmatter');
220
+ }
221
+
222
+ // Check and add TDD
223
+ if (!hasTDD(content)) {
224
+ content = addTDD(content);
225
+ changes.push('TDD');
226
+ console.log(' ✅ Added TDD Methodology');
227
+ }
228
+
229
+ // Check and add Self-Verification
230
+ if (!hasSelfVerification(content)) {
231
+ content = addSelfVerification(content);
232
+ changes.push('self-verification');
233
+ console.log(' ✅ Added Self-Verification Protocol');
234
+ }
235
+
236
+ if (changes.length > 0) {
237
+ fs.writeFileSync(fullPath, content, 'utf8');
238
+ console.log(` 💾 Saved with ${changes.length} changes: ${changes.join(', ')}`);
239
+ return { updated: true, changes };
240
+ } else {
241
+ console.log(' ℹ️ Already compliant, no changes needed');
242
+ return { updated: false };
243
+ }
244
+ }
245
+
246
+ /**
247
+ * Find all agent files
248
+ */
249
+ function findAllAgents() {
250
+ const agentsDir = path.join(__dirname, '..', 'autopm', '.claude', 'agents');
251
+ const agents = [];
252
+
253
+ function scanDir(dir) {
254
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
255
+
256
+ for (const entry of entries) {
257
+ const fullPath = path.join(dir, entry.name);
258
+
259
+ if (entry.isDirectory()) {
260
+ scanDir(fullPath);
261
+ } else if (entry.isFile() && entry.name.endsWith('.md')) {
262
+ // Exclude README, AGENT-REGISTRY, and decision matrix files
263
+ if (!entry.name.includes('README') &&
264
+ !entry.name.includes('REGISTRY') &&
265
+ !entry.name.includes('-selection')) {
266
+ const relativePath = path.relative(path.join(__dirname, '..'), fullPath);
267
+ agents.push(relativePath);
268
+ }
269
+ }
270
+ }
271
+ }
272
+
273
+ scanDir(agentsDir);
274
+ return agents;
275
+ }
276
+
277
+ /**
278
+ * Main execution
279
+ */
280
+ function main() {
281
+ console.log('🚀 Framework Agent Standardization Script\n');
282
+ console.log('Based on DEVELOPMENT-STANDARDS.md template\n');
283
+ console.log('='.repeat(60));
284
+
285
+ const allAgents = findAllAgents();
286
+ console.log(`\n📊 Found ${allAgents.length} framework agents\n`);
287
+
288
+ let stats = {
289
+ total: allAgents.length,
290
+ updated: 0,
291
+ frontmatterAdded: 0,
292
+ tddAdded: 0,
293
+ selfVerificationAdded: 0
294
+ };
295
+
296
+ // Process all agents
297
+ for (const agentPath of allAgents) {
298
+ const result = processAgent(agentPath);
299
+ if (result.updated) {
300
+ stats.updated++;
301
+ if (result.changes.includes('frontmatter')) stats.frontmatterAdded++;
302
+ if (result.changes.includes('TDD')) stats.tddAdded++;
303
+ if (result.changes.includes('self-verification')) stats.selfVerificationAdded++;
304
+ }
305
+ }
306
+
307
+ // Print summary
308
+ console.log('\n' + '='.repeat(60));
309
+ console.log('\n📈 Standardization Summary:\n');
310
+ console.log(`Total agents processed: ${stats.total}`);
311
+ console.log(`Agents updated: ${stats.updated}`);
312
+ console.log(`Frontmatter added: ${stats.frontmatterAdded}`);
313
+ console.log(`TDD sections added: ${stats.tddAdded}`);
314
+ console.log(`Self-Verification added: ${stats.selfVerificationAdded}`);
315
+ console.log(`Already compliant: ${stats.total - stats.updated}`);
316
+
317
+ const complianceRate = ((stats.total - stats.updated) / stats.total * 100).toFixed(1);
318
+ console.log(`\n✅ Compliance rate: ${complianceRate}%`);
319
+
320
+ if (stats.updated > 0) {
321
+ console.log(`\n💡 Next steps:`);
322
+ console.log(` 1. Review changes: git diff autopm/.claude/agents/`);
323
+ console.log(` 2. Run code analyzer: @code-analyzer review agent changes`);
324
+ console.log(` 3. Commit: git add . && git commit -m "feat: standardize framework agents"`);
325
+ }
326
+
327
+ console.log('\n✨ Done!\n');
328
+ }
329
+
330
+ // Execute
331
+ if (require.main === module) {
332
+ main();
333
+ }
334
+
335
+ module.exports = { processAgent, findAllAgents };