How the `/setup` Command Populates the Candidate Profile in AI-Job-Search
The /setup command populates the candidate profile by either ingesting existing documents (Path A), parsing a single CV (Path B), or conducting a guided interview (Path C), then applying an idempotent change-set algorithm that merges new data into canonical skill files without overwriting existing content.
The AI-Job-Search repository by MadsLorentzen provides a structured workflow for automating job applications through Claude Code. At the heart of this system lies the /setup command defined in .claude/commands/setup.md, which transforms raw professional data into a structured candidate profile that serves as the single source of truth for downstream commands like /scrape, /rank, and /apply.
The Four-Layer Onboarding Architecture
The /setup command operates through four logical layers that map directly to the specification in .claude/commands/setup.md. Each layer represents a distinct phase of the profile population pipeline, from initial path selection to final file generation.
Layer 0: Path Selection Logic
Lines 9-31 of the command specification define how the system determines the onboarding method. The command first checks for a --section <name> argument. If provided, it skips the interactive chooser and targets a specific profile component for updates. Otherwise, it inspects the Git remote configuration and the documents/ folder to present three distinct onboarding paths:
- Path A: Read from a populated
documents/folder (recommended for users with existing CVs, LinkedIn exports, or portfolios) - Path B: Import from a single CV file (optimized for quick starts)
- Path C: Guided interview mode (conversational data collection)
Path A: Document Ingestion with Merge Intelligence
Path A represents the most comprehensive ingestion strategy, implemented across six sequential steps that ensure data integrity through intelligent merging:
1. Inventory (Lines 78-94)
The command executes a glob pattern documents/**/* to catalog all existing files, establishing a complete inventory of available source material.
2. Read Existing Skill Files (Lines 96-107)
Before processing new data, the command loads the seven job-application-assistant skill files. This establishes the current state of the candidate profile, enabling the system to detect additive versus conflicting information.
3. Parse Documents (Lines 110-126)
The ingestion engine parses each document type—CVs, LinkedIn exports, diplomas, references, and past applications—extracting structured facts including contact information, education history, work experience, language proficiency, and certifications.
4. Cross-Reference (Lines 130-140)
The system surfaces inconsistencies such as date mismatches or title differences between sources. These conflicts are flagged for user resolution rather than being automatically merged.
5. Build Change Sets (Lines 56-68)
Extracted facts are classified into two categories: additive data (new information not present in existing files) and conflicting data (information that contradicts existing entries). This classification occurs specifically against the baseline established in 01-candidate-profile.md.
6. Present and Confirm
The command displays the proposed change set to the user. Only after explicit approval does the system proceed to write operations, ensuring human oversight of all profile modifications.
Path B: Single CV Import
Defined at Lines 49-57 of the specification, Path B streamlines onboarding for users with a single comprehensive CV. The command parses the supplied document using the same extraction engine as Path A, identifies missing fields in the data model, asks follow-up questions to complete the profile, and proceeds directly to the file generation step without the cross-referencing complexity of multi-document ingestion.
Path C: Guided Interview Mode
Lines 62-122 specify the conversational flow for Path C. The AI conducts a structured interview covering identity, education, experience, skills, career goals, and preferences. Each answer maps directly to a field in the canonical profile schema, building the candidate profile from scratch through dialogue rather than document parsing.
Canonical Profile Generation (Step 3)
Regardless of the ingestion path chosen, Step 3 (Lines 48-71 of the specification) generates or updates eight canonical files that constitute the complete candidate profile:
CLAUDE.md– Overall metadata and assistant configuration01-candidate-profile.md– The core structured profile (primary source of truth)02-behavioral-profile.md– Inferred and stated behavioral traits04-job-evaluation.md– Skill-match scoring criteria and preferences05-cv-templates.md– CV structure and formatting preferences07-interview-prep.md– Interview preparation data and talking pointscv/main_example.tex– LaTeX template with populated placeholderssearch-queries.md– Tailored search queries consumed by the/scrapeagent
The write mechanism employs a read-before-write strategy. It loads existing content, replaces only specific placeholders with new data, and preserves all manual edits made by the user outside the automated workflow.
The Change-Set Algorithm and Idempotent Design
The profile population mechanism relies on a sophisticated merge algorithm centered on .claude/skills/job-application-assistant/01-candidate-profile.md. During Path A ingestion, Step A2 loads the current file state, while Step A5 constructs the change set by comparing extracted facts against this baseline.
Additive facts—such as a newly discovered certification or language skill—are queued for insertion. Conflicting facts—such as two different graduation dates for the same degree—become conflict items requiring user resolution. Step A7 executes writes only for approved additions, ensuring that:
- Re-running
/setupnever creates duplicate entries - Existing manual edits remain intact
- The profile always reflects the most up-to-date information without data loss
This idempotent design makes the /setup command safe to execute repeatedly as the user's career evolves.
Usage Examples
Initiate the full setup workflow with interactive path selection:
/user> /setup
Update only the search query configuration without touching the core profile:
/user> /setup --section search
The assistant responds by detecting the section flag and targeting only .claude/skills/job-scraper/search-queries.md for updates.
Summary
- The
/setupcommand offers three distinct data ingestion paths: multi-document analysis (Path A), single CV import (Path B), and conversational interview (Path C) - Path A employs a six-step process that inventories documents, parses structured data, cross-references for inconsistencies, and builds classified change sets
- The command generates eight canonical files including
01-candidate-profile.md, which serves as the single source of truth for the entire AI-Job-Search workflow - An idempotent change-set algorithm ensures re-running the command never duplicates data and preserves manual edits
- Section-specific updates via
--section <name>allow granular profile maintenance without full re-ingestion
Frequently Asked Questions
What specific files does the /setup command modify?
The command creates and updates eight primary files: .claude/skills/job-application-assistant/01-candidate-profile.md (core profile), 02-behavioral-profile.md, 04-job-evaluation.md, 05-cv-templates.md, 07-interview-prep.md, CLAUDE.md, cv/main_example.tex, and .claude/skills/job-scraper/search-queries.md. All writes use a read-before-write strategy that preserves existing content.
Can I run /setup multiple times without duplicating my data?
Yes. The command implements an idempotent change-set algorithm. It loads existing skill files before processing, classifies new data as either additive or conflicting, and only writes approved additions. Re-running the command with updated documents will merge new facts without creating duplicates of existing entries.
How does the system handle conflicting information between documents?
During Path A ingestion, the cross-reference step (Lines 130-140) detects inconsistencies such as date mismatches or differing job titles. These become conflict items in the change set that require explicit user resolution before writing. The system does not automatically overwrite existing data with conflicting new data.
What is the difference between Path A and Path B ingestion?
Path A analyzes an entire documents/ folder containing multiple files (CVs, LinkedIn exports, diplomas), performs cross-referencing to detect inconsistencies, and builds a comprehensive change set. Path B processes a single CV file, asks follow-up questions for missing fields, and bypasses the complex merge logic, making it faster for users starting with one comprehensive document.
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 →