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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +196 -388
  2. package/LICENSE +21 -21
  3. package/README.md +420 -1264
  4. package/bin/create-byan-agent-backup.js +220 -220
  5. package/bin/create-byan-agent-fixed.js +301 -301
  6. package/bin/create-byan-agent-v2.js +492 -0
  7. package/bin/create-byan-agent.js +296 -561
  8. package/package.json +68 -64
  9. package/templates/.github/agents/bmad-agent-bmad-master.md +15 -15
  10. package/templates/.github/agents/bmad-agent-bmb-agent-builder.md +15 -15
  11. package/templates/.github/agents/bmad-agent-bmb-module-builder.md +15 -15
  12. package/templates/.github/agents/bmad-agent-bmb-workflow-builder.md +15 -15
  13. package/templates/.github/agents/bmad-agent-bmm-analyst.md +15 -15
  14. package/templates/.github/agents/bmad-agent-bmm-architect.md +15 -15
  15. package/templates/.github/agents/bmad-agent-bmm-dev.md +15 -15
  16. package/templates/.github/agents/bmad-agent-bmm-pm.md +15 -15
  17. package/templates/.github/agents/bmad-agent-bmm-quick-flow-solo-dev.md +15 -15
  18. package/templates/.github/agents/bmad-agent-bmm-quinn.md +15 -15
  19. package/templates/.github/agents/bmad-agent-bmm-sm.md +15 -15
  20. package/templates/.github/agents/bmad-agent-bmm-tech-writer.md +15 -15
  21. package/templates/.github/agents/bmad-agent-bmm-ux-designer.md +15 -15
  22. package/templates/.github/agents/bmad-agent-byan-test.md +32 -32
  23. package/templates/.github/agents/bmad-agent-byan.md +224 -224
  24. package/templates/.github/agents/bmad-agent-carmack.md +18 -18
  25. package/templates/.github/agents/bmad-agent-cis-brainstorming-coach.md +15 -15
  26. package/templates/.github/agents/bmad-agent-cis-creative-problem-solver.md +15 -15
  27. package/templates/.github/agents/bmad-agent-cis-design-thinking-coach.md +15 -15
  28. package/templates/.github/agents/bmad-agent-cis-innovation-strategist.md +15 -15
  29. package/templates/.github/agents/bmad-agent-cis-presentation-master.md +15 -15
  30. package/templates/.github/agents/bmad-agent-cis-storyteller.md +15 -15
  31. package/templates/.github/agents/bmad-agent-marc.md +48 -48
  32. package/templates/.github/agents/bmad-agent-patnote.md +48 -48
  33. package/templates/.github/agents/bmad-agent-rachid.md +47 -47
  34. package/templates/.github/agents/bmad-agent-tea-tea.md +15 -15
  35. package/templates/.github/agents/bmad-agent-test-dynamic.md +21 -21
  36. package/templates/.github/agents/franck.md +379 -379
  37. package/templates/_bmad/bmb/agents/agent-builder.md +59 -59
  38. package/templates/_bmad/bmb/agents/byan-test.md +116 -116
  39. package/templates/_bmad/bmb/agents/byan.md +215 -215
  40. package/templates/_bmad/bmb/agents/marc.md +303 -303
  41. package/templates/_bmad/bmb/agents/module-builder.md +60 -60
  42. package/templates/_bmad/bmb/agents/patnote.md +495 -495
  43. package/templates/_bmad/bmb/agents/rachid.md +184 -184
  44. package/templates/_bmad/bmb/agents/workflow-builder.md +61 -61
  45. package/templates/_bmad/bmb/workflows/byan/data/mantras.yaml +272 -272
  46. package/templates/_bmad/bmb/workflows/byan/data/templates.yaml +59 -59
  47. package/templates/_bmad/bmb/workflows/byan/delete-agent-workflow.md +657 -657
  48. package/templates/_bmad/bmb/workflows/byan/edit-agent-workflow.md +688 -688
  49. package/templates/_bmad/bmb/workflows/byan/interview-workflow.md +753 -753
  50. package/templates/_bmad/bmb/workflows/byan/quick-create-workflow.md +450 -450
  51. package/templates/_bmad/bmb/workflows/byan/templates/base-agent-template.md +79 -79
  52. package/templates/_bmad/bmb/workflows/byan/validate-agent-workflow.md +676 -676
  53. package/templates/_bmad/core/agents/carmack.md +238 -238
  54. package/lib/errors.js +0 -61
  55. package/lib/exit-codes.js +0 -54
  56. package/lib/platforms/claude-code.js +0 -113
  57. package/lib/platforms/codex.js +0 -92
  58. package/lib/platforms/copilot-cli.js +0 -123
  59. package/lib/platforms/index.js +0 -14
  60. package/lib/platforms/vscode.js +0 -51
  61. package/lib/utils/config-loader.js +0 -79
  62. package/lib/utils/file-utils.js +0 -117
  63. package/lib/utils/git-detector.js +0 -35
  64. package/lib/utils/logger.js +0 -64
  65. package/lib/utils/node-detector.js +0 -58
  66. package/lib/utils/os-detector.js +0 -74
  67. package/lib/utils/yaml-utils.js +0 -87
  68. package/lib/yanstaller/backuper.js +0 -308
  69. package/lib/yanstaller/detector.js +0 -141
  70. package/lib/yanstaller/index.js +0 -93
  71. package/lib/yanstaller/installer.js +0 -226
  72. package/lib/yanstaller/interviewer.js +0 -301
  73. package/lib/yanstaller/recommender.js +0 -308
  74. package/lib/yanstaller/troubleshooter.js +0 -498
  75. package/lib/yanstaller/validator.js +0 -602
  76. package/lib/yanstaller/wizard.js +0 -229
  77. package/templates/.github/agents/expert-merise-agile.md +0 -1
package/README.md CHANGED
@@ -1,1265 +1,421 @@
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.3-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
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:**
1019
97
  ```bash
1020
- # Silent installation with specific agents
1021
- create-byan-agent --silent --agents=byan,dev,quinn
1022
-
1023
- # Force interactive prompts (useful inside npm scripts or CI shells without TTY)
1024
- create-byan-agent --interactive
1025
-
1026
- # Custom mode with specific platform
1027
- create-byan-agent --mode=custom --platforms=copilot-cli
1028
-
1029
- # Install on all supported platforms
1030
- create-byan-agent --platforms=all
1031
-
1032
- # Disable agent-assisted interview (fallback to classic prompts)
1033
- create-byan-agent --no-agent-interview
1034
-
1035
- # Agent-assisted interview provider (auto selection)
1036
- # Priority: Copilot CLI → Codex CLI → Claude CLI (if available)
1037
- # Override provider explicitly (if installed):
1038
- # create-byan-agent --agent-provider=codex
1039
-
1040
- # Full installation without backup
1041
- create-byan-agent --mode=full --no-backup
1042
-
1043
- # Dry-run (simulation)
1044
- create-byan-agent --dry-run
1045
-
1046
- # Verbose logging
1047
- create-byan-agent --verbose
1048
- ```
1049
-
1050
- ---
1051
-
1052
- ## 🏛️ Architecture
1053
-
1054
- ### Project Structure
1055
- ```
1056
- install/
1057
- ├── bin/
1058
- │ └── create-byan-agent.js # CLI entry point
1059
- ├── lib/
1060
- │ ├── yanstaller/ # Core modules
1061
- │ │ ├── detector.js # Platform & project detection
1062
- │ │ ├── recommender.js # Agent recommendations
1063
- │ │ ├── installer.js # Installation orchestration
1064
- │ │ ├── validator.js # Post-install validation
1065
- │ │ ├── troubleshooter.js # Error diagnosis & auto-fix
1066
- │ │ ├── backuper.js # Backup & restore
1067
- │ │ ├── interviewer.js # Interactive interview
1068
- │ │ └── wizard.js # Post-install wizard
1069
- │ ├── platforms/ # Platform adapters
1070
- │ │ ├── copilot-cli.js # GitHub Copilot CLI
1071
- │ │ ├── vscode.js # VSCode extension
1072
- │ │ ├── claude-code.js # Claude Code MCP
1073
- │ │ └── codex.js # Codex platform
1074
- │ ├── utils/ # Utilities
1075
- │ │ ├── file-utils.js # File operations
1076
- │ │ ├── logger.js # Logging system
1077
- │ │ └── yaml-utils.js # YAML parsing
1078
- │ ├── errors.js # Error definitions
1079
- │ └── exit-codes.js # Exit code constants
1080
- ├── templates/ # Agent templates
1081
- │ └── _bmad/
1082
- │ ├── core/agents/
1083
- │ ├── bmm/agents/
1084
- │ ├── bmb/agents/
1085
- │ ├── tea/agents/
1086
- │ └── cis/agents/
1087
- ├── __tests__/ # Test suite (168 tests)
1088
- └── package.json
1089
- ```
1090
-
1091
- ### Installation Flow
1092
-
1093
- ```
1094
- ┌─────────────────────────────────────────────────────────┐
1095
- │ 1. DETECT - Platform & Project Analysis │
1096
- │ • Scan for Copilot CLI, VSCode, Claude, Codex │
1097
- │ • Analyze package.json dependencies │
1098
- │ • Detect project type & framework │
1099
- └────────────────────┬────────────────────────────────────┘
1100
-
1101
-
1102
- ┌─────────────────────────────────────────────────────────┐
1103
- │ 2. RECOMMEND - Intelligent Agent Selection │
1104
- │ • Match agents to project type │
1105
- │ • Consider detected platforms │
1106
- │ • Generate rationale for each recommendation │
1107
- └────────────────────┬────────────────────────────────────┘
1108
-
1109
-
1110
- ┌─────────────────────────────────────────────────────────┐
1111
- │ 3. INTERVIEW - User Preferences (7 questions) │
1112
- │ • Name, language, mode │
1113
- │ • Agent selection (if custom) │
1114
- │ • Platform targets, backup option │
1115
- └────────────────────┬────────────────────────────────────┘
1116
-
1117
-
1118
- ┌─────────────────────────────────────────────────────────┐
1119
- │ 4. BACKUP - Pre-install Safety (optional) │
1120
- │ • Create timestamped backup of _bmad/ │
1121
- │ • Save metadata (files, size, version) │
1122
- └────────────────────┬────────────────────────────────────┘
1123
-
1124
-
1125
- ┌─────────────────────────────────────────────────────────┐
1126
- │ 5. INSTALL - Core Installation │
1127
- │ • Create _bmad/ structure (19 directories) │
1128
- │ • Copy agent templates from 5 modules │
1129
- │ • Generate platform stubs (Copilot/VSCode/etc.) │
1130
- │ • Create module configs (YAML with metadata) │
1131
- │ • Update manifests (agent-manifest.csv) │
1132
- └────────────────────┬────────────────────────────────────┘
1133
-
1134
-
1135
- ┌─────────────────────────────────────────────────────────┐
1136
- │ 6. VALIDATE - 10 Automated Checks │
1137
- │ • Structure, agents, stubs, configs │
1138
- │ • Permissions, manifests, workflows │
1139
- │ • Templates, dependencies │
1140
- └────────────────────┬────────────────────────────────────┘
1141
-
1142
-
1143
- ┌─────────────────────────────────────────────────────────┐
1144
- │ 7. WIZARD - Post-Install Actions │
1145
- │ • Summary of installed agents │
1146
- │ • Option: Create new agent (launch BYAN) │
1147
- │ • Option: Test agent │
1148
- │ • Option: View documentation │
1149
- │ • Quick start guide │
1150
- └─────────────────────────────────────────────────────────┘
1151
- ```
1152
-
1153
- ---
1154
-
1155
- ## 📦 Modules
1156
-
1157
- _(Same detailed module documentation as French version, translated to English)_
1158
-
1159
- ### 1. Detector
1160
- **File:** `lib/yanstaller/detector.js`
1161
-
1162
- **Purpose:** Detects installed platforms and analyzes the project.
1163
-
1164
- **API:** _(Same as French version)_
1165
-
1166
- ### 2-8. _(Other modules follow same structure as French version)_
1167
-
1168
- ---
1169
-
1170
- ## 🧪 Tests
1171
-
1172
- ### Test Suite (168 tests)
1173
-
1174
- **Coverage:**
1175
- ```bash
1176
- npm test
1177
- ```
1178
-
1179
- **Test files:**
1180
- ```
1181
- __tests__/
1182
- ├── recommender.test.js (18 tests) - Agent recommendations
1183
- ├── installer.test.js (13 tests) - Core installation
1184
- ├── platforms.test.js (20 tests) - Platform adapters
1185
- ├── validator.test.js (24 tests) - 10-check validation
1186
- ├── integration.test.js (27 tests) - Integration tests
1187
- ├── e2e.test.js (16 tests) - End-to-end scenarios
1188
- ├── troubleshooter.test.js (20 tests) - Diagnostic & auto-fix
1189
- ├── backuper.test.js (20 tests) - Backup & restore
1190
- └── interviewer-wizard.test.js (10 tests) - Interview & wizard
1191
- ```
1192
-
1193
- ---
1194
-
1195
- ## 🛠️ Development
1196
-
1197
- ### Local Setup
1198
-
1199
- ```bash
1200
- # Clone repository
1201
- git clone https://github.com/Yan-Acadenice/BYAN.git
1202
- cd BYAN/install
1203
-
1204
- # Install dependencies
1205
- npm install
1206
-
1207
- # Run in dev mode
1208
- npm start
1209
-
1210
- # Tests
1211
- npm test
1212
-
1213
- # Linter
1214
- npm run lint
1215
- ```
1216
-
1217
- ---
1218
-
1219
- ## 🤝 Contributing
1220
-
1221
- Contributions are welcome! Please follow these guidelines:
1222
-
1223
- ### Contribution Process
1224
-
1225
- 1. **Fork** the repository
1226
- 2. **Create a branch**: `git checkout -b feature/my-feature`
1227
- 3. **Write tests** (TDD mandatory)
1228
- 4. **Implement** the feature
1229
- 5. **Tests pass**: `npm test`
1230
- 6. **Commit**: `git commit -m "feat: add my-feature"`
1231
- 7. **Push**: `git push origin feature/my-feature`
1232
- 8. **Pull Request** with detailed description
1233
-
1234
- ---
1235
-
1236
- ## 📄 License
1237
-
1238
- **MIT License**
1239
-
1240
- Copyright (c) 2026 Yan
1241
-
1242
- _(Full MIT license text as in French version)_
1243
-
1244
- ---
1245
-
1246
- ## 🌐 Resources
1247
-
1248
- - **BMAD Documentation:** [GitHub Wiki](https://github.com/Yan-Acadenice/BYAN/wiki)
1249
- - **BYAN Agent:** Intelligent agent creator
1250
- - **RACHID Agent:** NPM deployment
1251
- - **MARC Agent:** GitHub Copilot CLI integration
1252
- - **PATNOTE Agent:** Update management
1253
- - **CARMACK Agent:** Token optimization (-46%)
1254
-
1255
- ---
1256
-
1257
- ## 📧 Support
1258
-
1259
- - **Issues:** [GitHub Issues](https://github.com/Yan-Acadenice/BYAN/issues)
1260
- - **Discussions:** [GitHub Discussions](https://github.com/Yan-Acadenice/BYAN/discussions)
1261
- - **Email:** yan@example.com
1262
-
1263
- ---
1264
-
1265
- **Made with ❤️ by Yan | Merise Agile + TDD + 64 Mantras**
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!** 🏗️