TBD - created by archiving change add-application-email. Update Purpose after archive.
## Requirements
### Requirement: Attachments Folder Creation
The system SHALL create an `attachments/` subfolder with a `.keep` file when initializing new applications to support document organization for email generation.
#### Scenario: Application folder creation includes attachments directory
- **WHEN** user runs `/new-application "Company - Job Title"`
- **THEN** the system creates folder structure: `applications/pending/[folder-name]/attachments/`
- **AND** creates an empty `.keep` file inside `attachments/` folder
- **AND** the attachments folder is ready for user to add documents
#### Scenario: Version control compatibility
- **WHEN** attachments folder is created with `.keep` file
- **THEN** the empty folder can be tracked in version control systems
- **AND** the folder structure is preserved even when empty
#### Scenario: Success message includes attachments folder
- **WHEN** new application is created successfully
- **THEN** the success message mentions the attachments folder
- **AND** provides guidance on what documents to place there
- **AND** indicates this folder is for CV, cover letter, certificates
### Requirement: Application Folder Structure
The system SHALL create a complete folder structure for each new application including metadata, input documents, and attachments.
The system SHALL provide a `/new-application` slash command that creates a new application workspace with proper folder structure.
#### Scenario: Create new application with minimal info
- **WHEN** user runs `/new-application "TechCorp - Senior Developer"`
- **THEN** system creates folder `src/applications/pending/2025-11-02-TechCorp-Senior-Developer/` with `application.md` template and empty `input/` folder
#### Scenario: Create application with date prefix
- **WHEN** application folder is created
- **THEN** folder name is prefixed with current date in `YYYY-MM-DD` format for chronological sorting
#### Scenario: Handle special characters in folder names
- **WHEN** organization name or job title contains special characters (/, \, :, etc.)
- **THEN** system sanitizes the folder name by replacing invalid characters with hyphens or removing them
#### Scenario: Application template is created
- **WHEN** new application is initialized
- **THEN** `application.md` file is created with template sections (Organization, Job Title, Research, Match Strategy, Key Messages, Tone, etc.)
#### Scenario: Input folder is created automatically
- **WHEN** new application is initialized
- **THEN** `input/` subfolder is created for storing job-related documents
### Requirement: Application Structure
Each application workspace SHALL contain a standardized folder structure and files.
#### Scenario: Folder hierarchy is consistent
- **WHEN** application is created
- **THEN** structure is: `src/applications/pending/[date-org-title]/application.md` and `src/applications/pending/[date-org-title]/input/`
#### Scenario: Application template has required sections
- **WHEN** `application.md` is created
- **THEN** it includes sections for: Organization Name, Job Title, Job Description Summary, Research Notes, Match Strategy, Key Messages, Tone of Voice, and Document Checklist
#### Scenario: Template provides guidance
- **WHEN** user opens newly created `application.md`
- **THEN** each section includes helpful comments explaining what information to include
### Requirement: Document Population Command
The system SHALL provide a `/populate-application` slash command that analyzes input documents and populates `application.md`.
#### Scenario: Populate from current directory
- **WHEN** user runs `/populate-application` from within an application folder
- **THEN** system reads all files in `input/` subfolder and extracts relevant information