Cv structure

From leopu00/job-hunter-team · View interactive version

Cv structure is an AI agent skill from the GitHub repository leopu00/job-hunter-team. Write the CV markdown that will be PDF'd and reviewed by the Critico. First read the user's ORIGINAL CV in `$JHT_HOME/profile/sources/` to mirror their voice and match the register to the industry (the tech defaults — \"Technical Skills: Python\", metric+tech-in-parens — are wrong for hospitality/sa

How to use this skill

Skill file

cv-structure — the canonical CV layout

Output goes to $JHT_USER_DIR/cv/CV_<Candidato>_<Company>.md (then PDF via pandoc/typst). Path rule: application-flow skill — never write the final CV under $JHT_AGENT_DIR (that's scratch only, T11).

<Candidato> = Nome_Cognome from the profile. <Company> = company name normalised PascalCase, no spaces or slashes (e.g. Acme_Corp → AcmeCorp).

Before you write: read the source, match the register (W-05, 2026-07-01)

candidate_profile.yml is flattened data, not voice. Before drafting, read the user's original CV in $JHT_HOME/profile/sources/ (the PDF/doc they uploaded) plus $JHT_HOME/profile/summaries/. Two reasons:

| Profile family | Section 4 name | Bullet style | About Me |

|---|---|---|---|

| Tech / engineering | Technical Skills (Languages, Backend, Data, Infra) | metric in bold + tech in parens | factual, numbers |

| Client-facing / hospitality / retail / care | Skills & Strengths (NO programming languages) | concrete result + context in parens (place, scale, clientele); warmth allowed | credible + a human touch, mirroring the original |

| Sales / business | Core Skills | metric in bold (revenue, targets) + tools in parens | outcome-driven |

| Creative / design | Skills & Tools + portfolio link | outcome + medium in parens | voice-forward |

Never put a "Technical Skills / Languages: Python…" table on a hospitality, sales or care CV. Tone is set by both the JD (company type, below) and the candidate's industry register.

The 6 sections (fixed order, max 2 pages)

| # | Section | Length | Content |

|---|--------------------|---------------|--------------------------------------------------------------------------------------------------|

| 1 | Header | 4-6 lines | Name, role title aligned to the JD, contacts (email/phone/LinkedIn/GitHub), languages (CEFR) |

| 2 | About Me | 2-3 lines | Concrete credibility. NEVER generic phrases ("passionate about", "results-driven") |

| 3 | Experience | 4-5 sub | Each sub = one experience, mapped to one specific JD requirement. Bullets: metric + tech |

| 4 | Technical Skills | 1 table | Matches JD keywords. Only tech actually documented in the profile. |

| 5 | Education | 2-4 lines | Exact titles from the profile. Don't apologise for missing degrees. |

| 6 | Side Projects | 0-3 sub | Only if they reinforce the JD fit. Skip the section entirely if nothing fits. |

Section 1 — Header

# <Nome Cognome>
**<Role title aligned to the JD>** · <City, Country>
✉️ <email> · 📱 <phone> · 🔗 linkedin.com/in/<handle> · 💻 github.com/<handle>
🗣 <Lingua1 (level)>, <Lingua2 (level)>

Adapt the role title: if the JD says "Backend Engineer (Python)" use that, not the generic profile target. Stay truthful — never claim a seniority you don't have.

Languages appear ONCE. Put spoken languages on the Header 🗣 line and nowhere else — do NOT restate them at the end of About Me and do NOT add a "Languages" row in the Skills table. (The beta-3 betaD CVs listed the 4 languages 3× on one page: Header + About + Skills. One place only.) Exception: if the JD makes a specific language a core selected requirement, keep it in Skills and drop the generic list from the Header — still one place.

Section 2 — About Me

2-3 lines. The user is a real person who has done real things; show that in 30-50 words. Banned phrases:

| ❌ Banned | ✅ Replace with |

|----------------------------------------|--------------------------------------------------------------|

| "Passionate about <X>" | a fact: "5 years building <X> in production" |

| "Results-driven professional" | a number: "Reduced p95 latency 320ms → 110ms across 3 services" |

| "Looking for an opportunity to grow" | drop entirely; the application itself signals that |

| "Detail-oriented team player" | give an example or omit |

Section 3 — Experience

The hardest section. Each sub-block is one experience mapped to one JD requirement.

### <Role> @ <Company> — <Mar 2022 – present>
- **Reduced cold-start time 4.2s → 0.8s** rewriting the bootstrap layer (Python, asyncio, uvloop)
- **Shipped 3 customer-facing data products** owning the full stack (FastAPI, Postgres, dbt, Airflow)
- **Mentored 2 junior backend engineers** through their first production incidents

Bullet rules:

Action verbs

| ✅ Use | ❌ Banned |

|-------------------------------------------------------|---------------------------------|

| Built, Architected, Shipped, Engineered, Reduced, | learned, studied, assisted, |

| Migrated, Designed, Owned, Mentored, Scaled, Cut | helped, was involved in, |

| | participated in, was responsible for |

Banned verbs signal a junior/uncertain voice. Use the active list even when the role was junior — focus on what you delivered, not what you did.

Section 4 — Skills (name + content by register)

The section title and contents depend on the profile family — see "read the source, match the register" above. Tech role → Technical Skills (table example below). Client-facing / non-tech → rename it (Skills & Strengths / Core Skills) and never list programming languages.

A 2-column markdown table that mirrors the JD's keyword list. Only skills/tech the profile actually documents. Inventing a tool you don't know is an instant fail in the Critic's review (and a real-world recruiter kill). The Python, Go, Bash example below is tech-only — do not paste it onto a non-tech CV.

| Area              | Stack                                                  |
|-------------------|--------------------------------------------------------|
| Languages         | Python, Go, Bash                                       |
| Backend           | FastAPI, Django, gRPC                                  |
| Data              | PostgreSQL, Redis, dbt, Airflow                        |
| Infra             | Docker, GitHub Actions, AWS (EC2, S3, RDS)             |

Categories should match what the JD emphasises. If the JD never mentions infra, drop or compress that row.

Section 5 — Education

### <Degree>, <Institution> — <Year>
<one-line note: GPA only if > 28/30 ≈ 3.5/4, thesis title only if relevant to the JD>

If the candidate has no degree:

Section 6 — Side Projects (optional)

Include ONLY if a project clearly reinforces the JD fit. Same bullet pattern as Experience.

### <Project name> — <github link>
- **<metric / outcome>** (<tech stack>)
- One-line description of what it does and why it's relevant

If nothing fits, skip the section entirely. Empty padding signals lack of substance.

Tone by company type (from JD signals)

| Company type | Tone | Signals in JD |

|--------------|-----------------------------------------------|--------------------------------------------------------------|

| Startup | Confident, ownership-heavy, direct, action verbs first | "fast-paced", "wear many hats", "early-stage", small team size |

| Corporate | Professional, structured, process-aware | "stakeholders", "cross-functional", larger team, well-defined process |

| Fintech / regulated | Compliance-aware, precise, cite frameworks (PCI-DSS, SOC 2, ISO 27001) | mentions of audits, regulators, compliance teams |

| Agency | Versatile, client-facing, breadth over depth | "varied projects", "client-facing", "delivery" |

Don't overdo it — tone is a colour, not a costume. The bullets stay factual either way.

Cover Letter (only if the JD asks)

Default: don't write one. Token + time saved. Write it ONLY if the JD explicitly mentions it ("please include a cover letter", "tell us why you want this role").

Length: 250-400 words. Path: $JHT_USER_DIR/allegati/CoverLetter_<Candidato>_<Company>.{md,pdf}.

PDF title: "Cover Letter", NEVER "CV". The cover letter is its own document — generate it with its own title metadata. Do NOT reuse the CV pandoc command (which hardcodes --metadata pagetitle="CV …"): that is exactly the bug that shipped 31 beta-3 cover letters whose document title read "CV betaD".

pandoc "$COVER_MD" -o "$COVER_PDF" \
       --pdf-engine=wkhtmltopdf \
       -c /app/shared/skills/pdf_layout_base.css --self-contained \
       -V papersize=A4 -V margin-top=11mm -V margin-bottom=11mm \
       -V margin-left=15mm -V margin-right=15mm \
       --metadata pagetitle="Cover Letter $CANDIDATO"

The # <Nome Cognome> heading at the top of the cover-letter markdown is the candidate's name (not "CV") — keep it, and let the pagetitle above say "Cover Letter". Same base CSS and margins as the CV: without them the letter is squeezed into the same 36em column.

Opening (direct, NOT "I am writing to express my interest"):
"I'm applying for <role> because <3-4 concrete proofs that match the JD>."

Middle (1-2 paragraphs):
- One specific past achievement that maps to the JD's main pain point
- One thing you noticed about the company that goes beyond their landing page

Close:
- One forward-looking line: what you'd want to do in the first 90 days
- "Happy to discuss this in more detail."

Banned in cover letters:

PDF generation — engine + atomic write + DB UPDATE (W-03, bug #26)

Engine: `wkhtmltopdf` (NON typst, NON fpdf2)

Decisione tecnica 2026-05-18 dopo indagine "CV estetica semplificata":

nel container. Produce CV professionali HTML+CSS, 2 pagine, ~30 KB

(output identico ai CV "belli" del 16 maggio).

pandoc 2.17 del container (richiederebbe pandoc 3.x). Errore

storico nella skill, segnalato 2026-05-18.

minimalista 80% casi semplici. Per CV user-facing produce layout

spartano 1 pagina, niente CSS, niente spacing fine.

attached with its text squeezed into the middle of the sheet). pandoc's HTML

template caps the body at max-width: 36em, centred with 50px padding, and

wkhtmltopdf ignores @page margins: a 9.3pt <style> came out as a ~41%

column and still passed the size + Producer gate. So the render command

ALWAYS loads /app/shared/skills/pdf_layout_base.css (-c … --self-contained)

and passes the margins to wkhtmltopdf (-V margin-*). In the .md <style>

never set max-width, margin: auto or body padding, and do not rely on

@page. pdf_layout_check.py then measures the result: text ≥ 75% of the

usable width on every page, 1–2 pages, no nearly empty page, fonts embedded, body font printed ≥ 9.5pt.

The historical anti-pattern: generate the PDF straight into

$JHT_USER_DIR/cv/, then run `db_update.py application --cv-pdf-path

...` separately. If the Sentinel killed the Writer between the two

steps (EMERGENZA freeze 2026-05-17 04:43), the PDF stayed on disk but

the DB had cv_pdf_path=NULL. Sisal 7.5/10 PASS became *"CV da

scrivere"* on the dashboard for the user — invisible top opportunity.

Fix: tempfile + size gate + atomic mv + single-shot UPDATE. If the

UPDATE fails, remove the final file so we don't leave an orphan.

# Final filename includes position_id so 2 openings @ same company don't collide (bug #25)
SRC_MD="$JHT_USER_DIR/cv/CV_${CANDIDATO}_${POSITION_ID}_${COMPANY_SLUG}_${TITLE_SLUG}.md"
FINAL_PDF="$JHT_USER_DIR/cv/CV_${CANDIDATO}_${POSITION_ID}_${COMPANY_SLUG}_${TITLE_SLUG}.pdf"
TMP_PDF="$(mktemp -t cv_${POSITION_ID}.XXXXXX.pdf)"

# ── PREFLIGHT ─────────────────────────────────────────────────────────
# Verifica esplicita che l'engine sia disponibile PRIMA di pandoc.
# Senza, in caso di skill obsoleta (typst che non c'è, pandoc 3.x che
# manca, …) lo Scrittore eseguiva il comando, fallba, improvvisava
# fallback random → CV brutti del 2026-05-18 mattina.
if ! command -v pandoc >/dev/null 2>&1 || ! command -v wkhtmltopdf >/dev/null 2>&1; then
  echo "[cv-structure] ABORT preflight: wkhtmltopdf non disponibile."
  echo "  NEVER fallback a pdf_gen.py / fpdf2 per CV (output brutto)."
  echo "  Riportare il problema al Capitano via [REPORT] e ABORT."
  exit 2
fi

# 1. Render via pandoc → html → wkhtmltopdf (engine vincente, 32 KB / 2 pag).
#    Base CSS resets pandoc's 36em column; -V margin-*: wkhtmltopdf ignores @page.
#    pagetitle (not title) sets <title> without printing a "CV …" header.
pandoc "$SRC_MD" -o "$TMP_PDF" \
       --pdf-engine=wkhtmltopdf \
       -c /app/shared/skills/pdf_layout_base.css --self-contained \
       -V papersize=A4 -V margin-top=11mm -V margin-bottom=11mm \
       -V margin-left=15mm -V margin-right=15mm \
       --metadata pagetitle="CV $CANDIDATO"

# ── GATE POST-RENDER: size + Producer ─────────────────────────────────
# DUE check obbligatori. NESSUNO dei due è opzionale.
#
# Check A) size: < 20 KB indica engine sbagliato (fpdf2 ~22 KB ma 1 pag
# spartana, wkhtmltopdf ≥30 KB con HTML+CSS pieno). Soglia 20 KB OK per
# distinguere.
size=$(stat -c%s "$TMP_PDF" 2>/dev/null || stat -f%z "$TMP_PDF")
if [ ! -s "$TMP_PDF" ] || [ "$size" -lt 20000 ]; then
  echo "[cv-structure] ABORT post-render: PDF $size B sospetto (atteso ≥20 KB)."
  echo "  Probabile engine sbagliato (fpdf2 minimalista invece di wkhtmltopdf)."
  rm -f "$TMP_PDF"
  exit 3
fi

# Check B) Producer: deve essere wkhtmltopdf (= 'Qt 5.15.8' o simile).
# Se è 'fpdf2' / vuoto / '?', l'engine NON era wkhtmltopdf — il PDF
# uscirà comunque ma sarà brutto. ABORT loud così il Capitano vede.
producer=$(python3 -c "
from pypdf import PdfReader
import sys
try:
    r = PdfReader('$TMP_PDF')
    m = r.metadata or {}
    print(m.get('/Producer', ''))
except Exception as e:
    print('?'); sys.exit(1)
" 2>/dev/null)
case "$producer" in
  *Qt*)
    : # OK, wkhtmltopdf ha lavorato
    ;;
  *)
    echo "[cv-structure] ABORT post-render: Producer='$producer' (atteso 'Qt 5.x.x')."
    echo "  L'engine reale NON era wkhtmltopdf — output non professionale."
    rm -f "$TMP_PDF"
    exit 4
    ;;
esac

# Check C) layout: size and Producer prove the engine, not where the text sits.
# pdf_layout_check.py measures it (≥75% of the usable width on every page, 1-2
# pages, no nearly empty page, fonts embedded, body ≥ 9.5pt). Exit 1 or 2: ABORT.
if ! python3 /app/shared/skills/pdf_layout_check.py "$TMP_PDF"; then
  echo "[cv-structure] ABORT post-render: layout bad (pdf_layout_check.py) — fix the .md and re-render."
  rm -f "$TMP_PDF"
  exit 5
fi

# 3. Atomic move + UPDATE in sequence; rollback se UPDATE fallisce
mv "$TMP_PDF" "$FINAL_PDF"
if ! python3 /app/shared/skills/db_update.py application "$POSITION_ID" \
        --cv-pdf-path "$FINAL_PDF" --written-at now; then
  echo "[cv-structure] UPDATE DB fallita, rimuovo PDF per non lasciare orfani"
  rm -f "$FINAL_PDF"
  exit 1
fi

Exit codes:

Il Dottore via cv-disk-audit healthcheck (bug #18) ricollega eventuali

orfani disk↔DB; in più ora segnala anche i CV con Producer non-Qt come

"engine sbagliato — rigenerare".

Pre-generation status gate (W-04, bug #26)

Before running pandoc, verify the position is still scoring-grade.

Sometimes the Analyst marks excluded after the Writer has claimed

the position (race condition) and the Writer keeps writing — 3 CV

sprecati su Canonical ContainerImages / K8s / Deloitte nei dump del

2026-05-17.

status=$(python3 /app/shared/skills/db_query.py position "$POSITION_ID" --field status)
case "$status" in
  excluded|rejected)
    echo "[cv-structure] position #$POSITION_ID is $status, skipping CV generation"
    exit 0
    ;;
esac

Hard rules

Anti-patterns

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.