feat: add cover letter generation command
Add /write-cover-letter slash command that generates tailored cover letters based on application strategy (application.md) and applicant profile (profile.md). Features: - Auto-validates application before generation (stops if incomplete) - Protects existing cover-letter.md (requires --force to overwrite) - Generates 300-400 word cover letter with standard structure - Applies tone from application.md (Formal/Balanced/Casual) - Infers language from context (German/English) - Uses match strategy to emphasize relevant experiences - Incorporates company research and key messages - Supports flags: --skip-validation, --force, --help This is the first document generation command in the workflow. OpenSpec: add-cover-letter-generation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+75
-15
@@ -194,14 +194,34 @@ When helping with job applications, follow this comprehensive workflow:
|
||||
- Get warnings if input/ folder is empty or application seems unpopulated
|
||||
- **Must pass before document generation**
|
||||
|
||||
### 6. Content Generation (FUTURE)
|
||||
- Generate CV/cover letter/email based on `application.md` strategy
|
||||
- Emphasize relevant experience from `profile.md`
|
||||
- Incorporate keywords from the job description naturally
|
||||
- Maintain factual accuracy - use only verified information from `profile.md`
|
||||
- **Note**: Document generation will be implemented in a future update
|
||||
### 6. Generate Cover Letter
|
||||
- Run `/write-cover-letter` to generate a tailored cover letter
|
||||
- System automatically validates application first (stops if incomplete)
|
||||
- Checks if cover-letter.md already exists (prevents overwriting)
|
||||
- Generates 300-400 word cover letter using:
|
||||
- Profile.md for applicant background and achievements
|
||||
- Application.md for job strategy, key messages, and tone
|
||||
- Standard structure: Opening → Why this role → What you bring → Cultural fit → Closing
|
||||
- Applies appropriate tone (Formal/Balanced/Casual) from application.md
|
||||
- Saves to `cover-letter.md` in application folder
|
||||
- Flags available: `--skip-validation`, `--force` (overwrite existing)
|
||||
|
||||
### 7. Quality Assurance
|
||||
### 7. Review and Refine Cover Letter
|
||||
- Read generated cover-letter.md carefully
|
||||
- Verify factual accuracy (names, dates, achievements)
|
||||
- Add personal touches or additional insights
|
||||
- Ensure authentic voice and genuine enthusiasm
|
||||
- Proofread for typos and flow
|
||||
|
||||
### 8. Generate CV (FUTURE)
|
||||
- Generate tailored CV based on application.md strategy (coming soon)
|
||||
- Emphasize relevant experience from profile.md
|
||||
- Incorporate keywords naturally
|
||||
|
||||
### 9. Generate Application Email (FUTURE)
|
||||
- Create professional application email (coming soon)
|
||||
|
||||
### 10. Quality Assurance
|
||||
- Verify all company names, dates, and facts are correct
|
||||
- Ensure consistency between all documents (CV ↔ cover letter ↔ email)
|
||||
- Check that tone matches the target company culture
|
||||
@@ -216,12 +236,22 @@ When helping with job applications, follow this comprehensive workflow:
|
||||
- Keep formatting simple and ATS-friendly
|
||||
- Use quantifiable achievements when available
|
||||
|
||||
### Cover Letter
|
||||
- Structure: Opening → Why this role → What you bring → Cultural fit → Closing
|
||||
- Length: Aim for 1 page (3-4 paragraphs)
|
||||
- Tone: Match company culture (formal/balanced/casual)
|
||||
- Personalize: Reference specific aspects of the job/company
|
||||
- Connect: Link applicant's experience to job requirements
|
||||
### Cover Letter (Generated by `/write-cover-letter`)
|
||||
- **Structure**: Opening → Why this role → What you bring → Cultural fit → Closing
|
||||
- **Length**: 300-400 words (approximately 1 page)
|
||||
- **Tone**: Applied from application.md tone assessment (Formal/Balanced/Casual)
|
||||
- **Language**: Inferred from job posting context (German/English)
|
||||
- **Content**:
|
||||
- Use ONLY authentic information from profile.md (no fabrication)
|
||||
- Incorporate 2-3 key experiences from match strategy
|
||||
- Reference company research and culture insights from application.md
|
||||
- Natural incorporation of keywords from job description
|
||||
- Company-specific personalization (values, news, projects)
|
||||
- **Quality checks**:
|
||||
- Automatic validation before generation
|
||||
- Protection against overwriting existing work
|
||||
- Word count target enforcement (300-400 words)
|
||||
- Factual accuracy verification
|
||||
|
||||
### Application Email
|
||||
- Keep it short (3-4 sentences maximum)
|
||||
@@ -263,6 +293,7 @@ Adjust recommendations based on the target market if the user specifies a differ
|
||||
- `/new-application "Company - Job Title"` - Create a new application workspace with organized folder structure
|
||||
- `/populate-application` - Analyze input documents and populate application.md with job info, research, and strategy
|
||||
- `/validate-application [optional-app-name]` - Validate that application.md is complete before document generation
|
||||
- `/write-cover-letter [optional-app-name] [--skip-validation] [--force]` - Generate a tailored cover letter based on application strategy
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -277,8 +308,9 @@ Adjust recommendations based on the target market if the user specifies a differ
|
||||
4. When user has added documents: "Navigate to the application folder and run `/populate-application`"
|
||||
5. After population completes: "Review `application.md` to see the analysis and strategy"
|
||||
6. Validation step: "Run `/validate-application` to ensure the application is complete"
|
||||
7. If validation passes: Ready for document generation
|
||||
8. Future: Generate tailored CV, cover letter, and email based on `application.md`
|
||||
7. If validation passes: "Generate cover letter with `/write-cover-letter`"
|
||||
8. After generation: "Review cover-letter.md and personalize as needed"
|
||||
9. Future: Generate tailored CV and application email
|
||||
|
||||
### Example 2: Quick Document Request (Legacy Flow)
|
||||
|
||||
@@ -304,6 +336,34 @@ Adjust recommendations based on the target market if the user specifies a differ
|
||||
4. If validation fails (❌): Show specific issues like "Organization Name: Contains placeholder '[To be filled]'" and suggest "Please update application.md or run `/populate-application` if you have documents in input/"
|
||||
5. Provide clear next steps based on validation result
|
||||
|
||||
### Example 4: Generating a Cover Letter
|
||||
|
||||
**User**: "Generate cover letter for my TechCorp application"
|
||||
|
||||
**Claude Code should**:
|
||||
1. If user is in application folder: Run `/write-cover-letter` (auto-detects location)
|
||||
2. If user is elsewhere: Run `/write-cover-letter 2025-11-02-TechCorp-Software-Engineer`
|
||||
3. System automatically validates application first:
|
||||
- If validation fails: Stop and show errors, suggest fixing or using `--skip-validation`
|
||||
- If validation passes: Proceed to generation
|
||||
4. Check for existing cover-letter.md:
|
||||
- If exists: Stop and suggest using `--force` flag to overwrite
|
||||
- If doesn't exist: Proceed to generation
|
||||
5. Generate cover letter:
|
||||
- Read profile.md for applicant background
|
||||
- Read application.md for job strategy and tone
|
||||
- Generate 300-400 word tailored cover letter
|
||||
- Save to cover-letter.md
|
||||
6. Show success: "✅ Cover letter saved: cover-letter.md. Generated 376 words. Next: Review and personalize."
|
||||
|
||||
**User**: "Regenerate the cover letter with different approach"
|
||||
|
||||
**Claude Code should**:
|
||||
1. Run `/write-cover-letter --force` to overwrite existing file
|
||||
2. System warns: "⚠️ Overwriting existing cover letter"
|
||||
3. Proceeds with generation
|
||||
4. Suggests: "Review the new version and keep whichever you prefer"
|
||||
|
||||
## Updating the Profile
|
||||
|
||||
If you notice missing or outdated information during application preparation:
|
||||
|
||||
Reference in New Issue
Block a user