@jaguilar87/gaia-ops 1.3.5 β†’ 1.3.6

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 CHANGED
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.3.6] - 2025-11-10
11
+
12
+ ### Fixed
13
+ - **Installer:** Skip questions when project context already has the answers
14
+ - **Smart Detection:** Only ask what's missing or needs confirmation (paths)
15
+ - **User Experience:** Show config summary when context is loaded
16
+ - **Directory Creation:** Auto-create missing directories without prompting
17
+
18
+ ### Changed
19
+ - When project context loads successfully, only asks to confirm/adjust paths
20
+ - Cloud provider, credentials, region, and cluster name auto-applied from context
21
+ - Clearer feedback showing what was loaded from project context
22
+ - Missing directories (gitops, terraform, app-services) now created automatically
23
+
24
+ ### Improved
25
+ - Eliminates ALL redundant questions when context exists
26
+ - Better UX: "Here's what we loaded, just confirm the paths"
27
+ - Faster setup for teams with complete project contexts
28
+ - No interruptions for directory creation confirmations
29
+
30
+ ---
31
+
10
32
  ## [1.3.5] - 2025-11-10
11
33
 
12
34
  ### Added
package/bin/gaia-init.js CHANGED
@@ -401,8 +401,21 @@ async function runInteractiveWizard(detected) {
401
401
  // =========================================================================
402
402
  // STEP 2: Ask remaining questions (with smart defaults from context)
403
403
  // =========================================================================
404
- console.log(chalk.yellow('\nπŸ“ Directory Configuration'));
405
- console.log(chalk.gray('Verify or adjust the following paths:\n'));
404
+
405
+ // If we have project context, show a summary and only ask to confirm paths
406
+ if (projectContext) {
407
+ console.log(chalk.green('\nβœ… Configuration loaded from project context:'));
408
+ console.log(chalk.gray(` β€’ Cloud: ${defaults.cloudProvider.toUpperCase()}`));
409
+ if (defaults.gcpProjectId) console.log(chalk.gray(` β€’ GCP Project: ${defaults.gcpProjectId}`));
410
+ if (defaults.awsAccountId) console.log(chalk.gray(` β€’ AWS Account: ${defaults.awsAccountId}`));
411
+ console.log(chalk.gray(` β€’ Region: ${defaults.region}`));
412
+ console.log(chalk.gray(` β€’ Cluster: ${defaults.clusterName}`));
413
+ console.log(chalk.yellow('\nπŸ“ Directory Configuration'));
414
+ console.log(chalk.gray('Verify or adjust paths if needed:\n'));
415
+ } else {
416
+ console.log(chalk.yellow('\nπŸ“ Directory Configuration'));
417
+ console.log(chalk.gray('Please provide your project configuration:\n'));
418
+ }
406
419
 
407
420
  const questions = [
408
421
  {
@@ -426,8 +439,9 @@ async function runInteractiveWizard(detected) {
426
439
  initial: defaults.appServices,
427
440
  validate: value => value.trim().length > 0
428
441
  },
442
+ // Only ask cloud provider if not loaded from context
429
443
  {
430
- type: 'select',
444
+ type: projectContext ? null : 'select',
431
445
  name: 'cloudProvider',
432
446
  message: '☁️ Cloud provider:',
433
447
  choices: [
@@ -437,29 +451,43 @@ async function runInteractiveWizard(detected) {
437
451
  ],
438
452
  initial: defaults.cloudProvider === 'gcp' ? 0 : defaults.cloudProvider === 'aws' ? 1 : 2
439
453
  },
454
+ // Only ask GCP Project ID if not loaded from context
440
455
  {
441
- type: (prev, values) => ['gcp', 'multi-cloud'].includes(values.cloudProvider) ? 'text' : null,
456
+ type: (prev, values) => {
457
+ const provider = values.cloudProvider || defaults.cloudProvider;
458
+ const needsGcp = ['gcp', 'multi-cloud'].includes(provider);
459
+ const hasValue = projectContext && defaults.gcpProjectId;
460
+ return (needsGcp && !hasValue) ? 'text' : null;
461
+ },
442
462
  name: 'gcpProjectId',
443
463
  message: '🌐 GCP Project ID (e.g., aaxis-rnd-non-prod):',
444
464
  initial: defaults.gcpProjectId,
445
465
  validate: value => value.trim().length > 0
446
466
  },
467
+ // Only ask AWS Account if not loaded from context
447
468
  {
448
- type: (prev, values) => ['aws', 'multi-cloud'].includes(values.cloudProvider) ? 'text' : null,
469
+ type: (prev, values) => {
470
+ const provider = values.cloudProvider || defaults.cloudProvider;
471
+ const needsAws = ['aws', 'multi-cloud'].includes(provider);
472
+ const hasValue = projectContext && defaults.awsAccountId;
473
+ return (needsAws && !hasValue) ? 'text' : null;
474
+ },
449
475
  name: 'awsAccountId',
450
476
  message: '🌐 AWS Account ID (e.g., 929914624686):',
451
477
  initial: defaults.awsAccountId,
452
478
  validate: value => value.trim().length > 0
453
479
  },
480
+ // Only ask region if not loaded from context
454
481
  {
455
- type: 'text',
482
+ type: projectContext && defaults.region ? null : 'text',
456
483
  name: 'region',
457
484
  message: '🌍 Primary Region (e.g., us-central1 for GCP, us-east-1 for AWS):',
458
485
  initial: defaults.region,
459
486
  validate: value => value.trim().length > 0
460
487
  },
488
+ // Only ask cluster name if not loaded from context
461
489
  {
462
- type: 'text',
490
+ type: projectContext && defaults.clusterName ? null : 'text',
463
491
  name: 'clusterName',
464
492
  message: '☸️ Cluster Name (e.g., rnd-gke-nonprod or digital-eks-prod):',
465
493
  initial: defaults.clusterName,
@@ -480,17 +508,21 @@ async function runInteractiveWizard(detected) {
480
508
  }
481
509
  });
482
510
 
483
- // Verify critical responses are present (some questions are conditional)
484
- if (!responses.cloudProvider || !responses.clusterName) {
511
+ // Merge responses with defaults (for values skipped because they were in context)
512
+ const finalConfig = {
513
+ ...defaults,
514
+ ...responses,
515
+ projectContextRepo: defaults.repoUrl,
516
+ projectContextAlreadyCloned: !!projectContext
517
+ };
518
+
519
+ // Verify critical responses are present
520
+ if (!finalConfig.cloudProvider || !finalConfig.clusterName) {
485
521
  console.log(chalk.yellow('\n⚠️ Installation cancelled or incomplete\n'));
486
522
  process.exit(0);
487
523
  }
488
524
 
489
- // Add project context info to responses
490
- responses.projectContextRepo = defaults.repoUrl;
491
- responses.projectContextAlreadyCloned = !!projectContext;
492
-
493
- return responses;
525
+ return finalConfig;
494
526
  }
495
527
 
496
528
  // ============================================================================
@@ -630,9 +662,9 @@ async function generateAgentsMd() {
630
662
 
631
663
  /**
632
664
  * Validate and setup project paths (gitops, terraform, app-services)
633
- * Creates directories if they don't exist (with user confirmation in interactive mode)
665
+ * Creates directories automatically if they don't exist
634
666
  */
635
- async function validateAndSetupProjectPaths(config, nonInteractive) {
667
+ async function validateAndSetupProjectPaths(config) {
636
668
  console.log(chalk.cyan('\nπŸ“ Setting up project directories...\n'));
637
669
 
638
670
  const paths = {
@@ -650,30 +682,13 @@ async function validateAndSetupProjectPaths(config, nonInteractive) {
650
682
  continue;
651
683
  }
652
684
 
653
- // Path doesn't exist - decide what to do
654
- let shouldCreate = nonInteractive; // Auto-create in non-interactive mode
655
-
656
- if (!nonInteractive) {
657
- // Ask user in interactive mode
658
- const response = await prompts({
659
- type: 'confirm',
660
- name: 'create',
661
- message: `Directory ${chalk.yellow(userPath)} doesn't exist. Create it?`,
662
- initial: true
663
- });
664
- shouldCreate = response.create;
665
- }
666
-
667
- if (shouldCreate) {
668
- await fs.mkdir(absPath, { recursive: true });
669
- console.log(chalk.green(` βœ“ ${name}: ${userPath} (created)`));
670
- } else {
671
- console.log(chalk.yellow(` ⚠ ${name}: ${userPath} (skipped - agents may create it later if needed)`));
672
- }
685
+ // Create directory automatically
686
+ await fs.mkdir(absPath, { recursive: true });
687
+ console.log(chalk.green(` βœ“ ${name}: ${userPath} (created)`));
673
688
 
674
689
  // Warn about absolute paths (portability concern)
675
690
  if (isAbsolute(userPath)) {
676
- console.log(chalk.yellow(` ⚠ Warning: Absolute path "${userPath}" may not work on other machines`));
691
+ console.log(chalk.yellow(` ⚠ Note: Absolute path may not work on other machines`));
677
692
  }
678
693
  }
679
694
 
@@ -971,7 +986,7 @@ async function main() {
971
986
  await installClaudeAgentsPackage();
972
987
 
973
988
  // Step 5.5: Validate and setup project paths (gitops, terraform, app-services)
974
- await validateAndSetupProjectPaths(config, args.nonInteractive);
989
+ await validateAndSetupProjectPaths(config);
975
990
 
976
991
  // Step 6: Create .claude/ directory with symlinks
977
992
  await createClaudeDirectory();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaguilar87/gaia-ops",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "Multi-agent orchestration system for Claude Code - DevOps automation toolkit",
5
5
  "main": "index.js",
6
6
  "type": "module",