Documentation
¶
Index ¶
- Constants
- Variables
- func IsNewer(current, latest string) bool
- func ValidateSectionMap(s *SectionMap) error
- type AccomplishmentsJSON
- type ApplicationOutcome
- type ApplicationRecord
- type AssembleInput
- type AssembleStory
- type AwardEntry
- type BulletChange
- type CertificationEntry
- type ChatMessage
- type ChatOptions
- type CompiledProfile
- type ContactInfo
- type CreatedStory
- type EducationEntry
- type ExperienceEntry
- type ExperienceRef
- type InterestEntry
- type JDData
- type KeywordResult
- type KeywordSurvival
- type LanguageEntry
- type OnboardInput
- type OnboardResult
- type OnboardSummary
- type OpenSourceEntry
- type OrphanedSkill
- type PatentEntry
- type ProfileEmbedding
- type ProjectEntry
- type PublicationEntry
- type ReferenceData
- type ReferenceEntry
- type ReferenceGap
- type ResumeChanges
- type ResumeEntry
- type ResumeFile
- type ResumeRecord
- type RiskWarning
- type SchemaError
- type ScoreBreakdown
- type ScoreResult
- type ScorerInput
- type SectionMap
- type SeniorityLevel
- type SkillsKind
- type SkillsSection
- type SpeakingEntry
- type StepCompletedEvent
- type StepFailedEvent
- type StepStartedEvent
- type Story
- type StoryInput
- type StoryOutput
- type StoryType
- type TailorInput
- type TailorOptions
- type TailorResult
- type TailorTier
- type UpdateCache
- type UserProfile
- type VolunteerEntry
Constants ¶
const ( SeverityWarn = "warn" // non-fatal degradation; processing continues SeverityError = "error" // invalid input rejected before processing )
Warning severity levels used in RiskWarning.Severity.
const AccomplishmentsSchemaV1 = "1"
AccomplishmentsSchemaV1 is the only supported schema_version for accomplishments.json.
const CurrentSchemaVersion = 1
Variables ¶
var ( ErrSectionsMissing = errors.New("sections missing: no sections file found for this resume") ErrSchemaVersionUnsupported = errors.New("sections schema version unsupported") ErrNotSupportedInMCPMode = errors.New("operation not supported in MCP mode") // Compiled profile errors. ErrProfileMissing = errors.New("compiled profile not found — run compile_profile first") ErrProfileSchemaMismatch = errors.New("compiled profile schema version not supported") ErrUnevidencedSkill = errors.New("skill has no supporting story in compiled profile") )
Functions ¶
func IsNewer ¶ added in v0.1.4
IsNewer reports whether latest is a higher semver than current. Returns false if either version cannot be parsed or current is "dev".
func ValidateSectionMap ¶ added in v0.3.0
func ValidateSectionMap(s *SectionMap) error
ValidateSectionMap validates all invariants of s. Returns the first violation found.
Types ¶
type AccomplishmentsJSON ¶ added in v0.3.0
type AccomplishmentsJSON struct {
SchemaVersion string `json:"schema_version"`
OnboardText string `json:"onboard_text"`
CreatedStories []CreatedStory `json:"created_stories"`
}
AccomplishmentsJSON is the on-disk representation of accomplishments.json. Written by onboard_user (sets OnboardText) and create_story (appends to CreatedStories).
type ApplicationOutcome ¶
type ApplicationOutcome string
ApplicationOutcome tracks the lifecycle state of a job application.
const ( OutcomePending ApplicationOutcome = "pending" OutcomeInterview ApplicationOutcome = "interview" OutcomeOffer ApplicationOutcome = "offer" OutcomeRejected ApplicationOutcome = "rejected" OutcomeWithdrawn ApplicationOutcome = "withdrawn" )
type ApplicationRecord ¶
type ApplicationRecord struct {
// Cache identity — always populated on first fetch.
URL string `json:"url"`
RawText string `json:"raw_text"` // fetched page text; kept for rescoring without re-fetching
// Extracted JD — populated when the LLM parses the raw text.
JD JDData `json:"jd"`
// Pipeline outputs — populated progressively; omitted until each stage runs.
Score *ScoreResult `json:"score,omitempty"`
TailorResult *TailorResult `json:"tailor_result,omitempty"`
CoverLetter string `json:"cover_letter,omitempty"`
// Submission metadata — set by the user at apply time via CLI or MCP.
Applied string `json:"applied,omitempty"` // ISO date: "2026-03-20"
Channel string `json:"channel,omitempty"` // "referral", "linkedin", etc.
ResumeLabel string `json:"resume_label,omitempty"` // which resume was submitted
ResumeText string `json:"resume_text,omitempty"` // snapshot of resume at submission
Outcome ApplicationOutcome `json:"outcome,omitempty"`
}
ApplicationRecord is the persistent artifact for a single job URL. It is written progressively: the cache layer sets URL+RawText+JD first; Score, TailorResult, and CoverLetter are added as each pipeline stage runs; submission metadata is set by the user at apply time.
This is the source of truth for batch rescoring — RawText is kept so old listings can be re-processed without re-fetching.
type AssembleInput ¶ added in v0.3.0
type AssembleInput struct {
Skills []string // additive: unioned with prior skills
RemoveSkills []string // explicit removals from prior skills
Stories []AssembleStory // host-tagged stories
PriorProfile *CompiledProfile // nil on first compile; required for ID resolution
}
AssembleInput is the host-provided input to ProfileCompiler.Compile. Skills are additive (union with prior); RemoveSkills explicitly removes.
type AssembleStory ¶ added in v0.3.0
type AssembleStory struct {
ID string `json:"id,omitempty"`
Accomplishment string `json:"accomplishment,omitempty"`
Tags []string `json:"tags"`
Source string `json:"source,omitempty"`
}
AssembleStory is one entry in AssembleInput.Stories. Exactly one of ID or Accomplishment must be set. ID references a story from the prior profile; Accomplishment is new story text. Source is supplied by the host: "onboard" for stories drawn from onboard_text, or the created_stories[].id string for created stories; empty means unknown.
type AwardEntry ¶ added in v0.3.0
type AwardEntry struct {
Title string `json:"title"`
Date string `json:"date,omitempty"`
Details string `json:"details,omitempty"`
}
AwardEntry
type BulletChange ¶
type CertificationEntry ¶ added in v0.3.0
type CertificationEntry struct {
Name string `json:"name"`
Issuer string `json:"issuer,omitempty"`
Date string `json:"date,omitempty"`
}
CertificationEntry
type ChatMessage ¶
ChatMessage is a single turn in an LLM conversation.
type ChatOptions ¶
ChatOptions controls LLM generation parameters for a single call.
type CompiledProfile ¶ added in v0.3.0
type CompiledProfile struct {
SchemaVersion string `json:"schema_version"`
Skills []string `json:"skills"`
CompiledAt time.Time `json:"compiled_at"`
Stories []Story `json:"stories"`
OrphanedSkills []OrphanedSkill `json:"orphaned_skills"`
}
CompiledProfile is the derived artifact produced by compilation. Written to ~/.local/share/go-apply/profile-compiled.json. Never hand-edited.
type ContactInfo ¶ added in v0.3.0
type ContactInfo struct {
Name string `json:"name"`
Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"`
Location string `json:"location,omitempty"`
Links []string `json:"links,omitempty"`
}
ContactInfo
type CreatedStory ¶ added in v0.3.0
type CreatedStory struct {
ID string `json:"id"`
Skill string `json:"skill"`
Type StoryType `json:"type"`
JobTitle string `json:"job_title"`
Text string `json:"text"`
}
CreatedStory is a single entry in AccomplishmentsJSON.CreatedStories.
type EducationEntry ¶ added in v0.3.0
type EducationEntry struct {
School string `json:"school"`
Degree string `json:"degree"`
StartDate string `json:"start_date,omitempty"`
EndDate string `json:"end_date,omitempty"`
Location string `json:"location,omitempty"`
Details string `json:"details,omitempty"`
}
EducationEntry
type ExperienceEntry ¶ added in v0.3.0
type ExperienceEntry struct {
Company string `json:"company"`
Role string `json:"role"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date,omitempty"`
Location string `json:"location,omitempty"`
Bullets []string `json:"bullets"`
}
ExperienceEntry
func (*ExperienceEntry) BulletID ¶ added in v0.3.0
func (e *ExperienceEntry) BulletID(entryIndex, bulletIndex int) string
BulletID returns "exp-<entryIndex>-b<bulletIndex>"
func (*ExperienceEntry) ID ¶ added in v0.3.0
func (e *ExperienceEntry) ID(i int) string
ID returns the bullet ID prefix for this entry at index i: "exp-<i>"
type ExperienceRef ¶ added in v0.3.0
type ExperienceRef struct {
Role string `json:"role"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
}
ExperienceRef is a lightweight career record used by the story creator to classify stories by job title without touching resume sections files.
type InterestEntry ¶ added in v0.3.0
type InterestEntry struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
}
type JDData ¶
type JDData struct {
Title string `json:"title"`
Company string `json:"company"`
Required []string `json:"required"`
Preferred []string `json:"preferred"`
Location string `json:"location"`
Seniority SeniorityLevel `json:"seniority"`
RequiredYears float64 `json:"required_years"`
Team string `json:"team,omitempty"`
KeyResponsibilities []string `json:"key_responsibilities,omitempty"`
PayRangeMin float64 `json:"pay_range_min,omitempty"`
PayRangeMax float64 `json:"pay_range_max,omitempty"`
}
type KeywordResult ¶
type KeywordSurvival ¶ added in v0.3.0
type KeywordSurvival struct {
Dropped []string `json:"dropped"`
Matched []string `json:"matched"`
TotalJDKeywords int `json:"total_jd_keywords"`
}
KeywordSurvival is the result of comparing JD keywords against PDF-extracted text.
type LanguageEntry ¶ added in v0.3.0
type OnboardInput ¶
type OnboardInput struct {
Resumes []ResumeEntry
SkillsText string
AccomplishmentsText string
}
OnboardInput groups all inputs for a single onboarding pass.
type OnboardResult ¶
type OnboardResult struct {
Stored []string `json:"stored"`
Warnings []RiskWarning `json:"warnings,omitempty"`
Summary OnboardSummary `json:"summary"`
}
OnboardResult reports what was stored and any non-fatal failures.
type OnboardSummary ¶ added in v0.2.1
type OnboardSummary struct {
ResumesAdded int `json:"resumes_added"`
SkillsCount int `json:"skills_count"`
AccomplishmentsCount int `json:"accomplishments_count"`
TotalChunks int `json:"total_chunks"`
}
OnboardSummary provides a breakdown of what was embedded during onboarding.
type OpenSourceEntry ¶ added in v0.3.0
type OrphanedSkill ¶ added in v0.3.0
OrphanedSkill is a skill label with no successfully-tagged supporting story.
type PatentEntry ¶ added in v0.3.0
type ProfileEmbedding ¶
type ProjectEntry ¶ added in v0.3.0
type ProjectEntry struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Bullets []string `json:"bullets,omitempty"`
URL string `json:"url,omitempty"`
}
ProjectEntry
type PublicationEntry ¶ added in v0.3.0
type PublicationEntry struct {
Title string `json:"title"`
Venue string `json:"venue,omitempty"`
Date string `json:"date,omitempty"`
URL string `json:"url,omitempty"`
}
PublicationEntry
type ReferenceData ¶
type ReferenceData struct {
AllSkills []string
PriorityMap map[string]ReferenceGap
}
ReferenceData carries the scorer's computed skill inventory and gap analysis, threaded through the pipeline so downstream services (tailor) can prioritise what to emphasise without re-deriving it.
type ReferenceEntry ¶ added in v0.3.0
type ReferenceGap ¶
type ReferenceGap struct {
JDSkill string `json:"jd_skill"`
RefSkill string `json:"ref_skill"`
Priority string `json:"priority"`
Label string `json:"label"`
Note string `json:"note"`
}
ReferenceGap describes a mismatch between a skill the JD requires and the closest matching skill in the user's profile. Used to decide what to emphasise or reframe in tailored output. Example: JDSkill="Kubernetes", RefSkill="Docker", Priority="high".
type ResumeChanges ¶
type ResumeChanges struct {
AddedKeywords []string
RewrittenBullets []BulletChange
}
ResumeChanges describes the mutations the tailor service applied to a resume.
type ResumeEntry ¶
ResumeEntry pairs a text-extracted resume with its label.
type ResumeFile ¶
type ResumeRecord ¶ added in v0.3.0
type ResumeRecord struct {
Label string `json:"label"`
RawText string `json:"raw_text"`
Sections *SectionMap `json:"sections,omitempty"`
}
ResumeRecord full resume as stored
type RiskWarning ¶
type SchemaError ¶ added in v0.3.0
SchemaError reports a validation failure for a specific field in the SectionMap.
func (SchemaError) Error ¶ added in v0.3.0
func (e SchemaError) Error() string
type ScoreBreakdown ¶
type ScoreBreakdown struct {
KeywordMatch float64 `json:"keyword_match"`
ExperienceFit float64 `json:"experience_fit"`
ImpactEvidence float64 `json:"impact_evidence"`
ATSFormat float64 `json:"ats_format"`
Readability float64 `json:"readability"`
}
func (ScoreBreakdown) Total ¶
func (b ScoreBreakdown) Total() float64
type ScoreResult ¶
type ScoreResult struct {
ResumeLabel string `json:"resume_label"`
ResumePath string `json:"resume_path"`
Breakdown ScoreBreakdown `json:"breakdown"`
Keywords KeywordResult `json:"keywords"`
MetricBullets []string `json:"metric_bullets"`
FillerPhrases []string `json:"filler_phrases"`
ReferenceGaps []ReferenceGap `json:"reference_gaps"`
}
type ScorerInput ¶
type ScorerInput struct {
ResumeText string
ResumeLabel string
ResumePath string
JD JDData
CandidateYears float64
RequiredYears float64
SeniorityMatch string
ReferenceData *ReferenceData
}
ScorerInput groups all inputs required to score a single resume against a JD.
type SectionMap ¶ added in v0.3.0
type SectionMap struct {
SchemaVersion int `json:"schema_version"`
Contact ContactInfo `json:"contact"`
Experience []ExperienceEntry `json:"experience"`
Summary string `json:"summary,omitempty"`
Skills *SkillsSection `json:"skills,omitempty"`
Education []EducationEntry `json:"education,omitempty"`
Projects []ProjectEntry `json:"projects,omitempty"`
Certifications []CertificationEntry `json:"certifications,omitempty"`
Awards []AwardEntry `json:"awards,omitempty"`
Volunteer []VolunteerEntry `json:"volunteer,omitempty"`
Publications []PublicationEntry `json:"publications,omitempty"`
Languages []LanguageEntry `json:"languages,omitempty" yaml:"languages,omitempty"`
Speaking []SpeakingEntry `json:"speaking,omitempty" yaml:"speaking,omitempty"`
OpenSource []OpenSourceEntry `json:"open_source,omitempty" yaml:"open_source,omitempty"`
Patents []PatentEntry `json:"patents,omitempty" yaml:"patents,omitempty"`
Interests []InterestEntry `json:"interests,omitempty" yaml:"interests,omitempty"`
References []ReferenceEntry `json:"references,omitempty" yaml:"references,omitempty"`
Order []string `json:"order,omitempty"`
}
SectionMap structured representation of a résumé
type SeniorityLevel ¶
type SeniorityLevel string
const ( SeniorityJunior SeniorityLevel = "junior" SeniorityMid SeniorityLevel = "mid" SenioritySenior SeniorityLevel = "senior" SeniorityLead SeniorityLevel = "lead" SeniorityDirector SeniorityLevel = "director" )
type SkillsKind ¶ added in v0.3.0
type SkillsKind string
SkillsKind discriminator
const ( SkillsKindFlat SkillsKind = "flat" SkillsKindCategorized SkillsKind = "categorized" )
type SkillsSection ¶ added in v0.3.0
type SkillsSection struct {
Kind SkillsKind `json:"kind"`
Flat string `json:"flat,omitempty"`
Categorized map[string][]string `json:"categorized,omitempty"`
}
SkillsSection discriminated union
type SpeakingEntry ¶ added in v0.3.0
type StepCompletedEvent ¶
type StepFailedEvent ¶
type StepStartedEvent ¶
type Story ¶ added in v0.3.0
type Story struct {
ID string `json:"id"`
SourceFile string `json:"source_file"`
Text string `json:"text"`
Skills []string `json:"skills"`
Format string `json:"format"`
Type StoryType `json:"type"`
JobTitle string `json:"job_title"`
}
Story is a canonical accomplishment entry with skill tags and classification. SourceFile is a source identifier: "onboard", a created_stories[].id string, or empty if unknown; informational only, not a join key.
type StoryInput ¶ added in v0.3.0
type StoryInput struct {
PrimarySkill string
StoryType StoryType
JobTitle string
IsNewJob bool
StartDate string // YYYY-MM or YYYY; required when IsNewJob=true
EndDate string // YYYY-MM, YYYY, or "present"; required when IsNewJob=true
Situation string
Behavior string
Impact string
}
StoryInput is the input to port.StoryCreatorService.Create.
type StoryOutput ¶ added in v0.3.0
type StoryOutput struct {
StoryID string // id of the entry written to created_stories in accomplishments.json
}
StoryOutput is returned by port.StoryCreatorService.Create.
type StoryType ¶ added in v0.3.0
type StoryType string
StoryType classifies an accomplishment story for tailoring match.
type TailorInput ¶
type TailorInput struct {
Resume ResumeFile
ResumeText string // pre-extracted by the pipeline before calling TailorResume
JD JDData
ScoreBefore ScoreResult
AccomplishmentsText string
SkillsRefText string
Options TailorOptions
}
TailorInput groups all inputs for a single tailor pass.
type TailorOptions ¶
type TailorOptions struct {
MaxTier2BulletRewrites int
}
TailorOptions carries behaviour-controlling limits for the tailor service. Values come from AppDefaults; extracted by the CLI/MCP layer before calling TailorResume.
type TailorResult ¶
type TailorResult struct {
ResumeLabel string `json:"resume_label"`
TierApplied TailorTier `json:"tier_applied"`
AddedKeywords []string `json:"added_keywords,omitempty"`
RewrittenBullets []BulletChange `json:"rewritten_bullets,omitempty"`
// BulletsAttempted is the number of keyword-matching bullets sent to the LLM
// during a tier-2 pass. When > 0 and RewrittenBullets is empty, every LLM call
// failed (vs. simply no bullets matching keywords).
BulletsAttempted int `json:"bullets_attempted,omitempty"`
OutputPath string `json:"output_path,omitempty"`
NewScore ScoreResult `json:"new_score"`
TailoredText string `json:"-"` // post-cascade text for accurate re-score delta; not serialized
Tier1Text string `json:"tier1_text,omitempty"` // output of tier-1 keyword injection, always set when T1 runs
Tier1Score *ScoreResult `json:"tier1_score,omitempty"` // score of tier-1 text; set by pipeline after TailorResume returns
}
type TailorTier ¶
type TailorTier int
const ( TierNone TailorTier = 0 TierKeyword TailorTier = 1 TierBullet TailorTier = 2 )
type UpdateCache ¶ added in v0.1.4
type UpdateCache struct {
LatestVersion string `json:"latest_version"`
CurrentVersion string `json:"current_version"`
CheckedAt time.Time `json:"checked_at"`
}
UpdateCache is the persisted state of the last update check.