Merge feature/profile-validation into main

Add profile validation mechanism to ensure completeness before application generation.

- Created /validate-profile slash command with placeholder detection
- Updated CLAUDE.md to require automatic validation before applications
- Validation checks required sections and provides clear feedback
- Allows explicit skip with warning for edge cases
- All 15 implementation tasks completed

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-02 13:19:53 +01:00
co-authored by Claude
5 changed files with 293 additions and 9 deletions
@@ -0,0 +1,25 @@
# Add Profile Validation Mechanism
## Why
Before generating job application documents, we need to ensure `profile.md` is completely filled out with real information. Currently, there's no automated check to verify that users have replaced all placeholder text with actual data. Attempting to generate applications with incomplete profiles would result in placeholder text appearing in CVs or cover letters, which is unprofessional and defeats the purpose of the framework.
## What Changes
- Create a slash command `/validate-profile` that checks if `profile.md` is complete and ready to use
- Implement validation logic to detect placeholder patterns (e.g., `[Your name]`, `[Company]`, etc.)
- Update `src/CLAUDE.md` to require profile validation before any application generation
- Provide clear feedback on what sections need completion
## Impact
- **Affected specs**: Modifies `applicant-profile` capability
- **Affected code**:
- New file: `src/.claude/commands/validate-profile.md` (slash command)
- Modified: `src/CLAUDE.md` (add validation requirement)
- **User benefit**:
- Prevents generating applications with incomplete/placeholder data
- Clear guidance on what profile sections still need work
- Confidence that profile is application-ready
- **Out of scope**: Implementation of actual application generation workflow (planned for future proposal)
- **No breaking changes**: Adds validation layer without changing existing functionality
@@ -0,0 +1,65 @@
# Applicant Profile
## ADDED Requirements
### Requirement: Profile Validation Command
The system SHALL provide a `/validate-profile` slash command that verifies the profile is complete and ready for use.
#### Scenario: Validation command is available
- **WHEN** user is in a directory containing the framework
- **THEN** they can run `/validate-profile` to check if `profile.md` is complete
#### Scenario: Validation detects incomplete profile
- **WHEN** `/validate-profile` is run and `profile.md` contains placeholder text patterns (e.g., `[Your name]`, `[Company]`)
- **THEN** the command reports which sections contain placeholders and need completion
#### Scenario: Validation confirms complete profile
- **WHEN** `/validate-profile` is run and `profile.md` has no placeholder patterns in required fields
- **THEN** the command reports that the profile is ready for application generation
### Requirement: Placeholder Detection
The validation SHALL detect common placeholder patterns indicating incomplete profile data.
#### Scenario: Square bracket placeholders detected
- **WHEN** profile contains text in the format `[placeholder text]`
- **THEN** validation identifies these as incomplete fields
#### Scenario: Required sections checked
- **WHEN** validation runs
- **THEN** it checks that Personal Information, Professional Summary, and at least one Work Experience entry are filled out (not placeholders)
#### Scenario: Optional sections allowed to be empty
- **WHEN** validation runs
- **THEN** empty optional sections (Certifications, Projects) do not cause validation failure
### Requirement: Automatic Validation Before Applications
The `src/CLAUDE.md` instructions SHALL require Claude Code to validate the profile before generating any application documents.
#### Scenario: Profile validated before CV generation
- **WHEN** user requests CV generation
- **THEN** Claude Code first validates `profile.md` is complete before proceeding
#### Scenario: Profile validated before cover letter generation
- **WHEN** user requests cover letter or application email generation
- **THEN** Claude Code first validates `profile.md` is complete before proceeding
#### Scenario: Validation failure blocks application generation
- **WHEN** profile validation fails (incomplete data detected)
- **THEN** Claude Code informs the user to complete the profile and does not generate application documents
#### Scenario: User can skip validation explicitly
- **WHEN** user explicitly requests to skip validation (e.g., "generate CV without validation" or "I know my profile is incomplete, proceed anyway")
- **THEN** Claude Code can proceed with a warning about potential placeholder text in output
@@ -0,0 +1,28 @@
# Implementation Tasks
## 1. Create Slash Command Structure
- [x] 1.1 Create `src/.claude/` directory
- [x] 1.2 Create `src/.claude/commands/` directory
## 2. Implement Validation Slash Command
- [x] 2.1 Create `src/.claude/commands/validate-profile.md` with validation instructions
- [x] 2.2 Define validation rules for detecting placeholder patterns
- [x] 2.3 Specify required sections that must be complete (Personal Info, Summary, at least one Work Experience)
- [x] 2.4 Specify optional sections that can be empty
- [x] 2.5 Include clear output format for validation results (success or list of incomplete sections)
## 3. Update Framework Instructions
- [x] 3.1 Update `src/CLAUDE.md` to add automatic validation requirement before application generation
- [x] 3.2 Add instructions for when to run `/validate-profile`
- [x] 3.3 Add guidance on handling validation failures
- [x] 3.4 Document the explicit skip validation option
## 4. Validation
- [x] 4.1 Verify `/validate-profile` command file is complete and well-documented
- [x] 4.2 Verify `src/CLAUDE.md` correctly requires validation before applications
- [x] 4.3 Test validation logic detects common placeholder patterns
- [x] 4.4 Ensure validation provides helpful feedback on incomplete sections
+108
View File
@@ -0,0 +1,108 @@
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
+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: **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 1. **Validate the profile first** - Run `/validate-profile` to ensure `profile.md` is complete (see Profile Validation section below)
2. **Use ONLY information from `profile.md`** - Never fabricate, assume, or hallucinate details about the applicant 2. **Always read `profile.md` first** - This file contains the applicant's verified personal and professional information
3. **Maintain consistency** - All generated documents must align with the information in `profile.md` 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 ## 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: 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 ### 1. Research & Context
- Read the job description provided by the user - Read the job description provided by the user
- Extract key requirements, skills, and keywords - 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 - Fact-check company names, contact persons, and details from job postings
- Maintain consistency across all documents for a single application - 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 ## Example Usage
**User**: "Help me apply for this software engineering position at TechCorp [paste job description]" **User**: "Help me apply for this software engineering position at TechCorp [paste job description]"
**Claude Code should**: **Claude Code should**:
1. Read `profile.md` to load applicant information 1. Run `/validate-profile` to check profile completeness
2. Analyze the job description for requirements and culture 2. If validation fails: inform user of incomplete sections and stop
3. Identify matching experiences and skills from the profile 3. If validation passes: Read `profile.md` to load applicant information
4. Ask clarifying questions: "Would you like me to create a CV, cover letter, or both?" 4. Analyze the job description for requirements and culture
5. Generate tailored documents using only information from `profile.md` 5. Identify matching experiences and skills from the profile
6. Ensure all documents are consistent and factually accurate 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 ## Updating the Profile