Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

feat(automation): tag discovered jobs with the resume skills their posting mentions, and raise the wiki section word cap

Khuram Niaz84ff5114fdde
diff --git a/__tests__/ats-runner.spec.ts b/__tests__/ats-runner.spec.ts
index 16dc216..d68e167 100644
--- a/__tests__/ats-runner.spec.ts
+++ b/__tests__/ats-runner.spec.ts
@@ -217,4 +217,42 @@ describe("runAutomation (lever)", () => {
expect(prompt).not.toContain("&");
expect(prompt).not.toContain("<p>");
});
+
+ it("tags a saved job with the resume skills its posting mentions", async () => {
+ (prisma.resume.findUnique as any).mockResolvedValue({
+ id: "resume1",
+ title: "My Resume",
+ ContactInfo: null,
+ ResumeSections: [
+ {
+ sectionType: "skills",
+ skills: [
+ { category: null, order: 0, Tag: { id: "tag-react", label: "React" } },
+ { category: null, order: 1, Tag: { id: "tag-rust", label: "Rust" } },
+ ],
+ },
+ ],
+ });
+ (searchLeverJobs as any).mockResolvedValue({
+ jobs: [makeJob("Frontend Engineer", "We build with React every day")],
+ errors: [],
+ });
+
+ await runAutomation(leverAutomation);
+
+ const createArg = (prisma.job.create as any).mock.calls[0][0];
+ expect(createArg.data.tags).toEqual({ connect: [{ id: "tag-react" }] });
+ });
+
+ it("omits tags when the resume has no skills section", async () => {
+ (searchLeverJobs as any).mockResolvedValue({
+ jobs: [makeJob("Frontend Engineer", "We build with React every day")],
+ errors: [],
+ });
+
+ await runAutomation(leverAutomation);
+
+ const createArg = (prisma.job.create as any).mock.calls[0][0];
+ expect("tags" in createArg.data).toBe(false);
+ });
});
diff --git a/__tests__/scraper-mapper.spec.ts b/__tests__/scraper-mapper.spec.ts
index ef4e10a..b3dfc41 100644
--- a/__tests__/scraper-mapper.spec.ts
+++ b/__tests__/scraper-mapper.spec.ts
@@ -7,6 +7,8 @@ import {
resolveJobSource,
} from "@/lib/jobs/resolve";
import type { ScrapedJobData } from "@/models/automation.model";
+import { buildSkillTerms } from "@/lib/scraper/automation-run/skillTags";
+import type { ResumeWithSections } from "@/lib/scraper/automation-run/types";
vi.mock("@/lib/db", () => {
const mockPrisma = {
@@ -45,6 +47,7 @@ const baseInput = {
automationId: "automation-1",
matchScore: 88,
matchData: "{}",
+ skillTerms: [],
};
beforeEach(() => {
@@ -136,3 +139,48 @@ describe("mapScrapedJobToJobRecord - entity delegation", () => {
expect(result.locationId).toBeNull();
});
});
+
+describe("mapScrapedJobToJobRecord - skill tags", () => {
+ const terms = buildSkillTerms({
+ ResumeSections: [
+ {
+ sectionType: "skills",
+ skills: [
+ { category: null, order: 0, Tag: { id: "t-react", label: "React" } },
+ { category: null, order: 1, Tag: { id: "t-go", label: "Go" } },
+ ],
+ },
+ ],
+ } as unknown as ResumeWithSections);
+
+ it("connects the tags whose skills the posting mentions", async () => {
+ const result = await mapScrapedJobToJobRecord({
+ ...baseInput,
+ scrapedJob: { ...scrapedJob, description: "<p>React and more React</p>" },
+ skillTerms: terms,
+ });
+
+ expect(result.tags).toEqual({ connect: [{ id: "t-react" }] });
+ });
+
+ it("omits the tags key entirely when nothing matches", async () => {
+ const result = await mapScrapedJobToJobRecord({
+ ...baseInput,
+ scrapedJob: { ...scrapedJob, description: "<p>Nothing relevant here</p>" },
+ skillTerms: terms,
+ });
+
+ expect(result.tags).toBeUndefined();
+ expect("tags" in result).toBe(false);
+ });
+
+ it("omits the tags key when the vocabulary is empty", async () => {
+ const result = await mapScrapedJobToJobRecord({
+ ...baseInput,
+ scrapedJob: { ...scrapedJob, description: "<p>React</p>" },
+ skillTerms: [],
+ });
+
+ expect("tags" in result).toBe(false);
+ });
+});
diff --git a/__tests__/scraper-skill-tags.spec.ts b/__tests__/scraper-skill-tags.spec.ts
new file mode 100644
index 0000000..614b0c4
--- /dev/null
+++ b/__tests__/scraper-skill-tags.spec.ts
@@ -0,0 +1,216 @@
+import { buildSkillTerms, matchSkillTags } from "@/lib/scraper/automation-run/skillTags";
+import type { ResumeWithSections } from "@/lib/scraper/automation-run/types";
+
+function makeResume(
+ sections: Array<Array<{ id: string; label: string; order: number }>>,
+): ResumeWithSections {
+ return {
+ id: "resume-1",
+ title: "My Resume",
+ ContactInfo: null,
+ ResumeSections: sections.map((skills) => ({
+ sectionType: "skills",
+ skills: skills.map((s) => ({
+ category: null,
+ order: s.order,
+ Tag: { id: s.id, label: s.label },
+ })),
+ })),
+ } as unknown as ResumeWithSections;
+}
+
+const resume = makeResume([
+ [
+ { id: "t-react", label: "React", order: 0 },
+ { id: "t-ts", label: "TypeScript", order: 1 },
+ { id: "t-go", label: "Go", order: 2 },
+ { id: "t-cpp", label: "C++", order: 3 },
+ { id: "t-net", label: ".NET", order: 4 },
+ { id: "t-ml", label: "Machine Learning", order: 5 },
+ ],
+]);
+
+describe("buildSkillTerms", () => {
+ it("returns one term per skill, ranked in resume order", () => {
+ const terms = buildSkillTerms(resume);
+
+ expect(terms.map((t) => t.tagId)).toEqual([
+ "t-react",
+ "t-ts",
+ "t-go",
+ "t-cpp",
+ "t-net",
+ "t-ml",
+ ]);
+ expect(terms.map((t) => t.rank)).toEqual([0, 1, 2, 3, 4, 5]);
+ });
+
+ it("sorts each section by the skill order field, not array position", () => {
+ const shuffled = makeResume([
+ [
+ { id: "t-b", label: "Beta", order: 1 },
+ { id: "t-a", label: "Alpha", order: 0 },
+ ],
+ ]);
+
+ expect(buildSkillTerms(shuffled).map((t) => t.tagId)).toEqual(["t-a", "t-b"]);
+ });
+
+ it("flattens multiple skills sections into one continuous rank", () => {
+ const twoSections = makeResume([
+ [{ id: "t-a", label: "Alpha", order: 0 }],
+ [{ id: "t-b", label: "Beta", order: 0 }],
+ ]);
+
+ expect(buildSkillTerms(twoSections).map((t) => t.rank)).toEqual([0, 1]);
+ });
+
+ it("drops a duplicate label appearing in a second section", () => {
+ const dupe = makeResume([
+ [{ id: "t-a", label: "React", order: 0 }],
+ [{ id: "t-b", label: "react", order: 0 }],
+ ]);
+
+ expect(buildSkillTerms(dupe).map((t) => t.tagId)).toEqual(["t-a"]);
+ });
+
+ it("strips a trailing parenthetical so the bare name is what matches", () => {
+ const decorated = makeResume([
+ [
+ { id: "t-ng", label: "Angular (v10-14)", order: 0 },
+ { id: "t-aws", label: "AWS (Lambda, S3, SNS)", order: 1 },
+ ],
+ ]);
+ const terms = buildSkillTerms(decorated);
+
+ expect(matchSkillTags("Engineer", "Angular and AWS shop", terms)).toEqual([
+ "t-ng",
+ "t-aws",
+ ]);
+ // The tag's own label is untouched — only the matcher is derived.
+ expect(terms[0].label).toBe("Angular (v10-14)");
+ });
+
+ it("leaves a mid-label parenthetical and slash compounds alone", () => {
+ const compound = makeResume([
+ [
+ { id: "t-cs", label: "C# / .NET", order: 0 },
+ { id: "t-rn", label: "React (v18) Native", order: 1 },
+ ],
+ ]);
+ const terms = buildSkillTerms(compound);
+
+ expect(terms.map((t) => t.tagId)).toEqual(["t-cs", "t-rn"]);
+ // Decision 12: compounds are not split, so a bare "C#" is not a hit.
+ expect(matchSkillTags("Engineer", "A C# and React shop", terms)).toEqual([]);
+ });
+
+ it("drops a label that is nothing but a parenthetical", () => {
+ const empty = makeResume([[{ id: "t-x", label: "(TBD)", order: 0 }]]);
+
+ expect(buildSkillTerms(empty)).toEqual([]);
+ });
+
+ it("collapses two labels differing only inside the parenthetical", () => {
+ const dupes = makeResume([
+ [
+ { id: "t-aws1", label: "AWS (Lambda, S3)", order: 0 },
+ { id: "t-aws2", label: "AWS (SNS, SQS)", order: 1 },
+ ],
+ ]);
+
+ expect(buildSkillTerms(dupes).map((t) => t.tagId)).toEqual(["t-aws1"]);
+ });
+
+ it("ignores non-skills sections", () => {
+ const mixed = {
+ ResumeSections: [{ sectionType: "experience", skills: [] }],
+ } as unknown as ResumeWithSections;
+
+ expect(buildSkillTerms(mixed)).toEqual([]);
+ });
+});
+
+describe("matchSkillTags", () => {
+ const terms = buildSkillTerms(resume);
+
+ it("returns the tag ids the description mentions", () => {
+ const ids = matchSkillTags(
+ "Frontend Engineer",
+ "<p>Build React components in TypeScript.</p>",
+ terms,
+ );
+
+ expect(ids).toEqual(["t-react", "t-ts"]);
+ });
+
+ it("matches terms in the job title too", () => {
+ expect(matchSkillTags("Go Engineer", "A great job", terms)).toEqual(["t-go"]);
+ });
+
+ it("does not match a short term inside a longer word", () => {
+ expect(matchSkillTags("Engineer", "We are going places", terms)).toEqual([]);
+ });
+
+ it("matches punctuation-bearing skills without truncating them", () => {
+ expect(matchSkillTags("Engineer", "Strong C++ background", terms)).toEqual([
+ "t-cpp",
+ ]);
+ });
+
+ it("matches a term that ends a sentence", () => {
+ expect(matchSkillTags("Engineer", "We use Go.", terms)).toEqual(["t-go"]);
+ });
+
+ it("does not match a term against a longer dotted name", () => {
+ const nodeResume = makeResume([[{ id: "t-node", label: "Node", order: 0 }]]);
+
+ expect(
+ matchSkillTags("Engineer", "Node.js services", buildSkillTerms(nodeResume)),
+ ).toEqual([]);
+ });
+
+ it("does not match .NET inside ASP.NET", () => {
+ expect(matchSkillTags("Engineer", "ASP.NET shop", terms)).toEqual([]);
+ });
+
+ it("matches a multi-word skill", () => {
+ expect(matchSkillTags("Engineer", "machine learning at scale", terms)).toEqual([
+ "t-ml",
+ ]);
+ });
+
+ it("ranks by occurrence count, then by resume order on a tie", () => {
+ const ids = matchSkillTags(
+ "Engineer",
+ "TypeScript, TypeScript everywhere. Also React and Go.",
+ terms,
+ );
+
+ expect(ids).toEqual(["t-ts", "t-react", "t-go"]);
+ });
+
+ it("caps the result at MAX_JOB_TAGS", () => {
+ const many = makeResume([
+ Array.from({ length: 12 }, (_, i) => ({
+ id: `t-${i}`,
+ label: `skill${i}`,
+ order: i,
+ })),
+ ]);
+ const text = Array.from({ length: 12 }, (_, i) => `skill${i}`).join(" ");
+
+ expect(matchSkillTags("Engineer", text, buildSkillTerms(many))).toHaveLength(10);
+ });
+
+ it("returns nothing when the vocabulary is empty", () => {
+ expect(matchSkillTags("Engineer", "React and TypeScript", [])).toEqual([]);
+ });
+
+ it("is case-insensitive", () => {
+ expect(matchSkillTags("Engineer", "REACT and typescript", terms)).toEqual([
+ "t-react",
+ "t-ts",
+ ]);
+ });
+});
diff --git a/__tests__/wiki.spec.ts b/__tests__/wiki.spec.ts
index dd6d5a4..db232ef 100644
--- a/__tests__/wiki.spec.ts
+++ b/__tests__/wiki.spec.ts
@@ -58,13 +58,13 @@ describe("wiki bundle", () => {
}
});
- eachPage("%s keeps sections under 300 words and the page under 2000", (rel) => {
+ eachPage("%s keeps sections under 400 words and the page under 2000", (rel) => {
const body = parseWikiPage(read(rel)).body;
const words = (text: string) => text.split(/\s+/).filter(Boolean).length;
expect(words(body), rel).toBeLessThan(2000);
for (const section of body.split(/^## /m).slice(1)) {
const heading = section.split("\n")[0];
- expect(words(section), `${rel}: ## ${heading}`).toBeLessThan(300);
+ expect(words(section), `${rel}: ## ${heading}`).toBeLessThan(400);
}
});
diff --git a/src/lib/scraper/automation-run/atsRun.ts b/src/lib/scraper/automation-run/atsRun.ts
index e7262a4..2b8cc2f 100644
--- a/src/lib/scraper/automation-run/atsRun.ts
+++ b/src/lib/scraper/automation-run/atsRun.ts
@@ -17,6 +17,7 @@ import {
} from "./aiSettings";
import { parseAtsConfig } from "./config";
import { extractResumeSkills } from "./resumeText";
+import { buildSkillTerms } from "./skillTags";
import { persistDiscoveredJob, scalePrerank } from "./persist";
import { matchJobToResume } from "./match";
import { finalizeRun } from "./finalize";
@@ -104,6 +105,7 @@ export async function runAtsRun(
}
const resumeSkills = extractResumeSkills(resume);
+ const skillTerms = buildSkillTerms(resume);
// The distinct pool scoreJob actually ranks against. Surfacing it makes a
// thin search visible instead of showing up only as an unexplained zero.
@@ -214,6 +216,7 @@ export async function runAtsRun(
const limit = getAutomationMatchLimit(aiSettings.provider);
let jobsSaved = 0;
+ let jobsTagged = 0;
let analyzed = 0;
let highlighted = 0;
let belowThreshold = 0;
@@ -231,7 +234,7 @@ export async function runAtsRun(
for (const scored of pipeline.toSaveUnanalyzed) {
if (signal?.aborted) break;
try {
- const saved = await persistDiscoveredJob(
+ const { saved, tagsApplied } = await persistDiscoveredJob(
automation,
scored.job,
scalePrerank(scored.score),
@@ -240,8 +243,12 @@ export async function runAtsRun(
prerankComponents: scored.components,
analyzed: false,
},
+ skillTerms,
);
- if (saved) jobsSaved++;
+ if (saved) {
+ jobsSaved++;
+ if (tagsApplied > 0) jobsTagged++;
+ }
} catch (err) {
log.error("[ATS] Failed to save listing", {
"automation.id": automation.id,
@@ -267,7 +274,7 @@ export async function runAtsRun(
const saveUnanalyzed = async () => {
try {
- const saved = await persistDiscoveredJob(
+ const { saved, tagsApplied } = await persistDiscoveredJob(
automation,
scored.job,
scalePrerank(scored.score),
@@ -276,8 +283,12 @@ export async function runAtsRun(
prerankComponents: scored.components,
analyzed: false,
},
+ skillTerms,
);
- if (saved) jobsSaved++;
+ if (saved) {
+ jobsSaved++;
+ if (tagsApplied > 0) jobsTagged++;
+ }
} catch (err) {
log.error("[ATS] Failed to save listing", {
"automation.id": automation.id,
@@ -346,7 +357,7 @@ export async function runAtsRun(
if (!isStrong) return;
try {
- const saved = await persistDiscoveredJob(
+ const { saved, tagsApplied } = await persistDiscoveredJob(
automation,
scored.job,
matchResult.score,
@@ -361,8 +372,12 @@ export async function runAtsRun(
prerankComponents: scored.components,
analyzed: true,
},
+ skillTerms,
);
- if (saved) jobsSaved++;
+ if (saved) {
+ jobsSaved++;
+ if (tagsApplied > 0) jobsTagged++;
+ }
} catch (err) {
log.error("[ATS] Failed to save analyzed job", {
"automation.id": automation.id,
@@ -398,6 +413,14 @@ export async function runAtsRun(
);
}
+ if (jobsSaved > 0) {
+ automationLogger.log(
+ automation.id,
+ "info",
+ `${label} Tagged ${jobsTagged} of ${jobsSaved} saved job(s) with skills from your resume`,
+ );
+ }
+
automationLogger.endRun(automation.id);
return await finalizeRun(runId, {
diff --git a/src/lib/scraper/automation-run/persist.ts b/src/lib/scraper/automation-run/persist.ts
index 875d3c0..70a80ee 100644
--- a/src/lib/scraper/automation-run/persist.ts
+++ b/src/lib/scraper/automation-run/persist.ts
@@ -4,6 +4,7 @@ import type { Automation, ScrapedJobData } from "@/models/automation.model";
import type { JobDetails } from "../types";
import { mapScrapedJobToJobRecord } from "../mapper";
import { normalizeJobUrl } from "../utils";
+import type { SkillTerm } from "./skillTags";
// Raw lexical score is ~0..PRERANK_MAX; scale into 0..99 so it fits the Int
// matchScore column and stays below a perfect LLM score (100). Internal sort
@@ -17,7 +18,7 @@ export function scalePrerank(raw: number): number {
return Math.min(99, Math.max(0, Math.round((raw / PRERANK_MAX) * 99)));
}
-// Returns false (instead of throwing) when a concurrent run already saved
+// Returns saved: false (instead of throwing) when a concurrent run already saved
// this exact URL first — the Job_userId_jobUrl_automation_key partial unique
// index (migrations/20260710000002_job_automation_url_unique) is the
// backstop for that race, since app-level dedup only sees a point-in-time
@@ -27,7 +28,8 @@ export async function persistDiscoveredJob(
job: JobDetails,
matchScore: number,
matchData: object,
-): Promise<boolean> {
+ skillTerms: SkillTerm[],
+): Promise<{ saved: boolean; tagsApplied: number }> {
const scrapedJob: ScrapedJobData = {
title: job.title,
company: job.company,
@@ -46,13 +48,14 @@ export async function persistDiscoveredJob(
automationId: automation.id,
matchScore,
matchData: JSON.stringify(matchData),
+ skillTerms,
});
try {
await db.job.create({ data: jobRecord });
- return true;
+ return { saved: true, tagsApplied: jobRecord.tags?.connect.length ?? 0 };
} catch (err: any) {
- if (err?.code === "P2002") return false;
+ if (err?.code === "P2002") return { saved: false, tagsApplied: 0 };
throw err;
}
}
diff --git a/src/lib/scraper/automation-run/skillTags.ts b/src/lib/scraper/automation-run/skillTags.ts
new file mode 100644
index 0000000..3f889c6
--- /dev/null
+++ b/src/lib/scraper/automation-run/skillTags.ts
@@ -0,0 +1,79 @@
+import { APP_CONSTANTS } from "@/lib/constants";
+import { removeHtmlTags } from "@/lib/ai/tools/text-processing";
+import type { ResumeWithSections } from "./types";
+
+export interface SkillTerm {
+ tagId: string;
+ label: string;
+ // Position in the resume's own skill order — the tie-break when two terms
+ // occur the same number of times, which is the common case.
+ rank: number;
+ matcher: RegExp;
+}
+
+// Boundaries that keep punctuation-bearing skills intact: "C++", "C#",
+// ".NET" and "Node.js" match whole, "Go" never matches inside "going". The
+// trailing "." is only a blocker when a word follows it, so a term ending a
+// sentence ("We use Go.") still matches.
+const BOUNDARY_BEFORE = "(?<![a-z0-9+#.])";
+const BOUNDARY_AFTER = "(?![a-z0-9+#]|\\.[a-z0-9])";
+
+function escapeRegExp(input: string): string {
+ return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+}
+
+// A trailing parenthetical annotates the skill, it is not part of its name:
+// "Angular (v10-14)" must still match a posting that just says "Angular".
+function matchableTerm(label: string): string {
+ return label.replace(/\s*\([^)]*\)\s*$/, "").trim();
+}
+
+export function buildSkillTerms(resume: ResumeWithSections): SkillTerm[] {
+ const terms: SkillTerm[] = [];
+ const seen = new Set<string>();
+
+ for (const section of resume.ResumeSections) {
+ if (section.sectionType !== "skills") continue;
+ const ordered = [...section.skills].sort((a, b) => a.order - b.order);
+ for (const skill of ordered) {
+ const label = skill.Tag?.label?.trim();
+ if (!label || !skill.Tag?.id) continue;
+ // Dedup on the matchable term, so two labels that differ only inside a
+ // parenthetical collapse to one and the earlier resume order wins.
+ const key = matchableTerm(label).toLowerCase();
+ if (!key) continue;
+ if (seen.has(key)) continue;
+ seen.add(key);
+ terms.push({
+ tagId: skill.Tag.id,
+ label,
+ rank: terms.length,
+ matcher: new RegExp(
+ `${BOUNDARY_BEFORE}${escapeRegExp(key)}${BOUNDARY_AFTER}`,
+ "g",
+ ),
+ });
+ }
+ }
+
+ return terms;
+}
+
+export function matchSkillTags(
+ title: string,
+ description: string,
+ terms: SkillTerm[],
+): string[] {
+ if (terms.length === 0) return [];
+
+ const haystack = removeHtmlTags(`${title}\n${description}`).toLowerCase();
+ const hits: Array<{ tagId: string; count: number; rank: number }> = [];
+
+ for (const term of terms) {
+ const count = haystack.match(term.matcher)?.length ?? 0;
+ if (count > 0) hits.push({ tagId: term.tagId, count, rank: term.rank });
+ }
+
+ hits.sort((a, b) => b.count - a.count || a.rank - b.rank);
+ return hits.slice(0, APP_CONSTANTS.MAX_JOB_TAGS).map((hit) => hit.tagId);
+}
diff --git a/src/lib/scraper/automation-run/types.ts b/src/lib/scraper/automation-run/types.ts
index 556dce0..94f72d6 100644
--- a/src/lib/scraper/automation-run/types.ts
+++ b/src/lib/scraper/automation-run/types.ts
@@ -52,7 +52,7 @@ export interface ResumeWithSections extends PrismaResume {
skills: Array<{
category: string | null;
order: number;
- Tag: { label: string };
+ Tag: { id: string; label: string };
}>;
}>;
}
diff --git a/src/lib/scraper/mapper.ts b/src/lib/scraper/mapper.ts
index 4139eb2..80381d1 100644
--- a/src/lib/scraper/mapper.ts
+++ b/src/lib/scraper/mapper.ts
@@ -7,6 +7,7 @@ import {
resolveLocation,
resolveJobSource,
} from "@/lib/jobs/resolve";
+import { matchSkillTags, type SkillTerm } from "./automation-run/skillTags";
// Maps source employment-type strings ("FULLTIME"/"CONTRACTOR", Greenhouse's
// absence of the field, etc.) to JOB_TYPES enum keys. Defaults to full-time
@@ -37,6 +38,7 @@ interface MapperInput {
automationId: string;
matchScore: number;
matchData: string;
+ skillTerms: SkillTerm[];
}
interface MapperOutput {
@@ -57,12 +59,14 @@ interface MapperOutput {
matchData: string;
discoveryStatus: DiscoveryStatus;
discoveredAt: Date;
+ tags?: { connect: Array<{ id: string }> };
}
export async function mapScrapedJobToJobRecord(
input: MapperInput
): Promise<MapperOutput> {
- const { scrapedJob, userId, automationId, matchScore, matchData } = input;
+ const { scrapedJob, userId, automationId, matchScore, matchData, skillTerms } =
+ input;
// Shares the same resolve-or-create helpers (and canonical match key) as the
// add_job path, so a company/title discovered here resolves to the same
@@ -79,6 +83,14 @@ export async function mapScrapedJobToJobRecord(
]);
const statusId = await getDefaultJobStatus();
+ // Connects tags that already exist (every resume skill is a Tag row) — an
+ // unattended run must never create one, or it pollutes the shared picker.
+ const tagIds = matchSkillTags(
+ scrapedJob.title,
+ scrapedJob.description,
+ skillTerms,
+ );
+
return {
userId,
automationId,
@@ -98,6 +110,9 @@ export async function mapScrapedJobToJobRecord(
matchData,
discoveryStatus: "new",
discoveredAt: new Date(),
+ ...(tagIds.length > 0
+ ? { tags: { connect: tagIds.map((id) => ({ id })) } }
+ : {}),
};
}
diff --git a/wiki/automations.md b/wiki/automations.md
index 50728d5..e3674fd 100644
--- a/wiki/automations.md
+++ b/wiki/automations.md
@@ -62,6 +62,10 @@ Because the skills on your resume are used as extra keywords when listings are r
The skills section also goes into the text handed to the AI for the match score, so it improves the scoring as well as the shortlisting.
+Your skills are also used to tag the jobs a run discovers. When a saved listing's title or description mentions one of your resume skills, that skill is added to the job as a tag, so the job's detail page shows at a glance which of your skills the posting asks for. Only skills already on your resume are used — a run never invents a new tag — and each job gets at most ten.
+
+For a skill to be tagged, the posting has to mention it by name, so write your skills the way a job ad would. A note in brackets is ignored, so **Angular (v10–14)** still matches a posting that just says "Angular". But a skill written as two things at once — **C# / .NET**, **Agile/Scrum** — matches nothing, because no posting spells it that way. List those as separate skills instead. This helps the ranking too, which reads the same skill names.
+
To add one, open **Profile**, open the resume you use for matching, and click **Add Skills**. Group your skills into categories (up to 8, with up to 20 skills each) — for example *Languages*, *Frameworks*, *Cloud* — and list the real technology names you would want a posting to mention.
A resume with no skills section still works, but the automation then has only your typed keywords to go on. Pair a filled-in skills section with a good set of target titles and keywords for the best results.