285 lines
6.6 KiB
Go
285 lines
6.6 KiB
Go
package alignment
|
|
|
|
import "time"
|
|
|
|
// GoalStatistics summarizes goal management metrics.
|
|
type GoalStatistics struct {
|
|
TotalGoals int
|
|
ActiveGoals int
|
|
Completed int
|
|
Archived int
|
|
LastUpdated time.Time
|
|
}
|
|
|
|
// AlignmentGapAnalysis captures detected misalignments that require follow-up.
|
|
type AlignmentGapAnalysis struct {
|
|
Address string
|
|
Severity string
|
|
Findings []string
|
|
DetectedAt time.Time
|
|
}
|
|
|
|
// AlignmentComparison provides a simple comparison view between two contexts.
|
|
type AlignmentComparison struct {
|
|
PrimaryScore float64
|
|
SecondaryScore float64
|
|
Differences []string
|
|
}
|
|
|
|
// AlignmentStatistics aggregates assessment metrics across contexts.
|
|
type AlignmentStatistics struct {
|
|
TotalAssessments int
|
|
AverageScore float64
|
|
SuccessRate float64
|
|
FailureRate float64
|
|
LastUpdated time.Time
|
|
}
|
|
|
|
// ProgressHistory captures historical progress samples for a goal.
|
|
type ProgressHistory struct {
|
|
GoalID string
|
|
Samples []ProgressSample
|
|
}
|
|
|
|
// ProgressSample represents a single progress measurement.
|
|
type ProgressSample struct {
|
|
Timestamp time.Time
|
|
Percentage float64
|
|
}
|
|
|
|
// CompletionPrediction represents a simple completion forecast for a goal.
|
|
type CompletionPrediction struct {
|
|
GoalID string
|
|
EstimatedFinish time.Time
|
|
Confidence float64
|
|
}
|
|
|
|
// ProgressStatistics aggregates goal progress metrics.
|
|
type ProgressStatistics struct {
|
|
AverageCompletion float64
|
|
OpenGoals int
|
|
OnTrackGoals int
|
|
AtRiskGoals int
|
|
}
|
|
|
|
// DriftHistory tracks historical drift events.
|
|
type DriftHistory struct {
|
|
Address string
|
|
Events []DriftEvent
|
|
}
|
|
|
|
// DriftEvent captures a single drift occurrence.
|
|
type DriftEvent struct {
|
|
Timestamp time.Time
|
|
Severity DriftSeverity
|
|
Details string
|
|
}
|
|
|
|
// DriftThresholds defines sensitivity thresholds for drift detection.
|
|
type DriftThresholds struct {
|
|
SeverityThreshold DriftSeverity
|
|
ScoreDelta float64
|
|
ObservationWindow time.Duration
|
|
}
|
|
|
|
// DriftPatternAnalysis summarizes detected drift patterns.
|
|
type DriftPatternAnalysis struct {
|
|
Patterns []string
|
|
Summary string
|
|
}
|
|
|
|
// DriftPrediction provides a lightweight stub for future drift forecasting.
|
|
type DriftPrediction struct {
|
|
Address string
|
|
Horizon time.Duration
|
|
Severity DriftSeverity
|
|
Confidence float64
|
|
}
|
|
|
|
// DriftAlert represents an alert emitted when drift exceeds thresholds.
|
|
type DriftAlert struct {
|
|
ID string
|
|
Address string
|
|
Severity DriftSeverity
|
|
CreatedAt time.Time
|
|
Message string
|
|
}
|
|
|
|
// GoalRecommendation summarises next actions for a specific goal.
|
|
type GoalRecommendation struct {
|
|
GoalID string
|
|
Title string
|
|
Description string
|
|
Priority int
|
|
}
|
|
|
|
// StrategicRecommendation captures higher-level alignment guidance.
|
|
type StrategicRecommendation struct {
|
|
Theme string
|
|
Summary string
|
|
Impact string
|
|
RecommendedBy string
|
|
}
|
|
|
|
// PrioritizedRecommendation wraps a recommendation with ranking metadata.
|
|
type PrioritizedRecommendation struct {
|
|
Recommendation *AlignmentRecommendation
|
|
Score float64
|
|
Rank int
|
|
}
|
|
|
|
// RecommendationHistory tracks lifecycle updates for a recommendation.
|
|
type RecommendationHistory struct {
|
|
RecommendationID string
|
|
Entries []RecommendationHistoryEntry
|
|
}
|
|
|
|
// RecommendationHistoryEntry represents a single change entry.
|
|
type RecommendationHistoryEntry struct {
|
|
Timestamp time.Time
|
|
Status ImplementationStatus
|
|
Notes string
|
|
}
|
|
|
|
// ImplementationStatus reflects execution state for recommendations.
|
|
type ImplementationStatus string
|
|
|
|
const (
|
|
ImplementationPending ImplementationStatus = "pending"
|
|
ImplementationActive ImplementationStatus = "active"
|
|
ImplementationBlocked ImplementationStatus = "blocked"
|
|
ImplementationDone ImplementationStatus = "completed"
|
|
)
|
|
|
|
// RecommendationEffectiveness offers coarse metrics on outcome quality.
|
|
type RecommendationEffectiveness struct {
|
|
SuccessRate float64
|
|
AverageTime time.Duration
|
|
Feedback []string
|
|
}
|
|
|
|
// RecommendationStatistics aggregates recommendation issuance metrics.
|
|
type RecommendationStatistics struct {
|
|
TotalCreated int
|
|
TotalCompleted int
|
|
AveragePriority float64
|
|
LastUpdated time.Time
|
|
}
|
|
|
|
// AlignmentMetrics is a lightweight placeholder exported for engine integration.
|
|
type AlignmentMetrics struct {
|
|
Assessments int
|
|
SuccessRate float64
|
|
FailureRate float64
|
|
AverageScore float64
|
|
}
|
|
|
|
// GoalMetrics is a stub summarising per-goal metrics.
|
|
type GoalMetrics struct {
|
|
GoalID string
|
|
AverageScore float64
|
|
SuccessRate float64
|
|
LastUpdated time.Time
|
|
}
|
|
|
|
// ProgressMetrics is a stub capturing aggregate progress data.
|
|
type ProgressMetrics struct {
|
|
OverallCompletion float64
|
|
ActiveGoals int
|
|
CompletedGoals int
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
// MetricsTrends wraps high-level trend information.
|
|
type MetricsTrends struct {
|
|
Metric string
|
|
TrendLine []float64
|
|
Timestamp time.Time
|
|
}
|
|
|
|
// MetricsReport represents a generated metrics report placeholder.
|
|
type MetricsReport struct {
|
|
ID string
|
|
Generated time.Time
|
|
Summary string
|
|
}
|
|
|
|
// MetricsConfiguration reflects configuration for metrics collection.
|
|
type MetricsConfiguration struct {
|
|
Enabled bool
|
|
Interval time.Duration
|
|
}
|
|
|
|
// SyncResult summarises a synchronisation run.
|
|
type SyncResult struct {
|
|
SyncedItems int
|
|
Errors []string
|
|
}
|
|
|
|
// ImportResult summarises the outcome of an import operation.
|
|
type ImportResult struct {
|
|
Imported int
|
|
Skipped int
|
|
Errors []string
|
|
}
|
|
|
|
// SyncSettings captures synchronisation preferences.
|
|
type SyncSettings struct {
|
|
Enabled bool
|
|
Interval time.Duration
|
|
}
|
|
|
|
// SyncStatus provides health information about sync processes.
|
|
type SyncStatus struct {
|
|
LastSync time.Time
|
|
Healthy bool
|
|
Message string
|
|
}
|
|
|
|
// AssessmentValidation provides validation results for assessments.
|
|
type AssessmentValidation struct {
|
|
Valid bool
|
|
Issues []string
|
|
CheckedAt time.Time
|
|
}
|
|
|
|
// ConfigurationValidation summarises configuration validation status.
|
|
type ConfigurationValidation struct {
|
|
Valid bool
|
|
Messages []string
|
|
}
|
|
|
|
// WeightsValidation describes validation for weighting schemes.
|
|
type WeightsValidation struct {
|
|
Normalized bool
|
|
Adjustments map[string]float64
|
|
}
|
|
|
|
// ConsistencyIssue represents a detected consistency issue.
|
|
type ConsistencyIssue struct {
|
|
Description string
|
|
Severity DriftSeverity
|
|
DetectedAt time.Time
|
|
}
|
|
|
|
// AlignmentHealthCheck is a stub for health check outputs.
|
|
type AlignmentHealthCheck struct {
|
|
Status string
|
|
Details string
|
|
CheckedAt time.Time
|
|
}
|
|
|
|
// NotificationRules captures notification configuration stubs.
|
|
type NotificationRules struct {
|
|
Enabled bool
|
|
Channels []string
|
|
}
|
|
|
|
// NotificationRecord represents a delivered notification.
|
|
type NotificationRecord struct {
|
|
ID string
|
|
Timestamp time.Time
|
|
Recipient string
|
|
Status string
|
|
}
|