CLAUDE.md•3.33 kB
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
Personal Resume Agent is a standalone AI agent that processes resume files and provides intelligent responses about professional background through MCP (Model Context Protocol). It uses RAG (Retrieval-Augmented Generation) with ChromaDB and sentence transformers to make resume information queryable through Claude Desktop.
## Development Commands
### Running the Application
- Test the agent directly: `cd src && python personal_resume_agent.py`
- Run as MCP server: `cd src && python mcp_resume_server.py`
- Example usage demo: `cd examples && python example_usage.py`
### Testing
- Run main test suite: `python tests/test_resume_agent.py`
- Tests use pytest framework and include temporary file handling
### Dependencies
- Install dependencies: `pip install -r requirements.txt`
- Core requirements: chromadb, sentence-transformers, PyPDF2, python-docx, transformers, torch
## Architecture
### Core Components
- **PersonalResumeAgent** (`src/personal_resume_agent.py`): Main agent logic with query processing, skill matching, and response generation
- **ResumeRAGSystem** (`src/resume_rag.py`): ChromaDB-based vector storage and retrieval system with document processing
- **MCP Server** (`src/mcp_resume_server.py`): JSON-RPC compliant MCP server for Claude Desktop integration
### Data Processing Flow
1. Resume files (PDF, DOCX, TXT, MD) placed in `data/` directory
2. ResumeRAGSystem extracts content and splits into chunks
3. Content embedded using sentence-transformers model ('all-MiniLM-L6-v2')
4. Chunks stored in ChromaDB at `data/resume_vectordb/`
5. Agent processes queries via semantic search and response generation
### MCP Integration
- Exposes `query_resume` tool for Claude Desktop
- Implements JSON-RPC 2.0 protocol over stdio transport
- Returns structured responses with content blocks
## File Structure
```
personal-resume-agent/
├── src/ # Core source code
│ ├── personal_resume_agent.py # Main agent implementation
│ ├── resume_rag.py # RAG system with ChromaDB
│ └── mcp_resume_server.py # MCP server for Claude Desktop
├── data/ # Resume files and vector database (excluded from git)
├── tests/ # Test suite with sample data generation
├── examples/ # Usage examples and demonstrations
└── docs/ # Additional documentation
```
## Configuration
### Claude Desktop Setup
Add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"personal-resume": {
"command": "python",
"args": ["/path/to/personal-resume-agent/src/mcp_resume_server.py"],
"cwd": "/path/to/personal-resume-agent"
}
}
}
```
### Resume File Setup
- Place resume files in `data/` directory
- Supported formats: PDF, DOCX, TXT, MD
- Files with 'resume' or 'cv' in filename are prioritized
- Vector database automatically created at `data/resume_vectordb/`
## Privacy and Security
- All data processed locally (no external API calls for embeddings)
- `data/` directory excluded from version control
- Vector database persisted locally only
- Resume files never committed to repository