persona-community-1/pkg/persona/background.go
jordan 4004f88f4a
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/manual/woodpecker Pipeline was successful
Initialize project from skeleton template
2026-02-23 10:20:59 +00:00

157 lines
5.0 KiB
Go

package persona
// Background contains the character's backstory and life history.
type Background struct {
// Childhood describes early life experiences
Childhood *Childhood `json:"childhood,omitempty" yaml:"childhood,omitempty"`
// Education describes educational background
Education *Education `json:"education,omitempty" yaml:"education,omitempty"`
// Career describes professional history
Career *Career `json:"career,omitempty" yaml:"career,omitempty"`
// Relationships describes significant relationships
Relationships []Relationship `json:"relationships,omitempty" yaml:"relationships,omitempty"`
// Hobbies describes leisure activities and interests
Hobbies []string `json:"hobbies,omitempty" yaml:"hobbies,omitempty"`
// LifeEvents describes significant life events
LifeEvents []LifeEvent `json:"life_events,omitempty" yaml:"life_events,omitempty"`
}
// Childhood describes early life experiences.
type Childhood struct {
// Location where the character grew up
Location string `json:"location,omitempty" yaml:"location,omitempty"`
// FamilyStructure describes the family setup
FamilyStructure string `json:"family_structure,omitempty" yaml:"family_structure,omitempty"`
// SocioeconomicStatus describes the economic background
SocioeconomicStatus string `json:"socioeconomic_status,omitempty" yaml:"socioeconomic_status,omitempty"`
// KeyExperiences formative experiences
KeyExperiences []string `json:"key_experiences,omitempty" yaml:"key_experiences,omitempty"`
// Challenges difficulties faced
Challenges []string `json:"challenges,omitempty" yaml:"challenges,omitempty"`
// Strengths developed positive traits
Strengths []string `json:"strengths,omitempty" yaml:"strengths,omitempty"`
}
// Education describes educational background.
type Education struct {
// HighestLevel achieved education level
HighestLevel string `json:"highest_level,omitempty" yaml:"highest_level,omitempty"`
// Field of study or major
Field string `json:"field,omitempty" yaml:"field,omitempty"`
// Institutions attended schools/universities
Institutions []string `json:"institutions,omitempty" yaml:"institutions,omitempty"`
// Achievements notable academic achievements
Achievements []string `json:"achievements,omitempty" yaml:"achievements,omitempty"`
// Skills skills gained through education
Skills []string `json:"skills,omitempty" yaml:"skills,omitempty"`
}
// Career describes professional history.
type Career struct {
// CurrentRole current job title
CurrentRole string `json:"current_role,omitempty" yaml:"current_role,omitempty"`
// Industry current industry
Industry string `json:"industry,omitempty" yaml:"industry,omitempty"`
// YearsExperience years in career
YearsExperience int `json:"years_experience,omitempty" yaml:"years_experience,omitempty"`
// PreviousRoles past positions
PreviousRoles []string `json:"previous_roles,omitempty" yaml:"previous_roles,omitempty"`
// Achievements notable career achievements
Achievements []string `json:"achievements,omitempty" yaml:"achievements,omitempty"`
// Skills professional skills
Skills []string `json:"skills,omitempty" yaml:"skills,omitempty"`
// Ambitions career goals
Ambitions []string `json:"ambitions,omitempty" yaml:"ambitions,omitempty"`
}
// Relationship describes a significant relationship.
type Relationship struct {
// Type of relationship (family, friend, romantic, professional)
Type string `json:"type" yaml:"type"`
// Description of the relationship
Description string `json:"description,omitempty" yaml:"description,omitempty"`
// Status current status (active, estranged, etc.)
Status string `json:"status,omitempty" yaml:"status,omitempty"`
// Impact how this relationship affects the character
Impact string `json:"impact,omitempty" yaml:"impact,omitempty"`
}
// LifeEvent describes a significant life event.
type LifeEvent struct {
// Age when the event occurred
Age int `json:"age,omitempty" yaml:"age,omitempty"`
// Type of event (milestone, challenge, achievement, loss)
Type string `json:"type,omitempty" yaml:"type,omitempty"`
// Description of the event
Description string `json:"description" yaml:"description"`
// Impact how this event shaped the character
Impact string `json:"impact,omitempty" yaml:"impact,omitempty"`
}
// ValidRelationshipTypes are the valid relationship type values.
var ValidRelationshipTypes = []string{
"family",
"friend",
"romantic",
"professional",
"mentor",
"mentee",
}
// ValidLifeEventTypes are the valid life event type values.
var ValidLifeEventTypes = []string{
"milestone",
"challenge",
"achievement",
"loss",
"transition",
"discovery",
}
// ValidEducationLevels are the valid education level values.
var ValidEducationLevels = []string{
"high_school",
"some_college",
"associates",
"bachelors",
"masters",
"doctorate",
"professional",
"self_taught",
}
// ValidSocioeconomicStatuses are the valid socioeconomic status values.
var ValidSocioeconomicStatuses = []string{
"lower",
"lower_middle",
"middle",
"upper_middle",
"upper",
}