create-byan-agent 1.2.6 → 2.0.0-alpha.1

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 (77) hide show
  1. package/CHANGELOG.md +196 -388
  2. package/LICENSE +21 -21
  3. package/README.md +420 -1264
  4. package/bin/create-byan-agent-backup.js +220 -220
  5. package/bin/create-byan-agent-fixed.js +301 -301
  6. package/bin/create-byan-agent-v2.js +492 -0
  7. package/bin/create-byan-agent.js +296 -561
  8. package/package.json +68 -64
  9. package/templates/.github/agents/bmad-agent-bmad-master.md +15 -15
  10. package/templates/.github/agents/bmad-agent-bmb-agent-builder.md +15 -15
  11. package/templates/.github/agents/bmad-agent-bmb-module-builder.md +15 -15
  12. package/templates/.github/agents/bmad-agent-bmb-workflow-builder.md +15 -15
  13. package/templates/.github/agents/bmad-agent-bmm-analyst.md +15 -15
  14. package/templates/.github/agents/bmad-agent-bmm-architect.md +15 -15
  15. package/templates/.github/agents/bmad-agent-bmm-dev.md +15 -15
  16. package/templates/.github/agents/bmad-agent-bmm-pm.md +15 -15
  17. package/templates/.github/agents/bmad-agent-bmm-quick-flow-solo-dev.md +15 -15
  18. package/templates/.github/agents/bmad-agent-bmm-quinn.md +15 -15
  19. package/templates/.github/agents/bmad-agent-bmm-sm.md +15 -15
  20. package/templates/.github/agents/bmad-agent-bmm-tech-writer.md +15 -15
  21. package/templates/.github/agents/bmad-agent-bmm-ux-designer.md +15 -15
  22. package/templates/.github/agents/bmad-agent-byan-test.md +32 -32
  23. package/templates/.github/agents/bmad-agent-byan.md +224 -224
  24. package/templates/.github/agents/bmad-agent-carmack.md +18 -18
  25. package/templates/.github/agents/bmad-agent-cis-brainstorming-coach.md +15 -15
  26. package/templates/.github/agents/bmad-agent-cis-creative-problem-solver.md +15 -15
  27. package/templates/.github/agents/bmad-agent-cis-design-thinking-coach.md +15 -15
  28. package/templates/.github/agents/bmad-agent-cis-innovation-strategist.md +15 -15
  29. package/templates/.github/agents/bmad-agent-cis-presentation-master.md +15 -15
  30. package/templates/.github/agents/bmad-agent-cis-storyteller.md +15 -15
  31. package/templates/.github/agents/bmad-agent-marc.md +48 -48
  32. package/templates/.github/agents/bmad-agent-patnote.md +48 -48
  33. package/templates/.github/agents/bmad-agent-rachid.md +47 -47
  34. package/templates/.github/agents/bmad-agent-tea-tea.md +15 -15
  35. package/templates/.github/agents/bmad-agent-test-dynamic.md +21 -21
  36. package/templates/.github/agents/franck.md +379 -379
  37. package/templates/_bmad/bmb/agents/agent-builder.md +59 -59
  38. package/templates/_bmad/bmb/agents/byan-test.md +116 -116
  39. package/templates/_bmad/bmb/agents/byan.md +215 -215
  40. package/templates/_bmad/bmb/agents/marc.md +303 -303
  41. package/templates/_bmad/bmb/agents/module-builder.md +60 -60
  42. package/templates/_bmad/bmb/agents/patnote.md +495 -495
  43. package/templates/_bmad/bmb/agents/rachid.md +184 -184
  44. package/templates/_bmad/bmb/agents/workflow-builder.md +61 -61
  45. package/templates/_bmad/bmb/workflows/byan/data/mantras.yaml +272 -272
  46. package/templates/_bmad/bmb/workflows/byan/data/templates.yaml +59 -59
  47. package/templates/_bmad/bmb/workflows/byan/delete-agent-workflow.md +657 -657
  48. package/templates/_bmad/bmb/workflows/byan/edit-agent-workflow.md +688 -688
  49. package/templates/_bmad/bmb/workflows/byan/interview-workflow.md +753 -753
  50. package/templates/_bmad/bmb/workflows/byan/quick-create-workflow.md +450 -450
  51. package/templates/_bmad/bmb/workflows/byan/templates/base-agent-template.md +79 -79
  52. package/templates/_bmad/bmb/workflows/byan/validate-agent-workflow.md +676 -676
  53. package/templates/_bmad/core/agents/carmack.md +238 -238
  54. package/lib/errors.js +0 -61
  55. package/lib/exit-codes.js +0 -54
  56. package/lib/platforms/claude-code.js +0 -113
  57. package/lib/platforms/codex.js +0 -92
  58. package/lib/platforms/copilot-cli.js +0 -123
  59. package/lib/platforms/index.js +0 -14
  60. package/lib/platforms/vscode.js +0 -51
  61. package/lib/utils/config-loader.js +0 -79
  62. package/lib/utils/file-utils.js +0 -117
  63. package/lib/utils/git-detector.js +0 -35
  64. package/lib/utils/logger.js +0 -64
  65. package/lib/utils/node-detector.js +0 -58
  66. package/lib/utils/os-detector.js +0 -74
  67. package/lib/utils/yaml-utils.js +0 -87
  68. package/lib/yanstaller/backuper.js +0 -308
  69. package/lib/yanstaller/detector.js +0 -141
  70. package/lib/yanstaller/index.js +0 -93
  71. package/lib/yanstaller/installer.js +0 -226
  72. package/lib/yanstaller/interviewer.js +0 -301
  73. package/lib/yanstaller/recommender.js +0 -308
  74. package/lib/yanstaller/troubleshooter.js +0 -498
  75. package/lib/yanstaller/validator.js +0 -602
  76. package/lib/yanstaller/wizard.js +0 -229
  77. package/templates/.github/agents/expert-merise-agile.md +0 -1
@@ -1,93 +0,0 @@
1
- /**
2
- * YANSTALLER - Main Orchestrator
3
- *
4
- * Coordinates all YANSTALLER modules to perform intelligent BYAN installation.
5
- *
6
- * @module yanstaller
7
- */
8
-
9
- const detector = require('./detector');
10
- const recommender = require('./recommender');
11
- const installer = require('./installer');
12
- const validator = require('./validator');
13
- const troubleshooter = require('./troubleshooter');
14
- const interviewer = require('./interviewer');
15
- const backuper = require('./backuper');
16
- const wizard = require('./wizard');
17
- const logger = require('../utils/logger');
18
-
19
- /**
20
- * @typedef {Object} YanInstallerOptions
21
- * @property {boolean} [yes] - Skip confirmations (--yes flag)
22
- * @property {string} [mode] - Installation mode: 'full' | 'minimal' | 'custom'
23
- * @property {boolean} [verbose] - Verbose output
24
- * @property {boolean} [quiet] - Minimal output
25
- */
26
-
27
- /**
28
- * Main installation flow
29
- *
30
- * @param {YanInstallerOptions} [options={}] - Installation options
31
- * @returns {Promise<void>}
32
- */
33
- async function install(options = {}) {
34
- let backupPath = null;
35
-
36
- try {
37
- // TODO: Implement Phase 1-8 orchestration
38
- // 1. Detect environment
39
- // 2. Validate Node version (FAIL FAST)
40
- // 3. Recommend configuration
41
- // 4. Run interview (unless --yes)
42
- // 5. Backup existing installation
43
- // backupPath = await backuper.backup('_bmad');
44
- // 6. Install agents
45
- // 7. Validate installation
46
- // 8. Show post-install wizard
47
- } catch (error) {
48
- // ROLLBACK STRATEGY: Leave partial state + clear message
49
- // Rationale (Mantra #37 Ockham's Razor):
50
- // - Installation = mostly file copies (low risk)
51
- // - User can re-run (idempotent)
52
- // - Backup exists for manual restore
53
- // - Auto-rollback risks losing working partial install
54
-
55
- logger.error('Installation failed:', error.message);
56
-
57
- if (backupPath) {
58
- logger.info('\nPartial installation completed.');
59
- logger.info(`Backup available at: ${backupPath}`);
60
- logger.info('\nOptions:');
61
- logger.info('1. Re-run: npx create-byan-agent');
62
- logger.info(`2. Restore backup: yanstaller restore ${backupPath}`);
63
- logger.info('3. Troubleshoot: yanstaller doctor');
64
- }
65
-
66
- throw error; // Re-throw for exit code handling
67
- }
68
- }
69
-
70
- /**
71
- * Uninstall BYAN
72
- *
73
- * @returns {Promise<void>}
74
- */
75
- async function uninstall() {
76
- // TODO: Remove _bmad/, .github/agents/ stubs
77
- }
78
-
79
- /**
80
- * Update existing BYAN installation
81
- *
82
- * @param {string} version - Target version
83
- * @returns {Promise<void>}
84
- */
85
- async function update(version) {
86
- // TODO: Backup → Update agents → Merge configs
87
- }
88
-
89
- module.exports = {
90
- install,
91
- uninstall,
92
- update
93
- };
@@ -1,226 +0,0 @@
1
- /**
2
- * INSTALLER Module
3
- *
4
- * Installs BYAN agents across multiple platforms.
5
- * Most complex module: 56h development.
6
- *
7
- * Phase 3: 56h development
8
- *
9
- * @module yanstaller/installer
10
- */
11
-
12
- const path = require('path');
13
- const fileUtils = require('../utils/file-utils');
14
- const logger = require('../utils/logger');
15
-
16
- /**
17
- * @typedef {Object} InstallConfig
18
- * @property {string} mode - 'full' | 'minimal' | 'custom'
19
- * @property {string[]} agents - Agent names to install
20
- * @property {string} userName - User's name
21
- * @property {string} language - 'Francais' | 'English'
22
- * @property {string[]} targetPlatforms - Platforms to install on
23
- * @property {string} outputFolder - Output folder path
24
- * @property {string} projectRoot - Project root directory
25
- */
26
-
27
- /**
28
- * @typedef {Object} InstallResult
29
- * @property {boolean} success
30
- * @property {number} agentsInstalled - Number of agents installed
31
- * @property {string[]} platforms - Platforms installed on
32
- * @property {string[]} errors - Installation errors
33
- * @property {number} duration - Duration in ms
34
- */
35
-
36
- /**
37
- * Install BYAN agents
38
- *
39
- * @param {InstallConfig} config - Installation configuration
40
- * @returns {Promise<InstallResult>}
41
- */
42
- async function install(config) {
43
- const startTime = Date.now();
44
- const errors = [];
45
- let agentsInstalled = 0;
46
-
47
- try {
48
- logger.info(`Installing ${config.agents.length} agents in ${config.mode} mode...`);
49
-
50
- // 1. Create _bmad/ structure
51
- logger.info('Creating _bmad/ directory structure...');
52
- await createBmadStructure(config.projectRoot);
53
-
54
- // 2. Copy agent files from templates/
55
- logger.info('Copying agent files...');
56
- for (const agentName of config.agents) {
57
- try {
58
- await copyAgentFile(agentName, config.projectRoot);
59
- agentsInstalled++;
60
- logger.info(` ✓ ${agentName}`);
61
- } catch (error) {
62
- errors.push(`Failed to install ${agentName}: ${error.message}`);
63
- logger.warn(` ✗ ${agentName} - ${error.message}`);
64
- }
65
- }
66
-
67
- // 3. Generate platform-specific stubs
68
- logger.info('Generating platform stubs...');
69
- for (const platform of config.targetPlatforms) {
70
- try {
71
- await generatePlatformStubs(platform, config);
72
- logger.info(` ✓ ${platform}`);
73
- } catch (error) {
74
- errors.push(`Failed to generate ${platform} stubs: ${error.message}`);
75
- logger.warn(` ✗ ${platform} - ${error.message}`);
76
- }
77
- }
78
-
79
- // 4. Create config files
80
- logger.info('Creating configuration files...');
81
- await createModuleConfig('bmb', config, config.projectRoot);
82
-
83
- const success = errors.length === 0;
84
-
85
- return {
86
- success,
87
- agentsInstalled,
88
- platforms: config.targetPlatforms,
89
- errors,
90
- duration: Date.now() - startTime
91
- };
92
- } catch (error) {
93
- errors.push(error.message);
94
- return {
95
- success: false,
96
- agentsInstalled,
97
- platforms: [],
98
- errors,
99
- duration: Date.now() - startTime
100
- };
101
- }
102
- }
103
-
104
- /**
105
- * Create _bmad/ directory structure
106
- *
107
- * @param {string} projectRoot - Project root directory
108
- * @returns {Promise<void>}
109
- */
110
- async function createBmadStructure(projectRoot) {
111
- const directories = [
112
- '_bmad',
113
- '_bmad/_config',
114
- '_bmad/_memory',
115
- '_bmad/_output',
116
- '_bmad/core',
117
- '_bmad/core/agents',
118
- '_bmad/core/workflows',
119
- '_bmad/bmm',
120
- '_bmad/bmm/agents',
121
- '_bmad/bmm/workflows',
122
- '_bmad/bmb',
123
- '_bmad/bmb/agents',
124
- '_bmad/bmb/workflows',
125
- '_bmad/tea',
126
- '_bmad/tea/agents',
127
- '_bmad/tea/workflows',
128
- '_bmad/cis',
129
- '_bmad/cis/agents',
130
- '_bmad/cis/workflows'
131
- ];
132
-
133
- for (const dir of directories) {
134
- const dirPath = path.join(projectRoot, dir);
135
- await fileUtils.ensureDir(dirPath);
136
- }
137
- }
138
-
139
- /**
140
- * Copy agent file from template
141
- *
142
- * @param {string} agentName - Agent name
143
- * @param {string} projectRoot - Project root directory
144
- * @returns {Promise<void>}
145
- */
146
- async function copyAgentFile(agentName, projectRoot) {
147
- // Template base path
148
- const templateBase = path.join(__dirname, '../../templates/_bmad');
149
-
150
- // Search for agent in all modules
151
- const modules = ['core', 'bmm', 'bmb', 'tea', 'cis'];
152
-
153
- for (const module of modules) {
154
- const sourceFile = path.join(templateBase, module, 'agents', `${agentName}.md`);
155
-
156
- if (await fileUtils.exists(sourceFile)) {
157
- const targetFile = path.join(projectRoot, '_bmad', module, 'agents', `${agentName}.md`);
158
- await fileUtils.copy(sourceFile, targetFile);
159
- return;
160
- }
161
- }
162
-
163
- throw new Error(`Agent template not found: ${agentName}`);
164
- }
165
-
166
- /**
167
- * Generate platform stubs for all agents
168
- *
169
- * @param {string} platform - Platform name ('copilot-cli' | 'vscode' | 'claude-code' | 'codex')
170
- * @param {InstallConfig} config - Installation config
171
- * @returns {Promise<void>}
172
- */
173
- async function generatePlatformStubs(platform, config) {
174
- const normalized = platform === 'claude' ? 'claude-code' : platform;
175
- const platformModule = require(`../platforms/${normalized}`);
176
-
177
- if (!platformModule || typeof platformModule.install !== 'function') {
178
- throw new Error(`Platform module not found or invalid: ${platform}`);
179
- }
180
-
181
- await platformModule.install(config.projectRoot, config.agents, config);
182
- }
183
-
184
- /**
185
- * Create module config file
186
- *
187
- * @param {string} moduleName - Module name (core, bmm, bmb, tea, cis)
188
- * @param {InstallConfig} config - Installation config
189
- * @param {string} projectRoot - Project root directory
190
- * @returns {Promise<void>}
191
- */
192
- async function createModuleConfig(moduleName, config, projectRoot) {
193
- const yaml = require('js-yaml');
194
-
195
- const configContent = {
196
- user_name: config.userName,
197
- communication_language: config.language,
198
- document_output_language: config.language,
199
- output_folder: config.outputFolder || '{project-root}/_bmad-output',
200
-
201
- // Installation metadata
202
- installed_by: 'yanstaller',
203
- installed_at: new Date().toISOString(),
204
- version: '1.2.0',
205
- mode: config.mode,
206
- agents_installed: config.agents
207
- };
208
-
209
- // Add module-specific settings
210
- if (moduleName === 'bmb') {
211
- configContent.bmb_creations_output_folder = '{project-root}/_bmad-output/bmb-creations';
212
- }
213
-
214
- const configPath = path.join(projectRoot, '_bmad', moduleName, 'config.yaml');
215
- const yamlContent = yaml.dump(configContent, { indent: 2 });
216
-
217
- await fileUtils.writeFile(configPath, yamlContent);
218
- }
219
-
220
- module.exports = {
221
- install,
222
- createBmadStructure,
223
- copyAgentFile,
224
- generatePlatformStubs,
225
- createModuleConfig
226
- };
@@ -1,301 +0,0 @@
1
- /**
2
- * INTERVIEWER Module
3
- *
4
- * Conducts quick interview (5-7 questions, <5 min) to personalize installation.
5
- *
6
- * Phase 7: 16h development
7
- *
8
- * @module yanstaller/interviewer
9
- */
10
-
11
- const inquirer = require('inquirer');
12
- const chalk = require('chalk');
13
- const logger = require('../utils/logger');
14
-
15
- function normalizePlatformName(name) {
16
- if (!name) return name;
17
- const lower = String(name).toLowerCase();
18
- if (lower === 'claude') return 'claude-code';
19
- return lower;
20
- }
21
-
22
- function buildDefaultPlatforms(options = {}) {
23
- const preferred = Array.isArray(options.preferredPlatforms)
24
- ? options.preferredPlatforms.map(normalizePlatformName).filter(Boolean)
25
- : [];
26
-
27
- if (preferred.length > 0) return preferred;
28
-
29
- const detected = (options.detection && Array.isArray(options.detection.platforms))
30
- ? options.detection.platforms
31
- .filter(p => p.detected)
32
- .map(p => normalizePlatformName(p.name))
33
- .filter(Boolean)
34
- : [];
35
-
36
- return detected;
37
- }
38
-
39
- /**
40
- * @typedef {Object} InterviewResult
41
- * @property {string} userName
42
- * @property {string} language - 'Francais' | 'English'
43
- * @property {string} mode - 'full' | 'minimal' | 'custom'
44
- * @property {string[]} agents - Selected agents (if custom mode)
45
- * @property {string[]} targetPlatforms - Platforms to install on
46
- * @property {boolean} createSampleAgent - Whether to create sample agent after install
47
- */
48
-
49
- /**
50
- * Run quick interview
51
- *
52
- * @param {import('./recommender').Recommendation} recommendation - Recommended config
53
- * @returns {Promise<InterviewResult>}
54
- */
55
- async function ask(recommendation, options = {}) {
56
- const defaults = options.defaults || {};
57
- logger.info(chalk.bold('\n🎙️ YANSTALLER Quick Interview\n'));
58
- logger.info('Just 5-7 questions to personalize your BYAN installation (<5 min)\n');
59
-
60
- // Q1: Your name
61
- const nameAnswer = await inquirer.prompt([
62
- {
63
- type: 'input',
64
- name: 'userName',
65
- message: 'What\'s your name?',
66
- default: defaults.userName || 'Developer',
67
- validate: (input) => input.trim().length > 0 || 'Name cannot be empty'
68
- }
69
- ]);
70
-
71
- // Q2: Preferred language
72
- const langAnswer = await inquirer.prompt([
73
- {
74
- type: 'list',
75
- name: 'language',
76
- message: 'Preferred communication language?',
77
- choices: [
78
- { name: 'English', value: 'English' },
79
- { name: 'Français', value: 'Francais' }
80
- ],
81
- default: (defaults.language === 'Francais' || defaults.language === 'English') ? defaults.language : 'English'
82
- }
83
- ]);
84
-
85
- // Q3: Installation mode (with recommendation)
86
- const recommendedMode = recommendation ? recommendation.mode : 'recommended';
87
- const defaultMode = defaults.mode || recommendedMode;
88
- const modeChoices = [
89
- {
90
- name: `Recommended - Based on your project (${recommendation ? recommendation.agents.length : 7} agents)`,
91
- value: 'recommended',
92
- description: 'Best for most users'
93
- },
94
- {
95
- name: 'Minimal - Essential agents only (4 agents)',
96
- value: 'minimal',
97
- description: 'Fastest installation'
98
- },
99
- {
100
- name: 'Full - All 29 agents',
101
- value: 'full',
102
- description: 'Complete BMAD platform'
103
- },
104
- {
105
- name: 'Custom - Choose specific agents',
106
- value: 'custom',
107
- description: 'Advanced users'
108
- }
109
- ];
110
-
111
- const modeAnswer = await inquirer.prompt([
112
- {
113
- type: 'list',
114
- name: 'mode',
115
- message: 'Installation mode?',
116
- choices: modeChoices,
117
- default: defaultMode
118
- }
119
- ]);
120
-
121
- // Q4: Agent selection (if custom mode)
122
- let selectedAgents = [];
123
- if (modeAnswer.mode === 'custom') {
124
- const agentAnswer = await inquirer.prompt([
125
- {
126
- type: 'checkbox',
127
- name: 'agents',
128
- message: 'Select agents to install:',
129
- choices: getAgentChoices(defaults.agents),
130
- pageSize: 15,
131
- validate: (input) => input.length > 0 || 'Select at least one agent'
132
- }
133
- ]);
134
- selectedAgents = agentAnswer.agents;
135
- } else if (modeAnswer.mode === 'recommended' && recommendation) {
136
- selectedAgents = recommendation.agents;
137
- } else if (modeAnswer.mode === 'minimal') {
138
- selectedAgents = ['byan', 'rachid', 'dev', 'tech-writer'];
139
- } else if (modeAnswer.mode === 'full') {
140
- selectedAgents = getAllAgents();
141
- }
142
-
143
- // Q5: Target platforms
144
- const defaultPlatforms = buildDefaultPlatforms(options);
145
- const useDefaultPlatforms = defaultPlatforms.length > 0;
146
- const isDefault = (value, fallback) => useDefaultPlatforms ? defaultPlatforms.includes(value) : fallback;
147
-
148
- const platformAnswer = await inquirer.prompt([
149
- {
150
- type: 'checkbox',
151
- name: 'platforms',
152
- message: 'Which platforms to install on?',
153
- choices: [
154
- { name: 'All detected platforms', value: '__all_detected__', checked: false },
155
- { name: 'GitHub Copilot CLI (.github/agents/)', value: 'copilot-cli', checked: isDefault('copilot-cli', true) },
156
- { name: 'VSCode Copilot Extension', value: 'vscode', checked: isDefault('vscode', true) },
157
- { name: 'Codex (.codex/prompts/)', value: 'codex', checked: isDefault('codex', false) },
158
- { name: 'Claude Code (MCP server)', value: 'claude-code', checked: isDefault('claude-code', false) }
159
- ],
160
- validate: (input) => input.length > 0 || 'Select at least one platform'
161
- }
162
- ]);
163
-
164
- let selectedPlatforms = platformAnswer.platforms;
165
- if (selectedPlatforms.includes('__all_detected__')) {
166
- const detected = buildDefaultPlatforms(options);
167
- selectedPlatforms = detected.length > 0
168
- ? detected
169
- : ['copilot-cli', 'vscode', 'codex', 'claude-code'];
170
- }
171
-
172
- const isFrench = langAnswer.language === 'Francais';
173
- const platformSummary = selectedPlatforms.join(', ');
174
- if (isFrench) {
175
- logger.info(`Plateformes retenues: ${platformSummary}`);
176
- } else {
177
- logger.info(`Selected platforms: ${platformSummary}`);
178
- }
179
-
180
- // Q6: Create sample agent
181
- const sampleAnswer = await inquirer.prompt([
182
- {
183
- type: 'confirm',
184
- name: 'createSample',
185
- message: 'Launch BYAN agent creator after installation?',
186
- default: typeof defaults.createSampleAgent === 'boolean' ? defaults.createSampleAgent : false
187
- }
188
- ]);
189
-
190
- // Q7: Create backup (optional)
191
- const backupAnswer = await inquirer.prompt([
192
- {
193
- type: 'confirm',
194
- name: 'createBackup',
195
- message: 'Create backup of existing _bmad/ directory? (if exists)',
196
- default: typeof defaults.createBackup === 'boolean' ? defaults.createBackup : true
197
- }
198
- ]);
199
-
200
- logger.info('');
201
-
202
- return {
203
- userName: nameAnswer.userName,
204
- language: langAnswer.language,
205
- mode: modeAnswer.mode,
206
- agents: selectedAgents,
207
- targetPlatforms: selectedPlatforms,
208
- createSampleAgent: sampleAnswer.createSample,
209
- createBackup: backupAnswer.createBackup
210
- };
211
- }
212
-
213
- /**
214
- * Ask single question
215
- *
216
- * @param {string} question - Question text
217
- * @param {string} type - 'input' | 'list' | 'confirm' | 'checkbox'
218
- * @param {Array} [choices] - Choices for list/checkbox
219
- * @returns {Promise<any>}
220
- */
221
- async function askQuestion(question, type, choices = []) {
222
- // TODO: Use inquirer
223
- const answer = await inquirer.prompt([
224
- {
225
- type,
226
- name: 'answer',
227
- message: question,
228
- choices
229
- }
230
- ]);
231
-
232
- return answer.answer;
233
- }
234
-
235
- /**
236
- * Get available agents list for custom selection
237
- *
238
- * @returns {Array<{name: string, value: string, checked: boolean}>}
239
- */
240
- function getAgentChoices(checkedAgents = []) {
241
- const choices = [
242
- // BMB Module - Builders
243
- { name: 'BYAN - Agent Creator & Intelligent Interview', value: 'byan', checked: true },
244
- { name: 'RACHID - NPM/NPX Deployment Specialist', value: 'rachid', checked: true },
245
- { name: 'Agent Builder - Direct agent creation', value: 'agent-builder', checked: false },
246
- { name: 'Module Builder - Module scaffolding', value: 'module-builder', checked: false },
247
- { name: 'Workflow Builder - Workflow creation', value: 'workflow-builder', checked: false },
248
-
249
- // BMM Module - Development Team
250
- { name: 'MARY (Analyst) - Requirements & Domain Expert', value: 'analyst', checked: false },
251
- { name: 'JOHN (PM) - Product Management', value: 'pm', checked: false },
252
- { name: 'WINSTON (Architect) - System Architecture', value: 'architect', checked: false },
253
- { name: 'AMELIA (Dev) - Implementation Specialist', value: 'dev', checked: true },
254
- { name: 'BOB (SM) - Scrum Master', value: 'sm', checked: false },
255
- { name: 'QUINN (QA) - Quality Assurance', value: 'quinn', checked: false },
256
- { name: 'SALLY (UX) - UX/UI Design', value: 'ux-designer', checked: false },
257
- { name: 'PAIGE (Tech Writer) - Documentation', value: 'tech-writer', checked: true },
258
-
259
- // TEA Module - Testing
260
- { name: 'MURAT (TEA) - Test Architecture Expert', value: 'tea', checked: false },
261
-
262
- // CIS Module - Innovation
263
- { name: 'CARSON - Brainstorming Coach', value: 'brainstorming-coach', checked: false },
264
- { name: 'DR. QUINN - Design Thinking Coach', value: 'design-thinking-coach', checked: false },
265
- { name: 'MAYA - Creative Problem Solver', value: 'creative-problem-solver', checked: false },
266
- { name: 'VICTOR - Innovation Strategist', value: 'innovation-strategist', checked: false },
267
- { name: 'Presentation Master', value: 'presentation-master', checked: false },
268
- { name: 'Storyteller', value: 'storyteller', checked: false },
269
-
270
- // Core Module
271
- { name: 'Party Mode - Multi-agent orchestration', value: 'party-mode', checked: false },
272
- { name: 'BMAD Master - Platform orchestrator', value: 'bmad-master', checked: false },
273
-
274
- // Specialized
275
- { name: 'MARC - GitHub Copilot CLI Integration', value: 'marc', checked: false },
276
- { name: 'PATNOTE - Update Manager', value: 'patnote', checked: false },
277
-
278
- // Quick Flow Variants
279
- { name: 'Quick Flow Solo Dev', value: 'quick-flow-solo-dev', checked: false }
280
- ];
281
-
282
- if (Array.isArray(checkedAgents) && checkedAgents.length > 0) {
283
- return choices.map(choice => ({
284
- ...choice,
285
- checked: checkedAgents.includes(choice.value)
286
- }));
287
- }
288
-
289
- return choices;
290
- }
291
-
292
- function getAllAgents() {
293
- return getAgentChoices().map(choice => choice.value);
294
- }
295
-
296
- module.exports = {
297
- ask,
298
- askQuestion,
299
- getAgentChoices,
300
- getAllAgents
301
- };