Skip to content

zhiweio/resume-as-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Resume as Code

This project implements a "Resume as Code" philosophy, leveraging LLMs (Large Language Models) and structured data to automate the creation of highly tailored, professional resumes.

It solves the common pain points of resume maintenance:

  • Fragmentation: Keeping multiple versions of Word/PDF files for different job applications.
  • Inconsistency: Difficulty in maintaining consistent formatting and content across versions.
  • Time-Consuming: Manually tailoring resumes for each Job Description (JD) is tedious.

By maintaining a single "Master Timeline" of your career and using AI agents to dynamically assemble resumes, you can generate a perfect match for any job opportunity in minutes.

Resume Builder App Screenshot

Resume Preview Screenshot

View Full Resume PDF (EN)

ๆŸฅ็œ‹ๅฎŒๆ•ดไธญๆ–‡็‰ˆ็ฎ€ๅކ PDF (ZH)

โœจ Core Features

  • Single Source of Truth: All career data (work, projects, education, certificates) is stored in modular YAML files.
  • Resume Builder App: A local-first workbench with live YAML editor, real-time preview, deterministic pagination, and one-click PDF export.
  • AI-Powered Agents:
    • Resume Generation Agent: Analyzes JDs and assembles targeted resumes.
    • Timeline Polishing Agent: Polishes raw experience descriptions using STAR/3W methodologies.
    • Interview Preparation Agent: Generates comprehensive interview guides based on your resume and target JD.
  • Dual YAML Format Support: Supports both the legacy YAMLResume format and a new richer custom schema (v1.0), with automatic detection and seamless compatibility.
  • Automated Validation: Integrated validation ensures generated resumes are syntactically correct and ready for rendering.
  • Multi-Format Export: Supports exporting to high-fidelity PDF via the built-in Puppeteer export service, plus HTML and Markdown via the YAMLResume compiler.
  • Multi-Language Support: Supports English, Simplified Chinese, Traditional Chinese (HK/TW), Spanish, French, and Norwegian, with a one-click language toggle in the builder.

๐Ÿ–ฅ๏ธ Resume Builder App

The resume-builder-app/ directory contains a local-first resume workbench built with React, Vite, Monaco Editor, and Puppeteer.

Features

Feature Description
Split Editor + Preview Monaco YAML editor on the left, pixel-perfect A4 preview on the right
Live Validation Real-time YAML syntax and schema validation with inline diagnostics
Deterministic Pagination Fine-grained block-level pagination with proper keep-together logic
Optimize Layout One-click spacing optimization with adjustable scale (0.7ร—โ€“1.3ร—)
PDF Export Local Puppeteer + headless Chromium service for high-fidelity PDF generation
Language Toggle Switch between ไธญๆ–‡ and English rendering with one click
Preview Zoom Floating zoom control (scale only โ€” does not affect rendering/export)
Dual Format Support Auto-detects legacy yamlresume or new schema v1.0 YAML
Section Ordering Respects layouts[].sections.order (legacy) or top-level order (new schema)

Quick Start

cd resume-builder-app

# Install dependencies (also installs Chrome for Puppeteer)
pnpm install

# Start dev server (web preview + PDF export service)
pnpm dev
# โ†’ Web UI: http://localhost:5173
# โ†’ PDF Export Service: http://localhost:3001

# Production build
pnpm build
pnpm start

Architecture

resume-builder-app/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ App.tsx              # Workspace shell (editor + preview + toolbar)
โ”‚   โ”‚   โ”œโ”€โ”€ renderer/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ResumeRenderer.tsx    # Converts RenderModel โ†’ fine-grained blocks
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PaginatedPaper.tsx    # Measures blocks โ†’ A4 page containers
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ PrintStyles.tsx       # Print/PDF CSS overrides
โ”‚   โ”‚   โ””โ”€โ”€ routes/
โ”‚   โ”‚       โ””โ”€โ”€ PrintRoute.tsx        # Headless print route for PDF export
โ”‚   โ”œโ”€โ”€ compiler/
โ”‚   โ”‚   โ”œโ”€โ”€ compile-legacy.ts         # yamlresume โ†’ RenderModel adapter
โ”‚   โ”‚   โ””โ”€โ”€ compile-new-schema.ts     # New schema v1.0 โ†’ RenderModel compiler
โ”‚   โ”œโ”€โ”€ schema/
โ”‚   โ”‚   โ””โ”€โ”€ resume-schema.ts          # TypeScript types for new YAML schema v1.0
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ””โ”€โ”€ index.ts                  # Normalized RenderModel (single renderer input)
โ”‚   โ””โ”€โ”€ export-service/
โ”‚       โ””โ”€โ”€ server.ts                 # Express + Puppeteer PDF export service
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ vite.config.ts

๐Ÿ“‹ YAML Resume Formats

The Resume Builder supports two YAML formats. Files are auto-detected at load time.

New Schema (v1.0) โ€” Recommended

The new format is a richer, versioned schema owned by the builder app. It supports discriminated section types, stable IDs, visibility flags, layout hints, and flexible content structures.

schema:
  version: '1.0'
  generator: resume-builder-app

document:
  title: 'My Resume'
  language: en # en | zh-hans | zh-hant-hk | zh-hant-tw | es | fr | no

basics:
  name: Zhang Wei
  headline: 'Senior Data Engineer ยท 7 YOE'
  phone: '+86 138 8888 8888'
  email: zhangwei@outlook.com
  url: zhangwei.dev
  summary:
    - 'Bullet point one describing core competency.'
    - 'Bullet point two with specific achievements.'
  profiles:
    - network: GitHub
      url: https://github.com/zhangwei
      username: github.com/zhangwei

# profiles can also be placed here (sibling of basics) for yamlresume compatibility
# profiles:
#   - network: GitHub
#     url: https://github.com/zhangwei
#     username: github.com/zhangwei

sections:
  - id: work
    type: work
    title: 'Work Experience'
    items:
      - id: job-1
        name: Acme Corp
        position: Senior Engineer
        startDate: '2022-01'
        endDate: '2024-06'
        summary:
          - 'Led migration of data platform to lakehouse architecture.'
          - 'Reduced pipeline latency by 60% through stream processing.'
        keywords: [Spark, Kafka, AWS, Terraform]

  - id: education
    type: education
    title: 'Education'
    items:
      - institution: MIT
        degree: Master
        area: Computer Science
        startDate: '2018-09'
        endDate: '2020-06'

  - id: projects
    type: projects
    title: 'Projects'
    items:
      - id: proj-1
        name: Data Platform v2
        description: 'Enterprise-scale lakehouse platform'
        startDate: '2023-03'
        endDate: '2024-01'
        summary:
          - 'Designed and implemented end-to-end lakehouse on AWS.'
        keywords: [Databricks, Delta Lake, Airflow]

  - id: skills
    type: skills
    title: 'Skills'
    items:
      - name: Languages
        keywords: [Python, SQL, TypeScript, Go]
      - name: Data
        keywords: [Spark, Kafka, Airflow, dbt]

  - id: certificates
    type: certificates
    title: 'Certificates'
    items:
      - name: AWS Certified Data Analytics
        issuer: Amazon Web Services
        date: '2023-05'

  - id: langAndInterests
    type: langAndInterests
    title: 'Languages & Interests'
    languages:
      - language: English
        fluency: Professional Working
      - language: Mandarin Chinese
        fluency: Native
    interests:
      - name: Open Source
        keywords: [data tooling, contributor]

# Optional: explicit section display order
order:
  - work
  - education
  - projects
  - skills
  - certificates
  - langAndInterests

layout:
  template: jake
  page:
    margins: { top: 1.5cm, left: 1.5cm, right: 1.5cm, bottom: 1.5cm }
    showPageNumbers: true
  typography:
    fontSize: 11pt

themeOverrides:
  spacing:
    sectionGap: 12
    entryGap: 8

Legacy Format (YAMLResume)

The YAMLResume format uses a flat content object with fixed section keys. The builder auto-detects this format by the presence of content at the root.

locale:
  language: zh-hans

layouts:
  - engine: latex
    sections:
      aliases:
        basics: ๅŸบๆœฌไฟกๆฏ
        work: ๅทฅไฝœ็ปๅކ
        education: ๆ•™่‚ฒ็ปๅކ
        projects: ้กน็›ฎ็ปๅކ
        skills: ไธ“ไธšๆŠ€่ƒฝ
        certificates: ่ฏไนฆ
      order:
        - basics
        - education
        - work
        - projects
        - skills
        - certificates
    page:
      margins: { top: 1.5cm, left: 1.5cm, right: 1.5cm, bottom: 1.5cm }
      showPageNumbers: true
    template: jake
    typography:
      fontSize: 11pt

content:
  basics:
    name: John Doe
    phone: '+1 555-123-4567'
    email: john.doe@example.com
    url: https://johndoe.dev
    summary: |
      - 7 years of data engineering experience with Python and SQL.
      - Experienced in ETL automation, data quality, and monitoring.
  profiles:
    - network: GitHub
      url: https://github.com/johndoe
      username: johndoe
  education:
    - institution: Example University
      degree: Bachelor
      area: Computer Science
      startDate: Sep 1, 2015
      endDate: Jul 1, 2019
  work:
    - name: Acme Inc
      position: Senior Engineer
      startDate: Nov 14, 2022
      endDate: Now
      summary: |
        - Built enterprise data platform from scratch.
      keywords: [Python, React, AWS]
  projects:
    - name: Data Platform
      description: Enterprise lakehouse
      startDate: Mar 1, 2023
      endDate: Jan 1, 2024
      summary: |
        - End-to-end lakehouse on AWS.
      keywords: [Databricks, Airflow]
  skills:
    - name: Languages
      keywords: [Python, SQL, TypeScript]
  certificates:
    - name: AWS Certified
      issuer: AWS
      date: May 2023

Format Differences

Feature Legacy (YAMLResume) New Schema (v1.0)
Root structure content object with fixed keys basics + sections array
Section definition Fixed keys (work, education, etc.) Discriminated union with type field
Section ordering layouts[].sections.order Top-level order array
Section titles layouts[].sections.aliases Per-section title field
Item IDs Not supported Optional id on each item
Visibility control Not supported visible flag per section/item
Summary format Multiline pipe-string (|) Array of strings or pipe-string
Profiles location content.profiles (sibling of basics) basics.profiles or root profiles
Language setting locale.language document.language
Layout config layouts[] array (multi-engine) Single layout object
Theme overrides Not supported themeOverrides (colors, spacing)
Schema versioning Not supported schema.version field

๐Ÿ—๏ธ Architecture & Workflow

The system operates through three primary AI agents:

1. Timeline Polishing Agent

Input: Raw text description of a job or project. Output: Structured, polished YAML file in timelines/gem/.

  1. Input Analysis: Identifies if the input is Work Experience or a Project.
  2. Polishing: Applies STAR (Situation, Task, Action, Result) for work or 3W (What, Why, How) for projects.
  3. Enrichment: Infers relevant technical keywords and industry context.
  4. Storage: Saves the polished artifact to the timeline library.

2. Resume Generation Agent

Input: Target Job Description (JD). Output: A complete, tailored resume YAML file in resumes/gem/.

  1. Job Analysis: Extracts key skills, requirements, and role context from the JD.
  2. Matching: Selects the most relevant experiences from the Timeline library based on the analysis.
  3. Section Generation: Generates tailored Summary, Skills, Work, and Project sections.
  4. Assembly: Combines all sections with static profile data (Education, Certificates) into a final YAML file.
  5. Validation: Validates the output against the schema.

3. Interview Preparation Agent

Input: Resume, JD Analysis, Company Business Analysis. Output: A comprehensive Interview Preparation Guide in interviews/gem/.

  1. Input Verification: Ensures all necessary context files are present.
  2. Strategy Generation: Creates a personal introduction strategy tailored to the role.
  3. Deep Dive: Generates STAR-based deep dive questions for every project.
  4. Q&A Bank: Creates an extensive technical Q&A bank covering specific tech, architecture, and domain knowledge.
  5. Behavioral & Reverse: Prepares behavioral questions and high-quality reverse interview questions.

๐Ÿ“‚ Directory Structure

.
โ”œโ”€โ”€ resume-builder-app/  # Local-first resume workbench (see above)
โ”œโ”€โ”€ profiles/            # Personal basic information (static)
โ”œโ”€โ”€ resumes/             # Resume generation artifacts
โ”‚   โ”œโ”€โ”€ gem/             # Final generated resume files
โ”‚   โ”œโ”€โ”€ temp/            # Intermediate generation artifacts
โ”‚   โ”œโ”€โ”€ job-analysis-prompt.md
โ”‚   โ”œโ”€โ”€ company-business-analysis-prompt.md
โ”‚   โ””โ”€โ”€ section-*-prompt.md
โ”œโ”€โ”€ timelines/           # Master Timeline Library
โ”‚   โ”œโ”€โ”€ gem/             # Polished timeline event files (YAML)
โ”‚   โ”œโ”€โ”€ timeline-project-prompt.md
โ”‚   โ””โ”€โ”€ timeline-work-experience-prompt.md
โ””โ”€โ”€ interviews/          # Interview preparation artifacts
    โ”œโ”€โ”€ gem/             # Generated interview guides
    โ””โ”€โ”€ interview-prompt.md

๐Ÿค– AI Tools Support & Configuration

This project leverages AI agents to automate the resume generation process. While it can work with various LLMs, it is optimized for the following tools:

1. GitHub Copilot

  • Status: Supported (Recommended)
  • Configuration: No specific configuration is required. You can directly interact with Copilot Chat in VS Code.

2. Trae

  • Status: Supported
  • Configuration:
    1. Create Agent: Create a new Custom Agent in Trae.
    2. Configure Rules: Copy the content of .trae/rules/project_rules.md and paste it into the agent's instructions.
    3. Save: Name the agent resume-as-code.
  • Usage: Select the resume-as-code agent when working on this project to ensure strict adherence to the workflow.

๐Ÿš€ Usage Guide

Prerequisites

  • Node.js (v18+) & pnpm installed.
  • An LLM interface (e.g., GitHub Copilot Chat in VS Code).

Step 1: Build Your Timeline Library

Don't write a resume yet. First, build your database of experiences.

  1. Open Copilot Chat.
  2. Paste a raw description of a past job or project.
  3. The Timeline Polishing Agent will format it into a structured YAML file in timelines/gem/.
  4. Review and save the file.

Step 2: Configure Static Data

Fill in your static information in the profiles/ directory:

  • profiles/basics.yml: Contact info, social links.
  • profiles/education.yml: Academic history.
  • profiles/certificates.yml: Certifications.

Step 3: Generate a Resume

When you find a job you want to apply for:

  1. Copy the Job Description (JD).
  2. Paste it into Copilot Chat.
  3. The Resume Generation Agent will:
    • Analyze the JD.
    • Select relevant timeline events.
    • Generate tailored content.
    • Assemble a final YAML file in resumes/gem/ (e.g., Name_JobTitle_Company.yml).

Step 4: Preview & Export PDF

Use the Resume Builder app to preview and export:

cd resume-builder-app
pnpm install
pnpm dev
  1. Open http://localhost:5173 in your browser.
  2. Load your generated YAML file in the editor (or use sample loading).
  3. Preview the formatted resume with live pagination.
  4. Use โšก Optimize Layout to fine-tune spacing if needed.
  5. Click Export PDF for a high-fidelity PDF download.

Alternatively, use the YAMLResume CLI for LaTeX-based PDF:

pnpm yamlresume build "resumes/gem/Your_Resume.yml"

Step 5: Prepare for Interview

Once your resume is ready:

  1. Provide the generated Resume, JD Analysis, and Company Business Analysis to Copilot Chat.
  2. The Interview Preparation Agent will generate a detailed guide in interviews/gem/.
  3. Use this guide to practice your introduction, project deep dives, and technical Q&A.

๐Ÿ› ๏ธ Development

# Install dependencies (root)
pnpm install

# Resume Builder App
cd resume-builder-app
pnpm install
pnpm dev          # Start dev server + PDF export service
pnpm build        # Production build
pnpm typecheck    # Type checking

๐Ÿ“„ License

MIT

About

Resume as Code: Your career, managed like a software project. ๐Ÿš€ Stop manual tailoring. Leverage LLM agents to transform a modular YAML "Master Timeline" into high-impact, STAR-aligned, JD-tailored resumes in minutes. Powered by YAMLResume & AI.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages