How STAR Example Mapping Automates Interview Preparation in ai-job-search

The ai-job-search repository automates interview preparation by matching tagged STAR stories to likely interview questions using a "Use for" tagging system, generating role-specific prep packs with two-way traceability between questions and examples.

The open-source ai-job-search toolkit treats behavioral interview prep as a data-driven pipeline rather than an ad-hoc chore. Central to this approach is STAR example mapping, which links reusable situation-task-action-result stories to specific interview questions based on semantic tags. The entire workflow is orchestrated by the /interview slash command defined in /.claude/commands/interview.md.

The Interview Command Architecture

The /interview command functions as the entry point for all interview preparation activities. It stitches together three distinct data sources to generate a tailored prep pack:

  1. Application archive – The CV, cover letter, and previous outcome notes stored in documents/applications/<company>_<role>/
  2. Behavioral profile – Personality and strengths documentation (.claude/skills/job-application-assistant/02-behavioral-profile.md)
  3. STAR template library – Reusable stories with "Use for" classification tags (.claude/skills/job-application-assistant/07-interview-prep.md)

When you invoke /interview <company> <role>, the system parses your input (lines 11-17 of interview.md), resolves the tracked application directory, and begins the mapping process.

How STAR Example Mapping Works

The critical STAR mapping logic executes during the "Build the Prep Pack" phase (lines 62-66 of interview.md). This step implements a bidirectional matching system:

From question to STAR: The command generates a list of likely interview questions for the role, then scans the STAR template library for stories whose "Use for" tags match the question themes.

From STAR to question: Each selected STAR example is listed directly beneath its corresponding question in the final markdown output, ensuring you know exactly which story to tell.

If the mapping algorithm finds a question without a matching tagged story, it automatically drafts a new STAR answer using factual data from the candidate profile (01-candidate-profile.md). This guarantees complete coverage while maintaining truthfulness relative to your documented experience.

Step-by-Step Data Flow

The implementation follows a strict pipeline:

  1. Input parsing (lines 11-17) – Resolves company/role arguments to application paths
  2. Context loading (lines 24-32) – Ingests cv_draft.tex, cover_letter.tex, outcome.md, and the STAR template file
  3. Question generation – Produces likely behavioral questions based on the role requirements
  4. Tag matching – Maps "Use for" tags in 07-interview-prep.md to generated questions
  5. Gap filling – Drafts missing STARs from 01-candidate-profile.md when tags don't match
  6. Mock interview (lines 83-86) – Uses mapped STARs for interactive role-play
  7. Persistence (line 79) – Writes the assembled pack to documents/applications/<company>_<role>/interview_prep_<stage>.md

Practical Usage and Output Format

To generate an interview preparation pack, run the slash command with your target company and role:

/interview acme data-engineer

This creates a markdown file at documents/applications/acme_data-engineer/interview_prep_phone.md containing mapped STAR examples.

Example Mapped Output

When a STAR template matches a question, the pack includes the full story with traceability:


## Likely Question: "Tell me about a time you improved data pipeline performance."

**Mapped STAR example:**  
**Project:** Real-Time ETL Optimisation (Python, Spark)  
**S:** The pipeline processed >10 GB/hour and frequently timed out.  
**T:** I was tasked with reducing latency to <2 min per batch.  
**A:** Refactored the job to use Spark Structured Streaming, added caching, tuned executor memory.  
**R:** Latency dropped by 68 % and saved $15 k/month in cloud costs.  

*Use for:* "Performance-optimization", "Scalability"

Drafting Missing STARs

For questions without matching tags, the system generates a draft directly from your profile:


## New STAR Draft – "Handling ambiguous requirements"

**S:** The product team gave a vague spec for a data-exposure API.  
**T:** I needed to design an interface that satisfied both analytics and reporting needs.  
**A:** Conducted stakeholder interviews, produced a lightweight schema, built a prototype in FastAPI, and iterated based on feedback.  
**R:** Delivered the API two weeks early; adoption rate reached 95 % in the first month.

After review, approving the draft triggers an append operation to 07-interview-prep.md (lines 97-98), expanding your reusable library for future applications.

Key Source Files for STAR Interview Prep

File Role in STAR-based interview prep
/.claude/commands/interview.md Orchestrates the workflow including tag matching logic at lines 62-66
.claude/skills/job-application-assistant/07-interview-prep.md Stores the STAR template library with "Use for" metadata
.claude/skills/job-application-assistant/01-candidate-profile.md Provides factual data for drafting new STAR stories
.claude/skills/job-application-assistant/02-behavioral-profile.md Supplies behavioral drives that prioritize which STARs to select
documents/applications/<company>_<role>/interview_prep_*.md Runtime output location for generated prep packs

Summary

  • STAR example mapping in ai-job-search uses "Use for" tags to create two-way links between interview questions and reusable stories.
  • The /interview command automates this matching by parsing the STAR template library (.claude/skills/job-application-assistant/07-interview-prep.md) against role-specific question sets.
  • Missing stories are automatically drafted from the candidate profile (.claude/skills/job-application-assistant/01-candidate-profile.md), ensuring factual consistency with your CV.
  • Generated prep packs are persisted to documents/applications/<company>_<role>/interview_prep_<stage>.md for structured interview practice.
  • Approved drafts append back to the STAR library, creating a compounding knowledge base for future applications.

Frequently Asked Questions

How does the system match STAR examples to specific interview questions?

The matching algorithm relies on "Use for" tags stored in each STAR template within 07-interview-prep.md. When the /interview command generates likely questions for a role (lines 62-66 of interview.md), it compares question themes against these tags to select the most relevant stories. If multiple STARs share a tag, the system prioritizes based on the role requirements and your behavioral profile.

What happens if no existing STAR example fits a generated question?

When the tag matching returns no results, the system automatically drafts a new STAR answer using structured data from 01-candidate-profile.md. This draft appears in the prep pack with a "New STAR Draft" header, allowing you to review, edit, and approve it. Upon approval (lines 97-98), the new story appends to 07-interview-prep.md with appropriate "Use for" tags for future reuse.

Can I use the STAR mapping system without the full application archive?

The /interview command requires a tracked application directory to establish context, but the underlying STAR library (07-interview-prep.md) functions as a standalone markdown file. You can manually reference or copy stories from this file even outside the automated workflow, though you lose the automated question generation and tag-matching capabilities that depend on the application-specific context.

Where are the generated interview prep packs stored?

Each prep pack is written to documents/applications/<company>_<role>/interview_prep_<stage>.md within the repository structure (line 79 of interview.md). The <stage> suffix distinguishes between phone screens, technical rounds, and final interviews, allowing you to maintain iteration-specific STAR mappings as you progress through the hiring process.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →