Antigravity adapdations

This commit is contained in:
2025-12-08 22:25:33 +01:00
parent 39ae41ed9a
commit 7db8c46e1f
9 changed files with 3538 additions and 1 deletions
+89 -1
View File
@@ -15,4 +15,92 @@ Use `@/openspec/AGENTS.md` to learn:
Keep this managed block so 'openspec update' can refresh the instructions. Keep this managed block so 'openspec update' can refresh the instructions.
<!-- OPENSPEC:END --> <!-- OPENSPEC:END -->
---
# Updating the Test Framework
## ⚠️ CRITICAL: Preserve User Data During Updates
When updating the test framework at `~/workspace/test-bewerbungen/`, you MUST preserve user data files. **NEVER** use `cp -r src/* ~/workspace/test-bewerbungen/` as this overwrites everything including user work.
## Protected Files & Folders
**NEVER overwrite these in the test directory:**
- `profile.md` - Contains user's personal and professional information
- `applications/` folder - Contains all job application work in progress
- Any PDF files - User's CVs, certificates, or job-related documents
- Any user-created files or modifications
## Safe Update Process
### Method 1: Selective File Update (Recommended)
Update only framework code files, preserving user data:
```bash
# Update main instruction file
cp src/CLAUDE.md ~/workspace/test-bewerbungen/
# Update slash commands and templates
cp -r src/.claude ~/workspace/test-bewerbungen/
# ONLY create applications directory if it doesn't exist
# (don't overwrite existing one with user's applications)
if [ ! -d ~/workspace/test-bewerbungen/applications ]; then
mkdir -p ~/workspace/test-bewerbungen/applications/pending
fi
```
### Method 2: Manual Selective Copy
For more control, copy specific files individually:
```bash
# Framework instructions
cp src/CLAUDE.md ~/workspace/test-bewerbungen/
# Slash commands
cp src/.claude/commands/new-application.md ~/workspace/test-bewerbungen/.claude/commands/
cp src/.claude/commands/populate-application.md ~/workspace/test-bewerbungen/.claude/commands/
cp src/.claude/commands/validate-profile.md ~/workspace/test-bewerbungen/.claude/commands/
# Templates
cp src/.claude/templates/application-template.md ~/workspace/test-bewerbungen/.claude/templates/
```
### ❌ NEVER Use These Commands on Test Directory
```bash
# DANGEROUS - Overwrites everything including user data
cp -r src/* ~/workspace/test-bewerbungen/
# DANGEROUS - Overwrites user's profile
cp src/profile.md ~/workspace/test-bewerbungen/
# DANGEROUS - Deletes user's applications
rm -rf ~/workspace/test-bewerbungen/applications/
```
## When to Update Test Framework
Update the test directory when:
- Adding new slash commands to `src/.claude/commands/`
- Modifying the application template in `src/.claude/templates/`
- Updating framework instructions in `src/CLAUDE.md`
- Fixing bugs in command logic
**Do NOT update** `profile.md` or touch the `applications/` folder - these belong to the user.
## Workflow Summary
1. **Make changes** to framework files in `src/`
2. **Test locally** in development environment first
3. **Selectively copy** only framework files to test directory
4. **Verify** user data (`profile.md`, `applications/`) remains intact
5. **Test** the updated commands in the test environment
---
**Remember**: The test directory simulates a real user's environment. Treat user data with care!
@@ -0,0 +1,506 @@
---
description: Convert a markdown cover letter to a professionally formatted PDF using Swiss business letter standards.
---
# Instructions
You are converting a markdown cover letter to PDF format. The output will follow Swiss business letter standards (scrlttr2 with Swiss Norm) for proper formatting and address window positioning.
## Step 1: Check for Cover Letter
### Verify File Exists
1. Check if `cover-letter.md` exists in the current directory
2. If file exists → proceed to Step 2
3. If file does not exist → show error and stop
### Error: Cover Letter Not Found
```
❌ Cover letter not found
Could not find cover-letter.md in the current directory.
Please either:
1. Navigate to an application folder containing a cover letter:
cd applications/pending/[application-folder]/
/convert-cover-letter
2. Generate a cover letter first:
/write-cover-letter
Current directory: [show current working directory]
```
STOP. Do not proceed.
## Step 2: Environment Validation
**CRITICAL**: Check for required tools before attempting conversion.
Show progress: `🔍 Checking system requirements...`
### Check for Pandoc
Run: `which pandoc` or `pandoc --version`
**If Pandoc is NOT installed:**
```
❌ Pandoc not found
Pandoc is required for PDF conversion but is not installed on your system.
## Installation Instructions:
### Ubuntu/Debian:
sudo apt update
sudo apt install pandoc
### macOS (Homebrew):
brew install pandoc
### Arch Linux:
sudo pacman -S pandoc
### Windows:
winget install pandoc
### Other Systems:
Download from: https://pandoc.org/installing.html
---
After installation, run: pandoc --version
Then try /convert-cover-letter again.
```
STOP. Do not proceed with conversion.
**If Pandoc is installed:**
Show progress: `✓ Pandoc found (version X.X.X)`
### Check for LaTeX (pdflatex)
Run: `which pdflatex` or `pdflatex --version`
**If LaTeX is NOT installed:**
```
❌ LaTeX not found
LaTeX (pdflatex) is required for PDF generation but is not installed.
## Installation Instructions:
### Ubuntu/Debian:
sudo apt update
sudo apt install texlive-latex-base texlive-latex-extra
# For German language support (recommended for proper labels):
sudo apt install texlive-lang-german
### macOS (Homebrew):
brew install texlive
# Note: This is a large download (~4GB). Alternative: MacTeX from https://www.tug.org/mactex/
### Arch Linux:
sudo pacman -S texlive-core texlive-latexextra texlive-langgerman
### Windows:
# Install MiKTeX from: https://miktex.org/download
# Or TeX Live from: https://www.tug.org/texlive/
---
**Required packages**:
- texlive-latex-base (core LaTeX)
- texlive-latex-extra (KOMA-Script including scrlttr2)
**Recommended packages**:
- texlive-lang-german (German labels: "Telefon" instead of "Phone", "Anlagen" instead of "encl")
After installation, run: pdflatex --version
Then try /convert-cover-letter again.
```
STOP. Do not proceed with conversion.
**If LaTeX is installed:**
Show progress: `✓ LaTeX found (pdfTeX X.X.X)`
**All prerequisites met:**
Show progress: `✅ All requirements satisfied`
## Step 3: Read and Validate Cover Letter
Show progress: `📄 Reading cover-letter.md...`
### Read File Content
1. Read the entire `cover-letter.md` file
2. Separate frontmatter (YAML between `---` delimiters) from body content
3. Parse the YAML frontmatter
4. Extract the markdown body (everything after the second `---`)
### Validate Frontmatter Structure
**Required fields:**
- `from.name` - Sender's full name
- `from.street` - Sender's street address
- `from.city` - Sender's city with postal code (e.g., "CH-8000 Zürich")
- `to` - Array of recipient address lines (at least 2 lines)
- `subject` - Letter subject line
- `opening` - Letter opening salutation
- `closing` - Letter closing phrase
- `signature` - Name for signature
**Optional fields:**
- `from.phone` - Sender's phone number
- `from.email` - Sender's email address
- `date` - Letter date (defaults to current date if missing)
- `enclosures` - Array of enclosure items
### Error: Invalid YAML
**If frontmatter cannot be parsed as YAML:**
```
❌ Invalid frontmatter format
The YAML frontmatter in cover-letter.md could not be parsed.
Error details: [specific YAML parsing error]
Please check that:
1. Frontmatter is enclosed between --- markers
2. YAML syntax is correct (proper indentation, colons, hyphens)
3. No special characters are unescaped
Example of correct frontmatter:
---
from:
name: Max Mustermann
street: Musterstrasse 42
city: CH-8000 Zürich
phone: +41 44 123 45 67
email: max.mustermann@example.ch
to:
- Firma AG
- Personalabteilung
- Hauptstrasse 100
- CH-3000 Bern
subject: Bewerbung als Software-Entwickler
opening: Sehr geehrte Damen und Herren
closing: Freundliche Grüsse
signature: Max Mustermann
---
```
STOP.
### Error: Missing Required Fields
**If any required fields are missing:**
```
❌ Incomplete frontmatter
Your cover letter is missing required fields in the frontmatter:
Missing fields:
[List each missing field with description]
Required frontmatter structure:
---
from:
name: [Your full name]
street: [Your street address]
city: [Your city with postal code]
phone: [Your phone] (optional)
email: [Your email] (optional)
to:
- [Company name]
- [Department or contact person]
- [Street address]
- [City with postal code]
date: [DD.MM.YYYY] (optional, defaults to today)
subject: [Letter subject]
opening: [Greeting, e.g., "Sehr geehrte Damen und Herren"]
closing: [Sign-off, e.g., "Freundliche Grüsse"]
signature: [Your name for signature]
enclosures: (optional)
- [Document 1]
- [Document 2]
---
[Body content follows]
```
STOP.
**If all required fields are present:**
Show progress: `✓ Frontmatter validated`
## Step 4: Convert to PDF
Show progress: `🔄 Converting to PDF...`
### Prepare Pandoc Command
Build the conversion command:
```bash
pandoc cover-letter.md \
--from markdown \
--to latex \
--template=src/.claude/templates/swiss-letter.tex \
--pdf-engine=pdflatex \
--output=cover-letter.pdf
```
**Template path**: Use the template at `src/.claude/templates/swiss-letter.tex` relative to the framework root.
### Execute Conversion
1. Run the Pandoc command
2. Capture stdout and stderr
3. Check exit code
### Handle Conversion Errors
**If pdflatex fails to compile:**
```
❌ PDF compilation failed
LaTeX encountered an error while compiling your cover letter.
Error output:
[Show relevant error lines from stderr]
Common causes:
1. Special characters not properly escaped (e.g., &, %, $, #, _)
2. Formatting issues in the markdown body
3. Very long lines or complex formatting
4. Missing LaTeX packages
Troubleshooting:
1. Check for special characters in your cover letter text
2. Try simplifying complex formatting
3. Verify that all required LaTeX packages are installed:
- texlive-latex-base
- texlive-lang-german
- texlive-latex-extra
The intermediate .tex file has been preserved at: [path-to-.tex-file]
You can inspect this file to identify the issue.
Need help? Share the error output above for assistance.
```
STOP.
**If file permissions error:**
```
❌ Permission denied
Could not write cover-letter.pdf to the current directory.
Please check:
1. You have write permissions in: [current directory]
2. The file is not open in another application
3. Sufficient disk space is available
Current directory permissions:
[Show output of: ls -ld .]
```
STOP.
**If disk space error:**
```
❌ Insufficient disk space
Could not create PDF file due to insufficient disk space.
Please:
1. Free up disk space
2. Or choose a different output location
Available disk space:
[Show output of: df -h .]
```
STOP.
**If conversion times out (> 30 seconds):**
```
❌ Conversion timeout
PDF generation took longer than expected (> 30 seconds).
This might indicate:
1. Very long or complex document
2. LaTeX compilation stuck on an error
3. System resource constraints
Please try:
1. Simplifying the cover letter content
2. Checking system resources
3. Running pdflatex manually for debugging
Manual debugging:
pandoc cover-letter.md --from markdown --to latex --template=[template-path] -o cover-letter.tex
pdflatex cover-letter.tex
```
STOP.
## Step 5: Success Output
**If conversion succeeded:**
```
✅ PDF generated successfully: cover-letter.pdf
## Conversion Summary:
📄 Input: cover-letter.md
📑 Output: cover-letter.pdf
📐 Format: Swiss business letter (scrlttr2, Swiss Norm)
## Document Details:
✓ Sender: [from.name]
✓ Recipient: [to[0]] (first line of address)
✓ Subject: [subject]
✓ Date: [date]
$if(enclosures)$
✓ Enclosures: [N] items
$endif$
## Formatting Applied:
- Swiss address window positioning (compatible with standard Swiss envelopes)
- Swiss German hyphenation and spelling
- Professional business letter layout
- Clickable email links
- Proper margins and spacing
## Next Steps:
1. **Review the PDF**: Open cover-letter.pdf and verify:
- All information is correct
- Layout looks professional
- Address fits in envelope window (if printing)
- No formatting issues or typos
2. **Print test** (if mailing):
- Print the PDF
- Check address position with a Swiss envelope window
- Verify text is clear and readable
3. **Digital submission**:
- Ready to attach to email applications
- Filename: cover-letter.pdf
4. **Rename for organization** (optional):
- Consider: [YourName]_Cover_Letter_[Company]_[Date].pdf
- Example: Max_Mustermann_Cover_Letter_TechCorp_2025-11-03.pdf
---
**Tip**: The generated PDF follows Swiss standards (SN) for business correspondence.
The address positioning is optimized for standard Swiss envelope windows.
```
## Step 6: Cleanup (Optional)
Pandoc may create intermediate files during conversion:
- `cover-letter.tex` - Intermediate LaTeX file
- `cover-letter.aux`, `cover-letter.log` - LaTeX compilation files
**If conversion was successful**: These files can be deleted (they're not needed)
**If conversion failed**: Preserve the .tex file for debugging
## Additional Features
### Custom Template
Users can customize the Swiss letter template:
**Location**: `src/.claude/templates/swiss-letter.tex`
**Customizable elements** (documented in template):
- Font size (currently 11pt)
- Margins and spacing
- Sender address alignment
- Header/footer content
- Color scheme (currently black/white)
**To customize**:
1. Edit `src/.claude/templates/swiss-letter.tex`
2. Re-run `/convert-cover-letter` to apply changes
3. Template comments explain each section
### Multiple Conversions
Users can run `/convert-cover-letter` multiple times:
- Overwrites existing `cover-letter.pdf` (no prompt needed)
- Use this after editing `cover-letter.md`
- Quick iteration on formatting and content
## Error Handling Summary
| Error Condition | User Action Required |
|-----------------|---------------------|
| No cover-letter.md | Navigate to application folder or run /write-cover-letter |
| Pandoc missing | Install Pandoc via package manager |
| LaTeX missing | Install texlive-latex-base, texlive-lang-german, texlive-latex-extra |
| Invalid YAML | Fix frontmatter syntax in cover-letter.md |
| Missing required fields | Add missing fields to frontmatter |
| LaTeX compilation error | Check for special characters, inspect .tex file |
| Permission denied | Check directory write permissions |
| Disk space | Free up disk space |
| Timeout | Simplify content or debug manually |
## Important Notes
### Swiss Letter Standards
The conversion follows Swiss Norm (SN) for business letters:
- **Address window**: Positioned for standard Swiss envelope windows
- **Date format**: DD.MM.YYYY (Swiss convention)
- **Layout**: KOMA-Script scrlttr2 with Swiss configuration
- **Language support**: Swiss German hyphenation and special characters (ä, ö, ü, ß)
### File Compatibility
**Input format**: Markdown with YAML frontmatter
**Output format**: PDF (via LaTeX)
**Template engine**: Pandoc with custom LaTeX template
### System Requirements
**Minimum**:
- Pandoc 2.0+
- LaTeX (TeX Live or MiKTeX)
- Basic LaTeX packages (texlive-latex-base, texlive-lang-german, texlive-latex-extra)
**Recommended**:
- Latest Pandoc version
- Full TeX Live installation (includes all packages)
- ~500MB disk space for full LaTeX installation
### Troubleshooting
**Common issues**:
1. **"File not found"** → Run command from application directory
2. **"Pandoc not found"** → Install Pandoc first
3. **"LaTeX error"** → Check for special characters in text
4. **"Missing font"** → Install texlive-fonts-recommended
5. **"Address doesn't fit window"** → Verify Swiss envelope type, check template settings
**For advanced users**:
- Intermediate .tex file shows LaTeX source
- Run `pdflatex cover-letter.tex` manually for detailed error output
- Edit swiss-letter.tex template for custom layouts
---
**Remember**: The goal is to produce a professional, Swiss-standard business letter PDF that is ready for submission with job applications. Quality and formatting accuracy are paramount.
+179
View File
@@ -0,0 +1,179 @@
---
description: Initialize a new job application with organized folder structure.
---
# Instructions
You are creating a new job application workspace for the user.
## Input Processing
### 1. Parse User Input
The user will provide information about the application in the command. Extract:
- **Organization Name**: The company/organization they're applying to
- **Job Title**: The position they're applying for
Example inputs:
- `/new-application "TechCorp - Senior Developer"`
- `/new-application "Startup Inc - Product Manager"`
- `/new-application "Google - Software Engineer"`
If the user provides insufficient information, prompt them:
```
Please provide the organization name and job title.
Format: /new-application "Organization Name - Job Title"
Example: /new-application "TechCorp - Senior Developer"
```
### 2. Generate Folder Name
Create a folder name in the format: `YYYY-MM-DD-OrganizationName-JobTitle`
**Date Format**:
- Use today's date from the system
- Format: YYYY-MM-DD (e.g., 2025-11-02)
**Name Sanitization**:
- Remove or replace invalid filesystem characters: `/ \ : * ? " < > |`
- Replace spaces with hyphens
- Remove multiple consecutive hyphens
- Trim leading/trailing hyphens
- Limit total length to 100 characters for filesystem compatibility
- If too long, truncate job title portion first, then organization name if needed
**Examples**:
- Input: "Tech Corp Inc. - Senior Software Engineer"
- Output: `2025-11-02-Tech-Corp-Inc-Senior-Software-Engineer`
- Input: "Company/Organization - Manager: Sales & Marketing"
- Output: `2025-11-02-Company-Organization-Manager-Sales-Marketing`
### 3. Handle Duplicate Folders
If a folder with the generated name already exists:
- Append a counter: `-2`, `-3`, etc.
- Example: `2025-11-02-TechCorp-Developer-2`
- Inform the user: "A folder for this application already exists. Created with suffix -2."
## Folder Creation
### 4. Create Directory Structure
Create the following structure in `applications/pending/`:
```
applications/pending/[generated-folder-name]/
├── application.md
├── input/
└── attachments/
└── .keep
```
Use these steps:
1. Create the application folder: `applications/pending/[generated-folder-name]/`
2. Create the `input/` subfolder inside it
3. Create the `attachments/` subfolder inside it
4. Create an empty `.keep` file inside `attachments/` folder for version control
5. Create `application.md` from the template
### 5. Create application.md
Copy the template from `src/.claude/templates/application-template.md` to the new folder as `application.md`.
**Update Metadata Section**:
- Replace `[Auto-filled on creation]` in the Created field with current timestamp
- Format: `YYYY-MM-DD HH:MM` (e.g., "2025-11-02 14:30")
**Optional - Pre-fill Known Information**:
If the user provided clear organization name and job title:
- Fill in "Organization Name" field
- Fill in "Job Title" field
- Leave all other fields as placeholders for `/populate-application` to fill
## User Confirmation
### 6. Success Message
After successfully creating the application, provide this output:
```
✅ New application created successfully!
**Location**: applications/pending/[folder-name]/
**Organization**: [Organization Name]
**Position**: [Job Title]
## Next Steps:
1. **Add documents to the input folder**:
```
applications/pending/[folder-name]/input/
```
Add any of these documents:
- Job posting/advertisement (PDF, TXT, MD, DOCX)
- Recruiter emails or communications
- Company research notes
- Any other relevant context
2. **Prepare attachments folder** (for later use):
```
applications/pending/[folder-name]/attachments/
```
This folder is for final documents ready to send:
- CV/Resume (PDF)
- Cover letter (PDF)
- Certificates and diplomas (PDF)
Note: Documents will be generated first, then you add them here before creating the application email.
3. **Populate the application**:
Once you've added your documents, run:
```
/populate-application
```
This will analyze all input files and populate application.md with:
- Job requirements and keywords
- Company research and culture insights
- Match strategy (your relevant skills/experience)
- Suggested tone and key messages
4. **Review and refine**:
After population, review `application.md` and add your own insights.
5. **Generate documents**:
Use the populated application to generate tailored cover letter and email:
```
/write-cover-letter
/write-application-email
```
---
**Tip**: You can manually edit `application.md` at any time to add notes, ideas, or strategy thoughts.
```
## Error Handling
### 7. Handle Edge Cases
**If applications/pending/ doesn't exist**:
- Create it automatically with parent directories
- Inform user: "Created applications directory structure."
**If template file is missing** (`src/.claude/templates/application-template.md`):
- Create a basic application.md with minimal structure
- Warn user: "Template file not found. Created basic application.md structure."
**If filesystem errors occur**:
- Provide clear error message
- Suggest checking permissions or path length
## Important Notes
- Always use forward slashes (/) for paths, even on Windows (handled by tools)
- Preserve the YYYY-MM-DD prefix for chronological sorting
- Keep folder names readable - avoid cryptic abbreviations
- The input/ folder should be empty initially - it's for the user to fill
@@ -0,0 +1,393 @@
---
description: Analyze input documents and populate the application.md file with job information, research, and strategy.
---
# Instructions
You are populating a job application by analyzing documents and cross-referencing with the applicant's profile.
## Pre-flight Checks
### 1. Verify Location
**Check Current Directory**:
- Verify you're inside an application folder (should be in `applications/pending/[application-name]/`)
- Check if `application.md` exists in current directory
- Check if `input/` subfolder exists
**If NOT in correct location**:
```
❌ Not in an application folder
Please navigate to an application folder first:
cd applications/pending/[your-application-folder]/
Then run /populate-application again.
To see available applications:
ls applications/pending/
```
**If application.md doesn't exist**:
```
❌ No application.md found
This doesn't appear to be a valid application folder.
Did you create this application with /new-application?
```
### 2. Check Input Folder
**If input/ folder doesn't exist**:
- Create it automatically
- Inform user: "Created input/ folder. Please add documents before populating."
**If input/ folder is empty**:
```
⚠️ Input folder is empty
Please add documents to analyze:
- Job posting/advertisement (PDF, TXT, MD, DOCX)
- Recruiter emails or communications
- Company research notes
- Any other relevant context
Add files to: ./input/
Then run /populate-application again.
```
## Document Discovery & Analysis
### 3. List Input Files
Scan the `input/` folder and categorize files:
**Supported Formats**:
- PDF files (`.pdf`) - Read using Read tool (has built-in PDF support)
- Text files (`.txt`, `.md`, `.markdown`)
- Document files (`.docx`) - Try to read as best as possible
- Email files (`.eml`, `.msg`) - Extract as text
- HTML files (`.html`, `.htm`)
**Unsupported Formats** (warn but skip):
- Images (`.jpg`, `.png`, `.gif`) - "Cannot extract text from images"
- Videos, audio, archives, executables
**Output file list**:
```
📄 Found [N] documents in input/ folder:
Supported:
✓ job-posting.pdf
✓ recruiter-email.txt
✓ company-research.md
Skipped (unsupported format):
⊘ company-logo.png
```
### 4. Read All Supported Files
For each supported file:
1. Use the Read tool to extract content
2. Note the filename for reference
3. If a file fails to read, skip it with a warning
### 5. Analyze Job Information
**Extract from job postings/descriptions**:
**Organization Information**:
- Company name
- Industry/sector
- Location (city, country, remote options)
- Company size (if mentioned)
- Website or apply URL
**Job Details**:
- Job title
- Job level (Junior, Mid, Senior, Lead, Manager, etc.)
- Department or team
- Employment type (Full-time, Part-time, Contract, Freelance)
- Salary range (if mentioned)
- Remote/hybrid/on-site requirements
**Job Description**:
- Key responsibilities (extract 5-10 main duties)
- Required skills and qualifications
- Preferred/nice-to-have skills
- Required experience (years, specific domains)
- Education requirements
- Certifications or licenses
**Keywords**:
- Extract important keywords for ATS optimization
- Programming languages, frameworks, tools mentioned
- Industry-specific terms
- Soft skills mentioned
**Company Culture Indicators**:
- Language tone (formal, casual, enthusiastic)
- Values mentioned (innovation, collaboration, diversity, etc.)
- Benefits and perks mentioned
- Work environment description
### 6. Analyze Additional Documents
**From recruiter emails**:
- Recruiter/contact person name and email
- Timeline and deadlines
- Special instructions or requirements
- Salary expectations or discussions
- Interview process details
**From research notes**:
- Company news, funding, acquisitions
- Product launches or initiatives
- Company culture insights
- Employee reviews or Glassdoor data
- Competitive landscape
## Profile Cross-Reference
### 7. Read Applicant Profile
Read `profile.md` (in the framework root directory) to understand the applicant's background.
**If profile.md doesn't exist or is incomplete**:
```
⚠️ Profile not found or incomplete
Your profile.md should be filled out for best results.
Run /validate-profile to check your profile status.
Continuing with job analysis only (without personalized matching).
```
### 8. Match Analysis
**IF profile is available**, analyze matches:
**Experience Matching**:
- Which work experiences from profile align with job requirements?
- Which responsibilities overlap?
- Which achievements are most relevant?
**Skills Matching**:
- Which technical skills match required skills?
- Which soft skills align with the role?
- Which tools/technologies match?
**Projects Matching**:
- Which projects demonstrate relevant capabilities?
- Which projects solve similar problems?
**Gap Analysis**:
- What required skills are missing from profile?
- Can any gaps be filled with transferable skills?
- What learning or growth opportunities does this role present?
**Recommendations**:
- Which experiences to emphasize in CV?
- Which projects to highlight?
- Which achievements to feature prominently?
- Stories or examples from profile that demonstrate required skills?
## Population Strategy
### 9. Check Existing Content
Before populating, read current `application.md`:
- Check which sections already have content
- Identify manually added notes or insights
- Determine which sections need population
### 10. Populate application.md
**Update each section intelligently**:
**Metadata**:
- Update status if appropriate
- Add deadline if found in documents
**Organization Information**:
- Fill in company name, industry, location, website, contact person
- Only overwrite `[To be filled]` placeholders, preserve manually entered data
**Job Information**:
- Fill in job title, level, department, employment type, remote status
- Only overwrite placeholders
**Job Description Summary**:
- Add key responsibilities (bulleted list)
- Add required skills (bulleted list)
- Add preferred skills (bulleted list)
- Add extracted keywords
**Research Notes**:
- Add company culture observations
- Add recent news/developments
- If user has manual notes, ADD to them (don't replace)
**Match Strategy** (only if profile is available):
- List relevant experiences to emphasize
- Map required skills to applicant's skills
- List projects to highlight
- Identify gaps and suggest how to address them
**Key Messages**:
- Suggest 3-5 main points to convey in application
- Base these on match analysis
**Tone of Voice**:
- Assess appropriate tone (Formal/Balanced/Casual)
- Provide reasoning based on job posting language
- Suggest example phrases
**Document Checklist**:
- Check appropriate boxes based on application requirements
### 11. Preserve Manual Content
**IMPORTANT**:
- Do NOT overwrite manually entered content
- If a section has user-written notes, ADD analysis below them with a separator
- Add a timestamp comment: `<!-- Auto-populated on YYYY-MM-DD HH:MM -->`
- Mark auto-populated sections clearly
**Example**:
```markdown
## Research Notes
<!-- User's manual notes -->
I really like their commitment to open source.
---
<!-- Auto-populated on 2025-11-02 14:30 -->
### Company Culture & Values
Based on job posting analysis:
- Emphasizes collaboration and innovation
- Values work-life balance (mentions flexible hours)
- Strong focus on diversity and inclusion
```
### 12. Interactive Prompts
**Ask for missing critical information**:
If critical fields cannot be determined:
```
Some information couldn't be extracted from the documents.
Please provide the following:
1. Job Title: [Current extracted value or "Unknown"]
2. Organization Name: [Current extracted value or "Unknown"]
Would you like to provide this now? (Or leave as-is to fill manually later)
```
**Confirm before major changes**:
If application.md already has significant content:
```
⚠️ This application already has populated content.
Would you like to:
1. **Merge** - Add new analysis alongside existing content (recommended)
2. **Replace** - Overwrite with new analysis (will preserve metadata)
3. **Cancel** - Don't make changes
Choice: [Ask user to respond]
```
## Completion
### 13. Summary Report
After successful population:
```
✅ Application populated successfully!
## Analyzed Documents:
- job-posting.pdf
- recruiter-email.txt
- company-research.md
## Extracted Information:
✓ Organization: [Company Name]
✓ Position: [Job Title]
✓ Key Requirements: [N] identified
✓ Keywords: [N] extracted
✓ Company Culture: [Tone assessment]
## Profile Matching:
✓ Relevant Experience: [N] positions identified
✓ Skills Match: [N/M] required skills matched
✓ Projects to Highlight: [N] projects suggested
✓ Potential Gaps: [N] areas for development
## Updated Sections:
✓ Organization Information
✓ Job Information
✓ Job Description Summary
✓ Research Notes
✓ Match Strategy
✓ Key Messages
✓ Tone of Voice
## Next Steps:
1. **Review application.md**:
Open and review the populated information for accuracy.
2. **Add your insights**:
Enhance sections with your own thoughts and strategy.
3. **Refine match strategy**:
Adjust which experiences and projects to emphasize.
4. **Validate application**:
Run /validate-application to ensure completeness before document generation.
5. **Generate documents** (coming soon):
Once validation passes, generate tailored CV and cover letter.
---
**Tip**: You can re-run /populate-application after adding more documents to input/.
The analysis will be merged with existing content.
```
## Error Handling
**If files cannot be read**:
- Skip the file
- Warn: "Could not read [filename]. Continuing with other files."
**If no useful information extracted**:
```
⚠️ Limited information extracted
The documents in input/ didn't contain clear job information.
Please check:
- Do you have the job posting/description?
- Are the files readable (not corrupted)?
- Is the text extractable (not image-only PDFs)?
You can manually fill in application.md or add more documents.
```
**If profile analysis fails**:
- Continue with job analysis only
- Warn: "Could not analyze profile matching. Consider running /validate-profile."
## Important Notes
- Be thorough but not overwhelming - prioritize the most relevant information
- Preserve user's manual work - they may have important insights
- Be honest about gaps and limitations
- Provide actionable next steps
- Always leave the user in control - they can manually edit anything
@@ -0,0 +1,387 @@
---
description: Validate that `application.md` is completely filled out and ready for document generation.
---
# Instructions
You are validating a job application to ensure it's ready for generating tailored CV, cover letter, and email.
## Step 1: Location Detection
### Determine Which Application to Validate
**If NO parameter provided:**
1. Check current working directory
2. Verify if you're inside an application folder by checking:
- Path pattern: ends with `applications/pending/[folder-name]/`
- File existence: `application.md` exists in current directory
3. If yes → validate this application
4. If no → show error with available applications (see Error Handling section)
**If parameter PROVIDED:**
1. Parameter can be:
- Folder name: `2025-11-02-TechCorp-Developer`
- Relative path: `applications/pending/2025-11-02-TechCorp-Developer`
- Absolute path: `/full/path/to/application/folder`
2. Resolve to application folder: `applications/pending/[folder-name]/`
3. Check if `application.md` exists in that location
4. If yes → validate that application
5. If no → show error with available applications
### Error Handling: Wrong Location / Not Found
**If running from wrong location without parameter:**
```
❌ Not in an application folder
Please either:
1. Navigate to an application folder:
cd applications/pending/[application-folder]/
/validate-application
2. Or provide the application folder name:
/validate-application [application-folder-name]
Available applications:
[List output of: ls applications/pending/]
Example:
/validate-application 2025-11-02-TechCorp-Developer
```
**If application doesn't exist with parameter:**
```
❌ Application not found: [provided-name]
Available applications:
[List output of: ls applications/pending/]
Usage:
/validate-application [folder-name]
```
**If application.md missing in found folder:**
```
❌ No application.md found in [path]
This doesn't appear to be a valid application folder.
Did you create this application with /new-application?
```
## Step 2: Read application.md
Read the entire `application.md` file in the detected/specified application folder.
**If file is corrupted or unreadable:**
```
❌ Could not read application.md
The file exists but cannot be read. It may be corrupted or have permission issues.
Please check the file: [full-path-to-application.md]
```
## Step 3: Parse Sections
Extract content for each section by markdown headings. Recognize sections case-insensitively:
**Required Sections** (validation checks these):
- "Organization Information" / "organization information"
- "Job Information" / "job information"
- "Job Description Summary" / "job description summary"
**Optional Sections** (don't cause validation failure):
- Match Strategy
- Key Messages
- Tone of Voice
- Research Notes
- Document Checklist
- Application Strategy Notes
- Timeline
- Metadata
## Step 4: Detect Placeholders
Check for these placeholder patterns that indicate incomplete data:
### Placeholder Patterns
**Square brackets:**
- `[To be filled]`
- `[Organization name]`
- `[Job Title]`
- `[Company Name]`
- `[...]`
- `[Any text in brackets]`
**Generic template text:**
- "Add information here"
- "To be filled"
- Text that matches the template unchanged
### Context-Aware Detection
**DO flag as placeholders:**
- `[To be filled]`
- `[Company Name]`
- `[Job Title]` as the only content
- `[Organization name here]`
**DON'T flag as placeholders:**
- `[PhD]` after a name in context
- `[Acquired by Google]` in a company description
- `[Remote]` as a job location descriptor
- Other brackets used meaningfully in normal text
If placeholder text is longer than 100 characters, truncate it in the error message: `"[First 100 chars...]"`
## Step 5: Validate Required Sections
### Organization Information
**Must have:**
- Organization Name field with real content (not placeholder)
**Check:**
- Look for "Organization Name:", "Company:", or similar field labels
- Extract the value after the label
- Check if value contains placeholders
- Check if value is empty or only whitespace
**If incomplete:**
- Flag: `Organization Name: Contains placeholder "[exact-text]"`
- Or: `Organization Name: Missing or empty`
### Job Information
**Must have:**
- Job Title field with real content (not placeholder)
**Check:**
- Look for "Job Title:", "Position:", or similar field labels
- Extract the value after the label
- Check if value contains placeholders
- Check if value is empty or only whitespace
**If incomplete:**
- Flag: `Job Title: Contains placeholder "[exact-text]"`
- Or: `Job Title: Missing or empty`
### Job Description Summary
**Must have:**
- At least SOME content in one or more subsections:
- Responsibilities / Key Responsibilities
- Required Skills / Qualifications
- Preferred Skills
- Requirements
- Keywords
**Check:**
- Verify section exists
- Check if section has any real content (not just placeholders)
- Check if at least one subsection has meaningful text
**If incomplete:**
- Flag: `Job Description Summary: No content found`
- Or: `Responsibilities: Contains placeholder "[exact-text]"`
- Or: `Required Skills: Missing or empty`
### Missing Sections
If an entire required section is missing from the document:
- Flag: `Missing required section: [Section Name]`
## Step 6: Check Population Status
### Input Folder Check
**Check if `input/` folder exists and has files:**
1. Check for `input/` subfolder in the application directory
2. List files in `input/` folder
3. Count supported files (exclude .gitkeep, .DS_Store, etc.)
**Categorize status:**
- **Empty**: `input/` doesn't exist or has no files (0 files)
- **Populated**: `input/` has 1+ files
- **Not applicable**: Required sections are filled (manual population is fine)
### Population Warning Logic
**Warn about population IF:**
- Input folder is empty (0 files) AND
- Multiple required sections still have placeholders
**Suggest /populate-application IF:**
- Input folder has files (1+ files) AND
- Multiple required sections still have placeholders
**DON'T warn IF:**
- Required sections are filled with real content (manual population is fine, even if input/ is empty)
## Step 7: Generate Validation Report
### Success Format (Validation PASSES)
**If all required sections are complete:**
```
✅ Application Validation: PASSED
Your application is complete and ready for document generation!
Summary:
- Organization: [Extracted Company Name]
- Position: [Extracted Job Title]
- Job requirements: [N] identified
- Input documents: [N] files in input/ folder
[If Match Strategy section has content:]
- Match strategy: Complete
[If Key Messages section has content:]
- Key messages: Defined
You can now proceed with generating tailored CV, cover letter, and application email.
```
**Extract actual values** from application.md for the summary (organization name, position, count requirements/skills mentioned).
### Failure Format (Validation FAILS)
**If any required section is incomplete:**
```
❌ Application Validation: FAILED
Your application has incomplete sections that need attention before document generation.
Issues found:
[Group errors by section - only show sections with errors]
## Organization Information
- [ ] Organization Name: Contains placeholder "[To be filled]"
## Job Information
- [ ] Job Title: Missing or empty
## Job Description Summary
- [ ] Responsibilities: Contains placeholder "[List key responsibilities]"
- [ ] Required Skills: No content found
[If population warning applies:]
## Population Status
⚠️ Input folder appears empty. Consider:
1. Adding job posting and related documents to input/
2. Running /populate-application to extract information
[Or if input has files but sections empty:]
## Population Status
⚠️ Input folder has [N] documents but application seems unpopulated.
Consider running:
/populate-application
This will analyze your input documents and populate the sections above.
[End with guidance:]
Please update application.md to fill in these sections, then run /validate-application again.
[Alternative if only placeholders:]
Or manually edit application.md to add the missing information, then run /validate-application again.
```
### Error Details Format
**For each issue, use checkbox format:**
```
- [ ] Field Name: Issue description
```
**Quote exact placeholder text:**
```
- [ ] Organization Name: Contains placeholder "[To be filled]"
```
**Group by section:**
```
## Organization Information
- [ ] Organization Name: Issue
- [ ] Location: Issue
## Job Description Summary
- [ ] Responsibilities: Issue
```
## Step 8: Provide Clear Next Steps
### After Success
```
You can now proceed with generating tailored CV, cover letter, and application email.
```
### After Failure
```
Please update application.md to fill in these sections, then run /validate-application again.
```
Or if they should run population:
```
Add documents to input/ folder and run /populate-application to analyze and populate application.md.
Then run /validate-application again to confirm completeness.
```
## Important Notes
### Tone
- Be encouraging - validation is a positive quality check
- Be specific about what's missing
- Provide actionable guidance
- Don't be judgmental about incomplete applications
### Flexibility
- Optional sections can remain incomplete
- Manual population is perfectly fine (don't require /populate-application if sections are filled)
- Input folder can be empty if user manually populated
- Focus on required information only
### Accuracy
- Quote exact placeholder text when reporting issues
- Extract real values from application.md for success summary
- Count actual items (requirements, skills, documents)
- Be precise about what's missing vs what's present
### Integration
- This is a quality gate before document generation
- Match the pattern of `/validate-profile` for consistency
- User can explicitly skip validation if they want (with warning)
- Default behavior: validate before generating any documents
## Edge Cases
### Legitimate Brackets
- `[PhD]` or `[MBA]` in credentials → not a placeholder
- `[Remote]` as location descriptor → not a placeholder
- `[Acquired]` in company history → not a placeholder
- Check surrounding context to distinguish
### Partial Completion
- If Organization Name is filled but Job Title has placeholder → only flag Job Title
- If some job description subsections are filled → validation can pass
- Don't require ALL subsections, just SOME content
### Very Long Placeholders
- Truncate to 100 characters: `"[First 100 characters...]"`
- Still quote them to show what was found
### Multiple Issues in Same Field
- List each issue separately
- Be clear about what specifically is wrong
### Application Already Has Some Content
- Focus error messages only on what's still missing
- Acknowledge what's already complete in summary (if desired)
- Be constructive about gaps
+110
View File
@@ -0,0 +1,110 @@
---
description: Validate that `profile.md` is completely filled out and ready for generating job applications.
---
# Instructions
You are validating the applicant's profile to ensure it's ready for job application generation.
## Validation Rules
### 1. Read the Profile
- Read `profile.md` in its entirety
### 2. Detect Placeholder Patterns
Check for these placeholder patterns that indicate incomplete data:
- Text in square brackets: `[Your name]`, `[Company]`, `[anything]`
- Generic template text: "Your professional summary here"
- Example text that hasn't been replaced
### 3. Required Sections
These sections MUST be complete (no placeholders):
**Personal Information:**
- Full Name
- Email
- Phone
- Location
**Professional Summary:**
- Must contain a real 2-3 sentence summary (not placeholder text)
**Work Experience:**
- At least ONE complete work experience entry with:
- Real job title and company name (not `[Job Title]` or `[Company Name]`)
- Real dates (not `[Month Year]`)
- At least one real responsibility or achievement
### 4. Optional Sections
These sections CAN be empty or contain placeholders without causing validation failure:
- Projects
- Certifications
- Additional work experiences beyond the first one
- Languages (if only one language)
- Portfolio/Website in Personal Information
- GitHub in Personal Information
### 5. Output Format
Provide a clear validation report:
**If validation PASSES:**
```
✅ Profile Validation: PASSED
Your profile is complete and ready for job application generation!
Summary:
- Personal information: Complete
- Professional summary: Complete
- Work experience: X entries found
- Education: X entries found
- Skills: Categorized and complete
You can now proceed with generating CVs, cover letters, and application emails.
```
**If validation FAILS:**
```
❌ Profile Validation: FAILED
Your profile has incomplete sections that need attention before generating applications.
Issues found:
## Personal Information
- [ ] Full Name: Contains placeholder "[Your full name]"
- [ ] Email: Contains placeholder "[your.email@example.com]"
## Professional Summary
- [ ] Summary text is still the default placeholder
## Work Experience
- [ ] No complete work experience entries found
- [ ] First entry contains placeholders: [Job Title], [Company Name]
Please update profile.md to fill in these sections with your real information, then run /validate-profile again.
```
### 6. Be Specific
When reporting issues:
- Quote the exact placeholder text found
- Indicate which section it's in
- Provide actionable guidance on what needs to be filled in
### 7. Handle Edge Cases
- **Legitimate brackets**: If someone has `[PhD]` after their name or `[Company] (Acquired)`, don't flag these as placeholders if they're in context
- **Partial completion**: If most fields are filled but one or two have placeholders, list only the incomplete ones
- **Multiple issues in one section**: List each placeholder separately
## Important Notes
- Be encouraging in your tone - validating a profile is a positive step
- If validation fails, provide clear next steps
- Don't generate any application documents if validation fails (unless user explicitly requests to skip validation)
- This validation is a safety check to prevent placeholder text from appearing in professional documents
@@ -0,0 +1,650 @@
---
description: Generate a professional application email with subject line and document references.
---
# Instructions
You are generating a professional application email for a job application. This email must be brief, professional, and include proper references to attached documents.
## Step 1: Parse Command Arguments
Check for optional flags and parameters:
**Flags:**
- `--skip-validation`: Skip automatic validation check
- `--force` or `--overwrite`: Overwrite existing application-email.md if it exists
- `--help`: Show usage information and exit
**Parameter:**
- Application folder name (optional): e.g., `2025-11-02-TechCorp-Developer`
If `--help` flag is present, show usage and exit:
```
Usage: /write-application-email [application-name] [flags]
Generates a professional application email with document references.
Options:
[application-name] Optional. Name of application folder.
If omitted, uses current directory.
--skip-validation Skip automatic validation check (not recommended)
--force, --overwrite Overwrite existing application-email.md
--help Show this help message
Examples:
/write-application-email
/write-application-email 2025-11-02-TechCorp-Developer
/write-application-email --force
/write-application-email --skip-validation --force
The command will:
1. Validate the application (unless --skip-validation)
2. Check if email already exists (unless --force)
3. Verify required documents exist in attachments/ folder
4. Read profile.md and application.md
5. Generate a brief professional email with subject line
6. Save to application-email.md in the application folder
```
## Step 2: Location Detection
### Determine Target Application
**If NO parameter provided:**
1. Check current working directory
2. Verify if inside an application folder:
- Path pattern: ends with `applications/pending/[folder-name]/`
- File existence: `application.md` exists in current directory
3. If yes → use this application
4. If no → show error with available applications
**If parameter PROVIDED:**
1. Resolve to application folder: `applications/pending/[folder-name]/`
2. Check if `application.md` exists in that location
3. If yes → use that application
4. If no → show error with available applications
### Error: Location Unclear
```
❌ Not in an application folder
Please either:
1. Navigate to an application folder:
cd applications/pending/[application-folder]/
/write-application-email
2. Or provide the application folder name:
/write-application-email [application-folder-name]
Available applications:
[List output of: ls applications/pending/]
Example:
/write-application-email 2025-11-02-TechCorp-Developer
```
### Error: Application Not Found
```
❌ Application not found: [provided-name]
Available applications:
[List output of: ls applications/pending/]
```
## Step 3: Automatic Validation Check
**Unless `--skip-validation` flag is present**, run validation before generating.
### Run Validation
1. Show progress: `🔍 Validating application...`
2. Execute `/validate-application` for the target application
3. Capture result (pass/fail)
### Handle Validation Result
**If validation PASSES:**
```
✅ Application validation passed
```
Proceed to Step 4.
**If validation FAILS:**
```
❌ Application validation failed
Your application has incomplete sections. Please fix these issues first:
[Show validation error details]
Options:
1. Fix the issues in application.md and try again
2. Run /validate-application for full details
3. Use --skip-validation to proceed anyway (not recommended)
Example:
/write-application-email --skip-validation
```
STOP. Do not generate email.
### Skip Validation Warning
**If `--skip-validation` flag is present:**
```
⚠️ Skipping validation check (not recommended)
Proceeding with email generation. The application may have incomplete sections.
```
Proceed to Step 4.
## Step 4: Check for Existing Email
Check if `application-email.md` exists in the application folder.
### If File Exists (and --force NOT present)
```
❌ Application email already exists
File: [path-to-application-email.md]
To regenerate, use:
/write-application-email --force
⚠️ Warning: This will overwrite your existing email.
If you've made manual edits, they will be lost.
```
STOP. Do not overwrite.
### If File Exists (and --force IS present)
```
⚠️ Overwriting existing application email
File: [path-to-application-email.md]
Your previous email will be replaced.
```
Proceed to Step 5.
### If File Does Not Exist
Proceed to Step 5 (no message needed).
## Step 5: Verify Documents in Attachments Folder
**CRITICAL**: The email will reference attached documents. Verify they exist in the `attachments/` folder.
Show progress: `📎 Verifying attachments...`
### Check Attachments Folder
1. Verify `attachments/` folder exists in application directory
2. List all files in `attachments/` folder (excluding `.keep`)
3. Categorize files by type:
- **CV/Resume**: Files containing "cv", "resume", "lebenslauf" in filename (case-insensitive)
- **Cover Letter**: Files containing "cover", "letter", "anschreiben", "motivationsschreiben" in filename (case-insensitive)
- **Certificates**: Files containing "certificate", "diploma", "zeugnis", "zertifikat" in filename (case-insensitive)
- **Other**: Any other PDF or document files
### Required Documents Check
**Minimum requirements:**
- At least one CV/Resume file
- At least one Cover Letter file
**If attachments/ folder doesn't exist:**
```
❌ Attachments folder not found
The attachments/ folder is missing. This might be an old application.
To fix:
1. Create the folder: mkdir attachments
2. Add your documents (CV, cover letter, certificates)
3. Try again
Expected location: [application-path]/attachments/
```
STOP.
**If folder is empty (only .keep file or no files):**
```
❌ No documents found in attachments folder
The attachments/ folder is empty. You need to add documents before generating the email.
Required documents:
- ✗ CV/Resume (PDF) - Not found
- ✗ Cover letter (PDF) - Not found
Optional documents:
- Certificates/Diplomas (PDF)
Location: [application-path]/attachments/
Please add your documents and try again.
```
STOP.
**If CV is missing:**
```
❌ CV/Resume not found in attachments folder
Required documents:
- ✗ CV/Resume (PDF) - Not found
- ✓ Cover letter - Found: [filename]
Please add your CV to:
[application-path]/attachments/
Tip: Filename should contain "cv", "resume", or "lebenslauf"
Example: John_Doe_CV.pdf
```
STOP.
**If Cover Letter is missing:**
```
❌ Cover letter not found in attachments folder
Required documents:
- ✓ CV/Resume - Found: [filename]
- ✗ Cover letter (PDF) - Not found
Please add your cover letter to:
[application-path]/attachments/
Tip: Filename should contain "cover-letter" or "anschreiben"
Example: John_Doe_Cover_Letter.pdf
```
STOP.
**If all required documents found:**
```
✓ Found attachments:
- CV: [filename]
- Cover Letter: [filename]
[- Certificates: [filename(s)] (if any)]
```
Proceed to Step 6.
## Step 6: Read Data Sources
Show progress: `📝 Generating application email...`
### Read profile.md
1. Check if `profile.md` exists in framework root
2. Read entire file
3. Parse and extract:
- **Personal Information**: Full name, email, phone
- For email signature and sender information
**If profile.md is missing or unreadable:**
```
❌ Profile not found
Could not read profile.md. Please create and validate your profile first.
Steps:
1. Fill out profile.md with your information
2. Run /validate-profile to check completeness
3. Try /write-application-email again
```
STOP.
Show progress: `✓ Read profile.md (applicant info)`
### Read application.md
1. Check if `application.md` exists in application folder
2. Read entire file
3. Parse and extract:
- **Organization Information**: Company name, contact person name, contact email
- **Job Information**: Job title, job level
- **Tone of Voice**: Tone assessment (Formal/Balanced/Casual)
- **Key Messages**: Main points (for reference, though email is brief)
**If application.md is missing or unreadable:**
```
❌ Application not found
Could not read application.md in [path].
This doesn't appear to be a valid application folder.
Did you create this application with /new-application?
```
STOP.
Show progress: `✓ Read application.md (job details)`
## Step 7: Determine Language and Tone
### Detect Language
Check these indicators in order:
1. **Job posting language** (if job description in input/ was in German)
2. **Company location** (if Germany/Austria/Switzerland → likely German)
3. **Application.md language** (if written in German → use German)
4. **Default**: English if unclear
### Extract Tone
From application.md "Tone of Voice" section:
- Look for: "Formal", "Balanced", or "Casual"
- Default to "Balanced" if not specified
Show progress: `✓ Applied tone: [Formal/Balanced/Casual]`
Show progress: `✓ Language: [German/English]`
## Step 8: Generate Email Content
Generate a professional application email. Target: **Brief and concise (3-4 sentences in body)**.
### Structure Overview
1. Subject Line
2. Greeting/Salutation
3. Email Body (3-4 sentences)
4. Sign-off and Signature
---
### Subject Line
**Purpose**: Clear, professional, immediately conveys the purpose.
**Format for German:**
```
Bewerbung als [Job Title] - [Applicant Full Name]
```
**Format for English:**
```
Application for [Job Title] - [Applicant Full Name]
```
**Examples:**
- German: `Bewerbung als Senior Software Engineer - Max Mustermann`
- English: `Application for Senior Software Engineer - John Doe`
---
### Greeting/Salutation
**If contact person name is available in application.md:**
- German: `Sehr geehrte/r [Herr/Frau] [Last Name],` or `Liebe/r [First Name],` (Casual tone only)
- English: `Dear [Mr./Ms./Dr.] [Last Name],` or `Dear [First Name],` (Casual tone only)
**If no contact person:**
- German: `Sehr geehrte Damen und Herren,`
- English: `Dear Hiring Manager,`
---
### Email Body (3-4 sentences maximum)
**Purpose**: Brief introduction, state purpose, reference documents, express interest.
**Content elements:**
1. **Opening**: State you're applying for the specific position
2. **Documents**: Explicitly mention attached documents (CV, cover letter, and certificates if present)
3. **Brief interest**: One sentence showing genuine interest or fit
4. **Availability**: Mention availability for interview/discussion
**Tone guidance:**
- **Formal**: Professional and respectful, traditional business language
- **Balanced**: Professional but warm, straightforward
- **Casual**: Friendly and approachable, but still professional
**IMPORTANT**: Keep it concise. The cover letter contains the details; the email is just a brief cover message.
**Example (Balanced, English):**
> I am writing to apply for the Senior Software Engineer position at TechCorp. Please find attached my CV, cover letter, and relevant certificates for your review. I have eight years of experience in backend development and am particularly interested in your work on cloud infrastructure. I am available for an interview at your convenience.
**Example (Formal, German):**
> hiermit bewerbe ich mich um die Position als Senior Software Engineer bei TechCorp. Im Anhang finden Sie meinen Lebenslauf, mein Anschreiben sowie relevante Zeugnisse. Mit acht Jahren Erfahrung in der Backend-Entwicklung interessiere ich mich besonders für Ihre Arbeit im Bereich Cloud-Infrastruktur. Für ein Vorstellungsgespräch stehe ich Ihnen gerne zur Verfügung.
**Example (Casual, English):**
> I'm applying for the Senior Software Engineer position at TechCorp. I've attached my CV, cover letter, and certificates for you to review. I've been working in backend development for about eight years and find your cloud infrastructure work really interesting. I'm happy to chat whenever works for you.
**Document Reference Variations:**
*If CV and Cover Letter only:*
- German: `Im Anhang finden Sie meinen Lebenslauf und mein Anschreiben.`
- English: `Please find attached my CV and cover letter.`
*If CV, Cover Letter, and Certificates:*
- German: `Im Anhang finden Sie meinen Lebenslauf, mein Anschreiben sowie relevante Zeugnisse.`
- English: `Please find attached my CV, cover letter, and relevant certificates.`
---
### Sign-off and Signature
**German:**
- Formal: `Mit freundlichen Grüßen,`
- Balanced: `Mit freundlichen Grüßen,`
- Casual: `Viele Grüße,`
**English:**
- Formal: `Sincerely,` or `Best regards,`
- Balanced: `Best regards,`
- Casual: `Best regards,` or `Kind regards,`
Follow with applicant's full name and contact information from profile.md:
```
[Applicant Full Name]
[Email]
[Phone]
```
---
## Step 9: Format and Write File
### Format as Markdown
```markdown
<!--
Application Email
Generated: [YYYY-MM-DD HH:MM]
Sources: profile.md, application.md, attachments/
Language: [German/English]
Tone: [Formal/Balanced/Casual]
-->
# Subject
[Subject Line]
---
[Greeting]
[Email Body - 3-4 sentences]
[Sign-off]
[Applicant Full Name]
[Email]
[Phone]
---
## Attachments
[List of files in attachments/ folder to be sent:]
- [CV filename]
- [Cover letter filename]
- [Certificate filename(s)] (if any)
```
### Write to File
1. Write content to `application-email.md` in the application folder
2. Handle write errors gracefully:
- Permission denied: "Could not save application-email.md. Check write permissions."
- Disk full: "Could not save application-email.md. Check available disk space."
- Other errors: "Could not save application-email.md: [error details]"
## Step 10: Success Output
Display success message:
```
✅ Application email saved: application-email.md
## Generation Summary:
📊 Email Details:
- Language: [German/English]
- Tone: [Formal/Balanced/Casual]
- Subject: [Generated subject line]
- Attachments referenced: [N] files
📍 Location:
[full or relative path to application-email.md]
📎 Attachments Ready:
- ✓ [CV filename]
- ✓ [Cover letter filename]
[- ✓ [Certificate filename(s)]] (if any)
## Next Steps:
1. **Review application-email.md**:
Open and read the email. Verify:
- Subject line is appropriate
- All attachments are correctly listed
- Tone matches the company culture
- Contact information is correct
2. **Prepare email in your client**:
- Copy subject line from the file
- Copy email body
- Attach the documents from attachments/ folder:
[List each file with checkboxes]
□ [CV filename]
□ [Cover letter filename]
[□ [Certificate filename(s)]] (if any)
3. **Final checks before sending**:
- Verify recipient email address
- Double-check all attachments are included
- Proofread one last time
- Ensure file names are professional
---
**Tip**: This email is intentionally brief. The cover letter contains the detailed information about your qualifications and interest in the role.
```
## Error Handling Reference
### Missing profile.md
```
❌ Profile not found
Could not read profile.md. Please create and validate your profile first.
Steps:
1. Fill out profile.md with your information
2. Run /validate-profile to check completeness
3. Try /write-application-email again
```
### Missing application.md
```
❌ Application not found
Could not read application.md in [path].
This doesn't appear to be a valid application folder.
Did you create this application with /new-application?
```
### Validation Failed (no --skip-validation)
```
❌ Application validation failed
[Validation error details]
Options:
1. Fix issues in application.md
2. Run /validate-application for full details
3. Use --skip-validation to proceed (not recommended)
```
### Email Exists (no --force)
```
❌ Application email already exists
File: [path]
Use --force to overwrite:
/write-application-email --force
⚠️ This will replace your existing email.
```
### Attachments Missing
```
❌ Required documents not found
The attachments/ folder is missing required documents:
[Show which documents are missing]
Please add your documents and try again.
```
### File Write Error
```
❌ Could not save application email
Error: [specific error message]
Possible causes:
- Insufficient write permissions
- Disk space full
- Path too long
Please check the issue and try again.
```
## Important Notes
### Email Purpose
The application email is a **brief cover message** for your attachments, not a replacement for the cover letter:
- Email: 3-4 sentences, mentions documents, shows interest
- Cover Letter: Detailed explanation of qualifications and fit
### Document References
- Always explicitly list what documents are attached
- Use the actual filenames from the attachments/ folder
- Make it easy for the recipient to know what they're receiving
### Professional Tone
- Even "Casual" tone should remain professional
- This is a first impression - clarity and professionalism are key
- Brief doesn't mean informal or sloppy
### Attachment Verification is Critical
- Never generate an email claiming documents are attached if they don't exist
- Always verify before generation
- Provide clear guidance on what's missing and where to add files
---
**Remember**: This email represents the first direct communication with the hiring manager. It should be professional, clear, and make it easy for them to review your application materials.
+771
View File
@@ -0,0 +1,771 @@
---
description: Generate a tailored cover letter based on application strategy and profile information.
---
# Instructions
You are generating a professional cover letter for a job application. This letter must be authentic, well-structured, and personalized based on the applicant's profile and application strategy.
## CRITICAL: Natural Writing Style
**The cover letter must sound like it was written by a real person, not AI or marketing copy.**
### Authenticity Principles
1. **Avoid Pompous/Exaggerated Language**:
- NO: "I am thrilled and absolutely excited", "exceptional expertise", "unparalleled skills"
- YES: "I am interested", "strong experience", "relevant skills"
- Avoid superlatives: "best", "perfect", "incredible", "amazing", "outstanding"
- Use modest, factual language
2. **Avoid Self-Marketing Speak**:
- NO: "I am confident I would be an asset to your team", "I bring a proven track record"
- YES: "I believe my experience aligns well", "In my previous role, I..."
- Let achievements speak for themselves without embellishment
- Don't oversell - be matter-of-fact about accomplishments
3. **Write Naturally and Conversationally**:
- Use simple, direct sentences alongside more complex ones (vary structure)
- Avoid corporate jargon and buzzwords: "synergy", "leverage", "drive results", "best-in-class"
- Write how a real person would talk, not a PR statement
- It's okay to start sentences with "And" or "But" occasionally for natural flow
4. **Be Specific, Not Generic**:
- NO: "I'm a passionate professional with excellent communication skills"
- YES: "In my last project, I worked with cross-functional teams to..."
- Show through examples, don't just claim attributes
5. **Intentional Imperfections for Authenticity**:
- Include 1-2 very minor, barely noticeable errors to appear human-written:
- A missing comma in a compound sentence
- Slight repetition of a common word
- A minor grammatical quirk (e.g., "the company's mission" instead of "the mission of the company" in one place, then reverse in another)
- These should be SUBTLE - not obvious typos or wrong words
- **IMPORTANT**: Errors should never affect comprehension or professionalism
- Examples of acceptable minor errors:
- "I have worked with Python, JavaScript and Go" (missing Oxford comma)
- "The role interested me and and I reached out" (double word, very subtle)
- Slight informality: "I've worked" vs "I have worked" inconsistency
6. **Modesty Over Bragging**:
- NO: "I excel at everything I do", "I'm the ideal candidate"
- YES: "I've had good results with similar challenges", "I think I could contribute"
- Understate slightly rather than overstate
- Let facts demonstrate competence
### Tone-Specific Guidelines
- **Formal**: Still professional but not stuffy. Avoid sounding like a corporate press release.
- **Balanced**: Conversational professionalism. Like talking to a colleague you respect but don't know well yet.
- **Casual**: Friendly and personable, but still competent. Like an email to a friendly senior colleague.
**Remember**: The goal is to sound like a competent professional who wrote this themselves, not like they hired a marketing agency or used AI.
## Step 1: Parse Command Arguments
Check for optional flags and parameters:
**Flags:**
- `--skip-validation`: Skip automatic validation check
- `--force` or `--overwrite`: Overwrite existing cover-letter.md if it exists
- `--help`: Show usage information and exit
**Parameter:**
- Application folder name (optional): e.g., `2025-11-02-TechCorp-Developer`
If `--help` flag is present, show usage and exit:
```
Usage: /write-cover-letter [application-name] [flags]
Generates a tailored cover letter for a job application.
Options:
[application-name] Optional. Name of application folder.
If omitted, uses current directory.
--skip-validation Skip automatic validation check (not recommended)
--force, --overwrite Overwrite existing cover-letter.md
--help Show this help message
Examples:
/write-cover-letter
/write-cover-letter 2025-11-02-TechCorp-Developer
/write-cover-letter --force
/write-cover-letter --skip-validation --force
The command will:
1. Validate the application (unless --skip-validation)
2. Check if cover letter already exists (unless --force)
3. Read profile.md and application.md
4. Generate a tailored 300-400 word cover letter
5. Save to cover-letter.md in the application folder
```
## Step 2: Location Detection
### Determine Target Application
**If NO parameter provided:**
1. Check current working directory
2. Verify if inside an application folder:
- Path pattern: ends with `applications/pending/[folder-name]/`
- File existence: `application.md` exists in current directory
3. If yes → use this application
4. If no → show error with available applications
**If parameter PROVIDED:**
1. Resolve to application folder: `applications/pending/[folder-name]/`
2. Check if `application.md` exists in that location
3. If yes → use that application
4. If no → show error with available applications
### Error: Location Unclear
```
❌ Not in an application folder
Please either:
1. Navigate to an application folder:
cd applications/pending/[application-folder]/
/write-cover-letter
2. Or provide the application folder name:
/write-cover-letter [application-folder-name]
Available applications:
[List output of: ls applications/pending/]
Example:
/write-cover-letter 2025-11-02-TechCorp-Developer
```
### Error: Application Not Found
```
❌ Application not found: [provided-name]
Available applications:
[List output of: ls applications/pending/]
```
## Step 3: Automatic Validation Check
**Unless `--skip-validation` flag is present**, run validation before generating.
### Run Validation
1. Show progress: `🔍 Validating application...`
2. Execute `/validate-application` for the target application
3. Capture result (pass/fail)
### Handle Validation Result
**If validation PASSES:**
```
✅ Application validation passed
```
Proceed to Step 4.
**If validation FAILS:**
```
❌ Application validation failed
Your application has incomplete sections. Please fix these issues first:
[Show validation error details]
Options:
1. Fix the issues in application.md and try again
2. Run /validate-application for full details
3. Use --skip-validation to proceed anyway (not recommended)
Example:
/write-cover-letter --skip-validation
```
STOP. Do not generate cover letter.
### Skip Validation Warning
**If `--skip-validation` flag is present:**
```
⚠️ Skipping validation check (not recommended)
Proceeding with cover letter generation. The application may have incomplete sections.
```
Proceed to Step 4.
## Step 4: Check for Existing Cover Letter
Check if `cover-letter.md` exists in the application folder.
### If File Exists (and --force NOT present)
```
❌ Cover letter already exists
File: [path-to-cover-letter.md]
To regenerate, use:
/write-cover-letter --force
⚠️ Warning: This will overwrite your existing cover letter.
If you've made manual edits, they will be lost.
```
STOP. Do not overwrite.
### If File Exists (and --force IS present)
```
⚠️ Overwriting existing cover letter
File: [path-to-cover-letter.md]
Your previous cover letter will be replaced.
```
Proceed to Step 5.
### If File Does Not Exist
Proceed to Step 5 (no message needed).
## Step 5: Read Data Sources
Show progress: `📝 Generating cover letter...`
### Read profile.md
1. Check if `profile.md` exists in framework root
2. Read entire file
3. Parse and extract:
- **Personal Information**: Full name, email, phone, location, address
- **Professional Summary**: For potential reference
- **Work Experience**: All entries (job titles, companies, dates, responsibilities, achievements)
- **Skills**: Technical and soft skills
- **Projects**: Notable projects
- **Education**: Degrees and certifications
**If profile.md is missing or unreadable:**
```
❌ Profile not found
Could not read profile.md. Please create and validate your profile first.
Steps:
1. Fill out profile.md with your information
2. Run /validate-profile to check completeness
3. Try /write-cover-letter again
```
STOP.
Show progress: `✓ Read profile.md (applicant background)`
### Read application.md
1. Check if `application.md` exists in application folder
2. Read entire file
3. Parse and extract:
- **Metadata**: Application status, deadlines
- **Organization Information**: Company name, industry, location, website, contact person name
- **Job Information**: Job title, level, department, employment type, remote status
- **Job Description Summary**: Responsibilities, required skills, preferred skills, keywords
- **Research Notes**: Company culture, values, recent news, competitive landscape
- **Match Strategy**: Experiences to emphasize, skills to highlight, projects to mention, gaps and how to address
- **Key Messages**: Main points to convey (usually 3-5 bullet points)
- **Tone of Voice**: Tone assessment (Formal/Balanced/Casual) and reasoning
**If application.md is missing or unreadable:**
```
❌ Application not found
Could not read application.md in [path].
This doesn't appear to be a valid application folder.
Did you create this application with /new-application?
```
STOP.
Show progress: `✓ Read application.md (job strategy)`
### Cross-Reference Match Strategy
1. Identify which specific experiences from profile.md are mentioned in Match Strategy section
2. Extract those full experience entries from profile.md
3. Identify which skills to emphasize
4. Identify which projects to mention
5. Note any gaps mentioned and how to address them
Show progress: `✓ Analyzed match strategy ([N] key experiences identified)`
## Step 6: Determine Language and Tone
### Detect Language
Check these indicators in order:
1. **Job posting language** (if job description in input/ was in German)
2. **Company location** (if Germany/Austria/Switzerland → likely German)
3. **Application.md language** (if written in German → use German)
4. **Default**: English if unclear
### Extract Tone
From application.md "Tone of Voice" section:
- Look for: "Formal", "Balanced", or "Casual"
- Default to "Balanced" if not specified
Show progress: `✓ Applied tone: [Formal/Balanced/Casual]`
Show progress: `✓ Language: [German/English]`
## Step 7: Generate Cover Letter Content
Generate a professional cover letter with the following structure. Target: **300-400 words total**.
### Structure Overview
1. Contact Header (applicant + company addresses, date)
2. Salutation
3. Opening Paragraph (50-70 words)
4. Why This Role Paragraph (70-90 words)
5. What You Bring (120-150 words, split into 1-2 paragraphs)
6. Cultural Fit Paragraph (50-70 words)
7. Closing Paragraph (40-50 words)
8. Sign-off
---
### Contact Header
**Format for German:**
```
[Applicant Full Name]
[Applicant Street Address]
[Applicant ZIP] [Applicant City]
[Applicant Email] | [Applicant Phone]
[Current Date in DD.MM.YYYY format]
[Company Name]
[Contact Person Name if available, otherwise "Personalabteilung"]
[Company Street Address if available]
[Company ZIP] [Company City]
```
**Format for English:**
```
[Applicant Full Name]
[Applicant Street Address]
[Applicant City], [State/Country] [ZIP]
[Applicant Email] | [Applicant Phone]
[Current Date in Month DD, YYYY format]
[Hiring Manager Name if available]
[Company Name]
[Company Street Address if available]
[Company City], [State/Country] [ZIP]
```
Use information from profile.md and application.md. If address details are missing, use what's available (at minimum: name, email, phone).
---
### Salutation
**If contact person name is available in application.md:**
- German: `Sehr geehrte/r [Herr/Frau] [Last Name],` or `Liebe/r [First Name],` (Casual tone only)
- English: `Dear [Mr./Ms./Dr.] [Last Name],` or `Dear [First Name],` (Casual tone only)
**If no contact person:**
- German: `Sehr geehrte Damen und Herren,`
- English: `Dear Hiring Manager,`
---
### Opening Paragraph (50-70 words)
**Purpose**: Hook the reader, state the position, show genuine interest.
**Elements to include:**
1. Reference to the specific job title
2. Reference to company name
3. Brief statement of interest
4. One compelling hook from:
- Key messages (why you're excited about this role)
- Research notes (something specific about the company)
- Relevant achievement that positions you well
**Tone guidance:**
- **Formal**: Professional, respectful, traditional - but not pompous
- **Balanced**: Professional but warm, approachable - natural conversation
- **Casual**: Friendly and personable - like talking to a colleague
**APPLY NATURAL WRITING PRINCIPLES**: Avoid exaggeration, use modest language, be factual.
**Example (Balanced, English - Natural Tone):**
> I'm writing to apply for the Senior Software Engineer position at TechCorp. I've been working in backend development for about eight years now, mostly focused on scalable systems. Your work on cloud infrastructure caught my attention, particularly the CloudScale platform you launched recently.
**Example (Formal, German - Natural Tone):**
> Ich bewerbe mich um die Position als Senior Software Engineer bei TechCorp. Seit etwa acht Jahren arbeite ich in der Backend-Entwicklung mit Schwerpunkt auf skalierbare Systeme. Ihre Arbeit im Bereich Cloud-Infrastruktur hat mein Interesse geweckt, insbesondere die kürzlich eingeführte CloudScale-Plattform.
---
### Why This Role Paragraph (70-90 words)
**Purpose**: Show you've researched the company and explain why this specific role/company appeals to you.
**Elements to include:**
1. Reference to company research (values, mission, recent news, products)
2. Connection between your interests/values and the company's
3. Specific reasons you're drawn to this role (not just any job)
4. Demonstrate understanding of the company's work and challenges
**Sources:**
- Research Notes section from application.md
- Key Messages section
- Company culture insights
**APPLY NATURAL WRITING PRINCIPLES**: Show genuine interest without sounding like a sales pitch.
**Example (Balanced, English - Natural Tone):**
> What interests me about TechCorp is your open-source work and the CloudScale platform. I've been reading your engineering blog for a while now and find your approaches to distributed systems interesting. Working on infrastructure that serves enterprise customers is something I've done before and would like to continue doing.
---
### What You Bring Paragraphs (120-150 words total, 1-2 paragraphs)
**Purpose**: Demonstrate you're qualified by highlighting relevant experiences, skills, and achievements.
**Elements to include:**
1. 2-3 specific experiences from Match Strategy
2. Concrete achievements with quantifiable results (from profile.md)
3. Relevant skills that match job requirements
4. Natural incorporation of keywords from job description
5. Connection between your experience and their needs
6. Mention of 1-2 relevant projects if applicable
**Structure:**
- If 2 experiences: One paragraph covering both
- If 3 experiences: Split into 2 paragraphs (2 experiences in first, 1 in second)
**Sources:**
- Match Strategy section (which experiences to emphasize)
- Profile.md work experience and projects
- Job Description Summary (requirements to address)
**Important:**
- Use ONLY real experiences and achievements from profile.md
- Include specific metrics when available (e.g., "reduced latency by 40%", "managed team of 5")
- Don't list skills demonstrate them through experiences
- Make clear connections to job requirements
**APPLY NATURAL WRITING PRINCIPLES**: Be factual, not boastful. Let numbers speak for themselves.
**Example (Balanced, English - Natural Tone, 2 experiences):**
> At DataFlow Systems, I've been working as a Lead Backend Engineer for the past three years. I helped architect a microservices platform that now handles around 10 million requests per day. We managed to reduce latency by about 45% and get reliability up to 99.95%. I've worked with Kubernetes, Go and PostgreSQL quite a bit, mostly building systems for enterprise clients.
> Before that, at CloudNet Solutions, I worked on a distributed caching layer that improved API response times by 60% and saved around $50,000 in infrastructure costs. I also spent time mentoring three junior engineers. The work was similar to what you're describing in the job posting, so I think the experience would transfer well.
---
### Cultural Fit Paragraph (50-70 words)
**Purpose**: Show you'd be a good culture match and would thrive in their environment.
**Elements to include:**
1. Reference to company culture insights from Research Notes
2. Alignment of personal values with company values
3. Relevant soft skills that match company culture indicators
4. Enthusiasm for the work environment, team, or company approach
5. Mention of collaboration style if company emphasizes teamwork
**Sources:**
- Research Notes (company culture observations)
- Company values mentioned in job description
- Your soft skills from profile.md
**APPLY NATURAL WRITING PRINCIPLES**: Be genuine, not gushing. Show fit through specifics, not claims.
**Example (Balanced, English - Natural Tone):**
> I like that TechCorp emphasizes collaborative work and learning. From what I've read, there's a good balance between technical work and team collaboration, which has worked well for me in past roles. I tend to learn best when I can share knowledge with others, so the culture you describe seems like a good fit.
---
### Closing Paragraph (40-50 words)
**Purpose**: Strong finish with call to action and expression of enthusiasm.
**Elements to include:**
1. Reiterate strong interest in the position
2. State availability for interview/discussion
3. Thank the hiring manager
4. Professional call to action
**Tone guidance:**
- **Formal**: Respectful but not flowery
- **Balanced**: Professional and straightforward
- **Casual**: Friendly but not overeager
**APPLY NATURAL WRITING PRINCIPLES**: Simple, direct closing. No need to oversell.
**Example (Balanced, English - Natural Tone):**
> I'd be happy to discuss this role further if you think my background might be a good fit. I'm available for a call or meeting whenever works for you. Thanks for taking the time to review my application.
**Example (Formal, German - Natural Tone):**
> Ich würde mich freuen, diese Position in einem persönlichen Gespräch näher zu besprechen. Für ein Interview stehe ich gerne zur Verfügung. Vielen Dank für Ihre Aufmerksamkeit.
---
### Sign-off
**German:**
- Formal: `Mit freundlichen Grüßen,`
- Balanced: `Mit freundlichen Grüßen,`
- Casual: `Herzliche Grüße,` or `Viele Grüße,`
**English:**
- Formal: `Sincerely,` or `Respectfully,`
- Balanced: `Sincerely,` or `Best regards,`
- Casual: `Best regards,` or `Warm regards,`
Follow with applicant's full name from profile.md.
---
## Step 8: Quality Checks
Before writing the file, verify:
### Word Count Check
- Count total words in body (excluding header and sign-off)
- Target: 300-400 words
- If < 280 words: Too short, add more detail to experiences or cultural fit
- If > 420 words: Too long, tighten prose and remove redundancy
Show progress: `✓ Generated [N] words (target: 300-400)`
### Factual Accuracy Check
- Every experience mentioned must exist in profile.md
- Every achievement must be from profile.md (no hallucinations)
- Company information must match application.md
- Job title and company name must be correct
### Tone Consistency Check
- Language level matches tone (Formal = elevated, Balanced = professional, Casual = conversational)
- Sentence structure matches tone (Formal = complex, Balanced = varied, Casual = simpler)
- Vocabulary matches tone
### Personalization Check
- At least 2 company-specific references (research, values, products, news)
- Keywords from job description incorporated naturally
- Connection to match strategy is clear
### Authenticity Check
- **CRITICAL**: Apply all Natural Writing Style principles from the beginning
- Sounds human, not AI-generated (no pompous or marketing language)
- Natural flow between paragraphs (conversational transitions)
- Specific rather than generic (examples, not claims)
- Shows genuine interest (not exaggerated enthusiasm)
- Modest tone (understate rather than overstate)
- Includes 1-2 minor, subtle imperfections for authenticity
- Avoids superlatives and corporate jargon
## Step 9: Format and Write File
### Format as Markdown
```markdown
<!--
Cover Letter
Generated: [YYYY-MM-DD HH:MM]
Sources: profile.md, application.md
Word count: [N] words
Tone: [Formal/Balanced/Casual]
Language: [German/English]
-->
[Applicant Full Name]
[Applicant Address Block]
[Applicant Email] | [Applicant Phone]
[Date]
[Company Name]
[Contact Person / Hiring Manager]
[Company Address if available]
[Salutation]
[Opening Paragraph]
[Why This Role Paragraph]
[What You Bring Paragraph 1]
[What You Bring Paragraph 2 if applicable]
[Cultural Fit Paragraph]
[Closing Paragraph]
[Sign-off]
[Applicant Full Name]
```
### Write to File
1. Write content to `cover-letter.md` in the application folder
2. Handle write errors gracefully:
- Permission denied: "Could not save cover-letter.md. Check write permissions."
- Disk full: "Could not save cover-letter.md. Check available disk space."
- Other errors: "Could not save cover-letter.md: [error details]"
## Step 10: Success Output
Display success message:
```
✅ Cover letter saved: cover-letter.md
## Generation Summary:
📊 Statistics:
- Word count: [N] words
- Tone: [Formal/Balanced/Casual]
- Language: [German/English]
- Experiences highlighted: [N]
- Key messages incorporated: [N]
📍 Location:
[full or relative path to cover-letter.md]
## Content Included:
✓ Personalized opening with company-specific hook
✓ Research-backed explanation of interest in role
✓ [List 2-3 key experiences emphasized, e.g.:]
- Lead Backend Engineer role at DataFlow Systems
- Distributed caching project at CloudNet Solutions
✓ Cultural fit based on company values
✓ Professional closing with call to action
## Next Steps:
1. **Review cover-letter.md**:
Open and read the generated letter carefully. Check for:
- Factual accuracy (names, dates, achievements)
- Natural tone and flow
- Authentic representation of your interest
2. **Personalize further** (recommended):
Add any additional personal connections:
- Specific conversations with employees
- Personal anecdotes relevant to the role
- Unique insights about the company
3. **Generate CV** (coming soon):
/write-cv
4. **Proofread before sending**:
- Check for typos or grammar issues
- Ensure company name and job title are correct
- Verify contact information is up to date
---
**Tip**: This cover letter was generated based on your application strategy.
The more detailed your application.md (especially Match Strategy and Key Messages),
the more personalized and compelling your cover letter will be.
```
## Error Handling Reference
### Missing profile.md
```
❌ Profile not found
Could not read profile.md. Please create and validate your profile first.
Steps:
1. Fill out profile.md with your information
2. Run /validate-profile to check completeness
3. Try /write-cover-letter again
```
### Missing application.md
```
❌ Application not found
Could not read application.md in [path].
This doesn't appear to be a valid application folder.
Did you create this application with /new-application?
```
### Validation Failed (no --skip-validation)
```
❌ Application validation failed
[Validation error details]
Options:
1. Fix issues in application.md
2. Run /validate-application for full details
3. Use --skip-validation to proceed (not recommended)
```
### Cover Letter Exists (no --force)
```
❌ Cover letter already exists
File: [path]
Use --force to overwrite:
/write-cover-letter --force
⚠️ This will replace your existing cover letter.
```
### File Write Error
```
❌ Could not save cover letter
Error: [specific error message]
Possible causes:
- Insufficient write permissions
- Disk space full
- Path too long
Please check the issue and try again.
```
## Important Notes
### Authenticity is Critical
- Use ONLY information from profile.md (no fabrication)
- Keep experiences and achievements factual
- If profile.md lacks information for a job requirement, acknowledge the gap or focus on related transferable skills
- Better to be honest about limitations than to invent experience
### Personalization Matters
- Generic cover letters are obvious and ineffective
- Leverage research notes from application.md to make company-specific references
- Connect applicant's genuine interests (from key messages) to the role
- Show real understanding of the company and position
### Tone Appropriateness
- Formal: Traditional companies, conservative industries, senior positions, German Mittelstand
- Balanced: Most tech companies, modern corporations, professional services
- Casual: Startups, creative agencies, developer-focused roles, flat hierarchies
- When in doubt, err on the side of "Balanced"
### Quality Over Speed
- Take time to craft well-structured paragraphs
- Ensure smooth transitions between sections
- Avoid repetition and clichés
- Make every sentence count toward the 300-400 word target
### The Cover Letter's Role
- Complements the CV by adding personality and narrative
- Explains the "why" behind the "what" on the CV
- Demonstrates written communication skills
- Shows genuine interest and research effort
- Provides context for career transitions or gaps
+453
View File
@@ -0,0 +1,453 @@
# Job Application Framework - Instructions for Antigravity
This directory contains the Job Application Framework (Bewerbungszauberer), designed to help create tailored CVs, cover letters, and application emails using Antigravity.
## Core Principle: Profile as Source of Truth
**IMPORTANT**: When the user requests help with ANY job application task (CV, cover letter, email, or application advice), you MUST:
1. **Validate the profile first** - Run `/validate-profile` to ensure `profile.md` is complete (see Profile Validation section below)
2. **Always read `profile.md` first** - This file contains the applicant's verified personal and professional information
3. **Use ONLY information from `profile.md`** - Never fabricate, assume, or hallucinate details about the applicant
4. **Maintain consistency** - All generated documents must align with the information in `profile.md`
## Profile Validation
**CRITICAL**: Before generating any job application documents (CV, cover letter, or email), you MUST validate that `profile.md` is complete.
### When to Validate
Run `/validate-profile` automatically before:
- Generating a CV/resume
- Writing a cover letter
- Drafting an application email
- Creating any job application materials
### Validation Process
1. **Automatic validation**: When the user requests application generation, first run `/validate-profile`
2. **Check results**:
- ✅ If validation passes → proceed with generation
- ❌ If validation fails → inform the user of incomplete sections and STOP
3. **User action**: User must complete the profile sections flagged by validation
4. **Re-validate**: After user updates `profile.md`, run `/validate-profile` again before proceeding
### Handling Validation Failures
If `/validate-profile` reports incomplete sections:
1. **Do NOT generate documents** - Incomplete profiles will result in placeholder text in professional documents
2. **Show validation results** - Display which sections need completion
3. **Guide the user**: "Your profile has incomplete sections. Please update `profile.md` with your real information in the following areas: [list sections]. Run `/validate-profile` again when ready."
4. **Wait for updates**: Do not proceed until validation passes
### Explicit Skip Option
If the user explicitly requests to skip validation with phrases like:
- "Generate CV without validation"
- "I know my profile is incomplete, proceed anyway"
- "Skip validation and generate"
You MAY proceed with a clear warning:
```
⚠️ WARNING: Proceeding without validation. Your profile may contain placeholder text.
Generated documents might include [Your Name], [Company], or other template text.
Please review carefully and manually replace any placeholders before sending to employers.
```
**Default behavior**: ALWAYS validate unless explicitly told to skip.
## Application Management
The framework provides a structured system for managing individual job applications. Each application gets its own workspace with organized folders for documents and strategy.
### Creating a New Application
Use `/new-application` to initialize a new job application:
```
/new-application "Company Name - Job Title"
```
This will:
1. Create a dated folder: `applications/pending/YYYY-MM-DD-CompanyName-JobTitle/`
2. Generate an `application.md` template with sections for research, strategy, and planning
3. Create an `input/` folder for storing job-related documents
**Example**:
```
/new-application "TechCorp - Senior Developer"
```
Creates: `applications/pending/2025-11-02-TechCorp-Senior-Developer/`
### Adding Input Documents
After creating an application, add all relevant documents to the `input/` folder:
**Recommended documents**:
- Job posting/advertisement (PDF, TXT, MD, DOCX)
- Recruiter emails or communications
- Company research notes (from website, LinkedIn, Glassdoor)
- Follow-up emails or additional context
- Application requirements or instructions
**Supported formats**: PDF, TXT, MD, DOCX, HTML, EML
The more context you provide, the better the analysis will be.
### Populating the Application
Once you've added documents to the `input/` folder, navigate to the application directory and run:
```
cd applications/pending/[your-application-folder]/
/populate-application
```
This will:
1. Read and analyze all documents in the `input/` folder
2. Extract job requirements, company information, and keywords
3. Read your `profile.md` to understand your background
4. Match your experience and skills to the job requirements
5. Populate `application.md` with:
- Extracted job information
- Company research and culture insights
- Match strategy (which experiences/skills to emphasize)
- Key messages to convey
- Tone recommendations
- Suggested projects and achievements to highlight
**The population preserves any manual notes you've added** - it merges AI analysis with your insights.
### Working with application.md
After population, review and refine the `application.md` file:
- **Review extracted information**: Ensure job details and requirements are accurate
- **Add your insights**: Enhance the strategy with your own thoughts
- **Adjust match strategy**: Fine-tune which experiences and projects to emphasize
- **Add personal notes**: Document your authentic reasons for interest in the role
- **Plan your approach**: Use the document checklist to track what needs to be created
The `application.md` serves as your strategic planning document for the entire application process.
### Re-populating Applications
You can run `/populate-application` multiple times:
- Add more documents to `input/` folder
- Re-run to merge new analysis with existing content
- Manual notes are always preserved
## When to Read the Profile
Read `profile.md` automatically when the user asks for help with:
- Creating or tailoring a CV/resume
- Writing a cover letter
- Drafting an application email
- Customizing application documents for a specific job
- Reviewing or improving existing application materials
- Extracting relevant experience or skills for a position
- Advice on how to position themselves for a role
## Job Application Workflow
When helping with job applications, follow this comprehensive workflow:
### 0. Profile Validation (REQUIRED FIRST STEP)
- Run `/validate-profile` to check `profile.md` is complete
- If validation fails, stop and ask user to complete profile
- If validation passes or user explicitly skips, proceed to step 1
### 1. Initialize Application (NEW)
- Use `/new-application "Company - Job Title"` to create organized workspace
- This creates: `applications/pending/YYYY-MM-DD-Company-JobTitle/`
- Workspace includes `application.md` template and `input/` folder
### 2. Gather Documents & Context (NEW)
- User adds documents to `input/` folder:
- Job posting/description
- Recruiter communications
- Company research
- Any other relevant context
- More context = better analysis and strategy
### 3. Analyze & Populate (NEW)
- Navigate to application folder: `cd applications/pending/[folder-name]/`
- Run `/populate-application` to:
- Read and analyze all input documents
- Extract job requirements, keywords, company culture
- Cross-reference with `profile.md`
- Generate match strategy
- Populate `application.md` with research and recommendations
### 4. Review & Refine Strategy
- User reviews `application.md` for accuracy
- User adds personal insights and authentic motivations
- Adjust which experiences and projects to emphasize
- Fine-tune key messages and tone
### 5. Validate Application (NEW - Quality Gate)
- Run `/validate-application` to ensure application.md is complete
- Check that required sections are filled (Organization, Job Title, Job Description)
- Verify no placeholder text remains (like `[To be filled]`)
- Get warnings if input/ folder is empty or application seems unpopulated
- **Must pass before document generation**
### 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. 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. 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. 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
- Confirm ATS optimization if applicable (simple formatting, keywords, standard sections)
## Document Standards
### CV/Resume
- Use information from relevant sections of `profile.md`
- Tailor the professional summary to the specific role
- Emphasize experiences and skills that match job requirements
- Keep formatting simple and ATS-friendly
- Use quantifiable achievements when available
### 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 (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
This framework is designed with the German job market in mind:
- More formal tone is often expected
- Detailed work history with exact dates is valued
- Certificates and credentials are highly regarded
- A professional photo on CV may be common (user's choice)
Adjust recommendations based on the target market if the user specifies a different region.
## Constraints
**Data Privacy**:
- All information stays local - only API calls to Antigravity use the data
- Never suggest uploading sensitive personal data to third-party services
- Respect GDPR and data protection principles
**Accuracy & Honesty**:
- NEVER fabricate experience, skills, or achievements
- If `profile.md` lacks information needed for a job application, ask the user to update `profile.md` first
- Be transparent about what can and cannot be emphasized from the applicant's background
**Quality Standards**:
- All generated content is a DRAFT - user must review and approve
- Fact-check company names, contact persons, and details from job postings
- Maintain consistency across all documents for a single application
## 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 (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
### Example 1: Complete Application Workflow
**User**: "Help me apply for this software engineering position at TechCorp"
**Antigravity should**:
1. Run `/validate-profile` to check profile completeness
2. If validation passes, suggest: "Let's create an application workspace. Run: `/new-application 'TechCorp - Software Engineer'`"
3. After application is created, guide user: "Add the job posting and any other documents to `applications/pending/[folder]/input/`"
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: "Generate cover letter with `/write-cover-letter`"
8. After generation: "Review cover-letter.md and personalize as needed"
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)
**User**: "Write a cover letter for this role [paste job description]"
**Antigravity should**:
1. Run `/validate-profile` to check profile completeness
2. If validation fails: inform user of incomplete sections and stop
3. If validation passes: Read `profile.md` to load applicant information
4. Analyze the job description for requirements and culture
5. Identify matching experiences and skills from the profile
6. Generate tailored cover letter using only information from `profile.md`
7. Suggest: "For better organization, consider using `/new-application` next time to manage the full application process"
### Example 3: Validating an Application
**User**: "Check if my TechCorp application is ready"
**Antigravity should**:
1. If user is in application folder: Run `/validate-application` (auto-detects current location)
2. If user is elsewhere: Run `/validate-application 2025-11-02-TechCorp-Software-Engineer`
3. If validation passes (✅): "Your application is complete! Organization: TechCorp, Position: Software Engineer. Ready for document generation."
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"
**Antigravity 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"
**Antigravity 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"
### Example 5: Generating an Application Email
**User**: "Generate application email for my TechCorp application"
**Antigravity 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"
**Antigravity 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:
- Inform the user which sections of `profile.md` need updates
- Ask them to update `profile.md` first before generating documents
- This ensures the profile remains the single source of truth
---
**Remember**: The quality of output depends on the quality of `profile.md`. Encourage users to keep it complete, accurate, and up to date.