create-byan-agent 2.4.4 β†’ 2.4.6

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/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.4.5] - 2026-02-12
11
+
12
+ ### πŸ› Fixed - Copilot CLI Auth Command
13
+
14
+ **Problem:** Auth check used `gh auth status` instead of `copilot --version`. GitHub CLI (gh) is separate from Copilot CLI.
15
+
16
+ **Fix:**
17
+ - Auth check: `gh` β†’ `copilot --version`
18
+ - Login instruction: `gh auth login` β†’ `copilot auth`
19
+
20
+ ---
21
+
10
22
  ## [2.4.4] - 2026-02-11
11
23
 
12
24
  ### πŸ› Fixed - Config Prompt Scope Bug
@@ -327,23 +327,157 @@ async function install() {
327
327
  console.log('');
328
328
 
329
329
  // Step 2.8: Installation mode selection
330
- const { installMode } = await inquirer.prompt([
330
+ const { installMode: initialInstallMode } = await inquirer.prompt([
331
331
  {
332
332
  type: 'list',
333
333
  name: 'installMode',
334
334
  message: 'Choose installation mode:',
335
335
  choices: [
336
336
  { name: 'πŸš€ AUTO - Quick install with smart defaults (Recommended)', value: 'auto' },
337
- { name: '🎯 CUSTOM - Guided interview with personalized recommendations', value: 'custom' }
337
+ { name: '🎯 CUSTOM - Guided interview with personalized recommendations', value: 'custom' },
338
+ { name: 'πŸ“‹ MANUAL - Choose agents individually from the full catalog', value: 'manual' }
338
339
  ],
339
340
  default: 'auto'
340
341
  }
341
342
  ]);
342
343
 
344
+ let installMode = initialInstallMode;
345
+
343
346
  let interviewResults = null;
344
347
  let interviewAnswers = null;
348
+ let manualSelection = null;
349
+
350
+ // Step 2.9a: MANUAL mode - Full agent catalog selection by platform
351
+ if (installMode === 'manual') {
352
+ console.log('');
353
+ console.log(chalk.blue('╔════════════════════════════════════════════════════════════╗'));
354
+ console.log(chalk.blue('β•‘ β•‘'));
355
+ console.log(chalk.blue('β•‘ πŸ“‹ MANUAL MODE - Agent Catalog Selection β•‘'));
356
+ console.log(chalk.blue('β•‘ Choose your agents from the full BYAN catalog β•‘'));
357
+ console.log(chalk.blue('β•‘ β•‘'));
358
+ console.log(chalk.blue('β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•'));
359
+ console.log('');
360
+
361
+ // Step 1: Select target platform(s)
362
+ const availableManualPlatforms = [];
363
+ if (detectedPlatforms.copilot) availableManualPlatforms.push({ name: 'πŸ€– GitHub Copilot CLI (agents: .github/agents/)', value: 'copilot' });
364
+ if (detectedPlatforms.codex) availableManualPlatforms.push({ name: 'πŸ”· OpenAI Codex (skills: .codex/prompts/)', value: 'codex' });
365
+ if (detectedPlatforms.claude) availableManualPlatforms.push({ name: '🧠 Claude Code (rules: .claude/)', value: 'claude' });
366
+
367
+ // Always allow manual selection even if not detected
368
+ if (!detectedPlatforms.copilot) availableManualPlatforms.push({ name: 'πŸ€– GitHub Copilot CLI (not detected)', value: 'copilot' });
369
+ if (!detectedPlatforms.codex) availableManualPlatforms.push({ name: 'πŸ”· OpenAI Codex (not detected)', value: 'codex' });
370
+ if (!detectedPlatforms.claude) availableManualPlatforms.push({ name: '🧠 Claude Code (not detected)', value: 'claude' });
371
+
372
+ const { manualPlatforms } = await inquirer.prompt([{
373
+ type: 'checkbox',
374
+ name: 'manualPlatforms',
375
+ message: 'Select target platform(s):',
376
+ choices: availableManualPlatforms,
377
+ validate: (a) => a.length > 0 ? true : 'Select at least one platform'
378
+ }]);
379
+
380
+ // Step 2: Show agent catalog grouped by category (module + role)
381
+ console.log('');
382
+ console.log(chalk.cyan('πŸ“¦ Agent Catalog'));
383
+ console.log(chalk.gray(' Hermes (dispatcher) is always installed - it routes tasks to the right agent.'));
384
+ console.log(chalk.gray(' Agents are organized by role: Workflow, Context, and Worker.'));
385
+ console.log('');
386
+
387
+ // Agent catalog with categories and roles
388
+ const AGENT_CATALOG = {
389
+ 'Core - Dispatcher (always installed)': [
390
+ { name: 'hermes', label: 'Hermes - Universal Dispatcher (routes all tasks)', checked: true, disabled: 'required' }
391
+ ],
392
+ 'Core - Platform Specialists': (() => {
393
+ const specialists = [];
394
+ if (manualPlatforms.includes('copilot')) specialists.push({ name: 'marc', label: 'Marc - GitHub Copilot CLI Specialist [workflow agent]', checked: true });
395
+ if (manualPlatforms.includes('claude')) specialists.push({ name: 'claude', label: 'Claude - Claude Code Integration Specialist [workflow agent]', checked: true });
396
+ if (manualPlatforms.includes('codex')) specialists.push({ name: 'codex', label: 'Codex - OpenCode/Codex Integration Specialist [workflow agent]', checked: true });
397
+ return specialists;
398
+ })(),
399
+ 'Core - System Agents': [
400
+ { name: 'bmad-master', label: 'BMad Master - Platform Orchestrator [context agent]', checked: false },
401
+ { name: 'expert-merise-agile', label: 'Expert Merise Agile - Conception & Modeling [context agent]', checked: false }
402
+ ],
403
+ 'BMB - Builder Agents (meta-system)': [
404
+ { name: 'byan', label: 'BYAN - Agent Creator (intelligent interview) [workflow agent]', checked: false },
405
+ { name: 'agent-builder', label: 'Bond - Agent Architecture Specialist [worker]', checked: false },
406
+ { name: 'module-builder', label: 'Morgan - Module Creation Master [worker]', checked: false },
407
+ { name: 'workflow-builder', label: 'Wendy - Workflow Building Master [worker]', checked: false },
408
+ { name: 'rachid', label: 'Rachid - NPM/NPX Deployment Expert [worker]', checked: false },
409
+ { name: 'drawio', label: 'DrawIO - Technical Diagrams Expert [worker]', checked: false },
410
+ { name: 'turbo-whisper-integration', label: 'Turbo Whisper - Voice Dictation Integration [worker]', checked: false }
411
+ ],
412
+ 'BMM - Software Development Lifecycle': [
413
+ { name: 'analyst', label: 'Mary - Business Analyst [workflow agent]', checked: false },
414
+ { name: 'pm', label: 'John - Product Manager [workflow agent]', checked: false },
415
+ { name: 'architect', label: 'Winston - System Architect [workflow agent]', checked: false },
416
+ { name: 'dev', label: 'Amelia - Developer Agent [worker]', checked: false },
417
+ { name: 'sm', label: 'Bob - Scrum Master [workflow agent]', checked: false },
418
+ { name: 'quinn', label: 'Quinn - QA Engineer [worker]', checked: false },
419
+ { name: 'ux-designer', label: 'Sally - UX Designer [context agent]', checked: false },
420
+ { name: 'tech-writer', label: 'Paige - Technical Writer [worker]', checked: false },
421
+ { name: 'quick-flow-solo-dev', label: 'Barry - Quick Flow Solo Dev [workflow agent]', checked: false }
422
+ ],
423
+ 'TEA - Test Architecture': [
424
+ { name: 'tea', label: 'Murat - Master Test Architect [workflow agent]', checked: false }
425
+ ],
426
+ 'CIS - Creative Innovation & Strategy': [
427
+ { name: 'brainstorming-coach', label: 'Carson - Brainstorming Coach [workflow agent]', checked: false },
428
+ { name: 'creative-problem-solver', label: 'Dr. Quinn - Problem Solver [workflow agent]', checked: false },
429
+ { name: 'design-thinking-coach', label: 'Maya - Design Thinking Coach [workflow agent]', checked: false },
430
+ { name: 'innovation-strategist', label: 'Victor - Innovation Strategist [context agent]', checked: false },
431
+ { name: 'presentation-master', label: 'Caravaggio - Presentation Expert [worker]', checked: false },
432
+ { name: 'storyteller', label: 'Sophia - Master Storyteller [worker]', checked: false }
433
+ ],
434
+ 'Utility Agents': [
435
+ { name: 'patnote', label: 'Patnote - Update Manager & Conflict Resolution [worker]', checked: false },
436
+ { name: 'carmack', label: 'Carmack - Token Optimizer [worker]', checked: false }
437
+ ]
438
+ };
439
+
440
+ // Build inquirer choices from catalog
441
+ const agentChoices = [];
442
+ for (const [category, agents] of Object.entries(AGENT_CATALOG)) {
443
+ if (agents.length === 0) continue;
444
+ agentChoices.push(new inquirer.Separator(`\n --- ${category} ---`));
445
+ for (const agent of agents) {
446
+ agentChoices.push({
447
+ name: `${agent.label}`,
448
+ value: agent.name,
449
+ checked: agent.checked,
450
+ disabled: agent.disabled || false
451
+ });
452
+ }
453
+ }
454
+
455
+ const { selectedAgents } = await inquirer.prompt([{
456
+ type: 'checkbox',
457
+ name: 'selectedAgents',
458
+ message: 'Select agents to install (space to toggle, enter to confirm):',
459
+ choices: agentChoices,
460
+ pageSize: 30,
461
+ validate: (a) => a.length > 0 ? true : 'Select at least one agent'
462
+ }]);
463
+
464
+ // Ensure hermes is always included
465
+ const finalAgents = [...new Set(['hermes', ...selectedAgents])];
466
+
467
+ manualSelection = {
468
+ platforms: manualPlatforms,
469
+ agents: finalAgents
470
+ };
471
+
472
+ console.log('');
473
+ console.log(chalk.cyan('πŸ“‹ Manual Selection Summary:'));
474
+ console.log(chalk.green(` Platforms: ${manualPlatforms.join(', ')}`));
475
+ console.log(chalk.green(` Agents (${finalAgents.length}): ${finalAgents.join(', ')}`));
476
+ console.log(chalk.gray(` Roles: dispatcher=hermes, workflow/context/worker agents selected`));
477
+ console.log('');
478
+ }
345
479
 
346
- // Step 2.9: Intelligent Interview (if CUSTOM mode) - Delegate to Yanstaller Agent
480
+ // Step 2.9b: Intelligent Interview (if CUSTOM mode) - Delegate to Yanstaller Agent
347
481
  if (installMode === 'custom') {
348
482
  console.log('');
349
483
  console.log(chalk.blue('╔════════════════════════════════════════════════════════════╗'));
@@ -716,11 +850,11 @@ async function install() {
716
850
  if (isWindows) spawnOpts.shell = true;
717
851
 
718
852
  if (selectedPlatform === 'copilot') {
719
- // gh auth status returns non-zero if not logged in
720
- authCheckCmd = 'gh';
721
- authCheckArgs = ['auth', 'status'];
853
+ // copilot --version to check if CLI is available
854
+ authCheckCmd = 'copilot';
855
+ authCheckArgs = ['--version'];
722
856
  loginInstructions = [
723
- `${chalk.cyan('gh auth login')}`
857
+ `${chalk.cyan('copilot auth')}`
724
858
  ];
725
859
  } else if (selectedPlatform === 'codex') {
726
860
  // codex --version as basic check (no auth status command available)
@@ -761,7 +895,7 @@ async function install() {
761
895
 
762
896
  let loginInstructions;
763
897
  if (selectedPlatform === 'copilot') {
764
- loginInstructions = [`${chalk.cyan('gh auth login')}`];
898
+ loginInstructions = [`${chalk.cyan('copilot auth')}`];
765
899
  } else if (selectedPlatform === 'codex') {
766
900
  loginInstructions = [`${chalk.cyan('codex login')}`];
767
901
  } else if (selectedPlatform === 'claude') {
@@ -880,30 +1014,41 @@ async function install() {
880
1014
  autoSelectPlatform = recommendedPlatforms[0] || 'copilot';
881
1015
  }
882
1016
 
883
- // Step 3: Platform selection (pre-select detected platforms)
884
- const platformChoices = [
885
- { name: `GitHub Copilot CLI ${detectedPlatforms.copilot ? chalk.green('(βœ“ Detected)') : ''}`, value: 'copilot' },
886
- { name: `VSCode`, value: 'vscode' },
887
- { name: `Claude Code ${detectedPlatforms.claude ? chalk.green('(βœ“ Detected)') : ''}`, value: 'claude' },
888
- { name: `Codex ${detectedPlatforms.codex ? chalk.green('(βœ“ Detected)') : ''}`, value: 'codex' },
889
- { name: 'All platforms', value: 'all' }
890
- ];
891
-
892
- // Auto-select first detected platform as default (or use interview recommendation)
893
- const defaultPlatform = (installMode === 'custom' && autoSelectPlatform) ? autoSelectPlatform :
894
- (detectedPlatforms.copilot ? 'copilot' :
895
- detectedPlatforms.codex ? 'codex' :
896
- detectedPlatforms.claude ? 'claude' : 'copilot');
1017
+ // Step 3: Platform selection (skip in MANUAL mode - already selected)
1018
+ let platform;
897
1019
 
898
- const { platform } = await inquirer.prompt([
899
- {
900
- type: 'list',
901
- name: 'platform',
902
- message: installMode === 'custom' ? 'Confirmer la plateforme (recommandation ci-dessus):' : 'Select platform to install for:',
903
- choices: platformChoices,
904
- default: defaultPlatform
905
- }
906
- ]);
1020
+ if (installMode === 'manual' && manualSelection) {
1021
+ // In MANUAL mode, use the first selected platform as primary
1022
+ // (all selected platforms will be used for stub generation)
1023
+ platform = manualSelection.platforms.length === 1 ? manualSelection.platforms[0] : 'all';
1024
+ console.log(chalk.cyan(`πŸ“¦ Platform(s): ${manualSelection.platforms.join(', ')} (from manual selection)`));
1025
+ console.log('');
1026
+ } else {
1027
+ const platformChoices = [
1028
+ { name: `GitHub Copilot CLI ${detectedPlatforms.copilot ? chalk.green('(βœ“ Detected)') : ''}`, value: 'copilot' },
1029
+ { name: `VSCode`, value: 'vscode' },
1030
+ { name: `Claude Code ${detectedPlatforms.claude ? chalk.green('(βœ“ Detected)') : ''}`, value: 'claude' },
1031
+ { name: `Codex ${detectedPlatforms.codex ? chalk.green('(βœ“ Detected)') : ''}`, value: 'codex' },
1032
+ { name: 'All platforms', value: 'all' }
1033
+ ];
1034
+
1035
+ // Auto-select first detected platform as default (or use interview recommendation)
1036
+ const defaultPlatform = (installMode === 'custom' && autoSelectPlatform) ? autoSelectPlatform :
1037
+ (detectedPlatforms.copilot ? 'copilot' :
1038
+ detectedPlatforms.codex ? 'codex' :
1039
+ detectedPlatforms.claude ? 'claude' : 'copilot');
1040
+
1041
+ const platformAnswer = await inquirer.prompt([
1042
+ {
1043
+ type: 'list',
1044
+ name: 'platform',
1045
+ message: installMode === 'custom' ? 'Confirmer la plateforme (recommandation ci-dessus):' : 'Select platform to install for:',
1046
+ choices: platformChoices,
1047
+ default: defaultPlatform
1048
+ }
1049
+ ]);
1050
+ platform = platformAnswer.platform;
1051
+ }
907
1052
 
908
1053
  // Step 5: Install v2.0 structure (if available)
909
1054
  let v2Installed = false;
@@ -983,6 +1128,8 @@ async function install() {
983
1128
  const byanDir = path.join(projectRoot, '_byan');
984
1129
  const bmbDir = path.join(byanDir, 'bmb');
985
1130
  const githubAgentsDir = path.join(projectRoot, '.github', 'agents');
1131
+ const isManual = installMode === 'manual' && manualSelection;
1132
+ const manualPlatformList = isManual ? manualSelection.platforms : [];
986
1133
 
987
1134
  await fs.ensureDir(path.join(byanDir, 'bmb', 'agents'));
988
1135
  await fs.ensureDir(path.join(byanDir, 'bmb', 'workflows', 'byan', 'steps'));
@@ -992,10 +1139,15 @@ async function install() {
992
1139
  await fs.ensureDir(path.join(byanDir, '_config'));
993
1140
  await fs.ensureDir(path.join(byanDir, '_memory'));
994
1141
  await fs.ensureDir(path.join(byanDir, '_output'));
995
- await fs.ensureDir(githubAgentsDir);
996
- if (detectedPlatforms.claude || platform === 'claude' || platform === 'all') {
997
- await fs.ensureDir(path.join(projectRoot, '.claude', 'rules'));
998
- }
1142
+
1143
+ // Create platform directories based on selection
1144
+ const needsCopilot = isManual ? manualPlatformList.includes('copilot') : true;
1145
+ const needsClaude = isManual ? manualPlatformList.includes('claude') : (detectedPlatforms.claude || platform === 'claude' || platform === 'all');
1146
+ const needsCodex = isManual ? manualPlatformList.includes('codex') : (detectedPlatforms.codex || platform === 'codex' || platform === 'all');
1147
+
1148
+ if (needsCopilot) await fs.ensureDir(githubAgentsDir);
1149
+ if (needsClaude) await fs.ensureDir(path.join(projectRoot, '.claude', 'rules'));
1150
+ if (needsCodex) await fs.ensureDir(path.join(projectRoot, '.codex', 'prompts'));
999
1151
 
1000
1152
  installSpinner.succeed('Directory structure created');
1001
1153
 
@@ -1003,7 +1155,7 @@ async function install() {
1003
1155
  const copySpinner = ora('Installing BYAN platform files...').start();
1004
1156
 
1005
1157
  try {
1006
- // Copy agent files
1158
+ // Copy agent files (core agent definitions)
1007
1159
  const agentsSource = path.join(templateDir, '_byan', 'bmb', 'agents');
1008
1160
  const agentsDest = path.join(bmbDir, 'agents');
1009
1161
 
@@ -1045,27 +1197,130 @@ async function install() {
1045
1197
  copySpinner.warn(`⚠ Workflow source not found: ${workflowsSource}`);
1046
1198
  }
1047
1199
 
1048
- // Copy .github/agents files
1049
- const githubAgentsSource = path.join(templateDir, '.github', 'agents');
1050
-
1051
- if (await fs.pathExists(githubAgentsSource)) {
1052
- await fs.copy(githubAgentsSource, githubAgentsDir, { overwrite: true });
1053
- copySpinner.text = 'Copied Copilot CLI agent stubs...';
1054
- console.log(chalk.green(` βœ“ GitHub agents: ${githubAgentsSource} β†’ ${githubAgentsDir}`));
1200
+ // MANUAL mode: Generate stubs only for selected agents on each selected platform
1201
+ if (isManual && manualSelection) {
1202
+ const selectedAgents = manualSelection.agents;
1203
+
1204
+ // Agent name to stub filename mapping (must match existing templates)
1205
+ const AGENT_STUB_MAP = {
1206
+ 'hermes': 'hermes',
1207
+ 'franck': 'franck',
1208
+ 'expert-merise-agile': 'expert-merise-agile',
1209
+ 'bmad-master': 'bmad-agent-bmad-master',
1210
+ // BMB agents
1211
+ 'byan': 'bmad-agent-byan',
1212
+ 'agent-builder': 'bmad-agent-bmb-agent-builder',
1213
+ 'module-builder': 'bmad-agent-bmb-module-builder',
1214
+ 'workflow-builder': 'bmad-agent-bmb-workflow-builder',
1215
+ 'marc': 'bmad-agent-marc',
1216
+ 'rachid': 'bmad-agent-rachid',
1217
+ 'claude': 'bmad-agent-claude',
1218
+ 'codex': 'bmad-agent-codex',
1219
+ 'drawio': 'bmad-agent-drawio',
1220
+ 'turbo-whisper-integration': 'bmad-agent-turbo-whisper-integration',
1221
+ 'patnote': 'bmad-agent-patnote',
1222
+ 'carmack': 'bmad-agent-carmack',
1223
+ // BMM agents
1224
+ 'analyst': 'bmad-agent-bmm-analyst',
1225
+ 'pm': 'bmad-agent-bmm-pm',
1226
+ 'architect': 'bmad-agent-bmm-architect',
1227
+ 'dev': 'bmad-agent-bmm-dev',
1228
+ 'sm': 'bmad-agent-bmm-sm',
1229
+ 'quinn': 'bmad-agent-bmm-quinn',
1230
+ 'ux-designer': 'bmad-agent-bmm-ux-designer',
1231
+ 'tech-writer': 'bmad-agent-bmm-tech-writer',
1232
+ 'quick-flow-solo-dev': 'bmad-agent-bmm-quick-flow-solo-dev',
1233
+ // TEA
1234
+ 'tea': 'bmad-agent-tea-tea',
1235
+ // CIS agents
1236
+ 'brainstorming-coach': 'bmad-agent-cis-brainstorming-coach',
1237
+ 'creative-problem-solver': 'bmad-agent-cis-creative-problem-solver',
1238
+ 'design-thinking-coach': 'bmad-agent-cis-design-thinking-coach',
1239
+ 'innovation-strategist': 'bmad-agent-cis-innovation-strategist',
1240
+ 'presentation-master': 'bmad-agent-cis-presentation-master',
1241
+ 'storyteller': 'bmad-agent-cis-storyteller'
1242
+ };
1243
+ const agentToStubName = (agentName) => AGENT_STUB_MAP[agentName] || `bmad-agent-${agentName}`;
1244
+
1245
+ // --- COPILOT: Copy matching .github/agents/ stubs ---
1246
+ if (manualPlatformList.includes('copilot')) {
1247
+ const githubAgentsSource = path.join(templateDir, '.github', 'agents');
1248
+ let copilotCount = 0;
1249
+
1250
+ if (await fs.pathExists(githubAgentsSource)) {
1251
+ for (const agentName of selectedAgents) {
1252
+ const stubName = agentToStubName(agentName);
1253
+ const sourceFile = path.join(githubAgentsSource, `${stubName}.md`);
1254
+ const destFile = path.join(githubAgentsDir, `${stubName}.md`);
1255
+
1256
+ if (await fs.pathExists(sourceFile)) {
1257
+ await fs.copy(sourceFile, destFile, { overwrite: true });
1258
+ copilotCount++;
1259
+ } else {
1260
+ // Generate stub if no template exists
1261
+ const stubContent = `---\nname: "${stubName}"\ndescription: "${agentName} agent from BYAN platform"\n---\n\nYou must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.\n\n<agent-activation CRITICAL="TRUE">\n1. LOAD the FULL agent file from {project-root}/_bmad/*/agents/${agentName}.md\n2. READ its entire contents - this contains the complete agent persona, menu, and instructions\n3. FOLLOW every step in the <activation> section precisely\n4. DISPLAY the welcome/greeting as instructed\n5. PRESENT the numbered menu\n6. WAIT for user input before proceeding\n</agent-activation>\n`;
1262
+ await fs.writeFile(destFile, stubContent, 'utf8');
1263
+ copilotCount++;
1264
+ }
1265
+ }
1266
+ console.log(chalk.green(` βœ“ Copilot CLI: ${copilotCount} agent stubs β†’ .github/agents/`));
1267
+ }
1268
+ }
1269
+
1270
+ // --- CODEX: Generate .codex/prompts/ skills ---
1271
+ if (manualPlatformList.includes('codex')) {
1272
+ const codexPromptsDir = path.join(projectRoot, '.codex', 'prompts');
1273
+ let codexCount = 0;
1274
+
1275
+ for (const agentName of selectedAgents) {
1276
+ const skillName = agentName === 'hermes' ? 'hermes' : `bmad-${agentName}`;
1277
+ const skillPath = path.join(codexPromptsDir, `${skillName}.md`);
1278
+ const skillContent = `# ${agentName} Skill\n\nYou must fully embody this agent's persona and follow all activation instructions exactly as specified.\n\n<agent-activation CRITICAL="TRUE">\n1. LOAD the FULL agent file from {project-root}/_bmad/*/agents/${agentName}.md\n2. READ its entire contents - this contains the complete agent persona, menu, and instructions\n3. FOLLOW every step in the <activation> section precisely\n4. DISPLAY the welcome/greeting as instructed\n5. PRESENT the numbered menu\n6. WAIT for user input before proceeding\n</agent-activation>\n\n## Usage\ncodex skill ${skillName} [prompt]\n\n## Examples\n- codex skill ${skillName}\n- codex skill ${skillName} "help me with my project"\n`;
1279
+ await fs.writeFile(skillPath, skillContent, 'utf8');
1280
+ codexCount++;
1281
+ }
1282
+ console.log(chalk.green(` βœ“ Codex: ${codexCount} skills β†’ .codex/prompts/`));
1283
+ }
1284
+
1285
+ // --- CLAUDE: Copy rules + generate agent rules ---
1286
+ if (manualPlatformList.includes('claude')) {
1287
+ const claudeSource = path.join(templateDir, '.claude');
1288
+ const claudeDest = path.join(projectRoot, '.claude');
1289
+
1290
+ if (await fs.pathExists(claudeSource)) {
1291
+ await fs.ensureDir(path.join(claudeDest, 'rules'));
1292
+ await fs.copy(claudeSource, claudeDest, { overwrite: true });
1293
+ console.log(chalk.green(` βœ“ Claude Code: CLAUDE.md + rules/ (Hermes, agents, methodology)`));
1294
+ }
1295
+ }
1296
+
1297
+ console.log(chalk.gray(` β„Ή Agent roles: dispatcher(hermes), workflow agents, context agents, workers`));
1298
+
1055
1299
  } else {
1056
- copySpinner.warn(`⚠ GitHub agents source not found: ${githubAgentsSource}`);
1057
- }
1058
-
1059
- // Copy .claude/ files for Claude Code integration (always includes Hermes)
1060
- if (detectedPlatforms.claude || platform === 'claude' || platform === 'all') {
1061
- const claudeSource = path.join(templateDir, '.claude');
1062
- const claudeDest = path.join(projectRoot, '.claude');
1300
+ // AUTO/CUSTOM mode: Copy all platform stubs (existing behavior)
1063
1301
 
1064
- if (await fs.pathExists(claudeSource)) {
1065
- await fs.ensureDir(path.join(claudeDest, 'rules'));
1066
- await fs.copy(claudeSource, claudeDest, { overwrite: true });
1067
- copySpinner.text = 'Copied Claude Code rules + Hermes dispatcher...';
1068
- console.log(chalk.green(` βœ“ Claude Code: CLAUDE.md + rules/ (Hermes, agents, methodology)`));
1302
+ // Copy .github/agents files
1303
+ const githubAgentsSource = path.join(templateDir, '.github', 'agents');
1304
+
1305
+ if (await fs.pathExists(githubAgentsSource)) {
1306
+ await fs.copy(githubAgentsSource, githubAgentsDir, { overwrite: true });
1307
+ copySpinner.text = 'Copied Copilot CLI agent stubs...';
1308
+ console.log(chalk.green(` βœ“ GitHub agents: ${githubAgentsSource} β†’ ${githubAgentsDir}`));
1309
+ } else {
1310
+ copySpinner.warn(`⚠ GitHub agents source not found: ${githubAgentsSource}`);
1311
+ }
1312
+
1313
+ // Copy .claude/ files for Claude Code integration (always includes Hermes)
1314
+ if (needsClaude) {
1315
+ const claudeSource = path.join(templateDir, '.claude');
1316
+ const claudeDest = path.join(projectRoot, '.claude');
1317
+
1318
+ if (await fs.pathExists(claudeSource)) {
1319
+ await fs.ensureDir(path.join(claudeDest, 'rules'));
1320
+ await fs.copy(claudeSource, claudeDest, { overwrite: true });
1321
+ copySpinner.text = 'Copied Claude Code rules + Hermes dispatcher...';
1322
+ console.log(chalk.green(` βœ“ Claude Code: CLAUDE.md + rules/ (Hermes, agents, methodology)`));
1323
+ }
1069
1324
  }
1070
1325
  }
1071
1326
 
@@ -1085,10 +1340,16 @@ async function install() {
1085
1340
  communication_language: config.language,
1086
1341
  document_output_language: config.language,
1087
1342
  output_folder: "{project-root}/_byan-output",
1088
- platform: platform,
1343
+ platform: isManual ? manualSelection.platforms.join(',') : platform,
1344
+ install_mode: installMode,
1089
1345
  byan_version: v2Installed ? '2.0.0-alpha.1' : '1.0.0'
1090
1346
  };
1091
1347
 
1348
+ // Add installed agents list for MANUAL mode
1349
+ if (isManual && manualSelection) {
1350
+ configContent.installed_agents = manualSelection.agents;
1351
+ }
1352
+
1092
1353
  const configPath = path.join(bmbDir, 'config.yaml');
1093
1354
  await fs.writeFile(configPath, yaml.dump(configContent), 'utf8');
1094
1355
 
@@ -1120,17 +1381,37 @@ async function install() {
1120
1381
  { name: 'Agents directory', path: path.join(bmbDir, 'agents') },
1121
1382
  { name: 'BYAN agent', path: path.join(bmbDir, 'agents', 'byan.md') },
1122
1383
  { name: 'Workflows', path: path.join(bmbDir, 'workflows', 'byan') },
1123
- { name: 'Config', path: configPath },
1124
- { name: 'GitHub agents dir', path: githubAgentsDir }
1384
+ { name: 'Config', path: configPath }
1125
1385
  ];
1126
1386
 
1127
- // Add Claude Code checks if installed
1128
- if (detectedPlatforms.claude || platform === 'claude' || platform === 'all') {
1129
- checks.push(
1130
- { name: 'Claude CLAUDE.md', path: path.join(projectRoot, '.claude', 'CLAUDE.md') },
1131
- { name: 'Claude rules/', path: path.join(projectRoot, '.claude', 'rules') },
1132
- { name: 'Hermes dispatcher rule', path: path.join(projectRoot, '.claude', 'rules', 'hermes-dispatcher.md') }
1133
- );
1387
+ // Platform-specific checks based on installation mode
1388
+ if (isManual) {
1389
+ if (manualPlatformList.includes('copilot')) {
1390
+ checks.push({ name: 'Copilot agents dir', path: githubAgentsDir });
1391
+ checks.push({ name: 'Hermes (Copilot)', path: path.join(githubAgentsDir, 'hermes.md') });
1392
+ }
1393
+ if (manualPlatformList.includes('codex')) {
1394
+ checks.push({ name: 'Codex prompts dir', path: path.join(projectRoot, '.codex', 'prompts') });
1395
+ checks.push({ name: 'Hermes (Codex)', path: path.join(projectRoot, '.codex', 'prompts', 'hermes.md') });
1396
+ }
1397
+ if (manualPlatformList.includes('claude')) {
1398
+ checks.push(
1399
+ { name: 'Claude CLAUDE.md', path: path.join(projectRoot, '.claude', 'CLAUDE.md') },
1400
+ { name: 'Claude rules/', path: path.join(projectRoot, '.claude', 'rules') },
1401
+ { name: 'Hermes dispatcher rule', path: path.join(projectRoot, '.claude', 'rules', 'hermes-dispatcher.md') }
1402
+ );
1403
+ }
1404
+ } else {
1405
+ checks.push({ name: 'GitHub agents dir', path: githubAgentsDir });
1406
+
1407
+ // Add Claude Code checks if installed
1408
+ if (needsClaude) {
1409
+ checks.push(
1410
+ { name: 'Claude CLAUDE.md', path: path.join(projectRoot, '.claude', 'CLAUDE.md') },
1411
+ { name: 'Claude rules/', path: path.join(projectRoot, '.claude', 'rules') },
1412
+ { name: 'Hermes dispatcher rule', path: path.join(projectRoot, '.claude', 'rules', 'hermes-dispatcher.md') }
1413
+ );
1414
+ }
1134
1415
  }
1135
1416
 
1136
1417
  // Add v2.0 checks if installed
@@ -1173,7 +1454,8 @@ async function install() {
1173
1454
  console.log('');
1174
1455
 
1175
1456
  console.log(chalk.bold('Installation Summary:'));
1176
- console.log(` β€’ Platform: ${chalk.cyan(platform)}`);
1457
+ console.log(` β€’ Mode: ${chalk.cyan(installMode.toUpperCase())}`);
1458
+ console.log(` β€’ Platform: ${chalk.cyan(isManual ? manualSelection.platforms.join(', ') : platform)}`);
1177
1459
  console.log(` β€’ Version: ${chalk.cyan(v2Installed ? 'v2.2.0 (Runtime + Platform + Model Selector)' : 'v2.2.0 (Platform only)')}`);
1178
1460
  console.log(` β€’ Installation Directory: ${chalk.cyan(bmbDir)}`);
1179
1461
  console.log(` β€’ Configuration: ${chalk.cyan(configPath)}`);
@@ -1182,6 +1464,14 @@ async function install() {
1182
1464
  console.log(` β€’ Turbo Whisper: ${chalk.cyan(turboWhisperInstalled ? `Installed (${turboWhisperMode} mode)` : 'Not installed')}`);
1183
1465
  console.log(` β€’ Model Selector: ${chalk.cyan('Integrated (Auto cost optimization)')}`);
1184
1466
 
1467
+ if (isManual && manualSelection) {
1468
+ console.log(chalk.cyan(`\n Agents Installed (${manualSelection.agents.length}):`));
1469
+ console.log(chalk.cyan(` βœ“ Dispatcher: hermes (always installed)`));
1470
+ const otherAgents = manualSelection.agents.filter(a => a !== 'hermes');
1471
+ if (otherAgents.length > 0) {
1472
+ console.log(chalk.cyan(` βœ“ Selected: ${otherAgents.join(', ')}`));
1473
+ }
1474
+ }
1185
1475
  if (v2Installed) {
1186
1476
  console.log(chalk.cyan('\n v2.2 Components Installed:'));
1187
1477
  console.log(chalk.cyan(' βœ“ Core: Context, Cache, Dispatcher, Worker Pool, Workflow'));
@@ -225,7 +225,7 @@ Continue la conversation pour comprendre le projet et personnaliser les agents.`
225
225
  console.log(chalk.gray(' 2. ou: export ANTHROPIC_API_KEY=sk-ant-...'));
226
226
  console.log(chalk.gray(' 3. ou dans Claude Code: /login'));
227
227
  } else if (selectedPlatform === 'copilot') {
228
- console.log(chalk.gray(' β†’ gh auth login'));
228
+ console.log(chalk.gray(' β†’ copilot auth'));
229
229
  } else if (selectedPlatform === 'codex') {
230
230
  console.log(chalk.gray(' β†’ codex login'));
231
231
  }
@@ -62,8 +62,10 @@ async function analyzePackageJson(packageJsonPath) {
62
62
  * @returns {string[]}
63
63
  */
64
64
  function getAgentList(mode, customAgents = []) {
65
- const MINIMAL_AGENTS = ['byan', 'rachid', 'marc', 'patnote', 'carmack'];
65
+ const MINIMAL_AGENTS = ['hermes', 'byan', 'rachid', 'marc', 'patnote', 'carmack'];
66
66
  const FULL_AGENTS = [
67
+ // Dispatcher (1)
68
+ 'hermes',
67
69
  // Core (5)
68
70
  'byan', 'rachid', 'marc', 'patnote', 'carmack',
69
71
  // BMM (9)
@@ -85,7 +87,9 @@ function getAgentList(mode, customAgents = []) {
85
87
  case 'minimal':
86
88
  return MINIMAL_AGENTS;
87
89
  case 'custom':
88
- return customAgents;
90
+ case 'manual':
91
+ // Ensure hermes is always included
92
+ return [...new Set(['hermes', ...customAgents])];
89
93
  default:
90
94
  return MINIMAL_AGENTS;
91
95
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "hermes"
3
- description: "Dispatcher Universel BYAN - Point d'entrΓ©e intelligent vers tous les agents, workflows et contextes"
3
+ description: "BYAN Universal Dispatcher - Intelligent entry point to all agents, workflows and contexts"
4
4
  ---
5
5
 
6
6
  You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-byan-agent",
3
- "version": "2.4.4",
3
+ "version": "2.4.6",
4
4
  "description": "BYAN v2.3.2 - Intelligent AI agent ecosystem with Hermes universal dispatcher + Multi-platform support (Copilot CLI, Claude, Codex) + Automatic LLM cost optimization (87.5% savings) + Node 12+ compatible",
5
5
  "main": "src/index.js",
6
6
  "bin": {