cv-agent-mcp 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -13
- package/dist/cli.js +59 -15
- package/dist/core/extract.js +47 -0
- package/dist/core/gaps.js +69 -0
- package/dist/core/importer.js +29 -0
- package/dist/core/keywords.js +2 -0
- package/dist/core/store.js +4 -0
- package/dist/core/verify.js +55 -0
- package/dist/mcp/server.js +57 -15
- package/package.json +6 -4
- package/prompts/cv-import.md +41 -0
- package/prompts/gap-interview.md +32 -0
- package/prompts/tailoring-guide.md +30 -0
- package/skills/cv-agent/SKILL.md +41 -0
- package/skill/cv-agent/SKILL.md +0 -35
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ cv-agent rejects all of it. In normal use your agent calls these as MCP tools, s
|
|
|
21
21
|
|
|
22
22
|
| | cv-agent | Typical AI resume builders |
|
|
23
23
|
| ---------------------------------------- | :------: | :------------------------: |
|
|
24
|
-
| Starts from what your AI already knows
|
|
24
|
+
| Starts from your existing CV *or* what your AI already knows | ✅ | Blank form or CV upload |
|
|
25
25
|
| Runs in your existing agent, no API key | ✅ | Their app, your API key or a subscription |
|
|
26
26
|
| **Blocks invented numbers, employers, skills** | ✅ | ❌ (happily writes "improved X by 40%") |
|
|
27
27
|
| Open data format (JSON Resume) | ✅ | Often proprietary |
|
|
@@ -32,15 +32,22 @@ It's excellent, and cv-agent's `profile.json` is JSON Resume, so you can import
|
|
|
32
32
|
|
|
33
33
|
## How it works
|
|
34
34
|
|
|
35
|
-
1. **
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
1. **Start from what you have.** Either:
|
|
36
|
+
- **Your existing CV(s):** PDF or Word, and several old versions are fine. Your agent converts them into one profile.
|
|
37
|
+
cv-agent checks the result against the original files, so even this step can't add a number, skill or employer
|
|
38
|
+
that isn't in your CV.
|
|
39
|
+
- **What your AI already knows about you:** run `cv-agent prompt` and paste it into the AI you talk to most. It
|
|
40
|
+
writes your profile using only facts it actually knows, and marks anything it guessed.
|
|
41
|
+
2. **Confirm.** cv-agent saves your *master profile* and lists anything uncertain for you to check.
|
|
38
42
|
3. **Review.** Deterministic checks (weak verbs, missing metrics, dates, length, ATS formatting) plus a rubric your
|
|
39
43
|
agent uses for a real critique.
|
|
40
|
-
4. **
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
4. **Fill real gaps.** Give it the jobs you're applying to. It ranks the skills they want that your profile doesn't
|
|
45
|
+
show, by how many applications each affects. Then your agent interviews you about them, one question at a time
|
|
46
|
+
and without leading questions, to surface experience you forgot to list. Only what you confirm is added, with your
|
|
47
|
+
confirmation logged next to it.
|
|
48
|
+
5. **Tailor.** Your agent selects, reorders and rephrases for each job. `tailor_cv` then checks every bullet against
|
|
49
|
+
your master profile and **rejects any number, technology, employer, title, date or skill that isn't in it**.
|
|
50
|
+
6. **Render** to PDF and Markdown.
|
|
44
51
|
|
|
45
52
|
## Install
|
|
46
53
|
|
|
@@ -50,11 +57,14 @@ It's excellent, and cv-agent's `profile.json` is JSON Resume, so you can import
|
|
|
50
57
|
| --- | --- | --- |
|
|
51
58
|
| [cv-agent-windows-x64.mcpb](https://github.com/zeiado/cv-agent/releases/latest/download/cv-agent-windows-x64.mcpb) | [cv-agent-macos-arm64.mcpb](https://github.com/zeiado/cv-agent/releases/latest/download/cv-agent-macos-arm64.mcpb) | [cv-agent-macos-x64.mcpb](https://github.com/zeiado/cv-agent/releases/latest/download/cv-agent-macos-x64.mcpb) |
|
|
52
59
|
|
|
53
|
-
**Claude Code** (requires Node
|
|
60
|
+
**Claude Code plugin** (MCP server and workflow skill in one step; requires Node 22+). In Claude Code:
|
|
54
61
|
|
|
55
|
-
```bash
|
|
56
|
-
claude mcp add cv-agent -- npx -y cv-agent-mcp serve
|
|
57
62
|
```
|
|
63
|
+
/plugin install cv-agent --marketplace zeiado/cv-agent
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
On older Claude Code versions: `/plugin marketplace add zeiado/cv-agent`, then `/plugin install cv-agent@zeiado`.
|
|
67
|
+
Or add just the MCP server: `claude mcp add cv-agent -- npx -y cv-agent-mcp serve`.
|
|
58
68
|
|
|
59
69
|
cv-agent is also listed in the [official MCP Registry](https://registry.modelcontextprotocol.io) as
|
|
60
70
|
`io.github.zeiado/cv-agent`.
|
|
@@ -65,7 +75,7 @@ cv-agent is also listed in the [official MCP Registry](https://registry.modelcon
|
|
|
65
75
|
{ "mcpServers": { "cv-agent": { "command": "npx", "args": ["-y", "cv-agent-mcp", "serve"] } } }
|
|
66
76
|
```
|
|
67
77
|
|
|
68
|
-
|
|
78
|
+
Not using the plugin? Copy `skills/cv-agent` into `~/.claude/skills/` so Claude follows the full workflow.
|
|
69
79
|
|
|
70
80
|
Then just ask: *"Build my CV with cv-agent"* or *"Tailor my CV to this job: …"*
|
|
71
81
|
|
|
@@ -85,9 +95,12 @@ claude mcp add cv-agent -- node "$(pwd)/dist/cli.js" serve
|
|
|
85
95
|
```bash
|
|
86
96
|
npm i -g cv-agent-mcp # installs the `cv-agent` command
|
|
87
97
|
cv-agent prompt # the context-import prompt
|
|
98
|
+
cv-agent prompt --from-cv old.pdf # conversion prompt + your CV text, paste into any chatbot
|
|
99
|
+
cv-agent import answer.json --source old.pdf # import, checked against your original CV
|
|
88
100
|
cv-agent import answer.txt # or: pbpaste | cv-agent import -
|
|
89
101
|
cv-agent lint # review the master profile
|
|
90
102
|
cv-agent match job.txt # keyword match vs a job description
|
|
103
|
+
cv-agent gaps job1.txt job2.txt # skills your target jobs want that your profile doesn't show
|
|
91
104
|
cv-agent verify tailored.json # check a tailored CV for invented facts
|
|
92
105
|
cv-agent render -o cv.pdf --md # PDF (+ Markdown); --letter for US Letter
|
|
93
106
|
```
|
|
@@ -101,11 +114,14 @@ Data lives in `~/.cv-agent` (override with `--dir` or `CV_AGENT_HOME`).
|
|
|
101
114
|
|
|
102
115
|
| Tool | What it does |
|
|
103
116
|
| --- | --- |
|
|
117
|
+
| `read_cv_files` | Read your existing CV(s): PDF, DOCX, TXT, MD |
|
|
104
118
|
| `get_context_prompt` | The prompt for exporting your profile from another AI |
|
|
105
|
-
| `import_profile` |
|
|
119
|
+
| `import_profile` | Save the master profile, checked against your original CV files when given |
|
|
106
120
|
| `get_profile` / `update_profile` | Read / edit the master profile |
|
|
107
121
|
| `review_cv` | Deterministic checks and a review rubric |
|
|
108
122
|
| `analyze_job` | Keywords, gaps and match score for a job description |
|
|
123
|
+
| `plan_gap_interview` | Gaps across one or more jobs, ranked by leverage, plus the interview guide |
|
|
124
|
+
| `add_confirmed_fact` | Add one fact the user confirmed, with the confirmation logged |
|
|
109
125
|
| `tailor_cv` | Save a tailored CV, but only if it invents nothing |
|
|
110
126
|
| `render_cv` | PDF and Markdown output |
|
|
111
127
|
| `list_tailored` | Saved tailored CVs |
|
package/dist/cli.js
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { dirname, join, resolve } from "node:path";
|
|
3
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { parseArgs } from "node:util";
|
|
6
6
|
import { Resume } from "./schema/resume.js";
|
|
7
|
-
import { Store
|
|
7
|
+
import { Store } from "./core/store.js";
|
|
8
|
+
import { importProfile } from "./core/importer.js";
|
|
9
|
+
import { extractAll, joinDocs } from "./core/extract.js";
|
|
8
10
|
import { lint } from "./core/lint.js";
|
|
9
11
|
import { analyzeJob } from "./core/keywords.js";
|
|
12
|
+
import { planGaps } from "./core/gaps.js";
|
|
10
13
|
import { verifyTailored } from "./core/verify.js";
|
|
11
14
|
import { renderMarkdown, renderPdf } from "./render/index.js";
|
|
12
15
|
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
13
16
|
const HELP = `cv-agent: agent-native CV builder, reviewer and tailor
|
|
14
17
|
|
|
15
18
|
Usage:
|
|
16
|
-
cv-agent prompt
|
|
17
|
-
cv-agent
|
|
19
|
+
cv-agent prompt Prompt for ChatGPT/Claude/Gemini to write your profile from memory
|
|
20
|
+
cv-agent prompt --from-cv <cv.pdf>... Prompt + your existing CV text, ready to paste into any chatbot
|
|
21
|
+
cv-agent extract <cv.pdf|docx>... Print the plain text of existing CV files
|
|
22
|
+
cv-agent import <file|-> [--source <cv.pdf>]... [--force]
|
|
23
|
+
Save the AI's answer as your master profile. With --source it is
|
|
24
|
+
checked against your original CV and invented content is rejected
|
|
18
25
|
cv-agent lint [file] Review a CV (default: master profile)
|
|
19
26
|
cv-agent match <job.txt> [file] Keyword match against a job description
|
|
27
|
+
cv-agent gaps <job.txt>... Skills your target jobs want that your profile doesn't show,
|
|
28
|
+
ranked by how many of the jobs ask for them
|
|
20
29
|
cv-agent verify <tailored.json> Check a tailored CV for invented facts
|
|
21
30
|
cv-agent render [file] [-o out.pdf] [--md] [--letter]
|
|
22
31
|
cv-agent serve Run the MCP server (stdio)
|
|
@@ -32,6 +41,9 @@ const { positionals, values } = parseArgs({
|
|
|
32
41
|
force: { type: "boolean" },
|
|
33
42
|
md: { type: "boolean" },
|
|
34
43
|
letter: { type: "boolean" },
|
|
44
|
+
"from-cv": { type: "boolean" },
|
|
45
|
+
source: { type: "string", multiple: true },
|
|
46
|
+
"allow-unsourced": { type: "boolean" },
|
|
35
47
|
help: { type: "boolean", short: "h" },
|
|
36
48
|
},
|
|
37
49
|
});
|
|
@@ -44,21 +56,42 @@ const printIssues = (issues) => issues.forEach((i) => console.log(` ${ICON[i.se
|
|
|
44
56
|
async function main() {
|
|
45
57
|
switch (cmd) {
|
|
46
58
|
case "prompt":
|
|
47
|
-
|
|
59
|
+
if (values["from-cv"]) {
|
|
60
|
+
if (!args.length)
|
|
61
|
+
throw new Error("Usage: cv-agent prompt --from-cv <cv.pdf> [more files...]");
|
|
62
|
+
const text = joinDocs(await extractAll(args));
|
|
63
|
+
process.stdout.write(readFileSync(join(ROOT, "prompts", "cv-import.md"), "utf8") + "\n" + text + "\n");
|
|
64
|
+
}
|
|
65
|
+
else
|
|
66
|
+
process.stdout.write(readFileSync(join(ROOT, "prompts", "context-import.md"), "utf8"));
|
|
67
|
+
break;
|
|
68
|
+
case "extract":
|
|
69
|
+
if (!args.length)
|
|
70
|
+
throw new Error("Usage: cv-agent extract <cv.pdf|cv.docx> [more files...]");
|
|
71
|
+
process.stdout.write(joinDocs(await extractAll(args)) + "\n");
|
|
48
72
|
break;
|
|
49
73
|
case "import": {
|
|
50
74
|
if (!args[0])
|
|
51
75
|
throw new Error("Usage: cv-agent import <file|->");
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
76
|
+
const r = await importProfile(store(), readInput(args[0]), {
|
|
77
|
+
sourceFiles: values.source,
|
|
78
|
+
overwrite: values.force,
|
|
79
|
+
allowUnsourced: values["allow-unsourced"],
|
|
80
|
+
});
|
|
81
|
+
if (r.saved === false) {
|
|
82
|
+
console.log(r.reason.replace("(overwrite)", "(--force)").replace("allowUnsourced: true", "--allow-unsourced"));
|
|
83
|
+
r.findings?.forEach((f) => console.log(` ${ICON[f.severity]} ${f.path.padEnd(28)} ${f.message}`));
|
|
84
|
+
process.exitCode = 1;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
console.log(`Saved master profile to ${r.saved}`);
|
|
88
|
+
if (values.source?.length) {
|
|
89
|
+
const errors = r.sourceCheck?.filter((f) => f.severity === "error").length ?? 0;
|
|
90
|
+
console.log(errors ? `Saved with ${errors} claim(s) not in your CV (--allow-unsourced).` : "Checked against your CV: nothing invented.");
|
|
91
|
+
}
|
|
92
|
+
if (r.needsConfirmation.length) {
|
|
93
|
+
console.log(`\n${r.needsConfirmation.length} item(s) to check before using the CV:`);
|
|
94
|
+
r.needsConfirmation.forEach((x) => console.log(` ? ${x.path.padEnd(28)} ${x.note ?? x.confidence}`));
|
|
62
95
|
}
|
|
63
96
|
break;
|
|
64
97
|
}
|
|
@@ -79,6 +112,17 @@ async function main() {
|
|
|
79
112
|
console.log(` Missing: ${a.missing.join(", ") || "(none)"}`);
|
|
80
113
|
break;
|
|
81
114
|
}
|
|
115
|
+
case "gaps": {
|
|
116
|
+
if (!args.length)
|
|
117
|
+
throw new Error("Usage: cv-agent gaps <job1.txt> [job2.txt ...]");
|
|
118
|
+
const plan = planGaps(args.map((f) => ({ name: basename(f).replace(/\.\w+$/, ""), description: readInput(f) })), store().loadProfile());
|
|
119
|
+
for (const j of plan.jobs)
|
|
120
|
+
console.log(` ${j.name.padEnd(24)} keyword match ${j.matchScore}%`);
|
|
121
|
+
console.log(plan.gaps.length ? "\nGaps (ask yourself honestly: have I done this, or something close?):" : "\nNo skill gaps found.");
|
|
122
|
+
for (const g of plan.gaps)
|
|
123
|
+
console.log(` ${g.leverage.toUpperCase().padEnd(7)} ${g.term.padEnd(20)} ${g.jobs.join(", ")}`);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
82
126
|
case "verify": {
|
|
83
127
|
if (!args[0])
|
|
84
128
|
throw new Error("Usage: cv-agent verify <tailored.json>");
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { basename, extname } from "node:path";
|
|
3
|
+
export const SUPPORTED = [".pdf", ".docx", ".txt", ".md"];
|
|
4
|
+
/** Normalise extracted text: unify bullets/whitespace, drop empty runs, keep line structure. */
|
|
5
|
+
function clean(text) {
|
|
6
|
+
return text
|
|
7
|
+
.replace(/\r/g, "")
|
|
8
|
+
.replace(/[•●▪‣⁃◦]/g, "-")
|
|
9
|
+
.replace(/[ \t ]+/g, " ")
|
|
10
|
+
.split("\n")
|
|
11
|
+
.map((l) => l.trim())
|
|
12
|
+
.join("\n")
|
|
13
|
+
.replace(/\n{3,}/g, "\n\n")
|
|
14
|
+
.trim();
|
|
15
|
+
}
|
|
16
|
+
/** Plain text of an existing CV. Supports PDF (text-based, not scanned), DOCX, TXT and Markdown. */
|
|
17
|
+
export async function extractText(path) {
|
|
18
|
+
const ext = extname(path).toLowerCase();
|
|
19
|
+
if (ext === ".doc")
|
|
20
|
+
throw new Error(`${basename(path)}: old .doc files aren't supported. Save it as .docx or PDF first.`);
|
|
21
|
+
if (!SUPPORTED.includes(ext))
|
|
22
|
+
throw new Error(`${basename(path)}: unsupported file type. Use ${SUPPORTED.join(", ")}.`);
|
|
23
|
+
const buf = await readFile(path);
|
|
24
|
+
let text;
|
|
25
|
+
if (ext === ".pdf") {
|
|
26
|
+
const { extractText: pdfText, getDocumentProxy } = await import("unpdf");
|
|
27
|
+
const pdf = await getDocumentProxy(new Uint8Array(buf));
|
|
28
|
+
text = (await pdfText(pdf, { mergePages: true })).text;
|
|
29
|
+
}
|
|
30
|
+
else if (ext === ".docx") {
|
|
31
|
+
const mammoth = await import("mammoth");
|
|
32
|
+
text = (await mammoth.extractRawText({ buffer: buf })).value;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
text = buf.toString("utf8");
|
|
36
|
+
}
|
|
37
|
+
text = clean(text);
|
|
38
|
+
if (text.length < 80)
|
|
39
|
+
throw new Error(`${basename(path)}: almost no text found. If it's a scanned PDF/image, export a text-based PDF or DOCX instead.`);
|
|
40
|
+
return { file: basename(path), text };
|
|
41
|
+
}
|
|
42
|
+
export async function extractAll(paths) {
|
|
43
|
+
return Promise.all(paths.map(extractText));
|
|
44
|
+
}
|
|
45
|
+
export function joinDocs(docs) {
|
|
46
|
+
return docs.map((d) => `===== ${d.file} =====\n${d.text}`).join("\n\n");
|
|
47
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Resume } from "../schema/resume.js";
|
|
2
|
+
import { analyzeJob, isKnownSkill } from "./keywords.js";
|
|
3
|
+
/**
|
|
4
|
+
* Missing skills across one or more job descriptions, de-duplicated and ranked by how many applications
|
|
5
|
+
* each gap affects. Ask about high-leverage gaps first: one honest answer can help several applications.
|
|
6
|
+
*/
|
|
7
|
+
export function planGaps(jobs, profile) {
|
|
8
|
+
const byTerm = new Map();
|
|
9
|
+
const perJob = jobs.map((j) => {
|
|
10
|
+
const a = analyzeJob(j.description, profile);
|
|
11
|
+
for (const k of a.keywords) {
|
|
12
|
+
// Only real skills or strongly repeated requirements; skip incidental words ("platform", "design").
|
|
13
|
+
if (k.inProfile || (!isKnownSkill(k.term) && k.weight < 4))
|
|
14
|
+
continue;
|
|
15
|
+
const g = byTerm.get(k.term) ?? { term: k.term, jobs: [], leverage: "low", weight: 0 };
|
|
16
|
+
g.jobs.push(j.name);
|
|
17
|
+
g.weight += k.weight;
|
|
18
|
+
byTerm.set(k.term, g);
|
|
19
|
+
}
|
|
20
|
+
return { name: j.name, matchScore: a.matchScore, matched: a.matched };
|
|
21
|
+
});
|
|
22
|
+
const gaps = [...byTerm.values()]
|
|
23
|
+
.map((g) => ({ ...g, leverage: (g.jobs.length >= 3 ? "high" : g.jobs.length === 2 ? "medium" : "low") }))
|
|
24
|
+
.sort((a, b) => b.jobs.length - a.jobs.length || b.weight - a.weight);
|
|
25
|
+
return { jobs: perJob, gaps };
|
|
26
|
+
}
|
|
27
|
+
const SECTIONS = ["work", "projects", "volunteer", "education", "skills", "certificates", "awards", "languages"];
|
|
28
|
+
const ADDABLE_LISTS = ["highlights", "keywords", "courses"];
|
|
29
|
+
/**
|
|
30
|
+
* Add one fact the user explicitly confirmed. `target` is either a section ("projects") to append a new entry,
|
|
31
|
+
* or a list inside an entry ("work[0].highlights", "skills[1].keywords") to append a string.
|
|
32
|
+
*/
|
|
33
|
+
export function addConfirmedFact(store, target, value, confirmation) {
|
|
34
|
+
if (!confirmation.trim())
|
|
35
|
+
throw new Error("Quote the user's confirmation. Facts are only added after the user says they are true.");
|
|
36
|
+
const profile = store.loadProfile();
|
|
37
|
+
let path;
|
|
38
|
+
const listMatch = target.match(/^(\w+)\[(\d+)\]\.(\w+)$/);
|
|
39
|
+
if (listMatch) {
|
|
40
|
+
const [, section, idx, list] = listMatch;
|
|
41
|
+
if (!SECTIONS.includes(section) || !ADDABLE_LISTS.includes(list))
|
|
42
|
+
throw new Error(`Can't add to "${target}".`);
|
|
43
|
+
if (typeof value !== "string" || !value.trim())
|
|
44
|
+
throw new Error(`"${target}" takes a single string.`);
|
|
45
|
+
const entry = profile[section]?.[Number(idx)];
|
|
46
|
+
if (!entry)
|
|
47
|
+
throw new Error(`${section}[${idx}] does not exist in the profile.`);
|
|
48
|
+
const arr = (entry[list] ??= []);
|
|
49
|
+
arr.push(value.trim());
|
|
50
|
+
path = `${target}[${arr.length - 1}]`;
|
|
51
|
+
}
|
|
52
|
+
else if (SECTIONS.includes(target)) {
|
|
53
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
54
|
+
throw new Error(`"${target}" takes one entry object.`);
|
|
55
|
+
const arr = (profile[target] ??= []);
|
|
56
|
+
arr.push(value);
|
|
57
|
+
path = `${target}[${arr.length - 1}]`;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
throw new Error(`Unknown target "${target}". Use a section (e.g. "projects") or a list (e.g. "work[0].highlights").`);
|
|
61
|
+
}
|
|
62
|
+
const parsed = Resume.safeParse(profile);
|
|
63
|
+
if (!parsed.success)
|
|
64
|
+
throw new Error(`That entry doesn't fit the profile schema: ${parsed.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ")}`);
|
|
65
|
+
store.saveProfile(parsed.data);
|
|
66
|
+
const entry = { path, value, source: "user-confirmed", confirmation: confirmation.trim(), at: new Date().toISOString() };
|
|
67
|
+
store.addEvidence(entry);
|
|
68
|
+
return { added: path, value, profile: store.profilePath };
|
|
69
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { extractAll, joinDocs } from "./extract.js";
|
|
2
|
+
import { lint } from "./lint.js";
|
|
3
|
+
import { parseImport } from "./store.js";
|
|
4
|
+
import { verifyAgainstSource } from "./verify.js";
|
|
5
|
+
export async function importProfile(store, text, opts = {}) {
|
|
6
|
+
if (store.hasProfile() && !opts.overwrite)
|
|
7
|
+
return { saved: false, reason: "A profile already exists. Ask the user before replacing it (overwrite), or edit it with update_profile." };
|
|
8
|
+
const { profile, review } = parseImport(text);
|
|
9
|
+
let sourceCheck;
|
|
10
|
+
if (opts.sourceFiles?.length) {
|
|
11
|
+
const source = joinDocs(await extractAll(opts.sourceFiles));
|
|
12
|
+
const v = verifyAgainstSource(profile, source);
|
|
13
|
+
sourceCheck = v.findings;
|
|
14
|
+
if (!v.ok && !opts.allowUnsourced)
|
|
15
|
+
return {
|
|
16
|
+
saved: false,
|
|
17
|
+
reason: "The profile contains things that are not in the CV file(s). Remove them, or if the user confirms they are true, " +
|
|
18
|
+
"call again with allowUnsourced: true.",
|
|
19
|
+
findings: v.findings,
|
|
20
|
+
};
|
|
21
|
+
// Bullets that drifted from the original wording go on the confirmation list.
|
|
22
|
+
for (const f of v.findings)
|
|
23
|
+
if (f.severity === "warn" && !review.some((r) => r.path === f.path))
|
|
24
|
+
review.push({ path: f.path, confidence: "inferred", note: f.message });
|
|
25
|
+
}
|
|
26
|
+
store.saveProfile(profile);
|
|
27
|
+
store.saveReview(review);
|
|
28
|
+
return { saved: store.profilePath, needsConfirmation: review, sourceCheck, lint: lint(profile) };
|
|
29
|
+
}
|
package/dist/core/keywords.js
CHANGED
|
@@ -7,6 +7,8 @@ const LEXICON = ("python java javascript typescript go golang rust c++ c# .net k
|
|
|
7
7
|
"machine-learning deep-learning computer-vision mlops microservices serverless agile scrum jira figma excel power-bi tableau " +
|
|
8
8
|
"salesforce sap seo sem crm b2b saas etl api apis testing tdd unity unreal ios android security oauth devops sre observability " +
|
|
9
9
|
"prometheus grafana leadership mentoring stakeholder communication").split(/\s+/);
|
|
10
|
+
/** True for well-known technologies/skills (as opposed to frequent words picked up from the job text). */
|
|
11
|
+
export const isKnownSkill = (term) => LEXICON.includes(term);
|
|
10
12
|
const REQUIREMENT_RE = /\b(must|require|required|experience (with|in)|proficien|knowledge of|familiar|you have|you'll|degree|years)\b/i;
|
|
11
13
|
function countOccurrences(haystack, needle) {
|
|
12
14
|
return haystack.split(needle).length - 1;
|
package/dist/core/store.js
CHANGED
|
@@ -48,6 +48,10 @@ export class Store {
|
|
|
48
48
|
saveProfile(p) { writeJson(this.profilePath, Resume.parse(p)); }
|
|
49
49
|
loadReview() { return existsSync(this.reviewPath) ? readJson(this.reviewPath) : []; }
|
|
50
50
|
saveReview(items) { writeJson(this.reviewPath, items); }
|
|
51
|
+
/** Append-only log of facts the user confirmed in conversation (where each addition came from). */
|
|
52
|
+
get evidencePath() { return join(this.dir, "profile.evidence.json"); }
|
|
53
|
+
loadEvidence() { return existsSync(this.evidencePath) ? readJson(this.evidencePath) : []; }
|
|
54
|
+
addEvidence(e) { writeJson(this.evidencePath, [...this.loadEvidence(), e]); }
|
|
51
55
|
saveTailored(name, r) {
|
|
52
56
|
const p = join(this.dir, "tailored", `${slug(name)}.json`);
|
|
53
57
|
writeJson(p, Resume.parse(r));
|
package/dist/core/verify.js
CHANGED
|
@@ -108,3 +108,58 @@ export function verifyTailored(master, tailored) {
|
|
|
108
108
|
}
|
|
109
109
|
return { ok: !findings.some((f) => f.severity === "error"), findings };
|
|
110
110
|
}
|
|
111
|
+
const DATE_KEY = /(^|\.)(startDate|endDate|date)$/;
|
|
112
|
+
const NAME_KEYS = {
|
|
113
|
+
"work": "name", "volunteer": "organization", "projects": "name", "education": "institution",
|
|
114
|
+
"certificates": "name", "awards": "title", "languages": "language",
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Import guard: when a profile is built from the user's existing CV file(s), everything in it must come from
|
|
118
|
+
* that text. Numbers, names, technologies and skills must appear in the source; bullets should be near-verbatim;
|
|
119
|
+
* years must match. Catches an agent "improving" the CV while converting it.
|
|
120
|
+
*/
|
|
121
|
+
export function verifyAgainstSource(profile, sourceText) {
|
|
122
|
+
const findings = [];
|
|
123
|
+
const err = (path, message) => findings.push({ severity: "error", path, message });
|
|
124
|
+
const warn = (path, message, source) => findings.push({ severity: "warn", path, message, source });
|
|
125
|
+
const words = ` ${norm(sourceText)} `;
|
|
126
|
+
const mentioned = (s) => words.includes(` ${norm(s)} `);
|
|
127
|
+
const srcMetrics = new Set(metrics(sourceText));
|
|
128
|
+
const lines = sourceText.split(/\n+/).map((l) => l.trim()).filter((l) => l.length > 3);
|
|
129
|
+
// Wrapped bullets: also consider each line joined with the next one.
|
|
130
|
+
const candidates = lines.flatMap((l, i) => (lines[i + 1] ? [l, `${l} ${lines[i + 1]}`] : [l]));
|
|
131
|
+
if (!mentioned(profile.basics.name))
|
|
132
|
+
err("basics.name", `"${profile.basics.name}" does not appear in your CV.`);
|
|
133
|
+
for (const { path, text } of corpus(profile)) {
|
|
134
|
+
if (DATE_KEY.test(path)) {
|
|
135
|
+
const year = text.match(/^\d{4}/)?.[0];
|
|
136
|
+
if (year && !words.includes(` ${year} `))
|
|
137
|
+
err(path, `Year ${year} does not appear in your CV.`);
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
for (const m of metrics(text))
|
|
141
|
+
if (!srcMetrics.has(m))
|
|
142
|
+
err(path, `Number "${m}" does not appear in your CV.`);
|
|
143
|
+
for (const e of entities(text))
|
|
144
|
+
if (!mentioned(e))
|
|
145
|
+
err(path, `"${e}" does not appear in your CV.`);
|
|
146
|
+
const section = path.match(/^(\w+)\[\d+\]\.(\w+)/);
|
|
147
|
+
if (section && NAME_KEYS[section[1]] === section[2] && !mentioned(text))
|
|
148
|
+
err(path, `"${text}" does not appear in your CV.`);
|
|
149
|
+
else if (/\.position$|\.studyType$|\.area$/.test(path) && !mentioned(text))
|
|
150
|
+
warn(path, `"${text}" is not written this way in your CV. Check it is accurate.`);
|
|
151
|
+
else if (/^skills\[\d+\]\.keywords/.test(path) && !mentioned(text))
|
|
152
|
+
err(path, `Skill "${text}" does not appear in your CV.`);
|
|
153
|
+
else if (/\.(highlights\[\d+\]|summary|description)$/.test(path) || /highlights\[\d+\]$/.test(path)) {
|
|
154
|
+
let best;
|
|
155
|
+
for (const c of candidates) {
|
|
156
|
+
const o = overlap(text, c);
|
|
157
|
+
if (!best || o > best.overlap)
|
|
158
|
+
best = { path: "source", text: c, overlap: Math.round(o * 100) / 100 };
|
|
159
|
+
}
|
|
160
|
+
if (!best || best.overlap < 0.5)
|
|
161
|
+
warn(path, "Doesn't closely match any line in your CV. Keep the original wording unless the user rewrote it.", best);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return { ok: !findings.some((f) => f.severity === "error"), findings };
|
|
165
|
+
}
|
package/dist/mcp/server.js
CHANGED
|
@@ -5,9 +5,12 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
5
5
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { Resume } from "../schema/resume.js";
|
|
8
|
-
import { Store
|
|
8
|
+
import { Store } from "../core/store.js";
|
|
9
|
+
import { importProfile } from "../core/importer.js";
|
|
10
|
+
import { extractAll, joinDocs } from "../core/extract.js";
|
|
9
11
|
import { lint } from "../core/lint.js";
|
|
10
12
|
import { analyzeJob } from "../core/keywords.js";
|
|
13
|
+
import { addConfirmedFact, planGaps } from "../core/gaps.js";
|
|
11
14
|
import { verifyTailored } from "../core/verify.js";
|
|
12
15
|
import { renderMarkdown, renderPdf, TEMPLATES } from "../render/index.js";
|
|
13
16
|
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
@@ -24,8 +27,9 @@ catch (e) {
|
|
|
24
27
|
export async function startServer(dir) {
|
|
25
28
|
const store = new Store(dir);
|
|
26
29
|
const server = new McpServer({ name: "cv-agent", version: VERSION }, {
|
|
27
|
-
instructions: "cv-agent stores the user's master CV profile and produces tailored CVs. Workflow:
|
|
28
|
-
"
|
|
30
|
+
instructions: "cv-agent stores the user's master CV profile and produces tailored CVs. Workflow: build the profile (read_cv_files if the " +
|
|
31
|
+
"user has an existing CV, otherwise get_context_prompt) -> " +
|
|
32
|
+
"import_profile -> review_cv -> analyze_job (and plan_gap_interview for gaps) -> tailor_cv -> render_cv. Never invent experience, numbers, " +
|
|
29
33
|
"employers or skills; tailor_cv rejects them. If you already know the user well from this conversation or memory, " +
|
|
30
34
|
"you may draft the profile yourself following get_context_prompt, but confirm uncertain items with the user.",
|
|
31
35
|
});
|
|
@@ -34,18 +38,32 @@ export async function startServer(dir) {
|
|
|
34
38
|
description: "Returns the prompt the user pastes into their main AI (ChatGPT, Claude, Gemini) to export a factual profile, or that you follow yourself if you already know the user.",
|
|
35
39
|
inputSchema: {},
|
|
36
40
|
}, async () => ({ content: [{ type: "text", text: readPrompt("context-import.md") }] }));
|
|
41
|
+
server.registerTool("read_cv_files", {
|
|
42
|
+
title: "Read existing CV files",
|
|
43
|
+
description: "Extract the text of the user's existing CV(s): PDF, DOCX, TXT or MD. Several files are fine (e.g. older versions); they get merged. " +
|
|
44
|
+
"Returns the text plus conversion instructions. Convert it to a profile following the instructions exactly, then call " +
|
|
45
|
+
"import_profile with the same paths as sourceFiles so the result is checked against the originals.",
|
|
46
|
+
inputSchema: { paths: z.array(z.string()).min(1).describe("Absolute paths to the CV files") },
|
|
47
|
+
}, safe(async ({ paths }) => {
|
|
48
|
+
const docs = await extractAll(paths);
|
|
49
|
+
return {
|
|
50
|
+
files: docs.map((d) => ({ file: d.file, characters: d.text.length })),
|
|
51
|
+
instructions: readPrompt("cv-import.md"),
|
|
52
|
+
text: joinDocs(docs),
|
|
53
|
+
};
|
|
54
|
+
}));
|
|
37
55
|
server.registerTool("import_profile", {
|
|
38
56
|
title: "Import master profile",
|
|
39
|
-
description: "Validate and save the master profile. Accepts
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}));
|
|
57
|
+
description: "Validate and save the master profile. Accepts JSON Resume text (optionally inside ```json fences, with a _review array). " +
|
|
58
|
+
"If it was converted from CV files, pass them as sourceFiles: everything is checked against the original text and invented " +
|
|
59
|
+
"content is rejected. Returns items to confirm with the user.",
|
|
60
|
+
inputSchema: {
|
|
61
|
+
text: z.string().describe("A JSON Resume object, optionally with a _review array"),
|
|
62
|
+
sourceFiles: z.array(z.string()).optional().describe("The CV files this profile was converted from (same paths as read_cv_files)"),
|
|
63
|
+
overwrite: z.boolean().default(false),
|
|
64
|
+
allowUnsourced: z.boolean().default(false).describe("Only after the user confirmed the flagged claims are true"),
|
|
65
|
+
},
|
|
66
|
+
}, safe(({ text, sourceFiles, overwrite, allowUnsourced }) => importProfile(store, text, { sourceFiles, overwrite, allowUnsourced })));
|
|
49
67
|
server.registerTool("get_profile", { title: "Get master profile", description: "Read the saved master profile and any still-unconfirmed items.", inputSchema: {} }, safe(() => ({ profile: store.loadProfile(), unconfirmed: store.loadReview() })));
|
|
50
68
|
server.registerTool("update_profile", {
|
|
51
69
|
title: "Update master profile",
|
|
@@ -68,9 +86,33 @@ export async function startServer(dir) {
|
|
|
68
86
|
}));
|
|
69
87
|
server.registerTool("analyze_job", {
|
|
70
88
|
title: "Analyze job description",
|
|
71
|
-
description: "Extract keywords and requirement lines from a job description and match them against the master profile. Returns a keyword match score, matched and missing terms. Missing terms are gaps, not things to add
|
|
89
|
+
description: "Extract keywords and requirement lines from a job description and match them against the master profile. Returns a keyword match score, matched and missing terms, and the tailoring guide to follow. Missing terms are gaps, not things to add: use plan_gap_interview to ask the user about them.",
|
|
72
90
|
inputSchema: { jobDescription: z.string() },
|
|
73
|
-
}, safe(({ jobDescription }) =>
|
|
91
|
+
}, safe(({ jobDescription }) => ({
|
|
92
|
+
...analyzeJob(jobDescription, store.loadProfile()),
|
|
93
|
+
tailoringGuide: readPrompt("tailoring-guide.md"),
|
|
94
|
+
})));
|
|
95
|
+
server.registerTool("plan_gap_interview", {
|
|
96
|
+
title: "Plan gap interview",
|
|
97
|
+
description: "For one or more job descriptions, find skills the jobs want that the master profile doesn't show, de-duplicated and " +
|
|
98
|
+
"ranked by how many applications each affects. Returns the gaps plus an interview guide: ask the user about each gap " +
|
|
99
|
+
"to surface real experience they forgot to list, then record only what they confirm with add_confirmed_fact.",
|
|
100
|
+
inputSchema: {
|
|
101
|
+
jobs: z.array(z.object({ name: z.string().describe('Short label, e.g. "Acme backend"'), description: z.string() })).min(1),
|
|
102
|
+
},
|
|
103
|
+
}, safe(({ jobs }) => ({ ...planGaps(jobs, store.loadProfile()), interviewGuide: readPrompt("gap-interview.md") })));
|
|
104
|
+
server.registerTool("add_confirmed_fact", {
|
|
105
|
+
title: "Add a user-confirmed fact",
|
|
106
|
+
description: "Add ONE fact to the master profile after the user explicitly confirmed it is accurate as written. target is a list " +
|
|
107
|
+
'inside an entry ("work[0].highlights", "skills[1].keywords", "education[0].courses") with a string value, or a ' +
|
|
108
|
+
'section ("projects", "work", "certificates", "volunteer", "skills") with one entry object. The user\'s confirmation ' +
|
|
109
|
+
"is logged with the fact. After this, tailor_cv accepts it.",
|
|
110
|
+
inputSchema: {
|
|
111
|
+
target: z.string(),
|
|
112
|
+
value: z.union([z.string(), z.record(z.string(), z.unknown())]),
|
|
113
|
+
userConfirmation: z.string().describe('The user\'s own words confirming it, e.g. "yes, that\'s accurate"'),
|
|
114
|
+
},
|
|
115
|
+
}, safe(({ target, value, userConfirmation }) => addConfirmedFact(store, target, value, userConfirmation)));
|
|
74
116
|
server.registerTool("tailor_cv", {
|
|
75
117
|
title: "Save tailored CV",
|
|
76
118
|
description: "Submit a tailored CV (full JSON Resume object) you derived from the master profile for one job. You may select, reorder and reword. " +
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cv-agent-mcp",
|
|
3
3
|
"mcpName": "io.github.zeiado/cv-agent",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Agent-native CV builder, reviewer and tailor. Runs inside your AI agent as an MCP server — no API key, no invented experience.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"dist",
|
|
12
12
|
"prompts",
|
|
13
13
|
"templates",
|
|
14
|
-
"
|
|
14
|
+
"skills",
|
|
15
15
|
"README.md",
|
|
16
16
|
"LICENSE"
|
|
17
17
|
],
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=22"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsc -p tsconfig.json",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test": "vitest run",
|
|
25
25
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
26
26
|
"prepublishOnly": "npm run build && npm test",
|
|
27
|
-
"version": "node scripts/sync-version.mjs && git add server.json",
|
|
27
|
+
"version": "node scripts/sync-version.mjs && git add server.json .claude-plugin/plugin.json .mcp.json",
|
|
28
28
|
"build:mcpb": "npm run build && node scripts/build-mcpb.mjs"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
53
53
|
"@myriaddreamin/typst-ts-node-compiler": "^0.7.0",
|
|
54
|
+
"mammoth": "^1.13.0",
|
|
55
|
+
"unpdf": "^2.2.3",
|
|
54
56
|
"zod": "^4.6.7"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Convert the CV text below into my professional profile: a single JSON object in the JSON Resume format shown at the
|
|
2
|
+
end. If there are several CVs, merge them into ONE profile (they are versions of the same person's CV).
|
|
3
|
+
|
|
4
|
+
Rules. Follow them strictly. The result is checked against the original text, and invented content is rejected:
|
|
5
|
+
|
|
6
|
+
1. **Copy, don't improve.** Keep the original wording of every bullet. Only fix obvious typos and remove first-person
|
|
7
|
+
pronouns. Do not add numbers, technologies, outcomes or adjectives that are not in the text.
|
|
8
|
+
2. **Merge duplicates.** The same role in two CVs becomes one entry. Keep every distinct bullet; drop exact or
|
|
9
|
+
near-exact repeats. If two versions disagree (dates, titles), use the most recent CV and list the conflict in
|
|
10
|
+
`_review` with `"confidence": "unsure"`.
|
|
11
|
+
3. **Dates** as `YYYY-MM` when the month is given, otherwise `YYYY`. Leave `endDate` out for current roles
|
|
12
|
+
("Present", "Now", "Current").
|
|
13
|
+
4. **Skills:** only skills written in the CV. Group them sensibly (e.g. "Languages", "Backend", "Tools").
|
|
14
|
+
5. If a field is ambiguous (e.g. you can't tell the employer from the title), make your best reading and add it to
|
|
15
|
+
`_review` with `"confidence": "inferred"` and a short note.
|
|
16
|
+
6. Put the most recent roles first.
|
|
17
|
+
7. After the JSON, list up to 10 **questions** that would most improve this CV: bullets with no measurable result,
|
|
18
|
+
vague responsibilities, missing dates. These are for me to answer later. Do not answer them yourself.
|
|
19
|
+
|
|
20
|
+
Output format: one ```json code block, then the questions as a plain list. Nothing else.
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"basics": {
|
|
25
|
+
"name": "", "label": "", "email": "", "phone": "", "url": "", "summary": "",
|
|
26
|
+
"location": { "city": "", "countryCode": "" },
|
|
27
|
+
"profiles": [{ "network": "", "username": "", "url": "" }]
|
|
28
|
+
},
|
|
29
|
+
"work": [{ "name": "employer", "position": "", "location": "", "startDate": "", "endDate": "", "summary": "", "highlights": [""] }],
|
|
30
|
+
"projects": [{ "name": "", "description": "", "url": "", "highlights": [""], "keywords": [""] }],
|
|
31
|
+
"education": [{ "institution": "", "studyType": "", "area": "", "startDate": "", "endDate": "", "score": "" }],
|
|
32
|
+
"skills": [{ "name": "", "keywords": [""] }],
|
|
33
|
+
"certificates": [{ "name": "", "issuer": "", "date": "" }],
|
|
34
|
+
"languages": [{ "language": "", "fluency": "" }],
|
|
35
|
+
"volunteer": [{ "organization": "", "position": "", "startDate": "", "endDate": "", "highlights": [""] }],
|
|
36
|
+
"awards": [{ "title": "", "awarder": "", "date": "" }],
|
|
37
|
+
"_review": [{ "path": "work[1].startDate", "confidence": "unsure", "note": "2019 in one CV, 2020 in the other" }]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
CV text:
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Gap interview (for the agent)
|
|
2
|
+
|
|
3
|
+
Goal: find real experience the user forgot to put on their CV, without putting words in their mouth.
|
|
4
|
+
Go through the gaps in the order given (highest leverage first). Ask **one question at a time** and stop when the user
|
|
5
|
+
wants to move on. Five or six gaps per session is plenty.
|
|
6
|
+
|
|
7
|
+
## For each gap
|
|
8
|
+
|
|
9
|
+
1. **Say why you're asking.** "3 of your target jobs ask for Kubernetes, and your profile doesn't mention it."
|
|
10
|
+
2. **Ask an open question.** "Have you worked with Kubernetes, or anything close to it, at work, in a side project,
|
|
11
|
+
a course or volunteering?" Don't hint at the answer you hope for.
|
|
12
|
+
3. **Follow the answer:**
|
|
13
|
+
- **Yes, at work:** what did you do with it, how big was it (users, data, team, money), what changed because of it,
|
|
14
|
+
and roughly when? Which role was this in?
|
|
15
|
+
- **Something related** (e.g. Docker Compose instead of Kubernetes, or a different cloud): what exactly? It may be
|
|
16
|
+
worth adding as itself, under its real name. Never relabel it as the requested skill.
|
|
17
|
+
- **Outside work** (projects, courses, certificates, volunteering): what did you build or finish, and is it public
|
|
18
|
+
(a link)? This becomes a project, certificate or volunteer entry, not a job bullet.
|
|
19
|
+
- **No:** accept it and move on. It's a real gap. At the end, mention honest options: leave it, mention you're
|
|
20
|
+
learning it in a cover letter, or lead with the closest real strength.
|
|
21
|
+
4. **Draft, then confirm.** Write the bullet or entry in plain words, using **only** what the user said. If they gave no
|
|
22
|
+
number, write no number. Don't upgrade verbs ("helped" stays "helped", not "led"). Read it back and ask: *"Is this
|
|
23
|
+
accurate as written?"*
|
|
24
|
+
5. **Only after an explicit yes**, call `add_confirmed_fact` with the user's confirmation quoted. If they correct it,
|
|
25
|
+
redraft and ask again.
|
|
26
|
+
|
|
27
|
+
## Never
|
|
28
|
+
|
|
29
|
+
- Suggest numbers, scale or outcomes ("was it about 30%?"). Ask "did you measure the result?" instead.
|
|
30
|
+
- Turn adjacent experience into the requested skill.
|
|
31
|
+
- Treat "I think so" or "maybe" as confirmation. Ask what they actually did.
|
|
32
|
+
- Add anything because the job needs it. The job decides what we *ask*, never what we *write*.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Tailoring guide (for the agent)
|
|
2
|
+
|
|
3
|
+
A tailored CV is the master profile, **selected, ordered and phrased for one job**. The facts never change.
|
|
4
|
+
`tailor_cv` rejects new numbers, technologies, employers, titles, dates and skills. These rules cover the judgement
|
|
5
|
+
the checker can't make.
|
|
6
|
+
|
|
7
|
+
## Allowed: same fact, better fit
|
|
8
|
+
|
|
9
|
+
- **Select:** keep the roles, projects and bullets that matter for this job. Drop the rest. One page for under
|
|
10
|
+
~5 years of experience.
|
|
11
|
+
- **Order:** most relevant bullet first within each role; relevant projects above irrelevant jobs if that helps.
|
|
12
|
+
- **Use the job's words for the same thing:** if the job says "event streaming" and the bullet says "Kafka pipeline",
|
|
13
|
+
"Kafka event-streaming pipeline" is fine. Only when it is genuinely the same thing.
|
|
14
|
+
- **Shift emphasis:** lead with the outcome the job cares about (reliability, cost, users, speed) when that outcome is
|
|
15
|
+
already in the bullet.
|
|
16
|
+
- **Adjust detail:** name the technologies for technical roles; for non-technical roles, keep the outcome and drop
|
|
17
|
+
the stack.
|
|
18
|
+
- **Headline and summary:** rewrite them for the role, built only from facts in the profile.
|
|
19
|
+
|
|
20
|
+
## Not allowed, even though some may pass the checker
|
|
21
|
+
|
|
22
|
+
- **Inflating scale or scope:** "3 stakeholders" → "3 organizational units"; "a team" → "the organization".
|
|
23
|
+
- **Upgrading your role:** helped → led, contributed → owned, supported → drove.
|
|
24
|
+
- **Relabelling adjacent experience** as the requested skill (Docker ≠ Kubernetes).
|
|
25
|
+
- **Implying a time span** you can't support ("years of experience with X").
|
|
26
|
+
- **Changing job titles**, even to "what it really was". Titles must match what you held. The summary can describe
|
|
27
|
+
the work instead.
|
|
28
|
+
|
|
29
|
+
When the job needs something the profile doesn't have, don't stretch. Run the gap interview (`plan_gap_interview`)
|
|
30
|
+
and add only what the user confirms.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cv-agent
|
|
3
|
+
description: Build, review and tailor the user's CV/resume without inventing anything. Use when the user wants to create or update a CV or resume, import an existing CV (PDF/Word), get feedback on one, tailor it to a job posting, check ATS keyword match, or export it to PDF. Requires the cv-agent MCP server.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# cv-agent
|
|
7
|
+
|
|
8
|
+
You help the user build one truthful **master profile**, then derive a tailored CV per job from it. The
|
|
9
|
+
`cv-agent` MCP server stores the files, runs deterministic checks, blocks invented facts and renders PDFs.
|
|
10
|
+
|
|
11
|
+
## The one hard rule
|
|
12
|
+
|
|
13
|
+
Never add an employer, title, date, number, technology or skill the user has not confirmed. `tailor_cv` rejects
|
|
14
|
+
these. When the master profile lacks something a job wants, **ask the user**. If they confirm it, add it with
|
|
15
|
+
`update_profile` first, then tailor.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. **Get the profile.** Call `get_profile`. If none exists, ask whether they have an existing CV.
|
|
20
|
+
- **They have a CV file (most people):** ask for its path (several versions are welcome, since they get merged), call
|
|
21
|
+
`read_cv_files`, convert the text exactly as its instructions say (copy, don't improve), then `import_profile`
|
|
22
|
+
with the same paths as `sourceFiles`. If it reports claims that aren't in the CV, remove them. Never use
|
|
23
|
+
`allowUnsourced` unless the user explicitly confirms those facts.
|
|
24
|
+
- **No CV, but you know them well** (this conversation or your memory): draft the profile following
|
|
25
|
+
`get_context_prompt`, show it to them, and import it once they agree.
|
|
26
|
+
- **Otherwise:** give them the text from `get_context_prompt` to paste into the AI they use most, and import its answer.
|
|
27
|
+
- Walk through every `needsConfirmation` item with the user. Then `update_profile` with `confirmedPaths`.
|
|
28
|
+
2. **Review.** Call `review_cv`. Report the deterministic issues briefly, then your own critique using the
|
|
29
|
+
returned rubric. Ask for missing numbers rather than guessing them.
|
|
30
|
+
3. **Find the gaps** (one job or several the user is applying to): call `plan_gap_interview` with all of them.
|
|
31
|
+
Tell the user the match scores, then run the interview exactly as its `interviewGuide` says: highest-leverage gap
|
|
32
|
+
first, one question at a time, and no leading questions. Record only what the user confirms, with
|
|
33
|
+
`add_confirmed_fact`. Real gaps stay gaps.
|
|
34
|
+
4. **Tailor** for each job:
|
|
35
|
+
- `analyze_job` gives keywords, the match score and the `tailoringGuide`. Follow the guide: select, order and
|
|
36
|
+
rephrase the same facts; never inflate scope or upgrade the user's role.
|
|
37
|
+
- Build the tailored JSON Resume and submit it with `tailor_cv`. If it returns errors, fix them and resubmit.
|
|
38
|
+
Show any warnings to the user.
|
|
39
|
+
5. **Render.** Call `render_cv` and give the user the PDF path. Ask if they want US Letter instead of A4.
|
|
40
|
+
|
|
41
|
+
Keep the tailored CV to one page for under ~5 years of experience, two pages at most otherwise.
|
package/skill/cv-agent/SKILL.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: cv-agent
|
|
3
|
-
description: Build, review and tailor the user's CV/resume without inventing anything. Use when the user wants to create or update a CV or resume, get feedback on one, tailor it to a job posting, check ATS keyword match, or export it to PDF. Requires the cv-agent MCP server.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# cv-agent
|
|
7
|
-
|
|
8
|
-
You help the user build one truthful **master profile**, then derive a tailored CV per job from it. The
|
|
9
|
-
`cv-agent` MCP server stores the files, runs deterministic checks, blocks invented facts and renders PDFs.
|
|
10
|
-
|
|
11
|
-
## The one hard rule
|
|
12
|
-
|
|
13
|
-
Never add an employer, title, date, number, technology or skill the user has not confirmed. `tailor_cv` rejects
|
|
14
|
-
these. When the master profile lacks something a job wants, **ask the user**. If they confirm it, add it with
|
|
15
|
-
`update_profile` first, then tailor.
|
|
16
|
-
|
|
17
|
-
## Workflow
|
|
18
|
-
|
|
19
|
-
1. **Get the profile.** Call `get_profile`. If none exists:
|
|
20
|
-
- If you already know the user well (this conversation or your memory), draft the profile yourself following
|
|
21
|
-
`get_context_prompt`, show it to them, and import it once they agree.
|
|
22
|
-
- Otherwise give them the text from `get_context_prompt` to paste into the AI they use most, and import its
|
|
23
|
-
answer with `import_profile`.
|
|
24
|
-
- Walk through every `needsConfirmation` item with the user. Then `update_profile` with `confirmedPaths`.
|
|
25
|
-
2. **Review.** Call `review_cv`. Report the deterministic issues briefly, then your own critique using the
|
|
26
|
-
returned rubric. Ask for missing numbers rather than guessing them.
|
|
27
|
-
3. **Tailor** for a job description:
|
|
28
|
-
- `analyze_job` for keywords, gaps and the match score.
|
|
29
|
-
- Tell the user the real gaps. For each one, ask whether they have that experience. Never quietly add it.
|
|
30
|
-
- Build the tailored JSON Resume: choose the most relevant entries and bullets, reorder by relevance, and reword
|
|
31
|
-
using the job's terminology **only where it describes the same fact**. Adjust the headline and summary.
|
|
32
|
-
- `tailor_cv`. If it returns errors, fix them and resubmit. Show any warnings to the user.
|
|
33
|
-
4. **Render.** Call `render_cv` and give the user the PDF path. Ask if they want US Letter instead of A4.
|
|
34
|
-
|
|
35
|
-
Keep the tailored CV to one page for under ~5 years of experience, two pages at most otherwise.
|