create-byan-agent 2.2.2 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +346 -0
- package/README.md +46 -4
- package/TEST-GUIDE-v2.3.2.md +161 -0
- package/install/HERMES-GUIDE.md +410 -0
- package/install/bin/create-byan-agent-v2.js +104 -7
- package/install/lib/phase2-chat.js +16 -12
- package/install/lib/yanstaller/agent-launcher.js +3 -3
- package/install/lib/yanstaller/platform-selector.js +54 -3
- package/install/templates/.github/agents/hermes.md +573 -0
- package/install/templates/_byan/_config/agent-manifest.csv +1 -0
- package/install/templates/_byan/workers/launchers/README.md +308 -0
- package/install/templates/_byan/workers/launchers/launch-yanstaller-claude.md +204 -0
- package/install/templates/_byan/workers/launchers/launch-yanstaller-codex.md +209 -0
- package/install/templates/_byan/workers/launchers/launch-yanstaller-copilot.md +173 -0
- package/install/templates/_byan/workers.md +343 -1126
- package/install/templates/workers/README.md +148 -0
- package/install/templates/workers/cost-optimizer.js +169 -0
- package/package.json +8 -3
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
# Yanstaller Launcher Workers
|
|
2
|
+
|
|
3
|
+
**Location:** `_byan/workers/launchers/`
|
|
4
|
+
**Type:** Platform-specific launcher workers
|
|
5
|
+
**Version:** 1.0.0
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Launcher workers are lightweight, single-purpose components that bridge the gap between platform-specific AI coding assistants and the main Yanstaller agent.
|
|
12
|
+
|
|
13
|
+
**Role:** Launch `npx create-byan-agent` on each platform and hand off to yanstaller.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Architecture
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
┌─────────────────────────────────────────────────────────┐
|
|
21
|
+
│ USER INVOKES AGENT │
|
|
22
|
+
│ gh copilot @bmad-agent-marc │
|
|
23
|
+
│ claude --agent claude │
|
|
24
|
+
│ codex skill bmad-byan │
|
|
25
|
+
└─────────────┬───────────────────────────────────────────┘
|
|
26
|
+
│
|
|
27
|
+
▼
|
|
28
|
+
┌─────────────────────────────────────────────────────────┐
|
|
29
|
+
│ STUB AGENT (Lightweight) │
|
|
30
|
+
│ - Detects platform │
|
|
31
|
+
│ - Calls appropriate launcher worker │
|
|
32
|
+
└─────────────┬───────────────────────────────────────────┘
|
|
33
|
+
│
|
|
34
|
+
▼
|
|
35
|
+
┌─────────────────────────────────────────────────────────┐
|
|
36
|
+
│ LAUNCHER WORKER (Single Task) │
|
|
37
|
+
│ - Verifies prerequisites (npx, Node.js) │
|
|
38
|
+
│ - Executes: npx create-byan-agent │
|
|
39
|
+
│ - Sets platform hint env variable │
|
|
40
|
+
└─────────────┬───────────────────────────────────────────┘
|
|
41
|
+
│
|
|
42
|
+
▼
|
|
43
|
+
┌─────────────────────────────────────────────────────────┐
|
|
44
|
+
│ YANSTALLER (Main Agent) │
|
|
45
|
+
│ @bmad-agent-yanstaller │
|
|
46
|
+
│ - Interview (10 questions) │
|
|
47
|
+
│ - Phase 2 Chat │
|
|
48
|
+
│ - BYAN Installation │
|
|
49
|
+
│ - Platform-specific integration │
|
|
50
|
+
└─────────────────────────────────────────────────────────┘
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Workers
|
|
56
|
+
|
|
57
|
+
### 1. launch-yanstaller-copilot.md
|
|
58
|
+
|
|
59
|
+
**Platform:** GitHub Copilot CLI
|
|
60
|
+
**Icon:** 🤖
|
|
61
|
+
**Command:** `npx create-byan-agent`
|
|
62
|
+
**Called by:** `@bmad-agent-marc`
|
|
63
|
+
|
|
64
|
+
**Purpose:** Launch yanstaller on Copilot CLI platform.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### 2. launch-yanstaller-claude.md
|
|
69
|
+
|
|
70
|
+
**Platform:** Claude Code
|
|
71
|
+
**Icon:** 🎭
|
|
72
|
+
**Command:** `npx create-byan-agent`
|
|
73
|
+
**Called by:** `@bmad-agent-claude` (stub)
|
|
74
|
+
**Platform Hint:** `BYAN_PLATFORM_HINT=claude`
|
|
75
|
+
|
|
76
|
+
**Purpose:** Launch yanstaller on Claude Code platform.
|
|
77
|
+
|
|
78
|
+
**Post-Launch:** If user selects Claude integration, yanstaller delegates to Agent Claude (full) for MCP server creation.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### 3. launch-yanstaller-codex.md
|
|
83
|
+
|
|
84
|
+
**Platform:** Codex/OpenCode
|
|
85
|
+
**Icon:** 📝
|
|
86
|
+
**Command:** `npx create-byan-agent`
|
|
87
|
+
**Called by:** `@bmad-agent-codex` (stub)
|
|
88
|
+
**Platform Hint:** `BYAN_PLATFORM_HINT=codex`
|
|
89
|
+
|
|
90
|
+
**Purpose:** Launch yanstaller on Codex platform.
|
|
91
|
+
|
|
92
|
+
**Post-Launch:** If user selects Codex integration, yanstaller delegates to Agent Codex (full) for skill file creation.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Design Principles
|
|
97
|
+
|
|
98
|
+
### Single Responsibility
|
|
99
|
+
Each worker has ONE task: Launch yanstaller command.
|
|
100
|
+
|
|
101
|
+
### Lightweight
|
|
102
|
+
- No interview logic
|
|
103
|
+
- No installation logic
|
|
104
|
+
- No configuration logic
|
|
105
|
+
- Just command execution + handoff
|
|
106
|
+
|
|
107
|
+
### Platform Hints
|
|
108
|
+
Workers set environment variables to help yanstaller detect platform:
|
|
109
|
+
```bash
|
|
110
|
+
BYAN_PLATFORM_HINT=copilot # For Copilot CLI
|
|
111
|
+
BYAN_PLATFORM_HINT=claude # For Claude Code
|
|
112
|
+
BYAN_PLATFORM_HINT=codex # For Codex
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Idempotent
|
|
116
|
+
Can be run multiple times safely.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Integration Flow
|
|
121
|
+
|
|
122
|
+
### Example: User chooses Claude
|
|
123
|
+
|
|
124
|
+
1. **User runs:** `claude --agent claude`
|
|
125
|
+
|
|
126
|
+
2. **Stub agent (bmad-agent-claude)** detects invocation:
|
|
127
|
+
```markdown
|
|
128
|
+
"I'll launch yanstaller for you..."
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
3. **Launcher worker** executes:
|
|
132
|
+
```javascript
|
|
133
|
+
process.env.BYAN_PLATFORM_HINT = 'claude';
|
|
134
|
+
spawn('npx', ['create-byan-agent']);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
4. **Yanstaller starts:**
|
|
138
|
+
- Detects platform: Claude Code
|
|
139
|
+
- Runs interview
|
|
140
|
+
- User selects Claude integration
|
|
141
|
+
|
|
142
|
+
5. **Yanstaller delegates to Agent Claude (full):**
|
|
143
|
+
- Agent Claude creates MCP server
|
|
144
|
+
- Updates `claude_desktop_config.json`
|
|
145
|
+
- Provides activation instructions
|
|
146
|
+
|
|
147
|
+
6. **User activates:**
|
|
148
|
+
```bash
|
|
149
|
+
claude --agent byan "create PRD"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Worker vs Agent
|
|
155
|
+
|
|
156
|
+
| Feature | Worker | Agent |
|
|
157
|
+
|---------|--------|-------|
|
|
158
|
+
| **Size** | Small (< 5 KB) | Large (10-20 KB) |
|
|
159
|
+
| **Responsibility** | Single task | Multiple workflows |
|
|
160
|
+
| **Workflows** | 0 | 6+ |
|
|
161
|
+
| **Knowledge Base** | Minimal | Extensive |
|
|
162
|
+
| **Lifecycle** | Execute & exit | Persistent session |
|
|
163
|
+
| **Complexity** | Simple | Complex |
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Separation of Concerns
|
|
168
|
+
|
|
169
|
+
### Stub Agents (marc/claude/codex)
|
|
170
|
+
- Detect invocation
|
|
171
|
+
- Call launcher worker
|
|
172
|
+
- Minimal logic
|
|
173
|
+
|
|
174
|
+
### Launcher Workers
|
|
175
|
+
- Execute `npx create-byan-agent`
|
|
176
|
+
- Set platform hints
|
|
177
|
+
- Verify prerequisites
|
|
178
|
+
|
|
179
|
+
### Yanstaller Agent
|
|
180
|
+
- Interview questions
|
|
181
|
+
- Platform selection
|
|
182
|
+
- Installation orchestration
|
|
183
|
+
|
|
184
|
+
### Full Specialist Agents
|
|
185
|
+
- Platform-specific integration
|
|
186
|
+
- MCP server creation (Claude)
|
|
187
|
+
- Skill file creation (Codex)
|
|
188
|
+
- GitHub agent installation (Copilot)
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## File Structure
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
_byan/
|
|
196
|
+
└── workers/
|
|
197
|
+
└── launchers/
|
|
198
|
+
├── README.md (this file)
|
|
199
|
+
├── launch-yanstaller-copilot.md
|
|
200
|
+
├── launch-yanstaller-claude.md
|
|
201
|
+
└── launch-yanstaller-codex.md
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Testing
|
|
207
|
+
|
|
208
|
+
### Manual Test
|
|
209
|
+
```bash
|
|
210
|
+
# Test Copilot launcher
|
|
211
|
+
node -e "require('./_byan/workers/launchers/worker-launch-yanstaller-copilot').launch()"
|
|
212
|
+
|
|
213
|
+
# Test Claude launcher
|
|
214
|
+
node -e "require('./_byan/workers/launchers/worker-launch-yanstaller-claude').launch()"
|
|
215
|
+
|
|
216
|
+
# Test Codex launcher
|
|
217
|
+
node -e "require('./_byan/workers/launchers/worker-launch-yanstaller-codex').launch()"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Expected Output
|
|
221
|
+
```
|
|
222
|
+
🤖 Launching Yanstaller on Copilot CLI...
|
|
223
|
+
[Yanstaller interview UI appears]
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Error Scenarios
|
|
229
|
+
|
|
230
|
+
### NPX Not Found
|
|
231
|
+
```
|
|
232
|
+
Error: npx not found
|
|
233
|
+
Solution: Install Node.js >= 18.0.0 from https://nodejs.org/
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Network Issues
|
|
237
|
+
```
|
|
238
|
+
Error: Cannot download create-byan-agent
|
|
239
|
+
Solution:
|
|
240
|
+
1. Check internet connection
|
|
241
|
+
2. Or install globally: npm install -g create-byan-agent
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Platform CLI Not Found
|
|
245
|
+
```
|
|
246
|
+
Warning: Claude/Codex CLI not detected
|
|
247
|
+
Action: Yanstaller continues with manual installation instructions
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Success Criteria
|
|
253
|
+
|
|
254
|
+
For a worker to succeed:
|
|
255
|
+
|
|
256
|
+
1. ✅ `npx create-byan-agent` command executed
|
|
257
|
+
2. ✅ Platform hint set correctly
|
|
258
|
+
3. ✅ Yanstaller process started
|
|
259
|
+
4. ✅ No errors during handoff
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Maintenance
|
|
264
|
+
|
|
265
|
+
**Update Frequency:** Rarely (workers are stable)
|
|
266
|
+
|
|
267
|
+
**What might change:**
|
|
268
|
+
- Command arguments (if yanstaller CLI changes)
|
|
269
|
+
- Platform detection logic
|
|
270
|
+
- Error messages
|
|
271
|
+
|
|
272
|
+
**What won't change:**
|
|
273
|
+
- Single responsibility principle
|
|
274
|
+
- Lightweight design
|
|
275
|
+
- Simple execution flow
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## NPM Distribution
|
|
280
|
+
|
|
281
|
+
Launcher workers are included in the `create-byan-agent` NPM package:
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
install/
|
|
285
|
+
└── templates/
|
|
286
|
+
└── _byan/
|
|
287
|
+
└── workers/
|
|
288
|
+
└── launchers/
|
|
289
|
+
├── README.md
|
|
290
|
+
├── launch-yanstaller-copilot.md
|
|
291
|
+
├── launch-yanstaller-claude.md
|
|
292
|
+
└── launch-yanstaller-codex.md
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Version History
|
|
298
|
+
|
|
299
|
+
- **1.0.0** (2026-02-10): Initial release
|
|
300
|
+
- Copilot launcher
|
|
301
|
+
- Claude launcher
|
|
302
|
+
- Codex launcher
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
**Maintainer:** BYAN Core Team
|
|
307
|
+
**Last Updated:** 2026-02-10
|
|
308
|
+
**Status:** ✅ Production Ready
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: launch-yanstaller-claude
|
|
3
|
+
type: worker
|
|
4
|
+
role: yanstaller-launcher
|
|
5
|
+
platform: claude-code
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Worker: Launch Yanstaller (Claude Code)
|
|
10
|
+
|
|
11
|
+
**Role:** Launch yanstaller on Claude Code platform
|
|
12
|
+
**Type:** Platform Launcher Worker
|
|
13
|
+
**Single Responsibility:** Execute `npx create-byan-agent` and hand off to yanstaller agent
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Activation
|
|
18
|
+
|
|
19
|
+
```xml
|
|
20
|
+
<worker id="launch-yanstaller-claude" type="launcher">
|
|
21
|
+
<activation>
|
|
22
|
+
<step n="1">Detect platform: Claude Code</step>
|
|
23
|
+
<step n="2">Verify npx/npm available</step>
|
|
24
|
+
<step n="3">Execute: npx create-byan-agent</step>
|
|
25
|
+
<step n="4">Hand off to @bmad-agent-yanstaller</step>
|
|
26
|
+
</activation>
|
|
27
|
+
</worker>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Mission
|
|
33
|
+
|
|
34
|
+
**One task:** Launch yanstaller installer on Claude Code platform.
|
|
35
|
+
|
|
36
|
+
This worker does NOT:
|
|
37
|
+
- ❌ Configure BYAN installation
|
|
38
|
+
- ❌ Run interview questions
|
|
39
|
+
- ❌ Install agents/modules
|
|
40
|
+
- ❌ Create MCP servers
|
|
41
|
+
|
|
42
|
+
This worker ONLY:
|
|
43
|
+
- ✅ Launches `npx create-byan-agent`
|
|
44
|
+
- ✅ Verifies command execution
|
|
45
|
+
- ✅ Hands off to yanstaller agent
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Command
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx create-byan-agent
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Alternative (if already installed globally):**
|
|
56
|
+
```bash
|
|
57
|
+
create-byan-agent
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Execution Flow
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
User: claude --agent claude
|
|
66
|
+
↓
|
|
67
|
+
Claude (stub): "Launching yanstaller..."
|
|
68
|
+
↓
|
|
69
|
+
Worker: launch-yanstaller-claude
|
|
70
|
+
↓
|
|
71
|
+
Command: npx create-byan-agent
|
|
72
|
+
↓
|
|
73
|
+
Yanstaller: @bmad-agent-yanstaller takes over
|
|
74
|
+
↓
|
|
75
|
+
Interview + Installation flow
|
|
76
|
+
↓
|
|
77
|
+
MCP server creation (if selected)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Platform-Specific Notes
|
|
83
|
+
|
|
84
|
+
**Claude Code Integration:**
|
|
85
|
+
- Yanstaller will detect Claude platform
|
|
86
|
+
- Offers MCP server creation option
|
|
87
|
+
- Agent Claude (specialist) handles MCP setup
|
|
88
|
+
- Desktop config updated automatically
|
|
89
|
+
|
|
90
|
+
**MCP Creation Flow:**
|
|
91
|
+
```
|
|
92
|
+
Yanstaller → Agent Claude (full) → MCP server
|
|
93
|
+
↓
|
|
94
|
+
claude_desktop_config.json updated
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Error Handling
|
|
100
|
+
|
|
101
|
+
**If npx not available:**
|
|
102
|
+
```
|
|
103
|
+
Error: npx not found
|
|
104
|
+
Solution: Install Node.js >= 18.0.0
|
|
105
|
+
Command: https://nodejs.org/
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**If Claude CLI not in PATH:**
|
|
109
|
+
```
|
|
110
|
+
Warning: Claude Code not detected
|
|
111
|
+
Solution: Install from https://claude.ai/download
|
|
112
|
+
Note: Yanstaller will continue with manual instructions
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Success Criteria
|
|
118
|
+
|
|
119
|
+
1. ✅ Command `npx create-byan-agent` executed
|
|
120
|
+
2. ✅ Yanstaller process started
|
|
121
|
+
3. ✅ Control handed to @bmad-agent-yanstaller
|
|
122
|
+
4. ✅ Claude platform detected
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Integration
|
|
127
|
+
|
|
128
|
+
**Called by:** Agent Claude stub (`bmad-agent-claude`)
|
|
129
|
+
**Calls:** Yanstaller (`bmad-agent-yanstaller`)
|
|
130
|
+
**Platform:** Claude Code
|
|
131
|
+
**Specialist:** Agent Claude (full) for MCP setup
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Code
|
|
136
|
+
|
|
137
|
+
```javascript
|
|
138
|
+
// worker-launch-yanstaller-claude.js
|
|
139
|
+
const { spawn } = require('child_process');
|
|
140
|
+
|
|
141
|
+
async function launch() {
|
|
142
|
+
console.log('🎭 Launching Yanstaller on Claude Code...');
|
|
143
|
+
|
|
144
|
+
// Set platform hint for yanstaller
|
|
145
|
+
process.env.BYAN_PLATFORM_HINT = 'claude';
|
|
146
|
+
|
|
147
|
+
return new Promise((resolve, reject) => {
|
|
148
|
+
const proc = spawn('npx', ['create-byan-agent'], {
|
|
149
|
+
stdio: 'inherit',
|
|
150
|
+
shell: true,
|
|
151
|
+
env: process.env
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
proc.on('error', (error) => {
|
|
155
|
+
reject(new Error(`Failed to launch: ${error.message}`));
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
proc.on('exit', (code) => {
|
|
159
|
+
if (code === 0) {
|
|
160
|
+
resolve({
|
|
161
|
+
success: true,
|
|
162
|
+
platform: 'claude',
|
|
163
|
+
mcpEnabled: true
|
|
164
|
+
});
|
|
165
|
+
} else {
|
|
166
|
+
reject(new Error(`Yanstaller exited with code ${code}`));
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
module.exports = { launch };
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Testing
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Test worker execution
|
|
181
|
+
node _byan/workers/launchers/worker-launch-yanstaller-claude.js
|
|
182
|
+
|
|
183
|
+
# Expected output:
|
|
184
|
+
# 🎭 Launching Yanstaller on Claude Code...
|
|
185
|
+
# [Yanstaller interview starts]
|
|
186
|
+
# [Platform: Claude detected]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Metadata
|
|
192
|
+
|
|
193
|
+
- **Worker Type:** Launcher
|
|
194
|
+
- **Complexity:** Simple (1 command)
|
|
195
|
+
- **Dependencies:** npx, Node.js >= 18.0.0, claude CLI (optional)
|
|
196
|
+
- **Estimated Duration:** < 5 seconds
|
|
197
|
+
- **Idempotent:** Yes (can be run multiple times)
|
|
198
|
+
- **Platform-Specific:** Sets BYAN_PLATFORM_HINT=claude
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
**Status:** ✅ Ready for use
|
|
203
|
+
**Last Updated:** 2026-02-10
|
|
204
|
+
**Maintainer:** BYAN Core Team
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: launch-yanstaller-codex
|
|
3
|
+
type: worker
|
|
4
|
+
role: yanstaller-launcher
|
|
5
|
+
platform: codex
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Worker: Launch Yanstaller (Codex/OpenCode)
|
|
10
|
+
|
|
11
|
+
**Role:** Launch yanstaller on Codex/OpenCode platform
|
|
12
|
+
**Type:** Platform Launcher Worker
|
|
13
|
+
**Single Responsibility:** Execute `npx create-byan-agent` and hand off to yanstaller agent
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Activation
|
|
18
|
+
|
|
19
|
+
```xml
|
|
20
|
+
<worker id="launch-yanstaller-codex" type="launcher">
|
|
21
|
+
<activation>
|
|
22
|
+
<step n="1">Detect platform: Codex/OpenCode</step>
|
|
23
|
+
<step n="2">Verify npx/npm available</step>
|
|
24
|
+
<step n="3">Execute: npx create-byan-agent</step>
|
|
25
|
+
<step n="4">Hand off to @bmad-agent-yanstaller</step>
|
|
26
|
+
</activation>
|
|
27
|
+
</worker>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Mission
|
|
33
|
+
|
|
34
|
+
**One task:** Launch yanstaller installer on Codex/OpenCode platform.
|
|
35
|
+
|
|
36
|
+
This worker does NOT:
|
|
37
|
+
- ❌ Configure BYAN installation
|
|
38
|
+
- ❌ Run interview questions
|
|
39
|
+
- ❌ Install agents/modules
|
|
40
|
+
- ❌ Create skill files
|
|
41
|
+
|
|
42
|
+
This worker ONLY:
|
|
43
|
+
- ✅ Launches `npx create-byan-agent`
|
|
44
|
+
- ✅ Verifies command execution
|
|
45
|
+
- ✅ Hands off to yanstaller agent
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Command
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx create-byan-agent
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Alternative (if already installed globally):**
|
|
56
|
+
```bash
|
|
57
|
+
create-byan-agent
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Execution Flow
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
User: codex skill bmad-byan
|
|
66
|
+
↓
|
|
67
|
+
Codex stub: "Launching yanstaller..."
|
|
68
|
+
↓
|
|
69
|
+
Worker: launch-yanstaller-codex
|
|
70
|
+
↓
|
|
71
|
+
Command: npx create-byan-agent
|
|
72
|
+
↓
|
|
73
|
+
Yanstaller: @bmad-agent-yanstaller takes over
|
|
74
|
+
↓
|
|
75
|
+
Interview + Installation flow
|
|
76
|
+
↓
|
|
77
|
+
Skill files creation (if selected)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Platform-Specific Notes
|
|
83
|
+
|
|
84
|
+
**Codex/OpenCode Integration:**
|
|
85
|
+
- Yanstaller will detect Codex platform
|
|
86
|
+
- Offers skill file creation option
|
|
87
|
+
- Agent Codex (specialist) handles skill setup
|
|
88
|
+
- Skills stored in `.codex/prompts/`
|
|
89
|
+
|
|
90
|
+
**Skill Creation Flow:**
|
|
91
|
+
```
|
|
92
|
+
Yanstaller → Agent Codex (full) → Skill files
|
|
93
|
+
↓
|
|
94
|
+
.codex/prompts/*.md created
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Key Difference:**
|
|
98
|
+
- Codex uses "skills" not "agents"
|
|
99
|
+
- Simple Markdown files (NO YAML)
|
|
100
|
+
- Skill name = filename without .md
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Error Handling
|
|
105
|
+
|
|
106
|
+
**If npx not available:**
|
|
107
|
+
```
|
|
108
|
+
Error: npx not found
|
|
109
|
+
Solution: Install Node.js >= 18.0.0
|
|
110
|
+
Command: https://nodejs.org/
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**If Codex CLI not in PATH:**
|
|
114
|
+
```
|
|
115
|
+
Warning: Codex not detected
|
|
116
|
+
Solution: Install from https://opencode.com/
|
|
117
|
+
Note: Yanstaller will continue with manual instructions
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Success Criteria
|
|
123
|
+
|
|
124
|
+
1. ✅ Command `npx create-byan-agent` executed
|
|
125
|
+
2. ✅ Yanstaller process started
|
|
126
|
+
3. ✅ Control handed to @bmad-agent-yanstaller
|
|
127
|
+
4. ✅ Codex platform detected
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Integration
|
|
132
|
+
|
|
133
|
+
**Called by:** Agent Codex stub (`bmad-agent-codex`)
|
|
134
|
+
**Calls:** Yanstaller (`bmad-agent-yanstaller`)
|
|
135
|
+
**Platform:** Codex/OpenCode
|
|
136
|
+
**Specialist:** Agent Codex (full) for skill setup
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Code
|
|
141
|
+
|
|
142
|
+
```javascript
|
|
143
|
+
// worker-launch-yanstaller-codex.js
|
|
144
|
+
const { spawn } = require('child_process');
|
|
145
|
+
|
|
146
|
+
async function launch() {
|
|
147
|
+
console.log('📝 Launching Yanstaller on Codex...');
|
|
148
|
+
|
|
149
|
+
// Set platform hint for yanstaller
|
|
150
|
+
process.env.BYAN_PLATFORM_HINT = 'codex';
|
|
151
|
+
|
|
152
|
+
return new Promise((resolve, reject) => {
|
|
153
|
+
const proc = spawn('npx', ['create-byan-agent'], {
|
|
154
|
+
stdio: 'inherit',
|
|
155
|
+
shell: true,
|
|
156
|
+
env: process.env
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
proc.on('error', (error) => {
|
|
160
|
+
reject(new Error(`Failed to launch: ${error.message}`));
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
proc.on('exit', (code) => {
|
|
164
|
+
if (code === 0) {
|
|
165
|
+
resolve({
|
|
166
|
+
success: true,
|
|
167
|
+
platform: 'codex',
|
|
168
|
+
skillsEnabled: true
|
|
169
|
+
});
|
|
170
|
+
} else {
|
|
171
|
+
reject(new Error(`Yanstaller exited with code ${code}`));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
module.exports = { launch };
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Testing
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# Test worker execution
|
|
186
|
+
node _byan/workers/launchers/worker-launch-yanstaller-codex.js
|
|
187
|
+
|
|
188
|
+
# Expected output:
|
|
189
|
+
# 📝 Launching Yanstaller on Codex...
|
|
190
|
+
# [Yanstaller interview starts]
|
|
191
|
+
# [Platform: Codex detected]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Metadata
|
|
197
|
+
|
|
198
|
+
- **Worker Type:** Launcher
|
|
199
|
+
- **Complexity:** Simple (1 command)
|
|
200
|
+
- **Dependencies:** npx, Node.js >= 18.0.0, codex CLI (optional)
|
|
201
|
+
- **Estimated Duration:** < 5 seconds
|
|
202
|
+
- **Idempotent:** Yes (can be run multiple times)
|
|
203
|
+
- **Platform-Specific:** Sets BYAN_PLATFORM_HINT=codex
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
**Status:** ✅ Ready for use
|
|
208
|
+
**Last Updated:** 2026-02-10
|
|
209
|
+
**Maintainer:** BYAN Core Team
|