File size: 1,482 Bytes
0e13326
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
export interface MetricsInput {
  deploymentFrequency: 'multiple_per_day' | 'daily' | 'weekly' | 'monthly' | 'less_than_monthly'
  leadTimeDays: number
  changeFailureRate: number        // percent (0–100)
  mttrHours: number
  pipelineDurationMinutes: number
  prReviewTimeHours: number
  engineerCount: number
  serviceCount: number
}

export interface TeamContext {
  architecture: 'monolith' | 'microservices' | 'hybrid'
  releaseStrategy: 'continuous' | 'scheduled' | 'mixed'
  hasComplianceConstraints: boolean
}

export interface InterpretationReport {
  deliveryProfile: string
  benchmarkAlignment: Array<{
    metric: string
    yourValue: string
    typicalRange: string
    band: 'elite' | 'high' | 'medium' | 'low'  // keep in sync with BandSchema in schema.ts
  }>
  likelyBottlenecks: string[]
  improvements: Array<{
    priority: number
    action: string
    rationale: string
  }>
  leadershipSummary: {
    deliverySpeed: 'strong' | 'moderate' | 'weak'
    reliability: 'strong' | 'moderate' | 'weak'
    focusArea: string
  }
}

export interface BenchmarkTier {
  elite: string
  high: string
  medium: string
  low: string
}

export interface BenchmarkPattern {
  id: string
  signature: string
  interpretation: string
  improvements: string[]
}

export interface BenchmarkData {
  deploymentFrequency: BenchmarkTier
  leadTime: BenchmarkTier
  changeFailureRate: BenchmarkTier
  mttr: BenchmarkTier
  patterns: BenchmarkPattern[]
  keyInsights: string[]
}