mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
feat(add-template): make /add-template engine-agnostic (#238)
* feat(add-template): make /add-template engine-agnostic so Typst can register alongside LaTeX /add-template hardcoded a lualatex|xelatex|pdflatex engine enum and .tex assumptions, so custom templates could only be LaTeX. Replace the enum with a declared source extension + compile command, so any toolchain (Typst via `typst compile`, or others) registers the same way stock LaTeX templates did. Stock CV/cover-letter pipeline stays LaTeX and untouched (per #181). Also fixes a latent bug this surfaced: apply.md's compile step ignored the ACTIVE-TEMPLATE block and always ran lualatex/xelatex on .tex regardless of the active template, and .gitignore's cv/main_*.tex pattern would not have ignored a non-.tex draft (personal-data leak). Both now resolve from the declared extension/command. * fix(add-template): satisfy security_guards on the .gitignore Typst fix security_guards.py pins the personal-data ignore rules by exact string and gates negations through an allowlist, so broadening cv/main_*.tex and cover_letters/cover_*.tex to *.* (for .typ drafts) needed a matching update to REQUIRED_IGNORE_RULES. Also tighten the .gitignore itself per review: keep the re-include negations at .tex instead of widening them to *.* too. The stock example files are always LaTeX, so .tex is enough to re-include them, and a wildcard negation would have also re-included build artifacts (main_example.pdf/.aux) that should stay ignored. ALLOWED_IGNORE_NEGATIONS needs no change since the negations are unchanged. Also adds a CHANGELOG entry under Unreleased for the Typst/custom-template support.
This commit is contained in:
@@ -124,7 +124,7 @@ After creating or updating a CV or cover letter, re-read the generated file and
|
||||
|
||||
### Compiled PDF verification (MANDATORY - never skip)
|
||||
Both documents MUST be compiled and visually inspected via the Read tool on the PDF output. "Looks fine in the .tex" is not acceptable - LaTeX page-break decisions are unpredictable. Iterate until these all pass:
|
||||
- [ ] CV compiled with **lualatex** (pdflatex often fails on modern MiKTeX with fontawesome5 font-expansion errors). Cover letter compiled with **xelatex** (cover.cls requires fontspec).
|
||||
- [ ] CV compiled with **lualatex** (pdflatex often fails on modern MiKTeX with fontawesome5 font-expansion errors). Cover letter compiled with **xelatex** (cover.cls requires fontspec). If a custom template is active (registered via `/add-template`), compile with its declared command instead — see the `ACTIVE-TEMPLATE` block in `05-cv-templates.md`/`06-cover-letter-templates.md`.
|
||||
- [ ] **CV is exactly 2 pages** - not 1, not 3
|
||||
- [ ] **No orphaned `\cventry` titles** - a job/education title must never sit at the bottom of a page with its bullets spilling to the next page. Use `\needspace{5\baselineskip}` before each `\cventry` to prevent this, and `\enlargethispage{2-3\baselineskip}` to rescue a trailing section that just barely spills
|
||||
- [ ] **Cover letter is exactly 1 page** - signature block must fit with the body, never overflow
|
||||
|
||||
Reference in New Issue
Block a user