create-byan-agent 1.1.3 โ†’ 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +273 -202
  2. package/LICENSE +21 -21
  3. package/README.md +1251 -421
  4. package/bin/create-byan-agent-backup.js +220 -220
  5. package/bin/create-byan-agent-fixed.js +301 -301
  6. package/bin/create-byan-agent.js +155 -322
  7. package/lib/errors.js +61 -0
  8. package/lib/exit-codes.js +54 -0
  9. package/lib/platforms/claude-code.js +113 -0
  10. package/lib/platforms/codex.js +92 -0
  11. package/lib/platforms/copilot-cli.js +123 -0
  12. package/lib/platforms/index.js +14 -0
  13. package/lib/platforms/vscode.js +51 -0
  14. package/lib/utils/config-loader.js +79 -0
  15. package/lib/utils/file-utils.js +104 -0
  16. package/lib/utils/git-detector.js +35 -0
  17. package/lib/utils/logger.js +64 -0
  18. package/lib/utils/node-detector.js +58 -0
  19. package/lib/utils/os-detector.js +74 -0
  20. package/lib/utils/yaml-utils.js +87 -0
  21. package/lib/yanstaller/backuper.js +308 -0
  22. package/lib/yanstaller/detector.js +141 -0
  23. package/lib/yanstaller/index.js +93 -0
  24. package/lib/yanstaller/installer.js +225 -0
  25. package/lib/yanstaller/interviewer.js +250 -0
  26. package/lib/yanstaller/recommender.js +298 -0
  27. package/lib/yanstaller/troubleshooter.js +498 -0
  28. package/lib/yanstaller/validator.js +578 -0
  29. package/lib/yanstaller/wizard.js +211 -0
  30. package/package.json +61 -55
  31. package/templates/.github/agents/bmad-agent-bmad-master.md +15 -15
  32. package/templates/.github/agents/bmad-agent-bmb-agent-builder.md +15 -15
  33. package/templates/.github/agents/bmad-agent-bmb-module-builder.md +15 -15
  34. package/templates/.github/agents/bmad-agent-bmb-workflow-builder.md +15 -15
  35. package/templates/.github/agents/bmad-agent-bmm-analyst.md +15 -15
  36. package/templates/.github/agents/bmad-agent-bmm-architect.md +15 -15
  37. package/templates/.github/agents/bmad-agent-bmm-dev.md +15 -15
  38. package/templates/.github/agents/bmad-agent-bmm-pm.md +15 -15
  39. package/templates/.github/agents/bmad-agent-bmm-quick-flow-solo-dev.md +15 -15
  40. package/templates/.github/agents/bmad-agent-bmm-quinn.md +15 -15
  41. package/templates/.github/agents/bmad-agent-bmm-sm.md +15 -15
  42. package/templates/.github/agents/bmad-agent-bmm-tech-writer.md +15 -15
  43. package/templates/.github/agents/bmad-agent-bmm-ux-designer.md +15 -15
  44. package/templates/.github/agents/bmad-agent-byan-test.md +32 -0
  45. package/templates/.github/agents/bmad-agent-byan.md +224 -224
  46. package/templates/.github/agents/bmad-agent-carmack.md +18 -0
  47. package/templates/.github/agents/bmad-agent-cis-brainstorming-coach.md +15 -15
  48. package/templates/.github/agents/bmad-agent-cis-creative-problem-solver.md +15 -15
  49. package/templates/.github/agents/bmad-agent-cis-design-thinking-coach.md +15 -15
  50. package/templates/.github/agents/bmad-agent-cis-innovation-strategist.md +15 -15
  51. package/templates/.github/agents/bmad-agent-cis-presentation-master.md +15 -15
  52. package/templates/.github/agents/bmad-agent-cis-storyteller.md +15 -15
  53. package/templates/.github/agents/bmad-agent-marc.md +48 -48
  54. package/templates/.github/agents/bmad-agent-patnote.md +48 -0
  55. package/templates/.github/agents/bmad-agent-rachid.md +47 -47
  56. package/templates/.github/agents/bmad-agent-tea-tea.md +15 -15
  57. package/templates/.github/agents/bmad-agent-test-dynamic.md +21 -0
  58. package/templates/.github/agents/expert-merise-agile.md +1 -0
  59. package/templates/.github/agents/franck.md +379 -0
  60. package/templates/_bmad/bmb/agents/agent-builder.md +59 -59
  61. package/templates/_bmad/bmb/agents/byan-test.md +116 -116
  62. package/templates/_bmad/bmb/agents/byan.md +215 -215
  63. package/templates/_bmad/bmb/agents/marc.md +303 -303
  64. package/templates/_bmad/bmb/agents/module-builder.md +60 -60
  65. package/templates/_bmad/bmb/agents/patnote.md +495 -495
  66. package/templates/_bmad/bmb/agents/rachid.md +184 -184
  67. package/templates/_bmad/bmb/agents/workflow-builder.md +61 -61
  68. package/templates/_bmad/bmb/workflows/byan/data/mantras.yaml +272 -272
  69. package/templates/_bmad/bmb/workflows/byan/data/templates.yaml +59 -59
  70. package/templates/_bmad/bmb/workflows/byan/delete-agent-workflow.md +657 -657
  71. package/templates/_bmad/bmb/workflows/byan/edit-agent-workflow.md +688 -688
  72. package/templates/_bmad/bmb/workflows/byan/interview-workflow.md +753 -753
  73. package/templates/_bmad/bmb/workflows/byan/quick-create-workflow.md +450 -450
  74. package/templates/_bmad/bmb/workflows/byan/templates/base-agent-template.md +79 -79
  75. package/templates/_bmad/bmb/workflows/byan/validate-agent-workflow.md +676 -676
  76. package/templates/_bmad/core/agents/carmack.md +238 -238
package/README.md CHANGED
@@ -1,421 +1,1251 @@
1
- # BYAN - Builder of YAN
2
-
3
- **Version:** 1.1.1
4
- **Methodology:** Merise Agile + TDD + 64 Mantras
5
- **Agents Included:** BYAN, BYAN-Test, RACHID, MARC, PATNOTE, CARMACK
6
-
7
- ---
8
-
9
- ## ๐Ÿ“š Documentation
10
-
11
- ### ๐Ÿ†• **[Installation Guide for Beginners](https://github.com/Yan-Acadenice/BYAN/blob/main/install/GUIDE-INSTALLATION-BYAN-SIMPLE.md)** โญ NEW!
12
- Complete step-by-step installation guide for Windows + Linux users:
13
- - โœ… GitHub Copilot CLI installation (detailed)
14
- - โœ… Claude Code installation (with MCP)
15
- - โœ… 10 troubleshooting scenarios
16
- - โœ… 8 FAQ with solutions
17
- - โœ… Beginner-friendly explanations
18
- - โœ… Copy-paste ready commands
19
-
20
- **Perfect for:** First-time users, Windows users, troubleshooting installation issues
21
-
22
- ### โšก **[Quickstart Guide - 5 Minutes](https://github.com/Yan-Acadenice/BYAN/blob/main/install/QUICKSTART.md)** ๐Ÿš€ NEW!
23
- Ultra-condensed installation for experienced developers:
24
- - โšก Zero explanations, only commands
25
- - โšก 5-minute install promise
26
- - โšก GitHub Copilot CLI + Claude Code
27
- - โšก 1-minute troubleshooting fixes
28
- - โšก Agent reference table
29
-
30
- **Perfect for:** Experienced developers, quick setup, command reference
31
-
32
- ---
33
-
34
- ## ๐Ÿ—๏ธ What is BYAN?
35
-
36
- **BYAN (Builder of YAN)** is an intelligent agent creator that generates specialized AI agents through structured interviews.
37
-
38
- **Key Features:**
39
- - 30-45 min intelligent interview process
40
- - Applies 64 mantras systematically
41
- - Zero Trust philosophy (challenges requirements)
42
- - Multi-platform support (Copilot, VSCode, Claude, Codex)
43
- - TDD-driven validation
44
- - Consequences evaluation before actions
45
- - **Core Team:** BYAN (creator), RACHID (npm), MARC (copilot), PATNOTE (updates), CARMACK (optimizer)
46
- - **Optimized:** BYAN-Test version with 46% token reduction
47
-
48
- ---
49
-
50
- ## ๐Ÿš€ Quick Start
51
-
52
- ### Installation
53
-
54
- **Option 1: NPX (Recommended)**
55
- ```bash
56
- npx create-byan-agent
57
- ```
58
-
59
- **Option 2: Bash Script**
60
- ```bash
61
- curl -fsSL https://raw.githubusercontent.com/yan/byan/main/install/install.sh | bash
62
- ```
63
-
64
- **Option 3: Manual**
65
- ```bash
66
- git clone https://github.com/yan/byan.git
67
- cd byan
68
- ./install/install.sh
69
- ```
70
-
71
- ---
72
-
73
- ## ๐Ÿ“– Usage
74
-
75
- ### Activate Agents
76
-
77
- **GitHub Copilot CLI:**
78
- ```bash
79
- copilot
80
- # In interactive mode:
81
- /agent
82
- # Select one of:
83
- # - byan (create agents - standard version)
84
- # - byan-test (create agents - optimized 46% fewer tokens)
85
- # - rachid (NPM deployment specialist)
86
- # - marc (Copilot CLI integration expert)
87
- # - patnote (Update manager & conflict resolution)
88
- # - carmack (Token optimizer for agents)
89
- ```
90
-
91
- **VSCode:**
92
- 1. Open Command Palette (Ctrl+Shift+P)
93
- 2. Type: "Activate Agent"
94
- 3. Select from: BYAN, BYAN-Test, RACHID, MARC, PATNOTE, CARMACK
95
-
96
- **Claude Code:**
97
- ```bash
98
- # Choose your agent:
99
- claude chat --agent byan # Full-featured creator
100
- claude chat --agent byan-test # Optimized creator (46% fewer tokens)
101
- claude chat --agent rachid # NPM deployment
102
- claude chat --agent marc # Copilot CLI integration
103
- claude chat --agent patnote # Update manager
104
- claude chat --agent carmack # Token optimizer
105
- ```
106
-
107
- ### Create Your First Agent
108
-
109
- **Full Interview (30-45 min):**
110
- ```
111
- [INT] Start Intelligent Interview
112
- ```
113
- Best for: First agent, critical agents, complex requirements
114
-
115
- **Quick Create (10 min):**
116
- ```
117
- [QC] Quick Create
118
- ```
119
- Best for: Additional agents, clear requirements, existing project context
120
-
121
- ---
122
-
123
- ## ๐ŸŽฏ Five Specialized Agents
124
-
125
- ### 1. BYAN & BYAN-Test - Agent Creators
126
-
127
- **BYAN (Standard)** - Full-featured agent creator with rich documentation
128
- **BYAN-Test (Optimized)** - Token-optimized version (-46% tokens, same capabilities)
129
-
130
- **Full Interview (30-45 min):**
131
- ```
132
- [INT] Start Intelligent Interview
133
- ```
134
- Best for: First agent, critical agents, complex requirements
135
-
136
- **Quick Create (10 min):**
137
- ```
138
- [QC] Quick Create
139
- ```
140
- Best for: Additional agents, clear requirements, existing project context
141
-
142
- **Role:** Intelligent agent creation through structured interviews. Applies 64 mantras systematically, Zero Trust philosophy, and consequences evaluation.
143
-
144
- ---
145
-
146
- ### 2. RACHID - NPM/NPX Deployment Specialist ๐Ÿ“ฆ
147
-
148
- **Deploy to NPM:**
149
- ```
150
- [PUBLISH] Publish to npm
151
- [VALIDATE] Validate _bmad structure
152
- [TEST-NPX] Test npx installation
153
- [AUDIT] Security audit
154
- [FIX-DEPS] Fix dependencies
155
- ```
156
-
157
- **Role:** Elite Node.js deployment specialist. Masters npm/npx, package.json, create-* CLI patterns. Ensures dependency integrity and secure installations. Trust But Verify philosophy on all packages.
158
-
159
- **Best for:** Package deployment, dependency management, npm workflows, version bumps, publishing to npm registry.
160
-
161
- ---
162
-
163
- ### 3. MARC - GitHub Copilot CLI Integration Expert ๐Ÿ”ง
164
-
165
- **Copilot Integration:**
166
- ```
167
- [VALIDATE] Validate .github/agents/
168
- [TEST] Test /agent detection
169
- [CREATE-STUB] Create agent stub
170
- [FIX-YAML] Fix YAML frontmatter
171
- [MCP-CONFIG] Configure MCP server
172
- ```
173
-
174
- **Role:** GitHub Copilot CLI integration specialist. Ensures agents are properly detected by `/agent` command. Masters YAML frontmatter, MCP configuration, and Copilot CLI debugging.
175
-
176
- **Best for:** GitHub Copilot CLI integration, agent detection issues, MCP server configuration, YAML validation.
177
-
178
- ---
179
-
180
- ### 4. PATNOTE - Update Manager & Conflict Resolution Specialist ๐Ÿ“
181
-
182
- **Update Management:**
183
- ```
184
- [UPDATE-AGENT] Update existing agent
185
- [MERGE-VERSIONS] Merge agent versions
186
- [DETECT-CONFLICTS] Detect conflicts
187
- [BACKUP-RESTORE] Backup/Restore agents
188
- [CHANGELOG] Generate changelog
189
- ```
190
-
191
- **Role:** Guardian of BYAN updates. Detects conflicts between versions, merges changes intelligently, preserves user customizations. Tracks all modifications in detailed changelogs. Never loses data.
192
-
193
- **Best for:** Updating existing agents, merging BYAN versions, resolving conflicts, maintaining agent history.
194
-
195
- ---
196
-
197
- ### 5. CARMACK - Token Optimizer for BMAD/BYAN Agents โšก
198
-
199
- **Token Optimization:**
200
- ```
201
- [OPTIMIZE] Optimize agent for tokens
202
- [ANALYZE] Analyze token usage
203
- [VALIDATE] Validate optimized agent
204
- [COMPARE] Compare before/after
205
- [BATCH] Batch optimize multiple agents
206
- ```
207
-
208
- **Role:** Token optimization expert inspired by John Carmack's efficiency principles. Reduces token usage by 40-50% while preserving functionality. Surgical precision in removing redundancy, restructuring content, and optimizing prompts.
209
-
210
- **Best for:** Reducing LLM token costs, optimizing agent performance, batch processing large agent sets, maintaining quality while cutting tokens.
211
-
212
- ---
213
-
214
- ## ๐ŸŽฏ BYAN Menu
215
-
216
- | Command | Description | Duration |
217
- |---------|-------------|----------|
218
- | **[INT]** | Intelligent Interview | 30-45 min |
219
- | **[QC]** | Quick Create | 10 min |
220
- | **[LA]** | List all agents | Instant |
221
- | **[EA]** | Edit existing agent | 10-20 min |
222
- | **[VA]** | Validate agent (64 mantras) | 5-10 min |
223
- | **[DA-AGENT]** | Delete agent (with backup) | 5 min |
224
- | **[PC]** | Show project context | Instant |
225
- | **[MAN]** | Display 64 mantras | Instant |
226
-
227
- ---
228
-
229
- ## ๐Ÿ“š Methodology
230
-
231
- BYAN applies **Merise Agile + TDD** with 64 mantras:
232
-
233
- ### 39 Conception Mantras
234
- - Philosophy: Model serves business, not reverse
235
- - Agility: User stories โ†’ Entities (bottom-up)
236
- - Quality: KISS, DRY, YAGNI
237
- - Tests: TDD is not optional
238
- - Merise Rigor: Data Dictionary First, MCD โ‡„ MCT
239
- - Problem Solving: Ockham's Razor, Inversion techniques
240
- - **Consequences: Evaluate 10 dimensions before action**
241
-
242
- ### 25 AI Agent Mantras
243
- - Intelligence: Trust But Verify, Context is King
244
- - **Validation: Challenge Before Confirm**
245
- - Autonomy: Self-Aware Agent
246
- - **Code Quality: No Emoji Pollution, Clean Code**
247
-
248
- Full list: `_bmad/bmb/workflows/byan/data/mantras.yaml`
249
-
250
- ---
251
-
252
- ## ๐Ÿ”ง Project Structure
253
-
254
- ```
255
- your-project/
256
- โ”œโ”€โ”€ _bmad/
257
- โ”‚ โ”œโ”€โ”€ bmb/ # BYAN Module
258
- โ”‚ โ”‚ โ”œโ”€โ”€ agents/
259
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ byan.md # BYAN agent definition
260
- โ”‚ โ”‚ โ”œโ”€โ”€ workflows/
261
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ byan/
262
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interview-workflow.md
263
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ quick-create-workflow.md
264
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ edit-agent-workflow.md
265
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ validate-agent-workflow.md
266
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ delete-agent-workflow.md
267
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ templates/
268
- โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ base-agent-template.md
269
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ data/
270
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ mantras.yaml
271
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ templates.yaml
272
- โ”‚ โ”‚ โ””โ”€โ”€ config.yaml # Module configuration
273
- โ”‚ โ”œโ”€โ”€ core/ # BMAD Core
274
- โ”‚ โ”œโ”€โ”€ _output/ # Generated files
275
- โ”‚ โ””โ”€โ”€ {your-module}/
276
- โ”‚ โ””โ”€โ”€ agents/ # Your generated agents
277
- โ””โ”€โ”€ install/
278
- โ”œโ”€โ”€ install.sh # Bash installer
279
- โ”œโ”€โ”€ package.json # NPX package
280
- โ””โ”€โ”€ bin/
281
- โ””โ”€โ”€ create-byan-agent.js # NPX installer script
282
- ```
283
-
284
- ---
285
-
286
- ## ๐ŸŽ“ Interview Process
287
-
288
- BYAN conducts a 4-phase interview:
289
-
290
- ### Phase 1: Project Context (15-30 min)
291
- - Project name, description, domain
292
- - Technical stack and constraints
293
- - Team size, skills, maturity
294
- - **Pain points (5 Whys on main pain)**
295
- - Goals and success criteria
296
-
297
- ### Phase 2: Business/Domain (15-20 min)
298
- - Business domain deep dive
299
- - **Interactive glossary (minimum 5 concepts)**
300
- - Actors, processes, business rules
301
- - Edge cases and constraints
302
- - Regulatory requirements
303
-
304
- ### Phase 3: Agent Needs (10-15 min)
305
- - Agent role and responsibilities
306
- - Required knowledge (business + technical)
307
- - **Capabilities (minimum 3)**
308
- - **Mantras to prioritize (minimum 5)**
309
- - Communication style
310
- - **Use cases (minimum 3)**
311
-
312
- ### Phase 4: Validation (10 min)
313
- - Complete synthesis
314
- - **Challenge inconsistencies**
315
- - Validate with user
316
- - Create ProjectContext
317
- - Finalize AgentSpec
318
-
319
- ---
320
-
321
- ## โœ… Validation
322
-
323
- BYAN validates agents against:
324
- - Business rules (RG-AGT-001 to RG-DEL-002)
325
- - 64 Mantras compliance
326
- - BMAD format standards
327
- - Best practices
328
-
329
- **Validation Levels:**
330
- - ๐Ÿ”ด CRITICAL: Must pass (deployment blocked)
331
- - ๐ŸŸก IMPORTANT: Should pass (warnings)
332
- - ๐ŸŸข SUGGESTIONS: Nice to have
333
-
334
- **Grading:**
335
- - A+ (95-100): Exemplary
336
- - A (90-94): Excellent
337
- - B (80-89): Good
338
- - C (70-79): Acceptable
339
- - D (60-69): Needs improvement
340
- - F (<60): Failing
341
-
342
- ---
343
-
344
- ## ๐Ÿ›ก๏ธ Zero Trust Philosophy
345
-
346
- BYAN never blindly accepts requirements:
347
-
348
- **Challenge Before Confirm:**
349
- - Detects inconsistencies
350
- - Questions assumptions
351
- - Plays devil's advocate
352
- - Signals problems early
353
-
354
- **Trust But Verify:**
355
- - Validates all inputs
356
- - Cross-checks data
357
- - Ensures coherence
358
-
359
- **Example:**
360
- ```
361
- User: "I need an agent that does everything"
362
- BYAN: "I'm challenging that requirement. Wouldn't a specialized
363
- agent that does ONE thing exceptionally well be more valuable?
364
- What's the ONE most critical capability you need?"
365
- ```
366
-
367
- ---
368
-
369
- ## ๐Ÿ“Š Consequences Evaluation
370
-
371
- Before any important action, BYAN evaluates 10 dimensions:
372
-
373
- 1. **Scope:** Components affected
374
- 2. **Data:** Database impacts
375
- 3. **Code:** Files to modify
376
- 4. **Team:** People affected
377
- 5. **Clients:** User workflows
378
- 6. **Legal:** Compliance
379
- 7. **Operations:** Deployment complexity
380
- 8. **Dependencies:** Systems impacted
381
- 9. **Time:** Duration estimates
382
- 10. **Alternatives:** Other options
383
-
384
- **Risk Levels:**
385
- - ๐ŸŸข LOW: Safe to proceed
386
- - ๐ŸŸก MEDIUM: Caution required
387
- - ๐Ÿ”ด HIGH: Team approval needed
388
- - ๐Ÿ”ฅ CRITICAL: Requires migration plan
389
-
390
- ---
391
-
392
- ## ๐Ÿ“ Configuration
393
-
394
- Edit `_bmad/bmb/config.yaml`:
395
-
396
- ```yaml
397
- user_name: Your Name
398
- communication_language: Francais|English
399
- document_output_language: Francais|English
400
- output_folder: "{project-root}/_bmad-output"
401
- platform: copilot|vscode|claude|codex
402
- ```
403
-
404
- ---
405
-
406
- ## ๐Ÿ“„ License
407
-
408
- MIT License - See LICENSE file
409
-
410
- ---
411
-
412
- ## ๐Ÿ™ Credits
413
-
414
- **Created by:** Yan + Carson (Brainstorming Coach)
415
- **Methodology:** Merise Agile + TDD
416
- **Mantras:** 64 principles from 2-hour brainstorming session
417
- **Date:** 2026-02-02
418
-
419
- ---
420
-
421
- **Happy agent building!** ๐Ÿ—๏ธ
1
+ # ๐Ÿ—๏ธ YANSTALLER - Intelligent BYAN Installer
2
+
3
+ [![Version](https://img.shields.io/badge/version-1.1.3-blue.svg)](https://www.npmjs.com/package/create-byan-agent)
4
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
5
+ [![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org)
6
+ [![Tests](https://img.shields.io/badge/tests-168%20passing-success.svg)](#tests)
7
+
8
+ **YANSTALLER** est l'installateur intelligent pour l'รฉcosystรจme **BYAN** (Builder of YAN). Il dรฉtecte automatiquement votre environnement de dรฉveloppement, recommande les agents appropriรฉs, et les installe avec support multi-plateforme.
9
+
10
+ > ๐Ÿ“ฆ **Basรฉ sur [BMAD](https://github.com/yanb94/byan)** - Business Modeling & Agent Development Platform
11
+ > โœ๏ธ **Made by [Yan de Acadenice](https://acadenice.fr/)**
12
+
13
+ **Mรฉthodologie :** Merise Agile + TDD + 64 Mantras
14
+ **Langues :** ๐Ÿ‡ซ๐Ÿ‡ท Franรงais | ๐Ÿ‡ฌ๐Ÿ‡ง English ([See below](#english-version))
15
+
16
+ ---
17
+
18
+ ## ๐Ÿ“‹ Table des matiรจres
19
+
20
+ 1. [Fonctionnalitรฉs](#-fonctionnalitรฉs)
21
+ 2. [Installation](#-installation-rapide)
22
+ 3. [Utilisation](#-utilisation)
23
+ 4. [Architecture](#-architecture)
24
+ 5. [Modules](#-modules)
25
+ 6. [API](#-api-reference)
26
+ 7. [Tests](#-tests)
27
+ 8. [Dรฉveloppement](#-dรฉveloppement)
28
+ 9. [Contributing](#-contributing)
29
+ 10. [License](#-license)
30
+
31
+ ---
32
+
33
+ ## โœจ Fonctionnalitรฉs
34
+
35
+ ### ๐ŸŽฏ Intelligence de Dรฉtection
36
+ - โœ… **Dรฉtection automatique** des plateformes (GitHub Copilot CLI, VSCode, Claude Code, Codex)
37
+ - โœ… **Analyse du projet** via `package.json` (20+ frameworks reconnus)
38
+ - โœ… **Recommandations contextuelles** d'agents basรฉes sur votre stack
39
+
40
+ ### ๐Ÿค– Agents Disponibles (29 agents)
41
+ - **BMB (Meta):** BYAN, BYAN-Test, RACHID, MARC, PATNOTE, CARMACK, Agent-Builder, Module-Builder, Workflow-Builder
42
+ - **BMM (SDLC):** Analyst, PM, Architect, Dev, SM, Quinn, UX-Designer, Tech-Writer, Quick-Flow-Solo-Dev
43
+ - **TEA (Tests):** TEA (Test Architecture Expert)
44
+ - **CIS (Innovation):** Brainstorming-Coach, Design-Thinking-Coach, Creative-Problem-Solver, Innovation-Strategist, Presentation-Master, Storyteller
45
+ - **Core:** Party-Mode, BMAD-Master
46
+
47
+ ### ๐Ÿš€ Installation Intelligente
48
+ - โœ… **Structure BMAD complรจte** (19 rรฉpertoires crรฉรฉs automatiquement)
49
+ - โœ… **Configuration YAML** gรฉnรฉrรฉe avec mรฉtadonnรฉes
50
+ - โœ… **Stubs multi-plateformes** (Copilot CLI, VSCode, Claude Code, Codex)
51
+ - โœ… **MCP Server setup** pour Claude Code
52
+ - โœ… **Manifests CSV** pour tracking des agents
53
+
54
+ ### ๐Ÿ” Validation Automatique (10 checks)
55
+ - Vรฉrification structure `_bmad/`
56
+ - Validation fichiers agents
57
+ - Check YAML frontmatter
58
+ - Validation permissions
59
+ - Vรฉrification dรฉpendances npm
60
+ - Tests manifests, workflows, templates
61
+
62
+ ### ๐Ÿ› ๏ธ Troubleshooting Intelligent
63
+ - โœ… **8 patterns d'erreurs** reconnus automatiquement
64
+ - โœ… **Auto-fix** pour permissions, structure corrompue, dรฉpendances
65
+ - โœ… **Diagnostics contextuels** (Node version, Git, espace disque)
66
+ - โœ… **Suggestions d'upgrade** OS-spรฉcifiques
67
+
68
+ ### ๐Ÿ’พ Backup & Rollback
69
+ - โœ… **Sauvegarde automatique** avant installation
70
+ - โœ… **Mรฉtadonnรฉes** (timestamp, taille, fichiers)
71
+ - โœ… **Restore sรฉcurisรฉ** avec pre-restore backup
72
+ - โœ… **Nettoyage automatique** des anciens backups
73
+
74
+ ### ๐Ÿง™ Wizard Post-Installation
75
+ - โœ… **Interview en 7 questions** (<5 min)
76
+ - โœ… **Mode conversationnel** avec inquirer
77
+ - โœ… **4 options post-install** : crรฉer agent, tester, docs, exit
78
+ - โœ… **Guide quick-start** interactif
79
+
80
+ ---
81
+
82
+ ## ๐Ÿš€ Installation Rapide
83
+
84
+ ### Prรฉrequis
85
+ - **Node.js** โ‰ฅ 18.0.0
86
+ - **Git** installรฉ
87
+ - Au moins **1 plateforme** : GitHub Copilot CLI, VSCode, Claude Code, ou Codex
88
+
89
+ ### Via NPX (recommandรฉ)
90
+ ```bash
91
+ # Installation interactive
92
+ npx create-byan-agent
93
+
94
+ # Suivre l'interview en 7 questions (5 min)
95
+ ```
96
+
97
+ ### Via NPM Global
98
+ ```bash
99
+ # Installer globalement
100
+ npm install -g create-byan-agent
101
+
102
+ # Exรฉcuter
103
+ create-byan-agent
104
+ ```
105
+
106
+ ### Installation Manuelle
107
+ ```bash
108
+ # Cloner le dรฉpรดt
109
+ git clone https://github.com/Yan-Acadenice/BYAN.git
110
+ cd BYAN/install
111
+
112
+ # Installer les dรฉpendances
113
+ npm install
114
+
115
+ # Lancer l'installateur
116
+ npm start
117
+ ```
118
+
119
+ ---
120
+
121
+ ## ๐ŸŽฎ Utilisation
122
+
123
+ ### Mode Interview (Recommandรฉ)
124
+ ```bash
125
+ npx create-byan-agent
126
+ ```
127
+
128
+ **7 questions interactives :**
129
+ 1. Votre nom (pour configuration personnalisรฉe)
130
+ 2. Langue de communication (Franรงais/English)
131
+ 3. Mode d'installation (Recommandรฉ/Custom/Minimal/Full)
132
+ 4. Sรฉlection agents (si Custom)
133
+ 5. Plateformes cibles (Copilot/VSCode/Claude/Codex)
134
+ 6. Installation agent exemple (oui/non)
135
+ 7. Crรฉer backup (oui/non)
136
+
137
+ ### Mode Programmatique
138
+
139
+ #### API JavaScript
140
+ ```javascript
141
+ const yanstaller = require('create-byan-agent');
142
+
143
+ // Dรฉtection
144
+ const detection = await yanstaller.detect({
145
+ projectRoot: process.cwd()
146
+ });
147
+ console.log(detection.platforms); // ['copilot-cli', 'vscode']
148
+
149
+ // Recommandation
150
+ const recommendations = await yanstaller.recommend({
151
+ projectRoot: process.cwd(),
152
+ detection
153
+ });
154
+ console.log(recommendations.agents); // ['dev', 'architect', 'quinn']
155
+
156
+ // Installation
157
+ const result = await yanstaller.install({
158
+ projectRoot: process.cwd(),
159
+ agents: ['byan', 'dev', 'quinn'],
160
+ platforms: ['copilot-cli', 'vscode'],
161
+ userName: 'Yan',
162
+ language: 'Francais'
163
+ });
164
+
165
+ // Validation
166
+ const validation = await yanstaller.validate({
167
+ projectRoot: process.cwd()
168
+ });
169
+ console.log(validation.errors); // []
170
+ ```
171
+
172
+ #### CLI Options
173
+ ```bash
174
+ # Installation silencieuse avec agents spรฉcifiques
175
+ create-byan-agent --silent --agents=byan,dev,quinn
176
+
177
+ # Mode custom avec plateforme spรฉcifique
178
+ create-byan-agent --mode=custom --platforms=copilot-cli
179
+
180
+ # Installation complรจte sans backup
181
+ create-byan-agent --mode=full --no-backup
182
+
183
+ # Dry-run (simulation)
184
+ create-byan-agent --dry-run
185
+
186
+ # Verbose logging
187
+ create-byan-agent --verbose
188
+ ```
189
+
190
+ ---
191
+
192
+ ## ๐Ÿ›๏ธ Architecture
193
+
194
+ ### Structure du Projet
195
+ ```
196
+ install/
197
+ โ”œโ”€โ”€ bin/
198
+ โ”‚ โ””โ”€โ”€ create-byan-agent.js # CLI entry point
199
+ โ”œโ”€โ”€ lib/
200
+ โ”‚ โ”œโ”€โ”€ yanstaller/ # Core modules
201
+ โ”‚ โ”‚ โ”œโ”€โ”€ detector.js # Platform & project detection
202
+ โ”‚ โ”‚ โ”œโ”€โ”€ recommender.js # Agent recommendations
203
+ โ”‚ โ”‚ โ”œโ”€โ”€ installer.js # Installation orchestration
204
+ โ”‚ โ”‚ โ”œโ”€โ”€ validator.js # Post-install validation
205
+ โ”‚ โ”‚ โ”œโ”€โ”€ troubleshooter.js # Error diagnosis & auto-fix
206
+ โ”‚ โ”‚ โ”œโ”€โ”€ backuper.js # Backup & restore
207
+ โ”‚ โ”‚ โ”œโ”€โ”€ interviewer.js # Interactive interview
208
+ โ”‚ โ”‚ โ””โ”€โ”€ wizard.js # Post-install wizard
209
+ โ”‚ โ”œโ”€โ”€ platforms/ # Platform adapters
210
+ โ”‚ โ”‚ โ”œโ”€โ”€ copilot-cli.js # GitHub Copilot CLI
211
+ โ”‚ โ”‚ โ”œโ”€โ”€ vscode.js # VSCode extension
212
+ โ”‚ โ”‚ โ”œโ”€โ”€ claude-code.js # Claude Code MCP
213
+ โ”‚ โ”‚ โ””โ”€โ”€ codex.js # Codex platform
214
+ โ”‚ โ”œโ”€โ”€ utils/ # Utilities
215
+ โ”‚ โ”‚ โ”œโ”€โ”€ file-utils.js # File operations
216
+ โ”‚ โ”‚ โ”œโ”€โ”€ logger.js # Logging system
217
+ โ”‚ โ”‚ โ””โ”€โ”€ yaml-utils.js # YAML parsing
218
+ โ”‚ โ”œโ”€โ”€ errors.js # Error definitions
219
+ โ”‚ โ””โ”€โ”€ exit-codes.js # Exit code constants
220
+ โ”œโ”€โ”€ templates/ # Agent templates
221
+ โ”‚ โ””โ”€โ”€ _bmad/
222
+ โ”‚ โ”œโ”€โ”€ core/agents/
223
+ โ”‚ โ”œโ”€โ”€ bmm/agents/
224
+ โ”‚ โ”œโ”€โ”€ bmb/agents/
225
+ โ”‚ โ”œโ”€โ”€ tea/agents/
226
+ โ”‚ โ””โ”€โ”€ cis/agents/
227
+ โ”œโ”€โ”€ __tests__/ # Test suite (168 tests)
228
+ โ”‚ โ”œโ”€โ”€ recommender.test.js
229
+ โ”‚ โ”œโ”€โ”€ installer.test.js
230
+ โ”‚ โ”œโ”€โ”€ validator.test.js
231
+ โ”‚ โ”œโ”€โ”€ troubleshooter.test.js
232
+ โ”‚ โ”œโ”€โ”€ backuper.test.js
233
+ โ”‚ โ”œโ”€โ”€ integration.test.js
234
+ โ”‚ โ”œโ”€โ”€ e2e.test.js
235
+ โ”‚ โ””โ”€โ”€ ...
236
+ โ””โ”€โ”€ package.json
237
+ ```
238
+
239
+ ### Flux d'Installation
240
+
241
+ ```
242
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
243
+ โ”‚ 1. DETECT - Platform & Project Analysis โ”‚
244
+ โ”‚ โ€ข Scan for Copilot CLI, VSCode, Claude, Codex โ”‚
245
+ โ”‚ โ€ข Analyze package.json dependencies โ”‚
246
+ โ”‚ โ€ข Detect project type & framework โ”‚
247
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
248
+ โ”‚
249
+ โ–ผ
250
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
251
+ โ”‚ 2. RECOMMEND - Intelligent Agent Selection โ”‚
252
+ โ”‚ โ€ข Match agents to project type โ”‚
253
+ โ”‚ โ€ข Consider detected platforms โ”‚
254
+ โ”‚ โ€ข Generate rationale for each recommendation โ”‚
255
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
256
+ โ”‚
257
+ โ–ผ
258
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
259
+ โ”‚ 3. INTERVIEW - User Preferences (7 questions) โ”‚
260
+ โ”‚ โ€ข Name, language, mode โ”‚
261
+ โ”‚ โ€ข Agent selection (if custom) โ”‚
262
+ โ”‚ โ€ข Platform targets, backup option โ”‚
263
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
264
+ โ”‚
265
+ โ–ผ
266
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
267
+ โ”‚ 4. BACKUP - Pre-install Safety (optional) โ”‚
268
+ โ”‚ โ€ข Create timestamped backup of _bmad/ โ”‚
269
+ โ”‚ โ€ข Save metadata (files, size, version) โ”‚
270
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
271
+ โ”‚
272
+ โ–ผ
273
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
274
+ โ”‚ 5. INSTALL - Core Installation โ”‚
275
+ โ”‚ โ€ข Create _bmad/ structure (19 directories) โ”‚
276
+ โ”‚ โ€ข Copy agent templates from 5 modules โ”‚
277
+ โ”‚ โ€ข Generate platform stubs (Copilot/VSCode/etc.) โ”‚
278
+ โ”‚ โ€ข Create module configs (YAML with metadata) โ”‚
279
+ โ”‚ โ€ข Update manifests (agent-manifest.csv) โ”‚
280
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
281
+ โ”‚
282
+ โ–ผ
283
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
284
+ โ”‚ 6. VALIDATE - 10 Automated Checks โ”‚
285
+ โ”‚ โ€ข Structure, agents, stubs, configs โ”‚
286
+ โ”‚ โ€ข Permissions, manifests, workflows โ”‚
287
+ โ”‚ โ€ข Templates, dependencies โ”‚
288
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
289
+ โ”‚
290
+ โ–ผ
291
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
292
+ โ”‚ 7. WIZARD - Post-Install Actions โ”‚
293
+ โ”‚ โ€ข Summary of installed agents โ”‚
294
+ โ”‚ โ€ข Option: Create new agent (launch BYAN) โ”‚
295
+ โ”‚ โ€ข Option: Test agent โ”‚
296
+ โ”‚ โ€ข Option: View documentation โ”‚
297
+ โ”‚ โ€ข Quick start guide โ”‚
298
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
299
+ ```
300
+
301
+ ---
302
+
303
+ ## ๐Ÿ“ฆ Modules
304
+
305
+ ### 1. Detector
306
+ **Fichier :** `lib/yanstaller/detector.js`
307
+
308
+ **Fonction :** Dรฉtecte les plateformes installรฉes et analyse le projet.
309
+
310
+ **API :**
311
+ ```javascript
312
+ const detector = require('./lib/yanstaller/detector');
313
+
314
+ // Dรฉtection complรจte
315
+ const detection = await detector.detect({
316
+ projectRoot: '/path/to/project'
317
+ });
318
+
319
+ /* Retour :
320
+ {
321
+ platforms: ['copilot-cli', 'vscode'],
322
+ projectType: 'frontend',
323
+ framework: 'react',
324
+ dependencies: { react: '^18.2.0', ... },
325
+ hasGit: true,
326
+ hasNpm: true
327
+ }
328
+ */
329
+ ```
330
+
331
+ **Mรฉthodes :**
332
+ - `detect(options)` - Dรฉtection complรจte
333
+ - `detectPlatforms()` - Scan plateformes disponibles
334
+ - `analyzeProject(projectRoot)` - Analyse `package.json`
335
+
336
+ ---
337
+
338
+ ### 2. Recommender
339
+ **Fichier :** `lib/yanstaller/recommender.js`
340
+
341
+ **Fonction :** Recommande des agents basรฉs sur le contexte du projet.
342
+
343
+ **API :**
344
+ ```javascript
345
+ const recommender = require('./lib/yanstaller/recommender');
346
+
347
+ const recommendations = await recommender.recommend({
348
+ projectRoot: '/path/to/project',
349
+ detection: { projectType: 'frontend', framework: 'react' }
350
+ });
351
+
352
+ /* Retour :
353
+ {
354
+ agents: ['dev', 'ux-designer', 'quinn'],
355
+ rationale: {
356
+ dev: 'Essential for React component development',
357
+ 'ux-designer': 'UI/UX workflow for frontend projects',
358
+ quinn: 'QA automation for testing React components'
359
+ }
360
+ }
361
+ */
362
+ ```
363
+
364
+ **Reconnaissance :**
365
+ - **Frameworks :** React, Vue, Angular, Svelte, Next.js, Nuxt, Express, NestJS, Fastify, Koa, Django, Flask, Rails, Spring Boot, Laravel
366
+ - **Types de projet :** Frontend, Backend, Fullstack, Library
367
+ - **Outils :** Jest, Vitest, Playwright, Cypress, Webpack, Vite, Rollup
368
+
369
+ ---
370
+
371
+ ### 3. Installer
372
+ **Fichier :** `lib/yanstaller/installer.js`
373
+
374
+ **Fonction :** Installe les agents et configure l'environnement.
375
+
376
+ **API :**
377
+ ```javascript
378
+ const installer = require('./lib/yanstaller/installer');
379
+
380
+ const result = await installer.install({
381
+ projectRoot: '/path/to/project',
382
+ agents: ['byan', 'dev', 'quinn'],
383
+ platforms: ['copilot-cli', 'vscode'],
384
+ userName: 'Yan',
385
+ language: 'Francais'
386
+ });
387
+
388
+ /* Retour :
389
+ {
390
+ success: true,
391
+ installedAgents: ['byan', 'dev', 'quinn'],
392
+ createdDirectories: 19,
393
+ generatedStubs: 6,
394
+ configPath: '_bmad/bmb/config.yaml'
395
+ }
396
+ */
397
+ ```
398
+
399
+ **ร‰tapes :**
400
+ 1. `createBmadStructure()` - Crรฉe 19 rรฉpertoires
401
+ 2. `copyAgentFile()` - Copie les templates
402
+ 3. `generatePlatformStubs()` - Gรฉnรจre les stubs
403
+ 4. `createModuleConfig()` - Config YAML
404
+
405
+ ---
406
+
407
+ ### 4. Validator
408
+ **Fichier :** `lib/yanstaller/validator.js`
409
+
410
+ **Fonction :** Valide l'installation avec 10 checks automatisรฉs.
411
+
412
+ **API :**
413
+ ```javascript
414
+ const validator = require('./lib/yanstaller/validator');
415
+
416
+ const validation = await validator.validate({
417
+ projectRoot: '/path/to/project'
418
+ });
419
+
420
+ /* Retour :
421
+ {
422
+ valid: true,
423
+ errors: [],
424
+ warnings: ['Config file missing optional field: document_output_language'],
425
+ checks: {
426
+ structure: 'pass',
427
+ agents: 'pass',
428
+ stubs: 'pass',
429
+ configs: 'pass',
430
+ platforms: 'pass',
431
+ permissions: 'pass',
432
+ manifests: 'pass',
433
+ workflows: 'pass',
434
+ templates: 'pass',
435
+ dependencies: 'pass'
436
+ }
437
+ }
438
+ */
439
+ ```
440
+
441
+ **10 Checks :**
442
+ 1. `checkBmadStructure()` - 9 rรฉpertoires requis
443
+ 2. `checkAgentFiles()` - Agents copiรฉs
444
+ 3. `checkStubsYamlFrontmatter()` - Format YAML/XML
445
+ 4. `checkConfigFiles()` - YAML valide
446
+ 5. `checkPlatformDetection()` - Plateformes actives
447
+ 6. `checkFilePermissions()` - Permissions R/W
448
+ 7. `checkManifests()` - CSV valides
449
+ 8. `checkWorkflows()` - Workflows accessibles
450
+ 9. `checkTemplates()` - Structure templates
451
+ 10. `checkDependencies()` - Dรฉpendances npm
452
+
453
+ ---
454
+
455
+ ### 5. Troubleshooter
456
+ **Fichier :** `lib/yanstaller/troubleshooter.js`
457
+
458
+ **Fonction :** Diagnostique et corrige automatiquement les erreurs.
459
+
460
+ **API :**
461
+ ```javascript
462
+ const troubleshooter = require('./lib/yanstaller/troubleshooter');
463
+
464
+ // Diagnostic seul
465
+ const diagnosis = await troubleshooter.diagnose(error);
466
+ /* Retour :
467
+ {
468
+ pattern: 'PERMISSION',
469
+ message: 'Permission denied: /path/to/_bmad',
470
+ autoFixAvailable: true,
471
+ fixFunction: 'fixPermissions'
472
+ }
473
+ */
474
+
475
+ // Troubleshooting complet
476
+ const result = await troubleshooter.troubleshoot({
477
+ projectRoot: '/path/to/project'
478
+ });
479
+ /* Retour :
480
+ {
481
+ issues: [
482
+ { type: 'permission', path: '_bmad/core', fixed: true }
483
+ ],
484
+ autofixed: 1,
485
+ manualActionRequired: 0
486
+ }
487
+ */
488
+ ```
489
+
490
+ **8 Patterns d'Erreur :**
491
+ 1. `NODE_VERSION` - Node.js obsolรจte
492
+ 2. `PERMISSION` - Permissions insuffisantes
493
+ 3. `NOT_FOUND` - Fichier/rรฉpertoire manquant
494
+ 4. `GIT_MISSING` - Git non installรฉ
495
+ 5. `DISK_SPACE` - Espace disque insuffisant
496
+ 6. `NETWORK` - Problรจme rรฉseau
497
+ 7. `CORRUPTED` - Structure corrompue
498
+ 8. `MISSING_DEP` - Dรฉpendance manquante
499
+
500
+ **5 Auto-Fix :**
501
+ - `fixPermissions()` - icacls (Windows) / chmod (Unix)
502
+ - `repairStructure()` - Recrรฉe `_bmad/`
503
+ - `resetConfig()` - Config YAML par dรฉfaut
504
+ - `reinstallDependencies()` - npm install
505
+ - `reinstallAgents()` - Re-copie templates
506
+
507
+ ---
508
+
509
+ ### 6. Backuper
510
+ **Fichier :** `lib/yanstaller/backuper.js`
511
+
512
+ **Fonction :** Sauvegarde et restaure le rรฉpertoire `_bmad/`.
513
+
514
+ **API :**
515
+ ```javascript
516
+ const backuper = require('./lib/yanstaller/backuper');
517
+
518
+ // Backup
519
+ const backup = await backuper.backup({
520
+ projectRoot: '/path/to/project'
521
+ });
522
+ /* Retour :
523
+ {
524
+ backupPath: '_bmad-backup/backup-1706918400000',
525
+ metadata: {
526
+ timestamp: 1706918400000,
527
+ created: '2026-02-03T10:00:00.000Z',
528
+ source: '/path/to/project/_bmad',
529
+ files: 42,
530
+ size: 1048576,
531
+ version: '1.1.3'
532
+ }
533
+ }
534
+ */
535
+
536
+ // Restore
537
+ const restore = await backuper.restore({
538
+ projectRoot: '/path/to/project',
539
+ backupPath: '_bmad-backup/backup-1706918400000'
540
+ });
541
+ /* Retour :
542
+ {
543
+ success: true,
544
+ restoredFiles: 42,
545
+ preRestoreBackup: '_bmad-backup/backup-1706918500000'
546
+ }
547
+ */
548
+
549
+ // List backups
550
+ const backups = await backuper.listBackups({
551
+ projectRoot: '/path/to/project'
552
+ });
553
+ /* Retour : [
554
+ {
555
+ path: '_bmad-backup/backup-1706918400000',
556
+ timestamp: 1706918400000,
557
+ size: 1048576,
558
+ files: 42
559
+ }
560
+ ]
561
+ */
562
+ ```
563
+
564
+ **Format Metadata :**
565
+ ```json
566
+ {
567
+ "timestamp": 1706918400000,
568
+ "created": "2026-02-03T10:00:00.000Z",
569
+ "source": "/path/to/project/_bmad",
570
+ "files": 42,
571
+ "size": 1048576,
572
+ "version": "1.1.3"
573
+ }
574
+ ```
575
+
576
+ ---
577
+
578
+ ### 7. Interviewer
579
+ **Fichier :** `lib/yanstaller/interviewer.js`
580
+
581
+ **Fonction :** Interview en 7 questions pour personnaliser l'installation.
582
+
583
+ **API :**
584
+ ```javascript
585
+ const interviewer = require('./lib/yanstaller/interviewer');
586
+
587
+ const answers = await interviewer.ask();
588
+ /* Retour :
589
+ {
590
+ userName: 'Yan',
591
+ language: 'Francais',
592
+ mode: 'recommended',
593
+ agents: ['byan', 'dev', 'quinn'],
594
+ platforms: ['copilot-cli', 'vscode'],
595
+ installSampleAgent: true,
596
+ createBackup: true
597
+ }
598
+ */
599
+ ```
600
+
601
+ **7 Questions :**
602
+ 1. **Nom** - Personnalisation
603
+ 2. **Langue** - Franรงais ou English
604
+ 3. **Mode** - Recommended/Custom/Minimal/Full
605
+ 4. **Agents** - Sรฉlection manuelle (si Custom)
606
+ 5. **Plateformes** - Copilot/VSCode/Claude/Codex
607
+ 6. **Agent exemple** - Installer BYAN-Test ?
608
+ 7. **Backup** - Crรฉer sauvegarde ?
609
+
610
+ ---
611
+
612
+ ### 8. Wizard
613
+ **Fichier :** `lib/yanstaller/wizard.js`
614
+
615
+ **Fonction :** Wizard post-installation avec 4 options.
616
+
617
+ **API :**
618
+ ```javascript
619
+ const wizard = require('./lib/yanstaller/wizard');
620
+
621
+ await wizard.show({
622
+ installedAgents: ['byan', 'dev', 'quinn'],
623
+ platforms: ['copilot-cli', 'vscode']
624
+ });
625
+
626
+ // Options interactives :
627
+ // 1. Create new agent (launch BYAN)
628
+ // 2. Test an agent
629
+ // 3. View documentation
630
+ // 4. Exit
631
+ ```
632
+
633
+ **Fonctionnalitรฉs :**
634
+ - `launchByanInterview()` - Instructions pour activer BYAN
635
+ - `testAgent()` - Guide de test d'agent
636
+ - `showDocumentation()` - Chemins de documentation
637
+ - `showExitMessage()` - Guide quick-start
638
+
639
+ ---
640
+
641
+ ## ๐Ÿงช Tests
642
+
643
+ ### Suite de Tests (168 tests)
644
+
645
+ **Coverage :**
646
+ ```bash
647
+ npm test
648
+ ```
649
+
650
+ **Fichiers de test :**
651
+ ```
652
+ __tests__/
653
+ โ”œโ”€โ”€ recommender.test.js (18 tests) - Recommandations d'agents
654
+ โ”œโ”€โ”€ installer.test.js (13 tests) - Installation core
655
+ โ”œโ”€โ”€ platforms.test.js (20 tests) - Adapters plateformes
656
+ โ”œโ”€โ”€ validator.test.js (24 tests) - Validation 10 checks
657
+ โ”œโ”€โ”€ integration.test.js (27 tests) - Tests d'intรฉgration
658
+ โ”œโ”€โ”€ e2e.test.js (16 tests) - Scรฉnarios end-to-end
659
+ โ”œโ”€โ”€ troubleshooter.test.js (20 tests) - Diagnostic & auto-fix
660
+ โ”œโ”€โ”€ backuper.test.js (20 tests) - Backup & restore
661
+ โ””โ”€โ”€ interviewer-wizard.test.js (10 tests) - Interview & wizard
662
+ ```
663
+
664
+ ### Tests E2E Scรฉnarios
665
+
666
+ **Scรฉnario 1 : Projet React Frontend**
667
+ ```javascript
668
+ // Dรฉtection โ†’ Recommend โ†’ Install โ†’ Validate
669
+ const project = { dependencies: { react: '^18.2.0' } };
670
+ // Agents recommandรฉs : dev, ux-designer, quinn
671
+ ```
672
+
673
+ **Scรฉnario 2 : API Backend Express**
674
+ ```javascript
675
+ const project = { dependencies: { express: '^4.18.2' } };
676
+ // Agents recommandรฉs : dev, architect, quinn
677
+ ```
678
+
679
+ **Scรฉnario 3 : Next.js Fullstack**
680
+ ```javascript
681
+ const project = { dependencies: { next: '^14.0.0' } };
682
+ // Agents recommandรฉs : dev, architect, ux-designer, quinn
683
+ ```
684
+
685
+ ### Tests d'Intรฉgration
686
+
687
+ **Performance Benchmarks :**
688
+ - Dรฉtection complรจte : < 2s
689
+ - Installation 5 agents : < 10s
690
+ - Validation 10 checks : < 5s
691
+ - Backup 50 fichiers : < 3s
692
+
693
+ ### Exรฉcution des Tests
694
+
695
+ ```bash
696
+ # Tous les tests
697
+ npm test
698
+
699
+ # Watch mode
700
+ npm run test:watch
701
+
702
+ # Coverage
703
+ npm run test:coverage
704
+
705
+ # Test spรฉcifique
706
+ npm test -- recommender.test.js
707
+ ```
708
+
709
+ ---
710
+
711
+ ## ๐Ÿ› ๏ธ Dรฉveloppement
712
+
713
+ ### Setup Local
714
+
715
+ ```bash
716
+ # Cloner le dรฉpรดt
717
+ git clone https://github.com/Yan-Acadenice/BYAN.git
718
+ cd BYAN/install
719
+
720
+ # Installer les dรฉpendances
721
+ npm install
722
+
723
+ # Lancer en mode dev
724
+ npm start
725
+
726
+ # Tests
727
+ npm test
728
+
729
+ # Linter
730
+ npm run lint
731
+ ```
732
+
733
+ ### Structure de Dรฉveloppement
734
+
735
+ **Conventions :**
736
+ - **Mรฉthodologie :** Merise Agile + TDD + 64 Mantras
737
+ - **Commits :** `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`
738
+ - **NO EMOJIS** dans commits/code/specs (Mantra IA-23)
739
+ - **Clean Code** - Code auto-documentรฉ (Mantra IA-24)
740
+ - **Test-Driven** - Tests avant implรฉmentation
741
+
742
+ **Ajouter un Nouveau Module :**
743
+
744
+ 1. Crรฉer `lib/yanstaller/my-module.js`
745
+ 2. Crรฉer `__tests__/my-module.test.js`
746
+ 3. ร‰crire les tests (TDD)
747
+ 4. Implรฉmenter le module
748
+ 5. Exรฉcuter les tests : `npm test`
749
+ 6. Commit : `feat: add my-module with X functionality`
750
+
751
+ **Ajouter une Nouvelle Plateforme :**
752
+
753
+ 1. Crรฉer `lib/platforms/my-platform.js`
754
+ 2. Implรฉmenter 3 mรฉthodes :
755
+ - `detect()` - Dรฉtecter la plateforme
756
+ - `install(agentName)` - Crรฉer l'agent
757
+ - `generateStub(agentName, config)` - Gรฉnรฉrer le stub
758
+ 3. Ajouter les tests dans `__tests__/platforms.test.js`
759
+ 4. Mettre ร  jour `lib/yanstaller/detector.js`
760
+
761
+ ---
762
+
763
+ ## ๐Ÿค Contributing
764
+
765
+ Les contributions sont les bienvenues ! Merci de suivre ces guidelines :
766
+
767
+ ### Processus de Contribution
768
+
769
+ 1. **Fork** le dรฉpรดt
770
+ 2. **Crรฉer une branche** : `git checkout -b feature/ma-fonctionnalite`
771
+ 3. **ร‰crire les tests** (TDD obligatoire)
772
+ 4. **Implรฉmenter** la fonctionnalitรฉ
773
+ 5. **Tests verts** : `npm test`
774
+ 6. **Commit** : `git commit -m "feat: add ma-fonctionnalite"`
775
+ 7. **Push** : `git push origin feature/ma-fonctionnalite`
776
+ 8. **Pull Request** avec description dรฉtaillรฉe
777
+
778
+ ### Standards de Code
779
+
780
+ - โœ… **TDD** - Tests avant implรฉmentation
781
+ - โœ… **Clean Code** - Fonctions courtes, noms explicites
782
+ - โœ… **No Emojis** - Code/commits/specs techniques
783
+ - โœ… **Comments** - Uniquement pour le "pourquoi", pas le "quoi"
784
+ - โœ… **Async/Await** - Pas de callbacks
785
+ - โœ… **Error Handling** - Try/catch systรฉmatique
786
+
787
+ ### Checklist PR
788
+
789
+ - [ ] Tests รฉcrits et passants (coverage โ‰ฅ 80%)
790
+ - [ ] Documentation mise ร  jour
791
+ - [ ] Commit messages suivent convention
792
+ - [ ] Code lint sans erreurs
793
+ - [ ] Pas de breaking changes (ou documentรฉes)
794
+ - [ ] PR description complรจte
795
+
796
+ ---
797
+
798
+ ## ๐Ÿ“„ License
799
+
800
+ **MIT License**
801
+
802
+ Copyright (c) 2026 Yan
803
+
804
+ Permission is hereby granted, free of charge, to any person obtaining a copy
805
+ of this software and associated documentation files (the "Software"), to deal
806
+ in the Software without restriction, including without limitation the rights
807
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
808
+ copies of the Software, and to permit persons to whom the Software is
809
+ furnished to do so, subject to the following conditions:
810
+
811
+ The above copyright notice and this permission notice shall be included in all
812
+ copies or substantial portions of the Software.
813
+
814
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
815
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
816
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
817
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
818
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
819
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
820
+ SOFTWARE.
821
+
822
+ ---
823
+
824
+ ## ๐ŸŒ Ressources
825
+
826
+ - **Documentation BMAD :** [GitHub Wiki](https://github.com/Yan-Acadenice/BYAN/wiki)
827
+ - **BYAN Agent :** Crรฉateur d'agents intelligent
828
+ - **RACHID Agent :** Dรฉploiement NPM
829
+ - **MARC Agent :** Intรฉgration GitHub Copilot CLI
830
+ - **PATNOTE Agent :** Gestion des mises ร  jour
831
+ - **CARMACK Agent :** Optimisation tokens (-46%)
832
+
833
+ ---
834
+
835
+ ## ๐Ÿ“ง Support
836
+
837
+ - **Issues :** [GitHub Issues](https://github.com/Yan-Acadenice/BYAN/issues)
838
+ - **Discussions :** [GitHub Discussions](https://github.com/Yan-Acadenice/BYAN/discussions)
839
+ - **Email :** yan@example.com
840
+
841
+ ---
842
+
843
+ # ๐Ÿ‡ฌ๐Ÿ‡ง ENGLISH VERSION
844
+
845
+ ---
846
+
847
+ # ๐Ÿ—๏ธ YANSTALLER - Intelligent BYAN Installer
848
+
849
+ [![Version](https://img.shields.io/badge/version-1.2.1-blue.svg)](https://www.npmjs.com/package/create-byan-agent)
850
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
851
+ [![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org)
852
+ [![Tests](https://img.shields.io/badge/tests-168%20passing-success.svg)](#tests)
853
+
854
+ **YANSTALLER** is the intelligent installer for the **BYAN** (Builder of YAN) ecosystem. It automatically detects your development environment, recommends appropriate agents, and installs them with multi-platform support.
855
+
856
+ > ๐Ÿ“ฆ **Based on [BMAD](https://github.com/yanb94/byan)** - Business Modeling & Agent Development Platform
857
+ > โœ๏ธ **Made by [Yan de Acadenice](https://acadenice.fr/)**
858
+
859
+ **Methodology:** Merise Agile + TDD + 64 Mantras
860
+ **Languages:** ๐Ÿ‡ฌ๐Ÿ‡ง English | ๐Ÿ‡ซ๐Ÿ‡ท Franรงais
861
+
862
+ ---
863
+
864
+ ## ๐Ÿ“‹ Table of Contents
865
+
866
+ 1. [Features](#-features)
867
+ 2. [Installation](#-quick-installation)
868
+ 3. [Usage](#-usage)
869
+ 4. [Architecture](#-architecture)
870
+ 5. [Modules](#-modules)
871
+ 6. [API Reference](#-api-reference)
872
+ 7. [Tests](#-tests)
873
+ 8. [Development](#-development)
874
+ 9. [Contributing](#-contributing)
875
+ 10. [License](#-license)
876
+
877
+ ---
878
+
879
+ ## โœจ Features
880
+
881
+ ### ๐ŸŽฏ Intelligent Detection
882
+ - โœ… **Automatic detection** of platforms (GitHub Copilot CLI, VSCode, Claude Code, Codex)
883
+ - โœ… **Project analysis** via `package.json` (20+ recognized frameworks)
884
+ - โœ… **Contextual recommendations** of agents based on your stack
885
+
886
+ ### ๐Ÿค– Available Agents (29 agents)
887
+ - **BMB (Meta):** BYAN, BYAN-Test, RACHID, MARC, PATNOTE, CARMACK, Agent-Builder, Module-Builder, Workflow-Builder
888
+ - **BMM (SDLC):** Analyst, PM, Architect, Dev, SM, Quinn, UX-Designer, Tech-Writer, Quick-Flow-Solo-Dev
889
+ - **TEA (Testing):** TEA (Test Architecture Expert)
890
+ - **CIS (Innovation):** Brainstorming-Coach, Design-Thinking-Coach, Creative-Problem-Solver, Innovation-Strategist, Presentation-Master, Storyteller
891
+ - **Core:** Party-Mode, BMAD-Master
892
+
893
+ ### ๐Ÿš€ Intelligent Installation
894
+ - โœ… **Complete BMAD structure** (19 directories created automatically)
895
+ - โœ… **Generated YAML configuration** with metadata
896
+ - โœ… **Multi-platform stubs** (Copilot CLI, VSCode, Claude Code, Codex)
897
+ - โœ… **MCP Server setup** for Claude Code
898
+ - โœ… **CSV manifests** for agent tracking
899
+
900
+ ### ๐Ÿ” Automated Validation (10 checks)
901
+ - Verify `_bmad/` structure
902
+ - Validate agent files
903
+ - Check YAML frontmatter
904
+ - Validate permissions
905
+ - Verify npm dependencies
906
+ - Test manifests, workflows, templates
907
+
908
+ ### ๐Ÿ› ๏ธ Intelligent Troubleshooting
909
+ - โœ… **8 error patterns** automatically recognized
910
+ - โœ… **Auto-fix** for permissions, corrupted structure, dependencies
911
+ - โœ… **Contextual diagnostics** (Node version, Git, disk space)
912
+ - โœ… **OS-specific upgrade suggestions**
913
+
914
+ ### ๐Ÿ’พ Backup & Rollback
915
+ - โœ… **Automatic backup** before installation
916
+ - โœ… **Metadata** (timestamp, size, files)
917
+ - โœ… **Secure restore** with pre-restore backup
918
+ - โœ… **Automatic cleanup** of old backups
919
+
920
+ ### ๐Ÿง™ Post-Installation Wizard
921
+ - โœ… **7-question interview** (<5 min)
922
+ - โœ… **Conversational mode** with inquirer
923
+ - โœ… **4 post-install options**: create agent, test, docs, exit
924
+ - โœ… **Interactive quick-start guide**
925
+
926
+ ---
927
+
928
+ ## ๐Ÿš€ Quick Installation
929
+
930
+ ### Prerequisites
931
+ - **Node.js** โ‰ฅ 18.0.0
932
+ - **Git** installed
933
+ - At least **1 platform**: GitHub Copilot CLI, VSCode, Claude Code, or Codex
934
+
935
+ ### Via NPX (recommended)
936
+ ```bash
937
+ # Interactive installation
938
+ npx create-byan-agent
939
+
940
+ # Follow the 7-question interview (5 min)
941
+ ```
942
+
943
+ ### Via NPM Global
944
+ ```bash
945
+ # Install globally
946
+ npm install -g create-byan-agent
947
+
948
+ # Run
949
+ create-byan-agent
950
+ ```
951
+
952
+ ### Manual Installation
953
+ ```bash
954
+ # Clone the repository
955
+ git clone https://github.com/Yan-Acadenice/BYAN.git
956
+ cd BYAN/install
957
+
958
+ # Install dependencies
959
+ npm install
960
+
961
+ # Launch installer
962
+ npm start
963
+ ```
964
+
965
+ ---
966
+
967
+ ## ๐ŸŽฎ Usage
968
+
969
+ ### Interview Mode (Recommended)
970
+ ```bash
971
+ npx create-byan-agent
972
+ ```
973
+
974
+ **7 interactive questions:**
975
+ 1. Your name (for personalized configuration)
976
+ 2. Communication language (Franรงais/English)
977
+ 3. Installation mode (Recommended/Custom/Minimal/Full)
978
+ 4. Agent selection (if Custom)
979
+ 5. Target platforms (Copilot/VSCode/Claude/Codex)
980
+ 6. Install sample agent (yes/no)
981
+ 7. Create backup (yes/no)
982
+
983
+ ### Programmatic Mode
984
+
985
+ #### JavaScript API
986
+ ```javascript
987
+ const yanstaller = require('create-byan-agent');
988
+
989
+ // Detection
990
+ const detection = await yanstaller.detect({
991
+ projectRoot: process.cwd()
992
+ });
993
+ console.log(detection.platforms); // ['copilot-cli', 'vscode']
994
+
995
+ // Recommendation
996
+ const recommendations = await yanstaller.recommend({
997
+ projectRoot: process.cwd(),
998
+ detection
999
+ });
1000
+ console.log(recommendations.agents); // ['dev', 'architect', 'quinn']
1001
+
1002
+ // Installation
1003
+ const result = await yanstaller.install({
1004
+ projectRoot: process.cwd(),
1005
+ agents: ['byan', 'dev', 'quinn'],
1006
+ platforms: ['copilot-cli', 'vscode'],
1007
+ userName: 'Yan',
1008
+ language: 'English'
1009
+ });
1010
+
1011
+ // Validation
1012
+ const validation = await yanstaller.validate({
1013
+ projectRoot: process.cwd()
1014
+ });
1015
+ console.log(validation.errors); // []
1016
+ ```
1017
+
1018
+ #### CLI Options
1019
+ ```bash
1020
+ # Silent installation with specific agents
1021
+ create-byan-agent --silent --agents=byan,dev,quinn
1022
+
1023
+ # Custom mode with specific platform
1024
+ create-byan-agent --mode=custom --platforms=copilot-cli
1025
+
1026
+ # Full installation without backup
1027
+ create-byan-agent --mode=full --no-backup
1028
+
1029
+ # Dry-run (simulation)
1030
+ create-byan-agent --dry-run
1031
+
1032
+ # Verbose logging
1033
+ create-byan-agent --verbose
1034
+ ```
1035
+
1036
+ ---
1037
+
1038
+ ## ๐Ÿ›๏ธ Architecture
1039
+
1040
+ ### Project Structure
1041
+ ```
1042
+ install/
1043
+ โ”œโ”€โ”€ bin/
1044
+ โ”‚ โ””โ”€โ”€ create-byan-agent.js # CLI entry point
1045
+ โ”œโ”€โ”€ lib/
1046
+ โ”‚ โ”œโ”€โ”€ yanstaller/ # Core modules
1047
+ โ”‚ โ”‚ โ”œโ”€โ”€ detector.js # Platform & project detection
1048
+ โ”‚ โ”‚ โ”œโ”€โ”€ recommender.js # Agent recommendations
1049
+ โ”‚ โ”‚ โ”œโ”€โ”€ installer.js # Installation orchestration
1050
+ โ”‚ โ”‚ โ”œโ”€โ”€ validator.js # Post-install validation
1051
+ โ”‚ โ”‚ โ”œโ”€โ”€ troubleshooter.js # Error diagnosis & auto-fix
1052
+ โ”‚ โ”‚ โ”œโ”€โ”€ backuper.js # Backup & restore
1053
+ โ”‚ โ”‚ โ”œโ”€โ”€ interviewer.js # Interactive interview
1054
+ โ”‚ โ”‚ โ””โ”€โ”€ wizard.js # Post-install wizard
1055
+ โ”‚ โ”œโ”€โ”€ platforms/ # Platform adapters
1056
+ โ”‚ โ”‚ โ”œโ”€โ”€ copilot-cli.js # GitHub Copilot CLI
1057
+ โ”‚ โ”‚ โ”œโ”€โ”€ vscode.js # VSCode extension
1058
+ โ”‚ โ”‚ โ”œโ”€โ”€ claude-code.js # Claude Code MCP
1059
+ โ”‚ โ”‚ โ””โ”€โ”€ codex.js # Codex platform
1060
+ โ”‚ โ”œโ”€โ”€ utils/ # Utilities
1061
+ โ”‚ โ”‚ โ”œโ”€โ”€ file-utils.js # File operations
1062
+ โ”‚ โ”‚ โ”œโ”€โ”€ logger.js # Logging system
1063
+ โ”‚ โ”‚ โ””โ”€โ”€ yaml-utils.js # YAML parsing
1064
+ โ”‚ โ”œโ”€โ”€ errors.js # Error definitions
1065
+ โ”‚ โ””โ”€โ”€ exit-codes.js # Exit code constants
1066
+ โ”œโ”€โ”€ templates/ # Agent templates
1067
+ โ”‚ โ””โ”€โ”€ _bmad/
1068
+ โ”‚ โ”œโ”€โ”€ core/agents/
1069
+ โ”‚ โ”œโ”€โ”€ bmm/agents/
1070
+ โ”‚ โ”œโ”€โ”€ bmb/agents/
1071
+ โ”‚ โ”œโ”€โ”€ tea/agents/
1072
+ โ”‚ โ””โ”€โ”€ cis/agents/
1073
+ โ”œโ”€โ”€ __tests__/ # Test suite (168 tests)
1074
+ โ””โ”€โ”€ package.json
1075
+ ```
1076
+
1077
+ ### Installation Flow
1078
+
1079
+ ```
1080
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
1081
+ โ”‚ 1. DETECT - Platform & Project Analysis โ”‚
1082
+ โ”‚ โ€ข Scan for Copilot CLI, VSCode, Claude, Codex โ”‚
1083
+ โ”‚ โ€ข Analyze package.json dependencies โ”‚
1084
+ โ”‚ โ€ข Detect project type & framework โ”‚
1085
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1086
+ โ”‚
1087
+ โ–ผ
1088
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
1089
+ โ”‚ 2. RECOMMEND - Intelligent Agent Selection โ”‚
1090
+ โ”‚ โ€ข Match agents to project type โ”‚
1091
+ โ”‚ โ€ข Consider detected platforms โ”‚
1092
+ โ”‚ โ€ข Generate rationale for each recommendation โ”‚
1093
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1094
+ โ”‚
1095
+ โ–ผ
1096
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
1097
+ โ”‚ 3. INTERVIEW - User Preferences (7 questions) โ”‚
1098
+ โ”‚ โ€ข Name, language, mode โ”‚
1099
+ โ”‚ โ€ข Agent selection (if custom) โ”‚
1100
+ โ”‚ โ€ข Platform targets, backup option โ”‚
1101
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1102
+ โ”‚
1103
+ โ–ผ
1104
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
1105
+ โ”‚ 4. BACKUP - Pre-install Safety (optional) โ”‚
1106
+ โ”‚ โ€ข Create timestamped backup of _bmad/ โ”‚
1107
+ โ”‚ โ€ข Save metadata (files, size, version) โ”‚
1108
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1109
+ โ”‚
1110
+ โ–ผ
1111
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
1112
+ โ”‚ 5. INSTALL - Core Installation โ”‚
1113
+ โ”‚ โ€ข Create _bmad/ structure (19 directories) โ”‚
1114
+ โ”‚ โ€ข Copy agent templates from 5 modules โ”‚
1115
+ โ”‚ โ€ข Generate platform stubs (Copilot/VSCode/etc.) โ”‚
1116
+ โ”‚ โ€ข Create module configs (YAML with metadata) โ”‚
1117
+ โ”‚ โ€ข Update manifests (agent-manifest.csv) โ”‚
1118
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1119
+ โ”‚
1120
+ โ–ผ
1121
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
1122
+ โ”‚ 6. VALIDATE - 10 Automated Checks โ”‚
1123
+ โ”‚ โ€ข Structure, agents, stubs, configs โ”‚
1124
+ โ”‚ โ€ข Permissions, manifests, workflows โ”‚
1125
+ โ”‚ โ€ข Templates, dependencies โ”‚
1126
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1127
+ โ”‚
1128
+ โ–ผ
1129
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
1130
+ โ”‚ 7. WIZARD - Post-Install Actions โ”‚
1131
+ โ”‚ โ€ข Summary of installed agents โ”‚
1132
+ โ”‚ โ€ข Option: Create new agent (launch BYAN) โ”‚
1133
+ โ”‚ โ€ข Option: Test agent โ”‚
1134
+ โ”‚ โ€ข Option: View documentation โ”‚
1135
+ โ”‚ โ€ข Quick start guide โ”‚
1136
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
1137
+ ```
1138
+
1139
+ ---
1140
+
1141
+ ## ๐Ÿ“ฆ Modules
1142
+
1143
+ _(Same detailed module documentation as French version, translated to English)_
1144
+
1145
+ ### 1. Detector
1146
+ **File:** `lib/yanstaller/detector.js`
1147
+
1148
+ **Purpose:** Detects installed platforms and analyzes the project.
1149
+
1150
+ **API:** _(Same as French version)_
1151
+
1152
+ ### 2-8. _(Other modules follow same structure as French version)_
1153
+
1154
+ ---
1155
+
1156
+ ## ๐Ÿงช Tests
1157
+
1158
+ ### Test Suite (168 tests)
1159
+
1160
+ **Coverage:**
1161
+ ```bash
1162
+ npm test
1163
+ ```
1164
+
1165
+ **Test files:**
1166
+ ```
1167
+ __tests__/
1168
+ โ”œโ”€โ”€ recommender.test.js (18 tests) - Agent recommendations
1169
+ โ”œโ”€โ”€ installer.test.js (13 tests) - Core installation
1170
+ โ”œโ”€โ”€ platforms.test.js (20 tests) - Platform adapters
1171
+ โ”œโ”€โ”€ validator.test.js (24 tests) - 10-check validation
1172
+ โ”œโ”€โ”€ integration.test.js (27 tests) - Integration tests
1173
+ โ”œโ”€โ”€ e2e.test.js (16 tests) - End-to-end scenarios
1174
+ โ”œโ”€โ”€ troubleshooter.test.js (20 tests) - Diagnostic & auto-fix
1175
+ โ”œโ”€โ”€ backuper.test.js (20 tests) - Backup & restore
1176
+ โ””โ”€โ”€ interviewer-wizard.test.js (10 tests) - Interview & wizard
1177
+ ```
1178
+
1179
+ ---
1180
+
1181
+ ## ๐Ÿ› ๏ธ Development
1182
+
1183
+ ### Local Setup
1184
+
1185
+ ```bash
1186
+ # Clone repository
1187
+ git clone https://github.com/Yan-Acadenice/BYAN.git
1188
+ cd BYAN/install
1189
+
1190
+ # Install dependencies
1191
+ npm install
1192
+
1193
+ # Run in dev mode
1194
+ npm start
1195
+
1196
+ # Tests
1197
+ npm test
1198
+
1199
+ # Linter
1200
+ npm run lint
1201
+ ```
1202
+
1203
+ ---
1204
+
1205
+ ## ๐Ÿค Contributing
1206
+
1207
+ Contributions are welcome! Please follow these guidelines:
1208
+
1209
+ ### Contribution Process
1210
+
1211
+ 1. **Fork** the repository
1212
+ 2. **Create a branch**: `git checkout -b feature/my-feature`
1213
+ 3. **Write tests** (TDD mandatory)
1214
+ 4. **Implement** the feature
1215
+ 5. **Tests pass**: `npm test`
1216
+ 6. **Commit**: `git commit -m "feat: add my-feature"`
1217
+ 7. **Push**: `git push origin feature/my-feature`
1218
+ 8. **Pull Request** with detailed description
1219
+
1220
+ ---
1221
+
1222
+ ## ๐Ÿ“„ License
1223
+
1224
+ **MIT License**
1225
+
1226
+ Copyright (c) 2026 Yan
1227
+
1228
+ _(Full MIT license text as in French version)_
1229
+
1230
+ ---
1231
+
1232
+ ## ๐ŸŒ Resources
1233
+
1234
+ - **BMAD Documentation:** [GitHub Wiki](https://github.com/Yan-Acadenice/BYAN/wiki)
1235
+ - **BYAN Agent:** Intelligent agent creator
1236
+ - **RACHID Agent:** NPM deployment
1237
+ - **MARC Agent:** GitHub Copilot CLI integration
1238
+ - **PATNOTE Agent:** Update management
1239
+ - **CARMACK Agent:** Token optimization (-46%)
1240
+
1241
+ ---
1242
+
1243
+ ## ๐Ÿ“ง Support
1244
+
1245
+ - **Issues:** [GitHub Issues](https://github.com/Yan-Acadenice/BYAN/issues)
1246
+ - **Discussions:** [GitHub Discussions](https://github.com/Yan-Acadenice/BYAN/discussions)
1247
+ - **Email:** yan@example.com
1248
+
1249
+ ---
1250
+
1251
+ **Made with โค๏ธ by Yan | Merise Agile + TDD + 64 Mantras**