claude-autopm 1.29.0 → 1.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,756 @@
1
+ /**
2
+ * Interactive Guide for ClaudeAutoPM
3
+ * Provides step-by-step guidance with framed instructions
4
+ */
5
+
6
+ const readline = require('readline');
7
+ const { execSync } = require('child_process');
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+
11
+ class InteractiveGuide {
12
+ constructor() {
13
+ this.rl = readline.createInterface({
14
+ input: process.stdin,
15
+ output: process.stdout
16
+ });
17
+ this.shouldExit = false;
18
+ }
19
+
20
+ /**
21
+ * Create a framed box around text
22
+ */
23
+ createFrame(content, title = '', width = 80) {
24
+ const lines = content.split('\n');
25
+ const maxLength = Math.max(...lines.map(line => line.length), title.length + 4);
26
+ const frameWidth = Math.max(width, maxLength + 4);
27
+
28
+ let frame = '';
29
+
30
+ // Top border
31
+ frame += '┌' + '─'.repeat(frameWidth - 2) + '┐\n';
32
+
33
+ // Title if provided
34
+ if (title) {
35
+ const titlePadding = Math.floor((frameWidth - title.length - 4) / 2);
36
+ frame += '│' + ' '.repeat(titlePadding) + `[ ${title} ]` + ' '.repeat(frameWidth - titlePadding - title.length - 6) + '│\n';
37
+ frame += '├' + '─'.repeat(frameWidth - 2) + '┤\n';
38
+ }
39
+
40
+ // Content lines
41
+ lines.forEach(line => {
42
+ const padding = frameWidth - line.length - 3;
43
+ frame += '│ ' + line + ' '.repeat(padding) + '│\n';
44
+ });
45
+
46
+ // Bottom border
47
+ frame += '└' + '─'.repeat(frameWidth - 2) + '┘\n';
48
+
49
+ return frame;
50
+ }
51
+
52
+ /**
53
+ * Create a step frame
54
+ */
55
+ createStepFrame(stepNumber, title, instructions, commands = []) {
56
+ let content = `STEP ${stepNumber}: ${title}\n\n`;
57
+ content += instructions;
58
+
59
+ if (commands.length > 0) {
60
+ content += '\n\nCommands to run:\n';
61
+ commands.forEach(cmd => {
62
+ content += ` $ ${cmd}\n`;
63
+ });
64
+ }
65
+
66
+ return this.createFrame(content, `Step ${stepNumber}`, 80);
67
+ }
68
+
69
+ /**
70
+ * Ask user for input with options
71
+ */
72
+ async askChoice(question, options) {
73
+ return new Promise((resolve) => {
74
+ console.log(question);
75
+ options.forEach((option, index) => {
76
+ console.log(` ${index + 1}. ${option}`);
77
+ });
78
+ console.log();
79
+
80
+ this.rl.question('Enter your choice (number): ', (answer) => {
81
+ const choice = parseInt(answer) - 1;
82
+ if (choice >= 0 && choice < options.length) {
83
+ resolve(choice);
84
+ } else {
85
+ console.log('Invalid choice. Please try again.\n');
86
+ this.askChoice(question, options).then(resolve);
87
+ }
88
+ });
89
+ });
90
+ }
91
+
92
+ /**
93
+ * Wait for user confirmation
94
+ */
95
+ async waitForConfirmation(message = 'Press Enter to continue...') {
96
+ return new Promise((resolve) => {
97
+ this.rl.question(`\n${message}`, () => {
98
+ resolve();
99
+ });
100
+ });
101
+ }
102
+
103
+ /**
104
+ * Check if ClaudeAutoPM is already installed
105
+ */
106
+ isInstalled() {
107
+ return fs.existsSync('.claude') && fs.existsSync('.claude/config.json');
108
+ }
109
+
110
+ /**
111
+ * Check system requirements
112
+ */
113
+ checkRequirements() {
114
+ const checks = [];
115
+
116
+ try {
117
+ const nodeVersion = execSync('node --version', { encoding: 'utf8' }).trim();
118
+ checks.push(`✅ Node.js: ${nodeVersion}`);
119
+ } catch {
120
+ checks.push('❌ Node.js: Not found');
121
+ }
122
+
123
+ try {
124
+ const npmVersion = execSync('npm --version', { encoding: 'utf8' }).trim();
125
+ checks.push(`✅ npm: v${npmVersion}`);
126
+ } catch {
127
+ checks.push('❌ npm: Not found');
128
+ }
129
+
130
+ try {
131
+ execSync('git --version', { encoding: 'utf8' });
132
+ checks.push('✅ Git: Available');
133
+ } catch {
134
+ checks.push('❌ Git: Not found');
135
+ }
136
+
137
+ return checks;
138
+ }
139
+
140
+ /**
141
+ * Main guide entry point
142
+ */
143
+ async start() {
144
+ console.clear();
145
+ console.log(this.createFrame(
146
+ '🎯 ClaudeAutoPM - AI-Powered Project Management System\n\n' +
147
+ 'Welcome! This interactive guide will help you get started with\n' +
148
+ 'ClaudeAutoPM and show you all available options.\n\n' +
149
+ 'ClaudeAutoPM transforms PRDs into epics, epics into issues,\n' +
150
+ 'and issues into production code with full traceability.',
151
+ 'Welcome to ClaudeAutoPM'
152
+ ));
153
+
154
+ const mainOptions = [
155
+ '📦 Install ClaudeAutoPM in this project',
156
+ '🔧 Configure existing installation',
157
+ '🤖 Learn about agent teams',
158
+ '📋 Start your first PM workflow',
159
+ '🆘 Troubleshoot installation issues',
160
+ '📚 View complete documentation',
161
+ '🚪 Exit guide'
162
+ ];
163
+
164
+ while (!this.shouldExit) {
165
+ const choice = await this.askChoice(
166
+ '\n🚀 What would you like to do?',
167
+ mainOptions
168
+ );
169
+
170
+ switch (choice) {
171
+ case 0: await this.installationFlow(); break;
172
+ case 1: await this.configurationFlow(); break;
173
+ case 2: await this.agentTeamsFlow(); break;
174
+ case 3: await this.firstProjectFlow(); break;
175
+ case 4: await this.troubleshootingFlow(); break;
176
+ case 5: await this.documentationFlow(); break;
177
+ case 6:
178
+ console.log('\n👋 Thank you for using ClaudeAutoPM!');
179
+ this.rl.close();
180
+ return;
181
+ }
182
+ }
183
+ }
184
+
185
+ /**
186
+ * Installation workflow
187
+ */
188
+ async installationFlow() {
189
+ console.clear();
190
+
191
+ if (this.isInstalled()) {
192
+ console.log(this.createFrame(
193
+ '✅ ClaudeAutoPM is already installed in this project!\n\n' +
194
+ 'Found existing .claude directory with configuration.\n' +
195
+ 'You can proceed to configure or use the system.',
196
+ 'Already Installed'
197
+ ));
198
+ await this.waitForConfirmation();
199
+ return;
200
+ }
201
+
202
+ // Step 1: System requirements
203
+ console.log(this.createStepFrame(
204
+ 1,
205
+ 'Check System Requirements',
206
+ 'Let\'s verify your system has everything needed for ClaudeAutoPM:'
207
+ ));
208
+
209
+ const requirements = this.checkRequirements();
210
+ requirements.forEach(req => console.log(` ${req}`));
211
+
212
+ const hasErrors = requirements.some(req => req.includes('❌'));
213
+ if (hasErrors) {
214
+ console.log(this.createFrame(
215
+ '⚠️ Some requirements are missing!\n\n' +
216
+ 'Please install the missing components and run the guide again.\n\n' +
217
+ 'Required:\n' +
218
+ '• Node.js 16+ (https://nodejs.org)\n' +
219
+ '• npm (comes with Node.js)\n' +
220
+ '• Git (https://git-scm.com)',
221
+ 'Missing Requirements'
222
+ ));
223
+ await this.waitForConfirmation();
224
+ return;
225
+ }
226
+
227
+ await this.waitForConfirmation('✅ All requirements met! Press Enter to continue...');
228
+
229
+ // Step 2: Choose installation preset
230
+ console.log(this.createStepFrame(
231
+ 2,
232
+ 'Choose Installation Preset',
233
+ 'ClaudeAutoPM offers different presets based on your project needs:\n\n' +
234
+ '• Minimal: Traditional development, no containers\n' +
235
+ '• Docker-only: Container-first with adaptive execution\n' +
236
+ '• Full DevOps: Docker + Kubernetes with CI/CD (RECOMMENDED)\n' +
237
+ '• Performance: Maximum parallelization for large projects\n' +
238
+ '• Custom: Configure each option manually'
239
+ ));
240
+
241
+ const presetChoice = await this.askChoice(
242
+ 'Which preset fits your project?',
243
+ ['Minimal', 'Docker-only', 'Full DevOps (Recommended)', 'Performance', 'Custom']
244
+ );
245
+
246
+ const presets = ['minimal', 'docker-only', 'full', 'performance', 'custom'];
247
+ const selectedPreset = presets[presetChoice];
248
+
249
+ // Map preset names to numeric choices that install script expects
250
+ const presetToChoice = {
251
+ 'minimal': '1',
252
+ 'docker-only': '2',
253
+ 'full': '3',
254
+ 'performance': '4',
255
+ 'custom': '5'
256
+ };
257
+ const choiceNumber = presetToChoice[selectedPreset];
258
+
259
+ // Step 3: Run installation
260
+ console.log(this.createStepFrame(
261
+ 3,
262
+ 'Run Installation',
263
+ `Installing ClaudeAutoPM with "${selectedPreset}" preset...\n\n` +
264
+ 'This will:\n' +
265
+ '• Create .claude directory with agents and commands\n' +
266
+ '• Set up configuration files\n' +
267
+ '• Install Git hooks (if applicable)\n' +
268
+ '• Configure team management',
269
+ [`autopm install ${choiceNumber}`]
270
+ ));
271
+
272
+ await this.waitForConfirmation('Ready to install? Press Enter to continue...');
273
+
274
+ try {
275
+ console.log('\n🔄 Installing...\n');
276
+
277
+ // Pass the choice via stdin to the install script
278
+ const child = require('child_process').spawn('node', [
279
+ path.join(__dirname, '../../bin/autopm.js'),
280
+ 'install'
281
+ ], {
282
+ stdio: ['pipe', 'inherit', 'inherit'],
283
+ cwd: process.cwd()
284
+ });
285
+
286
+ // Send the choice to stdin and close it
287
+ child.stdin.write(choiceNumber + '\n');
288
+ child.stdin.end();
289
+
290
+ // Wait for the process to complete
291
+ await new Promise((resolve, reject) => {
292
+ child.on('close', (code) => {
293
+ if (code === 0) {
294
+ resolve();
295
+ } else {
296
+ reject(new Error(`Installation failed with exit code ${code}`));
297
+ }
298
+ });
299
+ child.on('error', reject);
300
+ });
301
+
302
+ // Installation script already shows success message, so just show next steps
303
+ console.log('\n' + this.createFrame(
304
+ '🎯 Installation Complete - How to Use ClaudeAutoPM\n\n' +
305
+ 'ClaudeAutoPM is now installed! To start using it:\n\n' +
306
+ '1. 📂 Open Claude Code in this directory\n' +
307
+ '2. 🔓 If needed: claude --dangerously-skip-permissions\n' +
308
+ '3. ✅ Test with: /pm:validate\n\n' +
309
+ 'Then you can:\n' +
310
+ '• 🔧 Configure your provider (GitHub/Azure DevOps)\n' +
311
+ '• 🤖 Learn about agent teams\n' +
312
+ '• 📋 Start your first PM workflow\n\n' +
313
+ '💡 All PM commands (/pm:xxx) work only in Claude Code!',
314
+ 'Ready to Use'
315
+ ));
316
+
317
+ // Ask user what they want to do next instead of just continuing
318
+ const nextChoice = await this.askChoice(
319
+ '\n🚀 What would you like to do next?',
320
+ [
321
+ '🔧 Configure provider integration',
322
+ '🤖 Learn about agent teams',
323
+ '📋 Start first PM workflow',
324
+ '📚 View documentation',
325
+ '🚪 Exit guide'
326
+ ]
327
+ );
328
+
329
+ switch (nextChoice) {
330
+ case 0: await this.configurationFlow(); break;
331
+ case 1: await this.agentTeamsFlow(); break;
332
+ case 2: await this.firstProjectFlow(); break;
333
+ case 3: await this.documentationFlow(); break;
334
+ case 4:
335
+ console.log('\n👋 Thank you for using ClaudeAutoPM!');
336
+ console.log('🎯 Run "autopm guide" anytime to access this guide again.');
337
+ this.shouldExit = true;
338
+ this.rl.close();
339
+ return;
340
+ }
341
+
342
+ } catch (error) {
343
+ console.log(this.createFrame(
344
+ '❌ Installation failed!\n\n' +
345
+ `Error: ${error.message}\n\n` +
346
+ 'Please check the error above and try again.\n' +
347
+ 'For help, choose "Troubleshoot installation issues" from main menu.',
348
+ 'Installation Error'
349
+ ));
350
+ await this.waitForConfirmation();
351
+ }
352
+ }
353
+
354
+ /**
355
+ * Configuration workflow
356
+ */
357
+ async configurationFlow() {
358
+ console.clear();
359
+
360
+ if (!this.isInstalled()) {
361
+ console.log(this.createFrame(
362
+ '⚠️ ClaudeAutoPM is not installed in this project!\n\n' +
363
+ 'Please install ClaudeAutoPM first by selecting the installation option\n' +
364
+ 'from the main menu.',
365
+ 'Not Installed'
366
+ ));
367
+ await this.waitForConfirmation();
368
+ return;
369
+ }
370
+
371
+ console.log(this.createStepFrame(
372
+ 1,
373
+ 'Configure Project Management Provider',
374
+ 'ClaudeAutoPM can integrate with different project management systems:\n\n' +
375
+ '• GitHub Issues: Full GitHub integration with Issues and Projects\n' +
376
+ '• Azure DevOps: Azure Boards and Pipelines integration\n' +
377
+ '• Local Only: Store everything locally (no external sync)'
378
+ ));
379
+
380
+ const providerChoice = await this.askChoice(
381
+ 'Which provider would you like to use?',
382
+ ['GitHub Issues', 'Azure DevOps', 'Local Only (no external sync)']
383
+ );
384
+
385
+ switch (providerChoice) {
386
+ case 0:
387
+ console.log(this.createStepFrame(
388
+ 2,
389
+ 'Configure GitHub Integration',
390
+ 'To use GitHub integration, you need:\n\n' +
391
+ '1. A GitHub Personal Access Token with "repo" scope\n' +
392
+ '2. Set environment variable: GITHUB_TOKEN=your_token\n\n' +
393
+ 'You can create a token at:\n' +
394
+ 'https://github.com/settings/tokens\n\n' +
395
+ 'After setting the token, ClaudeAutoPM will automatically\n' +
396
+ 'sync epics and issues with GitHub.',
397
+ ['export GITHUB_TOKEN=your_github_token_here']
398
+ ));
399
+ break;
400
+
401
+ case 1:
402
+ console.log(this.createStepFrame(
403
+ 2,
404
+ 'Configure Azure DevOps Integration',
405
+ 'To use Azure DevOps integration, you need:\n\n' +
406
+ '1. Azure DevOps Personal Access Token\n' +
407
+ '2. Organization and Project names\n\n' +
408
+ 'Set these environment variables:\n' +
409
+ '• AZURE_DEVOPS_PAT=your_pat\n' +
410
+ '• AZURE_DEVOPS_ORG=your_org\n' +
411
+ '• AZURE_DEVOPS_PROJECT=your_project',
412
+ [
413
+ 'export AZURE_DEVOPS_PAT=your_pat_here',
414
+ 'export AZURE_DEVOPS_ORG=your_org_name',
415
+ 'export AZURE_DEVOPS_PROJECT=your_project_name'
416
+ ]
417
+ ));
418
+ break;
419
+
420
+ case 2:
421
+ console.log(this.createStepFrame(
422
+ 2,
423
+ 'Local Configuration Complete',
424
+ 'ClaudeAutoPM is configured for local-only operation.\n\n' +
425
+ 'All PRDs, epics, and issues will be stored in:\n' +
426
+ '• .claude/work/ directory\n\n' +
427
+ 'You can switch to external providers later by\n' +
428
+ 'running this configuration flow again.'
429
+ ));
430
+ break;
431
+ }
432
+
433
+ await this.waitForConfirmation();
434
+ }
435
+
436
+ /**
437
+ * Agent teams workflow
438
+ */
439
+ async agentTeamsFlow() {
440
+ console.clear();
441
+
442
+ console.log(this.createStepFrame(
443
+ 1,
444
+ 'Understanding Agent Teams',
445
+ 'ClaudeAutoPM uses specialized AI agent teams for different contexts:\n\n' +
446
+ '• base: Core agents (code-analyzer, test-runner, file-analyzer)\n' +
447
+ '• devops: Docker, Kubernetes, CI/CD, infrastructure\n' +
448
+ '• frontend: React, JavaScript, UI/UX, testing\n' +
449
+ '• python_backend: Python, FastAPI, Flask, databases\n' +
450
+ '• fullstack: Combined frontend + backend capabilities\n\n' +
451
+ 'Teams automatically load relevant agents for your current task.',
452
+ ['autopm team list']
453
+ ));
454
+
455
+ await this.waitForConfirmation();
456
+
457
+ console.log(this.createStepFrame(
458
+ 2,
459
+ 'Manual Team Switching',
460
+ 'You can manually switch teams based on your current work:\n\n' +
461
+ 'Example workflows:\n' +
462
+ '• Working on React UI → Load frontend team\n' +
463
+ '• Setting up Docker → Load devops team\n' +
464
+ '• Building APIs → Load python_backend team\n' +
465
+ '• Full feature → Load fullstack team',
466
+ [
467
+ 'autopm team load frontend',
468
+ 'autopm team load devops',
469
+ 'autopm team load python_backend',
470
+ 'autopm team current'
471
+ ]
472
+ ));
473
+
474
+ await this.waitForConfirmation();
475
+
476
+ console.log(this.createStepFrame(
477
+ 3,
478
+ 'Automatic Team Switching',
479
+ 'Enable automatic team switching based on Git branch names!\n\n' +
480
+ 'Setup (one-time):\n' +
481
+ '1. Run the setup script\n' +
482
+ '2. Use branch naming convention\n\n' +
483
+ 'Branch patterns:\n' +
484
+ '• feature/devops/add-ci → loads devops team\n' +
485
+ '• fix/frontend/button-bug → loads frontend team\n' +
486
+ '• feat/backend/new-api → loads python_backend team',
487
+ [
488
+ 'bash scripts/setup-githooks.sh',
489
+ 'git checkout -b feature/devops/kubernetes-setup',
490
+ 'git checkout -b fix/frontend/navbar-responsive'
491
+ ]
492
+ ));
493
+
494
+ await this.waitForConfirmation();
495
+ }
496
+
497
+ /**
498
+ * First project workflow
499
+ */
500
+ async firstProjectFlow() {
501
+ console.clear();
502
+
503
+ if (!this.isInstalled()) {
504
+ console.log(this.createFrame(
505
+ '⚠️ ClaudeAutoPM is not installed in this project!\n\n' +
506
+ 'Please install ClaudeAutoPM first.',
507
+ 'Not Installed'
508
+ ));
509
+ await this.waitForConfirmation();
510
+ return;
511
+ }
512
+
513
+ console.log(this.createStepFrame(
514
+ 1,
515
+ 'Create Your First PRD',
516
+ 'Let\'s start with a Product Requirements Document (PRD).\n\n' +
517
+ 'You can create a PRD in two ways:\n' +
518
+ '• Template-based: Fast, structured approach\n' +
519
+ '• AI-powered: Brainstorming with Claude Code\n\n' +
520
+ 'For this example, we\'ll show the template approach.'
521
+ ));
522
+
523
+ let featureName = await new Promise((resolve) => {
524
+ this.rl.question('Enter a feature name (e.g., user-authentication): ', resolve);
525
+ });
526
+
527
+ // Handle empty input
528
+ if (!featureName.trim()) {
529
+ featureName = 'user-authentication';
530
+ console.log(`\n💡 Using example: "${featureName}"\n`);
531
+ }
532
+
533
+ console.log(this.createStepFrame(
534
+ 2,
535
+ 'Generate PRD and Epic',
536
+ `Creating PRD for "${featureName}" and breaking it into tasks:\n\n` +
537
+ '1. Create PRD from template\n' +
538
+ '2. Parse PRD into epic structure\n' +
539
+ '3. Decompose epic into actionable tasks\n' +
540
+ '4. Sync with your configured provider\n\n' +
541
+ '🚀 Next Steps - Open Claude Code:\n\n' +
542
+ '1. Open Claude Code in this directory\n' +
543
+ '2. If needed, run: claude --dangerously-skip-permissions\n' +
544
+ '3. Then use these PM commands:',
545
+ [
546
+ `/pm:prd-new ${featureName} --template`,
547
+ `/pm:prd-parse ${featureName}`,
548
+ `/pm:epic-decompose ${featureName}`,
549
+ `/pm:epic-sync ${featureName}`
550
+ ]
551
+ ));
552
+
553
+ await this.waitForConfirmation();
554
+
555
+ console.log(this.createStepFrame(
556
+ 3,
557
+ 'Start Working on Tasks',
558
+ 'Now you can start working on individual tasks:\n\n' +
559
+ '• Get next priority task\n' +
560
+ '• Start working on specific issue\n' +
561
+ '• Check project status\n' +
562
+ '• View daily standup summary\n\n' +
563
+ '🚀 Open Claude Code and use these commands:',
564
+ [
565
+ '/pm:next',
566
+ '/pm:issue-start ISSUE-ID',
567
+ '/pm:status',
568
+ '/pm:standup'
569
+ ]
570
+ ));
571
+
572
+ await this.waitForConfirmation();
573
+ }
574
+
575
+ /**
576
+ * Troubleshooting workflow
577
+ */
578
+ async troubleshootingFlow() {
579
+ console.clear();
580
+
581
+ console.log(this.createFrame(
582
+ '🔧 ClaudeAutoPM Troubleshooting\n\n' +
583
+ 'Common issues and solutions:',
584
+ 'Troubleshooting Guide'
585
+ ));
586
+
587
+ const issues = [
588
+ 'Installation fails',
589
+ 'Commands not found after installation',
590
+ 'Git hooks not working',
591
+ 'Team switching not working',
592
+ 'Provider integration issues',
593
+ 'Permission errors',
594
+ 'View system diagnostics'
595
+ ];
596
+
597
+ const issueChoice = await this.askChoice(
598
+ 'What issue are you experiencing?',
599
+ issues
600
+ );
601
+
602
+ switch (issueChoice) {
603
+ case 0:
604
+ console.log(this.createStepFrame(
605
+ 1,
606
+ 'Fix Installation Issues',
607
+ 'Common installation problems and solutions:\n\n' +
608
+ '1. Check Node.js version (requires 16+)\n' +
609
+ '2. Clear npm cache\n' +
610
+ '3. Check write permissions\n' +
611
+ '4. Try with verbose logging',
612
+ [
613
+ 'node --version',
614
+ 'npm cache clean --force',
615
+ 'ls -la .',
616
+ 'autopm install --verbose'
617
+ ]
618
+ ));
619
+ break;
620
+
621
+ case 1:
622
+ console.log(this.createStepFrame(
623
+ 1,
624
+ 'Fix Command Not Found',
625
+ 'If autopm commands are not found:\n\n' +
626
+ '1. Check if globally installed\n' +
627
+ '2. Check PATH environment\n' +
628
+ '3. Try local execution\n' +
629
+ '4. Reinstall globally',
630
+ [
631
+ 'which autopm',
632
+ 'echo $PATH',
633
+ 'node bin/autopm.js --help',
634
+ 'npm install -g claude-autopm'
635
+ ]
636
+ ));
637
+ break;
638
+
639
+ case 2:
640
+ console.log(this.createStepFrame(
641
+ 1,
642
+ 'Fix Git Hooks Issues',
643
+ 'If automatic team switching isn\'t working:\n\n' +
644
+ '1. Check Git hooks configuration\n' +
645
+ '2. Verify hook file permissions\n' +
646
+ '3. Re-run setup script\n' +
647
+ '4. Test manually',
648
+ [
649
+ 'git config --get core.hooksPath',
650
+ 'ls -la .githooks/',
651
+ 'bash scripts/setup-githooks.sh',
652
+ 'git checkout -b test/devops/test-branch'
653
+ ]
654
+ ));
655
+ break;
656
+
657
+ case 6:
658
+ console.log(this.createStepFrame(
659
+ 1,
660
+ 'System Diagnostics',
661
+ 'System information and status:\n\n' +
662
+ 'Checking ClaudeAutoPM installation and configuration...'
663
+ ));
664
+
665
+ console.log('\n📊 System Diagnostics:');
666
+ console.log('─'.repeat(50));
667
+
668
+ // Check installation
669
+ console.log(`✅ Installation: ${this.isInstalled() ? 'Found' : 'Not found'}`);
670
+
671
+ // Check requirements
672
+ const requirements = this.checkRequirements();
673
+ requirements.forEach(req => console.log(` ${req}`));
674
+
675
+ // Check team configuration
676
+ if (fs.existsSync('.claude/teams.json')) {
677
+ console.log('✅ Teams: Configured');
678
+ } else {
679
+ console.log('❌ Teams: Not configured');
680
+ }
681
+
682
+ // Check active team
683
+ if (fs.existsSync('.claude/active_team.txt')) {
684
+ const activeTeam = fs.readFileSync('.claude/active_team.txt', 'utf8').trim();
685
+ console.log(`✅ Active team: ${activeTeam}`);
686
+ } else {
687
+ console.log('ℹ️ Active team: None set');
688
+ }
689
+
690
+ break;
691
+ }
692
+
693
+ await this.waitForConfirmation();
694
+ }
695
+
696
+ /**
697
+ * Documentation flow
698
+ */
699
+ async documentationFlow() {
700
+ console.clear();
701
+
702
+ console.log(this.createFrame(
703
+ '📚 ClaudeAutoPM Documentation\n\n' +
704
+ 'Complete documentation and resources:',
705
+ 'Documentation'
706
+ ));
707
+
708
+ const docs = [
709
+ '🌐 Online Documentation (GitHub Pages)',
710
+ '📖 Complete Guide',
711
+ '📝 Command Reference',
712
+ '🤖 Agent Registry',
713
+ '🔧 Development Guide',
714
+ '⚙️ Configuration Reference',
715
+ '📋 Wiki Pages',
716
+ '💡 Examples and Tutorials'
717
+ ];
718
+
719
+ const docChoice = await this.askChoice(
720
+ 'What documentation would you like to access?',
721
+ docs
722
+ );
723
+
724
+ const urls = [
725
+ 'https://rafeekpro.github.io/ClaudeAutoPM/',
726
+ 'https://rafeekpro.github.io/ClaudeAutoPM/guide/getting-started',
727
+ 'https://rafeekpro.github.io/ClaudeAutoPM/commands/overview',
728
+ 'https://rafeekpro.github.io/ClaudeAutoPM/agents/registry',
729
+ 'https://rafeekpro.github.io/ClaudeAutoPM/development/docker-first',
730
+ 'https://rafeekpro.github.io/ClaudeAutoPM/reference/configuration',
731
+ 'https://github.com/rafeekpro/ClaudeAutoPM/wiki',
732
+ 'https://github.com/rafeekpro/ClaudeAutoPM/tree/main/examples'
733
+ ];
734
+
735
+ console.log(this.createFrame(
736
+ `📖 ${docs[docChoice]}\n\n` +
737
+ `URL: ${urls[docChoice]}\n\n` +
738
+ 'This link has been displayed above. You can:\n' +
739
+ '• Copy the URL to open in your browser\n' +
740
+ '• Bookmark it for future reference\n' +
741
+ '• Share it with your team',
742
+ 'Documentation Link'
743
+ ));
744
+
745
+ await this.waitForConfirmation();
746
+ }
747
+
748
+ /**
749
+ * Close the interface
750
+ */
751
+ close() {
752
+ this.rl.close();
753
+ }
754
+ }
755
+
756
+ module.exports = InteractiveGuide;