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:
@@ -2,27 +2,27 @@
|
||||
|
||||
## 1. Create Slash Command Structure
|
||||
|
||||
- [ ] 1.1 Create `src/.claude/` directory
|
||||
- [ ] 1.2 Create `src/.claude/commands/` directory
|
||||
- [x] 1.1 Create `src/.claude/` directory
|
||||
- [x] 1.2 Create `src/.claude/commands/` directory
|
||||
|
||||
## 2. Implement Validation Slash Command
|
||||
|
||||
- [ ] 2.1 Create `src/.claude/commands/validate-profile.md` with validation instructions
|
||||
- [ ] 2.2 Define validation rules for detecting placeholder patterns
|
||||
- [ ] 2.3 Specify required sections that must be complete (Personal Info, Summary, at least one Work Experience)
|
||||
- [ ] 2.4 Specify optional sections that can be empty
|
||||
- [ ] 2.5 Include clear output format for validation results (success or list of incomplete sections)
|
||||
- [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
|
||||
|
||||
- [ ] 3.1 Update `src/CLAUDE.md` to add automatic validation requirement before application generation
|
||||
- [ ] 3.2 Add instructions for when to run `/validate-profile`
|
||||
- [ ] 3.3 Add guidance on handling validation failures
|
||||
- [ ] 3.4 Document the explicit skip validation option
|
||||
- [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
|
||||
|
||||
- [ ] 4.1 Verify `/validate-profile` command file is complete and well-documented
|
||||
- [ ] 4.2 Verify `src/CLAUDE.md` correctly requires validation before applications
|
||||
- [ ] 4.3 Test validation logic detects common placeholder patterns
|
||||
- [ ] 4.4 Ensure validation provides helpful feedback on incomplete sections
|
||||
- [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
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user