How the AI Job Search Framework Orchestrates Job Application Workflows: A 6-Step Pipeline
The AI Job Search Framework runs a deterministic, six-step pipeline that transforms raw job postings into polished, ATS-ready application packages through automated drafting, multi-agent review, and verified PDF compilation.
The MadsLorentzen/ai-job-search repository implements a comprehensive workflow orchestration system that handles every stage of modern job applications. This framework treats job postings as untrusted input and executes a rigorous, auditable process to generate tailored CVs, cover letters, and submission-ready documents while maintaining strict factual grounding.
The 6-Step Application Pipeline
The orchestration logic lives in .claude/commands/apply.md and executes sequentially through distinct agent roles. Each step produces concrete artifacts that feed into the next stage, creating a traceable chain from raw posting to final submission.
Step 0: Parse Input and Fetch Posting
The workflow begins with the Drafter agent determining whether the input is a URL or raw text. If a URL is detected, the system invokes WebFetch to retrieve the posting, falling back to curl-based retries if necessary. The agent extracts core structured fields including company name, role title, location, deadline, and language, then stores the raw posting for archival purposes.
# Step 0 – fetch posting (simplified)
if arguments.startswith("http"):
posting = WebFetch(arguments) # uses internal fetch tool
else:
posting = arguments # raw text supplied
Step 1: Evaluate Fit and Benchmark Salary
The Drafter loads the candidate profile from 01-candidate-profile.md and the evaluation framework from 04-job-evaluation.md. Optionally, the system executes salary_lookup.py to fetch market salary data for the target company, adding competitive benchmarking to the analysis. The agent produces a fit score and requires explicit user confirmation before proceeding to document generation.
# Step 1 – run salary lookup (optional)
if tool_available("salary_lookup.py"):
salary_json = subprocess.check_output([
"python", "salary_lookup.py", company, "--json"
])
salary = json.loads(salary_json)
Step 2: Draft CV and Cover Letter
Using active template definitions from 05-cv-templates.md and 06-cover-letter-templates.md, the Drafter resolves custom extensions and reads the most recent CV and cover letter files to understand structural requirements. The agent generates new drafts at specific filepaths (cv/main_<company>_<role>.<ext> and cover_letters/cover_<company>_<role>.<ext>), keeping all content in memory for the subsequent review phase.
Step 3: Research and Critique via Reviewer Agent
The system spawns a fresh Reviewer agent with general-purpose capabilities. This agent receives the drafts inline along with the posting text, then executes three parallel functions: researching the company (cache-first, then WebSearch/WebFetch), performing a factual-grounding audit against 01-candidate-profile.md, cv/main_example.tex, and CLAUDE.md, and returning structured JSON edits plus narrative feedback.
# Step 3 – spawn reviewer with inline drafts
review_prompt = f"""
You are a hiring‑manager proxy …
<CV_DRAFT file="{cv_path}">{cv_text}</CV_DRAFT>
<COVER_LETTER_DRAFT file="{cover_path}">{cover_text}</COVER_LETTER_DRAFT>
<JOB_POSTING>{posting}</JOB_POSTING>
"""
reviewer_output = Agent.run(prompt=review_prompt)
edits, suggestions = parse_review_output(reviewer_output)
Step 4: Apply Structured Feedback
The Drafter executes the JSON edits using the Edit tool, then manually incorporates narrative suggestions regarding missing keywords, company-specific angles, and tone adjustments. The framework strictly prohibits fabricating new facts during this revision phase—all changes must align with the single source of truth established in the candidate profile and master documents.
Step 5: Compile PDFs and Verify ATS Compatibility
The Drafter compiles documents using LaTeX commands (lualatex or xelatex depending on template requirements), inspects output PDFs for layout correctness, and runs the ATS verification script tools/verify_pdf.py. The system performs keyword-coverage checks and dumps text extractions to verify machine readability. Any layout or extraction failures trigger iterative editing and re-compilation cycles until the documents pass verification.
# Step 5 – compile PDFs (stock LaTeX commands)
subprocess.run(["lualatex", "-interaction=nonstopmode", cv_tex])
subprocess.run(["xelatex", "-interaction=nonstopmode", cover_tex])
# Step 5b – ATS verification
subprocess.run([
"python", "tools/verify_pdf.py",
f"cv/{cv_pdf}", "--dump-text", f"cv/{cv_txt}"
])
Step 6: Output Generation and Tracker Updates
The final stage executes the global verification checklist defined in CLAUDE.md, summarizes key tailoring decisions, and updates the central job_search_tracker.csv with application details, deadlines, and status. The system archives the raw posting to documents/applications/<company>_<role>/job_posting.md for future reference and audit trails.
Key Orchestration Components
The AI Job Search Framework relies on specific files within the repository structure to maintain consistency and accuracy across the workflow:
.claude/commands/apply.md– The master specification defining the six-step pipeline and agent handoffs.claude/skills/job-application-assistant/*.md– Source files containing candidate profiles, evaluation frameworks, and template definitionssalary_lookup.py– Optional market data tool used during fit evaluationtools/verify_pdf.py– ATS-layer verification ensuring PDFs maintain text extraction compatibilitycv/main_example.tex– Baseline CV providing factual grounding for dates, roles, and metricsjob_search_tracker.csv– Central CSV database recording every application status and deadline
Safety and Verification Mechanisms
The framework implements a single-source-of-truth architecture where every factual claim must trace back to one of three files: the candidate profile, the master CV, or CLAUDE.md. This design treats job postings as untrusted data, preventing the execution of hidden instructions or hallucinated qualifications. The multi-agent review process separates drafting from critique, ensuring objective quality assessment before compilation. PDF generation includes automated ATS verification through verify_pdf.py, preventing submission of unscannable documents that would fail automated screening systems.
Summary
- The AI Job Search Framework executes a deterministic 6-step pipeline through the
/applycommand defined in.claude/commands/apply.md - Drafter and Reviewer agents alternate between content generation and critical evaluation, with the Reviewer conducting independent research and factual audits
- Factual grounding requires all claims to originate from
01-candidate-profile.md,cv/main_example.tex, orCLAUDE.md - ATS verification via
tools/verify_pdf.pyensures compiled PDFs remain machine-readable before submission - The system maintains complete traceability through
job_search_tracker.csvand archived posting files for audit purposes
Frequently Asked Questions
What triggers the job application workflow in the AI Job Search Framework?
The workflow triggers through the /apply command, which accepts either a job posting URL or raw text as its argument. When invoked, the system immediately executes Step 0 to parse the input and fetch the posting content, beginning the deterministic six-stage pipeline.
How does the framework ensure factual accuracy in generated documents?
The framework enforces a single-source-of-truth policy requiring every factual claim to trace back to 01-candidate-profile.md, cv/main_example.tex, or CLAUDE.md. The Reviewer agent explicitly audits drafts against these three files during Step 3, and the system prohibits fabricating new information when applying feedback in Step 4.
What tools does the framework use for PDF compilation and ATS verification?
The system uses standard LaTeX compilers including lualatex and xelatex for document generation, with specific commands determined by template requirements. For ATS verification, the framework runs tools/verify_pdf.py to dump text extractions and validate machine readability before finalizing documents.
How does the framework track completed job applications?
Upon completion of Step 6, the system updates job_search_tracker.csv with application metadata including company name, role, deadline, and current status. It simultaneously archives the raw posting to documents/applications/<company>_<role>/job_posting.md, creating a permanent record that feeds downstream commands like /rank, /interview, and /outcome.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →