---
slug: "roger"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/marswangyang/roger@main/README.md"
repo: "https://github.com/marswangyang/roger"
source_file: "README.md"
branch: "main"
---
# Roger

![Roger](https://github.com/marswangyang/roger/raw/HEAD/roger.png)
**Roger** is a local, AI-powered career assistant that runs in AI coding tools ([Gemini CLI](https://geminicli.com)), designed to automate the tailoring of high-quality resumes and cover letters.

**"Who are we today?"**

**Roger** is named after **Roger Smith**, the alien from the animated sitcom *American Dad!*.

Roger is famous for his ability to craft completely distinct, fully realized **personas** for any situation. He doesn't just "change clothes"; he constructs an entire backstory, personality, and set of credentials to fit a specific narrative. Whether he needs to be a hard-nosed detective, a wedding planner, or a corrupt politician, Roger has a persona for it.

---

## Table of Contents

- [Prerequisites](#prerequisites)
- [Installation & Setup](#installation--setup)
- [Quick Start](#quick-start)
- [Critical Concept](#critical-concept)
- [Features](#features)
- [Project Structure](#project-structure)
- [Customization](#customization)
- [Troubleshooting](#troubleshooting)


## Prerequisites

Before running the agent, ensure your environment is fully prepared:

1. **Gemini CLI:** Installed and authenticated with your Google account. This is the interface where you will chat with the agent.
   - [Installation Guide](https://geminicli.com)

2. **Python 3.11+:** Required to run the local MCP Server script. The server acts as a bridge between the AI model and your local file system.

3. **uv:** Modern, fast Python package manager for managing dependencies. This project uses `uv` instead of traditional `pip`.
   - Installation: `curl -LsSf https://astral.sh/uv/install.sh | sh`
   - Or via Homebrew: `brew install uv`

4. **LaTeX Environment:** A working local installation of `pdflatex` or `xelatex`. The agent relies on this engine to render the final PDF. (Detailed installation instructions in the next section)

5. **Google Gemini API Key:** Exported in your shell environment (`GEMINI_API_KEY`). This allows the CLI to communicate with the Gemini models.

## Installation & Setup

### 1. Fork and Clone the Repository

Click the "Fork" on top-right of the page, and create your forked repo.
```bash
git clone https://github.com/yourname/Roger.git
cd Roger
```

### 2. Install LaTeX Distribution

The agent requires a LaTeX compiler to generate PDFs. Choose the installation method for your operating system:

#### macOS

**Option A: Full Installation (Recommended)**
```bash
brew install --cask mactex
```
This installs the complete MacTeX distribution (~4GB). After installation, you may need to add LaTeX to your PATH:
```bash
export PATH="/Library/TeX/texbin:$PATH"
```

#### Linux (Ubuntu/Debian)

**Full Installation:**
```bash
sudo apt-get update
sudo apt-get install texlive-full
```

#### Windows

Option 1: Download from [miktex.org](https://miktex.org/download)
Option 2: Download from [tug.org/texlive](https://www.tug.org/texlive/windows.html)


**Verify Installation:**
After installation, verify LaTeX is working:
```bash
pdflatex --version
```
You should see version information for pdfLaTeX.

### 3. Install Python Dependencies and Start MCP Server

Navigate to the MCP server directory and use `uv` to install dependencies:

```bash
cd mcp-latex-server

# Install dependencies
uv venv .venv
uv pip install -r requirements.txt

# Start MCP Server
uv run latex_server.py
```

### 4. Configure MCP Server in Gemini CLI

Add the LaTeX MCP server to your Gemini CLI configuration:

1. Open or create the Gemini settings file:
```bash
# Create .gemini directory if it doesn't exist
mkdir -p ~/.gemini

# Edit settings.json (use your preferred editor)
open ~/.gemini/settings.json
```

2. Add the MCP server configuration:
```json
{
  "mcpServers": {
    "latex": {
      "command": "uv",
      "args": [
        "--directory",
        "<YOUR_PATH>/Roger/mcp-latex-server",
        "run",
        "latex_server.py"
      ],
      "env": {
        "LATEX_BASE_PATH": "<YOUR_PATH>/Roger"
      },
      "cwd": "<YOUR_PATH>/Roger"
    }
  }
}
```

**Important:** Replace `<YOUR_PATH>/Roger` with your actual project path. You can get the full path by running:
```bash
cd /path/to/Roger
pwd
```


### 5. Populate Your Context (Crucial Step)

The quality of the output depends entirely on the quality of your input.

- Open the `context/` folder
- Fill `experience.md`, `projects.md`, `skills_inventory.md`, and other relevant files with your actual data following the examples format that has been provided in the files.

**Tip:** Be **verbose** in these master files. Include every metric, every tool used, and every achievement. The agent acts as an editor; it's easier for it to summarize a long list than to invent details that aren't there. For example, instead of "Improved performance," write "Reduced API latency by 40% (200ms to 120ms) by implementing Redis caching."

## QuickStart

### Step 1: Launch Gemini CLI

The MCP server will start automatically when you launch Gemini CLI:

```bash
gemini
```
> **Tips:** Make sure to enable the **Skills** feature in Gemini CLI settings. You can do this by going to Settings > Features and enabling "Skills" to allow the agent to use its specialized skills (job-analyzer, experience-selector, resume-latex-pdf-generator, etc.).

You should see a message indicating the MCP server is connected and ready.

### Step 2: Interactive Workflow

Follow this conversational flow to tailor your application:

#### Phase 1: Job Analysis

Paste the Job Description (JD) to let the agent understand the role deeply.

> **User:** "I am applying for a **Senior Backend Engineer** role at **Netflix**. Here is the JD: [PASTE JD TEXT HERE]. Please analyze it for key requirements and engineering culture."

> **Tip:** If your JD is very long, you can use the built-in text editor: Press `Ctrl+A`, then enter vim/vi editing mode. Press `i` (insert mode) to start editing and paste your text. When finished, press `Esc`, then type `:wq` to save and exit.

> **Agent:** (Uses `job-analyzer` to parse the text. It will return a summary extracting keywords like 'Microservices', 'High Concurrency', 'Java', and cultural notes like 'Freedom and Responsibility'.)

#### Phase 2: Strategy & Selection

Ask the agent to bridge your history with the JD requirements identified in Phase 1.

> **User:** "Based on that analysis, select my top 3 most relevant experiences and projects from the context. Explain why you chose them."

> **Agent:** (Uses `experience-selector` to read your `context/*.md` files. It will propose a specific list of bullet points and projects that prove you have the skills Netflix is looking for. _Review this output—you can ask the agent to swap a project if you disagree._)

#### Phase 3: Generation

Command the agent to build the final asset.

> **User:** "Looks good. Generate a strictly 1-page resume using the Jake resume template. Ensure all metrics are highlighted."

> **Agent:** (Uses `resume-latex-pdf-generator` to execute the following pipeline:)
>
> 1. Reads the `Jake_resume.tex` template
> 2. Injects your selected experience into the placeholders
> 3. Escapes special characters (like `&` or `%`) to prevent errors
> 4. Connects to the MCP server to write the `.tex` file and compile it
>
> **Output:** `✅ Resume generated successfully: /Users/you/Roger/AI_Resume/[timestamp]/resume.pdf`

## Concept

### The Analogy

Your Career Agent does exactly what Roger does:

1. **The Closet (Context):** Roger has a massive attic filled with costumes and props. Similarly, your `context/` folder contains every project, skill, and experience you've ever had. It is the raw material.
2. **The Disguise (Skills):** Roger looks at a situation and decides, "I need to be a doctor today." Your `job-analyzer` and `experience-selector` look at a Job Description and decide, "I need to be a Distributed Systems Expert today."
3. **The Persona (Output):** Roger steps out as "Dr. Penguin." Your agent generates a PDF that *is* that specific persona, tailored perfectly to the audience, ignoring all unrelated history.

### Core Concept

**Roger** operates on a philosophy of **"Infinite Personas, One Ground Truth."**

Most people send the same generic resume to every company. Roger believes that every job application requires a unique character construction.

### Architecture

- **The Brain (Gemini Agent):** The strategist. It decides which persona is needed based on the Job Description. It asks: *"Does this role need the Startup Hustler or the Corporate Leader?"*
- **The Memory (Master Context):** The unchangeable truth. Roger never lies about his core data (he really *did* those things), but he selectively highlights specific memories to build the current narrative.
- **The Hands (MCP Server):** The execution layer. It stitches the costume (LaTeX Template) together to ensure the presentation is flawless.
![Roger Workflow](https://github.com/marswangyang/roger/raw/HEAD/image.png)

### Mission

To transform the job application process from a **"Copy-Paste"** chore into a **"Strategic Persona Generation"** workflow.

With Roger, you are not just an applicant; you are exactly who they are looking for.

---

## Features

- **Context-Aware Analysis:** Goes beyond simple keyword matching. The `job-analyzer` skill deconstructs Job Descriptions (JDs) to identify hidden requirements, infer the company’s engineering culture, and pinpoint the specific problems they are hiring you to solve.

- **Evidence-Based Selection:** Instead of rewriting your history from scratch, the `experience-selector` intelligently mines your `context/` folder. It selects the most relevant bullet points, projects, and metrics that align with the JD, ensuring your resume speaks directly to the recruiter’s needs.

- **Local Privacy:** Your career history contains sensitive PII (Personally Identifiable Information). Roger runs entirely on your local machine—your data never leaves your environment unless you choose to share the final PDF.

- **LaTeX Precision:** Generates strictly formatted PDFs using a local MCP (Model Context Protocol) server. By leveraging LaTeX's typesetting power, the agent guarantees perfect margins, consistent fonts, and a layout that never breaks, solving the "formatting headaches" typical of Word or Google Docs.

- **Self-Correcting Workflow:** The agent is resilient. If the LaTeX compilation fails due to a syntax error (like an unescaped special character), the `resume-latex-pdf-generator` skill reads the compiler’s error log, identifies the issue, fixes the `.tex` source code, and recompiles automatically without user intervention.

## Project Structure

Understanding the layout helps you navigate the "Brain" (Gemini) and the "Hands" (MCP Server) of the agent:

```markdown
Roger/
├── .gemini/                                 # Gemini CLI configuration & skills definitions
│   └── skills/
│       ├── cover-letter-writer/               # Skill: Drafts persuasive, narrative-driven cover letters
│       ├── experience-selector/              # Skill: Filters your master history to find the best matching evidence
│       ├── job-analyzer/                     # Skill: Extracts keywords, tech stack, and cultural cues from JDs
│       └── resume-latex-pdf-generator/        # Skill: Orchestrates file creation, LaTeX escaping, and compilation
│           ├── SKILL.md                     # The skill instruction file
│           └── templates/                   # LaTeX source templates for document generation
│               ├── basic_resume.tex         # Alternative minimalist template
│               ├── default_resume.tex       # The standard professional template (US Letter)
│               └── Jake's_resume.tex        # Example custom template
│
├── context/                                 # [USER DATA] Your Master Record - The "Single Source of Truth"
│   ├── awards.md                            # Honors, awards, and recognitions
│   ├── certificates.md                      # Professional certifications and licenses
│   ├── education.md                         # Academic background and degrees
│   ├── experience.md                        # Your complete, detailed work history with metrics
│   ├── information.md                       # Your personal information (name, contact, location, etc.)
│   ├── projects.md                          # Side projects, open source contributions, and hackathons
│   ├── publications.md                      # Research papers, articles, and publications
│   └── skills_inventory.md                  # A categorized list of your technical stack and languages
│
├── mcp-latex-server/                        # Local server responsible for File I/O & PDF Compilation
│   ├── latex_server.py                      # The Python script running the MCP tools
│   ├── mcp_config.json                      # MCP server configuration file
│   ├── quick_setup.py                       # Quick setup script for the server
│   ├── README.md                            # Server-specific documentation
│   ├── requirements.txt                     # Python dependencies for the server
│   └── TEST_PDF_COMPILATION.md              # Testing guide for PDF compilation
│
├── GEMINI.md                                # Global system context that teaches the Agent about the project structure
└── README.md                                # This file - Project documentation
```

## Customization

### Editing Templates

The LaTeX templates are located at `.gemini/skills/resume-latex-pdf-generator/templates/`. You have full freedom to modify the visual design:

- Choose from `default_resume.tex`, `basic_resume.tex`, or create your own custom template.

- Change fonts, colors, or section headers using standard LaTeX syntax.

- **Important:** Keep the Python-style placeholders (e.g., `\VAR{experience_section}`, `\VAR{education_section}`) intact. The agent uses these specific markers to know exactly where to inject the generated content.

### Updating Your Data

You never need to edit the Agent's prompt or "retrain" it to update your job history. Simply edit the files in the `context/` folder directly.

- Added a new certification? Update `certificates.md`.

- Finished a big project at work? Add a new bullet point to `experience.md`.

- Received an award? Add it to `awards.md`.

- The next time you run the agent, it will automatically access the latest data from your context folder.

## Troubleshooting

**Q: The MCP server isn't connecting.**
**A:** Verify your `~/.gemini/settings.json` configuration:
- Check that the path to your project directory is correct (use absolute path)
- Ensure `uv` is installed and in your PATH
- Verify the file exists: `ls ~/.gemini/settings.json`
- Check the MCP server logs in the Gemini CLI output for error messages

**Q: The PDF compilation failed with an error.**
**A:** This usually happens if a special character (like `&`, `$`, or `%`) wasn't escaped properly. Tell the Agent: _"The compilation failed. Read the error log and fix the syntax."_ The `resume-latex-pdf-generator` skill has built-in self-correction logic to read the `pdflatex` log, find the line number of the error, and fix the unescaped character automatically.

**Q: The Agent isn't finding my files or context.**
**A:** Ensure the `LATEX_BASE_PATH` in your `~/.gemini/settings.json` points to the root of the `Roger` directory. The agent relies on the relative paths defined in `GEMINI.md` (e.g., `./context/`) to orient itself.

**Q: LaTeX command not found.**
**A:** Make sure LaTeX is installed and in your PATH. Run `pdflatex --version` to verify. If not found, add the LaTeX binary directory to your PATH:
- **macOS:** Add to `~/.zshrc`: `export PATH="/Library/TeX/texbin:$PATH"`
- **Linux:** Usually installed to `/usr/bin/` automatically
- **Windows:** Add the MiKTeX or TeX Live bin directory to your system PATH environment variable
