@yottameta/yotta-resume 0.0.0 → 0.1.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ # 更新日志
2
+
3
+ ## v0.1.2 (2026-11-21)
4
+
5
+ - 新增 5 个机器可读数据契约和对应 JSON Schema:安全岗位族、证据账本、
6
+ 来源 registry、题库和双角色权限。
7
+ - 新增 6 个安全岗位族、4 个职级、A-D 来源分层、来源失效与题库新鲜度规则。
8
+ - 新增 HR 默认拒绝访问私有证据账本、原始简历和分析报告的权限矩阵;
9
+ 受保护属性不得进入评分字段。
10
+ - 新增离线 `contracts` 校验命令和独立 `contract_validate.py`;校验失败返回 `6`。
11
+ - 新增 21 项契约测试,覆盖正常、重复 ID、未知职级、来源缺失 / 失效、
12
+ D-only 题、未确认证据导出、布尔字段类型绕过、非法来源引用、HR 越权、
13
+ 非法权限动作、非法数据类、非法日期、受保护属性和跨角色导出确认。
14
+
15
+ ## v0.1.1 (2026-11-21)
16
+
17
+ - 新增文字层 PDF 解析:优先使用本地 PyMuPDF,记录页数、图片数、文本字符数和
18
+ SHA-256;加密、损坏、扫描件和缺少依赖时受控失败,不输出 traceback。
19
+ - 将“简历准备度”收紧为“结构准备度(规则分)”,增加章节、量化证据、
20
+ 文本清洁度和可选 JD 维度;明确不代表招聘竞争力,并禁止改写为其他数值。
21
+ - 未提供 JD 时 `jd_match.coverage` 改为 `null`,不再误报 100%。
22
+ - 弱声明和缺指标改为全量返回;新增占位符、重复字段、日期冲突、
23
+ 能力等级混用、模板水印和图片文本缺口检测。
24
+ - 每条 finding 增加稳定 ID、严重度、来源类型与待确认标记;报告新增来源清单、
25
+ 解析提示、未知项、工具发现与输出口径。
26
+ - 契约测试扩展到 29 项,新增真实 PDF 解析、受控错误、无 JD 与数字护栏。
27
+
28
+ ## v0.1.0 (2026-11-21)
29
+
30
+ 初始版本:
31
+
32
+ - 新增简历分析:章节识别、要点统计、弱表述与量化指标识别、联系方式打码、JD 关键词匹配和准备度参考分。
33
+ - 新增高价值追问与逐条修改建议,不编造经历、数字或结果。
34
+ - 新增 Markdown 简历模型解析,以及元简生成 DOCX 的文本回读。
35
+ - 新增 DOCX、HTML 和本地浏览器 PDF 导出;未找到 Chromium/Chrome/Edge 时明确失败。
36
+ - 新增 `audit` 与 `export` CLI,`--version` 返回 `0.1.0`。
37
+ - 新增 21 项契约测试,覆盖分析、脱敏、追问、建议、JD 匹配、解析、导出、CLI 与安全边界。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 YottaMeta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,11 @@
1
+ # NOTICE — YottaMeta 品牌声明
2
+
3
+ 「YottaMeta」「元简」「yotta-resume」以及本家族各技能名称(yotta-* 前缀)是 YottaMeta 的品牌与标识。
4
+
5
+ 本软件以 MIT 许可证开源,任何人均可自由使用、修改与分发。若你在其基础上制作派生作品:
6
+
7
+ 1. 不得继续使用 YottaMeta 或本家族名称(yotta-*、元简 等)作为派生作品的名称;
8
+ 2. 不得暗示派生作品由 YottaMeta 官方维护、认可或与之存在关联;
9
+ 3. 建议在派生作品中明确声明「与 YottaMeta 官方无关联」。
10
+
11
+ 上游来源致谢:本技能由 YottaMeta 全新实现(零依赖自研 + 中文教学)。
package/README.md ADDED
@@ -0,0 +1,115 @@
1
+ <p align="center"><b>Language</b>: English · <a href="./README.zh-CN.md">中文</a></p>
2
+
3
+ <p align="center"><img src="./assets/banner.png" alt="yotta-resume banner" /></p>
4
+
5
+ <h1 align="center">yotta-resume · Yuan Jian</h1>
6
+
7
+ <p align="center">Analyze a resume locally, ask for missing evidence, suggest factual improvements, and export DOCX/PDF.</p>
8
+
9
+ <p align="center">
10
+ <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue" /></a>
11
+ <a href="https://www.npmjs.com/package/@yottameta/yotta-resume"><img alt="npm package" src="https://img.shields.io/npm/v/@yottameta/yotta-resume" /></a>
12
+ <a href="https://github.com/YottaMeta/yotta-resume"><img alt="GitHub stars" src="https://img.shields.io/github/stars/YottaMeta/yotta-resume" /></a>
13
+ </p>
14
+
15
+ ## What it is
16
+
17
+ yotta-resume is a job-seeker resume analysis and export tool. It reads Markdown,
18
+ UTF-8 text, DOCX, and text-layer PDF resumes, identifies sections, experience bullets,
19
+ metrics, contact information, and JD keyword gaps, then returns high-value questions
20
+ and improvement suggestions. After the job seeker confirms the facts, the same resume
21
+ can be exported to DOCX, HTML, or PDF.
22
+
23
+ The core analyzer uses the Python standard library. It makes no network requests,
24
+ does not submit resumes, and never invents experience or numbers. PDF input uses
25
+ local PyMuPDF and fails clearly when the dependency is missing or the file cannot
26
+ be parsed.
27
+
28
+ ## When to use
29
+
30
+ - Review resume structure, evidence, and measurable outcomes.
31
+ - Compare a resume with a target job description.
32
+ - Prepare focused follow-up questions for missing facts.
33
+ - Export a confirmed resume as DOCX/PDF.
34
+
35
+ **Do not use it** to submit applications, fabricate experience, predict interviews or offers, evaluate protected personal attributes, or create complex design portfolios.
36
+
37
+ ## Quick usage
38
+
39
+ ```bash
40
+ # Analyze a resume and print a Markdown report
41
+ python scripts/yotta_resume.py audit --resume resume.md
42
+
43
+ # Analyze a text-layer PDF directly
44
+ python scripts/yotta_resume.py audit --resume resume.pdf
45
+
46
+ # Analyze with a JD and output JSON
47
+ python scripts/yotta_resume.py audit --resume resume.md --jd jd.txt --format json
48
+
49
+ # Export DOCX, HTML, and PDF
50
+ python scripts/yotta_resume.py export --input revised.md --docx revised.docx --html revised.html --pdf revised.pdf
51
+
52
+ # Validate role, question-bank, source, ledger, and dual-role contracts offline
53
+ python scripts/yotta_resume.py contracts --format json
54
+ ```
55
+
56
+ PDF export requires a local Chromium, Chrome, or Edge browser. PDF input requires
57
+ `pip install pymupdf`. Missing browsers, missing PDF dependencies, encrypted files,
58
+ and image-only PDFs fail clearly instead of producing a misleading result.
59
+
60
+ The `readiness.score` field is a structural rule score only. It is not a recruiter
61
+ score. When no JD is provided, job-match coverage is `null`.
62
+
63
+ See [references/usage.md](references/usage.md) for input format, fields, and exit codes.
64
+ See [references/data-contracts.md](references/data-contracts.md) for the bundled data contracts.
65
+
66
+ ## Installation
67
+
68
+ Choose one of the methods below. Skill files are distributed through **npm**; GitHub hosts source code and issues.
69
+
70
+ ### Method 1: npm one-liner (recommended)
71
+
72
+ ```text
73
+ npx -y @yottameta/yotta-resume --agent <agent-name>
74
+ npx -y @yottameta/yotta-resume --dir <agent-skills-dir>
75
+ ```
76
+
77
+ - `--agent <name>` installs to that agent's default user-level skills directory.
78
+ - `--dir <path>` installs to a specified skills directory.
79
+ - `--list` shows supported agent defaults.
80
+ - If a China mirror has not synced the package, append `--registry=https://registry.npmjs.org/`.
81
+
82
+ ### Method 2: git clone
83
+
84
+ ```text
85
+ git clone https://github.com/YottaMeta/yotta-resume.git <agent-skills-dir>/yotta-resume
86
+ ```
87
+
88
+ ### Method 3: Download ZIP
89
+
90
+ Download the ZIP from `YottaMeta/yotta-resume`, then move the `yotta-resume` folder into your agent skills directory.
91
+
92
+ ### Method 4: install.sh
93
+
94
+ ```text
95
+ bash install.sh --agent <agent-name>
96
+ bash install.sh --dir <skills-dir>
97
+ bash install.sh --list
98
+ ```
99
+
100
+ ## Development and validation
101
+
102
+ ```bash
103
+ python scripts/test_yotta_resume.py
104
+ python scripts/test_contract_validate.py
105
+ python -m py_compile scripts/yotta_resume.py scripts/contract_validate.py scripts/test_yotta_resume.py scripts/test_contract_validate.py
106
+ ```
107
+
108
+ The current suite has 50 tests covering analysis, masking, questions, suggestions,
109
+ JD matching, Markdown/DOCX/PDF input, HTML escaping, PDF export, CLI behavior,
110
+ source manifests, numeric-output guardrails, role contracts, question sources,
111
+ evidence ledger rules, and dual-role permissions.
112
+
113
+ ## License
114
+
115
+ MIT © YottaMeta — see [LICENSE](./LICENSE).
@@ -0,0 +1,109 @@
1
+ <p align="center"><b>Language</b>: <a href="./README.md">English</a> · 中文</p>
2
+
3
+ <p align="center"><img src="./assets/banner.png" alt="yotta-resume 元简横幅" /></p>
4
+
5
+ <h1 align="center">yotta-resume · 元简</h1>
6
+
7
+ <p align="center">本地分析简历、追问缺失事实、给出修改建议,并导出 DOCX/PDF。</p>
8
+
9
+ <p align="center">
10
+ <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue" /></a>
11
+ <a href="https://www.npmjs.com/package/@yottameta/yotta-resume"><img alt="npm package" src="https://img.shields.io/npm/v/@yottameta/yotta-resume" /></a>
12
+ <a href="https://github.com/YottaMeta/yotta-resume"><img alt="GitHub stars" src="https://img.shields.io/github/stars/YottaMeta/yotta-resume" /></a>
13
+ </p>
14
+
15
+ ## 这是什么
16
+
17
+ 元简是一个求职者简历分析与导出工具。它读取 Markdown、UTF-8 文本、DOCX
18
+ 和文字层 PDF,识别章节、经历要点、量化指标、联系方式和 JD 关键词缺口,
19
+ 输出高价值追问和修改建议;确认事实后,可以把同一份简历导出为 DOCX、HTML 或 PDF。
20
+
21
+ 核心分析使用 Python 标准库,不发起网络请求,不自动投递简历,也不编造经历或数字。
22
+ PDF 输入需要本地 PyMuPDF;未安装、扫描件或文件损坏时会明确降级或失败。
23
+
24
+ ## 何时使用
25
+
26
+ - 需要诊断简历结构、经历证据或量化指标。
27
+ - 需要根据目标岗位 JD 判断关键词覆盖。
28
+ - 需要整理应向求职者追问的高价值问题。
29
+ - 需要把已确认的简历导出为 DOCX/PDF。
30
+
31
+ **不要使用**:代投简历、编造经历、预测面试或 Offer 结果、评估受保护个人属性,或制作复杂设计作品集排版。
32
+
33
+ ## 快速使用
34
+
35
+ ```bash
36
+ # 分析简历,输出 Markdown 报告
37
+ python scripts/yotta_resume.py audit --resume resume.md
38
+
39
+ # 直接分析文字层 PDF
40
+ python scripts/yotta_resume.py audit --resume resume.pdf
41
+
42
+ # 结合 JD 分析,输出 JSON
43
+ python scripts/yotta_resume.py audit --resume resume.md --jd jd.txt --format json
44
+
45
+ # 导出 DOCX、HTML 和 PDF
46
+ python scripts/yotta_resume.py export --input revised.md --docx revised.docx --html revised.html --pdf revised.pdf
47
+
48
+ # 离线校验岗位族、题库、来源与双角色权限契约
49
+ python scripts/yotta_resume.py contracts --format json
50
+ ```
51
+
52
+ PDF 输出需要本机 Chromium、Chrome 或 Edge。没有浏览器时命令会返回明确错误,
53
+ 不会生成伪 PDF。PDF 输入需要 `pip install pymupdf`。
54
+
55
+ 报告中的 `readiness.score` 只表示“结构准备度(规则分)”,不代表招聘方评分;
56
+ 未提供 JD 时岗位覆盖为 `null`。不得把该分数改写成其他数值或主观数字区间。
57
+
58
+ 输入格式、字段和退出码见 [references/usage.md](references/usage.md);
59
+ 数据契约见 [references/data-contracts.md](references/data-contracts.md)。
60
+
61
+ ## 安装
62
+
63
+ 以下四种方式任选;技能文件从 **npm** 获取,GitHub 供源码和 Issue 使用。
64
+
65
+ ### 方式一:npm 一行装(推荐)
66
+
67
+ ```text
68
+ npx -y @yottameta/yotta-resume --agent <智能体名称>
69
+ npx -y @yottameta/yotta-resume --dir <智能体的技能目录>
70
+ ```
71
+
72
+ - `--agent <name>` 安装到该智能体默认用户级技能目录。
73
+ - `--dir <path>` 安装到指定技能目录。
74
+ - `--list` 查看已支持的智能体默认目录。
75
+ - 国内镜像未同步新包时,可追加 `--registry=https://registry.npmjs.org/`。
76
+
77
+ ### 方式二:git clone
78
+
79
+ ```text
80
+ git clone https://github.com/YottaMeta/yotta-resume.git <智能体的技能目录>/yotta-resume
81
+ ```
82
+
83
+ ### 方式三:GitHub ZIP
84
+
85
+ 在 `YottaMeta/yotta-resume` 仓库选择 **Code → Download ZIP**,解压后把 `yotta-resume` 放入智能体技能目录。
86
+
87
+ ### 方式四:install.sh
88
+
89
+ ```text
90
+ bash install.sh --agent <智能体名称>
91
+ bash install.sh --dir <技能目录>
92
+ bash install.sh --list
93
+ ```
94
+
95
+ ## 开发与校验
96
+
97
+ ```bash
98
+ python scripts/test_yotta_resume.py
99
+ python scripts/test_contract_validate.py
100
+ python -m py_compile scripts/yotta_resume.py scripts/contract_validate.py scripts/test_yotta_resume.py scripts/test_contract_validate.py
101
+ ```
102
+
103
+ 当前测试覆盖 50 项,包含分析、脱敏、追问、建议、JD 匹配、
104
+ Markdown/DOCX/PDF 读取、HTML 转义、PDF 导出、CLI、来源清单、数字护栏、
105
+ 岗位族、题库来源、证据账本和双角色权限。
106
+
107
+ ## 许可证
108
+
109
+ MIT © YottaMeta — 见 [LICENSE](./LICENSE)。
package/SKILL.md ADDED
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: yotta-resume
3
+ description: "元简 — 本地求职者简历诊断、分析、修改与成品导出技能:分析简历结构、经历证据、量化指标、岗位匹配和风险,向用户追问缺失事实,给出逐条合理化修改建议,并把确认后的内容导出为 DOCX/PDF。触发:简历诊断、简历分析、改简历、简历追问、JD匹配、导出Word/PDF。边界:不编造经历,不承诺ATS、面试或Offer结果;不自动投递;不处理复杂设计作品集排版;默认本地处理且不联网。"
4
+ version: 0.1.2
5
+ license: MIT
6
+ metadata:
7
+ zh_name: "元简"
8
+ ---
9
+
10
+ # 元简(yotta-resume)
11
+
12
+ 元简分析求职者简历的结构、经历证据和 JD 关键词覆盖,提出可回答的高价值问题,
13
+ 并按用户确认的事实导出 DOCX、HTML 或 PDF。
14
+
15
+ ## 触发与边界
16
+
17
+ - Triggers:用户要求诊断简历、改简历、补强经历证据、做 JD 匹配,或把已确认的简历导出为 Word/PDF。
18
+ - Do NOT trigger:用户要求代投简历、编造经历或数字、预测面试结果、评估受保护个人属性,或制作复杂设计作品集排版。
19
+
20
+ ## 核心流程
21
+
22
+ 1. 读取简历文件。支持 UTF-8 Markdown、UTF-8 文本、DOCX 和文字层 PDF。
23
+ PDF 解析优先使用本地 PyMuPDF;缺少依赖、加密、损坏或扫描件时明确失败或降级,
24
+ 不生成伪完整报告。
25
+ 2. 运行分析,优先让用户提供目标岗位 JD:
26
+
27
+ ```bash
28
+ python scripts/yotta_resume.py audit --resume resume.md --jd jd.txt --format json
29
+ ```
30
+
31
+ 3. 阅读 `source_manifest`、`parse_warnings`、`issues`、`unknowns` 和 `questions`。
32
+ 先确认输入解析质量、规模、个人边界、结果、日期和 JD 缺口,再修改简历。
33
+ 用户没有确认的事实不要写进简历。
34
+ 4. 按用户确认的信息修改 Markdown,再导出成品:
35
+
36
+ ```bash
37
+ python scripts/yotta_resume.py export --input revised.md --docx revised.docx --html revised.html --pdf revised.pdf
38
+ ```
39
+
40
+ 5. 核对输出文件存在且可打开。PDF 依赖本机 Chromium、Chrome 或 Edge;未找到浏览器时命令会明确失败,不会生成伪 PDF。
41
+
42
+ 6. 需要校验随包岗位族、证据账本、题库、来源和双角色权限契约时运行:
43
+
44
+ ```bash
45
+ python scripts/yotta_resume.py contracts --format json
46
+ ```
47
+
48
+ ## 输出契约
49
+
50
+ - `audit`:JSON 或 Markdown,包含文件来源清单、解析提示、章节识别、要点统计、
51
+ 工具发现、未知项、追问、修改建议、JD 匹配、结构准备度和边界声明。
52
+ - `export`:DOCX / HTML / PDF。三者来自同一份 Markdown 内容模型,联系方式保留在成品简历中。
53
+ - `contracts`:离线校验 `data/` 下的 5 个实际契约与 5 个 JSON Schema,
54
+ 失败返回退出码 `6`,不写文件、不联网。
55
+ - 分析报告:手机号和邮箱会被打码;不承诺 ATS、面试或 Offer 结果。
56
+
57
+ ## 评分与数字护栏
58
+
59
+ - `readiness.score` 的展示名称固定为“结构准备度(规则分)”,
60
+ `score_type` 为 `structure_rule_score`,只反映章节、量化证据、文本清洁度和
61
+ 可选 JD 关键词覆盖,不是招聘方评分。
62
+ - 只能原样引用工具返回的数值;**不得改写为其他数值、主观数字区间或“实际分数”**。
63
+ 需要对招聘方视角作判断时,只允许定性标签并列出简历证据。
64
+ - 未提供 JD 时 `jd_match.coverage` 必须为 `null`,报告写明不能判断岗位匹配。
65
+ - 报告必须区分“工具规则发现”“智能体复核发现”“待用户确认事实”。
66
+ 智能体额外发现不得冒充工具输出,且必须引用简历原文或来源页。
67
+ - 规则不能判断招聘竞争力、面试通过率或 Offer 结果;必须列入 `unknowns`。
68
+
69
+ ## 渐进披露
70
+
71
+ - 详细输入格式、CLI 退出码和浏览器要求见 [references/usage.md](references/usage.md)。
72
+ - 岗位族、题库、来源与 HR 权限契约见 [references/data-contracts.md](references/data-contracts.md)。
73
+
74
+ ## 自检
75
+
76
+ ```bash
77
+ python scripts/test_yotta_resume.py
78
+ python scripts/test_contract_validate.py
79
+ ```
Binary file