create-byan-agent 2.25.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 +155 -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 +1 -5
- 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/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/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 +12 -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-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/_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/mcp/byan-mcp-server/bin/byan-sync-rules.js +20 -4
- package/install/templates/_byan/mcp/byan-mcp-server/lib/advisory-autofeed.js +13 -0
- package/install/templates/_byan/mcp/byan-mcp-server/lib/index-generator.js +1 -1
- 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/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 +205 -82
- package/install/templates/_byan/worker/launchers/README.md +4 -24
- package/install/templates/_byan/worker/workers.md +0 -2
- package/install/templates/_byan/workflow/simple/bmb/byan-benchmark/workflow.md +86 -0
- 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/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
|
@@ -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) {
|
|
@@ -113,8 +113,6 @@ async function copyAgentFile(agentName, targetPath) {
|
|
|
113
113
|
*/
|
|
114
114
|
async function generateStub(agentName, platform, targetPath) {
|
|
115
115
|
// TODO: Generate stub based on platform
|
|
116
|
-
// - Copilot CLI: .github/agents/{agentName}.md with YAML frontmatter
|
|
117
|
-
// - VSCode: Same as Copilot CLI
|
|
118
116
|
// - Claude Code: MCP config JSON
|
|
119
117
|
// - Codex: .codex/prompts/{agentName}.md
|
|
120
118
|
}
|
|
@@ -14,7 +14,7 @@ const platforms = require('../platforms');
|
|
|
14
14
|
/**
|
|
15
15
|
* @typedef {Object} PlatformChoice
|
|
16
16
|
* @property {string} name - Display name
|
|
17
|
-
* @property {string} id - Platform ID ('
|
|
17
|
+
* @property {string} id - Platform ID ('claude' | 'codex')
|
|
18
18
|
* @property {boolean} detected - Is platform installed?
|
|
19
19
|
* @property {string} [path] - Installation path if detected
|
|
20
20
|
* @property {boolean} native - Native integration available?
|
|
@@ -29,12 +29,6 @@ const platforms = require('../platforms');
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
const PLATFORM_INFO = {
|
|
32
|
-
'copilot-cli': {
|
|
33
|
-
displayName: 'GitHub Copilot CLI',
|
|
34
|
-
native: true,
|
|
35
|
-
specialist: 'marc',
|
|
36
|
-
icon: '🤖'
|
|
37
|
-
},
|
|
38
32
|
'claude': {
|
|
39
33
|
displayName: 'Claude Code',
|
|
40
34
|
native: true,
|
|
@@ -46,12 +40,6 @@ const PLATFORM_INFO = {
|
|
|
46
40
|
native: true, // NOW NATIVE!
|
|
47
41
|
specialist: 'codex',
|
|
48
42
|
icon: '📝'
|
|
49
|
-
},
|
|
50
|
-
'vscode': {
|
|
51
|
-
displayName: 'VS Code',
|
|
52
|
-
native: false,
|
|
53
|
-
specialist: null,
|
|
54
|
-
icon: '💻'
|
|
55
43
|
}
|
|
56
44
|
};
|
|
57
45
|
|
package/install/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-byan-agent",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.0",
|
|
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"
|
|
@@ -53,16 +53,12 @@ class ByanV2 {
|
|
|
53
53
|
medium: 60
|
|
54
54
|
},
|
|
55
55
|
outputDir: './_byan-output/bmb-creations',
|
|
56
|
-
env: customConfig.env ||
|
|
56
|
+
env: customConfig.env || 'standalone'
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
return { ...defaults, ...customConfig };
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
isCopilotContext() {
|
|
63
|
-
return this.config.env === 'copilot' || process.env.GITHUB_COPILOT === 'true';
|
|
64
|
-
}
|
|
65
|
-
|
|
66
62
|
async startSession() {
|
|
67
63
|
this.logger.info('Starting BYAN session', {
|
|
68
64
|
event: 'session_start',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GenerationState - Story 4.4
|
|
3
|
-
* Generates agent profile in BMAD
|
|
4
|
-
*
|
|
3
|
+
* Generates agent profile in BMAD format
|
|
4
|
+
*
|
|
5
5
|
* Format:
|
|
6
6
|
* - YAML frontmatter (name, description)
|
|
7
7
|
* - XML structure (<agent>, <persona>, <menu>, <capabilities>)
|
|
8
|
-
* -
|
|
8
|
+
* - Saved under the _byan/agent/ layout
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const Logger = require('../observability/logger');
|
|
@@ -178,7 +178,7 @@ class GenerationState {
|
|
|
178
178
|
*/
|
|
179
179
|
getDefaultSavePath() {
|
|
180
180
|
const name = this.sessionState.agentProfileDraft?.name || 'agent';
|
|
181
|
-
return
|
|
181
|
+
return `_byan/agent/${name}/${name}.md`;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
/**
|
package/install/src/webui/api.js
CHANGED
|
@@ -82,8 +82,6 @@ function isByanInstalled(projectRoot) {
|
|
|
82
82
|
function detectPlatforms(projectRoot) {
|
|
83
83
|
const found = [];
|
|
84
84
|
const checks = [
|
|
85
|
-
{ name: 'copilot-cli', path: '.github/agents' },
|
|
86
|
-
{ name: 'vscode', path: '.vscode' },
|
|
87
85
|
{ name: 'claude', path: '.claude' },
|
|
88
86
|
{ name: 'codex', path: '.codex/prompts' }
|
|
89
87
|
];
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* Each CLI adapter extends Bridge and implements: start(), send(), stop()
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
6
|
const layoutResolver = require('../../../../src/byan-v2/lib/layout-resolver');
|
|
9
7
|
|
|
10
8
|
class Bridge {
|
|
@@ -27,13 +25,7 @@ class Bridge {
|
|
|
27
25
|
resolveAgent(agentName) {
|
|
28
26
|
if (!agentName) return null;
|
|
29
27
|
|
|
30
|
-
//
|
|
31
|
-
const githubStub = path.join(this.projectRoot, '.github', 'agents', `bmad-agent-${agentName}.md`);
|
|
32
|
-
try {
|
|
33
|
-
if (fs.existsSync(githubStub)) return githubStub;
|
|
34
|
-
} catch { /* ignore */ }
|
|
35
|
-
|
|
36
|
-
// Then the layout resolver: Gen3 _byan/agent/<name>/ first, Gen2 flat +
|
|
28
|
+
// Layout resolver: Gen3 _byan/agent/<name>/ first, Gen2 flat +
|
|
37
29
|
// per-module, Gen1 _bmad/ fallback.
|
|
38
30
|
const hit = layoutResolver.resolveAgent(agentName, { projectRoot: this.projectRoot });
|
|
39
31
|
return hit ? hit.path : null;
|
|
@@ -66,10 +58,6 @@ function createBridge(cliName, options) {
|
|
|
66
58
|
const ClaudeAdapter = require('./claude-adapter');
|
|
67
59
|
return new ClaudeAdapter(options);
|
|
68
60
|
}
|
|
69
|
-
case 'copilot': {
|
|
70
|
-
const CopilotAdapter = require('./copilot-adapter');
|
|
71
|
-
return new CopilotAdapter(options);
|
|
72
|
-
}
|
|
73
61
|
case 'codex': {
|
|
74
62
|
const CodexAdapter = require('./codex-adapter');
|
|
75
63
|
return new CodexAdapter(options);
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
const { execFile } = require('child_process');
|
|
6
6
|
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
7
|
const layoutResolver = require('../../../../src/byan-v2/lib/layout-resolver');
|
|
9
8
|
|
|
10
9
|
const CLI_DEFINITIONS = [
|
|
11
10
|
{ name: 'claude', command: 'claude', versionArg: '--version' },
|
|
12
|
-
{ name: 'copilot', command: 'copilot', versionArg: '--version' },
|
|
13
11
|
{ name: 'codex', command: 'codex', versionArg: '--version' },
|
|
14
12
|
];
|
|
15
13
|
|
|
@@ -95,15 +93,6 @@ function parseFrontmatter(content) {
|
|
|
95
93
|
return fm;
|
|
96
94
|
}
|
|
97
95
|
|
|
98
|
-
function scanDir(dirPath) {
|
|
99
|
-
try {
|
|
100
|
-
if (!fs.existsSync(dirPath)) return [];
|
|
101
|
-
return fs.readdirSync(dirPath).filter((f) => f.endsWith('.md'));
|
|
102
|
-
} catch {
|
|
103
|
-
return [];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
96
|
// Map a resolver layout (+ rel) to the legacy source label, so API responses
|
|
108
97
|
// stay stable: Gen2 flat / Gen3 -> 'byan', Gen2 per-module -> 'bmad-<mod>'.
|
|
109
98
|
function sourceForLayout(layout, rel) {
|
|
@@ -136,18 +125,6 @@ async function detectAgents(projectRoot) {
|
|
|
136
125
|
});
|
|
137
126
|
};
|
|
138
127
|
|
|
139
|
-
// Copilot stubs (.github/agents) — flat scan, with the bmad-agent- prefix.
|
|
140
|
-
// Listed first so a copilot stub wins the dedup, preserving prior priority.
|
|
141
|
-
const githubDir = path.join(projectRoot, '.github', 'agents');
|
|
142
|
-
for (const file of scanDir(githubDir)) {
|
|
143
|
-
const id = file
|
|
144
|
-
.replace(/\.md$/, '')
|
|
145
|
-
.replace(/^bmad-agent-/, '')
|
|
146
|
-
.replace(/\.backup\.\d+.*$/, '')
|
|
147
|
-
.replace(/\.optimized.*$/, '');
|
|
148
|
-
pushAgent(id, 'copilot', path.join(githubDir, file));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
128
|
// _byan agents via the layout resolver: Gen3 _byan/agent/<name>/ first, then
|
|
152
129
|
// Gen2 flat _byan/agents/ and per-module _byan/<module>/agents/ (deduped).
|
|
153
130
|
for (const a of layoutResolver.listAgents({ projectRoot })) {
|
|
@@ -130,7 +130,7 @@ class ByanApp {
|
|
|
130
130
|
);
|
|
131
131
|
html += this.detectionRow(true, 'Operating System', this.status.detection?.os || navigator.platform);
|
|
132
132
|
|
|
133
|
-
const platformNames = { '
|
|
133
|
+
const platformNames = { 'claude': 'Claude Code', 'codex': 'Codex' };
|
|
134
134
|
const detectedPlatforms = this.status.detection?.platforms || [];
|
|
135
135
|
if (detectedPlatforms.length > 0) {
|
|
136
136
|
for (const p of detectedPlatforms) {
|
|
@@ -191,8 +191,6 @@ class ByanApp {
|
|
|
191
191
|
];
|
|
192
192
|
|
|
193
193
|
const platformOptions = [
|
|
194
|
-
{ id: 'copilot-cli', label: 'GitHub Copilot CLI' },
|
|
195
|
-
{ id: 'vscode', label: 'VSCode Extension' },
|
|
196
194
|
{ id: 'claude', label: 'Claude Code' },
|
|
197
195
|
{ id: 'codex', label: 'Codex / OpenCode' }
|
|
198
196
|
];
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<select id="cli-select" class="cli-select" aria-label="Select CLI backend">
|
|
23
23
|
<option value="claude">Claude Code</option>
|
|
24
|
-
<option value="copilot">GitHub Copilot</option>
|
|
25
24
|
<option value="codex">Codex</option>
|
|
26
25
|
</select>
|
|
27
26
|
<select id="model-select" class="model-select" aria-label="Select model">
|
|
@@ -183,7 +182,6 @@
|
|
|
183
182
|
<select id="setting-cli">
|
|
184
183
|
<option value="auto">Auto-detect</option>
|
|
185
184
|
<option value="claude">Claude Code</option>
|
|
186
|
-
<option value="copilot">GitHub Copilot</option>
|
|
187
185
|
<option value="codex">OpenCode/Codex</option>
|
|
188
186
|
</select>
|
|
189
187
|
</div>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<div class="step-content">
|
|
33
33
|
<h2>Welcome to BYAN</h2>
|
|
34
34
|
<p class="lead">Intelligent AI agent platform with multi-platform support.<br>
|
|
35
|
-
|
|
35
|
+
Claude Code and Codex.</p>
|
|
36
36
|
<div class="feature-grid">
|
|
37
37
|
<div class="feature-card">
|
|
38
38
|
<div class="feature-icon" aria-hidden="true">◆</div>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<div class="feature-card">
|
|
43
43
|
<div class="feature-icon" aria-hidden="true">◈</div>
|
|
44
44
|
<h3>Multi-Platform</h3>
|
|
45
|
-
<p>Install agents across
|
|
45
|
+
<p>Install agents across Claude Code and Codex simultaneously.</p>
|
|
46
46
|
</div>
|
|
47
47
|
<div class="feature-card">
|
|
48
48
|
<div class="feature-icon" aria-hidden="true">▸</div>
|
|
@@ -27,7 +27,6 @@ Voir @.claude/rules/hermes-dispatcher.md pour les commandes Hermes.
|
|
|
27
27
|
.claude/ # Integration Claude Code
|
|
28
28
|
CLAUDE.md # Ce fichier (instructions projet)
|
|
29
29
|
rules/ # Regles modulaires par domaine
|
|
30
|
-
.github/agents/ # Agents Copilot CLI (si installe)
|
|
31
30
|
```
|
|
32
31
|
|
|
33
32
|
## Regles de Code
|
|
@@ -99,7 +98,7 @@ Dans BYAN: tapez `[FC]` pour le sous-menu fact-check.
|
|
|
99
98
|
|
|
100
99
|
Mode d'enforcement anti-downgrade : empeche l'agent de livrer moins que demande
|
|
101
100
|
(MVP au lieu de prod, stub au lieu de feature, template bacle). Fonctionne sur
|
|
102
|
-
les
|
|
101
|
+
les 2 plateformes (Claude Code, Codex).
|
|
103
102
|
|
|
104
103
|
Protocole : lock du scope -> build complet -> self-verify >= 3 passes -> complete
|
|
105
104
|
(jeton d'audit). Le commit est bloque tant que la verification n'est pas acquise.
|
|
@@ -111,3 +110,15 @@ Protocole : lock du scope -> build complet -> self-verify >= 3 passes -> complet
|
|
|
111
110
|
- Persistance : sessions poussees vers l'API byan_web (autorite ; local = miroir/fallback offline) via `lib/strict-sync.js` ; migration `033` + `routes/strict-sessions.js` cote byan_web
|
|
112
111
|
|
|
113
112
|
Detail complet : voir @.claude/rules/strict-mode.md
|
|
113
|
+
|
|
114
|
+
<!-- BYAN-AUTOBENCH:BEGIN (Generated by byan-sync-rules from _byan/_config/autobench.yaml. Do not hand-edit.) -->
|
|
115
|
+
## BYAN Auto-Benchmark
|
|
116
|
+
|
|
117
|
+
Before asking the user to choose between options, benchmark the fork: render
|
|
118
|
+
ONE compact table (Option | <= 4 criteria | Niv + a best-first reco line) when
|
|
119
|
+
both gates hold (>= 2 non-substitutable options diverging on >= 1 weighted
|
|
120
|
+
criterion). Emit the marker verbatim before the table:
|
|
121
|
+
`<!-- BYAN-BENCH:done g1=<#options> g2=<#divergent-criteria> scope=<internal|external> conf=<assertive|lean> -->`.
|
|
122
|
+
A confirm, a destructive prompt, or an obvious default is not a fork — emit
|
|
123
|
+
`<!-- BYAN-BENCH:skip reason=.. -->` instead. Full doctrine: see @.claude/rules/benchmark.md
|
|
124
|
+
<!-- BYAN-AUTOBENCH:END -->
|
|
@@ -120,7 +120,7 @@ Meta-Agent Creator + Intelligent Interviewer + Brainstorming Expert
|
|
|
120
120
|
- Systematically apply 64 mantras to ensure quality and best practices
|
|
121
121
|
- Perform MCD ⇄ MCT validation to ensure data-treatment coherence
|
|
122
122
|
- Evaluate consequences of actions using 10-dimension checklist
|
|
123
|
-
- Generate agents for
|
|
123
|
+
- Generate agents for Claude Code, Codex
|
|
124
124
|
- Support incremental agent evolution sprint-by-sprint
|
|
125
125
|
- Apply TDD principles at conceptual level
|
|
126
126
|
|