-
Notifications
You must be signed in to change notification settings - Fork 0
User Profile & Target Criteria
Relevant source files
- src-tauri/src/community.rs
- src-tauri/src/pipeline/filter.rs
- src-tauri/src/pipeline/mod.rs
- src-tauri/src/profile.rs
The Profile subsystem is the "North Star" of the Lodestar application. It encapsulates the user's professional identity, career history, and specific job-seeking preferences. This data is stored entirely within the profile/ directory of the Obsidian vault as Markdown files and is consumed by the pipeline to perform high-recall filtering and high-precision fit scoring.
The profile system serves two primary functions:
- Identity & Context: Providing a rich dataset of accomplishments, experience, and community involvement to the LLM for qualitative alignment analysis.
- Targeting & Scoring: Defining the "ideal" role through quantitative criteria (salary floors, levels, locations) and weights that drive the automated scoring engine.
The following diagram illustrates how profile data flows from the vault into the core logic of the application.
Profile Data Flow
flowchart LR
subgraph Consumers
Filter["pipeline/filter.rs"]
Scoring["fit.rs (Scoring Engine)"]
LLM["prompts.rs (Alignment)"]
end
subgraph subGraph1 ["Rust Entities (src-tauri/src/profile.rs)"]
TargetCriteria["struct TargetCriteria"]
Accomplishment["struct Accomplishment"]
Experience["struct Experience"]
Community["struct Community"]
end
subgraph subGraph0 ["Vault (profile/)"]
TC["target_criteria.md"]
ACC["accomplishments/*.md"]
EXP["experience/*.md"]
POS["positioning.md"]
COMM["community/*.md"]
end
TC --> TargetCriteria
ACC --> Accomplishment
EXP --> Experience
POS --> LLM
COMM --> Community
TargetCriteria --> Filter
TargetCriteria --> Scoring
Accomplishment --> LLM
Experience --> LLM
Sources: src-tauri/src/profile.rs#1-172src-tauri/src/pipeline/filter.rs#1-43
The user's professional background is distributed across several sub-directories. The system uses a standard pattern of reading all non-template Markdown files in a directory, splitting the YAML frontmatter from the body, and stripping wikilinks from tags.
- Accomplishments: Short notes in
profile/accomplishments/that map specific achievements tocompetencyslugs. - Experience: Chronological work history in
profile/experience/. The system calculatestotal_months_experienceto drive seniority scoring. - Community: Volunteer and community roles in
profile/community/used to provide a holistic view of the candidate. - Positioning: A narrative "elevator pitch" in
profile/positioning.md.
For details on parsing and the experience envelope calculation, see Profile Data: Accomplishments, Experience & Community.
Sources: src-tauri/src/profile.rs#125-161src-tauri/src/community.rs#1-49
The target_criteria.md file defines the boundaries of the job search. It is parsed into the TargetCriteria struct src-tauri/src/profile.rs#37-56
| Field | Purpose |
|---|---|
match_titles |
A list of keywords used by the prefilter to identify relevant jobs during scraping src-tauri/src/pipeline/filter.rs#19-23
|
comp_floor |
The absolute minimum salary required; used as a "dealbreaker" in scoring. |
fit_weights |
A set of five integers summing to 100 that prioritize different dimensions of a role src-tauri/src/profile.rs#15-22 |
The FitWeights struct allows users to tune the engine. For example, a user focused on salary over tech stack would increase the comp weight and decrease the skills weight.
For details on targeting fields and weight distribution, see Target Criteria & Fit Weights.
Sources: src-tauri/src/profile.rs#15-56src-tauri/src/pipeline/filter.rs#31-43
The Fit Scoring Engine is the primary consumer of TargetCriteria. It transforms a raw Job entity into a FitBreakdown by comparing the job's attributes against the user's profile.
Scoring Logic Bridge
flowchart LR
Final["Weighted Total (0-100)"]
subgraph subGraph1 ["Scoring Dimensions"]
S["Seniority Score"]
SK["Skills Score"]
C["Comp Score"]
A["Arrangement Score"]
D["Domain Score"]
end
subgraph subGraph0 ["Code Entities"]
TC["TargetCriteria (profile.rs)"]
J["Job (job.rs)"]
FE["score_fit (fit.rs)"]
end
TC --> FE
J --> FE
FE --> S
FE --> SK
FE --> C
FE --> A
FE --> D
S --> Final
SK --> Final
C --> Final
A --> Final
D --> Final
The engine employs a "dealbreaker collapse" mechanism: if a job fails a hard filter (e.g., salary below comp_floor), the entire score collapses to zero, regardless of other strengths.
For details on the two-track seniority model and the scoring algorithms, see Fit Scoring Engine.
Sources: src-tauri/src/profile.rs#15-34src-tauri/src/pipeline/filter.rs#1-5