Criteria for Scoring CV Lines During Cutting: How the AI Job Search Tool Prunes Resumes

When a CV exceeds the two-page limit, the system scores every line across three dimensions—Relevance to the job posting, Uniqueness within the document, and Narrative Load from the cover letter—and removes the lowest-scoring lines first until the budget is met.

The MadsLorentzen/ai-job-search repository implements an intelligent truncation strategy in its /apply workflow that avoids naive bottom-cutting. Instead of simply deleting the oldest roles or final bullets, the tool performs relevance-weighted cutting that evaluates individual lines based on their strategic value to the specific application.

The Three Scoring Dimensions

The algorithm assigns each CV line a composite score derived from three orthogonal criteria documented in README.md at line 256 and implemented in .claude/commands/apply.md at line 251.

Relevance to the Job Posting

This dimension measures how well a line matches the keywords and responsibilities extracted from the target job description. The system computes similarity through keyword overlap or lightweight vector matching. Lines that directly address employer requirements receive high scores and remain in the document regardless of whether they appear in older roles or earlier sections.

Uniqueness Within the Document

The system maintains a hash-set of all lines encountered during parsing to detect redundancy. If a competency appears in both the Core Competencies section and a specific job description, the duplicate instance receives a penalty. This uniqueness score ensures that redundant statements are prioritized for removal without losing evidence of the skill elsewhere.

Narrative Load from the Cover Letter

This criterion protects lines that the cover letter explicitly references. The parser scans the cover-letter draft for citations such as "as shown in my XYZ project" or similar anchoring phrases. Lines serving as concrete examples for the cover letter's narrative receive a high narrative load score, preventing the algorithm from breaking the story flow between documents.

How the Cutting Algorithm Works

When the Apply command detects "substantial content on page 3"—the checkpoint described in .claude/commands/apply.md—it triggers the cutting routine. The algorithm calculates a weighted sum of the three dimensions for every remaining line, identifies the line with the minimum total score, and removes it. This process repeats iteratively, constantly re-ranking the surviving lines, until the CV fits within the two-page constraint.

The scoring logic also respects guidance defined in .claude/skills/job-application-assistant/05-cv-templates.md, which codifies the detailed rules for relevance-weighted cutting that the Apply command follows.

Implementation Example

The following Python illustrates the scoring mechanics as implemented in the Apply command workflow:

def line_score(line, posting_keywords, seen_lines, cover_refs):
    # 1️⃣ Relevance: overlap with posting keywords

    relevance = len(set(line.lower().split()) & posting_keywords) / len(posting_keywords)

    # 2️⃣ Uniqueness: penalise duplicates

    uniqueness = 0 if line in seen_lines else 1

    # 3️⃣ Narrative load: keep if cover‑letter mentions it

    narrative = 1 if any(ref in line for ref in cover_refs) else 0

    # total score (higher = more valuable)

    return relevance + uniqueness + narrative

# Cutting loop

while cv_exceeds_page_limit(cv):
    scores = {ln: line_score(ln, kw, all_lines, cover_refs) for ln in cv.lines}
    line_to_cut = min(scores, key=scores.get)   # lowest‑score line

    cv.remove(line_to_cut)

The tests/test_latex_guidance.py file indirectly validates this behavior by ensuring that the cutting rules are correctly reflected in the generated LaTeX CV output.

Summary

  • Relevance ensures lines matching the job description are preserved regardless of chronological position.
  • Uniqueness identifies redundant content that can be removed without evidence loss.
  • Narrative Load protects bullets referenced by the cover letter to maintain document coherence.
  • The algorithm removes the lowest-scoring line iteratively until the two-page limit is satisfied.
  • Implementation resides primarily in .claude/commands/apply.md with supporting documentation in README.md and the CV templates skill file.

Frequently Asked Questions

How does the system decide which CV line to cut first?

The system calculates a composite score for every line combining relevance to the job posting, uniqueness within the document, and narrative load from the cover letter. The line with the lowest total score is removed first, regardless of which section it belongs to, and the process repeats until the CV fits within two pages.

What happens if the same skill appears in multiple sections?

If a line appears in both Core Competencies and Work Experience, the duplicate receives a low uniqueness score. The algorithm will cut the redundant instance while preserving the original evidence, ensuring no capability is lost from the resume while saving space.

Can the cover letter prevent specific bullets from being removed?

Yes. If the cover letter explicitly references a specific project or achievement using phrases like "as shown in my XYZ project," that line receives a high narrative load score. Unless forced by extreme space constraints, the algorithm preserves these referenced lines to prevent breaking the narrative flow between the cover letter and CV.

Where is the scoring logic implemented in the codebase?

The primary implementation trigger and enumeration of the three scoring dimensions are located in .claude/commands/apply.md around line 251. High-level documentation appears in README.md at line 256, while detailed cutting rules are defined in .claude/skills/job-application-assistant/05-cv-templates.md.

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 →