create-byan-agent 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +287 -0
- package/bin/create-byan-agent.js +220 -0
- package/install.sh +239 -0
- package/package-npm.json +55 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# BYAN - Builder of YAN
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Methodology:** Merise Agile + TDD + 64 Mantras
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 🏗️ What is BYAN?
|
|
9
|
+
|
|
10
|
+
**BYAN (Builder of YAN)** is an intelligent agent creator that generates specialized AI agents through structured interviews.
|
|
11
|
+
|
|
12
|
+
**Key Features:**
|
|
13
|
+
- 30-45 min intelligent interview process
|
|
14
|
+
- Applies 64 mantras systematically
|
|
15
|
+
- Zero Trust philosophy (challenges requirements)
|
|
16
|
+
- Multi-platform support (Copilot, VSCode, Claude, Codex)
|
|
17
|
+
- TDD-driven validation
|
|
18
|
+
- Consequences evaluation before actions
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🚀 Quick Start
|
|
23
|
+
|
|
24
|
+
### Installation
|
|
25
|
+
|
|
26
|
+
**Option 1: NPX (Recommended)**
|
|
27
|
+
```bash
|
|
28
|
+
npx create-byan-agent
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Option 2: Bash Script**
|
|
32
|
+
```bash
|
|
33
|
+
curl -fsSL https://raw.githubusercontent.com/yan/byan/main/install/install.sh | bash
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Option 3: Manual**
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/yan/byan.git
|
|
39
|
+
cd byan
|
|
40
|
+
./install/install.sh
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 📖 Usage
|
|
46
|
+
|
|
47
|
+
### Activate BYAN
|
|
48
|
+
|
|
49
|
+
**GitHub Copilot CLI:**
|
|
50
|
+
```bash
|
|
51
|
+
gh copilot suggest "activate byan agent"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**VSCode:**
|
|
55
|
+
1. Open Command Palette (Ctrl+Shift+P)
|
|
56
|
+
2. Type: "Activate BYAN Agent"
|
|
57
|
+
3. Select BYAN from list
|
|
58
|
+
|
|
59
|
+
**Claude Code:**
|
|
60
|
+
```bash
|
|
61
|
+
claude chat --agent byan
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Create Your First Agent
|
|
65
|
+
|
|
66
|
+
**Full Interview (30-45 min):**
|
|
67
|
+
```
|
|
68
|
+
[INT] Start Intelligent Interview
|
|
69
|
+
```
|
|
70
|
+
Best for: First agent, critical agents, complex requirements
|
|
71
|
+
|
|
72
|
+
**Quick Create (10 min):**
|
|
73
|
+
```
|
|
74
|
+
[QC] Quick Create
|
|
75
|
+
```
|
|
76
|
+
Best for: Additional agents, clear requirements, existing project context
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 🎯 BYAN Menu
|
|
81
|
+
|
|
82
|
+
| Command | Description | Duration |
|
|
83
|
+
|---------|-------------|----------|
|
|
84
|
+
| **[INT]** | Intelligent Interview | 30-45 min |
|
|
85
|
+
| **[QC]** | Quick Create | 10 min |
|
|
86
|
+
| **[LA]** | List all agents | Instant |
|
|
87
|
+
| **[EA]** | Edit existing agent | 10-20 min |
|
|
88
|
+
| **[VA]** | Validate agent (64 mantras) | 5-10 min |
|
|
89
|
+
| **[DA-AGENT]** | Delete agent (with backup) | 5 min |
|
|
90
|
+
| **[PC]** | Show project context | Instant |
|
|
91
|
+
| **[MAN]** | Display 64 mantras | Instant |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 📚 Methodology
|
|
96
|
+
|
|
97
|
+
BYAN applies **Merise Agile + TDD** with 64 mantras:
|
|
98
|
+
|
|
99
|
+
### 39 Conception Mantras
|
|
100
|
+
- Philosophy: Model serves business, not reverse
|
|
101
|
+
- Agility: User stories → Entities (bottom-up)
|
|
102
|
+
- Quality: KISS, DRY, YAGNI
|
|
103
|
+
- Tests: TDD is not optional
|
|
104
|
+
- Merise Rigor: Data Dictionary First, MCD ⇄ MCT
|
|
105
|
+
- Problem Solving: Ockham's Razor, Inversion techniques
|
|
106
|
+
- **Consequences: Evaluate 10 dimensions before action**
|
|
107
|
+
|
|
108
|
+
### 25 AI Agent Mantras
|
|
109
|
+
- Intelligence: Trust But Verify, Context is King
|
|
110
|
+
- **Validation: Challenge Before Confirm**
|
|
111
|
+
- Autonomy: Self-Aware Agent
|
|
112
|
+
- **Code Quality: No Emoji Pollution, Clean Code**
|
|
113
|
+
|
|
114
|
+
Full list: `_bmad/bmb/workflows/byan/data/mantras.yaml`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 🔧 Project Structure
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
your-project/
|
|
122
|
+
├── _bmad/
|
|
123
|
+
│ ├── bmb/ # BYAN Module
|
|
124
|
+
│ │ ├── agents/
|
|
125
|
+
│ │ │ └── byan.md # BYAN agent definition
|
|
126
|
+
│ │ ├── workflows/
|
|
127
|
+
│ │ │ └── byan/
|
|
128
|
+
│ │ │ ├── interview-workflow.md
|
|
129
|
+
│ │ │ ├── quick-create-workflow.md
|
|
130
|
+
│ │ │ ├── edit-agent-workflow.md
|
|
131
|
+
│ │ │ ├── validate-agent-workflow.md
|
|
132
|
+
│ │ │ ├── delete-agent-workflow.md
|
|
133
|
+
│ │ │ ├── templates/
|
|
134
|
+
│ │ │ │ └── base-agent-template.md
|
|
135
|
+
│ │ │ └── data/
|
|
136
|
+
│ │ │ ├── mantras.yaml
|
|
137
|
+
│ │ │ └── templates.yaml
|
|
138
|
+
│ │ └── config.yaml # Module configuration
|
|
139
|
+
│ ├── core/ # BMAD Core
|
|
140
|
+
│ ├── _output/ # Generated files
|
|
141
|
+
│ └── {your-module}/
|
|
142
|
+
│ └── agents/ # Your generated agents
|
|
143
|
+
└── install/
|
|
144
|
+
├── install.sh # Bash installer
|
|
145
|
+
├── package.json # NPX package
|
|
146
|
+
└── bin/
|
|
147
|
+
└── create-byan-agent.js # NPX installer script
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 🎓 Interview Process
|
|
153
|
+
|
|
154
|
+
BYAN conducts a 4-phase interview:
|
|
155
|
+
|
|
156
|
+
### Phase 1: Project Context (15-30 min)
|
|
157
|
+
- Project name, description, domain
|
|
158
|
+
- Technical stack and constraints
|
|
159
|
+
- Team size, skills, maturity
|
|
160
|
+
- **Pain points (5 Whys on main pain)**
|
|
161
|
+
- Goals and success criteria
|
|
162
|
+
|
|
163
|
+
### Phase 2: Business/Domain (15-20 min)
|
|
164
|
+
- Business domain deep dive
|
|
165
|
+
- **Interactive glossary (minimum 5 concepts)**
|
|
166
|
+
- Actors, processes, business rules
|
|
167
|
+
- Edge cases and constraints
|
|
168
|
+
- Regulatory requirements
|
|
169
|
+
|
|
170
|
+
### Phase 3: Agent Needs (10-15 min)
|
|
171
|
+
- Agent role and responsibilities
|
|
172
|
+
- Required knowledge (business + technical)
|
|
173
|
+
- **Capabilities (minimum 3)**
|
|
174
|
+
- **Mantras to prioritize (minimum 5)**
|
|
175
|
+
- Communication style
|
|
176
|
+
- **Use cases (minimum 3)**
|
|
177
|
+
|
|
178
|
+
### Phase 4: Validation (10 min)
|
|
179
|
+
- Complete synthesis
|
|
180
|
+
- **Challenge inconsistencies**
|
|
181
|
+
- Validate with user
|
|
182
|
+
- Create ProjectContext
|
|
183
|
+
- Finalize AgentSpec
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## ✅ Validation
|
|
188
|
+
|
|
189
|
+
BYAN validates agents against:
|
|
190
|
+
- Business rules (RG-AGT-001 to RG-DEL-002)
|
|
191
|
+
- 64 Mantras compliance
|
|
192
|
+
- BMAD format standards
|
|
193
|
+
- Best practices
|
|
194
|
+
|
|
195
|
+
**Validation Levels:**
|
|
196
|
+
- 🔴 CRITICAL: Must pass (deployment blocked)
|
|
197
|
+
- 🟡 IMPORTANT: Should pass (warnings)
|
|
198
|
+
- 🟢 SUGGESTIONS: Nice to have
|
|
199
|
+
|
|
200
|
+
**Grading:**
|
|
201
|
+
- A+ (95-100): Exemplary
|
|
202
|
+
- A (90-94): Excellent
|
|
203
|
+
- B (80-89): Good
|
|
204
|
+
- C (70-79): Acceptable
|
|
205
|
+
- D (60-69): Needs improvement
|
|
206
|
+
- F (<60): Failing
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 🛡️ Zero Trust Philosophy
|
|
211
|
+
|
|
212
|
+
BYAN never blindly accepts requirements:
|
|
213
|
+
|
|
214
|
+
**Challenge Before Confirm:**
|
|
215
|
+
- Detects inconsistencies
|
|
216
|
+
- Questions assumptions
|
|
217
|
+
- Plays devil's advocate
|
|
218
|
+
- Signals problems early
|
|
219
|
+
|
|
220
|
+
**Trust But Verify:**
|
|
221
|
+
- Validates all inputs
|
|
222
|
+
- Cross-checks data
|
|
223
|
+
- Ensures coherence
|
|
224
|
+
|
|
225
|
+
**Example:**
|
|
226
|
+
```
|
|
227
|
+
User: "I need an agent that does everything"
|
|
228
|
+
BYAN: "I'm challenging that requirement. Wouldn't a specialized
|
|
229
|
+
agent that does ONE thing exceptionally well be more valuable?
|
|
230
|
+
What's the ONE most critical capability you need?"
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 📊 Consequences Evaluation
|
|
236
|
+
|
|
237
|
+
Before any important action, BYAN evaluates 10 dimensions:
|
|
238
|
+
|
|
239
|
+
1. **Scope:** Components affected
|
|
240
|
+
2. **Data:** Database impacts
|
|
241
|
+
3. **Code:** Files to modify
|
|
242
|
+
4. **Team:** People affected
|
|
243
|
+
5. **Clients:** User workflows
|
|
244
|
+
6. **Legal:** Compliance
|
|
245
|
+
7. **Operations:** Deployment complexity
|
|
246
|
+
8. **Dependencies:** Systems impacted
|
|
247
|
+
9. **Time:** Duration estimates
|
|
248
|
+
10. **Alternatives:** Other options
|
|
249
|
+
|
|
250
|
+
**Risk Levels:**
|
|
251
|
+
- 🟢 LOW: Safe to proceed
|
|
252
|
+
- 🟡 MEDIUM: Caution required
|
|
253
|
+
- 🔴 HIGH: Team approval needed
|
|
254
|
+
- 🔥 CRITICAL: Requires migration plan
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 📝 Configuration
|
|
259
|
+
|
|
260
|
+
Edit `_bmad/bmb/config.yaml`:
|
|
261
|
+
|
|
262
|
+
```yaml
|
|
263
|
+
user_name: Your Name
|
|
264
|
+
communication_language: Francais|English
|
|
265
|
+
document_output_language: Francais|English
|
|
266
|
+
output_folder: "{project-root}/_bmad-output"
|
|
267
|
+
platform: copilot|vscode|claude|codex
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 📄 License
|
|
273
|
+
|
|
274
|
+
MIT License - See LICENSE file
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## 🙏 Credits
|
|
279
|
+
|
|
280
|
+
**Created by:** Yan + Carson (Brainstorming Coach)
|
|
281
|
+
**Methodology:** Merise Agile + TDD
|
|
282
|
+
**Mantras:** 64 principles from 2-hour brainstorming session
|
|
283
|
+
**Date:** 2026-02-02
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
**Happy agent building!** 🏗️
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { program } = require('commander');
|
|
6
|
+
const inquirer = require('inquirer');
|
|
7
|
+
const chalk = require('chalk');
|
|
8
|
+
const ora = require('ora');
|
|
9
|
+
const yaml = require('js-yaml');
|
|
10
|
+
|
|
11
|
+
const BYAN_VERSION = '1.0.0';
|
|
12
|
+
|
|
13
|
+
// ASCII Art Banner
|
|
14
|
+
const banner = `
|
|
15
|
+
${chalk.blue('╔════════════════════════════════════════════════════════════╗')}
|
|
16
|
+
${chalk.blue('║')} ${chalk.blue('║')}
|
|
17
|
+
${chalk.blue('║')} ${chalk.bold('🏗️ BYAN INSTALLER v' + BYAN_VERSION)} ${chalk.blue('║')}
|
|
18
|
+
${chalk.blue('║')} ${chalk.gray('Builder of YAN - Agent Creator')} ${chalk.blue('║')}
|
|
19
|
+
${chalk.blue('║')} ${chalk.blue('║')}
|
|
20
|
+
${chalk.blue('║')} ${chalk.gray('Methodology: Merise Agile + TDD + 64 Mantras')} ${chalk.blue('║')}
|
|
21
|
+
${chalk.blue('║')} ${chalk.blue('║')}
|
|
22
|
+
${chalk.blue('╚════════════════════════════════════════════════════════════╝')}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
// Main installer
|
|
26
|
+
async function install() {
|
|
27
|
+
console.clear();
|
|
28
|
+
console.log(banner);
|
|
29
|
+
|
|
30
|
+
const projectRoot = process.cwd();
|
|
31
|
+
|
|
32
|
+
// Step 1: Detect project type
|
|
33
|
+
const spinner = ora('Detecting project type...').start();
|
|
34
|
+
|
|
35
|
+
const isGitRepo = await fs.pathExists(path.join(projectRoot, '.git'));
|
|
36
|
+
const hasPackageJson = await fs.pathExists(path.join(projectRoot, 'package.json'));
|
|
37
|
+
const hasPyProject = await fs.pathExists(path.join(projectRoot, 'pyproject.toml'));
|
|
38
|
+
|
|
39
|
+
if (!isGitRepo && !hasPackageJson && !hasPyProject) {
|
|
40
|
+
spinner.warn('Not in a recognized project directory');
|
|
41
|
+
|
|
42
|
+
const { continueAnyway } = await inquirer.prompt([
|
|
43
|
+
{
|
|
44
|
+
type: 'confirm',
|
|
45
|
+
name: 'continueAnyway',
|
|
46
|
+
message: 'BYAN works best in a project with version control. Continue anyway?',
|
|
47
|
+
default: false
|
|
48
|
+
}
|
|
49
|
+
]);
|
|
50
|
+
|
|
51
|
+
if (!continueAnyway) {
|
|
52
|
+
console.log(chalk.yellow('Installation cancelled.'));
|
|
53
|
+
process.exit(0);
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
spinner.succeed('Project detected');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Step 2: Platform selection
|
|
60
|
+
const { platform } = await inquirer.prompt([
|
|
61
|
+
{
|
|
62
|
+
type: 'list',
|
|
63
|
+
name: 'platform',
|
|
64
|
+
message: 'Select platform to install for:',
|
|
65
|
+
choices: [
|
|
66
|
+
{ name: 'GitHub Copilot CLI', value: 'copilot' },
|
|
67
|
+
{ name: 'VSCode', value: 'vscode' },
|
|
68
|
+
{ name: 'Claude Code', value: 'claude' },
|
|
69
|
+
{ name: 'Codex', value: 'codex' },
|
|
70
|
+
{ name: 'All platforms', value: 'all' }
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
]);
|
|
74
|
+
|
|
75
|
+
// Step 3: User configuration
|
|
76
|
+
const config = await inquirer.prompt([
|
|
77
|
+
{
|
|
78
|
+
type: 'input',
|
|
79
|
+
name: 'userName',
|
|
80
|
+
message: 'Your name:',
|
|
81
|
+
default: 'Developer'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'list',
|
|
85
|
+
name: 'language',
|
|
86
|
+
message: 'Communication language:',
|
|
87
|
+
choices: ['Francais', 'English'],
|
|
88
|
+
default: 'English'
|
|
89
|
+
}
|
|
90
|
+
]);
|
|
91
|
+
|
|
92
|
+
// Step 4: Create directory structure
|
|
93
|
+
const installSpinner = ora('Creating directory structure...').start();
|
|
94
|
+
|
|
95
|
+
const bmadDir = path.join(projectRoot, '_bmad');
|
|
96
|
+
const bmbDir = path.join(bmadDir, 'bmb');
|
|
97
|
+
|
|
98
|
+
await fs.ensureDir(path.join(bmadDir, 'bmb', 'agents'));
|
|
99
|
+
await fs.ensureDir(path.join(bmadDir, 'bmb', 'workflows', 'byan', 'steps'));
|
|
100
|
+
await fs.ensureDir(path.join(bmadDir, 'bmb', 'workflows', 'byan', 'templates'));
|
|
101
|
+
await fs.ensureDir(path.join(bmadDir, 'bmb', 'workflows', 'byan', 'data'));
|
|
102
|
+
await fs.ensureDir(path.join(bmadDir, 'core'));
|
|
103
|
+
await fs.ensureDir(path.join(bmadDir, '_config'));
|
|
104
|
+
await fs.ensureDir(path.join(bmadDir, '_memory'));
|
|
105
|
+
await fs.ensureDir(path.join(bmadDir, '_output'));
|
|
106
|
+
|
|
107
|
+
installSpinner.succeed('Directory structure created');
|
|
108
|
+
|
|
109
|
+
// Step 5: Copy BYAN files
|
|
110
|
+
const copySpinner = ora('Installing BYAN files...').start();
|
|
111
|
+
|
|
112
|
+
// In production, these would be copied from the package
|
|
113
|
+
// For now, we'll create minimal config
|
|
114
|
+
|
|
115
|
+
const configContent = {
|
|
116
|
+
bmb_creations_output_folder: "{project-root}/_bmad-output/bmb-creations",
|
|
117
|
+
user_name: config.userName,
|
|
118
|
+
communication_language: config.language,
|
|
119
|
+
document_output_language: config.language,
|
|
120
|
+
output_folder: "{project-root}/_bmad-output",
|
|
121
|
+
platform: platform
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const configPath = path.join(bmbDir, 'config.yaml');
|
|
125
|
+
await fs.writeFile(configPath, yaml.dump(configContent), 'utf8');
|
|
126
|
+
|
|
127
|
+
copySpinner.succeed('BYAN files installed');
|
|
128
|
+
|
|
129
|
+
// Step 6: Create shortcuts
|
|
130
|
+
const shortcutSpinner = ora('Creating shortcuts...').start();
|
|
131
|
+
|
|
132
|
+
// Create package.json scripts if it exists
|
|
133
|
+
if (hasPackageJson) {
|
|
134
|
+
const pkgPath = path.join(projectRoot, 'package.json');
|
|
135
|
+
const pkg = await fs.readJson(pkgPath);
|
|
136
|
+
|
|
137
|
+
if (!pkg.scripts) pkg.scripts = {};
|
|
138
|
+
|
|
139
|
+
if (!pkg.scripts.byan) {
|
|
140
|
+
pkg.scripts.byan = 'echo "BYAN agent installed. Activate in your AI platform."';
|
|
141
|
+
await fs.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
142
|
+
shortcutSpinner.succeed('NPM script added');
|
|
143
|
+
} else {
|
|
144
|
+
shortcutSpinner.info('NPM script already exists');
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
shortcutSpinner.succeed('Shortcuts created');
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Step 7: Verification
|
|
151
|
+
const verifySpinner = ora('Verifying installation...').start();
|
|
152
|
+
|
|
153
|
+
const checks = [
|
|
154
|
+
await fs.pathExists(path.join(bmbDir, 'agents')),
|
|
155
|
+
await fs.pathExists(path.join(bmbDir, 'workflows', 'byan')),
|
|
156
|
+
await fs.pathExists(configPath)
|
|
157
|
+
];
|
|
158
|
+
|
|
159
|
+
const passed = checks.filter(Boolean).length;
|
|
160
|
+
|
|
161
|
+
if (passed === checks.length) {
|
|
162
|
+
verifySpinner.succeed(`Verification: ${passed}/${checks.length} checks passed`);
|
|
163
|
+
} else {
|
|
164
|
+
verifySpinner.warn(`Verification: ${passed}/${checks.length} checks passed`);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Success message
|
|
168
|
+
console.log('');
|
|
169
|
+
console.log(chalk.green('╔════════════════════════════════════════════════════════════╗'));
|
|
170
|
+
console.log(chalk.green('║ ║'));
|
|
171
|
+
console.log(chalk.green('║ ✅ BYAN INSTALLATION COMPLETE! ║'));
|
|
172
|
+
console.log(chalk.green('║ ║'));
|
|
173
|
+
console.log(chalk.green('╚════════════════════════════════════════════════════════════╝'));
|
|
174
|
+
console.log('');
|
|
175
|
+
|
|
176
|
+
console.log(chalk.bold('Installation Summary:'));
|
|
177
|
+
console.log(` • Platform: ${chalk.cyan(platform)}`);
|
|
178
|
+
console.log(` • Installation Directory: ${chalk.cyan(bmbDir)}`);
|
|
179
|
+
console.log(` • Configuration: ${chalk.cyan(configPath)}`);
|
|
180
|
+
console.log(` • User: ${chalk.cyan(config.userName)}`);
|
|
181
|
+
console.log(` • Language: ${chalk.cyan(config.language)}`);
|
|
182
|
+
console.log('');
|
|
183
|
+
|
|
184
|
+
console.log(chalk.bold('Next Steps:'));
|
|
185
|
+
console.log('');
|
|
186
|
+
console.log(chalk.yellow('1. Activate BYAN:'));
|
|
187
|
+
|
|
188
|
+
if (platform === 'copilot') {
|
|
189
|
+
console.log(` ${chalk.blue('gh copilot suggest "activate byan agent"')}`);
|
|
190
|
+
} else if (platform === 'vscode') {
|
|
191
|
+
console.log(' Open VSCode Command Palette (Ctrl+Shift+P)');
|
|
192
|
+
console.log(' Type: "Activate BYAN Agent"');
|
|
193
|
+
} else if (platform === 'claude') {
|
|
194
|
+
console.log(` ${chalk.blue('claude chat --agent byan')}`);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
console.log('');
|
|
198
|
+
console.log(chalk.yellow('2. Create your first agent:'));
|
|
199
|
+
console.log(' [INT] Start Intelligent Interview (30-45 min)');
|
|
200
|
+
console.log(' [QC] Quick Create (10 min)');
|
|
201
|
+
console.log('');
|
|
202
|
+
|
|
203
|
+
console.log(chalk.yellow('3. Explore documentation:'));
|
|
204
|
+
console.log(` • Configuration: ${chalk.cyan(configPath)}`);
|
|
205
|
+
console.log(` • Workflows: ${chalk.cyan(path.join(bmbDir, 'workflows', 'byan'))}`);
|
|
206
|
+
console.log('');
|
|
207
|
+
|
|
208
|
+
console.log(chalk.gray('Need help? Type \'/bmad-help\' when BYAN is active'));
|
|
209
|
+
console.log('');
|
|
210
|
+
console.log(chalk.blue('Happy agent building! 🏗️'));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// CLI Program
|
|
214
|
+
program
|
|
215
|
+
.name('create-byan-agent')
|
|
216
|
+
.description('Install BYAN - Builder of YAN agent creator')
|
|
217
|
+
.version(BYAN_VERSION)
|
|
218
|
+
.action(install);
|
|
219
|
+
|
|
220
|
+
program.parse(process.argv);
|
package/install.sh
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# BYAN Installer Script
|
|
3
|
+
# Version: 1.0.0
|
|
4
|
+
# Compatible: GitHub Copilot CLI, VSCode, Claude Code, Codex
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Colors
|
|
9
|
+
RED='\033[0;31m'
|
|
10
|
+
GREEN='\033[0;32m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
BLUE='\033[0;34m'
|
|
13
|
+
NC='\033[0m' # No Color
|
|
14
|
+
|
|
15
|
+
# Configuration
|
|
16
|
+
BYAN_VERSION="1.0.0"
|
|
17
|
+
PROJECT_ROOT="$(pwd)"
|
|
18
|
+
BMAD_DIR="${PROJECT_ROOT}/_bmad"
|
|
19
|
+
INSTALL_DIR="${BMAD_DIR}/bmb"
|
|
20
|
+
|
|
21
|
+
echo -e "${BLUE}"
|
|
22
|
+
echo "╔════════════════════════════════════════════════════════════╗"
|
|
23
|
+
echo "║ ║"
|
|
24
|
+
echo "║ 🏗️ BYAN INSTALLER v${BYAN_VERSION} ║"
|
|
25
|
+
echo "║ Builder of YAN - Agent Creator ║"
|
|
26
|
+
echo "║ ║"
|
|
27
|
+
echo "║ Methodology: Merise Agile + TDD + 64 Mantras ║"
|
|
28
|
+
echo "║ ║"
|
|
29
|
+
echo "╚════════════════════════════════════════════════════════════╝"
|
|
30
|
+
echo -e "${NC}"
|
|
31
|
+
|
|
32
|
+
# Check if running in project directory
|
|
33
|
+
if [ ! -d ".git" ] && [ ! -f "package.json" ] && [ ! -f "pyproject.toml" ]; then
|
|
34
|
+
echo -e "${YELLOW}⚠️ Warning: Not in a recognized project directory${NC}"
|
|
35
|
+
echo "BYAN works best when installed in a project with version control."
|
|
36
|
+
echo ""
|
|
37
|
+
read -p "Continue anyway? (y/n): " -n 1 -r
|
|
38
|
+
echo
|
|
39
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
40
|
+
echo "Installation cancelled."
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
# Step 1: Detect platform
|
|
46
|
+
echo -e "${BLUE}[1/7] Detecting platform...${NC}"
|
|
47
|
+
|
|
48
|
+
PLATFORM=""
|
|
49
|
+
if command -v gh &> /dev/null && gh copilot --version &> /dev/null 2>&1; then
|
|
50
|
+
PLATFORM="copilot"
|
|
51
|
+
echo -e "${GREEN}✓ GitHub Copilot CLI detected${NC}"
|
|
52
|
+
elif command -v code &> /dev/null; then
|
|
53
|
+
PLATFORM="vscode"
|
|
54
|
+
echo -e "${GREEN}✓ VSCode detected${NC}"
|
|
55
|
+
elif command -v claude &> /dev/null; then
|
|
56
|
+
PLATFORM="claude"
|
|
57
|
+
echo -e "${GREEN}✓ Claude Code detected${NC}"
|
|
58
|
+
else
|
|
59
|
+
echo -e "${YELLOW}⚠️ No specific platform detected${NC}"
|
|
60
|
+
echo "Select platform to install for:"
|
|
61
|
+
echo "1) GitHub Copilot CLI"
|
|
62
|
+
echo "2) VSCode"
|
|
63
|
+
echo "3) Claude Code"
|
|
64
|
+
echo "4) Codex"
|
|
65
|
+
echo "5) All platforms"
|
|
66
|
+
read -p "Choice (1-5): " platform_choice
|
|
67
|
+
|
|
68
|
+
case $platform_choice in
|
|
69
|
+
1) PLATFORM="copilot";;
|
|
70
|
+
2) PLATFORM="vscode";;
|
|
71
|
+
3) PLATFORM="claude";;
|
|
72
|
+
4) PLATFORM="codex";;
|
|
73
|
+
5) PLATFORM="all";;
|
|
74
|
+
*) echo "Invalid choice"; exit 1;;
|
|
75
|
+
esac
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
# Step 2: Create directory structure
|
|
79
|
+
echo -e "${BLUE}[2/7] Creating directory structure...${NC}"
|
|
80
|
+
|
|
81
|
+
mkdir -p "${BMAD_DIR}"/{bmb,core,_config,_memory,_output}
|
|
82
|
+
mkdir -p "${INSTALL_DIR}"/{agents,workflows/byan/{steps,templates,data},config}
|
|
83
|
+
|
|
84
|
+
echo -e "${GREEN}✓ Directories created${NC}"
|
|
85
|
+
|
|
86
|
+
# Step 3: Download/Install BYAN files
|
|
87
|
+
echo -e "${BLUE}[3/7] Installing BYAN files...${NC}"
|
|
88
|
+
|
|
89
|
+
# Check if we're in the conception directory (development mode)
|
|
90
|
+
if [ -f "${PROJECT_ROOT}/_bmad/bmb/agents/byan.md" ]; then
|
|
91
|
+
echo -e "${YELLOW}Development mode: Using local files${NC}"
|
|
92
|
+
# Files already exist, skip download
|
|
93
|
+
else
|
|
94
|
+
# In production, we would download from GitHub/NPM
|
|
95
|
+
echo -e "${YELLOW}Note: In production, files would be downloaded from repository${NC}"
|
|
96
|
+
echo "For now, please ensure BYAN files are present in _bmad/bmb/"
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# Step 4: Create config
|
|
100
|
+
echo -e "${BLUE}[4/7] Configuring BYAN...${NC}"
|
|
101
|
+
|
|
102
|
+
read -p "Your name: " USER_NAME
|
|
103
|
+
read -p "Communication language (Francais/English): " COMM_LANG
|
|
104
|
+
|
|
105
|
+
cat > "${INSTALL_DIR}/config.yaml" <<EOF
|
|
106
|
+
# BMB Module Configuration
|
|
107
|
+
# Generated by BYAN installer
|
|
108
|
+
# Version: ${BYAN_VERSION}
|
|
109
|
+
# Date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
110
|
+
|
|
111
|
+
bmb_creations_output_folder: "{project-root}/_bmad-output/bmb-creations"
|
|
112
|
+
|
|
113
|
+
# Core Configuration Values
|
|
114
|
+
user_name: ${USER_NAME}
|
|
115
|
+
communication_language: ${COMM_LANG}
|
|
116
|
+
document_output_language: ${COMM_LANG}
|
|
117
|
+
output_folder: "{project-root}/_bmad-output"
|
|
118
|
+
|
|
119
|
+
# Platform
|
|
120
|
+
platform: ${PLATFORM}
|
|
121
|
+
EOF
|
|
122
|
+
|
|
123
|
+
echo -e "${GREEN}✓ Configuration created${NC}"
|
|
124
|
+
|
|
125
|
+
# Step 5: Install dependencies (if needed)
|
|
126
|
+
echo -e "${BLUE}[5/7] Checking dependencies...${NC}"
|
|
127
|
+
|
|
128
|
+
if [ "$PLATFORM" = "copilot" ]; then
|
|
129
|
+
if ! command -v gh &> /dev/null; then
|
|
130
|
+
echo -e "${RED}✗ GitHub CLI not found${NC}"
|
|
131
|
+
echo "Please install: https://cli.github.com/"
|
|
132
|
+
exit 1
|
|
133
|
+
fi
|
|
134
|
+
echo -e "${GREEN}✓ GitHub CLI installed${NC}"
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
# Step 6: Create shortcuts/aliases
|
|
138
|
+
echo -e "${BLUE}[6/7] Creating shortcuts...${NC}"
|
|
139
|
+
|
|
140
|
+
# Add byan alias to shell config
|
|
141
|
+
SHELL_RC="${HOME}/.bashrc"
|
|
142
|
+
if [ -f "${HOME}/.zshrc" ]; then
|
|
143
|
+
SHELL_RC="${HOME}/.zshrc"
|
|
144
|
+
fi
|
|
145
|
+
|
|
146
|
+
if ! grep -q "alias byan=" "${SHELL_RC}" 2>/dev/null; then
|
|
147
|
+
echo "" >> "${SHELL_RC}"
|
|
148
|
+
echo "# BYAN shortcuts" >> "${SHELL_RC}"
|
|
149
|
+
echo "alias byan='cd ${PROJECT_ROOT} && gh copilot suggest \"activate BYAN agent\"'" >> "${SHELL_RC}"
|
|
150
|
+
echo -e "${GREEN}✓ Shell alias created (restart terminal or run: source ${SHELL_RC})${NC}"
|
|
151
|
+
else
|
|
152
|
+
echo -e "${YELLOW}⚠️ Alias already exists${NC}"
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
# Step 7: Verification
|
|
156
|
+
echo -e "${BLUE}[7/7] Verifying installation...${NC}"
|
|
157
|
+
|
|
158
|
+
CHECKS_PASSED=0
|
|
159
|
+
CHECKS_TOTAL=5
|
|
160
|
+
|
|
161
|
+
if [ -d "${INSTALL_DIR}/agents" ]; then
|
|
162
|
+
echo -e "${GREEN}✓ Agents directory exists${NC}"
|
|
163
|
+
((CHECKS_PASSED++))
|
|
164
|
+
fi
|
|
165
|
+
|
|
166
|
+
if [ -d "${INSTALL_DIR}/workflows/byan" ]; then
|
|
167
|
+
echo -e "${GREEN}✓ Workflows directory exists${NC}"
|
|
168
|
+
((CHECKS_PASSED++))
|
|
169
|
+
fi
|
|
170
|
+
|
|
171
|
+
if [ -f "${INSTALL_DIR}/config.yaml" ]; then
|
|
172
|
+
echo -e "${GREEN}✓ Configuration file created${NC}"
|
|
173
|
+
((CHECKS_PASSED++))
|
|
174
|
+
fi
|
|
175
|
+
|
|
176
|
+
if [ -f "${INSTALL_DIR}/agents/byan.md" ]; then
|
|
177
|
+
echo -e "${GREEN}✓ BYAN agent file found${NC}"
|
|
178
|
+
((CHECKS_PASSED++))
|
|
179
|
+
else
|
|
180
|
+
echo -e "${YELLOW}⚠️ BYAN agent file not found (expected in development)${NC}"
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
if [ -f "${INSTALL_DIR}/workflows/byan/data/mantras.yaml" ]; then
|
|
184
|
+
echo -e "${GREEN}✓ Mantras data file found${NC}"
|
|
185
|
+
((CHECKS_PASSED++))
|
|
186
|
+
else
|
|
187
|
+
echo -e "${YELLOW}⚠️ Mantras file not found (expected in development)${NC}"
|
|
188
|
+
fi
|
|
189
|
+
|
|
190
|
+
echo ""
|
|
191
|
+
echo -e "${BLUE}Verification: ${CHECKS_PASSED}/${CHECKS_TOTAL} checks passed${NC}"
|
|
192
|
+
|
|
193
|
+
# Installation complete
|
|
194
|
+
echo ""
|
|
195
|
+
echo -e "${GREEN}"
|
|
196
|
+
echo "╔════════════════════════════════════════════════════════════╗"
|
|
197
|
+
echo "║ ║"
|
|
198
|
+
echo "║ ✅ BYAN INSTALLATION COMPLETE! ║"
|
|
199
|
+
echo "║ ║"
|
|
200
|
+
echo "╚════════════════════════════════════════════════════════════╝"
|
|
201
|
+
echo -e "${NC}"
|
|
202
|
+
|
|
203
|
+
echo "Installation Summary:"
|
|
204
|
+
echo " • Platform: ${PLATFORM}"
|
|
205
|
+
echo " • Installation Directory: ${INSTALL_DIR}"
|
|
206
|
+
echo " • Configuration: ${INSTALL_DIR}/config.yaml"
|
|
207
|
+
echo " • User: ${USER_NAME}"
|
|
208
|
+
echo " • Language: ${COMM_LANG}"
|
|
209
|
+
echo ""
|
|
210
|
+
|
|
211
|
+
echo "Next Steps:"
|
|
212
|
+
echo ""
|
|
213
|
+
echo "1. Activate BYAN:"
|
|
214
|
+
if [ "$PLATFORM" = "copilot" ]; then
|
|
215
|
+
echo -e " ${BLUE}gh copilot suggest 'activate byan agent'${NC}"
|
|
216
|
+
echo " or use alias: ${BLUE}byan${NC}"
|
|
217
|
+
elif [ "$PLATFORM" = "vscode" ]; then
|
|
218
|
+
echo " Open VSCode Command Palette (Ctrl+Shift+P)"
|
|
219
|
+
echo " Type: 'Activate BYAN Agent'"
|
|
220
|
+
elif [ "$PLATFORM" = "claude" ]; then
|
|
221
|
+
echo -e " ${BLUE}claude chat --agent byan${NC}"
|
|
222
|
+
else
|
|
223
|
+
echo " Follow your platform's agent activation procedure"
|
|
224
|
+
fi
|
|
225
|
+
|
|
226
|
+
echo ""
|
|
227
|
+
echo "2. Create your first agent:"
|
|
228
|
+
echo " [INT] Start Intelligent Interview (30-45 min)"
|
|
229
|
+
echo " [QC] Quick Create (10 min)"
|
|
230
|
+
echo ""
|
|
231
|
+
echo "3. Explore documentation:"
|
|
232
|
+
echo " • Guide: ${BMAD_DIR}/_bmad-output/guide-reference-rapide-merise-agile-tdd.md"
|
|
233
|
+
echo " • Specs: ${BMAD_DIR}/_bmad-output/specs-byan-agent-creator.md"
|
|
234
|
+
echo " • Mantras: ${INSTALL_DIR}/workflows/byan/data/mantras.yaml"
|
|
235
|
+
echo ""
|
|
236
|
+
|
|
237
|
+
echo "Need help? Type '/bmad-help' when BYAN is active"
|
|
238
|
+
echo ""
|
|
239
|
+
echo -e "${BLUE}Happy agent building! 🏗️${NC}"
|
package/package-npm.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yan/create-byan-agent",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "NPX installer for BYAN - Builder of YAN agent creator. Generates specialized AI agents using Merise Agile + TDD methodology with 64 mantras.",
|
|
5
|
+
"main": "bin/create-byan-agent.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-byan-agent": "./bin/create-byan-agent.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "node bin/create-byan-agent.js",
|
|
11
|
+
"test": "echo \"Tests coming soon\" && exit 0"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"byan",
|
|
15
|
+
"agent",
|
|
16
|
+
"creator",
|
|
17
|
+
"ai",
|
|
18
|
+
"bmad",
|
|
19
|
+
"merise",
|
|
20
|
+
"tdd",
|
|
21
|
+
"copilot",
|
|
22
|
+
"vscode",
|
|
23
|
+
"claude",
|
|
24
|
+
"codex",
|
|
25
|
+
"zero-trust",
|
|
26
|
+
"mantras",
|
|
27
|
+
"agent-builder"
|
|
28
|
+
],
|
|
29
|
+
"author": "Yan <yan@example.com>",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/yan/byan.git"
|
|
34
|
+
},
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/yan/byan/issues"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/yan/byan#readme",
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"chalk": "^5.3.0",
|
|
41
|
+
"commander": "^11.1.0",
|
|
42
|
+
"inquirer": "^9.2.12",
|
|
43
|
+
"fs-extra": "^11.2.0",
|
|
44
|
+
"js-yaml": "^4.1.0",
|
|
45
|
+
"ora": "^7.0.1"
|
|
46
|
+
},
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=18.0.0"
|
|
49
|
+
},
|
|
50
|
+
"files": [
|
|
51
|
+
"bin/",
|
|
52
|
+
"README.md",
|
|
53
|
+
"LICENSE"
|
|
54
|
+
]
|
|
55
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-byan-agent",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "NPX installer for BYAN - Builder of YAN agent creator",
|
|
5
|
+
"bin": {
|
|
6
|
+
"create-byan-agent": "./bin/create-byan-agent.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "node bin/create-byan-agent.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"byan",
|
|
13
|
+
"agent",
|
|
14
|
+
"creator",
|
|
15
|
+
"ai",
|
|
16
|
+
"bmad",
|
|
17
|
+
"merise",
|
|
18
|
+
"tdd",
|
|
19
|
+
"copilot",
|
|
20
|
+
"vscode",
|
|
21
|
+
"claude"
|
|
22
|
+
],
|
|
23
|
+
"author": "Yan",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"chalk": "^5.3.0",
|
|
27
|
+
"commander": "^11.1.0",
|
|
28
|
+
"inquirer": "^9.2.12",
|
|
29
|
+
"fs-extra": "^11.2.0",
|
|
30
|
+
"js-yaml": "^4.1.0",
|
|
31
|
+
"ora": "^7.0.1"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18.0.0"
|
|
35
|
+
}
|
|
36
|
+
}
|