Per-track lookback and per-track profiles

Searcher: each track independently tracks when it was last searched
via data/track_history.json. New tracks get full lookback (90d),
existing tracks look back since their last completion. Keyword-level
crash resume preserved.

Profiles: search tracks can specify profile_overrides (inline) or
profile_path (external file) to customize resume, cover letter, and
experience per track. Filter and applier both use the track-specific
profile. Base profile.json provides shared info (name, contact, etc).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 11:20:07 -08:00
parent 9b0aa7bf77
commit c8357bb358
6 changed files with 148 additions and 46 deletions

View File

@@ -70,7 +70,7 @@ function apiHeaders(apiKey) {
* Each batch uses the system prompt for that track only — maximizes prompt caching.
* Returns array of { track, batchId, idMap, jobCount }
*/
export async function submitBatches(jobs, searchesByTrack, candidateProfile, model, apiKey) {
export async function submitBatches(jobs, searchesByTrack, profilesByTrack, model, apiKey) {
// Group jobs by track
const byTrack = {};
for (const job of jobs) {
@@ -86,7 +86,8 @@ export async function submitBatches(jobs, searchesByTrack, candidateProfile, mod
for (const [track, trackJobs] of Object.entries(byTrack)) {
const searchTrack = searchesByTrack[track];
const systemPrompt = buildSystemPrompt(searchTrack, candidateProfile);
const trackProfile = profilesByTrack[track] || profilesByTrack._base;
const systemPrompt = buildSystemPrompt(searchTrack, trackProfile);
const idMap = {};
const requests = [];