# How the Drafter-Reviewer Workflow in `/apply` Improves Job Application Quality

> Discover how the drafter-reviewer workflow in /apply elevates job application quality through PDF validation, ATS text checks, and content refinement. Learn more today.

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

---

**The `/apply` command in MadsLorentzen/ai-job-search uses a multi-stage drafter-reviewer pipeline that enforces PDF layout validation, ATS text-layer verification, and iterative content refinement before any application is submitted.**

The drafter-reviewer workflow goes beyond simple template filling. It treats job applications as engineered artifacts that must satisfy both human recruiters and automated screening systems. This article breaks down exactly how the pipeline achieves that dual compliance, citing the specific source files and verification loops that make it possible.

## How the Drafter-Reviewer Pipeline Works

The workflow splits responsibility between two specialized agents: a **drafter** that generates content and a **reviewer** that validates output quality. This separation of concerns prevents the common failure mode where AI-generated text looks acceptable in preview but fails in production.

### Stage 1: Document Drafting from Structured Templates

The drafter creates a CV and cover letter using your chosen LaTeX or Typst template. It injects candidate data and tailors wording to match keywords found in the job posting.

Unlike static template filling, the drafter makes context-aware adjustments:

- Reorders bullet points to emphasize relevant experience
- Rewrites summary statements to mirror posting language
- Selects which projects to include based on skill overlap

### Stage 2: PDF Verification and Auto-Fix Loop

LaTeX compilation often produces subtle layout defects that hurt professionalism. The reviewer inspects the compiled PDF and automatically applies fixes.

Common issues detected and resolved:

| Problem | Fix Applied |
|---------|-------------|
| Orphaned section headers | `\needspace{3\baselineskip}` insertion |
| Cover letter spilling to page 2 | `\enlargethispage{\baselineskip}` adjustment |
| Font encoding mismatches | Font-wrapper substitution |

This verification loop repeats until the PDF renders cleanly, as documented in [`README.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/README.md) lines 238-239.

### Stage 3: ATS Text-Layer Validation

Many recruiters use Applicant Tracking Systems that parse PDF text rather than viewing rendered pages. The reviewer extracts the text layer using `pdftotext` from poppler-utils and validates:

- Contact details appear correctly and in standard positions
- Reading order matches visual layout (no column scrambling)
- Keyword coverage meets thresholds from the job posting

If keywords are missing, the drafter receives targeted insertion suggestions rather than being told to "add more keywords" generically. This prevents keyword stuffing that triggers spam filters.

The ATS check is implemented in [`README.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/README.md) lines 239-240, with tool requirements noted in [`SETUP.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/SETUP.md) lines 146-152.

### Stage 4: Optional Salary Benchmarking

When a salary data file exists at the expected path, the workflow compares the company's compensation against your market data and surfaces warnings if the offer falls below your configured thresholds. This prevents wasted effort on mismatched opportunities.

See [`tools/README_SALARY_TOOL.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/tools/README_SALARY_TOOL.md) lines 5-7 for file format requirements.

### Stage 5: Iterative Revision with Concrete Edits

The drafter receives structured feedback—specific line edits, tone adjustments, and relevance-weighted cuts—then recompiles. This loop continues until both PDF and ATS checks pass.

The edit schema is defined in [`.claude/commands/apply.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/apply.md), which specifies how the reviewer encodes suggestions for the drafter to apply deterministically.

## Running the `/apply` Workflow

The command accepts multiple input modes and flags to control pipeline behavior.

Apply from a job posting URL:

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

```

Apply from pasted job description text:

```bash
/apply <paste the full job posting text here>

```

Inspect reviewer suggestions without submitting:

```bash
/apply --show-edits

```

Skip salary benchmarking when no data file exists:

```bash
/apply --no-salary

```

## Key Source Files in the Workflow

Understanding these files clarifies how the pipeline enforces quality gates:

- **[`.claude/commands/apply.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/commands/apply.md)** – Defines the drafter-reviewer orchestration and JSON edit schema used for inter-agent communication

- **[`README.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/README.md)** (lines 221-240) – Documents the full `/apply` pipeline including PDF verification and ATS text-layer extraction

- **[`SETUP.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/SETUP.md)** (lines 146-152) – Lists required system dependencies (`pdftotext` from poppler) and optional salary configuration

- **[`tools/README_SALARY_TOOL.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/tools/README_SALARY_TOOL.md)** (lines 5-7) – Explains compensation benchmarking integration

- **[`.claude/skills/job-application-assistant/04-job-evaluation.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/skills/job-application-assistant/04-job-evaluation.md)** (lines 11-13) – Outlines content-quality heuristics consulted during drafting

- **[`.claude/skills/job-application-assistant/08-application-forms.md`](https://github.com/MadsLorentzen/ai-job-search/blob/main/.claude/skills/job-application-assistant/08-application-forms.md)** (lines 7-9) – Describes generation of free-text form fields for non-standard application portals

## Summary

The drafter-reviewer workflow in `/apply` improves application quality through five reinforcing mechanisms:

- **Automated PDF layout repair** fixes LaTeX rendering artifacts before they reach recruiters
- **ATS text-layer verification** ensures machine-parseability of every submitted document
- **Constraint-aware keyword insertion** maximizes relevance without triggering spam filters
- **Salary pre-screening** filters mismatched opportunities early in the process
- **Structured revision loops** guarantee that reviewer feedback produces measurable improvements

By enforcing "review-first, then submit" discipline programmatically, the pipeline eliminates the most common failure modes of self-generated applications: broken formats, scrambled text extraction, and unfocused content.

## Frequently Asked Questions

### What makes the drafter-reviewer pattern better than a single-pass generation?

Single-pass generation optimizes for immediate acceptability. The drafter-reviewer split forces explicit validation against external constraints—PDF structure, ATS parseability, salary fit—that a single agent would likely overlook or trade off against fluency. The separation also enables iterative refinement: the reviewer can request specific, verifiable changes rather than rewriting entirely.

### Does the ATS check require proprietary software or API keys?

No. The ATS validation uses `pdftotext`, an open-source tool from the poppler-utils package. No third-party services or API keys are involved. The text extraction and analysis run locally against rule-based criteria documented in the source files.

### Can I customize the salary thresholds or disable benchmarking entirely?

Yes. Salary benchmarking only activates when a properly formatted data file exists. You can omit the file to disable the check entirely, or use `--no-salary` to skip it for individual runs. Thresholds are defined in your local salary data file, not hardcoded in the workflow.

### What happens if the PDF verification loop cannot fix a layout issue?

The loop applies progressively more aggressive adjustments—spacing tweaks, page size modifications, font substitutions—up to a bounded number of iterations. If unresolvable, the workflow surfaces the specific compilation errors to you rather than submitting a broken document. This failure mode is preferred over silent quality degradation.