Metadata-Version: 2.4
Name: evidence-resume-tailor
Version: 0.1.0
Summary: Generate and tailor one-page RenderCV resume PDFs from local source material.
Project-URL: Repository, https://github.com/the-Drunken-coder/resume-generator
Project-URL: Issues, https://github.com/the-Drunken-coder/resume-generator/issues
License: MIT License
        
        Copyright (c) 2026
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: cli,cv,pdf,rendercv,resume
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business
Classifier: Topic :: Text Processing :: Markup
Requires-Python: >=3.12
Requires-Dist: beautifulsoup4>=4.12
Requires-Dist: httpx>=0.28
Requires-Dist: rendercv[full]<3.0,>=2.8
Requires-Dist: ruamel-yaml>=0.19
Description-Content-Type: text/markdown

# Resume Generator

Generate and tailor one-page resume PDFs from RenderCV YAML.

The package provides two CLI paths:

- Render an existing RenderCV YAML file to PDF.
- Tailor a resume from a public job URL and local Markdown source material, then validate generated claims before rendering.

## Install

```bash
uv tool install evidence-resume-tailor
```

For local development:

```bash
uv sync
```

## Render A Resume

```bash
uv run resume-generator examples/basic.yaml
```

The PDF is written to:

```text
output/resumes/basic.pdf
```

RenderCV also writes a `.typ` build artifact next to the PDF. Generated resumes are capped at one page; oversized PDFs fail the command so the resume stays targeted. When local PDF rasterization is available, the CLI also reports page fill, for example `88% page height reached`.

The render command can also be called explicitly:

```bash
uv run resume-generator render examples/basic.yaml --output-dir output/resumes
```

Use `--keep-supporting-formats` when you also want RenderCV's Markdown and HTML outputs.

## Tailor A Resume

The tailoring flow uses local Markdown files as the source of truth, fetches a public job page, asks Codex CLI to produce structured tailored resume content, validates generated resume claims against cited source text, then renders the final one-page PDF with RenderCV.

```bash
uv run resume-generator tailor \
  --job-url "https://company.com/jobs/123" \
  --content-dir content \
  --out-dir generated/company-role
```

Artifacts are written under the output directory:

```text
job.md
prompt.md
tailored_resume.json
resume.yaml
evidence.json
resume.pdf
resume.typ
```

Each run writes to a staging directory first. Existing final artifacts are only replaced after evidence validation and one-page PDF rendering both succeed. If a valid one-page draft uses too little vertical space, the tailor flow gives Codex one bounded revision attempt with the measured page-use percentage and asks it to add only stronger job-matched, evidence-backed content. If a run fails after writing diagnostics, the CLI reports the staging path.

Tailoring requires the `codex` CLI to be installed and authenticated. Plain YAML rendering does not require Codex.

## Local Source Material

Put private source material in Markdown files under `content/`. Nested folders are fine, and each file becomes an evidence source keyed by its relative path.

```text
content/
  profile.md
  projects/
    resume-generator.md
```

Optional YAML frontmatter is supported:

```markdown
---
kind: project
---

Built a RenderCV-based resume generator.
```

The AI is instructed to use only these files and to choose only the strongest material for the specific job. Substantive generated resume claims in summaries, highlights, bullet-style entries, section fields such as company/project names and dates, skill details, and `cv.headline` must be cited in `evidence.json`. Short display labels such as skill group names are treated as presentation, not claims. The validator also checks that cited source files contain the claim or the claim's key terms and numbers; otherwise the PDF render is blocked.

`content/`, `generated/`, `output/`, `tmp/`, and PDF/Typst render artifacts are ignored by git so personal material stays local by default.

## Development

```bash
uv run pytest
uv build --wheel --sdist
```

To verify the local Codex CLI integration:

```bash
RUN_LIVE_CODEX_SMOKE=1 uv run pytest tests/test_codex_smoke.py
```

## Release Automation

The repository includes a GitHub Actions workflow that can publish to PyPI through trusted publishing.

The scheduled publish workflow runs around 1:00 AM Eastern. It checks package-relevant files against the most recent `v*` tag. If no package changes are found, it exits without publishing. If package changes are found, it bumps the patch version, commits the version update, creates a tag, builds the wheel and source distribution, publishes to PyPI, and creates a GitHub release.

PyPI trusted publishing must be configured for this repository before the first automated publish can succeed. Configure the PyPI project with:

```text
PyPI Project Name: evidence-resume-tailor
Owner: the-Drunken-coder
Repository name: resume-generator
Workflow filename: publish.yml
Environment name: pypi
```

If the PyPI project does not exist yet, create a pending trusted publisher with the same values in PyPI before running the workflow.
