Auto-deploy: 2026-08-06 12:46:03

This commit is contained in:
Hamza-Ayed
2026-08-06 12:46:03 +03:00
parent fd6498091d
commit f9b9016c22
3 changed files with 226 additions and 34 deletions
+69 -15
View File
@@ -67,7 +67,8 @@ STRICT INTEGRITY RULES — VIOLATING ANY OF THESE INVALIDATES THE OUTPUT:
${b.neverClaim.join(', ')}.
4. MY GENUINE STRENGTHS (lead with these):
${b.strongIn.map(s => ' • ' + s).join('\n')}
5. MY HONEST LIMITS (acknowledge, never paper over):
5. MY HONEST LIMITS — these constrain what you may WRITE, not what I may apply
to. Never claim them; never treat them as reasons to reject a job:
${b.limitedIn.map(s => ' • ' + s).join('\n')}
6. Every number I use must be one of the real metrics in my profile. Do not
round up, do not extrapolate, do not invent new ones.
@@ -76,6 +77,37 @@ ${b.limitedIn.map(s => ' • ' + s).join('\n')}
${P.voice.banned.join(' / ')}.`;
}
// ─── Apply/skip policy, generated from the profile ──────────────────────────
// Injected ONLY into the decision-making tabs (analysis, ATS verdict, benefits,
// bulk pre-screen). Without it the model treats the CV-integrity boundaries as a
// rejection checklist and skips almost everything.
function buildApplyPolicy(P) {
const a = P.applyPolicy;
if (!a) return '';
const supporting = (P.supportingSkills && P.supportingSkills.length)
? `
SKILL vs. TARGET — do not confuse the two. Having a skill is not wanting the job:
${P.supportingSkills.map(s => ' ~ ' + s).join('\n')}
Roles I am seeking: ${P.targetRoles.join(' | ')}.
`
: '';
return `${supporting}
APPLY / SKIP POLICY — THIS GOVERNS THE VERDICT:
Default position: APPLY. The employer runs the filter; my job is to be in the pile.
Only ONE of the following justifies a "do not apply". The list is exhaustive:
${a.hardBlockers.map(s => ' ✗ ' + s).join('\n')}
The following are explicitly NOT reasons to skip. If one of these is the worst
thing about the posting, the verdict is APPLY or APPLY WITH EDITS — never skip:
${a.notBlockers.map(s => ' ✓ ' + s).join('\n')}
CALIBRATION: ${a.calibration}
A gap is something to ADDRESS in the CV and cover letter, not a veto. State the
gap, then state how to cover it — that is the useful output.`;
}
function buildPromptV2(tab, job, userProfile, language) {
const P = (typeof PROFILE_DATA !== 'undefined') ? PROFILE_DATA : null;
if (!P) {
@@ -112,13 +144,14 @@ function buildPromptV2(tab, job, userProfile, language) {
const prof = 'MY PROFESSIONAL PROFILE:\n' + profileText;
const co = job.company || 'this company';
const STRICT_RULES = P ? buildIntegrityRules(P) : '';
const APPLY_POLICY = P ? buildApplyPolicy(P) : '';
const Pr = {};
// ── TAB: Analysis (Arabic) ────────────────────────────────────────────────
Pr.analysis = `You are an elite career strategist and a hiring manager who has
screened thousands of engineering CVs. Evaluate this job against my profile with
brutal honesty and EXTREME brevity.
Pr.analysis = `You are my career strategist — on MY side of the table, not the
employer's. Your job is to get me shortlisted, not to gatekeep. Be honest, be
brief, and be actionable.
${analysisLang}
@@ -130,6 +163,8 @@ Equally: do NOT inflate it into architecture-astronaut or CTO language.
DO NOT recount my history or summarise my profile back to me. Be actionable.
${APPLY_POLICY}
${STRICT_RULES}
${prof}
@@ -139,8 +174,10 @@ ${ctx}
Respond in this EXACT structure:
## 🎯 القرار: [تقدّم / لا تتقدّم]
[سطر واحد قصير يشرح السبب]
## 🎯 القرار: [تقدّم / تقدّم بعد تعديل السيفي / لا تتقدّم]
[سطر واحد قصير يشرح السبب. "لا تتقدّم" ممنوعة إلا إذا انطبق مانع صريح من قائمة
hardBlockers أعلاه — واذكر المانع بالاسم. إذا ما في مانع منها، القرار "تقدّم"
أو "تقدّم بعد تعديل السيفي" مهما كانت الفجوات.]
## 📊 نسبة المطابقة التقديرية: X%
[سطر واحد: على أي أساس حسبتها]
@@ -150,9 +187,9 @@ Respond in this EXACT structure:
- [نقطة 2]
- [نقطة 3]
## ❌ الفجوات الحقيقية
- [فجوة 1 — ومدى خطورتها: قاتلة / قابلة للمعالجة / شكلية]
- [فجوة 2]
## ❌ الفجوات وكيف نغطيها
- [فجوة 1 — التصنيف: مانع فعلي / قابلة للمعالجة / شكلية — ثم كيف أغطيها في السيفي أو المقابلة]
- [فجوة 2 — نفس الشيء]
## 📝 تعديلات السيفي المطلوبة
- [ما الذي يجب إبرازه]
@@ -254,6 +291,8 @@ Respond ENTIRELY in English.
${ATS_METHOD}
${APPLY_POLICY}
${STRICT_RULES}
${prof}
@@ -282,11 +321,14 @@ Write as plain lines, not a markdown table — tables break ATS parsing when cop
TRUE per my profile and carry a keyword copied exactly from the posting.]
## DISQUALIFIERS
[Anything that would auto-reject me: location, work authorisation, hard years
requirement, mandatory certification. If none, say "None detected".]
[ONLY items from the hardBlockers list above — a legally or physically impossible
requirement. On-site work, relocation, a years-of-experience preference and
unfamiliar tools are NOT disqualifiers. If none, say "None detected".]
## VERDICT
[APPLY AS-IS / APPLY AFTER EDITS / SKIP] — one sentence of reasoning.`;
[APPLY AS-IS / APPLY AFTER EDITS / SKIP] — one sentence of reasoning.
SKIP requires naming a hard blocker from the list. Otherwise choose one of the
first two, even at a low score.`;
// ── TAB: Application form Q&A ─────────────────────────────────────────────
const dynamicQuestions = (job.questions && job.questions.length > 0)
@@ -353,6 +395,8 @@ RESPOND WITH ONLY THIS FORMAT (raw JSON, answering ONLY the questions listed abo
Pr.benefits = `You are a career analyst specialising in tech compensation across
MENA and the GCC. Respond ENTIRELY in English.
${APPLY_POLICY}
${prof}
JOB:
@@ -398,10 +442,20 @@ MY PROFILE IN ONE LINE: ${P ? P.identity.primaryTitle : 'Senior Mobile Architect
MY CORE STACK: ${coreStack}
ROLES I WANT: ${targetRoles}
${APPLY_POLICY}
SCORING RULES:
- YES → Strongly matches the ROLES I WANT (Mobile, Backend, or Full Stack) and my CORE STACK at a senior level.
- MAYBE → Adjacent roles (general senior software engineering, roles where the stack is partially matching or learnable).
- NO → Completely unrelated roles (e.g., pure data science, ML, QA, pure product management, junior/mid-level roles, or stacks I have zero overlap with).
- YES → Any Mobile / Flutter / Android / Backend / Full Stack / general software
engineering role at mid-level or above. Title need not match exactly.
- MAYBE → Adjacent engineering roles where the stack only partially overlaps but is
learnable, or where seniority is a stretch in either direction.
- NO → ONLY a hard blocker from the policy above: a different discipline entirely
(data science, ML, manual QA, embedded, product management), an
infrastructure- or security-titled role (DevOps, SRE, SysAdmin, Platform,
Cloud, DBA, Security/AppSec/SOC) even though I hold those skills,
junior/intern level, or an obvious scam. Nothing else earns a NO.
Judging from the title alone: when in doubt between NO and MAYBE, answer MAYBE —
the full description has not been read yet, and a wrong NO costs me the job.
I will give you a JSON array of jobs (Title, Company).