feat: implement application email generation command
Implement /write-application-email command and update folder structure:
Changes:
- Add /write-application-email command with document verification
- Update /new-application to create attachments/ subfolder with .keep file
- Update CLAUDE.md with comprehensive workflow documentation
- Add Example 5 showing email generation usage
Features:
- Verifies CV, cover letter exist in attachments/ before generation
- Generates brief professional email (3-4 sentences)
- Supports German/English language detection
- Adapts tone (Formal/Balanced/Casual) from application.md
- Professional subject line format
- Explicit document references
- Flags: --skip-validation, --force
File structure now includes:
applications/pending/[app-name]/
├── application.md
├── input/
└── attachments/
└── .keep
OpenSpec: add-application-email
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+87
-10
@@ -218,10 +218,37 @@ When helping with job applications, follow this comprehensive workflow:
|
||||
- Emphasize relevant experience from profile.md
|
||||
- Incorporate keywords naturally
|
||||
|
||||
### 9. Generate Application Email (FUTURE)
|
||||
- Create professional application email (coming soon)
|
||||
### 9. Prepare Attachments
|
||||
- Convert generated documents to PDF if needed
|
||||
- Add final documents to `attachments/` folder:
|
||||
- CV/Resume (PDF)
|
||||
- Cover letter (PDF) - convert from cover-letter.md
|
||||
- Certificates and diplomas (PDF) if required by job posting
|
||||
|
||||
### 10. Quality Assurance
|
||||
### 10. Generate Application Email
|
||||
- Run `/write-application-email` to generate professional email with document references
|
||||
- System automatically:
|
||||
- Validates application first (stops if incomplete)
|
||||
- Verifies required documents exist in attachments/ folder (CV and cover letter minimum)
|
||||
- Checks if application-email.md already exists (prevents overwriting)
|
||||
- Generates brief email (3-4 sentences) including:
|
||||
- Professional subject line (format: "Application for [Job Title] - [Your Name]")
|
||||
- Brief introduction and interest statement
|
||||
- Explicit reference to all attached documents
|
||||
- Contact information and availability statement
|
||||
- Applies appropriate tone (Formal/Balanced/Casual) from application.md
|
||||
- Detects and applies correct language (German/English)
|
||||
- Saves to `application-email.md` in application folder
|
||||
- Flags available: `--skip-validation`, `--force` (overwrite existing)
|
||||
|
||||
### 11. Review Application Email
|
||||
- Read generated application-email.md
|
||||
- Verify all attachments are correctly listed
|
||||
- Ensure subject line is appropriate
|
||||
- Check contact information is current
|
||||
- Confirm tone matches company culture
|
||||
|
||||
### 12. 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
|
||||
@@ -253,11 +280,25 @@ When helping with job applications, follow this comprehensive workflow:
|
||||
- Word count target enforcement (300-400 words)
|
||||
- Factual accuracy verification
|
||||
|
||||
### Application Email
|
||||
- Keep it short (3-4 sentences maximum)
|
||||
- Subject line: Clear and professional
|
||||
- Body: Brief introduction, reference to attached documents, expression of interest
|
||||
- Professional signature using contact info from `profile.md`
|
||||
### Application Email (Generated by `/write-application-email`)
|
||||
- **Structure**: Subject → Greeting → Brief body (3-4 sentences) → Sign-off with contact info
|
||||
- **Length**: 3-4 sentences maximum (the cover letter contains the details)
|
||||
- **Tone**: Applied from application.md tone assessment (Formal/Balanced/Casual)
|
||||
- **Language**: Inferred from job posting context (German/English)
|
||||
- **Content**:
|
||||
- Professional subject line: "Application for [Job Title] - [Your Name]"
|
||||
- Brief statement of purpose (applying for the position)
|
||||
- Explicit reference to attached documents (CV, cover letter, certificates)
|
||||
- One sentence showing interest or fit
|
||||
- Availability for interview/discussion
|
||||
- **Document Verification**:
|
||||
- Automatic check that CV and cover letter exist in attachments/ folder
|
||||
- Lists all documents that will be attached
|
||||
- Stops generation if required documents are missing
|
||||
- **Quality checks**:
|
||||
- Automatic validation before generation
|
||||
- Protection against overwriting existing work
|
||||
- Verification that attachments folder contains required documents
|
||||
|
||||
## Cultural Considerations
|
||||
|
||||
@@ -290,10 +331,11 @@ Adjust recommendations based on the target market if the user specifies a differ
|
||||
## Available Commands
|
||||
|
||||
- `/validate-profile` - Validate that `profile.md` is complete and ready for application generation
|
||||
- `/new-application "Company - Job Title"` - Create a new application workspace with organized folder structure
|
||||
- `/new-application "Company - Job Title"` - Create a new application workspace with organized folder structure (includes attachments/ folder)
|
||||
- `/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
|
||||
- `/write-application-email [optional-app-name] [--skip-validation] [--force]` - Generate a professional application email with document references
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -310,7 +352,9 @@ Adjust recommendations based on the target market if the user specifies a differ
|
||||
6. Validation step: "Run `/validate-application` to ensure the application is complete"
|
||||
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
|
||||
9. Document preparation: "Convert cover-letter.md to PDF and add it along with your CV to the `attachments/` folder"
|
||||
10. Email generation: "Generate application email with `/write-application-email`"
|
||||
11. Final review: "Review application-email.md, verify all documents are listed correctly, and you're ready to send!"
|
||||
|
||||
### Example 2: Quick Document Request (Legacy Flow)
|
||||
|
||||
@@ -364,6 +408,39 @@ Adjust recommendations based on the target market if the user specifies a differ
|
||||
3. Proceeds with generation
|
||||
4. Suggests: "Review the new version and keep whichever you prefer"
|
||||
|
||||
### Example 5: Generating an Application Email
|
||||
|
||||
**User**: "Generate application email for my TechCorp application"
|
||||
|
||||
**Claude Code should**:
|
||||
1. If user is in application folder: Run `/write-application-email` (auto-detects location)
|
||||
2. If user is elsewhere: Run `/write-application-email 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 document verification
|
||||
4. System verifies documents in attachments/ folder:
|
||||
- Check for CV/Resume file
|
||||
- Check for cover letter file
|
||||
- Check for optional certificates
|
||||
- If required documents missing: Stop and show clear error with guidance
|
||||
- If documents found: Proceed to generation
|
||||
5. Generate application email:
|
||||
- Read profile.md for applicant contact information
|
||||
- Read application.md for job details and tone
|
||||
- Generate brief email (3-4 sentences) with professional subject line
|
||||
- Include explicit references to all attached documents
|
||||
- Save to application-email.md
|
||||
6. Show success: "✅ Application email saved: application-email.md. Attachments ready: CV.pdf, Cover_Letter.pdf. Next: Review and send."
|
||||
|
||||
**User**: "There's no CV in attachments folder"
|
||||
|
||||
**Claude Code should**:
|
||||
1. System detects missing CV during verification step
|
||||
2. Show error: "❌ CV/Resume not found in attachments folder"
|
||||
3. List what was found and what's missing
|
||||
4. Provide guidance: "Please add your CV to: applications/pending/[folder]/attachments/"
|
||||
5. Suggest filename conventions: "Tip: Filename should contain 'cv', 'resume', or 'lebenslauf'"
|
||||
|
||||
## Updating the Profile
|
||||
|
||||
If you notice missing or outdated information during application preparation:
|
||||
|
||||
Reference in New Issue
Block a user