Documentation
¶
Index ¶
Constants ¶
const MinContributionThreshold = 20.0
MinContributionThreshold is the minimum Impact score for a member to be counted as a "core" team member. Members below this threshold who are not in a risk state (Former/Silent/Fragile) are treated as peripheral (cross-functional helpers) and excluded from team metrics.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TeamClassification ¶
type TeamClassification struct {
Character TeamLabel // composite: team personality (derived from Structure × Culture)
Structure TeamLabel // from Role distribution: who is on the team
Culture TeamLabel // from Style distribution: how they work
Phase TeamLabel // from State distribution: lifecycle stage
Risk TeamLabel // from Health metrics: biggest concern
}
TeamClassification holds the 5-axis team-level topology.
func Classify ¶
func Classify(tr TeamResult) TeamClassification
Classify assigns 5-axis labels to a team.
type TeamHealth ¶
type TeamHealth struct {
Complementarity float64
GrowthPotential float64
Sustainability float64
DebtBalance float64
ProductivityDensity float64
QualityConsistency float64
RiskRatio float64 // percentage of risk members (0-100)
// Structure metrics
AAR float64 // Architect-to-Anchor Ratio (raw ratio, not 0-100)
AnchorDensity float64 // Anchors / Active members (0-1)
ArchitectureCoverage float64 // (Architects + Anchors) / Team size (0-1)
}
TeamHealth holds the health axis scores.
func CalcHealth ¶
func CalcHealth(tr TeamResult) TeamHealth
CalcHealth computes team health metrics from a TeamResult.
type TeamResult ¶
type TeamResult struct {
Name string
Domain string
MemberCount int // effective members (core + risk)
CoreMemberCount int // core active members (for averages)
TotalMemberCount int // all members including peripheral
RepoCount int
Members []scorer.Result // effective members (core + risk) — for classification
CoreMembers []scorer.Result // core members only — for averages/quality
// Member axis averages (0-100), computed from CoreMembers only
AvgProduction float64
AvgQuality float64
AvgSurvival float64
AvgRobustSurvival float64
AvgDormantSurvival float64
AvgDesign float64
AvgBreadth float64
AvgDebtCleanup float64
AvgIndispensability float64
AvgImpact float64
// Role/Style/State distribution counts (from effective members)
RoleDist map[string]int
StyleDist map[string]int
StateDist map[string]int
// Team health scores (0-100)
Health TeamHealth
// Team 5-axis classification (Structure/Culture/Phase/Risk + composite Character)
Classification TeamClassification
// Warnings: dangerous patterns detected from combining metrics
Warnings []string
}
TeamResult holds aggregated team-level metrics.
Members are categorized into three tiers:
- Core: RecentlyActive && Impact >= MinContributionThreshold → averages denominator
- Risk: State in {Former, Silent, Fragile} → distributions & risk metrics
- Peripheral: everyone else → TotalMemberCount only
MemberCount = core + risk ("effective"). Averages use CoreMemberCount.
func Aggregate ¶
func Aggregate(name, domain string, repoCount int, results []scorer.Result, memberFilter []string) TeamResult
Aggregate computes team-level metrics from individual results.
Members are split into three tiers:
- Core: RecentlyActive && Impact >= MinContributionThreshold
- Risk: State in {Former, Silent, Fragile} (always included for detection)
- Peripheral: everyone else (cross-functional helpers, excluded from metrics)
Averages are computed from core members only. Distributions and classification use effective members (core + risk). This prevents drive-by contributors from diluting metrics while keeping risk states visible.