diff --git a/openspec/changes/add-profile-validation/proposal.md b/openspec/changes/add-profile-validation/proposal.md new file mode 100644 index 0000000..27df443 --- /dev/null +++ b/openspec/changes/add-profile-validation/proposal.md @@ -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 diff --git a/openspec/changes/add-profile-validation/specs/applicant-profile/spec.md b/openspec/changes/add-profile-validation/specs/applicant-profile/spec.md new file mode 100644 index 0000000..4a9f71f --- /dev/null +++ b/openspec/changes/add-profile-validation/specs/applicant-profile/spec.md @@ -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 diff --git a/openspec/changes/add-profile-validation/tasks.md b/openspec/changes/add-profile-validation/tasks.md new file mode 100644 index 0000000..cd409d8 --- /dev/null +++ b/openspec/changes/add-profile-validation/tasks.md @@ -0,0 +1,28 @@ +# Implementation Tasks + +## 1. Create Slash Command Structure + +- [ ] 1.1 Create `src/.claude/` directory +- [ ] 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) + +## 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 + +## 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