# Implementation Tasks ## 1. Template Creation - [x] 1.1 Create Swiss letter LaTeX template at `src/.claude/templates/swiss-letter.tex` - [x] 1.2 Configure scrlttr2 with Swiss Norm (SN) settings - [x] 1.3 Add proper encoding (UTF-8, T1 font encoding) for German characters - [x] 1.4 Implement hyperlinks for email addresses - [x] 1.5 Add Pandoc variable placeholders for all frontmatter fields - [x] 1.6 Add inline comments explaining customizable sections - [x] 1.7 Test template with sample data to ensure proper formatting ## 2. Slash Command Implementation - [x] 2.1 Create command file at `src/.claude/commands/convert-cover-letter.md` - [x] 2.2 Implement cover letter file detection logic - [x] 2.3 Implement environment validation checks (Pandoc, LaTeX) - [x] 2.4 Add platform-specific installation instructions - [x] 2.5 Implement frontmatter parsing and validation - [x] 2.6 Build Pandoc command with correct arguments - [x] 2.7 Execute conversion and capture output - [x] 2.8 Implement error handling for common failure scenarios - [x] 2.9 Add success message with file path output ## 3. Error Handling & Messaging - [x] 3.1 Create clear error message for missing cover letter - [x] 3.2 Create error message for missing required frontmatter fields - [x] 3.3 Create installation guide for Pandoc (apt, brew, winget) - [x] 3.4 Create installation guide for LaTeX packages - [x] 3.5 Add error handling for YAML parsing failures - [x] 3.6 Add error handling for LaTeX compilation failures - [x] 3.7 Add error handling for file permission issues - [x] 3.8 Add timeout handling for long-running conversions ## 4. Testing - [x] 4.1 Test with complete frontmatter and body content - [x] 4.2 Test with minimal required frontmatter only - [x] 4.3 Test with optional enclosures list - [x] 4.4 Test with missing cover-letter.md file - [x] 4.5 Test with invalid YAML frontmatter - [x] 4.6 Test with missing required frontmatter fields - [x] 4.7 Test with special characters (ä, ö, ü, ß) in German text - [x] 4.8 Test environment validation when Pandoc is missing - [x] 4.9 Test environment validation when LaTeX is missing - [x] 4.10 Test error handling for file permission issues - [x] 4.11 Verify Swiss address window positioning with printed output - [x] 4.12 Verify date formatting follows Swiss convention ## 5. Documentation - [x] 5.1 Document required frontmatter structure - [x] 5.2 Document system requirements (Pandoc, LaTeX) - [x] 5.3 Add example cover-letter.md with complete frontmatter - [x] 5.4 Document troubleshooting steps for common errors - [x] 5.5 Add template customization guide ## 6. Integration - [x] 6.1 Update test directory with new command - [x] 6.2 Update test directory with new template - [x] 6.3 Ensure compatibility with existing cover letter generation - [x] 6.4 Verify workflow integration (step 7 in project.md)