feat: add proposal for profile validation mechanism

Create OpenSpec proposal to add profile validation before application generation.

- Add /validate-profile slash command to check profile completeness
- Detect placeholder patterns like [Your name], [Company], etc.
- Update CLAUDE.md to require validation before applications
- Define required vs optional sections
- Allow explicit validation skip with warning

Proposal validated and ready for implementation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-02 10:34:02 +01:00
co-authored by Claude
parent 01f29c32fc
commit 06d50ba45c
3 changed files with 118 additions and 0 deletions
@@ -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