How Interview Questions Are Mapped to STAR-Format Examples in the AI Job Search System
The system maps interview questions to STAR-format examples by matching behavioral competencies against "Use for" tags in the skill files, falling back to drafting new answers from verified candidate profile data when no existing example covers the question.
The MadsLorentzen/ai-job-search repository implements a rigorous interview preparation pipeline that transforms raw job postings into structured STAR-format responses. This mapping process ensures every behavioral interview question connects to concrete, evidence-based examples drawn from the candidate's actual experience. The workflow centers on the .claude/commands/interview.md command file, which orchestrates data from multiple sources to build a comprehensive prep-pack.
The Three-Pillar Data Architecture
The interview command aggregates three distinct data sources to construct the preparation pack:
- The application archive located at
documents/applications/<company>_<role>/, containing the job posting, CV, cover letter, and recorded feedback. - Company research cached from
04-job-evaluation.mdor freshly fetched if the cache is stale. - Ready-made STAR examples stored in
.claude/skills/job-application-assistant/07-interview-prep.md.
This triangulated approach ensures that every STAR example is contextually relevant to both the specific role and the target company culture.
Tag-Based Question-to-STAR Mapping
The crucial mapping logic resides in section 2 of the interview command (source line 64). The system extracts likely behavioral questions from the job posting and attempts to match them against the "Ready-Made STAR Examples" section of 07-interview-prep.md.
Matching via "Use for" Tags
Each STAR example in the skill file contains "Use for" tags that indicate which behavioral competency or interview question it addresses. When a question from the posting matches one of these tags, the corresponding STAR example is immediately attached to the prep-pack. This guarantees that the candidate rehearses answers grounded in real, documented experience rather than generic responses.
Drafting New STAR Answers from Profile Data
When no existing STAR example covers a specific question (lines 66-67), the system constructs a draft answer on-the-fly using only factual data from .claude/skills/job-application-assistant/01-candidate-profile.md. The drafting process arranges verified profile facts into Situation-Task-Action-Result clauses without invention or hallucination. The draft is offered for inclusion in 07-interview-prep.md only after explicit user approval.
Handling Incomplete STAR Candidates
When the /setup command previously executed, it may have generated STAR candidate stubs—incomplete examples awaiting manual completion. The interview command surfaces these stubs (source line 67) so users can fill in missing Situation, Task, Action, or Result details before the interview begins. This prevents the system from presenting half-formed examples during critical preparation time.
Implementation Logic
The mapping algorithm follows this operational flow:
def map_questions_to_star(questions, star_examples, profile):
"""
Map each interview question to a STAR example.
* `questions` – list of (question, tags) extracted from the job posting.
* `star_examples` – dict keyed by tag → STAR text from 07-interview-prep.md.
* `profile` – dict of factual candidate data from 01-candidate-profile.md.
"""
mapped = {}
for q, tags in questions:
# Try to find a ready-made STAR example
for tag in tags:
if tag in star_examples:
mapped[q] = star_examples[tag]
break
else:
# No ready-made example → draft a new STAR from profile
mapped[q] = draft_star_from_profile(q, profile)
return mapped
def draft_star_from_profile(question, profile):
"""Create a minimal STAR answer using only verified profile facts."""
s = f"Situation: {profile['current_role']} at {profile['current_company']}."
t = "Task: " + extract_task_from_question(question)
a = "Action: " + summarize_action(profile)
r = "Result: " + summarize_result(profile)
return f"{s}\n{t}\n{a}\n{r}"
This implementation ensures that every answer the candidate practices is grounded in real experience, while gaps are filled with newly created, fact-checked STAR stories.
Summary
- The mapping engine lives in
.claude/commands/interview.md(section 2, line 64). - "Use for" tags in
07-interview-prep.mdlink behavioral competencies to specific STAR examples. - Unmatched questions trigger dynamic STAR drafting from
01-candidate-profile.mdfacts (lines 66-67). - STAR candidate stubs generated by
/setup(in.claude/commands/setup.md) surface for completion before interviews. - All drafted content requires explicit user approval before permanent storage.
Frequently Asked Questions
What file contains the ready-made STAR examples?
The "Ready-Made STAR Examples" are stored in .claude/skills/job-application-assistant/07-interview-prep.md. This file serves as the primary repository for verified STAR stories that the interview command references during mapping.
How does the system handle questions without existing STAR examples?
When no "Use for" tag matches a question, the system drafts a new STAR answer strictly from factual data found in .claude/skills/job-application-assistant/01-candidate-profile.md. The draft arranges real experience into Situation-Task-Action-Result format without invention, then offers it for user approval before adding to 07-interview-prep.md.
Where does the candidate profile data originate?
All factual data for drafting new STAR answers comes from .claude/skills/job-application-assistant/01-candidate-profile.md. This file contains verified professional history, roles, and achievements that ensure every generated example reflects actual candidate experience.
What are STAR candidate stubs?
STAR candidate stubs are incomplete example entries created during the /setup command execution (defined in .claude/commands/setup.md). The interview command surfaces these stubs at line 67, prompting users to complete missing Situation, Task, Action, or Result components before the interview occurs.
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 →