help me add details to the original PRD that gives clear guidance and alignment to the developer who will implement this project. do not create the code, just the PRD. include tree structure and all documentation provided (with both example code and responses) those are important context. Here is the document: **# Project Overview**

You will be building a wep app that manages employee scheduling through a multi-step process. It begins with data input via CSV import or manual entry, including employee details and preferences. Users select applicable house and regulatory rules from rules.ts. An initial 31-day schedule is generated using a local algorithm, considering employee data and selected rules. The system then validates the schedule against rules and preferences, presenting results with violation indicators. An AI-powered refinement function using GPT-4o-mini can apply user-specified adjustments. Both initial and refined schedules generate reports detailing rule/preference violations. Users can make final manual adjustments before approving and exporting the schedule. The system ensures no hard-coded employee rules, relying on general instructions and the rules in rules.ts for schedule creation.

You will be using: NextJS/ TS, Tailwind, schadcn, Lucid icon

**# Current Folder Structure**

├───.env.local
├───.eslintrc.json
├───.gitignore
├───app
│   ├───api
│   │   └───refine-schedule.ts
│   ├───Card.tsx
│   ├───favicon.ico
│   ├───fonts
│   │   ├───GeistMonoVF.woff
│   │   └───GeistVF.woff
│   ├───globals.css
│   ├───layout.tsx
│   ├───Modal.tsx
│   ├───page.tsx
│   ├───ruleChecker.ts
│   ├───rules.ts
│   ├───SchedulerOverview.tsx
│   ├───types.ts
│   └───utils.ts
├───directorytree.js
├───foldertree.bat
├───next-env.d.ts
├───next.config.mjs
├───package-lock.json
├───package.json
├───postcss.config.mjs
├───public
│   ├───banner.png
│   ├───house.png
│   ├───main.png
│   ├───old_main.png
│   ├───reg.png
│   └───train_logo.png
├───README.md
├───tree.ps1
├───tree.txt
└───tsconfig.json

**# How the App is supposed to work**

1. **Data Input**
	Import employee data from a CSV file **or**
	Manually enter employee data into the system.
	Data includes work status, shift preferences, and special conditions.
	CSV Format: Emp_number, LDT,status, Name, Surname, DOB, family Ilness, Sex, Pregnant, PREF_day, PREF_night PREF_no_weekends
	

2. **Rule Selection**
	Select applicable house rules (company policies).
	Select applicable regulatory rules (legal requirements).
	These rules guide the scheduling process and are stored in rules.ts
	Both sets of rules must be used to ensure no employees are scheduled in a way that violates there special atributes

3. **Initial Schedule Generation**
	The system generates an initial schedule using a local algorithm.
	This schedule considers the imported or entered employee (which also contains shift preferences) data and the selected rules.

4. **Rule and Preference Validation**
	The system checks the generated schedule against the selected rules and employee preferences.
	Identifies any rule violations or mismatches with employee preferences. It also checks for violations of employee preferences (although these are reported but are permissible since not all employee preferences can be observed

5. **Schedule Presentation and Review**
	The initial schedule is presented to the user – it’s currently a 31 day schedule only
	The presentation includes the complete schedule, along with an icon at the top which shows if   rule violations or any preferences have been violated (the employee preferences are reported at the bottom of the UI schedule report) Additionally, a txt report is created of the current schedule and the rule/pref violations

6. **AI-Powered Refinement (Optional)**
	Users have the option to request refinements to the schedule.
	Users can provide special instructions for these refinements – for example: Give Eric Soller only morning shits and make sure Philippe Kuster has the entire month off
	The system uses ChatGPT model: gtp-4o-mini to apply these instructions and generate a refined schedule. Important: There should be no hard coded rules for any employees in the code – the schedule creation is governed by some general instructions for coverage and min hours but any the two sets of rules in rules.ts (house and regulatory). 
	A second report is created when the refined schedule comes back (same of the first one created by the algo) but this one now reports on the refined schedule

7. **Final Adjustments and Approval**
   - Users can make manual adjustments to the schedule if necessary, after the refined schedule comes back
   - Once satisfied, users approve the final version of the schedule and can later go back and refine again from there.

8. **Schedule Distribution**
   - After approval, the final schedule can be exported.
   - The exported schedule is ready for distribution to employees.

This summary outlines the step-by-step process by which the app handles employee scheduling, ensuring compliance with rules, consideration of preferences, and providing flexibility through AI and manual adjustments.