oneie 1.5.4 β†’ 1.6.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.
@@ -1,976 +1,186 @@
1
1
  #!/usr/bin/env node
2
-
3
2
  /**
4
3
  * ONE Universal Access System - npx oneie
5
- * Complete ecosystem installation with 112+ AI agents, workflows, templates, and checklists
6
- *
7
- * @author Engineering Developer + Engineering Quality Assurance + Builder Agent
8
- * @task Story-2.2.3: Complete Ecosystem Delivery
4
+ * Simple folder copier based on bin/folders.yaml configuration
5
+ * No external dependencies - pure Node.js
9
6
  */
10
-
11
- import fs from 'fs-extra';
7
+ import fs from 'fs';
12
8
  import path from 'path';
13
- import { execSync } from 'child_process';
14
- import chalk from 'chalk';
15
- import figlet from 'figlet';
16
9
  import { fileURLToPath } from 'url';
17
10
 
18
11
  const __filename = fileURLToPath(import.meta.url);
19
12
  const __dirname = path.dirname(__filename);
20
13
 
21
- class OneIECLI {
14
+ class OneInstaller {
22
15
  constructor() {
23
- this.version = '1.5.3';
24
- // When running from NPX, the source directory is relative to this script
25
- this.sourceDir = path.resolve(__dirname, '../..');
26
- console.log(chalk.gray(`πŸ” Source directory resolved to: ${this.sourceDir}`));
27
- this.stats = {
28
- agents: 0,
29
- commands: 0,
30
- templates: 0,
31
- workflows: 0,
32
- checklists: 0,
33
- tasks: 0
34
- };
16
+ this.sourceDir = path.resolve(__dirname, '../../');
17
+ this.targetDir = process.cwd();
18
+ this.configFile = path.join(__dirname, '../folders.yaml');
19
+ this.fileExtensions = ['.md', '.yaml', '.yml', '.sh'];
35
20
  }
36
21
 
37
- /**
38
- * Main CLI entry point
39
- */
40
- async run() {
41
- try {
42
- console.log(chalk.gray('Starting ONE Framework installer...'));
43
-
44
- const args = process.argv.slice(2);
45
- const command = args[0];
46
-
47
- if (command === 'install' || !command) {
48
- await this.installFramework();
49
- } else if (command === 'help') {
50
- this.showSimpleHelp();
51
- } else {
52
- console.log(chalk.yellow(`Unknown command: ${command}`));
53
- this.showSimpleHelp();
54
- }
55
- } catch (error) {
56
- console.error(chalk.red(`\n❌ Installation Error: ${error.message}`));
57
- console.error(chalk.red(`Stack: ${error.stack}`));
58
- console.log(chalk.yellow('\nπŸ“ž If you need help, please report this issue at:'));
59
- console.log(chalk.cyan('https://github.com/one-ie/one/issues'));
60
- process.exit(1);
61
- }
62
- }
22
+ async install() {
23
+ console.log('🎯 ONE Framework Universal Access System');
24
+ console.log('πŸ“ Installing 3 Levels architecture...\n');
63
25
 
64
- /**
65
- * Install Complete ONE Framework Ecosystem
66
- */
67
- async installFramework() {
68
26
  try {
69
- console.log(chalk.blue(figlet.textSync('ONE', { font: 'Big' })));
70
- console.log(chalk.cyan('πŸš€ Installing ONE Framework - Complete Missionβ†’Storyβ†’Taskβ†’Agent System...\n'));
71
-
72
- // Detect project type
73
- const hasPackageJson = fs.existsSync(path.join(process.cwd(), 'package.json'));
74
- const projectType = hasPackageJson ? 'Node.js project' : 'New Project';
75
-
76
- console.log(chalk.gray(`πŸ“ Detected: ${projectType}`));
77
- console.log(chalk.gray(`πŸ” Source directory: ${this.sourceDir}`));
78
- console.log(chalk.cyan('πŸ“¦ Installing complete 3 Levels architecture...'));
79
-
80
- // Create 3 Levels structure
81
- await this.create3LevelsStructure();
82
-
83
- console.log(chalk.green('βœ… 3 Levels structure created'));
84
- console.log(chalk.cyan('πŸ€– Installing 112+ AI agents...'));
85
-
86
- // Install complete agent ecosystem
87
- await this.installAgentEcosystem();
88
-
89
- console.log(chalk.green(`βœ… ${this.stats.agents} AI agents installed`));
90
- console.log(chalk.cyan('πŸ“‹ Installing workflows and templates...'));
91
-
92
- // Install workflows and templates
93
- await this.installWorkflowSystem();
94
-
95
- console.log(chalk.green(`βœ… ${this.stats.templates} templates and ${this.stats.workflows} workflows installed`));
96
- console.log(chalk.cyan('βš™οΈ Setting up Claude Code integration...'));
97
-
98
- // Setup comprehensive Claude integration
99
- await this.setupClaudeIntegration();
100
-
101
- console.log(chalk.green(`βœ… ${this.stats.commands} commands and hooks configured`));
102
-
103
- this.showSuccessMessage();
27
+ const config = this.loadConfiguration();
28
+ await this.copyFolders(config);
29
+ console.log('\nβœ… ONE Framework installation complete!');
30
+ console.log('\nπŸš€ Next steps:');
31
+ console.log(' claude # Open Claude Code');
32
+ console.log(' /one # Launch Agent ONE\n');
104
33
  } catch (error) {
105
- console.error(chalk.red(`\n❌ Installation failed: ${error.message}`));
106
- throw error;
107
- }
108
- }
109
-
110
- /**
111
- * Create 3 Levels Architecture Structure
112
- */
113
- async create3LevelsStructure() {
114
- const cwd = process.cwd();
115
-
116
- // Create .one directory (platform foundation)
117
- const oneDotDir = path.join(cwd, '.one');
118
- await fs.ensureDir(oneDotDir);
119
-
120
- // Create basic .one structure
121
- const oneDirs = ['workflows', 'templates', 'checklists', 'tasks', 'data', 'tools'];
122
- for (const dir of oneDirs) {
123
- await fs.ensureDir(path.join(oneDotDir, dir));
124
- }
125
-
126
- // Create .claude directory (execution layer)
127
- const claudeDir = path.join(cwd, '.claude');
128
- await fs.ensureDir(claudeDir);
129
-
130
- // Create basic .claude structure
131
- const claudeDirs = ['agents', 'commands', 'hooks'];
132
- for (const dir of claudeDirs) {
133
- await fs.ensureDir(path.join(claudeDir, dir));
134
- }
135
-
136
- // Create one directory (user workspace)
137
- const oneDir = path.join(cwd, 'one');
138
- await fs.ensureDir(oneDir);
139
-
140
- // Create basic one structure
141
- const userDirs = ['missions', 'stories', 'agents', 'checklists', 'data', 'tasks', 'templates', 'workflows'];
142
- for (const dir of userDirs) {
143
- await fs.ensureDir(path.join(oneDir, dir));
34
+ console.error('❌ Installation failed:', error.message);
35
+ process.exit(1);
144
36
  }
145
-
146
- // Create welcome mission
147
- const welcomeMission = `# Mission 1: Foundation
148
-
149
- Welcome to your ONE framework installation!
150
-
151
- ## What's Next?
152
-
153
- 1. Use Claude Code and type: \`/one\`
154
- 2. Explore your new framework structure
155
- 3. Create your first mission
156
- 4. Start building with AI agents
157
-
158
- ## 3 Levels Architecture
159
-
160
- - \`.claude/\` - Execution layer with agents and commands
161
- - \`.one/\` - Platform foundation with workflows and templates
162
- - \`one/\` - Your workspace for missions, stories, and content
163
-
164
- ## Getting Started
165
-
166
- \`\`\`bash
167
- # In Claude Code, type:
168
- /one
169
- \`\`\`
170
-
171
- Happy building! πŸš€
172
- `;
173
-
174
- await fs.writeFile(path.join(oneDir, 'missions', 'mission-1-foundation.md'), welcomeMission);
175
-
176
- // Create sample story
177
- const sampleStory = `# Story 1.1: Value Proposition
178
-
179
- ## Objective
180
- Understand the value that ONE brings to your development workflow.
181
-
182
- ## Key Benefits
183
- - Mission-driven development approach
184
- - 18+ specialized AI agents
185
- - Quality-driven workflows
186
- - Beautiful project organization
187
-
188
- ## Success Criteria
189
- - [ ] Understand the 3 Levels architecture
190
- - [ ] Explore the agent ecosystem
191
- - [ ] Create your first mission
192
- - [ ] Experience the cascade workflow
193
-
194
- ## Next Steps
195
- 1. Run \`/one\` command
196
- 2. Explore the team structure
197
- 3. Create your first personalized mission
198
- `;
199
-
200
- await fs.writeFile(path.join(oneDir, 'stories', 'story-1.1-value-proposition.md'), sampleStory);
201
37
  }
202
38
 
203
- /**
204
- * Install Complete Agent Ecosystem (112+ agents)
205
- */
206
- async installAgentEcosystem() {
207
- const cwd = process.cwd();
208
- const agentsSourceDir = path.join(this.sourceDir, '.claude', 'agents');
209
- const agentsTargetDir = path.join(cwd, '.claude', 'agents');
210
-
211
- console.log(chalk.gray(`πŸ” Looking for agents in: ${agentsSourceDir}`));
212
- console.log(chalk.gray(`πŸ“ Source directory exists: ${await fs.pathExists(agentsSourceDir)}`));
213
-
39
+ loadConfiguration() {
214
40
  try {
215
- // Copy all agents from source
216
- if (await fs.pathExists(agentsSourceDir)) {
217
- console.log(chalk.gray('πŸ“ Copying complete agent ecosystem...'));
218
- await fs.copy(agentsSourceDir, agentsTargetDir);
219
-
220
- // Count installed agents
221
- const agentFiles = await fs.readdir(agentsTargetDir);
222
- this.stats.agents = agentFiles.filter(f => f.endsWith('.md')).length;
223
- console.log(chalk.green(`βœ… ${this.stats.agents} agents copied successfully`));
224
- } else {
225
- console.log(chalk.yellow('⚠️ Source agents directory not found, installing fallback set...'));
226
- await this.installFallbackAgents();
227
- }
41
+ const configContent = fs.readFileSync(this.configFile, 'utf8');
42
+ return this.parseYaml(configContent);
228
43
  } catch (error) {
229
- console.log(chalk.yellow(`⚠️ Error copying agents: ${error.message}`));
230
- console.log(chalk.yellow('⚠️ Installing fallback agent set...'));
231
- await this.installFallbackAgents();
44
+ throw new Error(`Failed to load configuration: ${error.message}`);
232
45
  }
233
46
  }
234
47
 
235
- /**
236
- * Install Complete Workflow System
237
- */
238
- async installWorkflowSystem() {
239
- const cwd = process.cwd();
240
-
241
- // Install .one platform resources
242
- await this.installOnePlatformResources(cwd);
243
-
244
- // Install one user workspace resources
245
- await this.installOneUserResources(cwd);
246
- }
48
+ parseYaml(yamlContent) {
49
+ const lines = yamlContent.split('\n');
50
+ const config = { claude_folders: [], one_platform_folders: [], one_user_folders: [], root_files: [] };
51
+ let currentSection = null;
247
52
 
248
- /**
249
- * Install .one Platform Resources
250
- */
251
- async installOnePlatformResources(targetDir) {
252
- const oneDotSourceDir = path.join(this.sourceDir, '.one');
253
- const oneDotTargetDir = path.join(targetDir, '.one');
254
-
255
- console.log(chalk.gray(`πŸ” Looking for .one resources in: ${oneDotSourceDir}`));
256
- console.log(chalk.gray(`πŸ“ .one directory exists: ${await fs.pathExists(oneDotSourceDir)}`));
257
-
258
- const resourceTypes = ['templates', 'workflows', 'checklists', 'tasks'];
259
-
260
- for (const resourceType of resourceTypes) {
261
- const sourceDir = path.join(oneDotSourceDir, resourceType);
262
- const targetSubDir = path.join(oneDotTargetDir, resourceType);
263
-
264
- try {
265
- if (await fs.pathExists(sourceDir)) {
266
- console.log(chalk.gray(`πŸ“ Copying ${resourceType}...`));
267
- await fs.copy(sourceDir, targetSubDir);
268
-
269
- // Count resources
270
- const files = await fs.readdir(targetSubDir);
271
- this.stats[resourceType] = files.length;
272
- console.log(chalk.green(`βœ… ${files.length} ${resourceType} copied`));
273
- } else {
274
- console.log(chalk.yellow(`⚠️ ${resourceType} directory not found, creating minimal version...`));
275
- await this.createMinimalResource(targetSubDir, resourceType);
276
- }
277
- } catch (error) {
278
- console.log(chalk.yellow(`⚠️ Could not install ${resourceType}: ${error.message}`));
279
- await this.createMinimalResource(targetSubDir, resourceType);
280
- }
281
- }
282
- }
283
-
284
- /**
285
- * Install one User Workspace Resources
286
- */
287
- async installOneUserResources(targetDir) {
288
- const oneSourceDir = path.join(this.sourceDir, 'one');
289
- const oneTargetDir = path.join(targetDir, 'one');
290
-
291
- const resourceTypes = ['templates', 'workflows', 'checklists', 'tasks', 'data'];
292
-
293
- for (const resourceType of resourceTypes) {
294
- const sourceDir = path.join(oneSourceDir, resourceType);
295
- const targetSubDir = path.join(oneTargetDir, resourceType);
53
+ for (const line of lines) {
54
+ const trimmed = line.trim();
55
+ if (trimmed.startsWith('#') || !trimmed) continue;
296
56
 
297
- try {
298
- if (await fs.pathExists(sourceDir)) {
299
- await fs.copy(sourceDir, targetSubDir);
57
+ if (trimmed.endsWith(':')) {
58
+ currentSection = trimmed.replace(':', '');
59
+ } else if (trimmed.startsWith('- ') && currentSection) {
60
+ const item = trimmed.replace('- ', '');
61
+ if (config[currentSection]) {
62
+ config[currentSection].push(item);
300
63
  }
301
- } catch (error) {
302
- // Skip if not available
303
64
  }
304
65
  }
66
+ return config;
305
67
  }
306
68
 
307
- /**
308
- * Install Fallback Agents (when source not available)
309
- */
310
- async installFallbackAgents() {
311
- const cwd = process.cwd();
312
- const agentsDir = path.join(cwd, '.claude', 'agents');
313
-
314
- const coreAgents = [
315
- {
316
- name: 'mission-commander.md',
317
- content: this.getMissionCommanderAgent()
318
- },
319
- {
320
- name: 'story-teller.md',
321
- content: this.getStoryTellerAgent()
322
- },
323
- {
324
- name: 'task-master.md',
325
- content: this.getTaskMasterAgent()
326
- },
327
- {
328
- name: 'engineering-architect.md',
329
- content: this.getEngineeringArchitectAgent()
330
- },
331
- {
332
- name: 'marketing-director.md',
333
- content: this.getMarketingDirectorAgent()
334
- }
69
+ async copyFolders(config) {
70
+ const allFolders = [
71
+ ...config.claude_folders || [],
72
+ ...config.one_platform_folders || [],
73
+ ...config.one_user_folders || []
335
74
  ];
336
-
337
- for (const agent of coreAgents) {
338
- await fs.writeFile(path.join(agentsDir, agent.name), agent.content);
339
- }
340
-
341
- this.stats.agents = coreAgents.length;
342
- }
343
75
 
344
- /**
345
- * Create Minimal Resource
346
- */
347
- async createMinimalResource(targetDir, resourceType) {
348
- await fs.ensureDir(targetDir);
349
-
350
- const readmeContent = `# ${resourceType.toUpperCase()}
76
+ const rootFiles = config.root_files || [];
351
77
 
352
- This directory contains ${resourceType} for the ONE framework.
78
+ let totalFiles = 0;
79
+ let copiedFiles = 0;
353
80
 
354
- Resources are organized by category and can be customized for your specific needs.
81
+ // Count total files first (folders)
82
+ for (const folder of allFolders) {
83
+ const sourceFolder = path.join(this.sourceDir, folder);
84
+ if (fs.existsSync(sourceFolder)) {
85
+ totalFiles += this.countTargetFiles(sourceFolder);
86
+ }
87
+ }
355
88
 
356
- ## Getting Started
89
+ // Count root files
90
+ for (const filePath of rootFiles) {
91
+ const sourceFile = path.join(this.sourceDir, filePath);
92
+ if (fs.existsSync(sourceFile) && this.isTargetFile(path.basename(filePath))) {
93
+ totalFiles++;
94
+ }
95
+ }
357
96
 
358
- 1. Use \`/one\` command in Claude Code
359
- 2. Explore available ${resourceType}
360
- 3. Customize as needed for your workflow
97
+ console.log(`πŸ“¦ Found ${totalFiles} files to copy...\n`);
361
98
 
362
- For more information, visit: https://github.com/one-ie/one
363
- `;
364
-
365
- await fs.writeFile(path.join(targetDir, 'README.md'), readmeContent);
366
- this.stats[resourceType] = 1;
367
- }
99
+ // Copy folder files with progress
100
+ for (const folder of allFolders) {
101
+ const sourceFolder = path.join(this.sourceDir, folder);
102
+ const targetFolder = path.join(this.targetDir, folder);
368
103
 
369
- /**
370
- * Setup Comprehensive Claude Code Integration
371
- */
372
- async setupClaudeIntegration() {
373
- const cwd = process.cwd();
374
- const claudeDir = path.join(cwd, '.claude');
375
- const commandsDir = path.join(claudeDir, 'commands');
376
-
377
- // Copy all commands from source if available
378
- const commandsSourceDir = path.join(this.sourceDir, '.claude', 'commands');
379
-
380
- try {
381
- if (await fs.pathExists(commandsSourceDir)) {
382
- await fs.copy(commandsSourceDir, commandsDir);
383
-
384
- // Count commands
385
- const commandFiles = await fs.readdir(commandsDir);
386
- this.stats.commands = commandFiles.filter(f => f.endsWith('.md')).length;
104
+ if (fs.existsSync(sourceFolder)) {
105
+ console.log(`πŸ“ Copying ${folder}...`);
106
+ copiedFiles += await this.copyFolderFiles(sourceFolder, targetFolder, totalFiles, copiedFiles);
387
107
  }
388
- } catch (error) {
389
- // Create essential commands manually
390
- await this.createEssentialCommands(commandsDir);
391
108
  }
392
-
393
- // Setup Claude Code hooks
394
- await this.setupClaudeHooks(claudeDir);
395
-
396
- // Create configuration files
397
- await this.setupClaudeConfiguration(claudeDir);
398
- }
399
109
 
400
- /**
401
- * Create Essential Commands
402
- */
403
- async createEssentialCommands(commandsDir) {
404
- await fs.ensureDir(commandsDir);
405
-
406
- // Main /one command with complete interface
407
- const oneCommand = await this.getCompleteOneCommand();
408
- await fs.writeFile(path.join(commandsDir, 'one.md'), oneCommand);
409
-
410
- // Additional essential commands
411
- const commands = {
412
- 'start.md': this.getStartCommand(),
413
- 'mission.md': this.getMissionCommand(),
414
- 'story.md': this.getStoryCommand(),
415
- 'task.md': this.getTaskCommand(),
416
- 'agent.md': this.getAgentCommand()
417
- };
418
-
419
- for (const [filename, content] of Object.entries(commands)) {
420
- await fs.writeFile(path.join(commandsDir, filename), content);
421
- }
422
-
423
- this.stats.commands = Object.keys(commands).length + 1; // +1 for one.md
424
- }
110
+ // Copy individual root files
111
+ for (const filePath of rootFiles) {
112
+ const sourceFile = path.join(this.sourceDir, filePath);
113
+ const targetFile = path.join(this.targetDir, filePath);
425
114
 
426
- /**
427
- * Setup Claude Hooks
428
- */
429
- async setupClaudeHooks(claudeDir) {
430
- // Copy hooks if available
431
- const hooksSourceDir = path.join(this.sourceDir, '.claude', 'hooks');
432
- const hooksTargetDir = path.join(claudeDir, 'hooks');
433
-
434
- try {
435
- if (await fs.pathExists(hooksSourceDir)) {
436
- await fs.copy(hooksSourceDir, hooksTargetDir);
115
+ if (fs.existsSync(sourceFile) && this.isTargetFile(path.basename(filePath))) {
116
+ await this.copyFile(sourceFile, targetFile);
117
+ copiedFiles++;
118
+ this.showProgress(copiedFiles, totalFiles, path.basename(filePath));
437
119
  }
438
- } catch (error) {
439
- // Create minimal hooks directory
440
- await fs.ensureDir(hooksTargetDir);
441
120
  }
442
121
  }
443
122
 
444
- /**
445
- * Setup Claude Configuration
446
- */
447
- async setupClaudeConfiguration(claudeDir) {
448
- // Claude Code hooks configuration
449
- const hooksConfig = {
450
- "version": "1.0",
451
- "hooks": {
452
- "file_change": {
453
- "enabled": true,
454
- "script": "hooks/file-organization-monitor.js"
455
- }
456
- }
457
- };
458
-
459
- await fs.writeFile(
460
- path.join(claudeDir, 'claude-code-hooks.json'),
461
- JSON.stringify(hooksConfig, null, 2)
462
- );
463
- }
464
-
465
- /**
466
- * Show success message with complete statistics
467
- */
468
- showSuccessMessage() {
469
- console.log(chalk.green('\n✨ Installation complete! Welcome to ONE Framework!\n'));
123
+ countTargetFiles(dir) {
124
+ let count = 0;
125
+ const items = fs.readdirSync(dir, { withFileTypes: true });
470
126
 
471
- // Show installation statistics
472
- console.log(chalk.cyan('πŸ“Š Installation Summary:'));
473
- console.log(` πŸ€– AI Agents: ${this.stats.agents}`);
474
- console.log(` βš™οΈ Commands: ${this.stats.commands}`);
475
- console.log(` πŸ“‹ Templates: ${this.stats.templates}`);
476
- console.log(` πŸ”„ Workflows: ${this.stats.workflows}`);
477
- console.log(` βœ… Checklists: ${this.stats.checklists}`);
478
- console.log(` πŸ“ Tasks: ${this.stats.tasks}`);
479
-
480
- // Check if we have the full installation or fallback
481
- const isFullInstallation = this.stats.agents >= 100 && this.stats.templates >= 20;
482
-
483
- if (isFullInstallation) {
484
- console.log(chalk.green('\nπŸŽ‰ Complete 3 Levels architecture installed successfully!'));
485
- } else {
486
- console.log(chalk.yellow('\n⚠️ Fallback installation complete - essential components ready'));
487
- console.log(chalk.gray(' Some resources may use minimal versions due to npm packaging'));
127
+ for (const item of items) {
128
+ const fullPath = path.join(dir, item.name);
129
+ if (item.isDirectory()) {
130
+ count += this.countTargetFiles(fullPath);
131
+ } else if (this.isTargetFile(item.name)) {
132
+ count++;
133
+ }
488
134
  }
489
-
490
- console.log(chalk.blue('\n🎯 Next Steps:\n'));
491
- console.log('1. Open Claude Code in this directory');
492
- console.log('2. Type: ' + chalk.yellow('/one'));
493
- console.log('3. Explore your new Mission→Story→Task→Agent system');
494
-
495
- console.log(chalk.green('\nπŸš€ What you can do now:'));
496
- console.log(' β€’ Create missions with clear objectives');
497
- console.log(' β€’ Break missions into actionable stories');
498
- console.log(' β€’ Execute with specialized agents');
499
- console.log(' β€’ Follow proven workflows and quality gates');
500
- console.log(' β€’ Build with the 3 Levels architecture');
501
-
502
- console.log(chalk.magenta('\nπŸ’« Mission-driven development with AI excellence awaits!'));
503
- console.log(chalk.gray('\nπŸ“š Documentation: https://github.com/one-ie/one'));
504
- console.log(chalk.gray('🎯 Framework: Missionβ†’Storyβ†’Taskβ†’Agent cascade system'));
135
+ return count;
505
136
  }
506
137
 
507
- /**
508
- * Show simple help
509
- */
510
- showSimpleHelp() {
511
- console.log(chalk.blue('πŸš€ ONE Framework - Mission-Driven Development\n'));
512
- console.log('Usage:');
513
- console.log(' npx oneie - Install complete ONE framework');
514
- console.log(' npx oneie install - Install in current project');
515
- console.log(' npx oneie help - Show this help');
516
- console.log('\nAfter installation:');
517
- console.log(' Use Claude Code and type: /one');
518
- console.log('\nThe ONE framework provides:');
519
- console.log(' 🎯 Mission-driven development with clear objectives');
520
- console.log(' πŸ“– Story-based execution that achieves outcomes');
521
- console.log(' πŸ€– 112+ specialized agents organized by teams');
522
- console.log(' πŸ”„ Proven workflows, tasks, and checklists');
523
- console.log(' πŸ‘₯ Cross-functional team coordination');
524
- console.log(' πŸ—οΈ Complete 3 Levels architecture (.claude/.one/one)');
525
- console.log(chalk.magenta('\nπŸ’« Complete AI-powered development ecosystem!'));
526
- }
138
+ async copyFolderFiles(sourceDir, targetDir, totalFiles, startIndex) {
139
+ let copiedCount = 0;
140
+ const items = fs.readdirSync(sourceDir, { withFileTypes: true });
527
141
 
528
- // ============================================================================
529
- // CONTENT GENERATION METHODS
530
- // ============================================================================
142
+ for (const item of items) {
143
+ const sourcePath = path.join(sourceDir, item.name);
144
+ const targetPath = path.join(targetDir, item.name);
531
145
 
532
- /**
533
- * Get Complete /one Command
534
- */
535
- async getCompleteOneCommand() {
536
- try {
537
- // Try to read from source first
538
- const sourceCommand = path.join(this.sourceDir, '.claude', 'commands', 'one.md');
539
- if (await fs.pathExists(sourceCommand)) {
540
- return await fs.readFile(sourceCommand, 'utf8');
146
+ if (item.isDirectory()) {
147
+ copiedCount += await this.copyFolderFiles(sourcePath, targetPath, totalFiles, startIndex + copiedCount);
148
+ } else if (this.isTargetFile(item.name)) {
149
+ await this.copyFile(sourcePath, targetPath);
150
+ copiedCount++;
151
+ this.showProgress(startIndex + copiedCount, totalFiles, item.name);
541
152
  }
542
- } catch (error) {
543
- // Fall back to embedded version
544
153
  }
545
-
546
- return `# /one - Unified Command Interface
547
-
548
- 🎯 **ONE - Your Complete AI-Powered Workspace**
549
-
550
- *Single entry point to the entire ONE framework with progressive disclosure and numbered selections.*
551
-
552
- ## Core Interface
553
-
554
- When the \`/one\` command is invoked, display this main menu:
555
-
556
- \`\`\`
557
- ╔═══════════════════════════════════════════════════════════════════════════╗
558
- β•‘ 🎯 ONE - MISSION CONTROL β•‘
559
- β•‘ Your AI-Powered Success Platform with Live Status β•‘
560
- β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
561
-
562
- πŸ“Š **LIVE CASCADE STATUS**
563
- 🎯 Active Missions: 1 | Stories: 2 | Tasks: 8 | πŸ€– Agents: 5 working
564
- ⭐ Quality Score: 4.1⭐ | πŸ”„ In Progress: 25% | ⏱️ ETA: Getting started
565
-
566
- πŸš€ **QUICK START** (Most Common Actions)
567
- 1. Start New Mission β†’ Launch mission planning workflow
568
- 2. Continue Story β†’ Work on existing stories
569
- 3. Execute Tasks β†’ Run task execution
570
- 4. Get Agent Help β†’ Access AI specialists
571
- 5. View Dashboard β†’ Real-time cascade progress and status
572
-
573
- 🎨 **SPECIALIST TEAMS** (By Domain)
574
- 6. Marketing & Growth β†’ Content, campaigns, social media
575
- 7. Engineering & Tech β†’ Development, architecture, QA
576
- 8. Research & Analytics β†’ Data analysis, market research
577
- 9. Design & UX β†’ Interface design, user experience
578
-
579
- βš™οΈ **ADVANCED** (Power Users)
580
- A. Agent Directory β†’ Browse all 112+ specialists
581
- T. Template Library β†’ Access workflow templates
582
- W. Workflow Builder β†’ Create custom workflows
583
- S. System Settings β†’ Configure preferences
584
-
585
- ❓ **HELP & INFO**
586
- H. Help & Tutorials β†’ Learn the ONE system
587
- ?. Command Reference β†’ All available commands
588
-
589
- Enter your choice (1-9, A, T, W, S, H, ?): _
590
- \`\`\`
591
-
592
- ## Navigation Rules
593
-
594
- ### 1. Numbered Selection Pattern
595
- - **Primary options**: 1-9 (consistent across all menus)
596
- - **Advanced options**: Letters (A-Z)
597
- - **Help options**: H, ?
598
- - **Navigation**: B (Back), X (Exit)
599
-
600
- ### 2. Progressive Disclosure
601
- - **Level 1**: Show most common actions (1-5)
602
- - **Level 2**: Show specialist teams (6-9)
603
- - **Level 3**: Show advanced features (A, T, W, S)
604
- - **Level 4**: Show help and reference (H, ?)
605
-
606
- *Designed with user-centered excellence for Mission→Story→Task→Agent workflow*`;
154
+ return copiedCount;
607
155
  }
608
156
 
609
- /**
610
- * Get Start Command
611
- */
612
- getStartCommand() {
613
- return `# /start - Quick Mission Start
614
-
615
- πŸš€ **Quick Start New Mission**
616
-
617
- When this command is used, immediately launch the mission creation workflow:
618
-
619
- \`\`\`
620
- ╔══════════════════════════════════════════════════════╗
621
- β•‘ 🎯 MISSION QUICK START β•‘
622
- β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
623
-
624
- Ready to start your next big goal?
625
-
626
- 1. Business Growth Mission β†’ Increase revenue, expand market
627
- 2. Product Launch Mission β†’ Launch new product or feature
628
- 3. Content Creation Mission β†’ Create content at scale
629
- 4. Technical Project Mission β†’ Build or improve systems
630
- 5. Custom Mission β†’ Define your own objective
631
-
632
- B. Back to Main Menu
633
- H. Help with Missions
634
-
635
- Choose mission type (1-5, B, H): _
636
- \`\`\`
637
-
638
- This command provides the fastest path from idea to execution in the ONE framework.`;
157
+ isTargetFile(filename) {
158
+ return this.fileExtensions.some(ext => filename.endsWith(ext));
639
159
  }
640
160
 
641
- /**
642
- * Get Mission Command
643
- */
644
- getMissionCommand() {
645
- return `# /mission - Mission Management
646
-
647
- 🎯 **Mission Control Center**
648
-
649
- Manage your missions with this dedicated interface:
650
-
651
- \`\`\`
652
- ╔══════════════════════════════════════════════════════╗
653
- β•‘ 🎯 MISSION MANAGEMENT β•‘
654
- β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
655
-
656
- Your Missions:
657
-
658
- Active:
659
- 1. Mission-1: Foundation Setup (67% complete)
660
- 2. Create New Mission
661
-
662
- Completed:
663
- 3. View Completed Missions
664
-
665
- Management:
666
- 4. Archive Mission
667
- 5. Mission Templates
668
- 6. Mission Analytics
669
-
670
- B. Back to Main Menu
671
-
672
- Choose option (1-6, B): _
673
- \`\`\`
674
-
675
- Provides comprehensive mission lifecycle management.`;
161
+ async copyFile(src, dest) {
162
+ return new Promise((resolve, reject) => {
163
+ const destDir = path.dirname(dest);
164
+ fs.mkdirSync(destDir, { recursive: true });
165
+ fs.copyFile(src, dest, (err) => {
166
+ if (err) reject(err);
167
+ else resolve();
168
+ });
169
+ });
676
170
  }
677
171
 
678
- /**
679
- * Get Story Command
680
- */
681
- getStoryCommand() {
682
- return `# /story - Story Management
683
-
684
- πŸ“– **Story Development Center**
685
-
686
- Create and manage your stories within missions:
687
-
688
- \`\`\`
689
- ╔══════════════════════════════════════════════════════╗
690
- β•‘ πŸ“– STORY MANAGEMENT β•‘
691
- β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
692
-
693
- Your Stories:
694
-
695
- In Progress:
696
- 1. Story-1.1: Value Proposition (40% complete)
697
- 2. Create New Story
698
-
699
- Planning:
700
- 3. Story Ideas & Backlog
701
- 4. Story Templates
702
-
703
- Management:
704
- 5. Story Analytics
705
- 6. Quality Validation
706
-
707
- B. Back to Main Menu
708
-
709
- Choose option (1-6, B): _
710
- \`\`\`
711
-
712
- Enables detailed story creation and tracking.`;
713
- }
714
-
715
- /**
716
- * Get Task Command
717
- */
718
- getTaskCommand() {
719
- return `# /task - Task Execution
720
-
721
- βœ… **Task Management Center**
722
-
723
- Execute and coordinate tasks across your workflow:
724
-
725
- \`\`\`
726
- ╔══════════════════════════════════════════════════════╗
727
- β•‘ βœ… TASK EXECUTION β•‘
728
- β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
729
-
730
- Ready Tasks:
731
-
732
- High Priority:
733
- 1. Setup Development Environment (3 tasks)
734
- 2. Create Mission Brief (2 tasks)
735
-
736
- Medium Priority:
737
- 3. Research Competitors (5 tasks)
738
- 4. Design User Interface (8 tasks)
739
-
740
- Management:
741
- 5. Task Analytics
742
- 6. Create New Task
743
- 7. Batch Operations
744
-
745
- B. Back to Main Menu
746
-
747
- Choose option (1-7, B): _
748
- \`\`\`
749
-
750
- Provides task-level execution and coordination.`;
751
- }
752
-
753
- /**
754
- * Get Agent Command
755
- */
756
- getAgentCommand() {
757
- return `# /agent - Direct Agent Access
758
-
759
- πŸ€– **AI Agent Directory**
760
-
761
- Direct access to the 112+ specialized AI agents:
762
-
763
- \`\`\`
764
- ╔══════════════════════════════════════════════════════╗
765
- β•‘ πŸ€– AI AGENT ACCESS β•‘
766
- β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
767
-
768
- Popular Agents:
769
-
770
- Mission & Strategy:
771
- 1. Mission Commander β†’ Strategic planning
772
- 2. Story Teller β†’ Narrative creation
773
- 3. Task Master β†’ Execution coordination
774
-
775
- Specialized Teams:
776
- 4. Engineering Architect β†’ Technical design
777
- 5. Marketing Director β†’ Growth strategy
778
- 6. UX Designer β†’ User experience
779
- 7. Content Creator β†’ Multi-platform content
780
-
781
- Directory:
782
- 8. Browse All Agents β†’ Complete directory
783
- 9. Agent Performance β†’ Usage analytics
784
-
785
- B. Back to Main Menu
786
-
787
- Choose agent (1-9, B): _
788
- \`\`\`
789
-
790
- Direct access to specialized AI expertise.`;
791
- }
792
-
793
- // ============================================================================
794
- // FALLBACK AGENT DEFINITIONS
795
- // ============================================================================
796
-
797
- /**
798
- * Get Mission Commander Agent
799
- */
800
- getMissionCommanderAgent() {
801
- return `# Mission Commander
802
-
803
- ## Role & Expertise
804
- Strategic planning specialist focused on mission-driven development. Expert in breaking down complex objectives into achievable stories and coordinating cross-functional execution.
805
-
806
- ## Core Capabilities
807
- - Mission planning and objective definition
808
- - Strategic story creation and prioritization
809
- - Team coordination and resource allocation
810
- - Quality gate establishment and monitoring
811
- - Risk assessment and mitigation planning
812
-
813
- ## When to Use Mission Commander
814
- - Starting new missions with clear objectives
815
- - Breaking complex goals into manageable stories
816
- - Coordinating multiple teams and specialists
817
- - Establishing quality standards and success metrics
818
- - Strategic planning and roadmap development
819
-
820
- ## Workflow Integration
821
- Mission Commander initiates the Mission→Story→Task→Agent cascade by:
822
- 1. Defining clear mission objectives and success criteria
823
- 2. Creating strategic stories that achieve mission goals
824
- 3. Coordinating with Story Teller for detailed planning
825
- 4. Establishing quality gates with Task Master
826
- 5. Monitoring progress and adjusting strategy
827
-
828
- *Expert in mission-driven development methodology with proven cascade orchestration.*`;
829
- }
830
-
831
- /**
832
- * Get Story Teller Agent
833
- */
834
- getStoryTellerAgent() {
835
- return `# Story Teller
836
-
837
- ## Role & Expertise
838
- Engineering narrative specialist who transforms mission objectives into actionable stories. Expert in agile methodologies, user story creation, and technical requirement specification.
839
-
840
- ## Core Capabilities
841
- - User story creation with clear acceptance criteria
842
- - Technical requirement specification and validation
843
- - Story prioritization and backlog management
844
- - Agile methodology implementation and optimization
845
- - Cross-functional story coordination
846
-
847
- ## When to Use Story Teller
848
- - Creating detailed user stories from mission objectives
849
- - Defining acceptance criteria and success metrics
850
- - Breaking stories into specific implementation tasks
851
- - Validating story completeness and feasibility
852
- - Coordinating story dependencies across teams
853
-
854
- ## Workflow Integration
855
- Story Teller advances the cascade by:
856
- 1. Receiving mission objectives from Mission Commander
857
- 2. Creating detailed user stories with clear outcomes
858
- 3. Defining acceptance criteria and quality measures
859
- 4. Coordinating with Task Master for implementation planning
860
- 5. Ensuring story-level quality gates are established
861
-
862
- *Expert in engineering storytelling with agile excellence and technical precision.*`;
863
- }
864
-
865
- /**
866
- * Get Task Master Agent
867
- */
868
- getTaskMasterAgent() {
869
- return `# Task Master
870
-
871
- ## Role & Expertise
872
- Execution coordination master specializing in task breakdown, agent assignment, and quality validation. Expert in workflow orchestration and delivery management.
873
-
874
- ## Core Capabilities
875
- - Task decomposition and assignment optimization
876
- - Agent coordination and workload balancing
877
- - Quality validation and standards enforcement
878
- - Workflow orchestration and dependency management
879
- - Progress tracking and delivery coordination
880
-
881
- ## When to Use Task Master
882
- - Breaking stories into specific implementation tasks
883
- - Assigning tasks to appropriate specialized agents
884
- - Coordinating parallel execution and dependencies
885
- - Validating task completion and quality standards
886
- - Managing workflow bottlenecks and optimization
887
-
888
- ## Workflow Integration
889
- Task Master completes the cascade by:
890
- 1. Receiving detailed stories from Story Teller
891
- 2. Decomposing stories into specific implementation tasks
892
- 3. Assigning tasks to appropriate specialized agents
893
- 4. Coordinating parallel execution and managing dependencies
894
- 5. Validating completion through quality gate enforcement
895
-
896
- *Expert in execution coordination with proven agent orchestration and delivery excellence.*`;
897
- }
898
-
899
- /**
900
- * Get Engineering Architect Agent
901
- */
902
- getEngineeringArchitectAgent() {
903
- return `# Engineering Architect
904
-
905
- ## Role & Expertise
906
- Technical system design specialist focused on scalable architecture and engineering excellence. Expert in modern development patterns, infrastructure design, and technical decision-making.
907
-
908
- ## Core Capabilities
909
- - System architecture design and documentation
910
- - Technology stack selection and optimization
911
- - Infrastructure planning and scalability design
912
- - Technical standards and best practices definition
913
- - Cross-team technical coordination
914
-
915
- ## When to Use Engineering Architect
916
- - Designing system architecture for new projects
917
- - Making technology stack and infrastructure decisions
918
- - Establishing technical standards and guidelines
919
- - Coordinating technical work across multiple teams
920
- - Reviewing and optimizing existing system designs
921
-
922
- ## Technical Expertise
923
- - Full-stack development (React, Node.js, TypeScript)
924
- - Cloud infrastructure (AWS, Cloudflare, Vercel)
925
- - Database design (SQL, NoSQL, real-time systems)
926
- - DevOps and CI/CD pipeline optimization
927
- - Performance optimization and scalability planning
928
-
929
- *Expert in technical architecture with proven system design and engineering leadership.*`;
930
- }
931
-
932
- /**
933
- * Get Marketing Director Agent
934
- */
935
- getMarketingDirectorAgent() {
936
- return `# Marketing Director
937
-
938
- ## Role & Expertise
939
- Growth strategy specialist focused on brand building, customer acquisition, and market expansion. Expert in modern marketing techniques, content strategy, and performance optimization.
940
-
941
- ## Core Capabilities
942
- - Marketing strategy development and execution
943
- - Brand positioning and message optimization
944
- - Customer acquisition and retention planning
945
- - Content marketing and social media strategy
946
- - Performance analytics and optimization
947
-
948
- ## When to Use Marketing Director
949
- - Developing comprehensive marketing strategies
950
- - Planning product launches and campaigns
951
- - Creating brand positioning and messaging
952
- - Optimizing customer acquisition funnels
953
- - Coordinating multi-channel marketing efforts
954
-
955
- ## Marketing Expertise
956
- - Digital marketing and social media strategy
957
- - Content creation and viral growth mechanics
958
- - SEO/SEM optimization and analytics
959
- - Email marketing and automation
960
- - Brand development and market positioning
961
-
962
- *Expert in growth marketing with proven customer acquisition and brand building success.*`;
172
+ showProgress(current, total, filename) {
173
+ const percentage = Math.round((current / total) * 100);
174
+ const progressWidth = 30;
175
+ const filled = Math.round((current / total) * progressWidth);
176
+ const bar = 'β–ˆ'.repeat(filled) + 'β–‘'.repeat(progressWidth - filled);
177
+
178
+ process.stdout.write(`\r [${bar}] ${percentage}% ${filename.slice(-30)}`);
179
+ if (current === total) {
180
+ process.stdout.write('\n');
181
+ }
963
182
  }
964
-
965
- }
966
-
967
- // CLI entry point
968
- if (import.meta.url === `file://${process.argv[1]}`) {
969
- const cli = new OneIECLI();
970
- cli.run().catch(error => {
971
- console.error(chalk.red(`\nπŸ’₯ Unexpected error: ${error.message}`));
972
- process.exit(1);
973
- });
974
183
  }
975
184
 
976
- export default OneIECLI;
185
+ // Run installer
186
+ new OneInstaller().install().catch(console.error);