create-byan-agent 2.23.0 → 2.26.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/CHANGELOG.md +230 -0
- package/README.md +9 -12
- package/install/bin/create-byan-agent-v2.js +29 -169
- package/install/lib/agent-generator.js +5 -5
- package/install/lib/byan-web-integration.js +1 -1
- package/install/lib/claude-native-setup.js +1 -1
- package/install/lib/phase2-chat.js +3 -10
- package/install/lib/platforms/claude-code.js +2 -2
- package/install/lib/platforms/index.js +0 -2
- package/install/lib/project-agents-generator.js +3 -3
- package/install/lib/staging-consent.js +3 -3
- package/install/lib/subagent-generator.js +3 -3
- package/install/lib/yanstaller/agent-launcher.js +1 -27
- package/install/lib/yanstaller/detector.js +4 -4
- package/install/lib/yanstaller/installer.js +0 -2
- package/install/lib/yanstaller/interviewer.js +1 -1
- package/install/lib/yanstaller/platform-selector.js +1 -13
- package/install/package.json +1 -1
- package/install/src/byan-v2/context/session-state.js +2 -2
- package/install/src/byan-v2/index.js +2 -6
- package/install/src/byan-v2/orchestrator/generation-state.js +4 -4
- package/install/src/webui/api.js +0 -2
- package/install/src/webui/chat/bridge.js +1 -13
- package/install/src/webui/chat/cli-detector.js +0 -23
- package/install/src/webui/public/app.js +1 -3
- package/install/src/webui/public/chat.html +0 -2
- package/install/src/webui/public/chat.js +0 -1
- package/install/src/webui/public/index.html +2 -2
- package/install/templates/.claude/CLAUDE.md +13 -2
- package/install/templates/.claude/agents/bmad-byan.md +1 -1
- package/install/templates/.claude/hooks/autobench-stop-guard.js +286 -0
- package/install/templates/.claude/hooks/drain-advisory.js +85 -0
- package/install/templates/.claude/hooks/fact-check-absolutes.js +1 -61
- package/install/templates/.claude/hooks/fact-check-claims.js +69 -0
- package/install/templates/.claude/hooks/fd-response-check.js +37 -46
- package/install/templates/.claude/hooks/inject-soul.js +64 -25
- package/install/templates/.claude/hooks/leantime-fd-sync.js +216 -0
- package/install/templates/.claude/hooks/lib/autobench-config.json +81 -0
- package/install/templates/.claude/hooks/lib/autobench-fc-enrich.js +251 -0
- package/install/templates/.claude/hooks/lib/autobench-ledger-report.js +253 -0
- package/install/templates/.claude/hooks/lib/autobench-runtime.js +199 -0
- package/install/templates/.claude/hooks/lib/fact-check-core.js +69 -0
- package/install/templates/.claude/hooks/lib/failure-detector.js +18 -4
- package/install/templates/.claude/hooks/lib/transcript-read.js +137 -0
- package/install/templates/.claude/hooks/soul-memory-check.js +49 -25
- package/install/templates/.claude/hooks/soul-memory-triggers.js +27 -8
- package/install/templates/.claude/hooks/stage-to-byan.js +25 -7
- package/install/templates/.claude/hooks/strict-stop-guard.js +4 -16
- package/install/templates/.claude/rules/benchmark.md +251 -0
- package/install/templates/.claude/rules/byan-agents.md +0 -1
- package/install/templates/.claude/rules/byan-api.md +64 -0
- package/install/templates/.claude/rules/fact-check.md +1 -1
- package/install/templates/.claude/rules/strict-mode.md +10 -9
- package/install/templates/.claude/settings.json +16 -0
- package/install/templates/.claude/skills/byan-benchmark/SKILL.md +159 -0
- package/install/templates/.claude/skills/byan-byan/SKILL.md +73 -12
- package/install/templates/.claude/skills/byan-fact-check/SKILL.md +1 -1
- package/install/templates/.claude/skills/byan-hermes-dispatch/SKILL.md +5 -6
- package/install/templates/.claude/skills/byan-insight/SKILL.md +56 -0
- package/install/templates/.claude/skills/byan-orchestrate/SKILL.md +11 -3
- package/install/templates/.claude/skills/byan-strict/SKILL.md +4 -1
- package/install/templates/.claude/workflows/INDEX.md +2 -1
- package/install/templates/.claude/workflows/byan-benchmark.js +328 -0
- package/install/templates/.claude/workflows/check-implementation-readiness.js +1 -1
- package/install/templates/_byan/_config/agent-manifest.csv +1 -1
- package/install/templates/_byan/_config/autobench.yaml +510 -0
- package/install/templates/_byan/_config/strict-mode.yaml +9 -3
- package/install/templates/_byan/_config/workflow-manifest.csv +1 -0
- package/install/templates/_byan/agent/byan/byan.md +1 -3
- package/install/templates/_byan/agent/byan-flat/byan.md +1 -3
- package/install/templates/_byan/agent/byan-test/byan-test.md +2 -2
- package/install/templates/_byan/agent/byan-test-flat/byan-test.md +2 -2
- package/install/templates/_byan/agent/byan.optimized/byan.optimized.md +2 -2
- package/install/templates/_byan/agent/byan.optimized-v2/byan.optimized-v2.md +2 -2
- package/install/templates/_byan/agent/claude/claude.md +0 -2
- package/install/templates/_byan/agent/codex/codex.md +0 -2
- package/install/templates/_byan/agent/rachid/rachid.md +2 -10
- package/install/templates/_byan/agent/rachid-flat/rachid.md +2 -11
- package/install/templates/_byan/agent/turbo-whisper/turbo-whisper.md +2 -5
- package/install/templates/_byan/agent/turbo-whisper-integration/turbo-whisper-integration.md +5 -13
- package/install/templates/_byan/agent/yanstaller/yanstaller.md +2 -24
- package/install/templates/_byan/config.yaml +0 -1
- package/install/templates/_byan/core/activation/soul-activation.md +3 -3
- package/install/templates/_byan/mcp/byan-mcp-server/bin/byan-insight-digest.js +31 -0
- package/install/templates/_byan/mcp/byan-mcp-server/bin/byan-sync-rules.js +20 -4
- package/install/templates/_byan/mcp/byan-mcp-server/lib/advisory-autofeed.js +96 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/index-generator.js +1 -1
- package/install/templates/_byan/mcp/byan-mcp-server/lib/insight-harvest.js +220 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/kanban.js +6 -3
- package/install/templates/_byan/mcp/byan-mcp-server/lib/leantime-fd-core.js +205 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/leantime-sync.js +415 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/outcome-buffer.js +64 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/precommit-gate.js +1 -1
- package/install/templates/_byan/mcp/byan-mcp-server/lib/strict-activation.js +1 -1
- package/install/templates/_byan/mcp/byan-mcp-server/lib/strict-mode.js +8 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/sync-rules.js +172 -23
- package/install/templates/_byan/mcp/byan-mcp-server/lib/workflows-generator.js +1 -0
- package/install/templates/_byan/mcp/byan-mcp-server/server.js +262 -81
- package/install/templates/_byan/worker/launchers/README.md +4 -24
- package/install/templates/_byan/worker/workers.md +8 -9
- package/install/templates/_byan/workflow/simple/bmb/byan-benchmark/workflow.md +86 -0
- package/install/templates/_byan/workflow/simple/byan/feature-workflow.md +2 -2
- package/install/templates/docs/leantime-integration.md +160 -0
- package/package.json +3 -7
- package/src/byan-v2/context/session-state.js +2 -2
- package/src/byan-v2/generation/mantra-validator.js +3 -3
- package/src/byan-v2/index.js +1 -5
- package/src/byan-v2/integration/voice-integration.js +1 -1
- package/src/byan-v2/orchestrator/generation-state.js +4 -4
- package/src/loadbalancer/loadbalancer.js +1 -1
- package/src/staging/staging.js +20 -6
- package/install/bin/build-copilot-stubs.js +0 -138
- package/install/lib/platforms/copilot-cli.js +0 -123
- package/install/lib/platforms/vscode.js +0 -51
- package/install/src/byan-v2/context/copilot-context.js +0 -79
- package/install/src/webui/chat/copilot-adapter.js +0 -68
- package/install/templates/.claude/agents/bmad-marc.md +0 -25
- package/install/templates/.claude/skills/byan-marc/SKILL.md +0 -20
- package/install/templates/.github/agents/bmad-agent-bmad-master.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmb-agent-builder.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmb-module-builder.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmb-workflow-builder.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-analyst.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-architect.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-dev.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-pm.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-quick-flow-solo-dev.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-quinn.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-sm.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-tech-writer.md +0 -16
- package/install/templates/.github/agents/bmad-agent-bmm-ux-designer.md +0 -16
- package/install/templates/.github/agents/bmad-agent-byan-test.md +0 -33
- package/install/templates/.github/agents/bmad-agent-byan-v2.md +0 -44
- package/install/templates/.github/agents/bmad-agent-byan.md +0 -1062
- package/install/templates/.github/agents/bmad-agent-carmack.md +0 -14
- package/install/templates/.github/agents/bmad-agent-cis-brainstorming-coach.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-creative-problem-solver.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-design-thinking-coach.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-innovation-strategist.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-presentation-master.md +0 -16
- package/install/templates/.github/agents/bmad-agent-cis-storyteller.md +0 -16
- package/install/templates/.github/agents/bmad-agent-claude.md +0 -49
- package/install/templates/.github/agents/bmad-agent-codex.md +0 -49
- package/install/templates/.github/agents/bmad-agent-drawio.md +0 -45
- package/install/templates/.github/agents/bmad-agent-fact-checker.md +0 -16
- package/install/templates/.github/agents/bmad-agent-forgeron.md +0 -15
- package/install/templates/.github/agents/bmad-agent-jimmy.md +0 -15
- package/install/templates/.github/agents/bmad-agent-marc.md +0 -49
- package/install/templates/.github/agents/bmad-agent-mike.md +0 -15
- package/install/templates/.github/agents/bmad-agent-patnote.md +0 -49
- package/install/templates/.github/agents/bmad-agent-rachid.md +0 -48
- package/install/templates/.github/agents/bmad-agent-skeptic.md +0 -16
- package/install/templates/.github/agents/bmad-agent-tao.md +0 -14
- package/install/templates/.github/agents/bmad-agent-tea-tea.md +0 -16
- package/install/templates/.github/agents/bmad-agent-test-dynamic.md +0 -22
- package/install/templates/.github/agents/bmad-agent-yanstaller-interview.md +0 -50
- package/install/templates/.github/agents/bmad-agent-yanstaller-phase2.md +0 -189
- package/install/templates/.github/agents/bmad-agent-yanstaller.md +0 -350
- package/install/templates/.github/agents/expert-merise-agile.md +0 -178
- package/install/templates/.github/agents/franck.md +0 -379
- package/install/templates/.github/agents/hermes.md +0 -575
- package/install/templates/.github/extensions/byan-staging/extension.mjs +0 -169
- package/install/templates/.github/extensions/byan-staging/package.json +0 -8
- package/install/templates/_byan/agent/marc/marc-soul.md +0 -47
- package/install/templates/_byan/agent/marc/marc-tao.md +0 -77
- package/install/templates/_byan/agent/marc/marc.md +0 -324
- package/install/templates/_byan/agent/marc-flat/marc.md +0 -387
- package/install/templates/_byan/mcp/byan-mcp-server/lib/copilot.js +0 -148
- package/install/templates/_byan/worker/launchers/launch-yanstaller-copilot.md +0 -173
- package/install/templates/workers/cost-optimizer.js +0 -169
- package/src/byan-v2/context/copilot-context.js +0 -79
- package/src/core/dispatcher/execution-router.js +0 -66
|
@@ -177,31 +177,10 @@ async function copyV2Runtime(templateDir, projectRoot, spinner) {
|
|
|
177
177
|
// Detects SYSTEM binaries, not project folders (.codex, .github/agents are created by yanstaller)
|
|
178
178
|
async function detectPlatforms() {
|
|
179
179
|
const platforms = {
|
|
180
|
-
copilot: false,
|
|
181
180
|
codex: false,
|
|
182
181
|
claude: false
|
|
183
182
|
};
|
|
184
|
-
|
|
185
|
-
// GitHub Copilot CLI detection (binary + config)
|
|
186
|
-
try {
|
|
187
|
-
const result = execSync('which copilot 2>/dev/null', { encoding: 'utf8' }).trim();
|
|
188
|
-
if (result) {
|
|
189
|
-
platforms.copilot = true;
|
|
190
|
-
}
|
|
191
|
-
} catch (e) {
|
|
192
|
-
// Fallback: check config directory (means it was installed)
|
|
193
|
-
const copilotPaths = [
|
|
194
|
-
path.join(os.homedir(), '.config', 'github-copilot'),
|
|
195
|
-
path.join(os.homedir(), '.config', 'copilot')
|
|
196
|
-
];
|
|
197
|
-
for (const p of copilotPaths) {
|
|
198
|
-
if (fs.existsSync(p)) {
|
|
199
|
-
platforms.copilot = true;
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
183
|
+
|
|
205
184
|
// Codex detection (binary + config, NOT project .codex/ folder)
|
|
206
185
|
try {
|
|
207
186
|
const result = execSync('which codex 2>/dev/null', { encoding: 'utf8' }).trim();
|
|
@@ -393,7 +372,6 @@ async function install(options = {}) {
|
|
|
393
372
|
platformSpinner.succeed('Platform detection complete');
|
|
394
373
|
|
|
395
374
|
console.log(chalk.cyan('\n📦 Installed Platforms:'));
|
|
396
|
-
console.log(` GitHub Copilot CLI: ${detectedPlatforms.copilot ? chalk.green('✓ Detected') : chalk.gray('✗ Not found')}`);
|
|
397
375
|
console.log(` OpenAI Codex: ${detectedPlatforms.codex ? chalk.green('✓ Detected') : chalk.gray('✗ Not found')}`);
|
|
398
376
|
console.log(` Claude Code: ${detectedPlatforms.claude ? chalk.green('✓ Detected') : chalk.gray('✗ Not found')}`);
|
|
399
377
|
console.log('');
|
|
@@ -440,12 +418,10 @@ async function install(options = {}) {
|
|
|
440
418
|
|
|
441
419
|
// Step 1: Select target platform(s)
|
|
442
420
|
const availableManualPlatforms = [];
|
|
443
|
-
if (detectedPlatforms.copilot) availableManualPlatforms.push({ name: '🤖 GitHub Copilot CLI (agents: .github/agents/)', value: 'copilot' });
|
|
444
421
|
if (detectedPlatforms.codex) availableManualPlatforms.push({ name: '🔷 OpenAI Codex (skills: .codex/prompts/)', value: 'codex' });
|
|
445
422
|
if (detectedPlatforms.claude) availableManualPlatforms.push({ name: '🧠 Claude Code (rules: .claude/)', value: 'claude' });
|
|
446
423
|
|
|
447
424
|
// Always allow manual selection even if not detected
|
|
448
|
-
if (!detectedPlatforms.copilot) availableManualPlatforms.push({ name: '🤖 GitHub Copilot CLI (not detected)', value: 'copilot' });
|
|
449
425
|
if (!detectedPlatforms.codex) availableManualPlatforms.push({ name: '🔷 OpenAI Codex (not detected)', value: 'codex' });
|
|
450
426
|
if (!detectedPlatforms.claude) availableManualPlatforms.push({ name: '🧠 Claude Code (not detected)', value: 'claude' });
|
|
451
427
|
|
|
@@ -471,7 +447,6 @@ async function install(options = {}) {
|
|
|
471
447
|
],
|
|
472
448
|
'Core - Platform Specialists': (() => {
|
|
473
449
|
const specialists = [];
|
|
474
|
-
if (manualPlatforms.includes('copilot')) specialists.push({ name: 'marc', label: 'Marc - GitHub Copilot CLI Specialist [workflow agent]', checked: true });
|
|
475
450
|
if (manualPlatforms.includes('claude')) specialists.push({ name: 'claude', label: 'Claude - Claude Code Integration Specialist [workflow agent]', checked: true });
|
|
476
451
|
if (manualPlatforms.includes('codex')) specialists.push({ name: 'codex', label: 'Codex - OpenCode/Codex Integration Specialist [workflow agent]', checked: true });
|
|
477
452
|
return specialists;
|
|
@@ -656,7 +631,7 @@ async function install(options = {}) {
|
|
|
656
631
|
// Build prompt for yanstaller agent with interview data + detected platforms
|
|
657
632
|
const interviewPrompt = [
|
|
658
633
|
`Analyse ce profil utilisateur et retourne UNIQUEMENT un JSON de recommandations.`,
|
|
659
|
-
`DETECTED PLATFORMS:
|
|
634
|
+
`DETECTED PLATFORMS: codex=${detectedPlatforms.codex}, claude=${detectedPlatforms.claude}`,
|
|
660
635
|
`PROJECT: type=${interviewAnswers.projectType}, domain=${interviewAnswers.domain}`,
|
|
661
636
|
`OBJECTIVES: ${interviewAnswers.objectives.join(',')}`,
|
|
662
637
|
`TEAM: ${interviewAnswers.teamSize}, EXPERIENCE: ${interviewAnswers.experience}`,
|
|
@@ -671,19 +646,9 @@ async function install(options = {}) {
|
|
|
671
646
|
|
|
672
647
|
// Calculate model for interview analysis based on complexity
|
|
673
648
|
const interviewComplexity = interviewAnswers.quality === 'critical' ? 'claude-haiku-4.5' : 'gpt-5-mini';
|
|
674
|
-
|
|
675
|
-
// Pre-copy interview-only agent stub for Copilot CLI (requires .github/agents/ in CWD)
|
|
676
|
-
// This stub is self-contained - no external workflow references
|
|
649
|
+
|
|
677
650
|
// Codex and Claude use direct prompt execution, no agent stub needed
|
|
678
|
-
|
|
679
|
-
const earlyGithubDir = path.join(projectRoot, '.github', 'agents');
|
|
680
|
-
const interviewAgentSource = path.join(templateDir, '.github', 'agents', 'bmad-agent-yanstaller-interview.md');
|
|
681
|
-
if (await fs.pathExists(interviewAgentSource)) {
|
|
682
|
-
await fs.ensureDir(earlyGithubDir);
|
|
683
|
-
await fs.copy(interviewAgentSource, path.join(earlyGithubDir, 'bmad-agent-yanstaller-interview.md'), { overwrite: true });
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
|
|
651
|
+
|
|
687
652
|
// Write prompt to temp file to avoid shell escaping issues
|
|
688
653
|
const promptFile = path.join(projectRoot, '.yanstaller-prompt.tmp');
|
|
689
654
|
await fs.writeFile(promptFile, interviewPrompt, 'utf8');
|
|
@@ -693,7 +658,7 @@ async function install(options = {}) {
|
|
|
693
658
|
const promptContent = await fs.readFile(promptFile, 'utf8');
|
|
694
659
|
let hasAgent = false;
|
|
695
660
|
|
|
696
|
-
if (detectedPlatforms.
|
|
661
|
+
if (detectedPlatforms.codex || detectedPlatforms.claude) {
|
|
697
662
|
hasAgent = true;
|
|
698
663
|
const agentSpinner = ora(`Analysing with yanstaller agent (${interviewComplexity})...`).start();
|
|
699
664
|
|
|
@@ -708,14 +673,7 @@ async function install(options = {}) {
|
|
|
708
673
|
if (isWindows) spawnOpts.shell = true;
|
|
709
674
|
|
|
710
675
|
let res;
|
|
711
|
-
if (detectedPlatforms.
|
|
712
|
-
res = spawnSync('copilot', [
|
|
713
|
-
'--agent=bmad-agent-yanstaller-interview',
|
|
714
|
-
'-p', promptContent,
|
|
715
|
-
'--model', interviewComplexity,
|
|
716
|
-
'-s'
|
|
717
|
-
], spawnOpts);
|
|
718
|
-
} else if (detectedPlatforms.codex) {
|
|
676
|
+
if (detectedPlatforms.codex) {
|
|
719
677
|
res = spawnSync('codex', ['exec', promptContent], spawnOpts);
|
|
720
678
|
} else if (detectedPlatforms.claude) {
|
|
721
679
|
res = spawnSync('claude', ['-p', promptContent], spawnOpts);
|
|
@@ -801,7 +759,7 @@ async function install(options = {}) {
|
|
|
801
759
|
} else if (!hasAgent) {
|
|
802
760
|
// No AI platform detected - build from interview data
|
|
803
761
|
interviewResults = {
|
|
804
|
-
platforms: ['
|
|
762
|
+
platforms: ['claude'],
|
|
805
763
|
turboWhisper: {
|
|
806
764
|
mode: interviewAnswers.gpu.startsWith('yes') && (interviewAnswers.objectives.includes('voice') || interviewAnswers.frequency === 'daily') ? 'docker' :
|
|
807
765
|
interviewAnswers.objectives.includes('voice') || interviewAnswers.frequency === 'daily' ? 'local' : 'skip',
|
|
@@ -857,7 +815,6 @@ async function install(options = {}) {
|
|
|
857
815
|
console.log(chalk.green(` ✓ ${p} - Recommandé par yanstaller`));
|
|
858
816
|
});
|
|
859
817
|
} else {
|
|
860
|
-
if (detectedPlatforms.copilot) { recommendedPlatforms.push('copilot'); console.log(chalk.green(' ✓ GitHub Copilot CLI - Détecté')); }
|
|
861
818
|
if (detectedPlatforms.codex) { recommendedPlatforms.push('codex'); console.log(chalk.green(' ✓ Codex - Détecté')); }
|
|
862
819
|
if (detectedPlatforms.claude) { recommendedPlatforms.push('claude'); console.log(chalk.green(' ✓ Claude Code - Détecté')); }
|
|
863
820
|
}
|
|
@@ -889,7 +846,6 @@ async function install(options = {}) {
|
|
|
889
846
|
let selectedPlatform = null;
|
|
890
847
|
const availablePlatforms = [];
|
|
891
848
|
|
|
892
|
-
if (detectedPlatforms.copilot) availablePlatforms.push({ name: '🤖 GitHub Copilot CLI', value: 'copilot' });
|
|
893
849
|
if (detectedPlatforms.codex) availablePlatforms.push({ name: '🔷 OpenAI Codex', value: 'codex' });
|
|
894
850
|
if (detectedPlatforms.claude) availablePlatforms.push({ name: '🧠 Claude Code (Anthropic)', value: 'claude' });
|
|
895
851
|
|
|
@@ -899,7 +855,7 @@ async function install(options = {}) {
|
|
|
899
855
|
name: 'platform',
|
|
900
856
|
message: 'Quelle plateforme IA utiliser pour Phase 2?',
|
|
901
857
|
choices: availablePlatforms,
|
|
902
|
-
default: '
|
|
858
|
+
default: 'claude'
|
|
903
859
|
}]);
|
|
904
860
|
selectedPlatform = platform;
|
|
905
861
|
} else if (availablePlatforms.length === 1) {
|
|
@@ -933,14 +889,7 @@ async function install(options = {}) {
|
|
|
933
889
|
const spawnOpts = { encoding: 'utf8', timeout: 15000, stdio: 'pipe' };
|
|
934
890
|
if (isWindows) spawnOpts.shell = true;
|
|
935
891
|
|
|
936
|
-
if (selectedPlatform === '
|
|
937
|
-
// copilot --version to check if CLI is available
|
|
938
|
-
authCheckCmd = 'copilot';
|
|
939
|
-
authCheckArgs = ['--version'];
|
|
940
|
-
loginInstructions = [
|
|
941
|
-
`${chalk.cyan('copilot auth')}`
|
|
942
|
-
];
|
|
943
|
-
} else if (selectedPlatform === 'codex') {
|
|
892
|
+
if (selectedPlatform === 'codex') {
|
|
944
893
|
// codex --version as basic check (no auth status command available)
|
|
945
894
|
authCheckCmd = 'codex';
|
|
946
895
|
authCheckArgs = ['--version'];
|
|
@@ -978,9 +927,7 @@ async function install(options = {}) {
|
|
|
978
927
|
console.log(chalk.bold(' Pour vous connecter:'));
|
|
979
928
|
|
|
980
929
|
let loginInstructions;
|
|
981
|
-
if (selectedPlatform === '
|
|
982
|
-
loginInstructions = [`${chalk.cyan('copilot auth')}`];
|
|
983
|
-
} else if (selectedPlatform === 'codex') {
|
|
930
|
+
if (selectedPlatform === 'codex') {
|
|
984
931
|
loginInstructions = [`${chalk.cyan('codex login')}`];
|
|
985
932
|
} else if (selectedPlatform === 'claude') {
|
|
986
933
|
loginInstructions = [
|
|
@@ -1095,7 +1042,7 @@ async function install(options = {}) {
|
|
|
1095
1042
|
}
|
|
1096
1043
|
}
|
|
1097
1044
|
|
|
1098
|
-
autoSelectPlatform = recommendedPlatforms[0] || '
|
|
1045
|
+
autoSelectPlatform = recommendedPlatforms[0] || 'claude';
|
|
1099
1046
|
}
|
|
1100
1047
|
|
|
1101
1048
|
// Step 3: Platform selection (skip in MANUAL mode - already selected)
|
|
@@ -1109,18 +1056,15 @@ async function install(options = {}) {
|
|
|
1109
1056
|
console.log('');
|
|
1110
1057
|
} else {
|
|
1111
1058
|
const platformChoices = [
|
|
1112
|
-
{ name: `GitHub Copilot CLI ${detectedPlatforms.copilot ? chalk.green('(✓ Detected)') : ''}`, value: 'copilot' },
|
|
1113
|
-
{ name: `VSCode`, value: 'vscode' },
|
|
1114
1059
|
{ name: `Claude Code ${detectedPlatforms.claude ? chalk.green('(✓ Detected)') : ''}`, value: 'claude' },
|
|
1115
1060
|
{ name: `Codex ${detectedPlatforms.codex ? chalk.green('(✓ Detected)') : ''}`, value: 'codex' },
|
|
1116
1061
|
{ name: 'All platforms', value: 'all' }
|
|
1117
1062
|
];
|
|
1118
|
-
|
|
1063
|
+
|
|
1119
1064
|
// Auto-select first detected platform as default (or use interview recommendation)
|
|
1120
1065
|
const defaultPlatform = (installMode === 'custom' && autoSelectPlatform) ? autoSelectPlatform :
|
|
1121
|
-
(detectedPlatforms.
|
|
1122
|
-
detectedPlatforms.
|
|
1123
|
-
detectedPlatforms.claude ? 'claude' : 'copilot');
|
|
1066
|
+
(detectedPlatforms.codex ? 'codex' :
|
|
1067
|
+
detectedPlatforms.claude ? 'claude' : 'claude');
|
|
1124
1068
|
|
|
1125
1069
|
const platformAnswer = await inquirer.prompt([
|
|
1126
1070
|
{
|
|
@@ -1211,7 +1155,6 @@ async function install(options = {}) {
|
|
|
1211
1155
|
|
|
1212
1156
|
const byanDir = path.join(projectRoot, '_byan');
|
|
1213
1157
|
const bmbDir = path.join(byanDir, 'bmb');
|
|
1214
|
-
const githubAgentsDir = path.join(projectRoot, '.github', 'agents');
|
|
1215
1158
|
const isManual = installMode === 'manual' && manualSelection;
|
|
1216
1159
|
const manualPlatformList = isManual ? manualSelection.platforms : [];
|
|
1217
1160
|
|
|
@@ -1224,11 +1167,9 @@ async function install(options = {}) {
|
|
|
1224
1167
|
await fs.ensureDir(path.join(byanDir, '_output'));
|
|
1225
1168
|
|
|
1226
1169
|
// Create platform directories based on selection
|
|
1227
|
-
const needsCopilot = isManual ? manualPlatformList.includes('copilot') : true;
|
|
1228
1170
|
const needsClaude = isManual ? manualPlatformList.includes('claude') : (detectedPlatforms.claude || platform === 'claude' || platform === 'all');
|
|
1229
1171
|
const needsCodex = isManual ? manualPlatformList.includes('codex') : (detectedPlatforms.codex || platform === 'codex' || platform === 'all');
|
|
1230
|
-
|
|
1231
|
-
if (needsCopilot) await fs.ensureDir(githubAgentsDir);
|
|
1172
|
+
|
|
1232
1173
|
if (needsClaude) await fs.ensureDir(path.join(projectRoot, '.claude', 'rules'));
|
|
1233
1174
|
if (needsCodex) await fs.ensureDir(path.join(projectRoot, '.codex', 'prompts'));
|
|
1234
1175
|
|
|
@@ -1293,73 +1234,7 @@ async function install(options = {}) {
|
|
|
1293
1234
|
// MANUAL mode: Generate stubs only for selected agents on each selected platform
|
|
1294
1235
|
if (isManual && manualSelection) {
|
|
1295
1236
|
const selectedAgents = manualSelection.agents;
|
|
1296
|
-
|
|
1297
|
-
// Agent name to stub filename mapping (must match existing templates)
|
|
1298
|
-
const AGENT_STUB_MAP = {
|
|
1299
|
-
'hermes': 'hermes',
|
|
1300
|
-
'franck': 'franck',
|
|
1301
|
-
'expert-merise-agile': 'expert-merise-agile',
|
|
1302
|
-
'bmad-master': 'bmad-agent-bmad-master',
|
|
1303
|
-
// BMB agents
|
|
1304
|
-
'byan': 'bmad-agent-byan',
|
|
1305
|
-
'agent-builder': 'bmad-agent-bmb-agent-builder',
|
|
1306
|
-
'module-builder': 'bmad-agent-bmb-module-builder',
|
|
1307
|
-
'workflow-builder': 'bmad-agent-bmb-workflow-builder',
|
|
1308
|
-
'marc': 'bmad-agent-marc',
|
|
1309
|
-
'rachid': 'bmad-agent-rachid',
|
|
1310
|
-
'claude': 'bmad-agent-claude',
|
|
1311
|
-
'codex': 'bmad-agent-codex',
|
|
1312
|
-
'drawio': 'bmad-agent-drawio',
|
|
1313
|
-
'turbo-whisper-integration': 'bmad-agent-turbo-whisper-integration',
|
|
1314
|
-
'patnote': 'bmad-agent-patnote',
|
|
1315
|
-
'carmack': 'bmad-agent-carmack',
|
|
1316
|
-
// BMM agents
|
|
1317
|
-
'analyst': 'bmad-agent-bmm-analyst',
|
|
1318
|
-
'pm': 'bmad-agent-bmm-pm',
|
|
1319
|
-
'architect': 'bmad-agent-bmm-architect',
|
|
1320
|
-
'dev': 'bmad-agent-bmm-dev',
|
|
1321
|
-
'sm': 'bmad-agent-bmm-sm',
|
|
1322
|
-
'quinn': 'bmad-agent-bmm-quinn',
|
|
1323
|
-
'ux-designer': 'bmad-agent-bmm-ux-designer',
|
|
1324
|
-
'tech-writer': 'bmad-agent-bmm-tech-writer',
|
|
1325
|
-
'quick-flow-solo-dev': 'bmad-agent-bmm-quick-flow-solo-dev',
|
|
1326
|
-
// TEA
|
|
1327
|
-
'tea': 'bmad-agent-tea-tea',
|
|
1328
|
-
// CIS agents
|
|
1329
|
-
'brainstorming-coach': 'bmad-agent-cis-brainstorming-coach',
|
|
1330
|
-
'creative-problem-solver': 'bmad-agent-cis-creative-problem-solver',
|
|
1331
|
-
'design-thinking-coach': 'bmad-agent-cis-design-thinking-coach',
|
|
1332
|
-
'innovation-strategist': 'bmad-agent-cis-innovation-strategist',
|
|
1333
|
-
'presentation-master': 'bmad-agent-cis-presentation-master',
|
|
1334
|
-
'storyteller': 'bmad-agent-cis-storyteller'
|
|
1335
|
-
};
|
|
1336
|
-
const agentToStubName = (agentName) => AGENT_STUB_MAP[agentName] || `bmad-agent-${agentName}`;
|
|
1337
|
-
|
|
1338
|
-
// --- COPILOT: Copy matching .github/agents/ stubs ---
|
|
1339
|
-
if (manualPlatformList.includes('copilot')) {
|
|
1340
|
-
const githubAgentsSource = path.join(templateDir, '.github', 'agents');
|
|
1341
|
-
let copilotCount = 0;
|
|
1342
|
-
|
|
1343
|
-
if (await fs.pathExists(githubAgentsSource)) {
|
|
1344
|
-
for (const agentName of selectedAgents) {
|
|
1345
|
-
const stubName = agentToStubName(agentName);
|
|
1346
|
-
const sourceFile = path.join(githubAgentsSource, `${stubName}.md`);
|
|
1347
|
-
const destFile = path.join(githubAgentsDir, `${stubName}.md`);
|
|
1348
|
-
|
|
1349
|
-
if (await fs.pathExists(sourceFile)) {
|
|
1350
|
-
await fs.copy(sourceFile, destFile, { overwrite: true });
|
|
1351
|
-
copilotCount++;
|
|
1352
|
-
} else {
|
|
1353
|
-
// Generate stub if no template exists
|
|
1354
|
-
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}/_byan/agent/${agentName}/${agentName}.md (new layout); if absent, {project-root}/_byan/*/agents/${agentName}.md (legacy layout)\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`;
|
|
1355
|
-
await fs.writeFile(destFile, stubContent, 'utf8');
|
|
1356
|
-
copilotCount++;
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
console.log(chalk.green(` ✓ Copilot CLI: ${copilotCount} agent stubs → .github/agents/`));
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1237
|
+
|
|
1363
1238
|
// --- CODEX: Generate .codex/prompts/ skills ---
|
|
1364
1239
|
if (manualPlatformList.includes('codex')) {
|
|
1365
1240
|
const codexPromptsDir = path.join(projectRoot, '.codex', 'prompts');
|
|
@@ -1391,18 +1266,7 @@ async function install(options = {}) {
|
|
|
1391
1266
|
|
|
1392
1267
|
} else {
|
|
1393
1268
|
// AUTO/CUSTOM mode: Copy all platform stubs (existing behavior)
|
|
1394
|
-
|
|
1395
|
-
// Copy .github/agents files
|
|
1396
|
-
const githubAgentsSource = path.join(templateDir, '.github', 'agents');
|
|
1397
|
-
|
|
1398
|
-
if (await fs.pathExists(githubAgentsSource)) {
|
|
1399
|
-
await fs.copy(githubAgentsSource, githubAgentsDir, { overwrite: true });
|
|
1400
|
-
copySpinner.text = 'Copied Copilot CLI agent stubs...';
|
|
1401
|
-
console.log(chalk.green(` ✓ GitHub agents: ${githubAgentsSource} → ${githubAgentsDir}`));
|
|
1402
|
-
} else {
|
|
1403
|
-
copySpinner.warn(`⚠ GitHub agents source not found: ${githubAgentsSource}`);
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1269
|
+
|
|
1406
1270
|
// Copy .claude/ files for Claude Code integration (always includes Hermes)
|
|
1407
1271
|
if (needsClaude) {
|
|
1408
1272
|
const claudeSource = path.join(templateDir, '.claude');
|
|
@@ -1454,7 +1318,7 @@ async function install(options = {}) {
|
|
|
1454
1318
|
}
|
|
1455
1319
|
}
|
|
1456
1320
|
|
|
1457
|
-
if (needsClaude
|
|
1321
|
+
if (needsClaude) {
|
|
1458
1322
|
console.log();
|
|
1459
1323
|
console.log(chalk.cyan('byan_web integration (optional — service payant)'));
|
|
1460
1324
|
let byanWebResult = { configured: false };
|
|
@@ -1674,7 +1538,7 @@ async function install(options = {}) {
|
|
|
1674
1538
|
if (!pkg.scripts) pkg.scripts = {};
|
|
1675
1539
|
|
|
1676
1540
|
if (!pkg.scripts.byan) {
|
|
1677
|
-
pkg.scripts.byan = 'echo "BYAN agent installed. Use:
|
|
1541
|
+
pkg.scripts.byan = 'echo "BYAN agent installed. Use: claude and ask Hermes which agent fits your task"';
|
|
1678
1542
|
}
|
|
1679
1543
|
|
|
1680
1544
|
await fs.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
@@ -1701,10 +1565,6 @@ async function install(options = {}) {
|
|
|
1701
1565
|
|
|
1702
1566
|
// Platform-specific checks based on installation mode
|
|
1703
1567
|
if (isManual) {
|
|
1704
|
-
if (manualPlatformList.includes('copilot')) {
|
|
1705
|
-
checks.push({ name: 'Copilot agents dir', path: githubAgentsDir });
|
|
1706
|
-
checks.push({ name: 'Hermes (Copilot)', path: path.join(githubAgentsDir, 'hermes.md') });
|
|
1707
|
-
}
|
|
1708
1568
|
if (manualPlatformList.includes('codex')) {
|
|
1709
1569
|
checks.push({ name: 'Codex prompts dir', path: path.join(projectRoot, '.codex', 'prompts') });
|
|
1710
1570
|
checks.push({ name: 'Hermes (Codex)', path: path.join(projectRoot, '.codex', 'prompts', 'hermes.md') });
|
|
@@ -1717,8 +1577,11 @@ async function install(options = {}) {
|
|
|
1717
1577
|
);
|
|
1718
1578
|
}
|
|
1719
1579
|
} else {
|
|
1720
|
-
|
|
1721
|
-
|
|
1580
|
+
// Add Codex checks if installed
|
|
1581
|
+
if (needsCodex) {
|
|
1582
|
+
checks.push({ name: 'Codex prompts dir', path: path.join(projectRoot, '.codex', 'prompts') });
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1722
1585
|
// Add Claude Code checks if installed
|
|
1723
1586
|
if (needsClaude) {
|
|
1724
1587
|
checks.push(
|
|
@@ -1820,18 +1683,15 @@ async function install(options = {}) {
|
|
|
1820
1683
|
console.log(chalk.yellow('1. Activate BYAN agent:'));
|
|
1821
1684
|
}
|
|
1822
1685
|
|
|
1823
|
-
if (platform === '
|
|
1824
|
-
console.log(` ${chalk.blue('copilot')}`);
|
|
1825
|
-
console.log(` Then type: ${chalk.blue('/agent')}`);
|
|
1826
|
-
console.log(` Select: ${chalk.cyan('byan')} (create agents)`);
|
|
1827
|
-
} else if (platform === 'vscode') {
|
|
1828
|
-
console.log(' Open VSCode Command Palette (Ctrl+Shift+P)');
|
|
1829
|
-
console.log(' Type: \'Activate BYAN Agent\'');
|
|
1830
|
-
} else if (platform === 'claude') {
|
|
1686
|
+
if (platform === 'claude') {
|
|
1831
1687
|
console.log(` ${chalk.blue('claude')}`);
|
|
1832
1688
|
console.log(` Hermes est integre via ${chalk.cyan('.claude/CLAUDE.md')}`);
|
|
1833
1689
|
console.log(` Demande: ${chalk.cyan('"quel agent pour mon projet?"')} → Hermes repond`);
|
|
1834
1690
|
console.log(` Regles: ${chalk.cyan('.claude/rules/')} (hermes, agents, methodologie)`);
|
|
1691
|
+
} else if (platform === 'codex') {
|
|
1692
|
+
console.log(` ${chalk.blue('codex')}`);
|
|
1693
|
+
console.log(` Skills installes dans ${chalk.cyan('.codex/prompts/')}`);
|
|
1694
|
+
console.log(` Lance: ${chalk.cyan('codex skill hermes')} → Hermes route vers le bon agent`);
|
|
1835
1695
|
} else {
|
|
1836
1696
|
console.log(' Follow your platform\'s agent activation procedure');
|
|
1837
1697
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent dual-format generator.
|
|
3
3
|
*
|
|
4
|
-
* Reads a canonical BYAN agent stub (
|
|
4
|
+
* Reads a canonical BYAN agent stub (YAML frontmatter +
|
|
5
5
|
* XML code block) and emits a Claude Code skill (`.claude/skills/byan-<name>/SKILL.md`)
|
|
6
6
|
* with equivalent semantics expressed as markdown + frontmatter.
|
|
7
7
|
*
|
|
8
|
-
* The
|
|
8
|
+
* The canonical stub remains the source of truth — the generator only
|
|
9
9
|
* derives the Claude skill from it. No mutation of the input.
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -132,11 +132,11 @@ function renderSkillBody(sections, items) {
|
|
|
132
132
|
return out.join('\n');
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
function generateClaudeSkill(
|
|
136
|
-
const raw = fs.readFileSync(
|
|
135
|
+
function generateClaudeSkill(stubPath, options = {}) {
|
|
136
|
+
const raw = fs.readFileSync(stubPath, 'utf8');
|
|
137
137
|
const fm = parseFrontmatter(raw);
|
|
138
138
|
if (!fm.name) {
|
|
139
|
-
throw new Error(`Canonical stub missing name frontmatter: ${
|
|
139
|
+
throw new Error(`Canonical stub missing name frontmatter: ${stubPath}`);
|
|
140
140
|
}
|
|
141
141
|
const xml = extractXmlBlock(raw);
|
|
142
142
|
|
|
@@ -58,7 +58,7 @@ async function setupByanWebIntegration(projectRoot, options = {}) {
|
|
|
58
58
|
if (!options.quiet) {
|
|
59
59
|
console.log(chalk.green(` ✓ byan_web integration configured`));
|
|
60
60
|
console.log(chalk.gray(` - Token (Claude Code) → ${path.relative(projectRoot, settingsPath)}`));
|
|
61
|
-
console.log(chalk.gray(` - Token (
|
|
61
|
+
console.log(chalk.gray(` - Token (shell / env) → ${path.relative(projectRoot, envPath)}`));
|
|
62
62
|
console.log(chalk.gray(` - MCP server registered in ${path.relative(projectRoot, mcpPath)}`));
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -145,7 +145,7 @@ async function installMcpDependencies(mcpServerPath) {
|
|
|
145
145
|
|
|
146
146
|
async function copyGitHooks(projectRoot) {
|
|
147
147
|
// The BYAN Strict Mode pre-commit gate is the cross-platform final net
|
|
148
|
-
// (Codex
|
|
148
|
+
// (Codex has no in-session hook). Install it whenever the project
|
|
149
149
|
// is a git repo: copy .githooks/ and point core.hooksPath at it.
|
|
150
150
|
const src = path.join(TEMPLATE_ROOT, '.githooks');
|
|
151
151
|
const dst = path.join(projectRoot, '.githooks');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Phase 2 Chat - Integrated conversation within the wizard
|
|
3
3
|
*
|
|
4
4
|
* Provides an in-wizard chat experience with the yanstaller-phase2 agent
|
|
5
|
-
* using
|
|
5
|
+
* using claude/codex CLI for AI responses.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const { spawnSync } = require('child_process');
|
|
@@ -48,10 +48,8 @@ function runCliCommand(cmd, args, cwd, stdinInput) {
|
|
|
48
48
|
*/
|
|
49
49
|
function buildPhase1Context(interviewAnswers, detectedPlatforms, userName, language) {
|
|
50
50
|
const platformsDetected = [];
|
|
51
|
-
if (detectedPlatforms.copilot) platformsDetected.push('GitHub Copilot CLI');
|
|
52
51
|
if (detectedPlatforms.codex) platformsDetected.push('OpenAI Codex');
|
|
53
52
|
if (detectedPlatforms.claude) platformsDetected.push('Claude Code');
|
|
54
|
-
if (detectedPlatforms.vscode) platformsDetected.push('VSCode');
|
|
55
53
|
|
|
56
54
|
return {
|
|
57
55
|
user_name: userName || 'Developer',
|
|
@@ -115,7 +113,6 @@ function generatePhase2Preprompt(context) {
|
|
|
115
113
|
- **byan**: Agent creator via interview (12 questions, 64 mantras)
|
|
116
114
|
- **byan-v2**: Optimized BYAN v2
|
|
117
115
|
- **agent-builder**: Construction expert
|
|
118
|
-
- **marc**: GitHub Copilot integration specialist
|
|
119
116
|
- **rachid**: NPM/NPX deployment specialist
|
|
120
117
|
- **carmack**: Token optimizer
|
|
121
118
|
- **patnote**: Update manager
|
|
@@ -190,9 +187,7 @@ Continue la conversation pour comprendre le projet et personnaliser les agents.`
|
|
|
190
187
|
let result = '';
|
|
191
188
|
|
|
192
189
|
try {
|
|
193
|
-
if (selectedPlatform === '
|
|
194
|
-
result = runCliCommand('copilot', ['-p', fullPrompt, '-s'], projectRoot);
|
|
195
|
-
} else if (selectedPlatform === 'codex') {
|
|
190
|
+
if (selectedPlatform === 'codex') {
|
|
196
191
|
// Codex takes prompt as argument to exec command
|
|
197
192
|
// --skip-git-repo-check needed when not in a trusted git repo
|
|
198
193
|
result = runCliCommand('codex', ['exec', '--skip-git-repo-check', fullPrompt], projectRoot);
|
|
@@ -224,8 +219,6 @@ Continue la conversation pour comprendre le projet et personnaliser les agents.`
|
|
|
224
219
|
console.log(chalk.cyan(' 1. claude login'));
|
|
225
220
|
console.log(chalk.gray(' 2. ou: export ANTHROPIC_API_KEY=sk-ant-...'));
|
|
226
221
|
console.log(chalk.gray(' 3. ou dans Claude Code: /login'));
|
|
227
|
-
} else if (selectedPlatform === 'copilot') {
|
|
228
|
-
console.log(chalk.gray(' → copilot auth'));
|
|
229
222
|
} else if (selectedPlatform === 'codex') {
|
|
230
223
|
console.log(chalk.gray(' → codex login'));
|
|
231
224
|
}
|
|
@@ -287,7 +280,7 @@ async function launchPhase2Chat(options) {
|
|
|
287
280
|
console.log('');
|
|
288
281
|
|
|
289
282
|
// Check if any AI platform is available
|
|
290
|
-
if (!detectedPlatforms.
|
|
283
|
+
if (!detectedPlatforms.codex && !detectedPlatforms.claude) {
|
|
291
284
|
console.log(chalk.yellow(' ⚠ Aucune plateforme AI détectée pour le chat.'));
|
|
292
285
|
return null;
|
|
293
286
|
}
|
|
@@ -73,7 +73,7 @@ async function install(projectRoot, agents, config, options = {}) {
|
|
|
73
73
|
|
|
74
74
|
if (useAgent) {
|
|
75
75
|
logger.info('Using agent Claude for native MCP integration...');
|
|
76
|
-
return await
|
|
76
|
+
return await installViaClaudeAgent(projectRoot, agents, config);
|
|
77
77
|
} else {
|
|
78
78
|
logger.info('Using direct MCP configuration...');
|
|
79
79
|
return await installDirectMCP(projectRoot, agents, config);
|
|
@@ -88,7 +88,7 @@ async function install(projectRoot, agents, config, options = {}) {
|
|
|
88
88
|
* @param {Object} config
|
|
89
89
|
* @returns {Promise<{success: boolean, installed: number, method: string}>}
|
|
90
90
|
*/
|
|
91
|
-
async function
|
|
91
|
+
async function installViaClaudeAgent(projectRoot, agents, config) {
|
|
92
92
|
const agentLauncher = require('../yanstaller/agent-launcher');
|
|
93
93
|
|
|
94
94
|
// Check if native launch is available
|
|
@@ -175,15 +175,15 @@ async function generateProjectAgentsDoc(phase2Results, genericAnswers, domainAns
|
|
|
175
175
|
lines.push('### Activate Core Agents');
|
|
176
176
|
lines.push('');
|
|
177
177
|
lines.push('```bash');
|
|
178
|
-
lines.push('
|
|
179
|
-
lines.push('# Then type:
|
|
178
|
+
lines.push('claude');
|
|
179
|
+
lines.push('# Then type: @hermes');
|
|
180
180
|
lines.push('# Select the agent you need');
|
|
181
181
|
lines.push('```');
|
|
182
182
|
lines.push('');
|
|
183
183
|
lines.push('### Create Custom Agents');
|
|
184
184
|
lines.push('');
|
|
185
185
|
lines.push('```bash');
|
|
186
|
-
lines.push('
|
|
186
|
+
lines.push('claude --agent=byan');
|
|
187
187
|
lines.push('# Select: 1. Create New Agent');
|
|
188
188
|
lines.push('# Follow the interview process');
|
|
189
189
|
lines.push('```');
|
|
@@ -25,7 +25,7 @@ const CONSENT_NOTICE = [
|
|
|
25
25
|
chalk.yellow.bold('BYAN memory-sync — consent requis'),
|
|
26
26
|
'',
|
|
27
27
|
'Si vous activez cette option, apres chaque interaction avec',
|
|
28
|
-
'Claude Code
|
|
28
|
+
'Claude Code, BYAN envoie automatiquement a votre',
|
|
29
29
|
'instance byan_web les elements suivants :',
|
|
30
30
|
'',
|
|
31
31
|
' - messages utilisateur (prompts)',
|
|
@@ -125,12 +125,12 @@ async function setupStagingConsent(projectRoot, options = {}) {
|
|
|
125
125
|
console.log(chalk.green(' OK memory-sync ENABLED in ' + path.relative(projectRoot, target)));
|
|
126
126
|
console.log(
|
|
127
127
|
chalk.gray(
|
|
128
|
-
' a chaque fin de turn, votre hook Stop (Claude)
|
|
128
|
+
' a chaque fin de turn, votre hook Stop (Claude) enverra'
|
|
129
129
|
)
|
|
130
130
|
);
|
|
131
131
|
console.log(
|
|
132
132
|
chalk.gray(
|
|
133
|
-
'
|
|
133
|
+
' les memoires de la session a byan_web.'
|
|
134
134
|
)
|
|
135
135
|
);
|
|
136
136
|
} else {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* BMAD subagent generator (AW2).
|
|
3
3
|
*
|
|
4
|
-
* Reads a BYAN
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Reads a BYAN agent stub (YAML frontmatter + XML persona block) and
|
|
5
|
+
* emits a Claude Code native subagent file at .claude/agents/bmad-<slug>.md
|
|
6
|
+
* with :
|
|
7
7
|
* - frontmatter : name, description, model, color
|
|
8
8
|
* - body : system prompt derived from <persona> + <rules> + <menu>
|
|
9
9
|
*
|
|
@@ -13,7 +13,7 @@ const logger = require('../utils/logger');
|
|
|
13
13
|
/**
|
|
14
14
|
* @typedef {Object} LaunchOptions
|
|
15
15
|
* @property {string} agent - Agent name (e.g., 'claude', 'marc')
|
|
16
|
-
* @property {string} platform - Platform ID (e.g., '
|
|
16
|
+
* @property {string} platform - Platform ID (e.g., 'claude', 'codex')
|
|
17
17
|
* @property {string} [prompt] - Initial prompt/action
|
|
18
18
|
* @property {string} [model] - Model to use
|
|
19
19
|
* @property {Object} [config] - Additional config
|
|
@@ -31,32 +31,6 @@ const logger = require('../utils/logger');
|
|
|
31
31
|
* Platform-specific launch configurations
|
|
32
32
|
*/
|
|
33
33
|
const LAUNCH_CONFIGS = {
|
|
34
|
-
'copilot-cli': {
|
|
35
|
-
command: 'gh',
|
|
36
|
-
args: (agent, options) => {
|
|
37
|
-
const args = ['copilot'];
|
|
38
|
-
|
|
39
|
-
// Use @agent syntax if available
|
|
40
|
-
if (agent) {
|
|
41
|
-
args.push(`@bmad-agent-${agent}`);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (options.prompt) {
|
|
45
|
-
args.push(options.prompt);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return args;
|
|
49
|
-
},
|
|
50
|
-
checkAvailable: () => {
|
|
51
|
-
try {
|
|
52
|
-
execSync('which gh', { stdio: 'ignore' });
|
|
53
|
-
return true;
|
|
54
|
-
} catch {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
34
|
'claude': {
|
|
61
35
|
command: 'claude',
|
|
62
36
|
args: (agent, options = {}) => {
|
|
@@ -25,7 +25,7 @@ const platforms = require('../platforms');
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* @typedef {Object} PlatformInfo
|
|
28
|
-
* @property {string} name - '
|
|
28
|
+
* @property {string} name - 'claude' | 'codex'
|
|
29
29
|
* @property {boolean} detected
|
|
30
30
|
* @property {string} [path] - Installation path if detected
|
|
31
31
|
* @property {string} [version] - Version if detected
|
|
@@ -50,7 +50,7 @@ async function detect() {
|
|
|
50
50
|
]);
|
|
51
51
|
|
|
52
52
|
// Platform detection with timeout protection
|
|
53
|
-
const platformNames = ['
|
|
53
|
+
const platformNames = ['claude', 'codex'];
|
|
54
54
|
const platformsInfo = await Promise.all(
|
|
55
55
|
platformNames.map(name => detectPlatform(name))
|
|
56
56
|
);
|
|
@@ -63,7 +63,7 @@ async function detect() {
|
|
|
63
63
|
.map(p => `${p.name}: ${p.error}`)
|
|
64
64
|
.join(', ');
|
|
65
65
|
if (errors) {
|
|
66
|
-
logger.warn(`0
|
|
66
|
+
logger.warn(`0/${platformNames.length} platforms detected. Errors: [${errors}]`);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -95,7 +95,7 @@ function isNodeVersionValid(currentVersion, requiredVersion) {
|
|
|
95
95
|
*
|
|
96
96
|
* Non-blocking: errors are caught and returned in result.
|
|
97
97
|
*
|
|
98
|
-
* @param {string} platformName - '
|
|
98
|
+
* @param {string} platformName - 'claude' | 'codex'
|
|
99
99
|
* @returns {Promise<PlatformInfo>}
|
|
100
100
|
*/
|
|
101
101
|
async function detectPlatform(platformName) {
|