CV/setup-project.sh

152 lines
4.0 KiB
Bash
Executable File

#!/bin/bash
# Create directory structure
mkdir -p \
.cursor/rules \
.cursor/config \
.cursor/prompts \
.notes/meeting_notes \
scripts \
utils
# Create core configuration files
cat > .cursor/rules/cv-platform-rules.mdc <<EOF
**CV Platform Development Protocol**
1. Security First:
- Always sanitize user input using DOMPurify
- Encrypt resume files with AES-256-GSM during storage
2. LLM Implementation Rules:
- Use OpenAI text-embedding-3-small for semantic analysis
- Maintain 0.7 temperature for balance between creativity/accuracy
- Verify ATS keyword suggestions against JobCopilot's latest data
3. Task Management:
- Reference .notes/task_list.md before making changes
- Create atomic Git commits per feature using Conventional Commits
EOF
cat > .cursor/config/llm-params.json <<EOF
{
"defaultModel": "claude-3.5-sonnet-20240620",
"fallbackModel": "gpt-4-turbo-2024-04-09",
"temperature": {
"codeGeneration": 0.3,
"errorDebugging": 0.7
},
"contextWindow": 16000
}
EOF
# Create task tracking system
cat > .notes/task_list.md <<EOF
## P-0: Critical Path (Current Sprint)
- [ ] Implement PDF parser using PyPDF2 and @breezypdf/pdf-extract
- [ ] Create ATS keyword mapping system (Due: 2025-03-01)
## P-1: Near-Term Backlog
- [ ] Design premium subscription flow
- [ ] Research GDPR-compliant storage solutions
## P-X: Innovation Pipeline
- [ ] Experiment with Claude 3 Opus for cover letter generation
EOF
# Create prompt engineering files
cat > .cursor/prompts/cv-analysis.md <<EOF
# CV Enhancement Workflow
1. **Structural Analysis**
- Identify missing sections using industry benchmarks
- Check chronological consistency of employment history
2. **ATS Optimization**
- Cross-reference with 50+ tracking systems
- Generate keyword gap report
3. **LLM Enhancement**
- Rewrite summaries using power verbs
- Convert responsibilities to measurable achievements
EOF
cat > .cursor/prompts/error-handling.md <<EOF
**Debugging Process**
1. Reproduce the error in isolation
2. Analyze stack trace with @backend/logger.js
3. Propose 3 potential solutions with pros/cons
4. Implement safest option with rollback plan
EOF
# Create development workflow files
cat > scripts/setup-environment.sh <<EOF
#!/bin/zsh
# Install core dependencies
brew install poppler
npm install -D eslint @types/node
# Configure Cline models
curl -O https://raw.githubusercontent.com/instructa/ai-prompts/main/cline-defaults.json
# Setup Python virtualenv
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
EOF
chmod +x scripts/setup-environment.sh
# Create sample code files
cat > utils/resume_analysis.py <<EOF
from openai import OpenAI
from pdfminer.high_level import extract_text
client = OpenAI()
def analyze_resume(file_path):
text = extract_text(file_path)
response = client.chat.completions.create(
model="gpt-4-turbo",
messages=[{
"role": "system",
"content": "Analyze resume for:\\n1. Missing ATS keywords\\n2. Skill gaps\\n3. Achievement opportunities"
},
{"role": "user", "content": text}]
)
return response.choices[0].message.content
EOF
cat > utils/pdf.worker.js <<EOF
const { PDFDocument } = require('pdf-lib');
self.addEventListener('message', async (e) => {
const pdfDoc = await PDFDocument.load(e.data);
const pages = pdfDoc.getPages();
const textContent = pages.map(p => p.getTextContent());
self.postMessage(textContent);
});
EOF
# Create project documentation
cat > .notes/project_overview.md <<EOF
# CV Optimization Platform
## Key Features
- AI-powered resume analysis
- ATS compliance checking
- Real-time editing suggestions
- GDPR-compliant storage
## Tech Stack
- React.js frontend
- Node.js/Express.js backend
- MongoDB database
- OpenAI/Cline LLM integration
EOF
echo "Project structure created successfully!"
echo "Next steps:"
echo "1. Run 'chmod +x scripts/*.sh'"
echo "2. Run 'scripts/setup-environment.sh'"
echo "3. Install VS Code/Cursor extensions from .vscode/extensions.json"