# Drafter-Reviewer Workflow for Job Applications: A Complete Technical Guide

> Learn the drafter-reviewer workflow for job applications. This AI pipeline creates ATS-friendly PDFs from job postings via collaborative drafting and critique. Get your technical guide now.

- Repository: [Mads Lorentzen/ai-job-search](https://github.com/MadsLorentzen/ai-job-search)
- Tags: how-to-guide
- Published: 2026-07-09

---

**The drafter-reviewer workflow is a seven-step, two-agent AI pipeline that transforms raw job postings into polished, ATS-compatible PDF applications through collaborative drafting, independent critique, and LaTeX compilation.**

The MadsLorentzen/ai-job-search repository automates job application creation using a sophisticated drafter-reviewer workflow that mimics human editorial processes. This system employs a primary drafter agent to generate tailored CVs and cover letters, then spawns a secondary reviewer agent to provide concrete edits and narrative feedback before final PDF compilation.

## Step-by-Step Workflow Execution

### Step 0: Input Parsing

The workflow begins by parsing the input through the `/apply` command defined in [`.claude/commands/apply.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/apply.md). The system accepts either a URL (processed via WebFetch) or raw text, extracting company name, role, location, and language.

### Step 1: Fit Evaluation (Drafter)

The drafter agent evaluates candidacy using [`01-candidate-profile.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/01-candidate-profile.md) and the evaluation framework in [`04-job-evaluation.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/04-job-evaluation.md). Optionally, it queries [`salary_lookup.py`](https://github.com/MadsLorentzen/ai-job-search/blob/main/salary_lookup.py) for benchmark data. The agent presents a fit score and awaits user confirmation before proceeding.

### Step 2: Document Drafting (Drafter)

Upon approval, the drafter creates tailored LaTeX documents: a CV at `cv/main_<company>.tex` and a cover letter at `cover_letters/cover_<company>_<role>.tex`. These follow templates from [`05-cv-templates.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/05-cv-templates.md) and [`06-cover-letter-templates.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/06-cover-letter-templates.md) while adhering to the [`03-writing-style.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/03-writing-style.md) guidelines.

### Step 3: Independent Review (Reviewer)

A fresh Claude-Code agent spawns as the reviewer. It receives drafts inline (without file reads) and conducts company research using WebSearch and WebFetch. The reviewer analyzes the candidate profile, behavioral profile, and writing-style guide, returning **Part A** (JSON-encoded concrete edits) and **Part B** (narrative suggestions).

### Step 4: Revision Application (Drafter)

The drafter applies Part A edits using the Edit tool and addresses Part B suggestions manually. This includes adding missing keywords, weaving company-specific angles, rephrasing passive language, and adjusting tone according to the behavioral profile.

### Step 5: PDF Compilation and Layout Verification

The drafter compiles PDFs using `lualatex` for CVs and `xelatex` for cover letters. It verifies layout constraints including exact page counts, no orphaned titles, and correct bullet fonts. If issues appear, the `.tex` files are edited and recompiled iteratively until clean.

### Step 5d: ATS Verification

The system extracts the PDF text layer using `pdftotext` to verify ATS compatibility. Checks include contact detail presence, logical reading order, and keyword coverage against the original posting.

### Step 6: Final Delivery

The workflow presents the final output alongside the full verification checklist from [`CLAUDE.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/CLAUDE.md). It lists generated files and reminds the user to submit the application or log outcomes using `/outcome`.

## Quality Assurance Mechanisms

The workflow guarantees four critical quality dimensions:

- **Content Quality**: A second agent adds company research and independent critique to eliminate bias.
- **Layout Reliability**: Mandatory LaTeX compilation with visual inspection enforces professional formatting.
- **ATS Compatibility**: Text extraction confirms machine-readable content and keyword coverage.
- **Integrity**: The system acknowledges skill gaps honestly rather than fabricating experience.

## Running the Workflow

Trigger the pipeline from the CLI:

```bash

# After setting up your profile with /setup …

/apply https://jobindex.dk/job/1234567

```

The conceptual flow in Python pseudocode:

```python
def apply(job_input):
    posting = fetch_or_use_raw(job_input)           # Step 0

    fit = evaluate_fit(posting)                     # Step 1 (drafter)

    if not user_confirms(fit): return

    cv_tex, cover_tex = draft_documents(posting)    # Step 2 (drafter)

    review = reviewer_agent(cv_tex, cover_tex, posting)  # Step 3

    cv_tex, cover_tex = apply_review_edits(cv_tex, cover_tex, review)  # Step 4

    compile_pdf(cv_tex)      # Step 5a – lualatex

    compile_pdf(cover_tex)   # Step 5a – xelatex

    while not layout_is_clean(cv_tex, cover_tex):
        edit_tex_for_layout(cv_tex, cover_tex)      # iterate until clean

    ats_check(cv_tex)         # Step 5d

    present_final(cv_tex, cover_tex)                # Step 6

```

Reviewer edits use structured JSON:

```json
[
  {
    "file": "cv/main_acme.tex",
    "old_string": "Led a team of 5 engineers",
    "new_string": "Led a cross‑functional team of 5 engineers delivering data‑pipeline projects",
    "reason": "Adds keyword ‘data‑pipeline’ required by the posting"
  }
]

```

## Summary

- The drafter-reviewer workflow splits application generation between a drafting agent and a reviewing agent to ensure quality and accuracy.
- The seven-step process spans input parsing, fit evaluation, document drafting, independent review, revision, PDF compilation, and ATS verification.
- LaTeX templates ([`05-cv-templates.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/05-cv-templates.md), [`06-cover-letter-templates.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/06-cover-letter-templates.md)) and style guides ([`03-writing-style.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/03-writing-style.md)) enforce consistent formatting.
- Verification includes both visual PDF inspection and automated text extraction via `pdftotext` to confirm ATS compatibility.
- All workflow logic is defined in [`.claude/commands/apply.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/apply.md) within the MadsLorentzen/ai-job-search repository.

## Frequently Asked Questions

### How does the reviewer agent differ from the drafter agent?

The reviewer is a completely fresh Claude-Code instance that receives drafts inline without accessing the original files. It conducts independent company research and returns structured feedback as JSON-encoded edits (Part A) and narrative suggestions (Part B), providing an unbiased critique that the drafter cannot self-generate.

### What LaTeX engines does the workflow use for PDF generation?

The drafter uses `lualatex` to compile CVs and `xelatex` for cover letters. The system iteratively recompiles and edits `.tex` files until layout constraints—such as exact page counts and font consistency—are satisfied.

### How does the workflow ensure ATS compatibility?

After PDF generation, the system runs `pdftotext` to extract the text layer and verifies contact details, reading order, and keyword coverage against the original job posting. This ensures the document parses correctly in applicant tracking systems.

### Where is the drafter-reviewer workflow defined in the repository?

The complete procedure is documented in [`.claude/commands/apply.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/apply.md), with high-level overviews in the README.md section "How `/apply` works". Supporting frameworks reside in `.claude/skills/job-application-assistant/`, including [`04-job-evaluation.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/04-job-evaluation.md) for fit scoring and [`03-writing-style.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/03-writing-style.md) for tone guidelines.