create-byan-agent 2.7.1 → 2.7.2

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.
@@ -0,0 +1,102 @@
1
+ /**
2
+ * RECOMMENDER Module
3
+ *
4
+ * Analyzes project and recommends optimal BYAN configuration.
5
+ *
6
+ * Phase 2: 24h development
7
+ *
8
+ * @module yanstaller/recommender
9
+ */
10
+
11
+ /**
12
+ * @typedef {Object} Recommendation
13
+ * @property {string} mode - 'full' | 'minimal' | 'custom'
14
+ * @property {string[]} agents - Recommended agent names
15
+ * @property {string} reason - Why this recommendation
16
+ * @property {string} projectType - 'frontend' | 'backend' | 'fullstack' | 'library' | 'unknown'
17
+ */
18
+
19
+ /**
20
+ * Analyze project and recommend configuration
21
+ *
22
+ * @param {import('./detector').DetectionResult} detection - Detection results
23
+ * @returns {Promise<Recommendation>}
24
+ */
25
+ async function recommend(detection) {
26
+ // TODO: Implement recommendation logic
27
+ // - Analyze package.json, requirements.txt, go.mod, etc.
28
+ // - Detect project type (frontend/backend/fullstack)
29
+ // - Recommend agents based on stack
30
+
31
+ return {
32
+ mode: 'minimal',
33
+ agents: ['byan', 'rachid', 'marc', 'patnote', 'carmack'],
34
+ reason: 'Default minimal installation for new users',
35
+ projectType: 'unknown'
36
+ };
37
+ }
38
+
39
+ /**
40
+ * Analyze package.json to detect stack
41
+ *
42
+ * @param {string} packageJsonPath - Path to package.json
43
+ * @returns {Promise<{isFrontend: boolean, isBackend: boolean, framework: string}>}
44
+ */
45
+ async function analyzePackageJson(packageJsonPath) {
46
+ // TODO: Read package.json, check dependencies
47
+ // - React/Vue/Angular → frontend
48
+ // - Express/Fastify/Nest → backend
49
+
50
+ return {
51
+ isFrontend: false,
52
+ isBackend: false,
53
+ framework: 'unknown'
54
+ };
55
+ }
56
+
57
+ /**
58
+ * Get agent list for installation mode
59
+ *
60
+ * @param {string} mode - 'full' | 'minimal' | 'custom'
61
+ * @param {string[]} [customAgents] - Custom agent selection
62
+ * @returns {string[]}
63
+ */
64
+ function getAgentList(mode, customAgents = []) {
65
+ const MINIMAL_AGENTS = ['hermes', 'byan', 'rachid', 'marc', 'patnote', 'carmack'];
66
+ const FULL_AGENTS = [
67
+ // Dispatcher (1)
68
+ 'hermes',
69
+ // Core (5)
70
+ 'byan', 'rachid', 'marc', 'patnote', 'carmack',
71
+ // BMM (9)
72
+ 'analyst', 'pm', 'architect', 'dev', 'sm', 'quinn', 'ux-designer', 'tech-writer', 'quick-flow-solo-dev',
73
+ // BMB (3)
74
+ 'agent-builder', 'module-builder', 'workflow-builder',
75
+ // TEA (1)
76
+ 'tea',
77
+ // CIS (6)
78
+ 'brainstorming-coach', 'creative-problem-solver', 'design-thinking-coach',
79
+ 'innovation-strategist', 'presentation-master', 'storyteller',
80
+ // BYAN Test (1)
81
+ 'byan-test'
82
+ ];
83
+
84
+ switch (mode) {
85
+ case 'full':
86
+ return FULL_AGENTS;
87
+ case 'minimal':
88
+ return MINIMAL_AGENTS;
89
+ case 'custom':
90
+ case 'manual':
91
+ // Ensure hermes is always included
92
+ return [...new Set(['hermes', ...customAgents])];
93
+ default:
94
+ return MINIMAL_AGENTS;
95
+ }
96
+ }
97
+
98
+ module.exports = {
99
+ recommend,
100
+ analyzePackageJson,
101
+ getAgentList
102
+ };
@@ -0,0 +1,89 @@
1
+ /**
2
+ * TROUBLESHOOTER Module
3
+ *
4
+ * Diagnoses and fixes common installation errors.
5
+ *
6
+ * Phase 5: 40h development
7
+ *
8
+ * @module yanstaller/troubleshooter
9
+ */
10
+
11
+ /**
12
+ * @typedef {Object} DiagnosticResult
13
+ * @property {string} error - Error type
14
+ * @property {string} cause - Root cause
15
+ * @property {string} solution - Recommended solution
16
+ * @property {boolean} canAutoFix - Whether auto-fix is available
17
+ * @property {Function} [autoFix] - Auto-fix function
18
+ */
19
+
20
+ /**
21
+ * Diagnose installation error
22
+ *
23
+ * @param {Error} error - Installation error
24
+ * @param {Object} context - Installation context
25
+ * @returns {Promise<DiagnosticResult>}
26
+ */
27
+ async function diagnose(error, context) {
28
+ // TODO: Pattern match error and return diagnostic
29
+ // Common errors:
30
+ // - Node version too old
31
+ // - Permission denied
32
+ // - Git not found
33
+ // - Platform not detected
34
+ // - Network error (template download)
35
+
36
+ return {
37
+ error: error.message,
38
+ cause: 'Unknown',
39
+ solution: 'Please check logs',
40
+ canAutoFix: false
41
+ };
42
+ }
43
+
44
+ /**
45
+ * Auto-fix permission error
46
+ *
47
+ * @param {string} path - File path with permission issue
48
+ * @returns {Promise<void>}
49
+ */
50
+ async function fixPermissions(path) {
51
+ // TODO: chmod/chown on Unix, icacls on Windows
52
+ }
53
+
54
+ /**
55
+ * Suggest Node.js upgrade
56
+ *
57
+ * @param {string} currentVersion - Current Node version
58
+ * @param {string} requiredVersion - Required Node version
59
+ * @returns {string} - Upgrade instructions
60
+ */
61
+ function suggestNodeUpgrade(currentVersion, requiredVersion) {
62
+ // TODO: OS-specific instructions
63
+ return `Please upgrade Node.js from ${currentVersion} to ${requiredVersion}+`;
64
+ }
65
+
66
+ /**
67
+ * Check common issues
68
+ *
69
+ * @returns {Promise<string[]>} - List of detected issues
70
+ */
71
+ async function checkCommonIssues() {
72
+ const issues = [];
73
+
74
+ // TODO: Check for:
75
+ // - Old Node version
76
+ // - Missing Git
77
+ // - Write permission in project root
78
+ // - Disk space
79
+ // - Network connectivity
80
+
81
+ return issues;
82
+ }
83
+
84
+ module.exports = {
85
+ diagnose,
86
+ fixPermissions,
87
+ suggestNodeUpgrade,
88
+ checkCommonIssues
89
+ };
@@ -0,0 +1,198 @@
1
+ /**
2
+ * VALIDATOR Module
3
+ *
4
+ * Validates BYAN installation with 10 automated checks.
5
+ *
6
+ * Phase 4: 32h development
7
+ *
8
+ * @module yanstaller/validator
9
+ */
10
+
11
+ /**
12
+ * @typedef {Object} ValidationResult
13
+ * @property {boolean} success - All checks passed
14
+ * @property {CheckResult[]} checks - Individual check results
15
+ * @property {string[]} errors - Critical errors
16
+ * @property {string[]} warnings - Non-critical issues
17
+ */
18
+
19
+ /**
20
+ * @typedef {Object} CheckResult
21
+ * @property {string} id - Check identifier
22
+ * @property {string} name - Human-readable check name
23
+ * @property {boolean} passed
24
+ * @property {string} [message] - Error/warning message if failed
25
+ * @property {string} severity - 'critical' | 'warning'
26
+ */
27
+
28
+ /**
29
+ * Validate BYAN installation
30
+ *
31
+ * @param {import('./installer').InstallConfig} config - Installation config
32
+ * @returns {Promise<ValidationResult>}
33
+ */
34
+ async function validate(config) {
35
+ const checks = [];
36
+ const errors = [];
37
+ const warnings = [];
38
+
39
+ // TODO: Run all 10 checks
40
+ checks.push(await checkBmadStructure(config));
41
+ checks.push(await checkAgentFiles(config));
42
+ checks.push(await checkStubsYamlFrontmatter(config));
43
+ checks.push(await checkConfigFiles(config));
44
+ checks.push(await checkPlatformDetection(config));
45
+ checks.push(await checkFilePermissions(config));
46
+ checks.push(await checkManifests(config));
47
+ checks.push(await checkWorkflows(config));
48
+ checks.push(await checkTemplates(config));
49
+ checks.push(await checkDependencies(config));
50
+
51
+ const allPassed = checks.every(c => c.passed || c.severity === 'warning');
52
+
53
+ return {
54
+ success: allPassed,
55
+ checks,
56
+ errors,
57
+ warnings
58
+ };
59
+ }
60
+
61
+ /**
62
+ * Check 1: _bmad/ structure exists
63
+ */
64
+ async function checkBmadStructure(config) {
65
+ // TODO: Verify directories exist
66
+ return {
67
+ id: 'bmad-structure',
68
+ name: '_bmad/ structure',
69
+ passed: true,
70
+ severity: 'critical'
71
+ };
72
+ }
73
+
74
+ /**
75
+ * Check 2: Agent files copied correctly
76
+ */
77
+ async function checkAgentFiles(config) {
78
+ // TODO: Verify all agent .md files exist
79
+ return {
80
+ id: 'agent-files',
81
+ name: 'Agent files',
82
+ passed: true,
83
+ severity: 'critical'
84
+ };
85
+ }
86
+
87
+ /**
88
+ * Check 3: Platform stubs have valid YAML frontmatter
89
+ */
90
+ async function checkStubsYamlFrontmatter(config) {
91
+ // TODO: Parse YAML frontmatter in .github/agents/*.md
92
+ return {
93
+ id: 'yaml-frontmatter',
94
+ name: 'YAML frontmatter',
95
+ passed: true,
96
+ severity: 'critical'
97
+ };
98
+ }
99
+
100
+ /**
101
+ * Check 4: Module config files valid
102
+ */
103
+ async function checkConfigFiles(config) {
104
+ // TODO: Verify config.yaml files
105
+ return {
106
+ id: 'config-files',
107
+ name: 'Config files',
108
+ passed: true,
109
+ severity: 'critical'
110
+ };
111
+ }
112
+
113
+ /**
114
+ * Check 5: Platform detection works
115
+ */
116
+ async function checkPlatformDetection(config) {
117
+ // TODO: Test agent detection on each platform
118
+ return {
119
+ id: 'platform-detection',
120
+ name: 'Platform detection',
121
+ passed: true,
122
+ severity: 'critical'
123
+ };
124
+ }
125
+
126
+ /**
127
+ * Check 6: File permissions correct
128
+ */
129
+ async function checkFilePermissions(config) {
130
+ // TODO: Verify read/write permissions
131
+ return {
132
+ id: 'file-permissions',
133
+ name: 'File permissions',
134
+ passed: true,
135
+ severity: 'warning'
136
+ };
137
+ }
138
+
139
+ /**
140
+ * Check 7: Manifest files valid
141
+ */
142
+ async function checkManifests(config) {
143
+ // TODO: Verify agent-manifest.csv, workflow-manifest.csv
144
+ return {
145
+ id: 'manifests',
146
+ name: 'Manifest files',
147
+ passed: true,
148
+ severity: 'warning'
149
+ };
150
+ }
151
+
152
+ /**
153
+ * Check 8: Workflows accessible
154
+ */
155
+ async function checkWorkflows(config) {
156
+ // TODO: Verify workflow files exist
157
+ return {
158
+ id: 'workflows',
159
+ name: 'Workflow files',
160
+ passed: true,
161
+ severity: 'warning'
162
+ };
163
+ }
164
+
165
+ /**
166
+ * Check 9: Templates valid
167
+ */
168
+ async function checkTemplates(config) {
169
+ // TODO: Verify templates/ structure
170
+ return {
171
+ id: 'templates',
172
+ name: 'Template files',
173
+ passed: true,
174
+ severity: 'warning'
175
+ };
176
+ }
177
+
178
+ /**
179
+ * Check 10: Dependencies installed
180
+ */
181
+ async function checkDependencies(config) {
182
+ // TODO: Verify npm dependencies
183
+ return {
184
+ id: 'dependencies',
185
+ name: 'Dependencies',
186
+ passed: true,
187
+ severity: 'critical'
188
+ };
189
+ }
190
+
191
+ module.exports = {
192
+ validate,
193
+ checkBmadStructure,
194
+ checkAgentFiles,
195
+ checkStubsYamlFrontmatter,
196
+ checkConfigFiles,
197
+ checkPlatformDetection
198
+ };
@@ -0,0 +1,109 @@
1
+ /**
2
+ * WIZARD Module
3
+ *
4
+ * Post-installation wizard with 3 options: Create agent / Test / Exit.
5
+ *
6
+ * Phase 7: 16h development
7
+ *
8
+ * @module yanstaller/wizard
9
+ */
10
+
11
+ const inquirer = require('inquirer');
12
+ const logger = require('../utils/logger');
13
+
14
+ /**
15
+ * Show post-install wizard
16
+ *
17
+ * @param {import('./installer').InstallConfig} config - Installation config
18
+ * @returns {Promise<void>}
19
+ */
20
+ async function show(config) {
21
+ logger.success('\n✅ BYAN installed successfully!\n');
22
+
23
+ const choices = [
24
+ { name: '🎨 Create your first agent (BYAN interview)', value: 'create' },
25
+ { name: '🧪 Test an installed agent', value: 'test' },
26
+ { name: '🚪 Exit (start using BYAN)', value: 'exit' }
27
+ ];
28
+
29
+ const answer = await inquirer.prompt([
30
+ {
31
+ type: 'list',
32
+ name: 'action',
33
+ message: 'What would you like to do next?',
34
+ choices
35
+ }
36
+ ]);
37
+
38
+ switch (answer.action) {
39
+ case 'create':
40
+ await launchByanInterview();
41
+ break;
42
+ case 'test':
43
+ await testAgent(config);
44
+ break;
45
+ case 'exit':
46
+ showExitMessage(config);
47
+ break;
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Launch BYAN intelligent interview
53
+ *
54
+ * @returns {Promise<void>}
55
+ */
56
+ async function launchByanInterview() {
57
+ logger.info('\nLaunching BYAN intelligent interview...');
58
+ // TODO: Exec `@bmad-agent-byan` or similar
59
+ logger.info('To create an agent, run: @bmad-agent-byan');
60
+ }
61
+
62
+ /**
63
+ * Test installed agent
64
+ *
65
+ * @param {import('./installer').InstallConfig} config - Installation config
66
+ * @returns {Promise<void>}
67
+ */
68
+ async function testAgent(config) {
69
+ const agentChoices = config.agents.map(name => ({
70
+ name: `@bmad-agent-${name}`,
71
+ value: name
72
+ }));
73
+
74
+ const answer = await inquirer.prompt([
75
+ {
76
+ type: 'list',
77
+ name: 'agent',
78
+ message: 'Which agent would you like to test?',
79
+ choices: agentChoices
80
+ }
81
+ ]);
82
+
83
+ logger.info(`\nTo activate ${answer.agent}, run: @bmad-agent-${answer.agent}`);
84
+ }
85
+
86
+ /**
87
+ * Show exit message with next steps
88
+ *
89
+ * @param {import('./installer').InstallConfig} config - Installation config
90
+ */
91
+ function showExitMessage(config) {
92
+ logger.info('\n🎉 You\'re all set! Here\'s how to get started:\n');
93
+ logger.info('1. Activate an agent:');
94
+ logger.info(' @bmad-agent-byan (Create new agents)');
95
+ logger.info(' @bmad-agent-bmm-pm (Project management)');
96
+ logger.info(' @bmad-agent-bmm-dev (Development)\n');
97
+ logger.info('2. Get help anytime:');
98
+ logger.info(' /bmad-help\n');
99
+ logger.info('3. Documentation:');
100
+ logger.info(' Check _bmad/README.md\n');
101
+ logger.info('Happy building! 🚀\n');
102
+ }
103
+
104
+ module.exports = {
105
+ show,
106
+ launchByanInterview,
107
+ testAgent,
108
+ showExitMessage
109
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-byan-agent",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "BYAN v2.2.2 - Intelligent AI agent installer with multi-platform native support (GitHub Copilot CLI, Claude Code, Codex/OpenCode)",
5
5
  "bin": {
6
6
  "create-byan-agent": "bin/create-byan-agent-v2.js"
@@ -51,8 +51,10 @@
51
51
  },
52
52
  "files": [
53
53
  "bin/",
54
+ "lib/",
54
55
  "src/",
55
56
  "templates/",
57
+ "setup-turbo-whisper.js",
56
58
  "README.md",
57
59
  "CHANGELOG.md",
58
60
  "LICENSE"