expxagents 0.2.1 → 0.3.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.
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import crypto from 'crypto';
4
- import { getTemplateDir } from '../utils/config.js';
4
+ import { getTemplateDir, getAssetsDir } from '../utils/config.js';
5
5
  function getDefaultTemplate(file) {
6
6
  if (file === 'company.md') {
7
7
  return `<!-- NOT CONFIGURED -->
@@ -61,6 +61,171 @@ function getDefaultTemplate(file) {
61
61
  }
62
62
  return '';
63
63
  }
64
+ /**
65
+ * Recursively copy a directory, skipping .DS_Store files.
66
+ */
67
+ function copyDirRecursive(src, dest) {
68
+ if (!fs.existsSync(src))
69
+ return;
70
+ fs.mkdirSync(dest, { recursive: true });
71
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
72
+ if (entry.name === '.DS_Store')
73
+ continue;
74
+ const srcPath = path.join(src, entry.name);
75
+ const destPath = path.join(dest, entry.name);
76
+ if (entry.isDirectory()) {
77
+ copyDirRecursive(srcPath, destPath);
78
+ }
79
+ else {
80
+ fs.copyFileSync(srcPath, destPath);
81
+ }
82
+ }
83
+ }
84
+ const SKILL_MD = `---
85
+ name: expxagents
86
+ description: "ExpxAgents \u2014 Multi-agent orchestration platform. Create and run AI squads with 93 specialized agents across 16 sectors."
87
+ ---
88
+
89
+ # ExpxAgents \u2014 Multi-Agent Orchestration
90
+
91
+ You are now operating as the ExpxAgents system. Your primary role is to help users create, manage, and run AI agent squads.
92
+
93
+ ## Initialization
94
+
95
+ On activation, perform these steps IN ORDER:
96
+
97
+ 1. Read the company context: \`_expxagents/_memory/company.md\`
98
+ 2. Read preferences: \`_expxagents/_memory/preferences.md\`
99
+ 3. If company.md contains \`<!-- NOT CONFIGURED -->\` \u2192 trigger ONBOARDING
100
+ 4. Otherwise \u2192 display MAIN MENU
101
+
102
+ ## Onboarding Flow (first time only)
103
+
104
+ If company.md is not configured:
105
+
106
+ 1. Welcome the user to ExpxAgents
107
+ 2. Ask their name and preferred language
108
+ 3. Ask company name, website URL, sector, description
109
+ 4. If URL provided, use WebFetch + WebSearch to research the company
110
+ 5. Present findings for confirmation
111
+ 6. Save to \`_expxagents/_memory/company.md\` and \`_expxagents/_memory/preferences.md\`
112
+ 7. Show main menu
113
+
114
+ ## Main Menu
115
+
116
+ Present using AskUserQuestion with 2-4 options:
117
+
118
+ **Primary menu:**
119
+ - **Create a new squad** \u2014 Describe what you need and I'll design a squad
120
+ - **Run a squad** \u2014 Execute an existing squad's pipeline
121
+ - **My squads** \u2014 List, edit, or delete squads
122
+ - **More options** \u2014 Skills, company profile, settings
123
+
124
+ **More options submenu:**
125
+ - **Skills** \u2014 Browse, install, or create skills
126
+ - **Company profile** \u2014 View or edit company info
127
+ - **Settings** \u2014 Language, IDE, preferences
128
+
129
+ ## Command Routing
130
+
131
+ | Command | Action |
132
+ |---------|--------|
133
+ | \`/expxagents\` | Show main menu |
134
+ | \`/expxagents create [description]\` | Load Solution Architect \u2192 Design squad |
135
+ | \`/expxagents run <name>\` | Load Release Manager \u2192 Execute pipeline |
136
+ | \`/expxagents list\` | List squads from \`squads/\` directory |
137
+ | \`/expxagents edit <name>\` | Load Solution Architect \u2192 Edit mode |
138
+ | \`/expxagents skills\` | Load Skills Engine \u2192 Show menu |
139
+ | \`/expxagents install <name>\` | Install skill from catalog |
140
+ | \`/expxagents uninstall <name>\` | Remove installed skill |
141
+ | \`/expxagents delete <name>\` | Confirm and delete squad |
142
+ | \`/expxagents dashboard\` | Start server + open dashboard |
143
+ | \`/expxagents help\` | Show help text |
144
+
145
+ ## Loading Agents
146
+
147
+ When a core agent needs to be activated:
148
+
149
+ 1. **Solution Architect:** Read \`_expxagents/core/solution-architect.agent.md\`
150
+ 2. **Release Manager:** Read \`_expxagents/core/runner.pipeline.md\`
151
+ 3. **Skills Engine:** Read \`_expxagents/core/skills.engine.md\`
152
+ 4. **Insight Hunter:** Read \`_expxagents/core/prompts/insight-hunter.prompt.md\`
153
+
154
+ Adopt the agent's persona and follow its instructions completely.
155
+
156
+ ## Agent Catalog
157
+
158
+ The full agent catalog is at \`agents/_catalog.yaml\`. Read it to see all available agents organized by sector:
159
+
160
+ - **Core (4):** solution-architect, release-manager, platform-engineer, insight-hunter
161
+ - **Development (18):** tech-lead, qa-engineer, devops-engineer, code-reviewer, backend-developer, frontend-developer, ux-design-expert, product-manager, ux-designer, business-analyst, scrum-master, dba, security-analyst, tech-writer, desktop-developer, ios-developer, android-developer, cross-platform-mobile
162
+ - **Implantation (5):** deployment-manager, environment-specialist, migration-specialist, integration-specialist, go-live-coordinator
163
+ - **Support (5):** l1-support, l2-support, l3-support, knowledge-base-manager, sla-monitor
164
+ - **Training (4):** training-designer, onboarding-coach, assessment-creator, workshop-facilitator
165
+ - **Finance (4):** billing-analyst, financial-controller, accounts-manager, budget-planner
166
+ - **HR (6):** recruiter, interview-coordinator, hr-onboarding, performance-analyst, benefits-manager, people-culture
167
+ - **Customer Success (5):** csm, churn-prevention, expansion-manager, nps-analyst, renewal-manager
168
+ - **Administrative (4):** procurement-specialist, document-controller, office-manager, process-documentation-officer
169
+ - **Marketing (8):** content-creator, seo-specialist, social-media-manager, email-marketing, paid-ads-manager, marketing-analyst, brand-guardian, landing-page-builder
170
+ - **Commercial (5):** sdr, account-executive, proposal-writer, crm-manager, pricing-strategist
171
+ - **R&D (5):** market-researcher, innovation-scout, prototype-builder, benchmark-analyst, product-analyst
172
+ - **Board (6):** strategic-advisor, okr-manager, board-report-writer, risk-analyst, governance-officer, business-intelligence
173
+ - **Accounting (6):** accountant, tax-compliance, fiscal-analyst, payroll-specialist, audit-analyst, financial-reporting
174
+ - **Legal (4):** contract-manager, legal-counsel, ip-specialist, labor-attorney
175
+ - **Compliance (4):** compliance-officer, data-privacy-specialist, regulatory-monitor, internal-auditor
176
+
177
+ When creating squads, use these agent templates as base for squad agents.
178
+
179
+ ## Best Practices
180
+
181
+ Best-practice guides are at \`_expxagents/core/best-practices/\`. Read the catalog at \`_expxagents/core/best-practices/_catalog.yaml\` for available formats (landing-page, blog-post, email-sales, etc.).
182
+
183
+ ## Running a Squad
184
+
185
+ 1. Read \`squads/<name>/squad.yaml\`
186
+ 2. Read \`squads/<name>/squad-party.csv\` (if exists)
187
+ 3. Load company context from \`_expxagents/_memory/company.md\`
188
+ 4. Load squad memory from \`squads/<name>/_memory/memories.md\`
189
+ 5. Read runner instructions from \`_expxagents/core/runner.pipeline.md\`
190
+ 6. Execute pipeline step by step
191
+
192
+ ## Language
193
+
194
+ - Read preferences for user's language
195
+ - All output in user's language
196
+ - File names and code in English
197
+
198
+ ## Help Text
199
+
200
+ \`\`\`
201
+ ExpxAgents \u2014 Multi-Agent Orchestration
202
+
203
+ SQUADS
204
+ /expxagents create Design a new squad
205
+ /expxagents run <name> Execute a squad pipeline
206
+ /expxagents list List all squads
207
+ /expxagents edit <name> Modify a squad
208
+ /expxagents delete <name> Delete a squad
209
+
210
+ SKILLS
211
+ /expxagents skills Browse skills
212
+ /expxagents install Install a skill
213
+ /expxagents uninstall Remove a skill
214
+
215
+ SETTINGS
216
+ /expxagents dashboard Open virtual office
217
+ /expxagents help Show this help
218
+ \`\`\`
219
+
220
+ ## Critical Rules
221
+
222
+ - NEVER skip onboarding if company.md is not configured
223
+ - ALWAYS load company context before squad operations
224
+ - ALWAYS present checkpoints to user \u2014 never skip them
225
+ - ALWAYS save outputs and update squad memories
226
+ - When switching agent personas, indicate who is speaking
227
+ - AskUserQuestion must always have 2-4 options
228
+ `;
64
229
  export async function initCommand() {
65
230
  const cwd = process.cwd();
66
231
  console.log('Initializing ExpxAgents project...\n');
@@ -102,6 +267,38 @@ export async function initCommand() {
102
267
  console.log(` _expxagents/_memory/${file} already exists`);
103
268
  }
104
269
  }
270
+ // Copy core agents from package assets
271
+ const assetsDir = getAssetsDir();
272
+ const coreSrc = path.join(assetsDir, 'core');
273
+ const coreDest = path.join(cwd, '_expxagents', 'core');
274
+ if (!fs.existsSync(coreDest)) {
275
+ copyDirRecursive(coreSrc, coreDest);
276
+ console.log(' Copied _expxagents/core/ (core agents + best practices)');
277
+ }
278
+ else {
279
+ console.log(' _expxagents/core/ already exists');
280
+ }
281
+ // Copy agent catalog from package assets
282
+ const agentsSrc = path.join(assetsDir, 'agents');
283
+ const agentsDest = path.join(cwd, 'agents');
284
+ if (!fs.existsSync(agentsDest)) {
285
+ copyDirRecursive(agentsSrc, agentsDest);
286
+ console.log(' Copied agents/ (93 agent templates across 16 sectors)');
287
+ }
288
+ else {
289
+ console.log(' agents/ already exists');
290
+ }
291
+ // Create Claude Code skill (.claude/skills/expxagents/SKILL.md)
292
+ const skillDir = path.join(cwd, '.claude', 'skills', 'expxagents');
293
+ const skillPath = path.join(skillDir, 'SKILL.md');
294
+ if (!fs.existsSync(skillPath)) {
295
+ fs.mkdirSync(skillDir, { recursive: true });
296
+ fs.writeFileSync(skillPath, SKILL_MD, 'utf-8');
297
+ console.log(' Created .claude/skills/expxagents/SKILL.md (enables /expxagents command)');
298
+ }
299
+ else {
300
+ console.log(' .claude/skills/expxagents/SKILL.md already exists');
301
+ }
105
302
  // Create squads/_memory/ subdirectory
106
303
  const squadsMemoryDir = path.join(cwd, 'squads', '_memory');
107
304
  if (!fs.existsSync(squadsMemoryDir)) {
@@ -161,4 +358,5 @@ BRIDGE_TIMEOUT_MS=300000
161
358
  console.log(' Created .gitignore');
162
359
  }
163
360
  console.log('\nProject initialized! Run `expxagents onboarding` to configure your profile.');
361
+ console.log('Use /expxagents in Claude Code to get started.');
164
362
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expxagents",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Multi-agent orchestration platform for AI squads",
5
5
  "author": "ExpxAgents",
6
6
  "license": "MIT",