agi-farm 1.5.2 ā 1.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/README.md +49 -9
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/scripts/convert-agency-agent.js +319 -0
- package/scripts/update-agency-agents.js +242 -0
- package/templates/ORCHESTRATION_PATTERNS.md +588 -0
- package/templates/QUALITY_GATE_PATTERNS.md +777 -0
- package/templates/WORKFLOW_TEMPLATES.md +1016 -0
- package/templates/agency-agents/design/design-brand-guardian.md +361 -0
- package/templates/agency-agents/design/design-image-prompt-engineer.md +276 -0
- package/templates/agency-agents/design/design-ui-designer.md +422 -0
- package/templates/agency-agents/design/design-ux-architect.md +508 -0
- package/templates/agency-agents/design/design-ux-researcher.md +368 -0
- package/templates/agency-agents/design/design-visual-storyteller.md +188 -0
- package/templates/agency-agents/design/design-whimsy-injector.md +477 -0
- package/templates/agency-agents/engineering/engineering-ai-engineer.md +185 -0
- package/templates/agency-agents/engineering/engineering-backend-architect.md +274 -0
- package/templates/agency-agents/engineering/engineering-devops-automator.md +415 -0
- package/templates/agency-agents/engineering/engineering-frontend-developer.md +264 -0
- package/templates/agency-agents/engineering/engineering-mobile-app-builder.md +532 -0
- package/templates/agency-agents/engineering/engineering-rapid-prototyper.md +501 -0
- package/templates/agency-agents/engineering/engineering-senior-developer.md +216 -0
- package/templates/agency-agents/marketing/marketing-app-store-optimizer.md +360 -0
- package/templates/agency-agents/marketing/marketing-content-creator.md +92 -0
- package/templates/agency-agents/marketing/marketing-growth-hacker.md +92 -0
- package/templates/agency-agents/marketing/marketing-instagram-curator.md +152 -0
- package/templates/agency-agents/marketing/marketing-reddit-community-builder.md +162 -0
- package/templates/agency-agents/marketing/marketing-social-media-strategist.md +164 -0
- package/templates/agency-agents/marketing/marketing-tiktok-strategist.md +164 -0
- package/templates/agency-agents/marketing/marketing-twitter-engager.md +165 -0
- package/templates/agency-agents/product/product-feedback-synthesizer.md +157 -0
- package/templates/agency-agents/product/product-sprint-prioritizer.md +192 -0
- package/templates/agency-agents/product/product-trend-researcher.md +197 -0
- package/templates/agency-agents/project-management/project-management-experiment-tracker.md +237 -0
- package/templates/agency-agents/project-management/project-management-project-shepherd.md +233 -0
- package/templates/agency-agents/project-management/project-management-studio-operations.md +239 -0
- package/templates/agency-agents/project-management/project-management-studio-producer.md +242 -0
- package/templates/agency-agents/project-management/project-manager-senior.md +175 -0
- package/templates/agency-agents/spatial-computing/macos-spatial-metal-engineer.md +376 -0
- package/templates/agency-agents/spatial-computing/terminal-integration-specialist.md +109 -0
- package/templates/agency-agents/spatial-computing/visionos-spatial-engineer.md +93 -0
- package/templates/agency-agents/spatial-computing/xr-cockpit-interaction-specialist.md +72 -0
- package/templates/agency-agents/spatial-computing/xr-immersive-developer.md +72 -0
- package/templates/agency-agents/spatial-computing/xr-interface-architect.md +72 -0
- package/templates/agency-agents/specialized/agentic-identity-trust.md +414 -0
- package/templates/agency-agents/specialized/agents-orchestrator.md +406 -0
- package/templates/agency-agents/specialized/data-analytics-reporter.md +92 -0
- package/templates/agency-agents/specialized/data-consolidation-agent.md +100 -0
- package/templates/agency-agents/specialized/lsp-index-engineer.md +353 -0
- package/templates/agency-agents/specialized/report-distribution-agent.md +105 -0
- package/templates/agency-agents/specialized/sales-data-extraction-agent.md +107 -0
- package/templates/agency-agents/strategy/EXECUTIVE-BRIEF.md +142 -0
- package/templates/agency-agents/strategy/QUICKSTART.md +241 -0
- package/templates/agency-agents/strategy/nexus-strategy.md +1157 -0
- package/templates/agency-agents/support/support-analytics-reporter.md +404 -0
- package/templates/agency-agents/support/support-executive-summary-generator.md +252 -0
- package/templates/agency-agents/support/support-finance-tracker.md +481 -0
- package/templates/agency-agents/support/support-infrastructure-maintainer.md +657 -0
- package/templates/agency-agents/support/support-legal-compliance-checker.md +627 -0
- package/templates/agency-agents/support/support-support-responder.md +624 -0
- package/templates/agency-agents/testing/testing-api-tester.md +345 -0
- package/templates/agency-agents/testing/testing-evidence-collector.md +250 -0
- package/templates/agency-agents/testing/testing-performance-benchmarker.md +307 -0
- package/templates/agency-agents/testing/testing-reality-checker.md +278 -0
- package/templates/agency-agents/testing/testing-test-results-analyzer.md +344 -0
- package/templates/agency-agents/testing/testing-tool-evaluator.md +433 -0
- package/templates/agency-agents/testing/testing-workflow-optimizer.md +489 -0
package/README.md
CHANGED
|
@@ -36,15 +36,28 @@
|
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## š What's New in v1.
|
|
40
|
-
|
|
41
|
-
###
|
|
39
|
+
## š What's New in v1.6.0
|
|
40
|
+
|
|
41
|
+
### š Agency-Agents Integration: 59 Specialized Personalities
|
|
42
|
+
- **59 battle-tested agent templates** from [@msitarzewski's Agency-Agents](https://github.com/msitarzewski/agency-agents)
|
|
43
|
+
- **11 specializations**: Engineering, Design, Marketing, Product, PM, Testing, Support, Spatial Computing, Strategy, and more
|
|
44
|
+
- **Production-proven workflows** with 10,000+ lines of personality definitions and code examples
|
|
45
|
+
- **Standout agents**: Agents Orchestrator, Evidence Collector, Reality Checker, Whimsy Injector, Reddit Community Builder
|
|
46
|
+
- **Total library**: **91 agents** (16 AGI Farm + 16 ECC + 59 Agency-Agents)
|
|
47
|
+
- **Zero dependencies** ā Pure markdown templates, instantly usable
|
|
48
|
+
- **See:** [Agency-Agents Integration Guide](AGENCY_AGENTS_GUIDE.md)
|
|
49
|
+
|
|
50
|
+
### š Enhanced Orchestration Patterns
|
|
51
|
+
- **Pipeline orchestration** for Cooper: PM ā Architect ā [Dev ā QA Loop] ā Integration
|
|
52
|
+
- **Quality gate patterns** for Vigil: Evidence Collector + Reality Checker methodologies
|
|
53
|
+
- **4 workflow templates**: Startup MVP, Marketing Campaign, Enterprise Feature, Quality-First teams
|
|
54
|
+
- **Automated update system** for keeping Agency-Agents templates current
|
|
55
|
+
- **See:** [Orchestration Patterns](templates/ORCHESTRATION_PATTERNS.md) | [Quality Gates](templates/QUALITY_GATE_PATTERNS.md) | [Workflow Templates](templates/WORKFLOW_TEMPLATES.md)
|
|
56
|
+
|
|
57
|
+
### Previous: ECC Integration v1.5.0
|
|
42
58
|
- **69 specialized skills** from Everything Claude Code (Anthropic hackathon winner)
|
|
43
59
|
- **16 ECC agent templates** for domain-specific delegation
|
|
44
60
|
- **33 slash commands** for common workflows
|
|
45
|
-
- **Auto-applied resources** based on agent roles (Sage ā @architect, Forge ā @tdd-workflow, Vigil ā @security-scan)
|
|
46
|
-
- **Zero configuration** ā ECC resources automatically injected into SOUL.md files
|
|
47
|
-
- **Framework support** ā Python, Django, Spring Boot, Go, Swift, PostgreSQL patterns included
|
|
48
61
|
- **TDD & Security-First** ā 80%+ test coverage enforced, comprehensive security scans
|
|
49
62
|
- **See:** [ECC Integration Guide](docs/ECC_INTEGRATION_GUIDE.md)
|
|
50
63
|
|
|
@@ -739,24 +752,51 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
739
752
|
|
|
740
753
|
## š Acknowledgments
|
|
741
754
|
|
|
742
|
-
This plugin integrates production-ready AI
|
|
755
|
+
This plugin integrates production-ready AI resources from the following exceptional projects:
|
|
756
|
+
|
|
757
|
+
### Agency-Agents (NEW in v1.6.0)
|
|
758
|
+
- **Repository**: https://github.com/msitarzewski/agency-agents
|
|
759
|
+
- **Author**: [@msitarzewski](https://github.com/msitarzewski)
|
|
760
|
+
- **Achievement**: 50+ requests in first 12 hours on Reddit, months of production iteration
|
|
761
|
+
- **Integration**: 59 specialized agent personalities across 11 categories
|
|
762
|
+
- **Impact**: Battle-tested workflows for Engineering, Design, Marketing, Product, PM, Testing, Support, Spatial Computing, and Strategy
|
|
763
|
+
|
|
764
|
+
The Agency-Agents collection dramatically expands AGI Farm's agent library with proven personalities including:
|
|
765
|
+
- **Agents Orchestrator** - Meta-agent for pipeline management (PM ā Architect ā Dev-QA Loop ā Integration)
|
|
766
|
+
- **Evidence Collector** - Screenshot-based QA (defaults to finding 3-5 issues minimum)
|
|
767
|
+
- **Reality Checker** - Production readiness certification (defaults to "NEEDS WORK")
|
|
768
|
+
- **Whimsy Injector** - Delightful UX enhancements that serve functional or emotional purpose
|
|
769
|
+
- **Reddit Community Builder** - Authentic community engagement patterns
|
|
770
|
+
|
|
771
|
+
**Special thanks to @msitarzewski for creating and sharing these exceptional agent personalities with the community.**
|
|
743
772
|
|
|
744
773
|
### Everything Claude Code (ECC)
|
|
745
774
|
- **Repository**: https://github.com/affaan-m/everything-claude-code
|
|
746
775
|
- **Author**: [@affaan-m](https://github.com/affaan-m)
|
|
747
776
|
- **Achievement**: Winner of Anthropic's Claude Code hackathon
|
|
748
|
-
- **Integration**:
|
|
777
|
+
- **Integration**: 510 resource files (16 agents, 69 skills, 33 commands, 7 guides)
|
|
749
778
|
- **Impact**: Industry-standard TDD workflows, security scans, API design patterns, and framework templates for Python/Django/Spring Boot/Go/Swift/PostgreSQL
|
|
750
779
|
|
|
751
780
|
The ECC framework provides the foundation for AGI Farm's production-ready coding capabilities, including:
|
|
752
781
|
- Test-driven development workflows with 80%+ coverage enforcement
|
|
753
|
-
- Comprehensive security scanning and vulnerability detection
|
|
782
|
+
- Comprehensive security scanning and vulnerability detection (via AgentShield)
|
|
754
783
|
- API design patterns and best practices
|
|
755
784
|
- Framework-specific templates and conventions
|
|
756
785
|
- Auto-delegation based on agent roles
|
|
757
786
|
|
|
758
787
|
**Special thanks to @affaan-m for creating and open-sourcing this exceptional framework.**
|
|
759
788
|
|
|
789
|
+
### Combined Impact
|
|
790
|
+
|
|
791
|
+
**Total Integrated Resources**:
|
|
792
|
+
- **91 agent templates** (16 AGI Farm + 16 ECC + 59 Agency-Agents)
|
|
793
|
+
- **69 production skills** (ECC)
|
|
794
|
+
- **33 slash commands** (ECC)
|
|
795
|
+
- **7 quality automation hooks** (AGI Farm)
|
|
796
|
+
- **10,000+ lines** of agent personalities and workflows
|
|
797
|
+
|
|
798
|
+
AGI Farm is proud to stand on the shoulders of these giants, combining the best of community-driven AI agent development into a single, cohesive plugin.
|
|
799
|
+
|
|
760
800
|
---
|
|
761
801
|
|
|
762
802
|
## š License
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "agi-farm",
|
|
3
3
|
"kind": "team-orchestration",
|
|
4
4
|
"name": "AGI Farm ā Multi-Agent Team Builder",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.6.0",
|
|
6
6
|
"description": "Bootstrap complete multi-agent AI teams with auto-dispatcher, live dashboard, and infrastructure. Includes interactive wizard, SOUL.md generation, comms setup, cron registration, and React + SSE ops room.",
|
|
7
7
|
"author": "oabdelmaksoud",
|
|
8
8
|
"homepage": "https://github.com/oabdelmaksoud/AGI-FARM-PLUGIN",
|
package/package.json
CHANGED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Agency-Agents to SOUL.md Converter
|
|
5
|
+
*
|
|
6
|
+
* Converts agency-agents markdown files to AGI Farm SOUL.md format.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* node scripts/convert-agency-agent.js <input-file> <output-file>
|
|
10
|
+
* node scripts/convert-agency-agent.js --batch <agency-agents-dir> <templates-dir>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import fs from 'fs/promises';
|
|
14
|
+
import path from 'path';
|
|
15
|
+
import { fileURLToPath } from 'url';
|
|
16
|
+
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
+
const __dirname = path.dirname(__filename);
|
|
19
|
+
|
|
20
|
+
// Category mapping for AGI Farm
|
|
21
|
+
const CATEGORY_MAP = {
|
|
22
|
+
'engineering': 'engineering',
|
|
23
|
+
'design': 'design',
|
|
24
|
+
'marketing': 'marketing',
|
|
25
|
+
'product': 'product',
|
|
26
|
+
'project-management': 'project-management',
|
|
27
|
+
'testing': 'quality-assurance',
|
|
28
|
+
'support': 'support',
|
|
29
|
+
'spatial-computing': 'specialized',
|
|
30
|
+
'specialized': 'specialized',
|
|
31
|
+
'strategy': 'leadership',
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Role mapping for AGI Farm
|
|
35
|
+
const ROLE_MAP = {
|
|
36
|
+
'engineering-frontend-developer': 'frontend-developer',
|
|
37
|
+
'engineering-backend-architect': 'backend-architect',
|
|
38
|
+
'engineering-mobile-app-builder': 'mobile-developer',
|
|
39
|
+
'engineering-ai-engineer': 'ai-engineer',
|
|
40
|
+
'engineering-devops-automator': 'devops-engineer',
|
|
41
|
+
'engineering-rapid-prototyper': 'prototyper',
|
|
42
|
+
'engineering-senior-developer': 'senior-developer',
|
|
43
|
+
'design-ui-designer': 'ui-designer',
|
|
44
|
+
'design-ux-researcher': 'ux-researcher',
|
|
45
|
+
'design-ux-architect': 'ux-architect',
|
|
46
|
+
'design-brand-guardian': 'brand-manager',
|
|
47
|
+
'design-visual-storyteller': 'visual-designer',
|
|
48
|
+
'design-whimsy-injector': 'ux-enhancer',
|
|
49
|
+
'design-image-prompt-engineer': 'image-engineer',
|
|
50
|
+
'marketing-growth-hacker': 'growth-hacker',
|
|
51
|
+
'marketing-content-creator': 'content-creator',
|
|
52
|
+
'marketing-twitter-engager': 'social-media-manager',
|
|
53
|
+
'marketing-tiktok-strategist': 'tiktok-specialist',
|
|
54
|
+
'marketing-instagram-curator': 'instagram-specialist',
|
|
55
|
+
'marketing-reddit-community-builder': 'community-manager',
|
|
56
|
+
'marketing-app-store-optimizer': 'aso-specialist',
|
|
57
|
+
'marketing-social-media-strategist': 'social-strategist',
|
|
58
|
+
'product-sprint-prioritizer': 'product-manager',
|
|
59
|
+
'product-trend-researcher': 'market-researcher',
|
|
60
|
+
'product-feedback-synthesizer': 'user-researcher',
|
|
61
|
+
'project-management-studio-producer': 'studio-producer',
|
|
62
|
+
'project-management-project-shepherd': 'project-coordinator',
|
|
63
|
+
'project-manager-senior': 'senior-pm',
|
|
64
|
+
'project-management-studio-operations': 'operations-manager',
|
|
65
|
+
'project-management-experiment-tracker': 'experiment-manager',
|
|
66
|
+
'testing-evidence-collector': 'qa-engineer',
|
|
67
|
+
'testing-reality-checker': 'qa-lead',
|
|
68
|
+
'testing-test-results-analyzer': 'test-analyst',
|
|
69
|
+
'testing-performance-benchmarker': 'performance-engineer',
|
|
70
|
+
'testing-api-tester': 'api-tester',
|
|
71
|
+
'testing-tool-evaluator': 'tech-evaluator',
|
|
72
|
+
'testing-workflow-optimizer': 'process-engineer',
|
|
73
|
+
'support-support-responder': 'support-engineer',
|
|
74
|
+
'support-analytics-reporter': 'data-analyst',
|
|
75
|
+
'support-finance-tracker': 'finance-analyst',
|
|
76
|
+
'support-infrastructure-maintainer': 'infrastructure-engineer',
|
|
77
|
+
'support-legal-compliance-checker': 'compliance-officer',
|
|
78
|
+
'support-executive-summary-generator': 'executive-assistant',
|
|
79
|
+
'specialized-agents-orchestrator': 'orchestrator',
|
|
80
|
+
'specialized-data-analytics-reporter': 'business-analyst',
|
|
81
|
+
'specialized-lsp-index-engineer': 'tooling-engineer',
|
|
82
|
+
'specialized-sales-data-extraction-agent': 'data-extraction-specialist',
|
|
83
|
+
'specialized-data-consolidation-agent': 'data-consolidation-specialist',
|
|
84
|
+
'specialized-report-distribution-agent': 'reporting-specialist',
|
|
85
|
+
'specialized-agentic-identity-trust': 'identity-specialist',
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Parse frontmatter from markdown
|
|
90
|
+
*/
|
|
91
|
+
function parseFrontmatter(content) {
|
|
92
|
+
const frontmatterRegex = /^---\n([\s\S]*?)\n---\n/;
|
|
93
|
+
const match = content.match(frontmatterRegex);
|
|
94
|
+
|
|
95
|
+
if (!match) {
|
|
96
|
+
return { frontmatter: {}, content };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const frontmatterText = match[1];
|
|
100
|
+
const frontmatter = {};
|
|
101
|
+
|
|
102
|
+
frontmatterText.split('\n').forEach(line => {
|
|
103
|
+
const [key, ...valueParts] = line.split(':');
|
|
104
|
+
if (key && valueParts.length > 0) {
|
|
105
|
+
frontmatter[key.trim()] = valueParts.join(':').trim();
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const remainingContent = content.replace(frontmatterRegex, '');
|
|
110
|
+
return { frontmatter, content: remainingContent };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Convert agency-agent markdown to SOUL.md format
|
|
115
|
+
*/
|
|
116
|
+
function convertToSoulMd(agentContent, filename, category) {
|
|
117
|
+
const { frontmatter, content } = parseFrontmatter(agentContent);
|
|
118
|
+
|
|
119
|
+
const agentName = frontmatter.name || 'Unknown Agent';
|
|
120
|
+
const description = frontmatter.description || '';
|
|
121
|
+
const color = frontmatter.color || 'cyan';
|
|
122
|
+
|
|
123
|
+
// Determine role from filename
|
|
124
|
+
const baseFilename = path.basename(filename, '.md');
|
|
125
|
+
const role = ROLE_MAP[baseFilename] || baseFilename;
|
|
126
|
+
const agiFarmCategory = CATEGORY_MAP[category] || 'specialized';
|
|
127
|
+
|
|
128
|
+
// Build SOUL.md content
|
|
129
|
+
let soulContent = `# ${agentName}
|
|
130
|
+
|
|
131
|
+
**Role**: ${role}
|
|
132
|
+
**Category**: ${agiFarmCategory}
|
|
133
|
+
**Source**: Agency-Agents by [@msitarzewski](https://github.com/msitarzewski/agency-agents)
|
|
134
|
+
|
|
135
|
+
## Overview
|
|
136
|
+
|
|
137
|
+
${description}
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
${content}
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## š Attribution
|
|
146
|
+
|
|
147
|
+
This agent personality is from the **Agency-Agents** repository by [@msitarzewski](https://github.com/msitarzewski).
|
|
148
|
+
|
|
149
|
+
**Original Repository**: https://github.com/msitarzewski/agency-agents
|
|
150
|
+
**License**: MIT License
|
|
151
|
+
**Adapted for**: AGI Farm Plugin
|
|
152
|
+
|
|
153
|
+
## šÆ Integration Notes
|
|
154
|
+
|
|
155
|
+
This agent has been converted from Agency-Agents format to AGI Farm SOUL.md format.
|
|
156
|
+
|
|
157
|
+
**Conversion Details**:
|
|
158
|
+
- Original file: \`${category}/${filename}\`
|
|
159
|
+
- AGI Farm role: \`${role}\`
|
|
160
|
+
- AGI Farm category: \`${agiFarmCategory}\`
|
|
161
|
+
- Color theme: \`${color}\`
|
|
162
|
+
|
|
163
|
+
**Usage in AGI Farm**:
|
|
164
|
+
\`\`\`bash
|
|
165
|
+
# Create an agent with this personality
|
|
166
|
+
agi-farm setup
|
|
167
|
+
# ā Select "Agency-Agents Library"
|
|
168
|
+
# ā Choose "${agentName}"
|
|
169
|
+
|
|
170
|
+
# Or use directly in workspace
|
|
171
|
+
cp templates/agency-agents/${category}/${filename} \\
|
|
172
|
+
~/.openclaw/workspace/agents-workspaces/<agent-name>/SOUL.md
|
|
173
|
+
\`\`\`
|
|
174
|
+
|
|
175
|
+
**Customization**: Feel free to adapt this personality for your specific needs. The original Agency-Agents template provides a strong foundation.
|
|
176
|
+
`;
|
|
177
|
+
|
|
178
|
+
return soulContent;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Convert a single agent file
|
|
183
|
+
*/
|
|
184
|
+
async function convertSingleAgent(inputFile, outputFile) {
|
|
185
|
+
try {
|
|
186
|
+
console.log(`Converting ${inputFile} ā ${outputFile}`);
|
|
187
|
+
|
|
188
|
+
const content = await fs.readFile(inputFile, 'utf-8');
|
|
189
|
+
const category = path.basename(path.dirname(inputFile));
|
|
190
|
+
const filename = path.basename(inputFile);
|
|
191
|
+
|
|
192
|
+
const soulMd = convertToSoulMd(content, filename, category);
|
|
193
|
+
|
|
194
|
+
await fs.mkdir(path.dirname(outputFile), { recursive: true });
|
|
195
|
+
await fs.writeFile(outputFile, soulMd, 'utf-8');
|
|
196
|
+
|
|
197
|
+
console.log(`ā
Converted: ${outputFile}`);
|
|
198
|
+
} catch (error) {
|
|
199
|
+
console.error(`ā Error converting ${inputFile}:`, error.message);
|
|
200
|
+
throw error;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Batch convert all agents from a directory
|
|
206
|
+
*/
|
|
207
|
+
async function batchConvert(agencyAgentsDir, templatesDir) {
|
|
208
|
+
console.log(`\nš Batch Converting Agency-Agents\n`);
|
|
209
|
+
console.log(`Source: ${agencyAgentsDir}`);
|
|
210
|
+
console.log(`Target: ${templatesDir}\n`);
|
|
211
|
+
|
|
212
|
+
const categories = Object.keys(CATEGORY_MAP);
|
|
213
|
+
let totalConverted = 0;
|
|
214
|
+
let errors = 0;
|
|
215
|
+
|
|
216
|
+
for (const category of categories) {
|
|
217
|
+
const categoryDir = path.join(agencyAgentsDir, category);
|
|
218
|
+
|
|
219
|
+
try {
|
|
220
|
+
const files = await fs.readdir(categoryDir);
|
|
221
|
+
const mdFiles = files.filter(f => f.endsWith('.md'));
|
|
222
|
+
|
|
223
|
+
console.log(`\nš Category: ${category} (${mdFiles.length} agents)`);
|
|
224
|
+
|
|
225
|
+
for (const file of mdFiles) {
|
|
226
|
+
const inputFile = path.join(categoryDir, file);
|
|
227
|
+
const outputDir = path.join(templatesDir, category);
|
|
228
|
+
const outputFile = path.join(outputDir, file);
|
|
229
|
+
|
|
230
|
+
try {
|
|
231
|
+
await convertSingleAgent(inputFile, outputFile);
|
|
232
|
+
totalConverted++;
|
|
233
|
+
} catch (error) {
|
|
234
|
+
console.error(` ā Failed: ${file}`);
|
|
235
|
+
errors++;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
} catch (error) {
|
|
239
|
+
if (error.code === 'ENOENT') {
|
|
240
|
+
console.log(` ā ļø Category directory not found: ${category}`);
|
|
241
|
+
} else {
|
|
242
|
+
console.error(` ā Error processing category ${category}:`, error.message);
|
|
243
|
+
errors++;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
console.log(`\n\n⨠Batch Conversion Complete\n`);
|
|
249
|
+
console.log(`Total Converted: ${totalConverted}`);
|
|
250
|
+
console.log(`Errors: ${errors}`);
|
|
251
|
+
console.log(`\nTemplates created in: ${templatesDir}\n`);
|
|
252
|
+
|
|
253
|
+
return { totalConverted, errors };
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Main CLI
|
|
258
|
+
*/
|
|
259
|
+
async function main() {
|
|
260
|
+
const args = process.argv.slice(2);
|
|
261
|
+
|
|
262
|
+
if (args.length === 0 || args[0] === '--help') {
|
|
263
|
+
console.log(`
|
|
264
|
+
Agency-Agents to SOUL.md Converter
|
|
265
|
+
|
|
266
|
+
Usage:
|
|
267
|
+
Single file conversion:
|
|
268
|
+
node scripts/convert-agency-agent.js <input-file> <output-file>
|
|
269
|
+
|
|
270
|
+
Batch conversion:
|
|
271
|
+
node scripts/convert-agency-agent.js --batch <agency-agents-dir> <templates-dir>
|
|
272
|
+
|
|
273
|
+
Examples:
|
|
274
|
+
# Convert single agent
|
|
275
|
+
node scripts/convert-agency-agent.js \\
|
|
276
|
+
/tmp/agency-agents-review/engineering/engineering-frontend-developer.md \\
|
|
277
|
+
templates/agency-agents/engineering/engineering-frontend-developer.md
|
|
278
|
+
|
|
279
|
+
# Batch convert all agents
|
|
280
|
+
node scripts/convert-agency-agent.js --batch \\
|
|
281
|
+
/tmp/agency-agents-review \\
|
|
282
|
+
templates/agency-agents
|
|
283
|
+
`);
|
|
284
|
+
process.exit(0);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (args[0] === '--batch') {
|
|
288
|
+
if (args.length < 3) {
|
|
289
|
+
console.error('Error: --batch requires <agency-agents-dir> <templates-dir>');
|
|
290
|
+
process.exit(1);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
const agencyAgentsDir = path.resolve(args[1]);
|
|
294
|
+
const templatesDir = path.resolve(args[2]);
|
|
295
|
+
|
|
296
|
+
const { totalConverted, errors } = await batchConvert(agencyAgentsDir, templatesDir);
|
|
297
|
+
process.exit(errors > 0 ? 1 : 0);
|
|
298
|
+
} else {
|
|
299
|
+
if (args.length < 2) {
|
|
300
|
+
console.error('Error: Single conversion requires <input-file> <output-file>');
|
|
301
|
+
process.exit(1);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const inputFile = path.resolve(args[0]);
|
|
305
|
+
const outputFile = path.resolve(args[1]);
|
|
306
|
+
|
|
307
|
+
await convertSingleAgent(inputFile, outputFile);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Run if called directly
|
|
312
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
313
|
+
main().catch(error => {
|
|
314
|
+
console.error('Fatal error:', error);
|
|
315
|
+
process.exit(1);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { convertToSoulMd, convertSingleAgent, batchConvert };
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Agency-Agents Update Script
|
|
5
|
+
*
|
|
6
|
+
* Automatically checks for and applies updates from the Agency-Agents repository.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* node scripts/update-agency-agents.js # Check and apply updates
|
|
10
|
+
* node scripts/update-agency-agents.js --dry-run # Check only, don't apply
|
|
11
|
+
* node scripts/update-agency-agents.js --force # Force update even if no changes
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import fs from 'fs/promises';
|
|
15
|
+
import path from 'path';
|
|
16
|
+
import { execSync } from 'child_process';
|
|
17
|
+
import { fileURLToPath } from 'url';
|
|
18
|
+
import chalk from 'chalk';
|
|
19
|
+
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = path.dirname(__filename);
|
|
22
|
+
|
|
23
|
+
const PLUGIN_ROOT = path.resolve(__dirname, '..');
|
|
24
|
+
const TEMPLATES_DIR = path.join(PLUGIN_ROOT, 'templates', 'agency-agents');
|
|
25
|
+
const VERSION_FILE = path.join(PLUGIN_ROOT, 'agency-agents-resources', 'AGENCY_VERSION');
|
|
26
|
+
const TEMP_DIR = '/tmp/agency-agents-update';
|
|
27
|
+
const REPO_URL = 'https://github.com/msitarzewski/agency-agents.git';
|
|
28
|
+
|
|
29
|
+
// Parse CLI arguments
|
|
30
|
+
const args = process.argv.slice(2);
|
|
31
|
+
const isDryRun = args.includes('--dry-run');
|
|
32
|
+
const isForce = args.includes('--force');
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get current version from VERSION_FILE
|
|
36
|
+
*/
|
|
37
|
+
async function getCurrentVersion() {
|
|
38
|
+
try {
|
|
39
|
+
const content = await fs.readFile(VERSION_FILE, 'utf-8');
|
|
40
|
+
const match = content.match(/COMMIT:\s*([a-f0-9]+)/);
|
|
41
|
+
return match ? match[1] : null;
|
|
42
|
+
} catch (error) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Clone or update Agency-Agents repository
|
|
49
|
+
*/
|
|
50
|
+
async function cloneOrUpdateRepo() {
|
|
51
|
+
console.log(chalk.cyan('\nš„ Fetching Agency-Agents repository...\n'));
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
// Remove old temp directory
|
|
55
|
+
try {
|
|
56
|
+
await fs.rm(TEMP_DIR, { recursive: true, force: true });
|
|
57
|
+
} catch {}
|
|
58
|
+
|
|
59
|
+
// Clone fresh copy
|
|
60
|
+
execSync(`git clone ${REPO_URL} ${TEMP_DIR}`, {
|
|
61
|
+
stdio: 'inherit',
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// Get latest commit
|
|
65
|
+
const commit = execSync('git rev-parse HEAD', {
|
|
66
|
+
cwd: TEMP_DIR,
|
|
67
|
+
encoding: 'utf-8',
|
|
68
|
+
}).trim();
|
|
69
|
+
|
|
70
|
+
const commitDate = execSync('git log -1 --format=%cd --date=short', {
|
|
71
|
+
cwd: TEMP_DIR,
|
|
72
|
+
encoding: 'utf-8',
|
|
73
|
+
}).trim();
|
|
74
|
+
|
|
75
|
+
return { commit, commitDate };
|
|
76
|
+
} catch (error) {
|
|
77
|
+
console.error(chalk.red('ā Failed to clone repository:'), error.message);
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Compare versions
|
|
84
|
+
*/
|
|
85
|
+
async function compareVersions(currentCommit, latestCommit) {
|
|
86
|
+
if (!currentCommit) {
|
|
87
|
+
console.log(chalk.yellow('ā ļø No version file found - this appears to be a first-time setup'));
|
|
88
|
+
return { hasUpdates: true, isFirstTime: true };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (currentCommit === latestCommit) {
|
|
92
|
+
console.log(chalk.green('ā
Already up to date!'));
|
|
93
|
+
console.log(chalk.dim(` Current: ${currentCommit.substring(0, 7)}`));
|
|
94
|
+
return { hasUpdates: false, isFirstTime: false };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
console.log(chalk.yellow('š Updates available:'));
|
|
98
|
+
console.log(chalk.dim(` Current: ${currentCommit.substring(0, 7)}`));
|
|
99
|
+
console.log(chalk.dim(` Latest: ${latestCommit.substring(0, 7)}`));
|
|
100
|
+
|
|
101
|
+
// Show commits between versions
|
|
102
|
+
try {
|
|
103
|
+
const commits = execSync(
|
|
104
|
+
`git log --oneline ${currentCommit}..${latestCommit}`,
|
|
105
|
+
{ cwd: TEMP_DIR, encoding: 'utf-8' }
|
|
106
|
+
).trim();
|
|
107
|
+
|
|
108
|
+
if (commits) {
|
|
109
|
+
console.log(chalk.cyan('\nš Changes since last update:\n'));
|
|
110
|
+
commits.split('\n').forEach(line => {
|
|
111
|
+
console.log(chalk.dim(` ${line}`));
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
} catch (error) {
|
|
115
|
+
console.log(chalk.dim(' (Unable to fetch commit history)'));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return { hasUpdates: true, isFirstTime: false };
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Run conversion script
|
|
123
|
+
*/
|
|
124
|
+
async function runConversion() {
|
|
125
|
+
console.log(chalk.cyan('\nš Converting agent templates...\n'));
|
|
126
|
+
|
|
127
|
+
try {
|
|
128
|
+
const conversionScript = path.join(__dirname, 'convert-agency-agent.js');
|
|
129
|
+
execSync(
|
|
130
|
+
`node "${conversionScript}" --batch "${TEMP_DIR}" "${TEMPLATES_DIR}"`,
|
|
131
|
+
{ stdio: 'inherit' }
|
|
132
|
+
);
|
|
133
|
+
return true;
|
|
134
|
+
} catch (error) {
|
|
135
|
+
console.error(chalk.red('ā Conversion failed:'), error.message);
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Update version file
|
|
142
|
+
*/
|
|
143
|
+
async function updateVersionFile(commit, commitDate) {
|
|
144
|
+
const versionContent = `# Agency-Agents Version Tracking
|
|
145
|
+
#
|
|
146
|
+
# This file tracks which version of the Agency-Agents repository
|
|
147
|
+
# was last integrated into AGI Farm.
|
|
148
|
+
|
|
149
|
+
REPOSITORY: https://github.com/msitarzewski/agency-agents
|
|
150
|
+
COMMIT: ${commit}
|
|
151
|
+
DATE: ${commitDate}
|
|
152
|
+
UPDATED: ${new Date().toISOString()}
|
|
153
|
+
|
|
154
|
+
# To update to latest version:
|
|
155
|
+
# node scripts/update-agency-agents.js
|
|
156
|
+
#
|
|
157
|
+
# To check for updates without applying:
|
|
158
|
+
# node scripts/update-agency-agents.js --dry-run
|
|
159
|
+
`;
|
|
160
|
+
|
|
161
|
+
try {
|
|
162
|
+
await fs.mkdir(path.dirname(VERSION_FILE), { recursive: true });
|
|
163
|
+
await fs.writeFile(VERSION_FILE, versionContent, 'utf-8');
|
|
164
|
+
console.log(chalk.green(`\nā
Updated version file: ${commit.substring(0, 7)}`));
|
|
165
|
+
} catch (error) {
|
|
166
|
+
console.error(chalk.red('ā Failed to update version file:'), error.message);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Main update process
|
|
172
|
+
*/
|
|
173
|
+
async function main() {
|
|
174
|
+
console.log(chalk.bold.cyan('\nš Agency-Agents Update Script\n'));
|
|
175
|
+
|
|
176
|
+
if (isDryRun) {
|
|
177
|
+
console.log(chalk.yellow('š DRY RUN MODE - No changes will be applied\n'));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Step 1: Get current version
|
|
181
|
+
const currentCommit = await getCurrentVersion();
|
|
182
|
+
if (currentCommit) {
|
|
183
|
+
console.log(chalk.dim(`Current version: ${currentCommit.substring(0, 7)}\n`));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Step 2: Clone/update repository
|
|
187
|
+
const { commit: latestCommit, commitDate } = await cloneOrUpdateRepo();
|
|
188
|
+
|
|
189
|
+
// Step 3: Compare versions
|
|
190
|
+
const { hasUpdates, isFirstTime } = await compareVersions(currentCommit, latestCommit);
|
|
191
|
+
|
|
192
|
+
if (!hasUpdates && !isForce) {
|
|
193
|
+
console.log(chalk.green('\n⨠No updates needed!\n'));
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (isForce) {
|
|
198
|
+
console.log(chalk.yellow('\nā ļø FORCE mode - updating anyway\n'));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (isDryRun) {
|
|
202
|
+
console.log(chalk.yellow('\nš DRY RUN - Would have updated to:'));
|
|
203
|
+
console.log(chalk.dim(` Commit: ${latestCommit.substring(0, 7)}`));
|
|
204
|
+
console.log(chalk.dim(` Date: ${commitDate}`));
|
|
205
|
+
console.log(chalk.yellow('\nRun without --dry-run to apply updates.\n'));
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Step 4: Run conversion
|
|
210
|
+
const success = await runConversion();
|
|
211
|
+
|
|
212
|
+
if (!success) {
|
|
213
|
+
console.error(chalk.red('\nā Update failed during conversion\n'));
|
|
214
|
+
process.exit(1);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Step 5: Update version file
|
|
218
|
+
await updateVersionFile(latestCommit, commitDate);
|
|
219
|
+
|
|
220
|
+
// Step 6: Show summary
|
|
221
|
+
console.log(chalk.green.bold('\nā
Update Complete!\n'));
|
|
222
|
+
console.log(chalk.white('Next steps:'));
|
|
223
|
+
console.log(chalk.dim(' 1. Review changes: git status'));
|
|
224
|
+
console.log(chalk.dim(' 2. Test converted templates'));
|
|
225
|
+
console.log(chalk.dim(' 3. Commit: git add . && git commit -m "chore: Update Agency-Agents templates"'));
|
|
226
|
+
console.log(chalk.dim(' 4. Push: git push origin main\n'));
|
|
227
|
+
|
|
228
|
+
// Cleanup
|
|
229
|
+
try {
|
|
230
|
+
await fs.rm(TEMP_DIR, { recursive: true, force: true });
|
|
231
|
+
} catch {}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Run if called directly
|
|
235
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
236
|
+
main().catch(error => {
|
|
237
|
+
console.error(chalk.red('\nš„ Fatal error:'), error);
|
|
238
|
+
process.exit(1);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { main };
|