// prompts.js — All AI prompts v3 // LANGUAGE RULES: Analysis = match job language. Everything else = ENGLISH ALWAYS. function buildPromptV2(tab, job, userProfile, language) { // Only analysis follows job language; rest is always English const analysisLang = language === 'arabic' ? 'Respond entirely in Arabic.' : language === 'english' ? 'Respond entirely in English.' : 'Respond in the same language as the job posting.'; const ctx = [ 'Job Title: ' + (job.jobTitle || 'Not specified'), 'Company: ' + (job.company || 'Not specified'), 'Location: ' + (job.location || 'Not specified'), 'Type: ' + (job.jobType || 'Not specified'), 'Description:\n' + (job.description || 'No description available'), job.skills.length ? 'Required Skills: ' + job.skills.join(', ') : '' ].filter(Boolean).join('\n'); const prof = 'MY PROFESSIONAL PROFILE:\n' + userProfile; const co = job.company || 'this company'; const loc = job.location || 'Middle East'; const P = {}; P.analysis = `You are an elite career strategist. ${analysisLang} Evaluate this job against my profile with brutal honesty and EXTREME brevity. DO NOT recount my history, military background, or summarize my profile. Keep it actionable and short. ${prof} JOB POSTING: ${ctx} Respond in this EXACT concise structure: ## 🎯 VERDICT: [YES - APPLY / NO - SKIP] [One short sentence explaining why] ## ✅ WHY IT FITS (If Yes) - [Bullet point 1] - [Bullet point 2] - [Bullet point 3] ## ❌ WHY IT MIGHT NOT FIT (If No or Maybe) - [Bullet point 1 - e.g. location, specific missing skill] - [Bullet point 2] ## 📝 CV TWEAKS (If Yes) - [What to emphasize in the CV] - [What to de-emphasize]`; P.coverletter = `You are an expert career writer. Write a COMPLETE, READY-TO-SEND cover letter. IMPORTANT: Write ENTIRELY in English regardless of the job posting language. ${prof} JOB: ${ctx} FORMAT — follow EXACTLY: Dear ${co} Team, [PARAGRAPH 1 — HOOK (3 sentences max): Compelling connection between my background and this role. Mention the company by name. NO generic "I am writing to apply" openers.] [PARAGRAPH 2 — PROOF (4-5 sentences): Match 3-4 job requirements to my REAL achievements with NUMBERS. Use "At Intaleq, I..." or "When building Tripz, I..." Be concrete.] [PARAGRAPH 3 — CLOSE (2-3 sentences): Enthusiasm for THIS company. Confident call to action requesting an interview.] Best regards, Hamza Ayed hamzaayed@intaleqapp.com +962 79 858 3052 CRITICAL RULES: - MUST be in English - NO brackets or placeholders — use ACTUAL names and data - Every sentence specific to THIS job at ${co} - Under 300 words total`; P.cvtips = `You are a LinkedIn optimization expert and ATS specialist. IMPORTANT: Respond ENTIRELY in English regardless of the job posting language. ${prof} JOB: ${ctx} Respond EXACTLY: ## LINKEDIN HEADLINE [One headline, max 120 chars, ATS-optimized for this role] ## PROFESSIONAL SUMMARY [3-4 sentences tailored summary ready to paste — in English] ## ATS KEYWORDS TO ADD - [10-15 specific keywords from this job that MUST appear in CV] ## EXPERIENCE TO LEAD WITH - [Which role first and which 3-4 bullet points to highlight] ## REMOVE OR MINIMIZE - [What to de-emphasize for this application] ## SKILLS SECTION (priority order) 1. [Most important skill] 2. [Second] 3. [Continue 8-10 skills] ## NEW BULLET POINTS TO ADD - [2-3 new achievement bullets ready to paste into CV — in English]`; P.qa = `You are a career coach. Generate ready-to-paste application answers. IMPORTANT: ALL answers MUST be in English regardless of the job posting language. ${prof} JOB: ${ctx} Generate answers for ALL: ## 1. Why are you interested in this role? [3-4 sentences specific to ${co} and this role — in English] ## 2. Why ${co}? [2-3 sentences referencing something specific about the company] ## 3. Relevant experience [4-5 sentences — most relevant achievements for this role] ## 4. Expected salary [Competitive range for ${loc} market — USD and local currency] ## 5. When can you start? Available immediately or within 2 weeks. ## 6. Visa sponsorship needed? Based in Jordan. Open to relocation. Willing to process visa requirements. ## 7. Notice period Available immediately — currently seeking new opportunities. ## 8. Willing to relocate? Yes, open to ${loc} and broader Middle East. ## 9. Why are you the best candidate? [3-4 sentences — unique differentiators for THIS role] ## 10. Key technology experience [Identify top 2-3 technologies from the job description and write specific answers about my experience] RULES: ALL answers in English. Ready to paste. No brackets. Concise. Use numbers.`; P.benefits = `You are a career analyst specializing in tech compensation in MENA. IMPORTANT: Respond ENTIRELY in English regardless of the job posting language. ${prof} JOB: ${ctx} Respond EXACTLY: ## COMPENSATION ESTIMATE - **Mentioned salary:** [exact text or "Not disclosed"] - **Market estimate:** [realistic range in USD based on role, seniority, location] - **Benefits listed:** [bonuses, equity, insurance] ## WORK SETUP - **Type:** [Remote / Hybrid / On-site] - **Location:** [where + relocation support] ## CAREER VALUE - **Growth potential:** [what this leads to in 2-3 years] - **Skills I will gain:** [new skills/tech] - **Resume value:** [how it improves my CV] ## WHAT IS ATTRACTIVE - [3-5 appealing aspects for MY profile] ## RED FLAGS - [Concerning requirements or red flags] ## OVERALL RATING: X/10 **Worth applying?** [YES / MAYBE / NO] [2-3 sentence honest assessment]`; return P[tab] || P.analysis; }