Minotaur Changes Needed to Support Golem

Advanced Compiler-Compiler Platform

Minotaur Changes Needed to Support Golem

This document specifies the exact changes needed in Minotaur to resolve the remaining 67 compilation errors in Golem without removing any Golem functionality.

Executive Summary

After integrating Minotaur and fixing 127 errors in Golem, 67 errors remain. All can be resolved by making targeted additions to Minotaur. No Golem functionality needs to be removed.

Total Minotaur additions needed:


1. Missing Interface Methods (25 errors) - HIGH PRIORITY

IRemoteGSSMCoordinator Interface

Add these methods:

Task<SynchronizationResult> SynchronizeStateAsync(SynchronizationRequest request, CancellationToken cancellationToken = default);
Task ShareLearningAsync(LearningData learningData, CancellationToken cancellationToken = default);
Task<LearningQueryResult> QueryLearningAsync(LearningQuery query, CancellationToken cancellationToken = default);

Rationale: Golem’s distributed coordination requires state synchronization and distributed learning capabilities.

Files affected in Golem:

Estimated effort: 4 hours (interface definition + implementation)


IGSSMEngineExtended Interface

Add this method:

Task<ValidationResult> ValidateAndIntegrateAsync(
    GSSMState currentState,
    TransformationResult transformationResult,
    ValidationContext context,
    CancellationToken cancellationToken = default
);

Rationale: Golem needs to validate transformation results before integrating them into state.

Files affected in Golem:

Estimated effort: 2 hours


IGSSMEngine Interface

Add overload for ProcessTransformationAsync:

// Existing 4-parameter version
Task<TransformationResult> ProcessTransformationAsync(
    GSSMState currentState,
    GSSMInput input,
    TransformationContext context,
    CancellationToken cancellationToken = default
);

// NEW: Add 5-parameter version with requirements
Task<TransformationResult> ProcessTransformationAsync(
    GSSMState currentState,
    GSSMInput input,
    TransformationRequirements requirements,  // NEW parameter
    TransformationContext context,
    CancellationToken cancellationToken = default
);

Rationale: Golem’s distributed processing needs to specify transformation requirements separately.

Files affected in Golem:

Estimated effort: 3 hours


2. Missing Types/Classes (10 errors) - HIGH PRIORITY

SynchronizationRequest Class

namespace Minotaur.Distributed
{
    public class SynchronizationRequest
    {
        public required string SourceEngineId { get; init; }
        public required string TargetEngineId { get; init; }
        public required GSSMState State { get; init; }
        public required SynchronizationStrategy Strategy { get; init; }
        public DateTime Timestamp { get; init; } = DateTime.UtcNow;
        public Dictionary<string, object>? Metadata { get; init; }
    }
    
    public enum SynchronizationStrategy
    {
        Full,
        Incremental,
        Selective
    }
}

Usage in Golem: Remote engine coordination and state distribution Files affected: RemoteGSSMCoordinator.cs (3 errors) Estimated effort: 1 hour


QualityMetrics Class

namespace Minotaur.Analysis
{
    public class QualityMetrics
    {
        public required double Accuracy { get; init; }
        public required double Precision { get; init; }
        public required double Recall { get; init; }
        public required double F1Score { get; init; }
        public double? Confidence { get; init; }
        public Dictionary<string, double>? CustomMetrics { get; init; }
    }
}

Usage in Golem: Transformation quality assessment Files affected: DistributedGSSMEngine.cs, PersistentGSSMEngine.cs (2 errors) Estimated effort: 1 hour


EstimatedResources Class

namespace Minotaur.Distributed
{
    public class EstimatedResources
    {
        public required TimeSpan EstimatedDuration { get; init; }
        public required int RequiredMemoryMB { get; init; }
        public required double RequiredCPUCores { get; init; }
        public int? RequiredGPUs { get; init; }
        public Dictionary<string, object>? AdditionalRequirements { get; init; }
    }
}

Usage in Golem: Resource planning for distributed execution Files affected: DistributedGSSMEngine.cs (2 errors) Estimated effort: 1 hour


ResourceUtilization Class

namespace Minotaur.Monitoring
{
    public class ResourceUtilization
    {
        public required double CPUUsagePercent { get; init; }
        public required long MemoryUsedBytes { get; init; }
        public required long MemoryTotalBytes { get; init; }
        public double? GPUUsagePercent { get; init; }
        public Dictionary<string, double>? CustomMetrics { get; init; }
        public DateTime Timestamp { get; init; } = DateTime.UtcNow;
    }
}

Usage in Golem: Engine health monitoring Files affected: DistributedGSSMEngine.cs (1 error) Estimated effort: 1 hour


LearningData and LearningQuery Classes

namespace Minotaur.Learning
{
    public class LearningData
    {
        public required string SourceEngineId { get; init; }
        public required GSSMState StateSnapshot { get; init; }
        public required List<TransformationResult> SuccessfulTransformations { get; init; }
        public required PerformanceMetrics Performance { get; init; }
        public DateTime Timestamp { get; init; } = DateTime.UtcNow;
    }
    
    public class LearningQuery
    {
        public string? EngineId { get; init; }
        public DateTime? FromTimestamp { get; init; }
        public DateTime? ToTimestamp { get; init; }
        public List<string>? TransformationTypes { get; init; }
    }
    
    public class LearningQueryResult
    {
        public required List<LearningData> Results { get; init; }
        public required int TotalCount { get; init; }
        public bool HasMore { get; init; }
    }
}

Usage in Golem: Distributed learning and knowledge sharing Files affected: RemoteGSSMCoordinator.cs (2 errors) Estimated effort: 2 hours


3. Missing Properties (15 errors) - MEDIUM PRIORITY

ValidationResult Class - Add Properties

namespace Minotaur.Validation
{
    public record ValidationResult
    {
        // Existing properties
        public required string Message { get; init; }
        public required ValidationSeverity Severity { get; init; }
        public SourcePosition? Location { get; init; }
        
        // ADD THESE:
        public string? Code { get; init; }  // Error/warning code
        public Dictionary<string, string>? Context { get; init; }  // Additional context
    }
}

Rationale: Golem uses structured error codes and contextual information for better diagnostics. Files affected: GSSMEngineExtensions.cs, MinotaurConstraintValidator.cs (3 errors) Estimated effort: 30 minutes


EngineCapabilities Class - Add Properties

namespace Minotaur.Core
{
    public record EngineCapabilities
    {
        // Existing
        public required List<string> SupportedLanguages { get; init; }
        public required List<TransformationType> SupportedTransformations { get; init; }
        
        // ADD THESE:
        public int MaxConcurrentTransformations { get; init; } = 10;
        public List<string> Features { get; init; } = new();
        public Dictionary<string, object> CustomCapabilities { get; init; } = new();
    }
}

Rationale: Golem needs to know engine limits and available features for work distribution. Files affected: DistributedGSSMEngine.cs, GSSMEngine.cs (4 errors) Estimated effort: 30 minutes


DistributionStrategy Class - Add Property

namespace Minotaur.Distributed
{
    public record DistributionStrategy
    {
        // Existing
        public required ProcessingMode Mode { get; init; }
        public required ConsistencyLevel RequiredConsistency { get; init; }
        
        // ADD THIS:
        public PartitionStrategy PartitionStrategy { get; init; } = PartitionStrategy.Hash;
    }
    
    // ADD THIS ENUM:
    public enum PartitionStrategy
    {
        None,
        Hash,
        Range,
        Consistent,
        Custom
    }
}

Rationale: Golem’s distributed processing needs to specify how work is partitioned across engines. Files affected: DistributedGSSMEngine.cs (2 errors) Estimated effort: 1 hour


PerformanceMetrics Class - Add Properties

namespace Minotaur.Monitoring
{
    public record PerformanceMetrics
    {
        // Existing
        public required double AverageResponseTime { get; init; }
        public required double ThroughputPerSecond { get; init; }
        
        // ADD THESE (or rename existing):
        public TimeSpan AverageProcessingTime { get; init; }  // Alias or additional
        public double ThroughputPerMinute { get; init; }  // Calculated from ThroughputPerSecond * 60
    }
}

Rationale: Golem code uses these specific metric names - either add them or document the naming convention. Files affected: DistributedGSSMEngine.cs (2 errors) Estimated effort: 30 minutes


RemoteEngine Class - Add Property

namespace Minotaur.Distributed
{
    public record RemoteEngine
    {
        // Existing properties
        public required string Id { get; init; }
        public required EngineStatus Status { get; init; }
        
        // ADD THIS:
        public bool IsAvailable => Status == EngineStatus.Online && !IsOverloaded;
        private bool IsOverloaded { get; init; }  // Or calculate from metrics
    }
}

Rationale: Golem needs simple availability check for engine selection. Files affected: DistributedGSSMEngine.cs (1 error) Estimated effort: 15 minutes


EngineHealthReport Class - Add Property

namespace Minotaur.Monitoring
{
    public record EngineHealthReport
    {
        // Existing properties
        // ...
        
        // ADD THIS:
        public int AvailableEngines { get; init; }  // Count of engines in Online status
    }
}

Rationale: Golem dashboard needs count of available engines. Files affected: DistributedGSSMEngine.cs (1 error) Estimated effort: 15 minutes


4. Missing Enum Values (5 errors) - LOW PRIORITY

TransitionType Enum - Add Value

namespace Minotaur.Core
{
    public enum TransitionType
    {
        // Existing values
        StateChange,
        Input,
        Output,
        
        // ADD THIS:
        Transformation  // Represents a transformation step in the GSSM
    }
}

Rationale: Golem tracks transformation-specific transitions. Files affected: PersistentGSSMEngine.cs (1 error) Estimated effort: 5 minutes


Document Enum Mappings

EngineState enum:

EngineStatus enum:

Rationale: Golem code uses these terms - either add them or provide clear documentation. Files affected: DistributedGSSMEngine.cs (2 errors) Estimated effort: 30 minutes (documentation or enum updates)


5. Method Signature Compatibility (12 errors) - MEDIUM PRIORITY

Add String Overloads Where Enum Expected

Several Minotaur methods accept enums but Golem passes strings. Add overloads:

// Example: TransformationStepType parameter
public IStepExecutor GetStepExecutor(TransformationStepType stepType);

// ADD overload:
public IStepExecutor GetStepExecutor(string stepType) 
    => GetStepExecutor(Enum.Parse<TransformationStepType>(stepType));

Apply to:

Rationale: Golem uses string-based dispatch in some places for flexibility. Files affected: GSSMEngine.cs, DistributedGSSMEngine.cs (5 errors) Estimated effort: 2 hours


Add Array Overloads Where List Expected

// Example: SupportedLanguages parameter
public void Initialize(List<string> supportedLanguages);

// ADD overload:
public void Initialize(string[] supportedLanguages) 
    => Initialize(supportedLanguages.ToList());

Rationale: Golem uses arrays in some configurations. Files affected: GSSMEngine.cs (2 errors) Estimated effort: 1 hour


Type Conversion Helpers

Add extension methods or converters for common type conversions:

namespace Minotaur.Extensions
{
    public static class TypeConversionExtensions
    {
        public static GSSMState ToGSSMState(this PersistentGSSMState persistentState);
        public static RemoteEngineInfo ToRemoteEngineInfo(this RemoteEngine engine);
        public static ProcessingMode ToProcessingMode(this DistributionMode distributionMode);
    }
}

Rationale: Golem has types in different namespaces that need conversion. Files affected: Multiple (5 errors) Estimated effort: 3 hours


6. Implementation Priority

Critical (Must have for Golem to build) - ~20 hours

  1. Missing interface methods (25 errors) - 9 hours
  2. Missing types (10 errors) - 7 hours
  3. Method signature compatibility (12 errors) - 6 hours

High (Needed for full functionality) - ~4 hours

  1. Missing properties (15 errors) - 3 hours
  2. Missing enum values (5 errors) - 1 hour

Total Estimated Effort: ~24 hours (3 days)


7. Implementation Plan

Phase 1: Core Types (8 hours)

Phase 2: Interface Methods (9 hours)

Phase 3: Properties & Enums (4 hours)

Phase 4: Method Overloads & Helpers (3 hours)


8. Validation

After implementing these changes in Minotaur:

  1. Build Golem - Should have 0 compilation errors
  2. Run Golem tests - Verify functionality
  3. Integration testing - Test Golem + Minotaur together
  4. Document - Update Minotaur API documentation with new additions

9. Benefits


10. Questions for Review

  1. Naming conventions: Do the proposed property/method names align with Minotaur’s naming standards?
  2. Namespace organization: Are the proposed namespaces (Minotaur.Distributed, Minotaur.Learning, etc.) appropriate?
  3. Feature completeness: Are there related features that should be added at the same time?
  4. API design: Any concerns about the proposed method signatures or property types?

Summary

All 67 remaining errors can be resolved by making targeted additions to Minotaur. No Golem functionality needs to be removed. The changes are straightforward and align with Golem’s distributed processing, learning, and monitoring requirements.

Recommended action: Implement changes in Minotaur following the priority order above. Estimated 24 hours of development time to fully resolve all errors.