feat: implement profile validation mechanism

Add /validate-profile slash command and automatic validation before application generation.

Implementation:
- Created src/.claude/commands/validate-profile.md with validation logic
  - Detects placeholder patterns like [Your name], [Company], etc.
  - Checks required sections: Personal Info, Summary, Work Experience
  - Allows optional sections to be empty (Projects, Certifications)
  - Provides clear pass/fail feedback with actionable guidance
- Updated src/CLAUDE.md to require validation before applications
  - Added Profile Validation section with validation process
  - Integrated validation as step 0 in workflow
  - Documented explicit skip validation option with warning
  - Added /validate-profile to Available Commands
- All 15 tasks completed and validated

Implements: add-profile-validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-02 12:23:50 +01:00
co-authored by Claude
parent 06d50ba45c
commit 7bf0dd65cb
3 changed files with 190 additions and 24 deletions
+67 -9
View File
@@ -6,9 +6,56 @@ This directory contains the Job Application Framework (Bewerbungszauberer), desi
**IMPORTANT**: When the user requests help with ANY job application task (CV, cover letter, email, or application advice), you MUST:
1. **Always read `profile.md` first** - This file contains the applicant's verified personal and professional information
2. **Use ONLY information from `profile.md`** - Never fabricate, assume, or hallucinate details about the applicant
3. **Maintain consistency** - All generated documents must align with the information in `profile.md`
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.
## When to Read the Profile
@@ -26,6 +73,11 @@ Read `profile.md` automatically when the user asks for help with:
When helping with job applications, follow this 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. Research & Context
- Read the job description provided by the user
- Extract key requirements, skills, and keywords
@@ -99,17 +151,23 @@ Adjust recommendations based on the target market if the user specifies a differ
- 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
## Example Usage
**User**: "Help me apply for this software engineering position at TechCorp [paste job description]"
**Claude Code should**:
1. Read `profile.md` to load applicant information
2. Analyze the job description for requirements and culture
3. Identify matching experiences and skills from the profile
4. Ask clarifying questions: "Would you like me to create a CV, cover letter, or both?"
5. Generate tailored documents using only information from `profile.md`
6. Ensure all documents are consistent and factually accurate
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. Ask clarifying questions: "Would you like me to create a CV, cover letter, or both?"
7. Generate tailored documents using only information from `profile.md`
8. Ensure all documents are consistent and factually accurate
## Updating the Profile